:root {
  --ink: #193b3c;
  --muted: #607b7b;
  --line: rgba(255,255,255,.56);
  --paper: #dcebe7;
  --forest: #104d4d;
  --forest2: #176464;
  --mint: #e1f6ee;
  --orange: #dc8962;
  --shadow: 0 18px 48px rgba(21,73,72,.11), inset 0 1px rgba(255,255,255,.45);
  --glass: rgba(255,255,255,.48);
  --glass-strong: rgba(255,255,255,.64);
  --glass-edge: rgba(255,255,255,.62);
  --blur: blur(20px) saturate(145%);
  color-scheme: light;
}
html { min-height: 100%; }
body {
  position: relative;
  min-height: 100vh;
  background: radial-gradient(ellipse 50% 55% at 86% 5%,rgba(121,226,205,.63),transparent 78%),
    radial-gradient(ellipse 42% 58% at 12% 84%,rgba(114,182,194,.57),transparent 75%),
    radial-gradient(ellipse 35% 36% at 55% 100%,rgba(250,212,170,.55),transparent 78%),
    linear-gradient(130deg,#dceee8 0%,#d7e8e7 43%,#ecf2e9 100%);
  background-attachment: fixed;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.11) 1px,transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(120deg,transparent,black 28%,transparent 75%);
}
h1 { font-size: clamp(36px,3.7vw,54px); letter-spacing: -.06em; font-weight: 800; }
h2 { font-size: 18px; font-weight: 780; letter-spacing: -.035em; }
.eyebrow,.section-kicker { color: #368079; font-weight: 800; letter-spacing: .2em; font-size: 10px; }
.eyebrow span { opacity: .4; padding: 0 6px; }
.title-dot { color: #dc8962; }
.shell { gap: 0; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 252px;
  padding: 30px 18px 22px;
  background: linear-gradient(160deg,rgba(10,67,68,.82),rgba(17,82,84,.68) 52%,rgba(16,71,73,.75));
  backdrop-filter: blur(24px) saturate(140%);
  -webkit-backdrop-filter: blur(24px) saturate(140%);
  border-right: 1px solid rgba(255,255,255,.25);
  box-shadow: 12px 0 35px rgba(24,80,82,.08),inset -1px 0 rgba(255,255,255,.1);
}
.brand { gap: 12px; padding: 0 10px 24px; }
.brand-mark { width: 40px; height: 40px; color: #0b5352; background: rgba(234,255,247,.9); border: 1px solid white; border-radius: 14px; box-shadow: 0 8px 20px rgba(0,25,25,.11); }
.brand strong { font-size: 19px; }
.brand small { color: #bbe3d7; }
.side-context { display: flex; gap: 11px; align-items: center; margin: 0 4px 29px; padding: 13px 12px; border-radius: 14px; color: #e8fff8; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.17); box-shadow: inset 0 1px rgba(255,255,255,.1); }
.side-context strong,.side-context small { display: block; }
.side-context strong { font-size: 11px; letter-spacing: .02em; }
.side-context small { color: #b2d4cd; font-size: 10px; margin-top: 4px; }
.context-orbit { position: relative; flex: none; width: 27px; height: 27px; border: 1px solid rgba(190,251,232,.75); border-radius: 50%; }
.context-orbit::before { content: ""; position: absolute; width: 9px; height: 9px; border-radius: 50%; background: #bdf4dc; left: 8px; top: 8px; box-shadow: 0 0 0 5px rgba(189,244,220,.12); }
.side-label { color: #9fcfc1; padding: 0 13px 11px; }
.sidebar nav { gap: 6px; }
.nav-link { min-height: 43px; border: 1px solid transparent; border-radius: 12px; color: #cce3dc; font-weight: 650; }
.nav-link:hover,.nav-link.active { background: rgba(255,255,255,.15); border-color: rgba(255,255,255,.16); color: white; }
.nav-link.active { box-shadow: inset 3px 0 #f4b58e,0 8px 18px rgba(0,35,35,.1); }
.nav-icon { font-size: 18px; color: #c5f3e0; }
.side-bottom { border-top-color: rgba(255,255,255,.22); }
.identity small { color: #b6d7ce; }
.avatar,.feed-avatar { background: rgba(219,255,239,.82); color: #185d58; border: 1px solid rgba(255,255,255,.78); }
.topbar { height: 76px; position: sticky; top: 0; z-index: 8; padding: 0 clamp(22px,3vw,48px); background: rgba(244,255,250,.38); border-bottom: 1px solid rgba(255,255,255,.65); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); box-shadow: 0 8px 22px rgba(47,106,102,.035); }
.crumb { color: #4e7772; letter-spacing: .015em; }
.crumb strong { color: #1d5755; }
.connection-pill { display: inline-flex; align-items: center; gap: 9px; padding: 8px 11px; border: 1px solid rgba(255,255,255,.8); border-radius: 999px; background: rgba(255,255,255,.35); color: #367a68; font-size: 11px; font-weight: 750; }
.connection-pill.offline { color: #a36050; }
.connection-pill.offline .live-dot { background: #cf8064; box-shadow: 0 0 0 4px rgba(207,128,100,.13); }
.live-dot { flex: none; }
.top-actions form { margin-left: 10px; }
.text-button { color: #477976; font-weight: 650; }
.main { max-width: 1640px; padding: 43px clamp(22px,3vw,48px) 85px; }
.page-heading { margin-bottom: 30px; }
.page-heading p,.project-hero p { color: #648380; font-size: 13px; }
.button { min-height: 41px; border-radius: 10px; padding: 10px 16px; font-size: 12px; box-shadow: inset 0 1px rgba(255,255,255,.35); }
.button.primary { color: #f7fffc; background: linear-gradient(135deg,#0e6665,#147874); border-color: rgba(16,95,92,.48); box-shadow: 0 9px 22px rgba(25,111,106,.2),inset 0 1px rgba(255,255,255,.23); }
.button.primary:hover { background: linear-gradient(135deg,#0b5959,#126b67); box-shadow: 0 12px 26px rgba(25,111,106,.25); }
.button.subtle { background: rgba(255,255,255,.42); border-color: rgba(255,255,255,.82); color: #145d5b; }
.button.subtle:hover { background: rgba(255,255,255,.7); border-color: white; }
.main-column,.feed-column,.wide-panel,.card,.form-panel,.project-hero,.login-card,.stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--shadow);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-radius: 18px;
}
.main-column,.feed-column,.wide-panel,.card { padding: 27px; }
.section-heading { margin-bottom: 20px; }
.section-kicker { margin-bottom: 8px; }
.section-heading p { color: #71908c; font-size: 11px; }
.count-pill { color: #376f69; background: rgba(255,255,255,.43); border-color: rgba(255,255,255,.8); padding: 6px 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { position: relative; min-height: 142px; padding: 21px 22px; overflow: hidden; }
.stat-card::after { content: ""; position: absolute; width: 135px; height: 135px; right: -52px; bottom: -75px; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; box-shadow: 0 0 0 22px rgba(255,255,255,.07),0 0 0 47px rgba(255,255,255,.055); }
.stat-icon { position: absolute; right: 20px; top: 19px; width: 29px; height: 29px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.76); border-radius: 9px; background: rgba(255,255,255,.3); color: #267e73; font-size: 15px; font-weight: 800; }
.stat-card.alert .stat-icon { color: #be7259; }
.stat-label,.stat-card small { display: block; color: #668480; font-size: 11px; font-weight: 700; }
.stat-card strong { display: block; font-size: 40px; line-height: 1; letter-spacing: -.07em; margin: 15px 0 7px; color: #1c5b58; font-variant-numeric: tabular-nums; }
.stat-card.alert strong { color: #ad6e57; }
.stat-card small { font-size: 10px; font-weight: 500; }
.dashboard-grid { grid-template-columns: minmax(0,1.55fr) minmax(310px,.75fr); gap: 18px; align-items: start; }
.mine-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 18px; align-items: start; }
.mine-grid .wide-panel { max-width: none; min-width: 0; }
.assigned-list { display: grid; gap: 8px; }
.assigned-task { display: flex; align-items: start; gap: 11px; padding: 13px 10px; border: 1px solid rgba(255,255,255,.58); border-radius: 11px; background: rgba(255,255,255,.22); transition: background .2s,transform .2s; }
.assigned-task:hover { background: rgba(255,255,255,.42); transform: translateX(2px); }
.assigned-copy { min-width: 0; flex: 1; }
.assigned-copy strong,.assigned-copy small { display: block; overflow-wrap: anywhere; }
.assigned-copy strong { color: #235652; font-size: 12px; }
.assigned-copy small { margin-top: 5px; color: #81978e; font-size: 10px; }
.assigned-meta { display: grid; justify-items: end; gap: 5px; flex: none; }
.assigned-meta small { color: #79918a; font-size: 10px; }
.assigned-meta .overdue { color: #b2604e; font-weight: 800; }
.filters { display: grid; grid-template-columns: minmax(160px,1.35fr) minmax(110px,.75fr) minmax(120px,.8fr) auto auto; gap: 9px; padding: 13px; margin-bottom: 11px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.52); border-radius: 12px; }
.filters label { color: #5f817c; }
.filters label.search-field { min-width: 0; }
.filters .button { align-self: end; }
.filters .reset-link { align-self: end; white-space: nowrap; }
input,textarea,select { background: rgba(255,255,255,.46); border: 1px solid rgba(255,255,255,.82); color: #1a4b48; border-radius: 9px; box-shadow: inset 0 1px 2px rgba(29,78,75,.04); }
input:hover,textarea:hover,select:hover { border-color: rgba(89,164,153,.6); }
input:focus,textarea:focus,select:focus { outline: 3px solid rgba(59,164,145,.18); border-color: #61aa9b; }
input::placeholder,textarea::placeholder { color: #92a9a3; }
.project-row { padding: 17px 8px; border-bottom-color: rgba(255,255,255,.6); border-radius: 11px; }
.project-row:hover { background: rgba(255,255,255,.35); transform: translateX(2px); }
.project-symbol { width: 43px; height: 43px; background: rgba(215,248,234,.6); border: 1px solid rgba(255,255,255,.7); color: #217b70; border-radius: 11px; }
.project-name { color: #214e4d; font-size: 13px; }
.project-meta { color: #78938d; }
.status { border: 1px solid rgba(255,255,255,.62); }
.status-not_started { background: rgba(233,240,236,.63); color: #687e78; }
.status-todo { background: rgba(233,240,236,.63); color: #687e78; }
.status-in_progress { background: rgba(210,241,222,.68); color: #287a57; }
.status-blocked { background: rgba(250,228,212,.78); color: #a96647; }
.status-done { background: rgba(210,232,238,.72); color: #407488; }
.row-arrow { color: #5b9a90; }
.feed-signal { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.3); border-color: rgba(255,255,255,.8); color: #39806d; border-radius: 99px; }
.signal-dot { width: 6px; height: 6px; background: #51a887; border-radius: 50%; }
.feed-item:not(:last-child) { border-bottom-color: rgba(255,255,255,.58); }
.feed-content { min-width: 0; }
.feed-line a { color: #1c6d67; }
.feed-item p { color: #456461; }
.blocker-mini { background: rgba(255,235,219,.58); color: #a86950; border: 1px solid rgba(255,255,255,.6); border-radius: 8px; }
.empty-state { border: 1px dashed rgba(61,128,118,.2); border-radius: 13px; background: rgba(255,255,255,.16); }
.form-panel { padding: 31px; }
.form-actions { border-top-color: rgba(255,255,255,.68); }
.project-hero { padding: 32px; }
.project-hero p { color: #5b7d7a; }
.hero-meta { color: #72908a; }
.hero-meta strong { color: #346d63; }
.hero-actions { display: grid; justify-items: end; align-content: start; gap: 15px; flex: none; }
.task-panel { scroll-margin-top: 95px; }
.task-list { display: grid; gap: 9px; }
.task-row { display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 15px; background: rgba(255,255,255,.25); border: 1px solid rgba(255,255,255,.56); border-radius: 12px; }
.task-main { display: flex; align-items: start; gap: 11px; min-width: 0; flex: 1; }
.task-state { flex: none; display: block; width: 9px; height: 9px; margin-top: 5px; border-radius: 50%; background: currentColor; color: #81958c; box-shadow: 0 0 0 4px rgba(255,255,255,.44); }
.task-state.status-in_progress { color: #4aab7d; }
.task-state.status-blocked { color: #d18861; }
.task-state.status-done { color: #638ea1; }
.task-copy { min-width: 0; }
.task-copy strong { display: block; color: #235652; font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.task-copy p { margin: 5px 0 0; color: #65827b; font-size: 11px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-meta { display: flex; flex-wrap: wrap; gap: 6px 13px; color: #76928a; font-size: 10px; margin-top: 8px; }
.task-meta .overdue { color: #b2604e; font-weight: 800; }
.task-side { position: relative; flex: none; display: flex; align-items: center; gap: 11px; }
.task-details summary,.task-create summary { cursor: pointer; color: #287b72; font-size: 11px; font-weight: 800; list-style: none; }
.task-details summary::-webkit-details-marker,.task-create summary::-webkit-details-marker { display: none; }
.task-details[open] { position: absolute; z-index: 4; right: 0; top: 30px; width: min(470px,calc(100vw - 75px)); padding: 18px; background: rgba(240,253,247,.96); border: 1px solid white; border-radius: 13px; box-shadow: 0 16px 42px rgba(26,80,74,.2); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
.task-details[open] summary { text-align: right; margin-bottom: 12px; }
.task-details form,.task-create form { display: grid; gap: 12px; }
.task-details .danger { justify-self: start; color: #ae5c4c; padding-left: 0; }
.task-form-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.task-create { margin-top: 17px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.65); }
.task-create summary { width: max-content; font-size: 12px; }
.task-create form { padding-top: 18px; }
.task-create .button { justify-self: end; }
.update-fields > div { background: rgba(255,255,255,.29); border: 1px solid rgba(255,255,255,.5); border-radius: 10px; }
.timeline-item { border-left-color: rgba(68,163,137,.3); }
.timeline-item::before { background: #61ad92; border-color: #e7f4ed; }
.draft-status { margin-right: auto; align-self: center; color: #71908a; font-size: 11px; }
.notice { background: rgba(211,247,224,.65); border-color: rgba(255,255,255,.73); color: #286b50; }
.error { background: rgba(255,232,221,.75); border-color: rgba(255,255,255,.74); }
.user-row { border-top-color: rgba(255,255,255,.65); }
.refresh-toast { background: rgba(16,73,71,.82); border: 1px solid rgba(255,255,255,.22); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-radius: 12px; }
.login-screen { min-height: 100vh; grid-template-columns: minmax(0,1.05fr) minmax(400px,.95fr); }
.login-art { position: relative; overflow: hidden; background: linear-gradient(150deg,rgba(12,79,79,.78),rgba(16,90,89,.66)); backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); border-right: 1px solid rgba(255,255,255,.34); padding: 44px clamp(36px,5vw,84px); }
.login-art::before { content: ""; position: absolute; width: min(68vw,720px); aspect-ratio: 1; left: -20%; top: 22%; border: 1px solid rgba(255,255,255,.14); border-radius: 50%; box-shadow: 0 0 0 75px rgba(255,255,255,.035),0 0 0 151px rgba(255,255,255,.025); pointer-events: none; }
.login-art::after { content: ""; position: absolute; width: 34%; aspect-ratio: 1; right: -13%; top: 10%; background: radial-gradient(circle,rgba(160,244,214,.5),transparent 65%); pointer-events: none; }
.login-copy { position: relative; }
.login-copy h1 { max-width: 620px; color: #f6fffa; text-shadow: 0 2px 18px rgba(0,52,50,.16); }
.login-copy p { color: #d3e9e1; }
.login-art-footer { border-color: rgba(255,255,255,.26); color: #c3e5da; }
.login-form-side { background: transparent; }
.login-card { background: rgba(255,255,255,.52); width: min(420px,100%); padding: 42px; }
.login-card h2 { color: #1b5350; }
.login-card .muted { color: #64827c; }
.login-help { color: #7d9890; }
.install-tip { max-width: 650px; margin-top: 18px; padding: 18px 22px; background: rgba(255,255,255,.36); border: 1px solid rgba(255,255,255,.7); border-radius: 14px; color: #2b6760; backdrop-filter: var(--blur); -webkit-backdrop-filter: var(--blur); }
.install-tip strong { font-size: 13px; }
.install-tip p { color: #6b8a83; font-size: 12px; line-height: 1.7; margin: 6px 0 0; }
.sidebar-scrim[hidden] { display: none; }
@media(max-width:1200px) {
  .sidebar { width: 220px; }
  .dashboard-grid,.project-grid,.admin-grid,.mine-grid { grid-template-columns: 1fr; }
  .project-side { grid-template-columns: 1fr 1fr; }
}
@media(max-width:850px) {
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .filters .search-field { grid-column: 1 / -1; }
  .filters .reset-link { text-align: center; }
}
@media(max-width:740px) {
  body { -webkit-tap-highlight-color: transparent; }
  .sidebar { position: fixed; width: min(280px,85vw); height: 100dvh; z-index: 21; }
  .sidebar-scrim:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 20; border: 0; width: 100%; background: rgba(7,42,42,.35); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); }
  .topbar { height: 64px; padding: 0 16px; }
  .main { padding: 27px 15px calc(58px + env(safe-area-inset-bottom)); }
  .refresh-toast { left: 14px; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); text-align: center; }
  input,textarea,select { font-size: 16px; }
  button,summary,.nav-link { touch-action: manipulation; }
  .page-heading { margin-bottom: 23px; }
  .page-heading h1 { font-size: 36px; }
  .stats-grid { gap: 10px; margin-bottom: 17px; }
  .stat-card { padding: 16px; min-height: 126px; }
  .stat-card strong { font-size: 34px; }
  .main-column,.feed-column,.wide-panel,.card { padding: 20px; }
  .dashboard-grid,.project-grid { gap: 16px; }
  .filters { display: grid; gap: 9px; }
  .filters label { min-width: 0; }
  .project-row .status { font-size: 10px; padding: 5px 7px; }
  .project-row .status::before { width: 5px; height: 5px; }
  .project-hero { padding: 23px; }
  .hero-actions { width: 100%; display: flex; align-items: center; justify-content: space-between; }
  .project-side { grid-template-columns: 1fr; }
  .task-row { flex-direction: column; gap: 10px; }
  .task-side { width: 100%; justify-content: space-between; }
  .task-details[open] { right: 0; }
  .task-form-grid { grid-template-columns: 1fr; }
  .form-panel { padding: 23px; }
  .login-screen { grid-template-columns: 1fr; }
  .login-art { min-height: 260px; padding: 27px; }
  .login-art::before { width: 420px; top: 16%; }
  .login-form-side { padding: 26px 16px 40px; }
  .login-card { padding: 28px; }
}
@media(max-width:740px) and (display-mode:standalone) {
  .topbar { height: calc(64px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); }
  .sidebar { padding-top: calc(30px + env(safe-area-inset-top)); }
}
@media(max-width:390px) {
  .crumb { font-size: 11px; }
  .top-actions form { margin-left: 0; }
  .connection-pill { padding: 7px; }
  .project-meta { font-size: 9px; }
  .hero-actions { flex-wrap: wrap; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }
