*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0a0a0a;
  background-image: linear-gradient(to right, #1a1a1a 1px, transparent 1px), linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #d4d4d4;
  position: relative;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at center, transparent 30%, #0a0a0a 75%);
  pointer-events: none;
  z-index: 0;
}

@keyframes spin-border {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

@property --angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

.card {
  width: 100%;
  max-width: 380px;
  background: #111111;
  border: none;
  border-radius: 4px;
  padding: 40px 36px;
  position: relative;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 5px;
  background: conic-gradient(from var(--angle), transparent 75%, #ffffff 85%, transparent 95%);
  animation: spin-border 3s linear infinite;
  z-index: -1;
}

.card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #111111;
  z-index: -1;
}

.card-header { margin-bottom: 32px; }
.card-header h1 { font-size: 1.3rem; font-weight: 600; color: #ffffff; letter-spacing: 0.02em; text-transform: uppercase; }
.card-header p { margin-top: 8px; font-size: 1rem; color: #555555; }
.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: #666666;
  margin-bottom: 6px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.input-wrapper { position: relative; }

input {
  width: 100%;
  padding: 9px 36px 9px 12px;
  background: #0a0a0a;
  border: 1px solid #2a2a2a;
  border-radius: 2px;
  color: #e0e0e0;
  font-size: 1rem;
  font-family: 'Courier New', monospace;
  transition: border-color 0.1s;
  outline: none;
  letter-spacing: 0.02em;
}

input::placeholder { color: #333333; }
input:focus { border-color: #555555; }

.toggle-visibility {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #444444;
  display: flex;
  padding: 0;
  transition: color 0.1s;
  width: auto;
  margin-top: 0;
}

.toggle-visibility:hover { color: #888888; }
.toggle-visibility svg { width: 14px; height: 14px; stroke: currentColor; }

button {
  width: 100%;
  padding: 10px;
  margin-top: 6px;
  background: #1a1a1a;
  border: 1px solid #2e2e2e;
  border-radius: 2px;
  color: #cccccc;
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

button:hover { background: #222222; color: #ffffff; border-color: #444444; }
button:active { background: #0a0a0a; }
button:disabled { opacity: 0.35; cursor: not-allowed; }

#resultado {
  margin-top: 18px;
  padding: 10px 12px;
  border-radius: 2px;
  font-size: 1rem;
  font-weight: 400;
  display: none;
  border: 1px solid transparent;
  letter-spacing: 0.01em;
}

#resultado.error { background: #111111; border-color: #3a3a3a; color: #888888; }
#resultado.success { background: #111111; border-color: #2a4a2a; color: #88aa88; }

.session-loader {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: #0a0a0a;
  background-image: linear-gradient(to right, #1a1a1a 1px, transparent 1px), linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
  background-size: 40px 40px;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: #666666;
  position: relative;
  z-index: 1;
}

.session-loader::after {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse 120% 80% at center, transparent 30%, #0a0a0a 75%);
  pointer-events: none;
  z-index: 0;
}

.session-loader .loader-spinner {
  width: 32px;
  height: 32px;
  border: 2px solid #2a2a2a;
  border-top-color: #888888;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
}

.session-loader p {
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
