/* Base layout */
.auth-layout {
    font-family: 'Cairo', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #e2f3ff;
    background-color: #050816;
    overflow: hidden;
}

.auth-bg-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 10% 20%, rgba(0, 255, 195, 0.08), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(0, 140, 255, 0.12), transparent 55%),
        radial-gradient(circle at 0% 100%, rgba(120, 104, 255, 0.12), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

.auth-glow {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}

.auth-glow--1 {
    background: #00bfa6;
    top: -80px;
    inset-inline-start: -60px;
}

.auth-glow--2 {
    background: #536dff;
    bottom: -120px;
    inset-inline-end: -40px;
}

/* Main card */
.auth-card {
    position: relative;
    z-index: 1;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: linear-gradient(135deg, rgba(8, 12, 26, 0.96), rgba(6, 18, 37, 0.98));
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.02);
    min-height: 360px;
}

/* AI side panel */
.auth-ai-panel {
    flex: 0 0 40%;
    padding: 28px 26px;
    border-inline-end: 1px solid rgba(255, 255, 255, 0.06);
    background: radial-gradient(circle at top left, rgba(0, 255, 195, 0.14), transparent 60%);
    backdrop-filter: blur(14px);
}

.auth-ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(5, 182, 179, 0.12);
    border: 1px solid rgba(5, 182, 179, 0.6);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7cf5e8;
}

.auth-ai-badge .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #27f3c3;
    box-shadow: 0 0 10px rgba(39, 243, 195, 0.9);
}

.auth-ai-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #f5fbff;
}

.auth-ai-subtitle {
    font-size: 0.9rem;
    color: #a9bfd7;
}

.auth-ai-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.auth-ai-pills .pill {
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.75rem;
    background: rgba(10, 35, 59, 0.9);
    border: 1px solid rgba(110, 165, 255, 0.35);
    color: #e3efff;
    white-space: nowrap;
}

.auth-ai-stats {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.auth-ai-stats .stat {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #b3c7e3;
}

.auth-ai-stats .stat-value {
    font-weight: 600;
    color: #ffffff;
}

/* Form side */
.auth-form-panel {
    flex: 1;
    padding: 26px 24px 24px;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top right, rgba(60, 115, 255, 0.12), transparent 60%);
}

.auth-form-inner {
    flex: 1;
}

/* Logo / brand */
.auth-logo {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}

.auth-logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    background: radial-gradient(circle at 30% 0, #89f4ff, #2dd4bf);
    box-shadow: 0 10px 25px rgba(8, 200, 189, 0.7);
    color: #041017;
}

.auth-logo-text {
    display: flex;
    flex-direction: column;
}

.auth-logo-text .app-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #f3f8ff;
}

.auth-logo-text .app-subtitle {
    font-size: 0.75rem;
    color: #9eb0c6;
}

/* Intro text */
.auth-form-panel h1,
.auth-form-panel h2,
.auth-form-panel h3,
.auth-form-panel h4 {
    color: #f5fbff;
}

.auth-title {
    font-size: 1.3rem;
    font-weight: 600;
}

.auth-subtitle {
    font-size: 0.9rem;
    color: #a2b6cf;
}

/* Form controls */
.auth-form-content {
    margin-top: 0.75rem;
}

.form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #c2d3eb;
}

.form-control {
    border-radius: 0.55rem;
    border: 1px solid rgba(155, 194, 255, 0.4);
    background-color: rgba(1, 10, 25, 0.85);
    color: #e3f3ff;
    font-size: 0.9rem;
    padding: 0.55rem 0.75rem;
}

.form-control::placeholder {
    color: #6f88a2;
}

.form-control:focus {
    border-color: #3cc9c5;
    box-shadow: 0 0 0 0.12rem rgba(60, 201, 197, 0.45);
    background-color: rgba(2, 15, 33, 0.98);
    color: #ffffff;
}

/* Inputs with icons */
.input-icon {
    position: relative;
}

.input-icon-symbol {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #6f88a2;
    pointer-events: none;
}

.input-icon .form-control {
    padding-inline-start: 2.1rem;
}

/* Remember / forgot row */
.d-flex.justify-content-between {
    font-size: 0.8rem;
}

.form-check-label {
    color: #c7d7ee;
}

a {
    color: #75e2d5;
    text-decoration: none;
}

a:hover {
    color: #9ff5ea;
    text-decoration: underline;
}

/* Buttons */
.btn {
    border-radius: 999px;
    font-size: 0.9rem;
    padding: 0.55rem 0.9rem;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    border: none;
    box-shadow: 0 12px 24px rgba(34, 197, 94, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0284c7, #16a34a);
    box-shadow: 0 12px 24px rgba(2, 132, 199, 0.4);
}

.btn-outline-secondary {
    border-color: rgba(148, 163, 184, 0.7);
    color: #e2f3ff;
    background: rgba(15, 23, 42, 0.7);
}

.btn-outline-secondary:hover {
    background: rgba(30, 64, 175, 0.9);
    color: #ffffff;
    border-color: rgba(30, 64, 175, 0.9);
}

/* Footer meta */
.auth-footer-meta {
    border-top: 1px dashed rgba(148, 163, 184, 0.5);
    padding-top: 0.8rem;
}

/* Global footer */
footer {
    font-size: 0.78rem;
    color: #8b9bb6 !important;
}

/* RTL support */
[dir="rtl"] .auth-ai-panel {
    border-inline-end: none;
    border-inline-start: 1px solid rgba(255, 255, 255, 0.06);
}

[dir="rtl"] .input-icon-symbol {
    inset-inline-start: auto;
    inset-inline-end: 0.75rem;
}

[dir="rtl"] .input-icon .form-control {
    padding-inline-start: 0.75rem;
    padding-inline-end: 2.1rem;
}

/* Responsive */
@media (max-width: 767.98px) {
    .auth-card {
        border-radius: 18px;
    }

    .auth-form-panel {
        padding: 20px 18px 18px;
    }

    .auth-logo-mark {
        width: 36px;
        height: 36px;
        border-radius: 13px;
        font-size: 0.8rem;
    }

    .auth-title {
        font-size: 1.1rem;
    }

    .auth-subtitle {
        font-size: 0.85rem;
    }

    .auth-bg-gradient {
        opacity: 0.85;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .auth-ai-panel {
        flex: 0 0 42%;
        padding: 22px 20px;
    }

    .auth-form-panel {
        padding: 22px 20px;
    }
}
