* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    background: #2c3e50;
    color: #fff;
    padding: 15px 0;
    margin-bottom: 30px;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header a {
    color: #fff;
    text-decoration: none;
}

.header nav a {
    margin-left: 20px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background .3s;
}

.header nav a:hover {
    background: rgba(255,255,255,.15);
}

/* Cards */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    padding: 25px;
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: background .3s, opacity .3s;
}

.btn-primary {
    background: #3498db;
    color: #fff;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-success {
    background: #27ae60;
    color: #fff;
}

.btn-success:hover {
    background: #219a52;
}

.btn-submit {
    padding: 14px 50px;
    font-size: 17px;
    font-weight: 600;
    border-radius: 8px;
}

.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: #fff;
}

.btn-warning:hover {
    background: #d68910;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background: #f8f9fa;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color .3s;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* Alerts */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Question types badge */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-text { background: #e3f2fd; color: #1565c0; }
.badge-textarea { background: #fce4ec; color: #c62828; }
.badge-radio { background: #e8f5e9; color: #2e7d32; }
.badge-checkbox { background: #fff3e0; color: #e65100; }
.badge-select { background: #f3e5f5; color: #6a1b9a; }
.badge-rating { background: #fffde7; color: #f9a825; }

/* Survey public form */
.survey-header {
    text-align: center;
    margin-bottom: 30px;
}

.survey-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.question-card {
    background: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 15px;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.question-card .question-text {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2c3e50;
}

.question-card .required {
    color: #e74c3c;
    margin-left: 4px;
}

.option-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    cursor: pointer;
}

.option-label input[type="radio"],
.option-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 4px;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 30px;
    color: #ddd;
    cursor: pointer;
    transition: color .2s;
}

.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label {
    color: #f1c40f;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #666;
}

/* Utility */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.d-block { display: block; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .header {
        padding: 8px 0;
        margin-bottom: 15px;
    }

    .header .container {
        flex-direction: column;
        gap: 6px;
    }

    .header h2 {
        font-size: 18px;
    }

    .header nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 3px;
    }

    .header nav a {
        margin-left: 0;
        padding: 6px 10px;
        font-size: 12px;
    }

    .card {
        padding: 15px;
        border-radius: 10px;
    }

    .survey-header {
        margin-bottom: 20px;
    }

    .survey-header h1 {
        font-size: 22px;
    }

    .survey-header p {
        font-size: 14px;
    }

    .question-card {
        padding: 16px;
        margin-bottom: 12px;
    }

    .question-card .question-text {
        font-size: 15px;
        line-height: 1.5;
    }

    .option-label {
        padding: 12px 0;
        min-height: 44px;
    }

    .option-label input[type="radio"],
    .option-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
    }

    .option-label {
        font-size: 15px;
    }

    select.form-control {
        font-size: 16px;
        padding: 12px;
    }

    input.form-control,
    textarea.form-control {
        font-size: 16px;
        padding: 12px;
    }

    .star-rating label {
        font-size: 32px;
    }

    .survey-header h1 {
        font-size: 22px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
    }

    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }

    .btn-submit {
        width: 100%;
        padding: 14px 20px;
    }

    .card.text-center[style*="max-width:500px"] {
        margin: 20px auto !important;
        max-width: 100% !important;
    }

    .flex {
        flex-wrap: wrap;
    }

    .flex-between {
        gap: 10px;
    }

    .mb-20 {
        margin-bottom: 15px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    table {
        font-size: 13px;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    th, td {
        padding: 8px 10px;
        white-space: normal;
        min-width: 100px;
    }

    th:first-child, td:first-child {
        min-width: 80px;
    }

    td .flex {
        flex-wrap: wrap;
        gap: 4px;
    }

    .login-card {
        margin: 20px 10px;
        padding: 30px 20px;
    }

    .empty-state {
        padding: 40px 15px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 8px;
    }

    .header h2 {
        font-size: 16px;
    }

    .header nav a {
        font-size: 11px;
        padding: 5px 8px;
    }

    .survey-header h1 {
        font-size: 20px;
    }

    .question-card {
        padding: 14px;
    }

    .question-card .question-text {
        font-size: 14px;
    }

    .option-label {
        padding: 10px 0;
        font-size: 14px;
        min-height: 40px;
    }

    .option-label input[type="radio"],
    .option-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
    }

    .star-rating label {
        font-size: 28px;
    }

    .card {
        padding: 12px;
    }

    .btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .btn-sm {
        padding: 6px 10px;
        font-size: 11px;
    }

    h1 {
        font-size: 20px;
    }

    th, td {
        padding: 6px 8px;
        font-size: 12px;
        min-width: 80px;
    }

    .survey-header p {
        font-size: 13px;
    }
}
