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

:root {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --border: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #666;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
}

body {
  font-family: system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

/* Forms */
.form-group { margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; }
input, textarea, select {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: var(--radius); font-size: 14px; background: var(--surface);
  color: var(--text); outline: none; transition: border-color 0.15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--primary); }
textarea { resize: vertical; min-height: 80px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border: none; border-radius: var(--radius); font-size: 14px; font-weight: 500; cursor: pointer; transition: background 0.15s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-ghost    { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-warning  { background: #f59e0b; color: #fff; }
.btn-warning:hover { background: #d97706; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-full { width: 100%; justify-content: center; }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.card h2 { font-size: 16px; font-weight: 600; }

/* Misc */
.error-msg   { background: #fee2e2; color: #dc2626; padding: 8px 12px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.success-msg { background: #dcfce7; color: #15803d; padding: 8px 12px; border-radius: var(--radius); font-size: 13px; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 40px; color: var(--text-muted); }
.flex  { display: flex; }
.gap-8 { gap: 8px; }
.page-title { font-size: 20px; font-weight: 700; }
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 20px; }
.tab { padding: 8px 16px; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; font-size: 14px; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.filter-row { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-row select { width: auto; }
a.link { color: var(--primary); text-decoration: none; cursor: pointer; }
a.link:hover { text-decoration: underline; }
.hidden { display: none !important; }
