/* GTA 6 team platform. Apple-style look (CJ, 14 Nov 2026: "lets go with apple ui system if apple create this").
   System colours, SF font stack, grouped lists, translucent bars, sidebar navigation. No inline styles (CSP). */

:root {
  --bg: #f2f2f7;
  --bg-2: #ffffff;
  --bg-3: #f2f2f7;
  --fill: rgba(120, 120, 128, 0.12);
  --fill-2: rgba(120, 120, 128, 0.08);
  --label: #000000;
  --label-2: rgba(60, 60, 67, 0.62);
  --label-3: rgba(60, 60, 67, 0.32);
  --sep: rgba(60, 60, 67, 0.16);
  --tint: #007aff;
  --tint-soft: rgba(0, 122, 255, 0.12);
  --green: #34c759;
  --green-soft: rgba(52, 199, 89, 0.14);
  --orange: #ff9500;
  --orange-soft: rgba(255, 149, 0, 0.14);
  --red: #ff3b30;
  --red-soft: rgba(255, 59, 48, 0.12);
  --purple: #af52de;
  --pink: #ff2d55;
  --indigo: #5856d6;
  --teal: #30b0c7;
  --gray: #8e8e93;
  --material: rgba(246, 246, 248, 0.78);
  --material-bar: rgba(242, 242, 247, 0.8);
  --sidebar-w: 284px;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-pop: 0 10px 40px rgba(0, 0, 0, 0.18);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Segoe UI Variable Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #1c1c1e;
    --bg-3: #2c2c2e;
    --fill: rgba(120, 120, 128, 0.24);
    --fill-2: rgba(120, 120, 128, 0.16);
    --label: #ffffff;
    --label-2: rgba(235, 235, 245, 0.62);
    --label-3: rgba(235, 235, 245, 0.3);
    --sep: rgba(84, 84, 88, 0.55);
    --tint: #0a84ff;
    --tint-soft: rgba(10, 132, 255, 0.2);
    --green: #30d158;
    --green-soft: rgba(48, 209, 88, 0.18);
    --orange: #ff9f0a;
    --orange-soft: rgba(255, 159, 10, 0.18);
    --red: #ff453a;
    --red-soft: rgba(255, 69, 58, 0.18);
    --purple: #bf5af2;
    --pink: #ff375f;
    --indigo: #5e5ce6;
    --teal: #40c8e0;
    --material: rgba(28, 28, 30, 0.78);
    --material-bar: rgba(0, 0, 0, 0.72);
    --shadow: none;
    --shadow-pop: 0 10px 40px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--label);
  font: 400 17px/1.35 var(--font);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
a { color: var(--tint); text-decoration: none; }
a:hover { text-decoration: underline; }
[hidden] { display: none !important; }
.noscript { padding: 24px; }

svg.ic { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.ic.sm { width: 17px; height: 17px; }
svg.ic.xs { width: 14px; height: 14px; stroke-width: 2.2; }

/* ---------------- shell ---------------- */
.shell { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
.main { min-width: 0; display: flex; flex-direction: column; }
body.signed-out .shell { grid-template-columns: 1fr; }
body.signed-out .sidebar, body.signed-out .navbar { display: none; }

/* sidebar */
.sidebar {
  position: sticky; top: 0; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--material);
  -webkit-backdrop-filter: saturate(180%) blur(30px);
  backdrop-filter: saturate(180%) blur(30px);
  border-right: 0.5px solid var(--sep);
  padding: max(14px, env(safe-area-inset-top)) 12px max(12px, env(safe-area-inset-bottom));
  z-index: 30;
}
.sb-head { display: flex; align-items: center; gap: 12px; padding: 8px 8px 18px; }
.app-icon {
  width: 40px; height: 40px; border-radius: 10px; flex: none;
  background: url("icon.svg") center / cover no-repeat;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}
.sb-title { font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.sb-sub { font-size: 13px; color: var(--label-2); }
.sb-nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.sb-sec { font-size: 13px; font-weight: 600; color: var(--label-2); padding: 16px 10px 6px; }
.sb-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  border: 0; background: none; text-align: left;
  padding: 9px 10px; border-radius: 10px; margin: 1px 0;
  font-size: 16px; color: var(--label);
}
.sb-item svg.ic { color: var(--tint); }
.sb-item:hover { background: var(--fill-2); }
.sb-item.on { background: var(--tint); color: #fff; }
.sb-item.on svg.ic { color: #fff; }
.sb-item .sb-label { flex: 1; }
.sb-item .badge { font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.sb-item.on .badge { color: rgba(255, 255, 255, 0.85); }
.sb-item .badge.hot { background: var(--red); color: #fff; border-radius: 10px; padding: 0 7px; font-size: 13px; font-weight: 600; line-height: 20px; }
.sb-foot { border-top: 0.5px solid var(--sep); padding-top: 10px; }
.me-chip {
  display: flex; align-items: center; gap: 11px; width: 100%;
  border: 0; background: none; padding: 8px; border-radius: 12px; text-align: left;
}
.me-chip:hover { background: var(--fill-2); }
.me-chip .who { flex: 1; min-width: 0; }
.me-chip .nm { font-weight: 600; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-chip .rl { font-size: 13px; color: var(--label-2); }
.signout-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  margin-top: 6px; border: 0; border-radius: 10px; padding: 9px 10px;
  background: var(--fill-2); color: var(--red); font-size: 15px; font-weight: 500;
}
.signout-btn:hover { background: var(--red-soft); }
.drive-link {
  display: flex; align-items: center; gap: 10px; width: 100%;
  margin-bottom: 8px; padding: 9px 10px; border-radius: 10px;
  background: var(--tint-soft); color: var(--tint); font-size: 15px; font-weight: 500;
}
.drive-link:hover { text-decoration: none; filter: brightness(1.05); }

/* navbar */
.navbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: 52px; padding: env(safe-area-inset-top) 16px 0;
  background: var(--material-bar);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid transparent;
  transition: border-color 0.2s;
}
.navbar.scrolled { border-bottom-color: var(--sep); }
.nav-title { flex: 1; text-align: center; font-weight: 600; font-size: 17px; opacity: 0; transition: opacity 0.2s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar.scrolled .nav-title { opacity: 1; }
.nav-right { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: none; color: var(--tint); padding: 0;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn.spin svg { animation: spin 0.8s linear infinite; }
.menu-btn { display: none; }
.av-btn { border: 0; background: none; padding: 0; border-radius: 50%; display: none; }

/* phone / small tablet: the sidebar slides in from the left */
@media (max-width: 899px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: min(86vw, 320px);
    transform: translateX(-104%);
    visibility: hidden;
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1), visibility 0s linear 0.32s;
    background: var(--bg-2);
  }
  body.menu-open .sidebar {
    transform: none; visibility: visible; box-shadow: var(--shadow-pop);
    transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.32); z-index: 25; animation: fade 0.2s; }
  .menu-btn { display: grid; }
  .av-btn { display: block; }
}

/* ---------------- content ---------------- */
#app { width: 100%; max-width: 880px; margin: 0 auto; padding: 4px 20px calc(48px + env(safe-area-inset-bottom)); }
#app.wide { max-width: 1240px; }
.loading { display: grid; place-items: center; min-height: 50vh; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--label-2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.page-head { padding: 10px 0 14px; display: flex; align-items: flex-end; gap: 12px; }
.page-head .grow { flex: 1; min-width: 0; }
.large-title { font-size: 34px; line-height: 1.12; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.subtitle { color: var(--label-2); font-size: 15px; margin-top: 2px; }
.sec-head { display: flex; align-items: baseline; gap: 8px; margin: 26px 4px 8px; }
.sec-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.sec-head .n { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.sec-head .grow { flex: 1; }
.sec-head .act { font-size: 15px; color: var(--tint); background: none; border: 0; padding: 0; }
.footnote { font-size: 13px; color: var(--label-2); margin: 8px 4px; }
.muted { color: var(--label-2); }

.card { background: var(--bg-2); border-radius: var(--radius); box-shadow: var(--shadow); }
.pad { padding: 16px; }

/* ---------------- today hero (daily target) ---------------- */
.hero { display: grid; grid-template-columns: auto 1fr; gap: 20px; align-items: center; padding: 20px; }
.hero .ring-wrap { position: relative; width: 120px; height: 120px; }
.hero .ring-num { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.hero .ring-num b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1; }
.hero .ring-num span { display: block; font-size: 12px; color: var(--label-2); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.hero h3 { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.04em; }
.hero .big { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }
.hero .small { font-size: 15px; color: var(--label-2); margin-top: 4px; }
.hero .legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 13px; color: var(--label-2); }
.hero .legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
@media (max-width: 480px) {
  .hero { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .hero .legend { justify-content: center; }
}

svg.ring { width: 100%; height: 100%; transform: rotate(-90deg); }
svg.ring circle { fill: none; stroke-linecap: round; }
svg.ring .track { stroke: var(--fill); }
svg.ring .p-sub { stroke: var(--tint); transition: stroke-dashoffset 0.6s cubic-bezier(0.32, 0.72, 0, 1); }
svg.ring .p-ok { stroke: var(--green); transition: stroke-dashoffset 0.6s cubic-bezier(0.32, 0.72, 0, 1); }

/* linear progress */
.bar { display: flex; height: 8px; border-radius: 4px; background: var(--fill); overflow: hidden; margin-top: 12px; }
.bar.thin { height: 5px; border-radius: 3px; margin-top: 8px; }
.bar > span { display: block; height: 100%; transition: width 0.5s cubic-bezier(0.32, 0.72, 0, 1); }
.bar .b-ok { background: var(--green); }
.bar .b-sub { background: var(--tint); }
.bar .b-redo { background: var(--orange); }
.c-ok { background: var(--green); }
.c-sub { background: var(--tint); }
.c-redo { background: var(--orange); }
.c-left { background: var(--fill); }

/* week strip */
.week { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; margin: 14px -2px 0; scroll-snap-type: x proximity; scrollbar-width: none; }
.week::-webkit-scrollbar { display: none; }
.day {
  flex: none; width: 92px; scroll-snap-align: start;
  border: 0; text-align: left; padding: 12px; border-radius: 14px;
  background: var(--bg-2); box-shadow: var(--shadow);
}
.day .dw { font-size: 13px; font-weight: 600; color: var(--label-2); text-transform: uppercase; letter-spacing: 0.03em; }
.day .dd { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin-top: 1px; }
.day .dp { font-size: 13px; color: var(--label-2); margin-top: 2px; font-variant-numeric: tabular-nums; }
.day.today .dw { color: var(--red); }
.day.on { background: var(--tint); color: #fff; }
.day.on .dw, .day.on .dp, .day.on.today .dw { color: rgba(255, 255, 255, 0.85); }
.day.on .bar { background: rgba(255, 255, 255, 0.3); }
.day.on .bar .b-ok, .day.on .bar .b-sub { background: #fff; }
.day.full .dp { color: var(--green); font-weight: 600; }
.day.on.full .dp { color: #fff; }

/* banner (team notice) */
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 14px; border-radius: var(--radius); background: var(--tint-soft); color: var(--label); font-size: 15px; }
.banner svg { color: var(--tint); margin-top: 1px; }

/* ---------------- task list (Reminders-style rows that open) ---------------- */
.list { background: var(--bg-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.task { border-top: 0.5px solid var(--sep); }
.task:first-child { border-top: 0; }
.task > summary { list-style: none; display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; cursor: pointer; }
.task > summary::-webkit-details-marker { display: none; }
.task > summary:hover { background: var(--fill-2); }
.st { width: 24px; height: 24px; flex: none; margin-top: 1px; border-radius: 50%; display: grid; place-items: center; }
.st.todo { border: 1.8px solid var(--label-3); }
.st.redo { background: var(--orange); color: #fff; }
.st.submitted { background: var(--tint); color: #fff; }
.st.approved { background: var(--green); color: #fff; }
.st.skipped { background: var(--fill); color: var(--label-2); }
.task .mid { flex: 1; min-width: 0; }
.task .t1 { font-size: 16px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task[open] > summary .t1 { -webkit-line-clamp: unset; display: block; }
.task.done .t1 { color: var(--label-2); }
.task .t2 { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 13px; color: var(--label-2); min-width: 0; }
.task .t2 .place { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* 16 Nov: short title + the action under it, game tag in front */
.task .t3 { margin-top: 3px; font-size: 14px; color: var(--label-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.task[open] > summary .t3 { -webkit-line-clamp: unset; display: block; }
.gtag { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; margin-right: 7px; border-radius: 6px; background: var(--tint-soft); color: var(--tint); font-size: 12px; font-weight: 700; vertical-align: 2px; white-space: nowrap; }
/* one folder link for the whole day */
.daycard { padding: 16px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; }
.daycard.sent { flex-direction: row; align-items: center; gap: 10px; color: var(--green); font-weight: 500; }
.daycard .error:empty { display: none; }
.dc-head { display: flex; align-items: center; gap: 8px; color: var(--tint); }
.dc-head h3 { margin: 0; font-size: 17px; font-weight: 600; color: var(--label); }
.dc-how { margin: 0; font-size: 14px; color: var(--label-2); line-height: 1.45; }
.dc-how b { color: var(--label); font-weight: 600; }
.dc-list { display: flex; flex-direction: column; border-radius: 12px; background: var(--fill-2); overflow: hidden; }
.dc-item { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-top: 0.5px solid var(--sep); font-size: 14px; cursor: pointer; }
.dc-item:first-child { border-top: 0; }
.dc-item input { width: 18px; height: 18px; accent-color: var(--tint); flex: none; margin: 0; }
.dc-t { flex: 1; min-width: 0; }
.dc-file { font-family: var(--mono); font-size: 12px; color: var(--label-3); flex: none; }
.daygroup .daycard { margin: 8px 12px 12px; }
@media (max-width: 600px) { .dc-file { display: none; } }
.task .right { text-align: right; flex: none; display: flex; align-items: center; gap: 4px; color: var(--label-3); }
.task .due-t { font-size: 14px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.task .due-t.late { color: var(--red); font-weight: 600; }
.task .chev { transition: transform 0.2s; }
.task[open] > summary .chev { transform: rotate(90deg); }
.task .body { padding: 0 16px 16px 52px; animation: rise 0.2s ease-out; }
.task .t2 .av { margin-left: 2px; }

.chan { display: inline-flex; align-items: center; height: 19px; padding: 0 6px; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: #fff; flex: none; }
.chan.GS { background: var(--tint); }
.chan.NVC { background: var(--pink); }
.chan.GST { background: var(--orange); }
.chan.GB { background: var(--green); }
.chan.OS { background: var(--purple); }
.chan.x { background: var(--gray); }
.oid { font-family: var(--mono); font-size: 12px; flex: none; }
.prio { color: var(--red); font-weight: 600; flex: none; }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px; border-radius: 12px; font-size: 13px; font-weight: 600; }
.pill.todo { background: var(--fill); color: var(--label-2); }
.pill.submitted { background: var(--tint-soft); color: var(--tint); }
.pill.approved { background: var(--green-soft); color: var(--green); }
.pill.redo { background: var(--orange-soft); color: var(--orange); }
.pill.skipped { background: var(--fill); color: var(--label-2); }
.pill.late { background: var(--red-soft); color: var(--red); }

.video-line { font-size: 13px; color: var(--label-2); margin-bottom: 10px; }
.facts { display: grid; grid-template-columns: 74px 1fr; gap: 0; margin: 0 0 12px; background: var(--bg-3); border-radius: 12px; overflow: hidden; }
.facts dt, .facts dd { margin: 0; padding: 9px 12px; font-size: 15px; border-top: 0.5px solid var(--sep); }
.facts dt { color: var(--label-2); padding-right: 0; }
.facts dt:first-of-type, .facts dt:first-of-type + dd { border-top: 0; }
.facts dd.late { color: var(--red); font-weight: 600; }
@media (prefers-color-scheme: dark) { .facts { background: var(--bg-3); } }

.note { border-radius: 12px; padding: 11px 13px; font-size: 15px; margin-bottom: 12px; background: var(--fill-2); }
.note b { display: block; font-size: 13px; margin-bottom: 2px; color: var(--label-2); font-weight: 600; }
.note.redo { background: var(--orange-soft); }
.note.redo b { color: var(--orange); }
.note.ok { background: var(--green-soft); }
.note.ok b { color: var(--green); }

/* forms */
.field {
  width: 100%; border: 0; outline: none;
  background: var(--fill); border-radius: var(--radius-s);
  padding: 12px 14px; font-size: 17px; margin-bottom: 8px;
}
.field::placeholder { color: var(--label-3); }
.field:focus { box-shadow: 0 0 0 3px var(--tint-soft); }
.field.small { font-size: 15px; padding: 10px 12px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 13px; color: var(--label-2); pointer-events: none; }
.input-icon .field { padding-left: 40px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px; border: 0; border-radius: 12px;
  background: var(--tint); color: #fff; font-size: 17px; font-weight: 600;
  transition: transform 0.1s, filter 0.15s, opacity 0.15s;
}
.btn:hover { filter: brightness(1.06); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.full { width: 100%; }
.btn.sm { min-height: 36px; font-size: 15px; padding: 0 14px; border-radius: 10px; }
.btn.tinted { background: var(--tint-soft); color: var(--tint); }
.btn.gray { background: var(--fill); color: var(--label); }
.btn.green { background: var(--green); }
.btn.orange { background: var(--orange); }
.btn.red-text { background: var(--fill-2); color: var(--red); }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.row-btns .btn { flex: 1 1 140px; }
.error { color: var(--red); font-size: 14px; min-height: 0; margin: 2px 2px 8px; }
.error:empty { display: none; }
.sent-line { font-size: 14px; color: var(--label-2); margin-bottom: 10px; }
.sent-line a { word-break: break-all; }

/* day groups in Upcoming / All */
.daygroup { margin-top: 22px; }
.daygroup > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; margin: 0 4px 8px; }
.daygroup > summary::-webkit-details-marker { display: none; }
.daygroup .dg-title { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.daygroup .dg-title .today-tag { color: var(--red); }
.daygroup .dg-meta { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.daygroup .grow { flex: 1; }
.daygroup .dg-bar { width: 90px; }
.daygroup .dg-bar .bar { margin-top: 0; }
.daygroup .chev { color: var(--label-3); transition: transform 0.2s; }
.daygroup[open] > summary .chev { transform: rotate(90deg); }

/* empty state */
.empty { text-align: center; padding: 44px 20px; color: var(--label-2); }
.empty .em-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.empty .em-ic.blue { background: var(--tint-soft); color: var(--tint); }
.empty .em-ic svg { width: 32px; height: 32px; }
.empty h3 { color: var(--label); font-size: 20px; margin: 0 0 4px; letter-spacing: -0.02em; }

/* ---------------- avatars ---------------- */
.av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; color: #fff; font-weight: 600; font-size: 15px; letter-spacing: 0; user-select: none; }
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.av.s18 { width: 18px; height: 18px; font-size: 8px; font-weight: 700; }
.av.s28 { width: 28px; height: 28px; font-size: 11px; }
.av.s32 { width: 32px; height: 32px; font-size: 12px; }
.av.s48 { width: 48px; height: 48px; font-size: 18px; }
.av.s56 { width: 56px; height: 56px; font-size: 20px; }
.av.s96 { width: 104px; height: 104px; font-size: 38px; }
.g0 { background: linear-gradient(180deg, #5ac8fa, #007aff); }
.g1 { background: linear-gradient(180deg, #ff9f0a, #ff6b00); }
.g2 { background: linear-gradient(180deg, #34c759, #12a150); }
.g3 { background: linear-gradient(180deg, #ff6482, #ff2d55); }
.g4 { background: linear-gradient(180deg, #bf5af2, #8944ab); }
.g5 { background: linear-gradient(180deg, #a5abb6, #858994); }

/* ---------------- team ---------------- */
.seg { display: inline-flex; background: var(--fill); border-radius: 9px; padding: 2px; gap: 2px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 7px; font-size: 14px; font-weight: 500; white-space: nowrap; color: var(--label); }
.seg button.on { background: var(--bg-2); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 0 0 0.5px rgba(0, 0, 0, 0.04); font-weight: 600; }
@media (prefers-color-scheme: dark) { .seg button.on { background: #636366; } }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.pcard { border: 0; text-align: left; padding: 16px; display: block; width: 100%; }
.pcard:hover { transform: translateY(-1px); box-shadow: var(--shadow-pop); }
.pcard { transition: transform 0.15s, box-shadow 0.2s; }
.pcard .top { display: flex; align-items: center; gap: 12px; }
.pcard .top .who { flex: 1; min-width: 0; }
.pcard .nm { font-weight: 600; font-size: 17px; }
.pcard .rl { font-size: 13px; color: var(--label-2); }
.pcard .pct { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.pcard .pct small { font-size: 15px; font-weight: 600; color: var(--label-2); margin-left: 1px; }
.pcard .line { display: flex; justify-content: space-between; gap: 8px; margin-top: 10px; font-size: 13px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.pcard .line b { color: var(--label); font-weight: 600; }
.pcard .late-b { color: var(--red); font-weight: 600; }
.pcard .ring-s { width: 52px; height: 52px; position: relative; flex: none; }
.pcard .ring-s span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ccard { padding: 14px 16px; }
.ccard .top { display: flex; align-items: center; gap: 10px; }
.ccard .nm { font-weight: 600; flex: 1; }
.ccard .pct { font-weight: 700; font-variant-numeric: tabular-nums; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.toolbar .field { margin: 0; flex: 1 1 220px; }
.toolbar select.field { flex: 0 1 180px; appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: linear-gradient(45deg, transparent 50%, var(--label-2) 50%), linear-gradient(135deg, var(--label-2) 50%, transparent 50%); background-position: calc(100% - 17px) 52%, calc(100% - 12px) 52%; background-size: 5px 5px; background-repeat: no-repeat; }
.more { margin-top: 12px; }
.review-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.review-actions .btn { flex: 1 1 120px; }

/* person detail + profile */
.profile-head { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 18px 0 8px; }
.profile-head .av-edit { position: relative; border: 0; background: none; padding: 0; border-radius: 50%; }
.profile-head .av-edit .cam { position: absolute; right: 0; bottom: 2px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--tint); color: #fff; border: 3px solid var(--bg); }
.profile-head h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.025em; margin: 12px 0 0; }
.profile-head .rl { color: var(--label-2); font-size: 15px; }
.profile-head .row-btns { margin-top: 14px; justify-content: center; }
.profile-head .row-btns .btn { flex: 0 0 auto; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
.stat { padding: 14px; text-align: center; }
.stat b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--label-2); }
.group { background: var(--bg-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.group .gr { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-top: 0.5px solid var(--sep); font-size: 16px; }
.group .gr:first-child { border-top: 0; }
.group .gr .grow { flex: 1; min-width: 0; }
.group .gr .meta { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; }
.group button.gr { width: 100%; border-left: 0; border-right: 0; border-bottom: 0; background: none; text-align: left; }
.group button.gr:first-child { border-top: 0; }
.group button.gr:hover { background: var(--fill-2); }
.group .gr.danger { color: var(--red); justify-content: center; font-weight: 500; }
.dayrow .bar { margin-top: 0; width: 120px; }

/* videos */
.stats.four { grid-template-columns: repeat(4, 1fr); }
.stat.ok b { color: var(--green); }
.stat.needs b { color: var(--orange); }
.stat.check b { color: var(--tint); }
.stat.wait b { color: var(--label-2); }
.vhead { display: flex; align-items: center; gap: 10px; margin: 30px 4px 10px; min-width: 0; }
.vhead h2 { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; margin: 0; white-space: nowrap; }
.vhead .n { color: var(--label-2); font-size: 15px; font-variant-numeric: tabular-nums; min-width: 0; }
.vhead .grow { flex: 1; }
.vh-bar { width: 140px; flex: none; }
.vh-bar .bar { margin-top: 0; }
.vrow > summary { align-items: center; gap: 14px; }
.vrow .t1 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.vrow .t2 { flex-wrap: wrap; row-gap: 4px; margin-top: 6px; }
.vrow .t2 .pill { height: 22px; padding: 0 9px; font-size: 12px; }
.vrow .mid .bar { margin-top: 10px; }
.vrow > summary > .chev { color: var(--label-3); flex: none; }
.vrow > .body { padding-left: 16px; }
.dtile { flex: none; width: 48px; padding: 6px 0 7px; border-radius: 12px; background: var(--bg-2); border: 0.5px solid var(--sep); display: flex; flex-direction: column; align-items: center; line-height: 1; }
.dtile .dw { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--red); }
.dtile .dn { font-size: 22px; font-weight: 600; margin-top: 3px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dtile.today { background: var(--red); border-color: var(--red); }
.dtile.today .dw, .dtile.today .dn { color: #fff; }
.vpct { flex: none; min-width: 66px; text-align: right; }
.vpct b { display: block; font-size: 22px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.vpct span { font-size: 12px; color: var(--label-2); font-variant-numeric: tabular-nums; }
.pill.v-ready { background: var(--green-soft); color: var(--green); }
.pill.v-check { background: var(--tint-soft); color: var(--tint); }
.pill.v-late { background: var(--red-soft); color: var(--red); }
.pill.v-needs { background: var(--orange-soft); color: var(--orange); }
.pill.v-waiting, .pill.v-none { background: var(--fill); color: var(--label-2); }
.vsum { margin: 0 0 12px; color: var(--label-2); font-size: 15px; line-height: 1.45; }
.vclips { margin-top: 14px; }
.vclips .list { box-shadow: none; border: 0.5px solid var(--sep); }
@media (max-width: 600px) {
  .stats.four { grid-template-columns: repeat(2, 1fr); }
  .vh-bar { display: none; }
  .vhead { flex-wrap: wrap; row-gap: 2px; }
  .vhead .n { flex-basis: 100%; }
  .vrow > summary { gap: 10px; }
  .vpct { min-width: 50px; }
  .vpct b { font-size: 18px; }
  .dtile { width: 42px; }
  .dtile .dn { font-size: 19px; }
}

/* rules */
.rule { display: flex; gap: 14px; padding: 14px 16px; border-top: 0.5px solid var(--sep); }
.rule:first-child { border-top: 0; }
.rule .ri { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.rule .ri.b { background: var(--tint); } .rule .ri.o { background: var(--orange); } .rule .ri.g { background: var(--green); }
.rule .ri.r { background: var(--red); } .rule .ri.p { background: var(--purple); } .rule .ri.i { background: var(--indigo); }
.rule .ri.t { background: var(--teal); } .rule .ri.k { background: var(--pink); }
.rule h4 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.rule p { margin: 0; font-size: 15px; color: var(--label-2); }

/* ---------------- sign in ---------------- */
.signin-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; }
.signin { width: 100%; max-width: 380px; text-align: center; animation: rise 0.35s ease-out; }
.signin .app-icon { width: 84px; height: 84px; border-radius: 20px; margin: 0 auto 18px; box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18); }
.signin h1 { font-size: 30px; font-weight: 700; letter-spacing: -0.025em; margin: 0; }
.signin p { color: var(--label-2); margin: 6px 0 24px; font-size: 16px; }
.signin .field { text-align: center; font-family: var(--mono); font-size: 20px; letter-spacing: 0.08em; padding: 15px; }
.signin .btn { margin-top: 6px; min-height: 50px; }
.signin .fine { font-size: 13px; color: var(--label-3); margin-top: 22px; }

/* ---------------- toast (HUD) ---------------- */
.toast {
  position: fixed; left: 50%; bottom: calc(26px + env(safe-area-inset-bottom)); z-index: 60;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(30, 30, 30, 0.86); color: #fff;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  padding: 12px 20px; border-radius: 22px; font-size: 15px; font-weight: 500;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

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