/* ChatWith · Acceso y Mi cuenta. Usa los tokens de chatwith-app.css. */
[hidden] { display: none !important; }

/* ---------- Acceso (ingresar.html) ---------- */
.cw-auth { min-height: 100vh; display: grid; place-items: center; align-content: center; gap: 24px; padding: 40px 16px; }
.cw-auth__brand { font-size: 1.25rem; }
.cw-auth__brand svg { width: 32px; height: 32px; }
.cw-auth__card { width: min(440px, 100%); padding: 32px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 40px 100px -50px rgba(0, 0, 0, 0.9); display: grid; gap: 16px; }
.cw-auth__title { font: 700 1.6rem var(--font-display) !important; letter-spacing: -0.03em; }
.cw-auth__lead { color: var(--muted); font-size: 0.94rem; margin-top: -8px; }
.cw-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); }
.cw-auth__tab { border: 0; background: none; color: var(--muted); padding: 9px 12px; border-radius: 999px; font: 600 0.9rem var(--font-body); cursor: pointer; transition: background 0.2s, color 0.2s; }
.cw-auth__tab.is-active { background: var(--surface-3); color: var(--text); }
.cw-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; color: #1f1f1f; font: 600 0.94rem var(--font-body); cursor: pointer; transition: transform 0.3s var(--ease), box-shadow 0.3s; }
.cw-google svg { width: 18px; height: 18px; }
.cw-google:hover { box-shadow: 0 10px 30px -14px rgba(255, 255, 255, 0.35); }
.cw-google:disabled { opacity: 0.6; cursor: progress; }
.cw-auth__divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 0.8rem; }
.cw-auth__divider::before, .cw-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.cw-auth__form { display: grid; gap: 4px; }
.cw-auth__form .btn-full { margin-top: 6px; padding: 13px 20px; }
.cw-auth__alert { padding: 11px 14px; border-radius: var(--r-sm); background: var(--danger-soft); border: 1px solid rgba(255, 107, 107, 0.35); color: #ffc2c2; font-size: 0.88rem; }
.cw-auth__alert.is-ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }
.cw-auth__foot { color: var(--dim); font-size: 0.85rem; }
.cw-auth__foot a, .cw-check a { color: var(--accent); }
.cw-link { background: none; border: 0; padding: 6px 0; color: var(--accent); font: 600 0.86rem var(--font-body); cursor: pointer; text-decoration: none; justify-self: center; }
.cw-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.cw-check { display: flex; gap: 10px; align-items: flex-start; color: var(--muted) !important; font: 400 0.84rem/1.5 var(--font-body) !important; margin: 4px 0 6px; cursor: pointer; }
.cw-check input { margin-top: 3px; width: 16px; height: 16px; flex: none; }
.cw-code { letter-spacing: 0.4em; font: 600 1.2rem var(--font-mono) !important; text-align: center; }

/* ---------- Mi cuenta (cuenta.html) ---------- */
.cw-account { max-width: 1160px; margin: 0 auto; padding: 36px 24px 96px; display: grid; gap: 20px; }
.cw-account__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 8px; }
.cw-account__title { font: 700 clamp(1.8rem, 3.2vw, 2.6rem) var(--font-display) !important; letter-spacing: -0.035em; }
.cw-account__sub { color: var(--muted); margin-top: 6px; }
.cw-account__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cw-account__grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.cw-panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 16px; }
.cw-panel__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 10px; }
.cw-panel__head h2 { font: 600 1.15rem var(--font-display) !important; }
.cw-panel__hint, .cw-panel__note { color: var(--dim); font-size: 0.84rem; }
.cw-panel__note a { color: var(--accent); }
.cw-dl { display: grid; gap: 0; margin: 0; }
.cw-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.cw-dl > div:last-child { border-bottom: 0; }
.cw-dl dt { color: var(--dim); font-size: 0.86rem; }
.cw-dl dd { margin: 0; color: var(--text); font-size: 0.9rem; text-align: right; overflow-wrap: anywhere; }
.cw-subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cw-sub { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main pill" "links links"; gap: 8px 12px; padding: 14px 16px; border-radius: var(--r); background: var(--bg-2); border: 1px solid var(--line); }
.cw-sub__main { grid-area: main; display: grid; gap: 2px; min-width: 0; }
.cw-sub__main strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-sub__main span { color: var(--dim); font-size: 0.82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-sub .cw-pill { grid-area: pill; align-self: start; }
.cw-sub__links { grid-area: links; display: flex; gap: 16px; }
.cw-sub__links .cw-link { padding: 0; }
.cw-empty { color: var(--muted); padding: 16px; border-radius: var(--r); border: 1px dashed var(--line-2); text-align: center; }
.cw-skeleton { height: 64px; border-radius: var(--r); background: linear-gradient(90deg, var(--bg-2), var(--surface-2), var(--bg-2)); background-size: 200% 100%; animation: cw-shimmer 1.4s linear infinite; }
@keyframes cw-shimmer { to { background-position: -200% 0; } }
.cw-pill { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.cw-pill--ok { background: var(--accent-soft); color: var(--accent); }
.cw-pill--warn { background: rgba(255, 181, 71, 0.12); color: var(--warn); }
.cw-pill--bad { background: var(--danger-soft); color: var(--danger); }
.cw-pill--off { background: rgba(255, 255, 255, 0.05); color: var(--dim); }
.cw-pill--dev { background: rgba(124, 92, 255, 0.16); color: #b9a8ff; }
.cw-table-wrap { overflow-x: auto; }
.cw-table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.cw-table th { text-align: left; color: var(--dim); font-weight: 600; font-size: 0.78rem; padding: 0 12px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.cw-table td { padding: 12px; border-bottom: 1px solid var(--line); color: #c9cfd8; vertical-align: middle; }
.cw-table tr:last-child td { border-bottom: 0; }
.cw-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.cw-table__empty { text-align: center !important; color: var(--muted) !important; padding: 28px 12px !important; }

/* ---------- Prueba de desarrollo en Planes ---------- */
.cw-devbtn { width: 100%; margin-top: 4px; padding: 9px 14px; border-radius: 999px; border: 1px dashed rgba(124, 92, 255, 0.6); background: rgba(124, 92, 255, 0.1); color: #c7b8ff; font: 600 0.82rem var(--font-body); cursor: pointer; transition: background 0.2s; }
.cw-devbtn:hover { background: rgba(124, 92, 255, 0.2); }
.cw-devbtn:disabled { opacity: 0.6; cursor: progress; }

@media (max-width: 860px) {
  .cw-account__grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .cw-account { padding: 24px 16px 72px; }
  .cw-auth__card { padding: 24px; }
  .cw-table thead { display: none; }
  .cw-table, .cw-table tbody, .cw-table tr, .cw-table td { display: block; width: 100%; }
  .cw-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cw-table td { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border: 0; }
  .cw-table td::before { content: attr(data-label); color: var(--dim); font-size: 0.8rem; }
  .cw-table .num { text-align: left; }
  .cw-table__empty { display: block !important; }
  .cw-table__empty::before { content: none !important; }
}
