/* Auth pages */
:root {
    --ls-blue: #0075B2;
    --ls-navy: #0f1b2d;
    --ls-navy-2: #0a2a43;
    --ls-ink: #0f172a;
    --ls-muted: #6b7280;
    --ls-fill: #eef2f8;
    --ls-fill-focus: #ffffff;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
    color: var(--ls-ink);
    background: #fff;
}

.auth-shell { display: flex; min-height: 100vh; }

/* ---------- Left form panel ---------- */
.auth-form-panel {
    flex: 1 1 60%;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: safe center;
    justify-content: center;
    padding: 136px 24px 40px;
    overflow-y: auto;
    margin-right: -22px;        /* overlap onto the blue panel right */
    border-radius: 0 22px 22px 0;  /* curve the inner right edge */
    /* very subtle bluish wash so it isn't a stark white */
    background: linear-gradient(160deg, #fbfdff 0%, #eef4fb 100%);
}
.auth-card { width: 100%; max-width: 380px; }

.panel-logo {
    position: absolute;
    top: 40px;
    left: 48px;
    height: 76px;
    z-index: 3;
}

.auth-card h2 {
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 6px;
}
.auth-card .sub { color: var(--ls-muted); margin: 0 0 30px; font-size: .95rem; }


.auth-field { margin-bottom: 18px; }
.auth-field label {
    display: block;
    font-size: .82rem;
    font-weight: 600;
    color: var(--ls-muted);
    margin-bottom: 7px;
}
.auth-input {
    position: relative;
    display: flex;
    align-items: center;
}
.auth-input > i,
.auth-input > svg {
    position: absolute;
    left: 14px;
    color: #9aa6b8;
    font-size: .95rem;
    pointer-events: none;
}
.auth-input > svg {
    width: 18px;
    height: 18px;
}
.auth-input input {
    width: 100%;
    padding: 13px 14px 13px 40px;
    font-size: .95rem;
    color: var(--ls-ink);
    background: #fff;
    border: 1px solid #e1e8f1;
    border-radius: 12px;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.auth-input input::placeholder { color: #9aa6b8; }
.auth-input input:focus {
    outline: none;
    background: var(--ls-fill-focus);
    border-color: var(--ls-blue);
    box-shadow: 0 0 0 3px rgba(0,117,178,.12);
}
.auth-field .field-validation-error,
.auth-field span.text-danger {
    display: block;
    color: #dc2626;
    font-size: .8rem;
    margin-top: 6px;
}

/* primary button — dark navy */
.auth-btn {
    width: 100%;
    margin-top: 6px;
    padding: 14px 16px;
    font-size: .97rem;
    font-weight: 700;
    color: #fff;
    background: #3a506b;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.auth-btn:hover { background: #2e4056; }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .7; cursor: not-allowed; }

.auth-links { margin-top: 18px; text-align: center; font-size: .9rem; color: var(--ls-muted); }
.auth-links a { color: var(--ls-blue); text-decoration: none; font-weight: 600; }
.auth-links a:hover { text-decoration: underline; }

.auth-disclaimer {
    margin-top: 30px;
    font-size: .78rem;
    color: #9aa6b8;
    text-align: center;
    line-height: 1.5;
}
.auth-copyright {
    position: absolute;
    bottom: 24px;
    left: 0; right: 0;
    text-align: center;
    font-size: .76rem;
    color: #b3bdca;
}

/* ---------- Right brand panel ---------- */
.auth-brand {
    flex: 1 1 40%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 72px 64px 64px;
    color: #fff;
    background: #081521;
}
/* blurred, darkened photo conveyor — next image pushes current out */
.auth-slides {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    filter: blur(6px) brightness(.90);
    transform: scale(1.08);  
}
/* track holds [img1][img2][img1-dup]; sliding to the dup loops seamlessly */
.auth-track {
    display: flex;
    width: 300%;
    height: 100%;
    animation: trackSlide 10s infinite;
}
.auth-track .slide {
    flex: 0 0 33.3333%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.auth-track .s1 { background-image: url('/images/jonathan-kemper-sNBAx0_9jSw-unsplash.jpg'); }
.auth-track .s2 { background-image: url('/images/pexels-imin-technology-276315592-12935047.jpg'); }
@keyframes trackSlide {
    0%   { transform: translateX(0); }
    40%  { transform: translateX(0); }            /* hold img1 */
    50%  { transform: translateX(-33.3333%); }    /* push to img2 */
    90%  { transform: translateX(-33.3333%); }    /* hold img2 */
    100% { transform: translateX(-66.6666%); }    /* push to img1-dup = seamless loop */
}

/* slide indicator (pill dots) */
.auth-dots {
    position: absolute;
    bottom: 36px; left: 0; right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 2;
}
.auth-dots span {
    width: 6px; height: 6px;
    border-radius: 4px;
    background: rgba(255,255,255,.45);
    animation: dotActive 10s infinite both;
}
.auth-dots span:nth-child(1) { animation-delay: 0s; }
.auth-dots span:nth-child(2) { animation-delay: -5s; }
@keyframes dotActive {
    0%   { width: 16px; background: rgba(255,255,255,.95); }
    45%  { width: 16px; background: rgba(255,255,255,.95); }
    50%  { width: 6px;  background: rgba(255,255,255,.45); }
    100% { width: 6px;  background: rgba(255,255,255,.45); }
}
/* navy scrim on top of the blur */
.auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8,21,33,.45) 0%, rgba(8,21,33,.22) 50%, rgba(8,21,33,.45) 100%);
    z-index: 0;
}
/* lift content above the photo layers */
.auth-brand h1,
.auth-brand p.tag,
.auth-brand .auth-cards { position: relative; z-index: 1; }
.auth-brand h1 {
    font-size: 2.6rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -.01em;
    text-transform: uppercase;
    margin: 0 0 18px;
    max-width: 520px;
    color: #d4e9f7;   /* soft sky blue */
}
.auth-brand p.tag { font-size: 1.02rem; opacity: .82; margin: 0; max-width: 460px; }

/* floating stat cards */
.auth-cards {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 14px;
    margin-top: 72px;   /* space below the tagline */
}
.stat-card {
    background: rgba(255,255,255,.60);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    filter: blur(1.2px);   /* soften the card contents + text */
    border: 1px solid rgba(255,255,255,.35);
    color: var(--ls-ink);
    border-radius: 14px;
    padding: 14px 18px;
    box-shadow: 0 14px 34px rgba(0,0,0,.22);
    min-width: 0;
}
.stat-card .lbl { font-size: .72rem; color: var(--ls-muted); font-weight: 600; }
.stat-card .val { font-size: 1.35rem; font-weight: 800; margin: 4px 0 8px; color: #0f5132; }
.stat-card .bar { height: 6px; border-radius: 4px; background: #e5e9f0; overflow: hidden; }
.stat-card .bar > span { display: block; height: 100%; background: var(--ls-blue); border-radius: 4px; }

/* trend badge (▲/▼ vs yesterday) */
.stat-card .trend {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: .72rem; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
}
.stat-card .trend.up   { color: #15803d; background: #e7f6ec; }
.stat-card .trend.down { color: #b42318; background: #fdecec; }
.stat-card .trend small { color: var(--ls-muted); font-weight: 500; }

/* channel doughnut */
.chan-card { display: flex; align-items: center; gap: 16px; }
.donut {
    flex: 0 0 auto;
    width: 84px; height: 84px; border-radius: 50%;
    background: conic-gradient(
        #16a34a 0 65%,      /* M-Pesa */
        #0075B2 65% 88%,    /* Card */
        #f59e0b 88% 100%    /* Cash */
    );
    display: grid; place-items: center;
}
.donut::after {
    content: ""; width: 52px; height: 52px; border-radius: 50%;
    background: #fff; grid-area: 1 / 1;
}
.donut .donut-lbl {
    grid-area: 1 / 1; z-index: 1; text-align: center; line-height: 1.1;
}
.donut .donut-lbl b { font-size: .95rem; }
.donut .donut-lbl span { display: block; font-size: .6rem; color: var(--ls-muted); }
.chan-legend { list-style: none; margin: 0; padding: 0; font-size: .74rem; }
.chan-legend li { display: flex; align-items: center; gap: 7px; margin-bottom: 5px; color: var(--ls-ink); }
.chan-legend li i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* ---------- Fallback for original-markup form  ---------- */
.auth-card .account-control {
    width: 100%;
    margin-bottom: 16px;
    padding: 13px 14px;
    font-size: .95rem;
    color: var(--ls-ink);
    background: var(--ls-fill);
    border: 1px solid transparent;
    border-radius: 12px;
    transition: background .15s, border-color .15s, box-shadow .15s;
}
.auth-card .account-control:focus {
    outline: none;
    background: var(--ls-fill-focus);
    border-color: var(--ls-blue);
    box-shadow: 0 0 0 3px rgba(0,117,178,.12);
}
.auth-card .form-submit {
    width: 100%;
    margin-top: 6px;
    padding: 14px 16px;
    font-size: .97rem;
    font-weight: 700;
    color: #fff;
    background: #3a506b;
    border: none;
    border-radius: 12px;
    cursor: pointer;
}
.auth-card .form-submit:hover { background: #2e4056; }

/* ---------- Responsive: stack, hide brand ---------- */
@media (max-width: 900px) {
    .auth-brand { display: none; }
    .auth-form-panel { flex-basis: 100%; margin-right: 0; border-radius: 0; }
    .panel-logo { left: 50%; transform: translateX(-50%); }
}

/* Password fields: show/hide, strength, rules, match */
.auth-input input[type="password"], .auth-input input.pw { padding-right: 44px; }
.auth-eye { position: absolute; right: 6px; width: 34px; height: 34px; display: grid; place-items: center; border: 0; background: none; color: #9aa6b8; cursor: pointer; border-radius: 8px; }
.auth-eye:hover { color: var(--ls-ink); }
.auth-eye:focus-visible { outline: 2px solid var(--ls-blue); outline-offset: 1px; }
.auth-eye svg { width: 18px; height: 18px; }
.auth-eye .off, .auth-eye.on .show { display: none; }
.auth-eye.on .off { display: block; }
.auth-meter { display: flex; align-items: center; gap: 10px; margin: 10px 0 8px; }
.auth-meter i { flex: 1; height: 6px; border-radius: 3px; background: #e5eaf1; overflow: hidden; }
.auth-meter i b { display: block; height: 100%; width: 0; border-radius: 3px; transition: width .2s, background .2s; }
.auth-meter span { font-size: .78rem; font-weight: 600; min-width: 52px; text-align: right; color: var(--ls-muted); }
.auth-rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 12px; font-size: .78rem; color: var(--ls-muted); }
.auth-rules li::before { content: '○'; display: inline-block; width: 16px; }
.auth-rules li.ok { color: #059669; }
.auth-rules li.ok::before { content: '✓'; font-weight: 700; }
.auth-match { font-size: .78rem; margin-top: 6px; min-height: 16px; color: var(--ls-muted); }
.auth-match.ok { color: #059669; }
.auth-match.no { color: #dc2626; }
