/* ==========================================================================
   Octopus & Whale Hub: single stylesheet, no frameworks
   --------------------------------------------------------------------------
   Colors come from octopusandwhale.com (page 4):
     cobalt  #0b209c  actions: primary buttons, links, focus, selection
     signal  #07ec03  "you are here": active nav item, today. Always a fill
                      under dark text; as text on white it is unreadable.
     pink    #ec008c  things waiting on you: count badges only (deepened to
                      #db0082 so white numbers pass WCAG AA)
     ink     #2b2b2b  text
   Shapes: pills for buttons, nav items, badges and counts; 14px for cards
   and panels; 10px for inputs and tiles; 6-8px for chips and day numbers;
   circles for avatars and the brand mark.
   Layers: sidebar 40, scrim 30, mobile bar 20, signed-out flash 10.
   Motion: page cross-fades, press feedback and the flash entrance only.
   All of it is off under prefers-reduced-motion.
   ========================================================================== */

:root {
  --cobalt: #0b209c;
  --cobalt-bright: #1430cf;
  --signal: #07ec03;
  --on-signal: #1f1f1f;
  --attention: #db0082;

  --bg: #f4f4f5;
  --surface: #fdfdfd;
  --surface-2: #f8f8f9;
  --surface-3: #efeff1;
  --border: #e4e4e7;
  --border-2: #d4d4d8;
  --text: #2b2b2b;
  --text-2: #52525b;
  --text-3: #6b6b74;
  --accent: var(--cobalt);
  --accent-hover: var(--cobalt-bright);
  --accent-soft: #e8eaf7;
  --accent-text: var(--cobalt);
  --on-accent: #fdfdfd;
  --ring: var(--cobalt);
  --focus: rgba(11, 32, 156, 0.2);
  --red: #c4281c;
  --amber: #d99400;
  --scrim: rgba(24, 24, 27, 0.4);
  --shadow-lg: 0 16px 40px rgba(24, 24, 27, 0.12), 0 2px 6px rgba(24, 24, 27, 0.05);
  --radius: 14px;
  --radius-sm: 10px;
  --pill: 999px;
  --font: 'Segoe UI Variable Text', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Segoe UI Variable Display', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Code', SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  /* status tones: soft background / strong foreground, every pair >= 4.5:1 */
  --green-bg: #e3f9e1; --green-fg: #16700f;
  --amber-bg: #fff3c4; --amber-fg: #7a5200;
  --red-bg: #fde7e5;   --red-fg: #b42318;
  --blue-bg: #e8eaf7;  --blue-fg: #0b209c;
  --pink-bg: #fde6f3;  --pink-fg: #a3005f;
  --gray-bg: #efeff1;  --gray-fg: #52525b;

  /* project colors: picked per project so people can tell them apart */
  --pc-teal: #0f9e8a; --pc-blue: #1430cf; --pc-violet: #6a3fd6; --pc-pink: #ec008c;
  --pc-orange: #ee5d0b; --pc-amber: #e0a100; --pc-green: #17b013; --pc-slate: #5e6677; --pc-ink: #2b2b2b;
}

@media (prefers-color-scheme: dark) {
  :root {
    --on-signal: #121212;
    --bg: #0f0f11;
    --surface: #18181b;
    --surface-2: #1d1d21;
    --surface-3: #27272c;
    --border: #2a2a30;
    --border-2: #3f3f46;
    --text: #f2f2f3;
    --text-2: #b8b8c0;
    --text-3: #8e8e97;
    --accent: #2f45e0;
    --accent-hover: #4a5ff2;
    --accent-soft: rgba(95, 115, 255, 0.16);
    --accent-text: #9aa8ff;
    --ring: #8595ff;
    --focus: rgba(130, 148, 255, 0.35);
    --red: #ff7a6e;
    --amber: #f2c230;
    --scrim: rgba(0, 0, 0, 0.55);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
    --green-bg: rgba(7, 236, 3, 0.13);    --green-fg: #86f383;
    --amber-bg: rgba(255, 221, 0, 0.13);  --amber-fg: #ffd84d;
    --red-bg: rgba(255, 99, 88, 0.15);    --red-fg: #ff9d93;
    --blue-bg: rgba(95, 115, 255, 0.18);  --blue-fg: #aeb8ff;
    --pink-bg: rgba(236, 0, 140, 0.2);    --pink-fg: #ff8dcc;
    --gray-bg: rgba(255, 255, 255, 0.08); --gray-fg: #c4c4cc;
    --pc-blue: #5a6dff; --pc-violet: #8b66ff; --pc-pink: #ff3aa8; --pc-green: #2fcf2a;
    --pc-slate: #8a93a6; --pc-ink: #a1a1aa;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; }
h1 { font-family: var(--font-display); font-size: 28px; line-height: 1.15; font-weight: 700; letter-spacing: -0.025em; text-wrap: balance; }
h2 { font-size: 15px; letter-spacing: -0.005em; }
h3 { font-size: 15px; }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; }
code { font-family: var(--mono); font-size: 12.5px; background: var(--surface-3); padding: 1px 6px; border-radius: 6px; }
strong { font-weight: 650; }
.icon { width: 18px; height: 18px; flex: none; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
[hidden] { display: none !important; }
::selection { background: var(--signal); color: var(--on-signal); }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 240px; z-index: 40;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 14px 14px;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 2px 22px; color: var(--text); text-decoration: none !important; min-width: 0; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 15px; line-height: 1.2; letter-spacing: -0.015em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.brand-mark {
  display: inline-grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--cobalt); color: var(--signal);
  font-family: var(--font-display); font-weight: 800; font-size: 13px; letter-spacing: 0.03em;
}
.brand-mark.lg { width: 52px; height: 52px; font-size: 18px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-section { font-size: 12px; font-weight: 600; color: var(--text-3); padding: 18px 12px 6px; }
.nav-section:first-child { padding-top: 0; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  min-height: 38px; padding: 0 12px; border-radius: var(--pill);
  color: var(--text-2); font-weight: 550; text-decoration: none !important;
  transition: background-color 0.15s, color 0.15s;
}
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--signal); color: var(--on-signal); font-weight: 650; }
.nav-badge {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill);
  background: var(--attention); color: var(--on-accent); font-size: 11.5px; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.nav-item.active .nav-badge { background: var(--on-signal); color: var(--signal); }
.sidebar-foot { display: flex; align-items: center; gap: 4px; border-top: 1px solid var(--border); padding: 12px 0 0; margin-top: 8px; }
.me { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--text); text-decoration: none !important; padding: 6px; border-radius: 12px; }
.me:hover { background: var(--surface-3); }
.me-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.me-name { font-weight: 650; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 12px; color: var(--text-3); }

.main { flex: 1; min-width: 0; margin-left: 240px; }
.content { max-width: 1320px; margin: 0 auto; padding: 32px 32px 72px; }
.mobile-bar { display: none; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.scrim { display: none; }

@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.25s var(--ease); border-right: 0; box-shadow: var(--shadow-lg); }
  .nav-toggle:checked ~ .app .sidebar { transform: none; }
  .nav-toggle:checked ~ .app .scrim { display: block; position: fixed; inset: 0; background: var(--scrim); z-index: 30; }
  .main { margin-left: 0; }
  .mobile-bar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 20;
    padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border);
  }
  .mobile-bar .brand { padding: 0; flex: 1; }
  .mobile-bar .brand-mark { width: 32px; height: 32px; font-size: 12px; }
  .content { padding: 22px 16px 48px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; margin-bottom: 26px; }
.page-title { min-width: 0; }
.page-head .sub { color: var(--text-2); margin-top: 6px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); font-weight: 550; margin-bottom: 12px; font-size: 13px; }
.back:hover { color: var(--text); }
.back .icon { width: 16px; height: 16px; }
/* The brand's highlight block, as on octopusandwhale.com. Used once per screen at most. */
.hl { background: var(--signal); color: var(--on-signal); padding: 0 0.14em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* ---------- layout ---------- */
.grid { display: grid; gap: 20px; margin-bottom: 20px; }
.grid:last-child { margin-bottom: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.main-side { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
@media (max-width: 1440px) { .main-side { grid-template-columns: minmax(0, 1fr) 320px; } }
@media (max-width: 1180px) { .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1024px) { .main-side, .cols-3 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 640px) { .cols-2, .cols-4 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--border); min-height: 54px; }
.card-body { padding: 20px; }
.card-foot { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); flex-wrap: wrap; }
.pad { padding: 16px 20px; }
.link { font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 2px; }
.link .icon { width: 15px; height: 15px; }
a.link-card { color: inherit; text-decoration: none; transition: border-color 0.15s, background-color 0.15s; }
a.link-card:hover { border-color: var(--border-2); }
.collapsible > summary { cursor: pointer; list-style: none; }
.collapsible > summary::-webkit-details-marker { display: none; }
.collapsible:not([open]) > summary { border-bottom: 0; }
.notice { display: flex; gap: 10px; align-items: center; padding: 14px 20px; color: var(--text-2); }
.danger-zone { border-color: color-mix(in srgb, var(--red) 35%, var(--border)); }
.danger-zone p { margin: 4px 0 12px; }
.row-flex { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.onboarding { display: flex; align-items: center; gap: 20px; padding: 22px 24px; margin-bottom: 20px; flex-wrap: wrap; background: var(--accent-soft); border-color: transparent; }
.onboarding-text { flex: 1; min-width: 260px; }
.onboarding h2 { font-size: 17px; margin-bottom: 4px; }

/* ---------- stats: one panel split by hairlines, not a row of floating cards ---------- */
.stats { gap: 1px; margin-bottom: 24px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.stats > .card { border: 0; border-radius: 0; }
.stats.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat { padding: 18px 20px 17px; display: block; }
.stats > a.stat:hover { background: var(--surface-2); }
.stat-label { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; font-weight: 550; }
.stat-label .icon { width: 16px; height: 16px; color: var(--text-3); }
.stat-value { font-family: var(--font-display); font-size: 28px; font-weight: 650; letter-spacing: -0.025em; margin-top: 8px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-sub { font-size: 12.5px; color: var(--text-3); margin-top: 5px; }
@media (max-width: 640px) {
  .stats.cols-2, .stats.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .stat { padding: 14px 16px; }
  .stat-value { font-size: 22px; }
  .stat-sub { font-size: 12px; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 16px; border-radius: var(--pill);
  border: 1px solid var(--border-2); background: var(--surface); color: var(--text);
  font: inherit; font-weight: 600; white-space: nowrap; cursor: pointer; text-decoration: none !important;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--red-fg); }
.btn-danger:hover { background: var(--red-bg); border-color: color-mix(in srgb, var(--red-fg) 35%, var(--border-2)); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-3); color: var(--text); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 13px; gap: 5px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn[disabled], .btn.busy { opacity: 0.55; pointer-events: none; }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--text-2); cursor: pointer; transition: background-color 0.15s, color 0.15s; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.inline-form { display: inline-flex; margin: 0; }
.row-actions { display: inline-flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%;
  height: 48px; border-radius: var(--pill); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text); font-weight: 650; font-size: 15px; text-decoration: none !important; margin-top: 24px;
  transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
}
.btn-google:hover { background: var(--surface-2); border-color: var(--text-3); }
.btn-google:active { transform: translateY(1px); }
.g-logo { width: 20px; height: 20px; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: var(--pill); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; background: var(--gray-bg); color: var(--gray-fg); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.t-green { background: var(--green-bg); color: var(--green-fg); }
.t-amber { background: var(--amber-bg); color: var(--amber-fg); }
.t-red { background: var(--red-bg); color: var(--red-fg); }
.t-blue { background: var(--blue-bg); color: var(--blue-fg); }
.t-gray { background: var(--gray-bg); color: var(--gray-fg); }
.t-outline { background: transparent; color: var(--text-2); box-shadow: inset 0 0 0 1px var(--border-2); }
.count-pill { min-width: 24px; height: 22px; padding: 0 7px; border-radius: var(--pill); background: var(--attention); color: var(--on-accent); font-weight: 700; font-size: 12px; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.text-red { color: var(--red-fg) !important; }
.text-amber { color: var(--amber-fg) !important; }

/* project color classes */
.pc-teal { --pc: var(--pc-teal); } .pc-blue { --pc: var(--pc-blue); } .pc-violet { --pc: var(--pc-violet); }
.pc-pink { --pc: var(--pc-pink); } .pc-orange { --pc: var(--pc-orange); } .pc-amber { --pc: var(--pc-amber); }
.pc-green { --pc: var(--pc-green); } .pc-slate { --pc: var(--pc-slate); } .pc-ink { --pc: var(--pc-ink); }
.dot[class*='pc-'] { background: var(--pc); }
.color-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--pc, var(--border-2)); flex: none; }

/* ---------- avatars: soft tint of the person's color, dark initials ---------- */
.avatar {
  --av: var(--pc-slate);
  display: inline-grid; place-items: center; border-radius: 50%; object-fit: cover; flex: none; overflow: hidden;
  font-weight: 650; color: var(--text); background: color-mix(in srgb, var(--av) 20%, var(--surface));
}
.av-xs { width: 22px; height: 22px; font-size: 9.5px; }
.av-sm { width: 28px; height: 28px; font-size: 11px; }
.av-md { width: 34px; height: 34px; font-size: 12.5px; }
.av-lg { width: 46px; height: 46px; font-size: 16px; }
.av-xl { width: 80px; height: 80px; font-size: 26px; }
.c-teal { --av: var(--pc-teal); } .c-blue { --av: var(--pc-blue); } .c-violet { --av: var(--pc-violet); } .c-pink { --av: var(--pc-pink); }
.c-orange { --av: var(--pc-orange); } .c-green { --av: var(--pc-green); } .c-slate { --av: var(--pc-slate); } .c-amber { --av: var(--pc-amber); }
.c-gray { --av: var(--text-3); }
.c-more { background: var(--surface-3); color: var(--text-2); }
.avatar-stack { display: inline-flex; align-items: center; padding-left: 6px; }
.avatar-stack .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); }
.person { display: inline-flex; align-items: center; gap: 8px; color: inherit; font-weight: 550; }
.person:hover { text-decoration: none; }
.person:hover span { text-decoration: underline; text-underline-offset: 2px; }
@media (prefers-color-scheme: dark) {
  .avatar { background: color-mix(in srgb, var(--av) 34%, var(--surface)); }
  .c-more { background: var(--surface-3); }
}

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.tab { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px 11px; color: var(--text-2); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none !important; transition: color 0.15s, border-color 0.15s; }
.tab:hover { color: var(--text); border-bottom-color: var(--border-2); }
.tab.active { color: var(--text); border-bottom-color: var(--ring); }
.tab .count { min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--pill); background: var(--surface-3); color: var(--text-2); font-size: 11.5px; font-weight: 650; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums; }
.tab.active .count { background: var(--accent-soft); color: var(--accent-text); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.form-grid.one { grid-template-columns: minmax(0, 1fr); }
.form-grid .form-grid { gap: 16px 12px; }
.span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; border: 0; padding: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 600; color: var(--text-2); padding: 0; }
.req { color: var(--red-fg); font-style: normal; margin-left: 2px; }
.hint { color: var(--text-3); font-size: 12px; }
input[type='text'], input[type='email'], input[type='search'], input[type='number'], input[type='date'], input[type='time'], input[type='month'], input:not([type]), select, textarea {
  width: 100%; height: 40px; padding: 0 12px;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-2); border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.55; }
select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e8e97' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
:is(input:not([type='checkbox']):not([type='radio']):not([type='file']), select, textarea):hover { border-color: var(--text-3); }
:is(input:not([type='checkbox']):not([type='radio']):not([type='file']), select, textarea):focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px var(--focus); }
input::placeholder, textarea::placeholder { color: var(--text-3); opacity: 1; }
input[type='checkbox'], input[type='radio'] { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 550; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.form-note { display: flex; gap: 7px; align-items: flex-start; margin-top: 16px; }
.form-note .icon { width: 15px; height: 15px; margin-top: 2px; }
.form-card { max-width: 880px; }
.form-table td { padding: 8px 12px; }
.form-table input[type='text'], .form-table input[type='number'] { height: 34px; }

.checklist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 2px 12px; max-height: 280px; overflow: auto; border: 1px solid var(--border-2); border-radius: var(--radius-sm); padding: 6px; background: var(--surface-2); }
.check-row { display: flex; align-items: center; gap: 9px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-weight: 550; min-width: 0; }
.check-row:hover { background: var(--surface-3); }
.check-row .faint { margin-left: auto; }

.swatches { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 4px; }
.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; }
.swatch span { display: block; width: 26px; height: 26px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px transparent; transition: box-shadow 0.15s; }
.swatch input:checked + span { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--pc); }
.swatch input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 4px; }

.file-input { display: inline-flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.file-input input[type='file'] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-input label { cursor: pointer; border: 1px dashed var(--border-2); }
.file-input input:focus-visible + label { outline: 2px solid var(--ring); outline-offset: 2px; }
.file-names { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.filters select, .filters input[type='month'] { width: auto; min-width: 150px; }
.filters.compact { margin: 0; }
.filters.compact select { height: 36px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 380px; display: block; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); width: 16px; height: 16px; pointer-events: none; }
.search input { padding-left: 36px; }

/* ---------- flash / empty / errors ---------- */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: 12px; margin-bottom: 20px; border: 1px solid; font-weight: 550; }
.flash > .icon { margin-top: 1px; }
.flash span { flex: 1; }
.flash-ok { background: var(--green-bg); color: var(--green-fg); border-color: color-mix(in srgb, var(--green-fg) 22%, transparent); }
.flash-error { background: var(--red-bg); color: var(--red-fg); border-color: color-mix(in srgb, var(--red-fg) 22%, transparent); }
.flash-close { display: inline-grid; place-items: center; border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; opacity: 0.7; }
.flash-close:hover { opacity: 1; }
.flash-close .icon { width: 16px; height: 16px; }
.empty { text-align: center; padding: 48px 24px; color: var(--text-2); }
.empty > .icon { width: 46px; height: 46px; padding: 12px; border-radius: 50%; background: var(--surface-3); color: var(--text-2); margin-bottom: 14px; stroke-width: 1.6; }
.empty h3 { color: var(--text); margin-bottom: 4px; }
.empty p { max-width: 420px; margin: 0 auto; }
.empty-action { margin-top: 18px; }
.error-page { max-width: 480px; margin: 12vh auto; text-align: center; padding: 0 20px; }
.error-code { font-family: var(--font-display); font-size: 72px; font-weight: 750; letter-spacing: -0.05em; color: var(--text-3); line-height: 1; margin-bottom: 14px; font-variant-numeric: tabular-nums; }
.error-page p { color: var(--text-2); margin: 10px 0 24px; }

/* ---------- utilities ---------- */
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.small { font-size: 12.5px; }
.block { display: block; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.note { display: flex; gap: 5px; align-items: flex-start; margin-top: 4px; color: var(--text-2); font-size: 12.5px; }
.note .icon { width: 13px; height: 13px; margin-top: 3px; }

/* ---------- rows / lists ---------- */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--border); color: inherit; text-decoration: none !important; min-width: 0; }
.row:last-child { border-bottom: 0; }
a.row { transition: background-color 0.12s; }
a.row:hover { background: var(--surface-2); }
.row > .icon { color: var(--text-3); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 600; display: block; color: var(--text); }
a.row-title:hover { text-decoration: underline; }
.row-meta { font-size: 12.5px; color: var(--text-3); }
.row-date { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; min-width: 64px; justify-content: flex-end; font-variant-numeric: tabular-nums; }
.row-date .icon { width: 13px; height: 13px; }
.project-row .color-bar { height: 34px; align-self: center; }
.file-icon { width: 40px; height: 40px; border-radius: var(--radius-sm); background: var(--surface-3); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--text-3); }
.file-icon img { width: 100%; height: 100%; object-fit: cover; }
.date-tile {
  width: 46px; flex: none; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; padding: 6px 0 4px;
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); font-weight: 650; line-height: 1.2;
  box-shadow: inset 0 3px 0 var(--pc, var(--border-2));
}
.date-tile b { font-family: var(--font-display); font-size: 17px; color: var(--text); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.date-tile.due { --pc: var(--red); }
.date-tile.holiday { --pc: var(--pc-pink); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12.5px; font-weight: 600; color: var(--text-3); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.table tbody tr:last-child td { border-bottom: 0; }
.table.clickable tbody tr { transition: background-color 0.12s; }
.table.clickable tbody tr:hover { background: var(--surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cell-link { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none !important; }
.cell-link:hover strong, .cell-link-plain:hover strong { text-decoration: underline; }
.cell-link-plain { color: inherit; }
.client-mark { width: 36px; height: 36px; border-radius: var(--radius-sm); background: var(--surface-3); color: var(--text); display: inline-grid; place-items: center; font-family: var(--font-display); font-weight: 700; flex: none; }
.client-mark.lg { width: 56px; height: 56px; font-size: 24px; border-radius: var(--radius); }
.client-title { display: flex; align-items: center; gap: 16px; }
.pay-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pay-form input { height: 30px; width: auto; min-width: 0; padding: 0 9px; font-size: 13px; border-radius: 8px; }
.pay-form input[type='text'] { width: 150px; }
.pay-form input[type='date'] { width: 128px; }

/* ---------- progress ---------- */
.progress { height: 6px; background: var(--surface-3); border-radius: var(--pill); overflow: hidden; margin: 7px 0 5px; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: var(--pill); }
.progress.warn > span { background: var(--amber); }
.progress.over > span { background: var(--red); }
.budget-bar { margin-bottom: 20px; }

/* ---------- description list ---------- */
.dl { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px 18px; margin: 0; }
.dl dt { color: var(--text-3); font-size: 13px; }
.dl dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dl { grid-template-columns: minmax(0, 1fr); gap: 2px; } .dl dd { margin-bottom: 12px; } }

/* ---------- projects ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.project-card { display: flex; flex-direction: column; padding: 18px 20px 16px; color: inherit; text-decoration: none !important; transition: border-color 0.15s, box-shadow 0.2s; }
.project-card:hover { border-color: var(--border-2); box-shadow: 0 8px 24px rgba(24, 24, 27, 0.06); }
.pcard-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pcard-client { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.pcard-client::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 3px; background: var(--pc); margin-right: 8px; }
.pcard-name { font-size: 16px; font-weight: 650; letter-spacing: -0.01em; margin: 10px 0 6px; }
.pcard-desc { color: var(--text-2); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 39px; }
.pcard-foot { display: flex; align-items: center; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.pcard-foot .small { display: inline-flex; align-items: center; gap: 4px; font-variant-numeric: tabular-nums; }
.pcard-foot .icon { width: 13px; height: 13px; }

.project-head { margin-bottom: 24px; }
.project-head .back { margin-bottom: 14px; }
.ph-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; }
.ph-client a, .ph-client span { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.ph-client a::before, .ph-client > span::before { content: ''; width: 10px; height: 10px; border-radius: 3px; background: var(--pc); flex: none; }
.ph-title h1 { font-size: 30px; margin-top: 6px; }
.ph-badges { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 4px; }
.ph-meta { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 20px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.ph-meta > div { flex: 1 1 180px; display: flex; flex-direction: column; gap: 6px; padding: 14px 18px; background: var(--surface); }
.meta-label { font-size: 12.5px; color: var(--text-3); font-weight: 550; }

/* ---------- updates feed ---------- */
.composer { padding: 16px 18px 14px; }
.composer-top { display: flex; gap: 12px; align-items: flex-start; }
.composer textarea { border: 0; box-shadow: none !important; padding: 7px 2px; min-height: 66px; background: transparent; }
.composer-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 12px; margin-top: 8px; }
.composer-foot > .btn-primary { margin-left: auto; }
.health-pick { display: inline-flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.health-pick > span { margin-right: 4px; }
.health-pick label { cursor: pointer; }
.health-pick input { position: absolute; opacity: 0; width: 0; height: 0; }
.health-pick label > span { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 11px; border-radius: var(--pill); font-size: 12.5px; font-weight: 600; border: 1px solid var(--border-2); color: var(--text-2); background: var(--surface); transition: background-color 0.15s, border-color 0.15s, color 0.15s; }
.health-pick label:hover > span { border-color: var(--text-3); color: var(--text); }
.health-pick label.t-green, .health-pick label.t-amber, .health-pick label.t-red { background: none; }
.health-pick label.t-green > span .dot { color: var(--green-fg); }
.health-pick label.t-amber > span .dot { color: var(--amber-fg); }
.health-pick label.t-red > span .dot { color: var(--red-fg); }
.health-pick input:checked + span { border-color: var(--ring); background: var(--accent-soft); color: var(--accent-text); }
.health-pick input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }

.feed { display: flex; flex-direction: column; }
.update { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.update:last-child { border-bottom: 0; }
.update.compact { padding: 13px 20px; }
.update-main { flex: 1; min-width: 0; }
.update-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13.5px; }
.update-head strong { font-weight: 650; }
.update-head a { color: var(--text); font-weight: 550; display: inline-flex; align-items: center; gap: 6px; }
.update-body { margin-top: 4px; line-height: 1.6; overflow-wrap: anywhere; }
.update-body.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); }
.attachments-wrap { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
.attachments { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; max-width: 560px; }
.thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--surface-3); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.3s var(--ease); }
.thumb:hover img { transform: scale(1.03); }
.file-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.file-chip { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--pill); background: var(--surface-2); color: var(--text); font-size: 13px; text-decoration: none !important; }
.file-chip:hover { border-color: var(--border-2); }
.file-chip .icon { width: 16px; height: 16px; color: var(--text-3); }
.brief { line-height: 1.6; max-height: 260px; overflow: auto; overflow-wrap: anywhere; }
.upload-card { margin-bottom: 20px; border-style: dashed; border-color: var(--border-2); }
.upload-inner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; flex-wrap: wrap; }
.upload-inner > .icon { width: 40px; height: 40px; padding: 10px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); }

/* ---------- agenda ---------- */
.agenda { display: flex; flex-direction: column; }
.agenda-day { display: flex; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.agenda-day:last-child { border-bottom: 0; }
.agenda-date { width: 42px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.1; padding-top: 2px; }
.agenda-dow { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); font-weight: 650; }
.agenda-num { font-family: var(--font-display); font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; padding: 0 5px; }
.agenda-day.is-today .agenda-dow { color: var(--text); }
.agenda-day.is-today .agenda-num { background: var(--signal); color: var(--on-signal); }
.agenda-items { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.agenda-item { display: flex; gap: 10px; align-items: stretch; padding: 6px 9px; border-radius: 8px; color: inherit; text-decoration: none !important; min-width: 0; }
a.agenda-item { transition: background-color 0.12s; }
a.agenda-item:hover { background: var(--surface-2); }
.agenda-bar { width: 3px; border-radius: 3px; background: var(--pc, var(--border-2)); flex: none; }
.agenda-bar.leave { background: repeating-linear-gradient(180deg, var(--text-3) 0 4px, transparent 4px 7px); }
.agenda-bar.holiday { background: var(--pc-pink); }
.agenda-bar.due { background: var(--red); }
.agenda-text { display: flex; flex-direction: column; min-width: 0; }
.agenda-title { font-weight: 600; font-size: 13.5px; }
.agenda-meta { font-size: 12px; color: var(--text-3); }

/* ---------- calendar ---------- */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav h2 { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: -0.02em; min-width: 180px; text-align: center; }
.cal-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.cal-card { overflow: hidden; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 10px 10px 9px; font-size: 12px; font-weight: 600; color: var(--text-3); border-bottom: 1px solid var(--border); }
.cal-day { min-height: 120px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day:nth-last-child(-n + 7) { border-bottom: 0; }
.cal-day.weekend, .cal-day.muted { background: var(--surface-2); }
.cal-day.muted .cal-num { color: var(--text-3); }
.cal-day.holiday { background: color-mix(in srgb, var(--pink-bg) 70%, var(--surface)); }
.cal-day.selected { box-shadow: inset 0 0 0 2px var(--ring); }
.cal-num { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 650; color: var(--text); text-decoration: none !important; flex: none; font-variant-numeric: tabular-nums; }
.cal-num:hover { background: var(--surface-3); }
.cal-day.today .cal-num { background: var(--signal); color: var(--on-signal); }
.chip { display: block; font-size: 12px; line-height: 1.35; padding: 2px 7px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); text-decoration: none !important; background: color-mix(in srgb, var(--pc, var(--pc-slate)) 13%, var(--surface)); border-left: 3px solid var(--pc, var(--pc-slate)); }
.chip:hover { background: color-mix(in srgb, var(--pc, var(--pc-slate)) 22%, var(--surface)); }
.chip b { font-weight: 650; color: var(--text-2); }
.chip.due { background: transparent; border: 1px dashed color-mix(in srgb, var(--pc) 55%, var(--border-2)); border-left: 3px solid var(--red); }
.chip.leave { background: var(--surface-3); border-left: 3px dotted var(--text-3); color: var(--text-2); }
.chip.holiday { background: var(--pink-bg); border-left-color: var(--pc-pink); color: var(--pink-fg); font-weight: 600; }
.cal-more { font-size: 11.5px; color: var(--text-3); padding-left: 6px; }
.cal-agenda { display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 12.5px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.chip-swatch { display: inline-block; width: 14px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--pc, var(--pc-slate)) 25%, var(--surface)); border-left: 3px solid var(--pc, var(--pc-slate)); }
.chip-swatch.due { background: transparent; border: 1px dashed var(--text-3); border-left: 3px solid var(--red); }
.chip-swatch.leave { background: var(--surface-3); border-left: 3px dotted var(--text-3); }
.chip-swatch.holiday { background: var(--pink-bg); border-left-color: var(--pc-pink); }
@media (max-width: 1180px) { .cal-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) {
  .cal { display: none; }
  .cal-agenda { display: block; }
  .month-nav h2 { min-width: 0; font-size: 17px; }
}

/* ---------- people ---------- */
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person-card { display: flex; gap: 14px; align-items: center; padding: 16px 18px; color: inherit; text-decoration: none !important; transition: border-color 0.15s, box-shadow 0.2s; }
.person-card:hover { border-color: var(--border-2); box-shadow: 0 8px 24px rgba(24, 24, 27, 0.06); }
.person-card.inactive { opacity: 0.6; }
.person-info { min-width: 0; }
.person-name { font-weight: 650; font-size: 15px; }
.person-title { color: var(--text-2); font-size: 13px; }
.person-tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 7px; }
.person-tags:empty { display: none; }
.card.profile-head { display: flex; gap: 22px; align-items: center; padding: 0 0 4px; margin-bottom: 26px; flex-wrap: wrap; background: none; border: 0; }
.profile-main { min-width: 0; flex: 1; }
.profile-main h1 { font-size: 30px; }
.profile-main > .muted { margin-top: 4px; }
.profile-contact { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; color: var(--text-2); }
.profile-contact a, .profile-contact > span { display: inline-flex; align-items: center; gap: 6px; }
.profile-contact .icon { width: 16px; height: 16px; color: var(--text-3); }
.profile-contact a { color: var(--text-2); }
.profile-contact a:hover { color: var(--text); }

/* ---------- leave & approvals ---------- */
.year-switch { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.year-switch strong { font-family: var(--font-display); font-size: 17px; min-width: 48px; text-align: center; font-variant-numeric: tabular-nums; }
.small-switch { margin: 0; }
.balance-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.balance { padding: 16px 18px; }
.balance-name { font-size: 13px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.balance-value { font-family: var(--font-display); font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.balance-value small { font-family: var(--font); font-size: 13px; font-weight: 500; color: var(--text-3); letter-spacing: 0; }
.balance-meta { font-size: 12px; color: var(--text-3); }
.approval { padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.approval-main { display: flex; gap: 14px; }
.approval-text { flex: 1; min-width: 0; }
.approval-title { font-size: 15px; font-weight: 650; }
.approval-title a { color: var(--text); }
.approval-sub { color: var(--text-2); margin-top: 3px; }
.approval-reason { margin-top: 10px; padding: 11px 14px; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); overflow-wrap: anywhere; }
.approval-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 12px; font-size: 12.5px; color: var(--text-2); }
.approval-facts span { display: inline-flex; align-items: center; gap: 6px; }
.approval-facts .icon { width: 14px; height: 14px; }
.approval-actions { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--border); padding-top: 16px; flex-wrap: wrap; }
.approval-actions input { flex: 1; min-width: 200px; }

.timeline { list-style: none; margin: 0; padding: 18px 20px; display: flex; flex-direction: column; gap: 18px; }
.timeline li { display: flex; gap: 12px; position: relative; color: var(--text-3); }
.timeline li:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 27px; bottom: -16px; width: 2px; border-radius: 2px; background: var(--border); }
.timeline li.done { color: var(--text); }
.timeline li.done:not(:last-child)::after { background: var(--accent); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--border-2); background: var(--surface); }
.timeline li.done .tl-dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.timeline li.bad .tl-dot { background: var(--red); border-color: var(--red); }
.tl-dot .icon { width: 13px; height: 13px; stroke-width: 2.6; }

.add-inline { border-top: 1px solid var(--border); }
.add-inline > summary { cursor: pointer; padding: 13px 20px; color: var(--accent-text); font-weight: 600; display: flex; align-items: center; gap: 6px; list-style: none; }
.add-inline > summary::-webkit-details-marker { display: none; }
.add-inline > summary .icon { width: 16px; height: 16px; }

/* ---------- login ---------- */
body.bare { min-height: 100vh; min-height: 100dvh; }
.bare-flash { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10; width: min(520px, calc(100% - 32px)); }
.login { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.login-brand { display: flex; flex-direction: column; padding: 40px 56px; }
.login-brand .brand { padding: 0; }
.login-pitch { margin: auto 0; max-width: 600px; padding: 48px 0; }
.login-pitch h1 { font-size: clamp(34px, 4.2vw, 54px); line-height: 1.08; letter-spacing: -0.035em; font-weight: 750; }
.login-pitch p { margin-top: 20px; font-size: 16px; line-height: 1.55; color: var(--text-2); max-width: 44ch; }
.login-foot { font-size: 12.5px; color: var(--text-3); }
.login-main { display: grid; place-items: center; padding: 32px 20px; background: var(--bg); border-left: 1px solid var(--border); }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px 32px 28px; box-shadow: var(--shadow-lg); }
.login-card h2 { font-family: var(--font-display); font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.02em; }
.login-note { margin-top: 20px; line-height: 1.5; }
.dev-login { margin-top: 22px; padding-top: 20px; border-top: 1px dashed var(--border-2); display: flex; flex-direction: column; gap: 8px; }
.dev-tag { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 650; color: var(--amber-fg); }
.dev-tag .icon { width: 14px; height: 14px; }
@media (max-width: 860px) {
  .bare-flash { position: static; transform: none; margin: 16px auto 0; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-brand { padding: 24px 20px 0; }
  .login-pitch { margin: 0; padding: 36px 0 28px; }
  .login-pitch h1 { font-size: 32px; }
  .login-pitch p { font-size: 15px; margin-top: 14px; }
  .login-foot { display: none; }
  .login-main { place-items: start center; padding: 0 16px 40px; background: var(--surface); border-left: 0; }
  .login-card { box-shadow: none; padding: 24px 20px; }
}

/* ---------- motion ---------- */
@keyframes flash-in { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: no-preference) {
  /* Cross-fade between pages (Chrome, Edge, Safari 18+). The shell keeps still. */
  @view-transition { navigation: auto; }
  .sidebar { view-transition-name: sidebar; }
  .mobile-bar { view-transition-name: mobile-bar; }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.18s; }
  .flash { animation: flash-in 0.3s var(--ease); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
