/* ---------- artifis dashboard / apple-vision aesthetic ----------
 * Frosted glass panels, soft auroral background, generous whitespace.
 * Cool palette: deep blue-black background, white text, soft sky/violet glows.
 * No build step — plain CSS with custom properties.
 * ----------------------------------------------------------------- */

:root {
    --bg-0: #06070d;
    --bg-1: #0b0d18;
    --ink-0: rgba(255, 255, 255, 0.96);
    --ink-1: rgba(255, 255, 255, 0.74);
    --ink-2: rgba(255, 255, 255, 0.52);
    --ink-3: rgba(255, 255, 255, 0.32);
    --glass: rgba(255, 255, 255, 0.05);
    --glass-strong: rgba(255, 255, 255, 0.08);
    --stroke: rgba(255, 255, 255, 0.10);
    --stroke-strong: rgba(255, 255, 255, 0.18);

    --accent-sky:    #8fc7ff;
    --accent-violet: #c1a8ff;
    --accent-rose:   #ffb4d8;
    --accent-mint:   #b9f3d8;
    --danger:        #ff8a9b;

    --radius-lg: 28px;
    --radius-md: 18px;
    --radius-sm: 10px;

    --shadow-lift: 0 30px 80px -30px rgba(0, 0, 0, 0.6),
                   0 0 0 1px rgba(255, 255, 255, 0.04) inset;

    --font-ui: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', ui-monospace, Menlo, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { height: 100%; }

body {
    min-height: 100vh;
    background: var(--bg-0);
    color: var(--ink-0);
    font-family: var(--font-ui);
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
    letter-spacing: -0.005em;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

/* ---------- ambient background ---------- */

.aurora {
    position: fixed; inset: 0;
    z-index: -2;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, #131b35 0%, transparent 60%),
        linear-gradient(180deg, #07091a 0%, #04050c 100%);
}

.aurora-blob {
    position: absolute;
    width: 60vmax; height: 60vmax;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.45;
    mix-blend-mode: screen;
    will-change: transform;
}

.aurora-blob.a1 { background: radial-gradient(circle, #5b9bff 0%, transparent 60%); top: -25%; left: -15%; animation: drift1 28s ease-in-out infinite alternate; }
.aurora-blob.a2 { background: radial-gradient(circle, #b58cff 0%, transparent 60%); bottom: -25%; right: -10%; animation: drift2 36s ease-in-out infinite alternate; }
.aurora-blob.a3 { background: radial-gradient(circle, #ff9bce 0%, transparent 60%); top: 30%; left: 50%; transform: translate(-50%, -50%); opacity: 0.28; animation: drift3 42s ease-in-out infinite alternate; }

@keyframes drift1 { from { transform: translate(0,0) scale(1); } to { transform: translate(8vw, 6vh) scale(1.1); } }
@keyframes drift2 { from { transform: translate(0,0) scale(1); } to { transform: translate(-10vw, -4vh) scale(1.05); } }
@keyframes drift3 { from { transform: translate(-50%,-50%) scale(1); } to { transform: translate(-45%,-55%) scale(1.15); } }

.grain {
    position: absolute; inset: 0;
    opacity: 0.06;
    pointer-events: none;
    background-image:
        repeating-radial-gradient(circle at 50% 50%, rgba(255,255,255,0.4) 0 1px, transparent 1px 4px);
    mix-blend-mode: overlay;
}

/* ---------- shared glass panel ---------- */

.panel {
    position: relative;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(40px) saturate(140%);
    -webkit-backdrop-filter: blur(40px) saturate(140%);
    box-shadow: var(--shadow-lift);
    padding: 28px;
    overflow: hidden;
}

.panel::before {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    background: linear-gradient(180deg, rgba(255,255,255,0.06) 0%, transparent 35%);
    pointer-events: none;
}

.panel-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 400;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 8px;
}

.panel-title {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.hairline {
    border: 0;
    height: 1px;
    background: var(--stroke);
    margin: 18px 0;
}

.muted { color: var(--ink-2); }
.small { font-size: 12px; }
.hidden { display: none !important; }

/* ---------- topbar ---------- */

.topbar {
    position: sticky; top: 0;
    z-index: 10;
    display: flex; justify-content: space-between; align-items: center;
    padding: 22px 36px;
    gap: 18px;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
    width: 18px; height: 18px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 30% 30%, #fff 0%, rgba(143,199,255,0.9) 40%, rgba(193,168,255,0.5) 75%, transparent 100%);
    box-shadow: 0 0 18px rgba(143, 199, 255, 0.55);
}
.brand-text {
    font-weight: 500;
    letter-spacing: -0.01em;
    color: var(--ink-0);
}

.topbar-right { display: flex; align-items: center; gap: 12px; }

.icon-button {
    position: relative;
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: 12px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    color: var(--ink-1);
    cursor: pointer;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}
.icon-button:hover { background: var(--glass-strong); color: var(--ink-0); transform: translateY(-1px); }

.icon { width: 18px; height: 18px; }
.icon.sm { width: 14px; height: 14px; }

.dot {
    position: absolute; top: 7px; right: 7px;
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--accent-rose);
    box-shadow: 0 0 10px var(--accent-rose);
}

.userpill {
    display: flex; align-items: center; gap: 10px;
    padding: 5px 6px 5px 12px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: 999px;
}
.user-name {
    font-size: 13px;
    color: var(--ink-1);
    padding-right: 4px;
}
.avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-sky), var(--accent-violet));
    color: #06070d;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex; align-items: center; justify-content: center;
    background-size: cover; background-position: center;
}

/* ---------- stage / grid ---------- */

.stage {
    display: grid;
    gap: 22px;
    padding: 8px 36px 28px;
    grid-template-columns: 320px 1fr 360px;
    grid-template-rows: auto auto;
    grid-template-areas:
        "clock core mail"
        "apps  apps apps";
    max-width: 1500px;
    margin: 0 auto;
}

.panel-clock { grid-area: clock; }
.panel-core  { grid-area: core; min-height: 520px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; }
.panel-mail  { grid-area: mail; }
.panel-apps  { grid-area: apps; }

@media (max-width: 1180px) {
    .stage {
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "core core"
            "clock mail"
            "apps  apps";
    }
    .panel-core { min-height: 440px; }
}
@media (max-width: 720px) {
    .topbar { padding: 16px 18px; }
    .stage {
        padding: 4px 16px 24px;
        grid-template-columns: 1fr;
        grid-template-areas: "core" "clock" "mail" "apps";
    }
    .panel { padding: 22px; }
    .user-name { display: none; }
}

/* ---------- clock panel ---------- */

.big-time {
    font-family: var(--font-mono);
    font-size: 62px;
    font-weight: 300;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--ink-0);
    display: inline-block;
}
.big-time-seconds {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 300;
    color: var(--ink-3);
    margin-left: 6px;
    vertical-align: top;
    display: inline-block;
}
.med-time {
    font-family: var(--font-mono);
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: var(--ink-1);
    margin-top: 2px;
}
.date-line {
    margin-top: 8px;
    font-size: 13px;
    color: var(--ink-1);
    letter-spacing: -0.005em;
}

.greeting {
    font-size: 15px;
    color: var(--ink-1);
}
.greet-name {
    color: var(--ink-0);
    font-weight: 500;
}

/* ---------- core / AI brain ---------- */

.core-wrap {
    position: relative;
    width: 280px; height: 280px;
    display: flex; align-items: center; justify-content: center;
}

.core-rings {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
}

.ring {
    position: absolute;
    border: 1px solid var(--stroke);
    border-radius: 50%;
}

.ring.r1 { width: 100%; height: 100%; border-color: rgba(255,255,255,0.07); animation: spin 80s linear infinite; }
.ring.r2 { width: 78%; height: 78%; border-color: rgba(143,199,255,0.12); animation: spin 50s linear infinite reverse; }
.ring.r3 { width: 56%; height: 56%; border-color: rgba(193,168,255,0.18); animation: spin 30s linear infinite; }

.ring.r1::before, .ring.r2::before, .ring.r3::before {
    content: '';
    position: absolute;
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent-sky);
    box-shadow: 0 0 14px var(--accent-sky);
    top: -3px; left: 50%; transform: translateX(-50%);
}
.ring.r2::before { background: var(--accent-violet); box-shadow: 0 0 14px var(--accent-violet); }
.ring.r3::before { background: var(--accent-rose);   box-shadow: 0 0 14px var(--accent-rose); }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

.core-orb {
    position: relative;
    width: 170px; height: 170px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.0) 35%),
        radial-gradient(circle at 50% 50%, #c1a8ff 0%, #8fc7ff 35%, #4a6fb5 70%, #1a2545 100%);
    box-shadow:
        0 0 60px rgba(143, 199, 255, 0.5),
        0 0 140px rgba(193, 168, 255, 0.35),
        inset 0 0 40px rgba(0,0,0,0.4);
    animation: orbPulse 6s ease-in-out infinite;
}
.core-orb.sm { width: 110px; height: 110px; }

.orb-inner {
    position: absolute; inset: 18%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 40% 35%, rgba(255,255,255,0.6), transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(255, 180, 216, 0.5), transparent 60%);
    filter: blur(8px);
    opacity: 0.85;
    animation: orbInner 8s ease-in-out infinite alternate;
}

.orb-shimmer {
    position: absolute; inset: 0;
    border-radius: 50%;
    background:
        conic-gradient(from 0deg, transparent 0deg, rgba(255,255,255,0.18) 30deg, transparent 90deg, transparent 360deg);
    mix-blend-mode: screen;
    animation: spin 14s linear infinite;
    opacity: 0.6;
}

@keyframes orbPulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 60px rgba(143,199,255,0.5), 0 0 140px rgba(193,168,255,0.35), inset 0 0 40px rgba(0,0,0,0.4); }
    50%      { transform: scale(1.04); box-shadow: 0 0 80px rgba(143,199,255,0.65), 0 0 180px rgba(193,168,255,0.5), inset 0 0 40px rgba(0,0,0,0.4); }
}
@keyframes orbInner {
    from { transform: rotate(0deg); }
    to   { transform: rotate(15deg); }
}

.core-caption {
    text-align: center;
    margin-top: -6px;
}

.core-status {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.32em;
    color: var(--ink-2);
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--stroke);
    background: var(--glass);
}

.summary-btn {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(143,199,255,0.18), rgba(193,168,255,0.18));
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--ink-0);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
    box-shadow: 0 10px 30px -10px rgba(143,199,255,0.4);
}
.summary-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, rgba(143,199,255,0.28), rgba(193,168,255,0.28));
}

.core-hint { text-align: center; margin-top: -10px; }

/* ---------- mail panel ---------- */

.mail-content { display: flex; flex-direction: column; gap: 18px; }

.mailbox-block { }
.mailbox-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}
.mailbox-name {
    font-size: 13px;
    color: var(--ink-1);
    font-weight: 500;
}
.mailbox-email {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-3);
    margin-left: 8px;
}
.mailbox-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--ink-1);
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
}
.mailbox-count.has-unread {
    color: #06070d;
    background: linear-gradient(135deg, var(--accent-sky), var(--accent-violet));
    border-color: transparent;
    font-weight: 600;
}

.mail-list { display: flex; flex-direction: column; gap: 1px; background: var(--stroke); border-radius: var(--radius-sm); overflow: hidden; }
.mail-row {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px;
    background: rgba(11, 13, 24, 0.55);
    font-size: 12.5px;
}
.mail-row.unread { background: rgba(143,199,255,0.06); }
.mail-row .from { color: var(--ink-1); flex: 0 0 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.mail-row.unread .from { color: var(--ink-0); }
.mail-row .subject { color: var(--ink-1); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-row.unread .subject { color: var(--ink-0); }
.mail-row .when { color: var(--ink-3); font-family: var(--font-mono); font-size: 10.5px; flex: 0 0 auto; }

.mail-empty { color: var(--ink-3); font-size: 12px; padding: 6px 2px; font-family: var(--font-mono); letter-spacing: 0.06em; }
.mail-error { color: var(--danger); font-size: 12px; padding: 6px 2px; }

.badge {
    display: inline-flex; align-items: center; justify-content: center;
    margin-left: 8px;
    min-width: 22px; height: 22px; padding: 0 7px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-sky), var(--accent-violet));
    color: #06070d;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
}

/* ---------- app launcher ---------- */

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.app-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px 18px;
    background: var(--glass);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-md);
    transition: transform .2s ease, background .2s ease, border-color .2s ease;
    overflow: hidden;
}
.app-tile::after {
    content: '';
    position: absolute; inset: -1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(143,199,255,0.2), rgba(193,168,255,0.2));
    opacity: 0;
    transition: opacity .25s ease;
    z-index: -1;
}
.app-tile:hover {
    transform: translateY(-2px);
    background: var(--glass-strong);
    border-color: var(--stroke-strong);
}
.app-tile:hover::after { opacity: 0.4; }

.app-icon {
    display: inline-flex;
    align-items: center; justify-content: center;
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(143,199,255,0.15), rgba(193,168,255,0.15));
    color: var(--ink-0);
    border: 1px solid var(--stroke);
}
.app-icon .icon { width: 20px; height: 20px; }
.app-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--ink-0);
    letter-spacing: -0.005em;
}

.app-badge {
    position: absolute; top: 14px; right: 14px;
    min-width: 22px; height: 22px; padding: 0 7px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 999px;
    background: var(--accent-rose);
    color: #06070d;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 0 18px rgba(255, 180, 216, 0.45);
}

/* ---------- modal / drawer ---------- */

.modal, .drawer {
    position: fixed; inset: 0;
    z-index: 50;
    display: flex;
}
/* The HTML `hidden` attribute would normally set display:none, but the rule
 * above wins on specificity — re-assert it here so the overlays really hide.
 * Without this they sit on top of the dashboard and block every click. */
.modal[hidden], .drawer[hidden] { display: none !important; }
.modal-backdrop, .drawer-backdrop {
    position: absolute; inset: 0;
    background: rgba(4, 5, 12, 0.55);
    backdrop-filter: blur(8px);
}
.modal { align-items: center; justify-content: center; padding: 22px; }
.modal-card { position: relative; width: min(560px, 100%); max-height: 80vh; overflow-y: auto; }
.modal-close, .drawer-close {
    width: 32px; height: 32px;
    font-size: 18px;
    line-height: 1;
}

.drawer { justify-content: flex-end; padding: 12px; }
.drawer-card {
    position: relative;
    width: min(420px, 100%);
    height: calc(100vh - 24px);
    display: flex; flex-direction: column;
    padding: 24px;
}

.summary-body { display: flex; flex-direction: column; gap: 10px; }
.summary-line {
    padding: 12px 14px;
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    color: var(--ink-0);
    font-size: 14px;
    opacity: 0;
    transform: translateY(4px);
    animation: lineIn .35s ease forwards;
}
@keyframes lineIn { to { opacity: 1; transform: translateY(0); } }

.summary-footer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--stroke);
}

/* ---------- speak button (voice readout) ---------- */

.header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.speak-btn {
    position: relative;
    width: 38px; height: 38px;
    border-radius: 12px;
    overflow: visible;
}

.speak-btn .speak-icon-play,
.speak-btn .speak-icon-stop {
    position: absolute; inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .2s ease, transform .2s ease;
}
.speak-btn .speak-icon-play .icon { width: 18px; height: 18px; }
.speak-btn .speak-icon-stop .icon { width: 14px; height: 14px; color: var(--accent-rose); }

/* idle: show play, hide stop */
.speak-btn[data-state="idle"] .speak-icon-play { opacity: 1; transform: scale(1); }
.speak-btn[data-state="idle"] .speak-icon-stop { opacity: 0; transform: scale(.7); pointer-events: none; }

/* speaking: hide play, show stop, soft active glow */
.speak-btn[data-state="speaking"] {
    background: linear-gradient(135deg, rgba(143,199,255,0.25), rgba(193,168,255,0.25));
    border-color: rgba(143, 199, 255, 0.4);
    box-shadow: 0 0 0 4px rgba(143, 199, 255, 0.12);
}
.speak-btn[data-state="speaking"] .speak-icon-play { opacity: 0; transform: scale(.7); pointer-events: none; }
.speak-btn[data-state="speaking"] .speak-icon-stop { opacity: 1; transform: scale(1); }

/* waveform sits just under the button when speaking — four bars rising/falling */
.speak-wave {
    position: absolute;
    left: 50%;
    top: calc(100% + 6px);
    transform: translateX(-50%);
    display: none;
    gap: 3px;
    height: 10px;
    align-items: end;
    pointer-events: none;
}
.speak-btn[data-state="speaking"] .speak-wave { display: inline-flex; }
.speak-wave i {
    display: inline-block;
    width: 2px;
    background: var(--accent-sky);
    border-radius: 2px;
    box-shadow: 0 0 6px rgba(143,199,255,.6);
    animation: wave 0.9s ease-in-out infinite;
}
.speak-wave i:nth-child(1) { height: 50%; animation-delay: -0.4s; }
.speak-wave i:nth-child(2) { height: 100%; animation-delay: -0.2s; background: var(--accent-violet); }
.speak-wave i:nth-child(3) { height: 70%;  animation-delay: -0.1s; }
.speak-wave i:nth-child(4) { height: 40%;  animation-delay:  0s;   background: var(--accent-rose); }

@keyframes wave {
    0%, 100% { transform: scaleY(0.4); }
    50%      { transform: scaleY(1); }
}

.speak-meta {
    margin-top: 10px;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.05em;
    color: var(--ink-3);
}
@media (prefers-reduced-motion: reduce) {
    .speak-wave i { animation: none !important; }
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    margin: 0 -8px;
    padding: 0 8px;
    display: flex; flex-direction: column; gap: 8px;
}
.notif-item {
    padding: 12px 14px;
    background: var(--glass-strong);
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column; gap: 4px;
}
.notif-item.unread { border-left: 2px solid var(--accent-sky); }
.notif-meta {
    display: flex; justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.06em;
    color: var(--ink-3);
    text-transform: uppercase;
}
.notif-title { font-size: 13px; font-weight: 500; color: var(--ink-0); }
.notif-body  { font-size: 12px; color: var(--ink-2); }
.notif-empty { color: var(--ink-3); font-size: 13px; padding: 20px 4px; text-align: center; font-family: var(--font-mono); letter-spacing: 0.06em; }

.drawer-footer { margin-top: 14px; }

.ghost-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--stroke);
    border-radius: var(--radius-sm);
    color: var(--ink-1);
    cursor: pointer;
    font-size: 13px;
    transition: background .2s ease, color .2s ease;
}
.ghost-btn:hover { background: var(--glass); color: var(--ink-0); }

/* ---------- loading ---------- */

.loading-row {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink-2);
    font-family: var(--font-mono);
    font-size: 12px;
    letter-spacing: 0.04em;
    padding: 12px 4px;
}
.spinner {
    width: 14px; height: 14px;
    border-radius: 50%;
    border: 1.5px solid var(--stroke);
    border-top-color: var(--accent-sky);
    animation: spin 0.9s linear infinite;
    display: inline-block;
}

/* ---------- footer ---------- */
.footer {
    text-align: center;
    padding: 16px 24px 28px;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}

/* ---------- auth page ---------- */

.auth-body { display: flex; }
.auth-stage {
    flex: 1;
    min-height: 100vh;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 36px;
    padding: 40px 18px;
}

.login-orb {
    position: relative;
    width: 200px; height: 200px;
    display: flex; align-items: center; justify-content: center;
}
.login-orb .ring.r1 { width: 100%; height: 100%; }
.login-orb .ring.r2 { width: 70%; height: 70%; }

.auth-card {
    width: min(420px, 100%);
    padding: 36px 32px;
}
.auth-title {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.field { display: flex; flex-direction: column; gap: 6px; margin-top: 18px; }
.field-label {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ink-3);
}
.field input {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    background: rgba(11, 13, 24, 0.6);
    border: 1px solid var(--stroke);
    color: var(--ink-0);
    font-size: 15px;
    font-family: var(--font-ui);
    transition: border-color .2s ease, background .2s ease;
}
.field input:focus {
    outline: none;
    border-color: rgba(143, 199, 255, 0.5);
    background: rgba(11, 13, 24, 0.85);
    box-shadow: 0 0 0 4px rgba(143, 199, 255, 0.1);
}

.primary-btn {
    width: 100%;
    margin-top: 22px;
    padding: 14px 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--accent-sky), var(--accent-violet));
    color: #06070d;
    font-weight: 600;
    font-size: 14px;
    border: 0;
    cursor: pointer;
    transition: transform .2s ease, filter .2s ease;
    box-shadow: 0 18px 40px -16px rgba(143, 199, 255, 0.7);
}
.primary-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }

.error-row {
    margin-top: 14px;
    padding: 10px 14px;
    background: rgba(255, 138, 155, 0.1);
    border: 1px solid rgba(255, 138, 155, 0.3);
    border-radius: var(--radius-sm);
    color: var(--danger);
    font-size: 13px;
}

/* ---------- accessibility / reduce motion ---------- */

@media (prefers-reduced-motion: reduce) {
    .aurora-blob, .ring, .orb-shimmer, .core-orb, .orb-inner { animation: none !important; }
}
