:root {
    color-scheme: dark;
    --bg: #111018;
    --panel: #1b1926;
    --panel2: #242032;
    --text: #f6efff;
    --muted: #b7adc8;
    --accent: #c990ff;
    --danger: #ff7373;
    --line: rgba(255,255,255,.11);
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top left, #2a1c44 0, var(--bg) 34rem);
    color: var(--text);
}
a { color: var(--accent); text-decoration: none; }
.topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem clamp(1rem, 4vw, 3rem);
    border-bottom: 1px solid var(--line);
    background: rgba(17,16,24,.78); backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 10;
}
.brand { color: var(--text); font-weight: 800; letter-spacing: .03em; }
nav { display: flex; gap: 1rem; flex-wrap: wrap; }
.container { width: min(1100px, calc(100% - 2rem)); margin: 2rem auto; }
.hero, .panel, .card, .empty {
    background: linear-gradient(180deg, var(--panel), var(--panel2));
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 1.3rem;
    box-shadow: 0 18px 48px rgba(0,0,0,.25);
}
.hero { margin-bottom: 1.5rem; }
.hero.compact { display:flex; justify-content:space-between; align-items:center; gap:1rem; }
h1, h2 { margin-top: 0; }
.muted { color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; }
.admin-list { display: grid; gap: 1rem; }
.card-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.pill {
    display: inline-flex; align-items: center;
    border: 1px solid var(--line); border-radius: 999px;
    padding: .25rem .7rem; color: var(--accent); background: rgba(201,144,255,.09);
    white-space: nowrap;
}
.pill.big { font-size: 1rem; }
.button {
    display: inline-flex; align-items: center; justify-content: center;
    border: 0; border-radius: 999px; padding: .75rem 1rem;
    background: var(--accent); color: #180f20; font-weight: 800; cursor: pointer;
}
.button.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button.danger { background: var(--danger); color: #220707; }
.button.small { padding: .5rem .75rem; font-size: .9rem; }
.form { display: grid; gap: 1rem; }
label { display: grid; gap: .4rem; color: var(--muted); }
input, textarea, select {
    width: 100%; border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255,255,255,.06); color: var(--text); padding: .8rem;
}
textarea { resize: vertical; }
.two-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.checkbox { display: flex; align-items: center; gap: .6rem; }
.checkbox input { width: auto; }
.tags { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .8rem; }
.tags span { color: var(--muted); font-size: .92rem; }
.thumbs { display: flex; gap: .6rem; margin-top: 1rem; flex-wrap: wrap; }
.thumbs img { width: 88px; height: 88px; object-fit: cover; border-radius: 16px; border: 1px solid var(--line); }
.thumbs.large img { width: 180px; height: 180px; }
.actions { display:flex; gap:.6rem; align-items:center; flex-wrap:wrap; margin-top: 1rem; }
.actions form { display: inline-flex; }
.filters { display:flex; gap:.6rem; flex-wrap:wrap; margin-bottom:1rem; }
.filters a { border:1px solid var(--line); border-radius:999px; padding:.45rem .75rem; color: var(--text); }
.narrow { width: min(460px, 100%); margin-inline: auto; }
.error { color: var(--danger); }
.success { border-color: rgba(201,144,255,.4); }
.footer { text-align:center; color: var(--muted); padding: 2rem; }
@media (max-width: 720px) {
    .topbar { align-items: flex-start; flex-direction: column; }
}
