:root {
  --orange: #ff6b00;        /* +Móvil naranja */
  --orange-dark: #e85d04;
  --orange-soft: #fff3ea;
  --ink: #2b2b2b;
  --gray: #6b7280;
  --line: #ececec;
  --white: #ffffff;
  --ok: #1f9d55;
  --ok-soft: #e8f7ee;
  --warn: #c2410c;
  --warn-soft: #fff1e9;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(255, 107, 0, 0.10);
}

* { box-sizing: border-box; }

.hidden { display: none !important; }

/* Pantalla de acceso */
.gate {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: linear-gradient(160deg, #fff3ea 0%, #ffffff 60%);
}
.gate-card {
  width: 100%; max-width: 380px; text-align: center;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 28px;
  box-shadow: var(--shadow);
}
.gate-card .logo { font-size: 26px; }
.gate-title { font-size: 20px; margin: 16px 0 6px; }
.gate-text { color: var(--gray); font-size: 14px; margin: 0 0 22px; }
#login-form { display: flex; flex-direction: column; gap: 12px; }
#login-form input {
  padding: 14px 16px; font-size: 16px; text-align: center;
  border: 2px solid var(--line); border-radius: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#login-form input:focus {
  border-color: var(--orange); box-shadow: 0 0 0 4px rgba(255,107,0,.12);
}
#login-form button { width: 100%; }
.gate-error { color: #c0392b; font-size: 14px; min-height: 20px; margin: 12px 0 0; }

.top-right { display: flex; align-items: center; gap: 10px; }
.who { color: var(--gray); font-size: 13px; font-weight: 600; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(180deg, #fff8f3 0%, #ffffff 40%);
  color: var(--ink);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.app { max-width: 720px; margin: 0 auto; padding: 22px 20px 56px; }

/* Top bar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 36px;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.logo {
  font-size: 24px; font-weight: 800; letter-spacing: -.5px;
  color: var(--orange);
}
.brand-sub { color: var(--gray); font-size: 14px; font-weight: 500; }
.badge {
  font-size: 12px; font-weight: 600; color: var(--warn);
  background: var(--warn-soft); border: 1px solid #ffd9c2;
  padding: 5px 12px; border-radius: 999px;
}

/* Hero */
.hero { text-align: center; margin-bottom: 30px; }
h1 { font-size: 30px; line-height: 1.2; margin: 0 0 12px; letter-spacing: -.6px; }
.lead { color: var(--gray); font-size: 16px; max-width: 460px; margin: 0 auto 28px; line-height: 1.55; }

/* Finder form */
.finder { text-align: left; max-width: 520px; margin: 0 auto; }
.finder label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink); margin-bottom: 8px;
}
.input-row { display: flex; gap: 10px; }
input[type="text"] {
  flex: 1; padding: 15px 16px; font-size: 17px;
  background: var(--white); color: var(--ink);
  border: 2px solid var(--line); border-radius: 14px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="text"]:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.12);
}
input::placeholder { color: #b8bcc4; }

button {
  cursor: pointer; border: 0; font-family: inherit;
  padding: 15px 24px; font-size: 16px; font-weight: 700;
  background: var(--orange); color: #fff; border-radius: 14px;
  box-shadow: var(--shadow);
  transition: background .15s, transform .05s;
  white-space: nowrap;
}
button:hover { background: var(--orange-dark); }
button:active { transform: translateY(1px); }
button:disabled { opacity: .65; cursor: progress; }

/* Result */
.result {
  max-width: 520px; margin: 24px auto 0; padding: 24px;
  border-radius: var(--radius); text-align: center;
  animation: pop .2s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.result.hidden { display: none; }

.result.ok { background: var(--ok-soft); border: 1px solid #bfe6cd; }
.result.info { background: var(--orange-soft); border: 1px solid #ffd9c2; }

.ok-label { color: var(--ok); font-weight: 600; font-size: 14px; margin: 0 0 14px; }
.code-box {
  display: inline-flex; align-items: center; gap: 14px;
  background: #fff; border: 2px dashed #bfe6cd; border-radius: 14px;
  padding: 14px 22px;
}
.otp-code {
  font-size: 42px; font-weight: 800; letter-spacing: 8px;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.copy {
  background: var(--ok); color: #fff; padding: 10px 16px;
  font-size: 14px; border-radius: 10px; box-shadow: none;
}
.copy:hover { background: #18803f; }
.copied-hint { display: block; margin-top: 14px; color: var(--ok); font-size: 13px; min-height: 18px; }

/* Friendly info / empty state */
.info-icon { font-size: 34px; margin-bottom: 6px; }
.info-title { font-size: 18px; font-weight: 700; margin: 0 0 8px; color: var(--ink); }
.info-text { color: #8a4a23; font-size: 15px; line-height: 1.55; margin: 0 auto; max-width: 380px; }
.info-tips { text-align: left; max-width: 380px; margin: 16px auto 0; color: #8a4a23; font-size: 14px; padding-left: 20px; line-height: 1.7; }

.tech-toggle { margin-top: 16px; }
.tech-toggle summary { cursor: pointer; color: var(--gray); font-size: 12px; list-style: none; }
.tech-toggle summary::-webkit-details-marker { display: none; }
.tech-toggle pre {
  text-align: left; background: #fafafa; border: 1px solid var(--line);
  border-radius: 10px; padding: 12px; font-size: 12px; color: #555;
  overflow: auto; margin: 10px 0 0;
}

/* Steps */
.steps-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin-top: 8px;
}
.steps-card h2 { font-size: 17px; margin: 0 0 18px; }
.steps { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .num {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange-soft); color: var(--orange);
  font-weight: 700; font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.step p { margin: 3px 0 0; font-size: 14px; color: var(--gray); line-height: 1.5; }
.step strong { color: var(--ink); }

/* History */
.history-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 24px; margin-top: 18px;
}
.history-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.history-head h2 { font-size: 16px; margin: 0; }
.link {
  background: transparent; color: var(--orange); padding: 6px 10px;
  font-size: 13px; box-shadow: none; font-weight: 600;
}
.link:hover { background: var(--orange-soft); }
.history-list { display: flex; flex-direction: column; }
.hrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px;
}
.hrow .h-id { color: var(--gray); }
.hrow .h-code { font-weight: 800; letter-spacing: 3px; font-size: 16px; }
.hrow .h-code.none { color: #c9ccd1; letter-spacing: normal; font-weight: 500; }
.hrow .h-time { color: #b8bcc4; font-size: 12px; }

.foot { text-align: center; color: #b0b4bb; font-size: 12px; margin-top: 32px; line-height: 1.6; }
