/* কওমি মাদ্রাসা ম্যানেজমেন্ট – মূল স্টাইল */
:root {
    --brand: #0f5132;
    --brand-light: #e8f3ee;
    --bs-font-sans-serif: "Hind Siliguri", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body { font-family: var(--bs-font-sans-serif); background: #f6f8f7; }
.bg-brand { background: var(--brand) !important; }
.btn-success { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: #0b3d26; --bs-btn-hover-border-color: #0b3d26; }

.btn-outline-success { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-light); --bs-btn-hover-color: var(--brand); }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-check-input:focus { border-color: #5a9a7c; box-shadow: 0 0 0 .2rem rgba(15, 81, 50, .2); }

/* আরবি লেখা ডান থেকে বামে */
.ar, [lang="ar"] { font-family: "Amiri", "Traditional Arabic", serif; direction: rtl; unicode-bidi: isolate; font-size: 1.1em; }

.auth-body { background: linear-gradient(160deg, var(--brand-light), #fff 60%); }
.auth-card { border-radius: 1rem; }
.brand-mark { width: 64px; height: 64px; border-radius: 1rem; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 2rem; font-family: "Amiri", serif; }

.sidebar {
    background: linear-gradient(180deg, #0f5132 0%, #0c4329 45%, #082f1d 100%);
    color: #d7e8df; min-height: calc(100vh - 56px); border-right: 0;
}
@media (min-width: 992px) {
    .sidebar { position: sticky; top: 56px; height: calc(100vh - 56px); overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.25) transparent; }
}
.sidebar .nav { padding: .8rem .65rem; gap: 2px; }
.sidebar .nav-link {
    display: flex; align-items: center; gap: .65rem; color: rgba(255,255,255,.84);
    padding: .42rem .6rem; border-radius: .7rem; font-size: .95rem; line-height: 1.3;
    transition: background .15s, color .15s, transform .15s;
}
.sidebar .nav-link .mi {
    flex: none; width: 32px; height: 32px; border-radius: .6rem; display: grid; place-items: center;
    background: rgba(255,255,255,.08); font-size: 1rem; transition: background .15s;
}
.sidebar .nav-link .ml { flex: 1; min-width: 0; }
.sidebar .nav-link .lk { font-size: .75rem; opacity: .8; }
.sidebar .nav-link:hover, .sidebar .nav-link:focus-visible { background: rgba(255,255,255,.09); color: #fff; transform: translateX(2px); }
.sidebar .nav-link:hover .mi { background: rgba(255,255,255,.14); }
.sidebar .nav-link.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 .4rem 1rem rgba(0,0,0,.18); }
.sidebar .nav-link.active .mi { background: var(--brand-light); }
.sidebar .nav-link.locked { opacity: .55; }
.sidebar-user { color: rgba(255,255,255,.75); border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-user .link-secondary { color: rgba(255,255,255,.75) !important; }
.sidebar-user .link-secondary:hover { color: #fff !important; }
.sidebar-user .badge.text-bg-light { background: rgba(255,255,255,.14) !important; color: #fff !important; font-weight: 500; }
.sidebar-user .btn-outline-success { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255,255,255,.4); --bs-btn-hover-bg: #fff; --bs-btn-hover-color: var(--brand); --bs-btn-hover-border-color: #fff; }

.stat-card { border: 0; border-radius: .75rem; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.stat-card .label { color: #6c757d; font-size: .9rem; }
.stat-card .value { font-size: 1.6rem; font-weight: 700; color: var(--brand); }
.card { border-radius: .75rem; }
.table > :not(caption) > * > * { padding: .6rem .75rem; }

/* অভিভাবকের লগইন স্লিপ প্রিন্ট: শুধু স্লিপটা ছাপা হবে */
@media print {
    body:has(#slip) * { visibility: hidden; }
    body:has(#slip) #slip, body:has(#slip) #slip * { visibility: visible; }
    #slip { position: absolute; top: 0; left: 0; width: 100%; border: 0 !important; }
    .no-print { display: none !important; }
}
.logo-sm { max-height: 72px; }
.container-narrow { max-width: 860px; }
.w-relation { max-width: 110px; }
.w-40 { width: 40%; }
.photo-box { width: 150px; height: 180px; object-fit: cover; }
.photo-sm { width: 64px; height: 76px; object-fit: cover; }
.marks-table .mark-input { width: 5.5rem; min-width: 4.5rem; }
.sign-thumb { width: 7rem; height: 3rem; display: flex; align-items: center; justify-content: center; border: 1px dashed #ccc; border-radius: .25rem; background: #fff; }
.sign-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }
.att-btn { min-width: 2.6rem; }

/* হিফয: ৩০ পারার ছক */
.hz-paras { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.hz-para { border: 1px solid #cfd8d3; border-radius: 4px; text-align: center; padding: 6px 0; font-size: .85rem; background: #f6f8f7; color: #6c757d; }
.hz-para.done { background: #198754; border-color: #198754; color: #fff; font-weight: 600; }
.hz-para.cur { background: #ffc107; border-color: #e0a800; color: #212529; font-weight: 600; }
.hz-key { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; vertical-align: middle; }
.hz-key.done { background: #198754; } .hz-key.cur { background: #ffc107; }
.hz-pbtn { min-width: 2.4rem; }
.hz-card .form-control-sm, .hz-card .form-select-sm { font-size: .9rem; }

/* ---------------- প্রশ্নপত্র ---------------- */
.qp { font-family: "Hind Siliguri", "Amiri", serif; font-size: 14px; line-height: 1.55; color: #000; background: #fff; }
.qp.qp-ar, .qp.qp-ur { font-family: "Amiri", "Hind Siliguri", serif; font-size: 16px; }
.qp-arabic { font-family: "Amiri", "Traditional Arabic", serif; font-size: 1.2em; line-height: 1.8; }
.qp-head { text-align: center; border-bottom: 1.5px solid #000; padding-bottom: .4em; margin-bottom: .6em; position: relative; }
.qp-logo { position: absolute; inset-inline-start: 0; top: 0; height: 3.4em; }
.qp-mname { font-size: 1.35em; font-weight: 700; }
.qp-exam { font-weight: 600; }
.qp-meta, .qp-roll { display: flex; justify-content: space-between; margin-top: .3em; }
.qp-roll { justify-content: space-around; font-size: .95em; }
.qp-keytitle { margin-top: .3em; font-weight: 700; border: 1px solid #000; display: inline-block; padding: 0 .8em; }
.qp-instr { font-size: .95em; margin-bottom: .6em; font-style: italic; }
.qp-sec { margin-bottom: .6em; }
.qp-sec-title { text-align: center; font-weight: 700; margin: .5em 0 .1em; }
.qp-sec-instr { text-align: center; font-size: .95em; margin-bottom: .3em; }
.qp-q { margin: .35em 0; break-inside: avoid; }
.qp-line { display: flex; gap: .4em; align-items: baseline; }
.qp-n { min-width: 1.6em; font-weight: 600; }
.qp-body { flex: 1; }
.qp-m { white-space: nowrap; margin-inline-start: .5em; font-weight: 600; }
.qp-subq { margin-inline-start: 1.6em; }
.qp-ibarat { border: 1px solid #555; border-radius: 4px; padding: .3em .6em; margin-bottom: .2em; text-align: justify; }
.qp-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .1em 1em; margin-inline-start: 2em; }
.qp-correct { font-weight: 700; text-decoration: underline; }
.qp-match { margin-inline-start: 2em; width: calc(100% - 2em); }
.qp-match td { padding: .05em .4em; vertical-align: top; width: 50%; }
.qp-ans { margin-inline-start: 2em; color: #0a5c36; border-inline-start: 3px solid #0a5c36; padding-inline-start: .5em; font-size: .95em; }
.qp-preview { border: 1px solid #dee2e6; padding: 1.2rem; border-radius: .5rem; max-height: 80vh; overflow: auto; }
.qb-item { border: 1px solid #e3e7e5; border-radius: .4rem; padding: .5rem; margin-bottom: .5rem; background: #fff; }
.qb-sub { background: #f7faf8; margin-inline-start: 1rem; }
.qb-ibarat { font-family: "Amiri", "Hind Siliguri", serif; font-size: 1.1rem; }
.qb-body[dir="auto"] { unicode-bidi: plaintext; }
/* দরসের রুটিন ছক */
.rt-grid td { min-width: 150px; }
.rt-grid td .form-select, .rt-grid td .form-control { font-size: .78rem; }
/* সাহায্য ও টিউটোরিয়াল */
.help-card:hover { border-color: var(--bs-success); box-shadow: 0 .25rem .75rem rgba(0,0,0,.06); }
.help-body { line-height: 1.85; }
.help-body h3, .help-body h4, .help-body h5 { font-size: 1.05rem; font-weight: 600; margin-top: 1.1rem; }
.help-body ol, .help-body ul { padding-inline-start: 1.4rem; }
.help-body li { margin-bottom: .35rem; }
html[lang="bn"] .help-body ol { list-style-type: bengali; }

/* ডেমো সার্ভার */
.demo-bar { background: #fff3cd; color: #664d03; text-align: center; font-size: .85rem; padding: .3rem .75rem; border-bottom: 1px solid #ffe69c; }
@media print { .demo-bar { display: none; } }
