:root {
  color-scheme: dark;
  font-family: system-ui, Arial;
  background: #091627;
  color: #f5f1e8;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: radial-gradient(circle at top, #173d46, #091627 60%);
  min-height: 100vh;
}
main {
  max-width: 850px;
  margin: auto;
  padding: 24px;
}
header {
  border-bottom: 2px solid #c5a55a;
  padding: 24px 0;
}
h1 {
  color: #f1d38c;
  font-size: 1.65rem;
}
h2 {
  font-size: 1.2rem;
  color: #eacb86;
}
section {
  background: #10283b;
  border: 1px solid #35515d;
  border-radius: 15px;
  padding: 20px;
  margin: 18px 0;
}
label {
  display: block;
  margin: 12px 0 5px;
  color: #d6dbe0;
}
input,
select {
  width: 100%;
  padding: 12px;
  background: #081827;
  border: 1px solid #607684;
  color: white;
  border-radius: 8px;
  font: inherit;
}
button {
  padding: 11px 17px;
  background: #c5a55a;
  color: #0a1725;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  margin: 10px 8px 0 0;
}
button.secondary {
  background: #28475a;
  color: #fff;
}
button:disabled {
  opacity: 0.5;
}
small,
p {
  color: #cbd5dc;
  line-height: 1.5;
}
.hidden {
  display: none;
}
.notice {
  border-left: 3px solid #c5a55a;
  padding: 10px;
  background: #192d3d;
  white-space: pre-wrap;
}
.error {
  border-color: #f17b7b;
  color: #ffd5d5;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 550px) {
  .row {
    grid-template-columns: 1fr;
  }
}
.role {
  padding: 10px;
  border-bottom: 1px solid #37505d;
}
/* Avisos por encima de la navegación de Android; espacio reservado para barras del sistema */
body {
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
}
main {
  padding: 16px 18px 110px;
}
header {
  padding: 12px 0;
}
section {
  padding: 18px;
}
#status {
  position: fixed;
  z-index: 9999;
  left: 12px;
  right: 12px;
  top: calc(14px + env(safe-area-inset-top));
  bottom: auto;
  max-width: 820px;
  margin: 0 auto;
  box-shadow: 0 8px 28px #000a;
  border-radius: 10px;
  max-height: 30vh;
  overflow: auto;
  font-size: 14px;
  pointer-events: none;
}
#status:empty {
  display: none;
}
input {
  min-width: 0;
}
p,
.role {
  overflow-wrap: anywhere;
}
#roles .role {
  display: block;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #f4d78d;
  outline-offset: 3px;
}
nav.quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
nav.quick a {
  color: #f1d38c;
  padding: 8px;
  border: 1px solid #607684;
  border-radius: 8px;
}
section {
  scroll-margin-top: 80px;
}
textarea {
  max-width: 100%;
  width: 100%;
  font: inherit;
}
main {
  padding-top: max(24px, env(safe-area-inset-top));
  padding-bottom: max(40px, env(safe-area-inset-bottom));
}
html {
  scroll-padding-top: calc(12px + env(safe-area-inset-top));
  scroll-padding-bottom: calc(90px + env(safe-area-inset-bottom));
}
body {
  padding-top: env(safe-area-inset-top);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
button,
a {
  touch-action: manipulation;
}
@media (max-width: 700px) {
  button {
    min-height: 44px;
  }
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 3px solid #f3d37c;
  outline-offset: 2px;
}
button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #e9c46a;
  outline-offset: 3px;
}
button:disabled {
  cursor: not-allowed;
}
input,
select,
textarea {
  max-width: 100%;
  box-sizing: border-box;
}
@media (max-width: 600px) {
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
  button {
    min-height: 44px;
  }
  a {
    overflow-wrap: anywhere;
  }
}
main > section:not(#setup):not(#login):not(#dashboard):not(.private-selected),
#flowsRoot > section:not(.private-selected),
#extraRoot430 > section:not(.private-selected) {
  display: none !important;
}
main > section#dashboard:not(.private-selected) {
  display: none !important;
}
.private-page.hidden {
  display: none !important;
}
.private-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}
.private-toolbar a {
  color: #f1d38c;
  font-weight: 700;
  padding: 12px 4px;
  margin-left: auto;
}
.private-toolbar button {
  margin: 0;
}
.private-toolbar [hidden],
.private-loading[hidden] {
  display: none !important;
}
.private-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}
.private-tile {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 95px;
  margin: 0;
  padding: 12px 6px;
  background: #193b4e;
  border: 1px solid #527181;
  color: #f5f1e8;
  text-align: center;
  overflow-wrap: anywhere;
}
.private-tile span:first-child {
  font-size: 25px;
}
.private-tile span:last-child {
  font-size: 14px;
}
.private-busy .private-page {
  pointer-events: none;
  opacity: 0.65;
}
.private-page {
  scroll-margin-top: 0;
}
#status {
  pointer-events: none;
}
.private-page table {
  display: block;
  overflow-x: auto;
}
#flowsRoot:empty {
  display: none;
}
#identity {
  overflow-wrap: anywhere;
}
@media (max-width: 360px) {
  .private-tile {
    min-height: 86px;
  }
}
#profilesRoot427 > section:not(.private-selected) {
  display: none !important;
}
#competitionPanel [hidden] {
  display: none !important;
}
.operation-status:empty {
  display: none;
}
.private-menu {
  gap: 12px !important;
}
main button:not(.private-tile) {
  margin-bottom: 10px;
}
main .role button {
  margin-right: 8px;
}
.role {
  overflow-wrap: anywhere;
}
.role p {
  white-space: pre-line;
}
#profileChooser427 {
  margin: 6px 0 15px;
}
#profilesRoot427 select,
#profilesRoot427 textarea {
  width: 100%;
}
#profilesRoot427 label {
  display: block;
}
#sessionPlan {
  max-width: 100%;
}
button + button {
  margin-left: 0;
}
.role button {
  margin-top: 8px;
}
.role {
  overflow-wrap: anywhere;
}
#alerts428 {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #c5a55a;
  border-radius: 12px;
  background: #102b3e;
}
#alerts428 button {
  margin: 5px 0;
}
.private-toolbar {
  gap: 12px;
}
#competitionPanel table {
  min-width: 500px;
}
/* 4.39: eliminar cuenta, privacidad y sanciones */
.danger-zone439 {
  margin-top: 18px;
  border: 1px solid #f17b7b55;
  border-radius: 12px;
  padding: 10px 12px;
}
.danger-zone439 summary {
  cursor: pointer;
  color: #f4a3a3;
  font-weight: 700;
}
button.danger439 {
  background: #b3261e;
  color: #fff;
  border-color: #b3261e;
}
button.danger439:disabled {
  opacity: 0.5;
}
.privacy-note439 {
  font-size: 0.9em;
  opacity: 0.85;
}
.privacy-note439 a,
.danger-zone439 a {
  color: inherit;
}
.sanction-badge439 {
  color: #f17b7b;
}

/* 4.40: datos privados de la plantilla (solo delegado). */
.private440 {
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px dashed currentColor;
  border-radius: 8px;
}
.private440 summary {
  cursor: pointer;
  font-weight: 600;
}
.private440 small {
  display: block;
  margin: 6px 0;
  opacity: 0.8;
}
