:root {
    --bg: #f6f7f9;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
    --primary: #1f5eff;
    --primary-dark: #1747bf;
    --panel: #ffffff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
.topbar { height: 58px; background: #111827; color: white; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; }
.brand { color: white; font-weight: 700; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: white; }
.inline-form { display: inline; }
.inline-form button { background: transparent; color: white; border: 1px solid #4b5563; padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.container { max-width: 1280px; margin: 0 auto; padding: 28px; }
h1 { margin: 0 0 20px; font-size: 28px; }
h2 { margin: 0 0 16px; font-size: 20px; }
.page-header { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 20px; }
.button-row { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; font-weight: 600; }
.btn.primary { background: var(--primary); color: white; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-dark); text-decoration: none; }
.panel, .auth-card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 20px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(17,24,39,.04); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.stat-card span, .muted { color: var(--muted); font-size: 13px; }
.stat-card strong { font-size: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.grid-2 div { display: flex; flex-direction: column; gap: 5px; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
th { background: #f9fafb; font-size: 13px; color: #374151; }
.data-table { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.actions { white-space: nowrap; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto auto; gap: 10px; margin-bottom: 16px; align-items: center; }
input, select, textarea { width: 100%; padding: 9px 11px; border: 1px solid #d1d5db; border-radius: 10px; font: inherit; background: white; }
.checkbox { display: flex; align-items: center; gap: 7px; white-space: nowrap; }
.checkbox input { width: auto; }
.form-grid { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid.narrow { grid-template-columns: 1fr; max-width: 480px; }
.form-grid p { margin: 0; }
.form-grid label { display: block; font-weight: 600; margin-bottom: 6px; }
.form-grid .helptext { color: var(--muted); display: block; margin-top: 4px; font-size: 12px; }
.form-grid ul.errorlist { color: #b91c1c; margin: 0 0 5px; padding-left: 16px; }
.form-actions { grid-column: 1 / -1; display: flex; gap: 10px; }
.details { display: grid; grid-template-columns: 260px 1fr; gap: 10px 18px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; }
.messages { margin-bottom: 16px; }
.message { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: white; }
.message.success { border-color: #86efac; background: #f0fdf4; }
.pagination { display: flex; justify-content: center; gap: 20px; padding: 20px; }
.auth-card { max-width: 520px; margin: 60px auto; }
.section-header { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; margin-bottom: 14px; }
.section-header h2 { margin-bottom: 6px; }
.section-header p { margin: 0; }
.registry-section { margin-top: 26px; }
.registry-note { margin: 12px 0 0; }
@media (max-width: 900px) {
    .topbar { height: auto; padding: 14px; flex-direction: column; align-items: flex-start; }
    .nav { flex-wrap: wrap; }
    .filters { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .section-header { flex-direction: column; }
    .details { grid-template-columns: 1fr; }
}
.notice { border-color: #bfdbfe; background: #eff6ff; }
.notice p { margin: 0 0 10px; color: #1f2937; }
.notice p:last-child { margin-bottom: 0; }
