:root {
  color-scheme: light;
  --ink: #193a30;
  --muted: #718078;
  --green: #173c30;
  --lime: #d5ee9b;
  --line: #e2e7de;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #f5f6f0;
  color: var(--ink);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button, .chat-link {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 17px;
  cursor: pointer;
  color: var(--ink);
  background: white;
  font-weight: 600;
}
button:hover { filter: brightness(.97); }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid #83b9a6;
  outline-offset: 2px;
}
.primary { background: var(--green); color: white; border-color: var(--green); }
.secondary { background: transparent; }
.danger { color: #9c3d31; border-color: #ebd2cb; }
.topbar {
  background: var(--green);
  color: white;
  padding: 23px max(24px, calc((100vw - 1370px) / 2));
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.brand { font-weight: 850; font-size: 24px; letter-spacing: -.8px; }
.brand span { display: block; font-size: 9px; letter-spacing: 2.8px; font-weight: 500; color: var(--lime); }
.role { font-size: 12px; padding: 7px 11px; border: 1px solid #527160; border-radius: 20px; }
main { max-width: 1420px; padding: 38px 24px 26px; margin: auto; }
.intro { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 750; color: #788a62; margin: 0 0 9px; }
h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.1; letter-spacing: -1.5px; margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.capacity { min-width: 154px; border-radius: 18px; background: #e8eedf; padding: 19px 25px; text-align: center; }
.capacity strong { font-size: 31px; display: block; line-height: 1.1; }
.capacity span { font-size: 11px; color: #627855; }
.toolbar { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 23px; }
.chat-link { text-decoration: none; background: var(--lime); border-color: var(--lime); }
#notice { border-radius: 12px; padding: 12px 16px; background: #e4edd7; margin-top: 18px; white-space: pre-line; }
#notice.error { background: #f6e1d9; color: #842c23; }
nav { display: flex; gap: 7px; overflow-x: auto; padding: 21px 0 16px; margin-top: 22px; border-bottom: 1px solid var(--line); }
nav button { white-space: nowrap; border-color: transparent; background: transparent; padding: 10px 16px; }
nav button.active { background: var(--green); color: white; }
.filters { display: flex; gap: 12px; margin: 23px 0; }
label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; }
.search { flex: 1; }
input, select, textarea { border: 1px solid #dce3d6; border-radius: 11px; color: var(--ink); background: white; padding: 11px 13px; width: 100%; min-width: 0; }
input, select { min-height: 44px; }
textarea { min-height: 100px; resize: vertical; }
.list-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 26px 0 14px; }
h2 { font-size: 18px; margin: 0; }
.list-heading span { font-size: 12px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(295px, 1fr)); gap: 16px; }
.card { background: white; border: 1px solid var(--line); border-radius: 18px; padding: 22px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 19px; }
.number { font-size: 11px; color: var(--muted); }
.badge { font-size: 10px; font-weight: 650; border-radius: 16px; padding: 5px 9px; background: #e9eee3; white-space: nowrap; }
.badge.closed { background: #dceee5; }
.card h3 { font-size: 20px; line-height: 1.25; margin: 0 0 6px; overflow-wrap: anywhere; }
.company { color: var(--muted); font-size: 13px; margin: 0 0 16px; min-height: 20px; overflow-wrap: anywhere; }
.contact { white-space: pre-line; font-size: 12px; overflow-wrap: anywhere; color: #466252; }
.due { font-size: 12px; border-top: 1px solid #eef0e9; padding-top: 14px; margin-top: 17px; }
.due.late { color: #a54335; }
.card-actions { display: flex; gap: 8px; margin-top: 17px; flex-wrap: wrap; }
.card-actions button { flex: 1; font-size: 12px; }
.empty { background: white; border: 1px dashed #ccd7c5; border-radius: 18px; padding: 48px 24px; text-align: center; color: var(--muted); }
.table-wrap { overflow-x: auto; background: white; border: 1px solid var(--line); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; min-width: 1000px; font-size: 12px; }
th { text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .7px; color: #788574; background: #eef2e8; padding: 15px 13px; white-space: nowrap; }
td { padding: 15px 13px; border-top: 1px solid #e9ede4; vertical-align: top; max-width: 235px; overflow-wrap: anywhere; }
td.contact { min-width: 180px; }
td button { font-size: 11px; padding: 7px 10px; margin-bottom: 5px; }
td.actions { min-width: 120px; }
.group { margin-bottom: 32px; }
.group-title { display: flex; gap: 12px; align-items: center; margin: 28px 0 14px; }
.group-title h2 { font-size: 20px; }
.count { border-radius: 20px; padding: 4px 10px; background: #e4ebd8; font-size: 11px; }
footer { margin-top: 42px; font-size: 11px; color: #899282; }
dialog { width: min(630px, calc(100vw - 28px)); max-height: 91vh; padding: 0; border: 0; border-radius: 22px; color: var(--ink); background: #fbfcf8; }
dialog::backdrop { background: #12251b88; backdrop-filter: blur(3px); }
#dialogBody { padding: 25px; }
.dialog-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.dialog-head h2 { font-size: 25px; line-height: 1.2; overflow-wrap: anywhere; }
.close { border: 0; background: #eaf0e2; padding: 5px 12px; font-size: 23px; }
.facts { display: grid; grid-template-columns: 130px 1fr; gap: 10px; font-size: 13px; margin: 22px 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.report { display: grid; gap: 14px; margin-top: 25px; border-top: 1px solid var(--line); padding-top: 23px; }
.report h3 { margin: 0; font-size: 18px; }
.follow-fields { display: grid; gap: 14px; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 23px; }
.dialog-actions button { flex: 1; }
.dialog-error { color: #a54335; font-size: 13px; white-space: pre-line; }
[hidden] { display: none !important; }
@media (max-width: 650px) {
  .topbar { padding: 17px 18px; }
  .brand { font-size: 21px; }
  .role { max-width: 150px; font-size: 10px; }
  main { padding: 27px 17px 24px; }
  .intro { gap: 12px; align-items: start; }
  .capacity { min-width: 100px; padding: 16px 12px; }
  .capacity strong { font-size: 26px; }
  .capacity span { font-size: 9px; }
  h1 { font-size: 32px; }
  .intro .muted { font-size: 12px; }
  .eyebrow { font-size: 8px; letter-spacing: 1.4px; }
  .toolbar .primary { flex: 1; }
  .toolbar button, .chat-link { font-size: 12px; padding: 11px 14px; }
  nav { margin-top: 16px; }
  nav button { padding: 9px 12px; font-size: 12px; }
  .filters { flex-direction: column; }
  .cards { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 20px; }
  .facts { grid-template-columns: 95px minmax(0, 1fr); font-size: 12px; }
}
