:root {
  --bg-0: #060f22;
  --bg-1: #0c1c3d;
  --panel: #0e2144;
  --panel-2: #112a52;
  --gold: #d9b168;
  --gold-soft: #e8cf9a;
  --teal: #5fe0d6;
  --teal-2: #3fb8c9;
  --text: #eef2f8;
  --muted: #8496b5;
  --danger: #ff6b81;
  --ok: #5fe0d6;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(circle at 15% 10%, rgba(217, 177, 104, .08), transparent 40%),
    radial-gradient(circle at 85% 90%, rgba(95, 224, 214, .12), transparent 45%),
    linear-gradient(180deg, var(--bg-0), var(--bg-1));
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text);
}

.card {
  width: 100%;
  max-width: 460px;
  background: linear-gradient(180deg, rgba(14, 33, 68, .9), rgba(8, 18, 40, .9));
  border: 1px solid rgba(217, 177, 104, .22);
  border-radius: 22px;
  padding: 40px 34px 32px;
  box-shadow:
    0 0 0 1px rgba(217, 177, 104, .04),
    0 30px 60px -20px rgba(0, 0, 0, .6),
    0 0 60px -10px rgba(95, 224, 214, .08);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, transparent 40%, rgba(217, 177, 104, .12), transparent 60%);
  pointer-events: none;
}

h1 {
  text-align: center;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  font-weight: 700;
  margin: 0 0 6px;
  letter-spacing: .2px;
}

.subtitle {
  text-align: center;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin: 0 0 30px;
  font-weight: 600;
}

form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #c7d6f0;
  margin-bottom: 8px;
}

.field {
  position: relative;
}

.field .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  display: flex;
}

.field .icon svg {
  width: 17px;
  height: 17px;
}

input {
  width: 100%;
  background: rgba(6, 16, 34, .75);
  border: 1px solid rgba(90, 160, 255, .25);
  border-radius: 12px;
  padding: 13px 14px 13px 42px;
  color: var(--text);
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

input::placeholder {
  color: #4d6182;
}

input:focus {
  border-color: var(--gold);
  background: rgba(6, 16, 34, .95);
  box-shadow: 0 0 0 3px rgba(217, 177, 104, .14), 0 0 18px -4px rgba(95, 224, 214, .4);
}

input.invalid {
  border-color: var(--danger);
}

input.valid {
  border-color: #33d17a;
}

.toggle-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  padding: 4px;
}

.toggle-pass svg {
  width: 18px;
  height: 18px;
}

.toggle-pass:hover {
  color: var(--gold);
}

.hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 6px;
  min-height: 14px;
}

.hint.error {
  color: var(--danger);
}

.hint.success {
  color: #33d17a;
}

.row-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -6px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

.remember input[type="checkbox"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(217, 177, 104, .4);
  border-radius: 5px;
  background: rgba(6, 16, 34, .75);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  padding: 0;
}

.remember input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--teal), var(--gold));
  border-color: transparent;
}

.remember input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #04101f;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.forgot {
  font-size: 12.5px;
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.forgot:hover {
  text-decoration: underline;
}

button[type="submit"] {
  margin-top: 6px;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: #04101f;
  cursor: pointer;
  background: linear-gradient(90deg, var(--teal), var(--teal-2) 55%, var(--gold));
  box-shadow: 0 12px 26px -10px rgba(95, 224, 214, .5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform .12s, box-shadow .12s, opacity .12s;
}

button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px -10px rgba(95, 224, 214, .65);
}

button[type="submit"]:active {
  transform: translateY(0);
}

button[type="submit"]:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

button[type="submit"] svg {
  width: 16px;
  height: 16px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 6px 0;
  color: var(--muted);
  font-size: 11.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(217, 177, 104, .2);
}

.btn-visitante {
  border: 1px solid rgba(217, 177, 104, .3);
  background: rgba(6, 16, 34, .5);
  color: var(--text);
  border-radius: 12px;
  padding: 13px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.btn-visitante:hover {
  border-color: var(--gold);
  background: rgba(6, 16, 34, .8);
}

.footer-line {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin-top: 20px;
}

.footer-line a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
}

.footer-line a:hover {
  text-decoration: underline;
}

.success-panel {
  display: none;
  text-align: center;
  padding: 20px 4px 4px;
}

.success-panel.show {
  display: block;
}

.success-panel .check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 18px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px -4px rgba(95, 224, 214, .55);
}

.success-panel .check svg {
  width: 30px;
  height: 30px;
  color: #04101f;
}

.success-panel h2 {
  margin: 0 0 8px;
  font-size: 19px;
}

.success-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}

form.hide {
  display: none;
}

@media (max-width: 480px) {
  .card {
    padding: 30px 22px 26px;
    border-radius: 18px;
  }
}