.admin-body { padding: 40px 20px; max-width: 960px; margin: 0 auto; }
.admin-login { max-width: 360px; margin: 80px auto; display: grid; gap: 18px; text-align: center; }
.admin-login form { display: grid; gap: 14px; text-align: left; }
.admin-error { color: var(--danger); }
.admin-notice { color: var(--success); margin-bottom: 20px; }

.admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; }

.admin-tab-radio { display: none; }
.admin-tabs { display: flex; gap: 10px; margin-bottom: 24px; }
.admin-tabs label {
  padding: 10px 18px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px;
  cursor: pointer; color: var(--muted); font-weight: 700;
}
#tab-members:checked ~ .admin-tabs label[for="tab-members"],
#tab-news:checked ~ .admin-tabs label[for="tab-news"],
#tab-gallery:checked ~ .admin-tabs label[for="tab-gallery"],
#tab-stats:checked ~ .admin-tabs label[for="tab-stats"],
#tab-streamers:checked ~ .admin-tabs label[for="tab-streamers"] {
  color: var(--gold-bright); border-color: var(--line); background: rgba(229,180,74,.08);
}

.admin-panel { display: none; }
#tab-members:checked ~ .admin-panel--members,
#tab-news:checked ~ .admin-panel--news,
#tab-gallery:checked ~ .admin-panel--gallery,
#tab-stats:checked ~ .admin-panel--stats,
#tab-streamers:checked ~ .admin-panel--streamers { display: block; }

.admin-form { margin-bottom: 32px; padding: 24px; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); }
.admin-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 18px; }
.admin-form-grid__wide { grid-column: 1 / -1; }
.admin-form label span { display: block; margin-bottom: 6px; font-weight: 700; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; border-bottom: 1px solid rgba(255,255,255,.08); text-align: left; }
.admin-thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.admin-table__actions { display: flex; gap: 8px; }
.button--danger { background: linear-gradient(135deg, #ff9a7b, #d3452c); color: #2a0a04; }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; margin-top: 20px; }
.gallery-grid figure { margin: 0; display: grid; gap: 8px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; }

.rich-editor { display: grid; }
.rich-editor__toolbar {
  display: flex; gap: 6px; padding: 8px;
  border: 1px solid rgba(255,255,255,.12); border-bottom: none; border-radius: 13px 13px 0 0;
  background: rgba(255,255,255,.02);
}
.rich-editor__btn {
  width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.12); border-radius: 8px;
  background: rgba(255,255,255,.035); color: var(--text); cursor: pointer; font-size: .85rem; font-weight: 700;
}
.rich-editor__btn:hover { border-color: rgba(84,181,255,.8); }
.rich-editor__content {
  min-height: 140px; border: 1px solid rgba(255,255,255,.12); border-radius: 0 0 13px 13px;
  padding: 14px 15px; color: var(--text); background: rgba(255,255,255,.035); outline: none; line-height: 1.6;
}
.rich-editor__content:focus { border-color: rgba(84,181,255,.8); box-shadow: 0 0 0 4px rgba(44,135,255,.12); }
.rich-editor__content ul, .rich-editor__content ol { padding-left: 22px; }
.rich-editor__content img { max-width: 100%; border-radius: 8px; margin: 8px 0; }
.admin-form-grid__wide > span:first-child { display: block; margin-bottom: 6px; font-weight: 700; color: #dce4f0; }

.admin-panel--stats { padding: 24px; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); }
.stats-summary { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 24px; }
.stats-summary__box { display: grid; gap: 4px; padding: 16px 20px; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; min-width: 220px; }
.stats-summary__label { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stats-summary__value { font-weight: 700; font-size: 1.05rem; }
.stats-summary__sub { color: var(--gold-bright); font-size: .85rem; }
.stats-chart { width: 100%; height: auto; }
.stats-chart__gridline { stroke: rgba(255,255,255,.08); stroke-width: 1; }
.stats-chart__tick { fill: var(--muted); font-size: 11px; text-anchor: middle; }
.stats-chart__line { fill: none; stroke-width: 2; }
.stats-chart__line--views { stroke: #54b5ff; }
.stats-chart__line--completed { stroke: #e5b44a; }
.stats-legend { display: flex; gap: 20px; margin-top: 12px; font-size: .85rem; color: var(--muted); }
.stats-legend__item { position: relative; padding-left: 18px; }
.stats-legend__item::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 12px; height: 3px; border-radius: 2px; }
.stats-legend__item--views::before { background: #54b5ff; }
.stats-legend__item--completed::before { background: #e5b44a; }
.stats-subheading { margin: 32px 0 14px; font-size: 1.1rem; }
.stats-table-wrap { max-height: 360px; overflow-y: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.stats-table-wrap .admin-table { margin: 0; }
.stats-table-wrap thead th { position: sticky; top: 0; background: #0c1730; }

.twitch-setup-steps { margin: 12px 0 20px; padding-left: 22px; display: grid; gap: 8px; color: var(--muted); }
.twitch-setup-steps li { line-height: 1.5; }
