/* ==========================================================================
   Ruway — 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: #771a15; color: #efe8de;
  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: #1a1a1a; border: 1px solid #e2d8cc; border-radius: 12px; padding: .5rem;
  box-shadow: 0 24px 50px -22px rgba(26, 26, 26, .45);
  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: #efe8de; color: #771a15; }
.acc-who { padding: .5rem .75rem .6rem; border-bottom: 1px solid #e2d8cc; margin-bottom: .35rem; display: flex; flex-direction: column; gap: .1rem; }
.acc-who strong { font-size: .92rem; }
.acc-who span { color: #6e655b; 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: #1a1a1a; 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: #e7ae23; }
@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, #6e655b); margin: 0; }
.acct-card { background: var(--paper, #fbf8f3); border: 1.5px solid var(--line, #e2d8cc); 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, #6e655b); margin: 0 0 1.4rem; }
.acct-fine { font-size: .8rem; color: #6e655b; margin: .9rem 0 0; }
.acct-fine a, .acct-empty a { color: var(--azul, #771a15); font-weight: 600; }
.acct-empty { color: var(--ink-mute, #6e655b); 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: #eef3e6; color: #3d5a2b; }
.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, #e2d8cc); 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(26, 26, 26, .4); 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, #6e655b); }
.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, #1a1a1a); padding: .6em .75em; border: 1.5px solid var(--line, #e2d8cc); border-radius: 8px; background: #fff;
}
.acct-form input:focus, .acct-form select:focus { outline: none; border-color: var(--azul, #771a15); box-shadow: 0 0 0 3px rgba(119, 26, 21, .14); }
.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, #ece4d8); 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, #6e655b); }
.acct-table td small { display: block; color: #6e655b; font-size: .75rem; margin-top: .15rem; }
.acct-table a { color: var(--azul, #771a15); 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: #eef3e6; color: #3d5a2b; }
.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: #6e655b; margin: 1rem 0 0; }
.ck-alt a { color: var(--azul, #771a15); 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: #3b3632; }
.ck-features li { padding-left: 1.3rem; position: relative; }
.ck-features li::before { content: "✓"; position: absolute; left: 0; color: var(--azul, #771a15); font-weight: 700; }
.ck-totals { margin: 0; border-top: 1px solid var(--line, #e2d8cc); padding-top: .8rem; }
.ck-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: .25rem 0; font-size: .92rem; }
.ck-totals dt { color: #6e655b; margin: 0; }
.ck-totals dd { margin: 0; font-weight: 600; }
.ck-totals .tot { border-top: 1px solid var(--line, #e2d8cc); margin-top: .4rem; padding-top: .7rem; font-size: 1.1rem; }
.ck-totals .tot dt { color: var(--ink, #1a1a1a); font-weight: 700; }
.ck-switch { margin: .9rem 0 0; font-size: .85rem; }
.ck-switch a { color: var(--azul, #771a15); 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, #e2d8cc); 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, #ece4d8); font-size: .9rem; }
.ped-data div:last-child { border-bottom: 0; }
.ped-data dt { color: #6e655b; margin: 0; }
.ped-data dd { margin: 0; font-weight: 600; text-align: right; }
.ped-data small { font-weight: 400; color: #6e655b; }
.ped-actions { display: flex; flex-direction: column; gap: .7rem; align-items: stretch; }
.ped-link { font-size: .85rem; color: var(--azul, #771a15); 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, #6e655b); }
.plan-wa-alt:hover { color: var(--azul, #771a15); }

/* ---------- Paginas legales (privacidad, condiciones) y enlaces del pie ---------- */
.legal { max-width: 820px; }
.legal-body h2 { font-size: 1.05rem; margin: 1.6rem 0 .5rem; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { font-size: .95rem; line-height: 1.65; color: var(--ink, #1a1a1a); }
.legal-body ul { margin: .4rem 0 .8rem 1.2rem; padding: 0; }
.legal-body li { margin: .3rem 0; }
.legal-body a { color: var(--azul, #771a15); font-weight: 600; }
.legal-link { color: inherit; text-decoration: underline; opacity: .85; margin-right: 1rem; }
.legal-link:hover { opacity: 1; }

/* ==========================================================================
   Ruway — Mi cuenta
   ========================================================================== */
.ruway-acct { max-width: 1100px; }
.ra-head { display: flex; align-items: center; gap: 1.2rem; padding: 1.4rem 1.6rem; margin-bottom: 1.4rem; background: #1a1a1a; color: #efe8de; border-radius: 6px; position: relative; overflow: hidden; }
.ra-head::after { content: ""; position: absolute; right: -30px; top: -20px; width: 150px; aspect-ratio: 630/805; background: #771a15; opacity: .4;
  -webkit-mask: url("assets/img/ruway-isotipo.png") center / contain no-repeat; mask: url("assets/img/ruway-isotipo.png") center / contain no-repeat; pointer-events: none; }
.ra-avatar { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #771a15; color: #efe8de; display: grid; place-items: center; font-family: var(--ff-display); font-size: 2rem; position: relative; z-index: 1; }
.ra-who { flex: 1; min-width: 0; position: relative; z-index: 1; }
.ra-who .kicker { color: #e7ae23; }
.ra-who h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: .3rem 0 .35rem; color: #efe8de; }
.ra-who h1 .script { color: #e7ae23; }
.ra-who p { color: rgba(239,232,222,.72); font-size: .92rem; display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0; word-break: break-all; }
.ra-pill { font-family: var(--ff-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; border: 1px solid rgba(239,232,222,.3); border-radius: 999px; padding: .3em .8em; color: #efe8de; word-break: normal; }
.ra-out { position: relative; z-index: 1; }
.ra-out .btn-ghost { --fg-btn: #efe8de; border-color: rgba(239,232,222,.35); }
.ra-out .btn-ghost:hover { background: #efe8de; color: #1a1a1a; }
.ra-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 1.2rem; align-items: start; }
.ra-col { display: flex; flex-direction: column; gap: 1.2rem; }
.ra-card { background: #fbf8f3; border: 1px solid rgba(26,26,26,.08); border-radius: 6px; padding: 1.5rem; }
.ra-card h2 { font-family: var(--ff-display); font-weight: 400; font-size: 1.9rem; line-height: 1; margin: 0; }
.ra-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; padding-bottom: .8rem; border-bottom: 2px solid #771a15; }
.ra-count { font-family: var(--ff-mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase; color: #771a15; }
.ra-empty { color: #6e655b; font-weight: 300; margin: 0 0 1rem; }
.ra-heart { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; color: #771a15; }
.ra-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.ra-list { list-style: none; margin: 0 0 1.1rem; padding: 0; display: flex; flex-direction: column; }
.ra-list li + li { border-top: 1px solid rgba(26,26,26,.08); }
.ra-list a { display: flex; align-items: center; gap: .9rem; padding: .65rem 0; color: inherit; text-decoration: none; }
.ra-list a:hover b { color: #771a15; }
.ra-list b { display: block; font-weight: 500; }
.ra-list small { color: #6e655b; font-family: var(--ff-mono); font-size: .7rem; letter-spacing: .06em; }
.ra-thumb { flex: none; width: 54px; height: 54px; border-radius: 4px; overflow: hidden; background: #e2d8cc; display: grid; place-items: center; }
.ra-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ra-seal { font-family: var(--ff-display); font-size: .95rem; color: var(--a, #771a15); border-top: 3px solid var(--a, #771a15); }
.ra-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .7rem; }
.ra-favs .ra-empty { grid-column: 1 / -1; margin: 0; }
.ra-fav { display: flex; align-items: center; gap: .6rem; padding: .5rem; border: 1px solid rgba(26,26,26,.08); border-radius: 4px; color: inherit; text-decoration: none; font-size: .88rem; background: #fff; }
.ra-fav:hover { border-color: #771a15; }
.ra-fav .ra-thumb { width: 40px; height: 40px; }
.ra-datos h2 { padding-bottom: .8rem; border-bottom: 2px solid #771a15; margin-bottom: .9rem; }
.ra-note { color: #6e655b; font-size: .88rem; font-weight: 300; margin: 0 0 1.1rem; }
.ra-opt { font-size: .58rem; letter-spacing: .1em; color: #8a7f72; border: 1px solid #e2d8cc; border-radius: 999px; padding: .1em .6em; margin-left: .3rem; vertical-align: 1px; }
.ruway-acct .acct-form input { border-radius: 4px; border-color: #e2d8cc; }
.ruway-acct .acct-form .btn { margin-top: .5rem; }
@media (max-width: 860px) { .ra-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .ra-head { flex-wrap: wrap; padding: 1.2rem; }
  .ra-avatar { width: 52px; height: 52px; font-size: 1.6rem; }
  .ra-out { width: 100%; }
  .ra-out .btn { width: 100%; justify-content: center; }
}
/* ---------- Mi cuenta con barra lateral (esquema Olibella) ---------- */
.cu-layout { display: grid; grid-template-columns: 250px 1fr; gap: 1.6rem; align-items: start; }
.cu-side { position: sticky; top: 6rem; background: #1a1a1a; color: #efe8de; border-radius: 6px; padding: 1.3rem 1rem; display: flex; flex-direction: column; gap: .3rem; }
.cu-avatar { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; padding-bottom: 1rem; margin-bottom: .6rem; border-bottom: 1px solid rgba(239,232,222,.14); }
.cu-iso { width: 64px; height: 80px; background: #e7ae23; -webkit-mask: url("assets/img/ruway-isotipo.png") center / contain no-repeat; mask: url("assets/img/ruway-isotipo.png") center / contain no-repeat; }
.cu-avatar b { font-family: var(--ff-display); font-weight: 400; font-size: 1.6rem; margin-top: .3rem; }
.cu-avatar small { color: rgba(239,232,222,.55); font-size: .75rem; word-break: break-all; }
.cu-nav { display: flex; flex-direction: column; gap: .2rem; }
.cu-nav a { display: flex; align-items: center; gap: .6rem; padding: .65rem .8rem; border-radius: 4px; color: rgba(239,232,222,.82); text-decoration: none; font-size: .92rem; }
.cu-nav a svg { width: 17px; height: 17px; flex: none; }
.cu-nav a:hover { background: rgba(239,232,222,.08); color: #efe8de; }
.cu-nav a.on { background: #771a15; color: #efe8de; }
.cu-n { margin-left: auto; font-family: var(--ff-mono); font-size: .68rem; color: #e7ae23; }
.cu-salir { margin-top: .8rem; width: 100%; background: none; border: 1px solid rgba(239,232,222,.3); color: #efe8de; border-radius: 4px; padding: .6rem; cursor: pointer; font: inherit; font-size: .88rem; }
.cu-salir:hover { border-color: #e7ae23; color: #e7ae23; }
.cu-baja { margin-top: .5rem; text-align: center; font-size: .72rem; color: rgba(239,232,222,.45); text-decoration: underline; }
.cu-baja:hover { color: #efe8de; }
.cu-main h1 { font-size: clamp(2.1rem, 4.6vw, 3rem); margin: .4rem 0 .6rem; }
.cu-lead { color: #6e655b; font-weight: 300; max-width: 60ch; margin-bottom: 1.2rem; }
.cu-two { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cu-steps { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.cu-steps span { font-size: .74rem; padding: .45rem .85rem; border-radius: 999px; background: #e2d8cc; color: #6e655b; }
.cu-steps span.on { background: #771a15; color: #efe8de; }
.ruway-acct textarea { width: 100%; box-sizing: border-box; font-family: var(--ff-body); font-size: 15px; padding: .6em .75em; border: 1.5px solid #e2d8cc; border-radius: 4px; background: #fff; resize: vertical; text-transform: none; letter-spacing: 0; }
.ruway-acct input:disabled { background: #f3eee6; color: #8a7f72; }
@media (max-width: 860px) {
  .cu-layout { grid-template-columns: 1fr; }
  .cu-side { position: static; }
  .cu-avatar { flex-direction: row; text-align: left; gap: .8rem; }
  .cu-iso { width: 40px; height: 50px; }
  .cu-avatar b { margin-top: 0; }
  .cu-nav { flex-direction: row; overflow-x: auto; }
  .cu-nav a { white-space: nowrap; }
  .cu-two { grid-template-columns: 1fr; }
}
