@font-face {
    font-family: 'Nikosh';
    src: url('../fonts/Nikosh.woff2') format('woff2'),
         url('../fonts/Nikosh.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
    /* শুধু বাংলা লিপির জন্য নিকশ — ইংরেজি/ল্যাটিন আগের ফন্টেই থাকবে */
    unicode-range: U+0980-09FF, U+0964-0965, U+200C-200D, U+25CC;
}

:root {
    --hd-bg: #133d3a;
    --hd-bg2: #0f3331;
    --primary: #17614f;
    --primary-dark: #114c3e;
    --primary-soft: #eef6f2;
    --primary-line: #b9d6cb;
    --accent-text: #17614f;
    --body-bg: #f4f5f4;
    --card-border: #e2e7e5;
    --text: #13201d;
    --muted: #5d6b67;
    --bs-primary: #17614f;
    --bs-primary-rgb: 23,97,79;
    --bs-link-color: #17614f;
    --bs-link-color-rgb: 23,97,79;
    --bs-link-hover-color: #114c3e;
    --bs-link-hover-color-rgb: 17,76,62;
}

html, body { height: 100%; }
body {
    font-family: "Nikosh", "Hind Siliguri", "Inter", system-ui, sans-serif;
    background: var(--body-bg);
    color: var(--text);
    font-size: 1rem;
}
h1, h2, h3, h4, h5, .fw-bold { font-family: "Nikosh", "Hind Siliguri", "Inter", sans-serif; }
.bn, td, .table th { font-family: "Nikosh", "Hind Siliguri", "Inter", sans-serif; }
.en { font-family: "Inter", "Nikosh", "Hind Siliguri", sans-serif; }
.xsmall { font-size: .76rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .02em; }
.text-muted { color: var(--muted) !important; }

/* Bootstrap colour overrides -> green theme */
.btn-primary {
    --bs-btn-bg: var(--primary); --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary-dark); --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark);
    --bs-btn-disabled-bg: var(--primary); --bs-btn-disabled-border-color: var(--primary);
}
.btn-outline-primary {
    --bs-btn-color: var(--primary); --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary); --bs-btn-hover-border-color: var(--primary);
    --bs-btn-active-bg: var(--primary-dark); --bs-btn-active-border-color: var(--primary-dark);
}
.text-bg-primary { background-color: var(--primary) !important; }
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.progress-bar { background-color: var(--primary); }
.page-link { color: var(--primary); }
.active > .page-link, .page-link.active { background-color: var(--primary); border-color: var(--primary); }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }
a { color: var(--primary); }

/* ---------- Header ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topnav { background: var(--hd-bg); color: #fff; position: sticky; top: 0; z-index: 1030; }
.topnav-inner { max-width: 1320px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: .85rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo {
    width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid rgba(255,255,255,.35);
    display: grid; place-items: center; font-size: 1.35rem; color: #fff; flex-shrink: 0;
}
.brand-title { font-weight: 700; font-size: 1.55rem; line-height: 1.1; color: #fff; }
.brand-sub { font-size: .78rem; color: #a9c6bf; }
.topnav-links { display: flex; align-items: center; gap: .25rem; margin-left: 1.25rem; }
.topnav-links a {
    color: #c9dcd7; text-decoration: none; padding: .45rem .8rem; border-radius: 8px; font-weight: 500;
    display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
}
.topnav-links a:hover { background: rgba(255,255,255,.08); color: #fff; }
.topnav-links a.active { background: rgba(255,255,255,.14); color: #fff; }
.topnav-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.btn-update {
    background: #fff; color: var(--primary); border: 1px solid #fff; border-radius: 8px;
    padding: .6rem 1.1rem; font-weight: 500; text-decoration: none; white-space: nowrap;
}
.btn-update:hover { background: var(--primary-soft); color: var(--primary-dark); }
.user-btn {
    background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff;
    border-radius: 8px; padding: .4rem .7rem; display: flex; align-items: center; gap: .5rem;
}
.user-btn:hover, .user-btn:focus { background: rgba(255,255,255,.15); color: #fff; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: #d7ebe4; color: var(--primary); font-weight: 700; display: grid; place-items: center; font-size: .82rem; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.3); color: #fff; border-radius: 8px; padding: .35rem .6rem; font-size: 1.2rem; }

@media (max-width: 1099.98px) {
    .nav-toggle { display: inline-block; }
    .topnav-links { display: none; order: 10; width: 100%; margin: .25rem 0 0; flex-direction: column; align-items: stretch; }
    .topnav-links.open { display: flex; }
    .brand-title { font-size: 1.25rem; }
    .btn-update .long { display: none; }
}

.content { max-width: 1320px; width: 100%; margin: 0 auto; padding: 2rem 1.5rem; flex: 1; }
.page-head { margin-bottom: 1.25rem; }
.page-title { font-size: 1.6rem; font-weight: 700; margin: 0; }
.footer { max-width: 1320px; width: 100%; margin: 0 auto; padding: 1rem 1.5rem 2rem; color: var(--muted); font-size: .85rem; }

/* ---------- Cards ---------- */
.card { border: 1px solid var(--card-border); border-radius: 18px; box-shadow: 0 1px 2px rgba(19,32,29,.03); background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid var(--card-border); padding: 1rem 1.3rem; font-weight: 600; border-radius: 18px 18px 0 0 !important; }
.stat-card { padding: 1.2rem; display: flex; align-items: center; gap: 1rem; }
.stat-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 1.45rem; flex-shrink: 0; }
.stat-value { font-size: 1.6rem; font-weight: 700; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: .85rem; }
.bg-soft-blue { background: #e3f0ec; color: var(--primary); }
.bg-soft-green { background: #e6f4e6; color: #2f7a3a; }
.bg-soft-amber { background: #fbf1dc; color: #9a6413; }
.bg-soft-purple { background: #ece9f6; color: #5b4a9a; }

.bar-row { margin-bottom: .7rem; }
.bar-row .progress { height: 8px; border-radius: 6px; background: #edf1ef; }

/* ---------- Tables ---------- */
.table-pro { margin: 0; }
.table-pro thead th {
    background: #f7f9f8; color: #4a5a56; font-weight: 600; font-size: .85rem;
    border-bottom: 1px solid var(--card-border); white-space: nowrap; padding: .75rem .9rem;
}
.table-pro td { padding: .7rem .9rem; vertical-align: middle; border-color: #f0f3f2; }
.table-pro tbody tr:hover { background: #f6faf8; }
mark { background: #fdf0a6; padding: 0 .1rem; border-radius: 3px; }

/* ---------- Forms ---------- */
.filter-card .form-label { font-size: .85rem; font-weight: 600; color: #4a5a56; margin-bottom: .3rem; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: .8rem; top: 50%; transform: translateY(-50%); color: #93a39f; }
.input-icon .form-control { padding-left: 2.3rem; }
.form-control, .form-select { border-radius: 10px; border-color: #d5dedb; }
.form-control:focus, .form-select:focus { border-color: #7fb5a5; box-shadow: 0 0 0 .2rem rgba(23,97,79,.14); }
.btn { border-radius: 10px; font-weight: 500; }

/* ---------- Search page (home) ---------- */
.eyebrow { color: var(--accent-text); font-weight: 600; font-size: 1.05rem; margin-bottom: .35rem; }
.hero-title { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; line-height: 1.2; margin-bottom: .75rem; }
.hero-lead { color: var(--muted); font-size: 1.15rem; max-width: 720px; line-height: 1.7; margin-bottom: 2rem; }
.panel { background: #fff; border: 1px solid var(--card-border); border-radius: 22px; padding: 2rem 2.25rem; margin-bottom: 2rem; }
.panel-title { display: flex; align-items: center; gap: .9rem; font-size: 1.45rem; font-weight: 700; margin-bottom: 1.4rem; }
.step { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; font-weight: 600; font-size: 1rem; flex-shrink: 0; }
.mode-q { color: var(--muted); margin-bottom: .7rem; }
.mode-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; margin-bottom: 1.6rem; }
.mode-opt { position: relative; margin: 0; cursor: pointer; }
.mode-opt input { position: absolute; opacity: 0; pointer-events: none; }
.mode-opt span {
    display: flex; align-items: center; gap: .9rem; padding: 1.05rem 1.9rem; font-size: 1.2rem;
    border: 1px solid var(--card-border); border-radius: 12px; background: #fff; transition: all .15s;
}
.mode-opt span::before {
    content: ""; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid #8a9895; flex-shrink: 0; background: #fff;
}
.mode-opt input:checked + span { background: var(--primary-soft); border-color: var(--primary-line); color: var(--primary); }
.mode-opt input:checked + span::before { border-color: var(--primary); box-shadow: inset 0 0 0 4px #fff; background: var(--primary); }
.mode-opt input:focus-visible + span { outline: 3px solid rgba(23,97,79,.3); outline-offset: 2px; }
.search-label { font-weight: 700; font-size: 1.15rem; margin-bottom: .6rem; display: block; }
.search-row { display: flex; gap: 1rem; }
.search-row .form-control { flex: 1; padding: 1.05rem 1.3rem; font-size: 1.35rem; border-radius: 12px; background: #fbfcfb; }
.btn-search { background: var(--primary); color: #fff; border: 0; border-radius: 12px; padding: 0 2.3rem; font-weight: 700; font-size: 1.2rem; white-space: nowrap; }
.btn-search:hover { background: var(--primary-dark); color: #fff; }
.search-hint { color: var(--muted); margin: .9rem 0 0; }
.result-empty { text-align: center; padding: 3.5rem 1.5rem; }
.result-empty .icon { width: 78px; height: 78px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; margin: 0 auto 1.1rem; font-size: 1.4rem; }
.result-empty h3 { font-weight: 700; font-size: 1.5rem; margin-bottom: .6rem; }
.result-empty p { color: var(--muted); max-width: 520px; margin: 0 auto; font-size: 1.05rem; }
.disclaimer { color: var(--muted); font-size: .92rem; }

.side-card { background: #fff; border: 1px solid var(--card-border); border-radius: 22px; padding: 1.9rem 2rem; margin-bottom: 1.75rem; }
.side-card h2 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1rem; }
.big-num { font-size: 3.6rem; font-weight: 700; line-height: 1.1; color: var(--text); }
.big-sub { color: var(--muted); margin-bottom: 1.6rem; }
.stat-list { list-style: none; padding: 0; margin: 0 0 1.4rem; border-top: 1px solid var(--card-border); }
.stat-list li { display: flex; justify-content: space-between; gap: 1rem; padding: .95rem 0; border-bottom: 1px solid var(--card-border); }
.stat-list li a { color: var(--text); text-decoration: none; }
.stat-list li a:hover { color: var(--primary); }
.stat-list .n { color: var(--primary); font-weight: 700; white-space: nowrap; }
.side-foot { color: var(--muted); font-size: .9rem; }
.about-card h2 { color: #3f5a52; }
.about-card p { color: var(--muted); line-height: 1.7; margin-bottom: .9rem; }

.res-card { background: #fff; border: 1px solid var(--card-border); border-radius: 18px; padding: 1.5rem 1.75rem; margin-bottom: 1rem; }
.res-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.res-name { font-size: 1.35rem; font-weight: 700; margin: 0; }
.res-badge { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; font-weight: 600; }
.res-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .9rem 1.5rem; margin: 0; }
.res-grid dt { color: var(--muted); font-weight: 500; font-size: .85rem; }
.res-grid dd { font-weight: 600; margin: 0; font-size: 1.05rem; }

@media (max-width: 767.98px) {
    .content { padding: 1.25rem 1rem; }
    .panel, .side-card { padding: 1.4rem 1.2rem; border-radius: 18px; }
    .mode-row { grid-template-columns: 1fr; gap: .7rem; }
    .search-row { flex-direction: column; }
    .btn-search { padding: .9rem; }
    .big-num { font-size: 2.8rem; }
}

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-hero {
    background: radial-gradient(circle at 20% 20%, #1f5a50 0, var(--hd-bg2) 65%);
    color: #dbe8e4; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between;
}
.login-hero h2 { color: #fff; font-weight: 700; font-size: 2.2rem; }
.login-hero .feature { display: flex; gap: .8rem; margin-bottom: 1rem; align-items: flex-start; }
.login-hero .feature i { font-size: 1.3rem; color: #8fd1bc; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 2rem; background: #fff; }
.login-box { width: 100%; max-width: 380px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-hero { display: none; } }

.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.6rem; color: #c3d0cc; display: block; margin-bottom: .6rem; }
.detail-list dt { color: var(--muted); font-weight: 500; font-size: .85rem; }
.detail-list dd { font-weight: 600; margin-bottom: .8rem; }

/* ---------- Office cards (Offices page inline styles override) ---------- */
.off-card .off-name { font-family: "Nikosh", "Hind Siliguri", system-ui, sans-serif; }

/* ---------- Print ---------- */
@media print {
    .topnav, .footer, .no-print, .side-col, .alert { display: none !important; }
    body { background: #fff; }
    .content { padding: 0; max-width: none; }
    .res-card { border: 1px solid #999; break-inside: avoid; }
    .main-col { width: 100% !important; max-width: 100% !important; flex: 0 0 100% !important; }
}
