/*
  DBOT optional template skins — SAFE LAYOUT VERSION
  Default is the default and receives no visual/layout overrides.
  The four optional templates change presentation only. They do not reposition,
  resize, re-parent, collapse, hide, or replace native dashboard navigation.
*/

/* Compact template selector only. */
.dbot-template-picker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 11px;
  color: var(--muted);
}
.dbot-template-picker-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .78;
}
.dbot-template-picker .dbot-template-picker-select {
  width: auto !important;
  min-width: 116px;
  max-width: 160px;
  min-height: 30px !important;
  padding: 4px 26px 4px 8px !important;
  border-radius: 8px !important;
  font-size: 11px !important;
}
@media (max-width: 720px) {
  .dashboard-legal-footer .dbot-template-picker {
    flex-basis: 100%;
    justify-content: center;
  }
}

/* Alternative palettes. Default intentionally has no block. */
html[data-dbot-template="neon-grid"] {
  --bg:#05080b; --bg-2:#071017; --panel:#0b1218; --panel-2:#101b23; --panel-3:#14232d;
  --border:#1e3947; --border-strong:#2c586c; --text:#eefcff; --muted:#b3cad1; --chip:#0c1d26;
  --dbt-bg:#05080b; --dbt-nav:#071017; --dbt-panel:#0b1218; --dbt-panel-2:#101b23; --dbt-panel-3:#14232d;
  --dbt-border:#1e3947; --dbt-border-strong:#2c586c; --dbt-text:#eefcff; --dbt-muted:#b3cad1;
  --dbt-accent:#00d7ff; --dbt-accent-soft:#072733; --dbt-accent-deep:#06495d; --dbt-accent-rgb:0,215,255;
  --dbt-input:#071824;
}
html[data-dbot-template="hazard-ops"] {
  --bg:#090909; --bg-2:#11100d; --panel:#14130f; --panel-2:#1a1812; --panel-3:#201d15;
  --border:#3a3528; --border-strong:#5b4e2c; --text:#fff9ec; --muted:#d1c4a4; --chip:#1a170e;
  --dbt-bg:#090909; --dbt-nav:#11100d; --dbt-panel:#14130f; --dbt-panel-2:#1a1812; --dbt-panel-3:#201d15;
  --dbt-border:#3a3528; --dbt-border-strong:#5b4e2c; --dbt-text:#fff9ec; --dbt-muted:#d1c4a4;
  --dbt-accent:#ffb000; --dbt-accent-soft:#332400; --dbt-accent-deep:#6e4d00; --dbt-accent-rgb:255,176,0;
  --dbt-input:#18140b;
}
html[data-dbot-template="void-core"] {
  --bg:#07060b; --bg-2:#0b0912; --panel:#12101b; --panel-2:#191526; --panel-3:#211b31;
  --border:#3a3151; --border-strong:#564875; --text:#fbf8ff; --muted:#c0b7d1; --chip:#191325;
  --dbt-bg:#07060b; --dbt-nav:#0b0912; --dbt-panel:#12101b; --dbt-panel-2:#191526; --dbt-panel-3:#211b31;
  --dbt-border:#3a3151; --dbt-border-strong:#564875; --dbt-text:#fbf8ff; --dbt-muted:#c0b7d1;
  --dbt-accent:#9b5cff; --dbt-accent-soft:#241643; --dbt-accent-deep:#4b257f; --dbt-accent-rgb:155,92,255;
  --dbt-input:#131022;
}
html[data-dbot-template="ice-terminal"] {
  --bg:#05080e; --bg-2:#07101a; --panel:#0e1722; --panel-2:#14202c; --panel-3:#1a2937;
  --border:#26394c; --border-strong:#3a5670; --text:#f1f7ff; --muted:#afbdca; --chip:#102033;
  --dbt-bg:#05080e; --dbt-nav:#07101a; --dbt-panel:#0e1722; --dbt-panel-2:#14202c; --dbt-panel-3:#1a2937;
  --dbt-border:#26394c; --dbt-border-strong:#3a5670; --dbt-text:#f1f7ff; --dbt-muted:#afbdca;
  --dbt-accent:#5aa2ff; --dbt-accent-soft:#10284a; --dbt-accent-deep:#214f88; --dbt-accent-rgb:90,162,255;
  --dbt-input:#0a1625;
}

/* Shared skin rules: paint only. Native styles.css remains the geometry authority. */
html[data-dbot-template]:not([data-dbot-template="original"]) body {
  color: var(--dbt-text);
  background:
    linear-gradient(rgba(var(--dbt-accent-rgb), .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--dbt-accent-rgb), .035) 1px, transparent 1px),
    radial-gradient(circle at 18% -5%, rgba(var(--dbt-accent-rgb), .12), transparent 26%),
    linear-gradient(180deg, var(--dbt-bg), #05070a 100%);
  background-size: 28px 28px, 28px 28px, auto, auto;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .sidebar {
  background: var(--dbt-nav);
  border-color: var(--dbt-border);
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .guild-picker,
  .user-card,
  .sidebar-actions,
  .zone-editor,
  .admin-search,
  .right-panel,
  .page-card,
  .table-card,
  .filter-bar,
  .alert,
  .status-panel,
  .map-shell,
  .map-list,
  .metric-card,
  .item-card,
  .basket-card,
  .detail-card,
  .nav-group,
  .admin-tab-group,
  .admin-control-strip,
  .admin-control-group,
  .admin-control-centre-card,
  .admin-quick-access-card,
  .admin-feature-search-field,
  .dashboard-legal-footer
) {
  border-color: var(--dbt-border);
  background-color: var(--dbt-panel);
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .guild-picker,
  .user-card,
  .sidebar-actions,
  .page-card,
  .table-card,
  .metric-card,
  .item-card,
  .basket-card,
  .detail-card,
  .admin-control-strip,
  .admin-tab-group,
  .admin-control-group,
  .admin-control-centre-card,
  .admin-quick-access-card
) {
  background-image: linear-gradient(180deg, var(--dbt-panel-2), var(--dbt-panel));
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .sidebar select,
  .sidebar input,
  .content select,
  .content input,
  .content textarea,
  .admin-feature-search-field
) {
  background-color: var(--dbt-input);
  border-color: var(--dbt-border-strong);
  color: var(--dbt-text);
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .nav-group summary,
  .admin-tab-group summary
) {
  color: var(--dbt-text);
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .btn-secondary,
  .btn-tab,
  .btn-chip,
  .nav button,
  .nav-group-items button
) {
  border-color: var(--dbt-border-strong) !important;
  background: linear-gradient(180deg, var(--dbt-panel-3), var(--dbt-panel)) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .nav-group-items button.active,
  .nav button.active,
  .btn-tab.active
) {
  border-color: var(--dbt-accent) !important;
  background: linear-gradient(180deg, var(--dbt-accent-deep), var(--dbt-accent-soft)) !important;
  color: #fff !important;
  box-shadow: inset 3px 0 0 var(--dbt-accent), 0 8px 20px rgba(var(--dbt-accent-rgb), .16) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .nav-group[open],
  .admin-tab-group[open],
  .admin-control-strip[open]
) {
  border-color: var(--dbt-border-strong);
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .title-accent-pill,
  .brand-tag
) {
  border-color: rgba(var(--dbt-accent-rgb), .42) !important;
  background: rgba(var(--dbt-accent-rgb), .10) !important;
  color: var(--dbt-accent) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .btn-primary,
  .btn.primary
):not(.btn-danger):not(.danger) {
  border-color: var(--dbt-accent) !important;
  background: linear-gradient(180deg, var(--dbt-accent-deep), var(--dbt-accent-soft)) !important;
  color: #fff !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  button,
  a,
  input,
  select,
  textarea,
  summary
):focus-visible {
  outline-color: var(--dbt-accent);
}

/* Z817 — full dashboard skin coverage.
   These rules deliberately change paint only: no widths, positioning, display,
   grid/flex templates or navigation geometry. */
html[data-dbot-template]:not([data-dbot-template="original"]) .content {
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .page-card,
  .compact-card,
  .table-card,
  .detail-card,
  .basket-card,
  .right-panel,
  .status-panel,
  .filter-bar,
  .alert,
  .callout,
  .empty-state,
  .metric-card,
  .item-card,
  .data-row,
  .compact-row,
  .admin-control-strip,
  .admin-control-group,
  .admin-control-centre-card,
  .admin-quick-access-card,
  .base-faction-control-panel,
  .faction-profile-inline,
  .base-controls-disclosure,
  .faction-leader-controls-disclosure,
  .survivor-faction-card,
  .donation-public-feed,
  .quest-panel
) {
  border-color: var(--dbt-border) !important;
  background: linear-gradient(180deg, var(--dbt-panel-2), var(--dbt-panel)) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .data-list,
  .table-wrap,
  .section-tools,
  .item-tags,
  .quick-actions
) {
  color: var(--dbt-text);
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  h1,h2,h3,h4,h5,h6,strong,.label,label,.row-head
) {
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .muted,
  .small.muted,
  small,
  .help-centre-toggle small
) {
  color: var(--dbt-muted) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  input,
  select,
  textarea
) {
  background: var(--dbt-input) !important;
  border-color: var(--dbt-border-strong) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .btn-secondary,
  .btn-ghost,
  .btn-tab,
  .btn-chip
) {
  border-color: var(--dbt-border-strong) !important;
  background: linear-gradient(180deg, var(--dbt-panel-3), var(--dbt-panel)) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  table,
  thead,
  tbody,
  tr,
  th,
  td
) {
  border-color: var(--dbt-border) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  th,
  thead td
) {
  background: var(--dbt-panel-2) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content td {
  background-color: color-mix(in srgb, var(--dbt-panel) 92%, transparent) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content .chip:not(.success):not(.warning):not(.danger):not(.info) {
  background: var(--dbt-panel-3) !important;
  border-color: var(--dbt-border-strong) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .faction-profile-image-frame,
  .faction-flag-thumb,
  .quest-card-art,
  .map-shell,
  .map-list
) {
  border-color: var(--dbt-border-strong) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content :is(
  .faction-controls-summary,
  .base-controls-disclosure > summary
) {
  color: var(--dbt-text) !important;
  background: var(--dbt-panel-2) !important;
  border-color: var(--dbt-border) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content a:not(.btn):not(.btn-secondary):not(.btn-ghost) {
  text-decoration-color: rgba(var(--dbt-accent-rgb), .55);
}

html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .dashboard-unified-header,
  .dashboard-unified-server-row,
  .dashboard-server-context,
  .dashboard-server-picker,
  .dashboard-unified-page-title,
  .header-main
) {
  border-color: var(--dbt-border) !important;
  color: var(--dbt-text) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .dashboard-unified-server-row,
  .dashboard-server-context,
  .dashboard-server-picker,
  .dashboard-unified-page-title
) {
  background-color: var(--dbt-panel) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) :is(
  .dashboard-unified-page-art,
  .dashboard-unified-page-art-home,
  .dashboard-unified-page-art-casino
) {
  border-color: var(--dbt-border-strong) !important;
}
html[data-dbot-template]:not([data-dbot-template="original"]) .content .faction-profile-image-frame {
  background: var(--dbt-panel-3) !important;
}

