/* ==========================================================================
   MBL Software — account.css
   Cuenta de cliente: control de cuenta en la barra superior (todas las vistas),
   barra minima de las paginas sin cabecera, y las paginas Mi cuenta / Contratar /
   Pedido. Usa las variables de styles.css cuando existen (con valores de respaldo,
   porque 404, login y logout NO cargan styles.css).
   ========================================================================== */

/* ---------- Control de cuenta (barra superior) ---------- */
.acc-link, .acc > summary {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  color: inherit; text-transform: uppercase; list-style: none; text-decoration: none;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc { position: relative; }
.acc-ico { width: 13px; height: 13px; }
.acc-avatar {
  width: 22px; height: 22px; border-radius: 50%; background: #e2664c; color: #2b1206;
  font: 700 .72rem/22px "Sora", system-ui, sans-serif; text-align: center; text-transform: uppercase;
}
.acc-menu {
  position: absolute; right: 0; top: calc(100% + 10px); min-width: 230px; z-index: 200;
  background: #fff; color: #10201d; border: 1px solid #d9e4e1; border-radius: 12px; padding: .5rem;
  box-shadow: 0 24px 50px -22px rgba(10, 39, 35, .55);
  text-transform: none; letter-spacing: 0; font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: .9rem;
}
.acc-menu a, .acc-menu button {
  display: block; width: 100%; text-align: left; padding: .6rem .75rem; border-radius: 8px;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer; text-transform: none; letter-spacing: 0;
}
.acc-menu a:hover, .acc-menu button:hover { background: #eef3f1; color: #1f8f7e; }
.acc-who { padding: .5rem .75rem .6rem; border-bottom: 1px solid #d9e4e1; margin-bottom: .35rem; display: flex; flex-direction: column; gap: .1rem; }
.acc-who strong { font-size: .92rem; }
.acc-who span { color: #6b7f7a; font-size: .78rem; word-break: break-all; }
@media (max-width: 560px) {
  .acc-ico { width: 21px; height: 21px; }
  .acc-avatar { width: 26px; height: 26px; line-height: 26px; }
  .acc > summary, .acc-link { padding: .5rem; margin: -.5rem; }
  .acc-menu { top: calc(100% + 6px); right: -.4rem; }
}

/* ---------- Barra minima (404, login del panel, sesion cerrada) ---------- */
.mini-bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 101; height: 46px; padding: 0 1rem;
  display: flex; align-items: center; justify-content: space-between;
  background: #0a2723; color: rgba(255, 255, 255, .85);
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .68rem; letter-spacing: .07em;
}
.mini-bar img { height: 26px; width: auto; display: block; }
.mini-bar a { color: inherit; text-decoration: none; }
.mini-bar a:hover, .mini-bar .acc > summary:hover { color: #ffd97a; }
@media (max-width: 560px) { .mini-bar .lbl { display: none; } }

/* ---------- Paginas de cuenta / contratar / pedido ---------- */
.acct-wrap { width: 100%; max-width: 1040px; margin: 0 auto; box-sizing: border-box; padding: clamp(6.5rem, 10vw, 8rem) 1.4rem 4rem; }
.acct-narrow { max-width: 520px; }
.acct-head { margin-bottom: 1.6rem; }
.acct-head h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: .5rem 0 .3rem; }
.acct-head p { color: var(--ink-mute, #5c706b); margin: 0; }
.acct-card { background: var(--paper, #f7faf9); border: 1.5px solid var(--line, #d9e4e1); border-radius: var(--radius, 14px); padding: 1.5rem; box-sizing: border-box; }
.acct-card h2 { font-size: 1.1rem; margin: 0 0 .9rem; }
.acct-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.2rem; align-items: start; }
@media (max-width: 820px) { .acct-grid { grid-template-columns: 1fr; } }
.acct-login { text-align: center; }
.acct-login .kicker { justify-content: center; }
.acct-login h1 { font-size: clamp(1.5rem, 4vw, 1.9rem); margin: .6rem 0 .6rem; }
.acct-lead { color: var(--ink-mute, #5c706b); margin: 0 0 1.4rem; }
.acct-fine { font-size: .8rem; color: #6b7f7a; margin: .9rem 0 0; }
.acct-fine a, .acct-empty a { color: var(--azul, #1f8f7e); font-weight: 600; }
.acct-empty { color: var(--ink-mute, #5c706b); margin: 0 0 1rem; }

.acct-alert { padding: .8rem 1rem; border-radius: 8px; font-size: .9rem; margin: 1rem 0; text-align: left; }
.acct-alert a { color: inherit; font-weight: 600; text-decoration: underline; }
.acct-alert.err { background: #fdecea; color: #8a2c22; }
.acct-alert.ok { background: #eaf5f2; color: #1a5c4f; }
.acct-alert.warn { background: #fff4dc; color: #7a5200; }

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: .7rem; width: 100%; box-sizing: border-box;
  padding: .85rem 1rem; background: #fff; border: 1.5px solid var(--line, #d9e4e1); border-radius: 10px;
  font: 600 .95rem "Inter", system-ui, sans-serif; color: #1f2a28; text-decoration: none;
  transition: box-shadow .2s, transform .2s;
}
.btn-google:hover { box-shadow: 0 10px 24px -14px rgba(10, 39, 35, .5); transform: translateY(-1px); }

.acct-form { display: flex; flex-direction: column; gap: .8rem; }
.acct-fine + .acct-form { margin-top: 1rem; }
.acct-form label { display: flex; flex-direction: column; gap: .3rem; font-family: var(--ff-mono, "IBM Plex Mono", monospace); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute, #5c706b); }
.acct-form input, .acct-form select {
  width: 100%; box-sizing: border-box; font-family: var(--ff-body, "Inter", sans-serif); font-size: 15px; letter-spacing: 0; text-transform: none;
  color: var(--ink, #10201d); padding: .6em .75em; border: 1.5px solid var(--line, #d9e4e1); border-radius: 8px; background: #fff;
}
.acct-form input:focus, .acct-form select:focus { outline: none; border-color: var(--azul, #1f8f7e); box-shadow: 0 0 0 3px rgba(31, 143, 126, .15); }
.acct-form .btn { align-self: flex-start; margin-top: .3rem; }

.acct-tablewrap { overflow-x: auto; }
.acct-table { width: 100%; border-collapse: collapse; }
.acct-table th, .acct-table td { padding: .7rem .6rem; text-align: left; font-size: .88rem; border-bottom: 1px solid var(--line-2, #e6eeeb); vertical-align: top; }
.acct-table th { font-family: var(--ff-mono, monospace); font-size: .64rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute, #5c706b); }
.acct-table td small { display: block; color: #6b7f7a; font-size: .75rem; margin-top: .15rem; }
.acct-table a { color: var(--azul, #1f8f7e); font-weight: 600; }
.acct-pill { display: inline-block; padding: .22em .65em; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; }
.acct-pill.ok { background: #eaf5f2; color: #1a5c4f; }
.acct-pill.warn { background: #fff4dc; color: #7a5200; }
.acct-pill.err { background: #fdecea; color: #8a2c22; }

/* ---------- Contratar (checkout) ---------- */
.ck-grid { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 820px) { .ck-grid { grid-template-columns: 1fr; } .ck-summary { order: -1; } }
.ck-pay { width: 100%; justify-content: center; margin-top: .4rem; }
.ck-pay[disabled] { opacity: .7; cursor: progress; }
.ck-alt { font-size: .85rem; color: #5c706b; margin: 1rem 0 0; }
.ck-alt a { color: var(--azul, #1f8f7e); font-weight: 600; }
.ck-plan { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-bottom: .6rem; }
.ck-plan b { font-family: var(--ff-display, "Sora", sans-serif); font-size: 1.15rem; }
.ck-features { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: .35rem; font-size: .88rem; color: #3c4f4a; }
.ck-features li { padding-left: 1.3rem; position: relative; }
.ck-features li::before { content: "✓"; position: absolute; left: 0; color: var(--azul, #1f8f7e); font-weight: 700; }
.ck-totals { margin: 0; border-top: 1px solid var(--line, #d9e4e1); padding-top: .8rem; }
.ck-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .92rem; }
.ck-totals dt { color: #5c706b; margin: 0; }
.ck-totals dd { margin: 0; font-weight: 600; }
.ck-totals .tot { border-top: 1px solid var(--line, #d9e4e1); margin-top: .4rem; padding-top: .7rem; font-size: 1.1rem; }
.ck-totals .tot dt { color: var(--ink, #10201d); font-weight: 700; }
.ck-switch { margin: .9rem 0 0; font-size: .85rem; }
.ck-switch a { color: var(--azul, #1f8f7e); font-weight: 600; }

/* ---------- Resultado del pedido ---------- */
.ped-card { text-align: center; }
.ped-ico { font-size: 2.6rem; line-height: 1; margin-bottom: .4rem; }
.ped-card h1 { font-size: clamp(1.4rem, 4vw, 1.8rem); margin: .2rem 0 .6rem; }
.ped-data { margin: 1.2rem 0; text-align: left; border: 1px solid var(--line, #d9e4e1); border-radius: 10px; background: #fff; }
.ped-data div { display: flex; justify-content: space-between; gap: 1rem; padding: .65rem .9rem; border-bottom: 1px solid var(--line-2, #e6eeeb); font-size: .9rem; }
.ped-data div:last-child { border-bottom: 0; }
.ped-data dt { color: #5c706b; margin: 0; }
.ped-data dd { margin: 0; font-weight: 600; text-align: right; }
.ped-data small { font-weight: 400; color: #6b7f7a; }
.ped-actions { display: flex; flex-direction: column; gap: .7rem; align-items: stretch; }
.ped-link { font-size: .85rem; color: var(--azul, #1f8f7e); font-weight: 600; }

/* ---------- Tarjetas de planes (portada): enlace secundario a WhatsApp ---------- */
.plan-wa-alt { display: block; text-align: center; margin-top: .75rem; font-size: .85rem; color: var(--ink-mute, #5c706b); }
.plan-wa-alt:hover { color: var(--azul, #1f8f7e); }
