/* /admin — layered on top of the host panel's neutral shell (host/style.css). */

.adm-tabs {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.adm-tab {
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
  transition: background-color .16s var(--ease), color .16s var(--ease);
}
.adm-tab:hover { color: var(--text); }
.adm-tab.is-on { background: var(--panel-2); border-color: var(--line); color: var(--text); }

.tabpane[hidden] { display: none; }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.card + .card, .two-col + .card { margin-top: 16px; }

.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.sub { margin: 18px 0 10px; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rows li {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  font-size: 14px;
}
.rows .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rows.is-empty li { color: var(--muted); justify-content: center; }

.dl-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }

/* ---------------- import ---------------- */
.dropzone {
  display: grid; place-items: center; gap: 4px;
  margin-top: 16px;
  padding: 26px 18px;
  border: 2px dashed var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  cursor: pointer;
  text-align: center;
  transition: border-color .16s var(--ease), background-color .16s var(--ease);
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.is-over {
  border-color: var(--accent);
  background: rgba(0, 229, 255, .07);
}

.report-summary {
  margin: 14px 0 10px;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 14px; font-weight: 600;
}
.report-summary.is-ok { background: rgba(61, 220, 132, .14); color: var(--ok); }
.report-summary.is-bad { background: rgba(255, 59, 107, .14); color: var(--danger); }

.table-wrap { overflow-x: auto; max-height: 46vh; overflow-y: auto; }
.report-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.report-table th, .report-table td {
  text-align: left; padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.report-table th { position: sticky; top: 0; background: var(--panel); color: var(--muted); font-weight: 600; z-index: 1; }
.report-table td.q { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.chip-ok { background: rgba(61, 220, 132, .16); color: var(--ok); }
.chip-warn { background: rgba(255, 229, 0, .16); color: var(--primary); }
.chip-error { background: rgba(255, 59, 107, .16); color: var(--danger); }

/* ---------------- quiz detail ---------------- */
.round-block { margin-bottom: 16px; }
.round-title { display: flex; align-items: center; gap: 8px; font-weight: 700; margin-bottom: 8px; }
.round-title .pill { font-size: 11px; }
.q-line {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  margin-bottom: 5px;
  font-size: 13px;
}
.q-line .q-type { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; min-width: 108px; }
.q-line .q-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-line .q-pts { color: var(--primary); font-weight: 700; }

.slides { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 4px; max-height: 52vh; overflow-y: auto; }
.slides li {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 12px;
  border-radius: 8px;
  background: var(--panel-2);
  font-size: 13px;
}
.slides .s-type { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; min-width: 96px; }
.slides .s-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.slides li[data-auto="false"] { border-left: 3px solid var(--accent); }

/* ---------------- themes ---------------- */
.theme-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 16px; align-items: start; }

.theme-group { margin-bottom: 14px; }
.theme-group h3 { margin: 0 0 8px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.swatch {
  padding: 10px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: inherit;
  transition: border-color .16s var(--ease);
}
.swatch:hover, .swatch.is-on { border-color: var(--accent); }
.swatch-name { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.swatch-dots { display: flex; gap: 4px; }
.swatch-dots i { width: 14px; height: 14px; border-radius: 50%; display: block; }

.token-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.token-field label { margin: 0 0 4px; font-size: 12px; }
.token-field input[type="color"] { height: 42px; padding: 3px; }
.token-field select, .token-field input { min-height: 42px; font-size: 14px; }

.css-report {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 229, 0, .1);
  font-size: 13px;
}
.css-report ul { margin: 6px 0 0; padding-left: 18px; }
.css-report li { margin-bottom: 3px; color: var(--muted); }

/* three-view preview */
.preview-strip { display: grid; grid-template-columns: minmax(0, 200px) minmax(0, 1fr); gap: 12px; align-items: start; }
.preview-frame {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #000;
}
.preview-label {
  padding: 5px 10px;
  background: var(--panel-2);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.preview-body { position: relative; overflow: hidden; }
.preview-phone .preview-body { aspect-ratio: 9 / 16; }
.preview-screen .preview-body { aspect-ratio: 16 / 9; }
.preview-iframe { width: 100%; height: 100%; border: 0; display: block; background: #000; }

/* ---------------- branding preview ---------------- */
.brand-preview {
  display: grid; place-items: center; gap: 8px;
  padding: 34px 20px;
  border-radius: 14px;
  text-align: center;
  min-height: 280px;
}
.brand-preview img { max-height: 48px; }
.bp-title { margin: 0; opacity: .75; font-size: 14px; }
.bp-team { margin: 0; font-family: "Righteous", system-ui, sans-serif; font-size: 28px; }
.bp-msg { margin: 0; font-size: 14px; opacity: .8; }
.bp-btn { margin-top: 12px; padding: 12px 28px; border-radius: 99px; font-weight: 700; }

/* ---------------- misc ---------------- */
.auth-tabs { margin-bottom: 16px; }
.tabs { display: flex; gap: 8px; }
.tab {
  flex: 1; min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-family: inherit; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.tab.is-on { background: var(--panel-2); color: var(--text); border-color: var(--accent); }

.ok-note {
  margin: 14px 0 0; padding: 10px 14px;
  border-radius: 10px;
  background: rgba(61, 220, 132, .14);
  color: var(--ok);
  font-size: 14px; font-weight: 600;
}
.ok-note[hidden] { display: none; }

.keyout { margin-top: 12px; padding: 12px; border-radius: 10px; background: var(--panel-2); }
.keyout code { display: block; margin-top: 6px; word-break: break-all; font-size: 12px; color: var(--primary); }

/* ---------------- billing ---------------- */
.usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}
.usage-item {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-2);
}
.usage-item .n {
  display: block;
  font-family: "Righteous", system-ui, sans-serif;
  font-size: 22px;
  color: var(--primary);
  line-height: 1.2;
}
.usage-item .k { font-size: 12px; color: var(--muted); }
.usage-item .bar { height: 5px; border-radius: 99px; background: var(--line); margin-top: 8px; overflow: hidden; }
.usage-item .bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }
.usage-item.is-full .bar i { background: var(--danger); }

.plan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.plan-card {
  display: flex; flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.plan-card.is-featured { border-color: var(--primary); }
.plan-card.is-current { border-color: var(--accent); }
.plan-name { font-family: "Righteous", system-ui, sans-serif; font-size: 22px; margin: 0 0 4px; }
.plan-tag { margin: 0 0 14px; color: var(--muted); font-size: 14px; }
.plan-points { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 7px; }
.plan-points li { position: relative; padding-left: 22px; font-size: 14px; color: var(--muted); }
.plan-points li::before {
  content: ""; position: absolute; left: 0; top: .45em;
  width: 11px; height: 6px;
  border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok);
  transform: rotate(-45deg);
}
.plan-card .btn { margin-top: auto; }
.plan-soon { margin-top: auto; text-align: center; font-size: 13px; color: var(--muted); padding: 12px; }

@media (max-width: 1000px) {
  .two-col, .theme-layout, .preview-strip { grid-template-columns: 1fr; }
}
