@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b0912;
  --bg-soft: #100d19;
  --panel: #151121;
  --panel-2: #1b152b;
  --panel-3: #211a34;
  --line: rgba(229, 221, 255, .11);
  --line-strong: rgba(229, 221, 255, .2);
  --text: #f4f0ff;
  --muted: #a9a1bf;
  --muted-2: #736b89;
  --violet: #9974ff;
  --violet-bright: #b79bff;
  --violet-deep: #5c3bc0;
  --pink: #ee73bf;
  --green: #73e3b0;
  --orange: #f0b36d;
  --red: #ff879f;
  --ease: cubic-bezier(.23, 1, .32, 1);
  --sidebar-width: 254px;
  --topbar-height: 76px;
  --radius: 18px;
  font-family: 'Manrope', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: radial-gradient(circle at 90% 5%, rgba(91, 54, 183, .1), transparent 30rem), var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
button:not(:disabled) { cursor: pointer; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 3px; }
::selection { background: rgba(153, 116, 255, .35); }

.icon { display: inline-flex; width: 1.2em; height: 1.2em; align-items: center; justify-content: center; line-height: 1; font-family: 'DM Mono', monospace; }
.brand { display: inline-flex; align-items: center; gap: 10px; letter-spacing: -.04em; font-size: 20px; font-weight: 800; }
.brand-mark { display: inline-flex; width: 30px; height: 30px; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,.34); border-radius: 9px; background: linear-gradient(135deg, #a57fff, #6c3ddd); box-shadow: 0 6px 22px rgba(118, 73, 255, .34); color: white; font-size: 17px; font-weight: 800; }
.eyebrow { margin: 0 0 9px; color: var(--violet-bright); font-family: 'DM Mono', monospace; font-size: 10px; font-weight: 500; letter-spacing: .14em; line-height: 1.5; }

.training-badge { position: fixed; z-index: 40; right: 18px; bottom: 15px; padding: 6px 10px; border: 1px solid rgba(183, 155, 255, .23); border-radius: 999px; background: rgba(21, 17, 33, .84); color: #c6b6ed; font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .03em; backdrop-filter: blur(12px); }
.toast-region { position: fixed; z-index: 90; top: 18px; right: 18px; display: flex; width: min(380px, calc(100vw - 32px)); flex-direction: column; gap: 10px; pointer-events: none; }
.toast { padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 12px; background: #211a32; box-shadow: 0 16px 35px rgba(0,0,0,.28); color: var(--text); font-size: 13px; animation: toast-in .25s var(--ease); }
.toast-success { border-color: rgba(115,227,176,.35); }
.toast-error { border-color: rgba(255,135,159,.4); }
@keyframes toast-in { from { transform: translateY(-8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.boot-screen { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 16px; background: radial-gradient(circle at 50% 40%, rgba(111, 72, 213, .16), transparent 30rem), var(--bg); }
.boot-screen .brand { margin-bottom: 12px; }
.boot-screen p { margin: 0; color: var(--muted); font-size: 13px; }
.boot-spinner { width: 25px; height: 25px; border: 2px solid rgba(183,155,255,.18); border-top-color: var(--violet-bright); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(430px, 46%); background: #0d0a16; }
.auth-visual { position: relative; display: flex; min-height: 100vh; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 48px clamp(38px, 7vw, 112px); background: radial-gradient(ellipse at 25% 20%, rgba(137, 96, 255, .38), transparent 24rem), radial-gradient(ellipse at 75% 75%, rgba(195, 72, 169, .13), transparent 30rem), linear-gradient(155deg, #171025, #0e0b17 65%); }
.auth-visual::after { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px); background-size: 46px 46px; content: ''; mask-image: linear-gradient(to bottom, #000, transparent 80%); pointer-events: none; }
.auth-visual > *:not(.auth-visual-orbit) { position: relative; z-index: 1; }
.auth-visual-copy { max-width: 560px; margin: auto 0; }
.auth-visual-copy h1 { max-width: 570px; margin: 0 0 22px; font-size: clamp(48px, 6vw, 82px); letter-spacing: -.075em; line-height: .98; }
.auth-visual-copy > p:not(.eyebrow) { max-width: 460px; margin: 0; color: #bdb3d4; font-size: 16px; line-height: 1.7; }
.feature-stack { display: grid; gap: 14px; margin-top: 44px; }
.feature-line { display: flex; align-items: center; gap: 12px; color: #ddd5ed; font-size: 13px; }
.feature-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--violet-bright); box-shadow: 0 0 15px var(--violet); }
.auth-visual-orbit { position: absolute; z-index: 0; border: 1px solid rgba(184, 150, 255, .13); border-radius: 50%; transform: rotate(-24deg); }
.orbit-one { width: 500px; height: 170px; right: -80px; bottom: 20%; }
.orbit-two { width: 600px; height: 240px; right: -150px; bottom: 12%; }
.auth-panel { display: grid; min-height: 100vh; place-items: center; padding: 42px; background: #0b0912; }
.auth-card { width: min(100%, 420px); }
.auth-mobile-brand { display: none; }
.auth-heading { margin-bottom: 30px; }
.auth-heading h2 { margin: 0 0 10px; font-size: 31px; letter-spacing: -.06em; }
.auth-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.auth-tabs { display: flex; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.auth-tab { position: relative; padding: 12px 0; margin-right: 23px; border: 0; background: transparent; color: var(--muted-2); font-size: 13px; }
.auth-tab.active { color: var(--text); }
.auth-tab.active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--violet-bright); content: ''; }
.auth-form { display: grid; gap: 16px; }
.field { display: grid; gap: 8px; color: #c1b8d1; font-size: 11px; font-weight: 600; letter-spacing: .01em; }
.field input { width: 100%; min-height: 49px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #110d1b; color: var(--text); font-size: 13px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.field input::placeholder { color: #5f5871; }
.field input:focus { border-color: rgba(183,155,255,.75); box-shadow: 0 0 0 4px rgba(153,116,255,.11); outline: none; }
.form-hint { margin: -3px 0 1px; color: var(--muted-2); font-size: 11px; line-height: 1.55; }
.auth-footnote { display: flex; align-items: center; gap: 7px; margin: 26px 0 0; color: var(--muted-2); font-size: 11px; line-height: 1.5; }

.button { display: inline-flex; min-height: 43px; align-items: center; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-size: 12px; font-weight: 700; transition: transform .16s var(--ease), border-color .18s var(--ease), background .18s var(--ease), color .18s var(--ease); }
.button:active { transform: scale(.97); }
.button:disabled { cursor: not-allowed; opacity: .45; }
.button-primary { background: linear-gradient(110deg, #9f7bff, #7449df); box-shadow: 0 9px 25px rgba(111, 66, 217, .22); color: white; }
.button-primary:hover:not(:disabled) { background: linear-gradient(110deg, #b092ff, #8158ee); }
.button-secondary { border-color: rgba(184,155,255,.38); background: rgba(153,116,255,.08); color: var(--violet-bright); }
.button-secondary:hover:not(:disabled) { border-color: rgba(184,155,255,.7); background: rgba(153,116,255,.15); }
.button-quiet { border-color: var(--line); background: transparent; color: var(--muted); }
.button-quiet:hover:not(:disabled) { border-color: var(--line-strong); background: rgba(255,255,255,.035); color: var(--text); }
.button-wide { width: 100%; min-height: 53px; margin-top: 8px; }
.button-arrow { margin-left: auto; font-family: 'DM Mono', monospace; font-size: 17px; }
.button-small { min-height: 36px; padding: 0 11px; font-size: 11px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 20; top: 0; bottom: 0; left: 0; display: flex; width: var(--sidebar-width); flex-direction: column; padding: 27px 17px 20px; border-right: 1px solid var(--line); background: rgba(13, 10, 21, .9); }
.sidebar-brand { padding: 0 12px; }
.sidebar-kicker { margin: 54px 12px 14px; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .13em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { display: flex; width: 100%; min-height: 44px; align-items: center; gap: 12px; padding: 0 13px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted); text-align: left; font-size: 12px; transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease); }
.nav-item .icon { color: var(--muted-2); font-size: 17px; }
.nav-item:hover { background: rgba(255,255,255,.035); color: var(--text); }
.nav-item.active { border-color: rgba(157,122,255,.18); background: rgba(153,116,255,.12); color: var(--text); }
.nav-item.active .icon { color: var(--violet-bright); }
.nav-lock { margin-left: auto; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 8px; letter-spacing: .04em; }
.sidebar-spacer { flex: 1; }
.sidebar-foot { padding: 16px 12px 20px; border-top: 1px solid var(--line); }
.slot-label { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: 10px; }
.slot-label strong { color: var(--text); font-family: 'DM Mono', monospace; font-weight: 500; }
.sidebar-foot > p { margin: 9px 0 0; color: var(--muted-2); font-size: 10px; }
.sidebar-user { display: flex; width: 100%; align-items: center; gap: 9px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; text-align: left; }
.sidebar-user:hover { background: rgba(255,255,255,.04); }
.sidebar-user-info { display: grid; flex: 1; gap: 3px; overflow: hidden; }
.sidebar-user-info strong { overflow: hidden; color: #ddd6ea; font-size: 11px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info small { color: var(--muted-2); font-size: 10px; }
.sidebar-user > .icon { color: var(--muted-2); }
.main-column { min-height: 100vh; margin-left: var(--sidebar-width); }
.topbar { display: flex; height: var(--topbar-height); align-items: center; justify-content: space-between; padding: 0 42px; border-bottom: 1px solid var(--line); background: rgba(11,9,18,.68); backdrop-filter: blur(15px); }
.mobile-brand { display: none; }
.topbar-context { display: flex; align-items: center; gap: 8px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .03em; }
.context-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 13px rgba(115,227,176,.75); }
.topbar-avatar { padding: 0; border: 0; border-radius: 50%; background: none; }
.main-content { width: min(100%, 1280px); margin: 0 auto; padding: 52px 42px 80px; }
.page { display: grid; gap: 35px; }
.page-header { display: flex; min-height: 76px; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-header h1 { margin: 0; font-size: clamp(28px, 3vw, 39px); letter-spacing: -.07em; line-height: 1.08; }
.page-description { max-width: 650px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; }
.metric-card { display: flex; min-height: 124px; align-items: flex-start; gap: 14px; padding: 21px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(140deg, rgba(32,24,51,.85), rgba(19,15,30,.85)); }
.metric-icon { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid rgba(183,155,255,.24); border-radius: 11px; background: rgba(153,116,255,.11); color: var(--violet-bright); font-size: 19px; }
.metric-card p { margin: 2px 0 7px; color: var(--muted); font-size: 11px; }
.metric-card strong { display: block; color: var(--text); font-family: 'DM Mono', monospace; font-size: 26px; font-weight: 500; letter-spacing: -.08em; }
.metric-card small { display: block; margin-top: 4px; color: var(--muted-2); font-size: 10px; }
.section-block { min-width: 0; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
.section-heading h2 { margin: 0; font-size: 19px; letter-spacing: -.05em; }
.section-description { max-width: 580px; margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.section-count { flex: 0 0 auto; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 10px; }
.profile-cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.profile-card { position: relative; display: grid; min-height: 192px; gap: 20px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, #1b152d, #130f1f); text-align: left; transition: border-color .18s var(--ease), transform .18s var(--ease), background .18s var(--ease); }
.profile-card:hover { border-color: rgba(183,155,255,.4); background: linear-gradient(145deg, #211a37, #171126); transform: translateY(-2px); }
.profile-card-top, .profile-identity, .job-line, .profile-card-meta { display: flex; align-items: center; justify-content: space-between; }
.profile-orb { display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid rgba(183,155,255,.3); border-radius: 50%; background: radial-gradient(circle at 35% 30%, #bd9dff, #5030a2); color: white; font-family: 'DM Mono', monospace; font-size: 13px; box-shadow: 0 5px 16px rgba(96,52,214,.25); }
.status-pill { padding: 5px 8px; border-radius: 999px; font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .02em; }
.status-idle { background: rgba(115,227,176,.1); color: var(--green); }
.status-live { background: rgba(240,179,109,.11); color: var(--orange); }
.status-error { background: rgba(255,135,159,.1); color: var(--red); }
.profile-identity { justify-content: flex-start; gap: 12px; }
.profile-at { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: rgba(255,255,255,.04); color: var(--muted); font-family: 'DM Mono', monospace; }
.profile-identity strong { display: block; margin-bottom: 4px; font-size: 15px; letter-spacing: -.03em; }
.profile-identity small { display: block; color: var(--muted-2); font-size: 10px; }
.profile-job { display: grid; gap: 9px; }
.job-line { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.job-line strong { color: var(--violet-bright); font-weight: 500; }
.profile-job small { color: var(--muted-2); font-size: 10px; }
.profile-card-meta { justify-content: flex-start; gap: 6px; color: var(--muted-2); font-size: 10px; }
.profile-card-meta strong { color: var(--violet-bright); font-family: 'DM Mono', monospace; font-size: 16px; font-weight: 500; }
.card-arrow { position: absolute; right: 20px; bottom: 18px; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 16px; transition: transform .18s var(--ease), color .18s var(--ease); }
.profile-card:hover .card-arrow { color: var(--violet-bright); transform: translateX(3px); }
.progress-track { width: 100%; height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.08); }
.progress-fill { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--violet-deep), var(--violet-bright)); transition: width .25s var(--ease); }
.empty-state { display: grid; min-height: 190px; width: 100%; place-items: center; align-content: center; gap: 8px; padding: 30px; border: 1px dashed rgba(183,155,255,.25); border-radius: var(--radius); background: rgba(153,116,255,.025); color: var(--muted); text-align: center; }
.empty-clickable { cursor: pointer; }
.empty-clickable:hover { border-color: rgba(183,155,255,.55); background: rgba(153,116,255,.07); }
.empty-state strong { color: var(--text); font-size: 14px; }
.empty-state > span:not(.empty-icon) { max-width: 340px; font-size: 11px; line-height: 1.5; }
.empty-icon { display: grid; width: 37px; height: 37px; place-items: center; margin-bottom: 5px; border: 1px solid rgba(183,155,255,.25); border-radius: 12px; color: var(--violet-bright); font-family: 'DM Mono', monospace; font-size: 19px; }
.text-link { margin-top: 3px; color: var(--violet-bright); font-size: 11px !important; }
.create-card { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 24px; border: 1px solid rgba(153,116,255,.24); border-radius: var(--radius); background: radial-gradient(circle at 0 100%, rgba(129,88,231,.17), transparent 24rem), rgba(28,21,46,.72); }
.create-card-copy { display: flex; align-items: flex-start; gap: 15px; }
.create-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; background: var(--violet); color: #161020; font-family: 'DM Mono', monospace; font-size: 21px; }
.create-card h3, .usage-card h3 { margin: 0 0 7px; font-size: 16px; letter-spacing: -.04em; }
.create-card p:not(.eyebrow), .usage-card p:not(.eyebrow) { max-width: 530px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.55; }
.create-form { display: flex; min-width: min(100%, 350px); align-items: flex-end; gap: 9px; }
.compact-field { flex: 1; }
.input-prefix { display: flex; align-items: center; min-height: 43px; border: 1px solid var(--line-strong); border-radius: 10px; background: #110d1b; }
.input-prefix > span { padding-left: 12px; color: var(--muted-2); font-family: 'DM Mono', monospace; }
.input-prefix input { min-height: 41px; border: 0; box-shadow: none; background: transparent; }
.input-prefix input:focus { box-shadow: none; }
.usage-card { display: flex; align-items: flex-start; gap: 15px; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.018); }
.usage-card-icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border-radius: 10px; background: rgba(115,227,176,.09); color: var(--green); }

.panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgba(28,22,46,.82), rgba(16,13,25,.82)); }
.state-banner { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(153,116,255,.06); color: var(--muted); font-size: 11px; line-height: 1.5; }
.state-banner.error { border-color: rgba(255,135,159,.28); background: rgba(255,135,159,.06); color: #ffb0bf; }
.state-banner.warning { border-color: rgba(240,179,109,.28); background: rgba(240,179,109,.06); color: #eac08b; }
.state-mark { color: var(--violet-bright); font-family: 'DM Mono', monospace; }
.warning-panel { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid rgba(240,179,109,.25); border-radius: 12px; background: rgba(240,179,109,.05); color: var(--orange); }
.warning-panel .icon { margin-top: 1px; }
.warning-panel strong { display: block; margin-bottom: 7px; font-size: 12px; }
.warning-panel ul { margin: 0; padding-left: 16px; color: #d6b482; font-size: 11px; line-height: 1.6; }
.muted-copy { color: var(--muted-2); font-size: 11px; line-height: 1.55; }

.profile-summary { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 25px; }
.profile-summary-main { display: flex; min-width: 0; align-items: center; gap: 16px; }
.profile-summary-main h2 { display: inline-block; margin: 0; font-size: 20px; letter-spacing: -.05em; }
.profile-title-row { display: flex; align-items: center; gap: 7px; }
.verified { display: grid; width: 17px; height: 17px; place-items: center; border-radius: 50%; background: var(--violet); color: white; font-family: 'DM Mono', monospace; font-size: 10px; }
.profile-summary-main > div > p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.profile-summary-main > div > .bio { max-width: 520px; margin-top: 8px; color: #c8c1d5; line-height: 1.5; }
.profile-summary-main .status-pill { display: inline-flex; margin-top: 12px; }
.profile-summary-actions { display: grid; min-width: 172px; justify-items: end; gap: 3px; padding-left: 20px; border-left: 1px solid var(--line); }
.quota-label { color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .05em; text-transform: uppercase; }
.profile-summary-actions strong { color: var(--violet-bright); font-family: 'DM Mono', monospace; font-size: 16px; font-weight: 500; }
.profile-summary-actions small { margin-bottom: 9px; color: var(--muted-2); font-size: 10px; }
.job-panel { display: grid; gap: 15px; padding: 22px; }
.job-panel-header, .job-panel-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.job-panel-header h3 { margin: 0; font-size: 17px; letter-spacing: -.04em; }
.job-panel-header > strong { color: var(--violet-bright); font-family: 'DM Mono', monospace; font-weight: 500; }
.job-panel-meta { color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 10px; }
.warning-list { margin: 0; padding-left: 17px; color: var(--orange); font-size: 11px; line-height: 1.6; }
.private-panel, .empty-snapshot { display: flex; min-height: 190px; align-items: center; justify-content: center; gap: 15px; padding: 30px; }
.private-lock { display: grid; width: 46px; height: 46px; flex: 0 0 auto; place-items: center; border-radius: 14px; background: rgba(240,179,109,.08); color: var(--orange); font-size: 21px; }
.private-panel h3, .empty-snapshot h3 { margin: 0 0 7px; font-size: 16px; }
.private-panel p, .empty-snapshot p { max-width: 590px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.stat-strip { display: grid; grid-template-columns: repeat(3, 1fr); padding: 0; overflow: hidden; }
.stat-item { display: grid; gap: 5px; min-height: 107px; align-content: center; padding: 17px 21px; border: 0; border-right: 1px solid var(--line); background: transparent; text-align: left; }
.stat-item:last-child { border-right: 0; }
.stat-item:hover { background: rgba(153,116,255,.07); }
.stat-item span { color: var(--muted); font-size: 11px; }
.stat-item strong { color: var(--text); font-family: 'DM Mono', monospace; font-size: 22px; font-weight: 500; }
.stat-item small { color: var(--violet-bright); font-size: 10px; }
.story-section { min-width: 0; }
.story-rail { display: flex; gap: 13px; overflow-x: auto; padding: 3px 1px 9px; scrollbar-width: thin; }
.story-card { display: grid; min-width: 89px; flex: 0 0 auto; justify-items: center; gap: 7px; padding: 7px 4px; border: 1px solid transparent; border-radius: 13px; background: transparent; }
.story-card:hover { border-color: var(--line); background: rgba(255,255,255,.03); }
.story-ring { display: grid; width: 62px; height: 62px; place-items: center; border: 2px solid var(--violet); border-radius: 50%; background: var(--panel-3); box-shadow: 0 0 0 3px rgba(153,116,255,.1); }
.story-card strong { max-width: 84px; overflow: hidden; color: #dcd6e8; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.story-card small { color: var(--muted-2); font-size: 9px; }
.story-empty { min-width: 145px; }
.story-empty-dot { display: grid; width: 62px; height: 62px; place-items: center; border: 1px dashed var(--line-strong); border-radius: 50%; color: var(--muted-2); }
.post-section { min-width: 0; }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.media-card { position: relative; min-width: 0; aspect-ratio: 1; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.media-card:hover { border-color: rgba(183,155,255,.55); }
.media-card .media-visual { position: absolute; inset: 0; }
.media-card .media-visual img, .media-card .media-visual video { width: 100%; height: 100%; object-fit: cover; }
.media-card-overlay { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; padding: 25px 10px 9px; background: linear-gradient(transparent, rgba(0,0,0,.72)); color: white; font-size: 10px; }
.media-owner { position: absolute; top: 9px; left: 9px; max-width: calc(100% - 18px); overflow: hidden; padding: 4px 6px; border-radius: 5px; background: rgba(11,9,18,.6); color: white; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; backdrop-filter: blur(5px); }
.media-fallback { display: grid; width: 100%; height: 100%; place-items: center; align-content: center; gap: 6px; padding: 16px; background: linear-gradient(145deg, #211a32, #14101f); color: var(--muted); text-align: center; }
.media-fallback .fallback-icon { color: var(--orange); font-family: 'DM Mono', monospace; font-size: 21px; }
.media-fallback strong { color: #d4cce2; font-size: 10px; }
.media-fallback small { max-width: 160px; color: var(--muted-2); font-size: 9px; line-height: 1.4; }
.video-chip { position: absolute; top: 10px; right: 10px; display: inline-flex; align-items: center; gap: 3px; padding: 4px 6px; border-radius: 5px; background: rgba(11,9,18,.65); color: white; font-size: 9px; backdrop-filter: blur(5px); }
.empty-inline { display: flex; min-height: 90px; align-items: center; justify-content: center; gap: 10px; padding: 15px; border: 1px dashed var(--line); border-radius: 12px; color: var(--muted-2); }
.empty-inline > span { color: var(--violet-bright); font-family: 'DM Mono', monospace; }
.empty-inline p { margin: 0; font-size: 11px; }
.history-section { padding-bottom: 8px; }
.history-list { display: grid; border-top: 1px solid var(--line); }
.history-row { display: grid; grid-template-columns: 28px 1fr 20px; gap: 10px; align-items: center; padding: 14px 7px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.history-row:hover { background: rgba(255,255,255,.025); }
.history-status { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; font-family: 'DM Mono', monospace; font-size: 11px; }
.history-ready { background: rgba(115,227,176,.1); color: var(--green); }
.history-partial { background: rgba(240,179,109,.1); color: var(--orange); }
.history-queued, .history-processing { background: rgba(153,116,255,.1); color: var(--violet-bright); }
.history-row strong { display: block; color: #ddd6e7; font-size: 11px; font-weight: 600; }
.history-row small { display: block; margin-top: 3px; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 9px; }
.history-arrow { color: var(--muted-2); font-family: 'DM Mono', monospace; }

.avatar { display: inline-grid; flex: 0 0 auto; place-items: center; overflow: hidden; border-radius: 50%; background: linear-gradient(145deg, #7253bc, #271a4c); color: #f2ecff; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initial { font-family: 'DM Mono', monospace; font-size: 10px; }
.avatar-xs { width: 26px; height: 26px; }
.avatar-sm { width: 34px; height: 34px; }
.avatar-md { width: 54px; height: 54px; }
.avatar-lg { width: 70px; height: 70px; }

.detail-skeleton { display: grid; gap: 18px; }
.skeleton { overflow: hidden; border-radius: 9px; background: linear-gradient(90deg, rgba(255,255,255,.05) 20%, rgba(255,255,255,.1) 45%, rgba(255,255,255,.05) 70%); background-size: 200% 100%; animation: shimmer 1.25s linear infinite; }
.skeleton-hero { height: 137px; border-radius: var(--radius); }
.skeleton-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skeleton-tile { height: 94px; }
.skeleton-large { height: 290px; }
.skeleton-card { display: flex; min-height: 188px; align-items: flex-start; }
.skeleton-avatar { width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; }
.skeleton-lines { display: grid; width: 100%; gap: 11px; }
.skeleton-line { height: 12px; width: 58%; }
.skeleton-line.wide { width: 80%; }
.skeleton-line.short { width: 33%; }
@keyframes shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

.stories-board { padding: 20px; }
.stories-large-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.story-large-card { position: relative; min-width: 0; aspect-ratio: .72; overflow: hidden; padding: 0; border: 1px solid var(--line); border-radius: 13px; background: #18122a; text-align: left; }
.story-large-card:hover { border-color: rgba(183,155,255,.55); }
.story-large-card .media-visual { position: absolute; inset: 0; }
.story-large-card .media-visual img, .story-large-card .media-visual video { width: 100%; height: 100%; object-fit: cover; }
.story-large-card::after { position: absolute; inset: 35% 0 0; background: linear-gradient(transparent, rgba(0,0,0,.78)); content: ''; }
.story-large-meta { position: absolute; z-index: 1; right: 12px; bottom: 12px; left: 12px; display: grid; grid-template-columns: auto 1fr; gap: 5px 8px; align-items: center; color: white; }
.story-large-meta .avatar { grid-row: span 2; }
.story-large-meta span { overflow: hidden; font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.story-large-meta small { color: #c8bdd7; font-size: 9px; }
.loading-panel { min-height: 300px; }

.locked-message { position: relative; display: flex; min-height: 400px; align-items: center; justify-content: center; gap: clamp(30px, 8vw, 100px); overflow: hidden; padding: 60px; }
.locked-message::before { position: absolute; width: 500px; height: 500px; border: 1px solid rgba(183,155,255,.1); border-radius: 50%; content: ''; }
.locked-art { position: relative; display: grid; width: 170px; height: 170px; flex: 0 0 auto; place-items: center; }
.lock-halo { position: absolute; inset: 0; border: 1px solid rgba(153,116,255,.3); border-radius: 50%; box-shadow: 0 0 60px rgba(112, 68, 213, .18), inset 0 0 45px rgba(112, 68, 213, .1); }
.locked-art::before, .locked-art::after { position: absolute; border: 1px solid rgba(153,116,255,.17); border-radius: 50%; content: ''; }
.locked-art::before { inset: 18px; }
.locked-art::after { inset: -22px; border-style: dashed; opacity: .55; }
.big-lock { position: relative; z-index: 1; display: grid; width: 67px; height: 67px; place-items: center; border: 1px solid rgba(183,155,255,.5); border-radius: 20px; background: linear-gradient(145deg, #8f69eb, #50319e); box-shadow: 0 18px 35px rgba(81,44,170,.35); color: white; font-size: 32px; }
.locked-copy { position: relative; z-index: 1; max-width: 470px; }
.training-label { display: inline-flex; margin-bottom: 15px; padding: 6px 9px; border: 1px solid rgba(240,179,109,.25); border-radius: 999px; background: rgba(240,179,109,.08); color: var(--orange); font-family: 'DM Mono', monospace; font-size: 9px; letter-spacing: .04em; }
.locked-copy h2 { margin: 0 0 12px; font-size: clamp(23px, 3vw, 32px); letter-spacing: -.06em; }
.locked-copy > p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.countdown { display: grid; grid-template-columns: auto auto; gap: 3px 12px; align-items: end; margin: 25px 0 18px; padding: 14px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.035); }
.countdown span { color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 9px; }
.countdown strong { color: var(--violet-bright); font-family: 'DM Mono', monospace; font-size: 19px; font-weight: 500; }
.countdown small { grid-column: 1 / -1; color: var(--muted-2); font-size: 9px; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 25px; background: rgba(4,3,8,.76); backdrop-filter: blur(10px); }
.modal-card { width: min(100%, 590px); max-height: min(90vh, 720px); overflow: auto; border: 1px solid var(--line-strong); border-radius: 18px; background: #151020; box-shadow: 0 28px 80px rgba(0,0,0,.48); animation: modal-in .24s var(--ease); }
.media-backdrop .modal-card { width: min(100%, 820px); }
@keyframes modal-in { from { transform: translateY(12px) scale(.97); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 20px 22px 15px; }
.modal-header h2 { margin: 0; font-size: 18px; letter-spacing: -.05em; }
.modal-header p { margin: 5px 0 0; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 10px; }
.modal-close { display: grid; width: 30px; height: 30px; flex: 0 0 auto; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--muted); font-size: 20px; line-height: 1; }
.modal-close:hover { color: var(--text); background: rgba(255,255,255,.05); }
.viewer-frame { position: relative; min-height: 310px; margin: 0 22px; overflow: hidden; border-radius: 12px; background: #0d0a16; }
.viewer-visual { min-height: 310px; }
.viewer-visual img, .viewer-visual video { display: block; width: 100%; max-height: 62vh; object-fit: contain; }
.viewer-visual img { min-height: 310px; }
.slide-controls { position: absolute; right: 13px; bottom: 13px; left: 13px; display: flex; align-items: center; justify-content: space-between; color: white; font-family: 'DM Mono', monospace; font-size: 10px; }
.circle-button { display: grid; width: 29px; height: 29px; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; background: rgba(0,0,0,.48); color: white; }
.viewer-meta { display: grid; gap: 13px; padding: 17px 22px 22px; }
.viewer-meta p { margin: 0; color: #d5cee1; font-size: 12px; line-height: 1.6; }
.viewer-stats { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.text-button { padding: 0; border: 0; background: none; color: var(--violet-bright); font-size: 10px; }
.viewer-meta > small { color: var(--muted-2); font-size: 10px; }
.story-viewer-frame { position: relative; min-height: min(70vh, 600px); margin: 0 22px; overflow: hidden; border-radius: 12px; background: #0c0913; }
.story-visual { min-height: min(70vh, 600px); }
.story-visual img, .story-visual video { display: block; width: 100%; height: min(70vh, 600px); object-fit: contain; }
.viewer-arrow { position: absolute; top: 50%; display: grid; width: 34px; height: 34px; place-items: center; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; background: rgba(0,0,0,.35); color: white; font-size: 20px; transform: translateY(-50%); }
.viewer-prev { left: 13px; }
.viewer-next { right: 13px; }
.story-progress { position: absolute; top: 12px; right: 12px; left: 12px; display: flex; gap: 4px; }
.story-progress span { height: 3px; flex: 1; border-radius: 99px; background: rgba(255,255,255,.25); }
.story-progress span.active { background: white; }
.viewer-note { margin: 0; padding: 13px 22px 19px; color: var(--muted-2); font-size: 10px; }
.people-list, .comment-list { padding: 0 22px 20px; }
.person-row, .comment-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.person-row:last-child, .comment-row:last-child { border-bottom: 0; }
.person-row > div, .comment-row > div { min-width: 0; flex: 1; }
.person-row strong, .comment-row strong { display: block; overflow: hidden; color: #ddd5e7; font-size: 11px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.person-row small, .comment-row small { display: block; margin-top: 4px; color: var(--muted-2); font-family: 'DM Mono', monospace; font-size: 9px; }
.mini-private { padding: 4px 6px; border-radius: 5px; background: rgba(240,179,109,.1); color: var(--orange); font-family: 'DM Mono', monospace; font-size: 8px; }
.comment-row { align-items: flex-start; }
.comment-row p { margin: 5px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.modal-empty { margin: 0 22px 22px; }
.info-copy { padding: 0 22px 24px; }
.info-copy p { margin: 0 0 13px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.info-copy p:last-child { margin-bottom: 0; }

.mobile-nav { display: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .001ms !important; }
}
@media (max-width: 1050px) {
  .auth-shell { grid-template-columns: 1fr 52%; }
  .auth-visual { padding-right: 45px; padding-left: 45px; }
  .auth-visual-copy h1 { font-size: clamp(44px, 6vw, 67px); }
  .main-content { padding-right: 28px; padding-left: 28px; }
  .topbar { padding-right: 28px; padding-left: 28px; }
  .media-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  :root { --topbar-height: 65px; }
  body { padding-bottom: 68px; }
  .training-badge { right: 11px; bottom: 76px; font-size: 9px; }
  .auth-shell { display: block; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 28px 22px; place-items: start center; }
  .auth-card { padding-top: 16px; }
  .auth-mobile-brand { display: inline-flex; margin-bottom: 48px; }
  .auth-heading h2 { font-size: 29px; }
  .sidebar { display: none; }
  .main-column { margin-left: 0; }
  .topbar { height: var(--topbar-height); padding: 0 18px; }
  .mobile-brand { display: inline-flex; font-size: 17px; }
  .mobile-brand .brand-mark { width: 26px; height: 26px; border-radius: 8px; font-size: 14px; }
  .topbar-context { font-size: 9px; }
  .topbar-avatar { display: none; }
  .main-content { padding: 31px 17px 55px; }
  .page { gap: 28px; }
  .page-header { min-height: auto; align-items: flex-start; }
  .page-header h1 { font-size: 30px; }
  .page-header .button { align-self: flex-end; padding: 0 10px; }
  .page-header .button:not(.button-quiet) { position: absolute; right: 17px; top: 135px; }
  .page-description { font-size: 11px; }
  .metric-grid { gap: 8px; }
  .metric-card { min-height: 105px; display: block; padding: 13px; }
  .metric-icon { width: 29px; height: 29px; margin-bottom: 10px; font-size: 14px; }
  .metric-card p { margin: 0 0 5px; font-size: 9px; }
  .metric-card strong { font-size: 19px; }
  .metric-card small { font-size: 8px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 17px; }
  .profile-cards { grid-template-columns: 1fr; }
  .create-card { display: grid; gap: 20px; padding: 19px; }
  .create-form { min-width: 0; width: 100%; }
  .usage-card { padding: 18px; }
  .profile-summary { display: grid; align-items: start; padding: 18px; }
  .profile-summary-actions { min-width: 0; width: 100%; justify-items: start; padding-top: 16px; padding-left: 0; border-top: 1px solid var(--line); border-left: 0; }
  .profile-summary-actions .button { align-self: center; margin-left: auto; margin-top: -38px; }
  .stat-item { min-height: 93px; padding: 13px 10px; }
  .stat-item span { font-size: 9px; }
  .stat-item strong { font-size: 17px; }
  .stat-item small { font-size: 8px; }
  .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .media-card-overlay { padding-right: 7px; padding-left: 7px; font-size: 8px; }
  .media-owner { top: 6px; left: 6px; font-size: 8px; }
  .stories-large-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stories-board { padding: 12px; }
  .locked-message { display: grid; min-height: auto; gap: 30px; padding: 35px 22px; text-align: center; }
  .locked-art { width: 150px; height: 150px; margin: 0 auto; }
  .locked-copy > .state-banner { text-align: left; }
  .modal-backdrop { padding: 12px; }
  .modal-card, .media-backdrop .modal-card { max-height: 92vh; border-radius: 15px; }
  .viewer-frame, .story-viewer-frame { margin-right: 12px; margin-left: 12px; }
  .viewer-meta, .modal-header { padding-right: 15px; padding-left: 15px; }
  .people-list, .comment-list { padding-right: 15px; padding-left: 15px; }
  .modal-empty { margin-right: 15px; margin-left: 15px; }
  .mobile-nav { position: fixed; z-index: 30; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(4, 1fr); height: 67px; padding: 6px 8px max(6px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(14,11,23,.94); backdrop-filter: blur(16px); }
  .mobile-nav .nav-item { display: grid; min-height: 49px; justify-items: center; align-content: center; gap: 3px; padding: 0; border: 0; border-radius: 9px; text-align: center; font-size: 9px; }
  .mobile-nav .nav-item .icon { font-size: 17px; }
  .mobile-nav .nav-lock { display: none; }
}
@media (max-width: 390px) {
  .main-content { padding-right: 13px; padding-left: 13px; }
  .page-header .button:not(.button-quiet) { right: 13px; }
  .metric-card { padding-right: 9px; padding-left: 9px; }
  .metric-card p { letter-spacing: -.03em; }
  .training-badge { display: none; }
}

/* Integration QA refinements: narrow screens, long usernames and safe modals. */
.page-header > div, .profile-summary-main > div, .topbar-context { min-width: 0; }
.page-header h1, .profile-identity strong, .profile-summary-main h2, .bio { overflow-wrap: anywhere; }
.empty-snapshot { flex-direction: column; text-align: center; }
.modal-card { overscroll-behavior: contain; }
.media-card video { pointer-events: none; }
@media (max-width: 760px) {
  .topbar-context { max-width: 45%; font-size: 8px; line-height: 1.5; }
  .topbar-context > span:last-child { overflow-wrap: anywhere; }
  .page-header { flex-wrap: wrap; }
  .page-header .button:not(.button-quiet) { position: static; align-self: flex-start; }
  .page-header > div { flex: 1 1 230px; }
  .profile-summary-actions .button { margin-top: 8px; margin-left: 0; }
  .training-badge { display: block; max-width: calc(100vw - 22px); }
  .profile-summary-main { align-items: flex-start; }
  .countdown { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .topbar { gap: 8px; }
  .topbar-context { max-width: 37%; }
  .topbar-avatar { display: inline-flex; flex: 0 0 auto; }
  .mobile-brand { flex: 0 0 auto; }
}

.comment-row p { font-size: 13px; line-height: 1.6; }
.comment-row strong { font-size: 12px; }
.comment-row small { font-size: 10px; }
@media (max-width: 760px) {
  .profile-summary-actions { grid-template-columns: minmax(0, 1fr) auto; }
  .profile-summary-actions > span,
  .profile-summary-actions > strong,
  .profile-summary-actions > small { grid-column: 1; }
  .profile-summary-actions .button { grid-column: 2; grid-row: 1 / span 3; margin: 0; }
  .profile-summary-actions small { font-size: 9px; }
}

@media (max-width: 760px) {
  .mobile-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Collection ETA uses each job's persisted creation timestamp, never a new wait. */
.job-countdown { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; align-items: center; margin-top: 7px; padding: 16px; border: 1px solid rgba(183,155,255,.25); border-radius: 12px; background: rgba(153,116,255,.075); }
.job-countdown-heading { display: flex; min-width: 0; align-items: center; gap: 8px; color: #d8c7ff; font-size: 11px; line-height: 1.5; }
.job-countdown-heading .icon { flex: 0 0 auto; font-size: 20px; }
.job-countdown-value { color: #eee5ff; font-family: 'DM Mono', monospace; font-size: 30px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: -.055em; line-height: 1.15; white-space: nowrap; }
.job-countdown-note { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.65; }
.job-countdown.is-overdue { border-color: rgba(240,179,109,.3); background: rgba(240,179,109,.05); }
.job-countdown.is-overdue .job-countdown-value, .job-countdown.is-overdue .job-countdown-heading { color: #f0c18c; }
.profile-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--violet-bright); font-size: 11px; font-weight: 700; }
.profile-card-footer .card-arrow { position: static; }
.profile-card .job-countdown-value { font-size: 28px; }
@media (max-width: 760px) {
  .job-countdown { gap: 10px; padding: 13px; }
  .job-countdown-heading { font-size: 10px; }
  .job-countdown-value, .profile-card .job-countdown-value { font-size: 27px; }
  .job-panel-meta { flex-wrap: wrap; line-height: 1.5; }
}
@media (max-width: 340px) {
  .job-countdown { grid-template-columns: 1fr; }
  .job-countdown-value { font-size: 30px; }
}

.open-profile-link { text-decoration: none; }
.open-profile-link:focus-visible { outline: 2px solid var(--violet-bright); outline-offset: 3px; }
.page-header > .page-header-actions { display: flex; flex: 0 0 auto; gap: 10px; align-items: center; flex-wrap: wrap; }
.profile-card-footer { flex-wrap: wrap; }
.profile-card-footer .button { min-width: 0; }
@media (max-width: 380px) {
  .profile-card-footer .button { width: 100%; }
  .page-header > .page-header-actions { width: 100%; }
}
