@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --bg: #FBFAF7;
  --panel: #FFFFFF;
  --ink: #1F2937;
  --ink-soft: #4B5563;
  --accent: #1D4ED8;
  --accent-ink: #1E3A8A;
  --accent-bg: #EFF6FF;
  --alert: #B45309;
  --alert-bg: #FFFBEB;
  --border: #ECE9E2;
  --border-strong: #D6D3CC;
  --radius: 20px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}

.mono {
  font-family: 'IBM Plex Mono', 'Courier New', monospace;
  font-size: 0.92em;
}

.page-header { margin-bottom: 28px; }
.page-header h1 { margin: 0 0 4px 0; font-size: 24px; font-weight: 700; }
.page-sub { margin: 0; color: var(--ink-soft); font-size: 14px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 24px;
  margin-bottom: 20px;
}

.panel h2 {
  margin: 0 0 16px 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-table { width: 100%; border-collapse: collapse; }
.status-table td {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.status-table tr:last-child td { border-bottom: none; }
.status-table td:last-child { text-align: right; width: 140px; }

.status {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.status-live { background: #E6EEEC; color: var(--accent-ink); }
.status-pending { background: #EFEEEA; color: var(--ink-soft); }

/* ---- Search forms (recordings / faxes / audit log) ---- */

.search-form {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.search-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
}

.search-field input,
.search-field select {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

.search-field input:focus,
.search-field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76,122,115,0.15);
}

.search-submit button {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.search-submit button:hover { background: var(--accent-ink); }

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.results-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 8px 12px 8px 0;
  border-bottom: 1px solid var(--border);
}

.results-table td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.results-table audio {
  height: 32px;
  max-width: 220px;
}

.pill {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #EFEEEA;
  color: var(--ink-soft);
}

.pill-in { background: #E6EEEC; color: var(--accent-ink); }
.pill-out { background: var(--alert-bg); color: var(--alert); }

.empty-state {
  color: var(--ink-soft);
  font-size: 14px;
  padding: 12px 0;
}

/* ---- Fax send form ---- */

.fax-compose {
  padding: 28px 28px 32px;
}

.fax-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 680px;
}

.fax-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 1fr;
  gap: 16px;
}

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

.fax-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fax-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
}

.field-hint {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

.fax-field input[type="text"],
.fax-field input[type="date"],
.fax-field textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  resize: vertical;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.fax-field input:focus,
.fax-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76,122,115,0.15);
}

.fax-field input::placeholder,
.fax-field textarea::placeholder {
  color: #9AA6AD;
}

/* Custom select: hide native chrome, draw our own chevron so it matches
   across browsers/OSes instead of falling back to whatever the platform draws. */
.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 9px;
  height: 9px;
  border-right: 1.6px solid var(--ink-soft);
  border-bottom: 1.6px solid var(--ink-soft);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 34px 10px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

.select-wrap select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76,122,115,0.15);
}

/* Custom file picker: the native control renders inconsistently and looks
   dated, so the real <input type=file> is visually hidden and this styled
   label acts as the control; the label's `for` keeps it keyboard/click accessible. */
.file-drop-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.file-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  background: #FBFAF8;
  transition: border-color 120ms ease, background 120ms ease;
}

.file-drop:hover {
  border-color: var(--accent);
  background: #F5F9F8;
}

.file-drop:has(.file-drop-input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.file-drop-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-drop-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.file-drop-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-drop-sub {
  font-size: 12px;
  color: var(--ink-soft);
}

.file-drop--chosen {
  border-style: solid;
  border-color: var(--accent);
  background: #F5F9F8;
}

.file-drop--chosen .file-drop-icon {
  background: var(--accent-ink);
}

.fax-submit {
  align-self: flex-start;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 11px 24px;
  font-size: 14.5px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 4px;
  transition: background 120ms ease, transform 80ms ease;
}

.fax-submit:hover { background: var(--accent-ink); }
.fax-submit:active { transform: translateY(1px); }

/* ---- Login screen (unauthenticated) ---- */

.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F1EC;
  padding: 24px;
}

.login-panel {
  background: var(--panel);
  border-radius: 6px;
  padding: 40px 36px;
  width: 100%;
  max-width: 360px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

.login-mark {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 500;
  font-size: 13px;
  background: var(--accent);
  color: #fff;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  margin-bottom: 20px;
}

.login-panel h1 {
  font-size: 19px;
  margin: 0 0 6px 0;
}

.login-sub {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin: 0 0 24px 0;
}

.login-form { display: flex; flex-direction: column; gap: 6px; }

.login-form label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-top: 10px;
}

.login-form input {
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  color: var(--ink);
}

.login-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76,122,115,0.15);
}

.login-form button {
  margin-top: 20px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 11px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
}

.login-form button:hover { background: var(--accent-ink); }

.alert {
  background: var(--alert-bg);
  color: var(--alert);
  border: 1px solid rgba(181,86,31,0.25);
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 4px;
}

/* ---- Microsoft sign-in (login screen) ---- */

.ms-signin-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.ms-signin-btn:hover { background: var(--bg); border-color: var(--ink-soft); }

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--ink-soft);
  font-size: 12px;
  margin: 18px 0;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.login-divider span { padding: 0 10px; }

/* ---- Inline text-link buttons (e.g. Manage Staff row actions) ---- */

.link-button {
  background: none;
  border: none;
  color: var(--accent-ink);
  font-family: inherit;
  font-size: 0.85em;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.link-button:hover { color: var(--alert); }

/* Accessibility: visible focus ring app-wide */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

.report-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  white-space: pre-wrap;
  background: #FAF9F6;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  margin: 0 0 8px;
}

/* ==== Design C: top navigation, warm and friendly ==== */
body { font-size: 15px; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }

.topbar { background: #FFFFFF; border-bottom: 1px solid var(--border); position: relative; z-index: 5; }
.topbar-inner { max-width: 1160px; margin: 0 auto; padding: 12px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 24px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 34px; height: 34px; border-radius: 999px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.brand-name { font-weight: 700; font-size: 16px; }
.nav { display: flex; flex-wrap: wrap; gap: 2px; }
.nav a { padding: 9px 14px; border-radius: 999px; color: #374151; text-decoration: none; font-size: 15px; }
.nav a:hover { background: #F5F4F0; color: var(--ink); }
.nav a.active { background: var(--accent-bg); color: var(--accent-ink); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.client-switch { display: flex; align-items: center; gap: 8px; }
.client-switch label { font-size: 13px; color: var(--ink-soft); }
.client-switch select { border: 1px solid var(--border-strong); border-radius: 999px; padding: 8px 14px; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }
.client-name { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.user-menu { position: relative; }
.user-menu summary { list-style: none; cursor: pointer; }
.user-menu summary::-webkit-details-marker { display: none; }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: #F0EEE8; color: var(--ink); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.user-menu-panel { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(31,41,55,0.12); padding: 14px 16px; min-width: 200px; display: flex; flex-direction: column; gap: 8px; }
.user-menu-panel a { font-size: 14px; text-decoration: none; }
.who-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.who-role { font-size: 12px; color: var(--ink-soft); margin-bottom: 4px; }

.content { max-width: 1160px; margin: 0 auto; padding: 32px; box-sizing: border-box; }
.page-header h1 { font-size: 28px; letter-spacing: -0.01em; }
.page-sub { font-size: 15px; }

.panel { border: 1px solid var(--border); border-radius: var(--radius); padding: 24px 28px; }
.panel h2 { text-transform: none; letter-spacing: 0; font-size: 18px; font-weight: 700; color: var(--ink); margin: 0; }
.panel > h2 { margin-bottom: 14px; }
.panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 14px; }
.panel-hint { font-size: 13px; color: var(--ink-soft); }

.search-field input, .search-field select, .fax-field input[type="text"], .fax-field input[type="date"], .fax-field textarea,
.select-wrap select, .login-form input { border-radius: 12px; border-color: var(--border-strong); }
.search-field label, .fax-field label { color: var(--ink-soft); }
.search-submit button, .fax-submit, .login-form button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 999px; padding: 11px 20px;
  font: inherit; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; display: inline-block; }
.search-submit button:hover, .fax-submit:hover, .login-form button:hover, .btn:hover { background: var(--accent-ink); color: #fff; }
.btn-small { padding: 8px 16px; font-size: 14px; }

.results-table th { font-size: 12px; color: var(--ink-soft); border-bottom-color: var(--border); padding: 10px 14px 10px 0; }
.results-table td { border-bottom-color: #F3F1EC; padding: 12px 14px 12px 0; }
.table-scroll { overflow-x: auto; }
.pill { font-size: 12px; padding: 4px 10px; background: #F5F5F4; color: #44403C; }
.pill-in { background: var(--accent-bg); color: var(--accent-ink); }
.pill-out { background: var(--alert-bg); color: #92400E; }
.status { border-radius: 999px; padding: 3px 10px; }
.alert { border-radius: 12px; background: var(--alert-bg); color: #92400E; border-color: #FDE68A; }
.link-button { color: var(--accent); }
.report-text { border-radius: 14px; border-color: var(--border); }
.file-drop { border-radius: 14px; }
.login-panel { border-radius: var(--radius); }
.login-mark { border-radius: 999px; background: var(--accent); }

.strong { font-weight: 600; }
.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }

/* Dashboard */
.hero { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 24px; }
.hero-text { max-width: 720px; }
.hero-kicker { margin: 0 0 6px; color: var(--ink-soft); font-size: 15px; }
.hero h1 { margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: -0.01em; }
.segmented { display: flex; gap: 4px; background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.segmented a { padding: 8px 16px; border-radius: 999px; text-decoration: none; color: #374151; font-size: 14px; }
.segmented a.on { background: var(--ink); color: #fff; font-weight: 600; }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; margin-bottom: 20px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: flex; align-items: center; gap: 16px; }
.tile-warn { background: var(--alert-bg); border-color: #FDE68A; }
.tile-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex: none; }
.tile-blue { background: var(--accent-bg); color: var(--accent); }
.tile-green { background: #ECFDF5; color: #047857; }
.tile-grey { background: #F5F5F4; color: #57534E; }
.tile-amber { background: #FEF3C7; color: #B45309; }
.tile-num { margin: 0; font-size: 28px; font-weight: 700; line-height: 1.1; }
.tile-label { margin: 2px 0 0; font-size: 14px; color: var(--ink-soft); }
.tile-warn .tile-label { color: #92400E; }
.two-col { display: flex; flex-wrap: wrap; gap: 20px; }
.two-col > .panel { margin-bottom: 20px; }
.col-wide { flex: 3 1 440px; min-width: 0; }
.col-narrow { flex: 2 1 300px; min-width: 0; }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--ink-soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.sw-blue, .bar-blue { background: var(--accent); }
.sw-amber, .bar-amber { background: #F59E0B; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 220px; padding-top: 10px; overflow-x: auto; }
.bar-col { flex: 1 1 0; min-width: 22px; display: flex; flex-direction: column; justify-content: flex-end; align-items: stretch; gap: 2px; height: 100%; }
.bar { border-radius: 5px; }
.bar-label { text-align: center; font-size: 11px; color: var(--ink-soft); margin-top: 6px; }
.group-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.group-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.meter { height: 8px; border-radius: 999px; background: #F0EEE8; margin: 6px 0 4px; overflow: hidden; }
.meter > div { height: 8px; border-radius: 999px; background: var(--accent); }
.tick-button { width: 36px; height: 36px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: #fff; color: var(--accent); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.tick-button:hover { background: var(--accent-bg); border-color: var(--accent); }
.foot-note { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; }

/* Authenticator setup */
.setup-steps { text-align: left; padding-left: 20px; margin: 0 0 16px; font-size: 14px; color: var(--ink); display: flex; flex-direction: column; gap: 10px; }
.qr-box { margin: 10px 0; display: flex; justify-content: center; }
.setup-key { background: #F5F4F0; border-radius: 10px; padding: 8px 10px; margin-top: 6px; word-break: break-all; text-align: center; }
.login-foot { font-size: 13px; color: var(--ink-soft); margin: 16px 0 0; }

@media (max-width: 720px) {
  .topbar-inner, .content { padding-left: 16px; padding-right: 16px; }
  .topbar-right { margin-left: 0; width: 100%; justify-content: space-between; }
  .hero h1 { font-size: 24px; }
}
.table-scroll .results-table { min-width: 560px; }
@media (max-width: 720px) { .panel { padding: 20px 18px; } }
.backlog-form { margin-top: 12px; text-align: right; }

/* ==== Admin pages (design C) ==== */
.back-link { display: inline-block; font-size: 14px; text-decoration: none; margin-bottom: 10px; }
.page-header-row { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; }
.pill-lg { font-size: 13px; padding: 6px 14px; }
.notice { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; border-radius: 12px; padding: 10px 14px; margin-bottom: 20px; font-size: 14px; }
.alert-block { margin-bottom: 20px; }
.right { text-align: right; }
.link-danger { color: #B91C1C; }
.link-danger:hover { color: #7F1D1D; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field-label { font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.field input[type="text"], .field input[type="email"], .field input[type="number"], .field input[type="password"], .field select, .field textarea,
.search-field input, .search-field select, .client-card-new input {
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px;
  color: var(--ink); background: #fff; width: 100%; box-sizing: border-box; min-height: 44px; }
.field input:focus, .field select:focus, .field textarea:focus, .client-card-new input:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(29,78,216,0.15); }
.input-suffix { display: flex; align-items: center; gap: 10px; }
.input-suffix input { max-width: 140px; }
.input-suffix span { color: var(--ink-soft); font-size: 14px; }

.switch-list { display: flex; flex-direction: column; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid #F3F1EC; cursor: pointer; }
.switch-list .switch-row:first-child { border-top: 0; padding-top: 4px; }
.switch-text { display: flex; flex-direction: column; gap: 2px; }
.switch-inline { border-top: 0; padding: 0; gap: 12px; }
.switch-field { border-top: 0; padding: 0; align-self: end; min-height: 44px; }
.switch { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 26px; border-radius: 999px; background: #D6D3CC; position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(20px); }
.switch:focus-visible { outline: 3px solid rgba(29,78,216,0.35); outline-offset: 2px; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: -4px 0 24px; padding: 16px 28px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); }
.form-actions-end { justify-content: flex-end; background: transparent; border: 0; padding: 18px 0 0; margin: 0; }

.add-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 18px; margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border-strong); }
.add-row .field { flex: 1 1 200px; }
.chip-checks { display: flex; gap: 8px; min-height: 44px; align-items: center; }
.chip-check { position: relative; cursor: pointer; }
.chip-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-check span { display: inline-block; padding: 10px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 14px; color: #374151; background: #fff; }
.chip-check input:checked + span { background: var(--accent-bg); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.chip-check input:focus-visible + span { outline: 3px solid rgba(29,78,216,0.35); outline-offset: 2px; }

.client-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--ink); }
a.client-card:hover { border-color: var(--accent); box-shadow: 0 6px 20px rgba(29,78,216,0.08); color: var(--ink); }
.client-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 16px; }
.client-card-features { display: flex; flex-wrap: wrap; gap: 6px; }
.client-card-new { border-style: dashed; background: transparent; }
.results-table select { border: 1px solid var(--border-strong); border-radius: 10px; padding: 6px 8px; font: inherit; font-size: 14px; background: #fff; }
.btn-ghost { display: inline-block; list-style: none; cursor: pointer; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--border-strong); font-size: 14px; color: var(--ink); background: #fff; }
.btn-ghost::-webkit-details-marker { display: none; }
.row-menu { position: relative; display: inline-block; text-align: left; }
.row-menu[open] .btn-ghost { background: var(--accent-bg); border-color: var(--accent); }
.row-menu-panel { position: absolute; right: 0; top: 44px; z-index: 10; width: 300px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 10px 30px rgba(31,41,55,0.12); padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.row-menu-form { display: flex; flex-direction: column; gap: 6px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 1px solid #F3F1EC; }
.row-menu-inline { display: flex; gap: 8px; }
.row-menu-inline input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 14px; }
.menu-item { width: 100%; text-align: left; background: none; border: 0; padding: 9px 8px; border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); cursor: pointer; }
.menu-item:hover { background: #F5F4F0; }
.menu-danger { color: #B91C1C; }
.table-wrap-menus { overflow: visible; }
.status { font-family: inherit; font-size: 12px; font-weight: 600; }
@media (max-width: 720px) { .table-wrap-menus { overflow-x: auto; padding-bottom: 260px; margin-bottom: -260px; } }
.brand-logo { width: auto; height: 32px; display: block; }
.login-logo { width: auto; height: 48px; display: block; margin-bottom: 18px; }

/* Call log */
.row-actions { display: flex; gap: 10px; align-items: center; }
.log-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.log-filters .field { flex: 0 1 220px; }
.log-filters .btn-ghost { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.log-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 4px 16px; color: var(--ink-soft); font-size: 15px; }
.log-summary strong { color: var(--ink); font-size: 18px; }
.row-missed td { background: #FFFBEB; }
.print-only { display: none; }
@media print {
  .topbar, .no-print, .user-menu { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; }
  .content { padding: 0; max-width: none; }
  .panel { border: 0; padding: 0; }
  .results-table td, .results-table th { padding: 6px 10px 6px 0; font-size: 12px; }
  .row-missed td { background: none; }
  .pill { background: none !important; padding: 0; }
}
.field input[type="date"] { border: 1px solid var(--border-strong); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; color: var(--ink); background: #fff; width: 100%; box-sizing: border-box; min-height: 44px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); margin-top: 4px; }
.check-line input { width: 16px; height: 16px; accent-color: var(--accent); }
