﻿* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: #f5f7fa;
    color: #1f2937;
    line-height: 1.5;
}

.container {
    max-width: 980px;
    margin: 0 auto;
    padding: 0 16px;
}

.site-header {
    background: #1f2937;
    color: #fff;
    padding: 12px 0;
}

    .site-header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .site-header a {
        color: #fff;
        text-decoration: none;
        margin-left: 16px;
    }

    .site-header .brand {
        font-weight: 700;
        font-size: 18px;
        margin-left: 0;
    }

.site-footer {
    text-align: center;
    padding: 24px 0;
    color: #6b7280;
    font-size: 14px;
}

main {
    padding: 24px 0;
}

.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}

    .card.center {
        text-align: center;
    }

h1, h2 {
    margin-top: 0;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 18px;
    margin-top: 8px;
    margin-bottom: 12px;
}

.muted {
    color: #6b7280;
}

.text-danger {
    color: #dc2626;
}

.required {
    color: #dc2626;
    margin-left: 4px;
}

.form-group {
    margin-bottom: 14px;
}

    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 6px;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
        font: inherit;
    }

    .form-group small {
        display: block;
        margin-top: 4px;
    }

.btn {
    display: inline-block;
    padding: 9px 16px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font: inherit;
    text-decoration: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

    .btn-primary:hover {
        background: #1d4ed8;
    }

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

    .btn-secondary:hover {
        background: #d1d5db;
    }

.question {
    padding: 12px 0;
    border-top: 1px solid #eef2f7;
}

    .question:first-of-type {
        border-top: none;
    }

.question-title {
    font-weight: 600;
    margin: 0 0 8px;
}

.q-order {
    color: #6b7280;
    margin-right: 4px;
}

.options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .option input {
        accent-color: #2563eb;
    }

.other-text {
    margin-top: 8px;
}

    .other-text input {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #d1d5db;
        border-radius: 6px;
    }

.actions {
    text-align: right;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

    .table th, .table td {
        padding: 10px 12px;
        text-align: left;
        border-bottom: 1px solid #eef2f7;
        vertical-align: top;
    }

    .table th {
        background: #f9fafb;
        font-weight: 600;
    }

    .table tr:last-child td {
        border-bottom: none;
    }

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    margin-left: 6px;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.inline {
    display: inline;
}

.link-button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    font: inherit;
    text-decoration: underline;
}
/* ===== Textarea trong câu hỏi full width ===== */
.question textarea {
    width: 100%;
    min-height: 110px;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    display: block;
}

    .question textarea:focus,
    .other-text input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
    }

/* Ô "Ý kiến khác" cũng full width */
.other-text input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font: inherit;
    display: block;
}

/* ===== Link Admin trên header ===== */
.site-header nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

    .site-header nav a {
        color: #fff;
        text-decoration: none;
        margin-left: 0;
        padding: 6px 10px;
        border-radius: 6px;
        transition: background 0.15s;
    }

        .site-header nav a:hover {
            background: rgba(255, 255, 255, 0.12);
        }

.admin-link {
    border: 1px solid rgba(255, 255, 255, 0.4);
}

/* ===== Nút submit full width trên mobile ===== */
@media (max-width: 640px) {
    .actions .btn {
        width: 100%;
    }
}