/* panel/assets/panel.css — the admin panel's look: sidebar + cards, purple accent */
:root { --accent: #6c5ce7; --accent-dark: #5748c9; --accent-soft: #eeebff; --bg: #f6f6fa; --card: #fff; --text: #2d2f3a; --muted: #7a7d8c; --line: #e8e8f0; --ok: #1faa59; --bad: #d63a3a; --warn: #b7791f; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.5; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.shell { display: flex; min-height: 100vh; }
.side { width: 264px; background: #fff; border-right: 1px solid var(--line); padding: 20px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { font-weight: 700; font-size: 18px; padding: 4px 10px 18px; display: flex; align-items: center; gap: 8px; }
.logo-mark { color: var(--accent); font-size: 22px; }
.side nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; color: #555a6e; font-size: 14px; }
.nav:hover { background: var(--accent-soft); text-decoration: none; }
.nav.on { background: linear-gradient(90deg, #7c6ff0, #a79bf7); color: #fff; box-shadow: 0 4px 10px rgba(108, 92, 231, 0.3); }
.nav.sub { padding: 7px 12px 7px 40px; font-size: 13px; }
.nav.sub.on { background: transparent; color: var(--accent); font-weight: 600; box-shadow: none; }
.nav .dot { width: 6px; height: 6px; border-radius: 50%; border: 1.5px solid currentColor; display: inline-block; margin-left: -14px; margin-right: 6px; }
.nav.back { margin-top: 16px; color: var(--muted); }
.ico { width: 18px; height: 18px; flex: none; }
.main { flex: 1; min-width: 0; padding: 14px 28px 0; display: flex; flex-direction: column; }
.top { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(20, 20, 50, .06); padding: 14px 22px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.site-name a { font-size: 19px; font-weight: 600; }
.who { color: var(--muted); font-size: 13px; }
.card { background: var(--card); border-radius: 10px; box-shadow: 0 1px 4px rgba(20, 20, 50, .06); padding: 24px; margin-bottom: 20px; }
.card h2 { margin: 0 0 16px; font-size: 17px; font-weight: 600; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card-head h2 { margin: 0; }
.flash { padding: 12px 16px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; }
.flash-success { background: #e6f7ee; color: #146c3a; }
.flash-error { background: #fdeaea; color: #8f1f1f; }
.flash-info { background: var(--accent-soft); color: #4337a8; }
.btn { display: inline-block; border: 0; border-radius: 7px; padding: 9px 18px; font: inherit; font-weight: 600; cursor: pointer; background: var(--accent); color: #fff; }
.btn:hover { background: var(--accent-dark); text-decoration: none; }
.btn.gray { background: #e4e5ee; color: #43465a; }
.btn.gray:hover { background: #d7d9e6; }
.btn.green { background: var(--ok); }
.btn.red { background: var(--bad); }
.btn.small { padding: 5px 11px; font-size: 12px; }
.btn.link { background: none; color: var(--accent); padding: 0; font-weight: 500; }
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); }
table.t td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.t tr:hover td { background: #fafaff; }
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #eee; display: block; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.pill.yes { background: #dff6e9; color: #146c3a; }
.pill.no { background: #f1f1f5; color: #777; }
form.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 13px; color: #555a6e; }
.req { color: var(--bad); }
input[type=text], input[type=email], input[type=url], input[type=number], input[type=password], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid #d9dae6; border-radius: 7px; font: inherit; background: #fff; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid #cfc9fb; border-color: var(--accent); }
textarea.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; font-size: 13px; }
input.color { height: 42px; padding: 3px; width: 90px; }
.hint { color: var(--muted); font-size: 12px; margin: 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text); }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; }
.switch input[type=checkbox] { position: absolute; opacity: 0; }
.slider { width: 40px; height: 22px; border-radius: 11px; background: #cfd1de; position: relative; transition: .2s; flex: none; }
.slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::after { left: 21px; }
.switch input:focus-visible + .slider { outline: 2px solid #cfc9fb; }
.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.tabs-wrap { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; }
.tabs { display: flex; flex-direction: column; gap: 4px; }
.tab { padding: 10px 14px; border-radius: 7px; color: #555a6e; }
.tab.on { background: var(--accent); color: #fff; }
.tab:hover { text-decoration: none; background: var(--accent-soft); }
.tab.on:hover { background: var(--accent); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat { background: #fff; border-radius: 10px; box-shadow: 0 1px 4px rgba(20, 20, 50, .06); padding: 20px; }
.stat .k { color: var(--muted); font-size: 13px; }
.stat .v { font-size: 28px; font-weight: 600; margin-top: 6px; }
.two { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 20px; }
.bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding-top: 8px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; font-size: 12px; color: var(--muted); }
.bar i { display: block; width: 100%; background: linear-gradient(#a79bf7, #7c6ff0); border-radius: 5px 5px 0 0; min-height: 2px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.media-card { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.media-card .prev { height: 130px; border-radius: 8px; background: #f0f0f6 center/contain no-repeat; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; overflow: hidden; }
.media-card .prev img { max-width: 100%; max-height: 100%; }
.note { background: #f7f6ff; border: 1px solid #e3dfff; border-radius: 8px; padding: 14px 16px; font-size: 13px; color: #43465a; line-height: 1.6; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #4f46c8, #6c5ce7); padding: 24px; }
.login-card { background: #fff; border-radius: 10px; padding: 36px 32px; width: 100%; max-width: 400px; box-shadow: 0 10px 40px rgba(0, 0, 0, .2); }
.login-card h1 { margin: 0 0 6px; font-size: 22px; }
.login-card p.lead { margin: 0 0 22px; color: var(--muted); }
.login-card .field { margin-bottom: 14px; }
.foot { margin-top: auto; padding: 24px 0; color: var(--muted); font-size: 13px; }
.rowtools { display: flex; gap: 8px; align-items: center; }
.search { max-width: 260px; }
@media (max-width: 900px) { .shell { flex-direction: column; } .side { width: 100%; height: auto; position: static; } form.grid, .two, .tabs-wrap { grid-template-columns: 1fr; } .main { padding: 12px; } }
