/* ==========================================================================
   Login — two panes: showcase and form

   Colours, ambient light, brand, language picker and the primary button come
   from auth-theme.css, which follows the Theme mode chosen in Business
   Settings. This file lays the login page out with those tokens.
   ========================================================================== */

.lg-shell {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(420px, 1fr);
    min-height: 100vh;
    font-family: var(--rg-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--rg-ink-2);
    isolation: isolate;
}

/* Line icons drawn inline; the chart carries its own strokes. */
.lg-toast-ico svg,
.lg-points svg,
.lg-eyebrow svg,
.lg-input-ico,
.lg-eye svg,
.lg-check svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ==========================================================================
   Showcase
   ========================================================================== */
.lg-show {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--rg-rail-a), var(--rg-rail-b));
    box-shadow: inset -1px 0 0 var(--rg-line);
}

.lg-show::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--rg-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--rg-grid) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 40% 35%, #000 15%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 60% at 40% 35%, #000 15%, transparent 75%);
}

.lg-show-inner {
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: clamp(28px, 4vh, 44px);
    min-height: 100vh;
    padding: 36px clamp(32px, 4.5vw, 80px) 40px;
}

.lg-copy { max-width: 620px; }

.lg-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 12px;
    border-radius: 999px;
    background: var(--rg-glass);
    box-shadow: inset 0 0 0 1px var(--rg-line-2);
    font-family: var(--rg-mono);
    font-size: 11.5px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rg-accent);
}

.lg-title {
    margin: 22px 0 16px;
    font-size: clamp(38px, 4.2vw, 64px);
    line-height: 1;
    font-weight: 700;
    letter-spacing: -.045em;
    color: var(--rg-heading);
}

.lg-grad {
    background: var(--rg-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.lg-lead {
    margin: 0;
    max-width: 48ch;
    font-size: 17px;
    line-height: 1.6;
    color: var(--rg-muted);
}

/* --- mockup --------------------------------------------------------------- */
.lg-stage {
    position: relative;
    max-width: 640px;
    margin: auto 0;
    padding: 24px 40px 24px 0;
    perspective: 1600px;
}

.lg-stage::before {
    content: "";
    position: absolute;
    inset: 10% 5% 0 0;
    z-index: -1;
    background: radial-gradient(ellipse at center, color-mix(in srgb, var(--rg-accent-2) 38%, transparent), color-mix(in srgb, var(--rg-accent) 14%, transparent) 45%, transparent 70%);
    filter: blur(50px);
}

.lg-mock {
    border-radius: 18px;
    background: linear-gradient(180deg, var(--rg-mock-a), var(--rg-mock-b));
    box-shadow: inset 0 0 0 1px var(--rg-line-2), 0 50px 100px -40px var(--rg-shadow);
    overflow: hidden;
    transform: rotateX(8deg) rotateY(-12deg);
    transform-origin: 30% 50%;
    animation: lg-hover 8s ease-in-out infinite;
}

@keyframes lg-hover {
    0%, 100% { transform: rotateX(8deg) rotateY(-12deg) translateY(0); }
    50%      { transform: rotateX(6deg) rotateY(-8deg) translateY(-10px); }
}

.lg-mock-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-bottom: 1px solid var(--rg-line);
}

.lg-mock-bar i { width: 10px; height: 10px; border-radius: 50%; }
.lg-mock-bar i:nth-child(1) { background: #ff5f57; }
.lg-mock-bar i:nth-child(2) { background: #febc2e; }
.lg-mock-bar i:nth-child(3) { background: #28c840; }

.lg-mock-bar span {
    margin: 0 auto;
    padding: 3px 40px;
    border-radius: 7px;
    background: var(--rg-glass);
    font-family: var(--rg-mono);
    font-size: 11px;
    color: var(--rg-faint);
}

.lg-mock-body { display: grid; gap: 14px; padding: 18px; }

.lg-mock-head { display: flex; justify-content: space-between; align-items: center; }
.lg-mock-head small { display: block; font-size: 11.5px; color: var(--rg-faint); }
.lg-mock-head b { font-size: 16px; letter-spacing: -.02em; color: var(--rg-heading); }

.lg-seg {
    display: flex;
    padding: 3px;
    border-radius: 9px;
    background: var(--rg-glass);
    box-shadow: inset 0 0 0 1px var(--rg-line);
    font-size: 11.5px;
}

.lg-seg span { padding: 4px 11px; border-radius: 6px; color: var(--rg-muted); }
.lg-seg span.on { background: var(--rg-glass-2); color: var(--rg-heading); box-shadow: 0 1px 2px var(--rg-line); }

.lg-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.lg-kpi {
    padding: 12px;
    border-radius: 11px;
    background: var(--rg-glass);
    box-shadow: inset 0 0 0 1px var(--rg-line);
}

.lg-kpi small { display: block; font-size: 11px; color: var(--rg-muted); }
.lg-kpi b { display: block; margin: 3px 0 1px; font-family: var(--rg-mono); font-size: 16px; letter-spacing: -.03em; color: var(--rg-heading); }
.lg-kpi em { font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--rg-accent); }
.lg-kpi em.warn { color: #f59e0b; }

.lg-chart {
    padding: 10px 12px;
    border-radius: 11px;
    background: var(--rg-glass);
    box-shadow: inset 0 0 0 1px var(--rg-line);
}

.lg-chart svg { display: block; width: 100%; height: 120px; }
.lg-grid { fill: none; stroke: var(--rg-line); }
.lg-stop-a  { stop-color: var(--rg-accent); stop-opacity: .32; }
.lg-stop-a0 { stop-color: var(--rg-accent); stop-opacity: 0; }
.lg-stop-b  { stop-color: var(--rg-accent-2); stop-opacity: .22; }
.lg-stop-b0 { stop-color: var(--rg-accent-2); stop-opacity: 0; }
.lg-line-a, .lg-line-b { fill: none; stroke-width: 2.5; stroke-dasharray: 520; stroke-dashoffset: 520; animation: lg-draw 2.4s var(--rg-ease) .3s forwards; }
.lg-line-a { stroke: var(--rg-accent); }
.lg-line-b { stroke: var(--rg-accent-2); animation-delay: .6s; }
.lg-dot { fill: var(--rg-bg); stroke: var(--rg-accent); stroke-width: 2.5; }

@keyframes lg-draw { to { stroke-dashoffset: 0; } }

.lg-rows { display: grid; }

.lg-rows div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 2px;
    border-top: 1px solid var(--rg-line);
    font-family: var(--rg-mono);
    font-size: 11.5px;
    color: var(--rg-ink-2);
}

.lg-pill { padding: 2px 9px; border-radius: 999px; font-family: var(--rg-font); font-size: 10.5px; font-weight: 600; }
.lg-pill.ok { background: var(--rg-accent-soft); color: var(--rg-accent); }
.lg-pill.part { background: rgba(245, 158, 11, .14); color: #f59e0b; }

.lg-toast {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px 10px 10px;
    border-radius: 13px;
    background: var(--rg-mock);
    box-shadow: inset 0 0 0 1px var(--rg-line-2), 0 24px 50px -18px var(--rg-shadow);
    font-size: 13px;
    color: var(--rg-heading);
    animation: lg-float 6s ease-in-out infinite;
}

@supports (backdrop-filter: blur(1px)) {
    .lg-toast { backdrop-filter: blur(16px); }
}

.lg-toast b { display: block; font-weight: 600; }
.lg-toast small { display: block; font-size: 11.5px; color: var(--rg-muted); }
.lg-toast--a { top: 0; right: 0; }
.lg-toast--b { bottom: 6px; left: -18px; animation-delay: -3s; }

.lg-toast-ico {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: var(--rg-accent-soft);
    color: var(--rg-accent);
}

.lg-toast-ico--2 {
    background: color-mix(in srgb, var(--rg-accent-2) 16%, transparent);
    color: var(--rg-accent-2);
}

.lg-toast-ico svg { width: 17px; height: 17px; }

@keyframes lg-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

/* --- points --------------------------------------------------------------- */
.lg-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.lg-points li {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 9px 15px 9px 11px;
    border-radius: 999px;
    background: var(--rg-glass);
    box-shadow: inset 0 0 0 1px var(--rg-line);
    font-size: 13.5px;
    color: var(--rg-ink-2);
}

.lg-points svg { width: 17px; height: 17px; color: var(--rg-accent); }

/* ==========================================================================
   Form pane
   ========================================================================== */
.lg-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.lg-top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px clamp(20px, 3vw, 44px);
}

.lg-top-hint {
    font-size: 14px;
    color: var(--rg-muted);
}

.lg-mobile-brand { display: none !important; }

.lg-demo { padding: 0 clamp(20px, 3vw, 44px); }

.lg-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 20px clamp(20px, 3vw, 44px) 40px;
}

.lg-card {
    position: relative;
    width: 100%;
    max-width: 460px;
    padding: clamp(28px, 3vw, 44px);
    border-radius: 28px;
    background: linear-gradient(180deg, var(--rg-card-a), var(--rg-card-b));
    box-shadow: inset 0 0 0 1px var(--rg-line), 0 50px 100px -50px var(--rg-shadow);
    animation: lg-rise .7s var(--rg-ease) both;
}

@supports (backdrop-filter: blur(1px)) {
    .lg-card { backdrop-filter: blur(16px); }
}

/* A lit edge along the top of the card. */
.lg-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 40px;
    right: 40px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--rg-accent-line), color-mix(in srgb, var(--rg-accent-2) 45%, transparent), transparent);
}

@keyframes lg-rise { from { opacity: 0; transform: translateY(18px); } }

.lg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px 5px 9px;
    border-radius: 999px;
    background: var(--rg-accent-soft);
    box-shadow: inset 0 0 0 1px var(--rg-accent-line);
    font-family: var(--rg-mono);
    font-size: 11px;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--rg-accent);
}

.lg-eyebrow svg { width: 14px; height: 14px; }

.lg-card h1.lg-welcome {
    margin: 18px 0 6px;
    font-family: var(--rg-font);
    font-size: clamp(30px, 2.6vw, 38px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -.04em;
    color: var(--rg-heading);
}

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

/* --- fields --------------------------------------------------------------- */
.lg-field { margin-bottom: 18px; }

.lg-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.lg-shell .lg-label {
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--rg-ink-2);
}

.lg-input { position: relative; }

.lg-input-ico {
    position: absolute;
    left: 16px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    color: var(--rg-faint);
    pointer-events: none;
    transition: color .2s ease;
}

.lg-input:focus-within .lg-input-ico { color: var(--rg-accent); }

.lg-control {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 16px 0 46px;
    border: 0;
    border-radius: 14px;
    background: var(--rg-field);
    box-shadow: inset 0 0 0 1px var(--rg-line-2);
    font-family: var(--rg-font);
    font-size: 15.5px;
    font-weight: 500;
    color: var(--rg-ink);
    transition: box-shadow .2s ease, background .2s ease;
}

.lg-control--eye { padding-right: 50px; }

.lg-control::placeholder { color: var(--rg-faint); font-weight: 400; }

.lg-control:hover {
    background: var(--rg-field-hover);
    box-shadow: inset 0 0 0 1px var(--rg-accent-line);
}

.lg-control:focus {
    outline: 0;
    background: var(--rg-field-hover);
    box-shadow: inset 0 0 0 1px var(--rg-accent), var(--rg-ring);
}

.lg-field.has-error .lg-control {
    box-shadow: inset 0 0 0 1px var(--rg-danger), 0 0 0 4px color-mix(in srgb, var(--rg-danger) 14%, transparent);
}

.lg-eye {
    position: absolute;
    right: 8px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--rg-faint);
    transform: translateY(-50%);
    cursor: pointer;
    transition: background .2s ease, color .2s ease;
}

.lg-eye:hover,
.lg-eye.is-on { background: var(--rg-accent-soft); color: var(--rg-accent); }
.lg-eye svg { width: 20px; height: 20px; }

.lg-help {
    display: block;
    margin-top: 7px;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--rg-danger);
}

/* Links, scoped past app.css's white `.right-col a`. */
.lg-shell a.lg-link,
.lg-shell a.lg-link:focus {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--rg-accent);
    text-decoration: none;
}

.lg-shell a.lg-link:hover { color: var(--rg-heading); text-decoration: none; }

.lg-shell a.lg-forgot { font-weight: 500; color: var(--rg-muted); }
.lg-shell a.lg-forgot:hover { color: var(--rg-accent); }

/* --- remember me ---------------------------------------------------------- */
.lg-shell .lg-remember {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 4px 0 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--rg-ink-2);
    cursor: pointer;
    user-select: none;
}

.lg-remember input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
    margin: 0;
}

.lg-check {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: var(--rg-field);
    box-shadow: inset 0 0 0 1.5px var(--rg-line-2);
    color: transparent;
    transition: background .2s ease, box-shadow .2s ease, color .2s ease;
}

.lg-check svg { width: 14px; height: 14px; stroke-width: 3; }

.lg-remember input:checked + .lg-check {
    background: var(--rg-accent);
    box-shadow: 0 4px 12px -4px var(--rg-accent-glow);
    color: var(--rg-on-accent);
}

.lg-remember input:focus-visible + .lg-check { box-shadow: inset 0 0 0 1.5px var(--rg-accent), var(--rg-ring); }

/* --- submit --------------------------------------------------------------- */
.lg-submit {
    width: 100%;
    min-height: 54px;
    border-radius: 14px;
    font-size: 16px;
}

.lg-signup {
    margin: 22px 0 0;
    padding-top: 20px;
    border-top: 1px solid var(--rg-line);
    text-align: center;
    font-size: 14px;
    color: var(--rg-muted);
}

.lg-foot {
    margin: 0;
    font-size: 13px;
    color: var(--rg-faint);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
    .lg-shell { grid-template-columns: minmax(0, 1fr) minmax(420px, 1fr); }
    .lg-toast--b { left: 0; }
}

@media (max-width: 1024px) {
    .lg-shell { grid-template-columns: 1fr; }
    .lg-show { display: none; }
    .lg-top { justify-content: flex-start; }
    .lg-mobile-brand { display: inline-flex !important; margin-right: auto; }
}

@media (max-width: 560px) {
    .lg-top { flex-wrap: wrap; padding: 16px; }
    .lg-top-hint { display: none; }
    .lg-center { padding: 8px 14px 28px; }
    .lg-card { padding: 26px 20px; border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
    .lg-mock,
    .lg-toast,
    .lg-card { animation: none !important; }

    .lg-line-a,
    .lg-line-b { stroke-dashoffset: 0; animation: none; }
}
