/* Anir Delivery — authentication pages (resources/views/auth/login.blade.php).
   Loads after Bootstrap. Every rule is scoped to `.auth-body` so the page owns
   its own classes; anir.css keeps legacy same-named `.auth-*` rules for the
   console/auth shell elsewhere, and scoping keeps the two from fighting if the
   two sheets are ever loaded together. Tokens mirror public/assets/css/anir.css. */

:root {
    --auth-brand: #d7263d;
    --auth-brand-strong: #b01b31;
    --auth-brand-soft: #f2707f;
    --auth-gold: #f6cc7b;

    --auth-bg: #050506;
    --auth-surface: #121215;
    --auth-card: rgba(18, 18, 21, 0.85);
    --auth-text: #f6f7fb;
    --auth-muted: #9e9ea7;
    --auth-line: rgba(255, 255, 255, 0.1);
    --auth-field: rgba(255, 255, 255, 0.04);
    --auth-focus-ring: #f2707f;
    --auth-focus-halo: rgba(0, 0, 0, 0.95);
}

[data-bs-theme="light"] {
    --auth-bg: #f4f5f7;
    --auth-surface: #ffffff;
    --auth-card: rgba(255, 255, 255, 0.94);
    --auth-text: #17181c;
    --auth-muted: #55607a;
    --auth-line: rgba(10, 10, 14, 0.1);
    --auth-field: rgba(10, 10, 14, 0.03);
    --auth-focus-ring: #b01b31;
    --auth-focus-halo: rgba(255, 255, 255, 0.95);
}

.auth-body {
    background-color: var(--auth-bg);
    color: var(--auth-text);
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background-image:
        radial-gradient(60rem 40rem at 8% -8%, rgba(215, 38, 61, 0.16), transparent 60%),
        radial-gradient(48rem 34rem at 102% 4%, rgba(246, 204, 123, 0.1), transparent 62%);
    background-attachment: fixed;
}

[dir="rtl"] .auth-body {
    background-image:
        radial-gradient(60rem 40rem at 92% -8%, rgba(215, 38, 61, 0.16), transparent 60%),
        radial-gradient(48rem 34rem at -2% 4%, rgba(246, 204, 123, 0.1), transparent 62%);
}

/* ---------- Header ---------- */
.auth-body .auth-logo {
    width: 2.375rem;
    height: 2.375rem;
    place-items: center;
    color: #fff;
    font-size: 1.05rem;
    background: linear-gradient(135deg, var(--auth-brand-soft), var(--auth-brand-strong));
    box-shadow: 0 6px 16px rgba(215, 38, 61, 0.35);
}

.auth-body .auth-logo-wordmark {
    color: var(--auth-text);
    letter-spacing: -0.02em;
    font-size: 1.25rem;
    line-height: 1;
}

.auth-body .auth-logo-tag {
    color: var(--auth-muted);
    font-size: 0.8125rem;
    letter-spacing: 0.02em;
}

/* Language switcher: translate icon + short codes, native name exposed to assistive tech. */
.auth-body .auth-lang-icon {
    color: var(--auth-muted);
    font-size: 1rem;
    line-height: 1;
}

.auth-body .auth-lang-btn {
    min-width: 2rem;
    padding: 0.25rem 0.45rem;
    line-height: 1;
}

.auth-body .auth-lang-code {
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
}

/* ---------- Shell + hero panel ---------- */
.auth-body .auth-shell {
    overflow: hidden;
    border: 1px solid var(--auth-line);
    border-radius: 1.5rem;
    background-color: var(--auth-card);
    box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.65);
}

.auth-body .auth-hero {
    position: relative;
    background:
        radial-gradient(34rem 24rem at 88% 0%, rgba(246, 204, 123, 0.18), transparent 60%),
        linear-gradient(160deg, #2a0b12 0%, #12060a 55%, #050506 100%);
    border-inline-end: 1px solid var(--auth-line);
}

.auth-body .auth-kicker {
    color: var(--auth-gold);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

.auth-body .auth-hero-em {
    background: linear-gradient(90deg, var(--auth-brand-soft), var(--auth-gold));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.auth-body .auth-hero-lead {
    color: rgba(255, 255, 255, 0.82);
    max-width: 34ch;
}

/* Route card inside the hero */
.auth-body .auth-route {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1rem;
    padding: 1rem 1.125rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(6px);
}

.auth-body .auth-route-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.6875rem;
    letter-spacing: 0.14em;
}

.auth-body .auth-route-labels {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8125rem;
}

.auth-body .auth-pin {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    display: inline-block;
    background: linear-gradient(135deg, var(--auth-brand-soft), var(--auth-brand));
    box-shadow: 0 0 0 4px rgba(215, 38, 61, 0.18);
}

.auth-body .auth-pin-accent {
    background: linear-gradient(135deg, var(--auth-gold), #ff8a4c);
    box-shadow: 0 0 0 4px rgba(246, 204, 123, 0.2);
}

.auth-body .auth-trust {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.8125rem;
}

.auth-body .auth-trust i {
    color: var(--auth-brand-soft);
}

/* ---------- Sign-in panel ---------- */
.auth-body .auth-panel {
    background-color: var(--auth-card);
    backdrop-filter: blur(8px);
}

.auth-body .auth-panel-kicker {
    color: var(--auth-gold);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
}

/* Role tabs — segmented control */
.auth-body .auth-role-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.25rem;
    border: 1px solid var(--auth-line);
    border-radius: 9999px;
    background-color: var(--auth-field);
}

.auth-body .auth-role-tab {
    border: 0;
    border-radius: 9999px;
    padding: 0.4rem 0.95rem;
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--auth-muted);
    background-color: transparent;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-body .auth-role-tab:hover {
    color: var(--auth-text);
    background-color: rgba(215, 38, 61, 0.1);
}

.auth-body .auth-role-tab.active,
.auth-body .auth-role-tab[aria-selected="true"] {
    color: #fff;
    background-color: var(--auth-brand);
}

/* Form controls pick up the brand focus and surface */
.auth-body .auth-login-form .form-control {
    background-color: var(--auth-field);
    border-color: var(--auth-line);
    color: var(--auth-text);
}

.auth-body .auth-login-form .form-control::placeholder {
    color: var(--auth-muted);
    opacity: 0.85;
}

.auth-body .auth-login-form .input-group-text {
    background-color: var(--auth-field);
    border-color: var(--auth-line);
    color: var(--auth-muted);
}

.auth-body .auth-login-form .btn-danger {
    background-color: var(--auth-brand);
    border-color: var(--auth-brand);
}

.auth-body .auth-login-form .btn-danger:hover,
.auth-body .auth-login-form .btn-danger:focus {
    background-color: var(--auth-brand-strong);
    border-color: var(--auth-brand-strong);
}

/* ---------- Demo access ---------- */
.auth-body .auth-demo {
    border-top: 1px solid var(--auth-line);
    padding-top: 1.5rem;
}

.auth-body .auth-demo-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: var(--auth-brand);
    box-shadow: 0 0 0 0 rgba(215, 38, 61, 0.7);
    animation: auth-pulse 2s infinite;
}

@keyframes auth-pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(215, 38, 61, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(215, 38, 61, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(215, 38, 61, 0); }
}

/* ---------- Focus visibility (WCAG 2.4.7 / 2.4.11) ---------- */
.auth-body :is(a, button, input, select, textarea, [tabindex], [role="button"], .btn):focus-visible {
    outline: 3px solid var(--auth-focus-ring) !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px var(--auth-focus-halo) !important;
}

/* ---------- Reduced motion (WCAG 2.3.3) ---------- */
@media (prefers-reduced-motion: reduce) {
    .auth-body *,
    .auth-body *::before,
    .auth-body *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .auth-body .auth-demo-dot {
        animation: none !important;
    }
}

@media (max-width: 991.98px) {
    .auth-body .auth-shell {
        border-radius: 1.25rem;
    }
}
