
    :root {
        --govt-blue: #1a365d;
        --govt-blue-light: #2c5282;
        --govt-gold: #c9a227;
        --govt-gold-light: #d4af37;
    }

    body {
        background: #f8fafc;
    }

    /* Page Header */
    .page-header {
        background: linear-gradient(135deg, var(--govt-blue) 0%, var(--govt-blue-light) 100%);
        color: white;
        padding: 2rem 0;
        border-bottom: 4px solid var(--govt-gold);
        text-align: center;
    }

    .page-header h1 {
        font-size: 1.75rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
    }

    .page-header p {
        opacity: 0.9;
        margin-bottom: 0;
        font-size: 0.95rem;
    }

    .register-container {
        min-height: calc(100vh - 250px);
        padding: 2rem 0;
    }

    /* Role Selection Cards */
    .role-selection {
        margin-bottom: 2rem;
    }

    .role-selection .section-title {
        font-size: 1.25rem;
        font-weight: 700;
        text-align: center;
        margin-bottom: 0.5rem;
        color: var(--govt-blue);
    }

    .role-selection .section-subtitle {
        text-align: center;
        color: #64748b;
        margin-bottom: 1.5rem;
        font-size: 0.9rem;
    }

    .role-cards {
        display: flex;
        gap: 1rem;
        justify-content: center;
        flex-wrap: wrap;
    }

    .role-card {
        background: white;
        border: 2px solid #e2e8f0;
        border-radius: 10px;
        padding: 1.25rem 1rem;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s;
        width: 200px;
        min-height: 140px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 3px rgba(0,0,0,0.05);
        overflow: hidden;
    }

    .role-card:hover {
        border-color: var(--govt-blue);
        transform: translateY(-3px);
        box-shadow: 0 4px 12px rgba(26,54,93,0.15);
    }

    .role-card.active {
        border-color: var(--govt-blue);
        background: linear-gradient(135deg, rgba(26,54,93,0.03), rgba(44,82,130,0.03));
        box-shadow: 0 4px 12px rgba(26,54,93,0.15);
    }

    .role-card .icon {
        width: 55px;
        height: 55px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
        margin: 0 auto 0.75rem;
        color: white;
    }

    .role-card.student .icon { background: linear-gradient(135deg, var(--govt-blue), var(--govt-blue-light)); }
    .role-card.teacher .icon { background: linear-gradient(135deg, #059669, #10b981); }
    .role-card.principal .icon { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
    .role-card.institution .icon { background: linear-gradient(135deg, var(--govt-gold), var(--govt-gold-light)); }

    .role-card h5 {
        font-weight: 600;
        margin-bottom: 0.25rem;
        color: var(--govt-blue);
        font-size: 0.85rem;
        line-height: 1.3;
        white-space: nowrap;
    }

    .role-card p {
        font-size: 0.7rem;
        color: #64748b;
        margin-bottom: 0;
        line-height: 1.3;
    }

    /* Registration Forms */
    .registration-forms {
        max-width: 600px;
        margin: 0 auto;
    }

    .reg-form {
        display: none;
        background: white;
        border: 1px solid #e2e8f0;
        border-radius: 10px;
        overflow: hidden;
        box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    }

    .reg-form.active {
        display: block;
    }

    .form-header {
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid #e2e8f0;
        background: var(--govt-blue);
        color: white;
    }

    .form-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
        margin: 0;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .form-header h3 i {
        color: var(--govt-gold);
    }

    .form-header p {
        margin: 0.25rem 0 0;
        font-size: 0.8rem;
        opacity: 0.9;
    }

    .form-body {
        padding: 1.5rem;
    }

    .form-group {
        margin-bottom: 1rem;
    }

    .form-label {
        display: block;
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--govt-blue);
        margin-bottom: 0.375rem;
    }

    .form-control, .form-select {
        width: 100%;
        padding: 0.6rem 0.875rem;
        border: 1px solid #e2e8f0;
        border-radius: 6px;
        font-size: 0.875rem;
        transition: all 0.2s;
    }

    .form-control:focus, .form-select:focus {
        outline: none;
        border-color: var(--govt-blue);
        box-shadow: 0 0 0 3px rgba(26,54,93,0.1);
    }

    .form-row {
        display: flex;
        gap: 1rem;
    }

    .form-row .form-group {
        flex: 1;
    }

    .required {
        color: #dc2626;
    }

    .btn-submit {
        width: 100%;
        padding: 0.75rem;
        background: var(--govt-blue);
        color: white;
        border: none;
        border-radius: 6px;
        font-weight: 600;
        font-size: 0.95rem;
        cursor: pointer;
        transition: all 0.2s;
        margin-top: 0.5rem;
    }

    .btn-submit:hover {
        background: var(--govt-blue-light);
    }

    .btn-submit:disabled {
        background: #94a3b8;
        cursor: not-allowed;
    }

    .form-footer {
        text-align: center;
        padding: 1rem;
        background: #f8fafc;
        border-top: 1px solid #e2e8f0;
    }

    .form-footer p {
        margin: 0;
        font-size: 0.85rem;
        color: #64748b;
    }

    .form-footer a {
        color: var(--govt-blue);
        font-weight: 600;
        text-decoration: none;
    }

    .form-footer a:hover {
        color: var(--govt-gold);
        text-decoration: underline;
    }

    .terms-text {
        font-size: 0.75rem;
        color: #64748b;
        text-align: center;
        margin-top: 1rem;
    }

    .terms-text a {
        color: var(--govt-blue);
        text-decoration: none;
    }

    .terms-text a:hover {
        text-decoration: underline;
    }

    .password-wrapper {
        position: relative;
    }

    .password-toggle {
        position: absolute;
        right: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        color: #64748b;
        cursor: pointer;
    }

    .password-toggle:hover {
        color: var(--govt-blue);
    }

    .alert {
        padding: 0.75rem 1rem;
        border-radius: 6px;
        margin-bottom: 1rem;
        font-size: 0.875rem;
    }

    .section-divider {
        display: flex;
        align-items: center;
        margin: 1.5rem 0;
    }

    .section-divider::before,
    .section-divider::after {
        content: '';
        flex: 1;
        border-bottom: 1px solid #e2e8f0;
    }

    .section-divider span {
        padding: 0 1rem;
        color: var(--govt-blue);
        font-size: 0.75rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    /* File Upload Styles */
    .file-upload-wrapper {
        position: relative;
    }

    .file-upload-input {
        position: absolute;
        left: 0;
        top: 0;
        opacity: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

    .file-upload-label {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
        border: 2px dashed #cbd5e1;
        border-radius: 8px;
        background: #f8fafc;
        cursor: pointer;
        transition: all 0.2s;
    }

    .file-upload-label:hover {
        border-color: var(--govt-blue);
        background: rgba(26,54,93,0.03);
    }

    .file-upload-label.has-file {
        border-color: #059669;
        background: rgba(5,150,105,0.03);
    }

    .file-upload-icon {
        width: 38px;
        height: 38px;
        border-radius: 8px;
        background: var(--govt-blue);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
    }

    .file-upload-label.has-file .file-upload-icon {
        background: #059669;
    }

    .file-upload-text {
        flex: 1;
    }

    .file-upload-text .title {
        font-weight: 600;
        font-size: 0.8rem;
        color: var(--govt-blue);
    }

    .file-upload-text .subtitle {
        font-size: 0.7rem;
        color: #64748b;
    }

    .file-upload-text .filename {
        font-size: 0.7rem;
        color: #059669;
        font-weight: 500;
    }

    .upload-preview {
        width: 50px;
        height: 50px;
        border-radius: 6px;
        object-fit: cover;
        border: 2px solid #e2e8f0;
    }

    .upload-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    @media (max-width: 576px) {
        .upload-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 768px) {
        .page-header {
            padding: 1.25rem 0;
        }

        .page-header h1 {
            font-size: 1.4rem;
        }

        .page-header p {
            font-size: 0.85rem;
        }

        .role-cards {
            gap: 0.75rem;
        }

        .role-card {
            width: calc(50% - 0.5rem);
            padding: 1rem 0.5rem;
            min-height: 130px;
        }

        .role-card .icon {
            width: 45px;
            height: 45px;
            font-size: 1.25rem;
        }

        .role-card h5 {
            font-size: 0.75rem;
            line-height: 1.2;
            white-space: normal;
        }

        .form-row {
            flex-direction: column;
            gap: 0;
        }

        .registration-forms {
            padding: 0 1rem;
        }
    }

    @media (max-width: 576px) {
        .page-header {
            padding: 1rem 0;
        }

        .page-header h1 {
            font-size: 1.25rem;
        }

        .page-header p {
            font-size: 0.8rem;
        }

        .role-card {
            width: calc(50% - 0.375rem);
            padding: 0.75rem 0.35rem;
            min-height: 120px;
        }

        .role-card .icon {
            width: 40px;
            height: 40px;
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

        .role-card h5 {
            font-size: 0.7rem;
            line-height: 1.2;
            white-space: normal;
        }

        .role-card p {
            font-size: 0.6rem;
        }
    }

    @media (max-width: 480px) {
        .role-card {
            width: 100%;
            min-height: auto;
            flex-direction: row;
            justify-content: flex-start;
            gap: 1rem;
            padding: 1rem;
        }

        .role-card .icon {
            margin: 0;
        }

        .role-card h5,
        .role-card p {
            text-align: left;
        }
    }

    /* Validation Modal Styles */
    .validation-modal .modal-content {
        border-radius: 16px;
        overflow: hidden;
        border: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    }

    .validation-modal .modal-body {
        text-align: center;
        padding: 2.5rem 1.5rem;
    }

    .validation-modal-icon {
        width: 80px;
        height: 80px;
        border-radius: 50%;
        background: #fef2f2;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 1.5rem;
    }

    .validation-modal-icon i {
        font-size: 2.5rem;
        color: #ef4444;
    }

    .validation-modal-icon.warning {
        background: #fffbeb;
    }

    .validation-modal-icon.warning i {
        color: #f59e0b;
    }

    .validation-modal-icon.info {
        background: #eff6ff;
    }

    .validation-modal-icon.info i {
        color: #3b82f6;
    }

    .validation-modal h4 {
        font-weight: 700;
        margin-bottom: 0.75rem;
    }

    .validation-modal p {
        color: #64748b;
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .validation-modal .btn-primary {
        border-radius: 10px;
        font-weight: 600;
        padding: 0.625rem 2rem;
    }

    /* Upload preview hidden by default */
    .upload-preview-hidden {
        display: none;
    }

    /* ========== Inline Validation Styles ========== */

    /* Field error message */
    .field-error {
        display: none;
        color: #dc2626;
        font-size: 0.8rem;
        margin-top: 0.3rem;
        padding: 0.2rem 0;
        font-weight: 500;
    }
    .field-error i {
        margin-right: 0.25rem;
    }

    /* Input/Select error state */
    .form-control.has-error,
    .form-select.has-error {
        border-color: #dc2626 !important;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
    }

    /* Input/Select valid state */
    .form-control.is-valid,
    .form-select.is-valid {
        border-color: #22c55e !important;
        box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1) !important;
    }

    /* File upload error state */
    .file-upload-wrapper.has-error .file-upload-label {
        border-color: #dc2626 !important;
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
    }

    /* General error alert */
    .general-error-alert {
        margin-bottom: 1rem;
    }
    .general-error-alert .alert {
        border-radius: 10px;
        font-size: 0.9rem;
    }

    /* Spinner animation for submit button */
    .spin {
        display: inline-block;
        animation: spin 1s linear infinite;
    }
    @keyframes spin {
        from { transform: rotate(0deg); }
        to { transform: rotate(360deg); }
    }

    /* Disabled submit button */
    .btn-submit:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }
