/* Admin panel — sits on top of style.css tokens */
body.admin { display: flex; min-height: 100vh; padding: 0 !important; }
body.admin::after { display: none; }
.a-side { width: 248px; flex-shrink: 0; background: var(--ink-2); border-right: 1px solid var(--line); padding: 22px 14px; display: flex; flex-direction: column; gap: 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.a-side .logo { padding: 2px 8px 18px; border-bottom: 1px solid var(--line); }
.a-side nav { display: grid; gap: 2px; }
.a-side nav a, .a-side-foot a { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; color: var(--fg-2); font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.a-side nav a:hover, .a-side-foot a:hover { background: var(--ink-3); color: var(--fg); }
.a-side nav a.active { background: var(--ember-soft); color: var(--ember); }
.a-count { margin-left: auto; background: var(--ember); color: var(--ink); font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px; }
.a-side-foot { margin-top: auto; display: grid; gap: 2px; border-top: 1px solid var(--line); padding-top: 14px; }
.a-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.a-top { display: flex; align-items: center; gap: 14px; padding: 16px 30px; border-bottom: 1px solid var(--line); background: rgba(14, 15, 13, .86); position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); }
.a-top h1 { flex: 1; margin: 0; font-size: 26px; letter-spacing: -.02em; }
.a-user { display: inline-flex; gap: 6px; align-items: center; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--fg-2); }
.a-menu { display: none; }
.a-content { padding: 28px 30px 48px; display: grid; gap: 20px; align-content: start; }
.a-content .flash-wrap { padding: 0; max-width: none; margin: 0; }
.muted { color: var(--fg-2); }
.center { text-align: center; }
.accent { color: var(--ember); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.stat { padding: 20px 22px; background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); }
.stat small { font-family: var(--mono); color: var(--fg-3); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.stat strong { display: block; margin-top: 8px; font-family: var(--serif); font-weight: 400; font-size: 34px; line-height: 1; letter-spacing: -.02em; }

.panel { background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-head h2 { font-size: 20px; margin: 0; }
.panel-body { padding: 20px; }
.panel-body h2 { font-size: 20px; }
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-family: var(--mono); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--fg-3); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: rgba(239, 233, 221, .02); }
.tbl img { width: 44px; height: 55px; border-radius: 10px; object-fit: cover; }
.tbl .actions { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.tbl .actions form { margin: 0; }
.tbl a.strong { font-weight: 700; }
.tbl a.strong:hover { color: var(--ember); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pill-off { font-size: 12px; color: var(--fg-3); }
.danger { background: var(--danger) !important; color: #fff !important; border-color: var(--danger) !important; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters a { padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 600; color: var(--fg-2); }
.filters a.active, .filters a:hover { border-color: var(--fg); color: var(--fg); }
.check { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; }
.check input { accent-color: var(--ember); width: 16px; height: 16px; }
.img-preview { width: 128px; height: 160px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); }
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.hint { font-size: 12.5px; color: var(--fg-3); }
.admin .field input, .admin .field textarea, .admin .field select { background: var(--ink); }
.admin .input { border-radius: 12px; height: 40px; }
.admin .sum-row { font-size: 14.5px; }

.login-wrap { min-height: 100vh; width: 100%; display: grid; place-items: center; padding: 20px; background: radial-gradient(circle at 50% 0%, rgba(239, 91, 43, .18), transparent 55%), var(--ink); }
.login-wrap .form-card { width: 100%; max-width: 410px; display: grid; gap: 16px; background: var(--ink-2); }
.login-wrap .form-card > * { float: none; }
.login-wrap h3 { font-size: 30px; text-align: center; }
.login-wrap .logo { justify-self: center; }

@media (max-width: 900px) {
  .a-side { position: fixed; left: 0; top: 0; z-index: 50; transform: translateX(-100%); transition: transform .3s; }
  .a-side.open { transform: none; box-shadow: var(--shadow); }
  .a-menu { display: inline-grid; }
  .a-content { padding: 16px; }
  .a-top { padding: 12px 16px; }
  .a-user { display: none; }
  .two-col { grid-template-columns: 1fr; }
}
