/*
 * Login page (resources/views/auth/login.blade.php).
 * Standalone: no Bootstrap. Dark mode = class "dark" on <html> (set by public/js/login.js).
 * The login route uses a strict CSP, so all styling lives here (no inline style="" / <style>).
 */

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body.login-body {
    font-family: system-ui, sans-serif;
    color: #172c48;
    background: #f4f6fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
html.dark body.login-body { background: #0d1420; color: #e7edf6; }

h1, h2, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }

/* ---------- Layout ---------- */
.login {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
}
@media (min-width: 850px) {
    .login { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
}

/* ---------- Left: brand panel (always black) ---------- */
.brand {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 32px 24px;
    overflow: hidden;
    text-align: center;
    background: #000;
    color: #fff;
}
@media (min-width: 850px) {
    .brand {
        min-height: 100vh;
        gap: 36px;
        padding: clamp(36px, 6vw, 90px);
    }
}

.brand__inner {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 520px;
    /* auto margins centre the block and, unlike justify-content:center,
       never push it above the top edge when the screen is too short */
    margin: auto 0;
}
@media (min-width: 850px) {
    .brand__inner { margin-bottom: 0; }
    .brand__footer { margin-bottom: auto; }
}

.brand__logo {
    display: block;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    object-fit: contain;
}
@media (min-width: 850px) {
    .brand__logo { width: 160px; height: 160px; }
}

.brand__tagline {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}
@media (min-width: 850px) {
    .brand__tagline { font-size: 20px; }
}

.brand__title {
    max-width: 520px;
    margin: 20px auto 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-wrap: balance;
}
@media (min-width: 850px) {
    .brand__title {
        margin-top: 36px;
        font-size: clamp(34px, 3.4vw, 53px);
    }
}

.brand__text {
    max-width: 460px;
    margin: 16px auto 0;
    font-size: 17px;
    line-height: 1.5;
    color: #d6deeb;
}
@media (min-width: 850px) {
    .brand__text { margin-top: 20px; }
}

.brand__pills {
    display: none;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}
@media (min-width: 850px) {
    .brand__pills { display: flex; }
}
.brand__pill {
    padding: 6px 14px;
    border: 1px solid #53627a;
    border-radius: 9999px;
    font-size: 14px;
    line-height: 20px;
}

.brand__footer {
    position: relative;
    z-index: 10;
    display: none;
    font-size: 13px;
    line-height: 1.625;
    color: #aebbd0;
}
@media (min-width: 850px) {
    .brand__footer { display: block; }
}

.brand__ring {
    position: absolute;
    right: -170px;
    bottom: -180px;
    width: 460px;
    height: 460px;
    border: 75px solid rgba(255, 255, 255, 0.03);
    border-radius: 50%;
    pointer-events: none;
}

/* ---------- Right: form panel ---------- */
.panel {
    position: relative;
    display: flex;
    padding: 56px 24px;
    background: #f4f6fa;
}
html.dark .panel { background: #0d1420; }
@media (min-width: 850px) {
    .panel { padding-left: 32px; padding-right: 32px; }
}

.panel__corner {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}
@media (min-width: 640px) {
    .panel__corner { top: 24px; right: 24px; }
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #33425b;
    cursor: pointer;
    transition: background-color .15s ease;
}
.theme-toggle:hover { background: #f1f5f9; }
.theme-toggle:focus-visible { outline: none; box-shadow: 0 0 0 2px #e88423; }
html.dark .theme-toggle { color: #e7edf6; }
html.dark .theme-toggle:hover { background: #1f2b3d; }
.theme-toggle__sun { display: none; }
html.dark .theme-toggle__sun { display: block; }
html.dark .theme-toggle__moon { display: none; }

.panel__content {
    width: 100%;
    max-width: 440px;
    margin: auto; /* centred, but stays scrollable when taller than the screen */
}

/* ---------- Header text ---------- */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 16px;
    background: #fff0dc;
    color: #815114;
    font-size: 13px;
    line-height: 20px;
}
html.dark .badge { background: #49311d; color: #ffd19d; }

.heading {
    margin: 20px 0 8px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.8px;
    color: #172c48;
}
html.dark .heading { color: #e7edf6; }

.subtext {
    font-size: 16px;
    line-height: 1.7;
    color: #586b83;
}
html.dark .subtext { color: #a9b7cc; }

/* ---------- Google button ---------- */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    width: 100%;
    min-height: 52px;
    margin: 24px 0 12px;
    border: 1px solid #bcc8d7;
    border-radius: 8px;
    background: #fff;
    color: #24354e;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s ease;
}
.google-btn:hover { background: #f8fafc; }
.google-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #e88423; }
html.dark .google-btn { border-color: #344156; background: #192332; color: #e7edf6; }
html.dark .google-btn:hover { background: #1f2b3d; }

.google-btn__g {
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #4285f4;
}

.note {
    font-size: 14px;
    line-height: 1.625;
    color: #61738a;
}
html.dark .note { color: #a9b7cc; }

/* ---------- Divider ---------- */
.divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
    font-size: 13px;
    color: #61738a;
}
.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dbe2ec;
}
html.dark .divider { color: #a9b7cc; }
html.dark .divider::before,
html.dark .divider::after { background: #344156; }

/* ---------- Form card ---------- */
.card {
    padding: 20px;
    border: 1px solid #dbe2ec;
    border-radius: 10px;
    background: #fff;
}
html.dark .card { border-color: #344156; background: #192332; }
.card > .field ~ * { margin-top: 16px; }
.card--spaced { margin-top: 16px; }
.card[hidden] { display: none; }
.card__intro {
    margin: 0 0 16px;
    font-size: 14px;
    color: #4a5e78;
}
html.dark .card__intro { color: #b6c2d3; }

.field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #33425b;
}
html.dark .field__label { color: #e7edf6; }

.input {
    display: block;
    width: 100%;
    padding: 12px 10px;
    border: 1px solid #dce2eb;
    border-radius: 7px;
    background: #fff;
    color: #33425b;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.input::placeholder { color: #94a3b8; opacity: 1; }
.input:focus {
    outline: none;
    border-color: #e88423;
    box-shadow: 0 0 0 2px rgba(232, 132, 35, 0.3);
}
html.dark .input { border-color: #344156; background: #192332; color: #e7edf6; }
html.dark .input::placeholder { color: #92a2b8; }
html.dark .input:focus { border-color: #e88423; }

.input--error,
html.dark .input--error { border-color: #dc2626; }
.input--error:focus { box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.25); }

.field__error {
    margin-top: 6px;
    font-size: 13px;
    color: #dc2626;
}
html.dark .field__error { color: #f87171; }
.field__hint {
    margin-top: 6px;
    font-size: 13px;
    color: #64748b;
}
html.dark .field__hint { color: #94a3b8; }

.field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
}
.check span,
.field-row .link { white-space: nowrap; }

.check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #4a5e78;
    cursor: pointer;
}
html.dark .check { color: #a9b7cc; }
.check__box {
    width: 16px;
    height: 16px;
    margin: 0;
    border-radius: 4px;
    accent-color: #e88423;
}

.link {
    font-size: 14px;
    font-weight: 500;
    color: #d4741a;
    text-decoration: none;
}
.link:hover { text-decoration: underline; }
.link:focus-visible { outline: 2px solid #e88423; outline-offset: 2px; border-radius: 2px; }
html.dark .link { color: #f9c99b; }
/* <button> that looks like the .link anchor (Forgot password? toggle). */
.link--button {
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    cursor: pointer;
}

.card > .submit-btn { margin-top: 20px; }
.submit-btn {
    display: block;
    width: 100%;
    padding: 12px 0;
    border: 0;
    border-radius: 7px;
    background: #e88423;
    color: #fff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}
.submit-btn:hover { background: #d4741a; }
.submit-btn:focus-visible { outline: none; box-shadow: 0 0 0 2px #fff, 0 0 0 4px #e88423; }
.submit-btn:disabled { opacity: .5; cursor: not-allowed; }
.submit-btn:disabled:hover { background: #e88423; }

/* ---------- Alerts / notes ---------- */
.alert {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    background: #fff1e2;
    color: #79501e;
    font-size: 14px;
    line-height: 1.5;
}
html.dark .alert { background: #49311d; color: #ffd19d; }
.alert--success { background: #e7f6ec; color: #1e6b3a; }
html.dark .alert--success { background: #173a26; color: #a7e3bd; }

.bottom-note {
    margin-top: 32px;
    font-size: 13px;
    line-height: 1.7;
    color: #61738a;
}
html.dark .bottom-note { color: #a9b7cc; }
