@font-face {
    font-family: 'Tajwal';
    src: url('../fonts/Tajawal-Regular.ttf') format('woff2'),
        url('../fonts/Tajawal-Regular.ttf') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Tajwal';
    src: url('../fonts/Tajawal-Bold.ttf') format('woff2'),
        url('../fonts/Tajawal-Bold.ttf') format('woff');
    font-weight: bold;
    font-style: normal;
}

/* ===== Root Variables ===== */
:root {
    --primary: #611FAA;
    --primary-light: #8B5CF6;
    --primary-dark: #4C1D95;
    --indigo-500: #6366F1;
    --indigo-600: #4F46E5;
    --purple-500: #8B5CF6;
    --purple-600: #7C3AED;
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-900: #0F172A;
    --card-bg: rgba(255, 255, 255, 0.70);
    --card-border: rgba(255, 255, 255, 0.30);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    --input-bg: rgba(248, 250, 252, 0.5);
    --input-border: rgba(226, 232, 240, 0.8);
    --focus-ring: rgba(99, 102, 241, 0.10);
    --focus-border: #6366F1;
    --error-color: #EF4444;
    --success-color: #10B981;
    --card-radius: 2.5rem;
    --input-radius: 1rem;
    --btn-radius: 1rem;
}

/* ===== Global Reset & Base ===== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajwal', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    background: var(--slate-50);
    color: var(--slate-900);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    direction: rtl;
    padding: 2rem 0;
}

/* ===== Page Wrapper ===== */
.page-wrapper {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 10;
}

/* ===== Two-Column Grid (like register) ===== */
.auth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

/* ===== LEFT COLUMN: Feature Showcase ===== */
.showcase-col {
    display: flex;
    flex-direction: column;
    gap: 3rem;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    background: rgba(99, 102, 241, 0.10);
    border: 1px solid rgba(99, 102, 241, 0.20);
    color: var(--indigo-600);
    font-size: 0.65rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    width: fit-content;
}

.status-badge .pulse {
    position: relative;
    width: 8px;
    height: 8px;
    display: inline-flex;
}

.status-badge .pulse::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--indigo-500);
    animation: pulseAnim 2s ease-in-out infinite;
}

.status-badge .pulse::after {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: 50%;
    background: var(--indigo-500);
}

@keyframes pulseAnim {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(2.2); opacity: 0; }
}

/* Showcase Heading */
.showcase-heading {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.showcase-heading h1 {
    font-size: 3.25rem;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--slate-900);
    margin: 0;
}

.showcase-heading h1 .gradient-dot {
    background: linear-gradient(135deg, var(--indigo-500), var(--purple-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.showcase-heading p {
    font-size: 1.15rem;
    color: var(--slate-500);
    line-height: 1.7;
    max-width: 540px;
    margin: 0;
}

/* Feature Cards Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-card {
    padding: 1.25rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid rgba(255, 255, 255, 0.30);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: default;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover {
    transform: translateY(-4px) scale(1.02);
    background: rgba(255, 255, 255, 0.85);
}

.feature-card .f-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.feature-card .f-icon svg {
    width: 24px;
    height: 24px;
}

.f-icon.indigo  { background: rgba(99, 102, 241, 0.1); color: var(--indigo-500); }
.f-icon.purple  { background: rgba(139, 92, 246, 0.1);  color: var(--purple-500); }
.f-icon.blue    { background: rgba(59, 130, 246, 0.1);   color: #3B82F6; }
.f-icon.cyan    { background: rgba(6, 182, 212, 0.1);    color: #06B6D4; }

.f-icon.indigo svg  { stroke: var(--indigo-500); fill: none; }
.f-icon.purple svg  { stroke: var(--purple-500); fill: none; }
.f-icon.blue svg    { stroke: #3B82F6; fill: none; }
.f-icon.cyan svg    { stroke: #06B6D4; fill: none; }

.feature-card .f-text h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 0.15rem;
}

.feature-card .f-text {
    flex: 1;
    min-width: 0;
}

.feature-card .f-text p {
    font-size: 0.7rem;
    color: var(--slate-500);
    opacity: 0.7;
    margin: 0;
    line-height: 1.4;
    white-space: normal;
    overflow-wrap: break-word;
}

/* Trust Badge */
.trust-badge {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding-top: 1rem;
    opacity: 0.7;
}

.trust-avatars {
    display: flex;
    flex-direction: row-reverse;
}

.trust-avatars .t-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid white;
    background: var(--slate-200);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-right: -12px;
}

.trust-avatars .t-avatar:first-child {
    margin-right: 0;
}

.trust-avatars .t-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trust-badge p {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--slate-600);
    margin: 0;
}

.trust-badge p strong {
    color: var(--slate-900);
    font-weight: 800;
}


/* ===== RIGHT COLUMN: Form Container ===== */
.form-col {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.form-card-wrapper {
    position: relative;
}

/* Decorative Backglows */
.form-card-wrapper .glow-1 {
    position: absolute;
    top: -40px;
    left: -40px;
    width: 160px;
    height: 160px;
    background: rgba(99, 102, 241, 0.20);
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
}

.form-card-wrapper .glow-2 {
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    background: rgba(139, 92, 246, 0.20);
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
}

/* Form Card */
.form-card {
    border-radius: var(--card-radius);
    padding: 2.5rem 3rem;
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--card-border);
    box-shadow:
        var(--card-shadow),
        0 0 0 1px rgba(255, 255, 255, 0.4);
}

.form-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.form-card-inner {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Form Header */
.form-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.form-header h2 {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--slate-900);
    margin: 0;
}

.form-header p {
    font-size: 0.85rem;
    color: var(--slate-500);
    font-weight: 500;
    margin: 0;
}

/* ===== Form Fields ===== */
.form-fields {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-400);
    padding-right: 0.25rem;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--input-radius);
    isolation: isolate;
}

/* Gradient border shown on focus */
.input-group::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--input-radius) + 2px);
    background: linear-gradient(135deg, var(--indigo-500), var(--purple-500));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.input-group:focus-within::before {
    opacity: 1;
}

.input-group .input-icon {
    position: absolute;
    right: 0.875rem;
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.input-group .input-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--slate-400);
    transition: fill 0.3s ease;
}

.input-group:focus-within .input-icon svg {
    fill: var(--indigo-500);
}

.form-input {
    width: 100%;
    padding: 0.9rem 1rem;
    padding-right: 2.75rem;
    border-radius: var(--input-radius);
    border: 1.5px solid rgba(203, 213, 225, 0.9);
    background: var(--input-bg);
    color: var(--slate-900);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
    position: relative;
    z-index: 0;
}

.form-input::placeholder {
    color: var(--slate-400);
    font-weight: 400;
}

.form-input:focus {
    background: rgba(255, 255, 255, 0.97);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.10);
}

/* Password Toggle */
.password-toggle {
    position: absolute;
    left: 1rem;
    z-index: 2;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate-400);
    transition: all 0.3s ease;
    min-width: auto !important;
    border-radius: 0.5rem;
}

.password-toggle:hover {
    color: var(--indigo-500);
    background: rgba(99, 102, 241, 0.08);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
    transition: all 0.25s ease;
}

.password-toggle .eye-open {
    display: block;
}

.password-toggle .eye-closed {
    display: none;
}

.password-toggle.active .eye-open {
    display: none;
}

.password-toggle.active .eye-closed {
    display: block;
}

/* Select input */
select.form-input {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Validation Errors */
.field-validation-error,
.validation-error {
    display: block;
    color: var(--error-color);
    font-size: 0.7rem;
    font-weight: 600;
    padding-right: 0.25rem;
}

/* Forgot Password */
.forgot-row {
    text-align: center;
}

.forgot-row .btn-link {
    background: none;
    border: none;
    color: var(--indigo-600);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
}

.forgot-row .btn-link:hover {
    color: var(--indigo-500);
}

/* ===== Submit Button ===== */
.btn-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1.25rem;
    border: none;
    border-radius: var(--btn-radius);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 900;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--indigo-600) 0%, var(--purple-600) 50%, var(--indigo-600) 100%);
    background-size: 200% auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 20px 40px -8px rgba(99, 102, 241, 0.35);
}

.btn-submit:hover {
    background-position: right center;
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -8px rgba(99, 102, 241, 0.45);
}

.btn-submit:active {
    transform: scale(0.98);
}

.btn-submit .shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    transform: translateX(-100%) skewX(12deg);
    transition: transform 1s ease;
}

.btn-submit:hover .shimmer {
    transform: translateX(100%) skewX(12deg);
}

.btn-submit .arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-submit:hover .arrow-icon {
    transform: translateX(-4px);
}

/* ===== Divider ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--slate-200);
}

.auth-divider span {
    color: var(--slate-400);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== Social Buttons ===== */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--btn-radius);
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--slate-900);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-social:hover {
    background: rgba(255, 255, 255, 0.90);
    border-color: var(--slate-200);
    transform: translateY(-1px);
    color: var(--slate-900);
    text-decoration: none;
}

.btn-social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== Footer Link ===== */
.form-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--slate-200);
    text-align: center;
}

.form-footer p {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--slate-600);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.form-footer a {
    color: var(--indigo-600);
    text-decoration: underline;
    text-underline-offset: 6px;
    font-weight: 700;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: var(--indigo-500);
}

/* ===== Single Column Pages (Logout, AccessDenied, LoggedOut) ===== */
.single-page-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.auth-card-single {
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--card-radius);
    padding: 3rem;
    background: var(--card-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--card-border);
    box-shadow: var(--card-shadow);
    text-align: center;
    direction: rtl;
    position: relative;
    overflow: hidden;
}

.auth-card-single::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
}

.auth-card-single .card-header {
    margin-bottom: 1.5rem;
}

.auth-card-single .card-header h1 {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--slate-900);
    margin: 0.5rem 0 0;
}

.auth-card-single .card-header h1 .gradient-dot {
    background: linear-gradient(135deg, var(--indigo-500), var(--purple-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.auth-card-single .card-header p {
    color: var(--slate-500);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.icon-circle.success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.2); }
.icon-circle.warning { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.2); }
.icon-circle.danger  { background: rgba(239, 68, 68, 0.1);  border: 1px solid rgba(239, 68, 68, 0.2); }

.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: var(--btn-radius);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 900;
    color: #FFF;
    background: linear-gradient(135deg, var(--indigo-600), var(--purple-600));
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.35);
    text-decoration: none;
    margin-top: 1rem;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.45);
    color: #FFF;
    text-decoration: none;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 2.5rem;
    border: 1px solid var(--input-border);
    border-radius: var(--btn-radius);
    background: var(--input-bg);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--slate-900);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    margin-top: 1rem;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--slate-200);
    color: var(--slate-900);
    text-decoration: none;
}

/* ===== Modal (Glassmorphism) ===== */
.modal-glass {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(40px) !important;
    -webkit-backdrop-filter: blur(40px) !important;
    border: 1px solid rgba(255, 255, 255, 0.40) !important;
    border-radius: 2rem !important;
    box-shadow:
        0 25px 60px -12px rgba(0, 0, 0, 0.12),
        0 0 0 1px rgba(255, 255, 255, 0.5) !important;
    overflow: hidden;
    position: relative;
    padding: 0 !important;
}

.modal-glass::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    z-index: 1;
}

/* Modal Glows */
.modal-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    pointer-events: none;
    z-index: 0;
}

.modal-glow-1 {
    top: -30px;
    left: -30px;
    width: 120px;
    height: 120px;
    background: rgba(99, 102, 241, 0.15);
}

.modal-glow-2 {
    bottom: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    background: rgba(139, 92, 246, 0.15);
}

.modal-inner {
    position: relative;
    z-index: 2;
    padding: 2rem 2.25rem;
    direction: rtl;
}

/* Modal Header */
.modal-head {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    position: relative;
}

.modal-head-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
    border-radius: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--indigo-500);
}

.modal-head-text {
    flex: 1;
}

.modal-head-text h3 {
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--slate-900);
    margin: 0;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--slate-500);
    font-weight: 500;
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

.modal-close-btn {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 0.75rem;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--slate-400);
    transition: all 0.3s ease;
    padding: 0;
}

.modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    color: var(--error-color);
}

/* Modal Body */
.modal-body-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Modal Form Field */
.modal-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-label {
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--slate-400);
    padding-right: 0.25rem;
}

.modal-input-group {
    position: relative;
    display: flex;
    align-items: center;
    border-radius: var(--input-radius);
    isolation: isolate;
}

.modal-input-group::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: calc(var(--input-radius) + 2px);
    background: linear-gradient(135deg, var(--indigo-500), var(--purple-500));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
}

.modal-input-group:focus-within::before {
    opacity: 1;
}

.modal-input-icon {
    position: absolute;
    right: 0.875rem;
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1;
}

.modal-input-icon svg {
    width: 16px;
    height: 16px;
    fill: var(--slate-400);
    transition: fill 0.3s ease;
}

.modal-input-group:focus-within .modal-input-icon svg {
    fill: var(--indigo-500);
}

.modal-input {
    width: 100%;
    padding: 0.9rem 1rem;
    padding-right: 2.75rem;
    border-radius: var(--input-radius);
    border: 1.5px solid rgba(203, 213, 225, 0.9);
    background: var(--input-bg);
    color: var(--slate-900);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 600;
    outline: none;
    transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    direction: rtl;
    position: relative;
    z-index: 0;
}

.modal-input::placeholder {
    color: var(--slate-400);
    font-weight: 400;
}

.modal-input:focus {
    background: rgba(255, 255, 255, 0.97);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.10);
}

/* Modal Footer / Submit */
.modal-foot {
    margin-top: 0.25rem;
}

.btn-modal-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: var(--btn-radius);
    font-family: 'Tajwal', sans-serif;
    font-size: 0.875rem;
    font-weight: 900;
    color: #FFFFFF;
    background: linear-gradient(135deg, var(--indigo-600) 0%, var(--purple-600) 50%, var(--indigo-600) 100%);
    background-size: 200% auto;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
    box-shadow: 0 12px 30px -6px rgba(99, 102, 241, 0.35);
}

.btn-modal-submit:hover {
    background-position: right center;
    transform: translateY(-1px);
    box-shadow: 0 16px 35px -6px rgba(99, 102, 241, 0.45);
}

.btn-modal-submit:active {
    transform: scale(0.98);
}

.btn-modal-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.btn-modal-submit .btn-modal-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.10), transparent);
    transform: translateX(-100%) skewX(12deg);
    transition: transform 1s ease;
}

.btn-modal-submit:hover .btn-modal-shimmer {
    transform: translateX(100%) skewX(12deg);
}

.btn-modal-submit .btn-modal-arrow {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-modal-submit:hover .btn-modal-arrow {
    transform: translateX(-4px);
}

/* Loading state */
.btn-modal-submit.btn-loading {
    pointer-events: none;
}

.btn-modal-submit.btn-loading .btn-modal-arrow {
    animation: spinAnim 1s linear infinite;
}

@keyframes spinAnim {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Modal Loading Spinner */
.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 0;
}

.modal-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--input-border);
    border-top-color: var(--indigo-500);
    border-radius: 50%;
    animation: spinAnim 0.8s linear infinite;
}

/* Override Bootstrap modal defaults */
.modal-dialog-centered {
    min-height: calc(100% - 2rem);
}

.modal-content.modal-glass .modal-header,
.modal-content.modal-glass .modal-body,
.modal-content.modal-glass .modal-footer {
    display: none !important;
}

.modal.fade .modal-dialog {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    transform: scale(0.92) translateY(20px);
    opacity: 0;
}

.modal.show .modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-backdrop.show {
    opacity: 0.3;
}

@media (max-width: 768px) {
    .modal-inner {
        padding: 1.5rem;
    }

    .modal-glass {
        border-radius: 1.5rem !important;
        margin: 1rem;
    }

    .modal-head {
        flex-direction: column;
        text-align: center;
    }

    .modal-head-icon {
        margin: 0 auto;
    }

    .modal-close-btn {
        position: static;
        margin: 0 auto;
        order: -1;
        align-self: flex-start;
        position: absolute;
        top: 1.5rem;
        left: 1.5rem;
    }
}

/* ===== Notification Toasts ===== */
.notification-success,
.notification-error {
    position: fixed;
    top: 20px;
    left: 50%;
    font-size: 0.875rem;
    font-weight: 600;
    transform: translateX(-50%);
    padding: 1rem 1.5rem;
    text-align: center;
    border-radius: 1.5rem;
    display: none;
    z-index: 10000;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.notification-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: var(--success-color);
}

.notification-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: var(--error-color);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
    .auth-grid {
        gap: 2.5rem;
    }

    .showcase-heading h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 1rem 0;
        align-items: flex-start;
    }

    .auth-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .showcase-col {
        order: 2;
        gap: 1.5rem;
    }

    .form-col {
        order: 1;
    }

    .showcase-heading h1 {
        font-size: 2rem;
    }

    .showcase-heading p {
        font-size: 1rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .trust-badge {
        display: none;
    }

    .form-card {
        padding: 2rem 1.5rem;
        border-radius: 2rem;
    }

    .page-wrapper {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .form-card {
        padding: 1.5rem 1.25rem;
        border-radius: 1.5rem;
    }

    .form-input {
        padding: 0.85rem 1rem;
        padding-right: 2.5rem;
    }

    .showcase-heading h1 {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1rem;
        border-radius: 1rem;
    }
}

/* =============================================================
   DARK MODE
   ============================================================= */
[data-theme="dark"] {
    --slate-50: #0B0F1A;
    --slate-100: #111827;
    --slate-200: #1F2937;
    --slate-400: #6B7280;
    --slate-500: #9CA3AF;
    --slate-600: #D1D5DB;
    --slate-900: #F9FAFB;
    --card-bg: rgba(17, 24, 39, 0.70);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    --input-bg: rgba(17, 24, 39, 0.50);
    --input-border: rgba(255, 255, 255, 0.10);
    --focus-ring: rgba(99, 102, 241, 0.25);
}

[data-theme="dark"] body {
    background: var(--slate-50);
}

[data-theme="dark"] .feature-card {
    background: rgba(17, 24, 39, 0.40);
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .feature-card:hover {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .form-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.80), rgba(15, 23, 42, 0.90));
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .form-card::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

[data-theme="dark"] .form-input {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .form-input:focus {
    background: rgba(17, 24, 39, 0.85);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.18);
}

[data-theme="dark"] .btn-social:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .form-footer {
    border-top-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .auth-divider::before,
[data-theme="dark"] .auth-divider::after {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .trust-avatars .t-avatar {
    border-color: var(--slate-100);
}

[data-theme="dark"] .password-toggle:hover {
    background: rgba(99, 102, 241, 0.15);
}

/* Dark: Single page cards */
[data-theme="dark"] .auth-card-single {
    background: rgba(17, 24, 39, 0.70);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .auth-card-single::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

/* Dark: Modal */
[data-theme="dark"] .modal-glass {
    background: rgba(17, 24, 39, 0.92) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 25px 60px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .modal-glass::before {
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
}

[data-theme="dark"] .modal-close-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .modal-close-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
}

[data-theme="dark"] .modal-input {
    border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .modal-input:focus {
    background: rgba(17, 24, 39, 0.85);
    border-color: transparent;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.18);
}

[data-theme="dark"] .modal-backdrop.show {
    opacity: 0.6;
}

/* Dark: Notifications */
[data-theme="dark"] .notification-success {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .notification-error {
    background: rgba(239, 68, 68, 0.2);
}

/* =============================================================
   LTR OVERRIDES (English)
   ============================================================= */
[dir="ltr"] body {
    direction: ltr;
}

[dir="ltr"] .form-input,
[dir="ltr"] .modal-input {
    direction: ltr;
    padding-right: 1rem;
    padding-left: 2.75rem;
}

[dir="ltr"] .input-group .input-icon,
[dir="ltr"] .modal-input-icon {
    right: auto;
    left: 0.875rem;
}

[dir="ltr"] .password-toggle {
    left: auto;
    right: 1rem;
}

[dir="ltr"] .form-field label,
[dir="ltr"] .modal-label {
    padding-right: 0;
    padding-left: 0.25rem;
}

[dir="ltr"] .validation-error,
[dir="ltr"] .field-validation-error {
    padding-right: 0;
    padding-left: 0.25rem;
}

[dir="ltr"] .trust-avatars {
    flex-direction: row;
}

[dir="ltr"] .trust-avatars .t-avatar {
    margin-right: 0;
    margin-left: -12px;
}

[dir="ltr"] .trust-avatars .t-avatar:first-child {
    margin-left: 0;
}

[dir="ltr"] .form-footer a {
    margin-right: 0;
    margin-left: 0.5rem;
}

[dir="ltr"] .btn-submit .arrow-icon {
    transform: scaleX(-1);
}

[dir="ltr"] .btn-submit:hover .arrow-icon {
    transform: scaleX(-1) translateX(-4px);
}

[dir="ltr"] .btn-modal-arrow {
    transform: scaleX(-1);
}

[dir="ltr"] .btn-modal-submit:hover .btn-modal-arrow {
    transform: scaleX(-1) translateX(-4px);
}

[dir="ltr"] .modal-inner {
    direction: ltr;
}

[dir="ltr"] .modal-close-btn {
    left: auto;
    right: 0;
}

[dir="ltr"] .auth-card-single {
    direction: ltr;
}

@media (max-width: 768px) {
    [dir="ltr"] .modal-close-btn {
        left: auto;
        right: 1.5rem;
    }
}
