/* ── Global ──────────────────────────────────────────────────── */
html { min-height: 100%; }
body {
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
main, .container, .container-fluid { flex: 1; }

/* ── Inputs — slightly darker borders ────────────────────────── */
.form-control,
.form-select {
    border-color: #adb5bd;
}
.form-control:focus,
.form-select:focus {
    border-color: #6ea8fe;
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.18);
}

/* ── Admin navbar ────────────────────────────────────────────── */
.navbar-brand { font-weight: 700; letter-spacing: .3px; }

/* ── Sticky footer ───────────────────────────────────────────── */
.site-footer {
    background: #1a3c6e;
    color: rgba(255,255,255,.6);
    font-size: .78rem;
    text-align: center;
    padding: 14px 16px;
    margin-top: auto;
}
.site-footer a { color: rgba(255,255,255,.75); text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ── Status badges ───────────────────────────────────────────── */
.badge-draft     { background: #6c757d; }
.badge-published { background: #198754; }
.badge-closed    { background: #dc3545; }

/* ── Question list card ──────────────────────────────────────── */
.question-card {
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.question-card .q-number {
    font-size: .75rem;
    font-weight: 700;
    color: #6c757d;
    white-space: nowrap;
    padding-top: 3px;
}
.question-card .q-body { flex: 1; }
.question-card .q-text { font-size: .95rem; margin-bottom: 2px; }
.question-card .q-meta { font-size: .78rem; color: #6c757d; }
.question-card .q-actions { display: flex; gap: 4px; align-items: flex-start; }

.type-badge {
    font-size: .7rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .4px;
    display: inline-block;
    margin-right: 6px;
}
.type-section  { background:#e9ecef; color:#495057; }
.type-consent  { background:#cff4fc; color:#055160; }
.type-radio    { background:#d1e7dd; color:#0a3622; }
.type-likert   { background:#fff3cd; color:#664d03; }
.type-open     { background:#f8d7da; color:#58151c; }
.type-checkbox { background:#e2d9f3; color:#432874; }

/* ── Survey page ─────────────────────────────────────────────── */
.survey-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, #1a3c6e 0%, #0d6efd 100%);
    padding: 40px 16px;
}
.survey-card {
    background: #fff;
    border-radius: 10px;
    max-width: 780px;
    margin: 0 auto;
    padding: 40px;
    box-shadow: 0 8px 40px rgba(0,0,0,.18);
}
.survey-title { font-size: 1.6rem; font-weight: 700; color: #1a3c6e; margin-bottom: 4px; }
.survey-intro { color: #555; font-size: .95rem; line-height: 1.7; }

.survey-section-header {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0d6efd;
    border-bottom: 2px solid #0d6efd;
    padding-bottom: 6px;
    margin: 32px 0 20px;
}

.question-block { margin-bottom: 24px; }
.question-label { font-weight: 600; margin-bottom: 10px; display: block; }
.required-star  { color: #dc3545; margin-left: 2px; }

/* Likert table */
.likert-table { width: 100%; border-collapse: collapse; }
.likert-table th {
    text-align: center;
    font-size: .78rem;
    font-weight: 600;
    color: #555;
    padding: 4px 6px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 #dee2e6;
}
.likert-table td {
    text-align: center;
    padding: 8px 6px;
    border: 1px solid #dee2e6;
}
.likert-table tr:hover td { background: #f0f7ff; }
.likert-table td:first-child {
    text-align: left;
    padding-left: 12px;
    font-size: .9rem;
    max-width: 340px;
}

/* Progress bar */
.survey-progress { margin-bottom: 28px; }
.survey-progress .progress { height: 6px; border-radius: 3px; }

/* ── Responses table ─────────────────────────────────────────── */
.responses-table-wrap { overflow-x: auto; }
.responses-table th {
    white-space: nowrap;
    font-size: .78rem;
    background: #f8f9fa;
    position: sticky;
    top: 0;
}
.responses-table td { font-size: .82rem; vertical-align: top; max-width: 200px; }

/* ── Utility ─────────────────────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
