/* Cuenta EA — login único por correo para *.espressoamericano.cloud */
:root {
  --green: #0e4c26;
  --green-deep: #093418;
  --green-soft: #e6f0e9;
  --red: #c8102e;
  --red-soft: #ffecec;
  --paper: #faf8f3;
  --cream: #f5f1e8;
  --card: #ffffff;
  --text: #15201a;
  --muted: #5f6b64;
  --border: #e3ded2;
  --input: #d9d3c5;
  --ring: #1f7a3f;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(21, 32, 26, 0.08);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --green: #4fa36b;
    --green-deep: #093418;
    --green-soft: #17271d;
    --red: #ff5a6a;
    --red-soft: #3a1b1f;
    --paper: #121715;
    --cream: #171d1a;
    --card: #1b221e;
    --text: #eef3ef;
    --muted: #a3ada7;
    --border: #2b342f;
    --input: #37423b;
    --ring: #6fc08a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  background: var(--paper);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.wrap { width: 100%; max-width: 440px; }
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; justify-content: center; }
.brand .mark {
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-deep);
  display: grid; place-items: center; color: #d9b36a; font-weight: 800; letter-spacing: .04em; font-size: 15px;
}
.brand .mark img { width: 30px; height: auto; display: block; }
.brand .name { line-height: 1.15; }
.brand .name strong { display: block; font-size: 16px; }
.brand .name span { display: block; font-size: 12px; color: var(--muted); }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 28px 26px;
}
h1 { font-size: 22px; margin: 0 0 6px; letter-spacing: -0.01em; }
.sub { margin: 0 0 20px; color: var(--muted); font-size: 14px; }
.sub strong { color: var(--text); }
.field { margin-bottom: 14px; }
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"] {
  width: 100%; font: inherit; font-size: 16px; padding: 11px 13px; border-radius: 10px;
  border: 1px solid var(--input); background: var(--card); color: var(--text); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--ring); box-shadow: 0 0 0 3px rgba(31, 122, 63, 0.18); }
input[readonly] { background: var(--cream); color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.pw { position: relative; }
.pw button {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 6px;
}
.btn {
  width: 100%; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: 15px; padding: 12px 16px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer; transition: background .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-deep); }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: var(--cream); }
.alert { border-radius: 10px; padding: 11px 13px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: var(--red-soft); color: var(--red); border: 1px solid rgba(200, 16, 46, 0.2); }
.alert-ok { background: var(--green-soft); color: var(--green); border: 1px solid rgba(14, 76, 38, 0.2); }
.links { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; font-size: 13px; color: var(--muted); }
.links a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.links a:hover { color: var(--green); }
.foot { text-align: center; font-size: 12px; color: var(--muted); margin-top: 18px; }
.foot a { color: inherit; }
.state { display: none; }
.state.active { display: block; }
.center { text-align: center; }
.big-icon { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.spinner {
  width: 22px; height: 22px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%;
  animation: spin .8s linear infinite; display: none;
}
.btn.loading .spinner { display: inline-block; }
.btn.loading .label { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.chip { display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--cream); border: 1px solid var(--border); padding: 4px 9px; border-radius: 8px; font-size: 13px; }
.apps { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.apps li::before { content: "•"; color: var(--green); margin-right: 6px; }
@media (max-width: 420px) { .card { padding: 22px 18px; } h1 { font-size: 20px; } }

/* celular con código de país + checklist de contraseña */
.phone { display: grid; grid-template-columns: 118px 1fr; gap: 8px; }
.phone select { font: inherit; font-size: 15px; padding: 10px 8px; border-radius: 10px; border: 1px solid var(--input); background: var(--card); color: var(--text); }
.phone select:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(31, 122, 63, 0.18); }
.phone input.cc-custom { grid-column: 1 / -1; }
.pw-rules { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 10px; font-size: 12px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--green); }
.pw-rules li.ok::before { content: "● "; }
.field.invalid input, .field.invalid select { border-color: var(--red); }
.field .err { font-size: 12px; color: var(--red); margin-top: 5px; }
@media (max-width: 420px) { .pw-rules { grid-template-columns: 1fr; } }
