/* ==========================================================================
           SUPER ADVANCE INTUITIVE MOTION ENGINE & INTERACTIVE GLOW ANIMATIONS
           ========================================================================== */

        :root {
            --bg-color: #0c0c0d; 
            --panel-bg: #19191A;
            --accent-gold: #B58448;
            --border-color: #5F636B;
            --text-muted: #A3A3A3;
            --input-bg: #19191A;
            
            /* Motion Timing Curves */
            --ease-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6);
            --ease-smooth: cubic-bezier(0.25, 1, 0.5, 1);
        }

        /* 1. FIGMA COMPLETE DESIGN ACCURATE SPECIFICATION MATRIX */
        body {
            background-color: var(--bg-color);
            background: radial-gradient(circle at 50% -100%, #FFB760 0%, var(--bg-color) 70%);
            color: #FFFFFF;
            font-family: 'Rethink Sans', sans-serif;
            min-height: 100vh;
            overflow-x: hidden;
            padding-bottom: 60px;
            position: relative;
        }

        /* Keep site footer flush to the bottom of the registration layout */
        body.registration-page {
            padding-bottom: 0;
        }

        body.registration-page .registration-footer {
            position: relative;
            z-index: 2;
            margin-top: auto;
        }

        body.registration-page .registration-footer .footer {
            margin-bottom: 0;
        }

        /* EXACT FIGMA SPECIFICATIONS ELEMENT BACKGROUND GLOW LAYER */
        .figma-backdrop-ambient {
            position: absolute;
            width: 1493.94px;
            height: 689.11px;
            top: -345.12px;
            left: -26.97px;
            background: #472903;
            opacity: 1;
            filter: blur(219.57351684570312px);
            pointer-events: none;
            z-index: 0;
            mix-blend-mode: screen;
            animation: ambientAtmospherePulse 12s ease-in-out infinite alternate;
        }

        @media (max-width: 1400px) {
            .figma-backdrop-ambient {
                left: 50%;
                transform: translateX(-50%);
                width: 120%;
            }
        }

        .app-root-frame {
            position: relative;
            z-index: 2;
        }

        /* 1. Navbar Custom Styles */
        .custom-navbar {
            background-color: var(--panel-bg);
            border-radius: 16px;
            margin-top: 20px;
            height: 82px;
            padding: 0 24px;
            border: 1px solid rgba(255, 255, 255, 0.03);
            box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.2);
        }

        .btn-nav-action {
            font-weight: 700;
            font-size: 16px;
            line-height: 100%;
            border-radius: 8px;
            height: 44px;
            padding: 0 30px;
            display: inline-flex;
            align-items: center;
            gap: 10px;
            transition: all 0.4s var(--ease-smooth);
            position: relative;
            overflow: hidden;
        }

        .btn-back {
            background-color: transparent;
            color: #FFFFFF;
            border: 1px solid var(--border-color);
        }

        .btn-back:hover {
            background-color: rgba(255, 255, 255, 0.05);
            border-color: #FFFFFF;
            transform: translateX(-4px);
        }

        .btn-next {
            background-color: var(--accent-gold);
            color: #FFFFFF;
            border: none;
            box-shadow: 0 4px 14px rgba(181, 132, 72, 0.3);
        }

        .btn-next:hover {
            background-color: #c99654;
            transform: translateX(4px);
            box-shadow: 0 6px 20px rgba(181, 132, 72, 0.5);
        }

        /* 2. Page Typography */
        .page-title {
            font-weight: 800;
            font-size: 52px;
            line-height: 100%;
            letter-spacing: 0.01em;
            margin-top: 70px;
            margin-bottom: 70px;
            color: #FFFFFF;
            animation: textRevealDown 0.6s var(--ease-smooth) both;
        }

        .form-subtitle {
            font-weight: 600;
            font-size: 24px;
            line-height: 100%;
            margin-bottom: 32px;
            color: #FFFFFF;
        }

        /* 3. Form Component Core Sizing */
        .custom-select-wrapper {
            position: relative;
            max-width: 841px;
            width: 100%;
            height: 52px;
        }

        .custom-select, .custom-input {
            background-color: #19191A;
            border: 1px solid #5F636B;
            border-radius: 12px;
            color: #FFFFFF !important;
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 400;
            font-size: 14px;
            height: 52px;
            padding: 0 16px 0 14.88px;
            width: 100%;
            transition: border-color 0.3s var(--ease-smooth), background-color 0.3s var(--ease-smooth), box-shadow 0.3s var(--ease-smooth);
        }

        .custom-select {
            appearance: none;
            -webkit-appearance: none;
            cursor: pointer;
        }

        .custom-select:focus, .custom-input:focus {
            background-color: #212122;
            border-color: var(--accent-gold);
            box-shadow: 0 0 0 4px rgba(181, 132, 72, 0.15);
            状况-outline: none;
        }

        .custom-input::placeholder {
            color: #FFFFFF;
            opacity: 0.6; 
            transition: opacity 0.2s ease;
        }

        .custom-input:focus::placeholder {
            opacity: 0.3;
        }

        .select-arrow {
            position: absolute;
            right: 17px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s var(--ease-smooth);
        }
        
        .custom-select:focus + .select-arrow {
            transform: translateY(-50%) rotate(180deg);
        }

        /* 4. Stepper Tree Layout Styles */
        .stepper-container {
            position: relative;
            padding-right: 40px;
            display: flex;
            flex-direction: column;
            gap: 55px;
            height: 401px;
        }

        .stepper-divider {
            position: absolute;
            right: 0;
            top: -22.39px;
            width: 1px;
            height: 457.57px;
            background: linear-gradient(180deg, #000000 0%, #E8D9C6 50.96%, #000000 100%);
        }

        .step-row {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            position: relative;
            height: 21px;
        }

        .step-label {
            font-family: 'Rethink Sans', sans-serif;
            font-size: 16px;
            font-weight: 400;
            line-height: 100%;
            text-align: right;
            margin-right: 24px;
            color: #FFFFFF;
            white-space: nowrap;
            transition: color 0.4s var(--ease-smooth), text-shadow 0.4s var(--ease-smooth);
        }

        .step-number {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background-color: #FFFFFF;
            color: #242E39;
            font-family: 'Inter', sans-serif;
            font-weight: 500;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            z-index: 2;
            border: 2px solid var(--accent-gold);
            transition: all 0.4s var(--ease-elastic);
        }

        /* Step Completed / Active State Styles */
        .step-row.completed .step-label {
            font-weight: 700;
            color: var(--accent-gold);
            text-shadow: 0px 0px 20px rgba(181, 132, 72, 0.6);
        }

        .step-row.completed .step-number {
            background-color: var(--accent-gold);
            border: 2px solid var(--accent-gold);
            color: #FFFFFF;
            transform: scale(1.1);
            box-shadow: 0 0 15px rgba(181, 132, 72, 0.4);
        }

        /* Inactive Stepper States */
        .step-row.inactive .step-label {
            color: var(--text-muted);
            opacity: 0.6;
        }

        .step-row.inactive .step-number {
            background-color: #19191A;
            border: 1px solid rgba(255, 255, 255, 0.2);
            color: #FFFFFF;
            opacity: 0.6;
            transform: scale(1);
        }

        /* Dynamic connector link properties mapping */
        /* .step-row::after {
            content: '';
            position: absolute;
            right: 15px;
            top: 32px;
            width: 1px;
            height: 35px;
            background-color: rgba(255, 255, 255, 0.2);
            z-index: 1;
            transition: background-color 0.5s ease;
        } */

        .step-row.completed::after {
            background-color: var(--accent-gold);
            box-shadow: 0 0 8px var(--accent-gold);
        }

        .step-row:last-child::after {
            display: none;
        }

        /* 5. Multistep Content Framework Visibility with Kinetic Slide-In Animation */
        .form-step-content {
            display: none;
        }
        
        .form-step-content.active {
            display: block;
            animation: stepContentCanvasEnter 0.5s var(--ease-smooth) both;
        }

        /* Academic History Custom Card & Upload Styles */
        .upload-card {
            background-color: #19191A;
            border: 1px dashed #5F636B;
            border-radius: 12px;
            padding: 40px 24px;
            text-align: center;
            height: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 20px;
            transition: border-color 0.3s ease, background-color 0.3s ease, transform 0.3s var(--ease-smooth);
        }

        .upload-card:hover {
            border-color: var(--accent-gold);
            background-color: #1e1e1f;
            transform: translateY(-4px);
        }

        .upload-card-title {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 700;
            font-size: 14px;
            line-height: 100%;
            color: #FFFFFF;
            margin-bottom: 0;
            text-align: left;
            width: 100%;
        }

        .upload-icon-wrapper {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 1px solid #5F636B;
            border-radius: 6px;
            background-color: transparent;
            transition: all 0.3s ease;
        }

        .upload-card:hover .upload-icon-wrapper {
            border-color: var(--accent-gold);
            background-color: rgba(181, 132, 72, 0.1);
            transform: scale(1.05);
        }

        .upload-text-main {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 700;
            font-size: 14px;
            line-height: 100%;
            color: #FFFFFF;
            margin-bottom: 0;
        }

        .upload-text-sub {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 400;
            font-size: 12px;
            line-height: 100%;
            color: #FFFFFF;
            opacity: 0.6;
            margin-bottom: 0;
        }

        .btn-browse {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 400;
            font-size: 14px;
            line-height: 100%;
            color: #FFFFFF;
            background-color: transparent;
            border: 1px solid var(--accent-gold);
            border-radius: 8px;
            padding: 10px 16px;
            width: 115px;
            height: 42px;
            transition: all 0.3s var(--ease-smooth);
        }

        .btn-browse:hover {
            background-color: var(--accent-gold);
            box-shadow: 0 4px 12px rgba(181, 132, 72, 0.3);
            color: #FFFFFF;
        }

        /* Step 5 Custom Styles for Financial Guarantor Radio Options */
        .guarantor-card {
            max-width: 842px;
            background: #19191A;
            border: 1px dashed #5F636B;
            border-radius: 12px;
            padding: 24px;
            transition: border-color 0.3s ease;
        }
        
        .guarantor-card:focus-within {
            border-color: rgba(181, 132, 72, 0.5);
        }

        .guarantor-title {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 700;
            font-size: 16px;
            line-height: 100%;
            color: #FFFFFF;
            margin-bottom: 24px;
        }

        .custom-radio-group {
            display: flex;
            flex-wrap: wrap;
            gap: 24px;
        }

        .custom-radio-label {
            display: inline-flex;
            align-items: center;
            gap: 9px;
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 400;
            font-size: 16px;
            line-height: 100%;
            color: #FFFFFF;
            cursor: pointer;
            transition: color 0.2s ease;
        }
        
        .custom-radio-label:hover .custom-radio-input {
            border-color: var(--accent-gold);
        }

        .custom-radio-input {
            appearance: none;
            -webkit-appearance: none;
            width: 24px;
            height: 24px;
            border: 2px solid #F8F3ED;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            outline: none;
            cursor: pointer;
            transition: all 0.3s var(--ease-elastic);
        }

        .custom-radio-input:checked {
            border-color: var(--accent-gold);
            background-color: transparent;
            transform: scale(1.05);
        }

        .custom-radio-input:checked::before {
            content: '';
            width: 12px;
            height: 12px;
            background-color: var(--accent-gold);
            border-radius: 50%;
            display: block;
            animation: radioNodePop 0.3s var(--ease-elastic) both;
        }

        .accommodation-radio-card {
            width: 100%;
            height: 52px;
            background-color: #19191A;
            border: 1px dashed #5F636B;
            border-radius: 12px;
            display: flex;
            align-items: center;
            transition: border-color 0.3s ease;
        }
        
        .accommodation-radio-card:focus-within {
            border-color: rgba(181, 132, 72, 0.5);
        }


        /* NEW UI ADDITIONS FOR STEP 06 (SUBMISSION SCREEN) */
        .submission-card {
            background-color: #19191A;
            border: 1px solid #474748;
            border-radius: 12px;
            max-width: 839px;
            min-height: 392px;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            box-shadow: 0 12px 40px rgba(0,0,0,0.4);
        }
        
        .form-step-content.active .submission-card {
            animation: finalSuccessCardReveal 0.6s var(--ease-smooth) cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s both;
        }

        .success-icon-container {
            position: relative;
            width: 177px;
            height: 161px;
            margin-bottom: 32px;
        }
        
        .form-step-content.active .success-icon-container img {
            animation: illustrationFloat 4s ease-in-out infinite;
        }

        .success-bg-vector {
            fill: #FFFFFF;
        }

        .success-badge-check {
            position: absolute;
            top: 0;
            right: 12px;
            width: 32px;
            height: 32px;
            background-color: #B58448;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            border: 2px solid #19191A;
            box-shadow: 0 4px 10px rgba(181, 132, 72, 0.4);
            transform: scale(0);
        }
        
        .form-step-content.active .success-badge-check {
            animation: checkBadgePop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.5) 0.6s both;
        }

        .submission-title {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 800;
            font-size: 24px;
            color: #FFFFFF;
            margin-bottom: 12px;
            text-align: center;
        }

        .submission-desc {
            font-family: 'Rethink Sans', sans-serif;
            font-weight: 400;
            font-size: 16px;
            color: #B8B8B8;
            text-align: center;
            max-width: 442px;
            line-height: 140%;
            margin: 0;
        }

        .btn-home {
            background-color: #B58448;
            color: #FFFFFF;
            padding: 11px 30px;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 700;
            border: none;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s var(--ease-smooth);
        }
        
        .btn-home:hover {
            background-color: #c99654;
            transform: scale(1.03);
            box-shadow: 0 6px 20px rgba(181, 132, 72, 0.4);
        }

        /* 6. Media Queries & Responsive Reflows */
        @media (max-width: 767.98px) {
            .page-title {
                font-size: 32px;
                text-align: center;
                margin-top: 40px;
                margin-bottom: 40px;
            }

            .stepper-container {
                padding-right: 12px;
                margin-bottom: 40px;
                height: auto;
                gap: 24px;
            }

            .stepper-divider {
                display: none;
            }

            .step-row {
                justify-content: flex-start;
                height: auto;
            }

            .step-label {
                order: 2;
                text-align: left;
                margin-right: 0;
                margin-left: 20px;
            }

            .step-number {
                order: 1;
            }

            .step-row::after {
                content: '';
                position: absolute;
                left: 15.5px;
                right: auto;
                top: 32px;
                width: 1px;
                height: 26px;
                background-color: rgba(255, 255, 255, 0.2);
                z-index: 1;
            }
        }   

        /* 7. STRICT UNIFIED MEDIA QUERIES FOR CROSS-DEVICE RENDERING */
        @media (min-width: 1200px) {
            .grid-form-container {
                padding-left: 15px;
            }
        }

        @media (max-width: 1199.98px) {
            .page-title {
                font-size: 44px;
                margin-top: 50px;
                margin-bottom: 50px;
            }
            .stepper-container {
                padding-right: 20px;
                gap: 45px;
            }
            .stepper-divider {
                height: 410px;
            }
            .step-row::after {
                height: 35px;
            }
        }

        @media (max-width: 767.98px) {
            body {
                padding-bottom: 40px;
            }

            body.registration-page {
                padding-bottom: 0;
            }
            
            .custom-navbar {
                height: 72px;
                margin-top: 12px;
                padding: 0 16px;
            }

            .btn-nav-action {
                font-size: 14px;
                height: 38px;
                padding: 0 16px;
            }

            .page-title {
                font-size: 32px;
                text-align: center;
                margin-top: 36px;
                margin-bottom: 36px;
            }

            .form-subtitle {
                font-size: 20px;
                text-align: center;
                margin-bottom: 24px;
            }

            .stepper-container {
                padding-right: 0;
                margin-bottom: 32px;
                height: auto;
                flex-direction: row;
                justify-content: flex-start;
                gap: 16px;
                overflow-x: auto;
                padding-bottom: 16px;
                scroll-behavior: smooth;
                -webkit-overflow-scrolling: touch;
            }

            .stepper-container::-webkit-scrollbar {
                display: none;
            }
            .stepper-container {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }

            .stepper-divider, .step-row::after {
                display: none !important;
            }

            .step-row {
                justify-content: center;
                height: auto;
                flex-direction: column;
                gap: 6px;
                flex-shrink: 0;
            }

            .step-label {
                order: 2;
                text-align: center;
                margin-right: 0;
                margin-size: 13px;
            }

            .step-number {
                order: 1;
                width: 28px;
                height: 28px;
                font-size: 11px;
            }

            .submission-card {
                padding: 32px 16px;
                min-height: 340px;
                margin: 0 auto;
            }

            .success-icon-container {
                width: 140px;
                height: 127px;
                margin-bottom: 24px;
            }

            .submission-title {
                font-size: 18px;
                margin-bottom: 10px;
            }

            .submission-desc {
                font-size: 14px;
            }
        }

        /* ==========================================================================
           KEYFRAME SYSTEM DEFINITIONS
           ========================================================================== */
        @keyframes stepContentCanvasEnter {
            0% {
                opacity: 0;
                transform: translateY(14px) scale(0.99);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes ambientAtmospherePulse {
            0% {
                transform: translate(0, 0) scale(1);
                opacity: 0.9;
            }
            50% {
                transform: translate(20px, -15px) scale(1.04);
                opacity: 1;
            }
            100% {
                transform: translate(-15px, 10px) scale(0.97);
                opacity: 0.85;
            }
        }

        @keyframes textRevealDown {
            0% {
                opacity: 0;
                transform: translateY(-20px);
                filter: blur(5px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
                filter: blur(0);
            }
        }

        @keyframes radioNodePop {
            0% { transform: scale(0); }
            100% { transform: scale(1); }
        }

        @keyframes finalSuccessCardReveal {
            0% {
                opacity: 0;
                transform: translateY(30px) scale(0.95);
            }
            100% {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes checkBadgePop {
            0% { transform: scale(0) rotate(-45deg); }
            70% { transform: scale(1.2) rotate(10deg); }
            100% { transform: scale(1) rotate(0deg); }
        }

        @keyframes illustrationFloat {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

        /* Mobile matrum common screens-ku default layout */
.main-form-row {
    justify-content: center; /* Default-a ella screen-layum center panna help pannum */
    align-items: start;
    display: flex;
    padding-left: 15px;
    padding-right: 15px; /* Mobile-la left/right equal gap iruka */
}

/* Screen size 1100px matrum adharku mela (Desktop screens) */
@media (min-width: 1100px) {
    .main-form-row {
        justify-content: flex-start;
        padding-left: 15px;
        padding-right: 90px; /* Neenga kettapadi 1100px mela mattum intha padding work aagum */
    }
}

/* Baki ulla structural stepper style-gal */
.step-row {
    position: relative;
}   

.step-row::after {
    content: '';
    position: absolute;
    right: 15px;
    top: 32px;
    width: 1px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.2);
    z-index: 1;
    transition: background-color 0.5s ease;
}

.step-row:last-child::after,
.step-row:last-of-type::after,
.step-row:nth-child(6)::after {
    display: none !important;
    content: none !important;
    background: none !important;
    height: 0 !important;
    width: 0 !important;
}

.stepper-container {
    scroll-behavior: smooth;
}

/* ── Request Brochure Button Design (Updated Gold Theme) ── */
.btn-request-brochure {
    background-color: #B68548; /* உங்கள் பிரத்யேக தங்க நிறம் (Gold) */
    color: #FFFFFF;            /* வாசிப்புத்திறனுக்காக எழுத்துக்கள் வெள்ளை நிறமாக மாற்றப்பட்டுள்ளது */
    font-family: 'Rethink Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;          
    letter-spacing: 0.3px;
    padding: 14px 28px;        
    border: 2px solid #B68548; /* பொத்தானின் நிறத்திலேயே பார்டர் */
    border-radius: 8px;        
    cursor: pointer;
    transition: all 0.25s ease-in-out;
    display: inline-flex;
    align-items: center;
    gap: 10px;                 
    box-shadow: 0 4px 14px rgba(181, 132, 72, 0.3); /* Next பட்டன் போன்ற நிழல் */
}

/* மவுஸ் பாயிண்டர் அதன் மேல் செல்லும்போது (Hover Effect) */
.btn-request-brochure:hover {
    background-color: #c99654; /* Next பட்டன் போன்ற Hover கோல்டன் நிறம் */
    border-color: #c99654;
    color: #FFFFFF;                
    transform: translateY(-2px);   /* லேசாக மேலே எழும் அனிமேஷன் */
    box-shadow: 0 6px 20px rgba(181, 132, 72, 0.5);
}

/* பொத்தானை அழுத்தும்போது (Active State) */
.btn-request-brochure:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(181, 132, 72, 0.2);
}