/* ==========================================================================
   Global Variables & Reset
   ========================================================================== */
:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border: #a8bfdc;
    --border-focus: #3b82f6;
    --radius: 8px;
    --shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    padding: 32px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ==========================================================================
   Main Container Layout (Side-by-Side Setup)
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1050px;
    background: var(--bg-card);
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);

    /* Grid layout to put Form on Left, Sidebar on Right */
    display: grid;
    grid-template-columns: 1fr 300px;
    column-gap: 40px;
    row-gap: 24px;
    align-items: start;
}

/* Spans title across full width of grid */
.container > h1 {
    grid-column: 1 / -1;
    font-size: 24px;
    font-weight: 700;
    text-align: left;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

/* Form takes left column */
.container > form {
    grid-column: 1;
    width: 100%;
}

/* ==========================================================================
   Sidebar Styling (Right Column)
   ========================================================================== */

.admission-sidebar {
    grid-column: 2;
    background: var(--bg-body);
    padding: 24px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-block h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.sidebar-block p,
.sidebar-block li {
    font-size: 13.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.sidebar-block ul {
    padding-left: 18px;
    list-style-type: disc;
}

/* ==========================================================================
   Multi-Step & Form Field Controls
   ========================================================================== */

.step {
    display: none;
}

.step.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

.row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    margin-top: 16px;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-main);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 12px 16px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 15px;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    transition: var(--transition);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--border-focus);
    box-shadow: 0 0 0 4px var(--primary-light);
}

::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

/* Custom Webkit Date Picker Indicator */
input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.7;
    transition: var(--transition);
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Radios and Checkboxes */
.radio-group {
    display: flex;
    gap: 24px;
    margin-top: 8px;
}

.radio-group label,
.confirm label {
    margin: 0;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-main);
    cursor: pointer;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-group label input[type="radio"],
.confirm input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.confirm {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-top: 24px;
    background: var(--bg-body);
    padding: 16px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

/* Buttons */
.buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

button {
    margin-top: 24px;
    padding: 12px 28px;
    border: none;
    background: var(--primary);
    color: #ffffff;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.buttons button {
    margin-top: 0;
}

button:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(1px);
}

button#backBtn {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border);
}

button#backBtn:hover {
    background: var(--bg-body);
    color: var(--text-main);
    transform: none;
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

#toast {
    position: fixed;
    top: 25px;
    right: 25px;
    min-width: 320px;
    max-width: 420px;
    padding: 18px 22px;
    border-radius: 10px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .2);
    transform: translateX(450px);
    opacity: 0;
    transition: .35s;
    z-index: 9999;
}

#toast.show {
    transform: translateX(0);
    opacity: 1;
}

#toast.success { background: #22c55e; }
#toast.error { background: #ef4444; }
#toast.warning { background: #f59e0b; }
#toast.info { background: #3b82f6; }

/* ==========================================================================
   Animations & Responsive Queries
   ========================================================================== */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 850px) {
    .container {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 24px;
    }

    .container > h1,
    .container > form,
    .admission-sidebar {
        grid-column: 1;
    }

    .row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .buttons {
        flex-direction: column-reverse;
        gap: 12px;
    }

    button {
        width: 100%;
        margin-top: 12px;
    }
}