/* ── Reset & Variables ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:      #1a1a1e;
  --panel:   #23232a;
  --panel2:  #2c2c35;
  --border:  #35353f;
  --accent:  #A3E635;
  --accent2: #ff6b35;
  --text:    #e8e8f0;
  --muted:   #7a7a90;
  --danger:  #ff4466;
  --success: #4caf50;
  --warning: #ff9800;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.5;
}

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

/* ── Top Navigation ─────────────────────────────────────────────────────── */
.topnav {
  background: var(--panel);
  border-bottom: 1px solid rgba(163,230,53,.12);
  box-shadow: 0 4px 28px rgba(0,0,0,.40), 0 1px 0 rgba(163,230,53,.06);
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 18px rgba(163,230,53,.35);
}
.brand:hover { text-decoration: none; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding-left: 8px;
  border-left: 1px solid var(--border);
  margin-left: 8px;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s;
}
.nav-link:hover {
  color: var(--accent);
  background: rgba(163,230,53,.07);
  border-color: rgba(163,230,53,.18);
  box-shadow: 0 0 10px rgba(163,230,53,.12);
  text-decoration: none;
}
.nav-link.active {
  color: var(--accent);
  background: rgba(163,230,53,.11);
  border-color: rgba(163,230,53,.30);
  box-shadow: 0 0 14px rgba(163,230,53,.18), inset 0 0 8px rgba(163,230,53,.04);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.nav-username {
  color: var(--text);
  font-size: 13px;
}

.nav-role-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(163,230,53,.7);
  background: rgba(163,230,53,.08);
  border: 1px solid rgba(163,230,53,.15);
  padding: 3px 8px;
  border-radius: 10px;
}

.nav-logout {
  color: var(--muted);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color .18s, background .18s, border-color .18s;
}
.nav-logout:hover {
  color: var(--danger);
  background: rgba(255,68,102,.08);
  border-color: rgba(255,68,102,.22);
  text-decoration: none;
}

/* ── Page Layout ────────────────────────────────────────────────────────── */
.page-main {
  flex: 1;
  padding: 32px 0;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}

.page-subtitle {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
  margin-bottom: 24px;
}

/* ── Buttons ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity .15s, filter .15s;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn:active { filter: brightness(.9); }

.btn-primary   { background: var(--accent); color: #1a1a1e; }
.btn-secondary { background: var(--panel2); color: var(--text); border: 1px solid var(--border); }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-ghost     { background: transparent; color: var(--muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-sm        { padding: 6px 12px; font-size: 12px; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 28px 32px;
  max-width: 580px;
}

.form-card.form-card-wide {
  max-width: 760px;
}

.form-section-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 16px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.form-section-title:first-child { margin-top: 0; padding-top: 0; border-top: none; }

.form-row {
  margin-bottom: 18px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--panel2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
}
input::placeholder { color: var(--muted); }
select option { background: var(--panel2); }
textarea { resize: vertical; min-height: 80px; }

.field-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
}

.field-error {
  font-size: 12px;
  color: var(--danger);
  margin-top: 5px;
}

/* Password with show/hide toggle */
.input-with-toggle {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-toggle input {
  padding-right: 70px;
}
.toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 6px;
  text-transform: uppercase;
  letter-spacing: .06em;
  transition: color .15s;
}
.toggle-pwd:hover { color: var(--accent); }

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

/* ── Alerts ─────────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 7px;
  margin-bottom: 20px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: rgba(76,175,80,.12);  border: 1px solid rgba(76,175,80,.4);  color: #7ed87e; }
.alert-error   { background: rgba(255,68,102,.12); border: 1px solid rgba(255,68,102,.4); color: #ff7799; }
.alert-warning { background: rgba(255,152,0,.12);  border: 1px solid rgba(255,152,0,.4);  color: #ffb74d; }

.errors-list {
  background: rgba(255,68,102,.08);
  border: 1px solid rgba(255,68,102,.3);
  border-radius: 7px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #ff7799;
  font-size: 13px;
}
.errors-list ul { padding-left: 18px; margin-top: 6px; }
.errors-list li { margin-bottom: 3px; }

/* ── Data Table ─────────────────────────────────────────────────────────── */
.table-wrapper {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  background: var(--panel2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  padding: 11px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: rgba(255,255,255,.025); }
.data-table .actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* ── Badges ─────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
}
.badge-active   { background: rgba(76,175,80,.15);   color: #7ed87e; }
.badge-inactive { background: rgba(255,68,102,.15);  color: #ff7799; }
.badge-admin    { background: rgba(163,230,53,.15);   color: var(--accent); }
.badge-user     { background: rgba(122,122,144,.15); color: var(--muted); }
.badge-super    { background: rgba(255,107,53,.15);  color: var(--accent2); }

/* ── Stat Cards ─────────────────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
}
.stat-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .10em;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.stat-value span {
  font-size: 16px;
  color: var(--muted);
  font-weight: 400;
}

/* ── Empty State ────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state h3 { font-size: 16px; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: 14px; margin-bottom: 20px; }

/* ── Login / Setup Page ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.auth-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 420px;
}
.auth-brand-logo {
  width: 208px;
  height: auto;
  margin-bottom: 42px;
  filter: drop-shadow(0 0 18px rgba(163,230,53,.35));
  animation: materialize .4s ease both;
}
.auth-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 40px 44px;
  width: 100%;
  animation: materialize .4s ease both;
  animation-delay: 90ms;
}
.auth-logo {
  text-align: center;
  margin-bottom: 32px;
}
.auth-logo h1 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.auth-logo p {
  font-size: 13px;
  color: var(--muted);
}
.auth-card .form-row { margin-bottom: 16px; }
.auth-card .btn { width: 100%; margin-top: 8px; padding: 12px; font-size: 14px; }

/* ── Divider ────────────────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ── Util ───────────────────────────────────────────────────────────────── */
.text-muted   { color: var(--muted); }
.text-danger  { color: var(--danger); }
.text-success { color: #7ed87e; }
.text-accent  { color: var(--accent); }
.text-sm      { font-size: 12px; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8        { gap: 8px; }
.gap-16       { gap: 16px; }
.ml-auto      { margin-left: auto; }

/* ── Dashboard Welcome ──────────────────────────────────────────────────── */
.dash-welcome {
  margin-bottom: 40px;
}
.dash-welcome h1 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.dash-welcome p {
  color: var(--muted);
  font-size: 15px;
}
.section-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ── Size Selection Cards ───────────────────────────────────────────────── */
.size-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 20px;
}

.size-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 16px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  transition: border-color .2s, transform .2s, box-shadow .2s;
}
.size-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,.4), 0 0 0 1px rgba(163,230,53,.12);
  text-decoration: none;
}

.size-preview-wrap {
  width: 100%;
  height: 136px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  border-radius: 8px;
  padding: 14px;
}

.size-paper {
  height: 100px;
  max-width: 158px;
  border-radius: 2px;
  position: relative;
  overflow: hidden;
  background: #3d3d4a;
  background-image:
    repeating-linear-gradient(
      to bottom,
      transparent 0px, transparent 11px,
      rgba(255,255,255,.05) 11px, rgba(255,255,255,.05) 12px
    );
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 6px 24px rgba(0,0,0,.55);
  flex-shrink: 0;
}
.size-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,.04) 0%, transparent 60%);
}
.size-paper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 22%;
  background: rgba(163, 230, 53, .08);
}

.size-card-info {
  text-align: center;
}
.size-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 3px;
}
.size-card-dims {
  font-size: 12px;
  color: var(--muted);
}

/* ── Template Gallery ───────────────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 20px;
}
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }
.breadcrumb span { color: var(--border); }

.template-grid {
  --thumb-h: 220px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px;
}

.template-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .2s, transform .2s, box-shadow .2s;
  width: clamp(160px, calc(var(--thumb-h, 220px) * var(--ar, 1.42)), 420px);
}
.template-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(0,0,0,.35);
}

.template-thumb {
  width: 100%;
  height: var(--thumb-h, 220px);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
  overflow: hidden;
  position: relative;
}
.template-thumb img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  box-shadow: 0 3px 18px rgba(0,0,0,.55), 0 1px 4px rgba(0,0,0,.3);
  border-radius: 2px;
}
.template-thumb-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0px, transparent 14px,
      rgba(255,255,255,.03) 14px, rgba(255,255,255,.03) 15px
    ),
    var(--panel2);
  border: 1.5px dashed var(--border);
  border-radius: 2px;
  box-shadow: 0 3px 18px rgba(0,0,0,.45), 0 1px 4px rgba(0,0,0,.25);
}

.template-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.template-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* ── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(3px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 24px;
  /* closed state */
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .5);
  /* closed state — slightly raised and transparent */
  opacity: 0;
  transform: translateY(-10px) scale(.97);
  transition: opacity .22s ease, transform .22s ease;
}
.modal-overlay.active .modal-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  font-size: 20px;
}
.modal-icon-danger { background: rgba(255, 68, 102, .15); color: var(--danger); }

.modal-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.modal-body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.modal-body strong { color: var(--text); }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ── Page & element entrance animations ─────────────────────────────────── */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}

@keyframes materialize {
  from { opacity: 0; transform: translateY(7px) scale(0.97); filter: blur(2px); }
  to   { opacity: 1; transform: translateY(0)   scale(1);    filter: blur(0);   }
}

.page-title-row {
  animation: materialize .28s ease both;
}

/* stat cards stagger via --i set by JS in layout.php footer */
.stat-card {
  animation: materialize .32s ease both;
  animation-delay: calc(var(--i, 0) * 65ms);
}

/* table rows stagger via --i set by JS in layout.php footer */
.data-table tbody tr {
  animation: materialize .28s ease both;
  animation-delay: calc(var(--i, 0) * 50ms);
}

/* template cards stagger via --i set by JS in layout.php footer */
.template-card {
  animation: materialize .32s ease both;
  animation-delay: calc(var(--i, 0) * 55ms);
}

/* dashboard welcome + section label */
.dash-welcome {
  animation: materialize .26s ease both;
}
.section-heading {
  animation: materialize .26s ease both;
  animation-delay: 60ms;
}

/* size-selection cards on dashboard — stagger via --i set by JS */
.size-card {
  animation: materialize .32s ease both;
  animation-delay: calc(var(--i, 0) * 65ms);
}

/* ── Kit selection cards (dashboard) ──────────────────────────────────────── */
.kit-select-card {
  animation: materialize .32s ease both;
  animation-delay: calc(var(--i, 0) * 65ms);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ACTIVITY LOG
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Action icon badge ───────────────────────────────────────────────────── */
.act-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.act-icon--lg { width: 40px; height: 40px; border-radius: 10px; }
.act-icon--lime   { background: rgba(163,230,53,.15);  color: var(--accent); }
.act-icon--blue   { background: rgba(96,165,250,.15);  color: #60a5fa; }
.act-icon--purple { background: rgba(167,139,250,.15); color: #a78bfa; }
.act-icon--red    { background: rgba(255,68,102,.15);  color: var(--danger); }
.act-icon--amber  { background: rgba(251,191,36,.15);  color: #fbbf24; }
.act-icon--muted  { background: rgba(163,163,180,.1);  color: var(--muted); }

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.act-toolbar {
  display: flex; align-items: center; gap: 12px;
  flex-wrap: wrap; margin-bottom: 20px;
}
.act-toolbar-right {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
}

/* Filter pills */
.act-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.act-filter-pill {
  padding: 5px 13px; border-radius: 20px;
  border: 1px solid var(--border); font-size: 12px;
  font-weight: 600; color: var(--muted); letter-spacing: .04em;
  transition: background .18s, color .18s, border-color .18s;
  text-decoration: none;
}
.act-filter-pill:hover { color: var(--text); border-color: var(--accent); text-decoration: none; }
.act-filter-pill.active {
  background: rgba(163,230,53,.12); color: var(--accent);
  border-color: rgba(163,230,53,.35);
}

/* Search */
.act-search-wrap {
  position: relative; display: flex; align-items: center;
}
.act-search-wrap svg { position: absolute; left: 10px; color: var(--muted); pointer-events: none; }
.act-search {
  width: 200px; padding: 7px 12px 7px 32px; background: var(--panel2);
  border: 1px solid var(--border); color: var(--text);
  border-radius: 6px; font-size: 13px; font-family: inherit;
  outline: none; transition: border-color .15s;
}
.act-search:focus { border-color: var(--accent); }
.act-search::placeholder { color: var(--muted); }

/* Per-page select */
.act-per-page {
  padding: 7px 10px; background: var(--panel2); border: 1px solid var(--border);
  color: var(--muted); border-radius: 6px; font-size: 12px;
  font-family: inherit; cursor: pointer; outline: none;
}

/* View toggle buttons */
.act-view-btns {
  display: flex; gap: 0; border: 1px solid var(--border); border-radius: 6px; overflow: hidden;
}
.act-view-btn {
  width: 34px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: var(--panel2); border: none; color: var(--muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.act-view-btn:not(:last-child) { border-right: 1px solid var(--border); }
.act-view-btn.active, .act-view-btn:hover { background: rgba(163,230,53,.1); color: var(--accent); }

/* ── List view ───────────────────────────────────────────────────────────── */
.act-list { display: flex; flex-direction: column; }

.act-date-sep {
  font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 14px 0 8px; border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}
.act-date-sep:first-child { padding-top: 0; }

.act-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 8px; cursor: pointer;
  transition: background .15s; border: 1px solid transparent;
}
.act-row:hover { background: var(--panel2); border-color: var(--border); }

.act-row-content { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.act-row-label   { font-size: 13px; font-weight: 600; color: var(--text); }
.act-row-detail  { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.act-row-right   { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.act-row-time    { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ── Card view ───────────────────────────────────────────────────────────── */
.act-cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px;
}

.act-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; cursor: pointer;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
.act-card:hover {
  border-color: var(--accent); transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.3);
}

.act-card-thumb {
  height: 130px; position: relative; overflow: hidden;
  background: var(--panel2); display: flex; align-items: center; justify-content: center;
}
.act-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.act-card-thumb--red    { background: rgba(255,68,102,.07); }
.act-card-thumb--lime   { background: rgba(163,230,53,.06); }
.act-card-thumb--blue   { background: rgba(96,165,250,.06); }
.act-card-thumb--purple { background: rgba(167,139,250,.06); }
.act-card-thumb--amber  { background: rgba(251,191,36,.06); }
.act-card-thumb--muted  { background: rgba(163,163,180,.05); }

.act-card-icon-wrap { color: var(--muted); opacity: .4; }
.act-card-icon-wrap svg { width: 36px; height: 36px; }

.act-card-deleted-icon { color: var(--danger); opacity: .5; }

.act-card-color-badge {
  position: absolute; bottom: 8px; right: 8px; width: 24px; height: 24px;
  border-radius: 6px; display: flex; align-items: center; justify-content: center;
}
.act-card-color-badge svg { width: 12px; height: 12px; }

.act-card-body { padding: 12px 14px 14px; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.act-card-label  { font-size: 13px; font-weight: 600; color: var(--text); }
.act-card-detail { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-card-meta   { font-size: 11px; color: var(--muted); margin-top: 4px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.act-pagination {
  display: flex; align-items: center; gap: 10px; margin-top: 24px;
  padding-top: 20px; border-top: 1px solid var(--border);
}
.act-page-info  { font-size: 12px; color: var(--muted); margin-right: auto; }
.act-page-btns  { display: flex; align-items: center; gap: 4px; }
.act-page-btn {
  min-width: 34px; height: 32px; padding: 0 10px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500; color: var(--muted);
  border: 1px solid var(--border); background: var(--panel2);
  text-decoration: none; transition: background .15s, color .15s, border-color .15s;
}
.act-page-btn:hover         { color: var(--accent); border-color: var(--accent); text-decoration: none; }
.act-page-btn--active       { background: rgba(163,230,53,.12); color: var(--accent); border-color: rgba(163,230,53,.35); }
.act-page-btn--disabled     { opacity: .38; pointer-events: none; }
.act-page-ellipsis          { color: var(--muted); font-size: 13px; padding: 0 4px; }

/* ── Detail modal ────────────────────────────────────────────────────────── */
.act-modal-card { max-width: 460px; width: calc(100vw - 40px); padding: 0; overflow: hidden; }

.act-modal-header {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 22px 22px 18px; border-bottom: 1px solid var(--border);
}
.act-modal-header-text { flex: 1; min-width: 0; }
.act-modal-action-label { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.act-modal-detail-text  { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-modal-close {
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 4px; border-radius: 4px; display: flex; flex-shrink: 0;
  transition: color .15s;
}
.act-modal-close:hover { color: var(--text); }

.act-modal-section {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 22px; border-bottom: 1px solid var(--border);
}
.act-modal-section:last-of-type { border-bottom: none; }
.act-modal-section-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(163,163,180,.1); color: var(--muted);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Clock */
.act-clock-date   { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 2px; }
.act-clock-phrase { font-size: 12px; color: var(--muted); }

/* Identity card */
.act-modal-idcard { justify-content: flex-start; }
.act-idcard-info  { flex: 1; min-width: 0; }
.act-idcard-name  { font-size: 13px; font-weight: 600; color: var(--text); }
.act-idcard-email { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* Preview section */
.act-modal-preview { padding: 18px 22px 20px; }

.act-preview-img {
  width: 100%; max-height: 200px; object-fit: contain; border-radius: 6px;
  background: var(--panel2); display: block;
}
.act-preview-caption {
  text-align: center; font-size: 11px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .07em; margin-top: 8px;
}

.act-preview-svg-notice {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 0; color: var(--muted);
}
.act-preview-svg-notice span { font-size: 12px; }

/* Deleted notice */
.act-deleted-notice {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 18px; border-radius: 8px;
  background: rgba(255,68,102,.08); border: 1px solid rgba(255,68,102,.22);
  color: var(--danger);
}
.act-deleted-filename { font-size: 12px; font-weight: 600; color: var(--text); word-break: break-all; text-align: center; }
.act-deleted-msg      { font-size: 11px; color: var(--muted); }
