:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e0e2e7;
  --text: #1f2430;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --danger: #dc2626;
  --success: #16a34a;
  --radius: 10px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar .brand { font-weight: 600; font-size: 17px; }
.topbar .user-info { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 14px; }
.topbar a { color: var(--accent); text-decoration: none; }
.container { max-width: 980px; margin: 24px auto; padding: 0 16px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 20px;
}
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 0 0 16px; }
.subtitle { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; margin-top: 14px; }
label:first-child { margin-top: 0; }
input[type=text], input[type=password], input[type=date], textarea, select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}
textarea { resize: vertical; min-height: 60px; }
input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 7px;
  background: #fafbfc;
}
button, .btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 9px 16px;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  margin-top: 16px;
}
button:hover, .btn:hover { background: var(--accent-hover); }
.btn-secondary { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #f4f5f7; }
.btn-small { padding: 5px 10px; font-size: 13px; margin-top: 0; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; }
tr:hover td { background: #fafbfc; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.tag-new { background: #dbeafe; color: #1e40af; }
.tag-downloaded { background: #dcfce7; color: #166534; }
.error { background: #fef2f2; color: var(--danger); padding: 10px 14px; border-radius: 7px; margin-bottom: 16px; font-size: 14px; }
.success { background: #f0fdf4; color: var(--success); padding: 10px 14px; border-radius: 7px; margin-bottom: 16px; font-size: 14px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.filters > div { flex: 1; min-width: 140px; }
.filters label { margin-top: 0; }
.empty-state { color: var(--muted); text-align: center; padding: 40px 20px; }
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-card { width: 100%; max-width: 360px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.checkbox-row input { width: auto; }
.actions-row { display: flex; gap: 8px; align-items: center; }
