@charset "UTF-8";

:root {
  color-scheme: dark;
  --bg: #0b0d12;
  --bg-elev: #12151c;
  --ink: #f3eee6;
  --muted: #9a948a;
  --faint: #6f6a63;
  --line: rgba(212, 176, 122, 0.18);
  --line-soft: rgba(255, 255, 255, 0.08);
  --glass: rgba(18, 21, 28, 0.72);
  --glass-card: rgba(255, 255, 255, 0.045);
  --glass-card-hover: rgba(255, 255, 255, 0.07);
  --accent: #d4b07a;
  --accent-strong: #e8c892;
  --accent-dim: rgba(212, 176, 122, 0.14);
  --green: #3dcc7a;
  --red: #ff4d4d;
  --yellow: #e6b84d;
  --gray: #8a9099;
  --neutral: #9d99a3;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.28), 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --sidebar: 360px;
  --header: 64px;
  --radius: 16px;
  --ease: 180ms ease;
  font-family: "Noto Sans CJK SC", "Noto Sans SC", "Source Han Sans SC", system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html, body { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 100% -10%, rgba(212, 176, 122, 0.08), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 100%, rgba(61, 204, 122, 0.04), transparent 45%),
    var(--bg);
}
button, input, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; border-radius: 10px; }
button:disabled { cursor: wait; opacity: 0.6; }
button, a, input, textarea, summary { -webkit-tap-highlight-color: transparent; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
h1, h2, h3, p { margin: 0; }
h1, h2, .group-sign h3, .desk-name, .bot-title h2, .login-dialog h2 {
  font-family: "LXGW WenKai", "霞鹜文楷", "Noto Sans CJK SC", serif;
  font-weight: 600;
}
a { color: var(--accent-strong); text-underline-offset: 3px; }
::selection { background: rgba(212, 176, 122, 0.28); color: var(--ink); }
[hidden] { display: none !important; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.small { font-size: 11px; line-height: 1.7; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--accent);
  text-transform: none;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 99;
  background: var(--bg-elev);
  padding: 12px 16px;
  border: 1px solid var(--line);
}
.skip-link:focus { top: 10px; }

/* ----- header ----- */
.topbar {
  min-height: var(--header);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 24px;
  background: rgba(11, 13, 18, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}
.brand { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 50% 42%, var(--green) 0 5px, transparent 6px),
    linear-gradient(160deg, rgba(212, 176, 122, 0.3), rgba(18, 21, 28, 0.4));
  box-shadow: 0 0 0 1px rgba(212, 176, 122, 0.08), 0 8px 20px rgba(0, 0, 0, 0.25);
}
.brand h1 {
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 1.15;
  color: var(--ink);
}
.brand p { font-size: 11px; margin-top: 4px; color: var(--muted); }
.top-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.snapshot {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}
.snapshot time { color: var(--ink); font-variant-numeric: tabular-nums; }
.snapshot > span {
  border: 1px solid var(--line);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.06em;
}
.summary { display: flex; align-items: center; gap: 20px; }
.summary-item {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
}
.summary-item strong {
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
  margin-left: 2px;
  font-variant-numeric: tabular-nums;
}
.dot {
  display: inline-block;
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}
.dot.green { background: var(--green); box-shadow: 0 0 8px rgba(61, 204, 122, 0.55); }
.dot.red { background: var(--red); box-shadow: 0 0 10px rgba(255, 77, 77, 0.75); }
.dot.yellow { background: var(--yellow); box-shadow: 0 0 8px rgba(230, 184, 77, 0.45); }
.dot.gray { background: var(--gray); }
.dot.neutral { background: var(--neutral); }
.mobile-task { display: none; }

/* ----- sidebar ----- */
.task-panel {
  position: fixed;
  top: var(--header);
  bottom: 0;
  left: 0;
  width: var(--sidebar);
  z-index: 15;
  display: flex;
  flex-direction: column;
  background: var(--glass);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border-right: 1px solid var(--line);
  box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
}
.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 20px 8px;
}
.panel-heading h2 {
  font-size: 20px;
  margin-top: 6px;
  letter-spacing: 0.04em;
}
.panel-auth {
  display: flex;
  justify-content: flex-end;
  padding: 0 20px 8px;
}
.text-button {
  color: var(--accent);
  font-size: 11px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  border-radius: 0;
  transition: border-color var(--ease), color var(--ease);
}
.text-button:hover { border-bottom-color: var(--accent); }
.panel-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin: 4px 16px 0;
  padding: 4px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-soft);
}
.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 34px;
  font-size: 11px;
  color: var(--muted);
  border-radius: 9px;
  transition: background var(--ease), color var(--ease);
}
.tab .count {
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  min-width: 14px;
  text-align: center;
  color: var(--faint);
}
.tab.active {
  background: var(--accent-dim);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px var(--line);
}
.tab.active .count { color: var(--accent-strong); }
.tab-panels {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 16px 24px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 176, 122, 0.3) transparent;
}
.tab-panel {
  background: var(--glass-card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
}
.required { color: #ff8a80; }
.optional { font-weight: 400; font-size: 10px; color: var(--faint); margin-left: 4px; }
label { display: block; font-size: 11px; font-weight: 600; margin: 12px 0 6px; color: var(--muted); }
input:not([type="file"]), textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 9px 11px;
  line-height: 1.5;
  background: rgba(0, 0, 0, 0.28);
  color: var(--ink);
  transition: border-color var(--ease), background var(--ease);
}
input:hover, textarea:hover { border-color: var(--line); }
input:focus, textarea:focus { border-color: var(--accent); background: rgba(0, 0, 0, 0.4); }
input::placeholder, textarea::placeholder { color: #6a655e; }
textarea { resize: vertical; min-height: 88px; }
input[type="datetime-local"] { min-height: 40px; color-scheme: dark; }
.file-label {
  border: 1px dashed var(--line);
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
  transition: border-color var(--ease), background var(--ease);
}
.file-label:hover { border-color: var(--accent); background: var(--accent-dim); }
#attachments { width: 100%; font-size: 10px; margin-top: 6px; color: var(--muted); }
#attachments::file-selector-button {
  border: 0;
  background: var(--accent-dim);
  color: var(--accent-strong);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 10px;
  margin-right: 8px;
}
.primary-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 14px;
  background: linear-gradient(180deg, #e2c089, #c9a36a);
  color: #1a140c;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 13px;
  border-radius: 11px;
  box-shadow: 0 6px 16px rgba(201, 163, 106, 0.22);
  transition: filter var(--ease), transform var(--ease);
}
.primary-button:hover { filter: brightness(1.06); }
.form-message { font-size: 11px; color: #ff8a80; line-height: 1.6; margin: 8px 0 0; white-space: pre-line; }
.form-message:empty, #file-hint:empty { display: none; }
.form-message.success { color: var(--green); }
.inbox-details { margin-top: 16px; border-top: 1px solid var(--line-soft); padding-top: 12px; }
.inbox-details summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.empty { font-size: 12px; color: var(--muted); line-height: 1.8; padding: 8px 0; }
.task-item { padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.task-item:first-child { padding-top: 0; }
.task-item:last-child { border-bottom: 0; padding-bottom: 0; }
.task-item h4 { font-size: 13px; line-height: 1.55; margin: 0 0 8px; font-weight: 600; overflow-wrap: anywhere; }
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--faint);
  font-size: 10px;
  margin-bottom: 6px;
}
.progress-meta strong { color: var(--accent-strong); font-weight: 600; }
.progress-track {
  display: block;
  width: 100%;
  height: 6px;
  accent-color: var(--accent);
  border: 0;
  border-radius: 99px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}
.progress-track::-webkit-progress-bar { background: rgba(255, 255, 255, 0.08); border-radius: 99px; }
.progress-track::-webkit-progress-value {
  background: linear-gradient(90deg, #c9a36a, #e8c892);
  border-radius: 99px;
}
.progress-track::-moz-progress-bar { background: linear-gradient(90deg, #c9a36a, #e8c892); border-radius: 99px; }
.step-title { font-size: 10px; color: var(--accent); margin-bottom: 4px; }
.step-text, .task-note { font-size: 11px; line-height: 1.75; color: var(--muted); white-space: pre-wrap; overflow-wrap: anywhere; }
.task-note { margin-top: 8px; padding-left: 8px; border-left: 2px solid var(--line); }
.task-steps { margin-top: 8px; font-size: 10px; color: var(--muted); }
.task-steps summary { cursor: pointer; }
.task-steps ol { padding-left: 18px; line-height: 1.9; }
.artifact-path {
  font-size: 10px;
  line-height: 1.7;
  color: var(--muted);
  display: block;
  overflow-wrap: anywhere;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid var(--line-soft);
  padding: 6px 8px;
  border-radius: 8px;
  margin-top: 6px;
}
.inbox-status {
  color: var(--accent-strong);
  font-size: 10px;
  background: var(--accent-dim);
  border: 1px solid var(--line);
  padding: 1px 6px;
  border-radius: 999px;
}
.inbox-record { font-size: 11px; line-height: 1.7; padding: 10px 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }
.inbox-record strong { display: block; margin-bottom: 4px; }
.inbox-record p { margin-top: 4px; white-space: pre-wrap; }
.attachment-link { display: block; font-size: 10px; overflow-wrap: anywhere; margin-top: 3px; }
.close-panel { display: none; }

/* ----- office ----- */
main {
  margin-left: var(--sidebar);
  padding: 8px 20px 0;
  min-width: 0;
  min-height: calc(100dvh - var(--header));
}
.office-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.office-heading h2 {
  font-size: 20px;
  margin-top: 2px;
  letter-spacing: 0.06em;
}
.office-heading h2 span {
  font-family: "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 11px;
  letter-spacing: 0;
  margin-left: 12px;
  color: var(--muted);
  font-weight: 400;
}
.office-actions { display: flex; align-items: center; gap: 12px; }
.refresh-note { font-size: 10px; color: var(--faint); }
.ghost-button {
  background: var(--glass-card);
  border: 1px solid var(--line);
  font-size: 11px;
  padding: 6px 12px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: background var(--ease), border-color var(--ease);
}
.ghost-button:hover { background: var(--glass-card-hover); border-color: var(--accent); }
.filters { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  border: 1px solid transparent;
  padding: 6px 10px;
  white-space: nowrap;
  border-radius: 999px;
  transition: background var(--ease), border-color var(--ease), color var(--ease);
}
.filter.active {
  background: var(--accent-dim);
  border-color: var(--line);
  color: var(--accent-strong);
}
.board-message {
  font-size: 11px;
  line-height: 1.7;
  color: var(--accent-strong);
  background: var(--accent-dim);
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin: 0 0 10px;
}
.board-message:empty { display: none; }

.office-floor { display: flex; flex-direction: column; gap: 0; }
.office-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 0 16px;
  border-top: 1px solid var(--line);
}
.office-row:first-child { border-top: 1px solid var(--line); }
.group-sign {
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  padding: 0;
}
.group-sign .row-number {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  flex: none;
}
.group-sign h3 {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 600;
  overflow-wrap: anywhere;
  flex: none;
}
.group-sign .group-size { font-size: 10px; color: var(--faint); flex: none; }
.group-sign::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: var(--line);
  align-self: center;
  min-width: 16px;
}
.desks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 10px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  align-items: stretch;
}

.desk {
  position: relative;
  display: flex;
  flex-direction: column;
  width: auto;
  min-width: 0;
  height: auto;
  min-height: 0;
  text-align: left;
  padding: 10px 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--glass-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  transition: transform var(--ease), background var(--ease), border-color var(--ease), box-shadow var(--ease);
}
.desk.leader {
  border-color: var(--line);
  background: linear-gradient(180deg, rgba(212, 176, 122, 0.1), rgba(255, 255, 255, 0.03));
}
.desk:hover {
  transform: translateY(-1px);
  background: var(--glass-card-hover);
  border-color: var(--line);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.32), 0 0 0 1px rgba(212, 176, 122, 0.12);
}
.desk-top { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 16px; flex: 0 0 auto; }
.avatar {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #fff8ee;
  letter-spacing: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}
.desk-id { min-width: 0; flex: 1; }
.desk-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desk-role {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 1px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.leader-badge {
  font-size: 9px;
  line-height: 1.4;
  color: var(--accent-strong);
  background: var(--accent-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 5px;
  margin-left: 4px;
}
.desk-lamp {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gray);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.desk[data-status="green"] .desk-lamp {
  background: var(--green);
  animation: breathe 2.8s ease-in-out infinite;
}
.desk[data-status="red"] .desk-lamp {
  width: 9px;
  height: 9px;
  background: var(--red);
  box-shadow:
    0 0 0 3px rgba(255, 77, 77, 0.22),
    0 0 12px 2px rgba(255, 77, 77, 0.7);
}
.desk[data-status="red"] {
  border-color: rgba(255, 77, 77, 0.45);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 77, 77, 0.16);
}
.desk[data-status="yellow"] .desk-lamp {
  background: var(--yellow);
  box-shadow: 0 0 0 3px rgba(230, 184, 77, 0.14), 0 0 8px rgba(230, 184, 77, 0.45);
}
.desk[data-status="gray"] .desk-lamp,
.desk[data-status="neutral"] .desk-lamp { background: var(--gray); }
.desk-task {
  font-size: 11px;
  line-height: 1.45;
  height: 2.9em;
  max-height: 2.9em;
  color: var(--muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  overflow-wrap: anywhere;
  word-break: break-word;
  margin: 8px 0 0;
  flex: 0 0 2.9em;
  min-height: 2.9em;
}
.unread-label { color: var(--neutral); font-weight: 600; }
.desk-time {
  font-size: 10px;
  line-height: 1.4;
  color: var(--faint);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 10px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  flex: 0 0 auto;
  min-width: 0;
  font-variant-numeric: tabular-nums;
}
.desk-time time {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.desk-time .relative { flex: none; color: var(--muted); white-space: nowrap; }
.empty-row {
  font-size: 11px;
  color: var(--faint);
  display: flex;
  align-items: center;
  min-height: 48px;
  padding-left: 2px;
  grid-column: 1 / -1;
}
.office-footer {
  display: flex;
  justify-content: flex-end;
  color: var(--faint);
  font-size: 10px;
  padding: 4px 0 8px;
  border-top: 1px solid var(--line);
}

@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 3px rgba(61, 204, 122, 0.12), 0 0 8px rgba(61, 204, 122, 0.45); }
  50% { box-shadow: 0 0 0 5px rgba(61, 204, 122, 0.16), 0 0 16px rgba(61, 204, 122, 0.75); }
}

/* ----- dialogs ----- */
dialog {
  color: var(--ink);
  background: rgba(16, 19, 26, 0.92);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  max-height: 85dvh;
  overflow-y: auto;
  padding: 24px;
  width: min(560px, calc(100% - 32px));
  overflow-wrap: anywhere;
}
dialog::backdrop { background: rgba(5, 6, 10, 0.62); backdrop-filter: blur(6px); }
.dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.icon-button {
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  border: 1px solid var(--line-soft);
  width: 32px;
  height: 32px;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  transition: border-color var(--ease), color var(--ease);
}
.icon-button:hover { border-color: var(--accent); color: var(--ink); }
.bot-title { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bot-title .avatar { width: 36px; height: 36px; font-size: 15px; }
.bot-title h2 { font-size: 24px; }
.detail-meta { font-size: 12px; color: var(--muted); margin-bottom: 18px; }
.detail-section { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.detail-section h3 { color: var(--accent); font-size: 11px; font-weight: 500; letter-spacing: 0.12em; margin-bottom: 8px; }
.detail-section p { font-size: 13px; line-height: 1.85; white-space: pre-wrap; }
.detail-section .relative { color: var(--muted); margin-left: 8px; }
.login-dialog { width: min(390px, calc(100% - 32px)); }
.login-dialog h2 { font-size: 24px; margin-bottom: 8px; }
.login-dialog form { margin-top: 16px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(5, 6, 10, 0.55); z-index: 29; }
.icon-button.close-panel { display: none; }
.drawer-open { overflow: hidden; }


@media (min-width: 761px) {
  main {
    min-height: calc(100dvh - var(--header));
    overflow: visible;
    padding-top: 10px;
    padding-bottom: 16px;
  }
}

@media (min-width: 1600px) {
  .desks { grid-template-columns: repeat(auto-fill, minmax(188px, 1fr)); }
  main { padding-left: 32px; padding-right: 32px; }
}

@media (max-width: 1150px) and (min-width: 761px) {
  :root { --sidebar: 320px; }
  .topbar { padding-left: 18px; padding-right: 18px; }
  .summary { gap: 14px; }
  .brand h1 { font-size: 22px; }
  main { padding-left: 16px; padding-right: 16px; }
  .desks { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}

@media (max-width: 760px) {
  :root { --header: auto; --sidebar: min(360px, 92vw); }
  .topbar {
    position: relative;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 16px 14px;
    min-height: 0;
  }
  .brand h1 { font-size: 20px; }
  .brand p { font-size: 10px; }
  .mobile-task {
    display: block;
    position: absolute;
    right: 16px;
    top: 18px;
    background: var(--accent-dim);
    border: 1px solid var(--line);
    color: var(--accent-strong);
    font-size: 11px;
    padding: 7px 12px;
    border-radius: 999px;
  }
  .top-meta { width: 100%; align-items: stretch; gap: 10px; }
  .summary { width: 100%; justify-content: space-between; gap: 6px; }
  .summary-item { font-size: 10px; }
  .summary-item strong { font-size: 18px; }
  main { margin-left: 0; padding: 14px 12px 0; min-height: calc(100dvh - 160px); }
  .office-heading h2 { font-size: 20px; }
  .office-toolbar { align-items: flex-start; }
  .filters { flex-wrap: nowrap; width: 100%; overflow-x: auto; gap: 4px; scrollbar-width: none; order: 3; flex: 1 0 100%; }
  .filter { font-size: 10px; padding: 6px 8px; }
  .office-row { padding: 12px 0 14px; gap: 8px; }
  .group-sign h3 { font-size: 14px; }
  .desks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }
  .desk, .desk.leader {
    width: auto;
    min-height: 0;
    height: auto;
    padding: 10px 10px 8px;
  }
  .task-panel {
    top: 0;
    bottom: 0;
    z-index: 30;
    transform: translateX(-105%);
    transition: transform 200ms ease;
    box-shadow: 8px 0 40px rgba(0, 0, 0, 0.45);
  }
  .task-panel.open { transform: translateX(0); }
  .icon-button.close-panel { display: flex; }
  .panel-tabs { margin-left: 12px; margin-right: 12px; }
  .tab { font-size: 10px; padding: 0 2px; }
  dialog { padding: 20px; }
}

@media (max-width: 360px) {
  .brand-mark { display: none; }
  .mobile-task { right: 12px; }
  .refresh-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
