/* Service as a Product · estilos compartidos (cliente y back office)
   Estilo pedido por Félix el 28 oct 2026 (referencia "FiscalFlow"):
   casi negro para lo principal, tarjetas blancas con sombra suave y acentos de color. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --navy: #0f172a;                 /* casi negro: títulos, menú activo, panel oscuro */
  --navy-2: #1e293b;
  --blue: #2563eb; --blue-light: #eff6ff;
  --purple: #a855f7; --purple-light: #faf5ff;
  --green: #16a34a; --green-light: #f0fdf4;
  --red: #dc2626; --red-light: #fef2f2;
  --amber: #d97706; --amber-light: #fffbeb;
  --bg: #f8fafc; --card: #fff; --border: #edf0f4;
  --text: #0f172a; --muted: #64748b; --light: #94a3b8;
  --radius: 16px;
  --sombra: 0 1px 2px rgba(15,23,42,.04), 0 4px 14px rgba(15,23,42,.05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: 'Inter', system-ui, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: var(--blue); }

/* ─── Estructura ─── */
.app { display: flex; min-height: 100vh; }
.side { width: 250px; background: #fff; border-right: 1px solid var(--border); padding: 0 12px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; }
.marca { display: flex; align-items: center; gap: 10px; padding: 20px 8px; margin: 0 -12px 10px; padding-left: 20px; border-bottom: 1px solid var(--border); }
.marca-icono { width: 36px; height: 36px; border-radius: 10px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.marca-icono svg { width: 18px; height: 18px; }
.marca-nombre { font-weight: 800; font-size: 16px; letter-spacing: -.02em; line-height: 1.1; }
.marca-sub { font-size: 10px; font-weight: 600; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }
.nav-btn { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; text-align: left; padding: 11px 14px; border-radius: 10px; color: var(--muted); cursor: pointer; font-weight: 500; font-size: 15px; }
.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.activo { background: var(--navy); color: #fff; font-weight: 600; }
.nav-btn svg { width: 19px; height: 19px; flex: none; }
.side-pie { margin-top: auto; }
.usuario { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--blue-light); color: var(--blue); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; flex: none; }
.usuario-nombre { font-weight: 600; font-size: 13px; line-height: 1.2; }
.usuario-sub { font-size: 12px; color: var(--muted); }
.usuario .btn { margin-left: auto; }
.main { flex: 1; min-width: 0; padding: 32px 40px 90px; max-width: 1240px; }

.cabecera { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.eye { color: var(--blue); font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.titulo { color: var(--navy); font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 2px 0 4px; }
.sub { color: var(--muted); margin: 0; font-size: 15px; }
.selector-mes { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 6px 8px; box-shadow: var(--sombra); }
.selector-mes .fuerte { min-width: 120px; text-align: center; }
.selector-mes .btn { border: 0; box-shadow: none; }

/* ─── Piezas ─── */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--sombra); }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.grid-4 { display: grid; gap: 18px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-principal { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.pila { display: flex; flex-direction: column; gap: 18px; }
.fila { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.entre { justify-content: space-between; }
.muted { color: var(--muted); }
.peq { font-size: 12px; }
.fuerte { font-weight: 600; }
h3 { margin: 0 0 4px; font-size: 16px; color: var(--navy); font-weight: 700; }
.seccion { font-size: 20px; font-weight: 800; letter-spacing: -.02em; margin: 10px 0 0; color: var(--navy); }

/* Tarjetas de números (KPI) */
.kpi { display: flex; flex-direction: column; gap: 6px; }
.kpi-top { display: flex; justify-content: space-between; align-items: flex-start; color: var(--muted); font-weight: 500; }
.kpi-icono { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.kpi-icono svg { width: 17px; height: 17px; }
.kpi-valor { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-pie { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.c-blue { color: var(--blue); } .bg-blue { background: var(--blue-light); color: var(--blue); }
.c-purple { color: var(--purple); } .bg-purple { background: var(--purple-light); color: var(--purple); }
.c-green { color: var(--green); } .bg-green { background: var(--green-light); color: var(--green); }
.c-amber { color: var(--amber); } .bg-amber { background: var(--amber-light); color: var(--amber); }

/* Panel oscuro */
.panel-oscuro { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 26px; display: flex; flex-direction: column; box-shadow: var(--sombra); }
.panel-oscuro h3 { color: #fff; font-size: 22px; letter-spacing: -.02em; }
.panel-oscuro .panel-sub { color: #94a3b8; margin: 0 0 18px; }
.panel-fila { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 10px; }
.panel-fila:hover { background: var(--navy-2); }
.panel-fila .nombre { font-weight: 600; }
.panel-fila .estado { font-size: 12px; color: #94a3b8; }
.panel-fila .monto { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; }
.panel-pie { margin-top: auto; padding-top: 16px; border-top: 1px solid #1e293b; display: flex; justify-content: space-between; color: #94a3b8; }
.panel-pie .fuerte { color: #fff; }
.barra { height: 6px; background: #1e293b; border-radius: 99px; overflow: hidden; margin-top: 10px; }
.barra > div { height: 100%; background: #22c55e; border-radius: 99px; }

.btn { border: 1px solid var(--border); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; }
.btn:hover { border-color: var(--light); }
.btn.primario { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primario:hover { background: var(--navy-2); }
.btn.peq { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: default; }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.amber { background: var(--amber-light); color: var(--amber); }
.chip.red { background: var(--red-light); color: var(--red); }
.chip.blue { background: var(--blue-light); color: var(--blue); }
.chip.green { background: var(--green-light); color: var(--green); }
.chip.purple { background: var(--purple-light); color: var(--purple); }
.chip.muted { background: #f1f5f9; color: var(--muted); }

.ob-card { display: flex; flex-direction: column; gap: 8px; }
.ob-card .ob-nombre { font-size: 18px; font-weight: 800; color: var(--navy); letter-spacing: -.02em; }
/* Calendario fiscal: las 5 obligaciones en una sola línea */
.grid-5 { display: grid; gap: 12px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-5 .ob-card { padding: 14px; gap: 6px; min-width: 0; }
.grid-5 .ob-card > .fila.entre { flex-direction: column; align-items: flex-start; gap: 4px; }
.grid-5 .ob-card .ob-nombre { font-size: 15px; }
.grid-5 .chip { font-size: 11px; padding: 2px 8px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.grid-5 .ob-card .peq, .grid-5 .ob-card .ob-fecha { font-size: 11px; }
.grid-5 .btn.peq { font-size: 11px; padding: 5px 8px; }
.grid-5 .ob-card > .fila { flex-wrap: wrap; gap: 6px; }
.ob-card .ob-fecha { font-size: 12px; color: var(--muted); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { border: 1px solid var(--border); background: #fff; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--muted); }
.tab.activo { background: var(--navy); border-color: var(--navy); color: #fff; }
.tab .n { opacity: .7; margin-left: 4px; }

.zona { border: 2px dashed #dbe1e8; border-radius: var(--radius); padding: 28px; text-align: center; background: #fff; cursor: pointer; transition: .15s; }
.zona:hover, .zona.encima { border-color: var(--blue); background: var(--blue-light); }
.zona .grande { font-weight: 700; color: var(--navy); font-size: 15px; }

table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--light); font-weight: 600; padding: 12px 10px; border-bottom: 1px solid var(--border); background: #fbfcfd; }
td { padding: 14px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; }
.tabla-wrap { overflow-x: auto; }
.card.sin-relleno { padding: 0; overflow: hidden; }
.card-cab { padding: 22px 22px 14px; }
.vacio { padding: 26px; text-align: center; color: var(--muted); }

label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=password], select, textarea {
  width: 100%; border: 1px solid #e2e8f0; border-radius: 10px; padding: 9px 11px; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--blue-light); border-color: var(--blue); }
.campos { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

.aviso { background: var(--amber-light); color: #92400e; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.demo-banda { background: var(--navy); color: #cbd5e1; font-size: 12px; text-align: center; padding: 6px; }

.modal-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal { background: #fff; border-radius: var(--radius); padding: 24px; width: 100%; max-width: 640px; max-height: 90vh; overflow: auto; }

.login { max-width: 420px; margin: 8vh auto; padding: 0 16px; }
.login .card { padding: 28px; }
.oculto { display: none !important; }
.solo-cel { display: none; }

/* Plan de pasos (Documentos) */
.pasos { display: flex; flex-direction: column; gap: 10px; }
.paso { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--sombra); overflow: hidden; }
.paso.abierto { border-color: #cbd5e1; }
.paso-cab { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: none; padding: 14px 16px; cursor: pointer; text-align: left; }
.paso-num { width: 30px; height: 30px; border-radius: 50%; background: #f1f5f9; color: var(--muted); font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.paso.abierto .paso-num { background: var(--navy); color: #fff; }
.paso.hecho .paso-num { background: var(--green-light); color: var(--green); }
.paso-titulo { flex: 1; font-weight: 600; color: var(--navy); }
.paso.hecho .paso-titulo { color: var(--muted); }
.paso-flecha { color: var(--light); transition: transform .15s; }
.paso.abierto .paso-flecha { transform: rotate(180deg); }
.paso-cuerpo { padding: 0 16px 16px 58px; }
.opcion { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; color: var(--text); font-size: 14px; font-weight: 400; margin: 0; }
.opcion:hover { border-color: #cbd5e1; }
.opcion input { margin-top: 3px; }
.barra.claro { background: #f1f5f9; }

/* Documentos: plan a la izquierda, espacio para subir a la derecha */
.docs-layout { display: grid; gap: 18px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; }
.docs-lateral { position: sticky; top: 20px; }
.grande-zona { padding: 34px 18px; }
.zona-icono { width: 46px; height: 46px; border-radius: 50%; background: var(--blue-light); color: var(--blue); display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.zona-icono svg { width: 20px; height: 20px; }
.pista { background: var(--blue-light); color: #1e40af; border-radius: 10px; padding: 9px 12px; font-size: 13px; }
.solo-arriba { display: none; }

/* Inicio: "¿Qué quieres hacer hoy?" */
.inicio { max-width: 720px; margin: 9vh auto 0; display: flex; flex-direction: column; gap: 18px; }
.inicio.con-charla { margin-top: 2vh; }
.inicio-cab { text-align: center; }
.inicio-saludo { color: var(--muted); font-size: 16px; font-weight: 500; }
.inicio-pregunta { margin: 6px 0 0; font-size: 34px; font-weight: 800; letter-spacing: -.03em; color: var(--navy); }
.con-charla .inicio-pregunta { font-size: 22px; }
.caja { background: #fff; border: 1px solid #dfe3ea; border-radius: 20px; box-shadow: var(--sombra); transition: border-color .15s, box-shadow .15s; }
.caja:focus-within { border-color: #cbd5e1; box-shadow: 0 4px 20px rgba(15,23,42,.08); }
.caja.encima { border-color: var(--blue); background: var(--blue-light); }
.caja textarea { width: 100%; border: 0; outline: 0; resize: none; background: transparent; padding: 16px 18px 6px; font-size: 16px; min-height: 56px; overflow-y: hidden; }
.caja-pie { display: flex; align-items: center; gap: 8px; padding: 6px 10px 10px; }
.caja-ayuda { color: var(--light); font-size: 12px; }
.caja-btn { width: 36px; height: 36px; border-radius: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.caja-btn:hover { background: var(--bg); color: var(--text); }
.caja-btn svg { width: 18px; height: 18px; }
.caja-btn.enviar { background: var(--navy); color: #fff; }
.caja-btn.enviar:hover { background: var(--navy-2); color: #fff; }
.caja-pie > .caja-btn:first-child { margin-right: auto; }
.sugerencias { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.sugerencia { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 14px; cursor: pointer; color: var(--text); font-weight: 500; }
.guia summary { cursor: pointer; font-weight: 700; color: var(--navy); }
.guia p { margin: 10px 0 0; line-height: 1.5; }
.guia-quien { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.guia-quien p { margin-top: 6px; font-size: 14px; }
@media (max-width: 760px) { .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .guia-quien { grid-template-columns: 1fr; } }
.porque { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
.destinos { display: flex; flex-wrap: wrap; gap: 8px; }
.destino { border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 9px 14px; cursor: pointer; color: var(--text); font-weight: 500; text-align: left; }
.destino:hover { border-color: #cbd5e1; }
.destino.activo { background: var(--navy, #0f172a); border-color: var(--navy, #0f172a); color: #fff; }
.sugerencia:hover { border-color: #cbd5e1; background: var(--bg); }
.inicio-aviso { display: flex; align-items: center; gap: 8px; justify-content: center; align-self: center; border: 0; background: var(--amber-light); color: #92400e; border-radius: 999px; padding: 8px 14px; font-size: 13px; cursor: pointer; text-align: left; }
.inicio-aviso.ok { background: var(--green-light); color: #166534; cursor: default; }
.inicio-aviso svg { width: 15px; height: 15px; flex: none; }
.charla { display: flex; flex-direction: column; gap: 10px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.msj { max-width: 85%; padding: 10px 14px; border-radius: 16px; line-height: 1.5; }
.msj-yo { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msj-app { align-self: flex-start; background: #fff; border: 1px solid var(--border); box-shadow: var(--sombra); border-bottom-left-radius: 4px; }
.msj ul { margin: 6px 0; padding-left: 18px; }

/* ─── Pantallas medianas ─── */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-principal { grid-template-columns: 1fr; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-lateral { position: static; order: -1; }
  .solo-escritorio { display: none; }
  .solo-arriba { display: inline; }
}

/* ─── Celular: menú abajo ─── */
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .side { position: fixed; bottom: 0; top: auto; left: 0; right: 0; width: 100%; height: auto; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--border); z-index: 40; justify-content: space-around; }
  .marca, .side-pie { display: none; }
  .nav-btn { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 4px; text-align: center; }
  .main { padding: 20px 16px 90px; }
  .titulo { font-size: 24px; }
  .kpi-valor { font-size: 19px; letter-spacing: -.02em; }
  .kpi-icono { width: 30px; height: 30px; }
  .kpi-pie { font-size: 10px; }
  .ocultar-cel { display: none; }
  .paso-cuerpo { padding: 0 14px 14px; }
  .inicio { margin-top: 3vh; }
  .inicio-pregunta { font-size: 26px; }
  .nav-btn { padding: 6px 2px; }
  .paso-cab .chip { display: none; }
  .card { padding: 16px; }
  .grid-4 { gap: 12px; }
  .solo-cel { display: inline-block; }
}

/* ─── Tickets ─── */
.ticket { border-top: 1px solid var(--border); padding-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.ticket:first-of-type { border-top: 0; padding-top: 0; }
.ticket-resp { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-top: 4px; }

/* ─── Chat abajo a la derecha ─── */
.chat { position: fixed; right: 20px; bottom: 20px; z-index: 40; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.chat-burbuja { width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; cursor: pointer; box-shadow: 0 8px 24px rgba(15,23,42,.25); display: flex; align-items: center; justify-content: center; }
.chat-burbuja svg { width: 24px; height: 24px; }
.chat-ventana { width: 360px; max-width: calc(100vw - 32px); height: 480px; max-height: calc(100vh - 110px); background: #fff; border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 16px 40px rgba(15,23,42,.18); display: flex; flex-direction: column; overflow: hidden; }
.chat-cab { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.chat-msjs { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.chat-msjs .msj { font-size: 14px; }
.chat-pie { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); }
.chat-pie input { flex: 1; }
@media (max-width: 760px) { .chat { right: 12px; bottom: 76px; } }

/* ─── Configuración: submenú a la derecha ─── */
.nav-fly { position: relative; }
.nav-flecha { margin-left: auto; opacity: .5; }
.fly { display: none; position: absolute; left: calc(100% + 4px); top: -8px; width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.14); padding: 8px; z-index: 50; }
.fly.abierto { display: block; }
.fly::before { content: ''; position: absolute; left: -10px; top: 0; bottom: 0; width: 10px; }
.fly-titulo { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 10px; }
.fly button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 10px; border-radius: 8px; cursor: pointer; color: var(--text); font-size: 14px; }
.fly button:hover { background: var(--bg); }
.fly button { display: flex; align-items: center; }
.fly-grupo { position: relative; }
.fly-sub { left: calc(100% + 8px); top: -8px; width: 250px; }
.fly-grupo:hover > .fly-sub { display: block; }
.tabs.sub-tabs .tab { font-size: 13px; padding: 5px 12px; }
textarea.memoria { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; }
@media (max-width: 760px) {
  .nav-fly .fly, .nav-flecha { display: none !important; }
  .nav-texto { font-size: 0; }
  .nav-texto::after { content: 'Config.'; font-size: 11px; }
}
.card-cab select { width: auto; min-width: 160px; }

/* ─── ¿Cómo quieres entrar? ─── */
.opcion-entrada { display: flex; flex-direction: column; gap: 2px; text-align: left; width: 100%; border: 1px solid var(--border); background: #fff; border-radius: 12px; padding: 12px 14px; cursor: pointer; color: var(--text); }
.opcion-entrada:hover { border-color: var(--navy); }
.demo-banda a { color: inherit; text-decoration: underline; }

/* ─── Contador de tickets abiertos en el menú ─── */
.nav-cuenta { margin-left: auto; background: var(--amber-light); color: var(--amber); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 1px 8px; }
.nav-btn.activo .nav-cuenta { background: #fff; }
@media (max-width: 760px) {
  .nav-btn { font-size: 10px; }
  .nav-cuenta { position: absolute; margin: 0; transform: translate(14px, -6px); padding: 0 5px; font-size: 10px; }
  .nav-btn { position: relative; }
}

/* ─── Carpetas de documentos ─── */
.carpetas { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.carpeta { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 14px; padding: 14px; cursor: pointer; color: var(--text); box-shadow: var(--sombra); }
.carpeta:hover { border-color: var(--navy); }
.carpeta-icono { width: 34px; height: 34px; border-radius: 10px; background: var(--amber-light); color: var(--amber); display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.carpeta-icono svg { width: 19px; height: 19px; }
.migas { font-size: 14px; color: var(--muted); }
.migas a { color: var(--text); }
@media (max-width: 760px) { .carpetas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ─── Back office: calendario por impuesto ─── */
.tablero { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.columna { background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.tarjeta-cliente { display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--border); background: #fff; border-radius: 10px; padding: 10px; cursor: pointer; color: var(--text); }
.tarjeta-cliente:hover { border-color: var(--navy); }
pre.memoria-ver { white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; line-height: 1.6; margin: 0; background: var(--bg); padding: 14px; border-radius: 10px; }

.btn.bloque { display: flex; width: 100%; justify-content: center; text-decoration: none; box-sizing: border-box; }
#contenido .pila > .fila.entre { flex-wrap: wrap; gap: 8px; }

/* ─── Back office: tareas de onboarding ─── */
.tarea { display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: start; padding: 14px 0; border-top: 1px solid var(--border); }
.tarea:first-child { border-top: 0; }
.tarea.hecha .tarea-texto > .fuerte { text-decoration: line-through; color: var(--muted); }
.tarea-check input { width: 18px; height: 18px; margin-top: 2px; cursor: pointer; }
.tarea-nota { margin-top: 6px; font-size: 13px; padding: 6px 10px; }
.tarea-accion { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }

/* ─── Pill del calendario que lleva a las tareas, y la pestaña Hoy ─── */
.chip-btn { border: 0; cursor: pointer; font-family: inherit; }
.chip-btn:hover { filter: brightness(.95); text-decoration: underline; }
.hoy-tarea { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--border); background: none; padding: 12px 0; cursor: pointer; color: var(--text); font-size: 15px; }
.hoy-tarea:first-of-type { border-top: 0; }
.hoy-tarea:hover .hoy-que { text-decoration: underline; }
.hoy-que { flex: 1; }
@media (max-width: 760px) { .hoy-tarea { flex-wrap: wrap; } .hoy-que { flex-basis: 100%; order: -1; } }

/* ─── Autorizaciones: el documento a la derecha ─── */
.vista-doc img, .vista-doc iframe { width: 100%; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.vista-doc iframe { height: 520px; }
.vista-doc pre { white-space: pre-wrap; background: var(--bg); border-radius: 10px; padding: 16px; font-size: 13px; margin: 0; min-height: 200px; }

.estado-aut { padding: 14px 0; border-top: 1px solid var(--border); }
.estado-aut:first-child { border-top: 0; padding-top: 0; }
.estado-aut:last-child { padding-bottom: 0; }

/* ─── Ticket: fecha y lo esperado bien grandes, progreso y conversación ─── */
.tk-resaltes { display: grid; grid-template-columns: 2fr minmax(220px, 1fr); gap: 14px; }
.tk-situacion { border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border); background: #fff; }
.tk-situacion .tk-texto { font-size: 21px; font-weight: 700; line-height: 1.35; margin-top: 6px; color: var(--navy); }
.tk-plazo { display: flex; flex-direction: column; justify-content: center; }
.tk-fuentes { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.tk-fuente { background: #fff; border: 1px solid #e9d5ff; border-radius: 10px; padding: 8px 12px; }
.tk-fuente summary { cursor: pointer; font-weight: 600; font-size: 14px; color: #6b21a8; }
.tk-fuente blockquote { margin: 8px 0; padding: 8px 12px; border-left: 3px solid #c084fc; background: #faf5ff; font-size: 14px; line-height: 1.5; }
.tk-plazo, .tk-esperado { border-radius: 16px; padding: 18px 20px; border: 1px solid var(--border); background: #fff; }
.tk-et { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.tk-grande { font-size: 30px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.tk-chico { font-size: 14px; }
.tk-plazo.bien { background: var(--green-light, #f0fdf4); color: var(--green); border-color: transparent; }
.tk-plazo.cerca { background: var(--amber-light); color: var(--amber); border-color: transparent; }
.tk-plazo.mal { background: var(--red-light); color: var(--red); border-color: transparent; }
.tk-plazo.ok { background: var(--green-light, #f0fdf4); color: var(--green); border-color: transparent; }
.tk-esperado { background: var(--navy); color: #fff; border-color: transparent; }
.tk-esperado .tk-texto { font-size: 19px; font-weight: 600; line-height: 1.4; margin-top: 6px; }
.tk-esperado .muted { color: rgba(255,255,255,.7); }
.tk-cuerpo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr); gap: 14px; align-items: start; }
.tk-etapas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 6px; }
.tk-etapa { text-align: center; opacity: .45; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.tk-etapa.hecha, .tk-etapa.actual { opacity: 1; }
.tk-punto { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; background: #fff; }
.tk-etapa.hecha .tk-punto { background: var(--green); border-color: var(--green); color: #fff; }
.tk-etapa.actual .tk-punto { background: var(--navy); border-color: var(--navy); color: #fff; }
.tk-tarea { display: flex; gap: 8px; align-items: center; font-size: 14px; margin: 0; font-weight: 500; color: var(--text); }
.tk-tarea input { width: auto; }
.tk-tarea.hecha span { text-decoration: line-through; color: var(--muted); }
/* Colores por quién escribe: cliente verde, Account One blanco grisáceo, agente lila. Lo mío va a la derecha. */
.tk-chat { display: flex; flex-direction: column; gap: 8px; }
.tk-msj { border-radius: 10px; border-top-left-radius: 2px; padding: 8px 12px; max-width: 85%; line-height: 1.45; align-self: flex-start; color: #111b21; border: 1px solid var(--border); }
.tk-msj.mio { align-self: flex-end; border-top-left-radius: 10px; border-top-right-radius: 2px; }
.tk-msj.cliente { background: #d9fdd3; border-color: #c4ecbd; }
.tk-msj.firma { background: #f4f5f7; border-color: #e5e7eb; }
.tk-msj .muted { color: #667781; }
.tk-msj.agente { background: #f5efff; border-color: #e4d4fb; }
.tk-msj-cab { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.tk-fila { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; border-top: 1px solid var(--border); background: none; padding: 12px 0; cursor: pointer; color: var(--text); font-size: 15px; }
.tk-fila > div { flex: 1; }
.tk-fila:hover .fuerte { text-decoration: underline; }
.tk-plazo-mini { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.tk-plazo-mini.bien, .tk-plazo-mini.ok { background: var(--green-light, #f0fdf4); color: var(--green); }
.tk-plazo-mini.cerca { background: var(--amber-light); color: var(--amber); }
.tk-plazo-mini.mal { background: var(--red-light); color: var(--red); }
@media (max-width: 900px) { .tk-resaltes, .tk-cuerpo { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .tk-fila { flex-wrap: wrap; } .tk-fila > div { flex-basis: 100%; } }

.tarjeta-abre { cursor: pointer; }
.tarjeta-abre:hover { border-color: var(--navy); }

/* ─── Conectar tu Drive ─── */
.drive-logo { width: 34px; height: 34px; border-radius: 10px; color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.drive-arbol { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.drive-sub { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-left: 22px; flex-wrap: wrap; }
