/* DOLMS — base layout. Tokens first; components in components.css. No external requests. */

@font-face {
  font-family: "Noto Sans Bengali";
  src: url("../fonts/noto-sans-bengali-bengali-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  src: url("../fonts/noto-sans-bengali-bengali-700.woff2") format("woff2");
  font-weight: 600 700; font-style: normal; font-display: swap;
  unicode-range: U+0951-0952, U+0964-0965, U+0980-09FE, U+1CD0, U+1CD2, U+1CD5-1CD6, U+1CD8, U+1CE1, U+1CEA, U+1CED, U+1CF2, U+1CF5-1CF7, U+200C-200D, U+20B9, U+25CC, U+A8F1;
}
@font-face {
  font-family: "Noto Sans Bengali";
  src: url("../fonts/noto-sans-bengali-latin-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Noto Sans Bengali";
  src: url("../fonts/noto-sans-bengali-latin-700.woff2") format("woff2");
  font-weight: 600 700; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --font: "Noto Sans Bengali", "SolaimanLipi", "Nirmala UI", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;

  --c-primary: #0f6b5c;
  --c-primary-dark: #0a4d42;
  --c-primary-soft: #e6f3f0;
  --c-accent: #c2410c;
  --c-bg: #f3f5f7;
  --c-surface: #ffffff;
  --c-border: #dde3e8;
  --c-text: #1d2733;
  --c-muted: #5f6b78;
  --c-success: #15803d;
  --c-success-soft: #e8f6ed;
  --c-danger: #b91c1c;
  --c-danger-soft: #fdecec;
  --c-warning: #a16207;
  --c-warning-soft: #fdf6e3;
  --c-info: #0369a1;
  --c-info-soft: #e7f3fb;
  --c-focus: #2563eb;

  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --topbar-h: 60px;
  --sidebar-w: 248px;
  --gutter: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5rem; font-weight: 700; }
h1 { font-size: 1.45rem; }
h2 { font-size: 1.12rem; }
p { margin: 0 0 .75rem; }
a { color: var(--c-primary); }
a:hover { color: var(--c-primary-dark); }
code { font-family: var(--mono); font-size: .88em; background: #eef1f4; padding: 1px 5px; border-radius: 4px; }
img, svg { max-width: 100%; }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; }

.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--c-muted); }
.small { font-size: .86rem; }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--gutter);
  background: linear-gradient(90deg, var(--c-primary-dark), var(--c-primary));
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand img { border-radius: 8px; background: #fff; padding: 3px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-text small { opacity: .85; font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.user-meta { display: flex; flex-direction: column; text-align: right; line-height: 1.25; }
.user-meta small { opacity: .85; font-size: .78rem; }
.topbar .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }
.topbar .btn-ghost:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-toggle { display: none; color: #fff; }

.shell { display: flex; min-height: calc(100vh - var(--topbar-h)); }
.sidebar {
  width: var(--sidebar-w); flex: none;
  background: var(--c-surface);
  border-right: 1px solid var(--c-border);
  padding: 16px 12px;
  position: sticky; top: var(--topbar-h);
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.nav { list-style: none; margin: 0; padding: 0; }
.nav-heading { margin: 18px 10px 6px; font-size: .76rem; font-weight: 700; color: var(--c-muted); letter-spacing: .02em; }
.nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0;
  border-radius: var(--radius-sm);
  color: var(--c-text); text-decoration: none;
}
.nav-link:hover { background: var(--c-bg); color: var(--c-text); }
.nav-link.is-active { background: var(--c-primary-soft); color: var(--c-primary-dark); font-weight: 600; }
.nav-link.is-active .icon { color: var(--c-primary); }

.main { flex: 1; min-width: 0; padding: var(--gutter); }
.main:focus { outline: none; }
.footer { text-align: center; color: var(--c-muted); font-size: .8rem; padding: 14px; border-top: 1px solid var(--c-border); background: var(--c-surface); }
.backdrop { display: none; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.page-head h1 { margin: 0; }
.page-head > p { width: 100%; margin: 0; }

.grid { display: grid; gap: 16px; margin-bottom: 16px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); align-items: start; }
.grid > .card { margin-bottom: 0; }

/* ---------- auth pages ---------- */
.auth-page {
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(15, 107, 92, .22), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(194, 65, 12, .12), transparent 60%),
    var(--c-bg);
}
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--c-surface);
  border-radius: 16px;
  border: 1px solid var(--c-border);
  box-shadow: 0 10px 30px rgba(16, 24, 40, .08);
  padding: 32px 28px;
}
.auth-head { text-align: center; margin-bottom: 20px; }
.auth-head img { margin-bottom: 8px; }
.auth-head h1 { font-size: 1.3rem; color: var(--c-primary-dark); margin-bottom: 2px; }
.auth-foot { text-align: center; margin: 18px 0 0; }
.error-card { text-align: center; }
.error-code { font-size: 3rem; font-weight: 700; color: var(--c-primary); margin: 0; line-height: 1.2; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  :root { --gutter: 16px; }
  .nav-toggle { display: inline-flex; }
  .sidebar {
    position: fixed; left: 0; top: var(--topbar-h); z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 4px 0 16px rgba(0, 0, 0, .12);
  }
  .nav-open .sidebar { transform: translateX(0); }
  .nav-open .backdrop { display: block; position: fixed; inset: var(--topbar-h) 0 0 0; background: rgba(15, 23, 42, .35); z-index: 35; }
  .grid-3 { grid-template-columns: 1fr; }
  .user-meta { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 480px) {
  .brand-text small { display: none; }
  .auth-card { padding: 24px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
@media print {
  .topbar, .sidebar, .footer, .filter-bar, .col-actions, .btn { display: none !important; }
  .main { padding: 0; }
  body { background: #fff; }
}
