/*
 * registration.css
 * Modern UI/UX redesign for NewRegistration Step1, Step2, Step3
 * Fully Mobile Responsive
 */

/* =========================================================================
   CSS Variables - Design System
   ========================================================================= */
:root {
    /* Brand Colors */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #eef2ff;
    --secondary-color: #64748b;
    /* Semantic Colors */
    --success-color: #10b981;
    --success-light: #d1fae5;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fee2e2;
    --info-color: #3b82f6;
    --info-light: #dbeafe;
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    /* Mobile-specific variables */
    --mobile-padding: 0.75rem;
    --mobile-font-size: 14px;
    --touch-target-size: 44px;
}

/* =========================================================================
   Base Styles & Typography
   ========================================================================= */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

/* =========================================================================
   Page Container & Structure
   ========================================================================= */
.step-container,
.step1-container,
.step2-container,
.step3-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    width: 100%;
}

/* =========================================================================
   Modern Header with Gradient
   ========================================================================= */
.step-header,
.step1-header,
.step2-header,
.step3-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--spacing-lg) var(--spacing-xl);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

    .step-header h3,
    .step1-header h3,
    .step2-header h3,
    .step3-header h3 {
        margin: 0;
        font-weight: 600;
        font-size: 1.5rem;
        color: white;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: var(--spacing-sm);
    }

        .step-header h3 i,
        .step1-header h3 i,
        .step2-header h3 i,
        .step3-header h3 i {
            font-size: 1.5rem;
        }

.step-indicator {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.375rem 0.875rem;
    border-radius: 2rem;
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

/* =========================================================================
   Progress Steps Indicator
   ========================================================================= */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--spacing-xl);
    position: relative;
    padding: 0 var(--spacing-md);
}

    .progress-steps::before {
        content: '';
        position: absolute;
        top: 1.25rem;
        left: 10%;
        right: 10%;
        height: 2px;
        background: var(--gray-200);
        z-index: 0;
    }

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    z-index: 1;
    background: white;
    padding: 0 var(--spacing-sm);
    flex: 1;
    max-width: 120px;
}

.progress-step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--transition-base);
    flex-shrink: 0;
}

.progress-step.active .progress-step-circle {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.progress-step.completed .progress-step-circle {
    background: var(--success-color);
    color: white;
}

.progress-step-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    font-weight: 500;
    text-align: center;
    line-height: 1.2;
}

.progress-step.active .progress-step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.progress-step.completed .progress-step-label {
    color: var(--success-color);
}

/* =========================================================================
   Form Container & Layout
   ========================================================================= */
.table-responsive {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    transition: box-shadow var(--transition-base);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

    .table-responsive:hover {
        box-shadow: var(--shadow-lg);
    }

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin: calc(-1 * var(--spacing-xl)) calc(-1 * var(--spacing-xl)) var(--spacing-lg);
    box-shadow: var(--shadow-md);
}

    .card-header h3,
    .card-header h5,
    .card-header h6 {
        margin: 0;
        font-size: 1.125rem;
        font-weight: var(--font-weight-semibold);
        color: white;
        letter-spacing: 0.025em;
    }

    .card-header h3 {
        font-size: 1.25rem;
    }

        .card-header h3 label,
        .card-header h3 span,
        .card-header h5 label,
        .card-header h5 span {
            color: white;
        }

/* =========================================================================
   Table Styling
   ========================================================================= */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .table td {
        vertical-align: middle;
        padding: var(--spacing-md);
        border-bottom: 1px solid var(--gray-100);
        transition: background-color var(--transition-fast);
    }

        .table td:first-child {
            font-weight: var(--font-weight-medium);
            color: var(--gray-700);
            min-width: 140px;
            padding-right: var(--spacing-md);
        }

    .table tr:last-child td {
        border-bottom: none;
    }

    .table tr:hover td {
        background-color: var(--gray-50);
    }

/* Insert table styling */
#insertTable {
    width: 100%;
}

    #insertTable tr:nth-child(odd) {
        background: white;
    }

    #insertTable tr:nth-child(even) {
        background: var(--gray-50);
    }

    #insertTable tr:hover td {
        background-color: var(--primary-light) !important;
    }

    #insertTable td:first-child {
        width: 35%;
    }

    #insertTable td:nth-child(2) {
        width: 65%;
    }

/* Insert table styling */
#studentTable {
    width: 100%;
}

    #studentTable tr:nth-child(odd) {
        background: white;
    }

    #studentTable tr:nth-child(even) {
        background: var(--gray-50);
    }

    #studentTable tr:hover td {
        background-color: var(--primary-light) !important;
    }

    #studentTable td:first-child {
        width: 35%;
    }

    #studentTable td:nth-child(2) {
        width: 65%;
    }

/* =========================================================================
   Form Controls - Modern Input Styling
   ========================================================================= */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
textarea,
select,
.riTextBox,
.RadInput,
.RadComboBox input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--gray-700);
    background-color: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

    input[type="text"]:focus,
    input[type="email"]:focus,
    input[type="tel"]:focus,
    input[type="number"]:focus,
    input[type="password"]:focus,
    textarea:focus,
    select:focus,
    .riTextBox:focus,
    .RadInput:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px var(--primary-light);
        background-color: white;
    }

    input[type="text"]:disabled,
    input[type="email"]:disabled,
    input[type="tel"]:disabled,
    textarea:disabled,
    select:disabled {
        background-color: var(--gray-100);
        color: var(--gray-500);
        cursor: not-allowed;
        border-color: var(--gray-200);
    }

/* Telerik RadTextBox */
.riTextBox {
    height: 42px !important;
}

/* =========================================================================
   RadComboBox Styling
   ========================================================================= */
.RadComboBox {
    border-radius: var(--radius-md) !important;
    display: inline-block !important;
    max-width: 90% !important;
}

/* Allow RadComboBox to be full width when inside table cells */
td .RadComboBox,
.form-field .RadComboBox,
[class*="col-"] .RadComboBox {
    width: 100% !important;
    display: block !important;
}

/* =========================================================================
   RadDatePicker / RadDateTimePicker Styling
   ========================================================================= */
.RadPicker,
.RadDatePicker,
.RadDateTimePicker {
    width: 100% !important;
    display: block !important;
}

    /* Wrapper that contains input and button */
    .RadPicker .rcTable,
    .RadDatePicker .rcTable,
    .RadDateTimePicker .rcTable {
        width: 95% !important;
        border-collapse: collapse !important;
        table-layout: auto !important;
    }

        .RadPicker .rcTable > tbody > tr,
        .RadDatePicker .rcTable > tbody > tr,
        .RadDateTimePicker .rcTable > tbody > tr {
            display: table-row !important;
        }

    /* Input wrapper */
    .RadPicker .riSingle,
    .RadDatePicker .riSingle,
    .RadDateTimePicker .riSingle,
    .RadPicker .RadInput,
    .RadDatePicker .RadInput,
    .RadDateTimePicker .RadInput {
        width: 100% !important;
        display: block !important;
    }

    /* The input container */
    .RadPicker .riTextBox,
    .RadDatePicker .riTextBox,
    .RadDateTimePicker .riTextBox {
        border: 2px solid var(--gray-200) !important;
        border-radius: var(--radius-md) 0 0 var(--radius-md) !important;
        padding: 0.5rem 0.75rem !important;
        font-size: 1rem !important;
        line-height: 1.5 !important;
        height: 42px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        background: white !important;
        transition: all var(--transition-base) !important;
    }

        .RadPicker .riTextBox:focus,
        .RadDatePicker .riTextBox:focus,
        .RadDateTimePicker .riTextBox:focus {
            border-color: var(--primary-color) !important;
            box-shadow: 0 0 0 3px var(--primary-light) !important;
            outline: none !important;
        }



/* Fix for different Telerik date picker structures */
.RadPicker_Bootstrap,
.RadPicker_Default,
.RadPicker_Silk {
    width: 100% !important;
}

    .RadPicker_Bootstrap .riSingle,
    .RadPicker_Default .riSingle,
    .RadPicker_Silk .riSingle {
        display: block !important;
        width: 100% !important;
    }


/* Ensure inline layout */
.RadPicker .rcTable td,
.RadDatePicker .rcTable td,
.RadDateTimePicker .rcTable td {
    display: table-cell !important;
    vertical-align: middle !important;
}

/* Wrapper table inside date picker */
.RadPicker > table,
.RadDatePicker > table,
.RadDateTimePicker > table {
    width: 100% !important;
    display: table !important;
}

    .RadPicker > table > tbody > tr > td,
    .RadDatePicker > table > tbody > tr > td,
    .RadDateTimePicker > table > tbody > tr > td {
        display: table-cell !important;
        vertical-align: middle !important;
    }

        /* First cell (input) takes remaining space */
        .RadPicker > table > tbody > tr > td:first-child,
        .RadDatePicker > table > tbody > tr > td:first-child,
        .RadDateTimePicker > table > tbody > tr > td:first-child {
            width: 100% !important;
        }

        /* Last cell (calendar button) fixed width */
        .RadPicker > table > tbody > tr > td:last-child,
        .RadDatePicker > table > tbody > tr > td:last-child,
        .RadDateTimePicker > table > tbody > tr > td:last-child {
            width: 42px !important;
            min-width: 42px !important;
        }

/* Mobile adjustments */
@media (max-width: 768px) {
    .RadPicker .riTextBox,
    .RadDatePicker .riTextBox,
    .RadDateTimePicker .riTextBox {
        font-size: 16px !important; /* Prevent iOS zoom */
        height: 44px !important;
    }
}

.RadComboBox .rcbInner {
    border: 2px solid var(--gray-200) !important;
    border-radius: var(--radius-md) !important;
    transition: all var(--transition-base) !important;
    background: white !important;
    min-height: 42px !important;
    display: table !important;
    width: 100% !important;
}

    .RadComboBox .rcbInner:hover {
        border-color: var(--gray-300) !important;
    }

.RadComboBox.rcbFocused .rcbInner {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px var(--primary-light) !important;
}

.RadComboBox.rcbDisabled .rcbInner {
    background-color: var(--gray-100) !important;
    border-color: var(--gray-200) !important;
    cursor: not-allowed !important;
}

/* Inner table structure - key fix: don't use fixed layout */
.RadComboBox .rcbInner > table {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: auto !important;
}

    .RadComboBox .rcbInner > table > tbody > tr {
        height: 38px !important;
    }

        /* Input cell - takes remaining space */
        .RadComboBox .rcbInputCell,
        .RadComboBox .rcbInner > table > tbody > tr > td:first-child {
            height: 38px !important;
            padding: 0 !important;
            vertical-align: middle !important;
            width: 100% !important;
        }

/* Input field inside combo box */
.RadComboBox .rcbInput,
.RadComboBox input.rcbInput {
    padding: 0.5rem 0.75rem !important;
    font-size: 1rem !important;
    line-height: 1.5 !important;
    border: none !important;
    background: transparent !important;
    height: 38px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Dropdown arrow cell - fixed width, stays at end */
.RadComboBox .rcbArrowCell,
.RadComboBox .rcbInner > table > tbody > tr > td:last-child,
.RadComboBox .rcbInner > table > tbody > tr > td.rcbArrowCell {
    width: 40px !important;
    min-width: 40px !important;
    max-width: 40px !important;
    height: 38px !important;
    padding: 0 !important;
    vertical-align: middle !important;
    background: var(--gray-50) !important;
    border-left: 1px solid var(--gray-200) !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    text-align: center !important;
}

    .RadComboBox .rcbArrowCell:hover,
    .RadComboBox .rcbInner > table > tbody > tr > td:last-child:hover {
        background: var(--gray-100) !important;
    }

    /* The actual arrow button/link inside the cell */
    .RadComboBox .rcbActionButton,
    .RadComboBox .rcbArrowCell > a,
    .RadComboBox .rcbArrowCell a.rcbActionButton {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 38px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        text-decoration: none !important;
        box-sizing: border-box !important;
    }

        /* Arrow icon */
        .RadComboBox .rcbActionButton .rcbIcon,
        .RadComboBox .rcbArrowCell .rcbIcon {
            display: block !important;
        }

/* Remove any extra padding/margins that might cause height issues */
.RadComboBox .rcbInner *,
.RadComboBox .rcbInner table *,
.RadComboBox .rcbInner table td * {
    box-sizing: border-box !important;
}

/* Fix for Bootstrap skin or other skins */
.RadComboBox_Bootstrap .rcbInner,
.RadComboBox_Default .rcbInner,
.RadComboBox_Silk .rcbInner {
    min-height: 42px !important;
}

.RadComboBox_Bootstrap .rcbArrowCell,
.RadComboBox_Default .rcbArrowCell,
.RadComboBox_Silk .rcbArrowCell,
.RadComboBox_Bootstrap .rcbArrowCell a,
.RadComboBox_Default .rcbArrowCell a,
.RadComboBox_Silk .rcbArrowCell a {
    height: 38px !important;
    width: 40px !important;
}

.RadComboBox_Bootstrap .rcbInput,
.RadComboBox_Default .rcbInput,
.RadComboBox_Silk .rcbInput {
    height: 38px !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .RadComboBox {
        width: 100% !important;
        display: block !important;
    }

        .RadComboBox .rcbInput,
        .RadComboBox input.rcbInput {
            font-size: 16px !important; /* Prevent iOS zoom */
            padding: 0.5rem 0.75rem !important;
            height: 40px !important;
        }

        .RadComboBox .rcbInner {
            min-height: 44px !important;
        }

            .RadComboBox .rcbInputCell,
            .RadComboBox .rcbInner > table > tbody > tr > td:first-child {
                height: 40px !important;
            }

            .RadComboBox .rcbArrowCell,
            .RadComboBox .rcbInner > table > tbody > tr > td:last-child,
            .RadComboBox .rcbActionButton,
            .RadComboBox .rcbArrowCell > a {
                width: 44px !important;
                min-width: 44px !important;
                max-width: 44px !important;
                height: 40px !important;
            }
}

/* =========================================================================
   Buttons & Actions
   ========================================================================= */
.btn,
button,
input[type="button"],
input[type="submit"] {
    padding: 0.625rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    min-height: var(--touch-target-size);
    min-width: var(--touch-target-size);
}

    .btn:hover,
    button:hover,
    input[type="button"]:hover,
    input[type="submit"]:hover {
        transform: translateY(-1px);
        box-shadow: var(--shadow-md);
    }

    .btn:active,
    button:active,
    input[type="button"]:active,
    input[type="submit"]:active {
        transform: translateY(0);
        box-shadow: var(--shadow-sm);
    }

.btn-primary,
input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
}

    .btn-primary:hover {
        background: linear-gradient(135deg, var(--primary-hover), #3730a3);
    }

.btn-light {
    background: white;
    color: var(--gray-700);
    border: 1px solid var(--gray-200);
}

    .btn-light:hover {
        background: var(--gray-50);
        border-color: var(--gray-300);
    }

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    min-height: 36px;
}

.btn-action {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all var(--transition-base);
    text-decoration: none;
    min-height: var(--touch-target-size);
}

    .btn-action i {
        font-size: 1.25rem;
    }

.btn-rounded {
    border-radius: 2rem;
}

/* =========================================================================
   Student/Parent Card Design
   ========================================================================= */
.student-card,
.parent-card,
.info-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-xl);
    overflow: visible;
    transition: box-shadow var(--transition-base);
    border: none;
    padding: 0;
}

    .student-card:hover,
    .parent-card:hover,
    .info-card:hover {
        box-shadow: var(--shadow-lg);
    }

.student-card-header,
.parent-card-header,
.info-card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    margin-bottom: 0;
    box-shadow: var(--shadow-md);
}

    .student-card-header .d-flex,
    .parent-card-header .d-flex,
    .info-card-header .d-flex {
        display: flex;
        flex-wrap: wrap;
        gap: var(--spacing-md);
    }

.student-card-body,
.parent-card-body,
.info-card-body {
    padding: var(--spacing-xl);
}

/* Avatar */
.avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 1.25rem;
    flex-shrink: 0;
}

    .avatar i {
        font-size: 1.5rem;
    }

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

    .status-badge i {
        font-size: 1rem;
    }

/* =========================================================================
   Section Headers
   ========================================================================= */
.section-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin: var(--spacing-lg) 0 var(--spacing-md) 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-sm);
}

    .section-header i {
        font-size: 1.25rem;
    }

    .section-header h5,
    .section-header h6,
    .section-header span {
        margin: 0;
        font-size: 1rem;
        font-weight: 600;
        color: white;
    }

/* =========================================================================
   Empty State
   ========================================================================= */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl) var(--spacing-xl);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin: var(--spacing-xl) 0;
}

    .empty-state i {
        font-size: 4rem;
        color: var(--gray-300);
        margin-bottom: var(--spacing-md);
    }

    .empty-state h5 {
        color: var(--gray-600);
        margin-bottom: var(--spacing-sm);
    }

    .empty-state p {
        color: var(--gray-500);
        margin-bottom: var(--spacing-lg);
    }

/* =========================================================================
   RadGrid Styling
   ========================================================================= */
.RadGrid {
    border: none !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm) !important;
    width: 100% !important;
}

    .RadGrid table {
        width: 100% !important;
    }

    .RadGrid .rgMasterTable {
        width: 100% !important;
    }

    .RadGrid .rgHeader {
        background: linear-gradient(180deg, var(--gray-100), var(--gray-200)) !important;
        font-weight: var(--font-weight-semibold) !important;
        color: var(--gray-700) !important;
        border: none !important;
        padding: var(--spacing-md) !important;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.05em;
    }

    .RadGrid .rgRow,
    .RadGrid .rgAltRow {
        transition: background-color var(--transition-fast);
        border-bottom: 1px solid var(--gray-100) !important;
    }

        .RadGrid .rgRow:hover,
        .RadGrid .rgAltRow:hover {
            background-color: var(--primary-light) !important;
        }

    .RadGrid .rgAltRow {
        background-color: var(--gray-50) !important;
    }

    .RadGrid td {
        padding: var(--spacing-md) !important;
        border: none !important;
        vertical-align: middle !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

/* Modern Files Grid */
.modern-files-grid {
    width: 100% !important;
}

    .modern-files-grid .rgHeader {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
    }

    .modern-files-grid .rgMasterTable {
        width: 100% !important;
    }

/* File link styling */
.file-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    word-break: break-all;
}

    .file-link:hover {
        background-color: var(--primary-light);
        color: var(--primary-hover);
    }

/* =========================================================================
   Documents Grid - Mobile Responsive Card Layout
   ========================================================================= */

/* Mobile styles for documents grid */
@media (max-width: 768px) {
    /* Documents section container */
    .card-header + .RadGrid,
    div:has(> .card-header) .RadGrid {
        border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
    }

    /* Convert RadGrid to card layout on mobile */
    .RadGrid .rgMasterTable,
    .RadGrid .rgMasterTable > tbody,
    .RadGrid .rgMasterTable > thead {
        display: block !important;
        width: 100% !important;
    }

        .RadGrid .rgMasterTable > thead {
            position: absolute;
            top: -9999px;
            left: -9999px;
            display: none !important;
        }

    .RadGrid .rgRow,
    .RadGrid .rgAltRow {
        display: block !important;
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: 0;
        background: white !important;
        box-shadow: var(--shadow-sm);
        overflow: hidden;
    }

        .RadGrid .rgRow td,
        .RadGrid .rgAltRow td {
            display: block !important;
            padding: var(--spacing-sm) var(--spacing-md) !important;
            border: none !important;
            border-bottom: 1px solid var(--gray-100) !important;
            white-space: normal !important;
            text-align: left !important;
            min-height: auto !important;
        }

            .RadGrid .rgRow td:last-child,
            .RadGrid .rgAltRow td:last-child {
                border-bottom: none !important;
            }

            /* Category cell - make it the header of the card */
            .RadGrid .rgRow td:first-child,
            .RadGrid .rgAltRow td:first-child {
                background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
                color: white;
                font-weight: var(--font-weight-semibold);
                padding: var(--spacing-md) !important;
            }

                .RadGrid .rgRow td:first-child .d-flex,
                .RadGrid .rgAltRow td:first-child .d-flex {
                    color: white;
                }

                    .RadGrid .rgRow td:first-child .d-flex i,
                    .RadGrid .rgAltRow td:first-child .d-flex i,
                    .RadGrid .rgRow td:first-child i.material-icons,
                    .RadGrid .rgAltRow td:first-child i.material-icons {
                        color: white !important;
                    }

                .RadGrid .rgRow td:first-child span,
                .RadGrid .rgAltRow td:first-child span {
                    color: white;
                }

                    .RadGrid .rgRow td:first-child span[style*="Red"],
                    .RadGrid .rgAltRow td:first-child span[style*="Red"],
                    .RadGrid .rgRow td:first-child .text-danger,
                    .RadGrid .rgAltRow td:first-child .text-danger {
                        color: #fecaca !important;
                    }

    /* File link in mobile card */
    .RadGrid .file-link,
    .RadGrid a[target="_blank"] {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm);
        background: var(--primary-light);
        border-radius: var(--radius-sm);
        color: var(--primary-color);
        font-weight: 500;
        word-break: break-all;
    }

    /* No file text */
    .RadGrid .text-muted,
    .RadGrid span[style*="Gray"] {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        color: var(--gray-400);
        font-style: italic;
    }
}

/* Small mobile adjustments */
@media (max-width: 576px) {
    .RadGrid .rgRow,
    .RadGrid .rgAltRow {
        margin-bottom: var(--spacing-sm);
    }

        .RadGrid .rgRow td,
        .RadGrid .rgAltRow td {
            padding: var(--spacing-xs) var(--spacing-sm) !important;
            font-size: 0.875rem;
        }

            .RadGrid .rgRow td:first-child,
            .RadGrid .rgAltRow td:first-child {
                padding: var(--spacing-sm) !important;
                font-size: 0.875rem;
            }

    .RadGrid .file-link,
    .RadGrid a[target="_blank"] {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8125rem;
    }
}

/* =========================================================================
   File Upload
   ========================================================================= */
.RadAsyncUpload {
    border: 2px dashed var(--gray-300) !important;
    border-radius: var(--radius-lg) !important;
    padding: var(--spacing-md) !important;
    background-color: var(--gray-50) !important;
    transition: all var(--transition-base) !important;
    min-height: var(--touch-target-size);
    width: 100% !important;
}

    .RadAsyncUpload:hover {
        border-color: var(--primary-color) !important;
        background-color: var(--primary-light) !important;
    }

/* =========================================================================
   Transport Section - Radio Buttons Styling
   ========================================================================= */

/* Reset - Remove all borders from radio button containers */
.InscritAutocar_Radio,
tr[id*="trTransportation"] table,
tr[id*="trTransportation"] table tr,
tr[id*="trTransportation"] table td,
tr[id*="Transportation"] table,
tr[id*="Transportation"] table tr,
tr[id*="Transportation"] table td,
table[id*="Transportation"],
table[id*="Transportation"] tr,
table[id*="Transportation"] td {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Radio button with label - inline styling */
input[type="radio"] {
    width: 20px !important;
    height: 20px !important;
    accent-color: var(--primary-color);
    cursor: pointer;
    flex-shrink: 0;
    margin: 0 var(--spacing-xs) 0 0 !important;
    vertical-align: middle;
}

    /* Label next to radio - NO border, inline */
    input[type="radio"] + label,
    input[type="radio"] + span,
    label:has(input[type="radio"]) {
        display: inline-flex !important;
        align-items: center !important;
        gap: var(--spacing-xs) !important;
        padding: var(--spacing-sm) var(--spacing-md) !important;
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
        cursor: pointer !important;
        margin: 0 !important;
        font-weight: normal !important;
        min-height: var(--touch-target-size);
        border-radius: var(--radius-md);
        transition: background-color var(--transition-fast);
    }

        input[type="radio"] + label:hover,
        input[type="radio"] + span:hover,
        label:has(input[type="radio"]):hover {
            background: var(--gray-100) !important;
        }

/* Transport options - horizontal layout on desktop */
tr[id*="trTransportation"] .col-sm-9,
tr[id*="Transportation"] .col-sm-9,
.transport-options {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--spacing-sm) !important;
    align-items: center !important;
}

/* Each radio option inline */
tr[id*="trTransportation"] table td,
tr[id*="Transportation"] table td {
    display: inline-flex !important;
    align-items: center !important;
    white-space: nowrap !important;
    padding: var(--spacing-sm) var(--spacing-md) !important;
}

/* Remove the card styling from transport rows */
tr[id*="trTransportation"],
tr[id*="Transportation"] {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

/* ALE/ALM Radio buttons - inline */
tr[id*="tdPedgogic"] input[type="radio"],
tr[id*="Pedgogic"] input[type="radio"] {
    margin-right: var(--spacing-xs) !important;
}

/* Mobile adjustments for radio buttons */
@media (max-width: 768px) {
    /* Stack radio options vertically on mobile */
    tr[id*="trTransportation"] .col-sm-9,
    tr[id*="Transportation"] .col-sm-9,
    .transport-options {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    tr[id*="trTransportation"] table td,
    tr[id*="Transportation"] table td {
        width: 100% !important;
        padding: var(--spacing-sm) !important;
    }

    input[type="radio"] + label,
    input[type="radio"] + span {
        padding: var(--spacing-sm) !important;
        width: 100%;
    }
}

/* =========================================================================
   Pedagogical Info Section (ALE/ALM Radio Buttons) - Inline
   ========================================================================= */
tr[id*="tdPedgogic"] .col-sm-9,
tr[id*="Pedgogic"] .col-sm-9 {
    padding: var(--spacing-md) !important;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    line-height: 1.8;
}

    /* ALE/ALM options inline */
    tr[id*="tdPedgogic"] .col-sm-9 br + input[type="radio"],
    tr[id*="Pedgogic"] .col-sm-9 br + input[type="radio"] {
        margin-left: var(--spacing-md);
    }

/* Clear selection link */
a[id*="btnClear"],
.clear-selection {
    font-size: 0.8125rem;
    color: var(--danger-color);
    text-decoration: underline;
    cursor: pointer;
    margin-left: var(--spacing-md);
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
}

    a[id*="btnClear"]:hover,
    .clear-selection:hover {
        color: #dc2626;
        background: var(--danger-light);
        border-radius: var(--radius-sm);
    }

@media (max-width: 768px) {
    tr[id*="tdPedgogic"] .col-sm-9,
    tr[id*="Pedgogic"] .col-sm-9 {
        font-size: 0.875rem;
        padding: var(--spacing-sm) !important;
    }
}

/* =========================================================================
   Form Validation
   ========================================================================= */
span[id*="rfv"]:not([style*="display: none"]),
span[id*="RequiredFieldValidator"]:not([style*="display: none"]),
span[id*="RegularExpressionValidator"]:not([style*="display: none"]) {
    color: var(--danger-color);
    font-weight: var(--font-weight-semibold);
    margin-left: var(--spacing-xs);
}

/* =========================================================================
   Alerts & Messages
   ========================================================================= */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: var(--success-light);
    border-left-color: var(--success-color);
    color: #065f46;
}

.alert-danger {
    background-color: var(--danger-light);
    border-left-color: var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background-color: var(--warning-light);
    border-left-color: var(--warning-color);
    color: #92400e;
}

.alert-info {
    background-color: var(--info-light);
    border-left-color: var(--info-color);
    color: #1e40af;
}

/* =========================================================================
   Loading States
   ========================================================================= */
.RadAjaxLoadingPanel {
    background-color: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(4px);
}

.is-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

    .is-loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        width: 24px;
        height: 24px;
        margin: -12px 0 0 -12px;
        border: 3px solid var(--gray-200);
        border-top-color: var(--primary-color);
        border-radius: 50%;
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================================================
   Utility Classes
   ========================================================================= */
.Disp_NONE {
    display: none !important;
}

.text-muted {
    color: var(--gray-500);
}

.text-white {
    color: white !important;
}

.fw-bold {
    font-weight: var(--font-weight-bold) !important;
}

.d-flex {
    display: flex !important;
}

.flex-wrap {
    flex-wrap: wrap !important;
}

.align-items-center {
    align-items: center !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.justify-content-center {
    justify-content: center !important;
}

.gap-2 {
    gap: var(--spacing-sm) !important;
}

.gap-3 {
    gap: var(--spacing-md) !important;
}

.mb-1 {
    margin-bottom: var(--spacing-xs) !important;
}

.mb-2 {
    margin-bottom: var(--spacing-sm) !important;
}

.mb-3 {
    margin-bottom: var(--spacing-md) !important;
}

.mb-4 {
    margin-bottom: var(--spacing-lg) !important;
}

.mb-5 {
    margin-bottom: var(--spacing-xl) !important;
}

.mt-1 {
    margin-top: var(--spacing-xs) !important;
}

.mt-2 {
    margin-top: var(--spacing-sm) !important;
}

.mt-3 {
    margin-top: var(--spacing-md) !important;
}

.mt-4 {
    margin-top: var(--spacing-lg) !important;
}

.mt-5 {
    margin-top: var(--spacing-xl) !important;
}

.me-1 {
    margin-right: var(--spacing-xs) !important;
}

.me-2 {
    margin-right: var(--spacing-sm) !important;
}

.ms-5 {
    margin-left: var(--spacing-xl) !important;
}

.p-3 {
    padding: var(--spacing-md) !important;
}

.rounded {
    border-radius: var(--radius-md) !important;
}

.bg-white {
    background-color: white !important;
}

/* =========================================================================
   RESPONSIVE DESIGN - TABLET (max-width: 992px)
   ========================================================================= */
@media (max-width: 992px) {
    :root {
        --spacing-xl: 1.5rem;
        --spacing-lg: 1.25rem;
    }

    .step-container,
    .step1-container,
    .step2-container,
    .step3-container {
        padding: 0 var(--spacing-md);
    }

    .step-header,
    .step1-header,
    .step2-header,
    .step3-header {
        padding: var(--spacing-lg);
    }

        .step-header h3,
        .step1-header h3,
        .step2-header h3,
        .step3-header h3 {
            font-size: 1.25rem;
        }

    .table-responsive {
        padding: var(--spacing-lg);
    }

    .card-header {
        margin: calc(-1 * var(--spacing-lg)) calc(-1 * var(--spacing-lg)) var(--spacing-md);
        padding: var(--spacing-md);
    }

    #insertTable td:first-child {
        width: 40%;
    }

    #insertTable td:nth-child(2) {
        width: 60%;
    }

    #studentTable td:first-child {
        width: 40%;
    }

    #studentTable td:nth-child(2) {
        width: 60%;
    }
}

/* =========================================================================
   RESPONSIVE DESIGN - MOBILE (max-width: 768px)
   ========================================================================= */
@media (max-width: 768px) {
    :root {
        --spacing-xl: 1.25rem;
        --spacing-lg: 1rem;
        --spacing-md: 0.75rem;
    }

    body {
        font-size: var(--mobile-font-size);
    }

    /* Container */
    .step-container,
    .step1-container,
    .step2-container,
    .step3-container {
        padding: 0 var(--spacing-sm);
    }

    /* Header */
    .step-header,
    .step1-header,
    .step2-header,
    .step3-header {
        padding: var(--spacing-md);
        margin-bottom: var(--spacing-md);
        border-radius: var(--radius-md);
    }

        .step-header .d-flex,
        .step1-header .d-flex,
        .step2-header .d-flex,
        .step3-header .d-flex {
            flex-direction: column;
            gap: var(--spacing-md);
            align-items: stretch !important;
        }

        .step-header h3,
        .step1-header h3,
        .step2-header h3,
        .step3-header h3 {
            font-size: 1.125rem;
            flex-direction: column;
            align-items: flex-start;
            gap: var(--spacing-sm);
        }

            .step-header h3 i,
            .step1-header h3 i,
            .step2-header h3 i,
            .step3-header h3 i {
                font-size: 1.25rem;
            }

    .step-indicator {
        font-size: 0.75rem;
        padding: 0.25rem 0.625rem;
        align-self: flex-start;
    }

    /* Back button */
    .step-header .btn-action,
    .step1-header .btn-action,
    .step2-header .btn-action,
    .step3-header .btn-action,
    .step-header .btn-light,
    .step1-header .btn-light,
    .step2-header .btn-light,
    .step3-header .btn-light {
        width: 100%;
        justify-content: center;
    }

    /* Progress Steps */
    .progress-steps {
        padding: 0;
        margin-bottom: var(--spacing-md);
    }

        .progress-steps::before {
            top: 1rem;
            left: 15%;
            right: 15%;
        }

    .progress-step {
        padding: 0 var(--spacing-xs);
    }

    .progress-step-circle {
        width: 2rem;
        height: 2rem;
        font-size: 0.75rem;
    }

        .progress-step-circle i {
            font-size: 0.875rem !important;
        }

    .progress-step-label {
        font-size: 0.625rem;
    }

    /* Table Responsive */
    .table-responsive {
        padding: var(--spacing-md);
        border-radius: var(--radius-md);
        overflow-x: visible;
    }

    .card-header {
        margin: calc(-1 * var(--spacing-md)) calc(-1 * var(--spacing-md)) var(--spacing-md);
        padding: var(--spacing-md);
        border-radius: var(--radius-md) var(--radius-md) 0 0;
    }

        .card-header h3,
        .card-header h5 {
            font-size: 1rem;
        }

    /* Form inputs - prevent zoom on iOS */
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="password"],
    textarea,
    select,
    .riTextBox,
    .RadInput,
    .RadComboBox input {
        font-size: 16px !important;
        padding: 0.5rem 0.75rem;
    }

    /* Table - Stack layout for mobile - EXCLUDE RadGrid */
    .table:not(.rgMasterTable) td {
        display: block;
        width: 100% !important;
        border-bottom: none;
        padding: var(--spacing-xs) var(--spacing-sm);
    }

        .table:not(.rgMasterTable) td:first-child {
            width: 100% !important;
            background-color: var(--gray-100);
            font-weight: var(--font-weight-semibold);
            padding: var(--spacing-sm);
            border-radius: var(--radius-sm);
            margin-bottom: var(--spacing-xs);
            min-width: unset;
        }

        .table:not(.rgMasterTable) td:nth-child(2) {
            width: 100% !important;
            padding-bottom: var(--spacing-md);
        }

    .table:not(.rgMasterTable) tr {
        display: block;
        margin-bottom: var(--spacing-md);
        border: 1px solid var(--gray-200);
        border-radius: var(--radius-md);
        padding: var(--spacing-sm);
        background: white;
    }

    /* Insert table mobile - EXCLUDE RadGrid */
    #insertTable td:first-child,
    #insertTable td:nth-child(2) {
        width: 100% !important;
    }

    #insertTable tr:nth-child(odd),
    #insertTable tr:nth-child(even) {
        background: white;
    }

    #insertTable tr {
        box-shadow: var(--shadow-sm);
        width: 100% !important;
    }


    /* Student table mobile - EXCLUDE RadGrid */
    #studentTable td:first-child,
    #studentTable td:nth-child(2) {
        width: 100% !important;
    }

    #studentTable tr:nth-child(odd),
    #studentTable tr:nth-child(even) {
        background: white;
    }

    #studentTable tr {
        box-shadow: var(--shadow-sm);
        width: 90% !important;
    }

    /* RadGrid Mobile - Keep table structure but make it scrollable */
    .RadGrid {
        width: 100% !important;
        overflow-x: auto !important;
    }

        .RadGrid .rgMasterTable {
            min-width: 300px;
        }

        .RadGrid td {
            padding: var(--spacing-sm) !important;
            font-size: 0.8125rem;
            white-space: nowrap;
        }

        .RadGrid .rgHeader {
            padding: var(--spacing-sm) !important;
            font-size: 0.6875rem;
            white-space: nowrap;
        }

    /* Files grid specific mobile styles */
    .modern-files-grid {
        font-size: 0.8125rem;
    }

        .modern-files-grid td {
            padding: var(--spacing-sm) var(--spacing-xs) !important;
        }

        .modern-files-grid .file-link {
            font-size: 0.75rem;
            padding: var(--spacing-xs);
        }

    /* Make the grid container scrollable */
    .RadGrid_Bootstrap,
    div[id*="grdFiles"] {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    /* Buttons */
    .btn,
    .btn-action {
        width: 100%;
        justify-content: center;
        font-size: 0.875rem;
        padding: 0.625rem var(--spacing-md);
    }

    .btn-sm {
        width: auto;
        min-width: var(--touch-target-size);
    }

    /* Student Card Header */
    .student-card-header,
    .parent-card-header,
    .info-card-header {
        padding: var(--spacing-md);
    }

        .student-card-header .d-flex,
        .parent-card-header .d-flex,
        .info-card-header .d-flex {
            flex-direction: column;
            align-items: stretch !important;
        }

            .student-card-header .d-flex.align-items-center,
            .student-card-header .d-flex.gap-3 {
                flex-direction: row;
                align-items: center !important;
                flex-wrap: wrap;
            }

        .student-card-header h5 {
            font-size: 1rem;
        }

    .student-card-body,
    .parent-card-body,
    .info-card-body {
        padding: var(--spacing-md);
    }

    .avatar {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

        .avatar i {
            font-size: 1.25rem;
        }

    /* Action buttons in card header */
    .student-card-header .ms-5,
    .parent-card-header .ms-5,
    .info-card-header .ms-5 {
        margin-left: 0 !important;
        margin-top: var(--spacing-sm);
        display: flex;
        gap: var(--spacing-sm);
        width: 100%;
    }

        .student-card-header .ms-5 .btn,
        .parent-card-header .ms-5 .btn,
        .info-card-header .ms-5 .btn {
            flex: 1;
        }

    /* Section header */
    .section-header {
        padding: var(--spacing-sm) var(--spacing-md);
        margin: var(--spacing-md) 0;
    }

        .section-header i {
            font-size: 1.125rem;
        }

        .section-header h5,
        .section-header h6,
        .section-header span {
            font-size: 0.875rem;
        }

    /* Status badge */
    .status-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

        .status-badge i {
            font-size: 0.875rem;
        }

    /* Empty state */
    .empty-state {
        padding: var(--spacing-xl) var(--spacing-md);
    }

        .empty-state i {
            font-size: 3rem;
        }

        .empty-state h5 {
            font-size: 1rem;
        }

        .empty-state p {
            font-size: 0.875rem;
        }

    /* RadGrid mobile */
    .RadGrid td {
        padding: var(--spacing-sm) !important;
        font-size: 0.875rem;
    }

    .RadGrid .rgHeader {
        padding: var(--spacing-sm) !important;
        font-size: 0.6875rem;
    }

    /* RadAsyncUpload */
    .RadAsyncUpload {
        padding: var(--spacing-sm) !important;
    }

    /* Material icons */
    .material-icons {
        font-size: 1.125rem;
    }

    /* Hide certain elements on mobile for cleaner UI */
    .d-none-mobile {
        display: none !important;
    }
}

/* =========================================================================
   RESPONSIVE DESIGN - SMALL MOBILE (max-width: 576px)
   ========================================================================= */
@media (max-width: 576px) {
    :root {
        --spacing-xl: 1rem;
        --spacing-lg: 0.875rem;
        --spacing-md: 0.625rem;
    }

    /* Container */
    .step-container,
    .step1-container,
    .step2-container,
    .step3-container {
        padding: 0 var(--spacing-xs);
    }

    /* Header */
    .step-header,
    .step1-header,
    .step2-header,
    .step3-header {
        padding: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

        .step-header h3,
        .step1-header h3,
        .step2-header h3,
        .step3-header h3 {
            font-size: 1rem;
        }

    .step-indicator {
        font-size: 0.6875rem;
        padding: 0.25rem 0.5rem;
    }

    /* Progress steps - hide labels, show only on active */
    .progress-steps::before {
        display: none;
    }

    .progress-step {
        padding: 0 var(--spacing-xs);
    }

    .progress-step-circle {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.6875rem;
    }

    .progress-step-label {
        font-size: 0.5625rem;
        display: none;
    }

    .progress-step.active .progress-step-label,
    .progress-step.completed .progress-step-label {
        display: block;
    }

    /* Table responsive */
    .table-responsive {
        padding: var(--spacing-sm);
    }

    .card-header {
        margin: calc(-1 * var(--spacing-sm)) calc(-1 * var(--spacing-sm)) var(--spacing-sm);
        padding: var(--spacing-sm);
    }

        .card-header h3,
        .card-header h5 {
            font-size: 0.9375rem;
        }

    /* Table cells */
    .table:not(.rgMasterTable) td {
        padding: var(--spacing-xs);
        font-size: 0.8125rem;
    }

        .table:not(.rgMasterTable) td:first-child {
            padding: var(--spacing-xs) var(--spacing-sm);
            font-size: 0.75rem;
        }

    .table:not(.rgMasterTable) tr {
        padding: var(--spacing-xs);
        margin-bottom: var(--spacing-sm);
    }

    /* RadGrid small mobile */
    .RadGrid td {
        padding: var(--spacing-xs) !important;
        font-size: 0.75rem;
    }

    .RadGrid .rgHeader {
        padding: var(--spacing-xs) !important;
        font-size: 0.625rem;
    }

    /* Buttons */
    .btn {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 0.375rem 0.5rem;
        min-height: 36px;
        min-width: 36px;
    }

    /* Card */
    .student-card-header,
    .parent-card-header,
    .info-card-header {
        padding: var(--spacing-sm);
    }

    .student-card-body,
    .parent-card-body,
    .info-card-body {
        padding: var(--spacing-sm);
    }

    .student-card-header h5 {
        font-size: 0.9375rem;
    }

    .avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }

        .avatar i {
            font-size: 1.125rem;
        }

    /* Section header */
    .section-header {
        padding: var(--spacing-xs) var(--spacing-sm);
        margin: var(--spacing-sm) 0;
    }

        .section-header i {
            font-size: 1rem;
        }

        .section-header h5,
        .section-header h6,
        .section-header span {
            font-size: 0.8125rem;
        }

    /* RadGrid */
    .RadGrid td {
        padding: var(--spacing-xs) !important;
        font-size: 0.8125rem;
    }

    .RadGrid .rgHeader {
        padding: var(--spacing-xs) !important;
        font-size: 0.625rem;
    }

    /* Empty state */
    .empty-state {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

        .empty-state i {
            font-size: 2.5rem;
        }

        .empty-state h5 {
            font-size: 0.9375rem;
        }

        .empty-state p {
            font-size: 0.8125rem;
        }

    /* Material icons */
    .material-icons {
        font-size: 1rem;
    }
}

/* =========================================================================
   RESPONSIVE DESIGN - EXTRA SMALL (max-width: 400px)
   ========================================================================= */
@media (max-width: 400px) {
    .step-header h3,
    .step1-header h3,
    .step2-header h3,
    .step3-header h3 {
        font-size: 0.9375rem;
    }

    .progress-step-circle {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.625rem;
    }

    .progress-step-label {
        display: none !important;
    }

    .card-header h3,
    .card-header h5 {
        font-size: 0.875rem;
    }

    .avatar {
        width: 32px;
        height: 32px;
    }

        .avatar i {
            font-size: 1rem;
        }

    .btn {
        font-size: 0.75rem;
        padding: 0.5rem 0.625rem;
    }
}

/* =========================================================================
   Accessibility Improvements
   ========================================================================= */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Touch targets - ensure minimum size */
a, button, input[type="button"], input[type="submit"],
.btn, .btn-action, .rcbActionButton {
    min-height: var(--touch-target-size);
}

/* High contrast mode */
@media (prefers-contrast: high) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        border-width: 3px;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* =========================================================================
   Print Styles
   ========================================================================= */
@media print {
    .table-responsive {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }

    .btn,
    button,
    .RadAsyncUpload,
    .progress-steps {
        display: none !important;
    }

    .card-header,
    .student-card-header,
    .section-header {
        background: white !important;
        color: black !important;
        border-bottom: 2px solid black;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .table tr {
        display: table-row;
        border: none;
        box-shadow: none;
    }

    .table td {
        display: table-cell;
    }
}

/* =========================================================================
   Dark Mode Support (Optional)
   ========================================================================= */
@media (prefers-color-scheme: dark) {
    :root {
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
    }

    body {
        background-color: #111827;
        color: var(--gray-800);
    }

    .table-responsive,
    .student-card,
    .parent-card,
    .info-card {
        background: #1f2937;
    }

    .table tr {
        background: #1f2937;
        border-color: var(--gray-200);
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        background-color: #374151;
        border-color: var(--gray-200);
        color: var(--gray-800);
    }

    .card-header,
    .section-header {
        background: linear-gradient(135deg, #4338ca, #6366f1) !important;
    }
}
