:root[data-theme="dark"] select.input {
  color-scheme: dark;
}

:root[data-theme="light"] select.input {
  color-scheme: light;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.2rem;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--txt) 50%),
    linear-gradient(135deg, var(--txt) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 3px),
    calc(100% - 12px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

select.input option,
select.input optgroup {
  background: var(--bg-deep1);
  color: var(--txt);
}

.admin-shell {
  width: min(100%, 560px);
  margin: 0 auto;
}

.admin-shell--wide {
  width: min(100%, 960px);
}

.admin-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 22px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.admin-kicker {
  margin: 0 0 8px;
  color: var(--c1);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.admin-title {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
}

.admin-subtitle {
  margin: 0 0 18px;
  color: var(--muted);
}

.admin-form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-weight: 600;
}

.input {
  width: 100%;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--txt);
  border-radius: 12px;
  padding: 12px 14px;
}

.input:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.admin-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.alert {
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid transparent;
  font-weight: 600;
}

.alert--error {
  color: #ffd4d4;
  border-color: rgba(255, 94, 94, 0.5);
  background: rgba(255, 94, 94, 0.15);
}

:root[data-theme="light"] .alert--error {
  color: #8b1010;
  border-color: rgba(139, 16, 16, 0.35);
  background: rgba(255, 94, 94, 0.14);
}

.admin-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 6px;
}

.admin-box {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.04);
}

:root[data-theme="light"] .admin-box {
  background: rgba(11, 18, 32, 0.03);
}

.admin-box h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.admin-box p {
  margin: 0;
  color: var(--muted);
}

/* Lista de titulos en panel admin */
#titlesList.input {
  min-height: 280px;
  font-size: 1.08rem;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 14px;

  /* Quita la flecha custom del select normal */
  background-image: none;
  padding-right: 12px;
  appearance: auto;
  -webkit-appearance: listbox;
  -moz-appearance: listbox;

  /* Scrollbar Firefox */
  scrollbar-width: thin;
  scrollbar-color: rgba(236, 111, 45, 0.75) rgba(255, 255, 255, 0.08);
}

#titlesList option {
  font-size: 1.02rem;
  padding: 8px 10px;
}

/* Seleccion visible */
#titlesList option:checked {
  background: linear-gradient(135deg, var(--c1), var(--c3));
  color: #fff;
}

/* Scrollbar Chromium/Safari */
#titlesList::-webkit-scrollbar {
  width: 10px;
}
#titlesList::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}
#titlesList::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--c1), var(--c3));
  border-radius: 999px;
}
#titlesList::-webkit-scrollbar-thumb:hover {
  filter: brightness(1.08);
}

@media (max-width: 860px) {
  .admin-grid {
    grid-template-columns: 1fr;
  }
}
