﻿:root {
            --primary: #1a6fd4;
            --primary-dark: #1558b0;
            --primary-glow: rgba(26, 111, 212, 0.18);
            --accent: #2563eb;
            --bg-deep: #eef2f7;
            --bg-input: #ffffff;
            --border-subtle: #d8e2ee;
            --border-active: #1a6fd4;
            --text-bright: #0d1b2e;
            --text-muted: #7a8fa6;
            --text-soft: #4a5f78;
            --card-shadow: none;
            --primary-rgb: 26, 111, 212;
            --font-sans: 'Space Grotesk', sans-serif;
            --font-display: 'Sora', 'Space Grotesk', sans-serif;
            --auth-radius-xs: 6px;
            --auth-radius-sm: 10px;
            --auth-radius-md: 10px;
            --auth-radius-lg: 12px;
            --auth-motion-fast: 180ms;
            --auth-motion-medium: 360ms;
            --auth-motion-slow: 560ms;
            --auth-motion-ease-standard: cubic-bezier(0.2, 0.7, 0.2, 1);
            --auth-motion-ease-pop: cubic-bezier(0.22, 1, 0.36, 1);
        }

        .auth-logo {
            border-radius: var(--auth-radius-lg) !important;
        }

        .input-with-icon input,
        .input-group input,
        .auth-container button,
        .auth-container .social-btn,
        .auth-container .toggle-btn,
        .auth-container .auth-switch-btn,
        .auth-container .form-submit-button {
            border-radius: var(--auth-radius-sm) !important;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }

        html {
            -webkit-text-size-adjust: 100%;
            text-size-adjust: 100%;
        }

        body {
            font-family: var(--font-sans);
            min-height: 100vh;
            display: flex;
            justify-content: center;
            align-items: center;
            background-color: var(--bg-deep);
            background-image:
                radial-gradient(ellipse 900px 600px at 15% 10%, rgba(26,111,212,0.08) 0%, transparent 65%),
                radial-gradient(ellipse 700px 500px at 85% 80%, rgba(37,99,235,0.06) 0%, transparent 60%);
            padding: 20px;
            position: relative;
            overflow-x: hidden;
        }

        /* Subtle grid overlay */
        body::before {
            content: '';
            position: fixed;
            inset: 0;
            background-image:
                linear-gradient(rgba(26,111,212,0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(26,111,212,0.03) 1px, transparent 1px);
            background-size: 50px 50px;
            pointer-events: none;
            z-index: 0;
        }

        @keyframes float {
            0%, 100% { transform: translateY(0) rotate(0deg); }
            50% { transform: translateY(-30px) rotate(180deg); }
        }

        .auth-container {
            display: block;
            background: transparent;
            backdrop-filter: none;
            -webkit-backdrop-filter: none;
            border-radius: 0;
            padding: 42px 36px;
            box-shadow: none;
            width: 100%;
            max-width: 430px;
            text-align: center;
            animation: slideUp var(--auth-motion-slow) var(--auth-motion-ease-pop);
            border: none;
            position: relative;
            z-index: 10;
            max-height: 90vh;
            overflow-y: auto;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(50px) scale(0.95); }
            to { opacity: 1; transform: translateY(0) scale(1); }
        }

        .auth-container::-webkit-scrollbar { width: 4px; }
        .auth-container::-webkit-scrollbar-track { background: transparent; }
        .auth-container::-webkit-scrollbar-thumb {
            background: rgba(59,130,246,0.3);
            border-radius: 2px;
        }

        .auth-logo {
            width: 88px;
            height: 88px;
            border-radius: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 26px;
            overflow: hidden;
            box-shadow: 0 0 0 1px rgba(26,111,212,0.2), 0 10px 30px rgba(26,111,212,0.2);
            transition: transform var(--auth-motion-medium) var(--auth-motion-ease-standard), box-shadow var(--auth-motion-medium) var(--auth-motion-ease-standard);
            position: relative;
        }

        .auth-logo:hover {
            transform: scale(1.06) translateY(-2px);
            box-shadow: 0 0 0 2px rgba(26,111,212,0.35), 0 14px 40px rgba(26,111,212,0.28);
        }

        .auth-logo img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .auth-title {
            font-size: 27px;
            font-weight: 700;
            color: var(--text-bright);
            margin-bottom: 8px;
            letter-spacing: -0.6px;
            font-family: var(--font-display);
            line-height: 1.2;
        }

        .auth-subtitle {
            font-size: 14.5px;
            color: var(--text-soft);
            margin-bottom: 32px;
            line-height: 1.55;
        }

        .auth-form {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .input-group {
            text-align: left;
        }

        .input-group label {
            display: block;
            font-size: 12.5px;
            color: var(--text-soft);
            margin-bottom: 8px;
            font-weight: 600;
            letter-spacing: 0.6px;
            text-transform: uppercase;
        }

        .input-with-icon {
            position: relative;
        }

        .input-with-icon input, .input-group input {
            width: 100%;
            padding: 14px 18px;
            border: 1px solid var(--border-subtle);
            border-radius: 10px;
            font-size: 15px;
            color: var(--text-bright);
            background: var(--bg-input);
            transition: all 0.25s ease;
            font-family: inherit;
        }

        .input-with-icon input:focus, .input-group input:focus {
            border-color: var(--border-active);
            outline: none;
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(26,111,212,0.1);
        }

        .input-with-icon input::placeholder, .input-group input::placeholder {
            color: var(--text-muted);
        }

        .password-toggle {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            background: none;
            border: none;
            cursor: pointer;
            padding: 6px;
            border-radius: 8px;
            transition: background 0.2s;
        }

        .password-toggle:hover {
            background: rgba(255,255,255,0.06);
        }

        .password-toggle svg {
            width: 18px;
            height: 18px;
            stroke: var(--text-muted);
            transition: stroke 0.2s;
        }

        .password-toggle:hover svg {
            stroke: var(--text-soft);
        }

        .link-text {
            font-size: 13px;
            color: var(--primary);
            text-decoration: none;
            display: inline-block;
            cursor: pointer;
            font-weight: 600;
            transition: color 0.2s, text-shadow 0.2s;
        }

        .link-text:hover {
            color: var(--primary-dark);
        }

        .auth-button {
            background: linear-gradient(135deg, #1a6fd4 0%, #2563eb 100%);
            background-size: 200% 200%;
            color: white;
            border: none;
            padding: 15px;
            border-radius: 10px;
            font-size: 15px;
            font-weight: 700;
            cursor: pointer;
            transition: all var(--auth-motion-fast) var(--auth-motion-ease-standard);
            margin-top: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            box-shadow: 0 4px 18px rgba(26, 111, 212, 0.35);
            position: relative;
            overflow: hidden;
            letter-spacing: 0.3px;
        }

        .auth-button::before {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
            transition: left 0.55s;
        }

        .auth-button:hover::before {
            left: 100%;
        }

        .auth-button:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 8px 28px rgba(26, 111, 212, 0.45);
            background: linear-gradient(135deg, #1558b0 0%, #1a6fd4 100%);
        }

        .auth-button:active:not(:disabled) {
            transform: translateY(0);
        }

        .auth-button:disabled {
            background: rgba(255,255,255,0.08);
            color: var(--text-muted);
            cursor: not-allowed;
            box-shadow: none;
            animation: none;
        }

        .auth-button .spinner {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255, 255, 255, 0.25);
            border-top-color: white;
            border-radius: 50%;
            animation: spin 0.7s linear infinite;
            display: none;
        }

        @keyframes spin { to { transform: rotate(360deg); } }

        .auth-button.loading .spinner { display: inline-block; }
        .auth-button.loading .button-text { display: none; }

        .auth-alt-links {
            margin-top: 26px;
            font-size: 14px;
            color: var(--text-muted);
            padding-top: 20px;
            border-top: 1px solid var(--border-subtle);
        }

        .auth-alt-links a {
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            transition: color 0.2s, text-shadow 0.2s;
        }

        .auth-alt-links a:hover {
            color: var(--primary-dark);
        }

        .remember-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: 4px;
        }

        .remember-row label {
            display: flex;
            align-items: center;
            font-size: 13px;
            color: var(--text-muted);
            cursor: pointer;
        }

        .remember-row input[type="checkbox"] {
            width: 16px;
            height: 16px;
            margin-right: 8px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        #loginView, #resetPasswordView, #registerView, #setNewPasswordView { display: none; }
        #loginView.active, #resetPasswordView.active, #registerView.active, #setNewPasswordView.active {
            display: block;
            animation: fadeSlide var(--auth-motion-medium) var(--auth-motion-ease-standard);
        }

        @keyframes fadeSlide {
            from { opacity: 0; transform: translateX(16px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @media (prefers-reduced-motion: no-preference) {
            #loginView.active .auth-form > *,
            #registerView.active .auth-form > *,
            #resetPasswordView.active .auth-form > *,
            #setNewPasswordView.active .auth-form > *,
            #loginView.active .auth-alt-links,
            #registerView.active .auth-alt-links,
            #resetPasswordView.active .auth-alt-links,
            #setNewPasswordView.active .auth-alt-links {
                opacity: 0;
                transform: translateY(10px);
                animation: authFieldRise var(--auth-motion-medium) var(--auth-motion-ease-pop) both;
            }
            #loginView.active .auth-form > *:nth-child(1),
            #registerView.active .auth-form > *:nth-child(1),
            #resetPasswordView.active .auth-form > *:nth-child(1),
            #setNewPasswordView.active .auth-form > *:nth-child(1) { animation-delay: 40ms; }
            #loginView.active .auth-form > *:nth-child(2),
            #registerView.active .auth-form > *:nth-child(2),
            #resetPasswordView.active .auth-form > *:nth-child(2),
            #setNewPasswordView.active .auth-form > *:nth-child(2) { animation-delay: 85ms; }
            #loginView.active .auth-form > *:nth-child(3),
            #registerView.active .auth-form > *:nth-child(3),
            #resetPasswordView.active .auth-form > *:nth-child(3),
            #setNewPasswordView.active .auth-form > *:nth-child(3) { animation-delay: 130ms; }
            #loginView.active .auth-form > *:nth-child(4),
            #registerView.active .auth-form > *:nth-child(4),
            #resetPasswordView.active .auth-form > *:nth-child(4),
            #setNewPasswordView.active .auth-form > *:nth-child(4) { animation-delay: 175ms; }
            #loginView.active .auth-form > *:nth-child(5),
            #registerView.active .auth-form > *:nth-child(5),
            #resetPasswordView.active .auth-form > *:nth-child(5),
            #setNewPasswordView.active .auth-form > *:nth-child(5) { animation-delay: 220ms; }
            #loginView.active .auth-alt-links,
            #registerView.active .auth-alt-links,
            #resetPasswordView.active .auth-alt-links,
            #setNewPasswordView.active .auth-alt-links { animation-delay: 260ms; }
        }

        @keyframes authFieldRise {
            from { opacity: 0; transform: translateY(10px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Status banners */
        .status-banner {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            padding: 13px 20px;
            text-align: center;
            z-index: 10000;
            font-weight: 600;
            font-size: 13.5px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
            display: none;
            letter-spacing: 0.2px;
        }

        #maintenanceBanner {
            background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
            color: white;
        }

        #registrationDisabledBanner {
            background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
            color: white;
        }

        #approvalRequiredBanner {
            background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
            color: white;
        }

        /* Input hint text */
        .input-hint {
            color: #f87171 !important;
        }

        /* Support link */
        .support-link {
            text-align: center;
            margin-top: 20px;
            padding-top: 15px;
            border-top: 1px solid var(--border-subtle);
        }

        .support-link a {
            color: #25D366;
            text-decoration: none;
            font-size: 13px;
            transition: opacity 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .support-link a:hover { opacity: 0.8; }

        @media (prefers-reduced-motion: reduce) {
            .auth-container,
            #loginView.active,
            #resetPasswordView.active,
            #registerView.active,
            #setNewPasswordView.active,
            #loginView.active .auth-form > *,
            #registerView.active .auth-form > *,
            #resetPasswordView.active .auth-form > *,
            #setNewPasswordView.active .auth-form > *,
            #loginView.active .auth-alt-links,
            #registerView.active .auth-alt-links,
            #resetPasswordView.active .auth-alt-links,
            #setNewPasswordView.active .auth-alt-links {
                animation: none !important;
                opacity: 1 !important;
                transform: none !important;
            }
            .auth-logo,
            .auth-button,
            .auth-button::before,
            .input-with-icon input,
            .input-group input {
                transition: none !important;
            }
            .auth-logo:hover,
            .auth-button:hover:not(:disabled) {
                transform: none;
            }
        }

        /* OTP input special styling */
        #otpCode {
            text-align: center !important;
            font-size: 26px !important;
            letter-spacing: 10px !important;
            font-weight: 700 !important;
            color: var(--text-bright) !important;
        }

        /* Mobile responsive */
        @media (max-width: 480px) {
            body { padding: 14px; }
            .auth-container { padding: 30px 22px; border-radius: 14px; }
            .auth-title { font-size: 23px; }
            .auth-logo { width: 76px; height: 76px; }
            .input-with-icon input, .input-group input { padding: 13px 15px; font-size: 16px; }
            .auth-button { padding: 14px; }
        }

        @media (max-width: 1024px) {
            input[type="text"],
            input[type="tel"],
            input[type="email"],
            input[type="number"],
            input[type="password"],
            input[type="date"],
            select, textarea {
                font-size: 16px !important;
            }
        }

        @supports (-webkit-touch-callout: none) {
            input,
            select,
            textarea {
                font-size: 16px !important;
            }
        }

