/* User activity page (activity.html).
 *
 * Deliberately the same visual language as users.html, the other standalone
 * admin page - dark gradient ground, one white card, navy accents - so the two
 * read as a pair. It lives here rather than in a <style> block because the page
 * is new; users.html's inline styles predate css/ and are left alone. */

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  padding: 40px 20px;
}

.page-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 40px;
  max-width: 1200px;
  margin: 0 auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-header-left { display: flex; align-items: center; gap: 16px; }
.page-header-left i { font-size: 32px; color: #0f3460; }
.page-header-left h1 { font-size: 24px; font-weight: 700; color: #1a1a2e; margin: 0; }

.btn {
  padding: 9px 18px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: #0f3460; color: #0f3460; transform: translateY(-1px); }
.btn-primary {
  border: none;
  background: linear-gradient(135deg, #0f3460, #1a1a2e);
  color: #fff;
}
.btn-primary:hover { color: #fff; box-shadow: 0 6px 20px rgba(15, 52, 96, 0.4); }
.btn-back {
  display: inline-block;
  padding: 10px 20px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  background: #fff;
  color: #1a1a2e;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.btn-back:hover { border-color: #0f3460; color: #0f3460; transform: translateY(-1px); }

/* ---- access refusal ---- */
.denied {
  text-align: center;
  padding: 60px 20px;
  color: #991b1b;
}
.denied i { font-size: 40px; margin-bottom: 12px; display: block; }
.denied p { font-size: 16px; font-weight: 600; margin: 0; }

/* ---- filters ---- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px;
  padding: 18px;
  margin-bottom: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; }
.filter-field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #475569;
}
.filter-field select,
.filter-field input {
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #1a1a2e;
  transition: border-color 0.2s;
}
.filter-field select:focus,
.filter-field input:focus { outline: none; border-color: #0f3460; }
.filter-actions { display: flex; gap: 8px; margin-left: auto; }

/* ---- summary cards ---- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}
.card {
  background: #0f3460;
  border-radius: 12px;
  padding: 18px;
  text-align: center;
  color: #fff;
}
.card .value { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.card .label { font-size: 0.8rem; color: #bfd3e6; margin-top: 4px; }

/* ---- panels & tables ---- */
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { margin-bottom: 28px; }
.panel h2 {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel h2 i { color: #0f3460; }

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
.data-table thead th {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 14px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  white-space: nowrap;
}
.data-table th.num, .data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody td {
  padding: 10px 14px;
  font-size: 14px;
  color: #333;
  border-bottom: 1px solid #eee;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(15, 52, 96, 0.04); }
.data-table tbody tr.is-selected { background: rgba(15, 52, 96, 0.10); }
.data-table tbody tr.clickable { cursor: pointer; }

.when { white-space: nowrap; font-variant-numeric: tabular-nums; }
.muted { color: #6c757d; }
.never { color: #6c757d; font-style: italic; }
.page-name { color: #0f3460; font-weight: 600; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-admin   { background: #ede9fe; color: #5b21b6; }
.badge-user    { background: #e0f2fe; color: #075985; }
.badge-blocked { background: #fee2e2; color: #991b1b; margin-left: 6px; }

/* ---- result meta, empty state, pager ---- */
.result-meta {
  font-size: 13px;
  color: #475569;
  margin-bottom: 10px;
}
.empty-state { text-align: center; padding: 40px 20px; color: #94a3b8; }
.empty-state i { font-size: 32px; margin-bottom: 10px; display: block; }
.empty-state p { margin: 0; font-size: 14px; }

.pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}
.pager .page-of { font-size: 13px; color: #475569; }
.pager button[disabled] { opacity: 0.45; cursor: default; transform: none; border-color: #e0e0e0; }

@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  body { padding: 20px 10px; }
  .page-card { padding: 24px 16px; }
  .filter-actions { margin-left: 0; }
  .data-table thead th, .data-table tbody td { padding: 9px 8px; font-size: 13px; }
}
