* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #0f172a, #1e3a5f);
}

/* HEADER */
.header {
    text-align: center;
    color: white;
    padding: 40px 20px;
}

.header h1 {
    margin: 0;
    font-size: 34px;
}

/* CONTAINER */
.container {
    max-width: 900px;
    margin: auto;
    padding: 20px;
}

.application-intro {
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
    max-width: 780px;
    margin: -10px auto 24px;
    line-height: 1.6;
}

/* FORM CARD */
.form-box {
    background: white;
    padding: 26px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* INPUTS */
input, select, textarea {
    width: 100%;
    padding: 10px 12px;
    margin: 0;
    border-radius: 10px;
    border: 1px solid #ddd;
    font-size: 14px;
    outline: none;
}

/* FOCUS */
input:focus, select:focus, textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.2);
}

/* BUTTONS */
button {
    background: linear-gradient(90deg, #2563eb, #1d4ed8);
    color: white;
    padding: 14px 20px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
}

button:hover {
    transform: translateY(-2px);
}

/* NAV BUTTONS */
.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
    flex-wrap: wrap;
}

/* STEPS */
.step {
    display: none;
}

.step.active {
    display: block;
}

/* HEADINGS */
h2 {
    color: #1e3a5f;
}

.section-card {
    margin-bottom: 18px;
    padding-bottom: 6px;
}

.section-card h2 {
    margin-top: 0;
    margin-bottom: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.required-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-error {
    min-height: 18px;
    margin: 0;
    color: #b91c1c;
    font-size: 12px;
    font-weight: 700;
}

.field.invalid input,
.field.invalid select,
.field.invalid textarea {
    border-color: #b91c1c;
    box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

.form-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.date-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.date-grid select {
    min-width: 0;
}

.submit-note {
    margin: 14px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.5;
}

.submit-note strong {
    color: #1e3a5f;
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .date-grid {
        grid-template-columns: 1fr;
    }

    .container {
        padding: 14px;
    }

    .form-box {
        padding: 22px;
    }
}

.section-title {
    margin-top: 20px;
    font-weight: bold;
    color: #1e3a5f;
}

.error {
    display: none;
    color: red;
    margin-top: 15px;
    font-weight: bold;
}

label {
    display: block;
    margin-top: 12px;
    font-weight: bold;
    color: #1e3a5f;
}

.field label {
    margin-top: 0;
}
.popup-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.popup-box {
    background: white;
    width: 400px;
    max-width: 90%;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

.popup-box h3 {
    color: #d00000;
    margin-top: 0;
}

.popup-box button {
    margin-top: 15px;
}