/* Clean & Smooth UI */
:root {
  --bg-1: #0e1116;
  --bg-2: #0b0d12;
  --txt: #eef0f4;
  --muted: #aeb5c2;
  --card-bg: rgba(255,255,255,0.06);
  --card-brd: rgba(255,255,255,0.14);
  --accent: #7aa2f7;
  --glow: rgba(122,162,247,0.22);
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--txt);
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg-1), var(--bg-2));
  overflow-x: hidden;
}

.container { width: min(1040px, 92%); margin-inline: auto; }

header { padding: 28px 0 0; }
nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
nav a { color: var(--muted); text-decoration: none; margin-right: 14px; }
nav a.active, nav a:hover { color: var(--txt); }
h1 { font-size: 2.2rem; margin: 16px 0 8px; }
p.lead { color: var(--muted); margin: 0 0 20px; }

/* --- Fondo blobs --- */
.bg-blobs { position: fixed; inset: 0; z-index: -1; filter: blur(80px); opacity: .5; }
.blob { position: absolute; border-radius: 50%; }
.blob1 { width: 520px; height: 520px; background: linear-gradient(180deg, #6a7ea8, #2a3342); top: -140px; left: -140px; opacity: .35; }
.blob2 { width: 420px; height: 420px; background: linear-gradient(180deg, #58b19f, #1e2b2a); bottom: -120px; right: -140px; opacity: .28; }
.blob3 { width: 380px; height: 380px; background: linear-gradient(180deg, #b8c7e8, #465168); top: 42%; left: 55%; transform: translate(-50%, -50%); opacity: .22; }

/* --- Tarjetas y botones --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-brd);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  backdrop-filter: blur(18px);
}

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1.2fr .8fr; }

label { display: block; color: var(--muted); margin: 8px 0 6px; font-size: .95rem; }
input, textarea {
  width: 100%;
  padding: 12px 13px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: var(--txt);
  outline: none;
}
textarea { min-height: 100px; resize: vertical; }
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--glow);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .18s ease, box-shadow .22s ease, background .18s ease;
}
.btn-primary {
  background: linear-gradient(180deg, var(--accent), color-mix(in oklab, var(--accent) 82%, black));
  color: #fff;
  border: none;
  box-shadow: 0 8px 22px var(--glow);
}
.btn-primary:hover {
  transform: translateY(-1.5px);
  box-shadow: 0 10px 26px var(--glow);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--card-brd);
  color: var(--txt);
}

.table { width: 100%; border-collapse: separate; border-spacing: 0 10px; }
.table th {
  color: var(--muted);
  font-weight: 500;
  text-align: left;
  font-size: .92rem;
  padding: 0 8px;
}
.table td {
  padding: 12px 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--card-brd);
  border-left: none;
  border-right: none;
}
.small { font-size: .9rem; color: var(--muted); }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid var(--card-brd);
  color: var(--txt);
  font-size: .78rem;
}
footer { margin: 26px 0 50px; color: var(--muted); font-size: .9rem; }

/* --- CENTRAR LOGIN EN PANTALLA --- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 800px at 50% -10%, var(--bg-1), var(--bg-2));
  overflow: hidden;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 40px 32px;
  text-align: left;
  margin: auto;
  transform: translateY(0);
  background: var(--card-bg);
  border: 1px solid var(--card-brd);
  border-radius: 20px;
  backdrop-filter: blur(18px) saturate(160%);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .28);
  animation: fadeInUp .7s ease both;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.error {
  color: #ff6b6b;
  font-size: .9rem;
  margin-top: 10px;
  text-align: center;
}

.lang-selector {
  display: flex;
  gap: 8px;
  align-items: center;
}

.lang-selector select {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  color: var(--txt);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 500;
  font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  transition: all .2s ease;
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23aeb5c2' d='M1 3l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.lang-selector select:hover {
  background-color: rgba(255, 255, 255, .1);
  border-color: var(--accent);
}

.lang-selector select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--glow);
}

.lang-selector select option {
  background: var(--bg-2);
  color: var(--txt);
  padding: 8px 12px;
}

.loader {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(122, 162, 247, 0.2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-container {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  color: var(--muted);
  font-size: 0.95rem;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.pulse-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin: 0 2px;
  animation: pulse 1.4s ease-in-out infinite;
}

.pulse-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.pulse-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes pulse {
  0%, 100% { 
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% { 
    opacity: 1;
    transform: scale(1.2);
  }
}
