/* Admin Panel — Landing ile aynı koyu tema */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@600;700&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  --a-bg: #000000;
  --a-bg-2: #0A0A0A;
  --a-sidebar: #000000;
  --a-surface: #0A0A0A;
  --a-surface-2: #111111;
  --a-text: #FFFFFF;
  --a-muted: #A5AAA7;
  --a-border: rgba(255, 255, 255, 0.08);
  --a-border-strong: rgba(255, 255, 255, 0.14);
  --a-accent: #3D9E4A;
  --a-accent-hover: #4DB35B;
  --a-accent-soft: rgba(61, 158, 74, 0.12);
  --a-danger: #E05A5A;
  --a-radius: 10px;
  --a-sidebar-w: 268px;
  --a-font: 'Manrope', sans-serif;
  --a-display: 'Archivo', sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--a-font);
  background: var(--a-bg);
  color: var(--a-text);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--a-display); font-weight: 700; }

.admin-shell {
  display: grid;
  grid-template-columns: var(--a-sidebar-w) 1fr;
  min-height: 100vh;
}
.admin-sidebar {
  background: var(--a-sidebar);
  border-right: 1px solid var(--a-border);
  color: #fff;
  padding: 1.25rem 0.85rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.admin-sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.65rem 1rem;
  border-bottom: 1px solid var(--a-border);
}
.admin-sidebar__brand img { height: 52px; width: auto; }
.admin-sidebar__brand span {
  font-family: var(--a-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-muted);
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  flex: 1;
}
.admin-nav__group-label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6E7471;
  padding: 0 0.85rem 0.35rem;
}
.admin-nav__group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.admin-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  color: var(--a-muted);
  font-weight: 600;
  font-size: 0.88rem;
  transition: background 0.2s, color 0.2s;
}
.admin-nav a:hover {
  background: var(--a-surface-2);
  color: #fff;
}
.admin-nav a.is-active {
  background: var(--a-accent-soft);
  color: var(--a-accent-hover);
  border: 1px solid rgba(61, 158, 74, 0.25);
}
.admin-nav__footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--a-border);
}
.admin-sidebar__foot {
  padding: 0.85rem;
  border-top: 1px solid var(--a-border);
  color: var(--a-muted);
  font-size: 0.8rem;
}
.admin-sidebar__foot strong { color: #fff; display: block; margin-bottom: 0.15rem; }
.admin-sidebar__foot .role-pill {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--a-accent-soft);
  color: var(--a-accent-hover);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.admin-main { min-width: 0; background: var(--a-bg); }
.admin-topbar {
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a-border);
  padding: 0.9rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
}
.admin-topbar h1 { margin: 0; font-size: 1.15rem; }
.admin-content {
  padding: 1.5rem;
  width: 100%;
  max-width: none;
}

.admin-menu-btn {
  display: none;
  border: 1px solid var(--a-border);
  background: var(--a-surface);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: #fff;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 1.1rem 1.2rem;
}
.stat-card span {
  display: block;
  color: var(--a-muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}
.stat-card strong {
  font-family: var(--a-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--a-accent);
}

/* Dashboard */
.dash { max-width: none; width: 100%; }
.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.1rem;
  padding: 1.1rem 1.2rem;
  background:
    linear-gradient(135deg, rgba(61, 158, 74, 0.14), transparent 55%),
    var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 12px;
}
.dash-hero__greet {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.85rem;
}
.dash-hero__title {
  margin: 0.15rem 0 0.2rem;
  font-size: 1.55rem;
  font-family: var(--a-display);
  letter-spacing: -0.02em;
}
.dash-hero__sub {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.82rem;
}
.dash-hero__pills {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
}
.dash-pill {
  min-width: 96px;
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--a-border);
}
.dash-pill span,
.dash-pill small {
  display: block;
  color: var(--a-muted);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.dash-pill strong {
  display: block;
  font-size: 1.25rem;
  color: var(--a-accent);
  font-family: var(--a-display);
  line-height: 1.2;
  margin: 0.1rem 0;
}
.dash-pill.is-alert { border-color: rgba(224, 160, 64, 0.45); }
.dash-pill.is-alert strong { color: #E0C060; }

.dash-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 0.9rem;
}
.dash-stat {
  display: block;
  padding: 0.9rem 0.95rem;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.dash-stat:hover {
  border-color: rgba(61, 158, 74, 0.45);
  transform: translateY(-1px);
}
.dash-stat span {
  display: block;
  color: var(--a-muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.dash-stat strong {
  display: block;
  margin: 0.25rem 0 0.2rem;
  font-size: 1.45rem;
  font-family: var(--a-display);
  color: var(--a-accent);
}
.dash-stat em {
  display: block;
  font-style: normal;
  color: var(--a-muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.dash-quick {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}
.dash-quick__item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.95rem;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  color: inherit;
  text-decoration: none;
}
.dash-quick__item:hover { border-color: rgba(61, 158, 74, 0.45); }
.dash-quick__item strong {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 0.15rem;
}
.dash-quick__item span,
.dash-quick__item em {
  color: var(--a-muted);
  font-size: 0.75rem;
  font-style: normal;
}
.dash-quick__item em {
  white-space: nowrap;
  font-weight: 700;
  color: var(--a-accent-hover);
}

.dash-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}
.dash-panel {
  margin-bottom: 0;
  padding: 1rem;
}
.dash-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.dash-panel__head h2 {
  margin: 0;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--a-muted);
}
.dash-empty {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.88rem;
}

.dash-chart {
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
  min-height: 160px;
}
.dash-chart__col {
  flex: 1;
  text-align: center;
  min-width: 0;
}
.dash-chart__bar-wrap {
  height: 110px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.dash-chart__bar {
  width: 100%;
  max-width: 28px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--a-accent-hover), var(--a-accent));
}
.dash-chart__val {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 700;
}
.dash-chart__day {
  display: block;
  color: var(--a-muted);
  font-size: 0.68rem;
}

.dash-status,
.dash-rank {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.dash-status__row {
  display: block;
  color: inherit;
  text-decoration: none;
}
.dash-status__meta,
.dash-rank__meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.82rem;
}
.dash-status__meta span,
.dash-rank__meta strong { color: var(--a-text); }
.dash-status__meta strong,
.dash-rank__meta em {
  color: var(--a-muted);
  font-style: normal;
  font-weight: 700;
}
.dash-status__track,
.dash-rank__track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.dash-status__fill,
.dash-rank__fill {
  height: 100%;
  border-radius: inherit;
  background: var(--a-accent);
}
.dash-rank__row {
  display: flex;
  gap: 0.55rem;
  align-items: center;
}
.dash-rank__n {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 800;
  background: var(--a-accent-soft);
  color: var(--a-accent-hover);
  flex: 0 0 auto;
}
.dash-rank__body { flex: 1; min-width: 0; }

.dash-split {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 0.85rem;
}
.dash-side-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.dash-table td strong { display: block; }
.dash-table td small {
  display: block;
  margin-top: 0.15rem;
}
.dash-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.dash-feed a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: inherit;
  text-decoration: none;
}
.dash-feed li:last-child a { border-bottom: 0; }
.dash-feed a:hover strong { color: var(--a-accent); }
.dash-feed strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 0.12rem;
}
.dash-feed span {
  display: block;
  color: var(--a-muted);
  font-size: 0.75rem;
}

.card {
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.card h2 { margin: 0 0 1rem; font-size: 1.05rem; }

.table-wrap { overflow-x: auto; }
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th,
table.data td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--a-border);
  vertical-align: middle;
}
table.data th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--a-muted);
  font-weight: 700;
}
table.data tr.is-clickable {
  cursor: pointer;
}
table.data tr.is-clickable:hover td {
  background: rgba(61, 158, 74, 0.06);
}
table.data small { color: var(--a-muted); }

.badge {
  display: inline-flex;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-success { background: var(--a-accent-soft); color: var(--a-accent-hover); }
.badge-muted { background: rgba(255,255,255,0.06); color: var(--a-muted); }
.badge-warn { background: rgba(200,160,40,0.15); color: #E0C060; }
.badge-danger { background: rgba(224,90,90,0.15); color: #f0a0a0; }
.badge-info { background: rgba(61,158,74,0.12); color: var(--a-accent-hover); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 38px;
  padding: 0 0.95rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  cursor: pointer;
  background: var(--a-accent);
  color: #041006;
  font-family: var(--a-display);
}
.btn:hover { background: var(--a-accent-hover); }
.btn-outline {
  background: transparent;
  border-color: var(--a-border-strong);
  color: var(--a-text);
}
.btn-outline:hover {
  border-color: var(--a-accent);
  color: var(--a-accent);
}
.btn-danger { background: var(--a-danger); color: #fff; }
.btn-sm { min-height: 32px; padding: 0 0.7rem; font-size: 0.75rem; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid .full { grid-column: 1 / -1; }
.form-group { margin-bottom: 0.25rem; }
.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--a-muted);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.form-control {
  width: 100%;
  min-height: 42px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-bg);
  color: var(--a-text);
  font: inherit;
}
.form-control:focus {
  outline: none;
  border-color: var(--a-accent);
  box-shadow: 0 0 0 3px var(--a-accent-soft);
}
textarea.form-control { min-height: 110px; resize: vertical; }
select.form-control option { background: #111; color: #fff; }
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.6rem;
  font-weight: 600;
  color: var(--a-muted);
}
.form-check input { accent-color: var(--a-accent); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* Compact add/edit pages */
.form-page {
  max-width: none;
  width: 100%;
}
.form-page--narrow {
  max-width: 560px;
}
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  grid-template-areas:
    "main side"
    "footer footer";
  gap: 0.85rem;
  align-items: start;
}
.form-layout > .form-main {
  grid-area: main;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.form-layout > .form-side {
  grid-area: side;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  position: sticky;
  top: 0.85rem;
}
.form-layout > .form-footer {
  grid-area: footer;
  margin-top: 0;
  padding: 0.7rem 0.85rem;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 10px;
}
.form-page .card {
  padding: 0.9rem 1rem;
  margin-bottom: 0;
  border-radius: 10px;
}
.form-page .card h2 {
  margin: 0 0 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-muted);
}
.form-page .form-grid {
  gap: 0.6rem 0.75rem;
}
.form-page .form-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.form-page .form-label {
  font-size: 0.68rem;
  margin-bottom: 0.25rem;
}
.form-page .form-control {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
}
.form-page textarea.form-control {
  min-height: 68px;
  padding: 0.45rem 0.6rem;
  line-height: 1.45;
}
.form-page textarea.form-control.is-md { min-height: 100px; }
.form-page textarea.form-control.is-lg { min-height: 220px; }
.form-page .form-check {
  margin-top: 0;
  font-size: 0.82rem;
  font-weight: 600;
  min-height: 34px;
}
.form-page .form-checks {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.form-page .form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--a-muted);
  line-height: 1.45;
}
.form-page .form-hint code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.7rem;
  color: var(--a-accent-hover);
  background: rgba(61, 158, 74, 0.1);
  padding: 0.05rem 0.3rem;
  border-radius: 4px;
}

.favicon-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 0 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--a-border);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}
.favicon-preview__frame {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--a-border);
  background:
    linear-gradient(45deg, #1a1a1a 25%, transparent 25%) 0 0 / 12px 12px,
    linear-gradient(-45deg, #1a1a1a 25%, transparent 25%) 0 6px / 12px 12px,
    linear-gradient(45deg, transparent 75%, #1a1a1a 75%) 6px -6px / 12px 12px,
    linear-gradient(-45deg, transparent 75%, #1a1a1a 75%) -6px 0 / 12px 12px,
    #111;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.favicon-preview__frame img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  image-rendering: auto;
}
.favicon-preview__placeholder {
  font-size: 0.62rem;
  color: var(--a-muted);
  text-align: center;
  line-height: 1.2;
  padding: 0.2rem;
}
.favicon-preview__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}
.favicon-preview__meta strong {
  font-size: 0.85rem;
}
.favicon-preview__meta span {
  font-size: 0.75rem;
  color: var(--a-muted);
  word-break: break-all;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0;
  padding: 0.4rem 0.5rem;
  background: #0c0c0c;
  border: 1px solid var(--a-border);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
}
.form-page .editor-toolbar + .form-control {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
.editor-btn {
  appearance: none;
  min-width: 28px;
  min-height: 26px;
  padding: 0 0.4rem;
  border: 1px solid var(--a-border);
  border-radius: 5px;
  background: var(--a-bg);
  color: var(--a-text);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.editor-btn:hover {
  border-color: var(--a-accent);
  color: var(--a-accent);
}
.editor-btn__u { text-decoration: underline; text-underline-offset: 0.12em; }
.editor-toolbar__sep {
  width: 1px;
  height: 16px;
  background: var(--a-border);
  margin: 0 0.2rem;
}
.editor-toolbar__label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-muted);
  margin-right: 0.1rem;
}
.color-scale {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 3px;
  align-items: center;
  padding: 2px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
}
.size-scale {
  display: inline-flex;
  gap: 3px;
  align-items: center;
}
.editor-btn--size {
  min-width: 30px;
  font-size: 0.72rem;
  letter-spacing: -0.02em;
}
.editor-btn--xl {
  font-size: 0.8rem;
  font-weight: 800;
}
.editor-btn--size.is-active {
  border-color: var(--a-accent);
  color: var(--a-accent);
  background: var(--a-accent-soft);
}
.color-swatch {
  appearance: none;
  width: 16px;
  height: 16px;
  padding: 0;
  border-radius: 3px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: var(--swatch);
  cursor: pointer;
  flex: 0 0 auto;
}
.color-swatch.is-active,
.color-swatch:hover,
.color-swatch:focus-visible {
  outline: 2px solid var(--a-accent);
  outline-offset: 1px;
}
.color-picker {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--a-border);
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 auto;
  background:
    conic-gradient(from 0deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
}
.color-picker input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: 0;
  padding: 0;
}
.form-page .form-preview {
  margin: 0 0 0.5rem;
}
.form-page .form-preview img {
  max-height: 88px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 1px solid var(--a-border);
}
.form-page .actions .btn,
.form-page .form-footer .btn {
  min-height: 34px;
  padding: 0 0.85rem;
  font-size: 0.78rem;
  border-radius: 6px;
}
.video-rows {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.video-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr auto;
  gap: 0.55rem;
  align-items: end;
  margin-bottom: 0;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.video-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}
.video-row--stack {
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0.45rem;
}
.video-row--stack .remove-video-row {
  justify-self: start;
}
.video-row .form-group { margin: 0; }
.form-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}
.form-card-head h2 { margin: 0; }

.alert {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-weight: 600;
  border: 1px solid var(--a-border);
}
.alert-success { background: var(--a-accent-soft); color: var(--a-accent-hover); border-color: rgba(61,158,74,0.3); }
.alert-error { background: rgba(224,90,90,0.12); color: #f0a0a0; border-color: rgba(224,90,90,0.3); }

.login-body {
  min-height: 100vh;
  background: var(--a-bg);
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 50% -10%, rgba(61, 158, 74, 0.18), transparent 55%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(61, 158, 74, 0.08), transparent 50%),
    var(--a-bg);
}
.login-card {
  width: min(100%, 420px);
  background: var(--a-surface);
  border: 1px solid var(--a-border-strong);
  border-radius: 16px;
  padding: 2rem 1.75rem 1.85rem;
  color: var(--a-text);
  box-shadow:
    0 0 0 1px rgba(61, 158, 74, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.45);
}
.login-card__brand {
  display: grid;
  place-items: center;
  width: 100%;
  margin: 0 0 1.35rem;
  padding: 0.25rem 0 1.25rem;
  border-bottom: 1px solid var(--a-border);
  text-align: center;
}
.login-card__logo {
  display: block;
  height: 84px;
  width: auto;
  max-width: min(300px, 100%);
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
  object-position: center;
}
.login-card__head {
  text-align: center;
  margin-bottom: 1.5rem;
}
.login-card h1 {
  margin: 0;
  font-size: 1.55rem;
  font-family: var(--a-display);
  color: var(--a-text);
  text-align: center;
}
.login-card__form .form-group {
  margin-bottom: 0.95rem;
}
.login-card .form-control {
  background: var(--a-bg);
  border-color: var(--a-border);
  color: var(--a-text);
  min-height: 46px;
}
.login-card .form-control:focus {
  border-color: var(--a-accent);
  box-shadow: 0 0 0 3px var(--a-accent-soft);
}
.login-card .form-label {
  color: var(--a-muted);
}
.login-card__submit {
  width: 100%;
  min-height: 48px;
  margin-top: 0.35rem;
  background: var(--a-accent);
  color: #041006;
}
.login-card__submit:hover {
  background: var(--a-accent-hover);
}
.login-card__back {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1.15rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--a-border);
  color: var(--a-muted);
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.2s ease;
}
.login-card__back:hover {
  color: var(--a-accent);
}
.login-card .alert {
  margin-bottom: 1rem;
}

.admin-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 90;
}
.admin-backdrop.is-open { display: block; }

.perm-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}
.perm-list span {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  background: var(--a-surface-2);
  border: 1px solid var(--a-border);
  color: var(--a-muted);
}

.role-perms-preview {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--a-border);
}
.role-perm-box__desc {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  color: var(--a-muted);
  line-height: 1.45;
}

.roles-guide__head {
  margin-bottom: 1.25rem;
}
.roles-guide__head h2 {
  margin-bottom: 0.35rem;
}
.roles-guide__head p {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.88rem;
  line-height: 1.5;
  max-width: 52rem;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.role-card {
  background: var(--a-surface-2);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.role-card--full {
  border-color: rgba(61, 158, 74, 0.35);
  background: linear-gradient(160deg, rgba(61, 158, 74, 0.08), var(--a-surface-2) 55%);
}
.role-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}
.role-card__header h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 650;
}
.role-card__count {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  color: var(--a-muted);
}
.role-card__desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--a-muted);
  line-height: 1.5;
}

.role-perm-detail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  border-top: 1px solid var(--a-border);
  padding-top: 0.7rem;
}
.role-perm-detail li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.role-perm-detail__name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--a-text);
}
.role-perm-detail__name::before {
  content: "✓ ";
  color: var(--a-accent);
  font-weight: 700;
}
.role-perm-detail__hint {
  font-size: 0.72rem;
  color: var(--a-muted);
  line-height: 1.35;
  padding-left: 0.95rem;
}

.roles-matrix-wrap {
  border-top: 1px solid var(--a-border);
  padding-top: 1.25rem;
}
.roles-matrix__title {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
}
.roles-matrix th,
.roles-matrix td {
  text-align: center;
  vertical-align: middle;
}
.roles-matrix th:first-child,
.roles-matrix td:first-child {
  text-align: left;
}
.roles-matrix td:first-child strong {
  display: block;
  font-size: 0.85rem;
}
.roles-matrix td:first-child small {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.72rem;
  color: var(--a-muted);
  line-height: 1.35;
}
.roles-matrix__cell {
  width: 7.5rem;
}
.roles-matrix__yes {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--a-accent-soft);
  color: var(--a-accent-hover);
  font-size: 0.85rem;
  font-weight: 700;
}
.roles-matrix__no {
  color: var(--a-muted);
  opacity: 0.55;
  font-size: 0.95rem;
}

@media (max-width: 720px) {
  .roles-grid {
    grid-template-columns: 1fr;
  }
  .roles-matrix__cell {
    width: auto;
  }
}

.chart-bar {
  width: 70%;
  background: var(--a-accent);
  border-radius: 6px 6px 0 0;
}

.hub-intro {
  color: var(--a-muted);
  margin: 0 0 1.5rem;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hub-intro p { margin: 0; }
.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.35rem 1.4rem;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: var(--a-radius);
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
  min-height: 160px;
}
.hub-card:hover {
  border-color: rgba(61, 158, 74, 0.4);
  background: var(--a-surface-2);
  transform: translateY(-2px);
}
.hub-card__tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a-accent);
}
.hub-card h3 {
  margin: 0;
  font-size: 1.15rem;
}
.hub-card p {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.9rem;
  flex: 1;
}
.hub-card__go {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--a-accent-hover);
  letter-spacing: 0.04em;
}
.admin-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 1.25rem;
  font-size: 0.85rem;
  color: var(--a-muted);
}
.admin-breadcrumb a:hover { color: var(--a-accent); }
.admin-breadcrumb__sep { opacity: 0.4; }

/* Categories page */
.cats-page { max-width: none; width: 100%; }
.cats-layout {
  display: grid;
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
}
.cats-create {
  position: sticky;
  top: 0.85rem;
  margin-bottom: 0;
  padding: 1rem;
}
.cats-create h2,
.cats-list-head h2 {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-muted);
}
.cats-form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cats-form .form-group { margin: 0; }
.cats-form .form-label {
  font-size: 0.68rem;
  margin-bottom: 0.25rem;
}
.cats-form .form-control {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
}
.cats-form textarea.form-control {
  min-height: 64px;
  padding: 0.45rem 0.6rem;
}
.cats-form__row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.55rem;
  align-items: end;
}
.cats-form__check {
  margin: 0;
  min-height: 34px;
  font-size: 0.82rem;
}
.cats-form__submit {
  width: 100%;
  min-height: 34px;
  margin-top: 0.15rem;
}

.cats-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.cats-list-head h2 { margin: 0; }
.cats-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.cats-empty {
  margin: 0;
  padding: 1.25rem;
}
.cats-empty p {
  margin: 0;
  color: var(--a-muted);
  font-size: 0.9rem;
}

.cat-card {
  margin: 0;
  padding: 0.9rem 1rem;
  position: relative;
}
.cat-card__form {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.cat-card__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 88px;
  gap: 0.55rem;
  align-items: end;
}
.cat-card__form .form-group { margin: 0; }
.cat-card__form .form-label {
  font-size: 0.68rem;
  margin-bottom: 0.25rem;
}
.cat-card__form .form-control {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
}
.cat-card__form textarea.form-control {
  min-height: 56px;
  padding: 0.4rem 0.6rem;
}
.cat-card__status .form-check {
  margin: 0;
  min-height: 34px;
  font-size: 0.8rem;
}
.cat-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
}
.cat-card__delete {
  position: absolute;
  right: 1rem;
  bottom: 0.9rem;
}
.cat-card__actions {
  padding-right: 4.2rem;
}

.pages-editor {
  max-width: none;
  width: 100%;
}
.pages-editor .form-group { margin-bottom: 0; }
.pages-editor .form-label {
  font-size: 0.68rem;
  margin-bottom: 0.25rem;
}
.pages-editor .form-control {
  min-height: 34px;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.875rem;
}
.pages-editor textarea.form-control {
  min-height: 68px;
  padding: 0.45rem 0.6rem;
  line-height: 1.45;
}
.pages-editor textarea.form-control.is-md { min-height: 100px; }
.pages-editor .form-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--a-muted);
  line-height: 1.35;
}
.pages-editor .form-preview {
  margin: 0 0 0.5rem;
}
.pages-editor .form-preview img {
  max-height: 88px;
  width: 100%;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  border: 1px solid var(--a-border);
}
.pages-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.3rem;
  background: var(--a-surface);
  border: 1px solid var(--a-border);
  border-radius: 10px;
}
.pages-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--a-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.45rem 0.75rem;
  border-radius: 7px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.pages-tab:hover {
  color: var(--a-text);
  background: rgba(255, 255, 255, 0.04);
}
.pages-tab.is-active {
  background: var(--a-accent-soft);
  color: var(--a-accent-hover);
}
.pages-panel {
  display: none;
}
.pages-panel.is-active {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.pages-section {
  margin-bottom: 0 !important;
  padding: 1rem 1.1rem;
}
.pages-section > h2 {
  margin: 0 0 0.85rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--a-muted);
}

.pages-cols {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(220px, 0.85fr);
  gap: 1rem;
  align-items: start;
}
.pages-cols--single {
  grid-template-columns: 1fr;
}
.pages-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}
.pages-fields .span-2 { grid-column: 1 / -1; }
.pages-cols__side {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.pages-media,
.pages-side-fields {
  padding: 0.75rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-surface-2);
}
.pages-side-fields {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pages-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.pages-stat {
  padding: 0.7rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-surface-2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.pages-stat__n,
.pages-feature__n {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--a-accent);
}

.pages-features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}
.pages-feature {
  padding: 0.7rem;
  border: 1px solid var(--a-border);
  border-radius: 8px;
  background: var(--a-surface-2);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pages-actions {
  position: sticky;
  bottom: 0.75rem;
  z-index: 5;
  margin-top: 0.85rem;
  padding: 0.65rem 0.75rem;
  background: rgba(10, 10, 10, 0.92);
  border: 1px solid var(--a-border);
  border-radius: 10px;
  backdrop-filter: blur(8px);
}

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .hub-grid { grid-template-columns: repeat(2, 1fr); }
  .pages-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pages-features { grid-template-columns: 1fr; }
  .cats-layout { grid-template-columns: 1fr; }
  .cats-create { position: static; }
  .dash-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dash-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-split { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
    width: min(86vw, 280px);
    transform: translateX(-105%);
    transition: transform 0.3s ease;
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-menu-btn { display: inline-flex; align-items: center; justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .form-grid,
  .form-page .form-grid--3 { grid-template-columns: 1fr; }
  .form-layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      "main"
      "side"
      "footer";
  }
  .form-layout > .form-side {
    position: static;
  }
  .video-row { grid-template-columns: 1fr; }
  .hub-grid { grid-template-columns: 1fr; }
  .pages-cols { grid-template-columns: 1fr; }
  .pages-fields { grid-template-columns: 1fr; }
  .pages-fields .span-2 { grid-column: auto; }
  .pages-stats { grid-template-columns: 1fr 1fr; }
  .cat-card__top {
    grid-template-columns: 1fr 1fr;
  }
  .cat-card__order,
  .cat-card__status { grid-column: span 1; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .admin-content { padding: 1rem; }
  .dash-stats { grid-template-columns: 1fr 1fr; }
  .dash-quick { grid-template-columns: 1fr; }
}
