* {
            font-family: 'Cairo', 'Segoe UI', sans-serif;
        }
        body {
            touch-action: pan-x pan-y;
            background: #1e4a3b;
            scroll-behavior: smooth;
            margin: 0;
            padding: 0;
        }
        .auth-container {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 40px 20px;
            background: transparent;
        }
        .auth-card {
            background: rgba(255, 255, 255, 0.98);
            border-radius: 48px;
            padding: 40px 35px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
            max-width: 500px;
            width: 100%;
            transition: transform 0.2s, box-shadow 0.2s;
            backdrop-filter: blur(2px);
            border: 1px solid rgba(30, 74, 59, 0.08);
        }
        .auth-card:hover {
            transform: translateY(-4px);
            box-shadow: 0 30px 55px -12px rgba(0, 0, 0, 0.2);
        }
        .logo {
            direction: ltr;
        }
        .logo a {
            font-size: 2.1rem;
            font-weight: 800;
            color: #f9c74f;
            text-decoration: none;
            letter-spacing: -0.5px;
        }
        .auth-card h2 {
            color: #146c43; /* اللون الأخضر الداكن الخاص بـ Matiko */
        }
        .logo a i {
            color: #f9c74f;
            margin-left: 8px;
            font-size: 2rem;
        }
        .form-control, .input-group-text {
            border-radius: 60px;
            border: 1px solid #cbd5e1;
            padding: 12px 18px;
            transition: all 0.2s;
            background: #ffffff;
        }
        .form-control:focus {
            border-color: #f9c74f;
            box-shadow: 0 0 0 4px rgba(249, 199, 79, 0.25);
            outline: none;
        }
        .input-group-text {
            background: #f8fafc;
            border-right: none;
            color: #1e4a3b;
        }
        .btn-primary {
            background: #1e4a3b;
            border: none;
            border-radius: 60px;
            padding: 14px;
            font-weight: 800;
            font-size: 1.05rem;
            transition: 0.25s;
            width: 100%;
            box-shadow: 0 4px 10px rgba(30, 74, 59, 0.2);
        }
        .btn-primary:hover {
            background: #f9c74f;
            color: #1e4a3b;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(249, 199, 79, 0.3);
        }
        .verification-code-input {
            display: flex;
            gap: 12px;
            justify-content: center;
            direction: ltr;
        }
        .code-digit {
            width: 60px;
            height: 70px;
            text-align: center;
            font-size: 32px;
            font-weight: 800;
            border-radius: 20px;
            border: 2px solid #e2e8f0;
            background: white;
            transition: 0.2s;
        }
        .code-digit:focus {
            border-color: #f9c74f;
            box-shadow: 0 0 0 3px rgba(249, 199, 79, 0.4);
            outline: none;
            transform: scale(1.02);
        }
        .alert-custom {
            border-radius: 60px;
            border-right: 6px solid;
            padding: 14px 22px;
            font-weight: 600;
        }
        .alert-danger {
            background: #fee2e2;
            border-right-color: #dc2626;
            color: #991b1b;
        }
        .alert-success {
            background: #d1fae5;
            border-right-color: #10b981;
            color: #065f46;
        }
        .text-muted {
            color: #4b5563 !important;
        }
        .text-primary {
            color: #1e4a3b !important;
            font-weight: 700;
        }
        .small, small {
            color: #5b6e8c;
        }
        .password-toggle {
            cursor: pointer;
            position: absolute;
            left: 22px;
            top: 50%;
            transform: translateY(-50%);
            color: #8ba0bc;
            z-index: 10;
            transition: 0.2s;
        }
        .password-toggle:hover {
            color: #1e4a3b;
        }
        @media (max-width: 576px) {
            .auth-card {
                padding: 28px 20px;
                border-radius: 36px;
            }
            .code-digit {
                width: 48px;
                height: 58px;
                font-size: 26px;
            }
            .logo a {
                font-size: 1.8rem;
            }
        }
        /* مودال الأخطاء */
        .error-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            backdrop-filter: blur(5px);
            display: none;
            justify-content: center;
            align-items: center;
            z-index: 1000;
        }
        .error-modal {
            background: white;
            border-radius: 28px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 0 20px rgba(0,0,0,0.2);
            animation: modalSlide 0.3s ease-out;
            overflow: hidden;
        }
        @keyframes modalSlide {
            from { transform: translateY(-50px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        .modal-header {
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
            background: #fee2e2;
            border-radius: 28px 28px 0 0;
        }
        .modal-header h3 {
            margin: 0;
            color: #b91c1c;
        }
        .close-modal {
            font-size: 24px;
            cursor: pointer;
            color: #666;
        }
        .modal-body {
            padding: 20px;
            max-height: 60vh;
            overflow-y: auto;
        }
        .modal-footer {
            padding: 15px 20px;
            border-top: 1px solid #eee;
            text-align: left;
        }
        .modal-footer button {
            background: #1e4a3b;
            color: white;
            border: none;
            padding: 8px 20px;
            border-radius: 40px;
            cursor: pointer;
            transition: 0.2s;
        }
        .modal-footer button:hover {
            background: #f9c74f;
            color: #1e4a3b;
        }
        .error-item {
            padding: 10px;
            margin: 5px 0;
            background: #fff0f0;
            border-radius: 12px;
            display: flex;
            align-items: center;
            gap: 10px;
            border-right: 3px solid #dc2626;
        }
        /* شاشة التحميل */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.65);
            backdrop-filter: blur(10px);
            z-index: 9999;
            display: flex;
            justify-content: center;
            align-items: center;
            flex-direction: column;
        }
        .loading-card {
            background: white;
            border-radius: 40px;
            padding: 40px;
            text-align: center;
            max-width: 350px;
            width: 90%;
            box-shadow: 0 25px 45px rgba(0,0,0,0.2);
            animation: fadeInScale 0.3s ease;
        }
        @keyframes fadeInScale {
            from { opacity: 0; transform: scale(0.9); }
            to { opacity: 1; transform: scale(1); }
        }
        .loading-spinner {
            width: 80px;
            height: 80px;
            border: 5px solid #e2e8f0;
            border-top: 5px solid #f9c74f;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }
        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }
        .loading-text {
            font-size: 1.4rem;
            font-weight: 700;
            color: #1e4a3b;
            margin-bottom: 8px;
        }
        .loading-subtext {
            font-size: 0.85rem;
            color: #5b6e8c;
        }
        #resendBtn {
            color: #1e4a3b;
            font-weight: 600;
            transition: 0.2s;
        }
        #resendBtn:hover:not(:disabled) {
            color: #f9c74f;
            text-decoration: underline !important;
        }