:root {
  --bg: #f4f7f6;
  --surface: #ffffff;
  --surface-soft: #f0f5f3;
  --ink: #203b34;
  --muted: #63756f;
  --line: #dce6e1;
  --teal: #147d6b;
  --teal-strong: #0d6254;
  --focus-ring: #248d79;
  --coral: #d65f4c;
  --amber: #bf7a1f;
  --green: #3f8f51;
  --indigo: #4258a8;
  --blue: #2f6fbe;
  --violet: #6d5bd0;
  --shadow: 0 18px 50px rgba(22, 49, 40, 0.13);
  --shadow-soft: 0 2px 8px rgba(22, 49, 40, 0.035);
  --hairline: rgba(255, 255, 255, 0.72);
  --radius: 10px;
  --spring: cubic-bezier(0.2, 0.9, 0.2, 1);
  --sidebar-width: 236px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, Manrope, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  touch-action: manipulation;
  transition:
    transform 180ms var(--spring),
    box-shadow 180ms var(--spring),
    background 180ms var(--spring),
    border-color 180ms var(--spring),
    color 180ms var(--spring),
    opacity 180ms var(--spring);
  -webkit-tap-highlight-color: transparent;
}

button:active:not(:disabled),
summary:active,
[role="button"]:active {
  transform: scale(0.985);
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 24px;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}

.site-footer {
  padding: 16px 0 max(16px, env(safe-area-inset-bottom, 0px));
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: underline;
}

.site-footer a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  font-size: 22px;
  box-shadow: none;
}

.brand-mark.small {
  width: 36px;
  height: 36px;
  font-size: 17px;
}

.login-panel h1 {
  margin: 18px 0 26px;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.login-form {
  display: grid;
  gap: 16px;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.login-form input,
.toolbar input,
.toolbar select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: var(--radius);
  padding: 11px 12px;
  outline: none;
  transition:
    border-color 180ms var(--spring),
    box-shadow 180ms var(--spring),
    background 180ms var(--spring);
}

.login-form input:focus,
.toolbar input:focus,
.toolbar select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.14);
}

.login-form button,
.primary-light {
  border: 1px solid var(--teal);
  border-radius: var(--radius);
  background: var(--teal);
  color: #fff;
  padding: 10px 16px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(20, 125, 107, 0.1);
}

.secondary-button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: #365b4f;
  padding: 10px 16px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.primary-light.is-working:disabled {
  background: #1f7a70;
  box-shadow: 0 0 0 3px rgba(31, 122, 112, 0.14);
  opacity: 1;
}

.primary-light.is-error {
  background: #b3261e;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, 0.14);
}

.form-error {
  min-height: 20px;
  margin: 0;
  color: #b3261e;
}

.app-view {
  min-height: 100vh;
  padding-left: var(--sidebar-width);
}

.back-to-top { position: fixed; right: 18px; top: 52%; z-index: 45; display: inline-flex; align-items: center; gap: 7px; border: 1px solid #8eb9ae; border-radius: 999px; padding: 9px 12px; color: #15594e; background: #effaf7e8; box-shadow: 0 5px 18px #103b3524; cursor: pointer; opacity: .42; transition: opacity .18s, transform .18s, background .18s; }
.back-to-top:hover, .back-to-top:focus-visible, .back-to-top.is-expanded { opacity: 1; background: #fff; transform: translateX(-2px); }
.back-to-top b { font-size: 12px; font-weight: 600; }
.back-to-top.is-collapsed b { display: none; }
.back-to-top.just-collapsed { opacity: .42; transform: none; }
.back-to-top:focus-visible { outline: 3px solid #76bfb2; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .back-to-top { transition: none; } }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  width: var(--sidebar-width);
  min-height: 100vh;
  overflow-y: auto;
  background: #143d33;
  color: #f5fbf8;
  padding: 24px 12px;
  border-right: 1px solid #214d41;
  box-shadow: none;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 10px 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid #33584d;
}

.side-brand strong,
.side-brand span {
  display: block;
}

.side-brand span {
  color: #a9c2b8;
  font-size: 11px;
  margin-top: 3px;
}

.side-nav {
  display: grid;
  gap: 4px;
}

.side-nav button {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  color: #d1e1da;
  background: transparent;
  text-align: left;
  min-height: 40px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.side-nav button.active,
.side-nav button:hover {
  background: #275b4d;
  color: #fff;
}

.side-nav button.active::before {
  content: "";
  position: absolute;
  inset: 9px auto 9px 8px;
  width: 2px;
  border-radius: 99px;
  background: #9ce5d9;
  box-shadow: none;
}

.side-nav .sub-nav {
  margin-top: 0;
  margin-left: 18px;
  width: calc(100% - 18px);
  min-height: 36px;
  border-left: 1px solid #406559;
  border-radius: 0 8px 8px 0;
  color: #b9d0c4;
  font-size: 12px;
  font-weight: 500;
  padding: 8px 12px 8px 22px;
}

.side-nav .ai-sub-nav {
  padding-left: 30px;
}

.side-nav .ai-sub-nav::after {
  content: "↳";
  position: absolute;
  left: 12px;
  color: #7ea097;
}

.workspace {
  min-width: 0;
  width: 100%;
  padding: 26px 28px 36px;
  overflow-x: hidden;
}

.content-section.section-enter {
  animation: contentSpringIn 180ms ease-out both;
}

@keyframes contentSpringIn {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.topbar > div:first-child {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
}

.topbar h2,
.drawer-head h3 {
  margin: 0;
  font-size: 25px;
  line-height: 1.35;
  letter-spacing: 0;
}

.user-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  padding: 0;
  font-size: 12px;
  box-shadow: none;
}

.user-box small {
  color: var(--muted);
}

.notification-center {
  position: relative;
}

.notification-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
}

.notification-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 11px;
  line-height: 1;
}

.notification-header-actions {display:flex;align-items:center;justify-content:flex-end;gap:6px;flex-wrap:wrap}
.notification-header-actions button {white-space:nowrap;padding:6px 8px}
.announcements-dialog {width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 40px);box-sizing:border-box;overflow:auto;border:1px solid #d6e5df;border-radius:18px;padding:24px;background:#fff;color:#23473c;box-shadow:0 20px 70px #153e3233}
.announcements-dialog::backdrop {background:#102e2866}
.announcements-dialog>header {display:flex;align-items:center;justify-content:space-between;gap:16px}
.announcements-dialog h3 {margin:4px 0;font-size:20px}
.announcement-help {font-size:12px;color:#667d73;line-height:1.7}
.announcement-editor {display:grid;gap:12px;padding:16px;background:#f3f8f5;border:1px solid #dbe8e0;border-radius:12px}
.announcement-editor[hidden] {display:none}
.announcement-editor label {display:grid;gap:6px;font-size:13px}
.announcement-editor input,.announcement-editor textarea {width:100%;box-sizing:border-box;padding:10px 12px;border:1px solid #cbded4;border-radius:8px;background:#fff;color:#23473c;font:inherit;line-height:1.6}
.announcement-editor input:focus,.announcement-editor textarea:focus {outline:2px solid #91c3ac;outline-offset:1px;border-color:#34846b}
.announcement-editor textarea {resize:vertical;min-height:110px}
.announcement-editor>button {justify-self:end}
#announcementStatus {font-size:13px;line-height:1.6;min-height:1.6em;overflow-wrap:anywhere}
.announcement-entry {border:1px solid #dfe9e4;border-radius:12px;margin:12px 0;padding:14px}
.announcement-entry summary {cursor:pointer;overflow-wrap:anywhere}
.announcement-entry summary small {display:block;color:#6f827b;font-size:12px;margin-top:7px}
.announcement-content {white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.8;border-top:1px solid #e7eeea;margin-top:12px;padding-top:12px}
.announcement-pagination {display:flex;align-items:center;justify-content:center;gap:12px;font-size:12px}
.unread-announcement-dialog {width:min(620px,calc(100vw - 32px));max-width:620px;max-height:calc(100dvh - 32px);box-sizing:border-box;padding:0;border:0;border-radius:20px;background:transparent;overflow:auto}
.unread-announcement-dialog::backdrop {background:#102e2880;backdrop-filter:blur(2px)}
.return-penalty-list {display:grid;gap:12px;max-height:60dvh;overflow:auto}
.return-penalty-item {padding:14px;border:1px solid #e5d5b5;border-radius:12px;background:#fffbf3;min-width:0}
.return-penalty-item p {white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7;margin:8px 0}
.return-penalty-actions {display:flex;gap:12px;flex-wrap:wrap}
.return-penalty-actions button {min-height:44px}
.unread-announcement-card {display:grid;gap:18px;margin:0;padding:26px;border:1px solid #cfe2d7;border-radius:20px;background:#fff;color:#23473c;box-shadow:0 24px 80px #153e3240}
.unread-announcement-card>header {display:flex;align-items:flex-start;justify-content:space-between;gap:16px}
.unread-announcement-card h3 {margin:4px 0 3px;font-size:22px;line-height:1.35;overflow-wrap:anywhere}
.unread-announcement-card>header>div {min-width:0}
#unreadAnnouncementStatus {color:#ad4539;overflow-wrap:anywhere}
.unread-announcement-card header small {color:#6f827b;font-size:12px}
.unread-announcement-content {max-height:min(52vh,460px);overflow:auto;padding:17px 18px;border:1px solid #dfece4;border-radius:13px;background:#f7fbf8;white-space:pre-wrap;overflow-wrap:anywhere;font-size:15px;line-height:1.85}
.unread-announcement-card>footer {display:flex;align-items:center;justify-content:space-between;gap:16px}
.unread-announcement-card>footer p {margin:0;color:#6b7f74;font-size:12px;line-height:1.6}
.unread-announcement-card>footer button {flex:0 0 auto;white-space:nowrap}
@media(max-width:600px){.announcements-dialog{padding:16px}.notification-panel header{flex-wrap:wrap}.notification-header-actions{margin-left:auto}}
@media(max-width:600px){.unread-announcement-card{padding:19px}.unread-announcement-card>footer{align-items:stretch;flex-direction:column}.unread-announcement-card>footer button{width:100%}}

.notification-panel {
  position: absolute;
  z-index: 70;
  top: calc(100% + 12px);
  right: 0;
  width: min(420px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(22, 47, 42, 0.2);
}

.notification-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.notification-panel h3 {
  margin: 0;
}

.notification-list {
  display: grid;
  max-height: 460px;
  overflow: auto;
}

.notification-group {
  display: grid;
  border-bottom: 1px solid var(--line);
}

.notification-group .notification-item {
  border-bottom: 0;
}

.notification-group-children {
  display: grid;
  border-top: 1px dashed var(--line);
  background: var(--surface-soft);
}

.notification-item-nested {
  padding-left: 38px;
  background: transparent;
}

.notification-more {
  justify-self: start;
  margin: 0 16px 10px 38px;
  padding: 4px 0;
  border: 0;
  color: var(--teal);
  background: transparent;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.notification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
  text-align: left;
}

.notification-item:hover {
  background: var(--surface-soft);
}

.notification-item.is-unread {
  background: rgba(22, 121, 111, 0.06);
}

.notification-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: transparent;
}

.notification-item.is-unread .notification-dot {
  background: var(--teal);
}

.notification-item > span:last-child {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.notification-item small,
.notification-item time {
  color: var(--muted);
  line-height: 1.45;
  white-space: normal;
}

.notification-item time {
  font-size: 11px;
}

.notification-empty {
  padding: 34px 18px;
  color: var(--muted);
  text-align: center;
}

.ghost-button,
.icon-button,
.pager button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric-tile {
  min-height: 120px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.metric-tile span {
  color: var(--muted);
}

.metric-tile strong {
  font-size: 30px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.accent-teal {
  border-top: 2px solid var(--teal);
  box-shadow: var(--shadow-soft);
}

.accent-coral {
  border-top: 2px solid var(--coral);
  box-shadow: var(--shadow-soft);
}

.accent-amber {
  border-top: 2px solid var(--amber);
  box-shadow: var(--shadow-soft);
}

.accent-green {
  border-top: 2px solid var(--green);
  box-shadow: var(--shadow-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.panel,
.orders-shell,
.empty-state {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.panel {
  padding: 20px;
  box-shadow: var(--shadow-soft);
}

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

.panel h3,
.empty-state h3 {
  margin: 0;
  font-size: 18px;
}

.breakdown {
  display: grid;
  gap: 12px;
}

.break-row {
  display: grid;
  grid-template-columns: minmax(90px, 160px) minmax(120px, 1fr) 52px;
  gap: 12px;
  align-items: center;
}

.break-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.break-track {
  height: 10px;
  border-radius: 999px;
  background: #edf1ef;
  overflow: hidden;
}

.break-fill {
  height: 100%;
  background: var(--teal);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 180px 150px auto auto auto;
  gap: 10px;
  margin-bottom: 16px;
}

.orders-toolbar {
  grid-template-columns: minmax(220px, 2fr) repeat(3, minmax(130px, 1fr));
}

.my-orders-button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 10px 22px rgba(22, 121, 111, 0.18);
}

.import-message {
  min-height: 20px;
  margin: -4px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.import-message.success {
  color: var(--teal);
}

.import-message.error {
  color: #b3261e;
}

.search-box {
  position: relative;
}

.search-box span {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.search-box input {
  padding-left: 34px;
}

.orders-shell {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  overflow: auto;
}

.orders-table {
  width: 100%;
  min-width: 2300px;
  border-collapse: separate;
  border-spacing: 0;
}

.orders-table th,
.orders-table td {
  border-bottom: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
  background: #fff;
}

.orders-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #557065;
  background: #f3f7f5;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: none;
}

.orders-table th:first-child,
.orders-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 168px;
  min-width: 168px;
  box-shadow: 1px 0 0 var(--line);
}

.orders-table td {
  max-width: 180px;
  color: #26302d;
  transition: background 160ms var(--spring);
}

.orders-table tbody tr:hover td {
  background: #f8fbfa;
}

.orders-table .long-cell {
  max-width: 260px;
}

.orders-table .muted {
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 2px 10px;
  background: #eff5f3;
  color: var(--teal);
  white-space: nowrap;
  font-weight: 700;
}

.status-badge.closed {
  color: #6f514b;
  background: #f5eae7;
}

.detail-button {
  border: 1px solid rgba(22, 121, 111, 0.28);
  background: rgba(22, 121, 111, 0.08);
  color: var(--teal);
  border-radius: var(--radius);
  padding: 7px 10px;
  font-weight: 700;
  margin-top: 8px;
}

.order-cell-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.order-cell-actions .detail-button {
  margin-top: 0;
}

.rrz-order-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  font-size: 12px;
  text-decoration: none;
}

.rrz-order-link:hover {
  text-decoration: underline;
}

.handled-select,
.handled-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: var(--radius);
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.handled-select {
  border: 1px solid rgba(63, 143, 81, 0.34);
  background: rgba(63, 143, 81, 0.1);
  color: var(--green);
  cursor: pointer;
}

.handled-select:disabled {
  cursor: wait;
  opacity: 0.6;
}

.handled-status {
  border: 1px solid rgba(63, 143, 81, 0.2);
  background: #edf8f0;
  color: var(--green);
}

.handled-status.pending {
  border-color: rgba(124, 113, 91, 0.24);
  background: #f7f3ea;
  color: #756a55;
}

.handled-status.cancel {
  border-color: rgba(181, 79, 67, 0.25);
  background: #fbeeed;
  color: #a8473c;
}

.pager {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  padding: 12px;
}

.empty-state {
  padding: 28px;
}

.empty-state p {
  color: var(--muted);
  margin-bottom: 0;
}

.import-history-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(19, 27, 24, 0.5);
  backdrop-filter: blur(5px);
}

.store-create-panel {
  width: min(520px, 100%);
  display: grid;
  gap: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(12, 24, 26, 0.24);
}

.store-create-form {
  display: grid;
  gap: 14px;
  padding: 20px 24px 24px;
}

.store-create-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 700;
}

.store-create-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px 12px;
  font: inherit;
}

.store-create-form input:focus {
  border-color: var(--teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.14);
}

.store-create-form .import-message {
  margin: 0;
}

.store-create-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.import-history-panel {
  width: min(1240px, 100%);
  max-height: min(820px, calc(100vh - 56px));
  overflow: hidden;
  border: 1px solid rgba(223, 232, 228, 0.9);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(18, 31, 27, 0.24);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.import-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
}

.import-history-head h3 {
  margin: 3px 0 7px;
  font-size: 22px;
}

.import-history-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.import-history-head-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.import-history-head-actions .secondary-button {
  padding: 9px 13px;
}

.import-history-panel > .import-message {
  margin: 0;
  padding: 11px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.import-history-table-wrap {
  min-height: 0;
  overflow: auto;
}

.import-history-table {
  width: 100%;
  min-width: 1040px;
  border-collapse: separate;
  border-spacing: 0;
}

.import-history-table th,
.import-history-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.import-history-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: #46524f;
  background: rgba(238, 244, 241, 0.97);
  white-space: nowrap;
}

.import-history-table td > strong,
.import-history-table td > small {
  display: block;
}

.import-history-table td > small,
.import-file-cell small,
.import-undo-reason {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.import-file-cell {
  min-width: 260px;
  max-width: 360px;
  word-break: break-word;
}

.import-store-badge,
.import-status {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}

.import-store-badge {
  color: #315e85;
  background: #eef6ff;
}

.import-status.active {
  color: var(--teal);
  background: #eaf7f3;
}

.import-status.undone {
  color: #785b54;
  background: #f4ece9;
}

.import-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(74px, 1fr));
  gap: 5px 10px;
  min-width: 180px;
  color: var(--muted);
  font-size: 12px;
}

.import-result-grid strong {
  color: var(--ink);
}

.import-history-action {
  display: grid;
  gap: 5px;
  min-width: 108px;
}

.import-undo-button {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid #f0cfd2;
  border-radius: var(--radius);
  font-weight: 700;
}

.import-undo-reason {
  display: block;
  max-width: 190px;
}

.import-history-empty {
  padding: 42px !important;
  color: var(--muted);
  text-align: center !important;
}

.detail-drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(19, 27, 24, 0.42);
  display: flex;
  justify-content: flex-end;
}

.drawer-panel {
  width: min(760px, 100%);
  height: 100%;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.drawer-head {
  flex-shrink: 0;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.drawer-body {
  overflow: auto;
  padding: 18px 24px 28px;
}

.detail-group {
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.detail-group h4 {
  margin: 0 0 12px;
  font-size: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}

.detail-item {
  min-width: 0;
}

.detail-item span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.detail-item strong {
  display: block;
  word-break: break-word;
  font-size: 14px;
  font-weight: 600;
}

.full-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.full-field {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  min-width: 0;
}

.full-field.important {
  border-color: rgba(214, 95, 76, 0.45);
  background: rgba(214, 95, 76, 0.05);
}

.full-field span,
.full-field strong {
  display: block;
  word-break: break-word;
}

.full-field span {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.full-field strong {
  font-size: 13px;
}

.summary-page {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.summary-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 252, 251, 0.86);
  backdrop-filter: blur(18px);
}

.summary-page-head h3 {
  margin: 0;
  font-size: 18px;
}

.summary-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-controls label {
  color: var(--muted);
  display: grid;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
}

.summary-controls input,
.summary-controls select {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 8px 10px;
  min-width: 148px;
}

.summary-controls .ghost-button {
  align-self: end;
  min-height: 38px;
}

.summary-page-body {
  padding: 14px 16px 18px;
}

.summary-topline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.summary-topline article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: linear-gradient(180deg, #f8fbfa 0%, #eef5f2 100%);
}

.summary-topline span,
.summary-topline strong {
  display: block;
}

.summary-topline span {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 4px;
}

.summary-topline strong {
  font-size: 18px;
  line-height: 1.1;
}

.summary-stack {
  display: grid;
  gap: 16px;
}

.period-summary-card {
  background: #fff;
  border: 1px solid #dfe8e4;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.range-summary-card {
  border-color: rgba(22, 121, 111, 0.35);
  box-shadow: 0 12px 28px rgba(22, 121, 111, 0.1);
}

.range-summary-card .period-summary-head {
  background: linear-gradient(100deg, #eff9f7 0%, #fbfdfc 72%);
}

.period-summary-head {
  align-items: center;
  background: rgba(251, 253, 252, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #dfe8e4;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
}

.period-summary-head h4 {
  color: #102d29;
  font-size: 19px;
  line-height: 1.1;
  margin: 0;
}

.period-summary-actions {
  align-items: center;
  display: flex;
  gap: 10px;
}

.period-summary-actions strong {
  color: var(--teal);
  font-size: 16px;
  white-space: nowrap;
}

.summary-export-button {
  padding: 9px 12px;
}

.summary-export-button:disabled {
  cursor: progress;
  opacity: 0.65;
}

.period-summary-table-wrap {
  overflow-x: auto;
}

.period-summary-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.period-summary-table th,
.period-summary-table td {
  border-bottom: 1px solid #e5ece9;
  border-right: 1px solid #e5ece9;
  font-size: 14px;
  padding: 10px 12px;
  text-align: left;
  vertical-align: middle;
}

.period-summary-table th {
  background: #edf4f1;
  color: #35423f;
  font-weight: 700;
}

.period-summary-table th:nth-child(2),
.period-summary-table th:nth-child(3),
.period-summary-table td:nth-child(2),
.period-summary-table td:nth-child(3) {
  text-align: center;
  width: 120px;
}

.period-summary-table td:first-child {
  color: #102d29;
  font-weight: 700;
  width: 170px;
}

.period-summary-table td:nth-child(2),
.period-summary-table td:nth-child(3) {
  font-variant-numeric: tabular-nums;
}

.period-summary-table td:last-child {
  color: var(--muted);
}

.period-summary-table th:last-child,
.period-summary-table td:last-child {
  border-right: 0;
}

.period-summary-table tbody tr:last-child td {
  border-bottom: 0;
}

.summary-day-card {
  background: #fff;
  border: 1px solid #dfe8e4;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  display: grid;
  min-width: 0;
  overflow: hidden;
}

.summary-day-card.is-selected {
  border-color: rgba(22, 121, 111, 0.38);
  box-shadow: 0 12px 30px rgba(22, 121, 111, 0.09);
}

.summary-day-head {
  align-items: center;
  background: rgba(251, 253, 252, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid #dfe8e4;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 12px 14px;
}

.summary-day-main {
  align-items: stretch;
  display: grid;
  flex: 1;
  gap: 14px;
  grid-template-columns: minmax(120px, auto) minmax(280px, 1fr);
  min-width: 0;
}

.summary-date-block {
  align-self: center;
}

.summary-day-side {
  align-items: flex-end;
  display: grid;
  gap: 7px;
  justify-items: end;
}

.summary-day-head span,
.summary-remark-field span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 4px;
}

.summary-day-head h4 {
  color: #102d29;
  font-size: 19px;
  line-height: 1.1;
  margin: 0;
}

.summary-remark-field {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.summary-remark-field textarea {
  background: #fff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
  color: var(--ink);
  min-height: 42px;
  padding: 8px 10px;
  resize: vertical;
  width: 100%;
}

.summary-remark-field textarea:focus,
.summary-manual-count:focus {
  border-color: rgba(22, 121, 111, 0.65);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.1);
  outline: none;
}

.summary-day-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.summary-day-pill {
  align-items: baseline;
  background: #fff;
  border: 1px solid #dce7e3;
  border-radius: var(--radius);
  display: inline-flex;
  gap: 8px;
  padding: 7px 10px;
}

.summary-day-pill em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.summary-day-pill strong {
  color: var(--ink);
  font-size: 14px;
}

.summary-save-state {
  color: var(--muted);
  font-size: 12px;
  min-height: 16px;
}

.summary-save-state[data-state="saved"] {
  color: var(--teal);
}

.summary-save-state[data-state="error"] {
  color: var(--coral);
}

.summary-day-body {
  display: grid;
  gap: 12px;
  padding: 12px;
}

.summary-data-block {
  background: #fff;
  border: 1px solid #e2ebe7;
  border-radius: 8px;
  overflow: hidden;
}

.summary-block-title {
  align-items: center;
  background: #fbfcfb;
  border-bottom: 1px solid #e2ebe7;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 9px 12px;
}

.summary-block-title strong {
  color: #233431;
  font-size: 15px;
}

.summary-block-title span {
  color: var(--muted);
  font-size: 12px;
}

.summary-table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: auto;
}

.summary-data-block .summary-table-wrap {
  border: 0;
  border-radius: 0;
}

.summary-wide-wrap {
  max-width: 100%;
}

.summary-wide-wrap::-webkit-scrollbar {
  height: 10px;
}

.summary-wide-wrap::-webkit-scrollbar-track {
  background: #edf3f1;
}

.summary-wide-wrap::-webkit-scrollbar-thumb {
  background: #a9b8b3;
  border: 2px solid #edf3f1;
  border-radius: 999px;
}

.summary-wide-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.daily-fields-table {
  min-width: 0;
  --summary-type-width: 86px;
}

.brand-fields-table {
  min-width: 0;
  --summary-type-width: 92px;
}

.summary-wide-table th,
.summary-wide-table td {
  background: #fff;
  border-bottom: 1px solid #e5ece9;
  border-right: 1px solid #e5ece9;
  font-size: 13px;
  line-height: 1.35;
  padding: 8px 9px;
  text-align: center;
}

.summary-wide-table th {
  background: #edf4f1;
  color: #35423f;
  font-weight: 700;
  overflow-wrap: anywhere;
  vertical-align: middle;
  white-space: normal;
}

.summary-wide-table td {
  white-space: nowrap;
}

.summary-wide-table th:first-child,
.summary-wide-table td:first-child {
  border-left: 0;
}

.summary-wide-table th:last-child,
.summary-wide-table td:last-child {
  border-right: 0;
}

.summary-wide-table tbody tr:last-child td {
  border-bottom: 0;
}

.summary-wide-table .type-head,
.summary-wide-table .type-cell {
  background: #f7faf9;
  color: #51615d;
  font-weight: 700;
  min-width: var(--summary-type-width, 86px);
  text-align: center;
  width: var(--summary-type-width, 86px);
}

.summary-manual-count {
  background: #fff;
  border: 1px solid #cfe0da;
  border-radius: 7px;
  color: var(--ink);
  font-weight: 700;
  max-width: 74px;
  padding: 5px 7px;
  text-align: center;
  width: 100%;
}

.summary-wide-table tbody tr.is-selected td,
.summary-wide-table tbody tr.is-selected .type-cell {
  background: #eff9f7;
}

.summary-wide-table td {
  font-variant-numeric: tabular-nums;
}

.agent-page {
  display: grid;
  gap: 16px;
}

.agent-page-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow-soft);
}

.agent-page-head h3 {
  margin: 0;
  font-size: 20px;
}

.agent-refresh {
  align-items: center;
  display: flex;
  gap: 12px;
}

.agent-refresh span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.agent-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(520px, 1.4fr);
  gap: 16px;
  align-items: start;
}

.agent-card,
.agent-config,
.agent-old-orders,
.agent-output {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.agent-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.compact-agent-card {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr) minmax(220px, auto);
}

.agent-avatar {
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--indigo), var(--violet));
  color: #fff;
  font-size: 22px;
  font-weight: 800;
}

.agent-main h4 {
  margin: 0 0 8px;
  font-size: 22px;
}

.agent-main p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.agent-status {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fbfa;
  color: var(--muted);
  padding: 10px 12px;
  font-size: 13px;
  min-width: 0;
}

.agent-status-row {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
  margin-top: 12px;
}

.agent-interval {
  align-items: center;
  background: #f6f8fb;
  border: 1px solid #dfe7ee;
  border-radius: var(--radius);
  color: #51615d;
  display: flex;
  font-size: 13px;
  font-weight: 700;
  min-height: 38px;
  padding: 0 12px;
  white-space: nowrap;
}

.agent-status[data-state="ready"] {
  border-color: rgba(22, 121, 111, 0.28);
  color: var(--teal);
  background: rgba(22, 121, 111, 0.06);
}

.agent-status[data-state="running"] {
  border-color: rgba(66, 88, 168, 0.28);
  color: var(--indigo);
  background: rgba(66, 88, 168, 0.06);
}

.agent-status[data-state="missing"] {
  border-color: rgba(214, 95, 76, 0.28);
  color: var(--coral);
  background: rgba(214, 95, 76, 0.06);
}

.agent-actions {
  display: grid;
  grid-template-columns: minmax(160px, 1fr);
  gap: 10px;
  min-width: 160px;
}

.agent-work-status {
  align-items: center;
  background: rgba(31, 122, 112, 0.08);
  border: 1px solid rgba(31, 122, 112, 0.3);
  border-radius: var(--radius);
  color: #1f7a70;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.agent-work-status[data-state="recovering"] {
  background: rgba(66, 88, 168, 0.08);
  border-color: rgba(66, 88, 168, 0.3);
  color: var(--indigo);
}

.crawler-worker-status-section {
  display: grid;
  gap: 12px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.crawler-worker-status-head,
.crawler-worker-status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crawler-worker-status-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.crawler-worker-status-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.crawler-worker-status-summary {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef3f2;
  color: #53635f;
  font-size: 12px;
  font-weight: 800;
}

.crawler-worker-status-summary[data-state="online"] {
  background: #e7f6ef;
  color: #167a59;
}

.crawler-worker-status-summary[data-state="warning"] {
  background: #fff3dd;
  color: #9a6618;
}

.crawler-worker-status-summary[data-state="offline"],
.crawler-worker-status-summary[data-state="failed"] {
  background: #f9e9e6;
  color: #a14b43;
}

.crawler-worker-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.crawler-worker-status-card {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce7e3;
  border-radius: 12px;
  background: #f8fbfa;
}

.crawler-worker-status-card-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.crawler-worker-status-card-head strong {
  color: var(--ink);
  font-size: 14px;
}

.crawler-worker-status-card-head span,
.crawler-worker-status-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.crawler-worker-status-card-head b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
}

.crawler-worker-status-card p {
  margin: 0;
  color: #425450;
  font-size: 12px;
}

.crawler-worker-status-card[data-state="online"] {
  border-color: #b9ddcf;
  background: #f3fbf7;
}

.crawler-worker-status-card[data-state="online"] .crawler-worker-status-card-head b {
  background: #dff3e9;
  color: #167a59;
}

.crawler-worker-status-card[data-state="offline"],
.crawler-worker-status-card[data-state="failed"] {
  border-color: #ecc8c4;
  background: #fdf4f2;
}

.crawler-worker-status-card[data-state="offline"] .crawler-worker-status-card-head b,
.crawler-worker-status-card[data-state="failed"] .crawler-worker-status-card-head b {
  background: #f6dfdc;
  color: #a14b43;
}

.crawler-worker-status-card[data-state="missing"] .crawler-worker-status-card-head b {
  background: #e8eeec;
  color: #61706c;
}

.agent-config {
  padding: 18px;
}

.agent-old-orders {
  padding: 18px;
}

.agent-workspace-grid {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(520px, 1.25fr) minmax(320px, 0.75fr);
}

.agent-old-orders .panel-head p,
.agent-output .panel-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.old-order-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.75fr) minmax(340px, 1.25fr);
  gap: 14px;
}

.old-order-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.old-order-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  resize: vertical;
  outline: none;
}

.old-order-grid textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.old-order-summary {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.state-counts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.state-counts span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  color: var(--muted);
  padding: 10px;
  font-size: 12px;
}

.state-counts strong {
  display: block;
  color: var(--ink);
  font-size: 22px;
  margin-bottom: 2px;
}

.config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.config-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.config-grid input,
.config-grid select,
.config-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

.config-grid textarea {
  min-height: 90px;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.45;
}

.config-grid input:focus,
.config-grid select:focus,
.config-grid textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.wide-field {
  grid-column: 1 / -1;
}

.agent-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.agent-output {
  min-width: 0;
  padding: 18px;
}

.wide-output {
  grid-column: 1 / -1;
}

.run-result,
.recent-orders {
  color: var(--muted);
  min-height: 42px;
}

.run-mode {
  color: var(--ink);
  font-weight: 700;
  margin-bottom: 12px;
}

.run-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 8px;
}

.run-stats span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfb;
  padding: 10px;
  color: var(--muted);
  font-size: 12px;
}

.run-stats strong {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 2px;
}

.mini-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

.mini-table th,
.mini-table td {
  border-bottom: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  font-size: 13px;
  vertical-align: top;
}

.mini-table th {
  color: #46524f;
  background: var(--surface-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.mini-table td {
  color: var(--ink);
  word-break: break-word;
}

.recheck-records-table {
  min-width: 1360px;
}

.risk-recheck-head {
  align-items: center;
}

.risk-recheck-page {
  display: grid;
  gap: 18px;
}

.risk-recheck-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.risk-recheck-status-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(360px, 1.2fr);
  gap: 12px;
}

.risk-recheck-status-card {
  display: grid;
  align-content: start;
  gap: 7px;
  min-height: 112px;
  padding: 15px 16px;
  border: 1px solid #d9e6e2;
  border-radius: 12px;
  background: linear-gradient(145deg, #f6faf8, #fff);
}

.risk-recheck-status-card > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.risk-recheck-status-card p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.risk-recheck-worker-status-section {
  display: grid;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid #d9e6e2;
  border-radius: 12px;
  background: #fbfdfc;
}

.risk-recheck-worker-status-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.risk-recheck-worker-status-head h4 {
  margin: 0 0 4px;
  color: var(--ink);
}

.risk-recheck-worker-status-head p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.risk-recheck-worker-status-summary {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #edf3f1;
  color: #53615d;
  font-size: 12px;
  font-weight: 800;
}

.risk-recheck-worker-status-summary[data-state="completed"],
.risk-recheck-worker-status-summary[data-state="online"] {
  background: #e7f6ef;
  color: #167a59;
}

.risk-recheck-worker-status-summary[data-state="running"] {
  background: #e7f2fb;
  color: #246a9a;
}

.risk-recheck-worker-status-summary[data-state="failed"] {
  background: #f9e9e6;
  color: #a14b43;
}

.risk-recheck-worker-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.risk-recheck-worker-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid #dce7e3;
  border-radius: 11px;
  background: #fff;
}

.risk-recheck-worker-card[data-health-state="failed"] {
  border-color: #ecc8c4;
  background: #fff7f6;
}

.risk-recheck-worker-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.risk-recheck-worker-card-head > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.risk-recheck-worker-card-head span,
.risk-recheck-worker-card > small {
  color: var(--muted);
  font-size: 11px;
}

.risk-recheck-worker-card-head b {
  flex: 0 0 auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf3f1;
  color: #53615d;
  font-size: 11px;
}

.risk-recheck-worker-card-head b[data-state="claimed"] {
  background: #e7f2fb;
  color: #246a9a;
}

.risk-recheck-worker-card-head b[data-state="completed"] {
  background: #e7f6ef;
  color: #167a59;
}

.risk-recheck-worker-card-head b[data-state="failed"],
.risk-recheck-worker-card-head b[data-state="canceled"] {
  background: #f9e9e6;
  color: #a14b43;
}

.risk-recheck-worker-connection {
  font-size: 12px;
  font-weight: 700;
}

.risk-recheck-worker-connection[data-state="online"] {
  color: #167a59;
}

.risk-recheck-worker-connection[data-state="offline"],
.risk-recheck-worker-connection[data-state="failed"] {
  color: #a14b43;
}

.risk-recheck-worker-task-meta {
  display: grid;
  gap: 5px;
  margin: 2px 0 0;
}

.risk-recheck-worker-task-meta > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 8px;
  font-size: 11px;
  line-height: 1.45;
}

.risk-recheck-worker-task-meta dt {
  color: var(--muted);
}

.risk-recheck-worker-task-meta dd {
  min-width: 0;
  margin: 0;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.risk-recheck-worker-error {
  padding: 7px 8px;
  border-radius: 8px;
  background: #fdf1ef;
  color: #a5443c;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.risk-connection-badge {
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 13px;
}

.risk-connection-badge[data-state="online"] {
  background: #e3f5ee;
  color: #167a59;
}

.risk-connection-badge[data-state="warning"] {
  background: #fff4d8;
  color: #8b6500;
}

.risk-connection-badge[data-state="offline"],
.risk-connection-badge[data-state="failed"] {
  background: #f7e9e7;
  color: #a14b43;
}

.risk-recheck-status {
  display: block;
  margin: 0;
  padding: 9px 11px;
  border: 1px solid #dce8e4;
  border-radius: 9px;
  background: #f5f9f8;
  color: var(--muted);
  font-size: 12px;
}

.risk-recheck-status[data-state="running"] {
  border-color: #a8d9c7;
  background: #e8f7f1;
  color: #157155;
}

.risk-recheck-status[data-state="failed"] {
  border-color: #ecc8c4;
  background: #fdf1ef;
  color: #a5443c;
}

.risk-recheck-status[data-state="completed"] {
  border-color: #c7ddcf;
  background: #f0f8f3;
  color: #2c684b;
}

.risk-recheck-filter-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #dce7e3;
  border-radius: 12px;
  background: #fbfdfc;
}

.risk-recheck-filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
}

.risk-recheck-filters label {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.risk-recheck-filters select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background-color: #fff;
  color: var(--ink);
}

.risk-recheck-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.risk-recheck-table-wrap {
  max-height: calc(100vh - 330px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.risk-recheck-table {
  min-width: 1480px;
}

.risk-recheck-pagination {
  margin: 0;
  padding: 0 2px;
  border-bottom: 0;
}

.risk-recheck-table th:nth-child(2),
.risk-recheck-table th:nth-child(3),
.risk-recheck-table th:nth-child(5),
.risk-recheck-table td:nth-child(2),
.risk-recheck-table td:nth-child(3),
.risk-recheck-table td:nth-child(5) {
  white-space: nowrap;
}

.risk-recheck-table th:nth-child(6),
.risk-recheck-table td:nth-child(6) {
  min-width: 260px;
}

.risk-recheck-table th:nth-child(7),
.risk-recheck-table td:nth-child(7),
.risk-recheck-table th:nth-child(9),
.risk-recheck-table td:nth-child(9) {
  min-width: 220px;
}

@media (max-width: 720px) {
  .crawler-worker-status-head {
    align-items: stretch;
    flex-direction: column;
  }

  .crawler-worker-status-summary {
    width: fit-content;
  }

  .crawler-worker-status-grid {
    grid-template-columns: 1fr;
  }

  .risk-recheck-head,
  .risk-recheck-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-recheck-status-grid {
    grid-template-columns: 1fr;
  }

  .risk-recheck-worker-status-head {
    align-items: stretch;
    flex-direction: column;
  }

  .risk-recheck-worker-status-summary {
    width: fit-content;
  }

  .risk-recheck-worker-status-grid {
    grid-template-columns: 1fr;
  }

  .risk-recheck-filters {
    grid-template-columns: 1fr;
  }

  .risk-recheck-filter-summary {
    align-items: stretch;
    flex-direction: column;
  }
}

.rrz-order-list {
  display: grid;
  gap: 6px;
  overflow-x: auto;
}

.rrz-order-card {
  background: #fff;
  border: 1px solid #dfe7e3;
  border-radius: 6px;
  box-shadow: 0 3px 10px rgba(16, 24, 20, 0.045);
  min-width: 0;
  overflow: hidden;
}

.rrz-order-head {
  align-items: flex-start;
  background: #fbfdfc;
  border-bottom: 1px solid #dfe7e3;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 5px 7px;
}

.rrz-order-head h4 {
  color: var(--ink);
  font-size: 12px;
  margin: 2px 0 1px;
}

.rrz-order-head p,
.rrz-head-customer span {
  color: #5f6b67;
  font-size: 9.5px;
  margin: 0;
}

.rrz-head-customer {
  display: grid;
  gap: 1px;
  min-width: 105px;
  text-align: right;
}

.rrz-head-customer .handled-button,
.rrz-head-customer .handled-status {
  justify-self: end;
  margin-top: 5px;
}

.rrz-head-customer .handled-status {
  color: var(--green);
  font-size: 12px;
}

.rrz-head-customer strong {
  color: var(--ink);
  font-size: 10.5px;
}

.rrz-section {
  border-bottom: 1px solid #dfe7e3;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  padding: 0;
}

.rrz-section h4 {
  align-items: center;
  background: #fbfdfc;
  border-right: 1px solid #edf2ef;
  color: #2e3b37;
  display: flex;
  font-size: 10px;
  line-height: 1;
  margin: 0;
  padding: 5px;
}

.rrz-grid {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(105px, 148px));
  justify-content: start;
  padding: 3px 5px;
}

.rrz-grid.product-grid,
.rrz-grid.customer-grid,
.rrz-grid.cert-grid,
.rrz-grid.logistics-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 165px));
}

.rrz-field {
  background: #fff;
  border: 1px solid #edf2ef;
  border-radius: 4px;
  min-width: 0;
  padding: 3px 4px;
}

.rrz-field.wide {
  grid-column: span 2;
}

.rrz-field.full {
  grid-column: 1 / -1;
}

.rrz-field span,
.rrz-long-block span {
  color: #6b7773;
  display: block;
  font-size: 8.5px;
  line-height: 1.1;
  margin-bottom: 1px;
}

.rrz-field strong {
  color: var(--ink);
  display: block;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.rrz-field.strong strong {
  font-weight: 800;
}

.rrz-field.muted-value strong {
  color: #5f6b67;
  font-weight: 600;
}

.rrz-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  grid-column: 1 / -1;
  padding: 0;
}

.rrz-tags span {
  background: #eef5f2;
  border: 1px solid #d3e3dd;
  border-radius: 4px;
  color: #1f544d;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.2;
  padding: 2px 4px;
}

.rrz-tag-strip {
  border-bottom: 1px solid #dfe7e3;
  padding: 3px 5px 3px 51px;
}

.rrz-risk-layout {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 165px));
  justify-content: start;
  padding: 3px 5px;
}

.rrz-risk-layout .rrz-long-block {
  grid-column: span 2;
}

.rrz-long-block {
  background: #fff;
  border: 1px solid #edf2ef;
  border-radius: 4px;
  min-width: 0;
  padding: 3px 4px;
}

.rrz-long-block p {
  color: var(--ink);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.3;
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.rrz-raw-detail {
  padding: 4px 7px 5px;
}

.rrz-raw-detail summary {
  color: var(--teal);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
}

.rrz-raw-detail pre {
  background: #f7faf8;
  border: 1px solid #dfe7e3;
  border-radius: 6px;
  color: var(--ink);
  font-family: inherit;
  font-size: 10px;
  line-height: 1.35;
  margin: 5px 0 0;
  max-height: 420px;
  overflow: auto;
  padding: 6px;
  white-space: pre-wrap;
}

.rrz-mini-field-table {
  display: grid;
  gap: 3px;
  grid-template-columns: repeat(auto-fill, minmax(118px, 165px));
  justify-content: start;
  padding: 3px 5px;
}

.rrz-mini-field {
  background: #fff;
  border: 1px solid #edf2ef;
  border-radius: 4px;
  min-width: 0;
  padding: 3px 4px;
}

.rrz-mini-field span {
  color: #6b7773;
  display: block;
  font-size: 8.5px;
  line-height: 1.25;
  margin-bottom: 1px;
}

.rrz-mini-field strong {
  color: var(--ink);
  display: block;
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#aiEmployeesSection .agent-page {
  gap: 8px;
}

#aiEmployeesSection .agent-output {
  padding: 7px;
}

#aiEmployeesSection .agent-output > .panel-head {
  margin-bottom: 5px;
}

#aiEmployeesSection .agent-output > .panel-head h3 {
  font-size: 15px;
  margin: 0;
}

#aiEmployeesSection .agent-output > .panel-head p {
  font-size: 10px;
  margin-top: 2px;
}

.recheck-record-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 10px;
  padding: 10px 12px;
  border: 1px solid #dce8e4;
  border-radius: 12px;
  background: #f5f9f8;
}

.recheck-order-search,
.recheck-manager-filter,
.recheck-page-size {
  display: grid;
  gap: 5px;
}

.recheck-order-search {
  width: min(420px, 100%);
}

.recheck-order-search span,
.recheck-manager-filter span,
.recheck-page-size span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.recheck-order-search input,
.recheck-manager-filter select,
.recheck-page-size select,
.recheck-page-jump input {
  min-height: 38px;
  border: 1px solid #cddbd7;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
}

.recheck-order-search input {
  width: 100%;
  padding: 0 12px;
}

.recheck-page-size select {
  min-width: 96px;
  padding: 0 9px;
}

.recheck-manager-filter select {
  min-width: 140px;
  padding: 0 9px;
}

.recheck-record-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 3px 12px 10px;
  border-bottom: 1px solid #e0e9e6;
}

.recheck-page-summary {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.recheck-page-summary strong {
  color: var(--ink);
}

.recheck-page-actions,
.recheck-page-jump {
  display: flex;
  align-items: center;
  gap: 7px;
}

.recheck-page-actions button {
  min-height: 34px;
  padding: 6px 10px;
}

.recheck-page-jump {
  margin-left: 4px;
  color: var(--muted);
  font-size: 12px;
}

.recheck-page-jump input {
  width: 64px;
  min-height: 34px;
  padding: 0 8px;
  text-align: center;
}

.recheck-empty-state {
  padding: 34px 16px;
  border: 1px dashed #cfddd9;
  border-radius: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  .recheck-record-toolbar,
  .recheck-record-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .recheck-page-actions {
    flex-wrap: wrap;
  }

  .rrz-section {
    display: block;
  }

  .rrz-section h4 {
    border-right: 0;
    border-bottom: 1px solid #edf2ef;
    padding: 4px 6px;
  }

  .rrz-tag-strip {
    padding-left: 5px;
  }
}

.project-summary-preview {
  max-height: 7.5em;
  min-height: 5.5em;
  overflow-y: auto;
  margin: 12px 0 22px;
  padding: 14px 16px;
  border: 1px solid #d7e4e5;
  border-radius: 12px;
  color: #334d52;
  line-height: 1.6;
  background: #f7fbfb;
}

.project-summary-preview.has-fde {
  max-height: min(520px, 55vh);
  padding: 0;
  background: #fff;
}

.project-fde-brief {
  display: grid;
}

.project-fde-section + .project-fde-section {
  border-top: 1px solid #dfe8e5;
}

.project-fde-section > header {
  padding: 12px 16px;
  background: #f3f7f5;
}

.project-fde-section > header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-fde-section > header span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.project-fde-section > header small {
  color: var(--muted);
  white-space: nowrap;
}

.project-fde-answer {
  display: grid;
  grid-template-columns: 74px minmax(220px, 0.7fr) minmax(300px, 1.3fr);
  gap: 14px;
  padding: 14px 16px;
  border-top: 1px solid #edf2ef;
}

.project-fde-answer > div {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.project-fde-answer > div span,
.project-fde-answer > div strong {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
}

.project-fde-answer > div strong {
  padding: 2px 5px;
  border-radius: 4px;
  color: #815714;
  background: #fff2cf;
}

.project-fde-answer h6,
.project-fde-answer p {
  margin: 0;
  letter-spacing: 0;
}

.project-fde-answer h6 {
  color: #29423c;
  font-size: 13px;
  line-height: 1.55;
}

.project-fde-answer p {
  color: #435d57;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.project-fde-modal-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #d7e4e0;
  border-radius: 8px;
}

.project-summary-modal {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 28px;
  background: rgba(14, 31, 34, 0.55);
  backdrop-filter: blur(4px);
}

.project-summary-modal.hidden {
  display: none;
}

.project-summary-modal-card {
  width: min(900px, 92vw);
  height: min(720px, 86vh);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(7, 28, 32, 0.24);
}

.project-summary-modal-card textarea {
  flex: 1;
  width: 100%;
  min-height: 0;
  resize: none;
  padding: 18px;
  border: 1px solid #ceddde;
  border-radius: 12px;
  font: inherit;
  line-height: 1.7;
}

.parallel-gate-status {
  display: inline-flex;
  gap: 8px;
  margin-right: 10px;
}

.parallel-gate-status span {
  padding: 8px 12px;
  border-radius: 999px;
  color: #6b7d80;
  background: #edf3f3;
}

.parallel-gate-status span.is-ready {
  color: #277545;
  background: #e5f5e9;
}

.requirement-stage-card {
  border-left: 3px solid #6ea8aa;
}

.project-requirement-upload-list.delivery-requirement-list {
  grid-template-columns: minmax(0, 1fr);
}

.delivery-requirement-list .requirement-stage-card {
  width: 100%;
}

.delivery-requirement-list .project-milestone {
  grid-template-columns: auto minmax(220px, 1fr) minmax(110px, auto) auto auto;
}

.delivery-requirement-list .project-milestone-form {
  grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.7fr) 150px auto;
}

.requirement-delivery-tools {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed #ceddde;
}

.requirement-delivery-tools form[data-form="replace-requirement-attachment"] {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px dashed #76aeb0;
  border-radius: 9px;
  color: #1f6f72;
  cursor: pointer;
}

.compact-file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.requirement-source-file {
  display: block;
  width: fit-content;
  margin-top: 8px;
  color: #29777a;
  font-size: 12px;
}

.project-detail-columns > .project-detail-section {
  min-width: 0;
}

.project-detail-columns .project-inline-form,
.project-detail-columns .project-module-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-detail-columns .project-inline-form > h5,
.project-detail-columns .project-inline-form > button {
  grid-column: 1 / -1;
}

.project-stage-stack {
  display: grid;
  gap: 16px;
}

.project-stage-stack > .project-detail-section {
  min-width: 0;
}

.project-stage-stack .project-inline-form {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.project-stage-stack .project-module-form {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-stage-stack .project-inline-form > h5,
.project-stage-stack .project-inline-form > button {
  grid-column: 1 / -1;
}

.project-stage-stack .project-module-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-checklist-chip {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-top: 7px;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 999px;
  color: #176b6e;
  background: #dceeee;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-checklist-chip.is-unlinked {
  color: #99651c;
  background: #fff0d5;
}

@media (max-width: 900px) {
  .project-stage-stack .project-inline-form,
  .project-stage-stack .project-module-form,
  .project-stage-stack .project-module-grid {
    grid-template-columns: 1fr;
  }
}

.project-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #f0cfd2;
  border-radius: 12px;
  background: #fffafa;
}

.project-danger-zone > div {
  display: grid;
  gap: 4px;
}

.project-danger-zone small {
  color: #8a6064;
}

.project-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 1700;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 26, 28, 0.62);
  backdrop-filter: blur(4px);
}

.project-delete-modal.hidden {
  display: none;
}

.project-delete-modal-card {
  width: min(520px, 94vw);
  display: grid;
  gap: 16px;
  padding: 22px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(12, 24, 26, 0.28);
}

.project-delete-modal-card > p {
  margin: 0;
  color: #5c6d70;
  line-height: 1.6;
}

.project-delete-modal-card label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.project-delete-modal-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #e2bfc3;
  border-radius: 10px;
  font: inherit;
}

.project-delete-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.project-delete-actions .danger-button {
  padding: 10px 14px;
  border: 1px solid #d84d57;
  border-radius: 9px;
  cursor: pointer;
}

.project-delete-error {
  min-height: 20px;
  color: #d84d57 !important;
}

.rrz-all-fields {
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  padding: 7px;
}

.rrz-all-fields .rrz-section,
.rrz-all-fields .rrz-grid,
.rrz-all-fields .rrz-mini-field-table,
.rrz-all-fields .rrz-risk-layout {
  display: contents;
}

.rrz-all-fields .rrz-section h4 {
  display: none;
}

.rrz-all-fields .rrz-tag-strip {
  border: 0;
  grid-column: 1 / -1;
  padding: 1px 0;
}

.rrz-all-fields .rrz-raw-detail {
  grid-column: 1 / -1;
}

.rrz-order-card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.03),
    0 8px 22px rgba(28, 28, 30, 0.045);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.rrz-order-card:hover {
  border-color: rgba(0, 122, 255, 0.2);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.035),
    0 10px 28px rgba(28, 28, 30, 0.065);
}

.rrz-order-head {
  align-items: flex-start;
  background: linear-gradient(180deg, #fbfbfd 0%, #f7f8fa 100%);
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  padding: 8px 9px 7px;
}

.rrz-order-head > div:first-child {
  min-width: 0;
}

.rrz-order-head .status-badge {
  background: rgba(52, 199, 89, 0.13);
  border: 1px solid rgba(52, 199, 89, 0.18);
  border-radius: 999px;
  color: #248a3d;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

.rrz-head-state-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.rrz-store-badge {
  background: rgba(0, 122, 255, 0.09);
  border: 1px solid rgba(0, 122, 255, 0.16);
  border-radius: 999px;
  color: #1769aa;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

.rrz-store-badge[data-state="missing"] {
  background: rgba(255, 149, 0, 0.1);
  border-color: rgba(255, 149, 0, 0.18);
  color: #9a5d00;
}

.rrz-assignee-badge {
  background: rgba(48, 176, 199, 0.11);
  border: 1px solid rgba(48, 176, 199, 0.2);
  border-radius: 999px;
  color: #176d7a;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  padding: 4px 7px;
}

.rrz-head-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 5px 0 4px;
  max-width: 100%;
}

.rrz-head-tags span {
  background: rgba(0, 122, 255, 0.08);
  border: 1px solid rgba(0, 122, 255, 0.12);
  border-radius: 999px;
  color: #1769aa;
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 3px 6px;
}

.rrz-head-tags span:nth-child(3n + 2) {
  background: rgba(88, 86, 214, 0.08);
  border-color: rgba(88, 86, 214, 0.12);
  color: #514db5;
}

.rrz-head-tags span:nth-child(3n) {
  background: rgba(255, 149, 0, 0.09);
  border-color: rgba(255, 149, 0, 0.14);
  color: #9a5d00;
}

.rrz-head-tags span.renewal {
  background: rgba(0, 122, 255, 0.12);
  border-color: rgba(0, 122, 255, 0.24);
  color: #0a63b8;
}

.rrz-head-tags span.purchased {
  background: rgba(255, 59, 48, 0.12);
  border-color: rgba(255, 59, 48, 0.24);
  color: #c62828;
}

.rrz-order-head h4 {
  color: #1c1c1e;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: 0.01em;
  margin: 2px 0;
}

.rrz-order-head p,
.rrz-head-customer span {
  color: #8e8e93;
  font-size: 9px;
}

.rrz-head-customer {
  gap: 2px;
  min-width: 112px;
}

.rrz-head-customer strong {
  color: #3a3a3c;
  font-size: 10.5px;
  font-weight: 650;
}

.rrz-all-fields .rrz-field,
.rrz-all-fields .rrz-mini-field,
.rrz-all-fields .rrz-long-block {
  background: #f7f7f9;
  border: 1px solid rgba(60, 60, 67, 0.085);
  border-radius: 8px;
  min-height: 34px;
  padding: 5px 6px;
  transition:
    background 160ms ease,
    border-color 160ms ease;
}

.rrz-all-fields .rrz-field:hover,
.rrz-all-fields .rrz-mini-field:hover,
.rrz-all-fields .rrz-long-block:hover {
  background: #fff;
  border-color: rgba(0, 122, 255, 0.18);
}

.rrz-all-fields .rrz-field span,
.rrz-all-fields .rrz-mini-field span,
.rrz-all-fields .rrz-long-block span {
  color: #8e8e93;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 2px;
}

.rrz-all-fields .rrz-field strong,
.rrz-all-fields .rrz-mini-field strong,
.rrz-all-fields .rrz-long-block p {
  color: #1c1c1e;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.28;
}

.rrz-all-fields .rrz-field.strong strong {
  font-weight: 720;
}

.rrz-all-fields .capture-stale {
  background: #fff5f5;
  border-color: rgba(198, 40, 40, 0.42);
}

.rrz-all-fields .capture-stale:hover {
  background: #fffafa;
  border-color: rgba(198, 40, 40, 0.62);
}

.rrz-all-fields .capture-stale strong,
.rrz-all-fields .capture-stale p,
.rrz-all-fields .rrz-capture-note {
  color: #c62828;
}

.rrz-all-fields .rrz-capture-note {
  font-size: inherit;
  font-weight: 650;
}

.rrz-all-fields .empty-value strong,
.rrz-all-fields .empty-value p {
  color: transparent;
  min-height: 12px;
  user-select: none;
}

.rrz-all-fields .rrz-field.wide {
  grid-column: span 2;
}

.rrz-all-fields .rrz-long-block {
  grid-column: span 3;
}

.rrz-raw-detail {
  border-top: 1px solid rgba(60, 60, 67, 0.08);
  margin-top: 1px;
  padding: 5px 9px 6px;
}

.rrz-raw-detail summary {
  color: #007aff;
  font-size: 9.5px;
  font-weight: 600;
}

@media (max-width: 1800px) {
  .rrz-all-fields {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }
}

@media (max-width: 1450px) {
  .rrz-all-fields {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }
}

@media (max-width: 1120px) {
  .rrz-all-fields {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .rrz-all-fields {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .rrz-all-fields .rrz-long-block {
    grid-column: span 2;
  }
}

@media (max-width: 560px) {
  .rrz-all-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrz-all-fields .rrz-long-block,
  .rrz-all-fields .rrz-field.wide {
    grid-column: span 2;
  }
}

/* Keep order groups readable when the advanced report adds many dynamic fields. */
.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields {
  gap: 12px;
  padding: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields > .rrz-section {
  border-color: var(--line);
  border-radius: var(--radius);
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields > .rrz-section > h4 {
  padding: 9px 12px;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-soft);
  color: var(--ink);
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-field,
.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-long-block {
  padding: 8px 12px;
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-field > span,
.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-long-block > span {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-field > strong,
.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-long-block > p {
  font-size: 13px;
  line-height: 1.65;
  color: var(--ink);
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .capture-stale strong,
.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .capture-stale p {
  color: #c62828;
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-risk-section,
.rrz-order-card-v2.rrz-order-card-v3 .rrz-report-advanced {
  grid-column: 1 / -1;
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-risk-layout {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rrz-order-card-v2.rrz-order-card-v3 .rrz-report-advanced {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.rrz-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.rrz-report-head > div { min-width: 0; }
.rrz-report-head h4 { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.5; }
.rrz-report-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.rrz-report-status { flex-shrink: 0; padding: 4px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--teal-strong); font-size: 12px; }

.rrz-report-overview,
.rrz-report-sections,
.rrz-report-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-width: 0;
}

.rrz-report-overview {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 1px;
  gap: 1px;
  border-bottom: 1px solid var(--line);
}

.rrz-report-sections { align-items: start; padding: 16px; gap: 16px; }
.rrz-report-section { min-width: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.rrz-report-section h5 { margin: 0; padding: 10px 12px; font-size: 14px; line-height: 1.5; color: var(--ink); background: var(--surface-soft); border-bottom: 1px solid var(--line); }
.rrz-report-fields { gap: 1px; padding: 1px; }
.rrz-report-suggestion { border-bottom: 1px solid var(--line); padding: 1px; }
.rrz-order-card-v2.rrz-order-card-v3 .rrz-report-suggestion .rrz-long-block { padding: 12px 16px; background: #f7fbf9; }
.rrz-report-empty { margin: 0; padding: 12px; color: var(--muted); font-size: 13px; }
.rrz-report-records { min-width: 0; }
.rrz-report-record + .rrz-report-record { border-top: 1px solid var(--line); }
.rrz-report-record h6 { margin: 0; padding: 9px 12px 0; font-size: 12px; font-weight: 600; color: var(--teal-strong); }
.rrz-report-record dl { margin: 0; padding: 9px 12px 12px; display: grid; gap: 8px; }
.rrz-report-record dl > div { display: grid; grid-template-columns: minmax(80px, 32%) minmax(0, 1fr); gap: 12px; }
.rrz-report-record dt { color: var(--muted); }
.rrz-report-record dd { margin: 0; color: var(--ink); white-space: pre-wrap; }
.rrz-report-record dt,
.rrz-report-record dd { min-width: 0; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }

@media (max-width: 1200px) {
  .rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .rrz-report-sections { grid-template-columns: minmax(0, 1fr); }
  .rrz-report-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields { grid-template-columns: minmax(0, 1fr); padding: 12px; }
  .rrz-order-card-v2.rrz-order-card-v3 .rrz-all-fields .rrz-risk-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rrz-report-head { align-items: flex-start; padding: 12px; gap: 8px; }
  .rrz-report-head h4 { font-size: 15px; }
  .rrz-report-sections { padding: 12px; gap: 12px; }
  .rrz-report-fields { grid-template-columns: minmax(0, 1fr); }
  .rrz-order-card-v2.rrz-order-card-v3 .rrz-report-fields .rrz-field.wide,
  .rrz-order-card-v2.rrz-order-card-v3 .rrz-report-fields .rrz-field.full { grid-column: 1 / -1; }
}

/* Order v4 uses rows instead of tall cards so complete reports can be scanned. */
.rrz-order-card-v2.rrz-order-card-v4 { border-radius: 10px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 12px;
}
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-overview { flex: 1 1 460px; }
.rrz-order-card-v4 .rrz-head-main { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.rrz-order-card-v4 .rrz-head-secondary { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 10px; margin-top: 3px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-number { display: flex; align-items: center; gap: 6px; min-width: 0; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-number small { font-size: 11px; letter-spacing: 0; white-space: nowrap; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-number h4 { margin: 0; font-size: 15px; line-height: 1.4; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-head-state-row > span { font-size: 11px; padding: 3px 6px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-head-tags { margin: 0; gap: 4px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-head-tags > span { padding: 2px 6px; font-size: 11px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-order-meta { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; margin: 0; font-size: 11px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-head-customer { display: flex; flex-wrap: wrap; align-items: center; width: auto; flex: 0 1 auto; border: 0; padding: 0; gap: 7px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-customer-identity { gap: 8px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-customer-identity .rrz-field { display: flex; align-items: baseline; gap: 5px; padding: 0; background: transparent; border: 0; box-shadow: none; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-customer-identity .rrz-field > span { margin: 0; font-size: 11px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-customer-identity .rrz-field > strong { margin: 0; font-size: 13px; }
.rrz-order-card-v4 .rrz-customer-identity .capture-stale strong { color: #c62828; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-order-controls,
.rrz-order-card-v2.rrz-order-card-v4 .ops-phone-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; padding: 0; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-order-controls { width: auto; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-phone-controls button { width: auto; min-height: 34px; padding: 6px 8px !important; font-size: 12px !important; }
.rrz-order-card-v2.rrz-order-card-v4 .handled-select { min-height: 34px; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-call-unavailable { flex-basis: 100%; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-card-note { order: 3; flex: 1 1 100%; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 6px; margin: 0; padding: 5px 0 0; border-top: 1px solid var(--line); }
.rrz-order-card-v2.rrz-order-card-v4 .ops-card-note > label { display: flex; align-items: center; gap: 8px; flex: 1 1 320px; font-size: 12px; white-space: nowrap; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-card-note textarea { min-height: 30px; height: 30px; margin: 0; padding: 4px 8px; font-size: 12px; line-height: 20px; border-radius: 6px; flex: 1; width: 100%; resize: vertical; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-card-note:focus-within textarea { height: 70px; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-card-note > button { min-height: 30px; padding: 4px 9px; font-size: 12px; }
.rrz-order-card-v2.rrz-order-card-v4 .ops-save-status { line-height: 30px; }
.rrz-order-card-v4 .ops-card-note .ops-note-text,
.rrz-order-card-v4 .ops-card-note > p { margin: 0; font-size: 12px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields { display: block; padding: 0; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields > .rrz-section { display: grid; grid-template-columns: 116px minmax(0,1fr); margin: 6px 8px; border: 1px solid #adcbbf; border-left: 3px solid var(--teal); border-radius: 6px; overflow: visible; background: #fbfdfc; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields > .rrz-section > h4 { display: flex; margin: 0; padding: 7px 10px; align-items: flex-start; font-size: 12px; font-weight: 650; color: var(--teal-strong); border: 0; border-right: 1px solid #c1d8cd; border-radius: 3px 0 0 3px; background: #e4f1ea; white-space: nowrap; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields > .rrz-section > h4::before { display: none; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-grid,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-risk-layout { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 16px; padding: 5px 10px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-long-block { display: flex; align-items: baseline; gap: 7px; padding: 1px 0; min-width: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field > span,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-long-block > span { flex-shrink: 0; margin: 0; font-size: 12px; line-height: 1.65; color: var(--muted); }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field > strong,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-long-block > p { min-width: 0; margin: 0; font-size: 13px; line-height: 1.65; font-weight: 500; color: var(--ink); }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field.full,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-long-block { flex-basis: 100%; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .capture-stale strong,
.rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .capture-stale p { color: #c62828; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-advanced { margin: 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; }
.rrz-order-card-v4 .rrz-report-head { padding: 7px 10px; gap: 8px; }
.rrz-order-card-v4 .rrz-report-head > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.rrz-order-card-v4 .rrz-report-head h4 { font-size: 14px; }
.rrz-order-card-v4 .rrz-report-head p { margin: 0; font-size: 11px; }
.rrz-order-card-v4 .rrz-report-status { padding: 2px 7px; font-size: 11px; }
.rrz-order-card-v4 .rrz-report-head > .rrz-report-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.rrz-report-toggle { min-height: 40px; padding: 6px 12px; border: 1px solid #a4c8b9; border-radius: 6px; background: #f5fbf7; color: var(--teal-strong); font-size: 12px; font-weight: 600; cursor: pointer; }
.rrz-report-toggle:hover { background: #e5f3eb; }
.rrz-report-toggle:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.rrz-report-body[hidden] { display: none !important; }
.rrz-order-card-v4 .rrz-report-overview { display: flex; flex-wrap: wrap; gap: 2px 18px; padding: 5px 10px; }
.rrz-order-card-v4 .rrz-report-suggestion { padding: 4px 10px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-suggestion .rrz-long-block { background: transparent; padding: 0; }
.rrz-order-card-v4 .rrz-report-sections { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0; padding: 0; align-items: stretch; }
.rrz-order-card-v4 .rrz-report-data-sections { display: grid; grid-template-columns: minmax(0,2fr) minmax(0,1fr); align-items: stretch; border-top: 1px solid #b7cfc3; }
.rrz-order-card-v4 .rrz-report-section { border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); border-radius: 0; }
.rrz-order-card-v4 .rrz-report-section:nth-child(2n) { border-right: 0; }
.rrz-order-card-v4 .rrz-report-section h5 { padding: 5px 10px; font-size: 12px; line-height: 1.6; }
.rrz-order-card-v4 .rrz-report-fields { display: grid; grid-template-columns: minmax(0,1fr); gap: 0; padding: 0; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field { display: grid; grid-template-columns: minmax(0,1fr) minmax(42px,22%); gap: 6px; padding: 2px 9px; border-bottom: 1px solid #e5eee9; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field > span { flex-shrink: 1; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field > strong { font-weight: 550; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field.risk-hit > strong { color: #a42f2f; font-weight: 700; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field.risk-clear > strong { color: var(--teal-strong); }
.rrz-order-card-v4 .rrz-report-section-table { grid-column: auto; }
.rrz-order-card-v4 .rrz-report-records { overflow: auto; max-width: 100%; }
.rrz-order-card-v4 .rrz-report-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rrz-order-card-v4 .rrz-report-table caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.rrz-order-card-v4 .rrz-report-table th,
.rrz-order-card-v4 .rrz-report-table td { padding: 5px 10px; border-bottom: 1px solid var(--line); text-align: left; line-height: 1.55; vertical-align: top; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 90px; max-width: 320px; }
.rrz-order-card-v4 .rrz-report-table th { background: var(--surface-soft); font-weight: 600; color: var(--muted); }
.rrz-order-card-v4 .rrz-report-table td { color: var(--ink); }
.rrz-order-card-v4 .rrz-report-record + .rrz-report-record { border: 0; }
.rrz-order-card-v4 .rrz-report-empty { padding: 7px 10px; font-size: 12px; }
.rrz-order-card-v2.rrz-order-card-v4 .rrz-raw-detail { padding: 5px 10px; }
@media(min-width: 1200px) {
  .rrz-order-card-v4 .rrz-report-fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .rrz-order-card-v4 .rrz-report-fields .rrz-field.full { grid-column: 1 / -1; }
}
@media(max-width: 820px) {
  .rrz-order-card-v4 .rrz-report-sections { grid-template-columns: minmax(0,1fr); }
  .rrz-order-card-v4 .rrz-report-data-sections { grid-template-columns: minmax(0,1fr); }
  .rrz-order-card-v4 .rrz-report-section { border-right: 0; }
}
@media(max-width: 600px) {
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-order-head { padding: 8px; gap: 7px; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-order-overview { flex-basis: 100%; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-head-customer { flex-basis: 100%; gap: 7px; }
  .rrz-order-card-v2.rrz-order-card-v4 .ops-phone-controls button,
  .rrz-order-card-v2.rrz-order-card-v4 .handled-select,
  .rrz-order-card-v2.rrz-order-card-v4 .ops-card-note > button { min-height: 44px; }
  .rrz-order-card-v2.rrz-order-card-v4 .ops-card-note > label { flex: 1 1 0; min-width: 0; }
  .rrz-order-card-v2.rrz-order-card-v4 .ops-card-note textarea { min-height: 44px; height: 44px; min-width: 0; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields > .rrz-section { grid-template-columns: minmax(0,1fr); }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields > .rrz-section > h4 { padding: 3px 8px; border-right: 0; border-bottom: 1px solid #c1d8cd; border-radius: 3px 3px 0 0; }
  .rrz-order-card-v4 .rrz-report-head { flex-wrap: wrap; }
  .rrz-report-toggle { min-height: 44px; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-grid,
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-risk-layout { padding: 5px 8px; gap: 4px 12px; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field > span { flex-shrink: 1; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-field.full > span { flex-shrink: 0; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-all-fields .rrz-long-block { display: block; }
  .rrz-order-card-v4 .rrz-report-table { min-width: 660px; }
  .rrz-order-card-v4 .rrz-report-overview .rrz-field { flex-basis: 100%; }
  .rrz-order-card-v2.rrz-order-card-v4 .rrz-report-fields .rrz-field { grid-template-columns: minmax(0,1fr) minmax(58px,25%); gap: 8px; }
}
@media(pointer: coarse) {
  .rrz-report-toggle { min-height: 44px; }
}

.recruitment-page {
  min-width: 0;
}

.recruitment-metrics {
  margin-bottom: 0;
}

.recruitment-workspace-grid {
  align-items: start;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recruitment-connector-card .agent-avatar {
  background: linear-gradient(145deg, var(--teal), var(--blue));
}

.ai-recruitment-panel {
  display: grid;
  gap: 14px;
}

.ai-job-form {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1.4fr) repeat(4, minmax(130px, 0.5fr));
}

.ai-job-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.ai-job-form input,
.ai-job-form textarea {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

.ai-job-form textarea {
  line-height: 1.5;
  resize: vertical;
}

.ai-job-form input:focus,
.ai-job-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.ai-plan-result {
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  min-height: 72px;
  padding: 14px;
}

.ai-plan-head {
  align-items: center;
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.ai-plan-head h4 {
  color: var(--ink);
  font-size: 18px;
  margin: 0 0 4px;
}

.ai-plan-head p,
.ai-plan-grid p,
.ai-plan-detail p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.ai-plan-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ai-plan-grid section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
  padding: 12px;
}

.ai-plan-grid strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
}

.ai-plan-grid ul {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  padding-left: 18px;
}

.ai-plan-detail {
  border-top: 1px solid var(--line);
  margin-top: 12px;
  padding-top: 10px;
}

.ai-plan-detail summary {
  color: var(--teal);
  cursor: pointer;
  font-weight: 800;
  margin-bottom: 8px;
}

.ai-plan-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.recruitment-form {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recruitment-form label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  font-weight: 700;
  gap: 6px;
  min-width: 0;
}

.recruitment-form input,
.recruitment-form select,
.recruitment-form textarea,
.candidate-stage-select {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

.recruitment-form textarea {
  line-height: 1.5;
  resize: vertical;
}

.recruitment-form input:focus,
.recruitment-form select:focus,
.recruitment-form textarea:focus,
.candidate-stage-select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.recruitment-card-list {
  display: grid;
  gap: 10px;
}

.recruitment-job-card {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
  padding: 14px;
}

.recruitment-job-card h4 {
  font-size: 18px;
  margin: 8px 0 4px;
}

.recruitment-job-card p {
  color: var(--muted);
  margin: 0;
}

.recruitment-job-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.publish-test-button {
  min-height: 34px;
  padding: 7px 12px;
}

.recruitment-job-metrics {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.recruitment-job-metrics span,
.score-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  display: block;
  font-size: 12px;
  padding: 9px 10px;
  text-align: center;
}

.recruitment-job-metrics strong,
.score-pill {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.recruitment-candidates-table {
  min-width: 1240px;
}

.candidate-stage-select {
  min-width: 116px;
  padding: 7px 9px;
}

.candidate-resume-button {
  min-height: 32px;
  padding: 7px 10px;
  white-space: nowrap;
}

.resume-text-block {
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.65;
  margin: 0;
  max-height: 420px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.activity-row {
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 4px;
  padding: 10px 0;
}

.activity-row:first-child {
  padding-top: 0;
}

.activity-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.activity-row strong {
  color: var(--ink);
  font-size: 14px;
}

.activity-row span {
  color: var(--muted);
  line-height: 1.45;
}

.activity-row em,
.muted {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.publish-draft-card {
  display: grid;
  gap: 12px;
}

.publish-field-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.publish-field-grid div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  padding: 10px;
}

.publish-field-grid span {
  color: var(--muted);
  font-size: 12px;
}

.publish-field-grid strong {
  color: var(--ink);
  font-size: 14px;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.workflow-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  padding: 14px;
}

.workflow-card h4,
.workflow-card p {
  margin: 0;
}

.workflow-card p {
  color: var(--muted);
}

.workflow-card ol,
.workflow-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.workflow-card li {
  margin: 4px 0;
}

.log-tail {
  max-height: 300px;
  margin: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111816;
  color: #dce7e3;
  padding: 12px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.work-board-page {
  display: grid;
  gap: 16px;
}

.work-board-head {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow-soft);
}

.work-board-head h3 {
  font-size: 22px;
  margin: 0;
}

.work-board-head p:last-child {
  color: var(--muted);
  margin: 6px 0 0;
}

.work-board-filters {
  display: grid;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.work-filter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.work-filter-head h3 {
  margin: 3px 0 0;
}

.work-filter-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
}

.work-filter-grid label {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.work-filter-grid input,
.work-filter-grid select {
  min-width: 0;
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

.work-filter-grid input:focus,
.work-filter-grid select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.work-filter-actions {
  display: flex;
  gap: 8px;
}

.work-board-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.work-metric {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  min-height: 96px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.work-metric span {
  color: var(--muted);
}

.work-metric strong {
  font-size: 28px;
  line-height: 1;
}

.work-board-grid {
  align-items: start;
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
}

.work-board-editor {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.work-item-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.work-item-form label {
  color: var(--muted);
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.work-item-form .full-row {
  grid-column: 1 / -1;
}

.work-item-form input,
.work-item-form select,
.work-item-form textarea,
.subtask-add input {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  min-width: 0;
  outline: none;
  padding: 10px 11px;
  width: 100%;
}

.work-item-form textarea {
  line-height: 1.55;
  resize: vertical;
}

.work-item-form input:focus,
.work-item-form select:focus,
.work-item-form textarea:focus,
.subtask-add input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.13);
}

.work-board-list-wrap {
  min-width: 0;
}

.work-board-message {
  position: fixed;
  top: 22px;
  left: 50%;
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: min(560px, calc(100vw - 32px));
  min-height: 46px;
  padding: 11px 18px;
  border: 1px solid rgba(22, 121, 111, 0.2);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 42px rgba(22, 32, 29, 0.2);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  transform: translate(-50%, -14px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 160ms ease,
    transform 180ms ease,
    visibility 160ms ease;
  backdrop-filter: blur(10px);
}

.work-board-message:not(:empty) {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
}

.work-board-message.success {
  border-color: rgba(26, 134, 84, 0.28);
  color: #176b45;
  background: rgba(239, 251, 245, 0.97);
}

.work-board-message.error {
  border-color: rgba(179, 38, 30, 0.24);
  color: #a52822;
  background: rgba(255, 246, 245, 0.98);
}

.work-board-list {
  display: grid;
  gap: 12px;
}

.work-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.project-filter-grid {
  grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
}

.work-board-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.project-health-card {
  position: relative;
  display: grid;
  grid-template-columns: 6px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.project-card-accent {
  background: var(--green);
}

.project-health-card.health-attention .project-card-accent {
  background: var(--amber);
}

.project-health-card.health-risk .project-card-accent {
  background: var(--coral);
}

.project-card-main {
  display: grid;
  gap: 17px;
  padding: 20px;
}

.project-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.project-card-heading > div:first-child {
  min-width: 0;
}

.project-card-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.project-card-title-row h4 {
  margin: 0;
  font-size: 20px;
}

.project-card-heading p {
  margin: 7px 0 0;
  color: var(--muted);
}

.project-health-rating {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: var(--green);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 6px 16px rgba(63, 143, 81, 0.22);
}

.health-attention .project-health-rating {
  background: var(--amber);
  box-shadow: 0 6px 16px rgba(191, 122, 31, 0.2);
}

.health-risk .project-health-rating {
  background: var(--coral);
  box-shadow: 0 6px 16px rgba(214, 95, 76, 0.22);
}

.project-health-label,
.project-priority,
.delivery-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.project-health-label {
  color: var(--green);
  background: rgba(63, 143, 81, 0.11);
}

.health-attention .project-health-label {
  color: var(--amber);
  background: rgba(191, 122, 31, 0.11);
}

.health-risk .project-health-label {
  color: var(--coral);
  background: rgba(214, 95, 76, 0.11);
}

.project-priority {
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.project-priority.priority-urgent {
  color: #a63d31;
  background: rgba(214, 95, 76, 0.1);
  border-color: rgba(214, 95, 76, 0.25);
}

.project-priority.priority-high {
  color: #995f15;
  background: rgba(191, 122, 31, 0.1);
  border-color: rgba(191, 122, 31, 0.25);
}

.project-progress-ring {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(var(--teal) var(--project-progress), #e7eeeb 0);
}

.project-progress-ring::before {
  content: "";
  position: absolute;
}

.project-progress-ring > span {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--surface);
}

.project-progress-ring strong {
  font-size: 18px;
}

.project-progress-ring small {
  color: var(--muted);
  font-size: 10px;
}

.project-time-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.project-time-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px 13px;
  border: 1px solid #e4ebe7;
  border-radius: 12px;
  background: var(--surface-soft);
}

.project-time-grid span,
.project-time-grid small {
  color: var(--muted);
  font-size: 12px;
}

.project-time-grid strong {
  font-size: 16px;
}

.project-time-grid .time-risk {
  color: var(--coral);
}

.project-stage-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.project-stage-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.project-stage-node strong {
  color: var(--ink);
}

.project-stage-node small {
  grid-column: 1 / -1;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-stage-node i,
.project-step-progress i,
.module-progress-line i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 5px;
  border-radius: 999px;
  background: #e5ece8;
}

.project-stage-node i b,
.project-step-progress i b,
.module-progress-line i b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.project-stage-node.is-current {
  color: var(--teal);
  border-color: rgba(22, 121, 111, 0.35);
  background: rgba(22, 121, 111, 0.05);
}

.project-stage-node.is-current i b,
.project-stage-node.is-done i b {
  background: var(--teal);
}

.project-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.work-legacy-stream {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.work-legacy-stream > summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 800;
}

.work-legacy-stream[open] > summary {
  margin-bottom: 14px;
}

.work-project-create-panel {
  width: min(1120px, 100%);
}

.fde-questionnaire {
  display: grid;
  gap: 0;
  margin-top: 8px;
  border-top: 2px solid #315f58;
}

.fde-questionnaire-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 14px;
}

.fde-questionnaire-head h4,
.fde-questionnaire-head p,
.fde-question-group-head h5,
.fde-question-group-head p,
.fde-question-copy h6,
.fde-question-copy p {
  margin: 0;
  letter-spacing: 0;
}

.fde-questionnaire-head h4 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.fde-progress {
  display: grid;
  grid-template-columns: auto 150px;
  align-items: center;
  gap: 10px;
  min-width: 210px;
}

.fde-progress strong {
  color: #315f58;
  font-size: 13px;
  white-space: nowrap;
}

.fde-progress > span {
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce6e2;
}

.fde-progress i {
  display: block;
  width: 0;
  height: 100%;
  background: #2f7a68;
  transition: width 180ms ease;
}

.fde-questionnaire-groups {
  display: grid;
  border: 1px solid #d8e3df;
  border-radius: 8px;
}

.fde-question-group + .fde-question-group {
  border-top: 1px solid #cfdcd7;
}

.fde-question-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  background: #f2f6f4;
}

.fde-question-group-head > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.fde-question-group-head > div > span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #315f58;
  font-size: 11px;
  font-weight: 800;
}

.fde-question-group-head h5 {
  color: #233d37;
  font-size: 14px;
}

.fde-question-group-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.fde-question-group-head > small {
  color: var(--muted);
  white-space: nowrap;
}

.fde-question-row {
  padding: 16px;
}

.fde-question-row + .fde-question-row {
  border-top: 1px solid #e6ece9;
}

.fde-question-copy {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.fde-question-index {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.fde-question-index span {
  color: #315f58;
  font-size: 13px;
  font-weight: 800;
}

.fde-question-index strong,
.fde-question-index small {
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 800;
}

.fde-question-index strong {
  color: #815714;
  background: #fff2cf;
}

.fde-question-index small {
  color: #56706a;
  background: #e8efec;
}

.fde-question-copy h6 {
  color: var(--ink);
  font-size: 14px;
  line-height: 1.55;
}

.fde-question-copy p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.personnel-editor-form .fde-answer-field {
  gap: 6px;
}

.fde-answer-editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: start;
}

.personnel-editor-form .fde-answer-editor textarea {
  min-height: 112px;
  padding: 12px 14px;
  border-radius: 6px;
  line-height: 1.65;
}

.fde-ai-button {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid #2f7a68;
  border-radius: 6px;
  color: #245f52;
  background: #eef7f3;
  font-size: 12px;
  font-weight: 800;
}

.fde-ai-button:hover:not(:disabled) {
  color: #fff;
  background: #2f7a68;
}

.fde-ai-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.fde-answer-field > small {
  min-height: 18px;
  color: #476d64;
  font-size: 11px;
}

.fde-agent {
  display: grid;
  gap: 14px;
  margin-top: 8px;
  padding-top: 18px;
  border-top: 2px solid #315f58;
}

.fde-agent-head,
.fde-agent-status,
.fde-agent-status > div,
.fde-agent-conversation > header,
.fde-agent-evidence > header,
.fde-agent-gate,
.fde-agent-gate > div,
.fde-plan-title,
.fde-priority-level > header,
.fde-requirement-head {
  display: flex;
  align-items: center;
}

.fde-agent-head {
  justify-content: space-between;
  gap: 20px;
}

.fde-agent-head h4,
.fde-agent-head p {
  margin: 0;
  letter-spacing: 0;
}

.fde-agent-head h4 {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}

.fde-agent-head > div:first-child > small {
  display: block;
  max-width: 720px;
  margin-top: 5px;
  color: #70837d;
  font-size: 12px;
  line-height: 1.55;
}

.fde-agent-head-actions {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 12px;
}

.fde-entry-mode {
  display: grid;
  min-width: 190px;
  gap: 6px;
}

.fde-entry-mode > span {
  color: #5f766f;
  font-size: 11px;
  font-weight: 800;
}

.fde-entry-mode select {
  min-height: 42px;
  padding: 0 36px 0 12px;
  border: 1px solid #cadbd5;
  border-radius: 9px;
  color: #244c42;
  background: #f7fbf9;
  font: inherit;
  font-weight: 750;
}

.fde-agent-status {
  gap: 10px;
  color: var(--muted);
}

.fde-agent-status > div {
  gap: 5px;
  white-space: nowrap;
}

.fde-agent-status strong {
  color: #315f58;
  font-size: 17px;
}

.fde-agent-status span,
.fde-agent-status small {
  font-size: 11px;
}

.fde-agent-status > i {
  width: 130px;
  height: 7px;
  overflow: hidden;
  border-radius: 4px;
  background: #dce6e2;
}

.fde-agent-status > i b {
  display: block;
  height: 100%;
  background: #2f7a68;
  transition: width 180ms ease;
}

.fde-agent-loading {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  border: 1px solid #d8e3df;
  border-radius: 8px;
  color: #365d55;
  background: #f7faf8;
}

.fde-agent-loading i,
.fde-agent-message.is-thinking i {
  width: 20px;
  height: 20px;
  border: 2px solid #b9d0c8;
  border-top-color: #2f7a68;
  border-radius: 50%;
  animation: fde-agent-spin 800ms linear infinite;
}

@keyframes fde-agent-spin {
  to { transform: rotate(360deg); }
}

.fde-agent-workspace {
  display: grid;
  gap: 14px;
}

.fde-agent-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid #d7e2de;
  border-radius: 8px;
  overflow: hidden;
}

.fde-agent-stages > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 11px 12px;
  color: #667b76;
  background: #f7f9f8;
}

.fde-agent-stages > div + div {
  border-left: 1px solid #dfe7e4;
}

.fde-agent-stages > div > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid #becdc8;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 800;
}

.fde-agent-stages strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fde-agent-stages small {
  font-size: 10px;
}

.fde-agent-stages > div.is-active {
  color: #204f45;
  background: #eaf4f0;
}

.fde-agent-stages > div.is-active > span,
.fde-agent-stages > div.is-done > span {
  border-color: #2f7a68;
  color: #fff;
  background: #2f7a68;
}

.fde-agent-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  min-height: 520px;
  border: 1px solid #d8e3df;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.fde-agent-conversation {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(320px, 1fr) auto;
}

.fde-agent-conversation > header,
.fde-agent-evidence > header {
  min-height: 52px;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e8e5;
  background: #f7faf8;
}

.fde-agent-conversation > header > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fde-agent-conversation > header strong,
.fde-agent-evidence > header strong {
  color: #29443d;
  font-size: 13px;
}

.fde-agent-conversation > header small,
.fde-agent-evidence > header small {
  color: var(--muted);
  font-size: 11px;
}

.fde-agent-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f7a68;
  box-shadow: 0 0 0 4px rgba(47, 122, 104, 0.12);
}

.fde-voice-console {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 92px;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 14px 16px;
  border-bottom: 1px solid #dbe5e1;
  background: #f3f8f6;
}

.fde-voice-mic {
  display: grid;
  width: 62px;
  height: 62px;
  place-items: center;
  padding: 0;
  border: 1px solid #2f7a68;
  border-radius: 50%;
  color: #fff;
  background: #2f7a68;
  box-shadow: 0 0 0 7px rgba(47, 122, 104, 0.1);
}

.fde-voice-mic:hover:not(:disabled) {
  background: #245f52;
  transform: translateY(-1px);
}

.fde-voice-mic:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.fde-voice-console.is-listening .fde-voice-mic,
.fde-voice-console.is-speaking .fde-voice-mic {
  animation: fde-voice-pulse 1.7s ease-out infinite;
}

.fde-voice-console.is-thinking .fde-voice-mic {
  border-color: #b27824;
  background: #b27824;
  box-shadow: 0 0 0 7px rgba(178, 120, 36, 0.12);
}

.fde-voice-console.is-error .fde-voice-mic {
  border-color: #b85e4d;
  background: #b85e4d;
  box-shadow: 0 0 0 7px rgba(184, 94, 77, 0.1);
}

@keyframes fde-voice-pulse {
  0% { box-shadow: 0 0 0 6px rgba(47, 122, 104, 0.14); }
  70% { box-shadow: 0 0 0 16px rgba(47, 122, 104, 0); }
  100% { box-shadow: 0 0 0 6px rgba(47, 122, 104, 0); }
}

.fde-voice-state {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.fde-voice-state small {
  color: #70817c;
  font-size: 10px;
  font-weight: 800;
}

.fde-voice-state strong {
  color: #294b43;
  font-size: 17px;
}

.fde-voice-state span {
  min-width: 0;
  overflow: hidden;
  color: #657771;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fde-voice-level {
  display: flex;
  height: 34px;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.fde-voice-level i {
  width: 5px;
  height: 8px;
  border-radius: 3px;
  background: #a9b9b4;
}

.fde-voice-console.is-listening .fde-voice-level i,
.fde-voice-console.is-speaking .fde-voice-level i {
  background: #2f7a68;
  animation: fde-voice-level 760ms ease-in-out infinite alternate;
}

.fde-voice-console.is-speaking .fde-voice-level i {
  background: #3d6587;
}

.fde-voice-level i:nth-child(2),
.fde-voice-level i:nth-child(4) { animation-delay: 120ms; }
.fde-voice-level i:nth-child(3) { animation-delay: 240ms; }

@keyframes fde-voice-level {
  from { height: 8px; }
  to { height: 30px; }
}

.fde-agent-layer-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid #dfe8e5;
  background: #fff;
}

.fde-agent-layer-strip > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  color: #7a8985;
}

.fde-agent-layer-strip > div + div {
  border-left: 1px solid #e6ece9;
}

.fde-agent-layer-strip span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b9c3c0;
}

.fde-agent-layer-strip strong,
.fde-agent-layer-strip small {
  min-width: 0;
  overflow: hidden;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fde-agent-layer-strip > div.is-completed,
.fde-agent-layer-strip > div.is-ready {
  color: #356157;
}

.fde-agent-layer-strip > div.is-completed span,
.fde-agent-layer-strip > div.is-ready span {
  background: #2f7a68;
}

.fde-agent-layer-strip > div.is-active {
  color: #80591b;
  background: #fff8e7;
}

.fde-agent-layer-strip > div.is-active span {
  background: #b47a23;
  box-shadow: 0 0 0 3px rgba(180, 122, 35, 0.13);
}

.fde-agent-messages {
  max-height: 500px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  background: #fcfdfc;
}

.fde-agent-message {
  max-width: min(82%, 720px);
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
}

.fde-agent-message > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  color: #fff;
  background: #315f58;
  font-size: 10px;
  font-weight: 900;
}

.fde-agent-message > div {
  padding: 11px 13px;
  border: 1px solid #d8e3df;
  border-radius: 7px;
  color: #314b45;
  background: #fff;
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.fde-agent-message.is-user {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 34px;
}

.fde-agent-message.is-user > span {
  grid-column: 2;
  grid-row: 1;
  color: #3f4e5b;
  background: #dce3ea;
}

.fde-agent-message.is-user > div {
  grid-column: 1;
  grid-row: 1;
  border-color: #cbd8e0;
  background: #f1f5f8;
}

.fde-agent-message.is-live-transcript > div {
  border-style: dashed;
  color: #46616d;
}

.fde-agent-message.is-thinking > div {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #55716a;
}

.fde-agent-message.is-thinking i {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.fde-agent-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid #dfe8e5;
  background: #fff;
}

.personnel-editor-form .fde-agent-composer textarea {
  min-height: 92px;
  padding: 11px 12px;
  border-radius: 6px;
  line-height: 1.6;
  resize: vertical;
}

.fde-agent-composer button {
  align-self: stretch;
}

.fde-agent-evidence {
  min-width: 0;
  border-left: 1px solid #d8e3df;
  background: #f8faf9;
}

.fde-agent-evidence > header > div {
  display: grid;
  gap: 2px;
}

.fde-agent-evidence > header > span {
  padding: 4px 7px;
  border-radius: 4px;
  color: #765213;
  background: #fff0c9;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.fde-agent-evidence > section {
  padding: 15px 16px;
}

.fde-agent-evidence > section + section {
  border-top: 1px solid #e0e8e5;
}

.fde-agent-evidence h5,
.fde-plan h4,
.fde-plan h5,
.fde-plan h6,
.fde-plan p,
.fde-plan dl,
.fde-plan dd {
  margin: 0;
  letter-spacing: 0;
}

.fde-agent-evidence h5 {
  margin-bottom: 10px;
  color: #334d47;
  font-size: 12px;
}

.fde-gap-list,
.fde-fact-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.fde-gap-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #546963;
  font-size: 11px;
  line-height: 1.4;
}

.fde-gap-list li > span {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: #c66b56;
}

.fde-gap-list li > span.status-partial {
  background: #c28b2c;
}

.fde-fact-list details {
  padding: 8px 0;
  border-bottom: 1px solid #e2e9e6;
}

.fde-fact-list summary {
  cursor: pointer;
  color: #36544d;
  font-size: 11px;
  font-weight: 800;
}

.fde-fact-list p,
.fde-evidence-empty {
  margin: 6px 0 0;
  color: #657872;
  font-size: 11px;
  line-height: 1.6;
}

.fde-agent-gate {
  justify-content: space-between;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid #d5e1dd;
  border-radius: 8px;
  background: #f3f7f5;
}

.fde-agent-gate > div {
  gap: 9px;
}

.fde-agent-gate > div:first-child {
  display: grid;
  gap: 2px;
}

.fde-agent-gate strong {
  color: #2d4d45;
  font-size: 12px;
}

.fde-agent-gate span {
  color: var(--muted);
  font-size: 11px;
}

.fde-agent-plan-preview {
  border: 1px solid #d6e1dd;
  border-radius: 8px;
  overflow: hidden;
}

.fde-plan {
  display: grid;
  color: #344b46;
  background: #fff;
}

.fde-plan-title {
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  color: #fff;
  background: #294f47;
}

.fde-plan-title span,
.fde-plan-title small {
  color: #c8dbd5;
  font-size: 10px;
  font-weight: 800;
}

.fde-plan-title h4 {
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

.fde-plan-band {
  padding: 18px 20px;
}

.fde-plan-band + .fde-plan-band {
  border-top: 1px solid #dde6e3;
}

.fde-plan-band > h5,
.fde-plan-tail h5 {
  margin-bottom: 13px;
  color: #294940;
  font-size: 13px;
}

.fde-plan-summary p,
.fde-plan-problem p {
  color: #405b54;
  font-size: 13px;
  line-height: 1.75;
}

.fde-plan-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
}

.fde-plan-profile > div {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1ef;
}

.fde-plan dt,
.fde-plan-problem strong,
.fde-requirement dt,
.fde-requirement-lists strong,
.fde-roadmap strong {
  color: #6c7f79;
  font-size: 10px;
  font-weight: 800;
}

.fde-plan dd {
  color: #3c554f;
  font-size: 12px;
  line-height: 1.65;
}

.fde-plan-problem {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 8px 12px;
  padding-bottom: 16px;
}

.fde-plan-columns,
.fde-plan-tail {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.fde-plan-columns > div + div,
.fde-plan-tail > div + div {
  padding-left: 20px;
  border-left: 1px solid #e2e9e6;
}

.fde-plan h6 {
  color: #345149;
  font-size: 12px;
}

.fde-plan ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 17px;
  color: #536963;
  font-size: 11px;
  line-height: 1.55;
}

.fde-plan-empty {
  color: #899792;
  font-size: 11px;
}

.fde-priority-plan {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid #dbe4e1;
}

.fde-priority-level {
  min-width: 0;
}

.fde-priority-level + .fde-priority-level {
  border-left: 1px solid #dbe4e1;
}

.fde-priority-level > header {
  min-height: 72px;
  align-items: flex-start;
  gap: 9px;
  padding: 13px;
  background: #f7f9f8;
}

.fde-priority-level > header > span {
  padding: 4px 7px;
  border-radius: 4px;
  color: #fff;
  background: #b65e4a;
  font-size: 10px;
  font-weight: 900;
}

.fde-priority-level.level-p1 > header > span {
  background: #a77724;
}

.fde-priority-level.level-p2 > header > span {
  background: #63747f;
}

.fde-priority-level > header p {
  margin-top: 4px;
  color: #6d7d78;
  font-size: 10px;
  line-height: 1.45;
}

.fde-requirement {
  padding: 14px;
  border-top: 1px solid #e3e9e7;
}

.fde-requirement-head {
  align-items: flex-start;
  gap: 8px;
}

.fde-requirement-head > span,
.fde-roadmap > article > span {
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border-radius: 50%;
  color: #315f58;
  background: #e5efeb;
  font-size: 10px;
  font-weight: 900;
}

.fde-requirement-head p {
  margin-top: 3px;
  color: #5d716b;
  font-size: 10px;
  line-height: 1.5;
}

.fde-requirement dl {
  display: grid;
  gap: 7px;
  margin-top: 11px;
}

.fde-requirement dl > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 7px;
}

.fde-requirement-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed #dce5e2;
}

.fde-metric-table {
  display: grid;
  border-top: 1px solid #dce5e2;
}

.fde-metric-table > div {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(100px, 0.7fr) minmax(100px, 0.7fr) minmax(180px, 1.2fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid #e5ebe9;
  font-size: 11px;
}

.fde-metric-table strong {
  color: #345149;
}

.fde-metric-table span,
.fde-metric-table small {
  color: #687a75;
}

.fde-roadmap {
  display: grid;
  gap: 0;
}

.fde-roadmap > article {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #e3e9e7;
}

.fde-roadmap p {
  margin-top: 4px;
  color: #586d67;
  font-size: 11px;
  line-height: 1.6;
}

.fde-plan-tail article {
  padding: 8px 0;
  border-bottom: 1px solid #e7ecea;
}

.fde-plan-tail article strong {
  color: #3a554e;
  font-size: 11px;
}

.fde-plan-tail article p,
.fde-plan-tail article small {
  display: block;
  margin-top: 3px;
  color: #6a7b76;
  font-size: 10px;
  line-height: 1.5;
}

.project-summary-preview.has-fde .fde-plan-title {
  padding: 14px 16px;
}

.project-summary-preview.has-fde .fde-plan-title h4 {
  font-size: 15px;
}

.project-summary-preview.has-fde .fde-plan-band {
  padding: 14px 16px;
}

@media (max-width: 900px) {
  .fde-agent-grid,
  .fde-plan-columns,
  .fde-plan-tail,
  .fde-priority-plan {
    grid-template-columns: 1fr;
  }

  .fde-agent-evidence {
    border-top: 1px solid #d8e3df;
    border-left: 0;
  }

  .fde-priority-level + .fde-priority-level,
  .fde-plan-columns > div + div,
  .fde-plan-tail > div + div {
    padding-left: 0;
    border-top: 1px solid #dbe4e1;
    border-left: 0;
  }

  .fde-plan-columns > div + div,
  .fde-plan-tail > div + div {
    padding-top: 14px;
  }
}

@media (max-width: 620px) {
  .fde-agent-head,
  .fde-agent-gate {
    align-items: stretch;
    flex-direction: column;
  }

  .fde-agent-status {
    display: grid;
    grid-template-columns: auto minmax(80px, 1fr) auto;
  }

  .fde-agent-status > i {
    width: auto;
  }

  .fde-agent-stages {
    grid-template-columns: 1fr;
  }

  .fde-agent-stages > div + div {
    border-top: 1px solid #dfe7e4;
    border-left: 0;
  }

  .fde-agent-grid {
    min-height: 0;
  }

  .fde-agent-conversation {
    grid-template-rows: auto auto auto minmax(300px, 52vh) auto;
  }

  .fde-voice-console {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 12px;
    padding: 12px 14px;
  }

  .fde-voice-mic {
    width: 54px;
    height: 54px;
  }

  .fde-voice-level {
    display: none;
  }

  .fde-agent-layer-strip {
    grid-template-columns: repeat(5, minmax(108px, 1fr));
    overflow-x: auto;
  }

  .fde-agent-messages {
    padding: 14px;
  }

  .fde-agent-message {
    max-width: 96%;
  }

  .fde-agent-composer,
  .fde-plan-profile,
  .fde-requirement-lists {
    grid-template-columns: 1fr;
  }

  .fde-agent-composer button {
    min-height: 42px;
  }

  .fde-agent-gate > div:last-child {
    display: grid;
    grid-template-columns: 1fr;
  }

  .fde-plan-title,
  .fde-plan-band {
    padding: 14px;
  }

  .fde-metric-table > div {
    grid-template-columns: 1fr 1fr;
  }
}

.work-project-detail-modal {
  padding: 12px;
}

.work-project-detail-panel {
  width: min(1240px, 100%);
  max-height: calc(100vh - 24px);
}

.work-project-detail-content {
  display: grid;
  gap: 16px;
  padding: 0 22px 24px;
}

.project-detail-hero {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) repeat(4, minmax(130px, 0.7fr));
  gap: 10px;
  padding: 14px;
  border: 1px solid rgba(63, 143, 81, 0.2);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(63, 143, 81, 0.08), rgba(22, 121, 111, 0.04));
}

.project-detail-hero.health-attention {
  border-color: rgba(191, 122, 31, 0.22);
  background: linear-gradient(135deg, rgba(191, 122, 31, 0.09), rgba(255, 255, 255, 0.8));
}

.project-detail-hero.health-risk {
  border-color: rgba(214, 95, 76, 0.25);
  background: linear-gradient(135deg, rgba(214, 95, 76, 0.09), rgba(255, 255, 255, 0.8));
}

.project-detail-hero > div:first-child {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-detail-hero > div:first-child > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-detail-hero > div:first-child small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-detail-hero article {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.76);
}

.project-detail-hero article span {
  color: var(--muted);
  font-size: 12px;
}

.project-detail-hero article strong {
  font-size: 16px;
}

.project-stage-timeline {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.project-detail-stage {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
}

.project-detail-stage.is-clickable {
  cursor: pointer;
}

.project-detail-stage.is-clickable:hover {
  border-color: rgba(22, 121, 111, 0.45);
  box-shadow: 0 7px 18px rgba(20, 66, 58, 0.09);
  transform: translateY(-1px);
}

.project-detail-stage.is-locked {
  cursor: not-allowed;
  opacity: 0.62;
}

.project-detail-stage.is-selected {
  outline: 2px solid rgba(22, 121, 111, 0.72);
  outline-offset: 2px;
}

.project-detail-stage .stage-order {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 12px;
  font-weight: 900;
}

.project-detail-stage div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.project-detail-stage small {
  color: var(--muted);
  font-size: 10px;
}

.project-detail-stage em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.project-detail-stage i {
  grid-column: 1 / -1;
  overflow: hidden;
  height: 4px;
  border-radius: 999px;
  background: #e5ece8;
}

.project-detail-stage i b {
  display: block;
  height: 100%;
  background: var(--blue);
}

.project-detail-stage.is-current {
  border-color: rgba(22, 121, 111, 0.35);
  background: rgba(22, 121, 111, 0.05);
}

.project-detail-stage.is-current .stage-order,
.project-detail-stage.is-done .stage-order {
  color: #fff;
  background: var(--teal);
}

.project-flow-gate {
  display: grid;
  grid-template-columns: minmax(180px, 0.55fr) minmax(280px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid rgba(22, 121, 111, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 92% 10%, rgba(56, 111, 190, 0.1), transparent 35%),
    linear-gradient(120deg, rgba(22, 121, 111, 0.08), rgba(255, 255, 255, 0.98));
}

.project-flow-gate h4 {
  margin: 4px 0 0;
  font-size: 18px;
}

.project-flow-controls,
.project-owner-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.project-flow-controls select,
.project-owner-control select,
.project-activity-comment input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.project-flow-gate small,
.project-flow-tip,
.project-owner-control > span {
  color: var(--muted);
  font-size: 12px;
}

.project-owner-control {
  grid-column: 1 / -1;
  padding-top: 10px;
  border-top: 1px dashed rgba(22, 121, 111, 0.2);
}

.project-detail-section {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.project-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.project-section-head h4 {
  margin: 3px 0 0;
  font-size: 17px;
}

.project-section-head > span {
  color: var(--muted);
  font-size: 12px;
}

.project-activity-panel > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.project-activity-panel > summary::-webkit-details-marker {
  display: none;
}

.project-activity-panel > summary > span {
  display: flex;
  align-items: center;
  gap: 9px;
}

.project-activity-panel > summary b {
  font-weight: 700;
}

.project-activity-chevron {
  display: inline-block;
  color: var(--teal);
  font-size: 18px;
  font-style: normal;
  transition: transform 0.2s ease;
}

.project-activity-panel[open] .project-activity-chevron {
  transform: rotate(180deg);
}

.project-activity-panel[open] > .project-activity-list {
  margin-top: 13px;
}

.project-step-list {
  display: grid;
  gap: 8px;
}

.project-step-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(160px, 0.9fr) 130px 82px auto;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.project-step-title {
  display: flex;
  align-items: center;
  gap: 9px;
}

.project-step-title > div {
  display: grid;
  gap: 3px;
}

.project-step-title small {
  color: var(--muted);
}

.status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aeb9b5;
}

.status-dot.status-doing {
  background: var(--blue);
}

.status-dot.status-blocked {
  background: var(--coral);
}

.status-dot.status-done {
  background: var(--green);
}

.project-step-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.project-step-row select,
.project-step-row input,
.project-inline-form input,
.project-inline-form select,
.project-inline-form textarea,
.module-quick-edit input,
.module-quick-edit select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
}

.project-detail-columns {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  align-items: start;
}

.project-list-stack,
.project-milestone-list,
.project-activity-list {
  display: grid;
  gap: 8px;
}

.project-list-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.list-card-index {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.1);
  font-weight: 900;
}

.project-list-card div {
  display: grid;
  gap: 4px;
}

.project-list-card p {
  margin: 0;
  color: var(--muted);
}

.project-list-card small {
  color: var(--muted);
}

.project-list-card.is-complete {
  background: rgba(46, 139, 87, 0.07);
}

.project-list-card.is-complete .list-card-index {
  color: #fff;
  background: var(--green);
}

.project-list-content {
  min-width: 0;
}

.project-item-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.delivery-status {
  align-self: start;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.09);
}

.project-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 5px;
}

.project-list-card .project-item-actions {
  display: flex;
}

.mini-action {
  padding: 5px 8px;
  border: 0;
  border-radius: 8px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.08);
  font-weight: 800;
}

.project-inline-form {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 8px;
  align-items: end;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
}

.project-inline-form h5 {
  grid-column: 1 / -1;
  margin: 0;
}

.project-inline-form [data-action="cancel-form-edit"] {
  grid-column: 1 / -1;
}

.project-module-form {
  grid-template-columns: minmax(150px, 0.8fr) minmax(150px, 0.8fr) minmax(210px, 1.2fr) minmax(180px, 1fr) 135px 135px auto;
}

.project-milestone-form {
  grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.8fr) minmax(140px, 0.8fr) 135px auto;
}

.project-detail-columns .project-milestone-form {
  grid-template-columns: 1fr 1fr;
}

.project-detail-columns .project-milestone-form button {
  grid-column: 1 / -1;
}

.project-module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.project-module-card {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e2eae6;
  border-radius: 11px;
  background: var(--surface-soft);
}

.module-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
}

.module-card-head > div {
  display: grid;
  gap: 4px;
}

.module-card-head small,
.project-module-card p {
  color: var(--muted);
}

.project-module-card p {
  margin: 0;
  line-height: 1.5;
}

.module-progress-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.module-quick-edit {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 80px auto;
  gap: 7px;
}

.project-milestone {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 10px;
  background: var(--surface-soft);
}

.milestone-check {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  padding: 0;
  border: 2px solid #9bb2ae;
  border-radius: 7px;
  color: #fff;
  background: #fff;
  font-weight: 900;
}

button.milestone-check {
  cursor: pointer;
}

.overdue-list-page { display: grid; gap: 18px; }
.overdue-list-head { align-items: flex-start; }
.overdue-list-head > div:first-child { max-width: 820px; }
.overdue-list-head p:not(.eyebrow) { margin: 7px 0 0; color: #7a8798; line-height: 1.6; }
.overdue-list-actions { display: flex; align-items: center; gap: 10px; }
.overdue-list-actions span { color: #8a96a5; font-size: 12px; white-space: nowrap; }
.overdue-list-metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; }
.overdue-list-metrics article { display: grid; gap: 8px; padding: 17px 18px; border: 1px solid #e7ebf0; border-radius: 13px; background: linear-gradient(145deg, #fff, #fafbfd); box-shadow: 0 8px 24px rgba(31, 46, 68, 0.04); }
.overdue-list-metrics span { color: #8793a3; font-size: 11px; font-weight: 700; }
.overdue-list-metrics strong { color: #26374c; font-size: 23px; }
.overdue-list-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; padding: 16px; border: 1px solid #e5eaf0; border-radius: 13px; background: #fff; }
.overdue-accuracy-help { color: #68768a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.overdue-accuracy-details { padding: 8px 14px; color: #68768a; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.overdue-accuracy-details summary { cursor: pointer; color: #9c5b25; }
.overdue-list-filters label { display: grid; gap: 7px; color: #758296; font-size: 11px; font-weight: 700; }
.overdue-list-filters input, .overdue-list-filters select { width: 100%; height: 40px; box-sizing: border-box; padding: 0 11px; border: 1px solid #dbe1e8; border-radius: 8px; outline: none; background: #fff; color: #34445a; }
.overdue-list-filters input:focus, .overdue-list-filters select:focus { border-color: #f4773b; box-shadow: 0 0 0 3px rgba(244, 119, 59, .1); }
.overdue-list-result-head { display: flex; justify-content: space-between; min-height: 20px; color: #7d8998; font-size: 12px; }
#overdueListMessage { color: #d66028; }
.overdue-case-list { display: grid; gap: 10px; }
.overdue-list-empty { padding: 54px 20px; border: 1px dashed #dbe1e8; border-radius: 13px; color: #98a2af; background: #fbfcfd; text-align: center; }
.overdue-case-card { overflow: hidden; border: 1px solid #d6e5df; border-radius: 12px; background: #fff; }
.overdue-case-top {display:grid;grid-template-columns:minmax(240px,1.2fr) minmax(180px,1fr) minmax(210px,.8fr);gap:16px;padding:14px;border-bottom:1px solid #e4ece8;background:#fbfdfc}
.overdue-case-top>section {min-width:0}
.overdue-note-editor label {display:grid;gap:6px;font-size:12px;font-weight:650}
.overdue-note-editor textarea {box-sizing:border-box;width:100%;min-height:70px;resize:vertical;border:1px solid #cedfd6;border-radius:8px;padding:9px 11px;font:inherit;font-weight:400;line-height:1.6;color:#244a3d;background:#fff}
.overdue-note-editor p {white-space:pre-wrap;overflow-wrap:anywhere;font-weight:400;color:#60796d}
.overdue-note-editor button {margin-top:7px;font-size:12px;padding:5px 10px}
.overdue-note-editor [role=status] {font-size:11px;color:#60796d;margin-left:8px}
.overdue-contact-summary {display:grid;align-content:start;gap:4px;padding:2px 16px;border-left:1px solid #e0ebe5;border-right:1px solid #e0ebe5;overflow-wrap:anywhere}
.overdue-contact-summary>strong {font-size:15px}.overdue-contact-summary>span {font-size:13px}
.overdue-contact-summary>small {font-size:11px;color:#657e71;margin-top:5px}
.overdue-contact-summary>b {font-size:20px;color:#a45928;font-variant-numeric:tabular-nums}
.overdue-contact-summary>p {margin:0;font-size:11px;color:#6a8176}
.overdue-call-tools {display:flex;align-content:start;align-items:start;flex-wrap:wrap;gap:8px}
.overdue-call-tools>small {width:100%;font-size:11px;line-height:1.6;color:#6c7f76}
.overdue-call-tools .rrz-order-link {font-size:12px}
.overdue-owner-chip {display:inline-flex!important;padding:4px 9px;background:#eaf4ef;border-radius:999px;color:#27664f!important;font-size:11px!important}
.overdue-information>summary {padding:9px 14px;font-size:12px;color:#416452;cursor:pointer;background:#f4f8f6;border-bottom:1px solid #e6eeea}
.recheck-record-toolbar {flex-wrap:wrap}.recheck-record-toolbar>.recheck-order-search {flex:1;min-width:180px}
.order-auto-dial:not(.hidden) { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 12px; }
.order-auto-dial > p { flex-basis: 100%; margin: 0; }
.order-auto-dial > [role="status"] { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
@media(max-width:1000px){.overdue-case-top{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.overdue-call-tools{grid-column:1/-1}.overdue-contact-summary{border-right:0}}
@media(max-width:600px){.overdue-case-top{grid-template-columns:1fr;padding:12px;gap:12px}.overdue-contact-summary{border:0;border-top:1px solid #e0ebe5;padding:10px 0 0}.overdue-call-tools{grid-column:auto}.overdue-owner-chip{white-space:normal}}
.overdue-case-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid #edf0f4; background: linear-gradient(135deg, #fff 55%, #fff7f2); }
.overdue-case-head > div:first-child { display: grid; gap: 2px; min-width: 0; }
.overdue-case-head > div:first-child span { color: #9aa4b0; font-size: 10px; font-weight: 750; letter-spacing: .5px; }
.overdue-case-head > div:first-child strong { overflow: hidden; color: #27394f; font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.overdue-case-badges { display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.overdue-snapshot-note { padding: 8px 14px; border-bottom: 1px solid #e4ece8; color: #60796d; background: #f8fbfa; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.overdue-snapshot-note strong { font-weight: 650; }
.overdue-snapshot-note p { margin: 2px 0 0; }
.overdue-snapshot-note.is-historical { color: #8a642d; background: #fffaf1; }
.overdue-day-badge, .overdue-source-badge, .overdue-status-badge, .overdue-occurrence-badge { padding: 4px 7px; border-radius: 999px; font-size: 10px; font-weight: 800; }
.overdue-day-badge { color: #c95623; background: #fff0e8; }
.overdue-source-badge { color: #2c7c63; background: #eaf8f3; }
.overdue-occurrence-badge { color: #56657a; background: #eef2f7; }
.overdue-status-badge.is-unsettled { color: #b54f27; background: #fff0e8; }
.overdue-status-badge.is-partial { color: #8b6714; background: #fff5cf; }
.overdue-status-badge.is-settled { color: #28745d; background: #e7f7f1; }
.overdue-field-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; padding: 10px 14px; }
.overdue-field { display: grid; align-content: center; min-width: 0; min-height: 48px; gap: 3px; padding: 7px 9px; border: 1px solid #e8ecf1; border-radius: 7px; background: #fbfcfd; }
.overdue-field span { color: #919ba8; font-size: 10px; font-weight: 700; }
.overdue-field strong { overflow-wrap: anywhere; color: #34465c; font-size: 12px; line-height: 1.3; }
.overdue-field.is-empty strong { min-height: 15px; }
.overdue-field.is-money strong { color: #b95829; font-variant-numeric: tabular-nums; }
.overdue-field.is-highlight { border-color: #f0d7ca; background: #fff9f5; }
.overdue-field.is-wide { grid-column: span 3; }
.overdue-bill-block { margin: 0 14px 12px; border: 1px solid #e7ebf0; border-radius: 9px; background: #fff; }
.overdue-bill-toggle { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: #fff; color: #526176; cursor: pointer; font: inherit; text-align: left; }
.overdue-bill-toggle:hover { background: #fafbfd; }
.overdue-bill-toggle:focus-visible { outline: 2px solid #f4773b; outline-offset: 2px; }
.overdue-bill-toggle[aria-expanded="true"] { border-bottom: 1px solid #edf0f4; border-radius: 10px 10px 0 0; }
.overdue-bill-title { display: flex; align-items: center; gap: 9px; color: #526176; font-size: 11px; }
.overdue-bill-title span { color: #9aa4b1; }
.overdue-bill-snapshot-note { margin: 0; padding: 0 10px 8px; color: #7c899a; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; }
.overdue-bill-toggle-action { display: inline-flex; align-items: center; gap: 6px; color: #7c899a; font-size: 11px; }
.overdue-bill-chevron { display: inline-block; font-size: 16px; line-height: 1; transform: rotate(0deg); transition: transform .18s ease; }
.overdue-bill-toggle[aria-expanded="true"] .overdue-bill-chevron { transform: rotate(180deg); }
.overdue-bill-content[hidden] { display: none; }
.overdue-bill-table-wrap { overflow-x: auto; }
.overdue-bill-table { width: 100%; min-width: 690px; border-collapse: collapse; }
.overdue-bill-table th, .overdue-bill-table td { padding: 10px 13px; border-bottom: 1px solid #f0f2f5; color: #526176; font-size: 11px; text-align: left; }
.overdue-bill-table th { color: #8a96a5; background: #fafbfd; font-size: 10px; }
.overdue-bill-table tbody tr:last-child td { border-bottom: 0; }
.overdue-list-pagination { justify-content: flex-end; }
.overdue-list-pagination .pagination-gap { display: inline-flex; align-items: center; padding: 0 2px; color: #9aa5b1; }

@media (max-width: 1180px) {
  .overdue-list-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .overdue-field-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .overdue-field.is-wide { grid-column: span 2; }
  .overdue-list-filters { grid-template-columns: 1fr 1fr 1fr; }
}

@media (min-width: 1800px) {
  .overdue-field-grid { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .overdue-field.is-wide { grid-column: span 4; }
}

@media (max-width: 760px) {
  .overdue-list-head, .overdue-list-actions, .overdue-case-head { align-items: stretch; flex-direction: column; }
  .overdue-list-actions .secondary-button { width: 100%; }
  .overdue-list-metrics { grid-template-columns: 1fr 1fr; }
  .overdue-list-filters { grid-template-columns: 1fr; }
  .overdue-field-grid { grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px; }
  .overdue-field.is-wide { grid-column: 1 / -1; }
  .overdue-bill-block { margin: 0 10px 10px; }
}

@media (max-width: 480px) {
  .overdue-list-metrics { grid-template-columns: 1fr; }
}

.project-milestone.is-complete {
  background: rgba(46, 139, 87, 0.07);
}

.project-milestone.is-complete .milestone-check {
  border-color: var(--green);
  background: var(--green);
}

.project-milestone.is-complete > div > strong {
  text-decoration: line-through;
  text-decoration-color: rgba(23, 72, 55, 0.35);
}

.project-milestone > div {
  display: grid;
  gap: 3px;
}

.project-milestone small,
.project-milestone time {
  color: var(--muted);
}

.project-milestone em {
  color: var(--blue);
  font-style: normal;
  font-weight: 800;
}

.milestone-quick-edit {
  grid-column: 2 / -1;
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) 80px auto;
  gap: 7px;
}

.milestone-quick-edit input,
.milestone-quick-edit select {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 8px 9px;
}

.project-activity {
  display: block;
  padding: 0;
  border-bottom: 1px solid #edf1ef;
}

.project-activity:last-child {
  border-bottom: 0;
}

.project-activity-summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 11px 4px;
  cursor: pointer;
  list-style: none;
}

.project-activity-summary::-webkit-details-marker {
  display: none;
}

.project-activity-summary > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  font-weight: 800;
}

.project-activity-summary > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-activity-body {
  display: grid;
  gap: 9px;
  margin: 0 4px 10px 46px;
  padding: 12px;
  border: 1px solid #e7eeeb;
  border-radius: 10px;
  background: #fbfcfb;
}

.project-activity p {
  margin: 0;
  color: var(--muted);
}

.project-activity small {
  color: var(--muted);
}

.project-activity em {
  color: var(--teal);
  font-style: normal;
  font-weight: 900;
}

.project-activity > summary .project-activity-chevron {
  color: var(--teal);
  font-size: 18px;
  font-style: normal;
  transition: transform 0.2s ease;
}

.project-activity[open] > summary .project-activity-chevron {
  transform: rotate(180deg);
}

.project-activity-remarks {
  display: grid;
  gap: 6px;
  margin-top: 5px;
  padding: 8px;
  border-radius: 9px;
  background: var(--surface-soft);
}

.project-activity-remark {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
}

.project-activity-remark > span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.1);
  font-size: 11px;
  font-weight: 900;
}

.project-activity-remark p {
  color: var(--ink);
}

.project-activity-comment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  margin-top: 4px;
}

.project-requirement-center {
  background:
    radial-gradient(circle at 95% 0, rgba(56, 111, 190, 0.08), transparent 34%),
    var(--surface);
}

.requirement-uploader-manager {
  position: relative;
  display: grid;
  gap: 9px;
  padding: 12px;
  border-radius: 11px;
  background: var(--surface-soft);
}

.requirement-uploader-toolbar,
.requirement-uploader-popover-head,
.requirement-uploader-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.requirement-uploader-toolbar > div,
.requirement-uploader-popover-head > div {
  display: grid;
  gap: 3px;
}

.requirement-uploader-toolbar small,
.requirement-uploader-popover-head small {
  color: var(--muted);
  font-size: 11px;
}

.requirement-uploader-popover {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 20px;
}

.requirement-uploader-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(20, 29, 27, 0.32);
  backdrop-filter: blur(3px);
  cursor: default;
}

.requirement-uploader-popover-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(22, 121, 111, 0.2);
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 18px 52px rgba(22, 32, 29, 0.22);
}

.requirement-uploader-popover-head,
.requirement-uploader-popover-foot {
  padding: 11px 12px;
}

.requirement-uploader-popover-head {
  border-bottom: 1px solid var(--line);
}

.requirement-uploader-popover-foot {
  border-top: 1px solid var(--line);
}

.requirement-uploader-popover-foot > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.requirement-uploader-popover-foot > div {
  display: flex;
  gap: 7px;
}

.requirement-uploader-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  max-height: 280px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px;
}

.requirement-uploader-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 24px;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.requirement-uploader-option:hover {
  border-color: rgba(22, 121, 111, 0.38);
  background: rgba(22, 121, 111, 0.035);
}

.requirement-uploader-option > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.requirement-uploader-option > i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: transparent;
  background: var(--surface-soft);
  font-style: normal;
  font-weight: 900;
}

.requirement-uploader-option.is-selected {
  border-color: rgba(22, 121, 111, 0.42);
  color: var(--teal);
  background: rgba(22, 121, 111, 0.08);
  font-weight: 800;
}

.requirement-uploader-option.is-selected > i {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
}

.requirement-file-picker {
  display: grid;
  gap: 6px;
}

.requirement-upload-form input,
.requirement-upload-form textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 9px 10px;
}

.requirement-uploader-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.requirement-uploader-summary b {
  padding: 5px 8px;
  border-radius: 999px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.09);
}

.requirement-upload-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr) minmax(220px, 0.8fr) auto;
  align-items: stretch;
  gap: 9px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  border-bottom: 1px dashed var(--line);
}

.requirement-upload-form.is-uploading > :not(.requirement-upload-status) {
  opacity: 0.68;
}

.requirement-upload-status {
  grid-column: 1 / -1;
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.requirement-upload-status:empty {
  display: none;
}

.requirement-upload-status.is-error {
  color: var(--coral);
}

.requirement-upload-status.is-success {
  color: var(--teal);
}

.requirement-upload-disclosure {
  display: grid;
  gap: 10px;
}

.requirement-upload-disclosure > summary {
  width: fit-content;
  cursor: pointer;
  list-style: none;
}

.requirement-upload-disclosure > summary::-webkit-details-marker {
  display: none;
}

.requirement-upload-disclosure[open] > summary {
  color: var(--teal);
  background: rgba(22, 121, 111, 0.1);
}

.requirement-file-picker {
  position: relative;
  justify-content: center;
  padding: 9px 11px;
  border: 1px dashed rgba(22, 121, 111, 0.4);
  border-radius: 9px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.04);
  cursor: pointer;
}

.requirement-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.requirement-file-picker small {
  color: var(--muted);
}

.project-requirement-upload-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.project-requirement-upload {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid #e3ebe7;
  border-radius: 11px;
  background: #fbfcfb;
}

.requirement-upload-head,
.requirement-attachment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.requirement-upload-head > div {
  display: grid;
  gap: 3px;
}

.requirement-upload-head small,
.requirement-upload-head > span,
.requirement-attachment-row {
  color: var(--muted);
  font-size: 12px;
}

.project-requirement-upload p {
  margin: 0;
  line-height: 1.55;
}

.requirement-attachment-row em {
  color: var(--coral);
  font-style: normal;
}

.requirement-record-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.requirement-record-actions .secondary-button,
.requirement-record-actions .ghost-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.people-modal .colleague-chat-panel {
  width: min(1120px, 100%);
  height: min(820px, calc(100vh - 48px));
  height: min(820px, calc(100dvh - 48px));
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.colleague-chat-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 0;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.chat-colleague-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.chat-colleague-pane > input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  padding: 10px;
}

.chat-employee-list {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.chat-employee-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.chat-employee-item:hover,
.chat-employee-item.is-active {
  border-color: rgba(22, 121, 111, 0.25);
  background: #fff;
}

.chat-employee-item > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  font-weight: 900;
}

.chat-employee-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-employee-item small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-employee-item em {
  min-width: 20px;
  padding: 3px 6px;
  border-radius: 999px;
  color: #fff;
  background: var(--coral);
  font-size: 11px;
  font-style: normal;
  text-align: center;
}

.chat-conversation-pane {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #fff;
}

.chat-conversation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.chat-conversation-header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.chat-conversation-header small {
  color: var(--muted);
}

.chat-personal-memo-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid rgba(22, 121, 111, 0.28);
  border-radius: 9px;
  color: var(--teal);
  background: rgba(22, 121, 111, 0.07);
  font-weight: 800;
  cursor: pointer;
}

.chat-personal-memo-button:hover {
  border-color: rgba(22, 121, 111, 0.5);
  background: rgba(22, 121, 111, 0.12);
}

.people-modal .personal-memo-panel {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

.personal-memo-panel > header p {
  margin: 0;
  color: var(--muted);
}

.personal-memo-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.72fr) minmax(0, 1.28fr);
  min-height: 0;
  overflow: hidden;
}

.personal-memo-form {
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
  border-right: 1px solid var(--line);
  background: var(--surface-soft);
}

.personal-memo-form-head,
.personal-memo-list-section > header,
.personal-memo-card > header,
.personal-memo-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.personal-memo-form-head > div,
.personal-memo-list-section > header > div {
  display: grid;
  gap: 3px;
}

.personal-memo-form-head small,
.personal-memo-list-section small,
.personal-memo-card > small {
  color: var(--muted);
}

.personal-memo-form label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.personal-memo-form input,
.personal-memo-form textarea,
.personal-memo-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  padding: 10px 11px;
  font: inherit;
  font-weight: 500;
}

.personal-memo-form textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.6;
}

.personal-memo-list-section {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.personal-memo-form.hidden + .personal-memo-list-section {
  grid-column: 1 / -1;
}

.personal-memo-list-section > header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.personal-memo-list {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  background: #fff;
}

.personal-memo-card {
  display: grid;
  gap: 10px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-left: 5px solid #7d918c;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(20, 47, 42, 0.05);
}

.personal-memo-card.priority-s { border-left-color: #d7525d; }
.personal-memo-card.priority-a { border-left-color: #e39138; }
.personal-memo-card.priority-b { border-left-color: var(--teal); }
.personal-memo-card.priority-c { border-left-color: var(--blue); }
.personal-memo-card.priority-paused { border-left-color: #899590; opacity: 0.82; }

.personal-memo-card h4,
.personal-memo-card p {
  margin: 0;
}

.personal-memo-card h4 {
  font-size: 17px;
}

.personal-memo-card p {
  color: #42514d;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.personal-memo-priority {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #fff;
  background: #6c7d78;
  font-size: 12px;
  font-weight: 900;
}

.priority-s .personal-memo-priority { background: #d7525d; }
.priority-a .personal-memo-priority { background: #d37b1d; }
.priority-b .personal-memo-priority { background: var(--teal); }
.priority-c .personal-memo-priority { background: var(--blue); }

.personal-memo-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.personal-memo-actions .ghost-button {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 12px;
}

.personal-memo-actions .danger {
  color: #d84d57;
  border-color: #f0cfd2;
  background: #fff7f7;
}

.personal-memo-card.is-reminder-due {
  box-shadow: 0 8px 22px rgba(215, 82, 93, 0.12);
}

.memo-handle-button {
  color: #b33b45;
  border-color: #efc3c7;
  background: #fff7f7;
}

.memo-handle-button:disabled {
  color: var(--muted);
  border-color: var(--line);
  background: var(--surface-soft);
}

.personal-memo-reminder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.personal-memo-reminder-status {
  font-weight: 700;
}

.personal-memo-card.is-reminder-due .personal-memo-reminder-status {
  color: #b33b45;
}

.personal-memo-reminder-control {
  position: relative;
}

.personal-memo-reminder-control summary {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal);
  background: var(--surface-soft);
  font-weight: 800;
  cursor: pointer;
  list-style: none;
}

.personal-memo-reminder-control summary::-webkit-details-marker {
  display: none;
}

.personal-memo-reminder-control select {
  position: absolute;
  right: 0;
  z-index: 2;
  min-width: 100px;
  margin-top: 4px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.personal-memo-empty {
  margin: 0;
  padding: 52px 18px;
  color: var(--muted);
  text-align: center;
}

.chat-message-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: 16px;
}

.chat-message {
  display: grid;
  gap: 6px;
  width: fit-content;
  max-width: min(74%, 620px);
  padding: 10px 12px;
  border-radius: 12px;
}

.chat-message.is-mine {
  align-self: flex-end;
  background: rgba(22, 121, 111, 0.11);
}

.chat-message.is-other {
  align-self: flex-start;
  background: var(--surface-soft);
}

.chat-message p {
  margin: 0;
  line-height: 1.55;
}

.chat-message small {
  color: var(--muted);
  font-size: 11px;
}

.chat-message-attachment {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
}

.chat-message-attachment a {
  color: var(--teal);
  font-weight: 800;
}

.chat-message-attachment em {
  color: var(--coral);
  font-style: normal;
}

.chat-compose-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.45fr) auto;
  gap: 9px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.chat-compose-form textarea {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  resize: none;
}

.chat-file-picker {
  position: relative;
  display: grid;
  align-content: center;
  gap: 3px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px dashed rgba(22, 121, 111, 0.35);
  border-radius: 9px;
  color: var(--teal);
  cursor: pointer;
}

.chat-file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.chat-file-picker small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-compose-form .personnel-message {
  grid-column: 1 / -1;
  margin: 0;
}

.project-empty-hint {
  margin: 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--muted);
  text-align: center;
}

.project-form-message {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 0;
  min-height: 0;
  color: var(--coral);
  background: var(--surface);
}

.work-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  padding: 16px;
  box-shadow: var(--shadow-soft);
}

.work-item-top {
  align-items: flex-start;
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.work-item-title-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.work-item-title-row h4 {
  font-size: 18px;
  line-height: 1.35;
  margin: 0;
}

.work-item-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 7px;
}

.work-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.work-rating,
.work-status,
.work-request-type,
.work-source-badge {
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.work-task-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.work-task-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  color: #365c82;
  background: rgba(47, 111, 190, 0.09);
  font-size: 12px;
  font-weight: 800;
}

.work-item-highlight {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(22, 121, 111, 0.14), var(--shadow-soft);
}

.work-request-type {
  background: rgba(86, 69, 151, 0.11);
  color: var(--indigo);
}

.work-submit-identity {
  border: 1px dashed rgba(22, 121, 111, 0.3);
  border-radius: var(--radius);
  background: rgba(22, 121, 111, 0.06);
  margin: 0;
  padding: 10px 12px;
}

.work-submit-identity strong {
  color: var(--teal);
}

.work-submit-row {
  align-items: center;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  padding: 11px 12px;
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.work-submitter-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  font-weight: 800;
}

.work-submit-row div {
  display: grid;
  gap: 2px;
}

.work-submit-row div span {
  color: var(--muted);
  font-size: 12px;
}

.work-source-badge {
  background: #fff;
  border: 1px solid var(--line);
  color: var(--muted);
}

.rating-s {
  background: rgba(63, 143, 81, 0.12);
  color: #2d7b42;
}

.rating-a {
  background: rgba(47, 111, 190, 0.12);
  color: #255b9c;
}

.rating-b {
  background: rgba(22, 121, 111, 0.12);
  color: var(--teal);
}

.rating-c {
  background: rgba(191, 122, 31, 0.14);
  color: var(--amber);
}

.rating-d {
  background: rgba(214, 95, 76, 0.14);
  color: var(--coral);
}

.status-todo {
  background: #eef2f0;
  color: var(--muted);
}

.status-doing {
  background: rgba(47, 111, 190, 0.12);
  color: var(--blue);
}

.status-blocked {
  background: rgba(214, 95, 76, 0.14);
  color: var(--coral);
}

.status-done {
  background: rgba(63, 143, 81, 0.13);
  color: var(--green);
}

.work-progress-row {
  align-items: center;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  gap: 12px;
}

.work-progress {
  background: #edf1ef;
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.work-progress span {
  background: linear-gradient(90deg, var(--teal), var(--blue));
  display: block;
  height: 100%;
}

.work-item-description {
  background: #f7faf8;
  border: 1px solid #e4ece8;
  border-radius: var(--radius);
  line-height: 1.65;
  margin: 0;
  padding: 12px;
}

.work-item-details {
  overflow: hidden;
  border: 1px solid #e1e9e5;
  border-radius: var(--radius);
  background: #fbfcfb;
}

.work-item-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.work-item-details > summary::-webkit-details-marker {
  display: none;
}

.work-item-details > summary:hover {
  background: rgba(22, 121, 111, 0.05);
}

.work-item-details > summary:focus-visible {
  outline: 3px solid rgba(22, 121, 111, 0.2);
  outline-offset: -3px;
}

.work-item-details > summary > span:first-child {
  display: grid;
  gap: 2px;
}

.work-item-details > summary small {
  color: var(--muted);
  font-size: 12px;
}

.work-detail-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.work-detail-toggle-text::before {
  content: "展开详情";
}

.work-item-details[open] .work-detail-toggle-text::before {
  content: "收起详情";
}

.work-detail-chevron {
  display: inline-block;
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.work-item-details[open] .work-detail-chevron {
  transform: rotate(180deg);
}

.work-item-details-body {
  display: grid;
  gap: 14px;
  padding: 0 14px 14px;
  border-top: 1px solid #e7eeea;
}

.work-item-details-body .work-item-description {
  margin-top: 14px;
}

.muted-text,
.subtask-empty {
  color: var(--muted);
}

.subtask-head {
  align-items: center;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.subtask-head span {
  color: var(--muted);
  font-weight: 700;
}

.subtask-list {
  display: grid;
  gap: 8px;
}

.subtask-row {
  align-items: center;
  background: #fbfcfb;
  border: 1px solid #e5ece8;
  border-radius: var(--radius);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
}

.subtask-row label {
  align-items: center;
  display: flex;
  gap: 9px;
  min-width: 0;
}

.subtask-row input {
  accent-color: var(--teal);
}

.subtask-row label span {
  overflow-wrap: anywhere;
}

.subtask-row.is-done label span {
  color: var(--muted);
  text-decoration: line-through;
}

.subtask-empty {
  margin: 0;
}

.subtask-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.work-remark-list {
  display: grid;
  gap: 8px;
}

.work-remark {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border: 1px solid #e5ece8;
  border-radius: var(--radius);
  background: #fbfcfb;
}

.work-remark-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  font-size: 13px;
  font-weight: 800;
}

.work-remark-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.work-remark-meta time {
  color: var(--muted);
  font-size: 12px;
}

.work-remark p {
  margin: 5px 0 0;
  line-height: 1.55;
}

.danger-text,
.mini-danger {
  color: #b3261e;
}

.mini-danger {
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  font-weight: 700;
  padding: 6px 8px;
}

.work-empty-state {
  padding: 28px;
}

@media (max-width: 960px) {
  .dashboard-grid,
  .work-board-grid {
    grid-template-columns: 1fr;
    display: grid;
  }

  .metrics-grid,
  .work-board-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar {
    grid-template-columns: 1fr;
  }

  .summary-topline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .summary-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-controls {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .summary-controls label {
    flex: 1 1 150px;
  }

  .summary-controls input {
    width: 100%;
  }

  .summary-day-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .summary-day-main {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .summary-day-side {
    align-items: flex-start;
    justify-items: start;
    width: 100%;
  }

  .summary-day-pills {
    justify-content: flex-start;
  }

  .summary-grid {
    grid-template-columns: 1fr;
  }

  .agent-layout,
  .agent-output-grid,
  .agent-workspace-grid,
  .ai-job-form,
  .ai-plan-grid,
  .publish-field-grid,
  .recruitment-workspace-grid,
  .compact-agent-card,
  .recruitment-job-card,
  .agent-status-row,
  .old-order-grid,
  .config-grid,
  .recruitment-form,
  .recruitment-job-metrics,
  .run-stats {
    grid-template-columns: 1fr;
  }

  .agent-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .work-board-head {
    align-items: stretch;
    flex-direction: column;
  }

  .agent-refresh {
    justify-content: space-between;
  }

  .agent-actions {
    min-width: 0;
  }

  .wide-output {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .login-panel {
    padding: 24px;
  }

  .metrics-grid,
  .work-board-metrics,
  .work-item-form,
  .subtask-add,
  .detail-grid,
  .full-fields,
  .summary-topline {
    grid-template-columns: 1fr;
  }

  .work-item-top {
    flex-direction: column;
  }

  .work-item-actions {
    justify-content: flex-start;
  }

  .topbar {
    gap: 12px;
  }

}
/* AI 电话 */
.phone-status-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.phone-status-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e7ebf0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 20px rgba(32, 50, 74, 0.05);
}

.phone-status-item div { display: grid; gap: 3px; }
.phone-status-item strong { color: #263548; font-size: 14px; }
.phone-status-item small { color: #8693a4; }
.phone-status-dot { width: 11px; height: 11px; border-radius: 50%; background: #c9d0d8; box-shadow: 0 0 0 5px rgba(154, 166, 180, 0.12); }
.phone-status-dot.connected { background: #21b978; box-shadow: 0 0 0 5px rgba(33, 185, 120, 0.12); }

.phone-panel.phone-node-panel { margin-bottom: 14px; padding: 16px; }
.phone-node-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.phone-node-panel .panel-head { margin-bottom: 10px; }
  .phone-node-guide { display: grid; gap: 3px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid #dce9f4; border-radius: 9px; color: #65758a; background: #f7fbff; font-size: 11px; line-height: 1.45; }
  .phone-node-guide strong { color: #35506d; }
  .phone-node-guide code { color: #156f64; }
.phone-node-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 280px)); gap: 9px; align-items: start; justify-content: start; }
.phone-node-card { min-width: 0; padding: 10px; border: 1px solid #e4e9ef; border-top: 3px solid #aeb8c4; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(39, 57, 78, .035); }
.phone-node-card.ready { border-left-color: #20b879; background: #f9fffc; }
.phone-node-card.online { border-left-color: #ef9a45; background: #fffdf9; }
.phone-node-card.disabled { opacity: 0.72; }
.phone-node-card.ready { border-top-color: #20b879; border-left-color: #e4e9ef; }
.phone-node-card.online { border-top-color: #ef9a45; border-left-color: #e4e9ef; }
.phone-node-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.phone-node-card-head > div { display: grid; min-width: 0; gap: 2px; }
.phone-node-card-head strong { overflow: hidden; color: #2d3c50; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-number { color: #136f63; font-size: 14px; letter-spacing: 0.2px; }
.phone-node-card-head > span { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: #667589; background: #eef2f5; font-size: 10px; font-weight: 750; }
.phone-node-card.ready .phone-node-card-head > span { color: #16875a; background: #e8f8f1; }
.phone-node-card.online .phone-node-card-head > span { color: #b2641b; background: #fff1df; }
.phone-node-card-meta { display: flex; min-width: 0; justify-content: space-between; gap: 6px; margin-top: 6px; color: #909bab; font-size: 9px; }
.phone-node-card-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-diagnostics { margin-top: 8px; border: 1px solid #e8edf2; border-radius: 8px; background: #fafbfd; }
.phone-node-diagnostics summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 8px; color: #647489; font-size: 10px; font-weight: 700; cursor: pointer; list-style: none; }
.phone-node-diagnostics summary::-webkit-details-marker { display: none; }
.phone-node-diagnostics summary::after { content: "›"; color: #97a3b2; font-size: 15px; transform: rotate(90deg); transition: transform .16s ease; }
.phone-node-diagnostics[open] summary::after { transform: rotate(-90deg); }
.phone-node-diagnostics summary em { margin-left: auto; color: #97a2af; font-size: 9px; font-style: normal; font-weight: 500; }
.phone-node-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; padding: 0 7px 7px; }
.phone-node-detail-item { display: grid; min-width: 0; gap: 1px; padding: 5px 6px; border: 1px solid #e6ebf0; border-radius: 6px; background: #f8fafc; }
.phone-node-detail-item small { overflow: hidden; color: #7f8b9b; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-detail-item strong { overflow: hidden; color: #7c8794; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-detail-item.ok { border-color: #d9eee5; background: #f3fbf7; }
.phone-node-detail-item.ok strong { color: #167c55; }
.phone-node-detail-item.missing { border-color: #f0e1d3; background: #fff9f3; }
.phone-node-detail-item.missing strong { color: #a2632d; }
.phone-node-detail-item.neutral { border-color: #e2e8ef; background: #f6f8fa; }
.phone-node-detail-item.neutral strong { color: #6e7c8e; }
.phone-node-reason.blocked { color: #9b5a24; }
.phone-node-reason.ready { color: #177952; }
.phone-node-card p { min-height: 0; margin: 0 7px 7px; color: #748296; font-size: 9px; line-height: 1.4; }
.phone-node-card footer { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; }
.phone-node-device-tags { display: flex; min-width: 0; align-items: center; gap: 4px; }
.phone-node-device-tags code, .phone-node-device-tags small { overflow: hidden; padding: 3px 5px; border-radius: 5px; color: #788697; background: #f0f3f6; font-family: inherit; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-device-tags code { max-width: 118px; }
.phone-node-actions { display: inline-flex; flex: 0 0 auto; gap: 6px; }
.phone-node-card footer button { flex: 0 0 auto; min-height: 40px; padding: 0 12px; font-size: 12px; }
  .phone-source-hint { display: block; min-height: 16px; margin-top: 5px; color: #6c7c8f; font-size: 10px; line-height: 1.45; }

.phone-node-edit-dialog { width: min(430px, calc(100vw - 28px)); box-sizing: border-box; padding: 0; border: 0; border-radius: 14px; color: #304157; box-shadow: 0 24px 70px rgba(28, 43, 61, .24); }
.phone-node-edit-dialog::backdrop { background: rgba(30, 42, 56, .42); backdrop-filter: blur(2px); }
.phone-node-edit-dialog form { display: grid; gap: 14px; padding: 20px; }
.phone-node-edit-head { position: sticky; top: 0; z-index: 6; background: var(--surface); }
.project-summary-modal-card > .project-section-head,
.project-delete-modal-card > .project-section-head { position: sticky; top: 0; z-index: 6; background: #fff; }
.people-modal-panel > header,
.import-history-head,
.phone-node-edit-head,
.project-summary-modal-card > .project-section-head,
.project-delete-modal-card > .project-section-head { flex-shrink: 0; }
.phone-node-edit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.phone-node-edit-head h3 { margin: 0 0 4px; }
.phone-node-edit-head p { margin: 0; color: #8491a1; font-size: 11px; line-height: 1.45; }
.phone-node-edit-dialog label { display: grid; gap: 6px; color: #617084; font-size: 11px; font-weight: 700; }
.phone-node-edit-dialog input { height: 40px; box-sizing: border-box; padding: 0 11px; border: 1px solid #dce2e9; border-radius: 8px; outline: 0; font-size: 14px; }
.phone-node-edit-dialog input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); }
.phone-node-computer-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 11px; border-radius: 8px; color: #7a8797; background: #f4f6f8; font-size: 10px; }
.phone-node-computer-preview code { overflow: hidden; color: #526176; text-overflow: ellipsis; white-space: nowrap; }
.phone-node-edit-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.phone-node-edit-actions button { min-height: 40px; border-radius: 8px; }

.phone-business-panel { display: grid; gap: 14px; margin-bottom: 14px; padding: 18px; overflow: hidden; }
.phone-business-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: end; gap: 18px; margin: 0 !important; }
.phone-business-head h3 { margin: 0 0 4px; }
.phone-business-common-settings { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 10px; }
.phone-business-common-settings .phone-select-field { margin: 0; padding: 9px 10px; }
.phone-business-common-settings .phone-select-field select { height: 36px; font-size: 11px; }
.phone-business-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.phone-business-card { display: grid; gap: 10px; min-width: 0; padding: 15px; border: 1px solid #e3e8ee; border-top: 3px solid #e97b45; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(37, 54, 75, .04); }
.phone-business-card.new-order { border-top-color: #3f8bc8; }
.phone-business-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.phone-business-card-head > div { display: grid; gap: 2px; }
.phone-business-card-head span { color: #e8682d; font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.phone-business-card.new-order .phone-business-card-head span { color: #367fb9; }
.phone-business-card-head h4 { margin: 0; color: #2f4055; font-size: 15px; }
.phone-business-card-head em { padding: 4px 7px; border-radius: 6px; color: #7d8998; background: #f1f4f7; font-size: 9px; font-style: normal; white-space: nowrap; }
.phone-business-card > p { margin: 0; color: #78879a; font-size: 11px; line-height: 1.55; }
.phone-business-card > label { display: grid; gap: 6px; color: #68778b; font-size: 11px; font-weight: 700; }
.phone-business-card textarea { width: 100%; min-height: 94px; box-sizing: border-box; resize: vertical; padding: 10px 11px; border: 1px solid #dce2e9; border-radius: 8px; outline: 0; color: #304157; background: #fbfcfd; font: inherit; line-height: 1.55; }
.phone-business-card textarea:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); background: #fff; }
.phone-business-card.new-order textarea:focus { border-color: #4c92c9; box-shadow: 0 0 0 3px rgba(63, 139, 200, .09); }
.phone-business-card .phone-batch-button { width: 100%; }
.phone-business-card.new-order .phone-batch-button-primary { border-color: #367fb9; background: linear-gradient(135deg, #539fd7, #367fb9); box-shadow: 0 8px 18px rgba(54, 127, 185, .18); }
.phone-order-lookup { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.phone-order-lookup-search { display: grid; align-content: start; gap: 15px; padding: 20px; background: linear-gradient(145deg, #f8fbfe 0%, #f3f8fc 100%); border-right: 1px solid #e1e8ef; }
.phone-order-lookup-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: start; gap: 11px; }
.phone-order-lookup-head > div { display: grid; gap: 3px; min-width: 0; }
.phone-order-lookup-mark { display: inline-flex; width: 42px; height: 42px; align-items: center; justify-content: center; border-radius: 12px; color: #fff; background: linear-gradient(145deg, #2687c9, #146da9); font-size: 17px; font-weight: 900; box-shadow: 0 8px 18px rgba(31, 124, 187, .22); }
.phone-order-lookup-eyebrow { color: #277fb9; font-size: 10px; font-weight: 850; letter-spacing: .8px; }
.phone-order-lookup-head h4 { margin: 0; color: #27394d; font-size: 17px; line-height: 1.35; }
.phone-order-lookup-head p { margin: 1px 0 0; color: #78889a; font-size: 11px; line-height: 1.55; }
.phone-order-lookup-badge { flex: 0 0 auto; padding: 5px 9px; border: 1px solid #e1e6eb; border-radius: 999px; color: #697789; background: rgba(255, 255, 255, .8); font-size: 10px; font-weight: 800; white-space: nowrap; }
.phone-order-lookup-badge.ready { border-color: #c7ead9; color: #176e4d; background: #eaf8f1; }
.phone-order-lookup-badge.blocked { border-color: #f1d7c7; color: #a2522b; background: #fff3ec; }
.phone-order-lookup-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; }
.phone-order-lookup-steps li { position: relative; display: flex; align-items: center; gap: 6px; color: #8a97a6; font-size: 10px; font-weight: 700; }
.phone-order-lookup-steps li:not(:last-child)::after { content: ""; height: 1px; flex: 1; margin-right: 7px; background: #d7e0e8; }
.phone-order-lookup-steps b { display: inline-flex; flex: 0 0 22px; width: 22px; height: 22px; align-items: center; justify-content: center; border-radius: 50%; color: #7e8b9a; background: #e8eef3; font-size: 10px; }
.phone-order-lookup-steps li.active { color: #277fb9; }
.phone-order-lookup-steps li.active b { color: #fff; background: #2a86c2; box-shadow: 0 4px 10px rgba(42, 134, 194, .22); }
.phone-order-lookup-controls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-items: end; }
.phone-order-lookup-controls .phone-select-field { gap: 6px; margin: 0; padding: 0; border: 0; font-size: 11px; background: transparent; }
.phone-order-lookup-controls select { height: 42px; padding-left: 10px; border-color: #d5e0e9; font-size: 12px; background: #fff; }
.phone-order-lookup-id { display: grid; gap: 6px; min-width: 0; color: #5e6f83; font-size: 11px; font-weight: 750; }
.phone-order-lookup-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; min-width: 0; overflow: hidden; border: 1px solid #cfdbe5; border-radius: 10px; background: #fff; box-shadow: 0 4px 12px rgba(43, 67, 91, .05); transition: border-color 160ms ease, box-shadow 160ms ease; }
.phone-order-lookup-input:focus-within { border-color: #3389c4; box-shadow: 0 0 0 3px rgba(51, 137, 196, .11); }
.phone-order-lookup-id input { width: 100%; height: 40px; min-width: 0; box-sizing: border-box; padding: 0 11px; border: 0; outline: 0; color: #25374c; background: transparent; font-size: 13px; letter-spacing: .15px; }
.phone-order-lookup-input button { min-width: 68px; margin: 4px; padding: 0 13px; border: 0; border-radius: 7px; color: #fff; background: #277fb9; font-size: 12px; font-weight: 800; cursor: pointer; transition: background 160ms ease, transform 160ms ease; }
.phone-order-lookup-input button:not(:disabled):hover { background: #176fa9; transform: translateY(-1px); }
.phone-order-lookup-input button:disabled { opacity: .58; cursor: wait; }
.phone-order-lookup-search > .phone-action-message { min-height: 17px; margin: -5px 0 0; color: #61768a; font-size: 11px; line-height: 1.5; }
.phone-order-lookup-source { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 6px; padding: 9px 10px; border: 1px solid #dfe8ef; border-radius: 9px; color: #8190a0; background: rgba(255, 255, 255, .65); font-size: 10px; }
.phone-order-lookup-source strong { color: #3b526a; font-size: 11px; }
.phone-order-lookup-source small { overflow: hidden; color: #8b98a7; font-size: 9px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.phone-order-lookup-review { display: grid; grid-template-rows: auto minmax(145px, 1fr) auto; gap: 12px; min-width: 0; padding: 20px; background: #fff; }
.phone-order-lookup-review-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.phone-order-lookup-review-head > div { display: flex; align-items: baseline; gap: 7px; }
.phone-order-lookup-review-head span { color: #27394d; font-size: 14px; font-weight: 850; }
.phone-order-lookup-review-head strong { color: #8794a3; font-size: 10px; font-weight: 650; }
.phone-order-lookup-review-head small { color: #97a3b0; font-size: 9px; }
.phone-order-lookup-empty { display: flex; min-height: 145px; align-items: center; justify-content: center; flex-direction: column; gap: 5px; border: 1px dashed #dbe4ec; border-radius: 12px; color: #91a0af; background: #fafcfd; text-align: center; }
.phone-order-lookup-empty[hidden] { display: none; }
.phone-order-lookup-empty > span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; margin-bottom: 2px; border-radius: 11px; color: #4a8fbe; background: #eaf4fb; font-size: 22px; }
.phone-order-lookup-empty strong { color: #65768a; font-size: 12px; }
.phone-order-lookup-empty p { margin: 0; color: #98a5b3; font-size: 10px; }
.phone-order-lookup-result { display: grid; align-content: start; gap: 10px; }
.phone-order-lookup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.phone-order-lookup-field { display: grid; gap: 3px; min-width: 0; padding: 8px 9px; border: 1px solid #edf1f4; border-radius: 8px; background: #f8fafc; }
.phone-order-lookup-field:nth-child(1), .phone-order-lookup-field:nth-child(7), .phone-order-lookup-field:nth-child(12) { grid-column: span 2; }
.phone-order-lookup-field span { color: #8a98a8; font-size: 9px; }
.phone-order-lookup-field strong { overflow: hidden; color: #31445a; font-size: 11px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.phone-order-lookup-issue { margin: 0; padding: 8px 10px; border-radius: 8px; color: #9b522c; background: #fff4ed; font-size: 10px; line-height: 1.5; }
.phone-order-lookup-issue.ok { color: #176e4d; background: #edf9f3; }
.phone-order-lookup-match-note { margin: 0; padding: 8px 10px; border: 1px solid #dce9f2; border-radius: 8px; color: #3e6f91; background: #f2f8fc; font-size: 10px; line-height: 1.5; }
.phone-order-lookup-confirm { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; padding-top: 12px; border-top: 1px solid #edf1f4; }
.phone-order-lookup-confirm p { margin: 0; color: #53657a; font-size: 11px; line-height: 1.5; }
.phone-order-lookup-confirm .phone-manual-start { width: auto; min-width: 180px; min-height: 40px; padding: 0 16px; }
.phone-order-lookup-confirm .phone-manual-start:disabled { cursor: not-allowed; }
.phone-business-message { min-height: 16px; color: #d9612b; font-size: 10px; line-height: 1.45; }
.phone-business-card.payment-reminder { border-top: 3px solid #5b76c9; background: linear-gradient(180deg, #fff 0%, #fafbff 100%); }
.phone-business-card.payment-reminder .phone-business-card-head span { color: #5269b3; }
.phone-payment-reminder-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.phone-payment-reminder-actions .phone-batch-button-danger { grid-column: 1 / -1; }
.phone-payment-reminder-actions input { min-width: 0; }
.phone-payment-reminder-summary { min-height: 42px; padding: 9px 10px; border: 1px solid #e1e6f1; border-radius: 8px; color: #56657d; background: #f8faff; font-size: 10px; line-height: 1.55; }
.phone-payment-reminder-summary.ready { color: #2e5b94; border-color: #cbd8f2; background: #f1f5ff; }
.phone-payment-reminder-summary.blocked { color: #9b522c; border-color: #f0d3c5; background: #fff7f3; }
.phone-payment-reminder-description { border-left-color: #5269b3; color: #5f6f8e; background: #f2f5ff; }

.payment-reminder-page { display: grid; gap: 16px; }
.payment-reminder-page.hidden { display: none; }
.payment-reminder-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; min-height: 126px; box-sizing: border-box; padding: 22px; overflow: hidden; border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-soft); }
.payment-reminder-kicker { display: block; margin-bottom: 7px; color: #5269b3; font-size: 10px; font-weight: 900; letter-spacing: 1.2px; }
.payment-reminder-hero h3 { margin: 0 0 8px; color: #293954; font-size: 25px; }
.payment-reminder-hero p { max-width: 780px; margin: 0; color: #708099; font-size: 13px; line-height: 1.7; }
.payment-reminder-hero-meta { display: grid; min-width: 190px; gap: 4px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); box-shadow: none; }
.payment-reminder-hero-meta span { color: #8290a6; font-size: 10px; font-weight: 750; }
.payment-reminder-hero-meta strong { color: #415aa7; font-size: 21px; letter-spacing: .3px; }
.payment-reminder-hero-meta small { color: #9aa5b5; font-size: 9px; }

.payment-reminder-workspace { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(310px, .65fr); gap: 14px; }
.payment-reminder-import-card, .payment-reminder-rules-card, .payment-reminder-data-panel, .payment-reminder-runbar { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-soft); }
.payment-reminder-import-card, .payment-reminder-rules-card { display: grid; align-content: start; gap: 13px; padding: 18px; }
.payment-reminder-import-card header, .payment-reminder-rules-card header, .payment-reminder-data-head > div, .payment-reminder-run-copy { display: flex; align-items: flex-start; gap: 10px; }
.payment-reminder-import-card header > div, .payment-reminder-rules-card header > div, .payment-reminder-data-head > div > div, .payment-reminder-run-copy > div { min-width: 0; }
.payment-reminder-import-card h4, .payment-reminder-rules-card h4, .payment-reminder-data-head h4, .payment-reminder-run-copy h4 { margin: 0 0 3px; color: #31415a; font-size: 14px; }
.payment-reminder-import-card header p, .payment-reminder-rules-card header p, .payment-reminder-data-head p, .payment-reminder-run-copy p { margin: 0; color: #8a97a9; font-size: 10px; line-height: 1.5; }
.payment-reminder-step { display: inline-flex; flex: 0 0 28px; width: 28px; height: 28px; align-items: center; justify-content: center; border-radius: 8px; color: var(--teal-strong); background: #e8f3ed; font-size: 12px; font-weight: 700; box-shadow: none; }
.payment-reminder-file-field { display: grid; gap: 7px; color: #627188; font-size: 11px; font-weight: 750; }
.payment-reminder-file-field input { width: 100%; min-height: 44px; box-sizing: border-box; padding: 5px; border: 1px dashed #cdd6e4; border-radius: 10px; color: #6f7d91; background: #f9fafc; font-size: 11px; }
.payment-reminder-file-field input::file-selector-button { min-height: 32px; margin-right: 10px; padding: 0 13px; border: 1px solid #cbd5e2; border-radius: 7px; color: #40516a; background: #fff; font-weight: 750; cursor: pointer; }
.payment-reminder-import-card .phone-payment-reminder-actions { grid-template-columns: minmax(180px, 1fr) minmax(120px, .55fr); }
.payment-reminder-import-card .phone-business-message { min-height: 16px; }
.payment-reminder-upload-progress { height: 7px; overflow: hidden; border-radius: 999px; background: #e8eeeb; }
.payment-reminder-upload-progress[hidden] { display: none; }
.payment-reminder-upload-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--teal); transition: width .16s ease; }
.payment-reminder-rules-card { background: #fff; }
.payment-reminder-rules-card ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.payment-reminder-rules-card li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 9px; border-radius: 8px; color: #8290a2; background: #f5f7fb; font-size: 9px; }
.payment-reminder-rules-card li strong { color: #4a5a72; font-size: 10px; text-align: right; }
.payment-reminder-rules-card > p { margin: -5px 0 0; color: #9b8490; font-size: 9px; text-align: center; }
.payment-reminder-rules-card .phone-batch-button-danger { min-height: 40px; }

.payment-reminder-data-panel { display: grid; gap: 14px; padding: 18px; }
.payment-reminder-data-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.payment-reminder-data-head h4 { font-size: 16px; }
.payment-reminder-data-badge { display: inline-flex; flex: 0 0 auto; min-height: 27px; align-items: center; padding: 0 10px; border-radius: 999px; color: #778599; background: #eef1f5; font-size: 10px; font-weight: 800; }
.payment-reminder-data-badge.ready { color: #26704f; background: #eaf7f0; }
.payment-reminder-data-badge.blocked { color: #a55330; background: #fff0e9; }
.payment-reminder-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.payment-reminder-stats article { position: relative; display: grid; gap: 4px; min-width: 0; padding: 13px 14px 12px; overflow: hidden; border: 1px solid #e7ebf2; border-radius: 11px; background: #fafbfd; }
.payment-reminder-stats article::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: #8595b1; }
.payment-reminder-stats article.excluded::before { background: #d59b4e; }
.payment-reminder-stats article.invalid::before { background: #cf6d78; }
.payment-reminder-stats article.eligible::before { background: #36a170; }
.payment-reminder-stats span { color: #78869a; font-size: 10px; font-weight: 750; }
.payment-reminder-stats strong { color: #31415a; font-size: 25px; line-height: 1.1; }
.payment-reminder-stats article.eligible strong { color: #27825b; }
.payment-reminder-stats small { overflow: hidden; color: #9aa5b4; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.payment-reminder-data-panel .phone-payment-reminder-summary { min-height: 0; padding: 10px 12px; font-size: 10px; }
.payment-reminder-table-wrap { max-height: 430px; overflow: auto; border: 1px solid #e5e9ef; border-radius: 10px; }
.payment-reminder-table { width: 100%; min-width: 1020px; border-collapse: collapse; color: #4a596d; font-size: 11px; }
.payment-reminder-table th { position: sticky; top: 0; z-index: 1; padding: 11px 10px; border-bottom: 1px solid #e1e6ed; color: #6c7a8d; background: #f5f7fa; text-align: left; white-space: nowrap; }
.payment-reminder-table td { max-width: 190px; padding: 10px; overflow: hidden; border-bottom: 1px solid #edf0f4; text-overflow: ellipsis; white-space: nowrap; }
.payment-reminder-table tbody tr:hover { background: #f8faff; }
.payment-reminder-table tr:last-child td { border-bottom: 0; }
.payment-reminder-table td strong { color: #354761; font-weight: 800; }
.payment-reminder-table td.amount { color: #4c62ad; font-weight: 800; }
.payment-reminder-customer-cell { display: grid; gap: 3px; min-width: 118px; }
.payment-reminder-gender-cell { display: grid; gap: 2px; }
.payment-reminder-gender-cell strong { color: #59697d; }
.payment-reminder-gender-cell small { overflow: hidden; color: #8793a3; font-size: 9px; text-overflow: ellipsis; }
.payment-reminder-gender-cell.is-matched strong { color: #257064; }
.payment-reminder-order-status { display: inline-flex; padding: 3px 7px; border-radius: 999px; color: #2d7656; background: #eaf7f1; font-size: 9px; font-weight: 750; }
.payment-reminder-table td.payment-reminder-table-empty { height: 120px; color: #9aa6b4; text-align: center; white-space: normal; }

.payment-reminder-runbar { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.4fr) auto; align-items: center; gap: 16px; padding: 18px; border-color: var(--line); background: #fff; }
.payment-reminder-run-settings { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 10px; }
.payment-reminder-run-settings label { display: grid; gap: 5px; min-width: 0; color: #66758a; font-size: 10px; font-weight: 750; }
.payment-reminder-run-settings select { width: 100%; height: 38px; min-width: 0; box-sizing: border-box; padding: 0 9px; border: 1px solid #d8dfe9; border-radius: 8px; color: #3d4f68; background: #fff; font-size: 10px; }
.payment-reminder-run-settings small { overflow: hidden; color: #94a0af; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.payment-reminder-runbar > .phone-batch-button { min-width: 214px; }
.payment-reminder-queue-actions { display: flex; min-width: 0; flex-direction: column; gap: 8px; }
.payment-reminder-queue-actions .phone-batch-button { min-width: 214px; max-width: 100%; white-space: normal; }
.payment-reminder-queue-state { grid-column: 1 / -1; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.payment-reminder-queue-state.is-blocked { border-color: #e6d1ae; background: #fffaf1; }
.payment-reminder-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.payment-reminder-queue-head strong { font-size: 14px; }
.payment-reminder-queue-head .phone-batch-button { min-height: 34px; padding: 0 12px; font-size: 12px; }
.payment-reminder-queue-state p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
#phonePaymentReminderBatchContext { color: var(--muted); }
#phonePaymentReminderBatchActionMessage:empty { display: none; }
.phone-order-queue-panel { padding: 12px; border: 1px solid #e7ebf0; border-radius: 11px; background: #fafbfd; }
.phone-order-queue-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.phone-order-queue-head > div:first-child { display: grid; gap: 3px; min-width: 0; }
.phone-order-queue-head strong { color: #35465c; font-size: 12px; }
.phone-order-queue-head span { overflow: hidden; color: #8490a0; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.phone-order-queue-head > div:last-child { display: flex; gap: 7px; }
.phone-order-queue-head .phone-batch-button { min-height: 40px; padding: 0 14px; font-size: 12px; }
.phone-order-queue-list { display: grid; gap: 6px; margin-top: 9px; }
.phone-order-queue-item { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 9px; border: 1px solid #e8ecf1; border-radius: 8px; background: #fff; }
.phone-order-queue-item.dialing, .phone-order-queue-item.in_call { border-color: #f2c8b4; background: #fff8f4; }
.phone-order-queue-index { display: inline-flex; width: 24px; height: 24px; align-items: center; justify-content: center; border-radius: 7px; color: #6d7b8e; background: #edf1f5; font-size: 10px; font-weight: 800; }
.phone-order-queue-item > div { display: grid; min-width: 0; gap: 2px; }
.phone-order-queue-item strong, .phone-order-queue-item small, .phone-order-queue-item em { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-order-queue-item strong { color: #394a60; font-size: 11px; }
.phone-order-queue-item small { color: #8793a2; font-size: 9px; }
.phone-order-queue-item em { color: #6e7c8e; font-size: 9px; font-style: normal; }
.phone-advanced-block { margin-bottom: 14px; border: 1px solid #e4e9ef; border-radius: 11px; background: #fff; }
.phone-advanced-block > summary { padding: 12px 15px; color: #667589; font-size: 12px; font-weight: 750; cursor: pointer; }
.phone-advanced-block .phone-batch-panel { margin: 0; border: 0; border-top: 1px solid #edf0f4; border-radius: 0 0 11px 11px; box-shadow: none; }

.phone-panel.phone-batch-panel { margin-bottom: 18px; padding: 0; overflow: hidden; }
.phone-panel.phone-batch-panel .phone-batch-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0; padding: 21px 24px 18px; border-bottom: 1px solid #edf0f4; background: linear-gradient(135deg, #ffffff 45%, #fff8f3 100%); }
.phone-batch-kicker { display: block; margin-bottom: 5px; color: #f06a2d; font-size: 10px; font-weight: 800; letter-spacing: 1.4px; }
.phone-template-link { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; min-height: 40px; box-sizing: border-box; padding: 0 14px; border: 1px solid #f0d6c8; border-radius: 9px; color: #d85c23; background: #fff; text-decoration: none; font-size: 13px; font-weight: 700; box-shadow: 0 5px 14px rgba(73, 52, 38, 0.05); transition: 160ms ease; }
.phone-template-link:hover { border-color: #ff9b6b; background: #fff7f2; transform: translateY(-1px); }
.phone-template-link span { font-size: 17px; line-height: 1; }

.phone-batch-flow { display: grid; grid-template-columns: minmax(310px, 0.85fr) minmax(520px, 1.45fr); gap: 14px; padding: 18px 22px 0; background: #fbfcfd; }
.phone-batch-step { min-width: 0; padding: 16px; border: 1px solid #e6eaf0; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(39, 57, 78, 0.035); }
.phone-batch-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.phone-batch-step-head h4 { margin: 0 0 2px; color: #2b394d; font-size: 14px; }
.phone-batch-step-head p { margin: 0; color: #929dac; font-size: 11px; }
.phone-batch-step-number { display: inline-flex; flex: 0 0 25px; width: 25px; height: 25px; align-items: center; justify-content: center; border-radius: 8px; color: #fff; background: linear-gradient(145deg, #ff7d3f, #f05d22); font-size: 12px; font-weight: 800; box-shadow: 0 5px 12px rgba(240, 93, 34, 0.2); }

.phone-batch-file-card { display: flex; align-items: center; gap: 11px; min-height: 62px; box-sizing: border-box; padding: 10px 12px; border: 1px dashed #d7dee7; border-radius: 10px; background: #fafbfd; }
.phone-batch-file-icon { display: inline-flex; flex: 0 0 39px; width: 39px; height: 39px; align-items: center; justify-content: center; border-radius: 9px; color: #25865d; background: #e9f7f0; font-size: 10px; font-weight: 900; letter-spacing: 0.3px; }
.phone-batch-file-copy { display: grid; min-width: 0; gap: 3px; }
.phone-batch-file-copy strong { overflow: hidden; color: #34445a; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.phone-batch-file-copy small { overflow: hidden; color: #929dab; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.phone-batch-upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }

.phone-batch-button { display: inline-flex; min-height: 40px; box-sizing: border-box; align-items: center; justify-content: center; padding: 0 16px; border-radius: 9px; font-size: 13px; font-weight: 750; white-space: nowrap; cursor: pointer; transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease, transform 160ms ease; }
.phone-batch-button:not(:disabled):hover { transform: translateY(-1px); }
.phone-batch-button[hidden] { display: none !important; }
.phone-batch-button-primary { border: 1px solid #0d6254; color: #fff; background: linear-gradient(135deg, #1a8a76, #0d6254); box-shadow: 0 9px 20px rgba(13, 98, 84, 0.2); }
.phone-batch-button-primary:not(:disabled):hover { background: linear-gradient(135deg, #1f9b84, #0f6f5f); box-shadow: 0 11px 22px rgba(13, 98, 84, 0.26); }
.phone-batch-button-secondary { border: 1px solid #cfdae5; color: #3e5066; background: #fff; box-shadow: 0 5px 12px rgba(42, 60, 82, 0.05); }
.phone-batch-button-secondary:not(:disabled):hover, .phone-batch-button-outline:not(:disabled):hover { border-color: #ff9a69; color: #e75d20; background: #fff8f4; }
.phone-batch-button-outline { border: 1px solid #e9c9b8; color: #d65c25; background: #fffaf7; }
.phone-batch-button-danger { border: 1px solid #efc4c9; color: #d94b59; background: #fff7f8; }
.phone-batch-button-danger:not(:disabled):hover { border-color: #e97883; background: #fff0f2; }

.phone-batch-settings { display: grid; grid-template-columns: minmax(210px, 1.2fr) minmax(180px, 1fr) minmax(130px, 0.55fr); gap: 10px; }
.phone-batch-settings .phone-select-field { margin: 0; padding: 10px 11px; border-color: #e6eaf0; background: #fafbfd; }
.phone-batch-settings .phone-select-field > span { font-size: 11px; }
.phone-batch-settings .phone-select-field select { height: 38px; font-size: 12px; }
.phone-batch-settings input { width: 100%; height: 40px; box-sizing: border-box; padding: 0 38px 0 11px; border: 1px solid #d5dce5; border-radius: 8px; outline: none; color: #2f3f54; background: #fff; font-size: 13px; }
.phone-batch-settings input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); }
.phone-batch-interval { position: relative; }
.phone-batch-interval em { position: absolute; top: 50%; right: 11px; color: #929dac; font-size: 11px; font-style: normal; transform: translateY(-50%); pointer-events: none; }

.phone-batch-runbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin: 14px 22px 20px; padding: 14px 16px; border: 1px solid #e7ebf0; border-radius: 12px; background: #fff; box-shadow: 0 5px 15px rgba(39, 57, 78, 0.035); }
.phone-batch-run-status { min-width: 0; }
.phone-batch-run-heading { display: flex; align-items: center; gap: 9px; color: #2e3d51; font-size: 13px; }
.phone-batch-run-heading .phone-batch-step-number { flex-basis: 22px; width: 22px; height: 22px; border-radius: 7px; font-size: 11px; }
.phone-batch-state-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; color: #798697; background: #eef2f5; font-size: 10px; font-weight: 700; }
.phone-batch-state-badge.selected { color: #356ba4; background: #edf5fd; }
.phone-batch-state-badge.ready { color: #18845a; background: #e9f7f0; }
.phone-batch-state-badge.running, .phone-batch-state-badge.waiting, .phone-batch-state-badge.dialing, .phone-batch-state-badge.in_call { color: #d85a20; background: #fff0e8; }
.phone-batch-state-badge.paused { color: #9b6b13; background: #fff6dc; }
.phone-batch-state-badge.completed { color: #187f58; background: #e9f7f0; }
.phone-batch-summary { margin-top: 7px; color: #6c7a8d; font-size: 12px; line-height: 1.5; }
.phone-batch-run-status .phone-action-message { display: block; min-height: 0; margin: 3px 0 0; color: #e2652c; font-size: 11px; }
.phone-batch-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.phone-batch-actions .phone-batch-button { min-width: 154px; }

.phone-batch-table-wrap { max-height: 360px; margin: 0 22px 22px; overflow: auto; border: 1px solid #e6eaf0; border-radius: 10px; }
.phone-batch-table { width: 100%; min-width: 1280px; border-collapse: collapse; color: #445369; font-size: 12px; }
.phone-batch-table th { position: sticky; top: 0; z-index: 1; padding: 11px 10px; color: #67768a; text-align: left; background: #f5f7fa; border-bottom: 1px solid #e3e8ee; white-space: nowrap; }
.phone-batch-table td { padding: 10px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
.phone-batch-table tr:last-child td { border-bottom: 0; }
.phone-batch-table tr.invalid { background: #fff7f7; }
.phone-batch-table tr.active { background: #fff7f2; }
.phone-batch-table select { height: 32px; padding: 0 8px; border: 1px solid #d9e0e8; border-radius: 7px; color: #405066; background: #fff; }
.phone-batch-stage { display: grid; gap: 2px; }
.phone-batch-stage small { color: #98a3b1; }
.phone-batch-status { display: inline-flex; padding: 4px 8px; border-radius: 999px; color: #6f7e91; background: #eef2f6; white-space: nowrap; }
.phone-batch-status.in_call, .phone-batch-status.dialing { color: #d95718; background: #fff0e8; }
.phone-batch-status.completed { color: #178b5a; background: #eaf8f2; }
.phone-batch-status.failed, .phone-batch-status.invalid { color: #c64f58; background: #fff0f1; }
.phone-batch-status.pending { color: #5f6f83; background: #f0f3f7; }
.phone-review-flag { display: inline-flex; margin-right: 6px; padding: 2px 6px; border: 1px solid #f0b77d; border-radius: 999px; color: #a65412; background: #fff7ed; font-size: 11px; line-height: 1.4; white-space: nowrap; }
.phone-follow-up-date { display: block; margin-top: 3px; color: #9aa5b3; }

.phone-panel { padding: 22px; border: 1px solid #e7ebf0; border-radius: 14px; background: #fff; box-shadow: 0 8px 24px rgba(32, 50, 74, 0.06); }
.phone-panel .panel-head { margin-bottom: 20px; }
.phone-panel .panel-head h3 { margin: 0 0 5px; color: #263548; }
.phone-panel .panel-head p { margin: 0; color: #8b97a6; font-size: 13px; }
.phone-manual-panel { display: grid; gap: 12px; margin-bottom: 14px; padding: 18px; }
.phone-manual-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 !important; }
.phone-manual-head .danger-button { flex: 0 0 auto; min-height: 40px; padding: 0 14px; border-radius: 9px; cursor: pointer; }
.phone-manual-console { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.25fr) auto; gap: 10px; align-items: end; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-soft); box-shadow: none; }
.phone-manual-console-title { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 9px; color: #526376; }
.phone-manual-console-title span { color: #26788a; font-size: 11px; font-weight: 850; letter-spacing: .4px; }
.phone-manual-console-title strong { font-size: 13px; }
.phone-manual-console .phone-select-field { gap: 5px; padding: 8px 9px; font-size: 11px; background: #fff; }
.phone-manual-console .phone-select-field select { height: 37px; padding-left: 9px; font-size: 11px; }
.phone-manual-source-status { min-height: 55px; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 9px; box-sizing: border-box; padding: 9px 11px; border: 1px solid #efd9c8; border-radius: 10px; color: #88582f; background: #fff9f3; }
.phone-manual-source-status.ready { border-color: #bfe2d3; color: #176e4d; background: #f1fbf7; }
.phone-manual-source-dot { width: 9px; height: 9px; border-radius: 50%; background: #d88948; box-shadow: 0 0 0 4px rgba(216, 137, 72, .12); }
.phone-manual-source-status.ready .phone-manual-source-dot { background: #25a36e; box-shadow: 0 0 0 4px rgba(37, 163, 110, .12); }
.phone-manual-source-status > div { min-width: 0; display: grid; gap: 3px; }
.phone-manual-source-status strong, .phone-manual-source-status small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.phone-manual-source-status strong { font-size: 11px; }
.phone-manual-source-status small { opacity: .88; font-size: 9px; }
.phone-manual-refresh { min-height: 55px; padding: 0 12px; border-radius: 9px; cursor: pointer; white-space: nowrap; }
.phone-manual-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.phone-business-grid.is-single-business, .phone-manual-grid.is-single-business { grid-template-columns: minmax(0, 1fr); }
.collection-phone-page { display: grid; gap: 16px; min-width: 0; }
.collection-phone-page.hidden { display: none; }
.collection-phone-hero { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 22px; border: 1px solid #eadfd8; border-radius: 16px; background: linear-gradient(135deg, #fff 0%, #fff8f3 100%); box-shadow: 0 8px 24px rgba(83, 55, 39, .05); }
.collection-phone-hero > div { display: grid; gap: 5px; min-width: 0; }
.collection-phone-hero h3 { margin: 0; color: #2f4055; font-size: 24px; }
.collection-phone-hero p { max-width: 720px; margin: 0; color: #69798c; font-size: 12px; line-height: 1.65; }
.collection-phone-safety { flex: 0 0 auto; padding: 7px 11px; border: 1px solid #efc8b4; border-radius: 999px; color: #a8532e; background: #fff; font-size: 11px; font-weight: 800; }
.collection-phone-business-panel .phone-order-lookup-mark { background: linear-gradient(135deg, #e56b36, #bc4d21); }
.collection-phone-page .phone-record-toolbar { grid-template-columns: minmax(240px, 1fr) 140px auto; }
.collection-phone-page .phone-record-layout.is-empty { min-height: 280px; }
.collection-phone-page .phone-record-layout.is-empty .phone-record-detail-empty { min-height: 280px; }
.phone-manual-card { display: grid; min-width: 0; gap: 10px; padding: 15px; border: 1px solid #e4e8ee; border-top: 3px solid #eb7540; border-radius: 12px; background: linear-gradient(180deg, #fff 0%, #fffdfb 100%); box-shadow: 0 5px 16px rgba(37, 54, 75, .04); }
.phone-manual-card.new-order { border-top-color: #3f8bc8; background: linear-gradient(180deg, #fff 0%, #fbfdff 100%); }
.phone-manual-card.payment-reminder { border-top-color: #5b76c9; background: linear-gradient(180deg, #fff 0%, #fafbff 100%); }
.phone-manual-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.phone-manual-card-head > div { display: grid; gap: 2px; }
.phone-manual-card-head span { color: #df642d; font-size: 9px; font-weight: 900; letter-spacing: 1px; }
.phone-manual-card.new-order .phone-manual-card-head span { color: #367fb9; }
.phone-manual-card.payment-reminder .phone-manual-card-head span { color: #5269b3; }
.phone-manual-card-head h4 { margin: 0; color: #2f4055; font-size: 15px; }
.phone-manual-card-head em { padding: 4px 7px; border-radius: 6px; color: #7d8998; background: #f1f4f7; font-size: 9px; font-style: normal; white-space: nowrap; }
.phone-number-field { display: grid; gap: 8px; color: #566579; font-size: 13px; }
.phone-number-field input { width: 100%; box-sizing: border-box; padding: 14px 15px; border: 1px solid #dce2e9; border-radius: 9px; outline: none; color: #233247; background: #fbfcfe; font-size: 20px; letter-spacing: 0.5px; }
.phone-number-field input:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); background: #fff; }
.phone-config-grid { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.phone-select-field { display: grid; gap: 8px; padding: 13px 14px; border: 1px solid #e1e6ed; border-radius: 10px; color: #566579; background: #fafbfd; font-size: 13px; }
.phone-select-field span { color: #69778a; font-weight: 600; }
.phone-select-field select { width: 100%; min-width: 0; height: 42px; box-sizing: border-box; padding: 0 38px 0 12px; border: 1px solid #d5dce5; border-radius: 8px; outline: none; appearance: auto; color: #2f3f54; background-color: #fff; font-size: 14px; cursor: pointer; }
.phone-select-field select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); }
.phone-option-description { min-height: 38px; margin: 10px 2px 0; padding: 10px 12px; border-left: 3px solid #ff7a3d; border-radius: 0 8px 8px 0; color: #718095; background: #fff7f2; font-size: 12px; line-height: 1.6; }
.phone-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.phone-detail-grid label { display: grid; gap: 7px; color: #69778a; font-size: 12px; font-weight: 600; }
.phone-detail-grid label.wide { grid-column: 1 / -1; }
.phone-detail-grid input, .phone-detail-grid select { width: 100%; height: 40px; box-sizing: border-box; padding: 0 12px; border: 1px solid #dce2e9; border-radius: 8px; outline: none; color: #334258; background: #fbfcfe; font-size: 14px; font-weight: 400; }
.phone-detail-grid input:focus, .phone-detail-grid select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); background: #fff; }
.phone-name-hint { margin: 10px 2px 0; color: #8290a2; font-size: 11px; line-height: 1.55; }
.phone-manual-card .phone-number-field { gap: 6px; font-size: 11px; font-weight: 700; }
.phone-manual-card .phone-number-field input { height: 42px; padding: 0 12px; font-size: 16px; }
.phone-manual-card .phone-config-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 0; }
.phone-manual-card .phone-select-field { gap: 6px; padding: 9px 10px; font-size: 11px; }
.phone-manual-card .phone-select-field select { height: 36px; padding-left: 9px; font-size: 11px; }
.phone-manual-card .phone-option-description { min-height: 0; margin: 0; padding: 8px 10px; font-size: 10px; line-height: 1.5; }
.phone-manual-card.new-order .phone-option-description { border-left-color: #438cc6; color: #64788e; background: #f1f7fd; }
.phone-manual-card .phone-detail-grid { gap: 8px; margin-top: 0; }
.phone-manual-card .phone-detail-grid label { gap: 5px; font-size: 10px; }
.phone-manual-card .phone-detail-grid input, .phone-manual-card .phone-detail-grid select { height: 36px; padding: 0 10px; font-size: 11px; }
.phone-manual-card .payment-reminder-gender-field { position: relative; align-content: start; }
.phone-manual-card .payment-reminder-gender-field select:disabled { color: #42536a; border-color: #d9e2e8; background: #f1f5f7; opacity: 1; cursor: not-allowed; }
.payment-reminder-gender-status { min-height: 28px; color: #6f7d8e; font-size: 9px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.payment-reminder-gender-status.is-matched { color: #257064; }
.payment-reminder-gender-status.is-loading { color: #6b61a8; }
.payment-reminder-gender-status.is-error { padding-right: 76px; color: #b4493d; }
.payment-reminder-gender-status.is-unknown { color: #8a6b36; }
.payment-reminder-gender-retry { position: absolute; right: 0; bottom: 2px; padding: 3px 7px; border: 1px solid #d7a198; border-radius: 999px; color: #a04439; background: #fff; font: inherit; cursor: pointer; }
.payment-reminder-gender-retry:hover { background: #fff5f3; }
.phone-manual-card.new-order .phone-number-field input:focus,
.phone-manual-card.new-order .phone-detail-grid input:focus,
.phone-manual-card.new-order .phone-detail-grid select:focus { border-color: #438cc6; box-shadow: 0 0 0 3px rgba(63, 139, 200, .09); }
.phone-manual-card .phone-name-hint { margin: 0; font-size: 9px; }
.phone-manual-start { width: 100%; min-height: 40px; border: 1px solid #0d6254; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #1a8a76, #0d6254); font-size: 12px; font-weight: 800; box-shadow: 0 8px 18px rgba(13, 98, 84, .18); cursor: pointer; transition: 160ms ease; }
.phone-manual-start.new-order { border-color: #367fb9; background: linear-gradient(135deg, #539fd7, #367fb9); box-shadow: 0 8px 18px rgba(54, 127, 185, .18); }
.phone-manual-start.payment-reminder { border-color: #5269b3; background: linear-gradient(135deg, #7188d6, #5269b3); box-shadow: 0 8px 18px rgba(82, 105, 179, .18); }
.phone-manual-start:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.03); }
.phone-manual-start:disabled { opacity: .65; cursor: wait; }
.phone-manual-card .phone-action-message { min-height: 16px; margin: -2px 0 0; font-size: 10px; line-height: 1.45; }
.phone-manual-global-message { min-height: 0; margin: 0 2px; font-size: 11px; }
.phone-actions { display: flex; gap: 10px; margin-top: 16px; }
.phone-actions button { flex: 1; min-height: 42px; }
.phone-actions .primary-button { border: 1px solid #0d6254; border-radius: 9px; color: #fff; background: linear-gradient(135deg, #1a8a76, #0d6254); font-weight: 750; box-shadow: 0 9px 20px rgba(13, 98, 84, 0.2); cursor: pointer; transition: 160ms ease; }
.phone-actions .primary-button:not(:disabled):hover { background: linear-gradient(135deg, #1f9b84, #0f6f5f); box-shadow: 0 11px 22px rgba(13, 98, 84, 0.26); transform: translateY(-1px); }
.danger-button { color: #d84d57 !important; border-color: #f0cfd2 !important; background: #fff7f7 !important; }
.phone-action-message { min-height: 22px; margin: 14px 0 0; color: #68778a; font-size: 13px; line-height: 1.6; }

.phone-record-panel { margin-bottom: 18px; }
.phone-record-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.phone-record-overview { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.phone-record-overview > div { position: relative; min-width: 0; min-height: 78px; padding: 14px 16px; overflow: hidden; border: 1px solid #e7ebf0; border-radius: 11px; background: #fff; box-shadow: 0 5px 15px rgba(39, 57, 78, .035); }
.phone-record-overview > div::after { content: ""; position: absolute; right: -22px; bottom: -31px; width: 80px; height: 80px; border-radius: 50%; background: #eef6ff; }
.phone-record-overview > div:nth-child(1)::after { background: #fff1ea; }
.phone-record-overview > div:nth-child(2)::after { background: #fff0f2; }
.phone-record-overview > div:nth-child(3)::after { background: #eaf8f1; }
.phone-record-overview > div:nth-child(4)::after { background: #fff7df; }
.phone-record-overview span, .phone-record-overview strong, .phone-record-overview small { position: relative; z-index: 1; }
.phone-record-overview span { display: block; color: #8a96a6; font-size: 11px; }
.phone-record-overview strong { display: inline-block; margin-top: 7px; color: #29394e; font-size: 23px; line-height: 1; }
.phone-record-overview .alert strong { color: #d94754; }
.phone-record-overview small { margin-left: 6px; color: #96a1af; font-size: 9px; }
.phone-record-toolbar { display: grid; grid-template-columns: minmax(240px, 1fr) 130px 140px auto; gap: 9px; margin-bottom: 12px; padding: 10px; border: 1px solid #e7ebf0; border-radius: 11px; background: #fff; }
.phone-record-toolbar.has-date-filter { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.phone-record-date-filter { display: flex; min-width: 0; align-items: center; gap: 6px; color: #536378; font-size: 11px; }
.phone-record-date-filter label { flex-shrink: 0; }
.phone-record-date-filter input { flex: 1; min-width: 0; height: 40px; box-sizing: border-box; padding: 0 6px; border: 1px solid #dce3eb; border-radius: 8px; color: #44546a; background: #fbfcfe; font: inherit; }
.phone-record-date-filter input:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.phone-record-date-filter button { min-height: 40px; padding: 0 8px; border: 1px solid #dce3eb; border-radius: 8px; color: #536378; background: #fff; font: inherit; }
.phone-record-search { position: relative; }
.phone-record-search > span { position: absolute; top: 7px; left: 11px; color: #8b97a7; font-size: 20px; transform: rotate(-16deg); }
.phone-record-search input, .phone-record-toolbar select { width: 100%; height: 40px; box-sizing: border-box; border: 1px solid #dce3eb; border-radius: 8px; outline: 0; color: #44546a; background: #fbfcfe; font-size: 11px; }
.phone-record-search input { padding: 0 11px 0 36px; }
.phone-record-toolbar select { padding: 0 8px; }
.phone-record-search input:focus, .phone-record-toolbar select:focus { border-color: var(--focus-ring); box-shadow: 0 0 0 3px rgba(36, 141, 121, .12); background: #fff; }
.phone-record-filter-button { min-height: 40px; padding: 0 14px; border: 1px solid #dce3eb; border-radius: 8px; color: #536378; background: #fff; font-size: 11px; font-weight: 700; }
.phone-record-filter-button[aria-pressed="true"] { border-color: #efb7bd; color: #c63e4a; background: #fff1f2; }
.phone-record-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 690px; overflow: hidden; border: 1px solid #e5eaf0; border-radius: 12px; background: #fff; }
.phone-record-list-pane { display: flex; min-width: 0; min-height: 0; overflow: hidden; flex-direction: column; contain: size; border-right: 1px solid #e8ecf1; background: #fafbfd; }
.phone-record-list-head { display: flex; align-items: center; justify-content: space-between; min-height: 44px; padding: 0 13px; border-bottom: 1px solid #edf0f4; }
.phone-record-list-head strong { color: #39495e; font-size: 12px; }
.phone-record-list-head span { color: #929dad; font-size: 10px; }
.phone-record-date-hint { margin: -3px 0 10px; color: var(--muted, #647388); font-size: 12px; }
.phone-record-pagination { display: grid; gap: 8px; padding: 10px 12px; border-top: 1px solid #e8ecf1; background: #fff; }
.phone-record-pagination > span { color: #536378; font-size: 12px; }
.phone-record-pagination > div { display: flex; gap: 8px; }
.phone-record-pagination button { flex: 1; min-height: 44px; border: 1px solid #dce3eb; border-radius: 8px; background: #fff; color: #44546a; font: inherit; font-size: 12px; cursor: pointer; }
.phone-record-pagination button:disabled { opacity: .45; cursor: default; }
.phone-record-pagination button:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.phone-record-item:disabled { cursor: progress; }
.phone-record-list { flex: 1 1 auto; min-height: 0; max-height: none; overflow-x: hidden; overflow-y: auto; padding: 7px; background: #fafbfd; }
.phone-record-item { position: relative; width: 100%; display: grid; gap: 6px; margin-bottom: 6px; padding: 12px; overflow: hidden; border: 1px solid transparent; border-radius: 9px; color: #38485c; text-align: left; background: transparent; cursor: pointer; transition: 150ms ease; }
.phone-record-item:hover { border-color: #e4e9ef; background: #fff; }
.phone-record-item.active { border-color: #f3c5b1; background: #fff; box-shadow: 0 7px 18px rgba(53, 65, 84, .07); }
.phone-record-item.active::before { content: ""; position: absolute; top: 9px; bottom: 9px; left: 0; width: 3px; border-radius: 0 3px 3px 0; background: #ff6a2a; }
.phone-record-item-main { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.phone-record-item-main strong { overflow: hidden; color: #324358; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.phone-record-item-main time { flex: 0 0 auto; color: #98a3b1; font-size: 9px; }
.phone-record-item > span { color: #8591a1; font-size: 10px; }
.phone-record-item em { overflow: hidden; color: #647388; font-size: 10px; font-style: normal; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.phone-record-item-tags, .phone-record-audio-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.phone-record-chip { display: inline-flex; align-items: center; min-height: 19px; padding: 0 6px; border-radius: 999px; color: #647589; background: #eef2f5; font-size: 8px; font-weight: 750; white-space: nowrap; }
.phone-record-chip.alert { color: #c63e4a; background: #fff0f2; }
.phone-record-chip.ok { color: #16865b; background: #eaf8f1; }
.phone-record-chip.incomplete { color: #a66713; background: #fff7df; }
.phone-record-chip.legacy { color: #68778a; background: #edf1f5; }
.phone-record-chip.media { color: #3975b8; background: #eef6ff; }
.phone-record-line-chip { display: inline-flex; min-width: 0; min-height: 21px; max-width: 100%; align-items: center; gap: 4px; padding: 0 8px; overflow: hidden; border: 1px solid #dbe7f2; border-radius: 999px; color: #35688f; background: #f1f8ff; font-size: 8px; font-weight: 800; line-height: 1; text-overflow: ellipsis; white-space: nowrap; }
.phone-record-line-chip.virtual { border-color: #dfd5f6; color: #7454a5; background: #f7f3ff; }
.phone-record-line-chip.unknown { border-color: #e2e6eb; color: #737f8d; background: #f5f7f9; }
.phone-record-meta .phone-record-line-chip { margin-left: auto; }
.payment-reminder-record-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.phone-record-detail { min-width: 0; background: #fff; }
.phone-record-detail-empty { min-height: 690px; display: grid; place-content: center; gap: 5px; }
.phone-record-detail-empty strong { color: #56667b; font-size: 14px; }
.phone-record-detail-empty span { color: #98a3b1; font-size: 11px; }
.phone-record-detail-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; padding: 17px 18px 0; border-bottom: 1px solid #e8edf2; }
.phone-record-detail-title { display: flex; min-width: 0; align-items: center; gap: 10px; }
.phone-record-avatar { display: grid; flex: 0 0 38px; width: 38px; height: 38px; place-items: center; border-radius: 10px; color: #df5821; background: #fff0e7; font-size: 14px; font-weight: 850; }
.phone-record-detail-title h4 { margin: 0 0 4px; color: #2d3d52; font-size: 16px; }
.phone-record-detail-title p { margin: 0; color: #8a96a6; font-size: 10px; }
.phone-record-review-state { display: inline-flex; align-self: start; min-height: 28px; align-items: center; padding: 0 9px; border: 1px solid #dce3ea; border-radius: 8px; color: #68778a; background: #f7f9fb; font-size: 10px; font-weight: 800; }
.phone-record-review-state.alert { border-color: #f0c1c6; color: #c63e4a; background: #fff1f2; }
.phone-record-review-state.ok { border-color: #bfe6d3; color: #16865b; background: #eaf8f1; }
.phone-record-review-state.incomplete { border-color: #efdcae; color: #a66713; background: #fff7df; }
.phone-record-meta { grid-column: 1 / -1; display: flex; gap: 15px; margin-top: 12px; color: #768398; font-size: 9px; flex-wrap: wrap; }
.phone-record-meta strong { color: #46576c; }
.phone-record-tabs { grid-column: 1 / -1; display: flex; gap: 20px; margin-top: 10px; }
.phone-record-tabs button { position: relative; min-height: 40px; padding: 0 1px; border: 0; color: #7a8798; background: transparent; font-size: 11px; font-weight: 750; }
.phone-record-tabs button.active { color: #d8551d; }
.phone-record-tabs button.active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 3px; border-radius: 3px 3px 0 0; background: #ff6a2a; }
.phone-record-detail-body { padding: 15px 17px 20px; background: #fbfcfd; }
.phone-record-alert { position: relative; padding: 12px 120px 12px 14px; border: 1px solid #f0c3c7; border-radius: 9px; color: #814f56; background: #fff5f6; }
.phone-record-alert::before { content: "!"; display: inline-grid; width: 22px; height: 22px; margin-right: 8px; place-items: center; border-radius: 7px; color: #fff; background: #d94754; font-weight: 900; vertical-align: middle; }
.phone-record-alert strong { color: #c33b47; font-size: 11px; }
.phone-record-alert p { margin: 6px 0 0 30px; font-size: 10px; line-height: 1.5; }
.phone-record-alert button { position: absolute; top: 12px; right: 13px; border: 0; color: #d44753; background: transparent; font-size: 9px; font-weight: 800; }
.phone-record-alert.ok { border-color: #c2e7d6; color: #507766; background: #f3fcf7; }
.phone-record-alert.ok::before { content: "✓"; background: #1a9968; }
.phone-record-alert.ok strong { color: #16815a; }
.phone-record-alert.incomplete { border-color: #eedcac; color: #786b4c; background: #fffaf0; }
.phone-record-alert.incomplete::before { content: "…"; background: #b07a1a; }
.phone-record-alert.incomplete strong { color: #956511; }
.phone-record-alert.legacy { border-color: #d9e1e9; color: #68778a; background: #f7f9fb; }
.phone-record-alert.legacy::before { content: "i"; background: #718197; }
.phone-record-alert.legacy strong { color: #526277; }
.phone-record-summary-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(230px, .6fr); gap: 10px; margin-top: 10px; }
.phone-record-card { min-width: 0; overflow: hidden; border: 1px solid #e5eaf0; border-radius: 9px; background: #fff; }
.phone-record-card > header { display: flex; min-height: 42px; align-items: center; justify-content: space-between; gap: 9px; padding: 0 12px; border-bottom: 1px solid #edf0f4; }
.phone-record-card > header strong { color: #3b4b60; font-size: 11px; }
.phone-record-card > header small { color: #929dad; font-size: 8px; }
.phone-record-conclusion { padding: 12px; }
.phone-record-conclusion h5 { margin: 9px 0 5px; color: #334359; font-size: 13px; line-height: 1.45; }
.phone-record-conclusion p { margin: 0; color: #748195; font-size: 10px; line-height: 1.6; }
.phone-record-conclusion > div { margin-top: 10px; padding: 8px 9px; border-left: 3px solid #ff6a2a; border-radius: 0 7px 7px 0; color: #695b53; background: #fff7f2; font-size: 9px; line-height: 1.5; }
.phone-record-audio { padding: 13px; }
.phone-record-audio audio { width: 100%; height: 36px; }
.phone-record-audio p { margin: 0; color: #8d98a6; font-size: 10px; }
.phone-record-audio-tags { margin-top: 10px; }
.phone-record-transcript-audio { margin-bottom: 10px; }
.phone-record-comparison { margin-top: 10px; }
.phone-record-comparison > header > div { display: flex; align-items: center; gap: 8px; }
.phone-record-comparison-filters button { min-height: 40px; padding: 0 12px; border: 1px solid #e0e6ed; border-radius: 6px; color: #758297; background: #fff; font-size: 11px; font-weight: 700; }
.phone-record-comparison-filters button.active { border-color: #f1b69c; color: #d8551d; background: #fff4ee; }
.phone-record-table-wrap { overflow-x: auto; }
.phone-record-comparison table { width: 100%; min-width: 700px; border-collapse: collapse; table-layout: fixed; }
.phone-record-comparison th { padding: 9px 10px; color: #8793a3; background: #fafbfd; font-size: 8px; text-align: left; }
.phone-record-comparison td { padding: 9px 10px; border-top: 1px solid #edf1f4; color: #55657a; font-size: 9px; line-height: 1.5; vertical-align: top; }
.phone-record-comparison th:nth-child(1), .phone-record-comparison td:nth-child(1) { width: 17%; }
.phone-record-comparison th:nth-child(2), .phone-record-comparison td:nth-child(2), .phone-record-comparison th:nth-child(3), .phone-record-comparison td:nth-child(3) { width: 27%; }
.phone-record-comparison th:nth-child(4), .phone-record-comparison td:nth-child(4) { width: 13%; }
.phone-record-comparison th:nth-child(5), .phone-record-comparison td:nth-child(5) { width: 16%; }
.phone-record-comparison td strong { display: block; color: #3e4f64; }
.phone-record-comparison td small { display: block; margin-top: 3px; color: #c14954; font-size: 8px; }
.phone-record-comparison tr.is-alert td { background: #fff7f8; }
.phone-record-comparison tr.is-alert td:first-child { box-shadow: inset 3px 0 #d94754; }
.phone-record-comparison tr.is-missing td { background: #fffbf1; }
.phone-record-comparison td button, .phone-record-highlight button { padding: 1px 3px; border: 0; color: #d8561e; background: transparent; font-size: 8px; font-weight: 700; }
.phone-record-compare-status { display: inline-flex; min-height: 20px; align-items: center; padding: 0 6px; border-radius: 6px; color: #68778a; background: #eef2f5; font-size: 8px; font-weight: 800; }
.phone-record-compare-status.match, .phone-record-compare-status.collected { color: #16865b; background: #eaf8f1; }
.phone-record-compare-status.mismatch, .phone-record-compare-status.review { color: #c63e4a; background: #fff0f2; }
.phone-record-compare-status.missing { color: #a66713; background: #fff7df; }
.phone-record-no-comparison { padding: 24px !important; color: #8e9aaa !important; text-align: center; font-size: 10px !important; }
.phone-record-transcript-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .55fr); gap: 10px; }
.phone-record-transcript-card .phone-transcript { height: 545px; }
.phone-record-highlights > div { display: grid; gap: 7px; padding: 10px; }
.phone-record-highlight { padding: 9px; border: 1px solid #e7ecf1; border-radius: 7px; background: #fff; }
.phone-record-highlight.alert { border-color: #efc3c7; background: #fff7f8; }
.phone-record-highlight strong { color: #43536a; font-size: 9px; }
.phone-record-highlight.alert strong { color: #c63d49; }
.phone-record-highlight p { margin: 4px 0 0; color: #7e8a9b; font-size: 9px; line-height: 1.5; }
.phone-record-evidence-label { margin: 0 4px 4px; padding: 3px 6px; border-radius: 5px; color: #c63e4a; background: #fff0f2; font-size: 8px; font-weight: 800; }
.phone-message.is-evidence .phone-message-bubble { border: 1px solid #ef9da5; color: #863d45; background: #fff4f5; box-shadow: 0 0 0 3px rgba(217, 71, 84, .07); }
.phone-message.is-evidence.is-located .phone-message-bubble { animation: phone-record-locate 1.1s ease; }
@keyframes phone-record-locate { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); box-shadow: 0 0 0 5px rgba(217, 71, 84, .13); } }
.phone-transcript { min-height: 0; overflow-x: hidden; overflow-y: auto; padding: 16px; scroll-behavior: smooth; background: #f7f9fb; }
.phone-record-list,
.phone-transcript { scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #b7c0cc #eef2f6; overscroll-behavior: contain; touch-action: pan-y; }
.phone-record-list::-webkit-scrollbar,
.phone-transcript::-webkit-scrollbar { width: 10px; }
.phone-record-list::-webkit-scrollbar-track,
.phone-transcript::-webkit-scrollbar-track { background: #eef2f6; }
.phone-record-list::-webkit-scrollbar-thumb,
.phone-transcript::-webkit-scrollbar-thumb { min-height: 42px; border: 2px solid #eef2f6; border-radius: 999px; background: #b7c0cc; }
.phone-record-list::-webkit-scrollbar-thumb:hover,
.phone-transcript::-webkit-scrollbar-thumb:hover { background: #f28a59; }
.phone-message { display: flex; flex-direction: column; align-items: flex-start; margin-bottom: 16px; }
.phone-message.customer { align-items: flex-end; }
.phone-message-meta { margin: 0 4px 5px; color: #9aa5b3; font-size: 11px; }
.phone-message-bubble { max-width: 82%; padding: 10px 13px; border-radius: 4px 13px 13px 13px; color: #35445a; background: #fff; box-shadow: 0 3px 12px rgba(45, 62, 84, 0.07); font-size: 10px; line-height: 1.65; }
.phone-message.customer .phone-message-bubble { border-radius: 13px 4px 13px 13px; color: #6c5041; background: #fff0e7; }
.phone-record-empty { padding: 34px 18px; color: #9aa5b3; text-align: center; font-size: 13px; }
.phone-transcript-line { margin-bottom: 8px; color: #68778a; }

@media (max-width: 1050px) {
  .phone-manual-console { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-manual-source-status { grid-column: 1 / -1; }
  .phone-manual-refresh { grid-column: 1 / -1; min-height: 40px; }
  .phone-manual-grid { grid-template-columns: 1fr; }
    .phone-node-head { align-items: flex-start; flex-direction: column; }
    .phone-node-details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-business-head { grid-template-columns: 1fr; align-items: stretch; }
  .phone-batch-flow { grid-template-columns: 1fr; }
  .phone-order-lookup { grid-template-columns: 1fr; }
  .phone-order-lookup-search { border-right: 0; border-bottom: 1px solid #e1e8ef; }
  .phone-order-lookup-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-record-layout { grid-template-columns: 265px minmax(0, 1fr); }
  .phone-record-summary-grid, .phone-record-transcript-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .phone-status-bar { grid-template-columns: 1fr; }
  .phone-manual-head { align-items: stretch; flex-direction: column; }
  .phone-manual-head .danger-button { width: 100%; }
  .phone-manual-console { grid-template-columns: 1fr; }
  .phone-manual-console-title, .phone-manual-source-status, .phone-manual-refresh { grid-column: auto; }
  .phone-manual-console-title { align-items: flex-start; flex-direction: column; gap: 2px; }
  .phone-record-panel { padding: 14px; }
  .phone-record-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phone-record-toolbar { grid-template-columns: 1fr; }
  .phone-record-toolbar.has-date-filter { grid-template-columns: minmax(0, 1fr); }
  .phone-record-layout { grid-template-columns: 1fr; min-height: 0; }
  .phone-record-list-pane { overflow: visible; contain: none; border-right: 0; border-bottom: 1px solid #e8ecf1; }
  .phone-record-list { min-height: 0; height: min(250px, 32vh); max-height: 250px; }
  .phone-record-detail-empty { min-height: 360px; }
  .phone-record-detail-head { grid-template-columns: 1fr; }
  .phone-record-review-state { margin-top: 10px; justify-self: start; }
  .phone-record-meta, .phone-record-tabs { grid-column: auto; }
  .phone-record-meta .phone-record-line-chip { width: fit-content; margin-left: 0; }
  .phone-record-alert { padding-right: 14px; }
  .phone-record-alert button { position: static; margin: 7px 0 0 30px; }
  .phone-record-summary-grid, .phone-record-transcript-layout { grid-template-columns: 1fr; }
  .phone-record-comparison > header { align-items: flex-start; flex-direction: column; padding: 10px 12px; }
  .phone-record-comparison > header > div { flex-wrap: wrap; }
  .phone-record-transcript-card .phone-transcript { height: min(52vh, 480px); min-height: 320px; }
  .phone-config-grid, .phone-manual-card .phone-config-grid { grid-template-columns: 1fr; }
  .phone-detail-grid { grid-template-columns: 1fr; }
  .phone-order-lookup-search, .phone-order-lookup-review { padding: 16px; }
  .phone-order-lookup-head { grid-template-columns: 38px minmax(0, 1fr); }
  .phone-order-lookup-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 15px; }
  .phone-order-lookup-badge { grid-column: 2; justify-self: start; }
  .phone-order-lookup-controls { grid-template-columns: 1fr; }
  .phone-order-lookup-grid { grid-template-columns: 1fr; }
  .phone-order-lookup-field:nth-child(1), .phone-order-lookup-field:nth-child(12) { grid-column: auto; }
  .phone-order-lookup-field:nth-child(7) { grid-column: auto; }
  .phone-order-lookup-source { grid-template-columns: auto 1fr; }
  .phone-order-lookup-source small { grid-column: 1 / -1; text-align: left; white-space: normal; }
  .phone-order-lookup-review-head { align-items: flex-start; flex-direction: column; }
  .phone-order-lookup-confirm { grid-template-columns: 1fr; align-items: stretch; }
  .phone-order-lookup-confirm .phone-manual-start { width: 100%; }
  .phone-detail-grid label.wide { grid-column: auto; }
  .phone-panel.phone-batch-panel .phone-batch-head { align-items: flex-start; flex-direction: column; padding: 18px; }
  .phone-batch-flow { padding: 14px 14px 0; }
  .phone-batch-settings { grid-template-columns: 1fr; }
  .phone-batch-runbar { grid-template-columns: 1fr; margin: 14px; }
  .phone-batch-actions { width: 100%; }
  .phone-batch-actions .phone-batch-button { width: 100%; }
  .phone-batch-table-wrap { margin: 0 14px 14px; }
  .phone-batch-upload-actions { grid-template-columns: 1fr; }
  .phone-node-list { grid-template-columns: 1fr; }
  .phone-node-card { width: 100%; box-sizing: border-box; }
  .phone-business-panel { padding: 14px; }
  .phone-business-common-settings, .phone-business-grid { grid-template-columns: 1fr; }
  .phone-business-card-head, .phone-order-queue-head { align-items: stretch; flex-direction: column; }
  .phone-order-queue-head > div:last-child, .phone-order-queue-head .phone-batch-button { width: 100%; }
  .phone-order-queue-item { grid-template-columns: 24px minmax(0, 1fr); }
  .phone-order-queue-item > .phone-batch-status { grid-column: 2; justify-self: start; }
  .phone-node-edit-dialog form { padding: 16px; }
  .payment-reminder-hero { grid-template-columns: 1fr; padding: 19px; }
  .payment-reminder-hero-meta { min-width: 0; }
  .payment-reminder-workspace { grid-template-columns: 1fr; }
  .payment-reminder-import-card .phone-payment-reminder-actions { grid-template-columns: 1fr; }
  .payment-reminder-data-head { align-items: stretch; flex-direction: column; }
  .payment-reminder-data-badge { align-self: flex-start; }
  .payment-reminder-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-reminder-runbar { grid-template-columns: 1fr; }
  .payment-reminder-run-settings { grid-template-columns: 1fr; }
  .payment-reminder-runbar > .phone-batch-button { width: 100%; min-width: 0; }
}

/* 人员管理 */
.personnel-page {
  display: grid;
  gap: 18px;
}

.personnel-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.personnel-page-head h3,
.personnel-profile-card h3,
.personnel-directory h3,
.people-modal-panel h3 {
  margin: 4px 0;
}

.personnel-page-head p,
.personnel-directory-head p,
.personnel-profile-card p {
  margin: 0;
  color: var(--muted);
}

.personnel-head-actions,
.people-modal-actions,
.personnel-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.personnel-password-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border: 1px solid rgba(191, 122, 31, 0.3);
  border-radius: var(--radius);
  color: #805315;
  background: #fff8e8;
}

.personnel-password-notice button {
  border: 0;
  padding: 0;
  color: #8d5610;
  background: transparent;
  font-weight: 800;
}

.personnel-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.personnel-metrics article {
  min-height: 102px;
  display: grid;
  align-content: space-between;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.personnel-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.personnel-metrics strong {
  color: var(--teal);
  font-size: 28px;
}

.personnel-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.32fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.personnel-profile-card,
.personnel-directory {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.personnel-profile-card {
  position: sticky;
  top: 16px;
  display: grid;
  gap: 18px;
  padding: 22px;
}

.personnel-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--teal), var(--blue));
  font-size: 23px;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(22, 121, 111, 0.22);
}

.personnel-profile-list {
  display: grid;
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--line);
}

.personnel-profile-list div {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.personnel-profile-list dt {
  color: var(--muted);
  font-size: 12px;
}

.personnel-profile-list dd {
  margin: 0;
  line-height: 1.55;
}

.personnel-directory {
  min-width: 0;
  overflow: hidden;
}

.personnel-directory-head {
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.personnel-directory-head input {
  width: min(300px, 100%);
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}

.personnel-directory-head input:focus,
.personnel-editor-form input:focus,
.personnel-editor-form select:focus,
.personnel-editor-form textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.personnel-message {
  min-height: 20px;
  margin: 10px 20px;
  color: var(--muted);
  font-size: 13px;
}

.personnel-message[data-state="error"] {
  color: var(--coral);
}

.personnel-message[data-state="success"] {
  color: var(--green);
}

.personnel-table-wrap {
  max-height: calc(100vh - 300px);
  overflow: auto;
}

.personnel-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.personnel-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  text-align: left;
  white-space: nowrap;
  background: #f7faf8;
}

.personnel-table td {
  padding: 13px 12px;
  border-bottom: 1px solid #edf1ef;
  vertical-align: top;
}

.personnel-table tbody tr:hover {
  background: #f8fbfa;
}

.personnel-table td strong,
.personnel-table td small {
  display: block;
}

.personnel-table td small {
  margin-top: 3px;
  color: var(--muted);
}

.personnel-level-badge,
.personnel-status-badge,
.personnel-panel-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
}

.personnel-level-badge {
  color: #38549d;
  background: #edf2ff;
}

.personnel-status-badge.active {
  color: #257345;
  background: #e9f7ef;
}

.personnel-status-badge.inactive {
  color: #8b5656;
  background: #f8eded;
}

.personnel-status-badge.pending_leave {
  color: #865809;
  background: #fff3d8;
}

.personnel-panel-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 300px;
}

.personnel-panel-tag {
  color: #49615b;
  background: #edf3f0;
  font-weight: 600;
}

.personnel-row-actions button {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 9px;
  color: var(--ink);
  background: #fff;
  font-size: 12px;
}

.personnel-row-actions button:hover {
  border-color: rgba(22, 121, 111, 0.45);
  color: var(--teal);
}

.personnel-row-actions .reset-password-action {
  color: #9a6219;
}

/* 员工排班 */
.schedule-page {
  display: grid;
  gap: 16px;
}

.schedule-page-head,
.schedule-head-actions,
.schedule-card-head,
.schedule-choice-input,
.schedule-inline-form,
.schedule-overtime-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.schedule-fixed-window {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 10px;
  margin-top: 16px;
  padding: 12px 13px;
  border-radius: 9px;
  color: #3f5b54;
  background: var(--surface-soft);
}

.schedule-fixed-window span {
  grid-row: 1 / span 2;
  align-self: center;
  font-size: 12px;
  font-weight: 800;
}

.schedule-fixed-window strong,
.schedule-fixed-window small {
  display: block;
}

.schedule-fixed-window small {
  color: var(--muted);
}

.schedule-page-head,
.schedule-card-head {
  justify-content: space-between;
}

.schedule-card-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.schedule-personal-rule-button {
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid rgba(22, 121, 111, 0.25);
  border-radius: 999px;
  color: var(--teal);
  background: #f2faf7;
  font-size: 12px;
  font-weight: 800;
}

.schedule-page-head h3,
.schedule-card h3 {
  margin: 4px 0;
}

.schedule-page-head p,
.schedule-card-head p {
  margin: 0;
  color: var(--muted);
}

.schedule-head-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.schedule-head-actions input,
.schedule-head-actions select,
.schedule-personal-month-switcher input,
.schedule-personal-month-switcher select,
.schedule-choice-input input,
.schedule-choice-input select,
.schedule-inline-form input,
.schedule-overtime-form input {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.schedule-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.schedule-metrics article {
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.schedule-metrics span,
.schedule-metrics small {
  color: var(--muted);
  font-size: 12px;
}

.schedule-metrics strong {
  color: var(--teal);
  font-size: 25px;
}

.schedule-submission-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border: 1px solid rgba(34, 105, 141, 0.18);
  border-radius: var(--radius);
  background: linear-gradient(90deg, #edf8f5, #f4f8fb);
}

.schedule-submission-strip > div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.schedule-submission-strip span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-submission-strip strong {
  color: #315a51;
}

.schedule-submission-total {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.schedule-submission-total strong {
  font-size: 22px;
  letter-spacing: 0.04em;
}

.schedule-missing-details {
  position: relative;
  margin-left: auto;
}

.schedule-missing-details summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(34, 105, 141, 0.18);
  border-radius: 999px;
  color: #315a51;
  background: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  list-style: none;
}

.schedule-missing-details summary::-webkit-details-marker { display: none; }
.schedule-missing-details[open] summary span { transform: rotate(180deg); }

.schedule-missing-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 8;
  width: min(320px, 78vw);
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(22, 32, 29, 0.16);
}

.schedule-missing-list > span {
  display: grid;
  gap: 2px;
  padding: 8px 9px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.schedule-missing-list small { color: var(--muted); }

.schedule-rule-note {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border: 1px solid rgba(22, 121, 111, 0.2);
  border-radius: var(--radius);
  color: #385d55;
  background: #eff8f5;
  font-size: 13px;
}

.schedule-personal-month-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid rgba(22, 121, 111, 0.14);
  border-radius: var(--radius);
  background: #f7fbfa;
}

.schedule-control-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

#scheduleManagerCard { grid-column: 1 / -1; }

.schedule-card {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.schedule-quota-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #315a51;
  background: #e7f5f1;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 800;
}

.schedule-preference-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.schedule-preference-tools {
  display: flex;
  justify-content: flex-start;
  gap: 8px;
}

.schedule-preference-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 42px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #52645f;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  min-width: 132px;
}

.schedule-preference-tools button span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #f0f4f2;
}

.schedule-preference-tools button.is-active {
  border-color: rgba(22, 121, 111, 0.55);
  color: var(--teal);
  background: #eff8f5;
  box-shadow: 0 0 0 2px rgba(22, 121, 111, 0.08);
}

.schedule-preference-tools button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.schedule-preference-legend {
  display: flex;
  align-items: center;
  gap: 13px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}

.schedule-preference-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.schedule-preference-legend i {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: #f1f4f3;
}

.schedule-preference-legend i.rest { background: #dfeeff; }
.schedule-preference-legend i.night { background: #e8ddff; }
.schedule-preference-legend i.overtime { background: #ffe2b8; }

.schedule-preference-calendar {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
}

.schedule-preference-calendar table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.schedule-preference-calendar th {
  padding: 7px 3px;
  color: var(--muted);
  background: #f7faf8;
  font-size: 11px;
}

.schedule-preference-calendar td {
  height: 62px;
  padding: 3px;
  border-top: 1px solid #edf1ef;
  border-right: 1px solid #edf1ef;
  background: #fff;
}

.schedule-preference-calendar td:nth-child(7n) {
  border-right: 0;
}

.schedule-preference-calendar td.is-empty {
  background: #fafcfb;
}

.schedule-preference-calendar button {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #5d6e69;
  background: #f7f9f8;
}

.schedule-preference-calendar button strong {
  font-size: 13px;
}

.schedule-preference-calendar button span {
  font-size: 10px;
}

.schedule-preference-calendar button i {
  position: absolute;
  top: 3px;
  right: 4px;
  color: #a36b22;
  font-size: 8px;
  font-style: normal;
}

.schedule-preference-calendar button.rest { color: #29578d; background: #e9f2ff; }
.schedule-preference-calendar button.night { color: #5b3f91; background: #eee8ff; }
.schedule-preference-calendar button.overtime { color: #8b5214; background: #fff0d8; }
.schedule-preference-calendar button:disabled { cursor: default; opacity: 0.72; }

.schedule-preference-hint {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.schedule-choice-block {
  display: grid;
  gap: 8px;
}

.schedule-choice-block > label,
.schedule-inline-form label,
.schedule-overtime-form label {
  color: #42554f;
  font-size: 12px;
  font-weight: 700;
}

.schedule-choice-input input,
.schedule-choice-input select {
  flex: 1;
  min-width: 0;
}

.schedule-choice-input button,
.schedule-overtime-rules button {
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--teal);
  background: #fff;
  font-weight: 700;
}

.schedule-date-chips {
  display: flex;
  gap: 6px;
  min-height: 28px;
  flex-wrap: wrap;
}

.schedule-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border: 0;
  border-radius: 999px;
  color: #3f5b54;
  background: #edf4f1;
  font-size: 12px;
}

.schedule-date-chip span {
  color: #8b5c5c;
  font-weight: 900;
}

.schedule-empty-chip,
.schedule-empty-copy {
  color: var(--muted);
  font-size: 12px;
}

.schedule-inline-form,
.schedule-overtime-form {
  margin-top: 16px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.schedule-inline-form label,
.schedule-overtime-form label {
  display: grid;
  gap: 5px;
}

.schedule-overtime-rules {
  display: grid;
  gap: 7px;
  margin-top: 14px;
}

.schedule-overtime-rules article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 9px;
  background: var(--surface-soft);
}

.schedule-overtime-rules strong,
.schedule-overtime-rules small {
  display: block;
}

.schedule-overtime-rules small {
  margin-top: 2px;
  color: var(--muted);
}

.schedule-manager-overview {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 12px;
  margin-top: 16px;
}

.schedule-manager-overview .schedule-fixed-window {
  min-height: 96px;
  align-content: center;
  margin-top: 0;
  padding: 16px;
  border: 1px solid rgba(34, 105, 141, 0.13);
  background: linear-gradient(135deg, #f3f8f7, #eef5f8);
}

.schedule-rest-config {
  min-height: 96px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(22, 121, 111, 0.15);
  border-radius: 10px;
  background: linear-gradient(135deg, #f0f9f5, #f7fbf9);
}

.schedule-rest-config > div { display: grid; gap: 4px; }
.schedule-rest-config > div > span { color: #42554f; font-size: 12px; font-weight: 800; }
.schedule-rest-config > div strong { color: var(--teal); font-size: 18px; }

.schedule-rest-config > div small,
.schedule-overtime-editor > small {
  color: var(--muted);
  line-height: 1.55;
}

.schedule-rest-config label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #42554f;
  font-weight: 800;
}

.schedule-rest-config input,
.schedule-overtime-editor input {
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
}

.schedule-rest-config input {
  width: 78px;
  font-size: 17px;
  font-weight: 800;
  text-align: center;
}

.schedule-overtime-config {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.schedule-overtime-config > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.schedule-overtime-config h4 { margin: 0 0 4px; font-size: 16px; }
.schedule-overtime-config p { margin: 0; color: var(--muted); font-size: 12px; }

.schedule-overtime-legend {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.schedule-overtime-legend i {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: #d97918;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.schedule-overtime-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  gap: 14px;
  align-items: start;
}

.schedule-overtime-calendar {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
}

.schedule-overtime-calendar table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.schedule-overtime-calendar th { padding: 8px 4px; color: var(--muted); background: #f7faf8; font-size: 11px; }
.schedule-overtime-calendar td { height: 72px; padding: 3px; border-top: 1px solid #edf1ef; border-right: 1px solid #edf1ef; background: #fff; }
.schedule-overtime-calendar td:nth-child(7n) { border-right: 0; }
.schedule-overtime-calendar td.is-empty { background: #fafcfb; }

.schedule-overtime-calendar button {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 6px 2px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #687873;
  background: #f7f9f8;
}

.schedule-overtime-calendar button strong { font-size: 14px; }
.schedule-overtime-calendar button span,
.schedule-overtime-calendar button i { color: var(--muted); font-size: 9px; font-style: normal; }
.schedule-overtime-calendar button.has-overtime { color: #8b5214; background: #fff0d8; }
.schedule-overtime-calendar button.has-overtime span,
.schedule-overtime-calendar button.has-overtime i { color: #9b6427; }
.schedule-overtime-calendar button.is-special { color: #8a4f73; background: #f7eafa; }
.schedule-overtime-calendar button.is-special span,
.schedule-overtime-calendar button.is-special i { color: #8a4f73; }
.schedule-overtime-calendar button.is-selected { border-color: #d97918; box-shadow: inset 0 0 0 1px rgba(217, 121, 24, 0.25), 0 0 0 2px rgba(217, 121, 24, 0.1); }
.schedule-overtime-calendar button:disabled { cursor: default; opacity: 0.72; }

.schedule-overtime-editor {
  display: grid;
  gap: 12px;
  padding: 15px;
  border: 1px solid rgba(217, 121, 24, 0.18);
  border-radius: 11px;
  background: #fffbf4;
}

.schedule-overtime-selected { display: grid; gap: 3px; padding-bottom: 11px; border-bottom: 1px solid rgba(217, 121, 24, 0.16); }
.schedule-overtime-selected span,
.schedule-overtime-editor label span { color: var(--muted); font-size: 11px; }
.schedule-overtime-selected strong { color: #8b5214; font-size: 17px; }
.schedule-overtime-editor label { display: grid; gap: 5px; }
.schedule-overtime-editor .schedule-special-checkbox { padding: 3px 0; color: #8a4f73; }
.schedule-overtime-actions { display: grid; gap: 7px; }

.schedule-table-card {
  padding: 0;
  overflow: hidden;
}

.schedule-table-card .schedule-card-head {
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.schedule-table-wrap,
.schedule-priority-table {
  max-width: 100%;
  overflow: auto;
}

.schedule-table,
.schedule-priority-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12px;
}

.schedule-table {
  min-width: 1760px;
}

.schedule-table th,
.schedule-table td,
.schedule-priority-table th,
.schedule-priority-table td {
  padding: 8px;
  border-right: 1px solid #edf1ef;
  border-bottom: 1px solid #edf1ef;
  text-align: center;
  white-space: nowrap;
}

.schedule-table thead th,
.schedule-priority-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #f7faf8;
}

.schedule-table thead th strong,
.schedule-table thead th small,
.schedule-name-column strong,
.schedule-name-column small {
  display: block;
}

.schedule-table thead th small,
.schedule-name-column small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 500;
}

.schedule-table .schedule-name-column {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 150px;
  text-align: left;
  background: #fff;
}

.schedule-table thead .schedule-name-column {
  z-index: 4;
  background: #f7faf8;
}

.schedule-cell {
  position: relative;
  width: 36px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64736f;
  background: #f5f7f6;
  font-size: 11px;
  font-style: normal;
  line-height: 1;
}

button.schedule-cell {
  cursor: pointer;
}

.schedule-cell.rest {
  color: #29578d;
  background: #e9f2ff;
}

.schedule-cell.leave {
  color: #a03c55;
  background: #fce8ed;
}

.schedule-cell.overtime {
  color: #8b5214;
  background: #fff0d8;
}

.schedule-cell.is-special {
  color: #6d3b84;
  background: #f2e5fa;
}

.schedule-cell.unscheduled {
  color: #8a9691;
  background: #fbfcfb;
  border: 1px dashed #c7d2cd;
}

.schedule-cell.is-night {
  color: #5b3f91;
  background: #eee8ff;
}

.schedule-cell.is-manual {
  border-color: rgba(22, 121, 111, 0.55);
}

.schedule-cell-badges {
  position: absolute;
  top: -6px;
  right: -7px;
  display: flex;
  gap: 2px;
  font-style: normal;
}

.schedule-cell-badges i {
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #fff;
  background: var(--teal);
  box-shadow: 0 1px 3px rgba(16, 63, 56, 0.18);
  font-size: 8px;
  font-style: normal;
}

.schedule-cell-badges i.is-overtime {
  background: #d97918;
}

.schedule-cell-badges i.is-holiday-rest {
  background: #4f83cc;
}

.schedule-cell-badges i.is-manual {
  background: var(--teal);
}

.schedule-priority-table {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.schedule-priority-table table {
  min-width: 720px;
}

.schedule-adjust-dialog {
  width: min(520px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(22, 32, 29, 0.24);
}

.schedule-personal-rule-dialog {
  width: min(580px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(22, 32, 29, 0.24);
}

.schedule-personal-rule-dialog .people-dialog-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.schedule-personal-rule-dialog .people-dialog-head h3 {
  margin: 4px 0 0;
}

.schedule-weekday-rule {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.schedule-weekday-rule legend {
  padding: 0 6px;
  color: #42554f;
  font-size: 12px;
  font-weight: 800;
}

.schedule-weekday-rule > div {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.schedule-weekday-rule label {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: var(--surface-soft);
  font-size: 12px;
}

.schedule-personal-rule-dialog .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.schedule-adjust-dialog .people-dialog-head {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.schedule-adjust-dialog .people-dialog-head h3 {
  margin: 4px 0 0;
}

.schedule-checkbox-row:not(.hidden) {
  display: flex !important;
  align-items: center;
  gap: 9px !important;
}

.schedule-checkbox-row input {
  min-height: 0;
}

.schedule-adjust-dialog .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.people-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 29, 27, 0.42);
  backdrop-filter: blur(7px);
}

.people-modal-panel {
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 28px 80px rgba(22, 32, 29, 0.24);
}

.password-modal-panel {
  width: min(480px, 100%);
}

/* 我的 */
.my-page {
  display: grid;
  gap: 18px;
}

.my-page-message {
  margin: 0;
}

.my-page-message[data-state="success"] {
  color: var(--green);
}

.my-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.34fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.my-profile-card {
  position: static;
}

.my-key-card {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.my-key-card h3 {
  margin: 4px 0;
}

.my-key-card p {
  color: var(--muted);
  margin: 0;
  line-height: 1.6;
}

.my-key-warning {
  padding: 12px 14px;
  border: 1px solid rgba(191, 122, 31, 0.3);
  border-radius: var(--radius);
  color: #805315;
  background: #fff8e8;
}

.my-key-field {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.my-key-field > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
}

.my-key-field input {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Consolas, "Courier New", monospace;
}

.my-key-details {
  display: grid;
  gap: 10px;
}

.my-key-details > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.my-key-details span {
  color: var(--muted);
}

.my-key-details code {
  overflow-wrap: anywhere;
}

.my-project-guide {
  display: grid;
  gap: 8px;
  padding: 13px 14px;
  border: 1px solid rgba(47, 111, 190, 0.22);
  border-radius: var(--radius);
  background: rgba(47, 111, 190, 0.06);
}

.my-project-guide strong {
  color: #255b9c;
}

.my-project-guide p {
  color: var(--ink);
}

.my-project-guide code {
  color: #255b9c;
  font-weight: 800;
}

.my-key-example {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.my-key-example summary {
  cursor: pointer;
  padding: 12px 14px;
  font-weight: 800;
}

.my-key-example-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.my-key-example-toolbar span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.my-key-example pre {
  max-width: 100%;
  margin: 0;
  overflow: auto;
  border-top: 1px solid var(--line);
  padding: 14px;
  color: #dce7e3;
  background: #111816;
  white-space: pre-wrap;
  word-break: break-word;
}

.my-key-actions {
  display: flex;
  justify-content: flex-end;
}

.people-modal-panel > header {
  position: sticky;
  top: 0;
  z-index: 6;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.personnel-editor-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 22px;
}

.personnel-editor-form.one-column {
  grid-template-columns: 1fr;
}

.personnel-editor-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
}

.personnel-editor-form input,
.personnel-editor-form select,
.personnel-editor-form textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: #fff;
  outline: none;
}

.personnel-editor-form textarea {
  min-height: 150px;
  line-height: 1.6;
  resize: vertical;
}

.personnel-editor-form .full-row {
  grid-column: 1 / -1;
}

.personnel-panel-preview {
  padding: 12px 14px;
  border-radius: var(--radius);
  color: #49615b;
  background: var(--surface-soft);
  line-height: 1.6;
}

.people-modal-actions {
  justify-content: flex-end;
}

@media (max-width: 1100px) {
  .schedule-control-grid {
    grid-template-columns: 1fr;
  }

  .schedule-manager-overview {
    grid-template-columns: 1fr;
  }

  .personnel-layout {
    grid-template-columns: 1fr;
  }

  .personnel-profile-card {
    position: static;
  }

  .my-layout {
    grid-template-columns: 1fr;
  }

  .work-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .schedule-page-head,
  .schedule-card-head,
  .schedule-rule-note {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-head-actions {
    justify-content: flex-start;
  }

  .schedule-personal-month-switcher select {
    width: 100%;
  }

  .schedule-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-submission-strip,
  .schedule-submission-strip > div {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-missing-details {
    width: 100%;
    margin-left: 0;
  }

  .schedule-missing-details summary {
    justify-content: space-between;
  }

  .schedule-missing-list {
    left: 0;
    right: auto;
    width: 100%;
  }

  .schedule-rest-config {
    grid-template-columns: 1fr auto;
  }

  .schedule-rest-config > div {
    grid-column: 1 / -1;
  }

  .schedule-overtime-config > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-overtime-layout {
    grid-template-columns: 1fr;
  }

  .schedule-overtime-calendar td {
    height: 58px;
  }

  .schedule-preference-tools button { width: 100%; }

  .schedule-weekday-rule > div {
    grid-template-columns: 1fr 1fr;
  }

  .schedule-preference-calendar td {
    height: 52px;
    padding: 2px;
  }

  .schedule-preference-calendar button i {
    display: none;
  }

  .personnel-page-head,
  .personnel-directory-head,
  .personnel-password-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .personnel-metrics {
    grid-template-columns: 1fr 1fr;
  }

  .personnel-editor-form {
    grid-template-columns: 1fr;
  }

  .personnel-editor-form .full-row {
    grid-column: auto;
  }

  .people-modal {
    padding: 10px;
  }

  .my-key-field > div,
  .my-key-details > div {
    grid-template-columns: 1fr;
  }

  .work-submit-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .work-source-badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .work-filter-head {
    align-items: stretch;
    flex-direction: column;
  }

  .work-filter-grid {
    grid-template-columns: 1fr;
  }

  .work-filter-actions button {
    flex: 1;
  }
}

.people-modal .work-project-create-panel {
  width: min(1120px, 100%);
}

.people-modal .work-project-detail-panel {
  width: min(1240px, 100%);
}

@media (max-width: 1180px) {
  .project-detail-hero {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .project-detail-hero > div:first-child {
    grid-column: 1 / -1;
  }

  .project-stage-timeline,
  .project-stage-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .project-step-row {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.8fr) 120px 80px;
  }

  .project-step-row button {
    grid-column: 4;
  }

  .project-module-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .personal-memo-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(260px, 1fr);
    overflow-y: auto;
  }

  .personal-memo-form {
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .personal-memo-list-section,
  .personal-memo-list {
    overflow: visible;
  }

  .work-board-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-time-grid,
  .project-detail-columns,
  .project-module-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-detail-columns {
    grid-template-columns: 1fr;
  }

  .requirement-upload-form,
  .project-requirement-upload-list {
    grid-template-columns: 1fr 1fr;
  }

  .colleague-chat-layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .chat-compose-form {
    grid-template-columns: 1fr auto;
  }

  .chat-compose-form textarea {
    grid-column: 1 / -1;
  }

  .project-flow-gate {
    grid-template-columns: 1fr;
  }

  .project-owner-control {
    grid-column: auto;
  }

  .project-step-row {
    grid-template-columns: minmax(0, 1fr) 150px;
  }

  .project-step-row select,
  .project-step-row input,
  .project-step-row button {
    grid-column: auto;
  }

  .project-inline-form,
  .project-module-form,
  .project-milestone-form {
    grid-template-columns: 1fr 1fr;
  }

  .delivery-requirement-list .project-milestone-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .people-modal .personal-memo-panel {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .chat-conversation-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .chat-personal-memo-button {
    width: 100%;
  }

  .work-board-head,
  .project-card-heading,
  .project-card-footer,
  .project-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .work-head-actions {
    width: 100%;
  }

  .work-head-actions button {
    flex: 1;
  }

  .project-progress-ring {
    align-self: flex-start;
  }

  .project-time-grid,
  .project-stage-strip,
  .project-stage-timeline,
  .project-module-grid,
  .project-detail-hero {
    grid-template-columns: 1fr;
  }

  .project-detail-hero > div:first-child {
    grid-column: auto;
  }

  .project-step-row,
  .project-inline-form,
  .project-module-form,
  .project-milestone-form {
    grid-template-columns: 1fr;
  }

  .delivery-requirement-list .project-milestone,
  .delivery-requirement-list .project-milestone-form {
    grid-template-columns: 1fr;
  }

  .project-step-row button {
    grid-column: auto;
  }

  .requirement-uploader-manager,
  .requirement-upload-form,
  .project-requirement-upload-list {
    grid-template-columns: 1fr;
  }

  .requirement-uploader-toolbar {
    align-items: flex-start;
  }

  .requirement-uploader-options {
    grid-template-columns: 1fr;
  }

  .people-modal .colleague-chat-panel {
    height: calc(100vh - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100vh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .colleague-chat-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(150px, 34%) minmax(0, 1fr);
    min-height: 0;
  }

  .chat-colleague-pane {
    min-height: 0;
    max-height: none;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .chat-compose-form {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .chat-message {
    max-width: 90%;
  }

  .chat-compose-form textarea {
    grid-column: 1 / -1;
  }

  .project-flow-controls,
  .project-owner-control {
    align-items: stretch;
    flex-direction: column;
  }
}

.access-settings-page {
  display: grid;
  gap: 18px;
}

.access-settings-head,
.access-settings-card > header,
.access-preview-card > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.access-settings-head {
  padding: 4px 2px;
}

.access-settings-head h3,
.access-settings-card h4 {
  margin: 4px 0 6px;
}

.access-settings-head p:last-child,
.access-settings-card header p:last-child {
  margin: 0;
  color: var(--muted);
}

.access-settings-head-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.access-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.access-summary-grid article {
  position: relative;
  overflow: hidden;
  min-height: 112px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 92% 12%, rgba(30, 126, 129, 0.14), transparent 40%),
    var(--card);
}

.access-summary-grid article::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -30px;
  width: 86px;
  height: 86px;
  border: 16px solid rgba(45, 121, 132, 0.06);
  border-radius: 50%;
}

.access-summary-grid span,
.access-summary-grid small {
  display: block;
  color: var(--muted);
}

.access-summary-grid strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 18px;
  color: var(--ink);
}

.access-settings-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(29, 65, 71, 0.05);
}

.access-level-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.access-level-card {
  padding: 16px;
  border: 1px solid #dbe7e7;
  border-radius: 15px;
  background: #fbfdfd;
}

.access-level-card.is-locked {
  grid-column: 1 / -1;
  border-color: #b9d7d1;
  background: linear-gradient(110deg, #eff8f4, #f5f8ff);
}

.access-level-card > header,
.access-level-card > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.access-level-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.access-level-identity > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: white;
  font-weight: 800;
  background: linear-gradient(145deg, #247a78, #3678b7);
}

.access-level-identity strong,
.access-level-identity small {
  display: block;
}

.access-level-identity small,
.access-level-card > footer span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.access-level-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.access-level-meta em {
  padding: 4px 8px;
  border-radius: 999px;
  color: #237166;
  background: #dff1eb;
  font-style: normal;
}

.access-panel-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}

.access-panel-option {
  position: relative;
  cursor: pointer;
}

.access-panel-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.access-panel-option span {
  display: block;
  padding: 7px 11px;
  border: 1px solid #d8e3e4;
  border-radius: 9px;
  color: #52666a;
  background: #fff;
  font-size: 13px;
  transition: 150ms ease;
}

.access-panel-option:hover span {
  border-color: #80aaa9;
}

.access-panel-option.is-selected span {
  border-color: #438d89;
  color: #176a66;
  background: #e6f4f0;
  box-shadow: inset 0 0 0 1px rgba(67, 141, 137, 0.12);
}

.access-panel-option.is-selected span::before {
  content: "✓";
  margin-right: 5px;
  font-weight: 800;
}

.access-panel-option input:disabled + span {
  cursor: default;
  opacity: 0.82;
}

.access-job-layout {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 480px;
  margin-top: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.access-job-list {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: 620px;
  padding: 10px;
  overflow-y: auto;
  background: #f0f6f6;
  border-right: 1px solid var(--line);
}

.access-job-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px;
  border: 1px solid transparent;
  border-radius: 12px;
  text-align: left;
  background: transparent;
}

.access-job-item:hover,
.access-job-item.is-active {
  border-color: #bfd5d5;
  background: #fff;
}

.access-job-item.is-active {
  box-shadow: 0 7px 16px rgba(30, 88, 92, 0.09);
}

.access-job-item.is-inactive {
  opacity: 0.62;
}

.access-job-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #2d8580, #3478bd);
}

.access-job-item strong,
.access-job-item small {
  display: block;
}

.access-job-item small {
  margin-top: 3px;
  color: var(--muted);
}

.access-job-item em {
  color: #2f8078;
  font-size: 12px;
  font-style: normal;
}

.access-job-editor {
  min-width: 0;
  padding: 20px;
}

.access-job-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.access-job-editor-head span:first-child {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.access-job-editor-head h4 {
  margin: 4px 0 0;
}

.access-count-badge {
  padding: 6px 10px;
  border-radius: 999px;
  color: #26746c;
  background: #e4f2ee;
}

.access-job-empty {
  display: grid;
  min-height: 340px;
  place-items: center;
  color: var(--muted);
}

.access-job-fields {
  padding-top: 18px;
}

.access-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.access-form-grid label,
.job-delete-migration label {
  display: grid;
  gap: 7px;
  color: #43575b;
  font-size: 13px;
}

.access-form-grid .full-row {
  grid-column: 1 / -1;
}

.access-form-grid input,
.access-form-grid select,
.access-form-grid textarea,
.job-delete-migration select,
.access-preview-card select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #d5e1e2;
  border-radius: 10px;
  color: var(--ink);
  background: #fff;
}

.access-form-grid textarea {
  min-height: 76px;
  resize: vertical;
}

.access-panel-editor {
  margin-top: 16px;
  padding: 15px;
  border-radius: 13px;
  background: #f4f8f8;
}

.access-panel-editor > div:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.access-panel-editor > div:first-child span {
  color: var(--muted);
  font-size: 12px;
}

.job-delete-migration {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #f0d5b1;
  border-radius: 12px;
  background: #fff8ef;
}

.job-delete-migration p {
  margin: 0 0 5px;
  color: #8b622e;
  font-size: 13px;
}

.access-job-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.access-job-actions > div {
  display: flex;
  gap: 9px;
}

.access-preview-card > header {
  align-items: center;
}

.access-preview-card select {
  max-width: 340px;
}

.permission-preview-result {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 18px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dce8e8;
  border-radius: 14px;
  background: linear-gradient(120deg, #f0f8f5, #f6f8fd);
}

.permission-preview-person {
  display: flex;
  align-items: center;
  gap: 12px;
}

.permission-preview-person > span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  background: linear-gradient(145deg, #277c77, #3b74b9);
}

.permission-preview-person strong,
.permission-preview-person small {
  display: block;
}

.permission-preview-person small {
  margin-top: 4px;
  color: var(--muted);
}

.permission-preview-panels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.permission-preview-panels > span {
  display: grid;
  gap: 2px;
  min-width: 100px;
  padding: 8px 11px;
  border: 1px solid rgba(75, 137, 135, 0.18);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
}

.permission-preview-panels small {
  color: #3b847c;
}

.operation-log-page {
  display: grid;
  gap: 14px;
}

.operation-log-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.operation-log-head h3 {
  margin: 4px 0 6px;
}

.operation-log-head p:last-child {
  margin: 0;
  color: var(--muted);
}

.operation-log-filters {
  display: grid;
  grid-template-columns: 1.05fr repeat(2, 0.88fr) 1fr 1.15fr 1.15fr;
  gap: 9px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}

.operation-log-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #53666a;
  font-size: 12px;
}

.operation-log-filters input,
.operation-log-filters select {
  width: 100%;
  min-width: 0;
  height: 38px;
  padding: 7px 9px;
  border: 1px solid #d7e2e3;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
}

.operation-keyword-field {
  grid-column: span 4;
}

.operation-filter-actions {
  grid-column: span 2;
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
}

.operation-filter-actions button {
  min-width: 88px;
}

.operation-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 13px;
}

.operation-log-summary strong {
  color: var(--ink);
  font-size: 18px;
}

.operation-log-table-wrap {
  max-height: calc(100vh - 350px);
  min-height: 360px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--card);
}

.operation-log-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.operation-log-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  color: #5e7074;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  background: #f4f8f8;
}

.operation-log-table th:nth-child(1) {
  width: 130px;
}

.operation-log-table th:nth-child(2) {
  width: 170px;
}

.operation-log-table th:nth-child(3) {
  width: 120px;
}

.operation-log-table th:nth-child(4) {
  width: 190px;
}

.operation-log-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #edf2f2;
  vertical-align: middle;
  line-height: 1.35;
}

.operation-log-table tbody tr:hover {
  background: #f8fbfb;
}

.operation-log-table td strong,
.operation-log-table td small {
  display: block;
}

.operation-log-table td strong {
  overflow: hidden;
  color: #24383c;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-log-table td small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operation-time-cell strong {
  font-variant-numeric: tabular-nums;
}

.operation-menu-badge {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  border-radius: 7px;
  color: #29766f;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #e7f3f0;
}

.operation-source-tag {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 5px;
  border-radius: 5px;
  color: #326da8;
  background: #eaf2fb;
  font-size: 10px;
  font-style: normal;
}

.operation-log-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-log-pagination > div {
  display: flex;
  gap: 7px;
}

@media (max-width: 1000px) {
  .access-summary-grid,
  .access-level-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .access-job-layout {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .operation-log-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .operation-keyword-field,
  .operation-filter-actions {
    grid-column: span 3;
  }
}

@media (max-width: 720px) {
  .access-settings-head,
  .access-settings-card > header,
  .access-preview-card > header,
  .access-level-card > header,
  .access-level-card > footer,
  .access-job-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .access-settings-head-actions {
    width: 100%;
  }

  .access-settings-head-actions button {
    flex: 1;
  }

  .access-summary-grid,
  .access-level-list,
  .access-form-grid,
  .permission-preview-result {
    grid-template-columns: 1fr;
  }

  .access-level-card.is-locked {
    grid-column: auto;
  }

  .access-job-layout {
    grid-template-columns: 1fr;
  }

  .access-job-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 230px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .job-delete-migration {
    grid-template-columns: 1fr;
  }

  .access-preview-card select {
    max-width: none;
  }

  .operation-log-head,
  .operation-log-summary,
  .operation-log-pagination {
    align-items: stretch;
    flex-direction: column;
  }

  .operation-log-filters {
    grid-template-columns: 1fr 1fr;
  }

  .operation-keyword-field,
  .operation-filter-actions {
    grid-column: 1 / -1;
  }

  .operation-filter-actions button {
    flex: 1;
  }

  .operation-log-table-wrap {
    max-height: none;
  }

  .operation-log-table {
    min-width: 830px;
  }
}

.ledger-page {
  display: grid;
  gap: 14px;
}

.ledger-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.ledger-page-head h3 {
  margin: 4px 0 0;
  font-size: 22px;
  letter-spacing: 0;
}

.ledger-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.ledger-head-actions select {
  height: 42px;
  min-width: 92px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
}

.ledger-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 28px;
  padding: 0 3px;
  color: var(--muted);
  font-size: 13px;
}

.ledger-status-row span:last-child {
  color: var(--ink);
  font-weight: 700;
}

.ledger-message {
  min-height: 20px;
  margin: -8px 3px 0;
  color: var(--muted);
  font-size: 13px;
}

.ledger-message[data-state="error"] {
  color: #b3261e;
}

.ledger-message[data-state="success"] {
  color: #28753c;
}

.ledger-refresh-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.ledger-account-syncs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ledger-account-syncs:empty { display: none; }

.ledger-account-syncs li {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.ledger-account-syncs li strong { color: var(--ink); }
.ledger-account-syncs li time { color: var(--muted); }
.ledger-account-syncs li.is-error { color: #b3261e; border-color: #e6bab5; background: #fff3f1; }

.ledger-live-notice {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid #b7d9c5;
  border-radius: var(--radius);
  color: #246637;
  background: #edf8f0;
  font-size: 14px;
}

.ledger-filters {
  display: grid;
  grid-template-columns: 0.8fr 0.9fr 0.9fr 1.15fr 1fr minmax(180px, 1.4fr) auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ledger-filters label,
.ledger-direction-filter {
  display: grid;
  gap: 6px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  color: #53666a;
  font-size: 12px;
}

.ledger-direction-filter legend {
  margin-bottom: 6px;
  padding: 0;
}

.ledger-filters input,
.ledger-filters select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #d7e2e3;
  border-radius: var(--radius);
  outline: none;
  color: var(--ink);
  background: #fff;
}

.ledger-filters input:focus,
.ledger-filters select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 121, 111, 0.12);
}

.ledger-segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  height: 40px;
  padding: 3px;
  border: 1px solid #d7e2e3;
  border-radius: var(--radius);
  background: #f3f6f5;
}

.ledger-segmented button {
  min-width: 0;
  border: 0;
  border-radius: 5px;
  color: var(--muted);
  background: transparent;
  font-size: 13px;
}

.ledger-segmented button.is-active {
  color: #155f58;
  background: #fff;
  box-shadow: 0 2px 6px rgba(31, 42, 38, 0.1);
  font-weight: 700;
}

.ledger-filter-actions {
  display: flex;
  gap: 7px;
}

.ledger-filter-actions button {
  min-height: 40px;
  padding-top: 9px;
  padding-bottom: 9px;
}

.ledger-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.ledger-summary {
  display: grid;
  gap: 7px;
  min-height: 92px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-top-width: 3px;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 7px 20px rgba(31, 42, 38, 0.05);
}

.ledger-summary span {
  color: var(--muted);
  font-size: 13px;
}

.ledger-summary strong {
  align-self: end;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

.ledger-income {
  border-top-color: #3f8f51;
}

.ledger-income strong {
  color: #28733a;
}

.ledger-expense {
  border-top-color: #d65f4c;
}

.ledger-expense strong {
  color: #b24839;
}

.ledger-net {
  border-top-color: #2f6fbe;
}

.ledger-net strong {
  color: #285f9f;
}

.ledger-fee {
  border-top-color: #bf7a1f;
}

.ledger-fee strong {
  color: #996018;
}

.ledger-table-wrap {
  min-height: 360px;
  max-height: calc(100vh - 470px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.ledger-table {
  width: 100%;
  min-width: 1290px;
  border-collapse: collapse;
  table-layout: fixed;
}

.ledger-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 11px;
  border-bottom: 1px solid var(--line);
  color: #5e7074;
  text-align: left;
  background: #f4f8f7;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.ledger-table th:nth-child(1) { width: 100px; }
.ledger-table th:nth-child(2) { width: 154px; }
.ledger-table th:nth-child(3) { width: 74px; }
.ledger-table th:nth-child(4) { width: 104px; }
.ledger-table th:nth-child(5) { width: 108px; }
.ledger-table th:nth-child(6) { width: 122px; }
.ledger-table th:nth-child(7) { width: 260px; }
.ledger-table th:nth-child(8) { width: 160px; }
.ledger-table th:nth-child(9) { width: 190px; }
.ledger-table th:nth-child(10) { width: 190px; }

.ledger-source,
.ledger-account,
.ledger-search-detail {
  overflow-wrap: anywhere;
}

.ledger-search-filters {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto;
}

.bill-search-sync-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 16px;
}

.bill-search-sync-actions .ledger-message {
  flex: 1 1 230px;
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.bill-search-sync-actions .ledger-message:empty { display: none; }
.bill-search-sync-actions .ledger-message[data-state="warning"] { color: #996018; }
.bill-search-sync-actions button { min-height: 42px; }

.ledger-search-filters button {
  min-height: 40px;
}

.ledger-filters.ledger-search-filters { align-items: start; }
.ledger-search-filters > button[type="submit"] { margin-top: 21px; }
.bill-search-amount-field { display: grid; gap: 8px; min-width: 0; }
.bill-search-amount-field > button { justify-self: start; min-width: 112px; }
.bill-link-select { display: flex; gap: 8px; align-items: center; min-height: 44px; cursor: pointer; }
.bill-link-select input { width: 18px; height: 18px; flex: 0 0 18px; accent-color: var(--teal); }
.bill-link-linked { display: inline-block; color: var(--teal); font-size: 12px; }
.bill-link-history { display: grid; gap: 14px; min-width: 0; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.bill-link-history h3 { margin: 0 0 6px; font-size: 17px; }
.bill-link-history p { margin: 0; color: var(--muted); line-height: 1.6; overflow-wrap: anywhere; }
.bill-link-history-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto auto; gap: 10px; align-items: end; }
.bill-link-history-filters label { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 12px; }
.bill-link-history-filters input { width: 100%; min-width: 0; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.bill-link-history-filters button { min-height: 40px; }
.bill-link-history-table { min-width: 1080px; }
.bill-link-history-table strong, .bill-link-history-table small { display: block; white-space: normal; overflow-wrap: anywhere; }
.bill-link-history-table small { margin-top: 4px; color: var(--muted); }
.bill-link-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); overflow: auto; padding: 20px; border: 1px solid var(--line); border-radius: 14px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.bill-link-dialog[open] { display: grid; gap: 18px; }
.bill-link-dialog::backdrop { background: rgba(16, 36, 28, .42); backdrop-filter: blur(3px); }
.bill-link-dialog > header { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.bill-link-dialog h3 { margin: 0 0 6px; }
.bill-link-dialog header p { margin: 0; color: var(--muted); line-height: 1.6; }
.bill-link-dialog-summary { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
.bill-link-dialog-summary dt { margin-bottom: 5px; color: var(--muted); font-size: 12px; }
.bill-link-dialog-summary dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.bill-link-dialog form { display: grid; gap: 10px; }
.bill-link-dialog form > label { color: var(--muted); font-size: 13px; }
.bill-link-dialog form > input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: var(--surface); }
.bill-link-dialog input:focus, .bill-link-history-filters input:focus { outline: none; border-color: var(--teal); box-shadow: var(--focus-ring); }
.bill-link-dialog-actions { display: flex; justify-content: end; gap: 8px; }
.bill-link-dialog-actions button { min-height: 44px; }
@media (max-width: 760px) {
  .ledger-filters.ledger-search-filters { grid-template-columns: minmax(0, 1fr); }
  .ledger-search-filters > button[type="submit"] { margin-top: 0; }
  .bill-link-history { padding: 14px; }
  .bill-link-history-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .bill-link-dialog { padding: 16px; }
  .bill-link-dialog form > input { font-size: 16px; }
}

#billSearchResults {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.ledger-search-table { min-width: 2380px; }
.ledger-search-table th:nth-child(6) { width: 300px; }
.ledger-search-table th:nth-child(7) { width: 160px; }
.ledger-search-table th:nth-child(8),
.ledger-search-table th:nth-child(9),
.ledger-search-table th:nth-child(10),
.ledger-search-table th:nth-child(12),
.ledger-search-table th:nth-child(13) { width: 190px; }
.ledger-search-table th:nth-child(11) { width: 110px; }
.ledger-search-table th:nth-child(14) { width: 154px; }

.ledger-search-table .ledger-desc-cell strong,
.ledger-search-table .ledger-desc-cell small,
.ledger-search-table .ledger-id-cell strong {
  overflow: visible;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ledger-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #edf2f0;
  color: #2c3936;
  vertical-align: middle;
  font-size: 13px;
  line-height: 1.35;
}

.ledger-table tbody tr:hover {
  background: #f8fbfa;
}

.ledger-direction-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  height: 25px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
}

.ledger-direction-badge.is-income {
  color: #28733a;
  background: #e8f4ea;
}

.ledger-direction-badge.is-expense {
  color: #b24839;
  background: #faebe8;
}

.ledger-amount {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger-amount.is-income {
  color: #28733a;
}

.ledger-amount.is-expense {
  color: #b24839;
}

.ledger-desc-cell,
.ledger-id-cell {
  min-width: 0;
}

.ledger-desc-cell strong,
.ledger-desc-cell small,
.ledger-id-cell strong,
.ledger-id-cell small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-desc-cell strong {
  color: #273b37;
  font-weight: 650;
}

.ledger-desc-cell small,
.ledger-id-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.ledger-id-cell strong {
  color: #405550;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 12px;
  font-weight: 500;
}

.ledger-balance,
.ledger-time {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.ledger-empty {
  height: 240px;
  color: var(--muted) !important;
  text-align: center;
}

.ledger-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

.ledger-pagination > div {
  display: flex;
  gap: 7px;
}

@media (max-width: 1180px) {
  .ledger-page-head {
    align-items: stretch;
    flex-direction: column;
  }

  .ledger-head-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .ledger-filters {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .ledger-keyword-field {
    grid-column: span 2;
  }
}

@media (max-width: 760px) {
  .ledger-head-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .ledger-head-actions select,
  .ledger-head-actions button {
    width: 100%;
  }

  .ledger-filters {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-keyword-field,
  .ledger-filter-actions {
    grid-column: 1 / -1;
  }

  .ledger-filter-actions button {
    flex: 1;
  }

  .ledger-summary-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ledger-summary strong {
    font-size: 20px;
  }

  .ledger-table-wrap {
    max-height: none;
  }

  .ledger-pagination,
  .ledger-status-row {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .ledger-filters,
  .ledger-summary-grid {
    grid-template-columns: 1fr;
  }

  .ledger-keyword-field,
  .ledger-filter-actions {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .project-fde-answer {
    grid-template-columns: 60px minmax(0, 1fr);
  }

  .project-fde-answer p {
    grid-column: 2;
  }
}

@media (max-width: 760px) {
  .fde-questionnaire-head,
  .fde-question-group-head {
    align-items: stretch;
    flex-direction: column;
  }

  .fde-progress {
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
  }

  .fde-question-copy {
    grid-template-columns: 1fr;
  }

  .fde-answer-editor {
    grid-template-columns: 1fr;
  }

  .fde-ai-button {
    justify-self: stretch;
  }

  .project-fde-answer {
    grid-template-columns: 1fr;
  }

  .project-fde-answer p {
    grid-column: auto;
  }
}

/* 发起项目：桌面与移动端统一为清晰的分区式工作流。 */
#workProjectCreateModal .work-project-create-panel {
  border: 0;
  border-radius: 20px;
  background: #f4f7f6;
  box-shadow: 0 28px 90px rgba(16, 38, 33, 0.28);
}

#workProjectCreateModal .work-project-create-panel > header {
  position: sticky;
  top: 0;
  z-index: 12;
  min-height: 104px;
  padding: 22px 28px;
  border-bottom-color: #d7e3df;
  background:
    radial-gradient(circle at 78% 0, rgba(75, 190, 163, 0.16), transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f0f7f4 100%);
}

#workProjectCreateModal .work-project-create-panel > header h3 {
  color: #193f37;
  font-size: 24px;
}

#workProjectCreateModal .work-project-create-panel > header p:last-child {
  margin: 7px 0 0;
  color: #5f766f;
  font-size: 13px;
}

#workProjectCreateForm {
  gap: 12px;
  padding: 20px 24px 24px;
}

#workProjectCreateForm > label {
  gap: 8px;
  padding: 13px 14px 14px;
  border: 1px solid #dce6e2;
  border-radius: 11px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(35, 69, 61, 0.035);
}

#workProjectCreateForm > label > span {
  color: #516a63;
  font-size: 12px;
  font-weight: 750;
}

#workProjectCreateForm > label > input,
#workProjectCreateForm > label > select {
  min-height: 46px;
  border-color: #d5e0dc;
  border-radius: 8px;
  background: #fbfcfc;
  font-size: 14px;
}

.work-project-form-title {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 2px 2px;
}

.work-project-form-title > span {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: #2f7a68;
  font-size: 11px;
  font-weight: 900;
}

.work-project-form-title > div {
  display: grid;
  gap: 2px;
}

.work-project-form-title strong {
  color: #294b43;
  font-size: 14px;
}

.work-project-form-title small {
  color: #71837e;
  font-size: 11px;
}

#workProjectCreateForm .fde-agent {
  margin-top: 8px;
  padding: 20px;
  border: 1px solid #d7e3df;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 7px 24px rgba(35, 69, 61, 0.055);
}

.work-project-manual-entry {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 18px;
  padding: 22px;
  border: 1px solid #d9e5e1;
  border-radius: 12px;
  background: linear-gradient(135deg, #f6fbf9 0%, #ffffff 65%);
}

.work-project-manual-entry.hidden {
  display: none;
}

.work-project-manual-entry h5,
.work-project-manual-entry p {
  margin: 0;
}

.work-project-manual-entry h5 {
  color: #234a40;
  font-size: 18px;
}

.work-project-manual-entry > div > p:last-child {
  margin-top: 9px;
  color: #667b75;
  font-size: 13px;
  line-height: 1.65;
}

.work-project-manual-entry > label {
  display: grid;
  gap: 8px;
}

.work-project-manual-entry > label > span {
  color: #415f57;
  font-size: 12px;
  font-weight: 800;
}

.work-project-manual-entry textarea {
  width: 100%;
  min-height: 190px;
  resize: vertical;
  border: 1px solid #cfddd8;
  border-radius: 10px;
  background: #fff;
  line-height: 1.7;
}

.work-project-manual-entry small {
  color: #71837e;
  line-height: 1.5;
}

#workProjectCreateForm > .people-modal-actions {
  position: sticky;
  bottom: -24px;
  z-index: 10;
  margin: 8px -24px -24px;
  padding: 16px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid #d8e3df;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 24px rgba(25, 55, 48, 0.06);
  backdrop-filter: blur(12px);
}

@media (max-width: 1024px) {
  #workProjectCreateModal {
    align-items: stretch;
    padding: 0;
    background: #f4f7f6;
    backdrop-filter: none;
  }

  #workProjectCreateModal .work-project-create-panel {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    border-radius: 0;
    overscroll-behavior: contain;
  }

  #workProjectCreateModal .work-project-create-panel > header {
    min-height: 88px;
    padding: max(16px, env(safe-area-inset-top)) 18px 16px;
  }

  #workProjectCreateModal .work-project-create-panel > header h3 {
    font-size: 21px;
  }

  #workProjectCreateModal .work-project-create-panel > header .icon-button {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
  }

  #workProjectCreateForm {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  #workProjectCreateForm .full-row {
    grid-column: auto;
  }

  #workProjectCreateForm .fde-agent {
    padding: 16px;
  }

  #workProjectCreateForm .fde-agent-head-actions {
    align-items: stretch;
    flex-direction: column;
  }

  #workProjectCreateForm .fde-entry-mode {
    min-width: min(100%, 240px);
  }

  #workProjectCreateForm .work-project-manual-entry {
    grid-template-columns: 1fr;
  }

  #workProjectCreateForm > .people-modal-actions {
    bottom: -16px;
    margin: 8px -16px -16px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom));
  }

  #workProjectCreateForm .fde-agent-grid,
  #workProjectCreateForm .fde-plan-columns,
  #workProjectCreateForm .fde-plan-tail,
  #workProjectCreateForm .fde-priority-plan {
    grid-template-columns: 1fr;
  }

  #workProjectCreateForm .fde-agent-grid {
    min-height: 0;
    overflow: visible;
  }

  #workProjectCreateForm .fde-agent-evidence {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid #d8e3df;
    border-left: 0;
  }

  #workProjectCreateForm .fde-agent-evidence > header {
    grid-column: 1 / -1;
  }

  #workProjectCreateForm .fde-agent-evidence > section + section {
    border-top: 0;
    border-left: 1px solid #e0e8e5;
  }

  #workProjectCreateForm .fde-agent-stages {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(150px, 34vw);
    grid-template-columns: none;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }

  #workProjectCreateForm .fde-agent-stages > div {
    min-height: 48px;
    scroll-snap-align: start;
  }

  #workProjectCreateForm .fde-agent-stages > div + div {
    border-top: 0;
    border-left: 1px solid #dfe7e4;
  }

  #workProjectCreateForm .fde-agent-layer-strip {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
    overflow-x: auto;
  }

  #workProjectCreateForm .fde-agent-messages {
    max-height: min(520px, 52vh);
    min-height: 300px;
  }
}

@media (max-width: 620px) {
  #workProjectCreateModal .work-project-create-panel > header {
    align-items: flex-start;
    gap: 10px;
  }

  #workProjectCreateModal .work-project-create-panel > header .eyebrow,
  .work-project-form-title small {
    display: none;
  }

  #workProjectCreateModal .work-project-create-panel > header p:last-child {
    line-height: 1.5;
  }

  #workProjectCreateForm {
    gap: 10px;
    padding: 12px;
  }

  #workProjectCreateForm > label {
    padding: 11px 12px 12px;
  }

  #workProjectCreateForm .fde-agent {
    margin-top: 4px;
    padding: 12px;
    border-radius: 12px;
  }

  #workProjectCreateForm .fde-agent-head {
    gap: 10px;
  }

  #workProjectCreateForm .fde-agent-head-actions,
  #workProjectCreateForm .fde-entry-mode {
    width: 100%;
  }

  #workProjectCreateForm .fde-agent-head h4 {
    font-size: 17px;
  }

  #workProjectCreateForm .fde-agent-stages {
    grid-auto-columns: minmax(142px, 74vw);
  }

  #workProjectCreateForm .fde-agent-conversation > header {
    align-items: flex-start;
    flex-direction: column;
  }

  #workProjectCreateForm .fde-voice-console {
    min-height: 84px;
  }

  #workProjectCreateForm .fde-agent-messages {
    min-height: 260px;
    max-height: 48vh;
    padding: 12px;
  }

  #workProjectCreateForm .fde-agent-message {
    max-width: 100%;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
  }

  #workProjectCreateForm .fde-agent-message > span {
    width: 30px;
    height: 30px;
  }

  #workProjectCreateForm .fde-agent-message > div {
    padding: 10px 11px;
    font-size: 14px;
    line-height: 1.65;
  }

  #workProjectCreateForm .fde-agent-message.is-user {
    grid-template-columns: minmax(0, 1fr) 30px;
  }

  #workProjectCreateForm .fde-agent-composer {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  #workProjectCreateForm .fde-agent-composer button,
  #workProjectCreateForm .fde-agent-gate button,
  #workProjectCreateForm > .people-modal-actions button {
    min-height: 46px;
  }

  #workProjectCreateForm .fde-agent-evidence {
    grid-template-columns: 1fr;
  }

  #workProjectCreateForm .fde-agent-evidence > header,
  #workProjectCreateForm .fde-agent-evidence > section {
    grid-column: auto;
  }

  #workProjectCreateForm .fde-agent-evidence > section + section {
    border-top: 1px solid #e0e8e5;
    border-left: 0;
  }

  #workProjectCreateForm .fde-agent-gate > div:last-child,
  #workProjectCreateForm > .people-modal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  #workProjectCreateForm .fde-agent-gate > div:last-child {
    grid-template-columns: 1fr;
  }

  #workProjectCreateForm > .people-modal-actions {
    bottom: -12px;
    margin: 8px -12px -12px;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom));
  }
}

/* 悦租控制台共享视觉层。只统一外观，不重写业务状态色、表格列或显示门禁。 */
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus-ring) !important;
  outline-offset: 3px;
}

:where(input, select, textarea) {
  min-width: 0;
  max-width: 100%;
  accent-color: var(--teal);
}

:where(input, textarea)::placeholder {
  color: #83948c;
  opacity: 1;
}

:where(.content-section, .content-section > *, .panel, .toolbar > *, .panel-head > *, .topbar > *) {
  min-width: 0;
}

.topbar-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.topbar-heading > div {
  min-width: 0;
}

.topbar .eyebrow {
  color: #698277;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.user-box {
  justify-content: flex-end;
}

.user-box :is(.notification-button, .ghost-button) {
  min-height: 36px;
  border-color: var(--line);
  background: #fff;
  font-size: 12px;
  white-space: nowrap;
}

.user-box #userName {
  padding-left: 6px;
  font-weight: 700;
}

.side-brand strong {
  font-size: 17px;
  letter-spacing: 0.03em;
}

.side-brand .brand-mark {
  flex: 0 0 36px;
  background: #f0faf4;
  color: #175e4c;
}

.side-nav .sub-nav {
  padding-left: 22px;
}

.side-nav .ai-sub-nav::after {
  content: none;
}

.side-nav button:hover:not(.active) {
  background: #204e40;
}

.side-nav button:focus-visible {
  outline-color: #b2ecce !important;
  outline-offset: -2px;
}

.side-nav button:not(.sub-nav) {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ui-nav-icon {
  display: inline-flex;
  flex: 0 0 18px;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  color: #9dbfac;
}

.ui-nav-icon svg {
  width: 18px;
  height: 18px;
}

.side-nav button.active .ui-nav-icon {
  color: #b2ecce;
}

.sidebar-footer {
  display: grid;
  gap: 4px;
  margin: 24px 10px 0;
  padding: 18px 4px 2px;
  border-top: 1px solid #33584d;
}

.sidebar-footer strong {
  color: #c7ddcf;
  font-size: 11px;
  font-weight: 500;
}

.sidebar-footer span {
  color: #96b7a4;
  font-size: 10px;
  line-height: 1.6;
}

#sidebarToggleBtn,
#sidebarCloseBtn {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 24px;
  line-height: 1;
}

#sidebarToggleBtn,
#sidebarCloseBtn,
#sidebarBackdrop {
  display: none;
}

.login-form button:hover:not(:disabled),
.primary-light:hover:not(:disabled):not(.is-error):not(.is-working) {
  border-color: var(--teal-strong);
  background: var(--teal-strong);
  box-shadow: none;
}

.secondary-button:hover:not(:disabled),
.ghost-button:hover:not(:disabled),
.icon-button:hover:not(:disabled),
.notification-button:hover:not(:disabled),
.pager button:hover:not(:disabled) {
  border-color: #aac5b9;
  color: var(--teal-strong);
  background: #f0f7f3;
}

:is(.panel, .orders-shell, .metric-tile, .work-metric, .work-board-filters,
  .work-board-head, .project-health-card, .agent-card, .schedule-card,
  .access-settings-card, .access-preview-card, .phone-panel, .phone-record-panel,
  .personnel-profile-card, .personnel-directory, .overdue-case-card,
  .risk-recheck-filter-panel, .overdue-list-filters, .recruitment-job-card) {
  border-color: var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}

:is(.work-metric, .metric-tile, .schedule-metrics article) strong {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

.panel-head p,
.work-board-head p:last-child {
  line-height: 1.65;
}

.overdue-list-metrics article,
.summary-topline article,
.overdue-case-head,
.risk-recheck-status-card {
  background: #fafcfb;
  box-shadow: none;
}

.overdue-list-metrics article {
  border-color: var(--line);
  border-radius: var(--radius);
}

.agent-avatar,
.recruitment-connector-card .agent-avatar,
.personnel-avatar {
  background: var(--teal);
  box-shadow: none;
}

.overdue-list-metrics span,
.overdue-list-filters label {
  color: var(--muted);
  font-size: 12px;
}

.overdue-case-head > div:first-child span,
.overdue-field span {
  color: #6b7f74;
  font-size: 11px;
}

.summary-topline strong,
.personnel-metrics strong,
.overdue-list-metrics strong {
  font-variant-numeric: tabular-nums;
}

.toolbar {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.toolbar :is(input, select) {
  min-height: 40px;
  padding-top: 9px;
  padding-bottom: 9px;
  font-size: 13px;
}

.toolbar :is(button, .secondary-button, .primary-light) {
  min-height: 40px;
  font-size: 13px;
}

.table-wrap,
.payment-reminder-table-wrap,
.risk-recheck-table-wrap,
.summary-table-wrap,
.schedule-table-wrap {
  scrollbar-width: thin;
  scrollbar-color: #b5c8be #f1f5f3;
  overscroll-behavior-inline: contain;
}

.orders-table :is(th, td),
.payment-reminder-table :is(th, td),
.risk-recheck-table :is(th, td) {
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}

.payment-reminder-table :is(th, td) {
  font-size: 12px;
}

.empty-state,
.work-empty-state,
.phone-record-empty,
.payment-reminder-table td.payment-reminder-table-empty {
  color: var(--muted);
  background: #fafcfb;
}

.empty-state {
  padding: 36px 28px;
  border-style: dashed;
}

.status-badge,
.payment-reminder-order-status {
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}

:is(.people-modal-panel, .import-history-panel, .store-create-panel,
  .phone-node-edit-dialog, .schedule-adjust-dialog, .schedule-personal-rule-dialog) {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

:is(.people-modal, .import-history-modal) {
  background: rgba(16, 36, 28, 0.42);
  backdrop-filter: blur(3px);
}

.notification-panel {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.phone-panel,
.phone-record-panel {
  padding: 20px;
}

.phone-manual-card,
.phone-manual-card.new-order,
.phone-manual-card.payment-reminder,
.phone-business-card,
.phone-business-card.payment-reminder {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: none;
}

.phone-manual-card,
.phone-business-card {
  border-top-color: var(--teal);
}

.phone-business-card-head h4,
.phone-manual-card-head h4 {
  font-size: 16px;
}

.phone-manual-card-head > div > span,
.phone-business-card-head > div > span,
.phone-batch-kicker {
  color: var(--teal);
  font-size: 11px;
  font-weight: 700;
}

.phone-panel .panel-head p,
.phone-business-card > p,
.phone-manual-card .phone-name-hint,
.phone-manual-card .phone-option-description,
.phone-manual-card .phone-action-message,
.phone-business-message,
.phone-manual-global-message {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.phone-manual-card.payment-reminder .phone-option-description {
  border-left-color: var(--teal);
  color: #466a5a;
  background: #f1f8f4;
}

.phone-node-diagnostics summary,
.phone-node-card footer button,
.phone-node-card p,
.phone-node-card-head > span,
.phone-node-detail-item strong {
  font-size: 11px;
}

.phone-node-card-meta,
.phone-node-detail-item small,
.phone-node-diagnostics summary em {
  font-size: 10px;
}

.phone-node-card footer button {
  min-height: 30px;
}

.phone-record-overview > div::after {
  content: none;
}

.phone-record-item.active {
  border-color: #bad7c8;
  box-shadow: none;
}

.phone-record-item.active::before,
.phone-record-tabs button.active::after {
  background: var(--teal);
}

.phone-record-tabs button.active {
  color: var(--teal-strong);
}

.phone-record-tabs button,
.phone-record-item > span,
.phone-record-item em,
.phone-record-detail-title p,
.phone-record-alert p,
.phone-message-bubble {
  font-size: 12px;
}

.phone-record-meta,
.phone-record-chip,
.phone-record-item-main time {
  font-size: 10px;
}

.phone-manual-card .phone-number-field,
.phone-manual-card .phone-detail-grid label,
.phone-select-field,
.phone-business-card > label {
  color: #536a5f;
  font-size: 12px;
}

.phone-manual-card .phone-detail-grid :is(input, select),
.phone-manual-card .phone-select-field select,
.phone-manual-console .phone-select-field select,
.phone-business-common-settings .phone-select-field select {
  min-height: 40px;
  font-size: 13px;
}

.phone-select-field,
.phone-order-lookup-search,
.phone-panel.phone-batch-panel .phone-batch-head {
  border-color: var(--line);
  background: #f7faf8;
}

.phone-select-field,
.phone-business-common-settings .phone-select-field {
  min-width: 0;
}

.phone-order-lookup-mark,
.phone-batch-step-number {
  background: var(--teal);
  box-shadow: none;
}

.phone-batch-button-primary,
.phone-business-card.new-order .phone-batch-button-primary,
.phone-manual-start,
.phone-manual-start.new-order,
.phone-manual-start.payment-reminder,
.phone-actions .primary-button {
  border-color: var(--teal);
  color: #fff;
  background: var(--teal);
  box-shadow: none;
}

.phone-batch-button-primary:not(:disabled):hover,
.phone-business-card.new-order .phone-batch-button-primary:not(:disabled):hover,
.phone-manual-start:not(:disabled):hover,
.phone-actions .primary-button:not(:disabled):hover {
  border-color: var(--teal-strong);
  background: var(--teal-strong);
  box-shadow: none;
  transform: none;
  filter: none;
}

.phone-batch-button-secondary,
.phone-batch-button-outline,
.phone-template-link {
  border-color: var(--line);
  color: #365b4f;
  background: #fff;
  box-shadow: none;
}

.phone-batch-button-secondary:not(:disabled):hover,
.phone-batch-button-outline:not(:disabled):hover,
.phone-template-link:hover {
  border-color: #aac5b9;
  color: var(--teal-strong);
  background: #f0f7f3;
  transform: none;
}

.payment-reminder-kicker,
.payment-reminder-hero-meta strong,
.payment-reminder-table td.amount {
  color: var(--teal-strong);
}

.payment-reminder-hero h3 {
  color: var(--ink);
  font-size: 23px;
}

.payment-reminder-kicker,
.payment-reminder-hero-meta span,
.payment-reminder-hero-meta small,
.payment-reminder-import-card header p,
.payment-reminder-rules-card header p,
.payment-reminder-data-head p,
.payment-reminder-run-copy p,
.payment-reminder-stats span,
.payment-reminder-stats small,
.payment-reminder-rules-card li,
.payment-reminder-rules-card li strong,
.payment-reminder-rules-card > p,
.payment-reminder-run-settings label,
.payment-reminder-run-settings small {
  font-size: 12px;
  line-height: 1.6;
}

.payment-reminder-import-card header p,
.payment-reminder-rules-card header p,
.payment-reminder-data-head p,
.payment-reminder-run-copy p,
.payment-reminder-stats span,
.payment-reminder-stats small,
.payment-reminder-hero-meta span,
.payment-reminder-hero-meta small,
.payment-reminder-run-settings small {
  color: var(--muted);
}

.payment-reminder-stats small,
.payment-reminder-run-settings small {
  white-space: normal;
  overflow-wrap: anywhere;
}

.payment-reminder-import-card h4,
.payment-reminder-rules-card h4,
.payment-reminder-data-head h4,
.payment-reminder-run-copy h4 {
  color: var(--ink);
  font-size: 16px;
}

.payment-reminder-file-field input,
.payment-reminder-file-field,
.payment-reminder-run-settings select,
.payment-reminder-data-panel .phone-payment-reminder-summary {
  font-size: 13px;
}

.payment-reminder-run-settings select {
  min-height: 40px;
}

.payment-reminder-rules-card li {
  padding: 8px 10px;
  color: var(--muted);
  background: #f5f8f6;
}

.payment-reminder-stats article {
  padding: 16px;
  background: #fafcfb;
}

.payment-reminder-stats strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.payment-reminder-test-panel {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
  gap: 16px;
  align-items: start;
}

.payment-reminder-test-panel > * {
  min-width: 0;
}

.payment-reminder-test-panel > .panel-head {
  grid-column: 1 / -1;
  margin-bottom: 0;
}

.payment-reminder-test-panel .phone-manual-console {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  padding: 16px;
}

.payment-reminder-test-panel .phone-manual-console-title {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.payment-reminder-test-panel .phone-manual-console > * {
  grid-column: auto;
}

.payment-reminder-test-panel .phone-manual-refresh {
  min-height: 42px;
}

.payment-reminder-test-panel .phone-manual-card {
  padding: 18px;
  border-top-color: var(--teal);
}

.payment-reminder-records {
  grid-column: 1 / -1;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}

.payment-reminder-records > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.payment-reminder-records h4 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 16px;
}

.payment-reminder-records header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.payment-reminder-record-actions,
.payment-reminder-record-summary,
.payment-reminder-record-media {
  display: flex;
  align-items: center;
  gap: 10px;
}

.payment-reminder-record-actions > span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.payment-reminder-record-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.payment-reminder-record-item {
  padding: 13px 14px;
  border: 1px solid #e3ebe7;
  border-radius: 11px;
  background: #fbfdfc;
}

.payment-reminder-record-summary {
  flex-wrap: wrap;
}

.payment-reminder-record-summary time {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.payment-reminder-record-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.payment-reminder-record-summary span {
  padding: 4px 8px;
  border-radius: 999px;
  color: #32715d;
  background: #e8f5ef;
  font-size: 11px;
  font-weight: 700;
}

.payment-reminder-record-summary span.special {
  color: #9c5f12;
  background: #fff2d7;
}

.payment-reminder-record-summary span.not-connected {
  color: #a33434;
  background: #fff0f0;
}

.payment-reminder-record-summary span.fault {
  color: #8a4d1f;
  background: #fff1df;
}

.payment-reminder-record-note {
  margin: 9px 0 0;
  color: #76551e;
  font-size: 12px;
  line-height: 1.6;
}

.payment-reminder-record-media {
  justify-content: space-between;
  margin-top: 10px;
}

.payment-reminder-record-media audio {
  width: min(100%, 380px);
  height: 34px;
}

.payment-reminder-record-media button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #cbdcd5;
  border-radius: 8px;
  color: var(--teal);
  background: #fff;
  font-weight: 700;
}

.payment-reminder-record-no-audio,
.payment-reminder-record-empty {
  color: var(--muted);
  font-size: 12px;
}

.payment-reminder-record-empty {
  padding: 18px;
  text-align: center;
}

.payment-reminder-record-detail {
  margin-top: 11px;
  padding: 12px;
  border-radius: 9px;
  background: #f3f7f5;
}

.payment-reminder-record-detail > strong {
  color: var(--ink);
  font-size: 12px;
}

.payment-reminder-record-detail pre {
  margin: 9px 0 0;
  overflow-wrap: anywhere;
  color: #52625c;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.7;
  white-space: pre-wrap;
}

@media (max-width: 1280px) {
  .topbar {
    flex-wrap: wrap;
  }

  .user-box {
    justify-content: flex-start;
  }

  .phone-business-head,
  .phone-order-lookup,
  .phone-batch-flow {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-order-lookup-search {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .phone-manual-console {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phone-manual-source-status {
    grid-column: auto;
  }

  .phone-manual-refresh {
    grid-column: auto;
    min-height: 44px;
  }

  .payment-reminder-runbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .payment-reminder-run-copy {
    grid-column: 1 / -1;
  }

  .toolbar:not(.orders-toolbar) {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }
}

@media (max-width: 1024px) {
  .app-view {
    padding-left: 0;
  }

  .workspace {
    padding: 20px 22px 30px;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 60;
    width: min(288px, calc(100vw - 52px));
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding: max(20px, env(safe-area-inset-top)) 14px max(20px, env(safe-area-inset-bottom));
    visibility: hidden;
    transform: translateX(-100%);
    transition: transform 180ms ease;
    overscroll-behavior: contain;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    visibility: visible;
    transform: translateX(0);
  }

  body.sidebar-open .sidebar * {
    visibility: visible;
  }

  #sidebarToggleBtn,
  #sidebarCloseBtn {
    display: inline-grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
  }

  #sidebarCloseBtn {
    margin-left: auto;
    border-color: #406759;
    color: #e7f4ec;
    background: #204e40;
  }

  #sidebarBackdrop:not([hidden]):not(.hidden) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    padding: 0;
    background: rgba(13, 34, 25, 0.4);
    cursor: default;
  }

  #sidebarBackdrop:active {
    transform: none;
  }

  .side-nav {
    grid-template-columns: minmax(0, 1fr);
  }

  .side-nav button {
    min-height: 42px;
    text-align: left;
  }

  .topbar {
    display: flex;
  }

  .topbar > .user-box {
    flex-basis: 100%;
  }

  .phone-manual-console,
  .payment-reminder-workspace {
    grid-template-columns: minmax(0, 1fr);
  }

  .phone-manual-console-title {
    grid-column: auto;
  }
}

@media (max-width: 900px) {
  .payment-reminder-test-panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (min-width: 721px) and (max-width: 1024px) {
  .orders-toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-toolbar .search-box {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 16px 12px 24px;
  }

  .topbar {
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .user-box {
    align-items: center;
    flex-direction: row;
    gap: 7px;
  }

  .user-box :is(.notification-button, .ghost-button) {
    min-height: 40px;
    padding: 8px 10px;
  }

  .notification-panel {
    position: fixed;
    top: auto;
    left: 12px;
    right: 12px;
    width: auto;
    max-height: min(68vh, 520px);
  }

  .metrics-grid,
  .work-board-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .metric-tile,
  .work-metric {
    min-height: 106px;
    padding: 15px;
  }

  .metric-tile strong,
  .work-metric strong {
    font-size: 26px;
    overflow-wrap: anywhere;
  }

  .panel,
  .phone-panel,
  .payment-reminder-import-card,
  .payment-reminder-rules-card,
  .payment-reminder-data-panel,
  .payment-reminder-runbar {
    padding: 16px;
  }

  .toolbar,
  .toolbar:not(.orders-toolbar),
  .orders-toolbar,
  .payment-reminder-runbar,
  .payment-reminder-run-settings,
  .payment-reminder-test-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .toolbar {
    padding: 12px;
  }

  .phone-manual-console {
    padding: 12px;
  }

  .payment-reminder-run-copy,
  .phone-manual-source-status,
  .phone-manual-refresh {
    grid-column: auto;
  }

  .payment-reminder-runbar > .phone-batch-button {
    width: 100%;
    min-width: 0;
  }

  .payment-reminder-queue-actions .phone-batch-button { width: 100%; min-width: 0; }
  .payment-reminder-queue-head { flex-wrap: wrap; }
  .payment-reminder-queue-state { padding: 12px; }

  .payment-reminder-records > header,
  .payment-reminder-record-media {
    align-items: stretch;
    flex-direction: column;
  }

  .payment-reminder-record-actions {
    justify-content: space-between;
  }

  .payment-reminder-record-media audio {
    width: 100%;
  }

  .payment-reminder-rules-card li {
    align-items: flex-start;
  }

  .payment-reminder-stats article {
    padding: 12px;
  }

  .payment-reminder-stats strong {
    font-size: 26px;
  }

  .phone-manual-start,
  .phone-batch-button,
  .primary-light,
  .secondary-button,
  .toolbar :is(input, select, button) {
    min-height: 44px;
  }

  .pager {
    flex-wrap: wrap;
    justify-content: center;
  }
}

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

  button:active:not(:disabled) {
    transform: none;
  }
}

@media (max-width: 720px) {
  .collection-phone-hero { align-items: flex-start; flex-direction: column; padding: 16px; }
  .collection-phone-hero h3 { font-size: 21px; }
  .collection-phone-safety { white-space: normal; }
  .collection-phone-page .phone-record-toolbar { grid-template-columns: minmax(0, 1fr); }
}
.phone-node-business-editor,.phone-node-business-readonly{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:4px 0;padding:3px 6px;border:1px solid var(--line,#dce3ec);border-radius:8px;font-size:11px;line-height:13px;color:var(--muted,#6b7280)}
.phone-node-business-editor>span{font-weight:700;color:var(--ink,#263244)}
.phone-node-business-editor label{display:inline-flex;gap:4px;align-items:center;cursor:pointer}
.phone-node-business-readonly{color:var(--muted,#6b7280)}

.query-feedback {
  min-height: 22px;
  margin: 6px 0 10px;
  color: var(--muted, #64748b);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.query-feedback.is-loading {
  color: var(--primary, #1f9387);
}

.query-feedback.is-loading::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 1px;
}

.query-feedback.is-error,
.query-error p {
  color: #ad3535;
}

#ordersSection[aria-busy="true"] .orders-shell {
  opacity: 0.65;
}

.orders-table tbody tr:focus-within {
  background: #eef8f5;
}

.query-error .secondary-button {
  margin-top: 12px;
}

@media (max-width: 720px) {
  .orders-toolbar input,
  .orders-toolbar select,
  .orders-toolbar button,
  .detail-drawer .icon-button {
    min-height: 44px;
  }
}

/* 触控设备适配：指针粗的设备没有 hover，按下反馈与最小可点面积必须显式给出。
   规范要求手机主控件至少 44px，桌面至少 40px；这里只补齐触控专属部分，
   不改动既有鼠标样式。 */
@media (pointer: coarse) {
  button,
  .side-nav button,
  .sub-nav button,
  .pager button,
  .icon-button,
  [role="button"],
  input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  select,
  textarea,
  summary {
    min-height: 44px;
  }
  /* 触屏没有 hover，用 :active 提供与规范一致的按下反馈 */
  button:not(:disabled):active,
  [role="button"]:active {
    transform: scale(0.985);
  }
  /* 去掉触屏上滞留的 hover 高亮，避免点击后留下"选中"错觉 */
  button:hover {
    transform: none;
  }
}

/* 无悬浮能力设备的通用回退：/ coarse 之外的旧浏览器或混合输入 */
@media (hover: none) {
  .table-row:hover,
  tr:hover {
    background: inherit;
  }
}

/* 触屏键盘弹出时的安全区，配合已有的 safe-area-inset 规则 */
@media (pointer: coarse) {
  .workspace {
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
}
