:root {
    font-family: Inter, system-ui, Arial, sans-serif;
    color: #18212f;
    background: #f5f7fb;
}
* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fb; }
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: 240px;
    background: #17233a;
    color: white;
    padding: 24px 18px;
}
.brand { font-size: 20px; font-weight: 700; margin-bottom: 28px; }
.sidebar nav { display: grid; gap: 8px; }
.sidebar a {
    color: #dfe7f5;
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 10px;
}
.sidebar a:hover { background: #243554; color: white; }
.content { flex: 1; padding: 32px; }
.page-head { display:flex; justify-content:space-between; align-items:center; }
.cards { display:grid; grid-template-columns:repeat(4, minmax(180px,1fr)); gap:18px; }
.card {
    background:white; border-radius:16px; padding:20px;
    box-shadow:0 8px 24px rgba(24,33,47,.06);
}
.card span { display:block; color:#667085; margin-bottom:12px; }
.card strong { font-size:30px; }
table {
    width:100%; border-collapse:collapse; background:white; border-radius:14px;
    overflow:hidden; box-shadow:0 8px 24px rgba(24,33,47,.05);
}
th, td { padding:14px 16px; border-bottom:1px solid #edf0f5; text-align:left; vertical-align:top; }
th { background:#f9fafc; color:#667085; font-size:13px; }
.actions { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.status { padding:5px 9px; background:#eef2f7; border-radius:999px; font-size:12px; }
.btn, button {
    background:#2563eb; color:white; border:none; padding:10px 14px;
    border-radius:10px; text-decoration:none; cursor:pointer;
}
.link-btn { background:none; color:#2563eb; padding:0; }
.danger, .danger-text { color:#b42318; }
.danger { background:#fff1f0; }
.form-grid {
    max-width:760px; display:grid; gap:10px; background:white;
    padding:22px; border-radius:14px; box-shadow:0 8px 24px rgba(24,33,47,.05);
}
.form-grid.wide { max-width:1000px; }
input, textarea, select {
    width:100%; padding:10px 12px; border:1px solid #d9deea;
    border-radius:9px; background:white;
}
textarea { resize:vertical; }
.alert {
    background:#fff1f0; color:#b42318; padding:10px 12px; border-radius:9px;
}
.login-page { display:grid; place-items:center; min-height:100vh; }
.login-card {
    width:380px; background:white; padding:30px; border-radius:18px;
    box-shadow:0 20px 50px rgba(24,33,47,.12);
}
.login-card form { display:grid; gap:10px; margin-top:20px; }
.block-list { display:grid; gap:14px; margin-bottom:24px; }
.block-card {
    background:white; padding:16px; border-radius:12px; box-shadow:0 6px 16px rgba(24,33,47,.05);
}
pre { white-space:pre-wrap; word-break:break-word; background:#f7f8fb; padding:12px; border-radius:8px; }
.filters { display:flex; gap:12px; margin:0 0 16px; }
.filters a { color:#2563eb; text-decoration:none; }
.choice-row { display:grid; grid-template-columns:60px 1fr 100px; gap:10px; align-items:center; }
.choice-key { text-align:center; }
.inline { display:flex; gap:6px; align-items:center; }
.inline input { width:auto; }
@media (max-width: 900px) {
    .sidebar { width:190px; }
    .cards { grid-template-columns:1fr 1fr; }
}


.hidden { display:none !important; }
.success {
    background:#ecfdf3;
    color:#027a48;
    padding:10px 12px;
    border-radius:9px;
    margin-bottom:16px;
}
.editor-card {
    margin-top:24px;
    background:#ffffff;
    padding:20px;
    border-radius:16px;
    box-shadow:0 8px 24px rgba(24,33,47,.05);
}
.draggable {
    display:flex;
    gap:12px;
    align-items:flex-start;
    cursor:grab;
}
.draggable.dragging {
    opacity:.45;
}
.drag-handle {
    font-size:20px;
    line-height:1;
    color:#667085;
    padding-top:4px;
}
.block-body {
    flex:1;
}
.block-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
}
.preview {
    margin:10px 0;
    padding:12px;
    background:#f8fafc;
    border-radius:8px;
    color:#344054;
}
.inline-form {
    display:inline-block;
}


.secondary { background:#eef2f7; color:#344054; }
.secondary-link { background:#344054; }
.media-grid {
    display:grid;
    grid-template-columns:repeat(auto-fill,minmax(220px,1fr));
    gap:16px;
    margin-top:20px;
}
.media-card {
    background:#fff;
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 8px 24px rgba(24,33,47,.05);
}
.media-card img {
    width:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    background:#f2f4f7;
}
.media-info {
    display:grid;
    gap:7px;
    padding:14px;
}
.dynamic-list {
    display:grid;
    gap:8px;
    margin-bottom:8px;
}
.dynamic-row {
    display:grid;
    grid-template-columns:1fr 1fr auto;
    gap:8px;
}
.dynamic-row:has(input[data-field="text"]) {
    grid-template-columns:1fr auto;
}
.small-btn {
    padding:8px 10px;
}
