/* =====================================================================
   Dev-Tracker - Sign-in screen (Dot.Cy split-screen)
   ---------------------------------------------------------------------
   Loads AFTER theme-devtracker.css on the login layout only. Builds a
   two-column branded sign-in: a solid Dot.Cy orange brand panel on the left
   and a clean form card on the right. Stacks to a single column on
   mobile. Flat (no gradients, no drop shadows), 0.5px borders, sentence
   case, brand tokens only. Light + dark aware via the shared tokens.

   Scope is limited to the login layout: every rule is nested under
   .login-page / .login-split so nothing here can affect the app shell.
   ===================================================================== */

/* ---------------------------------------------------------------------
   1. PAGE FRAME
   The login layout renders a sticky top bar + <main class="login-page">.
   Turn the main area into a full-bleed flex stage that holds the split.
   --------------------------------------------------------------------- */
.login-page {
    display: flex;
    align-items: stretch;
    justify-content: center;
    /* Fill the area below the sticky top bar. */
    min-height: calc(100vh - var(--topbar-height));
    padding: 1.5rem;
}

/* The two-column shell. A flat card with a 0.5px hairline that contains
   both panels and clips their corners to the shared radius. */
.login-split {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    max-width: 960px;
    margin: auto;
    background: var(--surface);
    border: 0.5px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

/* ---------------------------------------------------------------------
   2. LEFT - BRAND PANEL (solid orange, on-accent charcoal content)
   --------------------------------------------------------------------- */
.login-brand-panel {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding: 2.5rem;
    background: var(--accent);
    color: var(--on-accent);
}

/* The _Brand lockup sits in the panel. Re-skin the lockup pieces to read
   on the solid orange ground (wordmark + mark become on-accent charcoal, the mark
   square becomes a faint charcoal tile, the ink dot keeps its hue). */
.login-brand-panel .brand,
.login-brand-panel .brand:hover,
.login-brand-panel .brand:focus-visible {
    color: var(--on-accent);
}

.login-brand-panel .brand-word {
    color: var(--on-accent);
}

.login-brand-panel .brand-mark {
    background: rgba(46, 43, 44, 0.12);
    color: var(--on-accent);
}

/* Re-seat the dot's ring against the orange panel (was --surface). */
.login-brand-panel .brand-mark::after {
    border-color: var(--accent-line);
}

.login-brand-panel .brand:focus-visible {
    outline: 2px solid var(--on-accent);
    outline-offset: 3px;
    border-radius: var(--radius-control);
}

.login-brand-lede {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    /* Push the headline group down a touch from the lockup. */
    margin-top: auto;
}

.login-brand-headline {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.9rem;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--on-accent);
}

.login-brand-subhead {
    margin: 0;
    font-size: 1rem;
    line-height: 1.5;
    /* Slightly recessed against the headline: charcoal at 86%, still AA on the orange panel. */
    color: rgba(46, 43, 44, 0.86);
}

.login-brand-features {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    margin: 0.25rem 0 0;
    padding: 0;
    list-style: none;
}

.login-brand-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.4;
    color: rgba(46, 43, 44, 0.94);
}

/* Flat ink tick bullet (the accent-2 quiet highlight). */
.login-brand-feature-mark {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.05rem;
    border-radius: var(--radius-control);
    background: var(--accent-2);
    color: var(--on-accent-2);
}

.login-brand-feature-mark svg {
    width: 0.85rem;
    height: 0.85rem;
    display: block;
}

/* ---------------------------------------------------------------------
   3. RIGHT - FORM PANEL (clean card surface)
   --------------------------------------------------------------------- */
.login-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2.5rem;
    background: var(--surface);
}

/* The existing <section class="card login-card"> sits inside the panel.
   Inside the split it should be borderless / paddingless so the panel
   itself provides the framing - it is no longer a free-floating card. */
.login-form-panel .login-card {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.login-form-panel .login-card-title {
    margin: 0 0 0.4rem;
    text-align: left;
    font-size: 1.6rem;
    line-height: 1.2;
    color: var(--text);
}

/* Sub-line under the title (the existing .muted helper paragraph). It uses
   inline styles in the view; re-anchor it left within the split. */
.login-form-panel .login-card .muted {
    text-align: left;
    color: var(--muted);
}

.login-form-panel form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.login-form-panel .form-field {
    gap: 0.4rem;
}

.login-form-panel .form-field label:not(.checkbox-label) {
    font-weight: 500;
    color: var(--text);
}

.login-form-panel .login-form-actions {
    margin-top: 0.25rem;
}

/* Keep the remember-me row quiet and left-aligned. */
.login-form-panel .checkbox-label {
    font-weight: 400;
    color: var(--text);
}

/* ---------------------------------------------------------------------
   4. RESPONSIVE - stack to a single column on narrow viewports.
   The brand panel sits on top as a compact banner; the form follows.
   --------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .login-page {
        padding: 0;
        min-height: calc(100vh - var(--topbar-height));
    }

    .login-split {
        grid-template-columns: 1fr;
        max-width: 480px;
        border: 0;
        border-radius: 0;
    }

    .login-brand-panel {
        gap: 1rem;
        padding: 1.75rem 1.5rem;
    }

    .login-brand-lede {
        margin-top: 0;
    }

    .login-brand-headline {
        font-size: 1.5rem;
    }

    /* Trim the feature list on small screens to keep the form above the
       fold; bullets stay in the DOM for context but compress. */
    .login-brand-features {
        gap: 0.5rem;
    }

    .login-form-panel {
        padding: 1.75rem 1.5rem 2.25rem;
    }

    .login-form-panel .login-card {
        max-width: none;
    }
}

/* Very short / landscape phones: don't force full viewport height. */
@media (max-width: 767.98px) and (max-height: 640px) {
    .login-page {
        min-height: 0;
    }
}
