/* Brokerage House – UI design tokens */
:root {
  --ink: #0f1b2d; --ink-2: #1b2a41; --ink-3: #2a3b55;
  --brand: #0b7a5a; --brand-2: #0e9f6e; --brand-soft: #e3f4ec;
  --buy: #0a8f5a; --sell: #cf3f36;
  --bg: #f4f5f7; --card: #ffffff; --line: #e4e7ec; --muted: #667085; --text: #1d2939;
  --warn: #b54708; --warn-soft: #fef0c7; --danger-soft: #fee4e2; --info-soft: #e0eaff; --ok-soft: #dcfae6;
  --radius: 10px;
}
html { font-size: 14.5px; }
body { font-family: "Inter", "Hind Siliguri", system-ui, sans-serif; background: var(--bg); color: var(--text); }
html[lang="bn"] body { font-family: "Hind Siliguri", "Inter", system-ui, sans-serif; }
.num, td.num, th.num, .table .num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .86em; }
a { color: var(--brand); }
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-brand:hover { background: #096b4e; border-color: #096b4e; color: #fff; }
.btn-buy { background: var(--buy); color: #fff; } .btn-buy:hover { background: #087a4c; color: #fff; }
.btn-sell { background: var(--sell); color: #fff; } .btn-sell:hover { background: #b5352d; color: #fff; }
.text-buy { color: var(--buy) !important; } .text-sell { color: var(--sell) !important; }
.text-muted-2 { color: var(--muted) !important; }

/* Demo ribbon */
.demo-bar { background: repeating-linear-gradient(45deg, #fff3c4, #fff3c4 12px, #ffe9a3 12px, #ffe9a3 24px); color: #7a4d00;
  font-size: .78rem; font-weight: 600; text-align: center; padding: 3px 8px; letter-spacing: .02em; }

/* Staff shell */
.shell { display: flex; min-height: 100vh; background: linear-gradient(to right, var(--ink) 252px, var(--bg) 252px); }
@media (max-width: 991px) { .shell { background: var(--bg); } }
form.d-flex { align-items: flex-start; }
.sidebar { width: 252px; background: var(--ink); color: #c8d1de; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.2rem; color: #fff; font-weight: 700; letter-spacing: .01em; text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--brand-2), #06523c); display: grid; place-items: center; color: #fff; font-size: 1rem; }
.sidebar .section { font-size: .68rem; text-transform: uppercase; letter-spacing: .09em; color: #7d8ba1; padding: 1rem 1.2rem .35rem; }
.sidebar a.nav-item { display: flex; align-items: center; gap: .65rem; padding: .48rem 1.2rem; color: #c8d1de; text-decoration: none; font-size: .92rem; border-left: 3px solid transparent; }
.sidebar a.nav-item:hover { background: var(--ink-2); color: #fff; }
.sidebar a.nav-item.active { background: var(--ink-2); color: #fff; border-left-color: var(--brand-2); }
.sidebar a.nav-item i { font-size: 1rem; opacity: .85; width: 18px; }
.sidebar .count { margin-left: auto; background: var(--sell); color: #fff; border-radius: 99px; font-size: .7rem; padding: 0 .45rem; }
.main { flex: 1; min-width: 0; }
.topbar { background: #fff; border-bottom: 1px solid var(--line); padding: .65rem 1.5rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 10; }
.content { padding: 1.4rem 1.5rem 3rem; max-width: 1500px; }
@media (max-width: 991px) {
  .sidebar { position: fixed; left: -260px; z-index: 1040; transition: left .2s; }
  .sidebar.open { left: 0; }
  .content { padding: 1rem; }
}

/* Page header */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head h1 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .9rem; margin-top: .15rem; }

/* Cards & stats */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; padding: .75rem 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; height: 100%; }
.stat .label { color: var(--muted); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.stat .value { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; margin-top: .2rem; }
.stat .hint { font-size: .78rem; color: var(--muted); }
.stat.accent { border-left: 4px solid var(--brand-2); }
.stat.alert { border-left: 4px solid var(--sell); }
.stat a { text-decoration: none; color: inherit; }

/* Tables */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; background: #f9fafb; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { vertical-align: middle; border-color: #eef0f3; }
.table-hover tbody tr:hover { background: #f8fbfa; }

/* Badges */
.badge { font-weight: 600; font-size: .72rem; padding: .32em .6em; border-radius: 6px; }
.badge-soft-success { background: var(--ok-soft); color: #067647; }
.badge-soft-warning { background: var(--warn-soft); color: var(--warn); }
.badge-soft-danger { background: var(--danger-soft); color: #b42318; }
.badge-soft-info { background: var(--info-soft); color: #3538cd; }
.badge-soft-secondary { background: #eef0f3; color: #475467; }
.badge-demo { background: #fff3c4; color: #7a4d00; border: 1px dashed #e0b400; }
.side-buy { color: var(--buy); font-weight: 700; } .side-sell { color: var(--sell); font-weight: 700; }

/* Forms */
.form-label { font-weight: 600; font-size: .84rem; color: #344054; margin-bottom: .3rem; }
.form-control, .form-select { border-color: #d0d5dd; border-radius: 8px; }
.form-control:focus, .form-select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(14,159,110,.15); }
.req::after { content: " *"; color: var(--sell); }

/* Wizard */
.steps { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.steps a { flex: 1 1 140px; text-decoration: none; padding: .6rem .8rem; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.steps a .n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 99px; background: #eef0f3; color: #475467; font-weight: 700; font-size: .75rem; margin-right: .4rem; }
.steps a.done .n { background: var(--brand-soft); color: var(--brand); }
.steps a.current { border-color: var(--brand-2); color: var(--text); font-weight: 600; }
.steps a.current .n { background: var(--brand); color: #fff; }

/* Timeline */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 .9rem 1.4rem; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 99px; background: #fff; border: 2px solid var(--brand-2); }
.timeline .t { font-size: .78rem; color: var(--muted); }

/* Customer portal */
.portal-nav { background: var(--ink); }
.portal-nav .nav-link { color: #c8d1de; font-weight: 500; padding: .9rem .9rem; border-bottom: 3px solid transparent; }
.portal-nav .nav-link.active, .portal-nav .nav-link:hover { color: #fff; border-bottom-color: var(--brand-2); }
.balance-hero { background: linear-gradient(120deg, var(--ink) 0%, #12324a 60%, #0b5a45 100%); color: #fff; border-radius: 14px; padding: 1.4rem 1.5rem; }
.balance-hero .label { color: #a9b7c9; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; }
.balance-hero .big { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.balance-hero .mini { font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-side { background: linear-gradient(150deg, var(--ink) 0%, #0f3a4a 55%, #0b6b50 100%); color: #e6edf5; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; }
.auth-side h2 { color: #fff; font-weight: 700; font-size: 2rem; line-height: 1.2; }
.auth-side .ticker { font-family: "JetBrains Mono", monospace; font-size: .85rem; opacity: .85; }
.auth-form { display: grid; place-items: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 420px; }
.code-input { letter-spacing: .6em; font-size: 1.6rem; text-align: center; font-weight: 700; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* Print */
@media print {
  .no-print, .sidebar, .topbar, .portal-nav, .demo-bar { display: none !important; }
  body { background: #fff; }
  .card { border: none; box-shadow: none; }
}
.doc-sheet { background: #fff; max-width: 900px; margin: 1.5rem auto; padding: 2rem 2.4rem; border: 1px solid var(--line); border-radius: 6px; }
.doc-sheet h2 { font-size: 1.2rem; font-weight: 700; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: .25rem .8rem; font-size: .9rem; }
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }
.empty i { font-size: 1.8rem; display: block; margin-bottom: .3rem; opacity: .6; }
.dev-credit a { color: var(--brand); font-weight: 600; text-decoration: none; }
.dev-credit a:hover { text-decoration: underline; }
