/* Xinix account and dashboard surfaces. */
.nav-links { gap: 22px; }
.nav-links a { white-space: nowrap; }
.docs-layout { display: grid; grid-template-columns: .9fr 1.1fr; align-items: center; gap: 64px; }
.docs-layout h2 { margin-bottom: 19px; }
.docs-layout .section-intro { margin-bottom: 22px; }
.text-link { color: var(--green); font-size: 13px; font-weight: 650; }
.text-link span { margin-left: 5px; }
.code-card { overflow: hidden; border: 1px solid #343d36; border-radius: 7px; background: #202923; color: #edf1e9; box-shadow: 0 16px 36px rgba(35,45,37,.1); }
.code-title { display: flex; justify-content: space-between; padding: 16px 19px; border-bottom: 1px solid rgba(255,255,255,.1); color: #b8c1b7; font-size: 11px; }
.code-title span:last-child { color: #b7d3a3; letter-spacing: .1em; }
.code-card pre { overflow-x: auto; margin: 0; padding: 20px; color: #e4eddb; font: 12px/1.8 ui-monospace, SFMono-Regular, Consolas, monospace; }
.code-card p { margin: 0; padding: 0 20px 17px; color: #98a298; font-size: 10px; }
.status-row { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 50px; }
.status-card { display: flex; align-items: center; gap: 13px; min-height: 82px; padding: 17px 19px; border: 1px solid var(--line); border-radius: 5px; background: rgba(255,255,255,.42); }
.status-dot { width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: #c3a35a; box-shadow: 0 0 0 4px rgba(195,163,90,.13); }
.status-dot.is-online { background: #638d63; box-shadow: 0 0 0 4px rgba(99,141,99,.14); }
.status-dot.is-offline { background: #b8584e; box-shadow: 0 0 0 4px rgba(184,88,78,.12); }
.status-card strong { font-size: 13px; font-weight: 650; }
.status-card p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.status-card time { margin-left: auto; color: #8b9087; font-size: 10px; white-space: nowrap; }
.site-footer-note { color: #83877f; }

body.app-page { min-height: 100vh; background: #f4f5f2; }
.app-topbar { height: 68px; border-bottom: 1px solid #e7e9e4; background: rgba(255,255,255,.9); }
.app-topbar-inner { width: min(1160px, calc(100% - 48px)); height: 100%; margin: auto; display: flex; align-items: center; justify-content: space-between; }
.app-top-actions { display: flex; align-items: center; gap: 16px; color: #687067; font-size: 12px; }
.app-top-actions a:hover { color: var(--green); }
.app-main { width: min(1160px, calc(100% - 48px)); margin: 44px auto 72px; }
.auth-wrap { width: min(440px, calc(100% - 36px)); margin: 72px auto; }
.auth-card { padding: 34px; border: 1px solid #e2e5df; border-radius: 8px; background: #fff; box-shadow: 0 18px 50px rgba(30,44,34,.06); }
.auth-card h1 { margin: 0 0 10px; font-family: var(--serif); font-size: 38px; font-weight: 400; letter-spacing: -.045em; line-height: 1.1; }
.auth-card > p { margin-bottom: 25px; color: var(--muted); font-size: 13px; line-height: 1.65; }
.form-field { display: block; margin: 15px 0; }
.form-field span { display: block; margin-bottom: 7px; color: #515950; font-size: 11px; font-weight: 650; }
.form-field input, .form-field select { width: 100%; height: 43px; padding: 0 12px; border: 1px solid #dfe3dc; border-radius: 4px; background: #fff; color: var(--ink); font: 13px var(--sans); }
.form-field input:focus, .form-field select:focus { outline: 2px solid rgba(74,111,81,.17); border-color: #7e9a7b; }
.form-hint { margin: 9px 0 0; color: #7a8077; font-size: 10px; line-height: 1.6; }
.form-error { display: none; margin: 13px 0; padding: 10px 12px; border: 1px solid #efd3cf; border-radius: 4px; background: #fcf4f2; color: #963e36; font-size: 12px; line-height: 1.5; }
.form-error.is-visible { display: block; }
.form-success { margin: 12px 0; padding: 12px; border: 1px solid #d4e3ce; border-radius: 4px; background: #f4f8f1; color: #31563b; font-size: 12px; line-height: 1.5; }
.form-submit { width: 100%; margin-top: 8px; cursor: pointer; }
.auth-switch { margin: 18px 0 0 !important; text-align: center; color: #767d74 !important; font-size: 11px !important; }
.auth-switch a { color: var(--green); font-weight: 650; }
.secure-note { margin-top: 20px; color: #8a9087; font-size: 10px; text-align: center; }
.app-layout { display: grid; grid-template-columns: 220px minmax(0,1fr); gap: 42px; }
.app-sidebar { align-self: start; padding: 7px 0; }
.app-user { padding: 0 12px 22px; border-bottom: 1px solid #e0e4dc; }
.app-user strong { display: block; overflow: hidden; color: #29302b; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.app-user span { display: block; margin-top: 5px; color: #858b83; font-size: 10px; }
.app-nav { display: grid; gap: 4px; margin-top: 17px; }
.app-nav a { padding: 10px 12px; border-radius: 4px; color: #687067; font-size: 12px; }
.app-nav a:hover, .app-nav a.is-active { background: #e9eee7; color: var(--green); }
.app-content { min-width: 0; }
.page-heading { margin-bottom: 25px; }
.page-heading .eyebrow { margin-bottom: 12px; }
.page-heading h1 { margin: 0 0 9px; font-family: var(--serif); font-size: 42px; font-weight: 400; letter-spacing: -.045em; line-height: 1.08; }
.page-heading p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.surface { margin-bottom: 16px; padding: 21px; border: 1px solid #e3e6df; border-radius: 6px; background: #fff; }
.surface h2 { margin: 0 0 10px; font-size: 14px; font-weight: 650; letter-spacing: -.015em; }
.surface p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.stat-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; margin-bottom: 16px; }
.stat-card { min-height: 106px; padding: 18px; border: 1px solid #e3e6df; border-radius: 6px; background: white; }
.stat-card span { display: block; color: #7c837a; font-size: 10px; }
.stat-card strong { display: block; margin-top: 14px; color: #28362c; font-family: var(--serif); font-size: 26px; font-weight: 400; letter-spacing: -.04em; }
.locked-card { display: flex; align-items: flex-start; gap: 14px; padding: 22px; border: 1px solid #e7e4d8; border-radius: 5px; background: #fbfaf5; }
.locked-symbol { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; background: #f1eddf; font-size: 15px; }
.locked-card h2 { margin: 1px 0 7px; font-size: 14px; }
.locked-card p { margin: 0 0 15px; color: #72776f; font-size: 12px; line-height: 1.6; }
.enabled-card { border-color: #d6e3d1; background: #f7faf5; }
.enabled-card .locked-symbol { background: #e4efdf; }
.key-list { display: grid; }
.key-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid #edf0ea; }
.key-row:first-child { border-top: 0; }
.key-row-main { min-width: 0; flex: 1; }
.key-row-main strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.key-row-main span { display: block; margin-top: 5px; color: #8a9087; font-size: 10px; }
.key-mask { color: #7d867c; font: 11px ui-monospace, Consolas, monospace; }
.small-button { min-height: 34px; padding: 0 12px; border: 1px solid #d9ded6; border-radius: 4px; background: white; color: #4d574e; font: 11px var(--sans); cursor: pointer; }
.small-button:hover { border-color: #93a790; color: var(--green); }
.key-row .danger { color: #99534d; }
.inline-form { display: flex; gap: 9px; align-items: end; }
.inline-form .form-field { flex: 1; margin: 0; }
.secret-key { overflow-wrap: anywhere; margin-top: 13px; padding: 14px; border: 1px solid #d7e5cf; border-radius: 4px; background: #f3f8ef; color: #264631; font: 12px/1.65 ui-monospace, Consolas, monospace; }
.model-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 13px; }
.model-card { padding: 19px; border: 1px solid #e3e6df; border-radius: 6px; background: white; }
.model-card .model-icon { margin-bottom: 13px; background: #26312a; }
.model-card h3 { margin: 0 0 7px; font-size: 13px; }
.model-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.table-wrap { overflow-x: auto; }
.simple-table { width: 100%; border-collapse: collapse; text-align: left; }
.simple-table th, .simple-table td { padding: 11px 9px; border-bottom: 1px solid #edf0ea; font-size: 11px; white-space: nowrap; }
.simple-table th { color: #858b83; font-weight: 600; }
.simple-table td { color: #424b43; }
.access-code-form { max-width: 470px; }
.loading-state { padding: 60px 0; color: #727a71; font-size: 13px; text-align: center; }
.app-footer { padding: 18px 24px; border-top: 1px solid #e7e9e4; color: #8a9087; font-size: 10px; text-align: center; }
@media (max-width: 900px) {
  .nav-links { gap: 14px; }
  .nav-links a:nth-child(3), .nav-links a:nth-child(4) { display: none; }
  .docs-layout, .status-row { grid-template-columns: 1fr; gap: 28px; }
  .app-layout { grid-template-columns: 1fr; gap: 25px; }
  .app-nav { display: flex; overflow-x: auto; padding-bottom: 4px; }
  .app-nav a { flex: 0 0 auto; }
  .app-user { padding-bottom: 13px; }
  .app-main { margin-top: 28px; }
}
@media (max-width: 600px) {
  .nav-links { gap: 12px; }
  .nav-links a:nth-child(2), .nav-links a:nth-child(3), .nav-links a:nth-child(4) { display: none; }
  .docs-layout { gap: 23px; }
  .status-card { flex-wrap: wrap; }
  .status-card time { margin-left: 22px; }
  .auth-card { padding: 26px 22px; }
  .app-main, .app-topbar-inner { width: calc(100% - 32px); }
  .app-main { margin-top: 22px; }
  .page-heading h1 { font-size: 35px; }
  .stat-grid { grid-template-columns: 1fr; gap: 8px; }
  .stat-card { min-height: 0; }
  .stat-card strong { margin-top: 8px; }
  .model-grid { grid-template-columns: 1fr; }
  .inline-form { align-items: stretch; flex-direction: column; }
  .key-row { align-items: flex-start; flex-wrap: wrap; }
  .key-row .key-mask { flex-basis: 100%; padding-left: 1px; }
}

/* --- Parche 2026-09-29: variables y componentes que faltaban en la zona de cuenta --- */
/* Las páginas /login, /register y /dashboard solo cargan site.css (+ landing.css),
   así que las variables de diseño viven aquí, con alcance a body.app-page. */
body.app-page {
  --sans: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;
  --ink: #202820;
  --muted: #71786f;
  --line: #e2e5df;
  --green: #244b3b;
  --green-deep: #18372b;
  font-family: var(--sans);
  color: var(--ink);
}

/* Botón principal de la zona de cuenta (login, registro, dashboard). */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--green);
  border-radius: 4px;
  background: var(--green);
  color: #fff;
  font: 600 13px var(--sans);
  letter-spacing: .01em;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, transform .2s ease;
}
.button:hover { background: var(--green-deep); border-color: var(--green-deep); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button .arrow { font-size: 15px; line-height: 1; }

/* Marca en la barra superior de la zona de cuenta. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font: 700 17px var(--sans);
  letter-spacing: -.02em;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border-radius: 8px;
  background: var(--green);
  color: #fff;
  font: 700 15px var(--sans);
}
.brand-mark svg { display: block; width: 15px; height: 15px; }

/* === Xinix 2026-09-29: verificación por código, animaciones de página y detalles === */
@keyframes xinix-rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes xinix-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes xinix-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-4px); opacity: 1; } }

body.app-page .auth-card { animation: xinix-rise .55s cubic-bezier(.2,.7,.2,1) both; }
body.app-page .app-main { animation: xinix-fade .4s ease both; }
body.app-page .app-topbar { animation: xinix-fade .35s ease both; }

/* Indicador de pasos del registro con código */
.verify-steps { display: flex; gap: 18px; margin: 0 0 20px; padding: 0; list-style: none; }
.verify-steps li { display: flex; align-items: center; gap: 8px; color: #9aa096; font-size: 11px; font-weight: 600; }
.verify-steps li span { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid #dfe3dc; border-radius: 50%; font-size: 10px; background: #fff; transition: all .25s ease; }
.verify-steps li.is-current { color: var(--ink); }
.verify-steps li.is-current span { border-color: var(--green); background: var(--green); color: #fff; box-shadow: 0 0 0 4px rgba(74,111,81,.12); }
.verify-steps li.is-done { color: var(--green); }
.verify-steps li.is-done span { border-color: var(--green); color: var(--green); }

/* Campo del código de 6 dígitos */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .form-row { grid-template-columns: 1fr; } }
.code-input { text-align: center; font-size: 22px !important; letter-spacing: .45em !important; text-indent: .45em; font-weight: 700; font-variant-numeric: tabular-nums; }
.code-input::placeholder { letter-spacing: .45em; color: #c6cbc2; }

/* Fila de reenvío / cambiar correo */
.resend-row { display: flex; align-items: center; gap: 10px; margin-top: 16px; font-size: 12px; color: #767d74; }
.resend-row .text-button { margin-left: auto; }
.resend-row .text-button.muted { margin-left: 0; }
.text-button { padding: 0; border: 0; background: none; color: var(--green); font: 650 12px var(--sans); cursor: pointer; }
.text-button:hover { text-decoration: underline; }
.text-button:disabled { color: #a9aea6; cursor: wait; text-decoration: none; }
.text-button.muted { color: #8a9087; font-weight: 500; }

/* Puntos de carga mientras se prepara el registro */
.loading-dots { display: flex; gap: 6px; margin-top: 18px; }
.loading-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: xinix-dots 1.2s ease-in-out infinite; }
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }

/* Transiciones suaves en campos y tarjetas del dashboard */
.form-field input { transition: border-color .2s ease, box-shadow .2s ease; }
.form-field input:focus { box-shadow: 0 0 0 3px rgba(74,111,81,.12); }
.stat-card, .surface, .locked-card { transition: transform .25s ease, box-shadow .25s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(30,44,34,.08); }
.app-nav a { transition: color .2s ease, background-color .2s ease; }
.key-row { transition: background-color .2s ease; }
.key-row:hover { background: rgba(74,111,81,.04); }

/* Foco visible accesible */
.button:focus-visible, .small-button:focus-visible, .text-button:focus-visible, .app-nav a:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  body.app-page .auth-card, body.app-page .app-main, body.app-page .app-topbar { animation: none; }
  .loading-dots span { animation: none; opacity: .6; }
  .stat-card:hover { transform: none; }
  .button, .form-field input, .stat-card, .surface, .locked-card, .app-nav a, .key-row { transition-duration: .01ms !important; }
}

/* Honeypot anti-bots: campo oculto para humanos, visible para bots simples */
.hp-field { position: absolute !important; left: -9999px !important; top: auto !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }

/* Botón "Volver a Xinix" de la barra superior: botón de verdad, no enlace */
.top-button { min-height: 34px; padding: 0 14px; border: 1px solid #d9ded6; border-radius: 4px; background: white; color: #4d574e; font: 12px var(--sans); cursor: pointer; }
.top-button:hover { border-color: var(--green); color: var(--green); }
