* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f6f8;
    color: #222;
}

.container {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #1f2937;
    color: #fff;
    padding: 16px 0;
    margin-bottom: 24px;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.site-header a {
    color: #fff;
    text-decoration: none;
    margin-left: 12px;
}

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

.login-card {
    max-width: 420px;
    margin: 40px auto;
}

.grid-two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 6px;
    font-weight: bold;
}

input[type="text"],
input[type="password"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cfd4dc;
    border-radius: 6px;
    font-size: 15px;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

button,
.button-link {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 16px;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    font-size: 15px;
}

.button-danger {
    background: #dc2626;
}

.button-secondary {
    background: #6b7280;
}

.button-small {
    padding: 8px 12px;
    font-size: 14px;
    margin-top: 0;
}

.flash {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
}

.flash-success {
    background: #dcfce7;
    color: #166534;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table th,
table td {
    border: 1px solid #e5e7eb;
    padding: 10px;
    vertical-align: top;
    text-align: left;
}

.question-block {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 20px;
    background: #fafafa;
}

.answer-option {
    display: block;
    margin: 10px 0;
    font-weight: normal;
}

.solution-list > div {
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
}

.answer-neutral {
    background: #f3f4f6;
}

.answer-correct {
    background: #dcfce7;
    border: 1px solid #22c55e;
}

.answer-wrong {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.explanation {
    margin-top: 16px;
    padding: 12px;
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    border-radius: 6px;
}

.inline-form {
    display: inline-block;
    margin: 0;
}

.actions-cell {
    white-space: nowrap;
}

.actions-cell .button-link,
.actions-cell .inline-form,
.actions-cell button {
    vertical-align: middle;
}

.import-errors {
    margin-top: 16px;
    padding: 12px;
    background: #fff7ed;
    border-left: 4px solid #f97316;
    border-radius: 6px;
}

pre {
    background: #f3f4f6;
    padding: 12px;
    border-radius: 6px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 800px) {
    .grid-two {
        grid-template-columns: 1fr;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .actions-cell {
        white-space: normal;
    }
}