:root {
  --bg: #f6f3ec;
  --paper: #fffdf8;
  --ink: #181614;
  --muted: #5f5a53;
  --accent: #0f7f73;
  --accent-2: #ec6b2f;
  --line: #dbd5cc;
  --shadow: 0 14px 35px rgba(28, 22, 12, 0.1);
}

/* ── Type scale ── */
:root {
  --text-xs:   0.6875rem;   /* 11px — labels, badges */
  --text-sm:   0.8125rem;   /* 13px — secondary, meta */
  --text-base: 0.9375rem;   /* 15px — body */
  --text-md:   1.0625rem;   /* 17px — prominent body */
  --text-lg:   1.1875rem;   /* 19px — section headings */
  --text-xl:   1.375rem;    /* 22px — page headings */
  --text-2xl:  1.75rem;     /* 28px — hero headings */

  --surface-1: var(--paper);
  --surface-2: var(--bg);
  --border:    var(--line);
  --text-1:    var(--ink);
  --text-2:    var(--muted);
  --text-3:    #9e9890;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Outfit", sans-serif;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  height: 100dvh;
  overflow: hidden;
}

h1 { font-size: var(--text-xl); font-weight: 700; line-height: 1.25; margin: 0 0 4px; }
h2 { font-size: var(--text-lg); font-weight: 700; line-height: 1.3;  margin: 0 0 4px; }
h3 { font-size: var(--text-md); font-weight: 600; line-height: 1.35; margin: 0 0 4px; }
p  { margin: 0 0 12px; }
body:has(.public-shell) {
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
}

/* ── App shell (authenticated) ── */
.app-shell {
  display: flex;
  height: 100dvh;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.22s ease;
}
.sidebar-brand {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sidebar-nav {
  flex: 1;
  padding: 8px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 10px 8px 3px;
}
.sidebar-item,
.sidebar-item:link,
.sidebar-item:visited {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.sidebar-item:hover { background: var(--bg); color: var(--accent); }
.sidebar-item.is-active,
.sidebar-item.is-active:visited {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-item svg { flex-shrink: 0; opacity: 0.7; }
.sidebar-item.is-active svg,
.sidebar-item:hover svg { opacity: 1; }

.sidebar-quick { padding: 5px 8px 3px; }
.sidebar-quick-btn,
.sidebar-quick-btn:link,
.sidebar-quick-btn:visited {
  display: block;
  text-align: center;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
  text-decoration: none;
  transition: background 0.12s, border-color 0.12s;
}
.sidebar-quick-btn:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border-color: var(--accent);
}

.sidebar-footer {
  border-top: 1px solid var(--line);
  padding: 10px 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.sidebar-user,
.sidebar-user:link,
.sidebar-user:visited {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 1;
  min-width: 0;
  padding: 4px 6px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--ink);
  transition: background 0.12s;
}
.sidebar-user:hover { background: var(--bg); }
.sidebar-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.sidebar-username {
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-role {
  font-size: var(--text-xs);
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-logout,
.sidebar-logout:link,
.sidebar-logout:visited {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 7px;
  color: var(--muted);
  text-decoration: none;
  flex-shrink: 0;
  transition: background 0.12s, color 0.12s;
}
.sidebar-logout:hover { background: #fde8e8; color: #b71c1c; }

/* ── App body ── */
.app-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: radial-gradient(circle at 10% 20%, #f4ebd8 0%, var(--bg) 40%, #efe8dc 100%);
}
.app-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  background: rgba(255,255,255,0.7);
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
  min-height: 44px;
}
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--ink);
  border-radius: 6px;
  line-height: 0;
}
.sidebar-toggle:hover { background: var(--bg); }
.header-alerts { display: flex; flex-direction: column; gap: 6px; flex: 1; }

/* ── Breadcrumb ── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--text-2);
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.breadcrumb a {
  color: var(--text-2);
  text-decoration: none;
  white-space: nowrap;
}
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb-sep { color: var(--text-3); flex-shrink: 0; }
.breadcrumb strong {
  color: var(--ink);
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.header-alert {
  background: #fff4ec;
  border: 1px solid #f6c7ac;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 0.85rem;
}
.header-alert-error { background: #fde8e8; border-color: #f5a8a8; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  z-index: 99;
}
.sidebar-overlay.is-visible { display: block; }

/* ── Public shell (unauthenticated) ── */
.public-shell {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
}

.brand-watermark {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center 42%;
  background-size: min(70vw, 780px);
  opacity: 0.045;
  filter: grayscale(100%);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
  flex-shrink: 0;
}
.topbar-brand-name {
  font-family: "Eurostile", "Michroma", sans-serif;
  font-size: 1.5rem;
  font-weight: 900;           /* Push it to the max weight */
  text-transform: uppercase;
  letter-spacing: 0.1em;      /* Space the letters out slightly */
  
  /* THE SECRET SAUCE */
  display: inline-block;      /* Required for transform to work */
  transform: scaleX(1.3);     /* This manually stretches the font 30% wider */
  transform-origin: left;     /* Keeps it aligned with your logo icon */
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-text {
  display: grid;
  gap: 1px;
}
.brand-text strong {
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.05;
}
.brand-text small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.05;
}
.brand-logo {
  width: auto;
  height: 36px;
  max-width: min(58vw, 290px);
  object-fit: contain;
}
.brand-logo-public {
  width: auto;
  height: 52px;
  max-width: min(55vw, 280px);
  border-radius: 0;
  background: transparent;
  padding: 0;
}
.main-nav { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.nav-btn {
  padding: 8px 12px;
  font-size: 0.86rem;
}

.menu-group { position: relative; }
.menu-group summary {
  list-style: none;
  cursor: pointer;
  font-size: 0.95rem;
}
.menu-group summary::-webkit-details-marker { display: none; }
.menu-group[open] > summary { color: var(--accent); }
.menu-panel {
  position: absolute;
  top: 120%;
  left: 0;
  display: grid;
  min-width: 190px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.menu-panel a {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}
.menu-panel a:last-child { border-bottom: none; }
.menu-group-right .menu-panel {
  left: auto;
  right: 0;
}

.container {
  max-width: 1060px;
  flex: 1;
  overflow-y: auto;
  margin: 0 auto;
  padding: 28px 28px 48px;
  width: 100%;
}
.public-shell .container { max-width: 1060px; margin: 0 auto; padding: 24px 20px 40px; }

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  box-shadow: 0 1px 4px rgba(28,22,12,0.06);
  overflow: hidden;
}
.panel > *:first-child { padding-top: 20px; }
.panel > *:last-child  { padding-bottom: 20px; }
.panel > * { padding-left: 24px; padding-right: 24px; }
.panel > .table-wrap { padding-left: 0; padding-right: 0; }

.narrow { max-width: 560px; margin: 0 auto; }
.hero { margin-bottom: 4px; }
.hero h1 { margin: 0 0 2px; font-size: clamp(1.4rem, 3vw, 1.9rem); }
.hero-landing {
  background: linear-gradient(140deg, rgba(15, 127, 115, 0.1), rgba(236, 107, 47, 0.08));
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  margin-bottom: 18px;
}
.hero-tag {
  display: inline-block;
  margin: 0 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: #fff;
}
.hero-landing h1 {
  margin: 0 0 12px;
  line-height: 1.15;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}
@keyframes brandFloat {
  0% { transform: translateY(0px); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08)); }
  50% { transform: translateY(-4px); filter: drop-shadow(0 8px 14px rgba(255, 59, 31, 0.2)); }
  100% { transform: translateY(0px); filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.08)); }
}
.muted { color: var(--muted); }
.hint code { font-family: "IBM Plex Mono", monospace; }

.form-grid { display: grid; gap: 12px; }

/* ── Read-only detail view ───────────────────────────────────────────────── */
.detail-grid   { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
.detail-grid-3 { grid-template-columns: repeat(3, 1fr); }
.detail-field  { display: flex; flex-direction: column; gap: 4px; }
.detail-label  { font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-2); }
.detail-value  { font-size: var(--text-base); color: var(--ink); min-height: 1.4em; line-height: 1.6; }
.detail-value.pre { white-space: pre-wrap; }
.detail-value .status-badge { font-size: 0.75rem; }
.detail-empty { color: var(--text-3); font-style: italic; }
.detail-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }

label { display: grid; gap: 6px; font-size: 0.95rem; }
input, textarea, select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
}
textarea { min-height: 100px; }
.checkbox { grid-template-columns: auto 1fr; align-items: center; gap: 8px; }

button, .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 9px 16px;
  font-size: var(--text-sm);
  font-family: inherit;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s, filter 0.15s;
  white-space: nowrap;
}
button:hover, .btn:hover { opacity: 0.9; }
.btn-ghost {
  background: #ece8e0;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--line); opacity: 1; }

.btn-inline {
  background: #ece8e0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
}

.btn-inline-link {
  display: inline-block;
  background: #ece8e0;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 0.82rem;
  text-decoration: none;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feature-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.feature-card h3 {
  margin: 0 0 8px;
}
.feature-card p {
  margin: 0;
}
.pricing-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.price-card h3 {
  margin-top: 0;
}
.price-value {
  margin: 0 0 8px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
}
.price-list {
  margin: 0 0 14px;
  padding-left: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.metric { font-size: 1.8rem; font-weight: 700; color: var(--accent-2); }
.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.panel-head h1, .panel-head h2 { margin: 0; }
.panel-toolbar { margin-bottom: 12px; }
.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.search-form input[type="search"] {
  min-width: 260px;
  flex: 1;
}
.table, .data-table { width: 100%; border-collapse: collapse; }
.table th, .data-table th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: var(--text-xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-2); white-space: nowrap; }
.table td, .data-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); font-size: var(--text-sm); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg); }
.table-wrap { overflow-x: auto; }
.alerts { margin-bottom: 12px; }
.alert {
  background: #fff4ec;
  border: 1px solid #f6c7ac;
  border-radius: 10px;
  padding: 10px 12px;
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tab-btn {
  background: #ece8e0;
  color: var(--ink);
  border: 1px solid var(--line);
}

.tab-btn.is-active {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
}

.tab-panel {
  display: none;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf6;
}

.tab-panel.is-active {
  display: grid;
}

.section-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.section-card h3 {
  margin: 0 0 10px;
}

.medical-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.accordion {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.accordion summary {
  cursor: pointer;
  padding: 10px 12px;
  font-weight: 600;
  border-bottom: 1px solid transparent;
}

.accordion[open] summary {
  border-bottom-color: var(--line);
}

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

.table-compact th,
.table-compact td {
  padding: 8px 6px;
}

@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .medical-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 100;
    transform: translateX(-100%);
    width: 240px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.12);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-toggle { display: flex; }
  .app-header { padding: 8px 16px; }
  .container { padding: 16px 16px 32px; }
}

@media (max-width: 620px) {
  body { height: 100svh; }
  .cards { grid-template-columns: 1fr 1fr; }
  .brand-watermark { background-size: 92vw; opacity: 0.05; }
  .search-form input[type="search"] { min-width: 0; width: 100%; }
  .topbar { padding: 10px 16px; }
  .brand-logo { height: 30px; }
}

.pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 4px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
.pagination a {
  color: var(--accent);
  text-decoration: none;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ece8e0;
}
.pagination a:hover { background: var(--accent); color: #fff; }

/* ── Global link reset (prevents browser visited-purple overrides) ── */
a { color: inherit; text-decoration: none; }
a:visited { color: inherit; }

/* ── Dashboard ─────────────────────────────────────── */
.dash-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
}
.dash-actions a,
.dash-actions a:link,
.dash-actions a:visited {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s, color 0.15s;
}
.dash-actions a:hover { border-color: var(--accent); color: var(--accent); }
.dash-actions a.primary,
.dash-actions a.primary:link,
.dash-actions a.primary:visited {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.dash-actions a.primary:hover { opacity: 0.88; }

.card-link,
.card-link:link,
.card-link:visited {
  display: inline-block;
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}
.card-link:hover { text-decoration: underline; }

.dash-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 0;
  padding: 12px 16px;
  background: #fffaf6;
  border: 1px solid #e8c4a8;
  border-left: 4px solid #d0540a;
  border-radius: 10px;
  font-size: 0.9rem;
}
.dash-notice strong { color: #b84a10; }
.dash-notice a,
.dash-notice a:visited { color: var(--accent); font-weight: 600; margin-left: auto; padding-left: 12px; white-space: nowrap; }
.dash-notice a:hover { text-decoration: underline; }

.dash-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}
.dash-col { display: grid; gap: 14px; }

.panel-sub {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.panel-sub.urgent { color: #c0431a; border-bottom-color: #f0c4a8; }

.risk-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.risk-low      { background: #e8f5e9; color: #2e7d32; }
.risk-medium   { background: #fff8e1; color: #c68000; }
.risk-high     { background: #fff0e6; color: #c84b00; }
.risk-critical { background: #fde8e8; color: #b71c1c; }

.table-link,
.table-link:link,
.table-link:visited { color: var(--ink); text-decoration: none; font-weight: 600; }
.table-link:hover   { color: var(--accent); }

.arrow-link,
.arrow-link:link,
.arrow-link:visited { color: var(--accent); text-decoration: none; font-size: 0.85rem; font-weight: 600; }
.arrow-link:hover   { text-decoration: underline; }

.empty-state { padding: 24px 8px; color: var(--muted); font-size: 0.88rem; text-align: center; }

.main-nav a,
.main-nav a:link,
.main-nav a:visited { color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.main-nav a:hover   { color: var(--accent); }

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

/* ── Dashboard header ── */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.dash-title { margin: 0 0 2px; font-size: clamp(1.5rem, 3vw, 2rem); }
.dash-subtitle { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* ── Stat cards ── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 16px 14px;
  box-shadow: 0 2px 8px rgba(28,22,12,0.06);
}
.stat-label { font-size: 0.75rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent-2); line-height: 1; }
.stat-link,
.stat-link:link,
.stat-link:visited { display: inline-block; margin-top: 10px; font-size: 0.78rem; color: var(--accent); font-weight: 600; }
.stat-link:hover { text-decoration: underline; }
.stat-meta { margin-top: 6px; font-size: 0.8rem; color: var(--muted); }

/* ── Notice bar ── */
.dash-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px 16px;
  background: #fffaf6;
  border: 1px solid #e8c4a8;
  border-left: 4px solid #d0540a;
  border-radius: 10px;
  font-size: 0.9rem;
}
.notice-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #d0540a;
  flex-shrink: 0;
}
.dash-notice strong { color: #b84a10; }
.notice-link,
.notice-link:link,
.notice-link:visited { color: var(--accent); font-weight: 600; margin-left: auto; padding-left: 12px; white-space: nowrap; }
.notice-link:hover { text-decoration: underline; }

/* ── Table helpers ── */
.overdue-time  { color: #c84b00; font-weight: 600; }
.upcoming-time { color: #0a7a50; font-weight: 600; }
.row-meta { font-size: 0.76rem; color: var(--muted); margin-top: 2px; }
.nowrap { white-space: nowrap; }
.panel-sub.has-top-margin { margin-top: 20px; }

/* ── Table group-header rows ── */
.table-group-header td {
  padding: 5px 12px 4px;
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-2);
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
}
.table-group-header:first-child td { border-top: none; }
.table-group-urgent td {
  color: #b83a00;
  background: rgba(220,38,38,0.05);
  border-left: 3px solid #dc2626;
}
.table-group-ok td {
  color: #0a7a50;
  background: rgba(15,127,115,0.05);
  border-left: 3px solid var(--accent);
}
.tr-overdue td { background: rgba(220,38,38,0.035); }
.tr-overdue:hover td { background: rgba(220,38,38,0.07) !important; }
.tr-upcoming td { background: rgba(15,127,115,0.035); }
.tr-upcoming:hover td { background: rgba(15,127,115,0.07) !important; }

@media (max-width: 860px) {
  .dash-stats { grid-template-columns: repeat(2, 1fr); }
  .dash-header { flex-direction: column; }
  .dash-actions { margin-top: 0; }
}
@media (max-width: 480px) {
  .dash-stats { grid-template-columns: 1fr 1fr; }
}

/* ── Form layout helpers ── */
.form-section { margin-top: 20px; }
.form-section:first-child { margin-top: 0; }
.form-section-title {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 14px;
}
.form-cols-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-cols-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-cols-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }

.field-error { color: #c0431a; font-size: 0.78rem; margin-top: 3px; }
.field-error ul { margin: 0; padding-left: 16px; }

.form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  margin-top: 20px;
}

.tab-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--line);
  margin-bottom: 20px;
}
.tab-bar .tab-btn {
  border-radius: 8px 8px 0 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  padding: 8px 18px;
  font-size: 0.88rem;
}
.tab-bar .tab-btn.is-active {
  background: transparent;
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.record-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}
.record-header h1 { margin: 0; font-size: 1.5rem; }
.record-actions { display: flex; gap: 8px; flex-wrap: wrap; }

@media (max-width: 700px) {
  .form-cols-2, .form-cols-3, .form-cols-4 { grid-template-columns: 1fr; }
  .col-span-2, .col-span-3, .col-span-4 { grid-column: span 1; }
}

/* ── Roles / Permissions ── */
.perm-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.perm-tag {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}
.badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 0.78rem; font-weight: 600; }
.badge-accent { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }

.perm-group { margin-top: 20px; }
.perm-group-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; }
.perm-row {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
}
.perm-row:hover { background: var(--bg); }
.perm-row input[type=checkbox] { margin-top: 3px; }
.perm-row > div { min-width: 0; }
.perm-row strong { display: block; font-size: 0.88rem; }
.perm-desc { font-size: 0.78rem; color: var(--muted); display: block; }
.perm-row-admin { background: color-mix(in srgb, var(--accent) 6%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); margin-bottom: 16px; }

.btn-danger { background: #c0392b; color: #fff; border: none; padding: 9px 20px; border-radius: 8px; font-size: 0.9rem; font-weight: 600; cursor: pointer; }
.btn-danger:hover { background: #a93226; }
.btn-danger-link { color: #c0392b !important; }
.btn-danger-link:hover { text-decoration: underline; }

input[type=color] {
  height: 44px;
  padding: 4px 6px;
  cursor: pointer;
  border-radius: 8px;
}

/* ── Profile page ── */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 16px;
}
.profile-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px;
}
.profile-card h2 { font-size: 0.95rem; margin: 0 0 16px; }
.profile-card--wide { grid-column: 1 / -1; }

/* ── Alerts ── */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 12px; font-size: 0.9rem; }
.alert-danger { background: color-mix(in srgb, #c0392b 10%, transparent); border: 1px solid color-mix(in srgb, #c0392b 30%, transparent); color: #7b1e1e; }
.alert-success { background: color-mix(in srgb, var(--accent) 10%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); color: #0a4f47; }

/* ── Form errors ── */
.form-error { color: #c0392b; font-size: 0.85rem; margin: 0; }
.field-error { color: #c0392b; font-size: 0.82rem; }
.text-danger { color: #c0392b; }

/* ── Login branding ── */
.login-brand { text-align: center; margin-bottom: 24px; }
.login-logo { max-height: 52px; max-width: 180px; object-fit: contain; margin-bottom: 8px; }
.login-org-name { font-size: 1.1rem; font-weight: 700; color: var(--accent); }

/* ── Badge variants ── */
.badge-danger { background: color-mix(in srgb, #c0392b 12%, transparent); color: #7b1e1e; }

/* ── Superadmin table ── */
code { font-family: "IBM Plex Mono", monospace; font-size: 0.82rem; background: var(--bg); padding: 1px 5px; border-radius: 4px; }

/* ── Focus rings ── */
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}
input, textarea, select { font-size: 0.9rem; }
input[readonly] { background: var(--bg); color: var(--muted); cursor: default; }

/* ── Status badges ── */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
.status-scheduled  { background: #dbeafe; color: #1d4ed8; }
.status-completed  { background: #dcfce7; color: #15803d; }
.status-cancelled  { background: #fee2e2; color: #b91c1c; }
.status-pending    { background: #fef9c3; color: #92400e; }
.status-active     { background: #dcfce7; color: #15803d; }
.status-inactive   { background: #f3f4f6; color: #6b7280; }
.status-overdue    { background: #ffedd5; color: #c2410c; }
.status-performed  { background: #dcfce7; color: #15803d; }

/* ── Date of birth picker ── */
.dob-picker { display: flex; gap: 6px; }
.dob-picker select:first-child  { width: 72px;  flex-shrink: 0; } /* day */
.dob-picker select:nth-child(2)  { flex: 1; }                      /* month */
.dob-picker select:last-child   { width: 84px;  flex-shrink: 0; } /* year */

/* ── Hint text under fields ── */
.hint { font-size: 0.8rem; color: var(--muted); margin: 4px 0 0; }

/* ── Table row hover ── */
.table tbody tr:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.table-action { white-space: nowrap; }

/* ── Panel section separator ── */
.panel-divider { border: none; border-top: 1px solid var(--line); margin: 20px 0; }

/* ── Inline form (administer button) ── */
.btn-danger-sm {
  padding: 3px 10px;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 6px;
  border: 1.5px solid #dc2626;
  background: transparent;
  color: #dc2626;
  cursor: pointer;
}
.btn-danger-sm:hover { background: #dc2626; color: #fff; }

.inline-form { display: inline-flex; }
.inline-form button {
  padding: 4px 10px;
  font-size: 0.82rem;
  font-family: inherit;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.12s;
}
.inline-form button:hover { filter: brightness(0.9); }

/* ── Company info form logo preview ── */
.logo-preview { max-height: 56px; max-width: 180px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); padding: 4px; background: #fff; }

/* ── No org state ── */
.empty-page { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 24px; text-align: center; gap: 12px; }
.empty-page h1 { margin: 0; font-size: 1.4rem; }
.empty-page p { margin: 0; color: var(--muted); max-width: 380px; line-height: 1.6; }

/* ── Button sizes ── */
.btn-sm { padding: 6px 12px; font-size: 0.82rem; border-radius: 8px; }
button, .btn { font-family: inherit; font-size: 0.88rem; }

/* ── Landing page improvements ── */
.landing-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.landing-feature { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.landing-feature-icon { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.landing-feature h3 { margin: 0 0 6px; font-size: 0.95rem; }
.landing-feature p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.5; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-top: 14px; }
.price-card { display: flex; flex-direction: column; }
.price-card .btn { margin-top: auto; text-align: center; }
.price-card-featured { border-color: var(--accent); position: relative; }
.price-card-featured::before { content: "Popular"; position: absolute; top: -1px; right: 16px; background: var(--accent); color: #fff; font-size: 0.68rem; font-weight: 700; padding: 2px 8px; border-radius: 0 0 6px 6px; text-transform: uppercase; letter-spacing: 0.06em; }

/* ── Form submit row fix ── */
.form-actions { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 16px; }

/* ── Form page two-column layout ── */
.form-page-layout {
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 16px;
  align-items: start;
}
.form-sidebar {
  display: grid;
  gap: 12px;
  position: sticky;
  top: 20px;
}
.form-sidebar .panel { padding: 16px 18px; }
.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 10px;
}
.sidebar-action,
.sidebar-action:link,
.sidebar-action:visited {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 2px;
}
.sidebar-action:hover { background: var(--bg); color: var(--accent); }
.sidebar-action svg { flex-shrink: 0; opacity: 0.55; }
.sidebar-action:hover svg { opacity: 1; }
.sidebar-action.danger { color: #b91c1c; }
.sidebar-action.danger:hover { background: #fee2e2; }
.sidebar-divider { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.sidebar-meta { font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.sidebar-meta strong { color: var(--ink); font-weight: 600; display: block; margin-bottom: 2px; }

@media (max-width: 860px) {
  .form-page-layout { grid-template-columns: 1fr; }
  .form-sidebar { position: static; }
}

/* ── Floating action panel ── */
.form-with-float {
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 20px;
  align-items: start;
}
.form-float-panel {
  display: flex;
  position: sticky;
  top: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 28px rgba(28,22,12,0.13);
  flex-direction: column;
}
.form-float-section {
  padding: 12px 8px 10px;
}
.form-float-section + .form-float-section {
  border-top: 1px solid var(--line);
  background: rgba(0,0,0,0.018);
}
.form-float-panel-title {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--muted);
  margin: 0 0 6px;
  padding: 0 8px;
}
/* shared row base */
.form-float-btn,
.form-float-link {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s, color 0.12s;
  margin-bottom: 1px;
}
.form-float-btn svg,
.form-float-link svg {
  flex-shrink: 0;
  width: 22px;
  display: flex;
  justify-content: center;
  margin-right: 6px;
}
.form-float-btn { color: var(--ink); }
.form-float-link { color: var(--muted); font-size: 0.79rem; }
.form-float-btn:hover  { background: var(--bg); color: var(--accent); }
.form-float-link:hover { background: var(--bg); color: var(--accent); }
.form-float-btn  svg { opacity: 0.45; }
.form-float-link svg { opacity: 0.40; }
.form-float-btn:hover  svg { opacity: 1; }
.form-float-link:hover svg { opacity: 0.9; }
.form-float-btn.primary {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  margin-bottom: 3px;
}
.form-float-btn.primary svg { opacity: 0.8; }
.form-float-btn.primary:hover { filter: brightness(0.9); color: #fff; }

/* ── Sidebar badge ───────────────────────────────────────────────────────── */
.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #dc2626;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  margin-left: 4px;
  line-height: 1;
}

/* ── Stat card variants ──────────────────────────────────────────────────── */
.stat-card-warn    { border-left: 3px solid #f59e0b; }
.stat-card-warn .stat-value { color: #b45309; }
.stat-card-urgent  { border-left: 3px solid #dc2626; }
.stat-card-urgent .stat-value { color: #dc2626; }

/* ── Birthday strip ──────────────────────────────────────────────────────── */
.dash-birthdays {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 16px;
  margin-bottom: 16px;
  overflow: hidden;
}
.dash-birthdays-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.dash-birthdays-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0;
  scrollbar-width: none;
}
.dash-birthdays-scroll::-webkit-scrollbar { display: none; }
.bday-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  text-decoration: none;
  color: inherit;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s;
  flex-shrink: 0;
}
.bday-card:hover { border-color: var(--accent); background: var(--paper); }
.bday-card.bday-today { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.bday-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.75rem;
  flex-shrink: 0;
}
.bday-name { font-size: 0.8rem; font-weight: 600; }
.bday-date { font-size: 0.75rem; color: var(--muted); }
.bday-highlight { color: var(--accent); font-weight: 700; }

/* ── Severity badges ─────────────────────────────────────────────────────── */
.severity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.severity-low      { background: #d1fae5; color: #065f46; }
.severity-medium   { background: #fef3c7; color: #92400e; }
.severity-high     { background: #fee2e2; color: #991b1b; }
.severity-critical { background: #7f1d1d; color: #fff; }

/* ── Category badges ─────────────────────────────────────────────────────── */
.category-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

/* ── Alert cards ─────────────────────────────────────────────────────────── */
.alerts-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.alert-card {
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--surface);
}
.alert-card.is-acknowledged { opacity: 0.55; }
.alert-info     { border-left: 4px solid #3b82f6; }
.alert-warning  { border-left: 4px solid #f59e0b; }
.alert-critical { border-left: 4px solid #dc2626; background: #fff5f5; }

.alert-card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.alert-severity-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--surface-raised, #f0f0f0);
}
.alert-info .alert-severity-badge     { background: #dbeafe; color: #1d4ed8; }
.alert-warning .alert-severity-badge  { background: #fef3c7; color: #92400e; }
.alert-critical .alert-severity-badge { background: #fee2e2; color: #991b1b; }

.alert-expires { font-size: 0.75rem; color: var(--text-muted); }
.alert-card-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.alert-card-message { font-size: 0.85rem; color: var(--text-muted); line-height: 1.5; }
.alert-card-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.alert-meta { font-size: 0.75rem; color: var(--text-muted); flex: 1; }
.alert-ack-count { font-size: 0.75rem; color: var(--text-muted); }
.alert-acked-label { font-size: 0.78rem; color: #059669; font-weight: 600; }

.btn-sm {
  padding: 4px 12px;
  font-size: 0.78rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.btn-sm:hover { filter: brightness(0.9); }
/* ── Dashboard alert rows ────────────────────────────────────────────────── */
.dash-alert-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.84rem;
  gap: 10px;
}
.dash-alert-info     { background: #eff6ff; }
.dash-alert-warning  { background: #fffbeb; }
.dash-alert-critical { background: #fef2f2; }
.dash-alert-title    { font-weight: 600; flex: 1; }
.dash-alert-sev      { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

.btn-ghost-xs {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.btn-ghost-xs:hover { border-color: #dc2626; color: #dc2626; }

@media (max-width: 860px) {
  .form-with-float { display: block; }
  .form-float-panel { display: none !important; }
  .panel-head-actions { display: flex !important; }
}

/* ── Calendar ────────────────────────────────────────────────────────────── */
/* ── Calendar ──────────────────────────────────────────────────────────────── */

.cal-panel { padding: 20px 24px 24px; }

/* Header: title + legend + filter on one line */
.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
}
.cal-head h1 { margin: 0; font-size: 1.25rem; font-weight: 700; }
.cal-head-controls {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Legend chips */
.cal-legend {
  display: flex;
  gap: 6px;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--paper);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}
.cal-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }

/* Patient filter */
.cal-filter {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--muted);
  transition: border-color 0.15s;
}
.cal-filter:focus-within { border-color: var(--accent); }
.cal-filter svg { flex-shrink: 0; opacity: 0.6; }
.cal-filter select {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  padding: 0;
  width: auto;
  min-width: 140px;
}

#calendar { width: 100%; }

/* FullCalendar toolbar */
.fc .fc-toolbar {
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px !important;
  align-items: center;
}
.fc .fc-toolbar-title {
  font-size: 1rem !important;
  font-weight: 700 !important;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.fc .fc-toolbar-chunk { display: flex; align-items: center; gap: 6px; }

/* Buttons */
.fc .fc-button {
  font-family: inherit !important;
  font-size: 0.8rem !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 5px 13px !important;
  border-radius: 8px !important;
  border: 1px solid var(--line) !important;
  background: var(--paper) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.fc .fc-button:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 6%, transparent) !important;
}
.fc .fc-button:disabled { opacity: 0.35 !important; }
.fc .fc-button:focus { box-shadow: none !important; outline: none !important; }

.fc .fc-prev-button,
.fc .fc-next-button { padding: 5px 10px !important; }

.fc .fc-today-button {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 6%, transparent) !important;
}

/* View switcher — segmented control */
.fc .fc-button-group {
  gap: 0 !important;
  border: 1px solid var(--line) !important;
  border-radius: 8px !important;
  overflow: hidden;
}
.fc .fc-button-group .fc-button {
  border: none !important;
  border-right: 1px solid var(--line) !important;
  border-radius: 0 !important;
  padding: 5px 13px !important;
}
.fc .fc-button-group .fc-button:last-child { border-right: none !important; }
.fc .fc-button-group .fc-button-active {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}
.fc .fc-button-group .fc-button:not(.fc-button-active):hover {
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 6%, transparent) !important;
}

/* Grid lines */
.fc td, .fc th { border-color: var(--line) !important; }

/* Day-of-week header */
.fc .fc-col-header-cell { background: var(--bg); }
.fc .fc-col-header-cell-cushion {
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  text-decoration: none !important;
  padding: 10px 6px !important;
}

/* Day cells */
.fc .fc-daygrid-day { transition: background 0.1s; }
.fc .fc-daygrid-day:hover { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.fc .fc-daygrid-day-frame { min-height: 90px; }

/* Day number */
.fc .fc-daygrid-day-number {
  font-size: 0.8rem !important;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 8px !important;
  text-decoration: none !important;
  line-height: 1;
}
.fc .fc-day-other .fc-daygrid-day-number { opacity: 0.35; }

/* Today: accent circle on the day number */
.fc .fc-day-today { background: color-mix(in srgb, var(--accent) 5%, transparent) !important; }
.fc .fc-day-today .fc-daygrid-day-number {
  color: #fff !important;
  font-weight: 700;
  background: var(--accent);
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 5px 6px;
  padding: 0 !important;
}

/* Event pills */
.fc .fc-event {
  cursor: pointer !important;
  font-size: 0.74rem !important;
  font-weight: 600 !important;
  border: none !important;
  border-radius: 5px !important;
  padding: 2px 7px !important;
  opacity: 0.92;
  transition: opacity 0.12s, filter 0.12s;
}
.fc .fc-event:hover { opacity: 1; filter: brightness(0.93); }
.fc .fc-daygrid-event { margin: 1px 4px !important; }

/* "+N more" link */
.fc .fc-daygrid-more-link {
  font-size: 0.72rem !important;
  font-weight: 600;
  color: var(--accent) !important;
  padding: 1px 4px;
}

/* List view */
.fc .fc-list-table { border: none !important; }
.fc .fc-list-day-cushion {
  background: var(--bg) !important;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 14px !important;
}
.fc .fc-list-event:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent) !important; }
.fc .fc-list-event-title a { text-decoration: none !important; color: var(--ink) !important; font-weight: 500; }
.fc .fc-list-empty { color: var(--muted); font-size: 0.9rem; }

/* Time grid */
.fc .fc-timegrid-slot { height: 36px !important; }
.fc .fc-timegrid-axis-cushion,
.fc .fc-timegrid-slot-label-cushion {
  font-size: 0.72rem !important;
  color: var(--muted);
}

/* Tooltip */
.cal-tooltip {
  position: fixed;
  z-index: 9999;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(28,22,12,0.14);
  max-width: 240px;
  line-height: 1.45;
}
.cal-tooltip-type {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-bottom: 3px;
}
.cal-tooltip-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.cal-tooltip-detail {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

@media print {
  .sidebar, .app-header, .form-sidebar, .form-actions .btn-ghost,
  .panel-head .btn, .panel-head .btn-ghost, .form-float-panel { display: none !important; }
  .form-with-float { display: block; }
  .form-page-layout { grid-template-columns: 1fr; }
  .app-shell { display: block; }
  .app-body { overflow: visible; }
  .container { overflow: visible; padding: 0; }
  .panel { box-shadow: none; border: none; }
}

/* ── Dashboard: viewport-fit no-scroll layout ───────────────────────────── */
body.page-dashboard .container {
  max-width: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
}
body.page-dashboard .dash-header {
  margin-bottom: 8px;
  flex-shrink: 0;
}
body.page-dashboard .dash-header .dash-actions { margin: 0; }
body.page-dashboard .dash-title  { font-size: 1.35rem; }
body.page-dashboard .dash-subtitle { font-size: 0.8rem; }
body.page-dashboard .dash-stats {
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-bottom: 8px;
  flex-shrink: 0;
}
body.page-dashboard .stat-card {
  padding: 10px 12px 8px;
  border-radius: 10px;
}
body.page-dashboard .stat-label  { font-size: 0.66rem; margin-bottom: 3px; }
body.page-dashboard .stat-value  { font-size: 1.45rem; }
body.page-dashboard .stat-link   { margin-top: 5px; font-size: 0.7rem; }
body.page-dashboard .dash-grid {
  flex: 1;
  min-height: 0;
  margin-top: 0;
  gap: 10px;
  align-items: stretch;
  overflow: hidden;
}
body.page-dashboard .dash-col {
  min-height: 0;
  overflow-y: auto;
  gap: 10px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
body.page-dashboard .dash-col::-webkit-scrollbar { width: 4px; }
body.page-dashboard .dash-col::-webkit-scrollbar-track { background: transparent; }
body.page-dashboard .dash-col::-webkit-scrollbar-thumb { background: var(--line); border-radius: 2px; }
body.page-dashboard .panel { padding: 10px 14px; }
body.page-dashboard .panel > * { padding-left: 0; padding-right: 0; }
body.page-dashboard .panel-head { margin-bottom: 6px; }
body.page-dashboard .panel-head h2 { font-size: 0.88rem; }
body.page-dashboard .table-compact th { padding: 5px 5px; font-size: 0.72rem; }
body.page-dashboard .table-compact td { padding: 6px 5px; font-size: 0.84rem; }
body.page-dashboard .panel-sub { margin: 10px 0 6px; }
body.page-dashboard .bday-card { padding: 4px 10px 4px 5px; }
body.page-dashboard .bday-avatar { width: 22px; height: 22px; font-size: 0.68rem; }
body.page-dashboard .bday-name { font-size: 0.75rem; }
body.page-dashboard .bday-date { font-size: 0.7rem; }

@media (max-width: 1060px) {
  body.page-dashboard .dash-stats { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  body.page-dashboard .container { overflow-y: auto; display: block; }
  body.page-dashboard .dash-stats { grid-template-columns: repeat(3, 1fr); }
  body.page-dashboard .dash-grid  { overflow: visible; min-height: auto; }
  body.page-dashboard .dash-col   { overflow-y: visible; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   LANDING PAGE & PRICING PAGE — v34
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Public shell: allow scrolling on marketing pages ── */
.public-shell { overflow-y: auto; height: auto; min-height: 100dvh; }
.public-shell .container { max-width: 1100px; padding: 0 24px 60px; }

/* ── Hero ── */
.lp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 52px;
  align-items: center;
  padding: 60px 0 48px;
  max-width: 1100px;
  margin: 0 auto;
}
.lp-hero-copy { display: flex; flex-direction: column; gap: 0; }
.lp-hero-visual { display: flex; align-items: center; justify-content: center; }

.lp-tag {
  display: inline-block;
  padding: 5px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
  margin-bottom: 18px;
  width: fit-content;
}

.lp-h1 {
  margin: 0 0 20px;
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.lp-lead {
  margin: 0 0 28px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 480px;
}

.lp-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.lp-btn-primary { padding: 12px 22px; font-size: 0.95rem; }
.lp-btn-ghost   { padding: 12px 22px; font-size: 0.95rem; }

.lp-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── App Mockup ── */
.app-mockup {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(28, 22, 12, 0.14), 0 4px 16px rgba(28, 22, 12, 0.08);
  overflow: hidden;
  background: #fff;
  font-size: 0.72rem;
}
.mockup-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f0ece4;
  border-bottom: 1px solid var(--line);
}
.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.mockup-url {
  flex: 1;
  text-align: center;
  font-size: 0.68rem;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: "IBM Plex Mono", monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mockup-body {
  display: flex;
  height: 240px;
}
.mockup-sidebar {
  width: 90px;
  flex-shrink: 0;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mockup-nav-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px;
  border-radius: 6px;
  font-size: 0.67rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
}
.mockup-nav-item.is-active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  font-weight: 700;
}
.mockup-nav-item svg { flex-shrink: 0; }

.mockup-content {
  flex: 1;
  overflow: hidden;
  padding: 8px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-stats {
  display: flex;
  gap: 6px;
}
.mockup-stat {
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mockup-stat.urgent { border-left: 3px solid #dc2626; }
.mockup-stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--accent-2);
  line-height: 1;
}
.mockup-stat.urgent .mockup-stat-value { color: #dc2626; }
.mockup-stat-label {
  font-size: 0.6rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.mockup-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
}
.mockup-row {
  display: flex;
  gap: 4px;
  padding: 5px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 0.67rem;
  align-items: center;
}
.mockup-row:last-child { border-bottom: none; }
.mockup-row span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mockup-row span:last-child { flex: 0 0 40px; text-align: right; }
.mockup-row.header {
  background: #f8f5ef;
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.mockup-urgent {
  color: #dc2626;
  font-weight: 700;
}

/* ── Trust bar ── */
.lp-trust {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 24px;
  margin: 0 auto 0;
  max-width: 1100px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.lp-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}
.lp-trust-item svg { color: var(--accent); flex-shrink: 0; }

/* ── Sections ── */
.lp-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 64px 0 0;
}
.lp-section-alt {
  background: none;
}
.lp-section-title {
  text-align: center;
  margin-bottom: 40px;
}
.lp-section-title h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.lp-section-title p {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ── Feature cards grid ── */
.lp-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.lp-feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.lp-feature-card:hover {
  box-shadow: 0 8px 28px rgba(28,22,12,0.1);
  transform: translateY(-2px);
}
.lp-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--icon-color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.lp-feature-card h3 {
  margin: 0 0 8px;
  font-size: 0.97rem;
  font-weight: 700;
}
.lp-feature-card p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Differentiators ── */
.lp-differentiators {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.lp-diff-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
}
.lp-diff-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--diff-color, var(--accent));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}
.lp-diff-item h3 { margin: 0 0 6px; font-size: 1rem; font-weight: 700; }
.lp-diff-item p  { margin: 0; font-size: 0.875rem; color: var(--muted); line-height: 1.6; }

/* ── Steps ── */
.lp-steps {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 0;
  align-items: start;
}
.lp-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
}
.lp-step h3 {
  margin: 0 0 8px;
  font-size: 0.97rem;
  font-weight: 700;
}
.lp-step p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.6;
}
.lp-step-num {
  font-size: 2.4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-step-connector {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
  margin-top: 52px;
  opacity: 0.4;
  align-self: start;
}

/* ── Pricing teaser row (landing) ── */
.lp-pricing-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

/* ── Pricing full row (pricing page) ── */
.lp-pricing-full-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  max-width: 1100px;
  margin: 0 auto 0;
  padding: 0 0 0;
}

/* ── Price card shared ── */
.lp-price-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow 0.2s;
}
.lp-price-card:hover { box-shadow: 0 10px 32px rgba(28,22,12,0.1); }
.lp-price-card.featured {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 6px 28px rgba(15,127,115,0.12);
}
.lp-price-card-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 0.67rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 3px 12px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}
.lp-price-card-name {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.lp-price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
  margin-bottom: 10px;
}
.lp-price-amount-consult {
  font-size: 1.3rem;
  margin-top: 6px;
  margin-bottom: 14px;
}
.lp-price-period {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}
.lp-price-desc {
  margin: 0 0 16px;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}
.lp-price-list {
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.lp-price-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.4;
}
.lp-price-list li::before {
  content: "✓";
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
  margin-top: 1px;
}
.lp-price-cta {
  text-align: center;
  padding: 11px 18px;
  font-size: 0.9rem;
  border-radius: 10px;
  margin-top: auto;
}
.lp-pricing-link-row {
  text-align: center;
  margin: 24px 0 0;
}
.lp-pricing-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
}
.lp-pricing-link:hover { text-decoration: underline; }

/* ── CTA band ── */
.lp-cta-band {
  margin: 64px 0 0;
  padding: 64px 32px;
  text-align: center;
  background: linear-gradient(135deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 70%, var(--accent-2)) 100%);
  border-radius: 24px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 64px;
}
/* Override for use inside .container (public-shell) */
.public-shell .container .lp-cta-band {
  margin-left: -24px;
  margin-right: -24px;
  border-radius: 0;
  max-width: none;
}
.lp-cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: #fff;
  font-weight: 800;
}
.lp-cta-band p {
  margin: 0 0 28px;
  color: rgba(255,255,255,0.82);
  font-size: 1rem;
}
.lp-cta-band-btn {
  background: #fff;
  color: var(--accent);
  padding: 13px 28px;
  font-size: 0.97rem;
  font-weight: 700;
  border-radius: 12px;
  border: none;
}
.lp-cta-band-btn:hover { opacity: 0.92; }
.lp-cta-band-note {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.65);
}

/* ── Pricing page header ── */
.lp-pricing-header {
  padding-top: 52px;
  margin-bottom: 48px;
}
.lp-pricing-h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

/* ── Comparison table ── */
.pricing-table-wrap {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}
.pricing-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.88rem;
}
.pricing-table th {
  padding: 14px 16px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  background: #f8f5ef;
}
.pricing-table th.pt-feature-col { text-align: left; }
.pricing-table th.pt-featured {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}
.pricing-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  text-align: center;
  color: var(--ink);
  vertical-align: middle;
}
.pricing-table td:first-child { text-align: left; font-weight: 500; }
.pricing-table td.pt-featured {
  background: color-mix(in srgb, var(--accent) 4%, transparent);
  font-weight: 600;
  color: var(--ink);
}
.pricing-table tbody tr:last-child td { border-bottom: none; }
.pricing-table tbody tr:hover td { background: color-mix(in srgb, var(--accent) 3%, transparent); }
.pricing-table tbody tr:hover td.pt-featured { background: color-mix(in srgb, var(--accent) 8%, transparent); }
.pt-check { color: var(--accent); font-weight: 700; font-size: 1.05rem; }
.pt-cross  { color: var(--muted); font-size: 1rem; }

/* ── FAQ ── */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 760px;
  margin: 0 auto;
}
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s;
}
.faq-item[open] { box-shadow: 0 4px 16px rgba(28,22,12,0.07); }
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--ink);
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--accent);
  flex-shrink: 0;
  margin-left: 12px;
  transition: transform 0.2s;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item summary:hover { color: var(--accent); }
.faq-body {
  padding: 0 20px 16px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .lp-pricing-full-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .lp-features-grid  { grid-template-columns: repeat(2, 1fr); }
  .lp-pricing-row    { grid-template-columns: repeat(2, 1fr); }
  .lp-differentiators { grid-template-columns: 1fr; }
}

/* ── RGPD page ────────────────────────────────────────────────────────────── */
.rgpd-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.rgpd-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--surface-1);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-1);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.rgpd-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 16px rgba(15,127,115,0.12);
  transform: translateY(-1px);
}
.rgpd-card-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  background: rgba(15,127,115,0.09);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-top: 1px;
}
.rgpd-card-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rgpd-card-title { font-size: var(--text-sm); font-weight: 600; }
.rgpd-card-desc  { font-size: var(--text-xs); color: var(--text-2); line-height: 1.5; }

/* ── Header bell ──────────────────────────────────────────────────────────── */
.header-actions { margin-left: auto; display: flex; align-items: center; }
.header-notif-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  color: var(--text-2);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.header-notif-btn:hover { background: var(--surface-2); color: var(--text-1); }
.header-notif-badge {
  position: absolute;
  top: 3px;
  right: 3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  pointer-events: none;
}

/* ── Notifications page ───────────────────────────────────────────────────── */
.notif-list { display: flex; flex-direction: column; }
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: var(--text-1);
  transition: background 0.12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--surface-2); }
.notif-unread { background: color-mix(in srgb, var(--accent) 5%, transparent); }
.notif-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.notif-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.notif-title { font-size: 0.875rem; font-weight: 600; }
.notif-body { font-size: 0.8rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { flex-shrink: 0; font-size: 0.75rem; color: var(--text-3); margin-top: 2px; }

@media (max-width: 768px) {
  .lp-hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 40px 0 32px;
  }
  .lp-hero-visual { order: -1; }
  .app-mockup { max-width: 100%; }
  .lp-features-grid   { grid-template-columns: 1fr; }
  .lp-pricing-row     { grid-template-columns: 1fr; }
  .lp-differentiators { grid-template-columns: 1fr; }
  .lp-pricing-full-row { grid-template-columns: 1fr; }
  .lp-steps {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .lp-step-connector { display: none; }
  .lp-trust { gap: 8px; }
  .lp-trust-item { font-size: 0.78rem; padding: 5px 10px; }
  .lp-section { padding: 44px 0 0; }
  .lp-cta-band { padding: 44px 20px; border-radius: 16px; }
  .public-shell .container .lp-cta-band { border-radius: 0; margin-left: -16px; margin-right: -16px; }
}

@media (max-width: 480px) {
  .lp-pricing-full-row { grid-template-columns: 1fr; }
  .lp-ctas { flex-direction: column; align-items: stretch; }
  .lp-btn-primary, .lp-btn-ghost { text-align: center; }
}

/* ── Mobile hamburger menu ─────────────────────────────────────────────────── */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--ink);
  border-radius: 8px;
  line-height: 0;
  transition: background 0.15s;
}
.mobile-menu-btn:hover { background: var(--bg); }

.mobile-nav-drawer {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 12px 16px 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(28,22,12,0.08);
}
.mobile-nav-drawer.is-open { display: flex; }
.mobile-nav-drawer a {
  display: block;
  padding: 11px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: background 0.12s;
}
.mobile-nav-drawer a:hover { background: var(--bg); }

@media (max-width: 640px) {
  /* Hide desktop nav links, show hamburger */
  .main-nav-link  { display: none !important; }
  .main-nav-cta   { display: none !important; }
  .mobile-menu-btn { display: flex; }

  /* Topbar adjustments */
  .topbar { padding: 10px 16px; }
  .topbar-brand-name { font-size: 1.2rem; }

  /* Hero: tighter on small phones */
  .lp-hero { padding: 28px 0 24px; gap: 24px; }
  .lp-h1 { font-size: clamp(1.7rem, 8vw, 2.4rem); }
  .lp-lead { font-size: 0.95rem; }

  /* Mockup: limit height on phones */
  .mockup-body { height: 200px; }

  /* Trust bar: horizontal scroll */
  .lp-trust {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
    gap: 8px;
  }
  .lp-trust::-webkit-scrollbar { display: none; }
  .lp-trust-item { flex-shrink: 0; }

  /* Section spacing */
  .lp-section { padding: 36px 0 0; }
  .lp-section-title h2 { font-size: 1.25rem; }
  .public-shell .container { padding: 0 16px 48px; }

  /* Feature cards */
  .lp-feature-card { padding: 18px 16px; }

  /* Pricing cards */
  .lp-price-card { padding: 20px 18px; }

  /* Steps */
  .lp-steps { gap: 12px; }
  .lp-step { padding: 16px; }

  /* CTA band */
  .lp-cta-band { padding: 36px 16px; border-radius: 12px; }
  .lp-cta-band h2 { font-size: 1.3rem; }
}
