/* Men Too Movement — Admin UI (Audit)
   HB-7C (client) — dedicated stylesheet for /admin/audit.html
   ------------------------------------------------------------------
   Goals:
   • Consistent, beautiful, scalable design (dark theme, tokenized)
   • Lightweight, reusable component styles (inputs, buttons, tables)
   • Strictly CSS (no HTML/JS) and scoped to audit UI classes
   ------------------------------------------------------------------ */

/* ---------- Design tokens ---------- */
:root {
  --mtm-bg: #0b0f14;
  --mtm-surface: #0d1218;
  --mtm-surface-2: #11161b;
  --mtm-border: #1e2530;
  --mtm-border-2: #222a33;
  --mtm-text: #e6edf3;
  --mtm-text-dim: #a9b4bf;
  --mtm-accent: #7dc3ff;
  --mtm-accent-2: #6be6c1;
  --mtm-danger: #ff6b6b;
  --mtm-warning: #f7b955;

  --mtm-radius: 12px;
  --mtm-radius-sm: 8px;
  --mtm-pad: 12px;
  --mtm-gap: 10px;

  --mtm-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --mtm-shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.28);
}

/* ---------- Page base ---------- */
html, body {
  height: 100%;
}
body {
  margin: 24px;
  background: var(--mtm-bg);
  color: var(--mtm-text);
  font: 15px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--mtm-accent);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

.hidden { display: none !important; }
.spacer { flex: 1 1 auto; }

/* ---------- Header ---------- */
h1 {
  font-size: 1.35rem;
  margin: 0 0 14px;
  letter-spacing: 0.2px;
}

/* ---------- Container ---------- */
.audit-root {
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

/* ---------- Controls bar ---------- */
.audit-controls {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mtm-gap);
  align-items: center;
  margin: 0 0 12px;
  padding: 10px;
  background: linear-gradient(180deg, rgba(19,25,33,.7), rgba(13,18,24,.7));
  border: 1px solid var(--mtm-border);
  border-radius: var(--mtm-radius);
  box-shadow: var(--mtm-shadow-soft);
}

/* Labels (inline for compact spacing) */
.audit-controls label {
  color: var(--mtm-text-dim);
  font-size: 0.9rem;
}

/* Inputs / selects / buttons */
.audit-controls input[type="date"],
.audit-controls input[type="search"],
.audit-controls select,
.audit-controls button {
  appearance: none;
  -webkit-appearance: none;
  background: var(--mtm-surface-2);
  color: var(--mtm-text);
  border: 1px solid var(--mtm-border);
  border-radius: var(--mtm-radius-sm);
  padding: 8px 10px;
  line-height: 1.2;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}

.audit-controls input[type="search"]::placeholder {
  color: var(--mtm-text-dim);
}

.audit-controls input[type="date"]:focus,
.audit-controls input[type="search"]:focus,
.audit-controls select:focus,
.audit-controls button:focus {
  outline: none;
  border-color: var(--mtm-accent);
  box-shadow: 0 0 0 2px rgba(125,195,255,0.22);
}

/* Export button */
#auditExport {
  background: linear-gradient(180deg, #122130, #0f1a26);
  border-color: #193043;
  cursor: pointer;
}
#auditExport:hover {
  filter: brightness(1.06);
}

/* Count badge */
.audit-count {
  display: inline-block;
  min-width: 28px;
  text-align: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0f1a26;
  border: 1px solid #1a2b3d;
  color: var(--mtm-accent);
  font-weight: 600;
}

/* ---------- Table ---------- */
.audit-table {
  width: 100%;
  border-collapse: collapse;
  border-radius: var(--mtm-radius);
  overflow: hidden;
  background: var(--mtm-surface);
  box-shadow: var(--mtm-shadow);
  border: 1px solid var(--mtm-border);
}

/* Sticky header */
.audit-table thead th {
  position: sticky;
  top: 0;
  background: #0d1218;
  color: var(--mtm-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.78rem;
  font-weight: 600;
  border-bottom: 1px solid var(--mtm-border-2);
  padding: 10px 12px;
  z-index: 2;
}

/* Body cells */
.audit-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--mtm-border-2);
  vertical-align: top;
  color: var(--mtm-text);
  word-break: break-word;
}

/* Zebra + hover */
.audit-table tbody tr:nth-child(odd) td {
  background: rgba(255,255,255,0.012);
}
.audit-table tbody tr:hover td {
  background: rgba(125,195,255,0.06);
}

/* Links cell buttons */
button.mini {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 7px;
  border: 1px solid var(--mtm-border);
  background: #0f1620;
  color: #c7d1db;
  font-size: 12px;
  cursor: pointer;
  transition: transform .06s ease, filter .12s ease, border-color .12s ease;
}
button.mini:hover {
  filter: brightness(1.08);
  border-color: #2b3948;
}
button.mini:active {
  transform: translateY(1px);
}

/* ---------- Action badges (optional if you add classes later) ---------- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  border: 1px solid var(--mtm-border);
}
.badge.delete   { color: #ffb3b3; background: rgba(255,107,107,0.1); border-color: rgba(255,107,107,0.35); }
.badge.restore  { color: #c3ffd9; background: rgba(107,230,193,0.1); border-color: rgba(107,230,193,0.35); }
.badge.softBan  { color: #ffe2a8; background: rgba(247,185,85,0.12); border-color: rgba(247,185,85,0.35); }
.badge.hardBan  { color: #ffd0d0; background: rgba(255,107,107,0.18); border-color: rgba(255,107,107,0.45); }
.badge.unbanBoth{ color: #bde4ff; background: rgba(125,195,255,0.12); border-color: rgba(125,195,255,0.35); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  body { margin: 18px; }
  .audit-controls { padding: 8px; }
  .audit-table thead th { font-size: 0.74rem; padding: 8px 10px; }
  .audit-table td { padding: 8px 10px; }
}

@media (max-width: 720px) {
  .audit-controls { gap: 8px; }
  .audit-controls input[type="search"] { min-width: 160px; flex: 1 1 160px; }
  .audit-table { display: block; overflow-x: auto; }
  .audit-table table { min-width: 760px; }
}

/* ---------- Accessibility ---------- */
:focus-visible {
  outline: 2px solid var(--mtm-accent);
  outline-offset: 2px;
}
