/* The Novis — área de clientes (pagos) */
.acc-page { background: var(--mist); }
.acc-page .footer { background: var(--mist); }
.acc-user { display: flex; align-items: center; gap: 14px; font-size: 15px; color: var(--body); }
.acc-user span { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.acc { min-height: calc(100vh - 120px); padding: 120px var(--gutter) 80px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.acc-card { width: 100%; max-width: 440px; background: #fff; border-radius: 22px; padding: 36px 32px; box-shadow: 0 0 0 1px var(--line), 0 24px 48px -32px rgba(11,37,69,.3); }
.acc-card--wide { max-width: 600px; }
.acc-card h1, .acc-wide h1 { font-size: 30px; color: var(--ink); }
.acc-card h2 { font-size: 21px; color: var(--ink); }
.acc-lead { margin-top: 10px; font-size: 16px; color: var(--body); }
.acc-alt, .acc-links { margin-top: 20px; font-size: 15px; text-align: center; color: var(--muted); }
.acc-links { margin-top: 14px; }
.acc-alt a, .acc-links a, .acc-desc a, .acc-back a, .f-check a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.acc-back { margin-bottom: 14px; font-size: 15px; }
.acc-back a { text-decoration: none; }

.acc-form { display: grid; gap: 16px; margin-top: 24px; }
.f { display: grid; gap: 6px; }
.f label { font-size: 15px; font-weight: 500; color: var(--text); }
.f-hint { color: var(--muted); font-weight: 400; }
.f input, .acc-code input {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #fff;
  border: 1px solid #cfd5df; border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.f input:focus, .acc-code input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,99,237,.15); }
.f input[aria-invalid="true"], .acc-code input[aria-invalid="true"] { border-color: #d93636; }
.f-err { color: #c42b2b; font-size: 14px; }
.f-check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--body); cursor: pointer; }
.f-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--blue); flex: none; }
.acc-form .btn { margin-top: 4px; width: 100%; }

.acc-google { width: 100%; margin-top: 24px; }
.acc-or { display: flex; align-items: center; gap: 12px; margin-top: 20px; font-size: 14px; color: var(--muted); }
.acc-or::before, .acc-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.acc-or + .acc-form { margin-top: 12px; }

.acc-flash { width: 100%; max-width: 600px; padding: 12px 16px; border-radius: 12px; font-size: 15px; }
.acc-flash--ok { background: #e6f4ea; color: #1e6b34; }
.acc-flash--err { background: #fdecec; color: #a32020; }
.acc-flash--info { background: #e8f0fe; color: #1a4fb8; }
.acc-card .acc-flash { margin-bottom: 18px; }

.acc-icon { width: 56px; height: 56px; border-radius: 50%; margin-bottom: 18px; background-repeat: no-repeat; background-position: center; background-size: 28px; }
.acc-icon--mail { background-color: #e8f0fe; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 6h16v12H4z M4 7l8 6 8-6' fill='none' stroke='%231d63ed' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acc-icon--ok { background-color: #e6f4ea; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%231e8a3e' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acc-icon--wait { background-color: #fef3e2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='none' stroke='%23b45309' stroke-width='2'/%3E%3Cpath d='M12 8v4l3 2' fill='none' stroke='%23b45309' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Inicio del cliente */
.acc-wide { width: 100%; max-width: 760px; display: grid; gap: 20px; }
.acc-card--code { max-width: none; }
.acc-code { display: flex; gap: 10px; margin-top: 18px; }
.acc-code input { flex: 1; font-size: 20px; letter-spacing: .08em; text-transform: uppercase; font-weight: 550; }
.acc-code input::placeholder { color: #a6aebb; font-weight: 400; }
.acc-code .btn { flex: none; }
.acc-card--code .f-err { margin-top: 10px; }

.acc-list { background: #fff; border-radius: 22px; padding: 28px 32px; box-shadow: 0 0 0 1px var(--line); }
.acc-list h2 { font-size: 21px; color: var(--ink); margin-bottom: 8px; }
.acc-list ul { list-style: none; }
.acc-list li + li { border-top: 1px solid var(--line); }
.acc-list a { display: flex; align-items: center; gap: 16px; padding: 16px 0; color: var(--text); }
.acc-list__main { flex: 1; min-width: 0; display: grid; }
.acc-list__main strong { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-list__main small { color: var(--muted); font-size: 14px; }
.acc-list__amount { font-weight: 600; white-space: nowrap; }
.acc-empty { color: var(--muted); font-size: 16px; padding: 8px 0; }
.pill { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 980px; background: #f0f2f5; color: var(--muted); white-space: nowrap; }
.pill--pendiente { background: #fef3e2; color: #92400e; }
.pill--pagado { background: #e6f4ea; color: #1e6b34; }

/* Resumen */
.acc-desc { margin-top: 12px; color: var(--body); white-space: normal; }
.acc-sum { margin: 24px 0; border-top: 1px solid var(--line); }
.acc-sum > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.acc-sum dt { color: var(--muted); }
.acc-sum dd { font-weight: 500; color: var(--text); text-align: right; word-break: break-word; }
.acc-sum__total dt { color: var(--text); font-weight: 600; }
.acc-sum__total dd { font-size: 24px; font-weight: 650; color: var(--ink); letter-spacing: -0.02em; }
.acc-pay { width: 100%; padding: 16px; font-size: 17px; }
.acc-secure { margin-top: 14px; font-size: 14px; color: var(--muted); text-align: center; }

.acc-danger { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.acc-danger summary { cursor: pointer; color: #b42323; font-weight: 500; }
.acc-danger p { margin-top: 10px; font-size: 15px; }
.btn--danger { background: #d93636; }
.btn--danger:hover { background: #b92b2b; }

@media (max-width: 560px) {
  .acc { padding-top: 96px; }
  .acc-card, .acc-list { padding: 28px 22px; border-radius: 18px; }
  .acc-code { flex-direction: column; }
  .acc-list a { flex-wrap: wrap; gap: 6px 12px; }
  .acc-list__main { flex-basis: 100%; }
  .acc-user span { display: none; }
}

/* Tus datos (RGPD) */
.datos-h { font-size: 18px; color: var(--ink); margin: 26px 0 8px; letter-spacing: -0.01em; }
.datos-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.datos-list li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.datos-list span { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.datos-nota { text-align: left; }
.datos-actions { margin-top: 26px; }
.datos-borrar { margin-top: 28px; padding-top: 6px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.datos-borrar .btn { justify-self: start; }

/* Suscripciones */
.pill--error { background: #fdecec; color: #a32020; }
.pill--cancelado { background: #f0f2f5; color: #5c6573; }
.acc-subtitle { margin-top: 12px; }
.acc-subinfo { display: grid; gap: 10px; margin: -8px 0 22px; padding: 16px 18px; border-radius: 14px; background: var(--mist); font-size: 15px; color: var(--body); }
.acc-subinfo strong { color: var(--text); }
.acc-subactions { display: flex; flex-wrap: wrap; gap: 10px; }
.acc-subactions form { flex: 1 1 220px; }
.acc-subactions .btn { width: 100%; }
.acc-card--wide > .acc-flash { margin: 0 0 18px; max-width: none; }

/* ===== Área de cliente ===== */
.acc-tabs { width: 100%; max-width: 760px; display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.acc-tabs::-webkit-scrollbar { display: none; }
.acc-tabs a { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 14px; border-radius: 10px; font-size: 15px; font-weight: 550; color: var(--muted); white-space: nowrap; transition: background .2s, color .2s; }
.acc-tabs a:hover { color: var(--ink); background: var(--mist); }
.acc-tabs a[aria-current="page"] { background: var(--ink); color: #fff; }
.acc-tabs__n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--coral); color: var(--ink); font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; }
.acc-h2 { font-size: 21px; color: var(--ink); margin: 8px 0 14px; }

.f select, .f textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: #fff; border: 1px solid #cfd5df; border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .2s, box-shadow .2s; }
.f textarea { resize: vertical; min-height: 96px; }
.f select:focus, .f textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(29,99,237,.15); }

/* Inicio */
.acc-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.acc-tile { display: grid; gap: 4px; padding: 20px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--text); transition: transform .3s var(--ease), box-shadow .3s; }
.acc-tile:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 18px 34px -24px rgba(11,37,69,.4); }
.acc-tile strong { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; color: var(--ink); }
.acc-tile span { font-size: 14px; color: var(--muted); }
.acc-tile--alerta { box-shadow: inset 0 0 0 1.5px var(--coral); background: #fff4f6; }
.acc-acciones { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acc-accion { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; align-items: center; padding: 18px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); color: var(--text); transition: transform .3s var(--ease), box-shadow .3s; }
.acc-accion:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--blue), 0 18px 34px -24px rgba(29,99,237,.45); }
.acc-accion strong { font-weight: 600; color: var(--ink); }
.acc-accion small { grid-column: 2; color: var(--muted); font-size: 14px; }
.acc-accion__ico { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; background: #e8f0fe center / 22px no-repeat; }
.acc-accion__ico--msg { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 5h16v11H9l-5 4z' fill='none' stroke='%231d63ed' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.acc-accion__ico--add { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 5v14M5 12h14' fill='none' stroke='%231d63ed' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E"); }

/* Catálogo */
.acc-catalogo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.acc-prod { display: flex; flex-direction: column; gap: 6px; padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line); transition: transform .3s var(--ease), box-shadow .3s; }
.acc-prod:hover { transform: translateY(-3px); box-shadow: 0 0 0 1px var(--line), 0 22px 40px -28px rgba(11,37,69,.45); }
.acc-prod h3 { font-size: 18px; color: var(--ink); }
.acc-prod__precio { margin-top: 6px; color: var(--muted); font-size: 15px; }
.acc-prod__precio strong { font-size: 28px; font-weight: 650; letter-spacing: -0.03em; color: var(--text); }
.acc-prod__iva { font-size: 14px; color: var(--muted); }
.acc-prod__desc { margin: 8px 0 14px; font-size: 15px; color: var(--body); flex: 1; }
.acc-prod .btn { width: 100%; }
.acc-prod__ya { padding: 12px; border-radius: 12px; background: #e6f4ea; color: #1e6b34; font-weight: 600; text-align: center; font-size: 15px; }
.acc-prod.is-tiene { background: #fbfdfb; }
.acc-prod--medida { background: var(--ink); box-shadow: none; }
.acc-prod--medida h3 { color: #fff; }
.acc-prod--medida .acc-prod__desc { color: #c9d4e5; }
.acc-prod--medida .btn--ghost { background: #fff; color: var(--ink); }

/* Mensajes */
.pill--nuevo { background: #e8f0fe; color: #1a4fb8; }
.pill--msg-nueva { background: #f0f2f5; color: #5c6573; }
.pill--msg-en_curso { background: #fef3e2; color: #92400e; }
.pill--msg-cerrada { background: #e6f4ea; color: #1e6b34; }
.pill--msg-descartada { background: #f0f2f5; color: #5c6573; }
.acc-list a .pill + .pill { margin-left: -8px; }
.hilo { list-style: none; margin: 22px 0; padding: 0; display: grid; gap: 12px; }
.hilo__msg { max-width: 88%; padding: 14px 16px; border-radius: 18px; font-size: 16px; line-height: 1.5; color: var(--text); white-space: normal; overflow-wrap: anywhere; }
.hilo__msg--cliente { justify-self: end; background: #e8f0fe; border-bottom-right-radius: 6px; }
.hilo__msg--novis { justify-self: start; background: var(--mist); border-bottom-left-radius: 6px; }
.hilo__meta { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }

@media (max-width: 640px) {
  .acc-tabs { border-radius: 12px; }
  .acc-tabs a { padding: 9px 12px; font-size: 14px; }
  .acc-tiles { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .acc-tile { padding: 14px 12px; border-radius: 14px; }
  .acc-tile strong { font-size: 20px; }
  .acc-tile span { font-size: 12.5px; }
  .acc-acciones, .acc-catalogo { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .acc-tile, .acc-accion, .acc-prod { transition: none; } }
@media (max-width: 640px) {
  .acc-tabs { gap: 2px; padding: 3px; }
  .acc-tabs a { flex: 1 1 0; min-width: 0; padding: 9px 2px; gap: 3px; font-size: 13px; }
  .acc-tabs__n { min-width: 16px; height: 16px; padding: 0 4px; font-size: 11px; }
}

/* Casillas opcionales al pagar (perfil de cliente y publicidad): nunca vienen marcadas */
.acc-opt { border: 1px solid var(--line, #e5e5ea); border-radius: 14px; padding: 14px 16px 6px; margin: 20px 0 16px; display: grid; gap: 12px; min-width: 0; }
.acc-opt legend { padding: 0 6px; font-size: 13px; color: var(--muted, #6e6e73); }
.acc-opt .acc-secure { margin: 0; }
.acc-sum + .acc-form, .acc-form + .acc-sum { margin-top: 16px; }
.acc-req { margin: 20px 0 0; }
.acc-req small, .acc-form .f-check small { color: var(--muted); }
