:root {
  --primary: #0d9488;
  --primary-600: #0f766e;
  --primary-700: #115e59;
  --primary-50: #effcf9;
  --primary-100: #ccf3ec;
  --gold: #f59e0b;
  --gold-50: #fff8e6;
  --success: #10b981;
  --success-50: #ecfdf5;
  --warning: #f59e0b;
  --warning-50: #fffbeb;
  --danger: #e5484d;
  --danger-50: #fef2f2;
  --info-50: #eff6ff;

  --gradient-primary: linear-gradient(135deg, #10b981 0%, #0d9488 48%, #0f766e 100%);
  --gradient-gold: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #ea580c 100%);
  --gradient-rose: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
  --gradient-violet: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
  --gradient-sky: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --gradient-slate: linear-gradient(135deg, #64748b 0%, #334155 100%);

  --bg: #f2f6f5;
  --surface: #ffffff;
  --surface-2: #f7faf9;
  --sunken: #e9f0ee;
  --hover: #f1f6f5;
  --border: #e2eae8;
  --border-strong: #cfdcd9;
  --text: #0f1f1d;
  --text-2: #33433f;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --r-sm: 8px;
  --r: 10px;
  --r-card: 14px;
  --r-lg: 20px;
  --shadow-xs: 0 1px 2px rgba(15, 31, 29, .06);
  --shadow-sm: 0 2px 8px rgba(15, 31, 29, .06);
  --shadow: 0 8px 24px rgba(15, 31, 29, .08);
  --shadow-lg: 0 20px 50px rgba(15, 31, 29, .14);
  --shadow-primary: 0 10px 25px -8px rgba(13, 148, 136, .55);
  --focus: 0 0 0 4px rgba(13, 148, 136, .16);

  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  --sb: 264px;
  --sb-rail: 84px;
  --topbar: 70px;
  --tabbar: 64px;
  --tabbar-gap: 10px;
  --h: 40px;
  --h-sm: 32px;
  --gutter: 26px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; }
html.lock, html.lock body { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 14px/1.5 var(--font);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--font-heading); font-weight: 600; letter-spacing: -.01em; color: var(--text); }
h2 { font-size: 15px; line-height: 22px; }
h3 { font-size: 14px; line-height: 20px; }
p { margin: 0 0 8px; }
a { color: var(--primary-600); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-700); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; }
::selection { background: var(--primary-100); color: var(--primary-700); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7d4d1; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.grow { flex: 1; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

.shell { display: flex; min-height: 100vh; min-height: 100dvh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--sb); display: flex; flex-direction: column; overflow: hidden;
  color: #cbd5e1;
  background:
    radial-gradient(420px 260px at -10% -5%, rgba(20, 184, 166, .32), transparent 70%),
    radial-gradient(360px 300px at 120% 105%, rgba(245, 158, 11, .18), transparent 70%),
    #032523;
  transition: width .35s var(--ease), transform .35s var(--ease);
}
.sb-head { flex: none; display: flex; align-items: center; gap: 12px; height: var(--topbar); padding: 0 22px; }
.brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: #fff; }
.brand:hover { color: #fff; }
.brand-mark {
  flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px;
  background: var(--gradient-primary); background-size: 200% 200%; animation: gradientShift 6s ease infinite;
  box-shadow: 0 8px 22px -6px rgba(20, 184, 166, .85);
}
.brand-name { font-family: var(--font-heading); font-size: 16px; font-weight: 600; letter-spacing: .14em; white-space: nowrap; }
.brand-name b { color: #fcd34d; font-weight: 700; }
.sidebar .sb-close { display: none; margin-left: auto; color: #cbd5e1; }
.sidebar .sb-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-scroll { flex: 1; overflow-x: hidden; overflow-y: auto; padding: 4px 14px 16px; }
.sb-scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); }
.sb-group { margin-top: 14px; }
.sb-label {
  display: block; padding: 0 12px 8px; color: #5d8a84; white-space: nowrap;
  font-size: 10.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; transition: opacity .2s;
}
.sb-note { padding: 2px 12px 6px; font-size: 13px; color: #7fa39e; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px;
  min-height: 42px; padding: 10px 12px; border-radius: 12px;
  color: #9db8b4; font-weight: 500; white-space: nowrap;
  transition: background .25s var(--ease), color .2s, transform .25s var(--ease);
}
.nav a svg { flex: none; width: 20px; height: 20px; transition: transform .3s var(--ease-spring); }
.nav a .txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .06); transform: translateX(3px); }
.nav a:hover svg { transform: scale(1.12); }
.nav a.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(20, 184, 166, .95), rgba(15, 118, 110, .92));
  box-shadow: 0 10px 24px -10px rgba(20, 184, 166, .9), inset 0 1px 0 rgba(255, 255, 255, .15);
}
.nav a.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; width: 4px; height: 22px; transform: translateY(-50%);
  border-radius: 0 4px 4px 0; background: #fcd34d; box-shadow: 0 0 12px #f59e0b;
}
.nav .count { min-width: 22px; padding: 0 7px; border-radius: 20px; background: rgba(255, 255, 255, .08); color: #b9d2ce; font-size: 11.5px; font-weight: 600; line-height: 20px; text-align: center; }
.nav a.active .count { background: rgba(255, 255, 255, .22); color: #fff; }
.nav .count.alert { background: var(--danger); color: #fff; }
.nav .count:empty { display: none; }
.pbadge {
  flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px;
  background: var(--pc, var(--primary)); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18);
}
.pbadge.lg { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; box-shadow: 0 8px 18px -8px var(--pc, var(--primary)); }
.sb-foot { flex: none; padding: 14px; }
.sb-promo { display: flex; gap: 10px; padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); font-size: 12px; line-height: 1.5; }
.sb-promo svg { flex: none; color: #fcd34d; }
.sb-promo strong { display: block; color: #fff; font-size: 13px; }
.sb-promo span { color: #9db8b4; }
@media (max-height: 760px) { .sb-foot { display: none; } }

.content-wrap { flex: 1; min-width: 0; display: flex; flex-direction: column; margin-left: var(--sb); transition: margin-left .35s var(--ease); }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  height: var(--topbar); padding: 0 var(--gutter);
  background: rgba(242, 246, 245, .82); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(226, 234, 232, .9);
}
.topbar-btn {
  position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--text-2);
  transition: all .25s var(--ease);
}
.topbar-btn:hover { color: var(--primary-600); border-color: var(--primary-100); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.topbar-btn .badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.topbar-title { min-width: 0; }
.topbar-crumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.topbar-crumb a { color: var(--muted); }
.topbar-crumb a:hover { color: var(--primary-600); }
.topbar-crumb svg { flex: none; width: 10px; height: 10px; }
.topbar-greeting { font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.top-search {
  display: flex; align-items: center; gap: 8px; width: 260px; height: 40px; padding: 0 8px 0 12px;
  border: 1px solid var(--border); border-radius: 12px; background: var(--surface); color: var(--muted-2); text-align: left;
  transition: all .25s var(--ease);
}
.top-search:hover { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.top-search .txt { flex: 1; font-size: 13.5px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 40px; background: var(--surface); text-align: left; transition: all .25s var(--ease); }
.user-chip:hover { border-color: var(--primary-100); box-shadow: var(--shadow-sm); }
.user-chip .who { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.user-chip .who strong { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.user-chip .who small { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.user-chip > svg { color: var(--muted); }
.content { flex: 1; width: 100%; max-width: 1520px; margin: 0 auto; padding: 26px var(--gutter) 48px; min-width: 0; animation: fadeUp .5s var(--ease) backwards; }
.tabbar, .scrim, .more-sheet { display: none; }

.shell.collapsed .sidebar { width: var(--sb-rail); }
.shell.collapsed .content-wrap { margin-left: var(--sb-rail); }
.shell.collapsed .sb-head { padding: 0 23px; }
.shell.collapsed .brand-name,
.shell.collapsed .nav .txt,
.shell.collapsed .nav .count,
.shell.collapsed .sb-note,
.shell.collapsed .sb-foot { display: none; }
.shell.collapsed .sb-label { height: 6px; padding: 0; overflow: hidden; opacity: 0; }
.shell.collapsed .sb-scroll { padding-left: 10px; padding-right: 10px; scrollbar-width: none; }
.shell.collapsed .nav a { justify-content: center; gap: 0; padding: 11px; }
.shell.collapsed .nav a:hover { transform: none; }
.shell.collapsed .nav a.active::before { left: -10px; }
.shell.collapsed .nav a.unread::after { content: ""; position: absolute; top: 8px; right: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 2px #032523; }

.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h); padding: 0 16px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 14px; font-weight: 500; white-space: nowrap;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease), background .25s, color .2s, border-color .2s;
}
.btn:hover { border-color: var(--primary-100); color: var(--primary-600); background: var(--primary-50); }
.btn:active { transform: scale(.97); }
.btn svg { flex: none; }
.btn.primary { border: 0; background: var(--gradient-primary); background-size: 160% 160%; color: #fff; box-shadow: var(--shadow-primary); }
.btn.primary:hover { color: #fff; background-position: 100% 50%; transform: translateY(-1px); box-shadow: 0 14px 30px -10px rgba(15, 118, 110, .7); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--primary-50); color: var(--primary-600); }
.btn.soft { border: 0; background: var(--primary-50); color: var(--primary-600); }
.btn.soft:hover { background: var(--primary); color: #fff; }
.btn.small { height: var(--h-sm); padding: 0 12px; border-radius: var(--r-sm); font-size: 13px; }
.btn.danger { color: #c62a2f; }
.btn.danger:hover { background: var(--danger-50); border-color: #fbd5d6; color: #c62a2f; }
.btn.danger.solid { border: 0; background: var(--gradient-rose); color: #fff; box-shadow: 0 10px 22px -10px rgba(225, 29, 72, .7); }
.btn.danger.solid:hover { color: #fff; transform: translateY(-1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn[aria-pressed=true] { color: var(--primary-600); }
.icon-btn {
  position: relative; flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 1px solid transparent; border-radius: var(--r); background: transparent; color: var(--muted);
  transition: all .2s var(--ease);
}
.icon-btn:hover { background: var(--primary-50); color: var(--primary-600); transform: translateY(-1px); }
.icon-btn.sm { width: 32px; height: 32px; border-radius: var(--r-sm); }
.icon-btn.danger:hover { background: var(--danger-50); color: var(--danger); }
kbd { font: 600 11px/1 var(--font); padding: 4px 6px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface-2); color: var(--muted); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > span:first-child { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; line-height: 16px; color: var(--muted); }
.field .error { font-size: 12px; color: var(--danger); animation: fadeDown .25s var(--ease); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea {
  width: 100%; height: var(--h); padding: 0 13px; border: 1.5px solid var(--border); border-radius: var(--r);
  background: var(--surface); color: var(--text); font-size: 14px;
  transition: border-color .2s, box-shadow .2s, background-color .2s;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, select:hover, textarea:hover { border-color: var(--border-strong); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--focus); }
select { padding-right: 30px; }
select[multiple] { height: auto; padding: 4px; }
textarea { height: auto; min-height: 96px; padding: 10px 13px; resize: vertical; line-height: 1.5; }
input[readonly] { background: var(--surface-2); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-stack { display: flex; flex-direction: column; gap: 16px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.check input { width: 17px; height: 17px; margin: 0; accent-color: var(--primary); }

.avatar {
  flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background-image: linear-gradient(135deg, rgba(255, 255, 255, .22), rgba(0, 0, 0, .12));
  color: #fff; font-family: var(--font-heading); font-size: 10px; font-weight: 600; line-height: 1;
}
.avatar.sm { width: 22px; height: 22px; font-size: 9px; }
.avatar.lg { width: 36px; height: 36px; font-size: 13px; }
.avatar.none { background: transparent; border: 1.5px dashed var(--border-strong); color: var(--muted-2); }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
.person > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-chip {
  flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; color: #fff;
  background: var(--chip, var(--gradient-primary)); box-shadow: 0 8px 18px -8px rgba(15, 31, 29, .45);
  transition: transform .4s var(--ease-spring);
}
.icon-chip.sm { width: 34px; height: 34px; border-radius: 10px; }
.chip-primary { --chip: var(--gradient-primary); }
.chip-gold { --chip: var(--gradient-gold); }
.chip-rose { --chip: var(--gradient-rose); }
.chip-violet { --chip: var(--gradient-violet); }
.chip-sky { --chip: var(--gradient-sky); }
.chip-slate { --chip: var(--gradient-slate); }

.type-icon { flex: none; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 5px; color: #fff; }
.type-icon svg { width: 11px; height: 11px; }
.prio { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.prio svg { flex: none; width: 16px; height: 16px; }
.prio .name { color: var(--text-2); font-size: 13px; }
.status {
  display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 30px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 72%, black);
}
.status::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.label {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 7px;
  font-size: 12px; font-weight: 500; white-space: nowrap; background: var(--sunken); color: var(--text-2);
}
.key { font-size: 12.5px; font-weight: 600; color: var(--primary-600); white-space: nowrap; letter-spacing: .01em; }
a.key:hover { color: var(--primary-700); }
.due { font-size: 12px; color: var(--muted); white-space: nowrap; }
.due.late { color: var(--danger); font-weight: 600; }

.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head.with-tabs { margin-bottom: 18px; }
.page-head .titles { min-width: 0; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; font-size: 12.5px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary-600); }
.crumbs .sep { color: var(--muted-2); }
.page-title { display: flex; align-items: center; gap: 14px; font-size: 22px; line-height: 30px; font-weight: 600; }
.page-sub { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.tabs {
  display: inline-flex; gap: 2px; max-width: 100%; margin: 0 0 22px; padding: 4px; overflow-x: auto; scrollbar-width: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-xs);
}
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 9px;
  color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; transition: all .25s var(--ease);
}
.tabs a:hover { color: var(--primary-600); }
.tabs a.active { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-primary); }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-xs); }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; min-height: 56px; padding: 12px 20px; border-bottom: 1px solid var(--border); }
.panel-head h2 { font-size: 15px; }
.panel-body { padding: 20px; }
.panel-foot { padding: 14px 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted); }
.section { margin-bottom: 26px; }
.section:last-child { margin-bottom: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; margin-bottom: 12px; }
.section-head h2 { font-size: 16px; }
.section-head .meta { font-size: 13px; color: var(--muted); }
.more-link { font-size: 13px; font-weight: 600; }
.empty { padding: 44px 24px; text-align: center; color: var(--muted); }
.empty b { display: block; margin-bottom: 4px; font-family: var(--font-heading); font-size: 16px; font-weight: 600; color: var(--text); }
.empty .btn { margin-top: 16px; }
.empty-inline { padding: 22px 16px; text-align: center; font-size: 13px; color: var(--muted); }
.callout { display: flex; gap: 10px; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--r-card); background: var(--primary-50); color: var(--primary-700); font-size: 13px; }
.callout svg { flex: none; margin-top: 1px; }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-xs);
}
.toolbar .btn, .toolbar .chip, .toolbar select { height: 36px; }
.search-box {
  display: flex; align-items: center; gap: 8px; width: 280px; height: 40px; padding: 0 12px;
  border: 1.5px solid var(--border); border-radius: var(--r); background: var(--surface); color: var(--muted-2);
  transition: border-color .2s, box-shadow .2s;
}
.toolbar .search-box { height: 38px; }
.search-box:focus-within { border-color: var(--primary); box-shadow: var(--focus); color: var(--primary); }
.search-box svg { flex: none; }
.search-box input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; box-shadow: none; }
.search-box input:focus { box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 500; white-space: nowrap; transition: all .2s var(--ease);
}
.chip:hover { border-color: var(--primary-100); color: var(--primary-600); background: var(--primary-50); }
.chip svg { flex: none; color: var(--muted-2); }
.chip[aria-pressed=true] { border-color: transparent; background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-primary); }
.chip[aria-pressed=true] svg { color: #fff; }
.chip[aria-pressed=true] .type-icon { box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .7); }
.list-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 36px; margin-bottom: 12px; }
.list-bar .count { font-size: 13px; font-weight: 500; color: var(--muted); }
.list-bar-actions { display: flex; align-items: center; gap: 8px; }
.sort { position: relative; display: inline-flex; align-items: center; }
.sort svg { position: absolute; left: 11px; color: var(--muted); pointer-events: none; }
.sort select { width: auto; height: 36px; padding-left: 32px; font-size: 13px; }
.load-more { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 13px; color: var(--muted); }
.avatar-stack { display: inline-flex; align-items: center; padding-left: 4px; }
.avatar-stack > * { margin-left: -6px; }
.avatar-stack button { padding: 0; border: 2px solid var(--surface); border-radius: 50%; background: none; line-height: 0; transition: transform .2s var(--ease); }
.avatar-stack button:hover { position: relative; z-index: 2; transform: translateY(-2px); }
.avatar-stack button[aria-pressed=true] { position: relative; z-index: 1; border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-100); }
.avatar-stack .avatar { width: 32px; height: 32px; font-size: 11px; }
.avatar-stack > .avatar { border: 2px solid var(--surface); }

.ilist, .dlist { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-xs); overflow: hidden; }
.ilist.flush { border: 0; border-radius: 0; box-shadow: none; }
.ilist-head, .irow, .dlist-head, .drow { display: grid; grid-template-columns: var(--cols); align-items: center; column-gap: 16px; padding: 0 18px; }
.ilist-head, .dlist-head {
  height: 44px; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--muted);
  font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap;
}
.irow { min-height: 52px; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); background: var(--surface); color: var(--text-2); transition: background .2s; animation: rowIn .4s var(--ease) both; }
.irow:last-child { border-bottom: 0; }
.irow:hover { background: #f3faf8; color: var(--text-2); }
.irow[draggable=true] { cursor: grab; }
.irow.dragging { opacity: .4; }
.drop-before { box-shadow: inset 0 3px 0 var(--primary); }
.c-key { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.c-title .t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-weight: 500; }
.c-title a.t:hover { color: var(--primary-600); }
.c-title .tags { display: flex; gap: 4px; flex: 0 1000 auto; min-width: 0; overflow: hidden; }
.c-title .label, .c-title .due { flex: none; }
.c-prio.icon-only .name { display: none; }
.c-status, .c-prio, .c-assignee, .c-release, .c-avatar { display: flex; align-items: center; min-width: 0; }
.c-points { font-size: 13px; color: var(--muted); text-align: right; }
.c-updated { font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.c-rel { font-size: 12.5px; color: var(--muted); }
.h-points, .num { text-align: right; }
.drow { min-height: 62px; padding-top: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); color: var(--text-2); transition: background .2s; animation: rowIn .4s var(--ease) both; }
.drow:last-child { border-bottom: 0; }
a.drow:hover { background: #f3faf8; color: var(--text-2); }
.drow .cm { min-width: 0; }
.drow .num { font-family: var(--font-heading); font-size: 15px; font-weight: 600; color: var(--text); }
.drow .cell { min-width: 0; font-size: 13px; color: var(--text-2); }
.drow .end { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.drow select { width: auto; height: 34px; font-size: 13px; }
.m-label { display: none; }
.two-line { display: flex; flex-direction: column; min-width: 0; }
.two-line > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.two-line b { font-weight: 600; color: var(--text); }
.two-line .sub { font-size: 12.5px; color: var(--muted); }
.proj-cell { display: flex; align-items: center; gap: 14px; min-width: 0; }
.proj-cell .name { font-weight: 600; color: var(--text); }

.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 26px; }
.tile {
  display: flex; align-items: center; gap: 14px; padding: 18px; color: inherit;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease); animation: fadeUp .55s var(--ease) both;
}
.tile:nth-child(2) { animation-delay: .05s; }
.tile:nth-child(3) { animation-delay: .1s; }
.tile:nth-child(4) { animation-delay: .15s; }
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: inherit; }
.tile:hover .icon-chip { transform: rotate(-8deg) scale(1.08); }
.tile .l { display: block; font-size: 12.5px; color: var(--muted); }
.tile .v { display: block; font-family: var(--font-heading); font-size: 24px; font-weight: 700; line-height: 1.25; color: var(--text); }
.tile.alert .v { color: var(--danger); }
.hero {
  position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  margin-bottom: 22px; padding: 26px 30px; border-radius: var(--r-lg); color: #fff; overflow: hidden;
  background: radial-gradient(500px 260px at 92% 0%, rgba(252, 211, 77, .35), transparent 60%), linear-gradient(135deg, #0f766e 0%, #0d9488 45%, #065f46 100%);
  box-shadow: 0 24px 50px -26px rgba(15, 118, 110, .85); animation: fadeUp .6s var(--ease) both;
}
.hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent, #000 70%); pointer-events: none; }
.hero > * { position: relative; }
.hero h1 { color: #fff; font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.hero p { margin: 0; color: rgba(255, 255, 255, .86); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn.light { border: 0; background: #fff; color: var(--primary-700); font-weight: 600; }
.btn.light:hover { background: #fff; color: var(--primary-700); transform: translateY(-1px); box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .4); }
.btn.glass { border: 1px solid rgba(255, 255, 255, .32); background: rgba(255, 255, 255, .14); color: #fff; }
.btn.glass:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.split { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 24px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }

.feed { list-style: none; margin: 0; padding: 6px 0; }
.feed li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; padding: 12px 20px; font-size: 13.5px; color: var(--text-2); animation: fadeUp .45s var(--ease) both; }
.feed li + li { border-top: 1px solid var(--border); }
.feed .avatar { width: 30px; height: 30px; font-size: 11px; }
.feed .what { min-width: 0; overflow-wrap: anywhere; }
.feed .what b { color: var(--text); font-weight: 600; }
.feed .when { display: block; margin-top: 2px; font-size: 11.5px; color: var(--muted-2); }
.diff-old { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.diff-new { color: var(--text); font-weight: 600; }

.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li + li { border-top: 1px solid var(--border); }
.notif-list a { display: grid; grid-template-columns: 32px minmax(0, 1fr) 10px; gap: 12px; align-items: start; padding: 14px 20px; color: var(--text); transition: background .2s; }
.notif-list a:hover { background: #f3faf8; color: var(--text); }
.notif-list .avatar { width: 32px; height: 32px; font-size: 11px; }
.notif-list .when { display: block; margin-top: 2px; font-size: 12px; color: var(--muted-2); }
.notif-list .dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; }
.notif-list a.unread { background: var(--primary-50); }
.notif-list a.unread .dot { background: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.notif-list a.unread .msg { font-weight: 600; }

.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(280px, 1fr); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.lane { display: flex; flex-direction: column; min-height: 55vh; background: var(--sunken); border: 1px solid var(--border); border-radius: var(--r-card); }
.lane-head { display: flex; align-items: center; gap: 8px; height: 50px; padding: 0 16px; font-family: var(--font-heading); font-size: 13.5px; font-weight: 600; color: var(--text); border-top: 3px solid var(--c); border-radius: var(--r-card) var(--r-card) 0 0; }
.lane-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lane-head .n { margin-left: auto; min-width: 26px; height: 22px; padding: 0 8px; border-radius: 20px; background: var(--surface); color: var(--muted); font-family: var(--font); font-size: 12px; line-height: 22px; text-align: center; }
.lane-body { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 80px; padding: 0 10px 14px; border-radius: 0 0 var(--r-card) var(--r-card); }
.lane.drop-on .lane-body { background: color-mix(in srgb, var(--c) 10%, transparent); }
.lane-empty { padding: 18px 8px; text-align: center; font-size: 13px; color: var(--muted-2); }
.card {
  display: flex; flex-direction: column; gap: 12px; padding: 14px; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-xs);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .2s;
}
.card:hover { transform: translateY(-2px); border-color: var(--primary-100); box-shadow: var(--shadow); color: var(--text); }
.card[draggable=true] { cursor: grab; }
.card.dragging { opacity: .4; transform: none; }
.card-title { font-weight: 500; line-height: 1.45; overflow-wrap: anywhere; }
.card-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.card-foot { display: flex; align-items: center; gap: 8px; min-height: 26px; }
.card-foot .meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.pts { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 20px; background: var(--sunken); color: var(--text-2); font-size: 12px; font-weight: 600; line-height: 22px; text-align: center; }
.sprint-meta { font-size: 13px; color: var(--muted); }

.sprint { margin-bottom: 20px; overflow: hidden; }
.sprint-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.sprint-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; min-width: 0; }
.sprint-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sprint.drop-on .drop-zone { background: var(--gold-50); }
.drop-zone { min-height: 52px; }
.drop-empty { padding: 18px; text-align: center; font-size: 13px; color: var(--muted); }

.progress { display: flex; height: 8px; border-radius: 8px; background: var(--sunken); overflow: hidden; }
.progress.lg { height: 14px; border-radius: 10px; }
.progress i { display: block; height: 100%; }
.prog-text { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.prog-text .bad { color: var(--danger); font-weight: 600; }
.prog-text .good { color: #059669; font-weight: 600; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.bar-row { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) 34px; align-items: center; gap: 12px; min-height: 38px; margin: 0 -10px; padding: 0 10px; border-radius: var(--r-sm); color: var(--text); font-size: 13px; transition: background .2s; }
.bar-row:hover { background: var(--primary-50); color: var(--text); }
.bar-row .n { text-align: right; font-weight: 600; color: var(--text-2); }
.bar { height: 10px; border-radius: 10px; background: var(--sunken); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 10px; background: var(--c, var(--primary)); animation: grow .9s var(--ease) both; transform-origin: left; }
.chart svg { display: block; width: 100%; height: 200px; }
.chart-key { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 13px; color: var(--text-2); }
.chart-key span { display: inline-flex; align-items: center; gap: 6px; }
.chart-key i { width: 14px; height: 3px; border-radius: 2px; background: var(--c); }

.issue { display: grid; grid-template-columns: minmax(0, 1fr) 340px; grid-template-areas: "head side" "body side"; column-gap: 28px; align-items: start; }
.issue-headarea { grid-area: head; min-width: 0; padding: 22px 24px 18px; background: var(--surface); border: 1px solid var(--border); border-bottom: 0; border-radius: var(--r-card) var(--r-card) 0 0; }
.issue-body { grid-area: body; min-width: 0; padding: 0 24px 24px; background: var(--surface); border: 1px solid var(--border); border-top: 0; border-radius: 0 0 var(--r-card) var(--r-card); box-shadow: var(--shadow-xs); }
.issue-side { grid-area: side; position: sticky; top: calc(var(--topbar) + 20px); min-width: 0; }
.issue-headarea .crumbs { margin-bottom: 12px; }
.issue-keyline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 34px; margin-bottom: 6px; }
.issue-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.issue-title {
  display: block; width: 100%; min-height: 0; height: auto; margin: 0 0 0 -10px; padding: 4px 10px; overflow: hidden; resize: none;
  border: 1.5px solid transparent; border-radius: var(--r); background: transparent;
  font-family: var(--font-heading); font-size: 24px; line-height: 34px; font-weight: 600; letter-spacing: -.01em;
}
.issue-title:hover { border-color: var(--border); }
.issue-title[readonly]:hover { border-color: transparent; }
.isec { padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--border); }
.issue-body > .isec:first-child { margin-top: 0; }
.isec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; min-height: 32px; margin-bottom: 10px; }
.isec-head h2 { font-size: 15px; }
.isec-head .meta { font-size: 13px; color: var(--muted); }
.desc-view { min-height: 48px; margin: 0 0 0 -12px; padding: 10px 12px; border: 1.5px solid transparent; border-radius: var(--r); cursor: text; transition: border-color .2s, background .2s; }
.desc-view:hover { border-color: var(--border); background: var(--surface-2); }
.desc-view.placeholder { color: var(--muted-2); }
.desc-view.readonly { cursor: default; }
.desc-view.readonly:hover { border-color: transparent; background: none; }
.prose { line-height: 1.65; overflow-wrap: anywhere; color: var(--text-2); }
.prose p { margin: 0 0 10px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul, .prose ol { margin: 0 0 10px; padding-left: 1.4em; }
.prose strong { color: var(--text); }
.prose code { padding: 1px 5px; border-radius: 6px; background: var(--primary-50); color: var(--primary-700); }
.prose pre { overflow-x: auto; padding: 14px 16px; border-radius: var(--r); background: #082a27; color: #dbeae7; }
.prose pre code { padding: 0; background: none; color: inherit; }
.prose img { max-width: 100%; border: 1px solid var(--border); border-radius: var(--r); }
.prose h3, .prose h4 { margin: 16px 0 6px; }
.prose blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--primary-100); color: var(--text-2); }
.mention { display: inline-block; padding: 0 6px; border-radius: 6px; background: var(--gold-50); color: #92400e; font-weight: 600; }
.editor { display: flex; flex-direction: column; gap: 10px; }
.editor-actions { display: flex; align-items: center; gap: 8px; }
.editor-actions .hint { margin-left: auto; font-size: 12px; color: var(--muted-2); }

.side-panel { overflow: hidden; }
.side-status { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.side-status .side-label { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.status-select { height: 42px; border-radius: 12px; font-weight: 600; }
.side-status .resolved { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.props { margin: 0; padding: 10px 20px; }
.prop { display: grid; grid-template-columns: 104px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 44px; }
.prop dt { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.prop dd { display: flex; align-items: center; gap: 4px; min-width: 0; margin: 0; }
.props .inline-select {
  width: 100%; min-width: 0; height: 34px; margin-left: -10px; padding: 0 10px;
  border: 1.5px solid transparent; border-radius: var(--r-sm); background: transparent;
  color: var(--text); font-weight: 500; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.props select.inline-select { padding-right: 26px; }
.props .inline-select:hover:not([disabled]):not([readonly]) { border-color: var(--border); background: var(--surface-2); }
.props .inline-select:focus { border-color: var(--primary); background: var(--surface); box-shadow: var(--focus); }
.props .inline-select[disabled] { opacity: 1; cursor: default; }
.link-btn { flex: none; padding: 0 2px; border: 0; background: none; color: var(--primary-600); font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.link-btn:hover { color: var(--primary-700); text-decoration: underline; }
.side-toggle { display: none; }
.side-stamp { padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); font-size: 12px; line-height: 18px; color: var(--muted); }

.seg { display: inline-flex; gap: 2px; padding: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.seg button { height: 30px; padding: 0 13px; border: 0; border-radius: 9px; background: none; color: var(--muted); font-size: 13px; font-weight: 500; transition: all .25s var(--ease); }
.seg button:hover { color: var(--primary-600); }
.seg button[aria-pressed=true] { background: var(--gradient-primary); color: #fff; box-shadow: var(--shadow-primary); }
.composer { margin-bottom: 18px; }
.composer textarea { min-height: 84px; }
.timeline { position: relative; list-style: none; margin: 0; padding: 0; }
.timeline::before { content: ""; position: absolute; left: 15px; top: 10px; bottom: 10px; width: 2px; border-radius: 2px; background: var(--sunken); }
.tl { position: relative; display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 12px; padding: 9px 0; animation: fadeUp .45s var(--ease) both; }
.tl .avatar { width: 32px; height: 32px; font-size: 11px; box-shadow: 0 0 0 4px var(--surface); }
.tl-line { padding-top: 5px; font-size: 13.5px; line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
.tl-line b { color: var(--text); font-weight: 600; }
.tl-line time, .tl-line .when { margin-left: 6px; font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.tl-note { margin-top: 8px; padding: 12px 16px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.tl-actions { display: flex; gap: 4px; margin-top: 6px; }
.tl-empty { padding: 12px 0 0 44px; font-size: 13px; color: var(--muted); }

.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file { position: relative; display: flex; flex-direction: column; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; transition: transform .25s var(--ease), box-shadow .25s; }
.file:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.file .thumb { display: grid; place-items: center; height: 100px; background: var(--surface-2) center / cover no-repeat; color: var(--muted); }
.file .meta { padding: 8px 10px; font-size: 12px; line-height: 16px; }
.file .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--text); }
.file .meta span { color: var(--muted); }
.file .remove { position: absolute; top: 6px; right: 6px; background: rgba(255, 255, 255, .94); }
.dropzone { margin-top: 12px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 12px; text-align: center; font-size: 13px; color: var(--muted); transition: all .2s; }
.dropzone.over { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
.none-text { margin: 0; font-size: 13px; color: var(--muted); }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 7vh 16px 16px; overflow-y: auto; background: rgba(3, 37, 35, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .2s both; }
.modal { display: flex; flex-direction: column; width: 100%; max-width: 560px; max-height: 86vh; background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: popIn .3s var(--ease) both; }
.modal.wide { max-width: 800px; }
.modal-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 24px 14px; }
.modal-head h2 { font-size: 18px; line-height: 26px; }
.modal-body { flex: 1; min-height: 0; padding: 4px 24px 22px; overflow-y: auto; }
.modal-foot { flex: none; display: flex; justify-content: flex-end; gap: 10px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.modal-foot .btn.danger:first-child { margin-right: auto; }
.palette-modal .modal-head { display: none; }
.palette-modal .modal-body { padding: 0; }
.palette-input { display: flex; align-items: center; gap: 12px; height: 60px; padding: 0 20px; border-bottom: 1px solid var(--border); color: var(--primary); }
.palette-input input { flex: 1; height: 100%; padding: 0; border: 0; background: none; font-size: 16px; box-shadow: none; }
.palette-input input:focus { box-shadow: none; }
.palette-list { list-style: none; max-height: 56vh; margin: 0; padding: 8px; overflow-y: auto; }
.palette-list a { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: var(--r); color: var(--text); }
.palette-list a .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.palette-list a[aria-selected=true], .palette-list a:hover { background: var(--primary-50); color: var(--text); }
.palette-list .group { padding: 10px 12px 4px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.palette-list .note { padding: 18px 12px; font-size: 13px; color: var(--muted); }

.drawer-backdrop { position: fixed; inset: 0; z-index: 95; background: rgba(3, 37, 35, .38); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); animation: fadeIn .2s both; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 96; width: min(1060px, 94vw); overflow-y: auto; background: var(--bg); box-shadow: -20px 0 60px rgba(3, 37, 35, .25); animation: drawerIn .35s var(--ease) both; }
.drawer-bar { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; gap: 10px; height: 62px; padding: 0 16px 0 26px; background: rgba(255, 255, 255, .92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.drawer-inner { padding: 22px 26px 48px; }
.drawer .issue-side { top: 84px; }

.menu { position: absolute; z-index: 110; min-width: 230px; max-width: min(340px, calc(100vw - 16px)); max-height: 360px; overflow-y: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); animation: scaleIn .18s var(--ease) both; transform-origin: top left; }
.menu input[type=search] { height: 36px; margin-bottom: 6px; }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 38px; padding: 0 12px; border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); font-size: 13.5px; text-align: left; }
.menu button svg { color: var(--muted); }
.menu button input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
.menu button:hover, .menu button[aria-selected=true] { background: var(--primary-50); color: var(--primary-600); }
.menu button:hover svg { color: var(--primary-600); }
.menu button.danger { color: #c62a2f; }
.menu button.danger svg { color: #c62a2f; }
.menu button.danger:hover { background: var(--danger-50); }
.menu .menu-note { padding: 8px 12px; font-size: 12px; color: var(--muted); }
.menu-scrim { position: fixed; inset: 0; z-index: 105; background: rgba(3, 37, 35, .45); animation: fadeIn .2s both; }

.tip {
  position: fixed; z-index: 140; display: none; max-width: 260px; padding: 7px 10px; border-radius: 8px;
  background: #0b2b28; color: #fff; font-size: 12px; font-weight: 500; line-height: 16px;
  box-shadow: 0 8px 20px -6px rgba(3, 37, 35, .45); pointer-events: none; opacity: 0; transform: translateY(2px); transition: opacity .12s, transform .12s;
}
.tip.on { opacity: 1; transform: none; }

#toasts { position: fixed; top: 16px; right: 16px; z-index: 130; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 14px 40px 16px 14px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg);
  pointer-events: auto; animation: toastIn .4s var(--ease-spring) both;
}
.toast.leaving { animation: toastOut .25s var(--ease) forwards; }
.toast-icon { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--success); color: #fff; }
.toast.error .toast-icon { background: var(--danger); }
.toast-text { min-width: 0; font-size: 13px; color: var(--text-2); overflow-wrap: anywhere; }
.toast-text strong { display: block; font-size: 14px; color: var(--text); }
.toast-close { position: absolute; top: 10px; right: 10px; width: 24px; height: 24px; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: var(--muted-2); }
.toast-close:hover { background: var(--surface-2); color: var(--text); }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--success); transform-origin: left; animation: toastBar linear forwards; }
.toast.error .toast-bar { background: var(--danger); }

.auth { position: relative; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.1fr 1fr; background: #032523; overflow: hidden; }
.auth-hero {
  position: relative; display: flex; flex-direction: column; padding: 46px 56px 56px; color: #fff; overflow: hidden;
  background: radial-gradient(520px 320px at 85% 10%, rgba(252, 211, 77, .28), transparent 65%), radial-gradient(600px 400px at 0% 100%, rgba(16, 185, 129, .35), transparent 70%), linear-gradient(160deg, #0f766e 0%, #065f56 55%, #032523 100%);
}
.auth-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .14) 1px, transparent 1px); background-size: 24px 24px; mask-image: linear-gradient(180deg, #000, transparent 85%); pointer-events: none; }
.auth-hero > * { position: relative; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-mark { width: 48px; height: 48px; border-radius: 15px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); animation: none; box-shadow: none; }
.auth-brand .brand-name { font-size: 19px; }
.auth-tag { font-size: 12px; color: rgba(255, 255, 255, .75); }
.auth-copy { margin: auto 0 0; max-width: 520px; padding-top: 40px; }
.auth-copy h1 { color: #fff; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.12; font-weight: 700; margin-bottom: 16px; }
.auth-copy h1 span { background: linear-gradient(90deg, #fde68a, #fff, #a7f3d0, #fde68a); background-size: 300% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; animation: gradientShift 9s linear infinite; }
.auth-copy p { color: rgba(255, 255, 255, .86); font-size: 15px; line-height: 1.7; margin-bottom: 22px; }
.auth-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; }
.auth-chips li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 30px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .26); font-size: 13px; font-weight: 500; }
.auth-weave { position: absolute; right: -40px; top: 90px; width: 420px; opacity: .55; }
.auth-panel-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: min(430px, 100%); padding: 36px 32px 28px; background: var(--surface); border-radius: 24px; box-shadow: 0 40px 80px -30px rgba(3, 37, 35, .45); animation: popIn .6s var(--ease-spring) .1s both; }
.auth-card-head { margin-bottom: 24px; text-align: center; }
.lock-badge { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px; color: #fff; background: var(--gradient-primary); box-shadow: var(--shadow-primary); animation: float 4s ease-in-out infinite; }
.lock-badge.alt { background: var(--gradient-gold); box-shadow: 0 10px 25px -8px rgba(234, 88, 12, .6); }
.auth-card-head h2 { margin: 0 0 6px; font-size: 24px; font-weight: 700; }
.auth-card-head p { margin: 0; color: var(--muted); }
.auth-card .btn { width: 100%; height: 46px; border-radius: 12px; font-size: 15px; }
.auth-card input[type=email], .auth-card input[type=password] { height: 46px; border-radius: 12px; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--muted); }
.error-box { display: flex; gap: 8px; padding: 11px 14px; border-radius: 12px; background: var(--danger-50); color: #b42318; font-size: 13.5px; animation: shake .4s var(--ease); }

.secret { padding: 12px 14px; border: 1px dashed #f3c76a; border-radius: 12px; background: var(--gold-50); font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.spinner { width: 26px; height: 26px; margin: 60px auto; border: 3px solid var(--primary-100); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
.rows > * + * { border-top: 1px solid var(--border); }
.row-item { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 20px; }
.row-item .two-line { flex: 1; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.inline-form select { width: auto; height: 36px; font-size: 13px; }
.add-bar { margin-bottom: 14px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-xs); }
.create-another { margin-top: 18px; }
.foot-note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(12px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
@keyframes drawerIn { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px); } }
@keyframes toastBar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes gradientShift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes float { 50% { transform: translateY(-5px); } }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }

@media (max-width: 1299.98px) {
  .issue { grid-template-columns: minmax(0, 1fr) 310px; column-gap: 22px; }
  .grid-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1149.98px) {
  .issue { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "side" "body"; }
  .issue-headarea { border-bottom: 1px solid var(--border); border-radius: var(--r-card); box-shadow: var(--shadow-xs); }
  .issue-side, .drawer .issue-side { position: static; margin: 16px 0; }
  .issue-body { border-top: 1px solid var(--border); border-radius: var(--r-card); }
  .issue-body > .isec:first-child { padding-top: 22px; border-top: 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .top-search { width: 200px; }
}
@media (max-width: 899.98px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 991.98px) {
  :root { --gutter: 16px; }
  .sidebar { transform: translateX(-100%); width: min(300px, 86vw); padding-top: env(safe-area-inset-top); padding-bottom: env(safe-area-inset-bottom); }
  .shell.drawer-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .35); }
  .content-wrap, .shell.collapsed .content-wrap { margin-left: 0; }
  .shell.collapsed .sidebar { width: min(300px, 86vw); }
  .sidebar .sb-close { display: inline-grid; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(3, 37, 35, .5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .shell.drawer-open .scrim { opacity: 1; pointer-events: auto; }
  .topbar { gap: 10px; height: calc(var(--topbar) - 6px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 14px 0; }
  .topbar-actions { gap: 8px; }
  .topbar-greeting { font-size: 15px; }
  .top-search, .user-chip .who, .user-chip > svg, .top-create { display: none; }
  .user-chip { padding: 3px; }
  .content { padding: 18px var(--gutter) calc(var(--tabbar) + var(--tabbar-gap) * 3 + env(safe-area-inset-bottom)); }
  .tabbar {
    position: fixed; left: var(--tabbar-gap); right: var(--tabbar-gap); bottom: calc(var(--tabbar-gap) + env(safe-area-inset-bottom)); z-index: 50;
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; height: var(--tabbar); padding: 6px;
    border-radius: 22px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
    border: 1px solid rgba(226, 234, 232, .95); box-shadow: 0 16px 40px -14px rgba(3, 37, 35, .38), 0 2px 6px rgba(3, 37, 35, .05);
  }
  .tab-item {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0;
    border: 0; border-radius: 16px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 600;
    transition: color .2s, background .3s var(--ease), box-shadow .3s var(--ease);
  }
  .tab-item span:not(.badge) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tab-item svg { transition: transform .35s var(--ease-spring); }
  .tab-item:active svg { transform: scale(.85); }
  .tab-item:hover { color: var(--primary-600); }
  .tab-item.active { color: #fff; background: var(--gradient-primary); box-shadow: 0 10px 22px -10px rgba(13, 148, 136, .9); }
  .tab-item .badge { position: absolute; top: 4px; left: calc(50% + 6px); min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px #fff; }
  #toasts { top: calc(10px + env(safe-area-inset-top)); left: 50%; right: auto; transform: translateX(-50%); }

  .more-sheet { position: fixed; inset: 0; z-index: 120; display: block; }
  .more-sheet[hidden] { display: none !important; }
  .more-backdrop { position: absolute; inset: 0; background: rgba(3, 37, 35, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .25s both; }
  .more-panel { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; max-height: 88vh; padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-radius: 28px 28px 0 0; box-shadow: 0 -24px 60px rgba(3, 37, 35, .25); animation: sheetUp .38s var(--ease) both; }
  .more-handle { flex: none; width: 44px; height: 5px; margin: 10px auto 2px; border-radius: 5px; background: #d2ddda; }
  .more-head { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 18px 10px; }
  .more-head strong { display: block; font-family: var(--font-heading); font-size: 18px; color: var(--text); }
  .more-head small { font-size: 12.5px; color: var(--muted); }
  .more-body { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px 20px; }
  .more-group { margin-top: 12px; }
  .more-label { margin: 6px 4px 10px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }
  .more-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .more-tile {
    display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 6px 12px; min-width: 0;
    border: 1px solid var(--border); border-radius: 18px; background: var(--surface-2); color: var(--text-2);
    font-size: 12px; font-weight: 600; line-height: 1.25; text-align: center; transition: transform .2s var(--ease), border-color .2s, background .2s;
  }
  .more-tile > span:last-child { max-width: 100%; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .more-tile:active { transform: scale(.96); }
  .more-tile:hover { color: var(--text-2); }
  .more-tile.active { border-color: var(--primary); background: var(--primary-50); color: var(--primary-700); }
  .more-tile .icon-chip, .more-tile .pbadge.lg { width: 44px; height: 44px; border-radius: 14px; }
  .more-account { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 20px; }
  .more-account .btn { width: 100%; }

  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 28px 22px 34px; }
  .auth-copy { padding-top: 26px; }
  .auth-copy h1 { font-size: 28px; }
  .auth-copy p { margin-bottom: 16px; font-size: 14px; }
  .auth-weave { display: none; }
  .auth-panel-wrap { padding: 0 16px 32px; background: linear-gradient(180deg, #032523 0, #032523 40px, var(--bg) 40px); }
  .auth-card { margin-top: -10px; padding: 28px 22px 22px; }
}

@media (max-width: 767.98px) {
  :root { --h: 42px; }
  body { font-size: 15px; }
  input[type=text], input[type=email], input[type=password], input[type=date], input[type=number], input[type=search], select, textarea { font-size: 16px; }
  .page-head { margin-bottom: 16px; gap: 12px; }
  .page-title { font-size: 20px; line-height: 28px; gap: 12px; }
  .page-head .crumbs { display: none; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .tabs { display: flex; width: 100%; margin-bottom: 16px; }
  .tabs a { flex: 1 0 auto; justify-content: center; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }

  .toolbar { padding: 10px; gap: 8px; }
  .toolbar .search-box, .search-box { width: 100%; height: 42px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; width: calc(100% + 20px); margin: 0 -10px; padding: 2px 10px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }

  .ilist, .dlist { display: flex; flex-direction: column; gap: 12px; overflow: visible; background: none; border: 0; border-radius: 0; box-shadow: none; }
  .ilist-head, .dlist-head { display: none; }
  .irow, .drow {
    position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 16px 14px 18px; overflow: hidden;
    background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 8px 22px -16px rgba(3, 37, 35, .4);
  }
  .irow::before, .drow::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--gradient-primary); }
  .irow:last-child, .drow:last-child { border-bottom: 1px solid var(--border); }
  .irow:hover, a.drow:hover { background: var(--surface); }
  .irow > :empty, .drow > :empty { display: none; }
  .irow .c-key { order: 1; flex: 1 1 auto; }
  .irow .c-status { order: 2; }
  .irow .c-title { order: 3; flex: 1 0 100%; flex-wrap: wrap; row-gap: 8px; }
  .irow .c-title .t { flex: 1 0 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; font-size: 15px; line-height: 21px; }
  .irow .c-title .tags { flex-wrap: wrap; overflow: visible; }
  .irow .c-prio { order: 4; }
  .c-prio.icon-only .name { display: inline; }
  .irow .c-assignee { order: 5; max-width: 55%; }
  .irow .c-release { order: 6; }
  .irow .c-avatar { order: 7; }
  .irow .c-points { order: 8; }
  .irow .c-points:not(:empty)::before { content: "Points "; color: var(--muted-2); }
  .irow .c-updated { order: 9; margin-left: auto; font-size: 12px; }
  .irow .c-rel { order: 0; flex: 1 0 100%; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
  .irow .c-remove { order: 10; margin-left: auto; }
  .drow .cm { flex: 1 0 100%; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
  .drow .num, .drow .cell { text-align: left; font-size: 13px; }
  .drow .num { font-size: 15px; }
  .drow .m-full { flex: 1 0 100%; }
  .drow .m-hide { display: none; }
  .drow .end { margin-left: auto; }
  .m-label { display: inline; margin-right: 6px; font-family: var(--font); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }

  .tiles { gap: 10px; margin-bottom: 22px; }
  .tile { flex-direction: column; align-items: flex-start; gap: 10px; padding: 14px; }
  .tile .icon-chip { width: 38px; height: 38px; border-radius: 11px; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 21px; }
  .hero-actions { width: 100%; }
  .hero-actions .btn { flex: 1; }

  .board { grid-auto-columns: 86%; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 8px; scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none; }
  .board::-webkit-scrollbar { display: none; }
  .lane { min-height: 60vh; scroll-snap-align: start; }
  .avatar-stack { order: 3; }
  .sprint-meta { flex: 1 0 100%; }

  .sprint { overflow: visible; background: none; border: 0; box-shadow: none; }
  .sprint-head { padding: 0 2px 12px; background: none; border: 0; }
  .drop-empty { background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: 18px; }
  .add-bar select { flex: 1 1 140px; }
  .row-item { flex-wrap: wrap; }

  .issue-headarea { padding: 16px; }
  .issue-headarea .crumbs { display: none; }
  .issue-title { font-size: 20px; line-height: 28px; }
  .issue-body { padding: 0 16px 18px; }
  .issue-side .prop.more { display: none; }
  .issue-side.open .prop.more { display: grid; }
  .side-toggle { display: block; width: 100%; height: 48px; border: 0; border-top: 1px solid var(--border); background: none; color: var(--primary-600); font-size: 14px; font-weight: 600; }
  .props .inline-select { margin-left: 0; height: 40px; border-color: var(--border); background: var(--surface-2); }
  .prop { min-height: 50px; }
  .dropzone { display: none; }
  .editor-actions .hint { display: none; }
  .isec-head { flex-wrap: wrap; }
  .seg { width: 100%; }
  .seg button { flex: 1; }
  .files { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .drawer { width: 100%; }
  .drawer-inner { padding: 16px 16px 40px; }

  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal, .modal.wide { max-width: none; max-height: 94dvh; border-radius: 26px 26px 0 0; animation: sheetUp .35s var(--ease) both; }
  .modal-foot { padding-bottom: calc(14px + env(safe-area-inset-bottom)); border-radius: 0; }
  .modal-foot .btn { flex: 1; }
  .modal-foot .btn.danger:first-child { margin-right: 0; }
  .palette-modal { align-self: stretch; max-height: none; height: 100dvh; border-radius: 0; }
  .modal-backdrop:has(.palette-modal) { align-items: stretch; }
  .palette-list { max-height: none; }
  .menu.sheet {
    position: fixed; top: auto !important; left: 0 !important; right: 0; bottom: 0; max-width: none; max-height: 72dvh;
    padding: 10px 10px calc(14px + env(safe-area-inset-bottom)); border: 0; border-radius: 26px 26px 0 0; animation: sheetUp .3s var(--ease) both;
  }
  .menu.sheet button { min-height: 50px; font-size: 15px; }
  .menu.sheet input[type=search] { height: 46px; }
}

@media (min-width: 992px) {
  .show-compact { display: none !important; }
}
@media (max-width: 991.98px) {
  .hide-compact { display: none !important; }
}
@media (min-width: 768px) {
  .show-mobile { display: none !important; }
}
@media (max-width: 767.98px) {
  .hide-mobile { display: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
