* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

body {
    background: #f5f7fb;
    color: #222;
    line-height: 1.5;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: auto;
    padding: 20px 0;
}

.site-header {
    background: #1f4e79;
    color: #fff;
    padding: 18px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    margin-left: 15px;
}

.site-footer {
    background: #111827;
    color: #fff;
    margin-top: 40px;
    padding: 20px 0;
    text-align: center;
}

.card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

h1, h2, h3 {
    margin-bottom: 15px;
}

p {
    margin-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
}

input[type="text"],
input[type="email"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.option-item {
    margin-bottom: 8px;
}

.btn {
    display: inline-block;
    background: #1f4e79;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 18px;
    cursor: pointer;
    text-decoration: none;
}

.btn:hover {
    background: #173b5c;
}

.survey-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.stat-box {
    display: inline-block;
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    margin-right: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    min-width: 180px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.chart-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}
small {
    color: #475569;
}

ul li {
    margin-bottom: 6px;
}
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.admin-title {
    margin-bottom: 5px;
}

.admin-subtitle {
    color: #64748b;
    margin-bottom: 0;
}

.btn-secondary {
    background: #475569;
    margin-right: 10px;
}

.btn-secondary:hover {
    background: #334155;
}

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.dashboard-stat-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.stat-label {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 30px;
    font-weight: 700;
    color: #0f172a;
    word-break: break-word;
}

.stat-text {
    font-size: 18px;
    line-height: 1.4;
}

.stat-small {
    font-size: 18px;
}

.chart-card {
    background: #fff;
    border-radius: 14px;
    padding: 22px;
    margin-top: 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.chart-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.question-title {
    margin-bottom: 6px;
    font-size: 20px;
}

.question-meta {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 0;
}

.chart-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    gap: 20px;
    align-items: start;
}

.chart-canvas-wrap {
    position: relative;
    min-height: 340px;
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px;
    border: 1px solid #e2e8f0;
}

.chart-table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.stats-table th,
.stats-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

.stats-table th {
    background: #f8fafc;
    font-weight: 700;
}

.stats-table tr:last-child td {
    border-bottom: none;
}

.text-response-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
}

.text-response-count {
    font-weight: bold;
    margin-bottom: 12px;
    color: #0f172a;
}

.text-response-list {
    padding-left: 20px;
    margin: 0;
}

.text-response-list li {
    margin-bottom: 12px;
    background: #fff;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    list-style: disc;
}

.more-note {
    margin-top: 12px;
    color: #64748b;
    font-size: 14px;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    padding: 16px;
    color: #64748b;
}

.survey-selector-form select {
    max-width: 500px;
}

@media (max-width: 900px) {
    .chart-layout {
        grid-template-columns: 1fr;
    }

    .chart-canvas-wrap {
        min-height: 300px;
    }
}