:root {
    --poha-primary: #0a2342;
    --poha-primary-dark: #061628;
    --poha-accent: #1a4d8c;
    --poha-bg: #f7f9fc;
    --poha-ink: #0c1b2e;
    --poha-muted: #5a6b80;
    --poha-card: #ffffff;
    --poha-line: #d6e0ec;
    --bs-primary: #0a2342;
    --bs-primary-rgb: 10, 35, 66;
    --bs-link-color: #0a2342;
    --bs-link-hover-color: #061628;
    --bs-focus-ring-color: rgba(10, 35, 66, 0.25);
}

html,
body {
    min-height: 100%;
}

body {
    background: var(--poha-bg);
    color: var(--poha-ink);
}

.app-navbar {
    background: var(--poha-primary);
    box-shadow: 0 2px 10px rgba(6, 22, 40, 0.18);
}

.app-navbar .navbar-brand {
    font-weight: 650;
    letter-spacing: 0.01em;
}

.app-navbar .nav-link {
    font-weight: 500;
}

.btn-primary {
    background-color: var(--poha-primary);
    border-color: var(--poha-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--poha-primary-dark);
    border-color: var(--poha-primary-dark);
}

.btn-outline-primary {
    color: var(--poha-primary);
    border-color: var(--poha-primary);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--poha-primary);
    border-color: var(--poha-primary);
    color: #fff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--poha-accent);
    box-shadow: 0 0 0 0.2rem rgba(10, 35, 66, 0.16);
}

.text-primary {
    color: var(--poha-primary) !important;
}

.card {
    border-radius: 0.75rem;
}

/* Login */
.auth-body {
    margin: 0;
    background: var(--poha-primary-dark);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
}

.auth-brand {
    display: flex;
    align-items: center;
    padding: 3rem;
    color: #fff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.12), transparent 42%),
        linear-gradient(160deg, #0a2342 0%, #061628 70%);
}

.auth-brand-inner {
    max-width: 460px;
}

.auth-mark {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.12);
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.auth-kicker {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.auth-title {
    font-size: 2.1rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.auth-lead {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.75rem;
}

.auth-points {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.auth-points li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
    color: rgba(255, 255, 255, 0.9);
}

.auth-points i {
    width: 1.25rem;
    opacity: 0.85;
}

.auth-foot {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.62);
}

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--poha-bg);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--poha-card);
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(28, 41, 56, 0.08);
    padding: 2rem;
}

.auth-card-head h2 {
    font-size: 1.45rem;
    margin-bottom: 0.25rem;
}

.auth-card-head p {
    color: var(--poha-muted);
    margin-bottom: 1.25rem;
}

.auth-form .input-group-text {
    background: #eef3f8;
    border-color: var(--poha-line);
    color: var(--poha-primary);
}

.auth-form .form-control {
    min-height: 46px;
}

.auth-submit {
    min-height: 46px;
    font-weight: 600;
}

/* Home */
.home-hero {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: center;
    padding: 1.5rem 1.75rem;
    border-radius: 1rem;
    color: #fff;
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.14), transparent 36%),
        linear-gradient(135deg, #0a2342 0%, #1a4d8c 100%);
}

.home-kicker,
.home-hero-text {
    color: rgba(255, 255, 255, 0.82);
}

.home-role {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: flex-end;
    max-width: 420px;
}

.home-quick {
    font-weight: 600;
}

.stat-card,
.side-card,
.module-card {
    background: var(--poha-card);
    border-radius: 0.9rem;
    box-shadow: 0 8px 24px rgba(28, 41, 56, 0.05);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem 1.1rem;
    height: 100%;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: #fff;
    flex-shrink: 0;
}

.bg-students { background: #0a2342; }
.bg-teachers { background: #1a4d8c; }
.bg-enroll { background: #3d7a5c; }
.bg-fees { background: #b45309; }

.stat-label {
    color: var(--poha-muted);
    font-size: 0.82rem;
}

.stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
}

.module-group-title {
    font-size: 0.92rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--poha-muted);
    margin-bottom: 0.75rem;
}

.module-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.95rem 1rem;
    text-decoration: none;
    color: inherit;
    height: 100%;
    border: 1px solid transparent;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: #c5d5e6;
    box-shadow: 0 12px 28px rgba(28, 41, 56, 0.08);
    color: inherit;
}

.module-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #eaf1f8;
    color: var(--poha-primary);
}

.module-name {
    display: block;
    font-weight: 650;
}

.module-hint {
    display: block;
    color: var(--poha-muted);
    font-size: 0.8rem;
}

.side-card {
    padding: 1.2rem 1.3rem;
}

.side-dl > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef2f6;
}

.side-dl > div:last-child {
    border-bottom: 0;
}

.side-dl dt {
    font-weight: 500;
    color: var(--poha-muted);
}

.side-dl dd {
    margin: 0;
    font-weight: 650;
}

.announce-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #eef2f6;
}

.announce-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.announce-item h3 {
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.announce-item p {
    margin: 0;
    color: var(--poha-muted);
    font-size: 0.85rem;
}

.user-chip {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.875rem;
}

/* Student ID card + printable list */
.id-card-print-area {
    display: flex;
    justify-content: center;
    padding: 1rem 0 2rem;
}

.student-id-card {
    width: 92mm;
    min-height: 58mm;
    background: linear-gradient(165deg, #ffffff 0%, #f3f7fb 55%, #e8f0f8 100%);
    border: 1px solid var(--poha-line);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 28px rgba(6, 22, 40, 0.12);
    color: var(--poha-ink);
}

.student-id-card__header {
    background: var(--poha-primary);
    color: #fff;
    padding: 0.65rem 0.8rem;
}

.student-id-card__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.student-id-card__logo,
.student-id-card__logo-fallback {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}

.student-id-card__academy {
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
}

.student-id-card__subtitle {
    font-size: 0.68rem;
    opacity: 0.85;
}

.student-id-card__body {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.75rem;
    padding: 0.8rem;
}

.student-id-card__photo {
    width: 72px;
    height: 88px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--poha-line);
    background: #fff;
}

.student-id-card__name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.student-id-card__meta {
    margin: 0;
    display: grid;
    gap: 0.2rem;
}

.student-id-card__meta > div {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 0.35rem;
    font-size: 0.72rem;
    line-height: 1.25;
}

.student-id-card__meta dt {
    margin: 0;
    color: var(--poha-muted);
    font-weight: 500;
}

.student-id-card__meta dd {
    margin: 0;
    font-weight: 600;
}

.student-id-card__footer {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0.8rem 0.55rem;
    border-top: 1px solid var(--poha-line);
    font-size: 0.62rem;
    color: var(--poha-muted);
}

.student-id-card__status {
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    color: var(--poha-primary);
}

.student-print-list__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--poha-primary);
}

.student-print-list__logo {
    max-height: 48px;
    max-width: 72px;
    object-fit: contain;
}

.student-print-list__photo {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--poha-line);
}

.student-print-list__table th {
    background: #eef3f8;
    font-size: 0.8rem;
}

@media print {
    body {
        background: #fff !important;
    }

    .app-navbar,
    .d-print-none,
    .alert {
        display: none !important;
    }

    main.container-fluid {
        padding: 0 !important;
        margin: 0 !important;
        max-width: none !important;
    }

    .id-card-print-area {
        padding: 0;
        justify-content: flex-start;
    }

    .student-id-card {
        box-shadow: none;
        page-break-inside: avoid;
    }

    .student-print-list__table {
        font-size: 11px;
    }

    .student-print-list__table th,
    .student-print-list__table td {
        padding: 0.25rem 0.35rem !important;
    }
}

/* Student result card / mark sheet */
.result-card {
    max-width: 920px;
    margin: 0 auto 2rem;
    background: #fff;
    border: 1px solid var(--poha-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(6, 22, 40, 0.08);
}

.result-card__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--poha-primary) 0%, var(--poha-accent) 100%);
    color: #fff;
}

.result-card__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.result-card__logo,
.result-card__logo-fallback {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
}

.result-card__academy {
    font-size: 1.05rem;
    font-weight: 700;
}

.result-card__subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
}

.result-card__exam-meta {
    font-size: 0.9rem;
}

.result-card__student {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid var(--poha-line);
    background: #f8fbfe;
}

.result-card__photo {
    width: 88px;
    height: 104px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid var(--poha-line);
    background: #fff;
}

.result-card__student-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem 1.25rem;
}

.result-card__table {
    margin: 0;
}

.result-card__table thead th {
    background: #eef3f8;
    font-size: 0.82rem;
}

.result-card__table tfoot th {
    background: #f4f7fb;
}

.result-pill {
    display: inline-block;
    min-width: 3.5rem;
    text-align: center;
    padding: 0.15rem 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.result-pill.is-pass {
    background: #e7f7ee;
    color: #147a3d;
}

.result-pill.is-fail {
    background: #fdeceb;
    color: #b42318;
}

.result-card__summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--poha-line);
}

.result-card__footer {
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--poha-line);
    color: var(--poha-muted);
    font-size: 0.8rem;
}

.result-card__signs {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 2rem;
}

.result-card__sign {
    width: 42%;
    text-align: center;
}

.result-card__sign-line {
    border-top: 1px solid #9aa8b8;
    margin-bottom: 0.4rem;
}

@media (max-width: 700px) {
    .result-card__student,
    .result-card__student-grid,
    .result-card__summary {
        grid-template-columns: 1fr;
    }

    .result-card__header {
        flex-direction: column;
    }
}

@media print {
    .result-card {
        box-shadow: none;
        border-radius: 0;
        max-width: none;
        margin: 0;
    }

    .result-card__header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Student certificate */
.certificate-sheet {
    max-width: 980px;
    margin: 0 auto 2rem;
}

.certificate-sheet__border {
    padding: 14px;
    background:
        linear-gradient(#fff, #fff) padding-box,
        linear-gradient(135deg, #c5d4e8, #0a2342, #c5d4e8) border-box;
    border: 3px solid transparent;
    border-radius: 18px;
}

.certificate-sheet__inner {
    border: 1px solid #d7e0ea;
    border-radius: 12px;
    padding: 2rem 2.25rem 1.75rem;
    background:
        radial-gradient(circle at top right, rgba(26, 77, 140, 0.08), transparent 40%),
        radial-gradient(circle at bottom left, rgba(10, 35, 66, 0.06), transparent 42%),
        #fff;
    text-align: center;
}

.certificate-sheet__logo,
.certificate-sheet__logo-fallback {
    width: 64px;
    height: 64px;
    margin: 0 auto 0.75rem;
    border-radius: 14px;
    object-fit: cover;
    display: grid;
    place-items: center;
    background: #eef3f8;
    color: var(--poha-primary);
    font-size: 1.5rem;
}

.certificate-sheet__academy {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--poha-primary);
}

.certificate-sheet__eyebrow {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: var(--poha-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.certificate-sheet__title {
    margin: 0.35rem 0 1.25rem;
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 700;
    color: #061628;
    letter-spacing: 0.02em;
}

.certificate-sheet__body {
    margin: 0.35rem 0;
    color: var(--poha-muted);
    font-size: 1.05rem;
}

.certificate-sheet__name {
    margin: 0.5rem 0 0.25rem;
    font-size: clamp(1.6rem, 3.5vw, 2.2rem);
    font-weight: 700;
    color: var(--poha-ink);
}

.certificate-sheet__id {
    margin-bottom: 0.85rem;
    color: var(--poha-muted);
    font-size: 0.95rem;
}

.certificate-sheet__course {
    margin: 0.35rem auto 0.85rem;
    max-width: 34rem;
    font-size: clamp(1.2rem, 2.5vw, 1.55rem);
    font-weight: 700;
    color: var(--poha-primary);
}

.certificate-sheet__meta {
    margin: 0 auto 1.25rem;
    max-width: 40rem;
    color: var(--poha-muted);
    font-size: 0.95rem;
}

.certificate-sheet__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    max-width: 40rem;
    margin: 0 auto 1rem;
}

.certificate-sheet__stats > div {
    background: #f7fafc;
    border: 1px solid #e3ebf3;
    border-radius: 10px;
    padding: 0.7rem 0.5rem;
}

.certificate-sheet__stat-label {
    font-size: 0.75rem;
    color: var(--poha-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.certificate-sheet__stat-value {
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.certificate-sheet__stat-value.is-pass { color: #147a3d; }
.certificate-sheet__stat-value.is-fail { color: #b42318; }

.certificate-sheet__subjects {
    margin: 0 auto 1.25rem;
    max-width: 42rem;
    color: var(--poha-muted);
    font-size: 0.9rem;
}

.certificate-sheet__footer {
    margin-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    align-items: flex-end;
    text-align: left;
}

.certificate-sheet__issued {
    color: var(--poha-muted);
    font-size: 0.85rem;
}

.certificate-sheet__signs {
    display: flex;
    gap: 2rem;
    min-width: 48%;
    justify-content: flex-end;
}

.certificate-sheet__sign {
    width: 160px;
    text-align: center;
    font-size: 0.82rem;
    color: var(--poha-muted);
}

.certificate-sheet__sign-line {
    border-top: 1px solid #8fa0b2;
    margin-bottom: 0.4rem;
}

@media (max-width: 760px) {
    .certificate-sheet__inner {
        padding: 1.25rem;
    }

    .certificate-sheet__stats,
    .certificate-sheet__footer {
        grid-template-columns: 1fr 1fr;
        display: grid;
    }

    .certificate-sheet__signs {
        grid-column: 1 / -1;
        justify-content: space-between;
        min-width: 0;
    }
}

@media print {
    .certificate-sheet {
        max-width: none;
        margin: 0;
    }

    .certificate-sheet__border,
    .certificate-sheet__inner {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

/* Payment slip / receipt */
.payment-slip {
    max-width: 820px;
    margin: 0 auto 2rem;
    background: #fff;
    border: 1px solid var(--poha-line);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(6, 22, 40, 0.08);
}

.payment-slip__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, #0a2342 0%, #1a4d8c 100%);
    color: #fff;
}

.payment-slip__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.payment-slip__logo,
.payment-slip__logo-fallback {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    background: rgba(255, 255, 255, 0.16);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}

.payment-slip__academy {
    font-size: 1.05rem;
    font-weight: 700;
}

.payment-slip__subtitle {
    font-size: 0.8rem;
    opacity: 0.9;
}

.payment-slip__ref-label {
    font-size: 0.75rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-slip__ref-value {
    font-size: 1.05rem;
    font-weight: 700;
}

.payment-slip__voided {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: #fdeceb;
    color: #b42318;
    font-size: 0.72rem;
    font-weight: 700;
}

.payment-slip__student {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #f8fbfe;
    border-bottom: 1px solid var(--poha-line);
}

.payment-slip__photo {
    width: 72px;
    height: 86px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--poha-line);
    background: #fff;
}

.payment-slip__student-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem 1rem;
}

.payment-slip__amount-block {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--poha-line);
}

.payment-slip__amount-label {
    font-size: 0.8rem;
    color: var(--poha-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.payment-slip__amount-value {
    margin-top: 0.2rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--poha-primary);
}

.payment-slip__amount-side {
    display: grid;
    gap: 0.45rem;
    align-content: center;
}

.payment-slip__amount-side > div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.payment-slip__amount-side span {
    color: var(--poha-muted);
}

.payment-slip__table {
    margin: 0;
}

.payment-slip__table thead th {
    background: #eef3f8;
    font-size: 0.82rem;
}

.payment-slip__notes {
    padding: 0.9rem 1.25rem;
    border-top: 1px solid var(--poha-line);
}

.payment-slip__footer {
    display: flex;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem 1.25rem 1.25rem;
    border-top: 1px solid var(--poha-line);
}

.payment-slip__signs {
    display: flex;
    gap: 1.5rem;
    min-width: 46%;
    justify-content: flex-end;
}

.payment-slip__sign {
    width: 150px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--poha-muted);
}

.payment-slip__sign-line {
    border-top: 1px solid #8fa0b2;
    margin-bottom: 0.35rem;
}

@media (max-width: 700px) {
    .payment-slip__student,
    .payment-slip__student-grid,
    .payment-slip__amount-block,
    .payment-slip__footer {
        grid-template-columns: 1fr;
        display: grid;
    }

    .payment-slip__header {
        flex-direction: column;
    }

    .payment-slip__signs {
        justify-content: space-between;
        min-width: 0;
    }
}

@media print {
    .app-navbar,
    .d-print-none {
        display: none !important;
    }

    body.app-body,
    main {
        background: #fff !important;
    }

    .payment-slip {
        box-shadow: none;
        border-radius: 0;
        max-width: none;
        margin: 0;
    }

    .payment-slip__header {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
