* { box-sizing: border-box; }
body {
    font-family: Arial, sans-serif;
    background: #f4f7fb;
    margin: 0;
    color: #1f2937;
}
a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }
.container {
    width: 92%;
    max-width: 1120px;
    margin: 32px auto;
}
.narrow { max-width: 860px; }
.topbar, .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}
.card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
}
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.hero {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
}
h1, h2, h3 { margin-top: 0; }
p { color: #4b5563; }
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    font-size: 14px;
    background: #fff;
}
textarea { min-height: 110px; }
.btn {
    display: inline-block;
    padding: 12px 18px;
    background: #2563eb;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}
.btn-secondary:hover {
    background: #d1d5db;
}
.btn-danger {
    background: #dc2626;
}
.btn-danger:hover {
    background: #b91c1c;
}
.full { width: 100%; }
.inline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 400;
}
.inline input { margin: 0; width: auto; }
.question-block {
    margin-bottom: 20px;
    padding: 18px;
    background: #f9fafb;
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}
.option-list { margin-top: 8px; }
.required { color: #dc2626; }
.actions-row, .button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.center { text-align: center; }
.status-row { margin-bottom: 12px; }
.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}
.badge-green {
    background: #dcfce7;
    color: #166534;
}
.badge-gray {
    background: #e5e7eb;
    color: #374151;
}
.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 16px;
}
.error {
    background: #fee2e2;
    color: #991b1b;
}
.success {
    background: #dcfce7;
    color: #166534;
}
.muted { color: #6b7280; }
.small { font-size: 13px; }
.login-card { max-width: 460px; margin: 40px auto; }
.table-wrap { overflow-x: auto; }
table {
    border-collapse: collapse;
    width: 100%;
    background: #fff;
}
table th, table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 12px;
    text-align: left;
    vertical-align: top;
}
table th {
    background: #f8fafc;
    font-size: 14px;
}
.admin-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}
.sidebar {
    background: #0f172a;
    color: #fff;
    padding: 24px 18px;
}
.brand {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 24px;
}
.nav-link {
    display: block;
    padding: 12px 14px;
    border-radius: 12px;
    color: #cbd5e1;
    margin-bottom: 8px;
}
.nav-link:hover, .nav-link.active {
    background: #1e293b;
    color: #fff;
    text-decoration: none;
}
.main-content {
    padding: 28px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.stat-label { color: #6b7280; font-size: 14px; }
.stat-value { font-size: 30px; font-weight: 700; margin-top: 8px; }
.pill-link {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 700;
    margin-right: 8px;
    margin-bottom: 6px;
}
.form-note {
    margin-top: -8px;
    margin-bottom: 14px;
    color: #6b7280;
    font-size: 13px;
}
.answer-list {
    margin: 0;
    padding-left: 18px;
}
@media (max-width: 900px) {
    .admin-layout { grid-template-columns: 1fr; }
    .sidebar { padding-bottom: 8px; }
    .two-col { grid-template-columns: 1fr; }
    .topbar, .page-header { flex-direction: column; align-items: flex-start; }
}
