:root{
  --radius: 18px;
  --shadow: 0 14px 45px rgba(0,0,0,.35);
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;

  /* neutrales (dark por defecto) */
  --bg0: #071826;
  --bg1: #0a2233;
  --card: rgba(12, 30, 44, .82);
  --border: rgba(255,255,255,.12);
  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.62);
  --input: rgba(255,255,255,.06);
  --focus: rgba(255,255,255,.18);

  /* acento (se reemplaza por paleta) */
  --accent: #19b6b0;
  --accent2: #0f8e8a;
  --danger: #ff5a68;
  --ok: #31d19b;
  --warn: #ffcc66;
}

html[data-theme="light"]{
  --bg0: #f6f8fb;
  --bg1: #e9eef6;
  --card: rgba(255,255,255,.84);
  --border: rgba(0,0,0,.10);
  --text: rgba(0,0,0,.86);
  --muted: rgba(0,0,0,.55);
  --input: rgba(0,0,0,.05);
  --focus: rgba(0,0,0,.12);
  --shadow: 0 14px 45px rgba(0,0,0,.15);
}

/* Fuerza a que los controles nativos (select, inputs, etc.) respeten el tema */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }

html[data-palette="teal"]  { --accent:#19b6b0; --accent2:#0f8e8a; }
html[data-palette="indigo"]{ --accent:#5b7cfa; --accent2:#3f5fe0; }
html[data-palette="amber"] { --accent:#ffb020; --accent2:#d88700; }
html[data-palette="rose"]  { --accent:#ff5aa5; --accent2:#d83d86; }

*{ box-sizing:border-box; }

body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(900px 500px at 20% 15%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 500px at 80% 30%, rgba(255,255,255,.05), transparent 62%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  min-height:100vh;
}

.page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:22px;
  gap:18px;
}

.topbar{
  width:min(980px, 100%);
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 4px;
}

.brand{ display:flex; gap:10px; align-items:center; }
.brand-dot{
  width:12px;height:12px;border-radius:999px;
  background:linear-gradient(180deg,var(--accent),var(--accent2));
  box-shadow:0 0 0 6px rgba(255,255,255,.04);
}
.brand-name{ font-weight:700; letter-spacing:.2px; opacity:.92; }

.controls{ display:flex; gap:10px; align-items:center; }

.card{
  width:min(520px, 100%);
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:26px;
  box-shadow:var(--shadow);
  backdrop-filter: blur(10px);
}

/* Logo: evita desbordes del PNG a tamaño natural */
.logo{
  width:64px;
  height:64px;
  display:grid;
  place-items:center;
  margin:0 auto 10px;
  overflow:hidden;
  border-radius:16px;
}

.logo-img{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}


.h1{ margin:0; text-align:center; font-size:28px; letter-spacing:.2px; }
.sub{ margin:6px 0 18px; text-align:center; color:var(--muted); }

.form{ display:flex; flex-direction:column; gap:14px; }

.field{ display:flex; flex-direction:column; gap:6px; }
.label{ font-size:13px; color:var(--muted); }

.input-wrap{
  display:flex; align-items:center; gap:10px;
  background:var(--input);
  border:1px solid var(--border);
  border-radius:14px;
  padding:10px 12px;
}
.icon{ opacity:.75; }
.input{
  flex:1;
  background:transparent;
  border:0;
  outline:0;
  color:var(--text);
  font-size:15px;
  padding:6px 0;
}
.input:focus{ outline:none; }

.input-wrap:focus-within{
  border-color: rgba(25, 182, 176, .55);
  box-shadow: 0 0 0 4px rgba(25, 182, 176, .14);
}

.hint{ margin:0; font-size:12px; color:var(--muted); }

.row{ display:flex; justify-content:space-between; align-items:center; }

.check{ display:flex; align-items:center; gap:10px; color:var(--muted); font-size:13px; }
.check input{ width:16px; height:16px; }

.btn{
  margin-top:6px;
  border:0;
  border-radius:14px;
  padding:14px 14px;
  font-weight:700;
  cursor:pointer;
  color:#062028;
  background:linear-gradient(180deg,var(--accent),var(--accent2));
  display:flex; align-items:center; justify-content:center; gap:10px;
}
.btn:disabled{ opacity:.7; cursor:not-allowed; }

.btn-ghost{
  border:1px solid var(--border);
  background:transparent;
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.btn-ghost.sm{ padding:8px 10px; font-size:12px; }

/* Select: evita “panel” blanco en el control; el desplegable es nativo pero esto ayuda */
.select{
  border:1px solid var(--border);
  background:var(--input);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:0;
}

.select:focus{
  border-color: rgba(25, 182, 176, .55);
  box-shadow: 0 0 0 4px rgba(25, 182, 176, .14);
}
/* Refuerzo para las opciones (no siempre lo respeta el OS/navegador) */
.select option{
  background: var(--bg1);
  color: var(--text);
}

.alert{
  display:none;
  border-radius:14px;
  padding:12px 12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.05);
  color:var(--text);
}
.alert.show{ display:block; }
.alert.error{ border-color: rgba(255,90,104,.55); background: rgba(255,90,104,.08); }
.alert.ok{ border-color: rgba(49,209,155,.55); background: rgba(49,209,155,.08); }

.meta{
  margin-top:14px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  color:var(--muted);
  font-size:12px;
}

.badge{
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.04);
}

.spinner{
  width:14px; height:14px;
  border-radius:999px;
  border:2px solid rgba(0,0,0,.25);
  border-top-color: rgba(0,0,0,.65);
  display:none;
  animation:spin .8s linear infinite;
}
.spinner.show{ display:inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.muted{ opacity:.8; }

.sr-only{
  position:absolute;
  width:1px;height:1px;
  padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);
  white-space:nowrap;border:0;
}
