.admin-container {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: calc(100vh - 120px);
  background: rgba(0, 0, 0, 0.6);
}

@media (max-width: 820px) {
  .admin-container {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    order: 2;
  }
}

/* SIDEBAR */
.admin-sidebar {
  background: rgba(0, 0, 0, 0.75);
  border-right: 2px solid var(--border-medium);
  padding: 2rem 1.5rem;
}

.admin-profile {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.avatar-placeholder {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--site-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #000;
  flex-shrink: 0;
}

.admin-info h3 {
  margin: 0 0 0.3rem;
  font-size: 1.1rem;
  color: #eee;
}

.role-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  background: rgba(var(--site-accent-rgb), 0.2);
  border: 1px solid var(--site-accent);
  border-radius: 3px;
  letter-spacing: 1px;
}

.logout-btn {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid #ff5555;
  color: #ff5555;
  font-family: 'VT323', monospace;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #ff5555;
  color: #000;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-tab {
  width: 100%;
  padding: 0.9rem 1rem;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 1px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 4px;
}

.nav-tab:hover {
  background: rgba(var(--site-accent-rgb), 0.1);
  color: var(--site-accent);
}

.nav-tab.active {
  background: var(--site-accent);
  color: #000;
  border-color: var(--site-accent);
}

/* MAIN CONTENT */
.admin-main {
  padding: 2rem;
}

.admin-tab h2 {
  margin: 0 0 1.5rem;
  color: var(--site-accent);
  font-size: 1.8rem;
  letter-spacing: 2px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--site-accent);
  border-radius: 4px;
}

.stat-value {
  font-size: 2rem;
  color: var(--site-accent);
  font-weight: bold;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

/* FORMS */
.admin-form {
  max-width: 600px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.admin-form label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
}

.admin-form input,
.admin-form textarea {
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-medium);
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
}

.admin-form input:focus,
.admin-form textarea:focus {
  outline: none;
  box-shadow: 0 0 10px rgba(var(--site-accent-rgb), 0.5);
}

.admin-form button[type="submit"] {
  padding: 0.9rem 2rem;
  background: var(--site-accent);
  color: #000;
  border: 2px solid #000;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.admin-form button[type="submit"]:hover {
  background: #000;
  color: var(--site-accent);
}

/* FEED EDITOR */
.new-post-btn {
  padding: 0.75rem 1.5rem;
  background: var(--site-accent);
  color: #000;
  border: none;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 1px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.feed-editor {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid var(--border-medium);
  border-radius: 4px;
}

.feed-editor textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.8rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-medium);
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.cancel-btn {
  padding: 0.6rem 1rem;
  background: transparent;
  border: 1px solid var(--text-muted);
  color: var(--text-muted);
  cursor: pointer;
}

.submit-btn {
  padding: 0.6rem 1rem;
  background: var(--site-accent);
  color: #000;
  border: none;
  cursor: pointer;
}

/* LISTS */
.feed-list,
.admin-appreciation-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.post-item,
.appreciation-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-left: 3px solid var(--site-accent);
  border-radius: 4px;
  position: relative;
}

.post-content,
.appreciation-text {
  flex: 1;
  color: #eee;
  font-size: 1.05rem;
  line-height: 1.5;
}

.post-meta,
.appreciation-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.pin-indicator {
  color: var(--site-accent);
  font-size: 1.2rem;
}

.action-buttons {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.4rem 0.6rem;
  background: transparent;
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  border-radius: 3px;
}

.action-btn:hover {
  background: rgba(var(--site-accent-rgb), 0.1);
  color: var(--site-accent);
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 20px);
  z-index: 9500;
  padding: 0.75rem 1.5rem;
  background: var(--site-accent);
  color: #000;
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  border: 2px solid #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.25s;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.err {
  background: #ff5555;
}

/* Artist switcher (staff) */
.artist-switcher {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.artist-switcher label {
  display: block;
  font-family: 'VT323', monospace;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.artist-switcher select {
  width: 100%;
  padding: 0.6rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-medium);
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.admin-hint {
  max-width: 560px;
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.claim-status {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.claim-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-left: 3px solid var(--border-medium);
  border-radius: 0 4px 4px 0;
}

.claim-row.is-approved { border-left-color: var(--site-accent); }
.claim-row.is-rejected { border-left-color: #ff5555; }
.claim-row.is-pending  { border-left-color: #ffcc00; }

.claim-row .claim-artist {
  color: var(--site-accent);
  font-size: 1.05rem;
}

.claim-row .claim-state {
  margin-left: auto;
  font-size: 0.8rem;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.claim-actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}

.claim-actions button {
  padding: 0.45rem 0.9rem;
  font-family: 'VT323', monospace;
  font-size: 0.95rem;
  letter-spacing: 1px;
  cursor: pointer;
  border-radius: 3px;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-muted);
  transition: all 0.2s;
}

.claim-actions .approve-btn:hover {
  background: var(--site-accent);
  border-color: var(--site-accent);
  color: #000;
}

.claim-actions .reject-btn:hover {
  background: #ff5555;
  border-color: #ff5555;
  color: #000;
}

.empty-note {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-muted);
  border: 1px dashed var(--border-subtle);
  border-radius: 4px;
}

.invite-panel {
  max-width: 620px;
  margin-top: 2.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border-subtle);
}

.invite-panel h3 {
  margin: 0 0 0.5rem;
  color: var(--site-accent);
  letter-spacing: 2px;
}

.invite-controls {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
}

.invite-controls label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: 'VT323', monospace;
  font-size: 0.88rem;
  letter-spacing: 1px;
  color: var(--text-muted);
}

/* ---------- CONTINUED: INVITE PANEL ---------- */
.invite-controls select {
  padding: 0.55rem 0.8rem;
  background: rgba(0, 0, 0, 0.7);
  border: 1px solid var(--border-medium);
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  font-size: 1rem;
  border-radius: 3px;
}

#gen-code-btn {
  padding: 0.6rem 1.3rem;
  background: var(--site-accent);
  color: #000;
  border: 2px solid #000;
  font-family: 'VT323', monospace;
  font-size: 1rem;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.2s;
}
#gen-code-btn:hover {
  background: #000;
  color: var(--site-accent);
}

.invite-result {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(67, 255, 145, 0.08);
  border: 1px solid var(--site-accent);
  border-radius: 4px;
}

.invite-result .code-display {
  font-size: 2rem;
  letter-spacing: 6px;
  text-align: center;
  padding: 1rem 0;
  background: rgba(0, 0, 0, 0.6);
  margin: 0.75rem 0;
  font-family: 'VT323', monospace;
  color: var(--site-accent);
}

.invite-result .copy-link {
  word-break: break-all;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.invite-list {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.code-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.5);
  border-left: 3px solid var(--border-medium);
  border-radius: 3px;
}

.code-item.is-active { border-left-color: var(--site-accent); }
.code-item.is-used { border-left-color: #888; opacity: 0.7; }
.code-item.is-expired { border-left-color: #ffaa00; }
.code-item.is-revoked { border-left-color: #ff5555; }

.code-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.code-value {
  font-family: 'VT323', monospace;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--site-accent);
}

.code-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.code-status {
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 1px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.code-actions {
  display: flex;
  gap: 0.4rem;
}

.revive-btn, .revoke-btn {
  padding: 0.35rem 0.7rem;
  font-family: 'VT323', monospace;
  font-size: 0.8rem;
  border: 1px solid var(--border-medium);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 3px;
}
.revoke-btn:hover {
  border-color: #ff5555;
  color: #ff5555;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.data-table th,
.data-table td {
  padding: 0.75rem;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
}

.data-table th {
  background: rgba(var(--site-accent-rgb), 0.1);
  font-weight: bold;
}

.data-table .matched { color: var(--site-accent); }
.data-table .unmatched { color: var(--text-muted); }

.status-open { color: var(--accent); }
.status-ignored { color: var(--text-muted); }
.status-merged { color: #00ff00; }

.filters {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.filters input,
.filters select {
  padding: 0.5rem;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-medium);
  color: inherit;
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.stat-card {
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid var(--border-medium);
  padding: 1rem;
  border-left: 3px solid var(--site-accent);
  border-radius: 4px;
  text-align: center;
}

.stat-value {
  font-size: 2rem;
  color: var(--site-accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  letter-spacing: 1px;
}

.action-btn {
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--site-accent);
  color: var(--site-accent);
  font-family: 'VT323', monospace;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: var(--site-accent);
  color: #000;
}

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.dialog-overlay > * {
  background: var(--bg);
  border: 2px solid var(--site-accent);
  padding: 2rem;
  max-width: 400px;
  width: 90%;
}

.dialog-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

.code-info {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.code-artist {
  font-family: 'VT323', monospace;
  font-size: 1.05rem;
  letter-spacing: 2px;
  color: #fff;
  text-transform: uppercase;
}

.code-value {
  font-family: 'VT323', monospace;
  font-size: 1.25rem;
  letter-spacing: 3px;
  color: var(--site-accent);
  text-shadow: 0 0 8px var(--site-accent);
}

.code-dates {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dialog-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0 0 1rem;
}
.dialog-field {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
.dialog-field input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(109, 74, 255, 0.35);
  border-radius: 4px;
  color: #fff;
  font-family: inherit;
}

/* Override VT323 for data tables — Cyrillic + emoji safe */
.data-table td,
.data-table th {
  font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}




/* Notifications */
/* Notifications tab */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed var(--border-medium);
  background: rgba(0, 10, 0, 0.3);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--site-accent);
  cursor: pointer;
}

#specific-user-wrap {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-subtle);
}

#specific-user-wrap label {
  color: var(--site-accent);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: block;
}

#notif-slug {
  width: 100%;
  padding: 0.7rem;
  background: var(--bg-secondary);
  color: var(--site-accent);
  border: 1px solid var(--border-medium);
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

/* Notifications tab */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem;
  border: 1px dashed var(--border-medium);
  background: rgba(0, 10, 0, 0.3);
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--site-accent);
  cursor: pointer;
}

#specific-user-wrap {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--border-subtle);
}

#specific-user-wrap label {
  color: var(--site-accent);
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: block;
}

#notif-slug {
  width: 100%;
  padding: 0.7rem;
  background: var(--bg-secondary);
  color: var(--site-accent);
  border: 1px solid var(--border-medium);
  font-family: 'VT323', monospace;
  font-size: 1rem;
}

.section-title {
  letter-spacing: 2px;
  color: var(--site-accent);
  margin: 1.75rem 0 0.25rem;
  font-size: 0.95rem;
}
.section-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0 0 0.75rem;
  max-width: 62ch;
}
.preset-add-row {
  display: flex;
  gap: 0.5rem;
  margin: 0.75rem 0 1rem;
}
.preset-add-row input { flex: 1; }
.preset-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.preset-row.is-off { opacity: 0.45; }
.preset-label { flex: 1 1 340px; min-width: 220px; }
.preset-order { width: 72px; }

/* DATABASE SCANNER STYLES */
#db-table-list {
  margin-top: 1rem;
}

.table-wrapper {
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
}

.data-table th {
  position: sticky;
  top: 0;
  background: rgba(var(--site-accent-rgb), 0.15);
  z-index: 1;
}

.data-table td,
.data-table th {
  white-space: nowrap;
  font-family: 'Segoe UI', system-ui, sans-serif;
}

.code-snippet {
  font-family: monospace;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.2rem 0.4rem;
  border-radius: 2px;
}

.db-summary-card {
  text-align: center;
  padding: 1rem;
}

.db-summary-card .stat-value {
  font-size: 1.5rem;
}

/* Detail view transitions */
#db-detail-view {
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.danger {
  border-color: #ff5555 !important;
  color: #ff5555 !important;
}

.danger:hover {
  background: #ff5555 !important;
  color: #000 !important;
}

/* USERS MANAGEMENT STYLES */
.modal-content {
  background: rgba(0, 0, 0, 0.95);
  border: 2px solid var(--site-accent);
  border-radius: 6px;
  padding: 2rem;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

.users-warning {
  padding: 0.75rem;
  background: rgba(255, 170, 0, 0.1);
  border-left: 3px solid #ffaa00;
  color: #ffaa00;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.users-danger {
  padding: 0.75rem;
  background: rgba(255, 85, 85, 0.1);
  border-left: 3px solid #ff5555;
  color: #ff5555;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.user-action-btn {
  padding: 0.4rem 0.6rem;
  margin-right: 0.3rem;
}

.badge-role {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 3px;
  background: rgba(var(--site-accent-rgb), 0.2);
  border: 1px solid var(--site-accent);
}

/* USERS MODAL FIX — overrides hidden when dialog opens */
#users-modal:not([hidden]) {
  display: flex !important;
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0, 0, 0, 0.85) !important;
  align-items: center !important;
  justify-content: center !important;
  z-index: 99999 !important;
}

.modal-content {
  background: rgba(0, 0, 0, 0.95) !important;
  border: 2px solid var(--site-accent) !important;
  border-radius: 6px !important;
  padding: 2rem !important;
  max-width: 700px !important;
  width: 90% !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  box-shadow: 0 0 50px rgba(var(--site-accent-rgb), 0.3) !important;
  position: relative !important;
}

/* Force dialog-overlay to work for users modal */
#users-modal.dialog-overlay {
  display: none; /* Hidden by default */
}

#users-modal.dialog-overlay[hidden] {
  display: none !important;
}

/* Edit buttons in user modal */
#edit-name-btn,
#edit-email-btn,
#edit-slug-btn,
#toggle-verified-btn,
#toggle-wall-btn {
  padding: 0.5rem 1rem;
  border-radius: 4px;
}

#toggle-verified-btn {
  background: rgba(255, 170, 0, 0.1);
  border-color: #ffaa00;
  color: #ffaa00;
}

#toggle-verified-btn:hover {
  background: #ffaa00;
  color: #000;
}

#toggle-wall-btn {
  background: rgba(0, 255, 0, 0.1);
  border-color: #00ff00;
  color: #00ff00;
}

#toggle-wall-btn:hover {
  background: #00ff00;
  color: #000;
}
/* ==== [AVATAR-CAGE] injected avatar img stays inside its cell ====
      admin.js injects <img> raw into #admin-avatar; without a cap it
      renders natural-size (viewport kaiju). Crop politely instead. ==== */
.avatar-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}

/* ==== [VISITOR-SCROLL] wide tables scroll sideways, not amputated ==== */
#visits-list {
  overflow-x: auto;
}
#visits-list .data-table {
  min-width: 1150px;
}
#visits-list td small {
  opacity: 0.7;
  font-size: 0.85em;
}

/* ==== [VISIT-SORT] headers invite clicks ==== */
#visits-list th[data-k] {
  cursor: pointer;
  user-select: none;
}
#visits-list th[data-k]:hover {
  text-decoration: underline;
}

/* ==== [VISIT-PAGER] forceful scroll + pager chrome ==== */
#visits-list {
  overflow-x: auto;
  max-width: 100%;
}
#visits-list .data-table {
  width: max-content;
  min-width: 1400px;
}
.visit-pager {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.25rem;
  letter-spacing: 1px;
  opacity: 0.85;
}
.visit-pager button {
  cursor: pointer;
}
.visit-pager button:disabled {
  opacity: 0.35;
  cursor: default;
}

/* ==== [VISITS-HSCROLL] table overflows instead of squishing ====
      #visits-list carries overflow-x; min-width forces the content
      wider than the box so the scroll actually engages. ==== */
#visits-list .data-table {
  min-width: 980px;
}

/* ==== [CONTACT-TAB] inbox styles — appended, elders untouched ==== */
.cm-unread td { font-weight: 700; }
.cm-email { opacity: .7; font-size: .85em; }
.cm-preview { opacity: .75; }
.cm-full { white-space: pre-wrap; }
.cm-when { white-space: nowrap; }
