/* Login Redesign — single light theme, identical look for Staff + Customer login.
   Tokens from documents/architecture/tech-stack.md.
   Scoped to body.login_admin (staff) and body.customers (customer login only —
   the customer hook only injects this file on the login route). */

:root {
    --lr-bg-1: #f4f9f7;
    --lr-bg-2: #e4f0ea;
    --lr-glass-fill: rgba(255, 255, 255, 0.78);
    --lr-glass-border: rgba(28, 139, 107, 0.20);
    --lr-field-bg: #ffffff;
    --lr-field-border: rgba(28, 139, 107, 0.28);
    --lr-text: #0f2e22;
    --lr-text-muted: #4a6b60;
    --lr-heading-a: #12864b;
    --lr-heading-b: #1c8b6b;
    --lr-link: #2b7be7;
    --lr-btn-text: #ffffff;
    --lr-card-shadow: 0 24px 60px rgba(28, 139, 107, 0.16);
    --lr-particle-a: #19ba6b;
    --lr-particle-b: #1c8b6b;
    --lr-particle-line: 28, 139, 107;
}

/* ---------- Page background ---------- */
body.login_admin,
body.customers {
    background-color: var(--lr-bg-1) !important;
    background-image: linear-gradient(160deg, var(--lr-bg-1), var(--lr-bg-2)) !important;
    background-attachment: fixed !important;
    background-repeat: no-repeat !important;
    color: var(--lr-text);
    min-height: 100vh;
}

#lr-particle-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ---------- Hide the customer client-theme chrome on the login page ---------- */
/* Removes the tiny top-left logo + redundant "Login" nav button, and the footer,
   so the customer login matches the clean, chrome-free admin login layout.
   Only injected on the login route, so logged-in client pages are unaffected. */
body.customers .navbar-default,
body.customers .footer {
    display: none !important;
}

/* ---------- Centered logo (matches admin) ---------- */
body.login_admin .company-logo,
body.customers .lr-logo {
    text-align: center;
    padding: 10px;
    position: relative;
    z-index: 2;
}

body.login_admin .company-logo img,
body.customers .lr-logo img {
    display: block;
    margin: 0 auto;
    max-height: 140px;
    width: auto;
}

/* Customer content sits under a now-hidden navbar; add top breathing room to match admin */
body.customers #wrapper {
    padding-top: 40px;
}

/* ---------- Card wrapper (perspective for tilt) ---------- */
body.login_admin .authentication-form-wrapper,
body.customers .mtop40 {
    position: relative;
    z-index: 2;
    perspective: 1200px;
}

/* ---------- Glass card ---------- */
body.login_admin .tw-bg-white,
body.customers .panel_s {
    background: var(--lr-glass-fill) !important;
    border: 1px solid var(--lr-glass-border) !important;
    box-shadow: var(--lr-card-shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    transform: rotateX(var(--lr-tilt-x, 0deg)) rotateY(var(--lr-tilt-y, 0deg));
    transition: transform 250ms ease-out;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    body.login_admin .tw-bg-white,
    body.customers .panel_s {
        background: rgba(255, 255, 255, 0.97) !important;
    }
}

/* ---------- Heading (signature gradient text) ---------- */
body.login_admin h1,
body.customers h1.login-heading {
    background: linear-gradient(100deg, var(--lr-heading-a), var(--lr-heading-b));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    letter-spacing: -0.01em;
    font-size: clamp(1.25rem, 1.05rem + 0.7vw, 1.6rem);
}

body.login_admin .tw-text-neutral-600 {
    color: var(--lr-text-muted) !important;
}

/* ---------- Form fields ---------- */
body.login_admin .control-label,
body.customers .control-label,
body.login_admin .checkbox label,
body.customers .checkbox label,
body.customers .panel-body label {
    color: var(--lr-text) !important;
    font-weight: 600;
}

body.login_admin .form-control,
body.customers .form-control {
    background: var(--lr-field-bg) !important;
    border: 1px solid var(--lr-field-border) !important;
    color: var(--lr-text) !important;
}

body.login_admin .form-control::placeholder,
body.customers .form-control::placeholder {
    color: var(--lr-text-muted);
}

body.login_admin .form-control:focus,
body.customers .form-control:focus {
    border-color: var(--lr-heading-b) !important;
    box-shadow: 0 0 0 3px rgba(28, 139, 107, 0.20) !important;
    outline: none;
}

/* Language dropdown (bootstrap-select) on the customer login */
body.customers .bootstrap-select .btn.dropdown-toggle {
    background: var(--lr-field-bg) !important;
    border: 1px solid var(--lr-field-border) !important;
    color: var(--lr-text) !important;
}
body.customers .bootstrap-select .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid var(--lr-field-border) !important;
}
body.customers .bootstrap-select .dropdown-menu li a {
    color: var(--lr-text) !important;
}
body.customers .bootstrap-select .dropdown-menu li a:hover {
    background: rgba(28, 139, 107, 0.10) !important;
}

/* ---------- Buttons + links ---------- */
body.login_admin .btn-primary,
body.customers .btn-primary {
    background: linear-gradient(120deg, var(--lr-heading-a), var(--lr-heading-b)) !important;
    border: none !important;
    color: var(--lr-btn-text) !important;
    font-weight: 700;
    min-height: 44px;
    transition: transform 200ms ease, box-shadow 200ms ease;
}

body.login_admin .btn-primary:hover,
body.customers .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(28, 139, 107, 0.35);
}

body.login_admin .btn-default,
body.customers .btn-default {
    background: transparent !important;
    border: 1px solid var(--lr-field-border) !important;
    color: var(--lr-text) !important;
    min-height: 44px;
}

body.login_admin a,
body.customers a.text-muted,
body.customers .tw-text-center a {
    color: var(--lr-link);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    body.login_admin .tw-bg-white,
    body.customers .panel_s {
        transition: none;
    }
}
