* {
    box-sizing: border-box;
}

:root {
    --bg: #93b41f;
    --card: #ffffff;
    --text: #273238;
    --muted: #64727d;
    --border: #d8dde2;
    --focus: #2d6a8e;
    --primary: #215d86;
    --secondary: #6f7d8f;
    --danger: #b42318;
    --notice-ias: #1f5d8b;
    --notice-ias-soft: #e8f2fb;
    --notice-cds: #2c6e49;
    --notice-cds-soft: #eaf6ef;
    --notice-ssc: #8c3c4d;
    --notice-ssc-soft: #faeef1;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(90deg, #95b81c 0%, #8bad14 100%);
    color: var(--text);
    min-height: 100vh;
}

.page-shell {
    width: 100%;
    padding: 28px 16px;
    display: flex;
    justify-content: center;
}

.page-shell--center {
    align-items: center;
    min-height: 100vh;
}

.form-card,
.success-card {
    width: min(100%, 860px);
    background: var(--card);
    border-radius: 14px;
    padding: 18px 18px 22px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.top-banner {
    margin: 0 0 16px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #d6dcc8;
}

.top-banner img {
    display: block;
    width: 100%;
    height: auto;
}

.alert {
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert ul {
    margin: 8px 0 0 18px;
    padding: 0;
}

.alert-error {
    background: #fff1f3;
    border: 1px solid #f8b4be;
    color: #912018;
}

.registration-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.first-choice-block {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

fieldset {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
}

legend {
    padding: 0 8px;
    font-size: 13px;
    font-weight: 700;
    color: #55606b;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.form-grid--single-row {
    align-items: end;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.field-full {
    grid-column: 1 / -1;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #3c4650;
}

label span {
    color: var(--danger);
}

input,
select,
textarea {
    width: 100%;
    min-width: 0;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    font: inherit;
    color: var(--text);
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    min-height: 86px;
    height: auto;
    resize: vertical;
}

input[type="file"] {
    padding: 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--focus);
    box-shadow: 0 0 0 3px rgba(45, 106, 142, 0.14);
}

small {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.exam-contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid transparent;
    flex-direction: column;
}

.exam-contact__icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 20px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.55);
}

.exam-contact__content {
    flex: 1;
}

.exam-contact__content strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.exam-contact__content p,
.exam-contact__content span {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.exam-contact__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contact-btn,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 700;
    transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.contact-btn:hover,
.btn:hover {
    transform: translateY(-1px);
}

.contact-btn {
    min-width: 112px;
    padding: 10px 14px;
    color: #fff;
    font-size: 13px;
}

.contact-btn--call { background: #0f69c0; }
.contact-btn--whatsapp { background: #1f9d55; }

.notice-ias {
    background: var(--notice-ias-soft);
    border-color: #b9d4ee;
    color: #153c58;
}
.notice-cds {
    background: var(--notice-cds-soft);
    border-color: #b7ddc4;
    color: #224e35;
}
.notice-ssc {
    background: var(--notice-ssc-soft);
    border-color: #ecc3cc;
    color: #6f2f3c;
}

.form-actions,
.success-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.btn {
    min-height: 46px;
    padding: 12px 18px;
    font-size: 15px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    flex: 1 1 240px;
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
    flex: 1 1 200px;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.success-card {
    text-align: center;
    max-width: 620px;
    padding-top: 28px;
}

.success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
    font-weight: 700;
    background: #eaf7ec;
    color: #1f9d55;
}

.eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #597083;
}

.roll-box {
    margin: 18px auto;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f8fafb;
}

.roll-box span {
    display: block;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 6px;
}

.roll-box strong {
    font-size: 22px;
    color: var(--primary);
    letter-spacing: 0.04em;
}

@media (max-width: 768px) {
    .form-card,
    .success-card {
        padding: 14px;
        border-radius: 12px;
    }

    .form-grid,
    .form-grid--single-row {
        grid-template-columns: 1fr;
    }

    .exam-contact {
        flex-direction: column;
        align-items: flex-start;
    }

    .exam-contact__actions,
    .form-actions,
    .success-actions {
        width: 100%;
    }

    .contact-btn,
    .btn {
        width: 100%;
    }
}

/* Admit card preview screen */
.preview-shell {
    width: 100%;
    min-height: 100vh;
    padding: 24px;
}

.preview-card {
    width: min(100%, 1180px);
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.16);
}

.preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.preview-header h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 3vw, 32px);
}

.preview-header p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.preview-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.preview-actions .btn {
    flex: none;
    min-width: 170px;
}

.pdf-preview {
    position: relative;
    width: 100%;
    min-height: 78vh;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #eef1f4;
}

.pdf-preview iframe {
    display: block;
    width: 100%;
    height: 78vh;
    min-height: 680px;
    border: 0;
    background: #fff;
}

.pdf-preview-fallback {
    padding: 10px 14px;
    text-align: center;
    font-size: 13px;
    color: var(--muted);
    background: #fff;
    border-top: 1px solid var(--border);
}

.pdf-preview-fallback a {
    color: var(--primary);
    font-weight: 700;
}

@media (max-width: 768px) {
    .preview-shell {
        padding: 10px;
    }

    .preview-card {
        padding: 12px;
    }

    .preview-header {
        align-items: stretch;
        flex-direction: column;
    }

    .preview-actions,
    .preview-actions .btn {
        width: 100%;
    }

    .pdf-preview,
    .pdf-preview iframe {
        min-height: 72vh;
        height: 72vh;
    }
}

/* 2026-08-04 conditional form and contact updates */
[hidden] {
    display: none !important;
}

.exam-contact__details {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, auto));
    gap: 4px 14px;
    margin-top: 7px;
}

.exam-contact__details > span {
    overflow-wrap: anywhere;
}

.exam-contact__details a {
    color: inherit;
    font-weight: 700;
}

.contact-btn--email {
    background: #6d4cc2;
}

.eligibility-note {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: #c81e1e;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
    text-align: center;
    box-shadow: 0 5px 14px rgba(200, 30, 30, 0.18);
}

.btn:disabled {
    cursor: wait;
    opacity: 0.7;
    transform: none;
}

@media (max-width: 768px) {
    .exam-contact__details {
        grid-template-columns: 1fr;
    }
}

.alert-success {
    background: #eaf7ec;
    border: 1px solid #aad9b4;
    color: #1e6b34;
}

.alert-warning {
    background: #fff8e6;
    border: 1px solid #efd58e;
    color: #795a09;
}
