*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0f172a;
  --surface: #1e293b;
  --surface2: #2d3f58;
  --border: #334155;
  --text: #f1f5f9;
  --text-muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 10px;
  --min-tap: 44px;
}

body { background: var(--bg); color: var(--text); font-family: system-ui, sans-serif; font-size: 17px; line-height: 1.5; }

.hidden { display: none !important; }

/* Nav */
.nav { display: flex; align-items: center; gap: 16px; padding: 12px 20px; background: var(--surface); border-bottom: 1px solid var(--border); }
.nav-title { font-weight: 700; font-size: 1.1rem; }
.nav-links { display: flex; gap: 16px; flex: 1; }
.nav-links a { color: var(--text-muted); text-decoration: none; padding: 8px 0; min-height: var(--min-tap); display: flex; align-items: center; }
.nav-links a:hover { color: var(--text); }

/* Layout */
.container { max-width: 800px; margin: 0 auto; padding: 24px 16px; }
.page-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 20px; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card-title { font-weight: 600; margin-bottom: 8px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--min-tap); padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; font-size: 16px; font-weight: 600; transition: background 0.15s; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); color: var(--text); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--text-muted); font-size: 14px; }
input, textarea { width: 100%; background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; color: var(--text); font-size: 16px; padding: 12px; min-height: var(--min-tap); }
input:focus, textarea:focus { outline: 2px solid var(--accent); border-color: transparent; }
textarea { min-height: 80px; resize: vertical; }

/* Search */
.search-bar { width: 100%; margin-bottom: 16px; }

/* Stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--accent); }
.stat-label { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

/* Reviewed badge */
.badge-reviewed { color: var(--success); font-size: 13px; font-weight: 600; }
.badge-pending { color: var(--warning); font-size: 13px; font-weight: 600; }

/* Diff */
.diff-old { text-decoration: line-through; color: var(--danger); }
.diff-new { color: var(--success); }

/* Big action buttons on dashboard */
.big-btn-row { display: flex; gap: 16px; margin-top: 20px; }
.big-btn { flex: 1; min-height: 80px; font-size: 18px; border-radius: 12px; }

/* Loading / empty */
.empty { color: var(--text-muted); text-align: center; padding: 40px; }
.loading { color: var(--text-muted); text-align: center; padding: 20px; }

/* Toast */
#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--surface2); border: 1px solid var(--border); border-radius: 8px; padding: 12px 20px; font-size: 15px; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 999; }
#toast.show { opacity: 1; }
