/* ==========================================================================
   TradeTech Login Stylesheet (tradetech-login.css)
   Integrated with TradeTech Theme Variables & Design System Tokens
   ========================================================================== */

:root {
    /* Theme Tokens mapped to tradetech.css variables */
    --lg-ink: var(--tt1-ink, #16233A);
    --lg-ink-2: var(--tt1-band, #243652);
    --lg-paper: var(--tt1-accent, #E0B62E);
    --lg-accent: var(--tt1-accent, #E0B62E);
    --lg-accent-hi: var(--tt1-accent-hi, #E7C55F);
    --lg-accent-soft: rgba(224, 182, 46, 0.15);
    --lg-ember: var(--tt1-ember, #E8A33D);
    --lg-ember-text: var(--tt1-ember, #E8A33D);
    --lg-caution: var(--tt1-gold, #E0B62E);
    --lg-text: var(--tt1-fg, #FFFFFF);
    --lg-line: var(--tt1-line-mid, rgba(255, 255, 255, 0.16));
    /* Font Family Definitions */
    --lg-serif: var(--tt1-display, 'Fraunces', Georgia, serif);
    --lg-sans: var(--tt1-sans, 'Inter', system-ui, -apple-system, sans-serif);
    --lg-mono: var(--tt1-mono, 'JetBrains Mono', ui-monospace, monospace);
    /* Action & Interactive Tokens */
    --color-action-bg: var(--tt1-white, #FFFFFF);
    --color-action-bg-hover: var(--tt1-white-hi, #F6EAC4);
    --color-action-fg: var(--tt1-ink, #16233A);
    --color-action-radius: 999px;
    --color-brand-on: var(--tt1-ink, #16233A);
    --color-brand-subtle: rgba(224, 182, 46, 0.2);
    /* Alert Surface States */
    --color-status-error-surface: rgba(232, 163, 61, 0.12);
    --color-status-error-border: rgba(232, 163, 61, 0.35);
    --color-status-info-surface: rgba(224, 182, 46, 0.12);
    --color-status-info-border: rgba(224, 182, 46, 0.35);
}

/* Base Layout & Page Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.lg-page {
    background-color: var(--lg-ink);
    color: var(--lg-text);
    font-family: var(--lg-sans);
    min-height: 100vh;
    display: flex;
    margin: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
     
}

/* Two-Panel Split Outer Shell */
.lg-shell {
    display: flex;
    width: 100vw;
    min-height: 100vh;
}

/* ==========================================================================
   LEFT PANEL: Form Side Layout (WIDENED)
   ========================================================================== */

.lg-form-side {
    flex: 1.2; /* Increased flex ratio */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 3rem 4rem; /* Increased side padding */
    max-width: 720px; /* Increased max-width from 620px to 720px */
    background-color: var(--lg-ink);
}

/* Brand Header & Inline SVG Logo Fixes */
.lg-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--lg-text);
}

    .lg-brand svg {
        display: block;
        flex-shrink: 0;
        width: 42px;
        height: 42px;
        overflow: visible;
    }

.lg-brand-text {
    display: flex;
    flex-direction: column;
}

.lg-brand-name {
    font-family: var(--lg-serif);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--lg-text);
}

    .lg-brand-name em {
        font-style: normal;
        color: var(--lg-accent);
    }

.lg-brand-sub {
    font-family: var(--lg-mono);
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    color: var(--lg-accent-hi);
    margin-top: 2px;
}

/* Center Form Container (WIDENED) */
.lg-middle {
    margin: auto 0;
    padding: 2rem 0;
    width: 100%;
}

.lg-card {
    width: 100%;
    max-width: 500px; /* Expanded from 420px to 500px */
    margin: 0 auto;
}

/* A card with no form in it — a confirmation or a refusal, where there is no
   column of fields for the text to line up against and centring reads better.
   The heading needs saying explicitly: tradetech-tokens.css sets
   `body.tt h1 { text-align: start }`, and a rule beats an inherited value, so
   a centred card would otherwise centre everything except its own title. */
.lg-card.is-centred,
.lg-card.is-centred h1,
.lg-card.is-centred h2 {
    text-align: center;
}

/* Typography Headings */
.lg-eyebrow {
    font-family: var(--lg-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lg-accent);
    margin-bottom: 0.5rem;
}

.lg-card h1 {
    font-family: var(--lg-serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--lg-text);
    margin-bottom: 0.5rem;
}

.lg-lede {
    font-size: 0.95rem;
    color: var(--lg-accent-hi);
    margin-bottom: 1.75rem;
}

/* Alerts & Development Notices */
.lg-alert,
.lg-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

    .lg-alert svg,
    .lg-note svg {
        flex-shrink: 0;
    }

.lg-alert {
    background-color: var(--color-status-error-surface);
    border: 1px solid var(--color-status-error-border);
    color: var(--lg-ember-text);
}

    .lg-alert ul {
        margin-left: 1rem;
        padding-left: 0;
    }

.lg-note {
    background-color: var(--color-status-info-surface);
    border: 1px solid var(--color-status-info-border);
    color: var(--lg-accent-hi);
}

    .lg-note code {
        font-family: var(--lg-mono);
        font-size: 0.8rem;
        background: var(--color-brand-subtle);
        padding: 0.15rem 0.35rem;
        border-radius: 4px;
        color: var(--lg-text);
    }

/* Form Controls & Inputs */
.lg-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.lg-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    position: relative;
}

.lg-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--lg-accent-hi);
}

.lg-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--lg-sans);
    font-size: 0.9375rem;
    color: var(--lg-text);
    background-color: var(--lg-ink-2);
    border: 1px solid var(--lg-line);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .lg-input:focus {
        border-color: var(--lg-accent);
        box-shadow: 0 0 0 3px var(--lg-accent-soft);
    }

    .lg-input.is-bad {
        border-color: var(--lg-ember);
    }

    .lg-input::placeholder {
        color: rgba(255, 255, 255, 0.3);
    }

/* Password Field Extra Controls */
.lg-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.lg-pw-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--lg-accent);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .lg-pw-toggle:hover {
        color: var(--lg-text);
    }

.lg-caps {
    display: none;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--lg-caution);
    margin-top: 0.25rem;
}

    .lg-caps.is-active {
        display: flex;
    }

.lg-err {
    font-size: 0.775rem;
    color: var(--lg-ember-text);
}

/* Remember Me & Links Row */
.lg-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8125rem;
    gap: 0.5rem;
}

.lg-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--lg-accent-hi);
    user-select: none;
}

    .lg-check input[type="checkbox"] {
        position: absolute;
        opacity: 0;
        width: 0;
        height: 0;
    }

.lg-check-box {
    width: 18px;
    height: 18px;
    border: 1px solid var(--lg-line);
    border-radius: 4px;
    background-color: var(--lg-ink-2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .lg-check-box svg {
        display: none;
        stroke: var(--color-action-fg);
    }

.lg-check input[type="checkbox"]:checked + .lg-check-box {
    background-color: var(--lg-accent);
    border-color: var(--lg-accent);
}

    .lg-check input[type="checkbox"]:checked + .lg-check-box svg {
        display: block;
    }

.lg-link {
    color: var(--lg-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

    .lg-link:hover {
        color: var(--lg-accent-hi);
        text-decoration: underline;
    }

/* Primary Button */
.lg-submit {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-family: var(--lg-sans);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-action-fg);
    background-color: var(--color-action-bg);
    border: none;
    border-radius: var(--color-action-radius);
    cursor: pointer;
    margin-top: 0.5rem;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

    .lg-submit:hover {
        background-color: var(--color-action-bg-hover);
    }

    .lg-submit:active {
        transform: scale(0.99);
    }

/* Section Divider */
.lg-or {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--lg-line);
}

    .lg-or i {
        flex: 1;
        height: 1px;
        background-color: var(--lg-line);
    }

    .lg-or span {
        padding: 0 0.75rem;
        font-size: 0.75rem;
        text-transform: uppercase;
        color: rgba(255, 255, 255, 0.4);
        font-family: var(--lg-mono);
    }

/* Action Links & Footer Text */
.lg-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--lg-text);
    background: transparent;
    border: 1px solid var(--lg-line);
    border-radius: var(--color-action-radius);
    text-decoration: none;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

    .lg-secondary:hover {
        border-color: var(--lg-accent);
        background-color: rgba(255, 255, 255, 0.03);
    }

.lg-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.45);
}

.lg-foot {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
}

/* ==========================================================================
   RIGHT PANEL: Brand Side Layout
   ========================================================================== */

.lg-aside {
    flex: 1;
    position: relative;
    background-color: var(--lg-ink-2);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem;
    overflow: hidden;
    border-left: 1px solid var(--lg-line);
}

.lg-aside-bg {
    position: absolute;
    inset: 0;
    background-image: url('../images/slide22.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.lg-aside-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #16233A 4%, rgba(11, 26, 48, 0.9) 48%, rgba(11, 26, 48, 0.62) 100%);
    z-index: 1;
}

.lg-aside-body {
    position: relative;
    z-index: 2;
    max-width: 480px;
}

.lg-aside-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--lg-mono);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lg-accent);
    margin-bottom: 1rem;
}

    .lg-aside-eyebrow i {
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background-color: var(--lg-accent);
    }

.lg-aside-head {
    font-family: var(--lg-serif);
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--lg-text);
    margin-bottom: 1rem;
}

.lg-aside-lede {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--lg-accent-hi);
    margin-bottom: 2.5rem;
}

.lg-aside-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--lg-line);
}

    .lg-aside-stats span {
        display: flex;
        flex-direction: column;
        gap: 0.2rem;
    }

    .lg-aside-stats b {
        font-family: var(--lg-sans);
        font-size: 0.875rem;
        font-weight: 600;
        color: var(--lg-text);
    }

    .lg-aside-stats span span {
        font-size: 0.75rem;
        color: var(--lg-accent);
    }

/* Decorative Framing Accents */
.lg-aside-frame {
    position: absolute;
    inset: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.lg-corner {
    position: absolute;
    width: 12px;
    height: 12px;
    border-color: var(--lg-accent);
    border-style: solid;
    pointer-events: none;
}

.lg-corner-tr {
    top: 2rem;
    right: 2rem;
    border-width: 2px 2px 0 0;
}

.lg-corner-bl {
    bottom: 2rem;
    left: 2rem;
    border-width: 0 0 2px 2px;
}

/* Responsive Rules */
@media (max-width: 960px) {
    .lg-shell {
        flex-direction: column;
    }

    .lg-aside {
        display: none;
    }

    .lg-form-side {
        max-width: 100%;
        padding: 2rem 1.5rem;
    }
}

