/* panel-base.css: the dashboard's frame: the cursor and background rules for
   the dashboard, the sidebar and its groups, the header, the main window,
   the form layout, color pickers, sliders, scrollbars and the save button.
   Loaded right after the file before it; the order of every panel file is in
   panel-login.css.

   GENERATED: do not edit public/panel-base.css by hand. It is the files of
   estilos/panel/base/ joined in name order by scripts/unir-estilos.mjs, so
   the dashboard still loads one file and the cascade keeps this order. */

body.custom-cursor-native .menu-item,
body.custom-cursor-native .audio-open-card,
body.custom-cursor-native .audio-item-main {
  cursor: var(--native-cursor-url), pointer !important;
}

/* renderProfile() also runs in the dashboard and sets the profile's background
   image on #bg-image-layer. The panel and the login hide it; the profile view
   (dashboard closed) still shows it. */
body.dashboard-open #bg-image-layer,
body.login-open #bg-image-layer {
  display: none;
}

/* The same goes for the background effect canvas: the panel keeps its own
   plain background, whatever effect the profile uses. */
body.dashboard-open #particles-canvas,
body.login-open #particles-canvas {
  display: none;
}

/* Hide custom cursor when dashboard or login is open */
body.dashboard-open #custom-cursor,
body.dashboard-open #custom-cursor-dot,
body.login-open #custom-cursor,
body.login-open #custom-cursor-dot {
  display: none !important;
}

body.dashboard-open,
body.dashboard-open *,
body.login-open,
body.login-open * {
  cursor: auto !important;
}

/* Perfil → Lo básico: the "Ubicación" field sits after the typing switches. */
.location-label-row {
  margin-top: 14px;
}

/* Apariencia → Colores: a color that barely reads on the card
   (public/aviso-contraste.js). A ⚠ next to the label (an .info-tip with its
   bubble), the field's border in amber and a wand inside the field. */
.color-picker-input-wrapper.has-contrast-warning {
  border-color: rgba(250, 204, 21, 0.7);
}

.contrast-flag-btn {
  color: #facc15;
}

.contrast-flag .info-tip-text strong {
  display: block;
  color: #facc15;
}

.contrast-wand {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid rgba(250, 204, 21, 0.5);
  background: transparent;
  color: #facc15;
  cursor: pointer;
}

.contrast-wand svg {
  width: 15px;
  height: 15px;
}

.contrast-wand:hover,
.contrast-wand:focus-visible {
  background: rgba(250, 204, 21, 0.15);
}

.contrast-wand:focus-visible {
  outline: 2px solid #facc15;
  outline-offset: 1px;
}

.badges-save-status {
  margin: 12px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.switch-item:has(input:disabled) {
  opacity: 0.55;
}

/* The dashboard's grays, in one place. On :root so what the dashboard adds
   to <body> (notices, toasts) can use them too; the --panel- prefix keeps
   them apart from the profile's variables in style.css. */
:root {
  --panel-gris-claro: #f8fafc;
  --panel-gris-suave: #cbd5e1;
  --panel-gris: #94a3b8;
  /* #8593a8: 5:1 or more on every dark surface of the dashboard (WCAG AA). */
  --panel-gris-tenue: #8593a8;
  --panel-gris-oscuro: #0f172a;
}

/* The notices (.toast-region, public/avisos.js) hang from <body>, outside the
   dashboard: without being listed here they took the profile's font and
   colors, which the live render puts on :root. */
#admin-dashboard, #login-screen, #verify-screen, .toast-region {
  --primary-color: #e11d48;
  --secondary-color: var(--panel-gris-oscuro);
  --bg-color: #08090c;
  --accent-color: #e11d48;
  --accent-glow: rgba(225, 29, 72, 0.5);
  --text-primary: var(--panel-gris-claro);
  --text-secondary: var(--panel-gris);
  --text-muted: var(--panel-gris-tenue);
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --card-border: rgba(255, 255, 255, 0.08);
  font-family: var(--font-body);
}

#login-screen,
#verify-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(4, 5, 8, 0.96);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.input-field {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 8px;
  margin-bottom: 20px;
}

.input-field label {
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.input-field input:focus {
  border-color: var(--accent-color);
  outline: none;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Full Screen Admin Dashboard */
#admin-dashboard {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 7, 10, 0.45);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  color: var(--text-primary);
}

.dashboard-sidebar {
  width: 260px;
  background: rgba(9, 10, 15, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid var(--card-border);
  display: flex;
  flex-direction: column;
  height: 100%;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}

.brand-text {
  font-family: var(--font-title);
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-sub {
  font-size: 0.62rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.sidebar-menu {
  flex-grow: 1;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.menu-item {
  background: none;
  border: none;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-title);
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.menu-item svg {
  width: 18px;
  height: 18px;
  transition: transform 0.2s;
}

.menu-item:hover {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.menu-item:hover svg {
  transform: scale(1.1);
}

.menu-item.active,
.menu-item.has-active {
  background: rgba(225, 29, 72, 0.08);
  border: 1px solid rgba(225, 29, 72, 0.2);
  /* A lighter rose than the accent: the accent itself reads at 4:1 there (WCAG AA asks 4.5). */
  color: #f43f5e;
}

.sidebar-footer {
  padding: 20px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.02);
}

.logout-btn svg {
  width: 14px;
  height: 14px;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.16);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.15);
}

/* Dashboard Main Window */
.dashboard-main {
  flex-grow: 1;
  /* Let the form shrink next to the live preview column instead of pushing
     its right side under the panel. */
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: rgba(7, 8, 12, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dashboard-header {
  padding: 24px 36px;
  border-bottom: 1px solid var(--card-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
  background: rgba(9, 10, 16, 0.65);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.dashboard-header h1 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  font-weight: 800;
}

.dashboard-heading {
  min-width: 0;
}

.dashboard-subtitle {
  margin: 2px 0 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

/* One line under a settings group's title saying what it is for. */
.group-desc {
  margin: -2px 0 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* A heading inside a group that holds two related parts (Discord). */
.group-subtitle {
  margin: 14px 0 4px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-primary);
}

.group-subtitle:first-of-type {
  margin-top: 4px;
}

/* "Tu bio" / "Cuenta": the sidebar's groups. */
.menu-group-label {
  margin: 14px 12px 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.header-actions {
  display: flex;
  gap: 12px;
}

/* "Ver mi bio": text on wide screens, an icon on phones (panel-movil.css). */
.view-bio-btn {
  justify-content: center;
  height: 38px;
  text-decoration: none;
}

.view-bio-btn svg {
  display: none;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.dashboard-body {
  flex-grow: 1;
  overflow-y: auto;
  padding: 36px;
}

#home-discord-result[data-tone="error"],
.discord-dialog [data-tone="error"] {
  color: #f87171;
}

.discord-dialog {
  margin: auto;
  width: min(420px, calc(100vw - 32px));
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  background: #111218;
  color: inherit;
}

.discord-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}

.discord-dialog h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}

.discord-dialog-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
}

.discord-dialog-result:empty {
  display: none;
}

.discord-dialog-actions {
  display: flex;
  gap: 10px;
}

.discord-dialog-unlink {
  background: #dc2626;
}

.discord-dialog-unlink:hover {
  background: #b91c1c;
}

.discord-dialog-close {
  border-color: var(--card-border) !important;
  background: rgba(255, 255, 255, 0.06);
}

.discord-dialog-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Account settings: "Borrar cuenta" (public/account.js) */
.delete-account-group {
  border-color: rgba(220, 38, 38, 0.35);
}

.delete-account-btn {
  padding: 10px 16px;
  border: 1px solid rgba(220, 38, 38, 0.6);
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.12);
  color: #fca5a5;
  font-weight: 600;
  cursor: pointer;
}

.delete-account-btn:hover {
  background: rgba(220, 38, 38, 0.25);
}

.delete-account-warning {
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 600;
}

.delete-account-list {
  margin: 0 0 12px;
  padding: 12px 14px 12px 32px;
  border-radius: 10px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.25);
  font-size: 0.88rem;
  line-height: 1.6;
}

.delete-account-list li::marker {
  color: #f87171;
}

.delete-account-note {
  margin: 0 0 16px;
  font-size: 0.82rem;
  opacity: 0.7;
}

.delete-account-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.delete-account-form button:disabled {
  opacity: 0.6;
  cursor: wait;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Edit Settings Forms Layout */
.settings-grid-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}

@media (max-width: 992px) {
  .settings-grid-layout {
    /* minmax(0, ...): a wide child must not stretch the column past the
       screen (the phone view scrolled sideways by 3 px). */
    grid-template-columns: minmax(0, 1fr);
  }
}

/* The upload cards never fold, so the two in a row match in height. */
#tab-files .settings-grid-layout {
  align-items: stretch;
}

.settings-group {
  background: rgba(13, 15, 23, 0.45);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  backdrop-filter: blur(8px);
}

.settings-group h3 {
  font-family: var(--font-title);
  font-size: 1.05rem;
  color: var(--text-primary);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  padding-bottom: 8px;
  margin-bottom: 4px;
}

.settings-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.settings-group input[type="text"],
.settings-group input[type="url"],
.settings-group input[type="email"],
.settings-group input[type="number"],
.settings-group input[type="password"] {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  transition: all 0.2s;
}

/* optgroup too: Windows drew a group's title white on white. */
.settings-group select optgroup,
.settings-group select option {
  background-color: #0d0f17;
  color: var(--panel-gris-claro);
}

.settings-group input[type="text"]:focus,
.settings-group input[type="url"]:focus,
.settings-group input[type="email"]:focus,
.settings-group input[type="number"]:focus,
.settings-group input[type="password"]:focus,
.settings-group select:focus,
.settings-group textarea:focus {
  border-color: var(--accent-color);
  outline: none;
  background: rgba(255, 255, 255, 0.05);
}

/* Color Picker Dashboard Grid */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 16px;
}

.color-picker-item {
  display: flex;
  flex-direction: column;
  /* A label on two lines must not push its field below its neighbor's. */
  justify-content: flex-end;
  gap: 6px;
}

.color-picker-input-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 6px 12px;
  gap: 10px;
  height: 42px;
}

.color-picker-input-wrapper input[type="color"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background-color: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

.color-picker-input-wrapper input[type="color"]::-webkit-color-swatch {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.color-picker-input-wrapper input[type="color"]::-moz-color-swatch {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Slider Controls */
.slider-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-labels label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.slider-labels span {
  font-family: var(--font-title);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-color);
  background: rgba(225, 29, 72, 0.06);
  padding: 2px 8px;
  border-radius: 4px;
}

.slider-item input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

.slider-item input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: transform 0.1s;
}

.slider-item input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.25);
}

.slider-item input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
  border: none;
  transition: transform 0.1s;
}

.slider-item input[type="range"]::-moz-range-thumb:hover {
  transform: scale(1.25);
}

/* Custom Scrollbars in Dashboard */
.dashboard-body::-webkit-scrollbar {
  width: 6px;
}

.dashboard-body::-webkit-scrollbar-track {
  background: transparent;
}

.dashboard-body::-webkit-scrollbar-thumb {
  background: var(--card-border);
  border-radius: 10px;
}

.dashboard-body::-webkit-scrollbar-thumb:hover {
  background: var(--accent-color);
}

.checkbox-label {
  font-size: 0.75rem !important;
  color: var(--text-secondary) !important;
  font-weight: 400 !important;
}

/* The header's save button with nothing to save (settings.js,
   refreshSaveButton()): quiet, with a green dot. It still saves if pressed. */
.action-btn.primary.is-clean {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  box-shadow: none;
}

.action-btn.primary.is-clean::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
}
/* Each network's icon in its own colors, as "Colores de marca" shows it on the
   profile (estilos/perfil/12-colores-de-marca.css): the cards of "Tus redes"
   and "Enlaces" (data-brand set by editor-redes.js and editor-enlaces.js),
   the icon pickers of Redes sociales and Enlaces (selector-icono.js) and "Enlaces/Redes más
   clicados" in Estadísticas. The :is() keeps these above
   .card-icon-preview, .icon-picker-icon (panel-controles) and
   .stats-list .stats-item-icon
   (panel-estadisticas), which load later. Discord, Steam and NameMC draw
   their own colors in the SVG; a key not listed keeps the accent color.
   The later networks follow, after TikTok. */
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="youtube"] { color: #ff0000; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="twitch"] { color: #9146ff; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="kick"] { color: #53fc18; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="instagram"] { color: #e1306c; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="twitter"] { color: #1da1f2; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="steam"] { color: #00adef; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="discord"] { color: #5865f2; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="spotify"] { color: #1db954; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="soundcloud"] { color: #ff5500; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="telegram"] { color: #0088cc; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="reddit"] { color: #ff4500; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon)[data-brand="shop"] { color: #facc15; }
/* White logos: GitHub, X, Threads and the personal page. */
:is(.card-icon-preview, .icon-picker-icon):is([data-brand="github"], [data-brand="x"], [data-brand="threads"], [data-brand="personal"]) { color: var(--text-primary); }

/* TikTok: the app's own logo (black square, white note, cyan and red edges),
   not the plain note. */
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon) .tiktok-app { display: inline; }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon) .tiktok-plain { display: none; }

/* The later networks (public/iconos-redes-mas.js), painted by
   public/marca-panel.js: their color in --brand-rgb, or the text color for
   a black or white logo. */
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon).marca-propia { color: rgb(var(--brand-rgb)); }
:is(.stats-list .stats-item-icon, .card-icon-preview, .icon-picker-icon).marca-texto { color: var(--text-primary); }

/* Each section of the menu has its own icon: white on a small gradient
   square, so a tab is known at a glance (the menu's own colors; the bar on
   phones keeps them, panel-movil.css). The active tab is marked by its
   background and the text, not by a color of its own. */
.menu-item {
  --menu-a: #64748b;
  --menu-b: #334155;
}

#menu-tab-home { --menu-a: #3b82f6; --menu-b: #06b6d4; }
#menu-tab-stats { --menu-a: #10b981; --menu-b: #65a30d; }
#menu-tab-bio { --menu-a: #ec4899; --menu-b: #f97316; }
#menu-tab-cosmetics { --menu-a: #8b5cf6; --menu-b: #ec4899; }
#menu-tab-files { --menu-a: #f59e0b; --menu-b: #ef4444; }
#menu-tab-badges { --menu-a: #14b8a6; --menu-b: #3b82f6; }
#menu-tab-discord { --menu-a: #5865f2; --menu-b: #7c3aed; }
#menu-tab-invites { --menu-a: #ef4444; --menu-b: #b91c1c; }

.menu-item svg {
  flex-shrink: 0;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  padding: 5px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--menu-a), var(--menu-b));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.menu-item.active,
.menu-item.has-active {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
}

/* The header's buttons keep their names on one line ("Ver / mi / bio" was
   the narrow case, with the live preview open); tighter padding and a smaller
   heading basis let title and actions share a single row at 1280 px. */
.dashboard-header {
  padding: 16px 28px;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.dashboard-heading {
  flex: 1 1 150px;
}

.dashboard-subtitle {
  font-size: 0.82rem;
}

.header-actions {
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
}

.header-actions > .action-btn {
  white-space: nowrap;
  padding: 8px 12px;
  font-size: 0.8rem;
}

/* With the icon squares an item is a little taller: the padding gives that
   back, and on a short window the menu scrolls instead of leaving the last
   tabs out of reach. */
.menu-item {
  padding: 5px 12px;
}

/* Fits a laptop's window (about 740 px tall) without scrolling. */
.sidebar-menu {
  padding: 12px 16px;
  gap: 4px;
  min-height: 0;
  overflow-y: auto;
}
