/* Styles for resources/views/auth/login.blade.php (moved out of the Blade file) */

:root {
    --navy: #1f3a5f;
    --navy-deep: #16283f;
    --gold: #C9A84C;
    --gold-dark: #b8953d;
    --ink: #111827;
    --muted: #6b7280;
    --line: #d1d5db;
    --danger: #b91c1c;
    --radius: 10px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

.page {
    display: grid;
    grid-template-columns: 55fr 45fr;
    min-height: 100vh;
    min-height: 100dvh;
}

/* ── left: photo ── */

.visual {
    position: relative;
    overflow: hidden;
    background: var(--navy-deep);
    color: #fff;
}

.visual img.photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 68% 70%;      /* keep the site team in frame */
}

.visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(22, 40, 63, .55) 0%, rgba(22, 40, 63, .05) 35%, rgba(22, 40, 63, .15) 55%, rgba(15, 29, 48, .92) 100%);
}

.visual-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 36px 44px 44px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand img { width: 46px; height: 46px; }

.brand-name {
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--gold);
    line-height: 1.1;
}

.brand-name small {
    display: block;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .3px;
    color: rgba(255, 255, 255, .8);
    margin-top: 3px;
}

.visual h2 {
    margin: 0 0 10px;
    font-size: clamp(24px, 2.6vw, 36px);
    line-height: 1.15;
    font-weight: 800;
    max-width: 560px;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}

.visual p {
    margin: 0 0 22px;
    font-size: 15.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .85);
    max-width: 520px;
}

.features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.features li {
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* ── right: sign-in ── */

.panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px clamp(24px, 6vw, 88px);
    background: #fff;
}

.form-wrap {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.mobile-brand { display: none; }

h1 {
    margin: 0 0 6px;
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.3px;
}

.lead {
    margin: 0 0 28px;
    color: var(--muted);
    font-size: 15px;
}

.alert {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.45;
    margin-bottom: 20px;
}

.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: var(--danger); }

.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

.alert svg { flex-shrink: 0; margin-top: 1px; }

.field { margin-bottom: 18px; }

.field-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 7px;
}

label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 16px;               /* 16px stops iOS zooming into the field */
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    transition: border-color .15s, box-shadow .15s;
}

.input::placeholder { color: #9ca3af; }

.input:hover { border-color: #9ca3af; }

.input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(31, 58, 95, .14);
}

.input[aria-invalid="true"] { border-color: var(--danger); }

.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, .12); }

.password-box { position: relative; }

.password-box .input { padding-right: 52px; }

.reveal {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.reveal:hover { background: #f3f4f6; color: var(--ink); }

.reveal:focus-visible { outline: 3px solid rgba(31, 58, 95, .35); outline-offset: 1px; }

.hint {
    margin-top: 7px;
    font-size: 13px;
    color: #92400e;
    display: none;
    align-items: center;
    gap: 6px;
}

.hint.show { display: flex; }

.link-btn {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: rgba(31, 58, 95, .35);
}

.link-btn:hover { text-decoration-color: var(--navy); }

.forgot-note {
    display: none;
    margin: -6px 0 18px;
    padding: 10px 12px;
    border-radius: var(--radius);
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    font-size: 13.5px;
    color: #374151;
    line-height: 1.45;
}

.forgot-note.show { display: block; }

.submit {
    width: 100%;
    height: 50px;
    margin-top: 6px;
    border: none;
    border-radius: var(--radius);
    background: var(--navy);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: background .15s, transform .05s;
}

.submit:hover { background: var(--navy-deep); }

.submit:active { transform: translateY(1px); }

.submit:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.submit[disabled] { opacity: .8; cursor: progress; }

.spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    display: none;
    animation: spin .8s linear infinite;
}

.submit.loading .spinner { display: inline-block; }

@keyframes spin { to { transform: rotate(360deg); } }

.secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 12.5px;
    color: var(--muted);
}

.foot {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid #f1f3f6;
    font-size: 12px;
    color: #9ca3af;
    text-align: center;
}

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ── tablets and phones: photo becomes a banner above the form ── */

@media (max-width: 900px) {
    .page { grid-template-columns: 1fr; }
    .visual { min-height: 210px; }
    .visual-inner { padding: 22px 24px; justify-content: flex-end; }
    .visual .brand { position: absolute; top: 20px; left: 24px; }
    .visual h2 { font-size: 22px; margin-bottom: 0; }
    .visual p, .features { display: none; }
    .panel { justify-content: flex-start; padding: 32px 24px 28px; }
    h1 { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
