/* ══════════════════════════════════════════════════════════════════════════
   AJ Driving Lesson Academy — sign-in page (owner's brief + mockup, 2026-11-22)

   Linked by resources/views/auth/login.blade.php ONLY when AJ's Screen design
   is on and the page is opened on AJ's own address
   (DrivingSchoolThemeService::loginTheme). Every rule is scoped to
   .lp-root[data-login-theme="aj"], which only that page carries, and the
   specificity (0,3,0) beats the page's own .lp-* rules. Nothing about signing
   in changes: same form, fields, ids, scripts, rate limits and redirects.

   Split screen: brand panel left (58%), soft grey-blue right with a white
   20px card. Tokens: primary #1979B9, dark #123B60, red #F21F32, background
   #F5F8FC, text #1E293B / #64748B, border #E2E8F0. Inter. 48px fields and
   button, 10px field radius, 40px card padding.
   ══════════════════════════════════════════════════════════════════════════ */

.lp-root[data-login-theme="aj"] {
    --lp-primary: #1979B9;
    --lp-primary-hover: #14649A;
    --lp-tint: #F5F8FC;
    --lp-ink: #1E293B;
    --lp-ink-strong: #1E293B;
    --lp-label: #1E293B;
    --lp-muted: #64748B;
    --lp-placeholder: #94A3B8;
    --lp-line: #E2E8F0;
    --lp-field-border: #CBD5E1;
    --lp-ring: 0 0 0 4px rgba(25, 121, 185, .16);
    --aj-navy: #123B60;
    --aj-red: #F21F32;
    padding: 0;
    font-size: 14px;
    background: #F5F8FC;
}

/* ── Stage: brand panel + right side ── */
.lp-root[data-login-theme="aj"] .lp-card {
    flex: 1 1 auto;
    width: 100%;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 24px 0;
    display: flex;
    align-items: stretch;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
    background:
        radial-gradient(900px 520px at 100% 0%, #EAF2FB 0%, rgba(234, 242, 251, 0) 65%),
        #F5F8FC;
}

/* ── Left: brand panel ── */
.lp-root[data-login-theme="aj"] .lp-brand-col {
    order: -1;
    flex: 0 0 58%;
    position: relative;
    overflow: hidden;
    margin: -24px 0;               /* full height: the stage's padding is for the card only */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    padding: clamp(40px, 8vh, 84px) clamp(32px, 5vw, 80px) 230px;
    color: #fff;
    text-align: center;
    background: linear-gradient(155deg, #2A93D8 0%, #1979B9 36%, #145E95 68%, #123B60 100%);
}
/* Without a picture the brand sits in the middle of the panel; with one, at the top so the photo shows below it */
.lp-root[data-login-theme="aj"] .lp-brand-col { justify-content: center; }
.lp-root[data-login-theme="aj"] .lp-brand-col:has(.lpx-photo.has-photo) { justify-content: flex-start; }
.lp-root[data-login-theme="aj"] .lpx-photo {
    position: absolute; inset: 0; z-index: 0;
    background-size: cover; background-position: center;
}
.lp-root[data-login-theme="aj"] .lpx-shade {
    position: absolute; inset: 0; z-index: 1;
    background:
        radial-gradient(640px 420px at 88% 12%, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 62%),
        radial-gradient(560px 560px at 6% 96%, rgba(13, 45, 74, .55), rgba(13, 45, 74, 0) 70%);
}
/* With AJ's own picture: a blue wash so the white text always reads */
.lp-root[data-login-theme="aj"] .lpx-photo.has-photo + .lpx-shade {
    background: linear-gradient(180deg, rgba(18, 59, 96, .82) 0%, rgba(25, 121, 185, .38) 46%, rgba(18, 59, 96, .74) 100%);
}

.lp-root[data-login-theme="aj"] .lpx-brand { position: relative; z-index: 2; max-width: 100%; }
.lp-root[data-login-theme="aj"] .lpx-brand-top {
    display: inline-flex; align-items: center; gap: clamp(18px, 2vw, 30px);
    text-align: left;
}
.lp-root[data-login-theme="aj"] .lpx-crest {
    flex: none;
    width: clamp(104px, 10vw, 156px); aspect-ratio: 1;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #fff;
    box-shadow: 0 12px 32px rgba(9, 27, 48, .35);
}
.lp-root[data-login-theme="aj"] .lpx-crest img { width: 88%; height: 88%; object-fit: contain; border-radius: 50%; display: block; }
.lp-root[data-login-theme="aj"] .lpx-divider { flex: none; width: 2px; align-self: stretch; margin: 8px 0; background: rgba(255, 255, 255, .55); border-radius: 2px; }
.lp-root[data-login-theme="aj"] .lpx-brand-name {
    max-width: 8.6em;
    font-size: clamp(26px, 2.9vw, 46px); line-height: 1.08; font-weight: 700;
    letter-spacing: .005em; text-transform: uppercase; color: #fff;
    text-shadow: 0 2px 14px rgba(9, 27, 48, .25);
}
.lp-root[data-login-theme="aj"] .lpx-tagline {
    margin: clamp(22px, 4.5vh, 44px) 0 0;
    font-size: clamp(20px, 2.2vw, 34px); line-height: 1.2; font-weight: 600; font-style: italic;
    letter-spacing: .01em; color: #fff;
    text-shadow: 0 2px 12px rgba(9, 27, 48, .22);
}
.lp-root[data-login-theme="aj"] .lpx-swoosh { display: block; width: clamp(200px, 22vw, 320px); height: 18px; margin: 10px auto 0; }

/* Highlights along the bottom, above the waves */
.lp-root[data-login-theme="aj"] .lpx-highlights {
    position: absolute; left: 0; right: 0; bottom: 118px; z-index: 2;
    display: flex; justify-content: center;
    margin: 0; padding: 0 clamp(24px, 4vw, 72px);
    list-style: none;
}
.lp-root[data-login-theme="aj"] .lpx-highlights li {
    flex: 1 1 0; max-width: 220px;
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 2px 16px;
    font-size: 14.5px; line-height: 1.3; font-weight: 600; color: #fff; text-align: center;
}
.lp-root[data-login-theme="aj"] .lpx-highlights li + li { border-left: 1px solid rgba(255, 255, 255, .35); }
.lp-root[data-login-theme="aj"] .lpx-highlights svg {
    width: 36px; height: 36px; fill: none; stroke: #fff; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.lp-root[data-login-theme="aj"] .lpx-waves { position: absolute; left: 0; bottom: 0; z-index: 1; width: 100%; height: 104px; display: block; }
.lp-root[data-login-theme="aj"] .lpx-edge { position: absolute; top: 0; right: -1px; z-index: 3; width: clamp(56px, 6.5vw, 112px); height: 100%; display: block; }

/* ── Right: the card ── */
.lp-root[data-login-theme="aj"] .lp-form-col {
    flex: 0 0 auto;
    align-self: center;
    width: min(468px, calc(100% - 48px));
    margin: auto;
    padding: 40px;
    background: #fff;
    border: 1px solid #E8EEF5;
    border-radius: 20px;
    box-shadow: 0 24px 56px rgba(18, 59, 96, .10), 0 2px 8px rgba(18, 59, 96, .05);
}

.lp-root[data-login-theme="aj"] .lpx-head { margin-bottom: 26px; text-align: center; }
.lp-root[data-login-theme="aj"] .lpx-head-logo {
    display: block; width: 104px; height: 104px; margin: 0 auto 14px;
    border-radius: 50%; object-fit: contain;
}
.lp-root[data-login-theme="aj"] .lpx-head-name {
    max-width: 15em; margin: 0 auto;
    font-size: 22px; line-height: 1.2; font-weight: 700; letter-spacing: .01em;
    text-transform: uppercase; color: var(--aj-navy);
}
.lp-root[data-login-theme="aj"] .lpx-head-sub { margin-top: 6px; font-size: 15px; color: #475569; }
.lp-root[data-login-theme="aj"] .lpx-head-rule { display: block; width: 72px; height: 3px; margin: 14px auto 0; border-radius: 3px; background: var(--aj-red); }

.lp-root[data-login-theme="aj"] .lp-title {
    margin: 0 0 4px; text-align: left;
    font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.01em; color: #1E293B;
}
.lp-root[data-login-theme="aj"] .lpx-lead { margin: 0 0 22px; font-size: 15px; color: #64748B; }

/* Labels stay for screen readers; the placeholder and icon carry them on screen */
.lp-root[data-login-theme="aj"] .lp-form-col .lp-label {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.lp-root[data-login-theme="aj"] .lp-field { margin-bottom: 16px; }
.lp-root[data-login-theme="aj"] .lp-input {
    height: 48px; min-height: 48px;
    padding: 0 16px 0 46px;
    font-size: 15px; color: #1E293B;
    background-color: #fff;
    background-repeat: no-repeat; background-position: 15px 50%; background-size: 20px 20px;
    border: 1px solid #D5DDE7; border-radius: 10px;
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
.lp-root[data-login-theme="aj"] .lp-input::placeholder { color: #94A3B8; }
.lp-root[data-login-theme="aj"] .lp-input:hover { border-color: #B8C4D3; }
.lp-root[data-login-theme="aj"] .lp-input:focus { border-color: #1979B9; box-shadow: var(--lp-ring); outline: none; }
.lp-root[data-login-theme="aj"] .lp-input.is-invalid { border-color: #DC2626; }
.lp-root[data-login-theme="aj"] .lp-input-eye { padding-right: 50px; }
/* Lucide user / lock, grey at rest and AJ blue while typing */
.lp-root[data-login-theme="aj"] #email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.lp-root[data-login-theme="aj"] #email:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231979B9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E");
}
.lp-root[data-login-theme="aj"] #password {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394A3B8' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}
.lp-root[data-login-theme="aj"] #password:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231979B9' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='18' height='11' x='3' y='11' rx='2' ry='2'/%3E%3Cpath d='M7 11V7a5 5 0 0 1 10 0v4'/%3E%3C/svg%3E");
}
.lp-root[data-login-theme="aj"] .lp-eye-btn {
    width: 40px; height: 40px; right: 4px;
    display: inline-flex; align-items: center; justify-content: center;
    color: #64748B; border-radius: 8px; font-size: 16px;
}
.lp-root[data-login-theme="aj"] .lp-eye-btn:hover { color: #123B60; background: #F1F5F9; }
.lp-root[data-login-theme="aj"] .lp-field-error { margin-top: 6px; font-size: 13px; color: #B91C1C; }
.lp-root[data-login-theme="aj"] .lp-capslock { margin-top: 6px; font-size: 13px; }

.lp-root[data-login-theme="aj"] .lp-row { margin: 4px 0 22px; font-size: 14.5px; }
.lp-root[data-login-theme="aj"] .lp-remember { color: #1E293B; font-weight: 500; }
.lp-root[data-login-theme="aj"] .lp-remember input { width: 18px; height: 18px; accent-color: #1979B9; }
.lp-root[data-login-theme="aj"] .lp-link { color: #1979B9; font-weight: 600; }
.lp-root[data-login-theme="aj"] .lp-link:hover { color: #14649A; }

.lp-root[data-login-theme="aj"] .lp-btn {
    height: 48px; min-height: 48px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 10px; font-size: 16px; font-weight: 600;
    background: #1979B9; border-color: #1979B9; color: #fff;
    box-shadow: 0 6px 16px rgba(25, 121, 185, .26);
}
.lp-root[data-login-theme="aj"] .lp-btn:hover { background: #14649A; border-color: #14649A; }
.lp-root[data-login-theme="aj"] .lp-btn:focus-visible { outline: 2px solid #123B60; outline-offset: 2px; }
.lp-root[data-login-theme="aj"] .lp-btn:disabled { opacity: .75; box-shadow: none; }
/* Lucide log-in before the label */
.lp-root[data-login-theme="aj"] .lp-btn-text { display: inline-flex; align-items: center; gap: 10px; }
.lp-root[data-login-theme="aj"] .lp-btn-text::before {
    content: ''; width: 20px; height: 20px; flex: none; background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' x2='3' y1='12' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
            mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4'/%3E%3Cpolyline points='10 17 15 12 10 7'/%3E%3Cline x1='15' x2='3' y1='12' y2='12'/%3E%3C/svg%3E") center / contain no-repeat;
}

.lp-root[data-login-theme="aj"] .lp-alert { border-radius: 10px; font-size: 13.5px; }

/* "Back to Portal" leads to the group's portal, which is not on AJ's address */
.lp-root[data-login-theme="aj"] .lp-links { justify-content: center; margin-top: 18px; }
.lp-root[data-login-theme="aj"] .lp-links > a.lp-quiet-link { display: none; }
.lp-root[data-login-theme="aj"] .lp-foot {
    justify-content: center; gap: 10px; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid #EEF2F6;
    font-size: 12.5px; color: #94A3B8; text-align: center;
}

/* ── Forgot-password window (outside .lp-root, so matched through it) ── */
body:has(.lp-root[data-login-theme="aj"]) .lp-modal {
    --lp-primary: #1979B9;
    --lp-primary-hover: #14649A;
    --lp-ring: 0 0 0 4px rgba(25, 121, 185, .16);
}
body:has(.lp-root[data-login-theme="aj"]) .lp-modal .modal-content { border-radius: 16px; border: 0; overflow: hidden; }
body:has(.lp-root[data-login-theme="aj"]) .lp-modal .lp-input { height: 48px; border-radius: 10px; font-size: 15px; }
body:has(.lp-root[data-login-theme="aj"]) .lp-modal .lp-btn,
body:has(.lp-root[data-login-theme="aj"]) .lp-modal .lp-btn-outline { min-height: 44px; border-radius: 10px; }

/* ── Tablet: a narrower brand panel ── */
@media (max-width: 1180px) {
    .lp-root[data-login-theme="aj"] .lp-brand-col { flex-basis: 50%; padding-bottom: 210px; }
    .lp-root[data-login-theme="aj"] .lpx-highlights li { font-size: 13px; padding: 2px 10px; }
    .lp-root[data-login-theme="aj"] .lpx-highlights svg { width: 30px; height: 30px; }
}
/* Short screens: a smaller crest on the card */
@media (max-height: 780px) {
    .lp-root[data-login-theme="aj"] .lpx-head { margin-bottom: 18px; }
    .lp-root[data-login-theme="aj"] .lpx-head-logo { width: 80px; height: 80px; margin-bottom: 10px; }
    .lp-root[data-login-theme="aj"] .lp-form-col { padding: 32px 40px; }
}
/* ── Phone and small tablet: the card alone, crest and name on top ── */
@media (max-width: 900px) {
    .lp-root[data-login-theme="aj"] .lp-brand-col { display: none; }
    .lp-root[data-login-theme="aj"] .lp-card { padding: 24px 0; }
}
@media (max-width: 480px) {
    .lp-root[data-login-theme="aj"] .lp-form-col { width: calc(100% - 24px); padding: 28px 20px; border-radius: 16px; }
    .lp-root[data-login-theme="aj"] .lpx-head-logo { width: 84px; height: 84px; }
    .lp-root[data-login-theme="aj"] .lpx-head-name { font-size: 18px; }
    .lp-root[data-login-theme="aj"] .lp-title { font-size: 24px; }
    .lp-root[data-login-theme="aj"] .lp-row { flex-wrap: wrap; gap: 8px; }
}
