/* ── O8 PRM — Orchestr8 Brand Theme ── */
/* Based on the O8 Software design system (v6+ / Virtual Planner) */

:root {
  --o8-primary: #165BAA;
  --o8-primary-light: #8DC2FF;
  --o8-primary-dark: #232B65;
  --o8-primary-alpha: rgba(22, 91, 170, 0.08);
  --o8-header-bg: #0E3A53;
  --o8-bg: #EDEFF3;
  --o8-surface: #FFFFFF;
  --o8-surface-hover: #F5F7FA;
  --o8-border: rgba(0, 0, 0, 0.12);
  --o8-border-light: rgba(0, 0, 0, 0.06);
  --o8-text-primary: #263238;
  --o8-text-secondary: #828282;
  --o8-text-disabled: #9E9E9E;
  --o8-secondary: #627D8C;
  --o8-secondary-light: #ABBAC2;
  --o8-info: #2391D0;
  --o8-error: #E76A43;
  --o8-success: #23D0A6;
  --o8-warning: #FFAB00;
  --o8-radius: 8px;
  --o8-radius-lg: 12px;
  --o8-radius-xl: 16px;
  --o8-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
  --o8-shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --o8-shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --o8-transition: 150ms ease;
  --o8-nav-width: 88px;
  --o8-drawer-width: 380px;
  --o8-header-height: 72px;

  font-family: 'Roboto', 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--o8-bg);
  color: var(--o8-text-primary);
  font-size: 14px;
  line-height: 1.5;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { min-height: 100vh; display: flex; overflow-x: hidden; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }

/* ── Navigation Rail ── */
.nav-rail {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--o8-nav-width);
  height: 100vh;
  background: var(--o8-surface);
  border-right: 1px solid var(--o8-border-light);
  display: flex;
  flex-direction: column;
  z-index: 100;
  box-shadow: 1px 0 3px rgba(0,0,0,0.04);
}

.nav-rail-logo {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 8px;
  height: 72px;
  border-bottom: 1px solid var(--o8-border-light);
}

.nav-rail-logo svg {
  width: 72px;
  height: 60px;
}

.nav-rail-items {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0;
  flex: 1;
  position: relative;
}

.nav-rail-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 16px;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background var(--o8-transition);
  text-decoration: none;
  padding: 0;
}

.nav-rail-item:hover { background: transparent; }
.nav-rail-item:hover .nav-rail-icon { background: var(--o8-surface-hover); }
.nav-rail-item.active .nav-rail-icon { background: var(--o8-primary-alpha); color: var(--o8-primary); }
.nav-rail-item.active .nav-rail-label { color: var(--o8-primary); }

.nav-rail-icon {
  width: 48px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 100px;
  color: var(--o8-secondary);
  transition: background var(--o8-transition), color var(--o8-transition);
}

.nav-rail-icon svg { width: 22px; height: 22px; }

.nav-rail-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.4px;
  color: var(--o8-text-secondary);
  margin-top: 2px;
}

/* ── Nav Submenu ── */
.nav-submenu {
  position: fixed;
  background: var(--o8-surface);
  border: 1px solid var(--o8-border-light);
  border-radius: var(--o8-radius-lg);
  box-shadow: var(--o8-shadow-md);
  padding: 4px;
  z-index: 110;
  min-width: 140px;
  display: none;
}
.nav-submenu.visible { display: block; }

.nav-submenu-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--o8-text-primary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: var(--o8-radius);
  transition: background var(--o8-transition);
}
.nav-submenu-item:hover {
  background: var(--o8-primary-alpha);
  color: var(--o8-primary);
}

/* ── Slide-out Drawer ── */
.drawer-overlay {
  position: fixed;
  top: 0;
  left: var(--o8-nav-width);
  right: 0;
  bottom: 0;
  background: rgba(34, 50, 65, 0.3);
  z-index: 90;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease;
}

.drawer-overlay.open { opacity: 1; pointer-events: auto; }

.drawer-panel {
  position: fixed;
  top: 0;
  left: var(--o8-nav-width);
  width: var(--o8-drawer-width);
  height: 100vh;
  background: var(--o8-surface);
  border-right: 1px solid var(--o8-border-light);
  box-shadow: var(--o8-shadow-lg);
  z-index: 95;
  transform: translateX(-100%);
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  padding: 20px;
}

.drawer-panel.open { transform: translateX(0); }

.drawer-panel { z-index: 200; }

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--o8-border-light);
}

.drawer-close {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; background: transparent; border: none;
  cursor: pointer; color: var(--o8-secondary); padding: 0; min-width: unset;
  transition: background var(--o8-transition);
}
.drawer-close:hover { background: var(--o8-surface-hover); }

/* ── Main Content Area ── */
#app-shell {
  margin-left: var(--o8-nav-width);
  width: calc(100vw - var(--o8-nav-width));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  #app-shell {
    margin-left: 0;
    width: 100vw;
  }
}

/* ── Buttons ── */
button {
  cursor: pointer; border: 0; border-radius: var(--o8-radius);
  padding: 8px 16px; background: var(--o8-primary); color: #fff;
  font-weight: 600; font-size: 13px; letter-spacing: 0.02em;
  transition: background var(--o8-transition), box-shadow var(--o8-transition);
}
button:hover { background: var(--o8-primary-dark); box-shadow: var(--o8-shadow); }
button:active { background: #0D4A8A; }

/* ── Inputs ── */
input, textarea, select {
  width: 100%; border: 1px solid var(--o8-border); border-radius: var(--o8-radius);
  padding: 10px 12px; background: var(--o8-surface); color: var(--o8-text-primary);
  transition: border-color var(--o8-transition), box-shadow var(--o8-transition);
  outline: none;
}
input[type="checkbox"] { width: auto; border: none; padding: 0; }
input:focus, textarea:focus, select:focus {
  border-color: var(--o8-primary);
  box-shadow: 0 0 0 3px var(--o8-primary-alpha);
}
input::placeholder, textarea::placeholder { color: var(--o8-text-disabled); }
textarea { resize: vertical; }

/* ── Typography ── */
.eyebrow { color: var(--o8-primary); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 700; }
h1 { font-size: 1.75rem; font-weight: 700; color: #fff; letter-spacing: -0.02em; }
h2 { font-size: 15px; font-weight: 600; color: var(--o8-text-primary); }
h3 { font-size: 13px; font-weight: 600; color: var(--o8-secondary); }
.meta { color: var(--o8-text-secondary); font-size: 13px; margin-top: 2px; }
.muted { color: var(--o8-text-secondary); font-size: 12px; }

/* ── Top Bar / Header ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0 24px;
  height: var(--o8-header-height);
  background: var(--o8-header-bg);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 60;
}

#app-topbar {
  position: relative;
}

.topbar-left {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-shrink: 0;
}

.topbar-left .eyebrow { color: var(--o8-primary-light); opacity: 0.85; font-size: 10px; }
.topbar-left h1 { line-height: var(--o8-header-height); font-size: 2rem; }

.topbar-center {
  display: flex;
  gap: 8px;
  flex: 1;
  max-width: 600px;
  align-items: center;
}

.topbar-center select,
.topbar-center input[type="search"] {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 13px;
}
.topbar-center select:focus,
.topbar-center input[type="search"]:focus {
  background: rgba(255,255,255,0.15);
  border-color: var(--o8-primary-light);
}
.topbar-center input::placeholder { color: rgba(255,255,255,0.5); }
.topbar-center select option { background: var(--o8-surface); color: var(--o8-text-primary); }

.topbar-center #advisor-view { flex: 0 0 16rem; min-width: 10rem; }
.topbar-center #search { flex: 1; min-width: 8rem; }
.topbar-center button { background: rgba(255,255,255,0.12); color: #fff; font-size: 12px; padding: 6px 14px; flex-shrink: 0; }
.topbar-center button:hover { background: rgba(255,255,255,0.2); }
.topbar-center #refresh { background: var(--o8-primary); }
.topbar-center #refresh:hover { background: var(--o8-primary-light); color: var(--o8-primary-dark); }

/* ── User Avatar & Popover ── */
.topbar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.user-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--o8-bg);
  color: var(--o8-header-bg);
  font-size: 15px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  border: none;
  padding: 0;
  min-width: unset;
  transition: box-shadow var(--o8-transition);
}
.user-avatar:hover { box-shadow: 0 0 0 2px var(--o8-primary-light); }

.user-popover {
  position: absolute;
  top: calc(var(--o8-header-height) + 4px);
  right: 16px;
  width: 280px;
  background: var(--o8-surface);
  border-radius: var(--o8-radius-lg);
  box-shadow: var(--o8-shadow-lg);
  border: 1px solid var(--o8-border-light);
  z-index: 200;
  padding: 16px;
  color: var(--o8-text-primary);
  display: none;
}
.user-popover.open { display: block; }

.user-popover-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.user-popover-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--o8-header-bg);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.user-popover-info { min-width: 0; flex: 1; }
.user-popover-name { font-weight: 600; font-size: 14px; color: var(--o8-text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-popover-email { font-size: 12px; color: var(--o8-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-popover-role { font-size: 11px; color: var(--o8-primary); font-weight: 600; text-transform: uppercase; margin-top: 2px; }

.user-popover-divider { height: 1px; background: var(--o8-border-light); margin: 12px 0; }

.user-popover-logout {
  width: 100%;
  background: transparent;
  color: var(--o8-error);
  border: 1px solid var(--o8-error);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 16px;
  border-radius: var(--o8-radius);
  cursor: pointer;
  transition: background var(--o8-transition), color var(--o8-transition);
}
.user-popover-logout:hover { background: var(--o8-error); color: #fff; }

/* ── Mobile hamburger ── */
.mobile-menu-btn {
  display: none;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  border-radius: 50%; background: rgba(255,255,255,0.1); border: none;
  cursor: pointer; color: #fff; padding: 0; min-width: unset;
}
.mobile-menu-btn:hover { background: rgba(255,255,255,0.2); }

.mobile-actions { display: none; }

/* ── Layout Grid ── */
#main-layout { flex: 1; }
.layout {
  display: grid;

  grid-template-columns: 0.75fr 1.4fr;
  grid-template-rows: 240px 1fr auto;
  gap: 16px;
  padding: 16px 24px 24px;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - 72px - 32px);
  width: 100%;
}

.layout > .contacts-panel { grid-row: 1 / 4; overflow-y: auto; }
.layout > .detail-panel { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto !important; max-height: 240px; }
.layout > .timeline-panel { grid-row: 2; grid-column: 2; display: flex; flex-direction: column; min-height: 0; overflow-y: auto !important; }
.layout > .reminders-panel { grid-row: 3; grid-column: 2; }
#timeline.timeline { flex: 1; overflow-y: auto; }
.layout > .panel { min-width: 0; overflow: hidden; }

/* ── Panels ── */
.panel {
  background: var(--o8-surface);
  border: 1px solid var(--o8-border-light);
  border-radius: var(--o8-radius-xl);
  padding: 16px;
  box-shadow: var(--o8-shadow);
}
.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--o8-border-light);
}
.stack { display: grid; gap: 10px; }

/* ── Client Cards ── */
.cards { display: grid; gap: 8px; max-height: 70vh; overflow: auto; padding-right: 4px; }
.card {
  border: 1px solid var(--o8-border-light); border-radius: var(--o8-radius-lg);
  padding: 12px; background: var(--o8-surface); cursor: pointer;
  transition: border-color var(--o8-transition), box-shadow var(--o8-transition), background var(--o8-transition);
}
.card:hover { border-color: var(--o8-primary); box-shadow: var(--o8-shadow-md); background: var(--o8-surface-hover); }
.card.active { border-color: var(--o8-primary); background: var(--o8-primary-alpha); box-shadow: 0 0 0 2px var(--o8-primary-alpha); }
.card h3 { color: var(--o8-text-primary); font-size: 14px; font-weight: 600; margin-bottom: 2px; }

.tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.tag { background: var(--o8-primary-alpha); color: var(--o8-primary); padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }

.pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 10px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.stage-lead { background: #EDEFF3; color: #627D8C; }
.stage-hot-lead { background: #FDECEA; color: #C62828; }
.stage-prospect { background: #FFF8E1; color: #B77002; }
.stage-hot-prospect { background: #FCE4EC; color: #AD1457; }
.stage-customer { background: #E0F7F1; color: #1C9C7D; }
.stage-customer-pending { background: #FFF3E0; color: #E65100; }

.summary { display: grid; gap: 6px; margin-bottom: 12px; padding: 12px; border: 1px solid var(--o8-border-light); border-radius: var(--o8-radius-lg); background: var(--o8-surface-hover); }
.summary .pill { width: max-content; margin-right: 4px; }

.mini-form { border-bottom: 1px solid var(--o8-border-light); padding-bottom: 12px; margin-bottom: 12px; }

.timeline { display: grid; gap: 8px; }
.timeline-item { border-left: 3px solid var(--o8-primary); padding: 4px 0 4px 12px; color: var(--o8-text-secondary); font-size: 13px; }
.timeline-item strong { color: var(--o8-text-primary); display: block; margin-bottom: 2px; }

/* Compact reminder rows */
#reminders .timeline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 8px 12px;
}
#reminders .timeline-item strong { display: inline; margin: 0; }
#reminders .timeline-item p { margin: 0; }
#reminders .calendar-links { margin: 0; }
#reminders { max-height: 130px; overflow-y: auto; }

.reminders-panel { }

.empty { border: 1px dashed var(--o8-border); border-radius: var(--o8-radius-lg); padding: 24px; color: var(--o8-text-disabled); text-align: center; font-size: 13px; }

.calendar-links { display: flex; gap: 8px; margin-top: 6px; }
.calendar-links a {
  display: inline-block;
  padding: 3px 10px;
  background: var(--o8-primary-alpha);
  color: var(--o8-primary);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: background var(--o8-transition);
}
.calendar-links a:hover { background: var(--o8-primary); color: #fff; }

/* ── Section Toggle Buttons ── */
.section-toggle-row {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.section-toggle {
  flex: 1;
  text-align: center;
  padding: 6px 10px;
  background: var(--o8-primary);
  color: #fff;
  border: 1px solid var(--o8-primary);
  border-radius: var(--o8-radius);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--o8-transition), border-color var(--o8-transition);
}
.section-toggle:hover { background: var(--o8-primary-dark); border-color: var(--o8-primary-dark); }
.section-toggle.active { background: var(--o8-primary-dark); border-color: var(--o8-primary-dark); }

/* ── Advisors Table ── */
.advisors-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.advisors-table th {
  text-align: left;
  padding: 10px 12px;
  background: var(--o8-surface-hover);
  font-weight: 600;
  color: var(--o8-text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--o8-border-light);
}
.advisors-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--o8-border-light);
  color: var(--o8-text-primary);
}
.advisors-table tr:hover td { background: var(--o8-surface-hover); }
.advisors-table td a { color: var(--o8-primary); text-decoration: none; }
.advisors-table td a:hover { text-decoration: underline; }
.advisors-table td button { padding: 4px 12px; font-size: 12px; }
.filters { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.card-title-row { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }

/* ── Login ── */
.login-panel {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background: linear-gradient(135deg, var(--o8-header-bg) 0%, var(--o8-primary-dark) 50%, var(--o8-primary) 100%);
}
.login-card { width: min(26rem, 100%); background: var(--o8-surface); padding: 32px; border-radius: var(--o8-radius-xl); box-shadow: var(--o8-shadow-lg); }
.login-card h1 { color: var(--o8-primary-dark); margin-bottom: 4px; }
.login-card .eyebrow { margin-bottom: 4px; }
.login-card button { width: 100%; margin-top: 4px; }

/* ── Toast ── */
#toast {
  position: fixed; right: 16px; bottom: 16px; opacity: 0; transform: translateY(4px);
  transition: 160ms ease; background: #0E3A53; color: #fff;
  padding: 10px 16px; border-radius: var(--o8-radius); font-size: 13px;
  font-weight: 500; box-shadow: var(--o8-shadow-md); z-index: 200;
}
#toast.show { opacity: 1; transform: translateY(0); }

.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 1200px) {
  .layout { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
  :root { --o8-nav-width: 64px; --o8-drawer-width: 320px; }
  .nav-rail-item { width: 56px; }
  .nav-rail-icon { width: 40px; }
  .nav-rail-label { font-size: 10px; }

  .layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    max-height: none;
  }
  .layout > .contacts-panel { grid-row: auto; grid-column: 1; overflow-y: visible; max-height: 50vh; }
  .layout > .detail-panel { grid-row: auto; grid-column: 1; }
  .layout > .timeline-panel { grid-row: auto; grid-column: 1; }
  .layout > .reminders-panel { grid-row: auto; grid-column: 1; }

  .nav-rail { display: none; }
  .drawer-panel { left: 0; width: 100%; }

  .topbar-center { display: none; }
  .mobile-menu-btn { display: flex; }

  .topbar-center.mobile-open {
    display: flex;
    position: fixed;
    top: var(--o8-header-height);
    left: 0;
    right: 0;
    width: 100vw;
    max-width: none;
    background: var(--o8-header-bg);
    padding: 12px 16px;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
    box-shadow: var(--o8-shadow-md);
  }
  .topbar-center.mobile-open #advisor-view,
  .topbar-center.mobile-open #search { flex: 1; min-width: 0; width: 100%; }
  .topbar-center.mobile-open .mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  @media (max-width: 400px) {
    .topbar-center.mobile-open .mobile-actions {
      grid-template-columns: 1fr 1fr;
    }
  }

  /* View pages table scroll */
  #advisors-view, #clients-view {
    margin-left: 0 !important;
    padding: 12px !important;
    width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  /* Tables: make first column sticky, allow horizontal scroll */
  .panel { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  /* Tap-friendly buttons */
  button, .section-toggle { min-height: 44px; font-size: 14px; }
  .section-toggle-row { flex-direction: column; gap: 6px; }

  /* Drawer forms full width */
  .drawer-panel { padding: 16px; }
  .drawer-panel form { gap: 12px; }
  input, select, textarea { font-size: 16px; /* prevents iOS zoom */ }

  /* Timeline items */
  .timeline-item { font-size: 14px; padding: 8px 12px; }

  /* Client cards */
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 400px) {
  :root { --o8-header-height: 56px; }
  .topbar h1 { font-size: 18px; }
  .topbar .eyebrow { font-size: 10px; }
  .layout { padding: 8px; gap: 8px; }
  .panel { padding: 12px; }
  h2 { font-size: 16px; }
  table { min-width: 500px; font-size: 13px; }
  table th, table td { padding: 6px 8px; }
  #advisors-view, #clients-view { padding: 8px !important; }
}

/* ── Compact Action Buttons ── */
.btn-sm, .timeline-item button, #reminders button, .advisors-table button {
  font-size: 11px !important;
  padding: 1px 6px !important;
  line-height: 1.4 !important;
  min-height: auto !important;
  border-radius: 4px;
}

/* ── Scrollbar ── */
.cards::-webkit-scrollbar, .drawer-panel::-webkit-scrollbar { width: 6px; }
.cards::-webkit-scrollbar-track, .drawer-panel::-webkit-scrollbar-track { background: transparent; }
.cards::-webkit-scrollbar-thumb, .drawer-panel::-webkit-scrollbar-thumb { background: var(--o8-secondary-light); border-radius: 3px; }

/* ── View Archived Toggle ── */
.toggle-archived {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--o8-text-secondary);
  cursor: pointer;
  user-select: none;
}
.toggle-archived input[type="checkbox"] {
  accent-color: var(--o8-primary);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ── Data Table (Audit etc.) ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  background: var(--o8-surface);
  color: var(--o8-text-secondary);
  font-weight: 600;
  border-bottom: 2px solid var(--o8-border-light);
  white-space: nowrap;
}
.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--o8-border-light);
  color: var(--o8-header);
}
.data-table tr:hover td {
  background: rgba(0,0,0,0.02);
}
