/* ==========================================================================
   Authentication layout — isolated page styles
   Shared tokens come from design-system.css.
   ========================================================================== */

/* ==========================================================================
   Auth Page CSS
   Clean, formal, RTL, consistent with the admin sidebar style
   ========================================================================== */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Vazirmatn, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Arial, sans-serif;
}

body.auth-body {
    direction: rtl;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(166, 38, 38, 0.10), transparent 30rem),
        radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.08), transparent 34rem),
        linear-gradient(135deg, var(--color-surface-subtle) 0%, var(--color-surface-muted) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    color: var(--color-text-strong);
}

/* Main shell */
.auth-shell {
    width: 100%;
    max-width: 1080px;
    min-height: 640px;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    border-radius: 1.5rem;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.12);
}

/* Left visual panel */
.auth-hero {
    position: relative;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95), rgba(166, 38, 38, 0.88));
    background-size: cover;
    background-position: center;
    color: var(--color-surface);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.auth-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.16), transparent 13rem),
        radial-gradient(circle at 85% 75%, rgba(255, 255, 255, 0.10), transparent 18rem);
    pointer-events: none;
}

.auth-hero::after {
    content: "";
    position: absolute;
    inset-inline-end: -7rem;
    inset-block-end: -7rem;
    width: 18rem;
    height: 18rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.auth-hero-inner {
    position: relative;
    z-index: 1;
}

.auth-logo {
    width: 4.25rem;
    height: 4.25rem;
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.1rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    margin-bottom: 1.5rem;
}

.auth-hero-title {
    margin: 0;
    font-size: 2.35rem;
    line-height: 1.15;
    font-weight: 900;
    letter-spacing: -0.04em;
}

.auth-hero-subtitle {
    margin: 1rem 0 0;
    max-width: 34rem;
    font-size: 1rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.78);
}

.auth-hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.auth-hero-stat {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
}

.auth-hero-stat strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 1.15rem;
    font-weight: 900;
    color: var(--color-surface);
}

.auth-hero-stat span {
    display: block;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.72);
}

/* Right form panel */
.auth-panel {
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at top left, rgba(166, 38, 38, 0.045), transparent 22rem),
        var(--color-surface);
}

.auth-card {
    width: 100%;
    max-width: 420px;
}

.auth-card-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-card-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    background: var(--color-text-strong);
    color: var(--color-surface);
    font-size: 1.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.18);
    margin-bottom: 1rem;
}

.auth-card-title {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.3;
    font-weight: 900;
    color: var(--color-text-strong);
    letter-spacing: -0.025em;
}

.auth-card-subtitle {
    margin: 0.5rem 0 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
    line-height: 1.8;
}

/* Form */
.auth-form {
    display: grid;
    gap: 1rem;
}

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-label {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    font-weight: 800;
}

.auth-input {
    width: 100%;
    border: 1px solid var(--color-border-strong);
    background: var(--color-surface);
    border-radius: 0.95rem;
    padding: 0.9rem 1rem;
    font-size: 0.98rem;
    outline: none;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease,
        background 0.16s ease;
    color: var(--color-text-strong);
}

.auth-input::placeholder {
    color: var(--color-text-subtle);
}

.auth-input:hover {
    border-color: var(--color-text-subtle);
}

.auth-input:focus {
    border-color: var(--color-brand-600);
    box-shadow: 0 0 0 4px rgba(166, 38, 38, 0.12);
}

.auth-input.ltr {
    direction: ltr;
    text-align: left;
}

/* Button */
.auth-button {
    width: 100%;
    border: 0;
    border-radius: 0.95rem;
    padding: 0.95rem 1.2rem;
    background: var(--color-brand-600);
    color: var(--color-surface);
    font-size: 0.98rem;
    font-weight: 900;
    cursor: pointer;
    transition:
        background 0.16s ease,
        box-shadow 0.16s ease,
        transform 0.16s ease,
        opacity 0.16s ease;
    box-shadow: 0 14px 24px rgba(166, 38, 38, 0.20);
}

.auth-button:hover {
    background: var(--color-danger-solid);
    transform: translateY(-1px);
    box-shadow: 0 18px 30px rgba(166, 38, 38, 0.26);
}

.auth-button:active {
    transform: translateY(0);
    box-shadow: 0 10px 20px rgba(166, 38, 38, 0.20);
}

.auth-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.auth-button[aria-busy="true"] {
    position: relative;
}

/* Messages */
.auth-message {
    display: none;
    border-radius: 0.95rem;
    padding: 0.85rem 1rem;
    font-size: 0.88rem;
    line-height: 1.8;
    text-align: right;
}

.auth-message.show {
    display: block;
}

.auth-message.error {
    background: var(--color-danger-50);
    color: var(--color-danger-700);
    border: 1px solid var(--color-brand-200);
}

.auth-message.success {
    background: var(--color-success-50);
    color: var(--color-success-700);
    border: 1px solid var(--color-success-200);
}

/* Footer note */
.auth-footer-note {
    margin-top: 1.25rem;
    text-align: center;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.8;
}

/* Small helper links if used later */
.auth-link {
    color: var(--color-brand-600);
    text-decoration: none;
    font-weight: 800;
}

.auth-link:hover {
    color: var(--color-danger-text);
    text-decoration: underline;
}

/* Browser autofill fix */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--color-text-strong);
    box-shadow: 0 0 0 1000px var(--color-surface) inset;
    transition: background-color 9999s ease-in-out 0s;
}

/* Responsive */
@media (max-width: 960px) {
    body.auth-body {
        padding: 1.25rem;
    }

    .auth-shell {
        max-width: 520px;
        min-height: auto;
        grid-template-columns: 1fr;
        border-radius: 1.25rem;
    }

    .auth-hero {
        display: none;
    }

    .auth-panel {
        padding: 2.25rem 1.5rem;
    }

    .auth-card {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    body.auth-body {
        padding: 0.85rem;
        align-items: flex-start;
    }

    .auth-shell {
        border-radius: 1rem;
    }

    .auth-panel {
        padding: 1.6rem 1rem;
    }

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

    .auth-card-icon {
        width: 3.5rem;
        height: 3.5rem;
        border-radius: 1rem;
        font-size: 1.65rem;
    }

    .auth-card-title {
        font-size: 1.4rem;
    }

    .auth-card-subtitle {
        font-size: 0.86rem;
    }

    .auth-input,
    .auth-button {
        border-radius: 0.85rem;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auth-input,
    .auth-button {
        transition: none;
    }

    .auth-button:hover {
        transform: none;
    }
}
/* ===== PROFESSIONAL AUTH LOGO START ===== */

.auth-logo.app-logo-mark .app-logo-svg,
.auth-card-icon.app-logo-mark .app-logo-svg,
.auth-legacy-logo.app-logo-mark .app-logo-svg {
    filter: drop-shadow(0 18px 32px rgba(15, 23, 42, 0.28));
}

.auth-logo.app-logo-mark,
.auth-logo-mark {
    width: 5.25rem;
    height: 5.25rem;
    border-radius: 1.5rem;
    margin-bottom: 1.5rem;
    backdrop-filter: none;
}

.auth-card-icon.app-logo-mark,
.auth-legacy-logo.app-logo-mark {
    width: 4.8rem;
    height: 4.8rem;
    border-radius: 1.35rem;
    margin: 0 auto 1rem;
}

.auth-legacy-logo.app-logo-mark .app-logo-svg {
    width: 4.8rem;
    height: 4.8rem;
}

/* ===== PROFESSIONAL AUTH LOGO END ===== */
