:root {
    --bg: #f8fafc;
    --ink: #0f172a;
    --muted: #475569;
    --line: #e2e8f0;
    --card: #ffffff;
    --brand: #0369a1;
    --danger: #b91c1c;
    --ok: #166534;
    --radius: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "Trebuchet MS", sans-serif;
    background: linear-gradient(170deg, #eff6ff 0%, #f8fafc 100%);
    color: var(--ink);
}

.wrap {
    width: min(1080px, 92vw);
    margin: 28px auto 40px;
}

textarea {
    width: 100%;
    min-height: 96px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    resize: vertical;
    font: inherit;
}

select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
    background: #fff;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.check-row input {
    width: auto;
    margin: 0;
}

.admin-sections {
    margin-top: 14px;
}

.admin-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.admin-menu .btn {
    margin: 0;
}

.admin-menu .btn.active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    gap: 10px;
}

h1,
h2 {
    margin: 0;
}

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.grid {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 14px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.search-form input {
    margin-bottom: 0;
}

.row-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

input {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

button,
.btn {
    border: none;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-ghost {
    border: 1px solid #cbd5e1;
    color: var(--ink);
    background: #fff;
}

.btn-danger {
    background: #fee2e2;
    color: var(--danger);
}

.notice {
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 12px;
}

.notice-ok {
    background: #dcfce7;
    color: var(--ok);
}

.notice-error {
    background: #fee2e2;
    color: var(--danger);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    border-bottom: 1px solid var(--line);
    text-align: left;
    padding: 10px 8px;
}

.table th {
    color: var(--muted);
    font-weight: 600;
}

.inline-form {
    display: inline;
}

.actions-col {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-block;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
}

.status-pill.is-active {
    background: #dcfce7;
    color: #166534;
}

.status-pill.is-inactive {
    background: #fee2e2;
    color: #b91c1c;
}

.section-divider {
    border: 0;
    border-top: 1px solid var(--line);
    margin: 18px 0;
}

.slide-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    display: block;
}

.slide-thumb-form {
    margin-bottom: 8px;
}

.pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pagination a {
    text-decoration: none;
    border: 1px solid #cbd5e1;
    color: var(--ink);
    padding: 6px 10px;
    border-radius: 8px;
    background: #fff;
    min-width: 34px;
    text-align: center;
}

.pagination a.active {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.login {
    width: min(420px, 92vw);
    margin: 80px auto;
}

.small {
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 860px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .search-form {
        flex-wrap: wrap;
    }
}
