/* ===== ISLA SSH — Login premium ===== */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-base: #070D16;
  --bg-deep: #0B1220;
  --panel: #101B2B;
  --panel-soft: #111C2A;
  --border: #20334A;
  --border-soft: #15273D;
  --ink: #E4EDF7;
  --muted: #6B829E;
  --accent: #26D6C8;
  --accent-2: #1EA7FF;
  --accent-glow: rgba(38, 214, 200, 0.15);
  --error: #F87171;
  --error-bg: rgba(248, 113, 113, 0.1);
  --radius: 22px;
  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

html, body { height: 100%; overflow: hidden; }

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* ===== FONDO ===== */
.bg-layer {
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 30% 20%, rgba(30,167,255,0.06), transparent 60%),
    radial-gradient(ellipse 60% 40% at 70% 80%, rgba(38,214,200,0.05), transparent 60%),
    linear-gradient(170deg, var(--bg-base), var(--bg-deep));
  z-index: 0;
  overflow: hidden;
}

/* Terminal decorativo */
.bg-terminal {
  position: absolute; top: 8%; left: 4%;
  width: 380px; opacity: 0.35;
  background: rgba(7,13,22,0.7);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  overflow: hidden;
  backdrop-filter: blur(6px);
}
.bg-term-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 12px;
  background: rgba(16,27,43,0.8);
  border-bottom: 1px solid var(--border-soft);
}
.bg-dot { width: 8px; height: 8px; border-radius: 50%; }
.bg-dot.r { background: #f87171; } .bg-dot.y { background: #fbbf24; } .bg-dot.g { background: #34d399; }
.bg-term-title { font-size: 10px; color: var(--muted); margin-left: 8px; font-family: ui-monospace, monospace; }
.bg-term-body { padding: 10px 12px; font-family: ui-monospace, 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.7; color: rgba(38,214,200,0.5); }
.bg-cursor { animation: blink 1.4s infinite; }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }

/* Paneles decorativos */
.bg-panel {
  position: absolute;
  background: rgba(16,27,43,0.5);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px 16px;
  backdrop-filter: blur(6px);
  opacity: 0.4;
}
.bg-panel-bl { bottom: 12%; left: 5%; width: 260px; }
.bg-panel-tr { top: 10%; right: 5%; width: 200px; text-align: center; }
.bg-panel-title { font-size: 11px; font-weight: 700; color: var(--ink); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.bg-panel-row { font-size: 10px; color: var(--muted); padding: 3px 0; display: flex; align-items: center; gap: 6px; font-family: ui-monospace, monospace; }
.bg-panel-big { font-size: 22px; font-weight: 800; color: var(--accent); }
.bg-panel-sub { font-size: 10px; color: var(--muted); margin-top: 2px; }

.bg-led { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 6px #34d399; animation: pulse-led 2s infinite; }
.bg-led-sm { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
@keyframes pulse-led { 0%,100% { opacity: 1; } 50% { opacity: 0.4; } }

/* Red SVG */
.bg-network {
  position: absolute; top: 15%; right: 2%;
  width: 45%; max-width: 600px;
  opacity: 0.5;
}

/* Ondas */
.bg-waves { position: absolute; bottom: 0; left: 0; right: 0; height: 120px; overflow: hidden; }
.bg-wave {
  position: absolute; bottom: 0; left: -50%; right: -50%; height: 100%;
  background: radial-gradient(ellipse 50% 100% at 50% 100%, rgba(38,214,200,0.04), transparent);
  animation: wave-move 12s linear infinite;
}
.bg-wave-2 { animation-duration: 18s; animation-delay: -3s; opacity: 0.5; }
.bg-wave-3 { animation-duration: 24s; animation-delay: -6s; opacity: 0.3; }
@keyframes wave-move { 0% { transform: translateX(0); } 100% { transform: translateX(25%); } }

/* Código difuminado */
.bg-code {
  position: absolute; bottom: 5%; left: 0; right: 0;
  text-align: center; font-family: ui-monospace, monospace; font-size: 9px;
  color: rgba(38,214,200,0.04); white-space: nowrap;
  letter-spacing: 2px; line-height: 1;
}

/* ===== TARJETA LOGIN ===== */
.login-stage {
  position: relative; z-index: 10;
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 20px;
}

.login-premium {
  width: min(460px, 100%);
  background: rgba(16, 27, 43, 0.72);
  backdrop-filter: blur(24px) saturate(1.2);
  border: 1px solid rgba(38, 214, 200, 0.12);
  border-radius: var(--radius);
  padding: 40px 36px 28px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  box-shadow:
    0 24px 64px rgba(0,0,0,0.5),
    0 0 0 1px rgba(255,255,255,0.02),
    0 0 80px rgba(38,214,200,0.04);
  text-align: center;
}

.lp-logo { margin-bottom: 6px; filter: drop-shadow(0 8px 24px rgba(38,214,200,0.3)); }

.lp-title {
  font-size: 40px; font-weight: 900; letter-spacing: -0.03em;
  color: #FFFFFF; margin: 2px 0 0;
}
.lp-accent {
  background: linear-gradient(135deg, #26D6C8, #1EA7FF);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.lp-subtitle { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.lp-error {
  width: 100%; padding: 10px 14px;
  background: var(--error-bg); border: 1px solid rgba(248,113,113,0.3);
  border-radius: 10px; color: var(--error); font-size: 13px;
  margin-bottom: 8px;
}

.lp-field { width: 100%; margin-bottom: 14px; text-align: left; }
.lp-field label {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.12em; color: var(--muted);
  margin-bottom: 6px; padding-left: 4px;
}
.lp-input-wrap {
  position: relative; display: flex; align-items: center;
  background: rgba(7,13,22,0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.lp-input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.lp-icon { position: absolute; left: 14px; color: var(--muted); pointer-events: none; }
.lp-input-wrap input {
  width: 100%; border: 0; background: transparent;
  color: var(--ink); font-family: var(--font); font-size: 15px;
  padding: 14px 14px 14px 44px; outline: none;
}
.lp-input-wrap input::placeholder { color: rgba(107,130,158,0.5); }
.lp-eye {
  position: absolute; right: 10px;
  background: transparent; border: 0; color: var(--muted);
  cursor: pointer; padding: 6px; border-radius: 6px;
  transition: color 0.15s;
}
.lp-eye:hover { color: var(--accent); }

.lp-btn {
  width: 100%; margin-top: 6px;
  min-height: 50px;
  background: linear-gradient(135deg, #26D6C8, #1EA7FF);
  border: 0; border-radius: 13px;
  color: #04121A; font-family: var(--font); font-size: 15px; font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.1s, box-shadow 0.2s, filter 0.2s;
  box-shadow: 0 8px 24px rgba(38,214,200,0.25);
}
.lp-btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 32px rgba(38,214,200,0.35); }
.lp-btn:active { transform: translateY(0) scale(0.99); }
.lp-btn:disabled { cursor: wait; opacity: 0.75; }
.lp-btn-spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(4,18,26,0.3);
  border-top-color: #04121A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}
.lp-btn.loading .lp-btn-text, .lp-btn.loading .lp-btn-arrow { display: none; }
.lp-btn.loading .lp-btn-spinner { display: block; }
.lp-btn.loading .lp-btn-text::after { content: 'Conectando...'; }
@keyframes spin { to { transform: rotate(360deg); } }

.lp-footer {
  width: 100%; margin-top: 18px; padding-top: 16px;
  border-top: 1px solid rgba(32,51,74,0.5);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--muted);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .bg-terminal, .bg-panel-bl, .bg-panel-tr { display: none; }
  .bg-network { opacity: 0.3; width: 70%; right: -10%; }
}
@media (max-width: 600px) {
  .bg-network, .bg-code { display: none; }
  .login-premium { padding: 32px 22px 22px; }
  .lp-title { font-size: 32px; }
  .lp-input-wrap input { min-height: 48px; }
  .lp-btn { min-height: 50px; }
  body { overflow: auto; }
}

/* ===== prefers-reduced-motion ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .bg-wave, .bg-particles circle { animation: none !important; }
}
