/* Shine Hub · Shine Creative Studio look: near-black, deep violet glow, white type, crystal mark */
@font-face { font-family: Creato; src: url(/fonts/CreatoDisplay-Regular.otf) format('opentype'); font-weight: 400; font-display: swap; }
@font-face { font-family: Creato; src: url(/fonts/CreatoDisplay-Medium.otf) format('opentype'); font-weight: 500 600; font-display: swap; }
@font-face { font-family: Creato; src: url(/fonts/CreatoDisplay-Bold.otf) format('opentype'); font-weight: 700; font-display: swap; }
@font-face { font-family: Creato; src: url(/fonts/CreatoDisplay-ExtraBold.otf) format('opentype'); font-weight: 800 900; font-display: swap; }

:root {
  --bg: #07050d;
  --card: linear-gradient(160deg, rgba(255,255,255,.075), rgba(255,255,255,.025));
  --card-flat: rgba(255,255,255,.05);
  --line: rgba(255,255,255,.085);
  --line-2: rgba(255,255,255,.15);
  --ink: #f7f5fc;
  --muted: #a39cb8;
  --violet: #620aaa;
  --violet-2: #8b5cf6;
  --lilac: #c4b5fd;
  --magenta: #c0347f;
  --deep: #35185a;
  --good: #34d399;
  --bad: #fb7185;
  --warn: #fbbf24;
  --radius: 22px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --shadow: 0 1px 0 rgba(255,255,255,.07) inset, 0 20px 40px -24px rgba(0,0,0,.7);
  color-scheme: dark;
  font-family: Creato, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-size: 16px; -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--lilac); }
[hidden] { display: none !important; }
::selection { background: rgba(139,92,246,.45); }
h1, h2, h3 { letter-spacing: -.025em; font-weight: 800; }

/* ---------- living background ---------- */
.aurora { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; background: radial-gradient(1100px 760px at 85% -15%, #2a0f4d 0%, transparent 60%), radial-gradient(900px 700px at -10% 110%, #1c0a2e 0%, transparent 60%), var(--bg); }
.aurora i { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; will-change: transform; }
.aurora i:nth-child(1) { width: 560px; height: 560px; background: #620aaa; top: -200px; right: -140px; animation: drift1 22s ease-in-out infinite alternate; }
.aurora i:nth-child(2) { width: 440px; height: 440px; background: #a13274; bottom: -200px; left: 8%; opacity: .28; animation: drift2 26s ease-in-out infinite alternate; }
.aurora i:nth-child(3) { width: 380px; height: 380px; background: #4c1d95; top: 42%; left: -160px; opacity: .3; animation: drift3 30s ease-in-out infinite alternate; }
.grain { position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: .05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
#root { position: relative; z-index: 2; }
@keyframes drift1 { to { transform: translate(-180px, 140px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(220px, -120px) scale(1.2); } }
@keyframes drift3 { to { transform: translate(160px, -180px) scale(.9); } }

.splash { min-height: 100vh; display: grid; place-items: center; }
.splash-mark { width: 96px; filter: drop-shadow(0 0 26px rgba(139,92,246,.75)); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 50% { filter: drop-shadow(0 0 46px rgba(192,52,127,.85)); transform: scale(1.04); } }

/* ---------- crystal (3D mark) ---------- */
.crystal { position: relative; width: 160px; height: 160px; flex: none; perspective: 700px; }
.crystal .halo { position: absolute; inset: -20px; border-radius: 50%; background: radial-gradient(closest-side, rgba(139,92,246,.45), rgba(192,52,127,.18) 55%, transparent 72%); animation: breatheHalo 4.5s ease-in-out infinite; pointer-events: none; }
.crystal .spin { position: absolute; inset: 18px; transform-style: preserve-3d; animation: crystalSpin 9s cubic-bezier(.45,.05,.55,.95) infinite; }
.crystal img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; backface-visibility: visible; }
.crystal .front { filter: drop-shadow(0 0 14px rgba(196,181,253,.8)) drop-shadow(0 10px 30px rgba(98,10,170,.8)); }
.crystal .edge { transform: translateZ(-6px); opacity: .55; filter: blur(1px) brightness(.6); }
.crystal .spark { position: absolute; right: 8px; top: 6px; color: #fff; font-size: 18px; text-shadow: 0 0 14px #c4b5fd, 0 0 30px #8b5cf6; animation: twinkle 3s ease-in-out infinite; }
.crystal.sm { width: 112px; height: 112px; }
.crystal.sm .spin { inset: 14px; }
.crystal.lg { width: 190px; height: 190px; }
@keyframes crystalSpin { 0%, 100% { transform: rotateY(-22deg) rotateX(8deg) translateY(0); } 50% { transform: rotateY(22deg) rotateX(-6deg) translateY(-8px); } }
@keyframes breatheHalo { 50% { transform: scale(1.12); opacity: .7; } }
@keyframes twinkle { 50% { opacity: .35; transform: scale(.75) rotate(20deg); } }
@keyframes float { 50% { transform: translateY(-7px); } }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.side { width: 248px; flex: none; background: rgba(10, 6, 18, .6); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 3px; }
.side .brand { display: block; padding: 4px 10px 24px; }
.side .brand img { width: 150px; display: block; filter: drop-shadow(0 0 14px rgba(139,92,246,.45)); }
.side .brand small { display: block; margin-top: 8px; text-transform: uppercase; letter-spacing: .22em; font-size: 10px; color: var(--muted); font-weight: 600; }
.side a { position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 14px; color: var(--muted); text-decoration: none; font-weight: 600; transition: color .25s, background .25s; }
.side a:hover { background: rgba(255,255,255,.05); color: var(--ink); }
.side a.on { color: #fff; background: linear-gradient(90deg, rgba(139,92,246,.3), rgba(139,92,246,.05)); box-shadow: 0 0 0 1px rgba(196,181,253,.18) inset, 0 8px 30px -10px rgba(139,92,246,.7); }
.side a.on::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; border-radius: 4px; background: linear-gradient(#c4b5fd, #c0347f); box-shadow: 0 0 12px #8b5cf6; }
.side .ico { font-size: 19px; width: 24px; text-align: center; }
.side .badge { margin-left: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: linear-gradient(135deg, var(--magenta), var(--violet)); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 14px rgba(192,52,127,.6); }
.side .spacer { flex: 1; }
.main { flex: 1; min-width: 0; padding: 28px 36px 120px; max-width: 1240px; }
.main.wide { max-width: none; }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.top h1 { font-size: 34px; margin: 0; flex: 1; background: linear-gradient(180deg, #fff, #cfc6ea); -webkit-background-clip: text; background-clip: text; color: transparent; }
.top .help-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--card-flat); font-size: 17px; font-weight: 800; cursor: pointer; transition: box-shadow .3s, transform .3s var(--spring); }
.top .help-btn:hover { box-shadow: 0 0 24px rgba(139,92,246,.6); transform: scale(1.06); }
.top a .av { box-shadow: 0 0 0 2px rgba(255,255,255,.15), 0 0 20px rgba(139,92,246,.5); }
.tabbar, .fab { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  .main { padding: 18px 16px 120px; }
  .top h1 { font-size: 27px; }
  .tabbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(10px + env(safe-area-inset-bottom)); background: rgba(16, 10, 28, .82); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5); border: 1px solid var(--line-2); border-radius: 24px; padding: 6px; z-index: 40; box-shadow: 0 20px 40px -10px rgba(0,0,0,.7); }
  .tabbar a { position: relative; flex: 1; text-align: center; text-decoration: none; color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 6px 0 5px; border-radius: 18px; transition: color .25s, background .25s; }
  .tabbar a .ico { display: block; font-size: 21px; line-height: 1.3; filter: grayscale(1) brightness(1.4); opacity: .55; transition: transform .35s var(--spring), filter .25s, opacity .25s; }
  .tabbar a.on { color: #fff; background: rgba(139,92,246,.22); box-shadow: 0 0 0 1px rgba(196,181,253,.15) inset; }
  .tabbar a.on .ico { filter: drop-shadow(0 0 8px rgba(196,181,253,.8)); opacity: 1; transform: translateY(-2px) scale(1.12); }
  .fab { display: grid; place-items: center; position: fixed; right: 20px; bottom: calc(92px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px; background: linear-gradient(145deg, #a78bfa, var(--violet) 60%, var(--magenta)); color: #fff; font-size: 32px; font-weight: 500; border: 0; box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset, 0 12px 30px -6px rgba(98,10,170,.8), 0 0 40px rgba(139,92,246,.4); z-index: 41; cursor: pointer; transition: transform .3s var(--spring); }
  .fab:active { transform: scale(.9) rotate(90deg); }
}

/* ---------- cards ---------- */
.card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 16px; }
.card h2 { font-size: 18px; margin: 0 0 14px; display: flex; align-items: center; gap: 8px; }
.card h2 .more { margin-left: auto; font-size: 14px; font-weight: 600; text-decoration: none; color: var(--lilac); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 980px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 860px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.empty { text-align: center; color: var(--muted); padding: 20px 8px; }
.empty .big { font-size: 36px; display: block; margin-bottom: 8px; filter: drop-shadow(0 0 14px rgba(139,92,246,.5)); animation: float 5s ease-in-out infinite; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.sec-title { font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 24px 0 10px; }
.eyebrow { font-size: 11px; text-transform: uppercase; letter-spacing: .2em; color: var(--lilac); font-weight: 700; margin-bottom: 6px; }
.ellip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- buttons ---------- */
.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 14px; border: 0; background: linear-gradient(135deg, #7c3aed, var(--violet) 55%, #4c0d84); color: #fff; font-weight: 700; font-size: 15.5px; cursor: pointer; text-decoration: none; box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 10px 26px -10px rgba(98,10,170,.9); transition: transform .25s var(--spring), box-shadow .3s, filter .2s; white-space: nowrap; }
.btn::after { content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent); transform: skewX(-20deg); transition: left .7s var(--ease); pointer-events: none; }
.btn:hover::after { left: 140%; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); box-shadow: 0 0 0 1px rgba(255,255,255,.25) inset, 0 14px 34px -10px rgba(139,92,246,.9); }
.btn:active { transform: scale(.97); }
.btn.hot { background: linear-gradient(135deg, #e879b9, var(--magenta) 45%, var(--violet)); box-shadow: 0 0 0 1px rgba(255,255,255,.3) inset, 0 12px 30px -10px rgba(192,52,127,.85), 0 0 30px -8px rgba(192,52,127,.6); }
.btn.white { background: #fff; color: #170a2b; box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset, 0 12px 30px -10px rgba(255,255,255,.35); }
.btn.soft { background: rgba(139,92,246,.15); color: #e7e0ff; box-shadow: 0 0 0 1px rgba(196,181,253,.22) inset; }
.btn.ghost { background: rgba(255,255,255,.03); color: var(--ink); box-shadow: 0 0 0 1px var(--line-2) inset; }
.btn.good { background: linear-gradient(135deg, #6ee7b7, #10b981); color: #052e1f; box-shadow: 0 0 0 1px rgba(255,255,255,.35) inset, 0 12px 28px -10px rgba(16,185,129,.8); }
.btn.danger { background: rgba(251,113,133,.12); color: #fda4af; box-shadow: 0 0 0 1px rgba(251,113,133,.28) inset; }
.btn.sm { min-height: 36px; padding: 0 13px; font-size: 13.5px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- forms ---------- */
label.f { display: block; font-weight: 700; font-size: 13.5px; margin: 16px 0 7px; color: #e9e4f7; }
label.f .hint { font-weight: 500; color: var(--muted); }
.in { width: 100%; min-height: 48px; padding: 11px 14px; border-radius: 13px; border: 1px solid var(--line-2); background: rgba(255,255,255,.04); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .25s, background .2s; }
.in::placeholder { color: rgba(163,156,184,.6); }
.in:focus { border-color: var(--violet-2); background: rgba(139,92,246,.07); box-shadow: 0 0 0 4px rgba(139,92,246,.18), 0 0 24px rgba(139,92,246,.25); }
select.in option { background: #170e26; color: var(--ink); }
textarea.in { min-height: 110px; resize: vertical; line-height: 1.5; }
textarea.in.script { min-height: 220px; font-size: 15px; }
.in.sm { min-height: 38px; padding: 7px 10px; font-size: 14px; border-radius: 10px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 14.5px; padding: 13px; border-radius: 14px; background: rgba(139,92,246,.08); border: 1px solid rgba(196,181,253,.2); cursor: pointer; }
.check-line input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--violet-2); flex: none; }
.err { background: rgba(251,113,133,.12); color: #fecdd3; border: 1px solid rgba(251,113,133,.3); border-radius: 12px; padding: 10px 14px; margin-top: 12px; font-weight: 600; font-size: 14px; animation: shake .4s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 600px) { .f-grid { grid-template-columns: 1fr; } }

/* ---------- pills, chips ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; background: rgba(139,92,246,.14); color: #ddd6fe; white-space: nowrap; border: 1px solid rgba(196,181,253,.16); }
.pill.overdue { background: rgba(251,113,133,.14); color: #fda4af; border-color: rgba(251,113,133,.3); box-shadow: 0 0 14px -4px rgba(251,113,133,.6); }
.pill.today { background: rgba(251,191,36,.14); color: var(--warn); border-color: rgba(251,191,36,.3); }
.pill.done, .pill.good { background: rgba(52,211,153,.13); color: var(--good); border-color: rgba(52,211,153,.3); }
.pill.hot { background: rgba(192,52,127,.18); color: #f9a8d4; border-color: rgba(236,72,153,.35); box-shadow: 0 0 14px -4px rgba(236,72,153,.6); }
.pill.ghost { background: rgba(255,255,255,.04); color: var(--muted); border-color: var(--line); }
.cchip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 6px; border-radius: 99px; font-size: 12px; font-weight: 800; color: #fff; background: color-mix(in srgb, var(--cc) 24%, transparent); border: 1px solid color-mix(in srgb, var(--cc) 45%, transparent); white-space: nowrap; }
.cchip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--cc); box-shadow: 0 0 8px var(--cc); }
.stage { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: color-mix(in srgb, var(--sc) 16%, transparent); color: color-mix(in srgb, var(--sc) 70%, #fff); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); }

/* ---------- avatars ---------- */
.av { border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 800; flex: none; object-fit: cover; background: #444; overflow: hidden; box-shadow: 0 0 0 2px rgba(255,255,255,.1); }
.av-empty { box-shadow: none; border: 1.5px dashed rgba(255,255,255,.25); background: rgba(255,255,255,.03); color: var(--muted); font-weight: 600; }
.stack { display: inline-flex; }
.stack .av + .av { margin-left: -8px; box-shadow: 0 0 0 2px #120a1f; }

/* ---------- list rows ---------- */
.prow { position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 10px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 12px; transition: background .2s; }
.prow:last-child { border-bottom: 0; }
.prow:hover { background: rgba(255,255,255,.035); }
.prow .title { font-weight: 700; line-height: 1.3; }
.prow .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; align-items: center; }
.prow .fmt { width: 40px; height: 40px; flex: none; border-radius: 12px; display: grid; place-items: center; font-size: 19px; background: color-mix(in srgb, var(--cc, #8b5cf6) 18%, rgba(255,255,255,.03)); border: 1px solid color-mix(in srgb, var(--cc, #8b5cf6) 35%, transparent); }

.todo { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); border-radius: 10px; }
.todo:last-child { border-bottom: 0; }
.todo:hover { background: rgba(255,255,255,.025); }
.tick { position: relative; width: 28px; height: 28px; border-radius: 50%; border: 2px solid rgba(255,255,255,.25); background: rgba(255,255,255,.03); flex: none; cursor: pointer; display: grid; place-items: center; color: #052e1f; font-size: 15px; font-weight: 900; padding: 0; transition: border-color .2s, box-shadow .25s, transform .3s var(--spring); }
.tick:hover { border-color: var(--good); box-shadow: 0 0 16px rgba(52,211,153,.45); transform: scale(1.08); }
.tick.on { background: radial-gradient(circle at 35% 30%, #a7f3d0, var(--good)); border-color: var(--good); box-shadow: 0 0 18px rgba(52,211,153,.55); animation: pop .45s var(--spring); }
@keyframes pop { 0% { transform: scale(.6); } 100% { transform: scale(1); } }
.todo .t { flex: 1; min-width: 0; cursor: pointer; }
.todo .t .title { font-weight: 600; line-height: 1.35; }
.todo.is-done .t .title { text-decoration: line-through; color: var(--muted); }
.todo .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.who-btn { background: none; border: 0; padding: 0; cursor: pointer; transition: transform .3s var(--spring); }
.who-btn:hover { transform: scale(1.1); }
.add-line { display: flex; gap: 8px; margin-top: 10px; }
.add-line .in { min-height: 44px; }

.burst { position: fixed; z-index: 300; pointer-events: none; width: 0; height: 0; }
.burst i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: var(--k); box-shadow: 0 0 10px var(--k); animation: burst .75s var(--ease) forwards; }
@keyframes burst { from { transform: translate(-50%, -50%) scale(1); opacity: 1; } to { transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(0); opacity: 0; } }

/* ---------- hero ---------- */
.hello { position: relative; overflow: hidden; border-radius: 28px; padding: 28px; margin-bottom: 16px; background: radial-gradient(520px 280px at 88% 15%, rgba(192,52,127,.35), transparent 60%), radial-gradient(600px 320px at 5% 120%, rgba(139,92,246,.25), transparent 60%), linear-gradient(140deg, #2a1050, #140a26 60%, #0b0716); border: 1px solid rgba(255,255,255,.12); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 30px 60px -30px rgba(98,10,170,.8); display: flex; align-items: center; gap: 20px; }
.hello::after { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.06) 50%, transparent 60%); background-size: 250% 100%; animation: sheen 7s ease-in-out infinite; pointer-events: none; }
@keyframes sheen { 0% { background-position: 120% 0; } 60%, 100% { background-position: -120% 0; } }
.hello .txt { flex: 1; min-width: 0; position: relative; z-index: 1; }
.hello h2 { margin: 0 0 6px; font-size: 30px; }
.hello p { margin: 0; color: #d8d0ee; }
.quick { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stats { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.stat { padding: 10px 14px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); min-width: 96px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer; transition: transform .3s var(--spring), border-color .3s; text-decoration: none; color: inherit; }
.stat:hover { transform: translateY(-2px); border-color: rgba(196,181,253,.4); }
.stat b { display: block; font-size: 26px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat small { color: #d8d0ee; font-weight: 600; font-size: 12px; }
.stat.alert b { color: #f9a8d4; text-shadow: 0 0 18px rgba(236,72,153,.6); }
@media (max-width: 600px) {
  .hello { padding: 20px; border-radius: 24px; }
  .hello h2 { font-size: 23px; }
  .hello .crystal { position: absolute; right: -26px; top: -22px; opacity: .8; }
  .hello .eyebrow, .hello h2, .hello p { padding-right: 76px; }
  .stats .stat { flex: 1; min-width: 0; }
  .stat b { font-size: 22px; }
}

/* ---------- pipeline board ---------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters .in { width: auto; min-height: 40px; padding: 7px 12px; font-size: 14px; border-radius: 12px; }
.seg { display: inline-flex; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.04); border: 1px solid var(--line); gap: 2px; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--muted); cursor: pointer; transition: all .25s; }
.seg button.on { background: linear-gradient(135deg, #7c3aed, var(--violet)); color: #fff; box-shadow: 0 6px 18px -8px rgba(139,92,246,.9); }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x proximity; }
.col { flex: 0 0 272px; scroll-snap-align: start; background: rgba(255,255,255,.025); border: 1px solid var(--line); border-radius: 20px; padding: 12px; min-height: 200px; transition: background .2s, border-color .2s; }
.col.drop { background: rgba(139,92,246,.1); border-color: rgba(196,181,253,.45); }
.col h3 { margin: 2px 4px 12px; font-size: 14px; display: flex; align-items: center; gap: 6px; }
.col h3 .n { margin-left: auto; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 99px; }
.col h3::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); box-shadow: 0 0 10px var(--sc); }
.kcard { position: relative; background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03)); border: 1px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; cursor: pointer; box-shadow: var(--shadow); overflow: hidden; }
.kcard::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--cc, #8b5cf6); box-shadow: 0 0 10px var(--cc, #8b5cf6); }
.kcard .title { font-weight: 700; font-size: 14.5px; line-height: 1.3; margin-bottom: 8px; }
.kcard .foot { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.kcard[draggable=true] { cursor: grab; }
.kcard.dragging { opacity: .4; }
.col .more-btn { width: 100%; }

/* ---------- client cards ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ccard { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 18px; cursor: pointer; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: block; }
.ccard::before { content: ""; position: absolute; right: -60px; top: -80px; width: 220px; height: 200px; background: radial-gradient(closest-side, color-mix(in srgb, var(--cc) 55%, transparent), transparent); opacity: .5; pointer-events: none; transition: opacity .3s; }
.ccard:hover::before { opacity: .85; }
.ccard .mono { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-weight: 900; font-size: 15px; color: #fff; background: linear-gradient(145deg, color-mix(in srgb, var(--cc) 85%, #fff 10%), color-mix(in srgb, var(--cc) 60%, #000)); box-shadow: 0 0 0 1px rgba(255,255,255,.2) inset, 0 8px 24px -8px var(--cc); letter-spacing: -.02em; }
.ccard .name { font-weight: 800; font-size: 17px; margin-top: 12px; position: relative; }
.ccard .sub { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }
.ccard .counts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.ccard.dim { opacity: .55; }
.mini-bar { display: flex; height: 6px; border-radius: 99px; overflow: hidden; background: rgba(255,255,255,.06); margin-top: 12px; }
.mini-bar i { display: block; height: 100%; }

.c-head { position: relative; overflow: hidden; border-radius: 28px; padding: 24px; margin-bottom: 16px; background: radial-gradient(520px 240px at 92% 0%, color-mix(in srgb, var(--cc) 50%, transparent), transparent 65%), linear-gradient(145deg, color-mix(in srgb, var(--cc) 30%, #120a20), #0c0716 75%); border: 1px solid color-mix(in srgb, var(--cc) 35%, transparent); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 30px 60px -30px color-mix(in srgb, var(--cc) 80%, transparent); }
.c-head .back { color: #fff; opacity: .75; text-decoration: none; font-weight: 700; font-size: 14px; }
.c-head h1 { margin: 10px 0 6px; font-size: 30px; display: flex; align-items: center; gap: 12px; }
.portal-box { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 16px; padding: 14px; border-radius: 18px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.1); }
.switch { position: relative; width: 50px; height: 30px; border-radius: 99px; background: rgba(255,255,255,.12); border: 1px solid var(--line-2); cursor: pointer; flex: none; transition: background .3s; padding: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .35s var(--spring); box-shadow: 0 2px 6px rgba(0,0,0,.4); }
.switch.on { background: linear-gradient(135deg, #34d399, #059669); box-shadow: 0 0 16px rgba(52,211,153,.5); }
.switch.on::after { transform: translateX(20px); }

/* ---------- piece sheet ---------- */
.sheet.wide { max-width: 760px; }
.piece-top { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 4px; }
.stage-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.stage-pick button { border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); padding: 7px 11px; border-radius: 99px; font-weight: 700; font-size: 13px; cursor: pointer; transition: all .25s var(--ease); }
.stage-pick button:hover { color: #fff; border-color: var(--line-2); }
.stage-pick button.on { color: #fff; background: color-mix(in srgb, var(--sc) 30%, transparent); border-color: color-mix(in srgb, var(--sc) 60%, transparent); box-shadow: 0 0 18px -4px var(--sc); }
.people-pick { display: flex; gap: 8px; flex-wrap: wrap; }
.people-pick button { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 4px; border-radius: 99px; border: 1px solid var(--line); background: rgba(255,255,255,.03); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); transition: all .2s; }
.people-pick button.on { color: #fff; border-color: rgba(196,181,253,.5); background: rgba(139,92,246,.2); box-shadow: 0 0 14px -4px rgba(139,92,246,.8); }
.comments { margin-top: 10px; }
.cmt { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cmt:last-child { border-bottom: 0; }
.cmt .bubble { flex: 1; min-width: 0; }
.cmt .who { font-weight: 800; font-size: 13.5px; }
.cmt .when { color: var(--muted); font-weight: 500; font-size: 12px; margin-left: 6px; }
.cmt .txt { margin-top: 3px; white-space: pre-wrap; line-height: 1.45; word-wrap: break-word; }
.cmt.client .bubble { background: rgba(192,52,127,.1); border: 1px solid rgba(236,72,153,.25); border-radius: 14px; padding: 10px 12px; }
.cmt.sys { color: var(--muted); font-size: 13px; padding: 6px 0; }
.cmt.internal .txt::before { content: "🔒 "; }
.client-av { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--magenta), var(--violet)); font-size: 14px; flex: none; }
.prose { white-space: pre-wrap; line-height: 1.6; color: #ece8f7; }
.prose a { word-break: break-all; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 12px; background: rgba(139,92,246,.14); border: 1px solid rgba(196,181,253,.25); color: #fff; font-weight: 700; font-size: 14px; text-decoration: none; }

/* ---------- activity ---------- */
.act { display: flex; gap: 12px; padding: 11px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.act:hover { background: rgba(255,255,255,.03); }
.act:last-child { border-bottom: 0; }
.act .ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; background: rgba(192,52,127,.15); border: 1px solid rgba(236,72,153,.3); }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.cal-head h2 { margin: 0; flex: 1; font-size: 24px; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11px; font-weight: 800; color: var(--muted); padding: 4px 0; letter-spacing: .08em; text-transform: uppercase; }
.cal .day { min-height: 98px; background: rgba(255,255,255,.03); border-radius: 14px; padding: 6px; cursor: pointer; border: 1px solid var(--line); overflow: hidden; transition: background .2s, transform .3s var(--spring); }
.cal .day:hover { background: rgba(255,255,255,.065); transform: translateY(-2px); }
.cal .day.out { opacity: .35; }
.cal .day.today .n { background: linear-gradient(135deg, #c4b5fd, var(--violet-2)); color: #160a2a; box-shadow: 0 0 16px rgba(139,92,246,.8); }
.cal .day.sel { border-color: var(--violet-2); background: rgba(139,92,246,.12); box-shadow: 0 0 0 1px var(--violet-2) inset, 0 0 24px -6px rgba(139,92,246,.8); }
.cal .n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 13px; }
.cal .chip { display: block; font-size: 11px; font-weight: 700; color: color-mix(in srgb, var(--c) 70%, #fff); background: color-mix(in srgb, var(--c) 20%, transparent); border-left: 3px solid var(--c); border-radius: 6px; padding: 2px 5px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .dots { display: none; gap: 3px; justify-content: center; margin-top: 4px; flex-wrap: wrap; }
.cal .dots i { width: 7px; height: 7px; border-radius: 50%; box-shadow: 0 0 8px currentColor; }
.cal .more { font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 2px; }
@media (max-width: 860px) {
  .cal { gap: 3px; }
  .cal .day { min-height: 54px; padding: 4px 2px; text-align: center; border-radius: 12px; }
  .cal .chip, .cal .more { display: none; }
  .cal .dots { display: flex; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 13px; font-weight: 600; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; box-shadow: 0 0 8px currentColor; }
.line-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.line-row:last-child { border-bottom: 0; }
.line-row:hover { background: rgba(255,255,255,.03); }
.line-row .time { width: 110px; flex: none; font-weight: 800; color: var(--lilac); font-size: 14px; }

/* ---------- team ---------- */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.member { position: relative; overflow: hidden; background: var(--card); border: 1px solid var(--line); border-radius: 24px; box-shadow: var(--shadow); padding: 24px 18px 18px; text-align: center; cursor: pointer; }
.member::before { content: ""; position: absolute; left: 50%; top: -60px; width: 220px; height: 160px; transform: translateX(-50%); background: radial-gradient(closest-side, color-mix(in srgb, var(--mc, #8b5cf6) 50%, transparent), transparent); opacity: .5; pointer-events: none; }
.member .av { position: relative; box-shadow: 0 0 0 3px rgba(255,255,255,.12), 0 0 30px color-mix(in srgb, var(--mc, #8b5cf6) 60%, transparent); }
.member .name { position: relative; font-weight: 800; font-size: 17px; margin-top: 12px; }
.member .title { color: var(--muted); font-weight: 600; margin-top: 2px; }
.member .stats-line { margin-top: 10px; font-size: 13px; color: var(--muted); }
.member.off { opacity: .45; }

/* ---------- tilt + glare ---------- */
.tilt { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--ty, 0)); transition: transform .5s var(--ease), box-shadow .4s, border-color .3s; transform-style: preserve-3d; }
.tilt.hot { transition: transform .08s linear, box-shadow .4s, border-color .3s; --ty: -3px; border-color: var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.1) inset, 0 30px 50px -24px rgba(0,0,0,.85), 0 0 40px -16px color-mix(in srgb, var(--cc, #8b5cf6) 75%, transparent); }
.tilt .glare { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(300px circle at var(--gx, 50%) var(--gy, 50%), rgba(255,255,255,.12), transparent 60%); opacity: 0; transition: opacity .3s; z-index: 1; }
.tilt.hot .glare { opacity: 1; }

/* ---------- modal ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(5, 3, 10, .66); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .25s; }
.sheet { position: relative; background: linear-gradient(170deg, rgba(36, 20, 62, .95), rgba(12, 7, 22, .97)); border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 40px 80px -20px rgba(0,0,0,.85), 0 0 90px -30px rgba(139,92,246,.7); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-radius: 28px; width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; padding: 24px; animation: pop-in .45s var(--spring); }
.sheet h2 { margin: 0 0 6px; font-size: 23px; }
.sheet .actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.sheet .actions .btn { flex: 1; }
.sheet .x { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(255,255,255,.05); cursor: pointer; font-size: 16px; z-index: 2; }
@media (max-width: 600px) {
  .backdrop { align-items: flex-end; padding: 0; }
  .sheet { border-radius: 28px 28px 0 0; padding-bottom: calc(24px + env(safe-area-inset-bottom)); animation: sheet-up .45s var(--ease); max-height: 94vh; }
  .sheet::before { content: ""; display: block; width: 44px; height: 5px; border-radius: 5px; background: rgba(255,255,255,.25); margin: -8px auto 14px; }
}
.pick-list .pick { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 16px; cursor: pointer; font-weight: 700; background: rgba(255,255,255,.05); margin-bottom: 8px; border: 1px solid var(--line); transition: background .2s, transform .25s var(--spring); }
.pick-list .pick:hover { background: rgba(255,255,255,.09); transform: translateX(4px); }
.pick-list .pick.on { border-color: var(--violet-2); background: rgba(139,92,246,.16); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop-in { from { transform: translateY(18px) scale(.96); opacity: 0; } }
@keyframes sheet-up { from { transform: translateY(100%); } }

.toast { position: fixed; left: 50%; bottom: 110px; transform: translateX(-50%); background: rgba(26, 14, 44, .92); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid var(--line-2); color: #fff; padding: 13px 22px; border-radius: 16px; font-weight: 700; z-index: 200; box-shadow: 0 20px 40px -10px rgba(0,0,0,.6), 0 0 30px -10px rgba(139,92,246,.8); max-width: 90vw; text-align: center; animation: toast-in .45s var(--spring); }
@keyframes toast-in { from { transform: translate(-50%, 20px) scale(.9); opacity: 0; } }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth .box { position: relative; width: 100%; max-width: 430px; background: linear-gradient(165deg, rgba(40, 20, 70, .72), rgba(10, 6, 18, .86)); border: 1px solid var(--line-2); backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px); border-radius: 30px; padding: 30px 28px; box-shadow: 0 1px 0 rgba(255,255,255,.12) inset, 0 40px 100px -30px rgba(0,0,0,.85), 0 0 120px -40px rgba(139,92,246,.9); }
.auth .crystal { margin: -110px auto 4px; }
.auth .lockup { width: 200px; display: block; margin: 0 auto 4px; }
.auth h1 { margin: 18px 0 4px; font-size: 27px; text-align: center; }
.auth .lead { text-align: center; color: var(--muted); margin: 0 0 6px; }

/* ---------- docs + help ---------- */
.doc-body { line-height: 1.65; color: #ece8f7; }
.doc-body h1, .doc-body h2, .doc-body h3 { margin: 22px 0 8px; }
.doc-body h1 { font-size: 24px; } .doc-body h2 { font-size: 20px; } .doc-body h3 { font-size: 17px; }
.doc-body ul { padding-left: 22px; margin: 6px 0; }
.doc-body li { margin: 3px 0; }
.doc-body .tk { list-style: none; margin-left: -22px; }
.doc-body code { background: rgba(139,92,246,.15); padding: 1px 6px; border-radius: 6px; font-size: 14px; }
.doc-body a { word-break: break-word; }
.doc-body hr { border: 0; border-top: 1px solid var(--line-2); margin: 18px 0; }
.lesson { position: relative; }
.lesson::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 3px; border-radius: 0 3px 3px 0; background: linear-gradient(#c4b5fd, #c0347f); box-shadow: 0 0 12px #8b5cf6; }
.lesson .mins { font-size: 12px; font-weight: 800; color: var(--lilac); background: rgba(139,92,246,.14); border: 1px solid rgba(196,181,253,.25); padding: 3px 10px; border-radius: 99px; }
.lesson ol, .lesson ul { padding-left: 20px; line-height: 1.65; margin: 8px 0 0; color: #ece8f7; }
.kbd { display: inline-block; padding: 1px 8px; border-radius: 8px; background: rgba(139,92,246,.2); border: 1px solid rgba(196,181,253,.28); font-weight: 700; font-size: 14px; }
.copy-box { display: flex; gap: 8px; margin-top: 10px; }
.copy-box .in { font-size: 13px; }
.link-tile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.04); border: 1px solid var(--line); text-decoration: none; color: inherit; font-weight: 700; transition: background .2s, transform .25s var(--spring); }
.link-tile:hover { background: rgba(139,92,246,.12); transform: translateY(-2px); }
.links-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }

/* ---------- motion ---------- */
.fx { animation: fadeUp .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }
.fx2 { animation: fadeUp2 .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 35ms + 80ms); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes fadeUp2 { from { opacity: 0; transform: translateY(14px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* phone fixes */
.grid2 > *, .grid3 > *, .hello .txt, .prow .grow, .act .grow { min-width: 0; }
.main > * { max-width: 100%; }
@media (max-width: 600px) {
  .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .stats .stat { min-width: 0; padding: 9px 10px; }
  .stat small { font-size: 11px; line-height: 1.2; display: block; }
  .hello .crystal { right: -34px; top: -30px; transform: scale(.8); }
  .filters .in { flex: 1 1 40%; }
}
