/* BiomCapital — ডিজাইন */
:root {
  --navy: #081653;
  --navy-2: #2F4FC4;
  --ink: #0B1430;
  --text: #2B3346;
  --muted: #5B6478;
  --faint: #6B7385;
  --bg: #F4F5F7;
  --surface: #FFFFFF;
  --surface-2: #FBFBFC;
  --line: #E2E5EC;
  --line-2: #EEF0F4;
  --grey: #E8EAEC;
  --blue-soft: #E6EBFF;
  --blue-line: #C3CEFA;
  --blue-ink: #1E3699;
  --green: #17633F;
  --green-soft: #E3F5EC;
  --green-line: #B5E2CB;
  --amber: #9A4A0B;
  --amber-soft: #FDF0E1;
  --amber-line: #F3D3AE;
  --red: #B42318;
  --red-soft: #FDECEA;
  --shadow: 0 12px 30px rgba(8, 22, 83, 0.06);
  --radius: 22px;
  --font: 'Hind Siliguri', system-ui, sans-serif;
  --display: 'Space Grotesk', 'Hind Siliguri', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg);
  font-size: 16px; line-height: 1.6;
}
a { color: var(--navy); }
a:hover { color: var(--navy-2); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; }
[hidden] { display: none !important; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.grad-text { background: linear-gradient(90deg, var(--navy), var(--navy-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { background: linear-gradient(transparent 62%, #C9D4FF 62%); }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.green { color: var(--green); }
.red { color: var(--red); }
.num { font-family: var(--display); font-weight: 700; }
.center { text-align: center; }

/* ---------- হেডার ---------- */
.topbar { position: sticky; top: 0; z-index: 30; padding: 12px 12px 0; }
.topbar-inner {
  max-width: 1160px; margin: 0 auto; background: rgba(251, 251, 252, 0.94); backdrop-filter: blur(8px);
  border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 10px 30px rgba(8, 22, 83, 0.08);
  padding: 10px 12px 10px 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand img { height: 26px; width: auto; display: block; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- বাটন ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 10px 18px;
  border-radius: 12px; border: 1px solid #D5D9E3; background: var(--surface-2); color: var(--ink);
  font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; transition: transform .1s, box-shadow .1s, background .15s;
}
.btn:hover { background: #F0F2F7; color: var(--ink); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-navy { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn-navy:hover { background: #0E2170; color: #fff; }
.btn-hero {
  background: linear-gradient(90deg, #DCE4FF, #B8C7FF); color: var(--navy); border: 1.5px solid var(--navy);
  box-shadow: 5px 5px 0 var(--navy); font-weight: 700; min-height: 52px; padding: 12px 24px; font-size: 17px;
}
.btn-hero:hover { transform: translate(2px, 2px); box-shadow: 3px 3px 0 var(--navy); background: linear-gradient(90deg, #DCE4FF, #B8C7FF); color: var(--navy); }
.btn-danger { color: var(--red); border-color: #F2C6C1; }
.btn-danger:hover { background: var(--red-soft); color: var(--red); }
.btn-sm { min-height: 38px; padding: 6px 12px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }
.icon-btn { min-height: 38px; min-width: 38px; padding: 6px; }

/* ---------- লেবেল / পিল ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--blue-ink);
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase;
}
.pill .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--navy-2); box-shadow: 0 0 0 4px rgba(47, 79, 196, .18); }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 2px 9px; border-radius: 7px; background: var(--blue-soft); color: var(--blue-ink); white-space: nowrap; }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-red { background: var(--red-soft); color: var(--red); }
.tag-grey { background: var(--grey); color: var(--text); }

/* ---------- কার্ড ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.card h2 { margin: 0; font-size: 21px; }
.card-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px; }
.glow-blue { background-image: radial-gradient(circle at 100% 0%, rgba(120, 150, 255, .16), transparent 50%); }
.glow-green { background-image: radial-gradient(circle at 100% 0%, rgba(80, 190, 140, .16), transparent 50%); }
.glow-amber { background-image: radial-gradient(circle at 100% 0%, rgba(240, 170, 90, .18), transparent 50%); }
.glow-purple { background-image: radial-gradient(circle at 100% 0%, rgba(150, 120, 230, .16), transparent 50%); }
.icon-box { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; background: var(--blue-soft); border: 1px solid var(--blue-line); color: var(--blue-ink); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .label { font-size: 15px; color: var(--muted); }
.stat .value { font-family: var(--display); font-weight: 700; font-size: 32px; line-height: 1.2; color: var(--ink); }
.stat .sub { font-size: 14px; color: var(--faint); }
.stat-dark { background: var(--navy); border-color: var(--navy); color: #fff; box-shadow: 6px 6px 0 #B8C7FF; }
.stat-dark .label, .stat-dark .sub { color: #C7CCE0; }
.stat-dark .value { color: #fff; }

/* ---------- টেবিল ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-2); border-radius: 14px; }
table.t { width: 100%; border-collapse: collapse; font-size: 15.5px; }
table.t th { background: var(--bg); color: #4B5568; text-align: left; font-weight: 600; font-size: 14px; padding: 11px 14px; white-space: nowrap; }
table.t td { padding: 11px 14px; border-top: 1px solid var(--line-2); vertical-align: middle; }
table.t .r { text-align: right; white-space: nowrap; }
table.t tr.hl td { background: #F7F9FF; }
table.t tr.total td { background: var(--bg); font-weight: 700; }
table.t tr.clickable { cursor: pointer; }
table.t tr.clickable:hover td { background: #F7F9FF; }
.empty { border: 1.5px dashed #D5D9E3; border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); }

/* ---------- ফর্ম ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 500; color: #1F2937; }
.input, select.input, textarea.input {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid #CBD0DC; border-radius: 12px; background: #fff; color: var(--ink); font-size: 16px;
}
.input:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 4px rgba(47, 79, 196, .15); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.hint { font-size: 14px; color: var(--faint); }
.alert { padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.alert-error { background: var(--red-soft); color: var(--red); border: 1px solid #F2C6C1; }
.alert-ok { background: var(--green-soft); color: var(--green); border: 1px solid var(--green-line); }
.alert-info { background: var(--blue-soft); color: var(--blue-ink); border: 1px solid var(--blue-line); }
.alert-warn { background: var(--amber-soft); color: var(--amber); border: 1px solid var(--amber-line); }

/* ---------- মডাল ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(8, 22, 83, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 24px 12px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 22px; width: 100%; max-width: 560px; padding: 24px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); display: flex; flex-direction: column; gap: 16px; margin: auto 0; }
.modal.wide { max-width: 1040px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h3 { margin: 0; font-size: 21px; }
.modal-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }

.secret { font-family: var(--mono); font-size: 28px; letter-spacing: .08em; background: var(--blue-soft); border: 1.5px dashed var(--blue-line); border-radius: 14px; padding: 14px; text-align: center; color: var(--navy); user-select: all; }

/* ---------- টোস্ট ---------- */
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); font-size: 15px; }
.toast.error { background: var(--red); }

/* ---------- লোডিং ---------- */
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 60px 20px; color: var(--muted); }
.spinner { width: 22px; height: 22px; border: 3px solid var(--line); border-top-color: var(--navy); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- পাবলিক পেজ ---------- */
.hero { padding: 48px 0 56px; background-image:
  linear-gradient(rgba(8, 22, 83, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(8, 22, 83, .045) 1px, transparent 1px),
  radial-gradient(circle at 85% 10%, rgba(120, 150, 255, .22), transparent 45%), radial-gradient(circle at 0% 60%, rgba(8, 22, 83, .07), transparent 40%);
  background-size: 64px 64px, 64px 64px, 100% 100%, 100% 100%; }
.hero h1 { margin: 18px 0 14px; font-size: clamp(34px, 6vw, 54px); line-height: 1.25; max-width: 820px; }
.hero p.lead { margin: 0; font-size: 19px; color: #4B5568; max-width: 620px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.statbar { margin-top: 34px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); overflow: hidden; box-shadow: var(--shadow); }
.statbar > div { padding: 22px 24px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; display: flex; flex-direction: column; gap: 4px; }
.statbar .value { font-family: var(--display); font-weight: 700; font-size: 36px; line-height: 1.2; }
.statbar .label { color: var(--muted); }
.section { padding: 72px 0; }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 34px; }
.section-head.c { align-items: center; text-align: center; }
.section-head h2 { margin: 0; font-size: clamp(28px, 4.5vw, 40px); line-height: 1.3; }
.section-head p { margin: 0; font-size: 18px; color: var(--muted); max-width: 640px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 18px; }
.grid-cards .card { display: flex; flex-direction: column; gap: 12px; padding: 28px; }
.grid-cards h3 { margin: 0; font-size: 21px; }
.grid-cards p { margin: 0; color: var(--muted); line-height: 1.75; }
.footer { background: var(--grey); border-top: 1px solid #D5D9E3; }
.footer-inner { padding: 48px 0 24px; display: flex; flex-direction: column; gap: 32px; }
.footer-cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer h4 { margin: 0 0 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .18em; color: var(--muted); font-weight: 500; }
.footer a { display: block; color: var(--text); text-decoration: none; padding: 4px 0; font-size: 17px; }
.footer-bottom { border-top: 1px solid #D0D4DE; padding-top: 20px; text-align: center; color: #4B5568; }

/* ---------- লগইন ---------- */
.auth-wrap { min-height: calc(100vh - 90px); display: flex; align-items: center; justify-content: center; padding: 32px 16px; }
.auth-card { width: 100%; max-width: 440px; display: flex; flex-direction: column; gap: 18px; padding: 30px; }
.auth-card h1 { margin: 0; font-size: 28px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--navy-2); font-weight: 600; padding: 8px; cursor: pointer; }

/* ---------- ড্যাশবোর্ড ---------- */
.page { max-width: 1160px; margin: 0 auto; padding: 24px 12px 56px; display: flex; flex-direction: column; gap: 20px; }
.profile-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.avatar { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--navy), var(--navy-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700; flex: 0 0 auto; }
.row-2 { display: flex; flex-wrap: wrap; gap: 20px; }
.row-2 > .main { flex: 999 1 520px; min-width: 0; }
.row-2 > .side { flex: 1 1 280px; min-width: 0; }
.chart svg { display: block; width: 100%; height: auto; max-height: 280px; }

/* ---------- Admin ---------- */
.tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 16px; }
.tab { flex: 0 0 auto; border: 0; background: transparent; padding: 10px 16px; border-radius: 12px; font-weight: 600; color: var(--muted); cursor: pointer; min-height: 44px; }
.tab.active { background: var(--navy); color: #fff; }
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.toolbar .input { max-width: 340px; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 15.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

@media (max-width: 640px) {
  .brand img { height: 22px; }
  .card { padding: 18px; border-radius: 18px; }
  .stat .value { font-size: 28px; }
  .section { padding: 56px 0; }
  .btn-label-hide { display: none; }
  .modal { padding: 18px; }
}
