:root {
  --user-zoom: 1;
  --bg: #e8edf5;
  --surface: #ffffff;
  --surface-hover: #f1f4fa;
  --border: #d0dae8;
  --text: #0f172a;
  --muted: #64748b;
  --accent: #0f62fe;
  --accent-dim: #0043ce;
  --accent-soft: rgba(15, 98, 254, 0.1);
  --success: #0d9488;
  --warning: #c2410c;
  --danger: #dc2626;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 28px rgba(15, 23, 42, 0.06);
  --font: "DM Sans", system-ui, sans-serif;
}

html[data-theme="dark"] {
  --bg: #0f1419;
  --surface: #1a222c;
  --surface-hover: #232d3a;
  --border: #2d3a4a;
  --text: #e8eef4;
  --muted: #8b9cb0;
  --accent: #3d9cf5;
  --accent-dim: #2a7bc4;
  --accent-soft: rgba(61, 156, 245, 0.15);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .file-upload:focus-within {
  background: var(--surface);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0c1118;
  color: var(--text);
  border-color: var(--border);
}

html[data-theme="dark"] .inquiry-doc {
  background: #fff;
  color: #111;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: calc(15px * var(--user-zoom, 1));
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
}

.app {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  box-shadow: 4px 0 24px rgba(26, 35, 50, 0.04);
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #3b82f6, #6366f1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.brand strong {
  display: block;
  font-size: 0.95rem;
}

.brand .muted {
  font-size: 0.75rem;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.8rem;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.nav-ico {
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
  opacity: 0.72;
}

.nav-item.active .nav-ico {
  opacity: 1;
  color: var(--accent);
}

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

.nav-item.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}

a.nav-item.nav-item--link {
  text-decoration: none;
  color: inherit;
}

a.nav-item.nav-item--link:hover {
  background: var(--surface-hover);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
}

.main {
  padding: 1.5rem 2rem 2rem;
  overflow-x: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.topbar h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.pill {
  font-size: 0.75rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  color: var(--muted);
  font-weight: 500;
}

.panel {
  animation: fade 0.2s ease;
}

.panel[hidden] {
  display: none !important;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.section-kicker {
  margin: 1.5rem 0 0.65rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}

.lead {
  color: var(--muted);
  max-width: 640px;
  margin: 0 0 1.25rem;
}

.steps {
  margin: 0 0 1.5rem;
  padding-left: 0;
  list-style: none;
}

.steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.card h3,
.card h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
}

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

.list-plain {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.field span {
  font-size: 0.8rem;
  color: var(--muted);
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.6rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

.btn {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface-hover);
  color: var(--text);
  cursor: not-allowed;
  opacity: 0.85;
}

.btn.primary {
  background: var(--accent);
  border-color: var(--accent-dim);
  color: #fff;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

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

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.data-table th,
.data-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table--portfolio .col-num {
  width: 2.5rem;
  white-space: nowrap;
}

.data-table--portfolio .property-cell {
  min-width: 200px;
  max-width: 320px;
  word-wrap: break-word;
}

.badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

.badge.ok {
  background: rgba(61, 214, 140, 0.2);
  color: var(--success);
}

.badge.warn {
  background: rgba(232, 179, 57, 0.2);
  color: var(--warning);
}

.badge.muted {
  background: var(--surface-hover);
  color: var(--muted);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
}

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

.inquiry-callback-grid {
  margin-bottom: 0.5rem;
}

.inquiry-form input[type="date"],
.inquiry-form input[type="time"] {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .inquiry-form input[type="date"],
html[data-theme="dark"] .inquiry-form input[type="time"] {
  color-scheme: dark;
}

@media (max-width: 520px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  padding: 0.75rem 0;
  border-left: 2px solid var(--border);
  padding-left: 1rem;
  margin-left: 0.35rem;
}

.timeline time {
  font-size: 0.75rem;
  color: var(--muted);
}

.timeline p {
  margin: 0.25rem 0 0;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.column h4 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.card.mini {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.muted-card {
  opacity: 0.7;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.field-hint {
  margin: -0.5rem 0 0.75rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.doc-section-label {
  margin: 1.25rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.doc-section-label:first-of-type {
  margin-top: 0;
}

.fieldset-plain {
  border: none;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.inquiry-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.inquiry-editor h3 {
  margin-top: 0;
}

.inquiry-form .field {
  margin-bottom: 0.85rem;
}

.inquiry-preview {
  position: sticky;
  top: 1rem;
}

.inquiry-preview-toolbar {
  margin-bottom: 0.5rem;
}

.btn-active {
  cursor: pointer;
  opacity: 1;
  background: var(--accent);
  border-color: var(--accent-dim);
  color: #fff;
  border: 1px solid transparent;
}

.btn-active:hover {
  filter: brightness(1.06);
}

a.btn {
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-ghost {
  cursor: pointer;
  opacity: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--accent);
}

.btn-ghost:hover {
  background: var(--accent-soft);
  border-color: var(--border);
}

.btn-sm {
  font-size: 0.8rem;
  padding: 0.3rem 0.55rem;
  margin-left: 0.35rem;
  vertical-align: middle;
}

.btn-danger-ghost {
  cursor: pointer;
  opacity: 1;
  background: #fff;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 0.85rem;
  padding: 0.45rem 0.75rem;
}

.btn-danger-ghost:hover {
  background: #fef2f2;
}

.dedupe-banner {
  margin: -0.35rem 0 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  font-size: 0.88rem;
  line-height: 1.45;
  border: 1px solid var(--border);
}

.dedupe-banner--warn {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #78350f;
}

.dedupe-banner code {
  font-size: 0.85em;
}

.leads-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.leads-heading {
  margin: 0;
  font-size: 1rem;
}

/* SOP-style callouts (internal notes, urgent, billing) */
.callout {
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
  font-size: 0.92rem;
  line-height: 1.55;
  border: 1px solid var(--border);
}

.callout-title {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.5rem;
}

.callout--team {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.callout--team .callout-title {
  color: #047857;
}

.callout--urgent {
  background: #fef2f2;
  border-color: #fecaca;
  color: #7f1d1d;
}

.callout--urgent .callout-title {
  color: var(--danger);
}

.callout--billing {
  background: #fffbeb;
  border-color: #fde68a;
  color: #78350f;
}

.callout--billing .callout-title {
  color: #b45309;
}

.callout--guide {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e3a5f;
}

.sop-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.sop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.sop-table th,
.sop-table td {
  padding: 0.65rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.sop-table th {
  background: var(--surface-hover);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sop-table tr:last-child td {
  border-bottom: none;
}

.sop-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 1.25rem;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.sop-meta dt {
  margin: 0;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.75rem;
}

.sop-meta dd {
  margin: 0.15rem 0 0;
}

.sop-meta--flat {
  box-shadow: none;
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}

.question-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--text);
}

.question-list li {
  margin-bottom: 0.5rem;
}

.question-list .req {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-left: 0.25rem;
}

.file-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  background: var(--surface-hover);
  transition: border-color 0.15s, background 0.15s;
}

.file-upload:focus-within {
  border-color: var(--accent);
  background: #fff;
}

.file-upload input[type="file"] {
  width: 100%;
  font-size: 0.88rem;
}

.file-list {
  list-style: none;
  margin: 0.65rem 0 0;
  padding: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.file-list li {
  padding: 0.25rem 0;
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
}

.file-list .fname {
  color: var(--text);
  font-weight: 500;
  word-break: break-all;
}

/* Paper-style document preview */
.inquiry-doc {
  background: #fff;
  color: #111;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 12pt;
  line-height: 1.45;
  padding: 1.75rem 2rem 2rem;
  max-width: 8.5in;
  margin: 0 auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-height: 200px;
}

.doc-title {
  text-align: center;
  font-size: 16pt;
  font-weight: 700;
  margin: 0 0 1rem;
  letter-spacing: 0.02em;
}

.doc-rule {
  border: 0;
  border-top: 1px solid #333;
  margin: 0.65rem 0;
}

.doc-block {
  margin: 0.5rem 0;
}

.doc-line {
  margin: 0.35rem 0;
  border-bottom: 1px solid #999;
  padding-bottom: 0.15rem;
}

.doc-line .doc-bullet {
  margin-right: 0.25rem;
}

.doc-note {
  margin: 0.15rem 0 0;
  font-size: 10pt;
  color: #444;
}

.doc-heading {
  font-weight: 700;
  margin: 0.75rem 0 0.4rem;
  font-size: 11pt;
}

.doc-choices {
  margin: 0.35rem 0;
  font-size: 12pt;
}

.doc-sub {
  margin: 0.65rem 0 0.25rem;
  font-size: 11pt;
}

.doc-fill {
  font-weight: 600;
}

.doc-blank {
  display: inline-block;
  min-width: 12rem;
  border-bottom: 1px solid #333;
}

.doc-notes-line {
  margin: 0.25rem 0;
  min-height: 1.35rem;
  border-bottom: 1px solid #999;
}

.doc-notes-block {
  margin: 0.35rem 0 0;
  padding: 0.35rem 0;
  border: 1px solid #ccc;
  min-height: 3rem;
  white-space: normal;
  word-break: break-word;
}

@media print {
  @page {
    margin: 0.6in;
  }

  .no-print {
    display: none !important;
  }

  body {
    background: #fff !important;
    color: #000 !important;
  }

  .app {
    display: block !important;
  }

  .sidebar,
  .topbar {
    display: none !important;
  }

  .main {
    padding: 0 !important;
    max-width: none !important;
  }

  .panel {
    display: block !important;
  }

  .panel:not(#inquiry) {
    display: none !important;
  }

  #inquiry.panel[hidden] {
    display: block !important;
  }

  .inquiry-layout {
    display: block !important;
  }

  .inquiry-doc {
    border: none !important;
    box-shadow: none !important;
    max-width: none !important;
    padding: 0 !important;
    font-size: 11pt;
  }

  .lead {
    display: none !important;
  }
}

@media (max-width: 960px) {
  .inquiry-layout {
    grid-template-columns: 1fr;
  }

  .inquiry-preview {
    position: static;
  }
}

@media (max-width: 768px) {
  .app {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-item {
    flex: 1 1 auto;
    min-width: 120px;
    text-align: center;
  }

  .sidebar-footer {
    display: none;
  }
}

/* --- Navigation groups, home, training, toggles --- */
.nav-group-label {
  margin: 0.85rem 0 0.35rem;
  padding: 0 0.85rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.nav-item.nav-sub {
  padding-left: 1.15rem;
  font-size: 0.88rem;
}

.topbar-lang {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.topbar-lang .lang-label {
  margin-right: 0.25rem;
}

.pill-icon {
  cursor: pointer;
  font: inherit;
}

.pill-active {
  background: var(--accent-soft) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  font-weight: 600;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.home-card h3 {
  margin-top: 0;
}

.home-card .muted {
  min-height: 3rem;
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.home-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
}

.home-more h3 {
  margin: 0;
  flex: 1 1 100%;
}

.hero-lead {
  font-size: 1.05rem;
  max-width: 720px;
}

/* --- Home: landing (workflow · schedule · food) --- */
.home-landing {
  max-width: 1120px;
}

.home-landing__intro {
  margin-bottom: 1.75rem;
}

.home-landing__kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.home-landing__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.45rem, 2.5vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.home-landing__lede {
  margin: 0;
  max-width: 40rem;
  line-height: 1.55;
  font-size: 0.95rem;
}

.home-landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.home-lp-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 300px;
  padding: 1.35rem 1.25rem 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 4px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.16s ease, box-shadow 0.2s ease;
}

.home-lp-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 44px rgba(15, 23, 42, 0.1);
}

.home-lp-card--wf {
  border-top: 4px solid #6366f1;
}

.home-lp-card--cal {
  border-top: 4px solid #0d9488;
}

.home-lp-card--food {
  border-top: 4px solid #ea580c;
}

.home-lp-card__icon {
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--surface-hover);
  color: var(--text);
}

.home-lp-card__icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.home-lp-card__h {
  margin: 0 0 0.45rem;
  font-size: 1.08rem;
  font-weight: 800;
}

.home-lp-card__p {
  margin: 0 0 1rem;
  flex: 0 0 auto;
  line-height: 1.45;
  font-size: 0.88rem;
}

.home-lp-card__btn {
  margin-top: auto;
  align-self: stretch;
  text-align: center;
}

a.home-lp-card__btn {
  display: block;
  text-decoration: none;
  box-sizing: border-box;
}

.mac-food-mount {
  margin-top: 0.25rem;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mac-food-static {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
}

.mac-food-line {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--text);
}

.mac-food-line--bday {
  color: var(--muted);
}

.mac-food-line__link {
  font-weight: 600;
  word-break: break-all;
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 2px;
}

html[data-theme="dark"] .mac-food-line__link {
  color: #93c5fd;
}

.mac-food-cta {
  margin-top: auto;
  align-self: stretch;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.home-tools-drawer {
  margin-top: 0.25rem;
  padding: 0;
  overflow: hidden;
}

.home-tools-drawer__summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1rem 1.15rem;
  font-weight: 700;
  font-size: 1rem;
}

.home-tools-drawer__summary::-webkit-details-marker {
  display: none;
}

.home-tools-drawer__hint {
  font-weight: 500;
}

.home-tools-drawer__body {
  padding: 0 1.15rem 1.15rem;
  border-top: 1px solid var(--border);
}

.fn-strip--compact {
  gap: 0.65rem;
  margin-bottom: 0.25rem;
}

.fn-strip--compact .fn-tile {
  padding: 0.85rem 0.95rem;
}

.home-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}

.home-tool-card {
  padding: 0.85rem 1rem;
}

.home-tool-card h4 {
  margin: 0 0 0.35rem;
  font-size: 0.92rem;
  font-weight: 700;
}

html[data-theme="dark"] .home-lp-card {
  box-shadow: 0 4px 28px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .home-lp-card:hover {
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.45);
}

.portfolio-toolbar {
  margin-bottom: 1rem;
  padding: 1rem 1.25rem;
}

.portfolio-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.portfolio-min-input {
  width: 6rem;
}

.data-table--wide {
  font-size: 0.82rem;
}

.data-table--wide .portfolio-input {
  max-width: 5.5rem;
  padding: 0.35rem 0.45rem;
  font-size: 0.8rem;
}

.data-table--wide select.portfolio-input {
  max-width: 8rem;
}

.portfolio-add {
  margin-bottom: 1rem;
}

.portfolio-add-title {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.portfolio-add-hint {
  margin: 0 0 1rem;
}

.portfolio-add-grid {
  margin-bottom: 1rem;
}

.portfolio-add-err {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.data-table--wide .portfolio-input--text {
  max-width: none;
  width: 100%;
  min-width: 4rem;
  box-sizing: border-box;
}

.data-table--wide .portfolio-input--name {
  min-width: 11rem;
  font-weight: 600;
}

.data-table--wide .portfolio-input--addr {
  min-width: 12rem;
}

.data-table--wide .portfolio-input--st {
  max-width: 4.5rem;
}

.data-table--wide .portfolio-input--zip {
  max-width: 6.5rem;
}

.portfolio-new-status {
  width: 100%;
  max-width: 22rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-family: inherit;
  font-size: 0.9rem;
  background: var(--surface);
  color: var(--text);
}

.training-root {
  max-width: 900px;
}

.training-header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.65rem;
}

.training-kicker {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.training-h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.15rem;
  color: var(--text);
}

.training-h3 {
  margin: 0 0 0.65rem;
  font-size: 1rem;
}

.training-card {
  margin-bottom: 1.25rem;
}

.training-when {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
}

.training-prose {
  margin: 0.5rem 0;
}

.training-list {
  margin: 0.35rem 0 0.75rem;
  padding-left: 1.2rem;
}

.training-note {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.5rem 0;
}

.script-line {
  margin: 0.45rem 0;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.5;
}

.script-you {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
}

.script-caller {
  background: var(--surface-hover);
  border-left: 3px solid var(--border);
}

.script-line em {
  font-style: italic;
  color: var(--text);
}

.training-scenario {
  margin-bottom: 2rem;
}

.papers-checklist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.papers-checklist li {
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--border);
}

.papers-checklist li:last-child {
  border-bottom: none;
}

/* --- Login gate & app shell --- */
.login-gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, #0f172a 0%, #1e3a5f 45%, #0f172a 100%);
}

.login-gate[hidden] {
  display: none !important;
}

.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem 2rem 1.75rem;
  border-radius: 16px;
  background: var(--surface);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.login-brand {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.login-title {
  margin: 0 0 0.5rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.login-sub {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
}

.login-form .field {
  margin-bottom: 1rem;
}

.login-error {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 0.75rem;
}

.login-submit {
  margin-top: 0.25rem;
}

.login-foot {
  margin: 1.25rem 0 0;
  line-height: 1.45;
}

.app-shell[hidden] {
  display: none !important;
}

/* --- Topbar: zoom & theme --- */
.zoom-tools {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.icon-btn {
  width: 2.25rem;
  height: 2.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.icon-btn--theme {
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.icon-btn--theme .theme-svg {
  width: 1.15rem;
  height: 1.15rem;
  display: block;
}

/* --- Home: function strip (CRM-style) --- */
.fn-strip-label {
  margin: 0 0 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.fn-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.fn-tile {
  text-align: left;
  padding: 1.1rem 1.2rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.12s ease, box-shadow 0.15s, border-color 0.15s;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.fn-tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.fn-tile-title {
  display: block;
  font-weight: 700;
  font-size: 0.98rem;
  margin-bottom: 0.35rem;
}

.fn-tile-sub {
  display: block;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

.fn-leasing {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  color: var(--text);
  border-color: #93c5fd;
}

.fn-maint {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
  color: var(--text);
  border-color: #5eead4;
}

.fn-bill {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
  color: var(--text);
  border-color: #fcd34d;
}

html[data-theme="dark"] .fn-leasing {
  background: linear-gradient(135deg, #172554 0%, #1e3a8a 100%);
  border-color: #3b82f6;
}

html[data-theme="dark"] .fn-maint {
  background: linear-gradient(135deg, #042f2e 0%, #134e4a 100%);
  border-color: #14b8a6;
}

html[data-theme="dark"] .fn-bill {
  background: linear-gradient(135deg, #422006 0%, #78350f 100%);
  border-color: #f59e0b;
}

/* --- Workflow: side index + single pane --- */
.workflow-lead {
  margin-bottom: 1rem;
}

.workflow-split {
  display: grid;
  grid-template-columns: minmax(200px, 260px) 1fr;
  gap: 0;
  align-items: start;
  min-height: min(70vh, 720px);
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.workflow-rail {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0.85rem;
  background: var(--surface-hover);
  border-right: 1px solid var(--border);
  max-height: 75vh;
  overflow-y: auto;
}

.wf-tab {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
  line-height: 1.35;
}

.wf-tab:hover {
  background: rgba(15, 98, 254, 0.08);
}

.wf-tab.active {
  background: var(--surface);
  color: var(--accent);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.workflow-main {
  padding: 1.35rem 1.5rem 2rem;
  max-height: 75vh;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.wf-pane {
  display: none;
  animation: fade 0.2s ease;
}

.wf-pane.active {
  display: block;
}

.wf-pane h2 {
  margin-top: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.wf-pane h3 {
  font-size: 1rem;
  margin-top: 1.25rem;
}

.sop-doc-head {
  margin-bottom: 1rem;
}

.sop-doc-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  margin: 0 0 0.35rem;
}

.sop-doc-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.sop-doc-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.sop-table--dense td {
  font-size: 0.82rem;
}

.sop-list.compact li {
  margin-bottom: 0.35rem;
}

.sop-steps li {
  align-items: flex-start;
}

@media (max-width: 900px) {
  .workflow-split {
    grid-template-columns: 1fr;
  }

  .workflow-rail {
    flex-direction: row;
    flex-wrap: wrap;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .wf-tab {
    flex: 1 1 auto;
    min-width: 44%;
    text-align: center;
    font-size: 0.78rem;
  }

  .workflow-main {
    max-height: none;
  }
}

/* --- Inbound routing page --- */
.inline-code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--surface-hover);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.inbound-summary h3 {
  margin-top: 0;
}

.inbound-route-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .inbound-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .inbound-route-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.route-card {
  min-width: 0;
  overflow: hidden;
}

.route-card h3 {
  margin-top: 0;
}

.route-card--emergency {
  border-color: rgba(220, 38, 38, 0.35);
  background: rgba(220, 38, 38, 0.06);
}

.route-btn-row {
  margin-top: 0.75rem;
}

.route-email-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 10px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  max-width: 100%;
}

.route-email {
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  font-size: 0.88rem;
  word-break: break-all;
  padding: 0.35rem 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  color: var(--text);
  background: transparent;
}

.btn-copy-email {
  flex-shrink: 0;
}

.route-contact-name {
  margin: 0 0 0.25rem;
}

.inbound-inquiry-hint {
  margin-bottom: 0;
  margin-top: 0.75rem;
}

.link-jump {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.link-jump:hover {
  color: var(--accent-dim);
}

/* --- Working hours / HR roster (workinghour.html) --- */
.wh-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  box-sizing: border-box;
}

.wh-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wh-topbar-title h1 {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
}

.wh-sub {
  margin: 0;
}

.wh-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.wh-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
}

.wh-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.88rem;
}

.wh-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.wh-dot--cn {
  background: #22c55e;
}

.wh-dot--cn_hm {
  background: linear-gradient(135deg, #fbbf24 0%, #22c55e 100%);
}

.wh-dot--cn_ha {
  background: linear-gradient(135deg, #22c55e 0%, #a78bfa 100%);
}

.wh-dot--cd {
  background: #9333ea;
}

.wh-dot--hd {
  background: #eab308;
}

.wh-dot--nl {
  background: #ec4899;
}

.wh-dot--ho {
  background: #f97316;
}

.wh-dot--off {
  background: #94a3b8;
}

.wh-dot--np {
  background: #3b82f6;
}

.wh-dot--kp {
  background: #ef4444;
}

.wh-caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.5rem;
  max-width: 42rem;
}

.wh-card {
  margin-bottom: 1rem;
}

.wh-h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.wh-add-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}

.wh-backup-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.wh-backup-label {
  cursor: pointer;
  margin: 0;
}

.wh-hours-card {
  margin-bottom: 1rem;
}

.wh-hours-lede {
  margin: 0 0 0.65rem;
  line-height: 1.5;
}

.wh-hours-lede code {
  font-size: 0.82em;
}

.wh-hours-weekline {
  margin: 0 0 0.75rem;
  font-weight: 500;
  color: var(--text);
}

.wh-hours-caption {
  caption-side: top;
  text-align: left;
  padding: 0 0 0.5rem;
  max-width: 52rem;
}

.wh-hours-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.wh-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.wh-hours-table th,
.wh-hours-table td {
  border: 1px solid var(--border);
  padding: 0.4rem 0.45rem;
  text-align: center;
}

.wh-hours-table th:first-child,
.wh-hours-table td:first-child,
.wh-hours-table th:nth-child(2),
.wh-hours-table td:nth-child(2) {
  text-align: left;
}

.wh-hours-table thead th {
  background: var(--surface-hover);
  font-weight: 600;
}

.wh-hours-delta {
  font-weight: 700;
}

.wh-hours-delta--ok {
  color: #15803d;
}

.wh-hours-delta--low {
  color: #b45309;
}

.wh-hours-delta--high {
  color: #1d4ed8;
}

html[data-theme="dark"] .wh-hours-delta--ok {
  color: #86efac;
}

html[data-theme="dark"] .wh-hours-delta--low {
  color: #fdba74;
}

html[data-theme="dark"] .wh-hours-delta--high {
  color: #93c5fd;
}

.home-lp-card__hr-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.home-lp-card__hr-btn {
  font-weight: 600;
  text-align: center;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-2, #f8fafc);
}

.home-lp-card__hr-btn:hover {
  background: var(--surface, #fff);
  border-color: var(--accent, #0ea5e9);
}

@media (max-width: 520px) {
  .home-lp-card__hr-row {
    grid-template-columns: 1fr;
  }
}

.home-roster-today {
  margin-top: 1.25rem;
  padding: 1rem 1.15rem 1.1rem;
}

.home-roster-today__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
  margin-bottom: 0.75rem;
}

.home-roster-today__h {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.home-roster-today__date {
  margin: 0.2rem 0 0;
}

.home-roster-today__cta {
  flex-shrink: 0;
}

.home-roster-today__mount {
  min-height: 2.5rem;
}

.home-roster-today__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-roster-today__item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-2, #f8fafc);
}

.home-roster-today__avatar {
  flex-shrink: 0;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: var(--surface, #fff);
  border: 2px solid var(--border, #e2e8f0);
  color: var(--text, #0f172a);
}

.home-roster-today__meta {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.home-roster-today__name {
  font-weight: 600;
  font-size: 0.92rem;
}

.home-roster-today__note {
  display: block;
}

.home-roster-today__badge {
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
}

.wh-cloud-section {
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border, #e2e8f0);
  background: var(--surface-2, #f8fafc);
  border-left: none;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.wh-cloud-active__row--compact {
  margin-bottom: 0.5rem;
}

.wh-cloud-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.55rem 0.65rem;
  border-radius: 10px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
}

.btn-cloud-sync {
  font-weight: 600;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  border: 1px solid #0d9488;
  background: linear-gradient(180deg, #f0fdfa 0%, #ccfbf1 100%);
  color: #0f766e;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
}

.btn-cloud-sync:hover {
  border-color: #0f766e;
  color: #134e4a;
  background: linear-gradient(180deg, #ecfdf5 0%, #99f6e4 100%);
}

html[data-theme="dark"] .btn-cloud-sync {
  background: linear-gradient(180deg, #134e4a 0%, #115e59 100%);
  color: #ccfbf1;
  border-color: #2dd4bf;
}

html[data-theme="dark"] .btn-cloud-sync:hover {
  color: #f0fdfa;
  border-color: #5eead4;
}

html[data-theme="dark"] .wh-cloud-section {
  background: var(--surface-2, #1e293b);
  border-color: var(--border, #334155);
}

html[data-theme="dark"] .wh-cloud-toolbar {
  background: var(--surface, #0f172a);
}

.wh-cloud-setup-intro {
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.wh-cloud-setup-intro code {
  font-size: 0.82em;
}

.wh-cloud-form {
  display: grid;
  gap: 0.65rem;
  max-width: 44rem;
  margin-bottom: 0.75rem;
}

.wh-cloud-setup-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.wh-cloud-active {
  padding-top: 0.15rem;
}

.wh-cloud-active__row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  align-items: flex-start;
  margin-bottom: 0.35rem;
}

.wh-cloud-active__hint {
  margin: 0;
  flex: 1 1 220px;
  line-height: 1.45;
}

.wh-cloud-active__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.wh-cloud-banner__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  margin-bottom: 0.35rem;
}

.wh-cloud-banner__title {
  margin: 0;
  font-size: 1.02rem;
}

.wh-cloud-banner__hint {
  margin: 0 0 0.5rem;
  line-height: 1.45;
}

.wh-cloud-banner__hint code {
  font-size: 0.82em;
}

.wh-cloud-status {
  margin: 0;
}

.wh-cloud-status--ok {
  color: #15803d;
  font-weight: 600;
}

.wh-cloud-status--err {
  color: #b91c1c;
  font-weight: 600;
}

.wh-cloud-status--pending {
  color: #0369a1;
  font-weight: 600;
}

html[data-theme="dark"] .wh-cloud-status--ok {
  color: #86efac;
}

html[data-theme="dark"] .wh-cloud-status--err {
  color: #fca5a5;
}

html[data-theme="dark"] .wh-cloud-status--pending {
  color: #7dd3fc;
}

.wh-add-field {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.wh-month-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.wh-month-label {
  margin: 0;
  text-align: center;
  flex: 1 1 auto;
}

.wh-hint {
  margin: 0 0 0.75rem;
}

.wh-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.25rem;
  padding: 0 0.25rem 0.25rem;
}

.wh-table {
  border-collapse: separate;
  border-spacing: 0;
  width: max-content;
  min-width: 100%;
  font-size: 0.82rem;
}

.wh-table th,
.wh-table td {
  border: 1px solid var(--border);
  padding: 0.25rem;
  vertical-align: top;
  background: var(--surface);
}

.wh-table thead th {
  background: var(--surface-hover);
  text-align: center;
  font-weight: 600;
}

.wh-th-name {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 160px;
  max-width: 220px;
  text-align: left;
  box-shadow: 1px 0 0 var(--border);
}

.wh-th-sub {
  display: block;
  font-weight: 400;
  font-size: 0.72rem;
}

.wh-th-day {
  min-width: 5.75rem;
  max-width: 6.5rem;
}

.wh-th-day--weekend {
  background: rgba(59, 130, 246, 0.08);
}

.wh-day-num {
  display: block;
  font-size: 0.95rem;
}

.wh-day-wk {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  opacity: 0.85;
}

.wh-name-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  box-shadow: 1px 0 0 var(--border);
  background: var(--surface);
}

.wh-name-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.wh-name-input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.85rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.wh-del-emp {
  align-self: flex-start;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
}

.wh-td--weekend {
  background: rgba(59, 130, 246, 0.04);
}

.wh-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.wh-note {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.72rem;
  padding: 0.2rem 0.3rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
}

.wh-roster-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.wh-log-panel {
  margin-bottom: 1rem;
}

.wh-log-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.wh-log-h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.wh-log-desc {
  margin: 0 0 0.65rem;
  line-height: 1.45;
}

.wh-log-clear {
  font-size: 0.82rem;
  white-space: nowrap;
}

.wh-shift-log {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 15rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.wh-shift-log__item {
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.86rem;
}

.wh-shift-log__item:last-child {
  border-bottom: none;
}

.wh-shift-log__item--shift {
  border-left: 3px solid #16a34a;
  padding-left: 0.55rem;
}

.wh-shift-log__item--note {
  border-left: 3px solid #64748b;
  padding-left: 0.55rem;
}

.wh-shift-log__time {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}

.wh-shift-log__who {
  margin-left: 0.15rem;
}

.wh-shift-log__detail {
  margin-top: 0.3rem;
  word-break: break-word;
}

.wh-shift-log__detail--shift .wh-shift-log__from {
  font-weight: 600;
  color: var(--muted);
}

.wh-shift-log__detail--shift .wh-shift-log__to {
  font-weight: 800;
  color: var(--text);
}

.wh-roster-date {
  margin-bottom: 0;
}

.wh-roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.wh-roster-grid--5 {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.wh-roster-grid--6 {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.wh-roster-grid--8 {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.wh-roster-grid--11 {
  grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
}

.wh-roster-grid--9 {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.wh-roster-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  margin-left: 0.25rem;
  padding: 0.1rem 0.35rem;
  border-radius: 6px;
  background: rgba(22, 163, 74, 0.12);
  color: #166534;
  vertical-align: middle;
}

.wh-roster-h3--cd .wh-roster-tag {
  background: rgba(147, 51, 234, 0.14);
  color: #6d28d9;
}

html[data-theme="dark"] .wh-roster-h3--cn {
  color: #4ade80;
}

html[data-theme="dark"] .wh-roster-h3--cn_hm {
  color: #fde047;
}

html[data-theme="dark"] .wh-roster-h3--cn_ha {
  color: #ddd6fe;
}

html[data-theme="dark"] .wh-roster-h3--cd {
  color: #d8b4fe;
}

html[data-theme="dark"] .wh-roster-h3--hd {
  color: #fde047;
}

html[data-theme="dark"] .wh-roster-h3--nl {
  color: #f9a8d4;
}

html[data-theme="dark"] .wh-roster-h3--ho {
  color: #fdba74;
}

html[data-theme="dark"] .wh-roster-h3--np {
  color: #93c5fd;
}

html[data-theme="dark"] .wh-roster-h3--off {
  color: #cbd5e1;
}

html[data-theme="dark"] .wh-roster-h3--kp {
  color: #fca5a5;
}

html[data-theme="dark"] .wh-roster-tag {
  color: #86efac;
  background: rgba(74, 222, 128, 0.1);
}

html[data-theme="dark"] .wh-roster-h3--cd .wh-roster-tag {
  color: #e9d5ff;
  background: rgba(147, 51, 234, 0.2);
}

.wh-roster-h3 {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.wh-roster-h3--cn {
  color: #15803d;
}

.wh-roster-h3--cn_hm {
  color: #a16207;
}

.wh-roster-h3--cn_ha {
  color: #6d28d9;
}

.wh-roster-h3--cd {
  color: #6d28d9;
}

.wh-roster-h3--hd {
  color: #a16207;
}

.wh-roster-h3--nl {
  color: #be185d;
}

.wh-roster-h3--ho {
  color: #c2410c;
}

.wh-roster-h3--np {
  color: #1d4ed8;
}

.wh-roster-h3--off {
  color: #64748b;
}

.wh-roster-h3--kp {
  color: #b91c1c;
}

.wh-roster-h3--blank {
  color: var(--muted);
}

.wh-roster-list {
  margin: 0;
  padding-left: 1.1rem;
  min-height: 2rem;
}

.wh-roster-list li {
  margin-bottom: 0.35rem;
}

.wh-month-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}

.wh-month-pick {
  margin-bottom: 0;
  min-width: 11rem;
}

.wh-month-block {
  margin-bottom: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: visible;
}

.wh-month-block .wh-scroll {
  border-top: 1px solid var(--border);
  background: var(--surface);
  scrollbar-gutter: stable;
}

.wh-month-block-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-hover);
}

.wh-month-block-title {
  margin: 0;
  font-size: 1.05rem;
}

.wh-month-meta {
  flex: 1 1 100%;
  margin: 0;
  order: 3;
}

.wh-month-block-head .wh-hide-month {
  order: 2;
}

.wh-month-block-head .wh-month-block-title {
  order: 1;
}

.wh-hide-month {
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
}

.wh-table--compact {
  font-size: 0.72rem;
}

.wh-th-day--compact {
  min-width: 2.85rem;
  max-width: 3.1rem;
  padding: 0.2rem 0.1rem !important;
}

.wh-td--compact {
  padding: 2px !important;
  text-align: center;
  vertical-align: middle !important;
}

.wh-name-cell--compact {
  min-width: 7.5rem;
  max-width: 11rem;
}

.wh-name-wrap--compact {
  flex-direction: column;
  align-items: stretch;
  gap: 0.2rem;
}

.wh-name-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
}

.wh-name-row .wh-name-input {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.78rem;
  padding: 0.2rem 0.35rem;
}

.wh-shift-picker {
  position: fixed;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 12.5rem;
  padding: 0.4rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: 0 10px 40px rgba(15, 23, 42, 0.18);
}

.wh-shift-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.45rem 0.55rem;
  border: none;
  border-radius: 8px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface-hover);
  color: var(--text);
}

.wh-shift-opt:hover {
  filter: brightness(0.97);
}

.wh-shift-opt--empty {
  color: var(--muted);
  font-weight: 500;
}

.wh-shift-opt--cn {
  background: #bbf7d0;
  color: #14532d;
}

.wh-shift-opt--cn_hm {
  background: linear-gradient(135deg, #fef9c3 0%, #bbf7d0 55%, #86efac 100%);
  color: #3f6212;
}

.wh-shift-opt--cn_ha {
  background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 50%, #fef08a 100%);
  color: #4c1d95;
}

.wh-shift-opt--cd {
  background: #ede9fe;
  color: #5b21b6;
}

.wh-shift-opt--hd {
  background: #fef08a;
  color: #854d0e;
}

.wh-shift-opt--nl {
  background: #fce7f3;
  color: #9d174d;
}

.wh-shift-opt--ho {
  background: #ffedd5;
  color: #c2410c;
}

.wh-shift-opt--np {
  background: #dbeafe;
  color: #1e40af;
}

.wh-shift-opt--off {
  background: #e2e8f0;
  color: #475569;
}

.wh-shift-opt--kp {
  background: #fecaca;
  color: #991b1b;
}

html[data-theme="dark"] .wh-shift-picker {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
}

.wh-name-wrap--compact .wh-del-emp {
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
}

.wh-row-num {
  font-size: 0.7rem;
  color: var(--muted);
  width: 1.25rem;
  text-align: right;
  flex-shrink: 0;
}

.wh-cell-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.15rem;
  max-width: 3.1rem;
  margin: 0 auto;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.62rem;
  letter-spacing: -0.02em;
  padding: 0.1rem;
  color: #0f172a;
  box-sizing: border-box;
  line-height: 1.1;
}

.wh-cell-btn:hover {
  filter: brightness(0.97);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.wh-cell--empty {
  background: #e8ecf1;
  color: #94a3b8;
}

.wh-cell--cn {
  background: #bbf7d0;
  color: #14532d;
}

.wh-cell--cn_hm {
  background: linear-gradient(145deg, #ecfccb 0%, #fde047 45%, #bbf7d0 100%);
  color: #365314;
}

.wh-cell--cn_ha {
  background: linear-gradient(145deg, #e0e7ff 0%, #c4b5fd 40%, #fef08a 85%);
  color: #4c1d95;
}

.wh-cell--cd {
  background: #ede9fe;
  color: #5b21b6;
}

.wh-cell--hd {
  background: #fef08a;
  color: #854d0e;
}

.wh-cell--nl {
  background: #fce7f3;
  color: #9d174d;
}

.wh-cell--ho {
  background: #ffedd5;
  color: #c2410c;
}

.wh-cell--np {
  background: #dbeafe;
  color: #1e40af;
}

.wh-cell--off {
  background: #e2e8f0;
  color: #475569;
}

.wh-cell--kp {
  background: #fecaca;
  color: #991b1b;
}

.wh-cell--hasnote {
  box-shadow: inset 0 -3px 0 rgba(15, 23, 42, 0.35);
}

/* DS(HM) / DS(HA) — nửa ☀ + nửa ★ ghép (HM: mặt trời trước; HA: sao trước) */
.wh-ds-hx {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.05rem;
  line-height: 1;
  width: 100%;
  min-height: 1.65rem;
}

.wh-ds-hx__pair {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wh-ds-hx__half {
  display: block;
  flex: 0 0 0.48em;
  width: 0.48em;
  overflow: hidden;
  font-size: 0.74rem;
  line-height: 1;
}

.wh-ds-hx__half--sunL {
  color: #d97706;
  text-align: left;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.55);
}

.wh-ds-hx__half--sunR {
  color: #d97706;
  text-align: right;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.55);
}

.wh-ds-hx__half--starL {
  color: #7c3aed;
  text-align: left;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.45);
}

.wh-ds-hx__half--starR {
  color: #7c3aed;
  text-align: right;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.45);
}

.wh-ds-hx__lbl {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.wh-ds-hx__a {
  line-height: 1;
}

.wh-ds-hx__b {
  line-height: 1;
  opacity: 0.92;
  font-size: 0.5rem;
}

html[data-theme="dark"] .wh-ds-hx__half--sunL,
html[data-theme="dark"] .wh-ds-hx__half--sunR {
  color: #fcd34d;
}

html[data-theme="dark"] .wh-ds-hx__half--starL,
html[data-theme="dark"] .wh-ds-hx__half--starR {
  color: #c4b5fd;
}

.wh-summary-dual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0 0.25rem;
}

@media (max-width: 720px) {
  .wh-summary-dual {
    grid-template-columns: 1fr;
  }
}

.wh-summary-box {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 0.85rem;
  background: var(--surface);
}

.wh-summary--in {
  border-left: 4px solid #16a34a;
}

.wh-summary--out {
  border-left: 4px solid #64748b;
}

.wh-summary-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.wh-roster-list--tall {
  min-height: 3.5rem;
  max-height: 22rem;
  overflow-y: auto;
}

.wh-detail-title {
  margin: 1.25rem 0 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted);
}

html[data-theme="dark"] .wh-cell--empty {
  background: #1e293b;
  color: #64748b;
}

html[data-theme="dark"] .wh-cell--cn {
  background: rgba(34, 197, 94, 0.32);
  color: #bbf7d0;
}

html[data-theme="dark"] .wh-cell--cn_hm {
  background: rgba(250, 204, 21, 0.28);
  color: #ecfccb;
}

html[data-theme="dark"] .wh-cell--cn_ha {
  background: rgba(167, 139, 250, 0.32);
  color: #ede9fe;
}

html[data-theme="dark"] .wh-cell--cd {
  background: rgba(147, 51, 234, 0.35);
  color: #ede9fe;
}

html[data-theme="dark"] .wh-cell--hd {
  background: rgba(234, 179, 8, 0.35);
  color: #fef08a;
}

html[data-theme="dark"] .wh-cell--nl {
  background: rgba(236, 72, 153, 0.32);
  color: #fce7f3;
}

html[data-theme="dark"] .wh-cell--ho {
  background: rgba(249, 115, 22, 0.32);
  color: #ffedd5;
}

html[data-theme="dark"] .wh-cell--np {
  background: rgba(59, 130, 246, 0.35);
  color: #dbeafe;
}

html[data-theme="dark"] .wh-cell--off {
  background: rgba(148, 163, 184, 0.35);
  color: #e2e8f0;
}

html[data-theme="dark"] .wh-cell--kp {
  background: rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

html[data-theme="dark"] .wh-cell-btn {
  color: #f8fafc;
}

/* --- Báo cáo trong ngày (bảng STT / tên / chức danh / ca) --- */
.wh-daily-card {
  margin-top: 0.75rem;
  border-width: 2px;
  border-color: rgba(22, 163, 74, 0.35);
}

.wh-daily-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.wh-daily-team-field {
  flex: 1 1 220px;
  margin-bottom: 0;
}

.wh-daily-sheet {
  padding: 0.25rem 0.15rem 0.5rem;
}

.wh-daily-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.wh-daily-date {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 500;
}

.wh-daily-sort-hint {
  margin: -0.35rem auto 0.9rem;
  text-align: center;
  max-width: 36rem;
  line-height: 1.45;
}

.wh-daily-scroll {
  overflow-x: auto;
}

.wh-daily-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.wh-daily-table th,
.wh-daily-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.55rem 0.5rem;
  text-align: left;
  vertical-align: middle;
}

.wh-daily-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: var(--surface-hover);
}

.wh-daily-name {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.wh-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  color: #0f172a;
}

.wh-daily-stt {
  width: 2.75rem;
  text-align: center;
  font-weight: 700;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  vertical-align: middle;
}

.wh-daily-ca {
  min-width: 7.5rem;
  vertical-align: middle;
}

.wh-daily-section td {
  padding: 0.45rem 0.55rem 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-hover);
  border-bottom: 1px solid var(--border);
  border-top: 1px solid var(--border);
}

.wh-daily-section--work td {
  color: #166534;
  background: rgba(22, 163, 74, 0.08);
  border-left: 4px solid #16a34a;
}

.wh-daily-section--pending td {
  color: #64748b;
  background: rgba(100, 116, 139, 0.08);
  border-left: 4px solid #94a3b8;
}

.wh-daily-section--away td {
  color: #86198f;
  background: rgba(192, 38, 211, 0.06);
  border-left: 4px solid #a855f7;
}

.wh-daily-row td {
  vertical-align: middle;
}

.wh-daily-row--cn .wh-avatar {
  background: linear-gradient(145deg, #bbf7d0, #86efac);
  color: #14532d;
}

.wh-daily-row--cn_hm .wh-avatar {
  background: linear-gradient(145deg, #fef9c3, #86efac);
  color: #713f12;
}

.wh-daily-row--cn_ha .wh-avatar {
  background: linear-gradient(145deg, #ddd6fe, #fde047);
  color: #4c1d95;
}

.wh-daily-row--cd .wh-avatar {
  background: linear-gradient(145deg, #ede9fe, #c4b5fd);
  color: #5b21b6;
}

.wh-daily-row--hd .wh-avatar {
  background: linear-gradient(145deg, #fef08a, #fde047);
  color: #854d0e;
}

.wh-daily-row--nl .wh-avatar {
  background: linear-gradient(145deg, #fce7f3, #f9a8d4);
  color: #9d174d;
}

.wh-daily-row--ho .wh-avatar {
  background: linear-gradient(145deg, #ffedd5, #fdba74);
  color: #c2410c;
}

.wh-daily-row--np .wh-avatar {
  background: linear-gradient(145deg, #dbeafe, #93c5fd);
  color: #1e40af;
}

.wh-daily-row--off .wh-avatar {
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  color: #475569;
}

.wh-daily-row--kp .wh-avatar {
  background: linear-gradient(145deg, #fecaca, #f87171);
  color: #7f1d1d;
}

.wh-daily-row--blank .wh-avatar {
  background: linear-gradient(145deg, #e2e8f0, #cbd5e1);
  color: #475569;
}

.wh-daily-table tbody tr.wh-daily-section:hover {
  background: transparent;
}

.wh-daily-table tbody tr.wh-daily-row:hover {
  background: var(--surface-hover);
}

.wh-daily-badges {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
}

.wh-badge {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.wh-badge-hint {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
}

.wh-badge--cn {
  background: #bbf7d0;
  color: #14532d;
}

.wh-badge--cn_hm {
  background: linear-gradient(135deg, #fef9c3, #bbf7d0);
  color: #365314;
}

.wh-badge--cn_ha {
  background: linear-gradient(135deg, #e0e7ff, #fef08a);
  color: #4c1d95;
}

.wh-badge--cd {
  background: #ede9fe;
  color: #5b21b6;
}

.wh-badge--hd {
  background: #fef08a;
  color: #854d0e;
}

.wh-badge--nl {
  background: #fce7f3;
  color: #9d174d;
}

.wh-badge--ho {
  background: #ffedd5;
  color: #c2410c;
}

.wh-badge--np {
  background: #dbeafe;
  color: #1e40af;
}

.wh-badge--off {
  background: #e2e8f0;
  color: #475569;
}

.wh-badge--kp {
  background: #fecaca;
  color: #991b1b;
}

.wh-badge--blank {
  background: #e2e8f0;
  color: #64748b;
}

.wh-daily-cell-note {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.wh-daily-foot {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
}

html[data-theme="dark"] .wh-daily-section td {
  border-color: var(--border);
}

html[data-theme="dark"] .wh-daily-section--work td {
  color: #86efac;
  background: rgba(22, 163, 74, 0.14);
  border-left-color: #22c55e;
}

html[data-theme="dark"] .wh-daily-section--pending td {
  color: #cbd5e1;
  background: rgba(71, 85, 105, 0.25);
  border-left-color: #94a3b8;
}

html[data-theme="dark"] .wh-daily-section--away td {
  color: #f5d0fe;
  background: rgba(168, 85, 247, 0.12);
  border-left-color: #c084fc;
}

@media print {
  #login-gate {
    display: none !important;
  }

  .wh-page > header,
  .wh-page > .wh-legend,
  .wh-page > section.card:not(.wh-roster-card) {
    display: none !important;
  }

  .wh-roster-card > *:not(.wh-daily-print-root) {
    display: none !important;
  }

  .wh-daily-print-root {
    display: block !important;
    break-inside: avoid;
    margin: 0 !important;
    padding: 0.25rem !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
    color: #0f172a !important;
  }

  .wh-daily-print-root .wh-daily-title,
  .wh-daily-print-root .wh-daily-date,
  .wh-daily-print-root .wh-daily-table,
  .wh-daily-print-root .wh-daily-foot {
    color: #0f172a !important;
  }

  .wh-daily-print-root .wh-badge--cn {
    background: #bbf7d0 !important;
    color: #14532d !important;
  }

  .wh-daily-print-root .wh-badge--cn_hm {
    background: linear-gradient(135deg, #fef9c3, #bbf7d0) !important;
    color: #365314 !important;
  }

  .wh-daily-print-root .wh-badge--cn_ha {
    background: linear-gradient(135deg, #e0e7ff, #fef08a) !important;
    color: #4c1d95 !important;
  }

  .wh-daily-print-root .wh-badge--cd {
    background: #ede9fe !important;
    color: #5b21b6 !important;
  }

  .wh-daily-print-root .wh-badge--hd {
    background: #fef08a !important;
    color: #854d0e !important;
  }

  .wh-daily-print-root .wh-badge--nl {
    background: #fce7f3 !important;
    color: #9d174d !important;
  }

  .wh-daily-print-root .wh-badge--ho {
    background: #ffedd5 !important;
    color: #c2410c !important;
  }

  .wh-daily-print-root .wh-badge--np {
    background: #dbeafe !important;
    color: #1e40af !important;
  }

  .wh-daily-print-root .wh-badge--off {
    background: #e2e8f0 !important;
    color: #475569 !important;
  }

  .wh-daily-print-root .wh-badge--kp {
    background: #fecaca !important;
    color: #991b1b !important;
  }

  .wh-daily-print-root .wh-daily-table th {
    background: #f1f5f9 !important;
    color: #475569 !important;
  }

  .wh-daily-print-root .wh-daily-table th,
  .wh-daily-print-root .wh-daily-table td {
    border-color: #cbd5e1 !important;
  }

  .wh-daily-print-root .wh-daily-section td {
    background: #f1f5f9 !important;
    color: #475569 !important;
    border-left-width: 4px !important;
  }

  .wh-daily-print-root .wh-daily-section--work td {
    background: #ecfdf5 !important;
    color: #166534 !important;
    border-left-color: #16a34a !important;
  }

  .wh-daily-print-root .wh-daily-section--pending td {
    background: #f8fafc !important;
    color: #64748b !important;
    border-left-color: #94a3b8 !important;
  }

  .wh-daily-print-root .wh-daily-section--away td {
    background: #faf5ff !important;
    color: #86198f !important;
    border-left-color: #a855f7 !important;
  }
}

/* Cài đặt lịch — form giờ & bảng màu/nhãn */
.wh-set-hours-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 1rem;
  margin-bottom: 1rem;
}

.wh-set-table-scroll {
  overflow-x: auto;
  margin-bottom: 0.75rem;
}

.wh-set-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.wh-set-table th,
.wh-set-table td {
  border: 1px solid var(--border, #e2e8f0);
  padding: 0.35rem 0.45rem;
  vertical-align: middle;
}

.wh-set-table th {
  text-align: left;
  background: var(--surface-2, #f1f5f9);
  font-weight: 600;
}

.wh-set-code {
  font-size: 0.78rem;
}

.wh-set-input {
  width: 100%;
  min-width: 0;
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
}

.wh-set-bg,
.wh-set-dot {
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
}

.wh-set-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.wh-hr-dash-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
  padding: 0.5rem 0 0.85rem;
  margin-bottom: 0.25rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: 0.88rem;
}

.wh-hr-dash-nav__link {
  color: var(--accent, #2563eb);
  text-decoration: none;
  font-weight: 600;
}

.wh-hr-dash-nav__link:hover {
  text-decoration: underline;
}

.wh-set-preset-row td {
  background: var(--surface-2, #f8fafc);
}

.wh-set-preset-cell {
  padding: 0.5rem 0.45rem !important;
}

.wh-set-palette-btn {
  font-size: 0.82rem;
  padding: 0.2rem 0.55rem;
}

.wh-set-pick-wrap {
  white-space: nowrap;
}

.wh-set-cpick {
  width: 1.85rem;
  height: 1.75rem;
  padding: 0;
  margin: 0 0.2rem 0 0;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 6px;
  cursor: pointer;
  vertical-align: middle;
  background: transparent;
}

.wh-set-cpick:last-child {
  margin-right: 0;
}

.home-lp-card__btn-row {
  margin-top: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-lp-card__btn-row .home-lp-card__btn {
  margin-top: 0;
}

.wh-hr-lead {
  margin: 0 0 0.75rem;
  max-width: 52rem;
}

.wh-set-preview-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  margin-bottom: 0.75rem;
  border-radius: 10px;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
}

.wh-set-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text, #0f172a);
}

.wh-set-strip-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.12);
}

.wh-set-maincolor {
  width: 2.5rem;
  height: 2rem;
  padding: 0;
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 8px;
  cursor: pointer;
  vertical-align: middle;
}

.wh-set-grad-lbl {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted, #64748b);
  cursor: pointer;
  user-select: none;
}

.wh-set-preview-pill {
  display: inline-flex;
  min-width: 2.25rem;
  padding: 0.2rem 0.45rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  border: 1px solid rgba(15, 23, 42, 0.12);
  vertical-align: middle;
}

.wh-set-mpi-hint {
  font-size: 0.72rem;
}

.wh-set-mpilike {
  width: 100%;
  max-width: 16rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.35rem;
}

.wh-h3 {
  margin: 1.25rem 0 0.4rem;
  font-size: 1rem;
  font-weight: 700;
}

.wh-staff-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.65rem;
}

.wh-staff-emp-table {
  margin-bottom: 0.25rem;
}

.wh-staff-csv-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.wh-staff-cloud-block {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border, #e2e8f0);
}

.wh-cloud-danger {
  margin-top: 0.65rem;
}

.wh-cloud-danger summary {
  cursor: pointer;
}

.wh-name-stack {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.wh-name-read {
  font-weight: 600;
}

.wh-emp-code {
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  background: var(--surface-2, #f1f5f9);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.wh-name-hr-link {
  font-size: 0.72rem;
  white-space: nowrap;
}

.wh-name-row--readonly {
  align-items: flex-start;
}

/* HR — Work Shift and Setting modal */
.wh-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
}
.wh-modal[hidden] {
  display: none !important;
}
.wh-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}
.wh-modal__panel {
  position: relative;
  z-index: 1;
  width: min(56rem, 100%);
  max-height: calc(100vh - 3rem);
  overflow: auto;
  background: var(--surface, #fff);
  border-radius: 12px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border, #e2e8f0);
  padding: 1rem 1.25rem 1.25rem;
}
.wh-modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.wh-modal__title {
  margin: 0;
}
.wh-modal__close {
  flex-shrink: 0;
}
body.wh-modal-open {
  overflow: hidden;
}
.wh-hr-settings-landing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
