/* ── Reset & base ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  color-scheme: light;
}
html[data-theme="dark"] {
  color-scheme: dark;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  background: #f4f5f7;
  color: #1a1a2e;
  min-height: 100vh;
}
a { color: #4361ee; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Navbar ───────────────────────────────────── */
.navbar {
  background: #1a1a2e;
  color: #fff;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
  min-height: 52px;
  flex-wrap: wrap;
}
.navbar .brand {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
  padding-top: 0.2rem;
}
.navbar .nav-links {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.navbar .nav-links a {
  color: #adb5bd;
  font-size: 0.92rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  line-height: 1.2;
}
.navbar .nav-links a:hover { color: #fff; text-decoration: none; }
.navbar .nav-links a.is-active {
  background: rgba(255,255,255,.12);
  color: #fff;
}
.navbar .nav-user { color: #cbd5e1; font-size: 0.9rem; }
.theme-toggle {
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  color: #fff;
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.theme-toggle:hover {
  background: rgba(255,255,255,.16);
}
.theme-corner {
  display: flex;
  justify-content: flex-end;
  padding: 1rem 1rem 0;
}
.theme-corner .theme-toggle {
  border-color: #dbe1ea;
  background: #fff;
  color: #374151;
}
.theme-corner .theme-toggle:hover {
  background: #f8fafc;
}

/* ── Layout ───────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem 2rem;
}

/* ── Alerts ───────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}
.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger  { background: #fee2e2; color: #991b1b; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* ── Page header ──────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.page-header h2 { font-size: 1.4rem; }

/* ── Search ───────────────────────────────────── */
.search-bar { margin-bottom: 1rem; }
.search-bar input {
  width: 100%;
  max-width: 420px;
  padding: 0.7rem 0.9rem;
  border: 1px solid #dde1e7;
  border-radius: 6px;
  font-size: 0.95rem;
}

/* ── Table ────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.25rem;
}
table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
thead th {
  background: #f8f9fc;
  text-align: left;
  padding: 0.7rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
}
tbody tr { border-bottom: 1px solid #f0f0f5; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #fafbff; }
td { padding: 0.75rem 0.9rem; vertical-align: middle; font-size: 0.92rem; }
.name-col a { font-weight: 600; color: #1a1a2e; }
.name-col a:hover { color: #4361ee; text-decoration: none; }
.avatar-cell { width: 44px; padding-right: 0; }

/* ── Avatar ───────────────────────────────────── */
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; display: block;
}
.avatar-lg { width: 60px; height: 60px; }
.avatar-placeholder {
  background: #4361ee; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.75rem; font-weight: 700;
}
.avatar-lg.avatar-placeholder { font-size: 1.1rem; }

/* ── Badges ───────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 0.2em 0.55em;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-info    { background: #dbeafe; color: #1d4ed8; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-success { background: #d1fae5; color: #065f46; }
.note-count-btn {
  border: none;
  cursor: pointer;
}

.recent-notes-row {
  background: #f8fafc;
}
.recent-notes-row:hover {
  background: #f8fafc;
}
.recent-notes-cell {
  padding: 0.75rem 0.9rem;
}
.recent-notes-panel {
  border: 1px solid #e2e8f0;
  background: #ffffff;
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.recent-notes-header {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.45rem;
}
.recent-notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.recent-note-meta {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 0.15rem;
}
.recent-note-body {
  white-space: pre-wrap;
  line-height: 1.4;
}

/* ── Buttons ──────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.55rem 0.95rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity .15s;
  text-align: center;
  line-height: 1.25;
}
.btn:hover { opacity: .85; text-decoration: none; }
.btn-primary  { background: #4361ee; color: #fff; }
.btn-secondary{ background: #e5e7eb; color: #374151; }
.btn-sm       { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
.btn-full     { width: 100%; }
.btn-link     { background: none; border: none; cursor: pointer; font-size: 0.9rem; padding: 0; color: #4361ee; line-height: 1.35; text-align: left; }
.danger-link  { color: #dc2626; }

/* ── Auth card ────────────────────────────────── */
.auth-card {
  max-width: 380px;
  margin: 4rem auto;
  background: #fff;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.1);
}
.account-card {
  max-width: 760px;
}
.auth-card h1, .auth-card h2 { margin-bottom: 0.25rem; }
.auth-card .subtitle { color: #6b7280; margin-bottom: 1.5rem; font-size: 0.9rem; }

/* ── Form fields ──────────────────────────────── */
.field { margin-bottom: 1rem; }
.field label { display: block; font-size: 0.88rem; font-weight: 600; margin-bottom: 0.35rem; color: #374151; }
.field input[type="text"],
.field input[type="password"],
.field select {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.95rem;
  background: #fff;
}
.field input:focus,
.field select:focus { outline: 2px solid #4361ee; border-color: #4361ee; }
.field-checkbox label { display: flex; gap: 0.5rem; align-items: center; font-weight: 400; }
.btn-row { display: flex; gap: 0.75rem; justify-content: flex-end; margin-top: 1.25rem; }

.admin-filter-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.admin-filter-form .field {
  margin-bottom: 0;
}
.admin-filter-actions {
  align-items: flex-end;
  justify-content: flex-start;
  margin-top: 0;
}
.action-cell {
  min-width: 220px;
}
.action-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  align-items: flex-start;
}
.account-meta {
  margin: 1rem 0 1.5rem;
  display: grid;
  gap: 0.35rem;
  color: #374151;
  font-size: 0.9rem;
}
.account-panel {
  margin: 0.85rem 0 1.25rem;
  padding: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #f8fafc;
}
.account-panel code {
  display: inline-block;
  margin-top: 0.2rem;
  white-space: pre-wrap;
  word-break: break-word;
}
.account-session-list {
  display: grid;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}
.account-session-card {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1rem;
  background: #fff;
}
.account-session-card p + p {
  margin-top: 0.25rem;
}
.status-page {
  display: grid;
  gap: 1rem;
}
.status-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.status-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.status-card-head h3 {
  font-size: 1.05rem;
}
.status-meta {
  display: grid;
  gap: 0.45rem;
  font-size: 0.94rem;
}
.status-explainer {
  display: grid;
  gap: 0.7rem;
}
.status-action-form {
  margin-top: 0.85rem;
}
.status-action-form .btn {
  width: 100%;
  max-width: 320px;
}

/* ── Person card ──────────────────────────────── */
.back-link { font-size: 0.95rem; color: #6b7280; display: inline-block; margin-bottom: 1rem; }
.person-card {
  background: #fff;
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
  margin-bottom: 1.5rem;
}
.person-header { display: flex; gap: 1.1rem; align-items: center; }
.person-header h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.person-meta { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-size: 0.88rem; color: #374151; }

/* ── Notes ────────────────────────────────────── */
.notes-section h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.note-form { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1.5rem; }
.note-form textarea {
  width: 100%;
  padding: 0.6rem 0.8rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.9rem;
  resize: vertical;
}
.note-form textarea:focus { outline: 2px solid #4361ee; border-color: #4361ee; }
.note-form .btn { align-self: flex-start; }
.note-list { display: flex; flex-direction: column; gap: 0.9rem; }
.note-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
}
.note-card-pause {
  border-color: #f59e0b;
  background: #fffbeb;
}
.note-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  font-size: 0.82rem;
  flex-wrap: wrap;
}
.note-body { font-size: 0.92rem; line-height: 1.55; white-space: pre-wrap; }
.inline-form { display: inline; }

/* ── Empty state ──────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #6b7280;
}

/* ── Utilities ────────────────────────────────── */
.muted { color: #9ca3af; }

/* ── Two-column layout ────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
}
@media (max-width: 700px) {
  .two-col { grid-template-columns: 1fr; }
}

/* ── Person actions (pause / hide) ───────────── */
.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f0f0f5;
}
.pause-status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.badge-paused { background: #fef9c3; color: #854d0e; }
.badge-pause-note { background: #fed7aa; color: #9a3412; }
.badge-pause-link { background: #fef3c7; color: #78350f; }
.pause-details summary { cursor: pointer; list-style: none; }
.pause-details summary::-webkit-details-marker { display: none; }
.pause-form {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}
.pause-form select {
  padding: 0.35rem 0.6rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.85rem;
}
.danger-btn { background: #fee2e2; color: #991b1b; border: none; }
.danger-btn:hover { background: #fecaca; }

/* ── Activity section ─────────────────────────── */
.activity-section h3 { font-size: 1.1rem; margin-bottom: 1rem; }
.activity-block { margin-bottom: 1.25rem; }
.activity-block h4 { font-size: 0.85rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: #6b7280; margin-bottom: 0.5rem; }
.activity-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.activity-table thead th {
  text-align: left; color: #9ca3af; font-weight: 600;
  border-bottom: 1px solid #f0f0f5; padding-bottom: 0.3rem;
}
.activity-table td { padding: 0.3rem 0.5rem 0.3rem 0; border-bottom: 1px solid #f9fafb; }
.group-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }
.group-list li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; flex-wrap: wrap; }

.expand-details {
  margin-top: 0.5rem;
}
.expand-details summary {
  cursor: pointer;
  color: #4361ee;
  font-size: 0.85rem;
  font-weight: 600;
  list-style: none;
}
.expand-details summary::-webkit-details-marker {
  display: none;
}
.expand-details[open] summary {
  margin-bottom: 0.5rem;
}

/* ── Check-in kind badges ─────────────────────── */
.kind-badge {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}
.kind-regular   { background: #d1fae5; color: #065f46; }
.kind-volunteer { background: #dbeafe; color: #1e40af; }
.kind-guest     { background: #fef3c7; color: #92400e; }
.kind-unknown,
.kind-          { background: #f3f4f6; color: #6b7280; }

/* ── Filter bar ───────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 0.85rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
  align-items: flex-start;
}
.filter-group {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.filter-group-core {
  flex: 1 1 420px;
}
.filter-group-tags {
  border-left: 2px solid #dbe3f5;
  padding-left: 0.9rem;
  flex: 1 1 260px;
}
.filter-group-label {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #6b7280;
  background: #eef2ff;
  border: 1px solid #dbe3f5;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}
.paused-review-form {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.25rem 0.4rem;
}
.paused-review-form select {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.8rem;
  padding: 0.2rem 0.45rem;
  background: #fff;
}
.header-actions { display: flex; gap: 0.5rem; }
.activity-log-page {
  display: grid;
  gap: 1.25rem;
}
.log-section {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.log-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.8rem;
}
.log-section-head h3 {
  font-size: 1.05rem;
}
.log-section-head .muted {
  font-size: 0.82rem;
}
.log-table {
  min-width: 0;
}
.log-message-cell {
  overflow-wrap: anywhere;
  word-break: break-word;
}
.log-error-text {
  color: #991b1b;
  font-weight: 600;
}
.log-action-pill {
  display: inline-block;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.log-toggle-btn {
  margin-top: 0.7rem;
}

@media (max-width: 900px) {
  .container {
    margin-top: 1.25rem;
  }
  .search-bar input {
    max-width: 100%;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 16px;
  }
  .navbar {
    padding: 0.9rem 1rem;
  }
  .navbar .brand {
    width: 100%;
  }
  .navbar .nav-links {
    width: 100%;
    justify-content: flex-start;
  }
  .navbar .nav-links a {
    flex: 0 1 auto;
  }
  .page-header {
    align-items: stretch;
  }
  .page-header > div,
  .page-header > a,
  .page-header .header-actions,
  .page-header .header-actions form {
    width: 100%;
  }
  .page-header .header-actions {
    flex-direction: column;
  }
  .page-header .btn,
  .page-header .header-actions .btn {
    width: 100%;
  }
  .btn-row {
    flex-direction: column;
  }
  .btn-row .btn,
  .btn-row a.btn {
    width: 100%;
  }
  .person-header {
    align-items: flex-start;
    flex-direction: column;
  }
  .status-card {
    padding: 0.9rem;
  }
  .status-card-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .status-action-form .btn {
    max-width: none;
  }
  .filter-group,
  .filter-group-core,
  .filter-group-tags {
    width: 100%;
  }
  .filter-group-tags {
    border-left: 0;
    border-top: 2px solid #dbe3f5;
    padding-left: 0;
    padding-top: 0.6rem;
  }
  .paused-review-form {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }
  .admin-filter-form {
    grid-template-columns: 1fr;
  }
  .admin-filter-actions {
    flex-direction: column;
  }
  .admin-filter-actions .btn {
    width: 100%;
  }
  .activity-log-page {
    gap: 1rem;
  }
  .log-section {
    padding: 0.9rem;
  }
  .log-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  .responsive-table,
  .responsive-table thead,
  .responsive-table tbody,
  .responsive-table tr,
  .responsive-table td {
    display: block;
  }
  .responsive-table {
    min-width: 0;
    box-shadow: none;
    background: transparent;
  }
  .responsive-table thead {
    display: none;
  }
  .responsive-table tbody {
    display: grid;
    gap: 0.85rem;
  }
  .responsive-table tbody tr {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    padding: 0.25rem 0;
  }
  .responsive-table tbody tr:hover {
    background: #fff;
  }
  .responsive-table td {
    border-bottom: 1px solid #f3f4f6;
    padding: 0.7rem 0.9rem;
  }
  .responsive-table td:last-child {
    border-bottom: 0;
  }
  .responsive-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #64748b;
  }
  .activity-log-page .responsive-table tbody {
    gap: 0.65rem;
  }
  .activity-log-page .responsive-table tbody tr {
    padding: 0.15rem 0;
  }
  .activity-log-page .responsive-table td {
    padding: 0.58rem 0.8rem;
  }
  .activity-log-page .responsive-table td::before {
    margin-bottom: 0.16rem;
    font-size: 0.69rem;
  }
  .activity-log-page .badge,
  .activity-log-page .log-action-pill {
    font-size: 0.74rem;
  }
  .log-toggle-btn {
    width: 100%;
  }
  .action-cell {
    min-width: 0;
  }
  .action-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.65rem;
  }
}

@media (max-width: 700px) {
  .filter-group-tags {
    border-left: 0;
    border-top: 2px solid #dbe3f5;
    padding-left: 0;
    padding-top: 0.6rem;
    width: 100%;
  }
}

/* ── Dark mode ────────────────────────────────── */
html[data-theme="dark"] body {
  background: #0f172a;
  color: #e5eefb;
}
html[data-theme="dark"] a {
  color: #93c5fd;
}
html[data-theme="dark"] .navbar {
  background: #020617;
  border-bottom: 1px solid #172036;
}
html[data-theme="dark"] .navbar .nav-links a {
  color: #cbd5e1;
}
html[data-theme="dark"] .navbar .nav-links a:hover,
html[data-theme="dark"] .navbar .brand {
  color: #f8fafc;
}
html[data-theme="dark"] .navbar .nav-links a.is-active {
  background: rgba(148,163,184,.2);
}
html[data-theme="dark"] .theme-toggle {
  border-color: rgba(148,163,184,.28);
  background: rgba(15,23,42,.65);
  color: #e5eefb;
}
html[data-theme="dark"] .theme-toggle:hover {
  background: rgba(51,65,85,.8);
}
html[data-theme="dark"] .theme-corner .theme-toggle {
  border-color: #334155;
  background: #111827;
  color: #e5eefb;
}
html[data-theme="dark"] .theme-corner .theme-toggle:hover {
  background: #1e293b;
}
html[data-theme="dark"] .alert-success {
  background: #052e2b;
  color: #86efac;
}
html[data-theme="dark"] .alert-danger {
  background: #3b1212;
  color: #fecaca;
}
html[data-theme="dark"] .alert-info {
  background: #102a43;
  color: #bfdbfe;
}
html[data-theme="dark"] .search-bar input,
html[data-theme="dark"] .field input[type="text"],
html[data-theme="dark"] .field input[type="password"],
html[data-theme="dark"] .field select,
html[data-theme="dark"] .note-form textarea,
html[data-theme="dark"] .pause-form select,
html[data-theme="dark"] .paused-review-form,
html[data-theme="dark"] .paused-review-form select {
  background: #0f172a;
  color: #e5eefb;
  border-color: #334155;
}
html[data-theme="dark"] .search-bar input::placeholder,
html[data-theme="dark"] .note-form textarea::placeholder {
  color: #94a3b8;
}
html[data-theme="dark"] table,
html[data-theme="dark"] .auth-card,
html[data-theme="dark"] .admin-filter-form,
html[data-theme="dark"] .person-card,
html[data-theme="dark"] .note-card,
html[data-theme="dark"] .account-session-card,
html[data-theme="dark"] .recent-notes-panel {
  background: #111827;
  color: #e5eefb;
  border-color: #1f2937;
  box-shadow: 0 10px 30px rgba(2,6,23,.28);
}
html[data-theme="dark"] thead th {
  background: #172033;
  color: #94a3b8;
  border-bottom-color: #273449;
}
html[data-theme="dark"] tbody tr,
html[data-theme="dark"] .activity-table thead th,
html[data-theme="dark"] .person-actions {
  border-bottom-color: #1f2937;
  border-top-color: #1f2937;
}
html[data-theme="dark"] tbody tr:hover,
html[data-theme="dark"] .recent-notes-row,
html[data-theme="dark"] .recent-notes-row:hover {
  background: #172033;
}
html[data-theme="dark"] .name-col a,
html[data-theme="dark"] .person-meta,
html[data-theme="dark"] .field label,
html[data-theme="dark"] .account-meta {
  color: #e5eefb;
}
html[data-theme="dark"] .btn-secondary {
  background: #1e293b;
  color: #e5eefb;
}
html[data-theme="dark"] .btn-primary {
  background: #3b82f6;
}
html[data-theme="dark"] .back-link,
html[data-theme="dark"] .auth-card .subtitle,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .activity-block h4,
html[data-theme="dark"] .recent-note-meta,
html[data-theme="dark"] .recent-notes-header,
html[data-theme="dark"] .filter-group-label,
html[data-theme="dark"] .activity-table thead th,
html[data-theme="dark"] .responsive-table td::before {
  color: #94a3b8;
}
html[data-theme="dark"] .account-panel {
  background: #0f172a;
  border-color: #334155;
}
html[data-theme="dark"] .status-card {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 10px 30px rgba(2,6,23,.22);
}
html[data-theme="dark"] .note-card-pause {
  background: #3a2b10;
  border-color: #d97706;
}
html[data-theme="dark"] .filter-group-tags {
  border-left-color: #334155;
}
html[data-theme="dark"] .filter-group-label {
  background: #172554;
  border-color: #1d4ed8;
}
html[data-theme="dark"] .empty-state {
  color: #94a3b8;
}
html[data-theme="dark"] .danger-btn {
  background: #3f1d1d;
  color: #fecaca;
}
html[data-theme="dark"] .danger-btn:hover {
  background: #5b2020;
}
html[data-theme="dark"] .log-section {
  background: #111827;
  border-color: #1f2937;
  box-shadow: 0 10px 30px rgba(2,6,23,.22);
}
html[data-theme="dark"] .log-error-text {
  color: #fecaca;
}
html[data-theme="dark"] .log-action-pill {
  background: #172554;
  color: #bfdbfe;
}
html[data-theme="dark"] .kind-unknown,
html[data-theme="dark"] .kind- {
  background: #334155;
  color: #cbd5e1;
}
html[data-theme="dark"] .badge {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
html[data-theme="dark"] .badge-info {
  background: #102a43;
  color: #bfdbfe;
}
html[data-theme="dark"] .badge-warning,
html[data-theme="dark"] .badge-paused,
html[data-theme="dark"] .badge-pause-link {
  background: #3a2b10;
  color: #fde68a;
}
html[data-theme="dark"] .badge-success,
html[data-theme="dark"] .kind-regular {
  background: #052e2b;
  color: #86efac;
}
html[data-theme="dark"] .badge-pause-note {
  background: #3c2415;
  color: #fdba74;
}
html[data-theme="dark"] .kind-volunteer {
  background: #102a43;
  color: #bfdbfe;
}
html[data-theme="dark"] .kind-guest {
  background: #3a2b10;
  color: #fde68a;
}
html[data-theme="dark"] .activity-table td {
  border-bottom-color: #1f2937;
}
html[data-theme="dark"] .expand-details summary {
  color: #93c5fd;
}

@media (max-width: 760px) {
  html[data-theme="dark"] .filter-group-tags {
    border-top-color: #334155;
  }
  html[data-theme="dark"] .responsive-table,
  html[data-theme="dark"] .responsive-table tbody tr:hover {
    background: transparent;
  }
  html[data-theme="dark"] .responsive-table tbody tr {
    background: #111827;
    border-color: #334155;
    box-shadow: 0 8px 24px rgba(2,6,23,.24);
  }
  html[data-theme="dark"] .responsive-table td {
    border-bottom-color: #1f2937;
  }
}
