@font-face {
  font-family: Manrope;
  src: url("/assets/Manrope-VariableFont_wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
:root {
  color-scheme: dark;
  --bg: #141518;
  --surface: #1b1d22;
  --raised: #23252c;
  --line: #393b43;
  --text: #f2efea;
  --muted: #bbb9c1;
  --accent: #eca777;
  --strong: #111214;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --tabs: 0px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 18px/1.55 Manrope, -apple-system, system-ui, sans-serif;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; font-weight: 500; line-height: 1.15; }
h2 { font-size: 21px; font-weight: 600; line-height: 1.3; }
small, .muted { color: var(--muted); font-size: 14px; }
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 30;
  padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--line);
  background: rgba(20,21,24,.94);
  backdrop-filter: blur(12px);
}
.brand, .identity, .actions, .screen-head { display: flex; align-items: center; gap: 14px; }
.brand { min-width: 0; }
.brand img { border-radius: 14px; flex: none; }
.brand b, .brand span { display: block; }
.brand b { font-size: 17px; font-weight: 600; letter-spacing: .1em; }
.brand span { color: var(--muted); font-size: 13px; line-height: 1.3; }
.identity { margin-left: auto; font-size: 14px; gap: 8px; }
.login { width: min(100%, 560px); margin: 48px auto; padding: 0 16px; }
.login-card { display: grid; gap: 18px; }
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.feedback {
  position: fixed;
  top: 84px;
  left: 50%;
  z-index: 50;
  max-width: calc(100vw - 32px);
  width: max-content;
  transform: translateX(-50%);
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  font-size: 14px;
  pointer-events: none;
  overflow-wrap: anywhere;
}
.feedback.error { border-color: #e58b79; }
.workspace { display: grid; grid-template-columns: 196px minmax(0, 1fr); min-height: calc(100vh - 75px); }
.navigation {
  position: sticky;
  top: 75px;
  align-self: start;
  display: grid;
  padding: 16px 10px;
  gap: 6px;
}
.navigation button {
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: none;
  color: var(--muted);
  font-size: 16px;
  text-align: left;
}
.navigation button[aria-current="page"] {
  color: var(--accent);
  background: var(--surface);
  border-color: var(--line);
  font-weight: 600;
}
.icon { width: 24px; height: 24px; text-align: center; font-size: 21px; line-height: 24px; }
.content {
  min-width: 0;
  padding: 24px max(65px, env(safe-area-inset-right)) 40px 24px;
  border-left: 1px solid var(--line);
}
.content:focus { outline: none; }
.screen-head { justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; }
.stack { display: grid; align-content: start; gap: 12px; }
.readable { max-width: 760px; }
.actions { flex-wrap: wrap; }
label { display: grid; gap: 6px; font-size: 16px; color: var(--muted); }
input, textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: var(--bg);
}
textarea { min-height: 88px; resize: vertical; }
.primary, .secondary {
  min-height: 52px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.2;
}
.primary { background: linear-gradient(160deg, #edac83, #c98056); border-color: transparent; color: var(--strong); }
.secondary { background: var(--raised); color: var(--text); }
.compact { min-height: 42px; padding: 6px 9px; font-size: 14px; }
#refresh span { margin-left: 5px; }
.entry {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: left;
  color: var(--text);
  overflow-wrap: anywhere;
}
button.entry:hover, button.entry:focus-visible { border-color: var(--accent); }
.entry strong { font-size: 16.5px; font-weight: 600; line-height: 1.25; }
.entry p { white-space: pre-wrap; font-size: 16px; }
.entry.outbound { border-left: 3px solid var(--accent); background: var(--raised); }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; }
.accent { color: var(--accent); }
.lane-scroll { overflow-x: auto; padding: 4px 4px 12px; margin: -4px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(195px,1fr); gap: 10px; }
.stage { padding: 12px; border: 1px solid var(--line); border-radius: 18px; background: #17181c; }
.stage h2 { display: flex; gap: 8px; justify-content: space-between; font-size: 16px; }
.stage .entry { width: 100%; }
.counter { color: var(--accent); font-variant-numeric: tabular-nums; }
.shade { position: fixed; inset: 0; z-index: 46; background: rgba(8,8,10,.55); }
.drawer {
  position: fixed;
  z-index: 47;
  top: 84px;
  right: 0;
  bottom: calc(var(--tabs) + 16px + env(safe-area-inset-bottom));
  width: min(84vw, 400px);
  transform: translateX(100%);
  border: 1px solid #a17256;
  border-right: 0;
  border-radius: 22px 0 0 22px;
  background: rgba(19,20,24,.98);
  transition: transform .36s var(--ease), box-shadow .36s;
}
.drawer.open { transform: translateX(0); box-shadow: -22px 0 46px rgba(0,0,0,.6); }
.drawer-body { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 20px 18px; }
.drawer-tab {
  position: absolute;
  top: 50%;
  left: -47px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 47px;
  min-height: 150px;
  padding: 14px 0;
  border: 0;
  border-radius: 18px 0 0 18px;
  color: var(--strong);
  background: linear-gradient(165deg,#e8a377,#b9663c);
  box-shadow: -8px 0 20px rgba(0,0,0,.45);
}
#attention-count {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 15.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.arrow { width: 24px; height: 24px; font-size: 26px; line-height: 22px; transition: transform .36s var(--ease); }
.drawer.open .arrow { transform: rotate(180deg); }
#attention-list { display: grid; gap: 8px; margin-top: 16px; }
#attention-list .entry { grid-template-columns: 1fr auto; }
@media (min-width: 1500px) {
  .board { grid-auto-columns: minmax(128px,1fr); }
}
@media (max-width: 767px) {
  :root { --tabs: 86px; }
  body { font-size: 16px; line-height: 1.5; }
  .identity { gap: 5px; }
  #operator-name, #refresh span { display: none; }
  .workspace { display: block; }
  .content {
    width: min(100%, 560px);
    margin: 0 auto;
    border: 0;
    padding: 20px max(56px, env(safe-area-inset-right)) calc(var(--tabs) + 30px + env(safe-area-inset-bottom)) 16px;
  }
  .card { padding: 16px 12px; }
  .navigation {
    position: fixed;
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    gap: 0;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--bg);
    justify-content: center;
  }
  .navigation button {
    flex: 1 1 0;
    max-width: 132px;
    flex-direction: column;
    gap: 5px;
    padding: 6px 2px;
    font-size: 11.5px;
    line-height: 1.15;
  }
  .navigation button[aria-current="page"] { background: none; border-color: transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .drawer, .arrow { transition: none; }
}
