:root {
  --navy: #12313b;
  --navy-deep: #0d272f;
  --teal: #087f8c;
  --teal-dark: #066874;
  --lime: #77a91f;
  --paper: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f8faf9;
  --ink: #17323b;
  --muted: #667980;
  --line: #dce6e3;
  --line-strong: #c8d6d2;
  --amber: #b96a19;
  --amber-bg: #fff5e8;
  --red: #a54137;
  --red-bg: #fff0ee;
  --green: #387c48;
  --green-bg: #edf8ef;
  --shadow: 0 18px 48px rgba(21, 52, 59, 0.08);
  font-family:
    "Segoe UI Variable", "Microsoft YaHei UI", "PingFang SC", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}
html {
  min-width: 320px;
  background: var(--paper);
}
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid rgba(119, 169, 31, 0.48);
  outline-offset: 2px;
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 8px 12px;
  background: var(--navy);
  color: white;
  transform: translateY(-150%);
}
.skip-link:focus {
  transform: translateY(0);
}
.kicker {
  margin: 0 0 10px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.16em;
}
.muted {
  color: var(--muted);
}

.primary-button,
.secondary-button,
.text-action,
.icon-action,
.icon-button,
.filter-chip,
.section-tab,
.danger-action {
  border: 0;
  transition:
    background-color 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}
.primary-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 7px;
  background: var(--navy);
  color: white;
  font-weight: 700;
  font-size: 13px;
}
.primary-button:hover {
  background: var(--teal-dark);
  transform: translateY(-1px);
}
.primary-button:active,
.secondary-button:active,
.icon-action:active {
  transform: translateY(1px);
}
.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
  transform: none;
}
.secondary-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
}
.secondary-button:hover {
  border-color: #95aea8;
  background: var(--surface-soft);
}
.text-action {
  padding: 8px;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}
.text-action:hover {
  color: var(--teal-dark);
}
.icon-action {
  width: 40px;
  height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  font-size: 21px;
  line-height: 1;
}
.icon-action:hover {
  border-color: #95aea8;
  background: var(--surface-soft);
}

.login-screen {
  display: grid;
  min-height: 100dvh;
  grid-template-columns: 1fr;
  background: var(--paper);
}
.login-brand {
  position: relative;
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 54px clamp(42px, 6vw, 96px);
  background: var(--navy-deep);
  color: white;
}
.login-brand::before {
  content: "";
  position: absolute;
  inset: auto -12% -27% 12%;
  height: 62%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50% 50% 0 0;
  transform: rotate(-8deg);
}
.login-brand::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -40px;
  top: 12%;
  border: 56px solid rgba(0, 178, 196, 0.11);
  border-radius: 50%;
}
.brand-lockup,
.login-copy,
.login-brand-foot {
  position: relative;
  z-index: 1;
}
.brand-lockup {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: #d7e4e2;
}
.brand-lockup img {
  width: 176px;
  height: 52px;
  object-fit: cover;
  object-position: center 72%;
  padding: 6px 12px;
  border-radius: 4px;
  background: white;
}
.login-copy {
  max-width: 650px;
}
.login-copy .kicker {
  color: #9bd0d3;
}
.login-copy h1 {
  margin: 0 0 30px;
  font-family: "STSong", "Songti SC", serif;
  font-size: clamp(42px, 4.2vw, 68px);
  font-weight: 650;
  line-height: 1.28;
  letter-spacing: -0.055em;
  text-wrap: balance;
}
.login-copy > p:last-child {
  max-width: 35em;
  margin: 0;
  color: #c3d3d1;
  font-size: 16px;
  line-height: 1.9;
}
.login-brand-foot {
  margin: 0;
  color: #8ba5a4;
  font-size: 12px;
  letter-spacing: 0.08em;
}
.login-panel {
  display: grid;
  min-height: 100dvh;
  place-items: center;
  padding: 32px;
  background:
    linear-gradient(rgba(18, 49, 59, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 49, 59, 0.025) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
}
.login-card {
  width: min(410px, 100%);
  padding: 40px 42px 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
  box-shadow: var(--shadow);
}
.login-mobile-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 34px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.login-logo {
  position: relative;
  display: block;
  width: 150px;
  height: 46px;
  flex: 0 0 150px;
  overflow: hidden;
}
.login-logo img {
  position: absolute;
  top: -45px;
  left: 0;
  display: block;
  width: 150px;
  max-width: none;
  height: auto;
}
.login-mobile-brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding-left: 15px;
  border-left: 1px solid var(--line);
}
.login-mobile-brand strong {
  font-size: 13px;
  white-space: nowrap;
}
.login-mobile-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 8px;
  white-space: nowrap;
}
.login-card h2 {
  margin: 0 0 12px;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -0.04em;
}
.login-card > .muted {
  max-width: 32em;
  margin: 0 0 34px;
  font-size: 14px;
  line-height: 1.8;
}
.login-card label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 700;
}
.password-field {
  position: relative;
}
.password-field input {
  width: 100%;
  height: 50px;
  padding: 0 70px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 15px;
}
.password-field input:hover {
  border-color: #9eb2ad;
}
.password-field input:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(8, 127, 140, 0.12);
}
.icon-button {
  position: absolute;
  top: 5px;
  right: 5px;
  height: 40px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.icon-button:hover {
  color: var(--teal);
}
.login-button {
  width: 100%;
  margin-top: 18px;
  min-height: 50px;
}
.form-status {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--red);
  font-size: 13px;
}
.security-note {
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: #819096;
  font-size: 12px;
}

.app-shell {
  min-height: 100dvh;
}
.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 clamp(22px, 3vw, 52px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 2px 14px rgba(18, 49, 59, 0.035);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 15px;
}
.app-brand-logo {
  position: relative;
  display: block;
  width: 142px;
  height: 46px;
  flex: 0 0 142px;
  overflow: hidden;
}
.app-brand-logo img {
  position: absolute;
  top: -43px;
  left: 0;
  display: block;
  width: 142px;
  max-width: none;
  height: auto;
}
.app-brand span {
  display: flex;
  padding-left: 15px;
  border-left: 1px solid var(--line);
  flex-direction: column;
  line-height: 1.4;
}
.app-brand strong {
  font-size: 14px;
}
.app-brand small {
  color: var(--muted);
  font-size: 10px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.live-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-right: 5px;
  color: var(--green);
  font-size: 12px;
  font-weight: 650;
}
.live-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #45a45a;
  box-shadow: 0 0 0 4px rgba(69, 164, 90, 0.12);
}
.last-updated {
  color: #839197;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.main-content {
  width: min(1520px, calc(100% - 64px));
  margin: 0 auto;
  padding: 44px 0 64px;
}
.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 30px;
}
.page-heading h1 {
  margin: 0;
  font-size: clamp(29px, 3vw, 42px);
  line-height: 1.25;
  letter-spacing: -0.045em;
}
.page-heading > div > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.heading-actions {
  display: flex;
  gap: 10px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.metric-card {
  display: grid;
  min-height: 126px;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 17px;
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.metric-card.metric-attention {
  border-top: 3px solid var(--lime);
  padding-top: 21px;
}
.metric-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 7px;
  background: #eaf4f3;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
}
.metric-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}
.metric-card strong {
  display: block;
  margin: 2px 0 1px;
  font-size: 30px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.05em;
}
.metric-card p {
  margin: 0;
  color: #87959a;
  font-size: 10px;
}

.operations-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.section-tabs {
  display: flex;
  gap: 30px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line);
}
.section-tab {
  position: relative;
  padding: 20px 2px 17px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.section-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}
.section-tab.is-active {
  color: var(--ink);
}
.section-tab.is-active::after {
  background: var(--teal);
}
.section-tab span {
  display: inline-flex;
  min-width: 24px;
  height: 20px;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 0 6px;
  border-radius: 10px;
  background: #edf2f1;
  color: var(--muted);
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.work-toolbar {
  display: flex;
  min-height: 70px;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}
.search-field {
  display: flex;
  min-width: 280px;
  flex: 1;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
}
.search-field > span {
  color: #829095;
  font-size: 20px;
}
.search-field input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px;
  border-radius: 7px;
  background: #e9efed;
}
.filter-chip {
  min-height: 34px;
  padding: 6px 11px;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.filter-chip:hover {
  color: var(--ink);
}
.filter-chip.is-active {
  background: white;
  color: var(--navy);
  box-shadow: 0 2px 7px rgba(18, 49, 59, 0.08);
}
.select-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}
.select-field select {
  height: 40px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: white;
  color: var(--ink);
  font-size: 12px;
}
.workspace-status {
  min-height: 0;
  margin: 0;
  padding: 0 20px;
  background: #fffbeb;
  color: #895922;
  font-size: 12px;
  line-height: 0;
  transition:
    padding 160ms ease,
    line-height 160ms ease;
}
.workspace-status:not(:empty) {
  padding-block: 8px;
  line-height: 1.5;
  border-bottom: 1px solid #f4e6ca;
}
.workspace {
  display: grid;
  min-height: 640px;
  grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
}
.queue-panel {
  min-width: 0;
  border-right: 1px solid var(--line);
  background: #fbfcfc;
}
.queue-heading {
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 17px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
}
.queue-heading div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.queue-heading strong {
  color: var(--ink);
  font-size: 13px;
}
.queue-heading div span {
  padding: 2px 7px;
  border-radius: 10px;
  background: #edf2f1;
  font-size: 10px;
}
.request-list {
  max-height: 720px;
  overflow: auto;
  scrollbar-color: #bacac6 transparent;
}
.request-row {
  position: relative;
  width: 100%;
  padding: 17px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}
.request-row:hover {
  background: #f1f6f4;
}
.request-row.is-active {
  background: #e9f4f2;
}
.request-row.is-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--teal);
}
.request-row-top,
.request-row-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.request-row-top strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.request-row-top time {
  flex-shrink: 0;
  color: #829095;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}
.request-row-route {
  overflow: hidden;
  margin: 8px 0 10px;
  color: #4d646b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.request-row-bottom {
  color: #819096;
  font-size: 10px;
}
.type-label {
  color: var(--teal-dark);
  font-weight: 750;
}
.status-badge {
  display: inline-flex;
  min-height: 23px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 4px;
  background: #eef2f1;
  color: #617278;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.status-badge.open {
  background: var(--amber-bg);
  color: var(--amber);
}
.status-badge.confirmed {
  background: var(--green-bg);
  color: var(--green);
}
.status-badge.cancelled {
  background: var(--red-bg);
  color: var(--red);
}
.list-empty {
  padding: 70px 30px;
  color: var(--muted);
  text-align: center;
}
.list-empty strong {
  display: block;
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 15px;
}
.list-empty p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.detail-panel {
  min-width: 0;
  background: white;
}
.detail-empty {
  display: grid;
  min-height: 640px;
  place-content: center;
  padding: 40px;
  text-align: center;
}
.detail-empty > span {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: #edf5f3;
  color: var(--teal);
  font-family: "STSong", "Songti SC", serif;
  font-size: 24px;
}
.detail-empty h2 {
  margin: 0 0 8px;
  font-size: 20px;
}
.detail-empty p {
  max-width: 30em;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}
.detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-bottom: 1px solid var(--line);
}
.detail-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 6px;
}
.detail-title-row h2 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.025em;
}
.detail-reference {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.detail-actions .primary-button,
.detail-actions .secondary-button {
  min-height: 36px;
  padding-block: 7px;
}
.danger-action {
  min-height: 36px;
  padding: 7px 11px;
  border-radius: 6px;
  background: transparent;
  color: var(--red);
  font-size: 12px;
  font-weight: 650;
}
.danger-action:hover {
  background: var(--red-bg);
}
.detail-body {
  padding: 24px 28px 30px;
}
.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}
.info-item {
  min-width: 0;
  padding: 14px 15px;
  background: var(--surface-soft);
}
.info-item.wide {
  grid-column: span 2;
}
.info-item small {
  display: block;
  margin-bottom: 5px;
  color: #819096;
  font-size: 10px;
}
.info-item strong,
.info-item a {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.info-item a {
  color: var(--teal-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.conversation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.conversation-heading h3 {
  margin: 0;
  font-size: 15px;
}
.conversation-heading span {
  color: var(--muted);
  font-size: 10px;
}
.messages {
  display: flex;
  min-height: 180px;
  max-height: 390px;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  background: #f8faf9;
  scrollbar-color: #bacac6 transparent;
}
.message-line {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}
.message-line.staff,
.message-line.ai {
  flex-direction: row-reverse;
}
.message-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 6px;
  background: #dfeae7;
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
}
.message-line.staff .message-avatar {
  background: var(--navy);
  color: white;
}
.message-line.ai .message-avatar {
  background: #dff2f2;
  color: var(--teal-dark);
}
.message-content {
  max-width: min(76%, 640px);
}
.message-meta {
  display: flex;
  gap: 7px;
  margin-bottom: 4px;
  color: #849399;
  font-size: 9px;
}
.message-line.staff .message-meta,
.message-line.ai .message-meta {
  justify-content: flex-end;
}
.message-bubble {
  margin: 0;
  padding: 10px 13px;
  border: 1px solid #dbe5e2;
  border-radius: 3px 9px 9px 9px;
  background: white;
  color: #304b53;
  font-size: 13px;
  line-height: 1.75;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}
.message-line.staff .message-bubble {
  border-color: var(--navy);
  border-radius: 9px 3px 9px 9px;
  background: var(--navy);
  color: white;
}
.message-line.ai .message-bubble {
  border-color: #cde4e2;
  border-radius: 9px 3px 9px 9px;
  background: #eaf6f4;
}
.reply-composer {
  padding: 15px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
}
.quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.quick-reply {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: white;
  color: var(--muted);
  font-size: 10px;
}
.quick-reply:hover {
  border-color: #9db2ad;
  color: var(--teal-dark);
}
.reply-composer textarea {
  display: block;
  width: 100%;
  min-height: 82px;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.65;
}
.reply-composer textarea:focus {
  border-color: var(--teal);
  outline: 3px solid rgba(8, 127, 140, 0.1);
}
.composer-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 10px;
}
.composer-footer span {
  color: #87959a;
  font-size: 10px;
}
.closed-notice {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #f5f7f6;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}
.detail-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.member-table-wrap {
  min-height: 450px;
  padding: 20px;
  background: #fbfcfc;
}
.member-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  background: white;
  font-size: 12px;
}
.member-table th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #f1f5f4;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}
.member-table td {
  padding: 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.member-table tr:last-child td {
  border-bottom: 0;
}
.member-name {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}
.member-sub {
  color: var(--muted);
  font-size: 10px;
}
.preference-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.preference-list span {
  padding: 2px 6px;
  border-radius: 3px;
  background: #eef3f2;
  color: #566b71;
  font-size: 9px;
}

.toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 44px));
}
.toast {
  padding: 13px 15px;
  border-left: 3px solid var(--teal);
  border-radius: 6px;
  background: var(--navy);
  box-shadow: 0 12px 28px rgba(10, 35, 42, 0.22);
  color: white;
  font-size: 12px;
  line-height: 1.6;
  animation: toast-in 200ms ease-out;
}
.toast.error {
  border-left-color: #e07769;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

@media (max-width: 1180px) {
  .main-content {
    width: min(100% - 36px, 1280px);
  }
  .metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .workspace {
    grid-template-columns: 330px minmax(0, 1fr);
  }
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filter-group {
    order: 3;
    width: 100%;
  }
  .work-toolbar {
    flex-wrap: wrap;
  }
}

@media (max-width: 820px) {
  .login-panel {
    padding: 20px;
  }
  .app-header {
    align-items: flex-start;
    padding-block: 13px;
  }
  .app-brand span,
  .live-status,
  .last-updated,
  #notify {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  .main-content {
    width: calc(100% - 24px);
    padding-top: 28px;
  }
  .page-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .page-heading h1 {
    font-size: 30px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
  }
  .metric-card {
    min-height: 105px;
    padding: 16px;
  }
  .metric-card.metric-attention {
    padding-top: 14px;
  }
  .metric-card p {
    display: none;
  }
  .workspace {
    display: block;
  }
  .queue-panel {
    border-right: 0;
  }
  .request-list {
    max-height: 430px;
  }
  .detail-panel {
    border-top: 1px solid var(--line);
  }
  .detail-empty {
    min-height: 330px;
  }
  .detail-header {
    padding: 20px;
  }
  .detail-body {
    padding: 20px;
  }
  .member-table {
    min-width: 760px;
  }
  .member-table-wrap {
    overflow-x: auto;
  }
}

@media (max-width: 540px) {
  .login-card {
    padding: 30px 24px 27px;
  }
  .login-mobile-brand {
    gap: 10px;
  }
  .login-logo {
    width: 128px;
    height: 42px;
    flex-basis: 128px;
  }
  .login-logo img {
    top: -39px;
    width: 128px;
  }
  .login-mobile-brand span {
    padding-left: 10px;
  }
  .login-mobile-brand small {
    display: none;
  }
  .app-brand-logo {
    width: 112px;
    height: 38px;
    flex-basis: 112px;
  }
  .app-brand-logo img {
    top: -34px;
    width: 112px;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions > * {
    flex: 1;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric-card {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .metric-icon {
    width: 32px;
    height: 32px;
  }
  .metric-card strong {
    font-size: 25px;
  }
  .section-tabs {
    gap: 20px;
    padding-inline: 16px;
  }
  .work-toolbar {
    align-items: stretch;
    padding: 12px;
  }
  .search-field {
    min-width: 100%;
  }
  .filter-group {
    overflow-x: auto;
  }
  .filter-chip {
    flex: 0 0 auto;
  }
  .select-field {
    justify-content: space-between;
    width: 100%;
  }
  .detail-header {
    flex-direction: column;
  }
  .detail-actions {
    justify-content: flex-start;
  }
  .info-grid {
    grid-template-columns: 1fr 1fr;
  }
  .info-item.wide {
    grid-column: 1 / -1;
  }
  .message-content {
    max-width: 84%;
  }
  .composer-footer {
    align-items: stretch;
    flex-direction: column;
  }
  .composer-footer .primary-button {
    width: 100%;
  }
}

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