:root {
  color-scheme: dark;

  --bg:        #12100c;
  --bg-alt:    #171410;
  --surface:   #1b1712;
  --surface-2: #241f17;
  --line:      rgba(255, 255, 255, .09);
  --line-2:    rgba(255, 255, 255, .2);
  --ink:       #f1ece3;
  --text-dim:  #b4a996;
  --text-mute: #7e7461;

  --accent:     #e0703f;
  --accent-2:   #c9562a;
  --accent-dim: rgba(224, 112, 63, .13);
  --accent-ink: #fdf9f0;
  --shadow-accent: 0 22px 54px -24px rgba(201, 86, 42, .5);

  --green:   #8fbf6e;
  --amber:   #d8a03a;
  --red:     #e06a4f;
  --blue:    #7d95b5;
  --violet:  #b39bc8;
  --cyan:    #7fb8b5;
  --orange:  #d9772f;

  --green-tint:   rgba(143, 191, 110, .12);  --green-line:   rgba(143, 191, 110, .38);
  --amber-tint:   rgba(216, 160, 58, .13);   --amber-line:   rgba(216, 160, 58, .36);
  --red-tint:     rgba(224, 106, 79, .13);   --red-line:     rgba(224, 106, 79, .38);
  --blue-tint:    rgba(125, 149, 181, .13);  --blue-line:    rgba(125, 149, 181, .36);
  --violet-tint:  rgba(179, 155, 200, .13);  --violet-line:  rgba(179, 155, 200, .36);
  --cyan-tint:    rgba(127, 184, 181, .12);  --cyan-line:    rgba(127, 184, 181, .35);
  --orange-tint:  rgba(217, 119, 47, .13);   --orange-line:  rgba(217, 119, 47, .36);

  --header-bg: rgba(18, 16, 12, .85);
  --overlay: rgba(0, 0, 0, .5);
  --overlay-strong: rgba(0, 0, 0, .58);
  --ghost-stroke: rgba(255, 255, 255, .07);
  --scroller: rgba(255, 255, 255, .16);
  --scroller-hover: rgba(255, 255, 255, .3);
  --vignette: rgba(0, 0, 0, .22);

  --shadow-1: 0 1px 3px rgba(0, 0, 0, .4);
  --shadow-2: 0 26px 64px -30px rgba(0, 0, 0, .75);

  --r-xs: 4px;
  --r-sm: 6px;
  --r:    10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-round: 999px;

  --font:     'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --display:  'Unbounded', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:     'JetBrains Mono', ui-monospace, 'SF Mono', 'Cascadia Code', Consolas, monospace;

  --sidebar-w: 240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="light"] {
  color-scheme: light;

  --bg:        #f3eee4;
  --bg-alt:    #ebe4d5;
  --surface:   #fdf9f0;
  --surface-2: #e6ddcb;
  --line:      rgba(22, 19, 15, .16);
  --line-2:    rgba(22, 19, 15, .32);
  --ink:       #16130f;
  --text-dim:  #5c5342;
  --text-mute: #8d8575;

  --accent:     #c9562a;
  --accent-2:   #a8451e;
  --accent-dim: rgba(201, 86, 42, .1);
  --accent-ink: #f3eee4;
  --shadow-accent: 0 22px 54px -24px rgba(201, 86, 42, .45);

  --green:   #5a7d45;
  --amber:   #b0781f;
  --red:     #c0392b;
  --blue:    #4a6d8c;
  --violet:  #7a5d8f;
  --cyan:    #3f7d76;
  --orange:  #b0542a;

  --green-tint:   rgba(90, 125, 69, .1);    --green-line:   rgba(90, 125, 69, .3);
  --amber-tint:   rgba(176, 120, 31, .1);   --amber-line:   rgba(176, 120, 31, .28);
  --red-tint:     rgba(192, 57, 43, .1);    --red-line:     rgba(192, 57, 43, .3);
  --blue-tint:    rgba(74, 109, 140, .1);   --blue-line:    rgba(74, 109, 140, .28);
  --violet-tint:  rgba(122, 93, 143, .1);   --violet-line:  rgba(122, 93, 143, .28);
  --cyan-tint:    rgba(63, 125, 118, .1);   --cyan-line:    rgba(63, 125, 118, .28);
  --orange-tint:  rgba(176, 84, 42, .1);    --orange-line:  rgba(176, 84, 42, .28);

  --header-bg: rgba(243, 238, 228, .85);
  --overlay: rgba(243, 238, 228, .6);
  --overlay-strong: rgba(22, 19, 15, .4);
  --ghost-stroke: rgba(22, 19, 15, .07);
  --scroller: rgba(22, 19, 15, .2);
  --scroller-hover: rgba(22, 19, 15, .38);
  --vignette: transparent;

  --shadow-1: 0 1px 3px rgba(22, 19, 15, .08);
  --shadow-2: 0 26px 64px -30px rgba(22, 19, 15, .28);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  letter-spacing: -.006em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background .3s var(--ease), color .3s var(--ease);
}

body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse 120% 90% at 50% 40%, transparent 62%, var(--vignette) 100%);
}

body::after {
  content: ""; position: fixed; inset: 0; z-index: 2500; pointer-events: none; opacity: .03;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

body.no-scroll { overflow: hidden; }

a { color: var(--accent); text-decoration: none; transition: color .25s; }
a:hover { color: var(--accent-2); }

button { font-family: inherit; }

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scroller); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--scroller-hover); }
* { scrollbar-width: thin; scrollbar-color: var(--scroller) transparent; }

.muted { color: var(--text-mute); }
.hint { color: var(--text-mute); font-size: 11px; display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); }
.link { color: var(--accent); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.link-sm { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; font-family: var(--mono); }

.ic { display: inline-block; vertical-align: middle; flex-shrink: 0; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px;
  border-radius: var(--r-round);
  font-weight: 700; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--mono);
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink);
  cursor: pointer; white-space: nowrap;
  transition: transform .18s var(--ease), background .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease), color .2s var(--ease);
}
.btn svg { transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-sm { padding: 8px 15px; font-size: 10px; letter-spacing: .09em; }
.btn-block { width: 100%; }

.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); box-shadow: var(--shadow-accent); }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); box-shadow: var(--shadow-accent), inset 0 1px 0 rgba(255, 255, 255, .22); }
.btn-primary:hover svg { transform: translateX(3px); }

.btn-danger { color: var(--red); border-color: var(--red-line); }
.btn-danger:hover { background: var(--red-tint); border-color: var(--red-line); }

.btn-default { background: var(--surface); color: var(--text-dim); border-color: var(--line-2); }
.btn-default:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 30px; height: 30px;
  border: none; background: transparent; color: var(--text-dim);
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s var(--ease);
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); transform: translateY(-1px); }
.icon-btn-sm { width: 24px; height: 24px; }

.input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line-2);
  border-radius: 0;
  color: var(--ink);
  padding: 10px 2px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .25s, background .25s;
}
.input::placeholder { color: var(--text-mute); }
.input:focus { border-bottom-color: var(--accent); box-shadow: none; background: transparent; }
.input:disabled { opacity: .5; }
.input-sm { padding: 6px 2px; font-size: 12.5px; }
.textarea { resize: vertical; min-height: 76px; line-height: 1.6; }

select.input {
  border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-sm);
  background: var(--surface); padding: 9px 12px;
  font-family: var(--mono); font-size: 12px;
}
select.input:focus { border-color: var(--accent); background: var(--surface); }
input[type="date"].input { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: var(--r-sm); background: var(--surface); padding: 8px 12px; font-family: var(--mono); font-size: 12px; }
input[type="date"].input:focus { border-color: var(--accent); }

.field { display: block; margin-bottom: 16px; }
.field__label {
  display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 6px;
  font-family: var(--mono);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }

.select { position: relative; display: inline-block; }
.select__trigger {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface);
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  color: var(--ink);
  border-radius: var(--r-sm);
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--mono);
  cursor: pointer;
  transition: border-color .2s;
}
.select__trigger:hover { border-color: var(--accent); }
.select__list {
  position: fixed; z-index: 300;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
}
.select__item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; color: var(--text-dim);
  padding: 7px 10px; border-radius: var(--r-xs); font-size: 12px; cursor: pointer;
  font-family: var(--mono);
  transition: background .12s, color .12s;
}
.select__item:hover { background: var(--accent-dim); color: var(--ink); }
.select__item-active { color: var(--accent); font-weight: 700; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 9px; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 9px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid transparent;
  white-space: nowrap;
  font-family: var(--mono);
}
.badge-backlog, .badge-low { background: var(--surface-2); color: var(--text-mute); }
.badge-todo, .badge-open, .badge-confirmed, .badge-planning { background: var(--blue-tint); color: var(--blue); }
.badge-in_progress { background: var(--amber-tint); color: var(--amber); }
.badge-review, .badge-testing, .badge-resolved { background: var(--violet-tint); color: var(--violet); }
.badge-done, .badge-closed, .badge-active, .badge-completed { background: var(--green-tint); color: var(--green); }
.badge-on_hold, .badge-reopened { background: var(--amber-tint); color: var(--amber); }
.badge-archived { background: var(--surface-2); color: var(--text-mute); }
.badge-critical { background: var(--red-tint); color: var(--red); }
.badge-high { background: var(--orange-tint); color: var(--orange); }
.badge-medium { background: var(--amber-tint); color: var(--amber); }
.badge-overdue { background: var(--red-tint); color: var(--red); font-weight: 800; }

#app-root { display: grid; grid-template-columns: var(--sidebar-w) 1fr; height: 100vh; }

.sidebar {
  display: flex; flex-direction: column;
  background: var(--bg-alt);
  border-right: 1px solid var(--line);
  padding: 20px 14px 14px;
}
.sidebar__brand { display: flex; flex-direction: column; gap: 3px; padding: 0 8px 20px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.sidebar__title {
  font-family: var(--display);
  font-size: 14px; font-weight: 700; letter-spacing: .22em;
  color: var(--ink); line-height: 1;
}
.sidebar__title::after {
  content: ""; display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent);
  margin-left: 8px; transform: translateY(-2px);
}
.sidebar__logo { display: none; }
.sidebar__subtitle { font-size: 8.5px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--text-mute); font-family: var(--mono); }

.sidebar__nav { display: flex; flex-direction: column; gap: 1px; flex: 1; counter-reset: rail; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  color: var(--text-dim);
  font-size: 10.5px;
  font-weight: 600;
  font-family: var(--mono);
  letter-spacing: .1em; text-transform: uppercase;
  transition: color .2s, background .2s;
}
.nav-item::before {
  content: counter(rail, decimal-leading-zero);
  counter-increment: rail;
  font-family: var(--mono);
  font-size: 9px; font-weight: 500;
  color: var(--text-mute);
  transition: color .2s;
}
.nav-item::after {
  content: ""; position: absolute; left: 0; top: 18%; bottom: 18%;
  width: 2px; background: var(--accent);
  transform: scaleY(0); transform-origin: 50% 0;
  transition: transform .3s var(--ease);
}
.nav-item:hover { color: var(--ink); background: var(--surface); }
.nav-item:hover::before { color: var(--accent); }
.nav-item.nav-active { color: var(--accent); }
.nav-item.nav-active::before { color: var(--accent); }
.nav-item.nav-active::after { transform: scaleY(1); }
.nav-item__icon { display: none; }
.nav-item__label { flex: 1; }
.nav-item__soon { font-size: 8px; color: var(--text-mute); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }

.sidebar__footer { border-top: 1px solid var(--line); padding-top: 12px; }
.footer-user { display: flex; align-items: center; gap: 9px; padding: 7px 6px; border-radius: var(--r-sm); transition: background .2s; }
.footer-user:hover { background: var(--surface); }
.footer-user__meta { flex: 1; min-width: 0; }
.footer-user__name { font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.footer-user__role { font-size: 8.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); font-family: var(--mono); }

.main { display: flex; flex-direction: column; min-width: 0; height: 100vh; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 9px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--header-bg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.topbar__kicker {
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-mute);
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
}
.topbar__kicker::before { content: "//"; color: var(--accent); font-weight: 700; }
.topbar__search {
  display: inline-flex; align-items: center; gap: 9px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-2);
  color: var(--text-mute);
  padding: 4px 2px;
  font-size: 9.5px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--mono);
  width: 230px;
  cursor: pointer;
  transition: border-color .25s, color .25s;
}
.topbar__search:hover { border-color: var(--accent); color: var(--text-dim); }
.topbar__search-text { flex: 1; text-align: left; }
.topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar__clock {
  font-family: var(--mono);
  font-size: 10px; font-weight: 500; letter-spacing: .12em;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.topbar__clock::before { content: "T+"; color: var(--accent); font-weight: 700; margin-right: 2px; }

.kbd {
  font-family: var(--mono);
  font-size: 9px;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--text-mute);
  background: var(--surface);
}

.view { flex: 1; overflow-y: auto; }

.page { padding: 34px 38px 60px; max-width: 1480px; margin: 0 auto; counter-reset: section; animation: page-in .45s var(--ease) both; }
.page-board { max-width: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } }

.page__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 34px; }
.page__title {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 30px); font-weight: 700; letter-spacing: .02em; line-height: 1.1;
  color: var(--ink);
}
.page__title::after { content: "."; color: var(--accent); }
.page__sub { color: var(--text-dim); font-size: 13px; margin-top: 8px; font-family: var(--mono); letter-spacing: .04em; }

.section-title {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .18em;
  color: var(--text-mute); margin: 26px 0 10px;
  font-family: var(--mono);
  display: flex; align-items: center; gap: 8px;
}
.section-title::before { content: "//"; color: var(--accent); }

.panel { counter-increment: section; padding: 24px 0; border-bottom: 1px solid var(--line); }
.panel__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.panel__title {
  font-size: 9.5px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
}
.panel__title::before {
  content: "// " counter(section, decimal-leading-zero) " ·";
  font-family: var(--mono);
  font-size: 9.5px; font-weight: 700;
  color: var(--accent);
}
.panel__body { padding: 4px 0 0; }
.panel-danger { border-bottom-color: var(--red-line); }
.panel-danger .panel__title::before { color: var(--red); }

.dash-grid { display: grid; grid-template-columns: 5fr 3fr; gap: 44px; margin-bottom: 12px; }
.dash-grid .panel { border-bottom: none; padding-top: 0; }
.overview-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 0; align-items: start; }
.overview-grid .panel { border-bottom: none; padding: 24px 26px 8px; }
.overview-grid .panel:first-child { padding-left: 0; }
.overview-grid .panel:not(:first-child) { border-left: 1px solid var(--line); }
.overview-grid .panel__title::before { content: none; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-bottom: 38px; border-bottom: 1px solid var(--line); }
.stat-card { display: block; padding: 8px 26px 24px; border-left: 1px solid var(--line); transition: background .25s; }
.stat-card:first-child { border-left: none; padding-left: 0; }
.stat-card:hover { background: var(--surface); }
.stat-card__value {
  font-family: var(--display);
  font-size: clamp(26px, 3.2vw, 40px); font-weight: 700; letter-spacing: .01em; line-height: 1.05;
  font-variant-numeric: tabular-nums;
}
.stat-card__value::after { content: ""; }
.stat-card__value-blue { color: var(--blue); }
.stat-card__value-amber { color: var(--amber); }
.stat-card__value-orange { color: var(--orange); }
.stat-card__value-red { color: var(--red); }
.stat-card__value-green { color: var(--green); }
.stat-card__label {
  font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); margin-top: 12px; display: block;
  font-family: var(--mono);
}
.stat-card__label::before { content: ""; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .5; margin-right: 7px; transform: translateY(-1px); }
.stat-card__sub { font-size: 11px; color: var(--text-mute); margin-top: 5px; display: block; font-family: var(--mono); letter-spacing: .03em; }

.task-row {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 10px 11px 14px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s, padding-left .25s var(--ease);
}
.task-row:last-child { border-bottom: none; }
.task-row:hover { background: var(--surface); padding-left: 18px; }
.task-row::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: transparent;
}
.task-row:hover::before { background: var(--accent); }
.task-row__prio { display: none; }
.prio-critical { --pr: var(--red); }
.prio-high { --pr: var(--orange); }
.prio-medium { --pr: var(--amber); }
.task-row__main { flex: 1; min-width: 0; border-left: 3px solid var(--pr); padding-left: 12px; }
.task-row__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-row__sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; flex-wrap: wrap; }
.task-row__meta { display: flex; align-items: center; gap: 9px; }
.task-row__project { font-size: 9.5px; color: var(--text-mute); font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.deadline-row {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  counter-increment: deadlines;
  transition: background .2s;
}
.deadline-row:last-child { border-bottom: none; }
.deadline-row:hover { background: var(--surface); }
.deadline-row::before {
  content: counter(deadlines, decimal-leading-zero);
  font-family: var(--display); font-weight: 700;
  font-size: 18px; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.2px var(--line-2);
  width: 32px; flex-shrink: 0;
  transition: -webkit-text-stroke-color .25s, color .25s;
}
.deadline-row:hover::before { color: var(--accent); -webkit-text-stroke-color: var(--accent); }
.panel__body { counter-reset: deadlines; }
.deadline-row__title { font-size: 13px; font-weight: 600; }
.deadline-row__sub { font-size: 10px; color: var(--text-mute); margin-top: 1px; font-family: var(--mono); letter-spacing: .04em; }
.deadline-row__right { display: flex; align-items: center; gap: 9px; }

.progress-row { display: block; padding: 11px 10px; border-bottom: 1px solid var(--line); transition: background .2s; }
.progress-row:last-child { border-bottom: none; }
.progress-row:hover { background: var(--surface); }
.progress-row__head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.progress-row__pct { color: var(--text-dim); font-weight: 700; font-family: var(--mono); font-size: 10px; }
.progress-row__sub { font-size: 10px; color: var(--text-mute); margin-top: 5px; font-family: var(--mono); letter-spacing: .04em; }

.bar { height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar-lg { height: 4px; }
.bar__fill { height: 100%; background: var(--accent); border-radius: 999px; transition: width .6s var(--ease); }

.progress-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px 14px; margin-top: 16px; }
.progress-stat { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.progress-stat b { margin-left: auto; font-weight: 700; color: var(--ink); font-family: var(--mono); font-size: 10px; }

.big-pct { font-family: var(--display); font-size: 34px; font-weight: 700; margin-bottom: 8px; letter-spacing: .01em; }

.feed { display: flex; flex-direction: column; }
.feed-lg { gap: 0; }
.feed-item { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.feed-item:last-child { border-bottom: none; }
.feed-item__main { min-width: 0; }
.feed-item__text { font-size: 12.5px; color: var(--text-dim); }
.feed-item__text b { font-weight: 700; color: var(--ink); }
.feed-item__time { font-size: 9.5px; color: var(--text-mute); margin-top: 2px; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }

.avatar {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  flex-shrink: 0;
  background: var(--accent-dim) !important;
  color: var(--accent) !important;
  border: 1px solid rgba(201, 86, 42, .3);
  user-select: none;
}

.tag-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .05em;
  border-radius: var(--r-sm);
  padding: 1px 8px;
  font-family: var(--mono);
  transition: border-color .2s, color .2s;
}
.tag-chip:hover { border-color: var(--accent); color: var(--accent); }
.tag-chip__x {
  display: inline-flex; align-items: center;
  background: none; border: none; color: var(--text-mute);
  cursor: pointer; padding: 0;
}
.tag-chip__x:hover { color: var(--red); }

.tags-edit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tags-edit .input { width: 170px; }

.empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; color: var(--text-mute); gap: 12px; }
.empty__icon { opacity: .45; }
.empty__text { font-size: 11.5px; letter-spacing: .04em; font-family: var(--mono); }
.empty__text::before { content: "// "; color: var(--accent); }
.empty--sm { padding: 20px; text-align: center; color: var(--text-mute); font-size: 11px; font-family: var(--mono); }

.loading { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: var(--overlay); z-index: 500; }
.loading::after {
  content: ""; width: 24px; height: 24px;
  border: 2px solid var(--line-2); border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.proj-group { margin-bottom: 32px; }
.proj-group__label {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .2em;
  color: var(--text-mute); margin-bottom: 16px;
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono);
}
.proj-group__label::before { content: "//"; color: var(--accent); }
.proj-group__label::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 16px; }

.proj-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  color: var(--ink);
  box-shadow: var(--shadow-1);
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.proj-card:hover { border-color: rgba(201, 86, 42, .4); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.proj-card__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.proj-card__name { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.proj-card__desc { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; min-height: 36px; line-height: 1.55; }
.proj-card__stats { display: flex; gap: 14px; margin-top: 12px; font-size: 10px; color: var(--text-dim); align-items: center; font-weight: 600; font-family: var(--mono); letter-spacing: .04em; }
.proj-card__stats span { display: inline-flex; align-items: center; gap: 5px; }
.proj-card__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; }

.proj-cover {
  width: 42px; height: 42px;
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 12px; font-weight: 700;
  border: 1px solid rgba(201, 86, 42, .3);
}
.proj-cover-default { background: var(--accent-dim); color: var(--accent); }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-swatch {
  width: 28px; height: 28px;
  border-radius: var(--r-xs);
  border: 2px solid transparent;
  cursor: pointer;
  outline: none;
  transition: transform .15s var(--ease), border-color .15s;
}
.color-swatch:hover { transform: scale(1.12); }
.color-swatch.active { border-color: var(--ink); }
.color-swatch-none { background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text-mute); font-size: 14px; }

.prio-flag { display: inline-flex; }

.proj-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.proj-detail-title-row { display: flex; gap: 16px; align-items: center; margin-top: 12px; }
.proj-detail-badges { display: flex; gap: 7px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.proj-detail-head__actions { display: flex; gap: 8px; padding-top: 26px; }

.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs-lg .tab-btn { font-size: 11px; }
.tab-btn {
  position: relative;
  background: none; border: none;
  color: var(--text-mute);
  font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 9px 0 11px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono);
  transition: color .2s;
}
.tab-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .3s var(--ease);
}
.tab-btn:hover { color: var(--text-dim); }
.tab-btn-active { color: var(--accent) !important; }
.tab-btn-active::after { transform: scaleX(1); }
.tab-count {
  font-size: 9px; font-weight: 700;
  background: var(--surface-2);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0 7px;
  line-height: 16px;
  font-family: var(--mono);
}
.tab-btn-active .tab-count { background: var(--accent-dim); color: var(--accent); }

.desc-view { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--text-dim); }

.team-avatars { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.member-list { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.member-row:last-child { border-bottom: none; }
.member-row:hover { background: var(--surface); }
.member-row__main { flex: 1; }
.member-row__name { font-size: 13px; font-weight: 600; }
.member-row__role { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); font-family: var(--mono); }

.danger-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.danger-row__title { font-size: 13.5px; font-weight: 700; }
.danger-row__sub { font-size: 12px; color: var(--text-mute); margin-top: 2px; }

.board { display: grid; grid-template-columns: repeat(6, minmax(236px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.board__col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  display: flex; flex-direction: column;
  max-height: calc(100vh - 210px);
  box-shadow: var(--shadow-1);
}
.board__col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 13px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--text-dim);
  font-family: var(--mono);
}
.board__col-count { margin-left: auto; font-family: var(--mono); font-size: 9px; color: var(--text-mute); }
.board__add { margin-left: 2px; opacity: 0; transition: opacity .15s; }
.board__col-head:hover .board__add { opacity: 1; }
.board__col-body { flex: 1; padding: 6px 8px 10px; display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 130px; }
.board__col-body-over { outline: 2px dashed var(--accent); outline-offset: -2px; border-radius: var(--r-xs); }
.board__drop-hint {
  border: 1px dashed var(--line-2);
  border-radius: var(--r-xs);
  color: var(--text-mute);
  font-size: 10px;
  text-align: center;
  padding: 20px 8px;
  font-family: var(--mono);
}

.board__col-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-backlog { background: var(--line-2); }
.dot-todo { background: var(--blue); }
.dot-in_progress { background: var(--amber); }
.dot-review { background: var(--violet); }
.dot-testing { background: var(--cyan); }
.dot-done { background: var(--green); }

.k-card {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 10px 8px 10px 12px;
  cursor: pointer;
  position: relative;
  transition: background .15s, transform .2s var(--ease);
}
.k-card:hover { background: var(--surface-2); transform: translateY(-1px); }
.k-card-dragging { opacity: .35; }
.k-card__prio { position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: transparent; }
.k-card__title { font-size: 12.5px; font-weight: 600; padding-left: 4px; line-height: 1.4; }
.k-card__desc { font-size: 11px; color: var(--text-mute); margin-top: 3px; padding-left: 4px; }
.k-card__meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; padding-left: 4px; }
.k-card__tags { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.k-card__right { display: flex; align-items: center; gap: 5px; }
.k-card__id { font-size: 9px; color: var(--text-mute); font-family: var(--mono); font-weight: 700; letter-spacing: .04em; }

.board-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }

.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filters .input { width: auto; }

.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(236px, 1fr)); gap: 16px; }
.team-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 22px;
  box-shadow: var(--shadow-1);
  cursor: pointer;
  transition: transform .3s var(--ease), border-color .3s, box-shadow .3s;
}
.team-card:hover { border-color: rgba(201, 86, 42, .4); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.team-card__head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.team-card__status-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.status-active { background: var(--green); animation: pulse 2.4s var(--ease) infinite; }
.status-vacation { background: var(--amber); }
.status-off { background: var(--red); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.team-card__name { font-size: 15px; font-weight: 700; }
.team-card__username { font-size: 11px; color: var(--text-mute); font-family: var(--mono); }
.team-card__role {
  font-size: 9px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-top: 6px;
  font-family: var(--mono);
}
.team-card__workload { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; min-height: 24px; }
.team-card__stats { display: flex; gap: 22px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.team-card__stat { display: flex; flex-direction: column; }
.team-card__stat b { font-family: var(--display); font-size: 17px; font-weight: 700; letter-spacing: .01em; }
.team-card__stat span { font-size: 8.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); margin-top: 3px; font-family: var(--mono); }
.team-card__foot { margin-top: 12px; font-size: 10px; font-family: var(--mono); letter-spacing: .04em; }

.profile-head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.profile-name { font-size: 16px; font-weight: 700; }
.profile-name .muted { font-size: 12px; font-family: var(--mono); }
.profile-meta { display: flex; gap: 9px; align-items: center; margin-top: 5px; flex-wrap: wrap; font-size: 12px; }
.profile-bio { color: var(--text-dim); font-size: 13.5px; margin-bottom: 14px; line-height: 1.65; }
.profile-stats { display: flex; gap: 30px; margin-bottom: 16px; }
.profile-stat { display: flex; flex-direction: column; }
.profile-stat b { font-family: var(--display); font-size: 21px; font-weight: 700; }
.profile-stat span { font-size: 9px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); margin-top: 4px; font-family: var(--mono); }
.profile-projects { display: flex; flex-direction: column; gap: 6px; }
.profile-project { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 6px 0; border-bottom: 1px solid var(--line); transition: background .2s; }
.profile-project:hover { background: var(--surface); }

.profile-actions { margin-bottom: 6px; }
.profile-tasks { display: flex; flex-direction: column; }
.profile-task {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
  transition: background .2s;
}
.profile-task:hover { background: var(--surface); }
.profile-task__main { flex: 1; min-width: 0; }
.profile-task__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.profile-task__sub { font-size: 10px; color: var(--text-mute); margin-top: 1px; font-family: var(--mono); letter-spacing: .04em; }

.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
  color: var(--text-mute);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-2);
  font-family: var(--mono);
}
.table td { padding: 12px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-user { display: flex; align-items: center; gap: 10px; }

#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  color: var(--ink);
  border-radius: var(--r);
  padding: 12px 18px;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: var(--shadow-2);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  max-width: 440px;
}
.toast-show { opacity: 1; transform: translateY(0); }
.toast-error { border-left-color: var(--red); }
.toast-info { border-left-color: var(--accent); }

.modal-overlay, .drawer-overlay {
  position: fixed; inset: 0;
  background: var(--overlay-strong);
  z-index: 700;
  display: flex;
  animation: fadeIn .2s var(--ease);
}
.modal-overlay { align-items: flex-start; justify-content: center; padding: 8vh 20px 20px; overflow-y: auto; }
@keyframes fadeIn { from { opacity: 0; } }

.modal {
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  width: 480px;
  max-width: 100%;
  box-shadow: var(--shadow-2);
}
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal__title {
  font-family: var(--mono);
  font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.modal__title::before { content: "//"; color: var(--accent); }
.modal__body { padding: 20px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 9px; padding: 0 20px 18px; }
.modal__text { font-size: 13px; color: var(--text-dim); line-height: 1.65; }

.drawer-overlay { justify-content: flex-end; }
.drawer {
  background: var(--bg);
  border-left: 1px solid var(--line-2);
  width: 560px;
  max-width: 100vw;
  height: 100%;
  display: flex; flex-direction: column;
  transform: translateX(30px);
  opacity: 0;
  transition: transform .25s var(--ease), opacity .25s var(--ease);
}
.drawer-overlay.open .drawer { transform: translateX(0); opacity: 1; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer__title { font-size: 13px; font-weight: 700; min-width: 0; }
.drawer__body { flex: 1; overflow-y: auto; }
.drawer__foot { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }

.drawer-body-scroll { padding: 16px 20px 26px; }
.drawer-task-title { display: flex; align-items: center; gap: 9px; }
.task-id { font-family: var(--mono); font-size: 9.5px; color: var(--accent); background: var(--accent-dim); padding: 3px 9px; border-radius: var(--r-sm); font-weight: 700; letter-spacing: .06em; }

.drow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.drow__label {
  width: 130px; font-size: 9px; color: var(--text-mute); flex-shrink: 0; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  font-family: var(--mono);
}
.drow__value { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 27px; }
.drow__value .author { display: inline-flex; align-items: center; gap: 7px; }

.task-drawer-meta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; margin-bottom: 8px; }

.comments { display: flex; flex-direction: column; }
.comment { padding: 13px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: none; }
.comment__head { display: flex; align-items: center; gap: 9px; }
.comment__meta { display: flex; align-items: baseline; gap: 9px; flex: 1; }
.comment__author { font-size: 12.5px; font-weight: 700; }
.comment__time { font-size: 9.5px; color: var(--text-mute); font-family: var(--mono); letter-spacing: .06em; }
.comment__body { font-size: 13px; margin-top: 7px; padding-left: 36px; white-space: pre-wrap; word-break: break-word; color: var(--text-dim); }

.comment-form { margin-top: 14px; }
.comment-form__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

.history { display: flex; flex-direction: column; }
.history-item { display: flex; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; align-items: baseline; }
.history-item:last-child { border-bottom: none; }
.history-item__time { font-family: var(--mono); font-size: 9.5px; color: var(--text-mute); flex-shrink: 0; letter-spacing: .04em; }
.history-item__text { color: var(--text-dim); }
.diff { color: var(--text-mute); }
.diff-new { color: var(--ink); font-weight: 600; }

.drawer-tabs { margin-top: 20px; }

.dropdown {
  position: fixed; z-index: 800;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  padding: 4px;
  min-width: 190px;
}
.dropdown__item {
  display: flex; align-items: center; gap: 9px;
  width: 100%;
  background: none; border: none;
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--r-xs);
  cursor: pointer;
  text-align: left;
  font-family: var(--mono);
  transition: background .12s;
}
.dropdown__item:hover { background: var(--accent-dim); }
.dropdown__item-danger { color: var(--red); }
.dropdown__item-danger:hover { background: var(--red-tint); }
.dropdown__sep { height: 1px; background: var(--line); margin: 4px 6px; }

.notif-wrap { position: relative; }
.notif-btn { position: relative; }
.notif-badge {
  position: absolute; top: -3px; right: -3px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 9px; font-weight: 700;
  border-radius: 999px;
  min-width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0 4px;
  box-shadow: 0 0 0 2px var(--bg);
  font-family: var(--mono);
}
.notif-pop {
  position: absolute; top: 40px; right: 0;
  width: 380px; max-width: calc(100vw - 40px);
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  z-index: 600;
}
.notif-pop__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--text-dim); font-family: var(--mono); }
.notif-pop__body { max-height: 420px; overflow-y: auto; padding: 5px; }
.notif-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; border-radius: var(--r-sm);
  color: var(--text-dim);
  padding: 10px 10px;
  font-size: 12px;
  cursor: pointer;
  transition: background .12s;
}
.notif-item:hover { background: var(--surface-2); }
.notif-item-unread { background: var(--accent-dim); color: var(--ink); }
.notif-item-unread::before { content: "●"; color: var(--accent); font-size: 8px; margin-right: 7px; vertical-align: 1px; }
.notif-item__time { font-size: 9.5px; color: var(--text-mute); margin-top: 2px; font-family: var(--mono); letter-spacing: .05em; }

.palette-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: var(--overlay-strong);
  display: flex; justify-content: center; align-items: flex-start;
  padding: 14vh 20px 20px;
  animation: fadeIn .15s var(--ease);
}
.palette {
  width: 560px; max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-2);
  overflow: hidden;
}
.palette__input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--text-mute);
}
.palette__input {
  flex: 1;
  background: none; border: none; outline: none;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--mono);
}
.palette__input::placeholder { color: var(--text-mute); }
.palette__types { display: flex; gap: 6px; padding: 10px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.palette__results { max-height: 400px; overflow-y: auto; padding: 6px; }
.palette__hint { text-align: center; color: var(--text-mute); font-size: 12px; padding: 24px; font-family: var(--mono); }
.palette__group-title { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .16em; color: var(--text-mute); padding: 10px 10px 6px; font-family: var(--mono); }
.palette__group-count { color: var(--text-mute); font-size: 8.5px; }
.palette__item {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  background: none; border: none;
  color: var(--ink);
  font-size: 12.5px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  text-align: left;
  transition: background .1s;
}
.palette__item:hover, .palette__item-active { background: var(--accent-dim); }
.palette__item-icon { color: var(--text-mute); display: flex; }
.palette__item-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__item-sub { font-size: 10px; color: var(--text-mute); flex-shrink: 0; font-family: var(--mono); letter-spacing: .05em; }
.palette__item-title { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.palette__item-snippet { display: block; font-size: 10.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--mono); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text-dim);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 6px 14px;
  cursor: pointer;
  transition: color .2s, border-color .2s, transform .2s var(--ease);
  font-family: var(--mono);
}
.chip:hover { border-color: rgba(201, 86, 42, .5); color: var(--accent); transform: translateY(-1px); }
.chip-active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip-active:hover { color: var(--accent-ink); }
.chip-sm { padding: 3px 10px; font-size: 9px; }

.mention-list {
  position: fixed; z-index: 950;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  box-shadow: var(--shadow-2);
  padding: 4px;
  min-width: 210px;
  max-height: 240px;
  overflow-y: auto;
}
.mention-item {
  display: flex; align-items: center; gap: 8px;
  width: 100%;
  background: none; border: none;
  color: var(--ink);
  font-size: 12px;
  padding: 7px 8px;
  border-radius: var(--r-xs);
  cursor: pointer;
  text-align: left;
  font-family: var(--mono);
  transition: background .1s;
}
.mention-item:hover, .mention-item-active { background: var(--accent-dim); }
.mention-item__name { font-weight: 700; }
.mention-item__user { color: var(--text-mute); font-size: 10px; margin-left: auto; }

.panel__body-nopad { padding: 0; }
.bug-row { display: flex; align-items: center; gap: 10px; padding: 12px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; }
.bug-row:last-child { border-bottom: none; }
.bug-row:hover { background: var(--surface); }
.bug-row__sev {
  font-size: 8.5px; font-weight: 700; letter-spacing: .08em;
  padding: 3px 9px; border-radius: var(--r-sm);
  font-family: var(--mono);
  border: 1px solid transparent;
}
.sev-critical { background: var(--red-tint); color: var(--red); border-color: var(--red-line); }
.sev-high { background: var(--orange-tint); color: var(--orange); border-color: var(--orange-line); }
.sev-medium { background: var(--amber-tint); color: var(--amber); border-color: var(--amber-line); }
.sev-low { background: var(--blue-tint); color: var(--blue); border-color: var(--blue-line); }
.bug-row__main { flex: 1; min-width: 0; }
.bug-row__title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bug-row__sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.bug-row__id { font-family: var(--mono); font-size: 9.5px; color: var(--accent); font-weight: 700; letter-spacing: .05em; }
.bug-row__version { font-size: 9.5px; color: var(--text-mute); font-family: var(--mono); }
.bug-row__project { font-size: 10px; color: var(--text-mute); flex-shrink: 0; font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase; }

.bug-sev-strip {
  display: flex; flex-direction: column; gap: 3px;
  border: 1px solid; border-radius: var(--r);
  padding: 11px 15px; margin-bottom: 14px; font-size: 12px;
}
.bug-sev-strip b { font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.bug-sev-strip span { opacity: .8; font-size: 11.5px; }
.bug-sev-strip.sev-critical { border-color: var(--red-line); background: var(--red-tint); color: var(--red); }
.bug-sev-strip.sev-high { border-color: var(--orange-line); background: var(--orange-tint); color: var(--orange); }
.bug-sev-strip.sev-medium { border-color: var(--amber-line); background: var(--amber-tint); color: var(--amber); }
.bug-sev-strip.sev-low { border-color: var(--line); background: var(--surface); color: var(--text-dim); }

.bug-sections { margin-top: 4px; }

.file-layout { display: grid; grid-template-columns: 340px 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .file-layout { grid-template-columns: 1fr; } }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  border: 1.5px dashed var(--line-2);
  border-radius: var(--r);
  padding: 30px 16px;
  cursor: pointer;
  text-align: center;
  transition: border-color .25s, background .25s;
  color: var(--text-dim);
}
.dropzone:hover, .dropzone-over { border-color: var(--accent); background: var(--accent-dim); }
.dropzone-uploading { opacity: .5; pointer-events: none; }
.dropzone__icon { color: var(--accent); }
.dropzone__text { font-size: 12.5px; font-weight: 700; font-family: var(--mono); letter-spacing: .06em; text-transform: uppercase; }
.dropzone__sub { font-size: 10px; color: var(--text-mute); font-family: var(--mono); }
.dropzone-sm {
  flex-direction: row; gap: 9px; padding: 11px 15px; margin-top: 12px;
  border-radius: var(--r-sm); font-size: 12px;
}
.dropzone-sm span { font-size: 11px; }

.file-expl-row { display: flex; align-items: center; gap: 13px; padding: 12px 6px; border-bottom: 1px solid var(--line); transition: background .15s; }
.file-expl-row:hover { background: var(--surface); }
.file-expl-row__icon { color: var(--accent); display: flex; }
.file-expl-row__main { flex: 1; min-width: 0; }
.file-expl-row__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-expl-row__sub { font-size: 10px; color: var(--text-mute); font-family: var(--mono); letter-spacing: .04em; }
.file-expl-row__size { font-size: 10px; color: var(--text-mute); font-family: var(--mono); flex-shrink: 0; }
.file-expl-row__actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.file-expl-row:hover .file-expl-row__actions { opacity: 1; }

.att-files { display: flex; flex-direction: column; gap: 4px; }
.att-files-lg { margin-top: 10px; }
.att-file { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: var(--r-sm); transition: background .15s; }
.att-file:hover { background: var(--surface-2); }
.att-file__name { flex: 1; min-width: 0; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.att-file__size { font-size: 10px; color: var(--text-mute); font-family: var(--mono); }

.preview-box { display: flex; align-items: center; justify-content: center; background: var(--bg-alt); border-radius: var(--r); min-height: 200px; overflow: hidden; }
.preview-img { max-width: 100%; max-height: 60vh; border-radius: var(--r-sm); }
.preview-video { max-width: 100%; max-height: 60vh; }
.preview-audio { width: 100%; }
.preview-frame { width: 100%; height: 60vh; border: none; background: #fff; border-radius: var(--r-sm); }
.preview-meta { display: flex; align-items: center; gap: 14px; margin-top: 14px; font-size: 11px; color: var(--text-mute); font-family: var(--mono); }
.preview-meta .btn { margin-left: auto; }

#login-root { min-height: 100vh; display: flex; }
.login {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px;
  overflow: hidden;
}
.login::before {
  content: ""; position: absolute; top: -25vh; left: 50%; transform: translateX(-50%);
  width: 92vw; height: 70vh; pointer-events: none;
  background: radial-gradient(ellipse 50% 60% at 50% 40%, var(--accent-dim), transparent 70%);
  filter: blur(16px);
}
.login::after {
  content: "OPS"; position: absolute; right: -1vw; bottom: -8vh; z-index: 0; pointer-events: none; user-select: none;
  font-family: var(--display); font-weight: 700; line-height: 1;
  font-size: clamp(160px, 30vw, 420px); letter-spacing: -.02em;
  color: transparent; -webkit-text-stroke: 1.5px var(--ghost-stroke);
}
.login__card {
  position: relative; z-index: 1;
  width: 400px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: var(--r-xl);
  padding: 38px;
  box-shadow: var(--shadow-2);
}
.login__logo {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid rgba(201, 86, 42, .35);
  border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-weight: 700; font-size: 12px; letter-spacing: .06em;
  color: var(--accent);
  margin-bottom: 20px;
}
.login__title { font-family: var(--display); font-size: 15px; font-weight: 700; letter-spacing: .18em; color: var(--ink); }
.login__title::after { content: "."; color: var(--accent); }
.login__sub { color: var(--text-dim); font-size: 12px; margin: 8px 0 26px; font-family: var(--mono); letter-spacing: .05em; }

.theme-toggle {
  position: relative;
  width: 32px; height: 32px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-dim);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: border-color .2s, color .2s, transform .2s var(--ease), background .2s;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.theme-toggle svg { position: absolute; transition: opacity .25s var(--ease), transform .35s var(--ease); }
.theme-toggle .ic-sun { opacity: 0; transform: rotate(-90deg) scale(.6); }
.theme-toggle .ic-moon { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-toggle .ic-sun { opacity: 1; transform: rotate(0) scale(1); }
html[data-theme="light"] .theme-toggle .ic-moon { opacity: 0; transform: rotate(90deg) scale(.6); }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:nth-child(3) { border-left: none; padding-left: 0; }
  .dash-grid, .overview-grid { grid-template-columns: 1fr; }
  .overview-grid .panel { border-left: none !important; padding-left: 0; }
}
@media (max-width: 760px) {
  #app-root { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .topbar__kicker, .topbar__clock { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
