/* Power Panel sign-in (Views/Auth/Index). Self-contained: no Bootstrap, no theme. Inter + Phosphor, like the CRM pages. */

:root {
    --pp-bg: #ffffff;
    --pp-canvas: #f4f5fb;
    --pp-ink: #131a2e;
    --pp-ink-2: #3a4560;
    --pp-muted: #67718a;
    --pp-faint: #9aa3b8;
    --pp-line: #e3e6f0;
    --pp-field: #f7f8fc;
    --pp-field-focus: #ffffff;
    --pp-brand: #6366f1;
    --pp-brand-ink: #4f46e5;
    --pp-brand-soft: #eef0ff;
    --pp-blue: #4399fa;
    --pp-violet: #7b54f1;
    --pp-bad: #d23c5a;
    --pp-bad-soft: #fdecef;
    --pp-warn: #b45309;
    --pp-warn-soft: #fff4e2;
    --pp-ok: #12936a;
    --pp-shadow: 0 1px 2px rgba(19, 26, 46, .06), 0 12px 32px -12px rgba(19, 26, 46, .18);
    --pp-ease: cubic-bezier(.22, .61, .36, 1);
    --pp-font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --pp-bg: #0e1222;
        --pp-canvas: #0a0d19;
        --pp-ink: #eef0f8;
        --pp-ink-2: #c3c8da;
        --pp-muted: #8f98b3;
        --pp-faint: #646d88;
        --pp-line: #252b42;
        --pp-field: #151a2e;
        --pp-field-focus: #1a2036;
        --pp-brand: #8b8cf8;
        --pp-brand-ink: #a5a6ff;
        --pp-brand-soft: #1d2142;
        --pp-bad: #ff7d95;
        --pp-bad-soft: #3a1622;
        --pp-warn: #f6b660;
        --pp-warn-soft: #34230d;
        --pp-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 12px 32px -12px rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body.pp-signin {
    font-family: var(--pp-font);
    font-size: 14px;
    color: var(--pp-ink);
    background: var(--pp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.si-shell { display: grid; grid-template-columns: minmax(420px, 46fr) 54fr; min-height: 100vh; }

/* ---------- form side ---------- */
.si-form-side {
    display: flex; flex-direction: column; gap: 32px;
    padding-block: 28px 24px;
    padding-left: max(24px, env(safe-area-inset-left, 0px));
    padding-right: max(24px, env(safe-area-inset-right, 0px));
    background: var(--pp-bg);
}
.si-top { display: flex; align-items: center; gap: 10px; }
.si-logo { height: 30px; width: auto; display: block; color: var(--pp-ink); }
.si-tag { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; background: var(--pp-brand-soft); color: var(--pp-brand-ink); font-size: 11.5px; font-weight: 600; letter-spacing: .02em; }
.si-tag i { font-size: 13px; }

.si-main { flex: 1; display: flex; align-items: center; justify-content: center; }
.si-card { width: 100%; max-width: 380px; animation: siRise .6s var(--pp-ease) both; }
.si-card h1 { margin: 0 0 6px; font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; text-wrap: balance; }
.si-card > p { margin: 0 0 26px; color: var(--pp-muted); font-size: 14.5px; }

.si-alert { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 18px; padding: 11px 13px; border-radius: 10px; background: var(--pp-bad-soft); color: var(--pp-bad); font-size: 13px; font-weight: 500; animation: siShake .42s var(--pp-ease) both; }
.si-alert.is-lock { background: var(--pp-warn-soft); color: var(--pp-warn); }
.si-alert i { font-size: 17px; margin-top: 1px; flex: none; }

.si-field { display: block; margin-bottom: 16px; }
.si-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 7px; font-size: 12.5px; font-weight: 600; color: var(--pp-ink-2); }
.si-input-wrap { position: relative; }
.si-input-wrap > i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 17px; color: var(--pp-faint); transition: color .15s; pointer-events: none; }
.si-input {
    width: 100%; height: 46px; padding: 0 44px 0 40px;
    border: 1px solid var(--pp-line); border-radius: 11px;
    background: var(--pp-field); color: var(--pp-ink);
    font: 500 14.5px var(--pp-font);
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.si-input::placeholder { color: var(--pp-faint); font-weight: 400; }
.si-input:hover { border-color: color-mix(in srgb, var(--pp-brand) 30%, var(--pp-line)); }
.si-input:focus { outline: none; background: var(--pp-field-focus); border-color: var(--pp-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--pp-brand) 18%, transparent); }
.si-input-wrap:focus-within > i { color: var(--pp-brand); }
.si-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: transparent; color: var(--pp-muted); cursor: pointer; font-size: 17px; }
.si-eye:hover { background: var(--pp-brand-soft); color: var(--pp-brand-ink); }
.si-eye:focus-visible { outline: 2px solid var(--pp-brand); outline-offset: 1px; }
.si-caps { display: none; align-items: center; gap: 5px; margin-top: 7px; font-size: 12px; font-weight: 600; color: var(--pp-warn); }
.si-caps.is-on { display: flex; }

.si-submit {
    position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; height: 48px; margin-top: 6px;
    border: 0; border-radius: 11px; cursor: pointer;
    background: linear-gradient(120deg, var(--pp-blue), var(--pp-violet));
    color: #fff; font: 600 15px var(--pp-font);
    box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .75);
    transition: transform .15s var(--pp-ease), box-shadow .15s, filter .15s;
}
.si-submit::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); transform: translateX(-100%); }
.si-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 28px -10px rgba(99, 102, 241, .85); }
.si-submit:hover::after { animation: siSheen 1s var(--pp-ease); }
.si-submit:active { transform: none; filter: brightness(.96); }
.si-submit:focus-visible { outline: 3px solid color-mix(in srgb, var(--pp-brand) 45%, transparent); outline-offset: 2px; }
.si-submit i { font-size: 17px; transition: transform .2s var(--pp-ease); }
.si-submit:hover i { transform: translateX(3px); }
.si-submit .si-spin { display: none; width: 17px; height: 17px; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: siSpin .7s linear infinite; }
.si-submit.is-busy { pointer-events: none; filter: saturate(.85); }
.si-submit.is-busy .si-spin { display: block; }
.si-submit.is-busy i { display: none; }

.si-card > p.si-help { margin: 18px 0 0; text-align: center; font-size: 12.5px; color: var(--pp-muted); }

.si-foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--pp-muted); }
.si-foot i { font-size: 15px; color: var(--pp-ok); }

/* ---------- showcase side ---------- */
.si-show {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    padding: 56px clamp(32px, 6vw, 88px);
    background: linear-gradient(135deg, #2f6fe0 0%, #5a55ea 48%, #7b54f1 100%);
    color: #fff;
}
.si-show::before {   /* dot grid */
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1.4px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.si-orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; animation: siDrift 18s ease-in-out infinite alternate; }
.si-orb.o1 { width: 420px; height: 420px; top: -120px; right: -80px; background: #43c6fa; }
.si-orb.o2 { width: 360px; height: 360px; bottom: -140px; left: -60px; background: #b16cff; animation-delay: -6s; }
.si-orb.o3 { width: 220px; height: 220px; top: 45%; left: 55%; background: #6f8bff; animation-delay: -11s; opacity: .4; }

.si-show-in { position: relative; z-index: 1; max-width: 520px; }
.si-kicker { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 12px; font-weight: 600; letter-spacing: .04em; backdrop-filter: blur(6px); }
.si-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: #5df2b3; box-shadow: 0 0 0 0 rgba(93, 242, 179, .7); animation: siPulse 2s ease-out infinite; }
.si-show h2 { margin: 18px 0 12px; font-size: clamp(30px, 3.2vw, 44px); line-height: 1.08; font-weight: 700; letter-spacing: -.025em; text-wrap: balance; }
.si-show-in > p { margin: 0 0 34px; max-width: 440px; font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, .82); }

.si-tiles { display: grid; gap: 12px; }
.si-tile {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 15px 16px; border-radius: 14px;
    background: rgba(255, 255, 255, .11); border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 18px 40px -24px rgba(10, 12, 40, .55);
    animation: siRise .7s var(--pp-ease) both, siFloat 7s ease-in-out infinite;
}
.si-tile:nth-child(1) { animation-delay: .15s, 0s; }
.si-tile:nth-child(2) { animation-delay: .27s, -2.3s; margin-left: 28px; }
.si-tile:nth-child(3) { animation-delay: .39s, -4.6s; margin-left: 8px; }
.si-tile-ic { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: rgba(255, 255, 255, .95); color: #5a55ea; font-size: 19px; }
.si-tile b { display: block; margin-bottom: 2px; font-size: 14.5px; font-weight: 600; }
.si-tile div > span { font-size: 13px; line-height: 1.45; color: rgba(255, 255, 255, .8); }

/* ---------- motion ---------- */
@keyframes siRise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes siFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
@keyframes siDrift { from { transform: translate(0, 0) scale(1); } to { transform: translate(-40px, 30px) scale(1.12); } }
@keyframes siPulse { 0% { box-shadow: 0 0 0 0 rgba(93, 242, 179, .6); } 70%, 100% { box-shadow: 0 0 0 8px rgba(93, 242, 179, 0); } }
@keyframes siSpin { to { transform: rotate(360deg); } }
@keyframes siSheen { to { transform: translateX(100%); } }
@keyframes siShake { 0% { transform: translateX(0); } 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } 100% { transform: none; } }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- narrow screens: the showcase becomes a short band above the form ---------- */
@media (max-width: 900px) {
    .si-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
    .si-show { order: -1; padding: 28px max(20px, env(safe-area-inset-left, 0px)) 26px; }
    .si-show h2 { margin: 12px 0 0; font-size: 24px; }
    .si-show-in > p, .si-tiles { display: none; }
    .si-form-side { gap: 24px; }
    .si-main { align-items: flex-start; }
}
@media (max-width: 420px) {
    .si-card h1 { font-size: 24px; }
}
