:root {
  --navy-900: #0c1e3d;
  --navy-700: #1e3a6e;
  --slate-500: #64748b;
  --slate-400: #8393ab;
  --blue-600: #1f5eea;
  --blue-700: #174ac4;
  --bg: #f4f6fb;
  --field-bg: #eef3fd;
  --border: #dbe3f1;
  --danger: #d6293e;

  /* Cambia esta ruta por tu foto del hotel (ej. img/hotel.jpg) */
  --hero-image: url("img/hotel.jpg");
}

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

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--navy-900);
  -webkit-font-smoothing: antialiased;
}

.login {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ---------- Panel izquierdo ---------- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px 50px 28px;
  color: #fff;
  overflow: hidden;
  /* Si la imagen no existe, se ve el degradado de fondo */
  background:
    linear-gradient(180deg, rgba(30, 58, 110, 0.78) 0%, rgba(40, 55, 95, 0.55) 45%, rgba(20, 35, 70, 0.72) 100%),
    var(--hero-image) center / cover no-repeat,
    linear-gradient(160deg, #3b5a94 0%, #a8766a 55%, #2f6f8f 100%);
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-icon { width: 32px; height: 32px; }
img.brand-icon { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; box-shadow: 0 2px 10px rgba(0,0,0,.35); }
.brand-name { font-size: 28px; font-weight: 700; letter-spacing: -0.01em; }

.hero-copy { margin-top: auto; margin-bottom: 8vh; }
.hero-title {
  font-size: clamp(40px, 4.4vw, 68px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
}
.hero-sub {
  margin-top: 36px;
  font-size: 17px;
  line-height: 1.9;
  opacity: 0.95;
}
.hero-caption {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---------- Panel derecho ---------- */
.panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.form-wrap {
  width: 100%;
  max-width: 470px;
  margin: auto 0;
  padding-top: 40px;
}

.eyebrow {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #5f7eae;
}
.title {
  margin-top: 14px;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy-900);
}
.subtitle { margin-top: 24px; font-size: 15px; color: var(--slate-500); }

form { margin-top: 44px; }

.field { margin-bottom: 22px; }
.field label { display: block; margin-bottom: 14px; font-size: 15px; font-weight: 600; }

.input-wrap { position: relative; }
input {
  width: 100%;
  height: 56px;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: var(--navy-900);
  background: var(--field-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
input:focus {
  background: #fff;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(31, 94, 234, 0.15);
}
input[aria-invalid="true"] { border-color: var(--danger); }
#password { padding-right: 52px; }

.toggle {
  position: absolute;
  top: 50%; right: 12px;
  transform: translateY(-50%);
  display: grid; place-items: center;
  width: 36px; height: 36px;
  color: var(--navy-700);
  background: none; border: 0; border-radius: 8px;
  cursor: pointer;
}
.toggle:hover { background: rgba(31, 94, 234, 0.08); }
.toggle:focus-visible { outline: 2px solid var(--blue-600); }
.toggle svg { width: 22px; height: 22px; }
.toggle .eye-closed { display: none; }
.toggle[aria-pressed="true"] .eye-open { display: none; }
.toggle[aria-pressed="true"] .eye-closed { display: inline; }

.error { min-height: 0; margin-top: 8px; font-size: 13px; color: var(--danger); }
.error:empty { display: none; }
.form-error { margin: -6px 0 14px; padding: 10px 12px; background: #fdecee; border-radius: 8px; }

.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 56px;
  margin-top: 8px;
  font: inherit; font-size: 16px; font-weight: 600;
  color: #fff;
  background: var(--blue-600);
  border: 0; border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.btn:hover { background: var(--blue-700); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(31, 94, 234, 0.4); outline-offset: 2px; }
.btn-arrow { width: 18px; height: 18px; }
.btn:disabled { cursor: not-allowed; opacity: 0.85; }

.spinner {
  display: none;
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn.loading .btn-arrow { display: none; }
.btn.loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.forgot {
  display: block;
  margin-top: 28px;
  text-align: center;
  font-size: 15px; font-weight: 600;
  color: var(--blue-600);
  text-decoration: none;
}
.forgot:hover { text-decoration: underline; }

.notice {
  display: flex; gap: 14px;
  margin-top: 40px; padding-top: 26px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; line-height: 1.7;
  color: var(--slate-500);
}
.notice svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--slate-400); }

.footer { font-size: 11.5px; color: var(--slate-500); text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .login { grid-template-columns: 1fr; }
  .hero { min-height: 240px; padding: 28px 24px; }
  .hero-copy { margin: 24px 0 0; }
  .hero-title { font-size: 30px; }
  .hero-sub, .hero-caption { display: none; }
  .form-wrap { padding-top: 28px; }
  .title { font-size: 30px; }
}

/* Solicitar demo */
.demo-link { margin-top: 10px; }
.dm-overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(12, 30, 61, .55); overflow-y: auto; }
.dm-overlay[hidden] { display: none; }
.dm-box { position: relative; width: 100%; max-width: 440px; padding: 28px 26px; background: #fff; border-radius: 18px; box-shadow: 0 20px 60px rgba(12, 30, 61, .35); }
.dm-box h2 { margin: 0 0 6px; font-size: 22px; color: var(--navy-900); }
.dm-sub { margin: 0 0 16px; font-size: 14px; color: var(--slate-500); }
.dm-x { position: absolute; top: 12px; inset-inline-end: 14px; width: 34px; height: 34px; font-size: 24px; line-height: 1; color: var(--slate-500); background: none; border: 0; cursor: pointer; }
.dm-box label { display: block; margin: 12px 0 6px; font-size: 13.5px; font-weight: 600; color: var(--navy-900); }
.dm-box input[type=text], .dm-box input[type=email], .dm-box input[type=tel], .dm-box textarea { width: 100%; padding: 11px 13px; font: inherit; font-size: 15px; color: var(--navy-900); background: var(--field-bg); border: 1px solid var(--border); border-radius: 10px; }
.dm-box input:focus, .dm-box textarea:focus { outline: 2px solid var(--blue-600); outline-offset: 1px; }
.dm-trap { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.dm-err { min-height: 18px; margin: 10px 0 0; font-size: 13.5px; color: var(--danger); }
.dm-ok { margin: 6px 0 0; font-size: 14px; font-weight: 600; color: #1a7f4b; }
.dm-send { width: 100%; margin-top: 12px; }
