/* Technical Investigations Toolkit — Production CSS
   Design: dark charcoal/navy · cyan technical accents · Inter + JetBrains Mono
   Compilable via Tailwind optionally; this file is production-ready without Node.
*/

:root {
  --bg-deep: #0b1220;
  --bg-base: #0f172a;
  --bg-elevated: #152033;
  --bg-card: #162033;
  --bg-card-hover: #1a2740;
  --bg-input: #0d1524;
  --border: #243044;
  --border-strong: #334155;
  --border-accent: rgba(56, 189, 248, 0.35);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --accent-glow: rgba(56, 189, 248, 0.12);
  --success: #34d399;
  --success-dim: rgba(52, 211, 153, 0.15);
  --warning: #fbbf24;
  --warning-dim: rgba(251, 191, 36, 0.15);
  --danger: #f87171;
  --danger-dim: rgba(248, 113, 113, 0.15);
  --radius: 6px;
  --radius-lg: 10px;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --shadow: 0 1px 0 rgba(255,255,255,0.03) inset, 0 8px 24px rgba(0,0,0,0.25);
  --header-h: 64px;
  --sidebar-w: 260px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(14, 165, 233, 0.08), transparent),
    linear-gradient(180deg, var(--bg-deep) 0%, var(--bg-base) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #7dd3fc; }
img { max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.mono { font-family: var(--mono); font-size: 0.88em; letter-spacing: -0.01em; }
.label-caps {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Layout */
.container { width: min(1200px, calc(100% - 2rem)); margin-inline: auto; }
.container-wide { width: min(1400px, calc(100% - 2rem)); margin-inline: auto; }

/* Brand mark */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: linear-gradient(145deg, #1e3a5f, #0f2744);
  border: 1px solid var(--border-accent);
  display: grid; place-items: center;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
  overflow: hidden;
}
.brand-mark svg { width: 20px; height: 20px; color: var(--accent); }
.brand-mark-img {
  background: var(--bg-elevated);
  padding: 0;
}
.brand-mark-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.brand-text { display: flex; flex-direction: column; gap: 0.1rem; line-height: 1.2; }
.brand-title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.brand-sub { font-size: 0.72rem; color: var(--text-muted); font-weight: 400; }

/* Status pill */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.status-pill .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}
.status-pill.offline .dot { background: var(--danger); box-shadow: 0 0 8px var(--danger); }
.status-pill.warn .dot { background: var(--warning); box-shadow: 0 0 8px var(--warning); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(12px);
}
.site-header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
}
.header-actions { display: flex; align-items: center; gap: 0.75rem; }

/* Search */
.search-box {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.search-box input {
  width: 100%;
  padding: 0.55rem 0.85rem 0.55rem 2.4rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.search-box input:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
.search-box input::placeholder { color: var(--text-dim); }
.search-box .search-icon {
  position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%);
  width: 16px; height: 16px; color: var(--text-dim); pointer-events: none;
}

/* Category nav */
.cat-nav {
  display: flex;
  gap: 0.4rem;
  overflow-x: auto;
  padding: 0.75rem 0;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.cat-chip {
  flex-shrink: 0;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
}
.cat-chip:hover, .cat-chip.active {
  color: var(--accent);
  border-color: var(--border-accent);
  background: var(--accent-glow);
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: border-color .15s, background .15s, transform .15s;
}
.card:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.resource-card {
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  height: 100%;
  text-decoration: none;
  color: inherit;
  position: relative;
}
.resource-card:hover { color: inherit; }
.resource-card .card-icon {
  width: 42px; height: 42px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  margin-bottom: 0.9rem;
}
.resource-card .card-icon svg { width: 20px; height: 20px; }
.resource-card .card-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
  margin-bottom: 0.9rem;
}
.resource-card .card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail-thumb {
  width: min(220px, 100%);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-input);
}
.detail-thumb img { width: 100%; display: block; aspect-ratio: 16/9; object-fit: cover; }
.branding-preview, .thumb-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 100%;
}
.branding-preview img, .thumb-preview img {
  max-height: 72px;
  max-width: 220px;
  object-fit: contain;
  display: block;
}
.branding-preview-sm img { max-height: 40px; max-width: 40px; }
.sortable-list { display: flex; flex-direction: column; gap: 0.75rem; }
.sortable-item {
  display: flex;
  gap: 0.75rem;
  padding: 0.85rem;
  cursor: grab;
  user-select: none;
}
.sortable-item.dragging {
  opacity: 0.55;
  border-color: var(--border-accent);
  box-shadow: 0 0 0 1px var(--border-accent);
}
.sortable-item.drag-over { border-color: var(--accent); }
.sortable-handle {
  flex-shrink: 0;
  color: var(--text-dim);
  display: grid;
  place-items: center;
  width: 28px;
  cursor: grab;
  padding-top: 0.35rem;
}
.sortable-body { flex: 1; min-width: 0; }
.resource-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.resource-card .card-desc {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.85rem;
  margin-bottom: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}
.meta-item { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }
.meta-item .mono {
  font-size: 0.75rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}
.card-actions { display: flex; gap: 0.5rem; margin-top: auto; }
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-new { background: var(--accent-glow); color: var(--accent); border: 1px solid var(--border-accent); }
.badge-featured { background: var(--success-dim); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }
.badge-external { background: rgba(148,163,184,0.12); color: var(--text-muted); border: 1px solid var(--border); }
.badge-draft { background: var(--warning-dim); color: var(--warning); border: 1px solid rgba(251,191,36,0.3); }
.badge-archived { background: rgba(100,116,139,0.2); color: var(--text-dim); border: 1px solid var(--border); }
.badge-published { background: var(--success-dim); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }

.card-badges {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: flex;
  gap: 0.35rem;
}

/* Grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.stat-card {
  padding: 1.15rem 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.stat-card .stat-label { margin-top: 0.2rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  white-space: nowrap;
}
.btn:hover { background: var(--bg-card-hover); color: var(--text); border-color: var(--border-strong); }
.btn svg { width: 16px; height: 16px; }
.btn-primary {
  background: linear-gradient(180deg, #0ea5e9, #0284c7);
  border-color: #0284c7;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.12) inset, 0 4px 12px rgba(14,165,233,0.25);
}
.btn-primary:hover { background: linear-gradient(180deg, #38bdf8, #0ea5e9); color: #fff; }
.btn-ghost { background: transparent; }
.btn-danger { background: var(--danger-dim); border-color: rgba(248,113,113,0.35); color: var(--danger); }
.btn-danger:hover { background: rgba(248,113,113,0.25); color: #fecaca; }
.btn-sm { padding: 0.35rem 0.7rem; font-size: 0.75rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Forms */
.form-group { margin-bottom: 1.15rem; }
.form-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.form-control {
  width: 100%;
  padding: 0.6rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus {
  border-color: var(--accent-dim);
  box-shadow: 0 0 0 3px var(--accent-glow);
  outline: none;
}
textarea.form-control { min-height: 110px; resize: vertical; }
.form-hint { margin-top: 0.35rem; font-size: 0.75rem; color: var(--text-dim); }
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.checkbox-row {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.88rem; color: var(--text-muted);
}
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--accent); }

/* Login */
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}
.auth-card {
  width: min(420px, 100%);
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.auth-card .auth-header { text-align: center; margin-bottom: 1.75rem; }
.auth-card .auth-header .brand { justify-content: center; margin-bottom: 1.25rem; }
.auth-card h1 {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.auth-card .auth-sub { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.88rem;
  border: 1px solid;
}
.alert-error { background: var(--danger-dim); border-color: rgba(248,113,113,0.35); color: #fecaca; }
.alert-success { background: var(--success-dim); border-color: rgba(52,211,153,0.35); color: #a7f3d0; }
.alert-warning { background: var(--warning-dim); border-color: rgba(251,191,36,0.35); color: #fde68a; }
.alert-info { background: var(--accent-glow); border-color: var(--border-accent); color: #bae6fd; }

/* Page sections */
.page-hero {
  padding: 1.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.page-hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.page-hero p { margin: 0; color: var(--text-muted); max-width: 640px; }
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}
.section-title h2 {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Detail */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 1.5rem;
  align-items: start;
}
.detail-main, .detail-side {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
}
.detail-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 1rem;
  margin: 1.25rem 0;
  padding: 1.15rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.hash-box {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  word-break: break-all;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--accent);
}
.quick-ref {
  list-style: none;
  margin: 0;
  padding: 0;
}
.quick-ref li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  color: var(--text-muted);
}
.quick-ref li:last-child { border-bottom: 0; }
.quick-ref .ok { color: var(--success); font-weight: 700; }
.quick-ref .no { color: var(--text-dim); font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(148,163,184,0.08);
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* Empty / error states */
.empty-state, .error-page {
  text-align: center;
  padding: 3.5rem 1.5rem;
}
.empty-state h2, .error-page h1 {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.empty-state p, .error-page p { color: var(--text-dim); margin: 0 0 1.5rem; }
.error-code {
  font-family: var(--mono);
  font-size: 3.5rem;
  font-weight: 700;
  color: var(--border-strong);
  line-height: 1;
  margin-bottom: 0.75rem;
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.82rem;
}
.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

/* Admin layout */
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  transition: transform .2s;
}
.admin-sidebar .sidebar-brand {
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.admin-nav { padding: 1rem 0.75rem; flex: 1; overflow-y: auto; }
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 0.15rem;
}
.admin-nav a:hover { background: var(--bg-elevated); color: var(--text); }
.admin-nav a.active { background: var(--accent-glow); color: var(--accent); }
.admin-nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-nav .nav-group {
  margin: 1rem 0.75rem 0.4rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.admin-main {
  flex: 1;
  margin-left: var(--sidebar-w);
  min-width: 0;
}
.admin-topbar {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.7);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 40;
}
.admin-content { padding: 1.5rem; }
.admin-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.4rem;
  cursor: pointer;
}
.admin-menu-btn svg { width: 20px; height: 20px; display: block; }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 55;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
table.data th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
  background: rgba(0,0,0,0.2);
  white-space: nowrap;
}
table.data td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data tr:last-child td { border-bottom: 0; }
table.data tr:hover td { background: rgba(56, 189, 248, 0.03); }
.table-actions { display: flex; flex-wrap: wrap; gap: 0.35rem; }

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.toast {
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  min-width: 220px;
  animation: toast-in .2s ease;
}
.toast.success { border-color: rgba(52,211,153,0.4); }
.toast.error { border-color: rgba(248,113,113,0.4); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  place-items: center;
  z-index: 80;
  padding: 1rem;
}
.modal-backdrop.open { display: grid; }
.modal {
  width: min(440px, 100%);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}
.modal h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.modal p { margin: 0 0 1.25rem; color: var(--text-muted); font-size: 0.9rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; }

/* Filters panel */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.filters-bar select, .filters-bar input {
  padding: 0.45rem 0.7rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.85rem;
}

/* Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-accent { color: var(--accent); }
.hidden { display: none !important; }
.w-full { width: 100%; }

/* Mobile */
@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: none; }
  .admin-main { margin-left: 0; }
  .admin-menu-btn { display: inline-flex; }
  .sidebar-overlay.open { display: block; }
  .search-box { max-width: none; }
  .header-search-wrap { order: 3; width: 100%; flex-basis: 100%; }
  .site-header { height: auto; }
  .site-header-inner { flex-wrap: wrap; padding: 0.75rem 0; height: auto; gap: 0.75rem; }
}

@media (max-width: 640px) {
  .resource-grid { grid-template-columns: 1fr; }
  .auth-card { padding: 1.5rem; }
  .site-footer-inner { flex-direction: column; align-items: flex-start; }
}
