/* ═══════════════════════════════════════════════════════════════
   ITEP Admission Portal — D7 Design System
   Covers: Landing, Application Form, Dashboard, Thank-You
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --maroon: #621708;
    --maroon-hover: #7a1d0a;
    --maroon-light: rgba(98, 23, 8, 0.08);
    --gold: #f6aa1c;
    --gold-hover: #e09a14;
    --gold-light: rgba(246, 170, 28, 0.12);
    --black: #111111;
    --white: #ffffff;
    --light: #f7f7f8;
    --lighter: #fafafa;
    --text: #1a1a1a;
    --sub: #333333;
    --muted: #555555;
    --dim: #888888;
    --border: #e0e0e0;
    --border-light: #f0f0f0;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    /* Semantic colors */
    --success: #15803d;
    --success-bg: #f0fdf4;
    --success-border: #bbf7d0;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --error-border: #fecaca;
    --info-color: #92400e;
    --info-bg: #fffbeb;
    --info-border: #fde68a;
}


/* ═══════════════════════════════════════════════════════════════
   RESET + BASE
   ═══════════════════════════════════════════════════════════════ */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

a {
    color: var(--maroon);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--maroon-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    background: none;
}

input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
}

/* Container */
.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}


/* ═══════════════════════════════════════════════════════════════
   TOP BAR
   ═══════════════════════════════════════════════════════════════ */
.top-bar {
    background: var(--black);
    color: var(--white);
    font-size: 0.82rem;
    padding: 8px 0;
}

.top-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.naac-badge {
    background: var(--gold);
    color: var(--maroon);
    font-weight: 800;
    font-size: 0.72rem;
    padding: 3px 12px;
    border-radius: 100px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
    animation: naacPulse 3s ease-in-out infinite;
}

@keyframes naacPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(246, 170, 28, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(246, 170, 28, 0); }
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
}

.top-bar-item svg {
    opacity: 0.7;
    flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════════════
   NAVIGATION
   ═══════════════════════════════════════════════════════════════ */
.navbar {
    background: var(--white);
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

.navbar-logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-logo {
    width: 48px;
    height: 48px;
    background: var(--maroon);
    color: var(--gold);
    font-weight: 800;
    font-size: 1.1rem;
    border-radius: 10px;
    display: none;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.02em;
    flex-shrink: 0;
}

.navbar-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.navbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.navbar-subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--maroon);
    letter-spacing: 0.02em;
}

/* Nav links for inner pages */
.navbar-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-link:hover {
    color: var(--maroon);
    background: var(--maroon-light);
    text-decoration: none;
}

.navbar-link.active {
    color: var(--maroon);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */
.hero {
    background: linear-gradient(135deg, var(--maroon) 0%, #4a1206 60%, #2d0b04 100%);
    color: var(--white);
    padding: 64px 0 56px;
    text-align: center;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: 40px;
    font-weight: 400;
}

/* Programme cards */
.programme-cards {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.programme-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 24px 32px;
    min-width: 180px;
    transition: var(--transition);
}

.programme-card:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.programme-card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 6px;
}

.programme-card-seats {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* Chips */
.hero-chips {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.chip {
    background: rgba(246, 170, 28, 0.15);
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 100px;
    border: 1px solid rgba(246, 170, 28, 0.25);
    letter-spacing: 0.02em;
}

/* Hero actions (Prospectus button) */
.hero-actions {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.btn-prospectus {
    background: var(--gold);
    color: var(--maroon);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: var(--radius);
    border: 1.5px solid var(--gold);
    box-shadow: 0 4px 14px rgba(246, 170, 28, 0.25);
}

.btn-prospectus:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: var(--maroon);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(246, 170, 28, 0.35);
}


/* ═══════════════════════════════════════════════════════════════
   GENERAL INSTRUCTIONS SECTION
   ═══════════════════════════════════════════════════════════════ */
.instructions-section {
    padding: 48px 0 0;
    background: var(--light);
}

.instructions-section .container {
    max-width: 760px;
}

.instructions-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0, 0, 0, 0.04));
}

.instructions-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--maroon);
    margin: 0 0 16px;
}

.instructions-title svg {
    color: var(--gold);
    flex-shrink: 0;
}

.instructions-list {
    margin: 0;
    padding-left: 22px;
    color: var(--sub);
}

.instructions-list li {
    font-size: 0.92rem;
    line-height: 1.65;
    padding: 6px 0;
}

.instructions-list li::marker {
    color: var(--maroon);
    font-weight: 700;
}

.instructions-list strong {
    color: var(--text);
    font-weight: 700;
}

.instructions-list a {
    color: var(--maroon);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.instructions-list a:hover {
    color: var(--maroon-hover);
}

@media (max-width: 600px) {
    .instructions-card {
        padding: 22px 20px;
    }
    .instructions-list {
        padding-left: 18px;
    }
    .instructions-list li {
        font-size: 0.88rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   AUTH SECTION
   ═══════════════════════════════════════════════════════════════ */
.auth-section {
    padding: 56px 0;
    background: var(--light);
}

.auth-section .container {
    max-width: 480px;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.auth-card-header {
    padding: 32px 32px 0;
    text-align: center;
}

.auth-card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.auth-card-desc {
    font-size: 0.88rem;
    color: var(--muted);
}

/* Tabs */
.auth-tabs {
    display: flex;
    margin: 24px 32px 0;
    border-bottom: 2px solid var(--border-light);
}

.auth-tab {
    flex: 1;
    padding: 12px 0;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--dim);
    text-align: center;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.auth-tab:hover {
    color: var(--sub);
}

.auth-tab.active {
    color: var(--maroon);
    border-bottom-color: var(--gold);
}

/* Alert container inside auth */
.auth-alert-container {
    padding: 0 32px;
}

.auth-alert-container:empty {
    display: none;
}

/* Auth form */
.auth-form {
    padding: 28px 32px 32px;
    position: relative;
}

/* OTP section */
.otp-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.otp-input {
    text-align: center;
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5em;
    padding: 14px 16px !important;
}

.otp-resend {
    text-align: center;
    margin-top: 16px;
}

.resend-link {
    font-size: 0.85rem;
    color: var(--maroon);
    font-weight: 500;
    padding: 4px 8px;
    transition: var(--transition);
}

.resend-link:hover:not(:disabled) {
    color: var(--maroon-hover);
    text-decoration: underline;
}

.resend-link:disabled {
    color: var(--dim);
    cursor: not-allowed;
}


/* ═══════════════════════════════════════════════════════════════
   FORM ELEMENTS (shared across landing + apply pages)
   ═══════════════════════════════════════════════════════════════ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--sub);
    margin-bottom: 6px;
}

.form-label .required {
    color: var(--error);
    margin-left: 2px;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.92rem;
    color: var(--text);
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: var(--maroon);
    box-shadow: 0 0 0 3px var(--maroon-light);
}

.form-input::placeholder {
    color: var(--dim);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: var(--error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
    background: var(--lighter);
    color: var(--dim);
    cursor: not-allowed;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--dim);
    margin-top: 5px;
}

.field-error {
    font-size: 0.78rem;
    color: var(--error);
    margin-top: 4px;
    min-height: 0;
}

.field-error:empty {
    display: none;
}

/* Input with prefix (e.g., +91) */
.input-with-prefix {
    display: flex;
    align-items: stretch;
}

.input-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    background: var(--lighter);
    border: 1.5px solid var(--border);
    border-right: none;
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
}

.input-with-prefix .form-input {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

/* Checkbox / Radio */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 10px;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--maroon);
    flex-shrink: 0;
}

.form-check label {
    font-size: 0.88rem;
    color: var(--sub);
    cursor: pointer;
    line-height: 1.5;
}

/* Form row (side-by-side fields) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-row-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
}


/* ═══════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--maroon);
    color: var(--white);
}

.btn-primary:hover:not(:disabled) {
    background: var(--maroon-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(98, 23, 8, 0.25);
}

.btn-gold {
    background: var(--gold);
    color: var(--maroon);
    font-weight: 700;
}

.btn-gold:hover:not(:disabled) {
    background: var(--gold-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(246, 170, 28, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--maroon);
    border: 1.5px solid var(--maroon);
}

.btn-outline:hover:not(:disabled) {
    background: var(--maroon-light);
    transform: translateY(-1px);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.82rem;
}

.btn-lg {
    padding: 14px 36px;
    font-size: 1rem;
}

/* Button with spinner */
.btn .spinner {
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: none;
}

.btn.loading .spinner {
    display: inline-block;
}

.btn.loading {
    pointer-events: none;
    opacity: 0.75;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* ═══════════════════════════════════════════════════════════════
   ALERTS
   ═══════════════════════════════════════════════════════════════ */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    line-height: 1.5;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert svg {
    flex-shrink: 0;
    margin-top: 1px;
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error-border);
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success-border);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-color);
    border-color: var(--info-border);
}


/* ═══════════════════════════════════════════════════════════════
   INFO SECTION (Landing page)
   ═══════════════════════════════════════════════════════════════ */
.info-section {
    padding: 56px 0;
    background: var(--white);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--lighter);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
}

.info-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--maroon);
    margin-bottom: 16px;
}

.info-card-title svg {
    color: var(--gold);
    flex-shrink: 0;
}

.info-list {
    list-style: none;
    padding: 0;
}

.info-list li {
    font-size: 0.85rem;
    color: var(--sub);
    padding: 6px 0;
    border-bottom: 1px solid var(--border-light);
    line-height: 1.6;
}

.info-list li:last-child {
    border-bottom: none;
}

.info-list li strong {
    color: var(--text);
    font-weight: 600;
}


/* ═══════════════════════════════════════════════════════════════
   PROGRESS BAR (Application form — 7 steps)
   ═══════════════════════════════════════════════════════════════ */
.progress-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin: 0 0 40px;
    padding: 0;
    position: relative;
}

.progress-bar::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 32px;
    right: 32px;
    height: 3px;
    background: var(--border);
    z-index: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    flex: 1;
    max-width: 120px;
}

.progress-step-dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--dim);
    transition: var(--transition);
}

.progress-step-label {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--dim);
    text-align: center;
    line-height: 1.3;
    max-width: 80px;
}

/* Active step */
.progress-step.active .progress-step-dot {
    background: var(--maroon);
    border-color: var(--maroon);
    color: var(--white);
    box-shadow: 0 0 0 4px var(--maroon-light);
}

.progress-step.active .progress-step-label {
    color: var(--maroon);
    font-weight: 600;
}

/* Completed step */
.progress-step.completed .progress-step-dot {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--maroon);
}

.progress-step.completed .progress-step-label {
    color: var(--sub);
    font-weight: 500;
}


/* ═══════════════════════════════════════════════════════════════
   FORM SECTIONS (Application form pages)
   ═══════════════════════════════════════════════════════════════ */
.itep-form-wrapper {
    max-width: 820px;
    margin: 0 auto;
    padding: 40px 0 60px;
}

.itep-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 36px 40px;
    margin-bottom: 24px;
    display: none;
}

.itep-section.active {
    display: block;
}

.itep-section-title {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 4px;
}

.itep-section-subtitle {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 28px;
}

.itep-section-divider {
    height: 1px;
    background: var(--border-light);
    margin: 28px 0;
}

/* Field group */
.field-group {
    margin-bottom: 28px;
}

.field-group-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--maroon);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--gold-light);
}

/* Section navigation buttons */
.section-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

.section-nav .btn {
    min-width: 140px;
}


/* ═══════════════════════════════════════════════════════════════
   UPLOAD ZONES
   ═══════════════════════════════════════════════════════════════ */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.upload-zone:hover {
    border-color: var(--maroon);
    background: var(--maroon-light);
}

.upload-zone.drag-over {
    border-color: var(--gold);
    background: var(--gold-light);
    transform: scale(1.01);
}

.upload-zone.has-file {
    border-color: var(--success);
    background: var(--success-bg);
    border-style: solid;
}

.upload-zone-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    color: var(--dim);
}

.upload-zone-text {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 4px;
}

.upload-zone-text strong {
    color: var(--maroon);
}

.upload-zone-hint {
    font-size: 0.75rem;
    color: var(--dim);
}

/* File preview inside upload zone */
.upload-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
}

.upload-preview-info {
    flex: 1;
    text-align: left;
}

.upload-preview-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    word-break: break-all;
}

.upload-preview-size {
    font-size: 0.75rem;
    color: var(--dim);
}

.upload-delete {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--error-bg);
    color: var(--error);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.upload-delete:hover {
    background: var(--error);
    color: var(--white);
}

/* Application form: uppercase inputs by default; email + URL stay lowercase */
.itep-form-wrapper input[type="text"],
.itep-form-wrapper input[type="search"],
.itep-form-wrapper textarea,
.itep-form-wrapper select {
    text-transform: uppercase;
}
.itep-form-wrapper input[type="email"],
.itep-form-wrapper input[type="url"],
.itep-form-wrapper input[type="password"],
.itep-form-wrapper input.no-uppercase {
    text-transform: lowercase;
}

/* Upload grid */
.upload-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Group titles inside the Documents section */
.upload-group-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--maroon);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 4px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gold);
    width: fit-content;
}
.upload-group-title svg { color: var(--gold); flex-shrink: 0; }
.upload-group-title-optional {
    margin-top: 28px;
    color: var(--muted);
    border-bottom-color: var(--border);
}
.upload-group-title-optional svg { color: var(--muted); }
.upload-group-hint {
    font-size: 0.72rem;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    color: var(--dim);
    margin-left: 4px;
}

.upload-item {
    display: flex;
    flex-direction: column;
}

.upload-item-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--sub);
    margin-bottom: 8px;
}


/* ═══════════════════════════════════════════════════════════════
   PAYMENT SECTION
   ═══════════════════════════════════════════════════════════════ */
.payment-card {
    background: var(--lighter);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.payment-card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--maroon);
    margin-bottom: 14px;
}

.payment-details {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 12px;
    font-size: 0.85rem;
}

.payment-details dt {
    color: var(--muted);
    font-weight: 500;
}

.payment-details dd {
    color: var(--text);
    font-weight: 600;
}

.payment-amount {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--maroon);
    margin-bottom: 20px;
}

.payment-or {
    text-align: center;
    margin: 24px 0;
    position: relative;
    color: var(--dim);
    font-size: 0.82rem;
    font-weight: 600;
}

.payment-or::before,
.payment-or::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: var(--border);
}

.payment-or::before { left: 0; }
.payment-or::after { right: 0; }

.btn-razorpay {
    background: #2563EB;
    color: var(--white);
    font-weight: 700;
}

.btn-razorpay:hover:not(:disabled) {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════ */
.dashboard-header {
    background: linear-gradient(135deg, var(--maroon) 0%, #4a1206 100%);
    color: var(--white);
    padding: 36px 0;
}

.dashboard-greeting {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-ref {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.7);
}

.dashboard-ref strong {
    color: var(--gold);
    font-weight: 700;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 24px;
    padding: 32px 0 60px;
}

/* Status timeline */
.status-timeline {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 28px 32px;
}

.status-timeline-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 24px;
}

.timeline {
    position: relative;
    padding-left: 32px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 11px;
    top: 4px;
    bottom: 4px;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 24px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: -32px;
    top: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--border);
    z-index: 1;
}

.timeline-item.completed .timeline-dot {
    background: var(--gold);
    border-color: var(--gold);
}

.timeline-item.current .timeline-dot {
    background: var(--maroon);
    border-color: var(--maroon);
    box-shadow: 0 0 0 4px var(--maroon-light);
}

.timeline-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.timeline-date {
    font-size: 0.78rem;
    color: var(--dim);
}

/* Dashboard info cards */
.dashboard-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 22px;
}

.dash-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 6px;
}

.dash-card-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}

.dash-card-value.status-submitted {
    color: var(--success);
}

.dash-card-value.status-pending {
    color: var(--gold-hover);
}

.dash-card-value.status-approved {
    color: var(--maroon);
}


/* ═══════════════════════════════════════════════════════════════
   THANK-YOU PAGE
   ═══════════════════════════════════════════════════════════════ */
.thankyou-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.thankyou-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 48px 56px;
    text-align: center;
    max-width: 560px;
    width: 100%;
}

.thankyou-icon {
    width: 72px;
    height: 72px;
    background: var(--success-bg);
    border: 3px solid var(--success-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--success);
}

.thankyou-title {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
}

.thankyou-message {
    font-size: 0.92rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 24px;
}

.thankyou-ref {
    display: inline-block;
    background: var(--gold-light);
    color: var(--maroon);
    font-size: 1.1rem;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: var(--radius);
    border: 1px solid rgba(246, 170, 28, 0.3);
    margin-bottom: 28px;
}

.thankyou-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}


/* ═══════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════ */
.footer {
    background: var(--black);
    color: rgba(255, 255, 255, 0.7);
    padding: 40px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 32px;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand strong {
    color: var(--white);
    font-size: 1rem;
    display: block;
    margin-bottom: 8px;
}

.footer-brand p {
    font-size: 0.82rem;
    line-height: 1.7;
}

.footer-disclaimer {
    font-size: 0.78rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    padding: 18px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}


/* ═══════════════════════════════════════════════════════════════
   UTILITY CLASSES
   ═══════════════════════════════════════════════════════════════ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--muted); }
.text-dim { color: var(--dim); }
.text-maroon { color: var(--maroon); }
.text-gold { color: var(--gold); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.fw-800 { font-weight: 800; }
.fs-sm { font-size: 0.85rem; }
.fs-xs { font-size: 0.78rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }

/* Hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


/* ═══════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: all;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border);
    border-top-color: var(--maroon);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* ═══════════════════════════════════════════════════════════════
   SESSION TIMEOUT WARNING MODAL
   ═══════════════════════════════════════════════════════════════ */
.session-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.session-modal-backdrop.visible {
    opacity: 1;
    pointer-events: all;
}

.session-modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.session-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.session-modal-text {
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 24px;
    line-height: 1.6;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (max-width: 900px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .programme-cards {
        gap: 14px;
    }

    .programme-card {
        padding: 20px 24px;
        min-width: 150px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .progress-bar {
        overflow-x: auto;
        padding-bottom: 8px;
    }

    .progress-step-label {
        font-size: 0.65rem;
    }

    .itep-section {
        padding: 28px 24px;
    }

    .upload-grid {
        grid-template-columns: 1fr;
    }

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

    .thankyou-card {
        padding: 36px 28px;
    }
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (max-width: 600px)
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 600px) {
    .container {
        padding: 0 16px;
    }

    /* Top bar */
    .top-bar-inner {
        flex-direction: column;
        gap: 6px;
    }

    .top-bar-contact {
        gap: 12px;
        font-size: 0.75rem;
    }

    /* Nav */
    .navbar-title {
        font-size: 0.92rem;
    }

    .navbar-subtitle {
        font-size: 0.72rem;
    }

    .navbar-logo {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

    /* Hero */
    .hero {
        padding: 40px 0 36px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.88rem;
        margin-bottom: 28px;
    }

    .programme-cards {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

    .programme-card {
        width: 100%;
        max-width: 280px;
        padding: 18px 24px;
    }

    .hero-chips {
        gap: 8px;
    }

    .chip {
        font-size: 0.72rem;
        padding: 5px 12px;
    }

    /* Auth */
    .auth-section {
        padding: 32px 0;
    }

    .auth-card-header {
        padding: 24px 20px 0;
    }

    .auth-card-title {
        font-size: 1.2rem;
    }

    .auth-tabs {
        margin: 20px 20px 0;
    }

    .auth-form {
        padding: 20px 20px 24px;
    }

    /* Info */
    .info-section {
        padding: 32px 0;
    }

    .info-card {
        padding: 20px;
    }

    /* Progress */
    .progress-bar::before {
        left: 16px;
        right: 16px;
    }

    .progress-step-dot {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .progress-step-label {
        display: none;
    }

    /* Form sections */
    .itep-section {
        padding: 20px 16px;
        border-radius: var(--radius);
    }

    .itep-section-title {
        font-size: 1.05rem;
    }

    .section-nav {
        flex-direction: column;
        gap: 12px;
    }

    .section-nav .btn {
        width: 100%;
    }

    /* Dashboard */
    .dashboard-header {
        padding: 24px 0;
    }

    .dashboard-greeting {
        font-size: 1.15rem;
    }

    .dashboard-grid {
        padding: 20px 0 40px;
    }

    /* Thank you */
    .thankyou-card {
        padding: 28px 20px;
    }

    .thankyou-title {
        font-size: 1.3rem;
    }

    .thankyou-ref {
        font-size: 0.95rem;
        padding: 10px 20px;
    }

    .thankyou-actions {
        flex-direction: column;
    }

    /* Footer */
    .footer {
        padding: 28px 0 0;
    }

    .footer-brand strong {
        font-size: 0.92rem;
    }

    /* Buttons */
    .btn {
        padding: 11px 20px;
        font-size: 0.88rem;
    }

    .btn-lg {
        padding: 12px 24px;
        font-size: 0.92rem;
    }
}


/* ═══════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════ */
@media print {
    .top-bar,
    .navbar,
    .auth-section,
    .footer,
    .section-nav,
    .btn,
    .progress-bar {
        display: none !important;
    }

    body {
        background: white;
        color: black;
        font-size: 12pt;
    }

    .itep-section {
        display: block !important;
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .dashboard-header {
        background: none !important;
        color: black;
        padding: 10px 0;
    }
}
