:root {
  --bg: #0b0d12;
  --card: #151922;
  --card-hover: #1b2030;
  --border: #242a38;
  --text: #eef0f5;
  --muted: #8b93a7;
  --accent: #818cf8;
  --danger: #f87171;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(129, 140, 248, .14), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding:
    calc(env(safe-area-inset-top) + 32px)
    calc(env(safe-area-inset-right) + 16px)
    calc(env(safe-area-inset-bottom) + 24px)
    calc(env(safe-area-inset-left) + 16px);
}

/* ---------- inicio */
.hero { margin: 16px 4px 28px; }
.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
h1 { margin: 0; font-size: 2rem; font-weight: 700; letter-spacing: -.02em; }

.apps { display: grid; gap: 12px; }

.app {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 84px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
  color: inherit;
  text-decoration: none;
  transition: background .15s, transform .1s;
}
a.app:hover { background: var(--card-hover); }
a.app:active { transform: scale(.98); background: var(--card-hover); }

.app-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-size: 28px;
  background: color-mix(in srgb, var(--c) 22%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 35%, transparent);
}
.app-text { display: grid; flex: 1; min-width: 0; }
.app-name { font-size: 1.1rem; font-weight: 600; }
.app-desc { color: var(--muted); font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chevron { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--muted); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.app.soon { opacity: .55; }
.badge {
  flex: none;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--border);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}

.empty { color: var(--muted); text-align: center; }
.foot { margin-top: 36px; text-align: center; }
button.link {
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: .9rem;
  padding: 8px 12px;
  cursor: pointer;
}

/* ---------- login */
.login { display: grid; justify-items: center; gap: 16px; padding-top: 8vh; }
.login-logo { border-radius: 18px; }
.login h1 { font-size: 1.6rem; }
.card {
  display: grid;
  gap: 14px;
  width: 100%;
  max-width: 380px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--card);
}
label { display: grid; gap: 6px; color: var(--muted); font-size: .85rem; font-weight: 500; }
input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 16px; /* 16px evita el zoom automático de iOS */
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button.primary {
  margin-top: 4px;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: #0b0d12;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
button.primary:active { opacity: .85; }
.error { margin: 0; color: var(--danger); font-size: .9rem; }
