:root {
  color-scheme: light;
  --navy: #082b68;
  --navy-deep: #061d49;
  --navy-mid: #123f82;
  --blue: #129bd4;
  --blue-soft: #eaf7fd;
  --gold: #f0b819;
  --gold-deep: #d99c08;
  --gold-soft: #fff7df;
  --ink: #17243a;
  --muted: #66758d;
  --line: #dce5f0;
  --surface: #ffffff;
  --page: #f3f6fb;
  --green: #16834a;
  --red: #b42332;
  font-family: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--page); }
body { margin: 0; background: var(--page); color: var(--ink); font-size: 14px; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled, select:disabled { opacity: .62; cursor: wait; }
.hidden { display: none !important; }

.page-shell { width: min(1700px, 100%); margin: 0 auto; padding: 30px; }
.login-layout {
  min-height: calc(100vh - 60px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  align-items: stretch;
  gap: clamp(26px, 4vw, 58px);
}

/* Brand panel */
.brand-panel {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(30px, 5vw, 66px);
  border: 1px solid rgba(240, 184, 25, .36);
  border-radius: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 12%, rgba(18, 155, 212, .23), transparent 31%),
    radial-gradient(circle at 7% 92%, rgba(240, 184, 25, .14), transparent 30%),
    linear-gradient(145deg, var(--navy-deep), var(--navy) 58%, #10447f);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: 0 24px 60px rgba(8, 43, 104, .15);
}
.brand-panel::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 370px;
  height: 370px;
  right: -175px;
  bottom: -195px;
  border: 1px solid rgba(240, 184, 25, .27);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(240, 184, 25, .035), 0 0 0 62px rgba(18, 155, 212, .04);
}
.brand-logo-card {
  width: min(100%, 570px);
  padding: 14px 18px;
  border: 2px solid rgba(240, 184, 25, .9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(0, 0, 0, .17);
}
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.brand-panel .eyebrow { margin: 30px 0 0; color: var(--gold); }
.brand-panel h1 { max-width: 650px; margin: 13px 0 12px; font-size: clamp(35px, 4.2vw, 56px); line-height: 1.07; letter-spacing: -.035em; }
.brand-copy { max-width: 510px; margin: 0; color: #dce8f8; font-size: 15px; line-height: 1.8; }
.brand-accent-line { width: 96px; height: 5px; margin-top: 29px; border-radius: 20px; background: linear-gradient(90deg, var(--gold), #f8d96e); }
.eyebrow { margin: 0; color: var(--muted); font-size: 10px; font-weight: 850; letter-spacing: .17em; }

/* Login */
.login-card, .content-card, .summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 34px rgba(8, 43, 104, .06);
}
.login-card { position: relative; overflow: hidden; padding: 40px; border-top: 5px solid var(--gold); display:flex; flex-direction: column; justify-content: center;align-self: stretch;}
.login-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, transparent 50%, rgba(240, 184, 25, .12) 50%);
  pointer-events: none;
}
.login-card h2 { margin: 9px 0 7px; color: var(--navy); font-size: 31px; letter-spacing: -.03em; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-card label, .field label { display: block; margin: 19px 0 7px; color: #34445c; font-size: 13px; font-weight: 750; }
.login-card input, .field input, .field select, .field textarea, .toolbar input, .toolbar select {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid #cbd7e6;
  border-radius: 10px;
  outline: none;
  background-color: #fff;
  color: var(--ink);
  font-size: 14px;
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue) !important; box-shadow: 0 0 0 3px rgba(18, 155, 212, .14); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 17px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .01em;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary {
  color: var(--navy-deep);
  background: linear-gradient(135deg, #f6c83f, var(--gold));
  border-color: #e4ad13;
  box-shadow: 0 5px 13px rgba(217, 156, 8, .22), inset 0 1px 0 rgba(255,255,255,.42);
}
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #ffda69, #f0b819); box-shadow: 0 8px 18px rgba(217, 156, 8, .28); transform: translateY(-1px); }
.button-outline {
  color: var(--navy);
  background: #fff;
  border-color: #c5d2e3;
  box-shadow: 0 2px 5px rgba(8, 43, 104, .04);
}
.button-outline:hover:not(:disabled) { color: var(--navy-deep); background: var(--blue-soft); border-color: #8ecbe6; transform: translateY(-1px); }
.button-full { width: 100%; min-height: 49px; margin-top: 23px; font-size: 14px; }
.form-message { min-height: 18px; color: var(--red); font-size: 13px; }

/* Dashboard header */
.dashboard { display: grid; gap: 20px; }
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 21px;
  border: 1px solid rgba(240, 184, 25, .36);
  border-radius: 19px;
  background: linear-gradient(110deg, var(--navy-deep), var(--navy) 72%, #10447f);
  box-shadow: 0 13px 30px rgba(8, 43, 104, .13);
}
.brand-inline, .account-actions { display: flex; align-items: center; gap: 14px; }
.topbar-logo-card { width: 176px; flex: 0 0 176px; padding: 7px 9px; border-radius: 10px; background: #fff; border: 1px solid rgba(240, 184, 25, .83); }
.topbar-logo { display: block; width: 100%; height: auto; }
.topbar-title { padding-left: 16px; border-left: 1px solid rgba(255,255,255,.25); }
.topbar-title .eyebrow { color: var(--gold); }
.brand-inline h1 { margin: 5px 0 0; color: #fff; font-size: 24px; letter-spacing: -.025em; }
.signed-in { color: #e2eaf6; font-size: 13px; white-space: nowrap; }
.signed-in strong { color: var(--gold); }
.topbar .button-outline { color: #fff; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.38); }
.topbar .button-outline:hover { color: var(--navy); background: var(--gold); border-color: var(--gold); }

/* Summary cards */
.summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.summary-card { position: relative; overflow: hidden; padding: 20px 23px; display: grid; gap: 7px; border-top: 4px solid var(--gold); }
.summary-card:nth-child(2) { border-top-color: var(--blue); }
.summary-card:nth-child(3) { border-top-color: var(--navy); }
.summary-card span { color: var(--muted); font-size: 13px; font-weight: 700; }
.summary-card strong { color: var(--navy); font-size: 30px; line-height: 1.1; }

/* Records panel and toolbar */
.content-card { padding: 25px; min-width: 0; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.section-heading .eyebrow { color: var(--gold-deep); }
.section-heading h2 { margin: 5px 0; color: var(--navy); font-size: 25px; letter-spacing: -.02em; }
.section-heading .muted { margin: 4px 0 0; }
.toolbar { display: flex; align-items: center; gap: 11px; margin: 22px 0 15px; }
.toolbar input { flex: 1; min-width: 240px; }
.toolbar select { width: 225px; }
.toolbar input::placeholder { color: #8693a6; }
.notice { min-height: 20px; margin: 5px 0 10px; color: var(--navy-mid); font-size: 13px; font-weight: 600; }

/* Data table */
.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid #d5dfec;
  border-radius: 13px;
  background: #fff;
  box-shadow: 0 3px 10px rgba(8, 43, 104, .035);
  scrollbar-color: #b9c8dc #f1f5fa;
  scrollbar-width: thin;
}
table { width: 100%; min-width: 1780px; border-collapse: separate; border-spacing: 0; table-layout: fixed; }
th, td {
  padding: 13px 14px;
  border-bottom: 1px solid #e6ecf4;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
  font-size: 13px;
}
th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-top: 14px;
  padding-bottom: 14px;
  background: #eaf1fa;
  color: var(--navy);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .075em;
  text-transform: uppercase;
  white-space: nowrap;
  border-bottom: 2px solid #cbd8e9;
}
tbody tr { background: #fff; transition: background-color .12s ease; }
tbody tr:nth-child(even) { background: #f7faff; }
tbody tr:hover { background: #eaf5fc; }
tbody tr:last-child td { border-bottom: 0; }

/* High-contrast table text for comfortable reading */
tbody td {
  color: #1b2a41;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}
td.cell-date {
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}
td.cell-name {
  color: #082b68;
  font-size: 14px;
  font-weight: 800;
}
td.cell-email {
  color: #075985;
  font-size: 13.5px;
  font-weight: 600;
}
td.cell-mobile {
  color: #1e293b;
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
td.cell-destination {
  color: #0b3269;
  font-size: 13.5px;
  font-weight: 750;
}
td.cell-qualification,
td.cell-course,
td.cell-intake,
td.cell-budget {
  color: #26364d;
  font-size: 13.5px;
  font-weight: 550;
}
td.cell-message {
  color: #26364d;
  font-size: 13.5px;
  font-weight: 500;
}
td.cell-consent { white-space: nowrap; }
th:nth-child(1), td:nth-child(1) { width: 145px; }
th:nth-child(2), td:nth-child(2) { width: 155px; }
th:nth-child(3), td:nth-child(3) { width: 190px; }
th:nth-child(4), td:nth-child(4) { width: 125px; }
th:nth-child(5), td:nth-child(5) { width: 130px; }
th:nth-child(6), td:nth-child(6) { width: 165px; }
th:nth-child(7), td:nth-child(7) { width: 185px; }
th:nth-child(8), td:nth-child(8) { width: 125px; }
th:nth-child(9), td:nth-child(9) { width: 115px; }
th:nth-child(10), td:nth-child(10) { width: 220px; }
th:nth-child(11), td:nth-child(11) { width: 95px; }
th:nth-child(12), td:nth-child(12) { width: 125px; }
th:nth-child(13), td:nth-child(13) { width: 125px; }
th:nth-child(14), td:nth-child(14) { width: 145px; }
.table-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; padding: 4px 9px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pill-yes { color: #075b39; background: #e5f5ed; }
.pill-no { color: #334155; background: #e8edf4; border: 1px solid #cbd5e1; }
.empty-cell { padding: 45px 20px; color: #334155; text-align: center; font-size: 14px; font-weight: 600; }
.table-footer { display: flex; justify-content: space-between; gap: 12px; padding-top: 13px; color: var(--muted); font-size: 12px; }

/* Yes / No dropdowns */
.status-cell { white-space: nowrap; }
.status-select {
  appearance: none;
  min-width: 88px;
  min-height: 34px;
  padding: 6px 28px 6px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: right 9px center;
  background-size: 11px;
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.status-select.status-yes {
  color: #073c73;
  background-color: #fff3c7;
  border-color: #f0d47a;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%23082b68' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.status-select.status-no {
  color: #53637a;
  background-color: #f0f3f7;
  border-color: #d8e0ea;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='m2 4 4 4 4-4' fill='none' stroke='%2353637a' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.status-select:hover:not(:disabled) { border-color: var(--blue); }
.status-select:focus-visible { box-shadow: 0 0 0 3px rgba(18,155,212,.16); }
.status-select:disabled { opacity: .55; cursor: wait; }

/* Row actions */
.row-actions { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 11px;
  border: 1px solid #c5d3e5;
  border-radius: 8px;
  background: linear-gradient(#fff, #f7faff);
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 4px rgba(8,43,104,.045);
  transition: .15s ease;
}
.small-button:hover { background: var(--blue-soft); border-color: #8fc9e4; transform: translateY(-1px); }
.small-button.delete { color: #a41e2b; border-color: #efc3c8; background: #fff9f9; }
.small-button.delete:hover { background: #ffedef; border-color: #e9aab2; }

/* Add / edit dialog */
.record-dialog { width: min(720px, calc(100% - 28px)); max-width: 720px; padding: 0; border: 1px solid rgba(240,184,25,.48); border-radius: 18px; box-shadow: 0 26px 85px rgba(15,23,42,.28); }
.record-dialog::backdrop { background: rgba(6,29,73,.62); backdrop-filter: blur(3px); }
.record-dialog form { padding: 26px; }
.dialog-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.dialog-heading .eyebrow { color: var(--gold-deep); }
.dialog-heading h2 { margin: 5px 0 0; color: var(--navy); font-size: 23px; }
.icon-button { width: 36px; height: 36px; border: 1px solid #e0e7f0; border-radius: 9px; background: #f8fafd; color: var(--muted); font-size: 24px; line-height: 1; }
.icon-button:hover { color: var(--navy); background: var(--blue-soft); border-color: #b9d9e9; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.field label { margin-top: 13px; }
.field-wide { grid-column: 1 / -1; }
.field textarea { resize: vertical; min-height: 96px; }
.small-note { font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 17px; }

@media (max-width: 1050px) {
  .login-layout { grid-template-columns: minmax(0, 1fr) 390px; gap: 22px; }
  .login-card { padding: 30px; }
  .brand-panel { padding: 36px; }
  .topbar-logo-card { width: 150px; flex-basis: 150px; }
}
@media (max-width: 850px) {
  .page-shell { padding: 16px; }
  .login-layout { min-height: auto; padding: 20px 0; grid-template-columns: 1fr; }
  .brand-panel { min-height: 0; padding: 30px; }
  .brand-logo-card { width: min(100%, 500px); }
  .login-card { width: min(100%, 560px); justify-self: center; }
}
@media (max-width: 650px) {
  .page-shell { padding: 10px; }
  .login-card, .content-card { padding: 18px; }
  .brand-panel { padding: 21px; border-radius: 19px; }
  .brand-panel h1 { font-size: 34px; }
  .brand-copy { font-size: 13px; }
  .brand-logo-card { padding: 8px; }
  .topbar, .section-heading { align-items: flex-start; flex-direction: column; }
  .topbar { padding: 14px; }
  .brand-inline { width: 100%; flex-wrap: wrap; }
  .topbar-logo-card { width: 140px; flex-basis: 140px; }
  .topbar-title { padding-left: 11px; }
  .brand-inline h1 { font-size: 20px; }
  .account-actions { width: 100%; justify-content: space-between; }
  .summary-grid { gap: 8px; }
  .summary-card { padding: 13px; }
  .summary-card strong { font-size: 23px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar input, .toolbar select { width: 100%; min-width: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .table-footer { flex-direction: column; gap: 5px; }
  .record-dialog form { padding: 19px; }
}


/* Pagination: show up to 50 enquiry rows per page */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
  padding: 14px 15px;
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: linear-gradient(110deg, #f7faff 0%, #fffdf6 100%);
}
.pagination-note {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}
.pagination-button {
  min-width: 108px;
  justify-content: center;
}
.pagination-button:disabled {
  opacity: .42;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}
.page-indicator {
  min-width: 92px;
  color: #082b68;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 650px) {
  .pagination { align-items: stretch; }
  .pagination-controls { width: 100%; justify-content: space-between; gap: 7px; }
  .pagination-button { min-width: 0; padding-inline: 11px; }
  .page-indicator { min-width: 76px; }
}

/* Print column selection and consent checkbox */
.print-options {
  margin: 12px 0 16px;
  padding: 16px;
  border: 1px solid #cbd7e6;
  border-radius: 12px;
  background: #f8fbff;
}
.print-options-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; color: var(--navy); }
.print-options-heading > div { display: flex; gap: 8px; }
.print-column-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 9px 14px; margin-bottom: 14px; }
.print-column-choice { display: flex; align-items: center; gap: 8px; color: var(--ink); font-size: 13px; }
.print-column-choice input, .consent-checkbox-label input { width: 17px; height: 17px; accent-color: var(--navy); }
.consent-checkbox-label { display: flex !important; align-items: center; gap: 10px; min-height: 46px; margin: 19px 0 7px !important; cursor: pointer; }
.consent-checkbox-label input { flex: 0 0 auto; }
@media (max-width: 700px) {
  .print-options-heading { align-items: flex-start; flex-direction: column; }
}

/* =====================================
   MOBILE RESPONSIVENESS IMPROVEMENTS
   ===================================== */

@media (max-width: 650px) {

  /* Dashboard summary cards */
  .summary-grid {
    grid-template-columns: 1fr;
  }

  /* Dashboard header */
  .brand-inline {
    align-items: center;
  }

  .signed-in {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Section heading and Add button */
  .section-heading {
    width: 100%;
  }

  .section-heading > button {
    width: 100%;
  }

  /* Toolbar buttons */
  .toolbar {
    width: 100%;
  }

  .toolbar button {
    width: 100%;
  }

  /* Enquiry table */
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Add/Edit enquiry dialog */
  .record-dialog {
    width: calc(100% - 20px);
    max-height: 90dvh;
    overflow-y: auto;
    margin: auto;
  }

  .record-dialog form {
    padding: 16px;
  }

  /* Consent text */
  .consent-checkbox-label {
    align-items: flex-start;
    line-height: 1.6;
  }

  .consent-checkbox-label input {
    margin-top: 3px;
  }

  /* Print controls */
  .print-column-choices {
    grid-template-columns: 1fr;
  }

  /* Dialog action buttons */
  .dialog-actions button {
    min-height: 44px;
  }
}

/* Very small mobile screens */
@media (max-width: 380px) {

  .brand-panel h1 {
    font-size: 28px;
  }

  .topbar-logo-card {
    width: 115px;
    flex-basis: 115px;
  }

  .brand-inline h1 {
    font-size: 17px;
  }

  .summary-card {
    padding: 12px;
  }

  .pagination-controls {
    gap: 5px;
  }
}

/* Professional role-aware dashboard shell */
#dashboardView.dashboard { width: 100%; max-width: 1700px; margin: 0 auto; padding: 18px; display: grid; grid-template-columns: 248px minmax(0, 1fr); gap: 22px; align-items: start; }
#dashboardView.dashboard.hidden { display: none !important; }
.app-sidebar { position: sticky; top: 18px; min-height: calc(100vh - 36px); display: flex; flex-direction: column; padding: 18px 14px 14px; border-radius: 20px; color: #fff; background: linear-gradient(165deg, var(--navy-deep), var(--navy) 70%, #10447f); box-shadow: 0 16px 40px rgba(8,43,104,.15); z-index: 30; }
.sidebar-brand { display:flex; align-items:center; justify-content:center; padding: 12px 10px; margin-bottom: 18px; border-radius: 12px; background:#fff; }
.sidebar-brand img { display:block; width:100%; max-width:185px; height:52px; object-fit:contain; }
.sidebar-profile { display:flex; flex-direction:column; align-items:flex-start; gap:5px; padding: 13px 12px 17px; margin-bottom: 12px; border-bottom:1px solid rgba(255,255,255,.15); }
.sidebar-role-label,.nav-section-label { color:rgba(255,255,255,.62); font-size:10px; font-weight:800; letter-spacing:1.2px; }
.sidebar-profile strong { font-size:15px; overflow-wrap:anywhere; }
.role-chip,.top-role-chip { display:inline-flex; align-items:center; width:max-content; padding:4px 8px; border-radius:20px; color:var(--navy-deep); background:var(--gold); font-size:9px; font-weight:800; letter-spacing:.45px; }
.sidebar-nav { display:flex; flex-direction:column; gap:5px; }
.nav-item { display:flex; align-items:center; gap:12px; width:100%; padding:11px 12px; border:0; border-radius:10px; color:rgba(255,255,255,.84); background:transparent; text-align:left; font-weight:600; transition:background .18s ease,color .18s ease; }
.nav-item:hover { color:#fff; background:rgba(255,255,255,.10); }
.nav-item.active { color:var(--navy-deep); background:#fff; box-shadow:0 5px 14px rgba(0,0,0,.10); }
.nav-icon { display:inline-flex; width:20px; justify-content:center; font-size:19px; line-height:1; }
.nav-section-label { padding:18px 12px 5px; }
.sidebar-bottom { display:flex; align-items:center; gap:8px; margin-top:auto; padding:18px 10px 4px; color:rgba(255,255,255,.68); font-size:11px; }
.sidebar-secure-dot { width:7px; height:7px; border-radius:50%; background:#49d18b; box-shadow:0 0 0 4px rgba(73,209,139,.12); }
.dashboard-main { min-width:0; }
.dashboard-main .topbar { margin-bottom:20px; padding:13px 17px; border:1px solid var(--line); border-radius:16px; background:var(--surface); box-shadow:0 5px 18px rgba(18,43,78,.045); }
.sidebar-toggle { display:none; width:40px; height:40px; border:1px solid var(--line); border-radius:10px; color:var(--navy); background:#fff; font-size:19px; }
.workspace-panel { min-width:0; }
.page-intro { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:5px 2px 20px; }
.page-intro h2 { margin:2px 0 4px; color:var(--navy); font-size:25px; letter-spacing:-.5px; }
.page-intro .eyebrow { margin:0; }
.page-intro .muted { margin:0; }
.welcome-pill { padding:8px 12px; border:1px solid rgba(240,184,25,.45); border-radius:30px; color:var(--navy); background:var(--gold-soft); font-size:12px; font-weight:700; white-space:nowrap; }
.workspace-panel .summary-grid { margin:0 0 18px; }
.overview-note { padding:24px; }
.overview-note h3 { margin:4px 0 8px; color:var(--navy); font-size:18px; }
.overview-note p { max-width:720px; }
.overview-note .button { margin-top:8px; }
.coming-soon { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:260px; padding:30px; text-align:center; }
.coming-soon > span { display:grid; place-items:center; width:58px; height:58px; border-radius:16px; color:var(--navy); background:var(--blue-soft); font-size:30px; }
.coming-soon h3 { margin:16px 0 5px; color:var(--navy); }
.coming-soon p { max-width:520px; margin:0; color:var(--muted); }
.top-role-chip { margin-right:7px; vertical-align:middle; }
@media (max-width: 900px) {
  #dashboardView.dashboard { grid-template-columns: 220px minmax(0,1fr); gap:14px; padding:14px; }
  .dashboard-main .topbar { flex-wrap:wrap; }
  .brand-inline { min-width:0; }
}
@media (max-width: 700px) {
  #dashboardView.dashboard { display:block; padding:10px; }
  .app-sidebar { position:fixed; top:10px; bottom:10px; left:10px; width:min(285px, calc(100vw - 48px)); min-height:0; height:auto; transform:translateX(calc(-100% - 20px)); transition:transform .22s ease; box-shadow:0 18px 50px rgba(0,0,0,.25); }
  .app-sidebar.sidebar-open { transform:translateX(0); }
  .sidebar-toggle { display:inline-grid; place-items:center; flex:0 0 40px; }
  .dashboard-main .topbar { gap:10px; padding:10px; }
  .dashboard-main .brand-inline { flex:1; }
  .dashboard-main .topbar-logo-card { width:92px; flex-basis:92px; }
  .dashboard-main .topbar-title h1 { font-size:18px; }
  .dashboard-main .account-actions { width:100%; justify-content:space-between; }
  .page-intro { align-items:flex-start; }
  .page-intro h2 { font-size:22px; }
  .welcome-pill { display:none; }
}
@media (max-width: 420px) {
  #dashboardView.dashboard { padding:7px; }
  .dashboard-main .topbar-logo-card { display:none; }
  .dashboard-main .topbar-title h1 { font-size:17px; }
  .signed-in { font-size:12px; }
  .workspace-panel .summary-grid { grid-template-columns:1fr; }
}


/* Dashboard polish: full-window layout, clear top bar and visible logout */
#dashboardView.dashboard {
  width: 100%;
  max-width: 1920px;
  min-height: 100vh;
  margin: 0 auto;
  padding: clamp(16px, 2vw, 30px);
  grid-template-columns: 270px minmax(0, 1fr);
  gap: clamp(18px, 1.6vw, 28px);
}

.dashboard-main {
  min-height: calc(100vh - 2 * clamp(16px, 2vw, 30px));
  display: flex;
  flex-direction: column;
}

.dashboard-main .topbar {
  background: linear-gradient(105deg, var(--navy-deep), var(--navy) 72%, #10447f);
  border: 1px solid rgba(240, 184, 25, .55);
  box-shadow: 0 10px 26px rgba(8, 43, 104, .13);
}

.dashboard-main .topbar-title {
  border-left-color: rgba(255, 255, 255, .25);
}

.dashboard-main .topbar-title h1 {
  color: #fff;
}

.dashboard-main .topbar .signed-in {
  color: #eaf0fb;
}

.dashboard-main .topbar .button-outline {
  color: var(--navy-deep);
  background: var(--gold);
  border: 1px solid var(--gold);
  font-weight: 800;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .12);
}

.dashboard-main .topbar .button-outline:hover:not(:disabled) {
  color: var(--navy-deep);
  background: #ffd65a;
  border-color: #ffd65a;
  transform: translateY(-1px);
}

.workspace-panel {
  flex: 1 0 auto;
}

@media (min-width: 1500px) {
  #dashboardView.dashboard {
    max-width: 100%;
    grid-template-columns: 290px minmax(0, 1fr);
  }
  .page-intro h2 { font-size: 28px; }
  .summary-card { padding: 24px 27px; }
}

@media (max-width: 900px) {
  #dashboardView.dashboard {
    min-height: 100vh;
    grid-template-columns: 220px minmax(0, 1fr);
    padding: 14px;
  }
}

@media (max-width: 700px) {
  #dashboardView.dashboard { padding: 10px; }
  .dashboard-main { min-height: calc(100vh - 20px); }
  .dashboard-main .topbar {
    background: linear-gradient(105deg, var(--navy-deep), var(--navy));
  }
  .dashboard-main .account-actions { align-items: center; }
  .dashboard-main .topbar .button-outline { min-height: 42px; padding: 9px 16px; }
}

/* Activity log workspace */
.activity-filters{display:flex;align-items:end;flex-wrap:wrap;gap:12px;margin:18px 0;padding:16px;background:#f3f6fb;border:1px solid #e3eaf4;border-radius:12px}
.activity-filters>input{flex:1 1 240px;min-width:200px}
.activity-filters>select{min-width:150px}
.activity-filters label{display:grid;gap:5px;color:#53627a;font-size:12px;font-weight:600}
.activity-filters label input{min-width:145px}
.activity-table{min-width:1120px}
.activity-table td{vertical-align:top;max-width:260px;overflow-wrap:anywhere}
.activity-value{font-size:12px;color:#53627a;white-space:pre-wrap}
.activity-action-tag{display:inline-block;padding:5px 9px;border-radius:20px;background:#eaf1fb;color:#082b68;font-size:11px;font-weight:700;white-space:nowrap}
@media(max-width:650px){.activity-filters{align-items:stretch}.activity-filters>*{width:100%;min-width:0}.activity-filters label input{width:100%}.activity-table{min-width:1050px}}

.undo-reason{margin-top:6px;font-size:12px;color:#64748b}.undo-action-button{padding:8px 14px;min-width:76px}.undo-action-button:disabled{opacity:.65;cursor:wait}

/* Manage Admins */
.admin-management-table { min-width: 760px; }
.admin-management-table td { vertical-align: middle; }
.admin-status { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.admin-status.is-active { color: #087443; background: #e6f6ed; }
.admin-status.is-inactive { color: #9b3030; background: #fdecec; }
.admin-role-select { min-width: 145px; padding: 9px 11px; border: 1px solid var(--border, #d8e1ef); border-radius: 9px; background: #fff; color: var(--navy, #092653); font: inherit; }
.admin-toggle-button { white-space: nowrap; }
.admin-you-label { display: inline-block; margin-left: 5px; padding: 3px 7px; border-radius: 999px; color: #234d84; background: #eaf1fb; font-size: 10px; font-weight: 700; }
.admin-management-note { margin-top: 14px; color: var(--muted); font-size: 13px; }
.admin-role-select:disabled, .admin-toggle-button:disabled { opacity: .55; cursor: not-allowed; }

/* Corporate dashboard refinement — full-width workspace with horizontal navigation */
#dashboardView.dashboard {
  display: flex;
  flex-direction: column;
  width: 100%; max-width: 100%; min-height: 100vh;
  padding: 18px clamp(16px, 2.2vw, 36px);
  gap: 14px;
}
.app-sidebar {
  position: relative; top: auto; min-height: 0; width: 100%;
  flex-direction: row; align-items: center; gap: 16px;
  padding: 10px 14px; border-radius: 14px;
}
.sidebar-brand { display: none; }
.sidebar-profile { flex: 0 0 auto; padding: 5px 14px 5px 2px; margin: 0; border: 0; border-right: 1px solid rgba(255,255,255,.18); }
.sidebar-profile strong { font-size: 13px; }
.sidebar-role-label { font-size: 9px; }
.sidebar-nav { flex: 1; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 5px; }
.nav-item { width: auto; padding: 9px 11px; gap: 7px; font-size: 12px; white-space: nowrap; }
.nav-icon { width: auto; font-size: 16px; }
.nav-section-label { display: none; }
.sidebar-bottom { margin: 0 0 0 auto; padding: 0 4px; white-space: nowrap; }
.dashboard-main { width: 100%; min-height: 0; }
.dashboard-main .topbar {
  position: sticky; top: 0; z-index: 25;
  margin: 0 0 22px; border-radius: 0 0 14px 14px;
  padding: 13px 20px; backdrop-filter: blur(12px);
}
.dashboard-main .topbar-logo-card { width: 150px; flex-basis: 150px; }
.page-intro { margin-top: 4px; }
.content-card, .summary-card { border-radius: 14px; box-shadow: 0 5px 20px rgba(8,43,104,.045); }
.content-card { padding: 24px; }
.summary-card { padding: 22px 24px; }
.summary-card span { font-size: 13px; color: #52627a; }
.summary-card strong { font-size: 32px; }
th { font-size: 11px; letter-spacing: .055em; color: #173866; background: #edf2f8; }
tbody td { font-size: 13.5px; color: #26364b; }
.overview-insights { display: grid; grid-template-columns: minmax(280px, .85fr) minmax(0, 1.5fr); gap: 16px; }
.insight-card { min-width: 0; }
.insight-heading { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom: 18px; }
.insight-heading h3 { margin: 4px 0 0; color: var(--navy); font-size: 18px; }
.status-chart { display:grid; gap:19px; padding: 8px 0; }
.chart-row { display:grid; gap:8px; }
.chart-meta { display:flex; align-items:center; justify-content:space-between; gap:10px; color:#46566d; font-size:13px; }
.chart-meta strong { color:#1b2e49; font-size:12px; font-variant-numeric:tabular-nums; }
.chart-track { height:10px; overflow:hidden; border-radius:20px; background:#edf1f6; }
.chart-track span { display:block; height:100%; border-radius:20px; transition:width .25s ease; }
.recent-table-wrap { width:100%; overflow-x:auto; }
.recent-table { min-width:560px; table-layout:auto; }
.recent-table th { position:static; }
.recent-table th, .recent-table td { width:auto; padding:11px 12px; font-size:12px; }
.recent-table td:first-child { color:var(--navy); font-weight:750; }
.recent-status { display:inline-block; width:7px; height:7px; margin:0 7px 1px 0; border-radius:50%; background:#d99c08; }
.recent-status.accepted { background:#16834a; }
.recent-status.contacted { background:#2457a6; }
.recent-status.pending { background:#d99c08; }
@media (max-width: 900px) {
  #dashboardView.dashboard { padding:12px; }
  .app-sidebar { align-items:flex-start; flex-wrap:wrap; }
  .sidebar-profile { border-right:0; border-bottom:1px solid rgba(255,255,255,.18); padding-bottom:8px; }
  .sidebar-bottom { display:none; }
  .overview-insights { grid-template-columns:1fr; }
}
@media (max-width: 700px) {
  #dashboardView.dashboard { display:flex; padding:8px; }
  .app-sidebar { position:relative; inset:auto; width:100%; height:auto; min-height:0; transform:none; box-shadow:none; }
  .app-sidebar.sidebar-open { transform:none; }
  .sidebar-toggle { display:none; }
  .sidebar-nav { display:flex; }
  .nav-item { flex:1 1 auto; justify-content:center; }
  .dashboard-main .topbar { position:sticky; top:0; flex-wrap:wrap; border-radius:0 0 12px 12px; }
  .dashboard-main .topbar-logo-card { display:block; width:100px; flex-basis:100px; }
  .dashboard-main .account-actions { width:auto; }
  .content-card { padding:16px; }
  .page-intro h2 { font-size:22px; }
}

/* Keep account identity and navigation together inside the sticky top bar. */
.dashboard-main .topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  background: linear-gradient(110deg, #082b68 0%, #10447f 100%);
  border-color: rgba(8,43,104,.16);
}
.dashboard-main .topbar .topbar-title h1 { color: #fff; }
.dashboard-main .topbar .topbar-title .eyebrow { color: #f0b819; }
.topbar-navigation {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 0 100%;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.2);
}
.topbar-navigation .sidebar-profile {
  display: flex;
  flex: 0 0 auto;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  padding: 0 14px 0 0;
  margin: 0;
  border: 0;
  border-right: 1px solid rgba(255,255,255,.22);
}
.topbar-navigation .sidebar-role-label { color: rgba(255,255,255,.7); }
.topbar-navigation .sidebar-profile strong { color: #fff; }
.topbar-navigation .sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.topbar-navigation .nav-item { color: rgba(255,255,255,.9); background: transparent; }
.topbar-navigation .nav-item:hover,
.topbar-navigation .nav-item.active { color: #082b68; background: #f0b819; }
.topbar-navigation .nav-icon { color: inherit; }
.topbar-navigation .nav-section-label { display: none; }
@media (max-width: 900px) {
  .topbar-navigation { align-items: flex-start; flex-direction: column; }
  .topbar-navigation .sidebar-profile { border: 0; padding: 0; }
}
@media (max-width: 700px) {
  .dashboard-main .topbar { position: sticky; top: 0; }
  .topbar-navigation .sidebar-nav { width: 100%; }
  .topbar-navigation .nav-item { flex: 1 1 auto; justify-content: center; }
}


/* Final dashboard refinement: single account identity and clearer status metrics */
.topbar-navigation .sidebar-profile { display: none !important; }
.nav-icon { width: 19px; height: 19px; flex: 0 0 19px; display: inline-flex; align-items: center; justify-content: center; }
.nav-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.topbar-navigation .nav-item { gap: 9px; font-size: 12.5px; font-weight: 700; letter-spacing: .005em; }
.topbar-navigation .nav-item.active { box-shadow: inset 0 0 0 1px rgba(8,43,104,.08), 0 3px 9px rgba(0,0,0,.10); }
.overview-insights { grid-template-columns: minmax(300px, .85fr) minmax(0, 1.5fr); }
.status-chart { gap: 17px; }
.chart-meta { align-items: center; min-height: 30px; }
.chart-metrics { display: inline-flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 112px; }
.chart-count { display: inline-flex; min-width: 38px; justify-content: center; padding: 4px 9px; border: 1px solid #cbd8e8; border-radius: 7px; color: #102f60; background: #f3f6fb; font-size: 13px; font-weight: 850; font-variant-numeric: tabular-nums; }
.chart-percent { display: inline-flex; min-width: 52px; justify-content: center; padding: 4px 8px; border-radius: 7px; color: #fff; background: #284d7d; font-size: 11px; font-weight: 800; font-variant-numeric: tabular-nums; }
.chart-total-row { padding: 10px 12px; border: 1px solid #e2e9f2; border-left: 4px solid var(--gold); border-radius: 9px; background: #f8fafd; }
.chart-total-row .chart-meta { min-height: 28px; color: var(--navy); font-weight: 800; }
.chart-total-row .chart-count { min-width: 48px; padding: 5px 12px; border-color: #f0d47b; color: var(--navy-deep); background: #fff7df; font-size: 16px; }
@media (max-width: 700px) { .chart-metrics { min-width: 100px; } }

/* Clear, human-readable audit change values */
.activity-change-list { display: grid; gap: 7px; min-width: 145px; }
.activity-change-item { display: flex; flex-direction: column; gap: 2px; padding: 7px 9px; border: 1px solid #dce6f4; border-radius: 8px; background: #f8faff; }
.activity-change-label { color: #64748b; font-size: 10px; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; }
.activity-change-value { color: #173b70; font-size: 13px; font-weight: 650; overflow-wrap: anywhere; }
.activity-details { min-width: 190px; line-height: 1.55; color: #334b6d; }
.activity-value { min-width: 150px; vertical-align: top; }


/* Refined corporate tables: consistent spacing, hierarchy and responsive scrolling */
.table-wrap {
  border: 1px solid #dbe4f0;
  border-radius: 14px;
  box-shadow: 0 5px 18px rgba(15, 43, 83, .045);
  overflow: auto;
  background: #fff;
}
.table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
}
.table-wrap th {
  padding: 15px 17px;
  background: #f0f4fa;
  color: #173866;
  border-bottom: 1px solid #d5dfec;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .065em;
  line-height: 1.4;
}
.table-wrap td {
  padding: 15px 17px;
  border-bottom: 1px solid #e9eef5;
  color: #27384f;
  font-size: 13px;
  line-height: 1.6;
  vertical-align: middle;
}
.table-wrap tbody tr:nth-child(even) { background: #f8fafd; }
.table-wrap tbody tr:hover { background: #eef5fd; }
.table-wrap tbody tr:last-child td { border-bottom: 0; }
.table-wrap .empty-cell { padding: 32px 18px; text-align: center; color: #718096; }
.activity-table { min-width: 1080px; table-layout: auto; }
.activity-table th { white-space: nowrap; }
.activity-table td { max-width: 280px; overflow-wrap: anywhere; }
.activity-table td:first-child { white-space: nowrap; color: #53647b; font-variant-numeric: tabular-nums; }
.activity-table td:nth-child(2) { font-weight: 650; color: #173866; }
.activity-details { min-width: 190px; }
.activity-value { min-width: 160px; color: #53647b; font-size: 12px; }
.table-id { display: inline-block; color: #315b91; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 12px; font-weight: 650; letter-spacing: -.02em; white-space: nowrap; cursor: help; }
.activity-action-tag { padding: 6px 11px; border: 1px solid #dce7f5; background: #edf3fb; color: #173866; font-size: 10px; font-weight: 800; letter-spacing: .035em; }
.admin-management-table { min-width: 780px; }
.admin-management-table td { vertical-align: middle; }
.admin-management-table td:first-child { color: #173866; font-weight: 700; }
.admin-management-table .admin-role-select { min-width: 150px; padding: 9px 12px; border-color: #d6e0ed; }
.admin-management-table .button { min-height: 36px; }
.undo-action-button { min-height: 36px; border-radius: 9px; }
.table-footer { align-items: center; margin-top: 14px; padding: 12px 2px 0; color: #687991; font-size: 12px; }
.pagination-controls { display: flex; align-items: center; gap: 10px; }
.page-indicator { min-width: 86px; text-align: center; color: #435671; font-weight: 650; font-variant-numeric: tabular-nums; }
.pagination-button { min-height: 36px; padding: 8px 13px; }
.activity-filters { padding: 18px; gap: 14px; background: #f6f8fc; border-color: #e1e8f2; }
.activity-filters input, .activity-filters select { min-height: 42px; border: 1px solid #d5dfec; border-radius: 9px; padding: 9px 12px; background: #fff; color: #24364e; font: inherit; }
.activity-filters label { gap: 7px; color: #5b6c83; font-size: 11px; font-weight: 750; letter-spacing: .025em; }
@media (max-width: 700px) {
  .content-card { padding: 16px; }
  .table-wrap { border-radius: 11px; }
  .table-wrap th, .table-wrap td { padding: 12px 13px; }
  .table-footer { align-items: flex-start; }
  .pagination-controls { flex-wrap: wrap; }
}

/* Activity log: compact summary rows with expandable before/after details. */
.activity-table .activity-summary-row td { vertical-align: middle; }
.activity-table .activity-summary-row td:nth-child(5) { min-width: 190px; }
.activity-table .activity-summary-row td:last-child { min-width: 125px; }
.activity-expand-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 34px; padding: 7px 11px; border: 1px solid #d5e1f0;
  border-radius: 9px; background: #f4f7fc; color: #173866;
  font: inherit; font-size: 12px; font-weight: 750; cursor: pointer;
  white-space: nowrap; transition: background .18s ease, border-color .18s ease;
}
.activity-expand-button:hover { background: #eaf1fb; border-color: #b9cce5; }
.activity-expand-icon { display: inline-block; font-size: 17px; line-height: 1; }
.activity-expanded-row[hidden] { display: none !important; }
.activity-expanded-row > td { padding: 14px 18px !important; background: #f3f7fc !important; }
.activity-expanded-content { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; width: 100%; }
.activity-change-panel { min-width: 0; padding: 13px; border: 1px solid #dce6f3; border-radius: 12px; background: #fff; }
.activity-change-panel h4 { margin: 0 0 10px; color: #173866; font-size: 12px; font-weight: 850; letter-spacing: .055em; text-transform: uppercase; }
.activity-before-panel { border-top: 3px solid #9aa9bd; }
.activity-after-panel { border-top: 3px solid #dca900; }
.activity-expanded-value, .activity-expanded-value .activity-change-list { min-width: 0; width: 100%; }
.activity-expanded-value .activity-change-item { min-width: 0; }
.activity-expanded-value .activity-change-value { overflow-wrap: anywhere; word-break: break-word; }
@media (max-width: 700px) {
  .activity-expanded-content { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .activity-expanded-row > td { padding: 10px !important; }
  .activity-change-panel { padding: 11px; }
  .activity-expand-button { min-height: 36px; padding: 7px 9px; font-size: 11px; }
}

/* Admin Dashboard - Mobile-only responsive correction */
@media (max-width: 700px) {

  /* Prevent dashboard from exceeding phone width */
  #dashboardView.dashboard {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    overflow-x: clip;
  }

  .dashboard-main {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .dashboard-main .topbar {
    width: 100%;
    min-width: 0;
  }

  /* Dashboard overview section */
  #overviewPanel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  #overviewPanel .page-intro {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* IMPORTANT: Force status and recent enquiries into one column */
  #overviewPanel .overview-insights {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
    gap: 14px;
  }

  #overviewPanel .insight-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 16px;
  }

  #overviewPanel .insight-heading {
    flex-wrap: wrap;
  }

  /* Status breakdown */
  #overviewPanel .status-chart,
  #overviewPanel .chart-row {
    width: 100%;
    min-width: 0;
  }

  #overviewPanel .chart-meta {
    flex-wrap: wrap;
    gap: 8px;
  }

  #overviewPanel .chart-metrics {
    min-width: 0;
    flex: 0 0 auto;
  }

  /* Recent enquiries: scroll inside the table, not the whole page */
  #overviewPanel .recent-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  #overviewPanel .recent-table {
    min-width: 560px;
  }
}

@media (max-width: 420px) {
  #overviewPanel .insight-card {
    padding: 13px;
  }

  #overviewPanel .insight-heading h3 {
    font-size: 17px;
  }

  #overviewPanel .chart-meta {
    font-size: 12px;
  }
}
