/* ================================================================
   UPSESC Question Challenge Portal — V8 Production Stylesheet
   Mobile-first · Government standards · High-load optimized
   ================================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0
}

:root {
    --navy: #0a2647;
    --navy2: #144272;
    --navy-lt: #205295;
    --saffron: #c0392b;
    --saffron-dk: #962d22;
    --gold: #c8960c;
    --gold-lt: #fdf2c5;
    --cream: #f0f2f5;
    --surface: #fff;
    --border: #d1d9e6;
    --border-lt: #e8edf5;
    --text: #1a1d23;
    --text-sec: #495057;
    --muted: #6c757d;
    --input-bg: #f7f8fb;
    --green: #0f7b3f;
    --green-lt: #e6f9ee;
    --red: #c0392b;
    --red-lt: #fef2f2;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 1px 3px rgba(10,38,71,.06);
    --shadow-md: 0 4px 16px rgba(10,38,71,.08);
    --shadow-lg: 0 8px 30px rgba(10,38,71,.12);
    --font: 'Noto Sans','Segoe UI',system-ui,-apple-system,sans-serif;
    --font-hi: 'Noto Sans Devanagari',var(--font);
    --max-w: 1100px;
    --tr: .2s ease
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%
}

body {
    font-family: var(--font);
    background: var(--cream);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overflow-x: hidden
}

    body.login-page {
        display: flex;
        flex-direction: column;
        height: 100vh;
        max-height: 100vh;
        overflow: hidden
    }

/* ── GOV HEADER ──────────────────────────────────────────── */
.site-header {
    background: var(--surface);
    border-bottom: 3px solid var(--saffron);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    flex-shrink: 0
}

    .site-header > table {
        width: 100%
    }

.header-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 4px 16px
}

    .header-inner td {
        vertical-align: middle
    }

    .header-inner img {
        border-radius: 4px
    }

.header-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--saffron);
    line-height: 1.35;
    letter-spacing: .01em
}

    .header-title span {
        color: var(--navy) !important;
        font-size: 13px !important;
        font-family: var(--font-hi) !important
    }

.tricolor {
    height: 5px;
    background: linear-gradient(to right,#ff9933 33.3%,#fff 33.3% 66.6%,#128807 66.6%);
    flex-shrink: 0
}

/* ── EXAM BANNER ─────────────────────────────────────────── */
.exam-name-banner {
    background: linear-gradient(135deg,var(--navy) 0%,var(--navy2) 100%);
    text-align: center;
    padding: 4px 12px;
    border-bottom: 2px solid var(--gold);
    flex-shrink: 0
}

    .exam-name-banner span {
        font-size: 14px;
        font-weight: 700;
        color: #ffd54f;
        letter-spacing: .03em
    }

    .exam-name-banner .qc-label {
        display: block;
        font-size: 11px;
        font-weight: 500;
        color: rgba(255,255,255,.75);
        letter-spacing: .06em;
        margin-top: 2px;
        text-transform: uppercase
    }

/* ── MENU BAR ────────────────────────────────────────────── */
.menu-row {
    background: var(--navy);
    min-height: 34px;
    padding: 0 16px;
    flex-shrink: 0
}

.menu-table {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    background-color: var(--navy);
    font-family: var(--font);
    font-size: 12px;
    border: 0;
    border-spacing: 0
}

.menu-item {
    padding: 6px 16px;
    white-space: nowrap
}

    .menu-item.active {
        background: var(--navy-lt);
        border-radius: 4px 4px 0 0
    }

    .menu-item font, .menu-item span, .menu-item a, .menu-item .menu-text,
    .menu-link, .menu-link font, .menu-link span, .menu-link .menu-text {
        color: rgba(255,255,255,.8) !important;
        text-decoration: none;
        font-size: 11.5px !important;
        font-family: var(--font) !important;
        transition: color var(--tr)
    }

    .menu-item.active font, .menu-item.active span, .menu-item.active .menu-text {
        color: #fff !important;
        font-weight: 700
    }

.menu-link:hover, .menu-link:hover font, .menu-link:hover span {
    color: #fff !important
}

.user-info {
    color: rgba(255,255,255,.85);
    font-size: 11px;
    padding-right: 16px;
    white-space: nowrap
}

    .user-info b {
        color: #fff;
        font-weight: 600
    }

    .user-info .candidate-roll {
        color: #ffd54f;
        font-weight: 700;
        font-size: 11px
    }

.loggedin-text {
    color: rgba(255,255,255,.5);
    font-size: 10px
}

.logout-link, .logout-link b {
    color: #ff8a80 !important;
    text-decoration: none;
    font-weight: 600
}

    .logout-link:hover, .logout-link:hover b {
        color: #ff5252 !important
    }

.menu-divider {
    width: 1px;
    background: rgba(255,255,255,.12)
}

/* ── PAGE BODY ───────────────────────────────────────────── */
.page-body {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 16px 12px 24px;
    align-items: flex-start
}

.login-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    overflow-y: auto;
    min-height: 0
}

/* ── CARDS ────────────────────────────────────────────────── */
.login-card, .content-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-lt);
    overflow: hidden;
    width: 100%
}

.login-wrap {
    max-width: 420px;
    width: 100%
}

.content-wrap {
    max-width: var(--max-w);
    width: 100%
}

.card-head {
    background: linear-gradient(135deg,var(--navy),var(--navy2));
    padding: 14px 20px 12px;
    position: relative
}

    .card-head::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(to right,var(--saffron),var(--gold))
    }

    .card-head h2 {
        font-size: 14px;
        font-weight: 700;
        color: #fff;
        letter-spacing: .02em
    }

    .card-head p {
        font-size: 11px;
        color: rgba(255,255,255,.6);
        margin-top: 2px
    }

.card-head-icon {
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px
}

    .card-head-icon svg {
        width: 16px;
        height: 16px;
        stroke: rgba(255,255,255,.8);
        fill: none;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round
    }

.card-body-inner {
    padding: 12px 16px 6px
}

.card-foot {
    padding: 6px 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px
}

/* ── FORM FIELDS ─────────────────────────────────────────── */
.field-group {
    margin-bottom: 8px
}

.field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: .04em;
    text-transform: uppercase;
    margin-bottom: 4px
}

.field-hint {
    font-size: 10px;
    color: var(--muted);
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    display: block;
    margin-top: 2px
}

.input-wrap {
    position: relative
}

.input-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--muted);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
    transition: stroke var(--tr)
}

.input-wrap:focus-within .input-icon {
    stroke: var(--navy)
}

.input-wrap input, .input-wrap input.form-control {
    width: 100% !important;
    height: 38px !important;
    padding: 0 12px 0 32px !important;
    background: var(--input-bg) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: var(--radius) !important;
    font-size: 13px !important;
    color: var(--text) !important;
    font-family: var(--font) !important;
    transition: border-color var(--tr),box-shadow var(--tr) !important;
    box-shadow: none !important;
    outline: none !important;
    appearance: none !important;
    -moz-appearance: textfield !important
}

    .input-wrap input::-webkit-outer-spin-button, .input-wrap input::-webkit-inner-spin-button {
        -webkit-appearance: none
    }

    .input-wrap input:focus, .input-wrap input.form-control:focus {
        border-color: var(--navy2) !important;
        background: #fff !important;
        box-shadow: 0 0 0 3px rgba(10,38,71,.08) !important
    }

span[id*="Validator"] {
    font-size: 10px !important;
    color: var(--saffron) !important;
    display: block;
    margin-top: 3px
}

.dob-example {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    color: var(--muted);
    background: var(--gold-lt);
    border: 1px solid #e8d48a;
    border-radius: 4px;
    padding: 2px 8px;
    margin-top: 4px
}

    .dob-example svg {
        width: 10px;
        height: 10px;
        stroke: var(--gold);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0
    }

/* ── CAPTCHA ─────────────────────────────────────────────── */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.captcha-img-wrap {
    background: #fff;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 3px;
    display: inline-flex;
    align-items: center
}

    .captcha-img-wrap img {
        display: block;
        border-radius: 4px
    }

.btn-refresh-captcha {
    width: 32px;
    height: 32px;
    background: var(--input-bg);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--tr);
    flex-shrink: 0;
    font-size: 16px;
    color: var(--navy);
    line-height: 1
}

    .btn-refresh-captcha:hover {
        background: #e0e8f2;
        border-color: var(--navy)
    }

.captcha-input {
    margin-top: 6px
}

    .captcha-input input, .captcha-input input.form-control {
        padding-left: 12px !important
    }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn-login, .btn-primary-gov {
    width: 100%;
    height: 40px;
    background: linear-gradient(135deg,var(--navy),var(--navy2));
    color: #fff;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: opacity var(--tr),transform .1s;
    box-shadow: 0 2px 8px rgba(10,38,71,.2)
}

    .btn-login:hover, .btn-primary-gov:hover {
        opacity: .9;
        transform: translateY(-1px)
    }

    .btn-login:active, .btn-primary-gov:active {
        transform: scale(.98)
    }

#pnlsubmit {
    width: 100%
}

.btn-give, .btn-view, .btn-delete {
    padding: 6px 14px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: all var(--tr);
    text-transform: uppercase;
    color: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.1)
}

.btn-give {
    background: linear-gradient(135deg,#2563eb,#1d4ed8)
}

    .btn-give:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(37,99,235,.3)
    }

.btn-view {
    background: linear-gradient(135deg,#059669,#047857)
}

    .btn-view:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(5,150,105,.3)
    }

.btn-delete {
    background: linear-gradient(135deg,#dc2626,#b91c1c)
}

    .btn-delete:hover {
        transform: translateY(-1px);
        box-shadow: 0 3px 8px rgba(220,38,38,.3)
    }

    .btn-give:disabled, .btn-view:disabled, .btn-delete:disabled {
        opacity: .3;
        cursor: not-allowed;
        pointer-events: none;
        transform: none;
        box-shadow: none
    }

/* ── BUTTON BAR ──────────────────────────────────────────── */
.button-bar, .button-bar2 {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    width: 100%;
    max-width: 600px;
    margin: 16px auto;
    padding: 12px;
    flex-wrap: wrap
}

.btn-primary, .btn-success, .btn-warning {
    padding: 11px 28px;
    font-size: 13px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    transition: all .25s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 130px;
    letter-spacing: .02em;
    box-shadow: 0 2px 8px rgba(0,0,0,.12)
}

.btn-primary {
    background: linear-gradient(135deg,#28a745,#1e7e34)
}

    .btn-primary:hover {
        box-shadow: 0 4px 14px rgba(40,167,69,.3);
        transform: translateY(-1px)
    }

.btn-success {
    background: linear-gradient(135deg,#007bff,#0056b3)
}

    .btn-success:hover {
        box-shadow: 0 4px 14px rgba(0,123,255,.3);
        transform: translateY(-1px)
    }

.btn-warning {
    background: linear-gradient(135deg,#dc3545,#a71d2a)
}

    .btn-warning:hover {
        box-shadow: 0 4px 14px rgba(220,53,69,.3);
        transform: translateY(-1px)
    }

    .btn-primary:active, .btn-success:active, .btn-warning:active {
        transform: scale(.97)
    }

/* ── QUESTION BTN GROUP ──────────────────────────────────── */
.btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 12px
}

    .btn-group .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 100px;
        padding: 6px 14px;
        font-size: 11px
    }

.btn-submit-objection, .btn-edit-objection, .btn-final-submit {
    padding: 8px 22px;
    border: none;
    border-radius: var(--radius);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: .02em;
    transition: all var(--tr);
    margin: 3px;
    color: #fff
}

.btn-submit-objection {
    background: #2563eb
}

.btn-edit-objection {
    background: #f59e0b
}

.btn-final-submit {
    background: #059669
}

/* ── ALERTS ──────────────────────────────────────────────── */
#lblmsg {
    font-size: 12px !important;
    color: var(--saffron) !important;
    background: var(--red-lt);
    border: 1px solid #fca5a5;
    border-radius: var(--radius);
    padding: 8px 12px;
    display: none;
    width: 100%;
    text-align: center
}

    #lblmsg:not(:empty) {
        display: block
    }

.info-box {
    margin-top: 10px;
    background: #eef4ff;
    border: 1px solid #c3d6f7;
    border-radius: var(--radius);
    padding: 8px 12px;
    display: flex;
    gap: 6px;
    align-items: flex-start
}

    .info-box svg {
        width: 13px;
        height: 13px;
        stroke: var(--navy2);
        fill: none;
        stroke-width: 2;
        stroke-linecap: round;
        stroke-linejoin: round;
        flex-shrink: 0;
        margin-top: 1px
    }

    .info-box p {
        font-size: 11px;
        color: var(--navy2);
        line-height: 1.5
    }

/* ── CANDIDATE INFO ──────────────────────────────────────── */
.candidate-info, .info-card {
    background: linear-gradient(135deg,#f7f9fc,#eef2f9);
    border: 1px solid var(--border-lt);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    margin-bottom: 14px;
    box-shadow: var(--shadow)
}

.info-card1 {
    max-width: 100%;
    margin: 5px auto;
    padding: 0;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-lt)
}

.info-table {
    width: 100%;
    border-collapse: collapse
}

    .info-table td {
        padding: 7px 10px;
        font-size: 12.5px;
        vertical-align: top
    }

    .info-table .label {
        font-weight: 700;
        color: var(--navy);
        width: 40%;
        white-space: nowrap
    }

/* ── QUESTION CONTAINER ──────────────────────────────────── */
.question-container {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 14px 18px;
    margin-bottom: 14px;
    max-width: 100%;
    border: 1px solid var(--border-lt);
    transition: box-shadow var(--tr)
}

    .question-container:hover {
        box-shadow: var(--shadow-md)
    }

.section-title {
    background: linear-gradient(135deg,#eef4ff,#dde6f7);
    border-left: 4px solid var(--navy);
    padding: 10px 16px;
    margin: 16px 0 10px;
    border-radius: 0 var(--radius) var(--radius) 0;
    font-size: 12.5px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.5
}

.objection-count, .lblCount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 11.5px;
    font-weight: 700;
    color: #b91c1c
}

/* ── POPUP ────────────────────────────────────────────────── */
.popup-bg {
    position: fixed;
    inset: 0;
    background: rgba(10,38,71,.6);
    backdrop-filter: blur(3px);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 1000;
    padding: 16px;
    overflow: auto;
    -webkit-overflow-scrolling: touch
}

.popup {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 860px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px
}

/* ── SCROLL BUTTONS ──────────────────────────────────────── */
.scroll-btn {
    position: fixed;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(10,38,71,.25);
    transition: all var(--tr);
    z-index: 999;
    opacity: 0;
    pointer-events: none
}

    .scroll-btn:hover {
        background: var(--navy-lt);
        transform: scale(1.1)
    }

#btnTop {
    bottom: 68px
}

#btnBottom {
    bottom: 18px
}

.scroll-btn.show {
    opacity: 1;
    pointer-events: auto
}

/* ── FOOTER ──────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(135deg,var(--navy),#0d1b33);
    color: rgba(255,255,255,.5);
    text-align: center;
    font-size: 10px;
    padding: 6px 12px;
    letter-spacing: .02em;
    flex-shrink: 0;
    border-top: 3px solid var(--saffron);
    margin-top: auto
}

    .site-footer strong {
        color: rgba(255,255,255,.85);
        font-weight: 600
    }

    .site-footer .footer-line2 {
        display: block;
        font-size: 10px;
        color: rgba(255,255,255,.35);
        margin-top: 3px;
        font-family: var(--font-hi)
    }

/* ── MESSAGE PAGES ───────────────────────────────────────── */
.msg-page {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px
}

.msg-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-lt);
    max-width: 440px;
    width: 100%;
    text-align: center;
    padding: 40px 28px
}

    .msg-card .msg-icon {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 16px
    }

        .msg-card .msg-icon.success {
            background: var(--green-lt)
        }

        .msg-card .msg-icon.error {
            background: var(--red-lt)
        }

        .msg-card .msg-icon.warning {
            background: #fef3c7
        }

        .msg-card .msg-icon svg {
            width: 26px;
            height: 26px;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none
        }

        .msg-card .msg-icon.success svg {
            stroke: var(--green)
        }

        .msg-card .msg-icon.error svg {
            stroke: var(--red)
        }

        .msg-card .msg-icon.warning svg {
            stroke: #d97706
        }

    .msg-card h2 {
        font-size: 16px;
        font-weight: 700;
        color: var(--navy);
        margin-bottom: 6px
    }

    .msg-card p {
        font-size: 12px;
        color: var(--muted);
        margin-bottom: 4px;
        line-height: 1.6
    }

    .msg-card .btn-link {
        display: inline-block;
        margin-top: 16px;
        padding: 10px 28px;
        background: linear-gradient(135deg,var(--navy),var(--navy2));
        color: #fff;
        text-decoration: none;
        border-radius: var(--radius);
        font-size: 12px;
        font-weight: 700;
        transition: all var(--tr);
        box-shadow: 0 2px 8px rgba(10,38,71,.2)
    }

        .msg-card .btn-link:hover {
            opacity: .9;
            transform: translateY(-1px)
        }

/* ── MARQUEE ─────────────────────────────────────────────── */
.marquee-bar {
    background: linear-gradient(90deg,#0a2647,#144272,#0a2647);
    padding: 4px 0;
    overflow: hidden;
    border-bottom: 2px solid #ffd54f;
    flex-shrink: 0
}

    .marquee-bar marquee {
        color: #ffd54f;
        font-size: 12.5px;
        font-weight: 600;
        letter-spacing: .03em;
        line-height: 1.4
    }

        .marquee-bar marquee strong {
            color: #ff8a80
        }

/* ── RESPONSIVE: TABLET ──────────────────────────────────── */
@media(max-width:768px) {
    html {
        font-size: 13.5px
    }

    .header-inner {
        padding: 6px 12px
    }

        .header-inner img {
            height: 50px !important;
            width: 60px !important;
            max-width: 60px !important
        }

    .header-title {
        font-size: 13px
    }

        .header-title span {
            font-size: 11.5px !important
        }

    .card-body-inner {
        padding: 12px 14px 6px
    }

    .card-foot {
        padding: 6px 14px 14px
    }

    .card-head {
        padding: 10px 14px 8px
    }

        .card-head h2 {
            font-size: 13px
        }

    .info-table td {
        padding: 5px 8px;
        font-size: 11.5px
    }

    .popup {
        padding: 16px;
        max-height: 95vh
    }

    .btn-give, .btn-view, .btn-delete {
        padding: 5px 10px;
        font-size: 10px
    }

    .menu-item {
        padding: 4px 10px
    }

    .user-info {
        font-size: 10px;
        padding-right: 10px
    }

    .exam-name-banner span {
        font-size: 12.5px
    }

    .question-container {
        padding: 12px 14px
    }

    .button-bar {
        padding: 8px;
        gap: 10px
    }
}

/* ── RESPONSIVE: MOBILE ──────────────────────────────────── */
@media(max-width:480px) {
    .login-wrap {
        max-width: 100%
    }

    .card-head {
        padding: 8px 12px 6px
    }

        .card-head h2 {
            font-size: 12px
        }

    .card-body-inner {
        padding: 10px 12px 4px
    }

    .field-group {
        margin-bottom: 10px
    }

    .input-wrap input, .input-wrap input.form-control {
        height: 36px !important;
        font-size: 12px !important
    }

    .btn-login, .btn-primary-gov {
        height: 38px;
        font-size: 12px
    }

    .section-title {
        font-size: 11px;
        padding: 8px 12px
    }

    .info-table .label {
        white-space: normal;
        width: auto
    }

    .info-table td {
        display: block;
        width: 100%;
        padding: 3px 8px
    }

    .info-table tr {
        display: block;
        margin-bottom: 6px;
        border-bottom: 1px solid var(--border-lt);
        padding-bottom: 4px
    }

    .btn-group {
        gap: 6px
    }

        .btn-group .btn {
            min-width: 80px;
            padding: 5px 10px;
            font-size: 10px
        }

    .button-bar {
        flex-direction: column;
        gap: 8px
    }

        .button-bar .btn-primary, .button-bar .btn-success, .button-bar .btn-warning {
            width: 100%;
            max-width: 280px
        }

    .exam-name-banner {
        padding: 6px 12px
    }

        .exam-name-banner span {
            font-size: 12px
        }

    .question-container {
        padding: 10px 12px;
        margin-bottom: 10px
    }

    .scroll-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
        right: 10px
    }

    .popup {
        margin: 8px;
        padding: 14px
    }

    .user-info .candidate-roll {
        display: none
    }
    /* hide roll on very small screens to save space */
    .menu-item {
        padding: 3px 6px;
        font-size: 10px !important
    }

        .menu-item font, .menu-item span, .menu-link span {
            font-size: 10px !important
        }
}

/* ── PRINT ───────────────────────────────────────────────── */
@media print {
    .site-header, .tricolor, .menu-row, .site-footer, .btn-give, .btn-view, .btn-delete,
    .btn-submit-objection, .btn-edit-objection, .btn-final-submit, .btn-print, .popup-bg, .scroll-btn, .exam-name-banner, .marquee-bar, .button-bar {
        display: none !important
    }

    body {
        background: #fff;
        display: block
    }

    .content-card, .login-card, .question-container {
        box-shadow: none;
        border: 1px solid #ddd
    }
}

/* ── POPUP MOBILE FIT ────────────────────────────────────── */
@media(max-width:640px) {
    .popup-bg {
        padding: 8px;
        align-items: flex-start
    }

    .popup {
        padding: 14px;
        border-radius: 10px;
        max-height: 95vh
    }

        .popup table {
            width: 100% !important
        }

            .popup table td {
                display: block !important;
                width: 100% !important;
                padding: 4px 0 !important
            }

        .popup .q-img, .popup img {
            max-width: 100% !important;
            height: auto !important
        }

        .popup select, .popup textarea, .popup input {
            font-size: 13px !important
        }
}

/* ── FILE UPLOAD HINT ────────────────────────────────────── */
.file-hint {
    display: block;
    font-size: 11px;
    color: var(--red);
    font-weight: 600;
    margin-top: 4px;
    padding: 4px 8px;
    background: var(--red-lt);
    border-radius: 4px;
    border: 1px solid #fca5a5
}

/* ── INSTRUCTION BOX ─────────────────────────────────────── */
.instruction-box {
    background: #fff3cd;
    border: 1.5px solid #ffc107;
    border-radius: var(--radius);
    padding: 10px 16px;
    margin: 12px auto;
    max-width: 600px;
    text-align: center
}

    .instruction-box p {
        font-size: 12px;
        color: #856404;
        font-weight: 600;
        margin: 3px 0;
        line-height: 1.5
    }

    .instruction-box .hi {
        font-size: 11.5px;
        color: #664d03;
        font-family: var(--font-hi)
    }

/* ── SWEET ALERT OVERRIDES ───────────────────────────────── */
.swal2-popup {
    font-family: var(--font) !important;
    font-size: 13px !important;
    border-radius: var(--radius-lg) !important
}

.swal2-title {
    font-size: 16px !important;
    color: var(--navy) !important
}

.swal2-html-container {
    font-size: 13px !important;
    line-height: 1.6 !important
}
