/* Cotizo — miniaturas de plantillas, logo y página Mi cuenta */

/* Miniaturas reales de plantillas */
.tpl-thumb { display: block; aspect-ratio: 210 / 297; padding: 0; background: #fff; overflow: hidden; }
.tpl-thumb .tpl-mini { display: block; width: 460px; pointer-events: none; }
.tpl-thumb .tpl-mini .sheet { border: 0; border-radius: 0; box-shadow: none; }
.tpl.is-locked .tpl-thumb { opacity: .85; filter: saturate(.7); }

/* La vista previa grande no ocupa media pantalla */
.editor { grid-template-columns: minmax(0, 1fr) minmax(0, 520px); }
@media (max-width: 1180px) { .editor { grid-template-columns: 1fr; } }

/* Usuario en la barra lateral: abre Mi cuenta */
.side-user { text-decoration: none; color: inherit; transition: background .2s; cursor: pointer; }
.side-user:hover, .side-user.active { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.side-user .chev { margin-left: auto; color: var(--muted); font-size: 18px; line-height: 1; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* Mi cuenta */
.account-hero { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 8px; }
.account-hero .avatar { width: 64px; height: 64px; font-size: 24px; }
.account-hero h1 { font-size: 30px; }
.account-hero p { color: var(--muted); }
.row-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--card); }
.row-card + .row-card { margin-top: 8px; }
.row-card b { display: block; font-weight: 500; }
.row-card .hint { display: block; }
.provider { display: inline-flex; align-items: center; gap: 10px; }
.provider svg { width: 20px; height: 20px; }
.session-row .now { margin-left: 6px; }
.invoice-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.invoice-table th, .invoice-table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; }
.invoice-table th { font-weight: 500; color: var(--muted); font-size: 12.5px; }
.invoice-table td.r, .invoice-table th.r { text-align: right; }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 40%, transparent); background: color-mix(in srgb, var(--danger) 5%, transparent); }
.btn-danger { --bg: var(--danger); --fg: #fff; --bd: var(--danger); }
.btn-danger:hover { --bg: color-mix(in srgb, var(--danger) 85%, #000); --bd: var(--bg); }
.mobile-top .avatar-link { display: inline-flex; }
.mobile-top .avatar { width: 32px; height: 32px; font-size: 13px; }

/* Pago con el diseño de Cotizo */
.modal.modal-checkout { max-width: 920px; padding: 0; overflow: hidden; }
.checkout { display: grid; grid-template-columns: 300px minmax(0, 1fr); min-height: 520px; }
.co-summary { display: grid; align-content: start; gap: 14px; padding: 28px 24px; background: var(--paper-2); border-right: 1px solid var(--line); }
.co-summary .plan-chip { justify-self: start; }
.co-price { display: flex; align-items: baseline; gap: 6px; }
.co-price b { font-size: 34px; font-weight: 650; letter-spacing: -0.04em; }
.co-price span { color: var(--muted); }
.co-note { font-size: 12.5px; color: var(--muted); margin-top: auto; }
.co-form { padding: 22px 24px; display: grid; grid-template-rows: auto 1fr; }
.co-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.co-head h2 { margin: 0; font-size: 22px; }
.co-head .icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.checkout-container { position: relative; min-height: 450px; }
.co-loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--muted); font-size: 14px; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  .checkout { grid-template-columns: 1fr; }
  .co-summary { border-right: 0; border-bottom: 1px solid var(--line); padding: 20px; }
  .co-summary .up-list, .co-note { display: none; }
}

/* Ventana con todos los planes */
.modal.modal-plans { max-width: 1180px; }
.pp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pp-head h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.04em; }
.pp-tools { display: flex; align-items: center; gap: 10px; }
.pp-tools .icon-btn:hover { background: var(--paper-2); color: var(--ink); }
.pp-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.pp-card {
  position: relative; display: flex; flex-direction: column; gap: 8px;
  padding: 20px 16px 16px; border: 1px solid var(--line-strong); border-radius: var(--r-lg);
  background: var(--card); animation: fade-up .45s var(--ease) both;
  transition: transform .25s var(--ease), box-shadow .25s, border-color .25s;
}
.pp-card:nth-child(2) { animation-delay: .04s; } .pp-card:nth-child(3) { animation-delay: .08s; }
.pp-card:nth-child(4) { animation-delay: .12s; } .pp-card:nth-child(5) { animation-delay: .16s; }
.pp-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-paper); }
.pp-card.featured { border-color: #e8cd5a; box-shadow: 0 0 0 1px #e8cd5a; }
.pp-card.current { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, var(--card)); }
.pp-card.hl:not(.current) { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.pp-badge { position: absolute; top: -11px; left: 14px; padding: 3px 10px; border-radius: 999px; background: #e8cd5a; color: #161714; font-size: 11.5px; font-weight: 600; }
.pp-badge.cur { background: var(--accent); color: var(--accent-ink); }
.pp-card h3 { font-size: 19px; letter-spacing: -0.03em; }
.pp-tag { font-size: 13px; color: var(--ink-2); line-height: 1.35; min-height: 2.7em; }
.pp-price { display: flex; align-items: baseline; gap: 5px; margin-top: 4px; }
.pp-price b { font-size: 26px; font-weight: 650; letter-spacing: -0.04em; white-space: nowrap; }
.pp-price span { color: var(--muted); font-size: 13px; }
.pp-line { min-height: 2.6em; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.pp-card ul { list-style: none; margin: 8px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 7px; font-size: 13px; color: var(--ink-2); }
.pp-card li { position: relative; padding-left: 20px; line-height: 1.35; }
.pp-card li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.pp-card li.no { color: var(--muted); }
.pp-card li.no::before { content: "–"; color: var(--muted); }
.pp-card .btn[disabled] { opacity: 1; color: var(--accent); border-color: var(--accent); }
@media (max-width: 1100px) { .pp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) { .pp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .pp-grid { grid-template-columns: 1fr; } .pp-tag, .pp-line { min-height: 0; } }
