:root {
    --bg: #f5f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #1f4f8f;
    --danger: #b91c1c;
    --ok: #15803d;
    --warn: #b45309;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
}

.topbar {
    background: var(--primary);
    color: white;
    padding: 14px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.brand {
    font-weight: 700;
    font-size: 18px;
}

.topbar a {
    color: white;
    text-decoration: none;
    margin-left: 14px;
    font-weight: 600;
}

.container {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 8px 22px rgba(31, 41, 55, 0.05);
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

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

h1, h2, h3 { margin-top: 0; }

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

input, select, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
}

textarea {
    min-height: 160px;
}

button, .btn {
    display: inline-block;
    padding: 10px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    margin-top: 12px;
}

.btn.secondary {
    background: #4b5563;
}

.btn.danger {
    background: var(--danger);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    overflow: hidden;
    border-radius: 12px;
}

.table th, .table td {
    padding: 11px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.table th {
    background: #eef2ff;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: #e5e7eb;
}

.badge.ok { background: #dcfce7; color: var(--ok); }
.badge.warn { background: #fef3c7; color: var(--warn); }
.badge.danger { background: #fee2e2; color: var(--danger); }

.flash {
    padding: 12px 14px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    border-radius: 10px;
    margin-bottom: 16px;
}

.material-preview {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    padding: 14px;
}

.material-preview iframe,
.material-preview video,
.material-preview img {
    width: 100%;
    max-height: 720px;
    border: 0;
    border-radius: 10px;
    background: #111827;
}

.procedure-text {
    white-space: pre-wrap;
    line-height: 1.6;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.small { color: var(--muted); font-size: 13px; }
.footer {
    text-align: center;
    color: var(--muted);
    padding: 24px;
}
