:root {
  --navy: #0b1f3a;
  --navy-2: #12305a;
  --navy-3: #1b3f73;
  --gold: #b8923a;
  --gold-soft: #f6eed8;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e5e9f0;
  --bg: #f4f6fa;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 30, 60, .05), 0 4px 16px rgba(15, 30, 60, .06);
  --bs-primary: #12305a;
  --bs-primary-rgb: 18, 48, 90;
  --bs-body-font-family: 'Inter', 'Noto Sans Bengali', system-ui, sans-serif;
  --bs-body-color: var(--ink);
  --bs-link-color: #12305a;
  --bs-border-radius: .6rem;
}
html { scroll-behavior: smooth; }
body { font-family: var(--bs-body-font-family); background: var(--bg); color: var(--ink); font-size: .94rem; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6 { font-weight: 650; letter-spacing: -.01em; color: var(--navy); }
.serif { font-family: 'Playfair Display', Georgia, serif; }
.bn { font-family: 'Noto Sans Bengali', 'Inter', sans-serif; }
a { text-decoration: none; }

/* buttons */
.btn { font-weight: 550; border-radius: .6rem; padding: .5rem 1rem; }
.btn-primary { --bs-btn-bg: var(--navy-2); --bs-btn-border-color: var(--navy-2); --bs-btn-hover-bg: var(--navy); --bs-btn-hover-border-color: var(--navy); --bs-btn-active-bg: var(--navy); --bs-btn-active-border-color: var(--navy); --bs-btn-disabled-bg: var(--navy-2); --bs-btn-disabled-border-color: var(--navy-2); }
.btn-outline-primary { --bs-btn-color: var(--navy-2); --bs-btn-border-color: var(--navy-2); --bs-btn-hover-bg: var(--navy-2); --bs-btn-hover-border-color: var(--navy-2); --bs-btn-active-bg: var(--navy); }
.btn-gold { background: var(--gold); color: #fff; border: 1px solid var(--gold); }
.btn-gold:hover { background: #9f7b2b; color: #fff; border-color: #9f7b2b; }
.btn-soft { background: #eef2f8; color: var(--navy-2); border: 1px solid transparent; }
.btn-soft:hover { background: #e1e8f3; color: var(--navy); }
.btn-sm { padding: .3rem .65rem; font-size: .82rem; }
.form-control, .form-select { border-color: #d6dce8; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--navy-3); box-shadow: 0 0 0 .2rem rgba(27, 63, 115, .13); }
.form-label { font-weight: 550; font-size: .85rem; color: #334155; margin-bottom: .3rem; }
.form-text { font-size: .78rem; }

/* cards */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.card-header { background: transparent; border-bottom: 1px solid var(--line); padding: .95rem 1.25rem; font-weight: 650; color: var(--navy); }
.card-body { padding: 1.25rem; }
.table > :not(caption) > * > * { padding: .8rem 1rem; border-bottom-color: var(--line); vertical-align: middle; }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; background: #f8fafc; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-hover tbody tr:hover > * { background: #f8fafd; }
.badge { font-weight: 600; padding: .38em .65em; border-radius: 999px; }
.badge.bg-soft-success { background: #dcfce7 !important; color: #166534; }
.badge.bg-soft-warning { background: #fef3c7 !important; color: #92400e; }
.badge.bg-soft-danger { background: #fee2e2 !important; color: #991b1b; }
.badge.bg-soft-primary { background: #dbe7fb !important; color: #12305a; }
.badge.bg-soft-secondary { background: #e8ecf2 !important; color: #475569; }
.badge.bg-soft-info { background: #cffafe !important; color: #155e75; }

/* app shell */
.sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: linear-gradient(180deg, var(--navy) 0%, #0e2748 100%); color: #cbd5e1; display: flex; flex-direction: column; z-index: 1040; transition: transform .25s; }
.sidebar .brand { padding: 1.3rem 1.4rem; display: flex; align-items: center; gap: .7rem; color: #fff; font-weight: 700; font-size: 1.15rem; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.brand-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #d4ab55, var(--gold)); display: grid; place-items: center; color: #fff; font-size: 1.15rem; }
.sidebar nav { padding: 1rem .8rem; overflow-y: auto; flex: 1; }
.sidebar .nav-label { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: #6c819f; padding: .9rem .8rem .35rem; font-weight: 650; }
.sidebar a.nav-item { display: flex; align-items: center; gap: .75rem; color: #b7c4d8; padding: .62rem .85rem; border-radius: 10px; font-weight: 500; margin-bottom: 2px; font-size: .9rem; }
.sidebar a.nav-item i { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.sidebar a.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar a.nav-item.active { background: rgba(184, 146, 58, .18); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sidebar .side-foot { padding: 1rem 1.2rem; border-top: 1px solid rgba(255, 255, 255, .07); font-size: .78rem; color: #6c819f; }
.main { margin-left: 260px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); padding: .7rem 1.6rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 1030; }
.content { padding: 1.7rem; flex: 1; max-width: 1500px; width: 100%; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.4rem; }
.page-head h1 { font-size: 1.45rem; margin: 0; }
.page-head p { margin: .2rem 0 0; color: var(--muted); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--navy-3), var(--navy)); color: #fff; display: inline-grid; place-items: center; font-weight: 650; font-size: .82rem; flex: none; }
.avatar.lg { width: 84px; height: 84px; font-size: 1.7rem; }
.avatar.md { width: 52px; height: 52px; font-size: 1.05rem; }
.avatar.gold { background: linear-gradient(135deg, #d4ab55, var(--gold)); }
.notif-dot { position: absolute; top: -5px; right: -6px; font-size: .62rem; }
.dropdown-menu { border-radius: 12px; border-color: var(--line); box-shadow: 0 12px 30px rgba(15, 30, 60, .14); }
.menu-toggle { display: none; }
@media (max-width: 991px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .topbar { padding: .6rem 1rem; }
}
.scrim { display: none; position: fixed; inset: 0; background: rgba(8, 18, 36, .5); z-index: 1035; }
.scrim.show { display: block; }

/* stat cards */
.stat { display: flex; gap: 1rem; align-items: center; padding: 1.15rem 1.25rem; height: 100%; color: inherit; transition: transform .15s, box-shadow .15s; }
a.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 30, 60, .1); color: inherit; }
.stat .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex: none; }
.stat .val { font-size: 1.6rem; font-weight: 700; line-height: 1.1; color: var(--navy); }
.stat .lbl { font-size: .8rem; color: var(--muted); font-weight: 550; }
.ico-blue { background: #dbe7fb; color: #12305a; }
.ico-gold { background: var(--gold-soft); color: #8a6a1c; }
.ico-green { background: #dcfce7; color: #166534; }
.ico-red { background: #fee2e2; color: #991b1b; }
.ico-purple { background: #ede9fe; color: #5b21b6; }
.ico-cyan { background: #cffafe; color: #155e75; }

/* timeline */
.timeline { position: relative; padding-left: 1.5rem; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline .t-item { position: relative; padding-bottom: 1.15rem; }
.timeline .t-item::before { content: ''; position: absolute; left: -1.5rem; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 3px solid var(--gold); }

/* public */
.pub-nav { background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 1030; }
.pub-nav .nav-link { color: #334155; font-weight: 550; padding: .5rem .9rem !important; border-radius: 8px; }
.pub-nav .nav-link:hover, .pub-nav .nav-link.active { color: var(--navy); background: #eef2f8; }
.logo-text { font-weight: 700; color: var(--navy); font-size: 1.25rem; }
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(184, 146, 58, .25), transparent 60%), linear-gradient(135deg, var(--navy) 0%, #14335f 60%, #1b3f73 100%); color: #fff; padding: 5.5rem 0 7rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3.3rem); line-height: 1.15; }
.hero .lead { color: #c3d0e4; }
.hero .scale { position: absolute; right: -40px; bottom: -60px; font-size: 26rem; opacity: .05; line-height: 1; }
.search-card { margin-top: -3.6rem; position: relative; z-index: 5; }
.feature-ico { width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: var(--gold-soft); color: #8a6a1c; margin-bottom: 1rem; }
.lawyer-card { transition: transform .15s, box-shadow .15s; height: 100%; }
.lawyer-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15, 30, 60, .12); }
.stars { color: #e0a82e; letter-spacing: 1px; white-space: nowrap; }
.stars .off { color: #d5dbe5; }
.section { padding: 4.2rem 0; }
.section-title { text-align: center; margin-bottom: 2.6rem; }
.section-title h2 { font-size: 2rem; }
.section-title p { color: var(--muted); max-width: 620px; margin: .5rem auto 0; }
.cat-pill { display: flex; align-items: center; gap: .7rem; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; color: var(--navy); font-weight: 550; transition: all .15s; height: 100%; }
.cat-pill:hover { border-color: var(--gold); background: var(--gold-soft); color: var(--navy); }
.cat-pill i { color: var(--gold); font-size: 1.2rem; }
.footer { background: var(--navy); color: #94a7c4; padding: 3.2rem 0 1.5rem; }
.footer h6 { color: #fff; }
.footer a { color: #94a7c4; }
.footer a:hover { color: #fff; }
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: linear-gradient(135deg, var(--navy), #1b3f73); color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side h2 { color: #fff; }
.auth-side .scale { position: absolute; right: -50px; bottom: -70px; font-size: 22rem; opacity: .06; line-height: 1; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } .auth-side { display: none; } }

/* feed */
.post-card { margin-bottom: 1.2rem; }
.post-body { white-space: pre-line; }
.post-actions { border-top: 1px solid var(--line); display: flex; padding: .3rem .6rem; }
.post-actions form, .post-actions button { flex: 1; }
.post-actions .act { width: 100%; background: none; border: none; color: var(--muted); font-weight: 600; padding: .6rem; border-radius: 8px; font-size: .88rem; }
.post-actions .act:hover { background: #f1f5f9; color: var(--navy); }
.post-actions .act.on { color: #c2410c; }
.comment { display: flex; gap: .6rem; margin-bottom: .7rem; }
.comment .bubble { background: #f1f5f9; border-radius: 14px; padding: .5rem .85rem; flex: 1; }

/* chat */
.chat-box { height: 420px; overflow-y: auto; background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.msg { max-width: 75%; padding: .55rem .85rem; border-radius: 14px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--navy-2); color: #fff; border-color: var(--navy-2); }
.msg small { display: block; opacity: .65; font-size: .68rem; margin-top: .15rem; }

.empty { text-align: center; color: var(--muted); padding: 2.5rem 1rem; }
.empty i { font-size: 2.4rem; color: #c3cbd9; display: block; margin-bottom: .5rem; }
.days-chip { font-size: .75rem; font-weight: 650; padding: .25rem .6rem; border-radius: 999px; }
.d-urgent { background: #fee2e2; color: #991b1b; }
.d-soon { background: #fef3c7; color: #92400e; }
.d-ok { background: #dcfce7; color: #166534; }
.switch-lg .form-check-input { width: 3em; height: 1.5em; }
.rating-input { direction: rtl; display: inline-flex; gap: .2rem; }
.rating-input input { display: none; }
.rating-input label { font-size: 1.7rem; color: #d5dbe5; cursor: pointer; }
.rating-input input:checked ~ label, .rating-input label:hover, .rating-input label:hover ~ label { color: #e0a82e; }
@media print { .sidebar, .topbar, .no-print, .btn { display: none !important; } .main { margin: 0; } .card { box-shadow: none; } }
