/* ---------- Tipografías del manual de estilo de VAOLA Social ---------- */
@font-face { font-family: "Nunito Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/nunito-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 600; font-style: normal; font-display: swap; src: url("/fonts/nunito-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url("/fonts/nunito-sans-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap; src: url("/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); }

:root {
  /* Paleta oficial (Manual de estilo VAOLA Social, nov. 2026) */
  --tramuntana: #2c7fa3;  /* principal: botones, campos de marca */
  --brisa: #9fcfe3;       /* fondos suaves */
  --oliva: #7e8f62;       /* confirmaciones y éxito */
  --arena: #d9c08a;       /* fondos cálidos */
  --cal: #f7f3ec;         /* fondo por defecto (nunca blanco puro) */
  --terracota: #d37a5e;   /* acento, con moderación */
  --profundo: #266d89;    /* logotipo, titulares, fondos oscuros */
  --tinta: #00001f;       /* texto */
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --sans: "Nunito Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --brand: var(--profundo);
  --brand-2: var(--tramuntana);
  --brand-soft: #e4f1f7;   /* Azul Brisa muy suave */
  --bg: var(--cal);
  --card: #fffdf9;         /* Cal claro */
  --text: var(--tinta);
  --muted: #5f6472;
  --line: #e6dfd2;
  --danger: #b4553a;       /* Terracota oscurecida para que los textos pequeños se lean */
  --ok: #5e6e45;           /* Oliva oscurecido para texto */
  --warn: #a5822e;         /* Arena oscurecida para texto */
  --radius: 8px;
  --shadow: none;
  --shadow-hover: 0 6px 20px rgba(38,109,137,.12);
  --sidebar: 232px;
  --st-pendiente: #8b8f99;
  --st-en_curso: var(--tramuntana);
  --st-revision: #b8953f;
  --st-terminada: var(--oliva);
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
h1 { font-size: 1.5rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.splash { display: grid; place-items: center; height: 100vh; }
.splash img { width: 180px; opacity: .9; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar { background: var(--brand); color: #fff; padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.sidebar .logo { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.sidebar .logo img { width: 38px; height: 38px; border-radius: 10px; background: #fff; }
.sidebar .logo b { font-size: 1.05rem; letter-spacing: .02em; }
.sidebar .logo span { display: block; font-size: .72rem; opacity: .7; text-transform: uppercase; letter-spacing: .14em; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: rgba(255,255,255,.85); text-decoration: none; font-weight: 500; position: relative; }
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav a.active { background: rgba(255,255,255,.16); color: #fff; }
.nav svg { width: 20px; height: 20px; flex: none; }
.nav .badge { margin-left: auto; }
.sidebar .me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; background: rgba(255,255,255,.08); cursor: pointer; border: 0; color: #fff; text-align: left; width: 100%; }
.sidebar .me small { display: block; opacity: .7; font-size: .75rem; }
main { padding: 28px 32px 60px; min-width: 0; }
.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .grow { flex: 1; }
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  main { padding: 18px 14px 96px; }
  .bottom-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 40; justify-content: space-around; }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: .68rem; color: var(--muted); text-decoration: none; padding: 4px 6px; position: relative; flex: 1; }
  .bottom-nav a.active { color: var(--brand); font-weight: 600; }
  .bottom-nav svg { width: 22px; height: 22px; }
  .bottom-nav .badge { position: absolute; top: 0; right: 18%; }
}

/* ---------- Componentes ---------- */
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid rgba(0,0,0,.03); }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 10px; cursor: pointer; font-weight: 500; text-decoration: none; color: var(--text); white-space: nowrap; }
.btn:hover { border-color: #cfc9be; background: #fbfaf8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-2); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.sm { padding: 5px 10px; font-size: .85rem; border-radius: 8px; }
.btn svg { width: 18px; height: 18px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; padding: 6px; border-radius: 8px; cursor: pointer; color: var(--muted); display: inline-grid; place-items: center; }
.icon-btn:hover { background: rgba(0,0,0,.05); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }
.badge { background: #d37a5e; color: #fff; border-radius: 999px; font-size: .7rem; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; display: inline-grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; font-weight: 700; font-size: .8rem; flex: none; text-transform: uppercase; }
.avatar.sm { width: 22px; height: 22px; font-size: .65rem; }
.empty { text-align: center; color: var(--muted); padding: 28px 10px; }
.stat b { display: block; font-size: 1.6rem; letter-spacing: -.02em; }
.stat span { color: var(--muted); font-size: .85rem; }
.tabs { display: inline-flex; background: #ebe7e0; border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; cursor: pointer; font-weight: 500; color: var(--muted); }
.tabs button.active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- Formularios ---------- */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; font-weight: 600; color: #2b2f3d; }
label.field.inline { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=month], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff; width: 100%; font-weight: 400; min-width: 0;
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(44,127,163,.35); outline-offset: 0; border-color: var(--brand); }
textarea { resize: vertical; min-height: 80px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .form-grid { grid-template-columns: 1fr; } }
.error-text { color: var(--danger); font-size: .9rem; }
select.compact { width: auto; padding: 6px 10px; }

/* ---------- Modal ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(0,0,31,.42); display: grid; place-items: center; z-index: 100; padding: 16px; animation: fade .12s; }
.modal { background: #fff; border-radius: 18px; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal header { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: #fff; z-index: 1; }
.modal header h2 { margin: 0; flex: 1; }
.modal .body { padding: 18px 20px; }
.modal footer { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line); position: sticky; bottom: 0; background: #fff; flex-wrap: wrap; }
.modal footer .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: #00001f; color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 360px; cursor: pointer; animation: fade .2s; }
.toast b { display: block; }
.toast.error { background: var(--danger); }
@media (max-width: 860px) { #toasts { bottom: 84px; left: 12px; right: 12px; } .toast { max-width: none; } }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #f7f3ec; }
.login .card { width: min(380px, 100%); padding: 32px 28px; }
.login img { width: 170px; display: block; margin: 0 auto 22px; }

/* ---------- Tablero ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(210px, 1fr)); gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 8px; }
.column { background: #ece8e1; border-radius: var(--radius); padding: 10px; min-height: 120px; }
.column.drop { outline: 2px dashed var(--brand); background: var(--brand-soft); }
.column > header { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: .9rem; }
.column > header .count { color: var(--muted); font-weight: 500; margin-left: auto; }
.task { background: #fff; border-radius: 12px; padding: 12px; margin-bottom: 9px; box-shadow: 0 1px 2px rgba(0,0,0,.06); cursor: pointer; border-left: 4px solid var(--c, var(--line)); }
.task:hover { box-shadow: 0 3px 12px rgba(0,0,0,.09); }
.task[draggable=true] { cursor: grab; }
.task .t { font-weight: 600; margin: 4px 0 8px; }
.task .meta { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.task .due.late { color: var(--danger); font-weight: 700; }
.task .due.soon { color: var(--warn); font-weight: 700; }
.task.mine { background: #f9fcfd; }
.prio-alta { color: var(--danger); font-weight: 700; font-size: .75rem; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 600; }
.status-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); }
@media (max-width: 860px) { .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; } .column { scroll-snap-align: start; } }

/* ---------- Calendario ---------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--line); gap: 1px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.cal .dow { background: #f1ede6; padding: 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); text-align: center; }
.cal .day { background: #fff; min-height: 112px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day:hover { background: #fcfbf9; }
.cal .day.other { background: #faf8f5; color: #b3b0aa; }
.cal .day.today .num { background: var(--brand); color: #fff; }
.cal .num { font-size: .8rem; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.ev { font-size: .74rem; padding: 2px 6px; border-radius: 6px; background: var(--ec, var(--brand-soft)); color: #00001f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; border-left: 3px solid var(--eb, var(--brand)); }
.ev.done { opacity: .5; text-decoration: line-through; }
.more { font-size: .72rem; color: var(--muted); padding-left: 4px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.agenda .item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.agenda .item:last-child { border-bottom: 0; }
.agenda .when { width: 64px; flex: none; font-size: .8rem; color: var(--muted); font-weight: 600; }
@media (max-width: 860px) { .cal .day { min-height: 64px; padding: 3px; } .ev { font-size: 0; height: 6px; padding: 0; border-left: 0; background: var(--eb); } .cal .day .more { display: none; } }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid #f0ece6; vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.total td { font-weight: 700; border-top: 2px solid var(--line); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #fbfaf8; }
.bar { height: 8px; border-radius: 4px; background: var(--brand-soft); overflow: hidden; min-width: 60px; }
.bar i { display: block; height: 100%; background: var(--c, var(--brand)); }


/* ---------- Archivos ---------- */
.crumbs { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; font-weight: 600; }
.crumbs a { text-decoration: none; padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { background: rgba(0,0,0,.05); }
.files-list .f { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 10px; cursor: pointer; }
.files-list .f:hover { background: #f7f5f1; }
.files-list .f .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.files-list .f .ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; flex: none; background: #efece6; color: var(--muted); }
.files-list .f .ico.folder { background: #e4f1f7; color: var(--brand); }
.files-list .f .ico svg { width: 18px; height: 18px; }
.files-list .f .acts { opacity: 0; display: flex; }
.files-list .f:hover .acts { opacity: 1; }
@media (hover: none) { .files-list .f .acts { opacity: 1; } }
.dropzone { border: 2px dashed transparent; border-radius: var(--radius); transition: .15s; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.preview-media { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 10px; background: #000; }
.progress { height: 6px; background: var(--brand-soft); border-radius: 3px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--brand); width: 0; transition: width .2s; }
.client-folders { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Chat ---------- */
.chat { display: grid; grid-template-columns: 290px 1fr; height: calc(100vh - 56px - 60px); min-height: 420px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.chat .list { border-right: 1px solid var(--line); overflow-y: auto; background: #fbfaf8; }
.chat .list .search { padding: 10px; position: sticky; top: 0; background: #fbfaf8; z-index: 1; }
.chat .ch { display: flex; gap: 10px; padding: 10px 12px; cursor: pointer; align-items: center; border-bottom: 1px solid #f0ece6; }
.chat .ch:hover { background: #f3f0eb; }
.chat .ch.active { background: var(--brand-soft); }
.chat .ch .info { flex: 1; min-width: 0; }
.chat .ch .info b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .ch .info small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat .ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 700; flex: none; }
.chat .group-label { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 12px 12px 4px; font-weight: 700; }
.chat .conv { display: flex; flex-direction: column; min-width: 0; background: #efeae2; }
.chat .conv > header { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #fff; border-bottom: 1px solid var(--line); }
.chat .msgs { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.msg { max-width: min(560px, 80%); background: #fff; padding: 7px 10px 5px; border-radius: 10px; box-shadow: 0 1px 1px rgba(0,0,0,.06); align-self: flex-start; word-wrap: break-word; white-space: pre-wrap; }
.msg.me { align-self: flex-end; background: #dcedf5; }
.msg .who { font-size: .78rem; font-weight: 700; margin-bottom: 2px; }
.msg .time { font-size: .68rem; color: var(--muted); text-align: right; margin-top: 2px; }
.msg .file { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: rgba(0,0,0,.04); border-radius: 8px; margin-bottom: 4px; text-decoration: none; }
.msg .mention { color: var(--brand); font-weight: 700; }
.day-sep { align-self: center; background: rgba(255,255,255,.85); font-size: .72rem; padding: 3px 10px; border-radius: 8px; color: var(--muted); margin: 8px 0; font-weight: 600; }
.composer { display: flex; gap: 8px; padding: 10px; background: #f6f3ee; align-items: flex-end; }
.composer textarea { min-height: 42px; max-height: 160px; border-radius: 20px; padding: 10px 14px; }
.composer .btn { border-radius: 50%; width: 42px; height: 42px; padding: 0; justify-content: center; flex: none; }
.chat .back { display: none; }
/* La lista de clientes y la conversación se desplazan cada una por su cuenta (sin esto, con una
   conversación abierta la fila crecía y la lista dejaba de poder bajarse) */
.chat { grid-template-rows: minmax(0, 1fr); }
.chat .list, .chat .conv { min-height: 0; }
/* Notas de voz */
.msg audio.voice { display: block; width: min(300px, 62vw); height: 40px; margin: 2px 0 2px; }
.rec-bar { display: none; flex: 1; align-items: center; gap: 10px; min-height: 42px; }
.composer.recording > :not(.rec-bar):not(.mention-suggest) { display: none; }
.composer.recording .rec-bar { display: flex; }
.rec-bar .rec-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--terracota, #d37a5e); animation: recpulse 1.2s ease-in-out infinite; flex: none; }
@keyframes recpulse { 50% { opacity: .3; } }
@media (max-width: 860px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .chat.has-conv .list { display: none; }
  .chat:not(.has-conv) .conv { display: none; }
  .chat .back { display: inline-grid; }
}

/* ---------- Avisos ---------- */
.notice { display: flex; gap: 12px; padding: 12px; border-radius: 12px; cursor: pointer; align-items: flex-start; }
.notice:hover { background: #f7f5f1; }
.notice.unread { background: #eaf4f9; }
.notice.unread b::after { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); margin-left: 8px; vertical-align: middle; }
.notice .body { flex: 1; min-width: 0; }
.notice .body p { margin: 2px 0 0; color: var(--muted); white-space: pre-wrap; font-size: .9rem; }
.notice time { font-size: .75rem; color: var(--muted); white-space: nowrap; }
.notice > .fx-check { flex: none; margin-top: 9px; }
.notice-side { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.notice-side .icon-btn { opacity: .45; }
.notice:hover .notice-side .icon-btn, .notice-side .icon-btn:focus-visible { opacity: 1; }
.notice.done { opacity: .6; }
.notice.done b { color: #a7a29a; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.2); }
.notice.done .avatar { filter: grayscale(1); }
.notice-done-head .danger-link { color: var(--danger); margin-left: auto; }
@media (hover: none) { .notice-side .icon-btn { opacity: .8; } }
.people-picker { display: flex; flex-wrap: wrap; gap: 6px; }
.people-picker label { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); padding: 4px 10px 4px 4px; border-radius: 999px; cursor: pointer; font-size: .85rem; user-select: none; }
.people-picker input { display: none; }
.people-picker label:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); font-weight: 600; }

/* ---------- Banner instalación / avisos ---------- */
.banner { display: flex; align-items: center; gap: 12px; background: var(--brand-soft); border: 1px solid #c6e2ee; padding: 12px 14px; border-radius: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.banner p { margin: 0; flex: 1; min-width: 200px; }

/* ---------- Archivos (lista estilo TickTick) ---------- */
.fx { display: grid; grid-template-columns: 250px minmax(0, 1fr) 0; height: calc(100vh - 56px); min-height: 480px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: grid-template-columns .15s; }
.fx.show-detail { grid-template-columns: 250px minmax(0, 1fr) 340px; }
.fx-side { background: #f7f5f1; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 8px; display: flex; flex-direction: column; gap: 1px; }
.fx-nav { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 8px; cursor: pointer; color: #2b2f3d; font-size: .9rem; user-select: none; }
.fx-nav:hover { background: rgba(0,0,0,.045); }
.fx-nav.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.fx-nav.child { padding-left: 30px; font-size: .85rem; }
.fx-nav svg { width: 16px; height: 16px; flex: none; }
.fx-nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-twisty { width: 16px; height: 16px; display: inline-grid; place-items: center; flex: none; color: var(--muted); border-radius: 4px; }
.fx-twisty:hover { background: rgba(0,0,0,.08); }
.fx-twisty svg { width: 13px; height: 13px; }
.fx-count { margin-left: auto; color: var(--muted); font-size: .75rem; font-weight: 500; }
.fx-section { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; padding: 14px 8px 4px; }
.fx-smb { margin: 14px 6px 4px; justify-content: center; }
.fx-center { display: flex; flex-direction: column; min-width: 0; padding: 18px 22px 0; position: relative; }
.fx-center.over::after { content: "Suelta para subir aquí"; position: absolute; inset: 8px; border: 2px dashed var(--brand); border-radius: 12px; background: rgba(228,241,247,.88); display: grid; place-items: center; font-weight: 700; color: var(--brand); pointer-events: none; }
.fx-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.fx-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fx-title h1 { font-size: 1.35rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fx-title .crumbs { font-weight: 500; gap: 2px; }
.fx-title .crumbs a { padding: 0 3px; color: var(--muted); }
.fx-back { display: none; }
.fx-search { width: 170px !important; padding: 6px 10px !important; }
.icon-btn.on { color: var(--brand); background: var(--brand-soft); }
.fx-add { margin: 14px 0 6px; }
.fx-addrow { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; background: #f6f4f0; color: var(--muted); cursor: pointer; border: 1px solid transparent; }
.fx-addrow:hover { border-color: var(--line); background: #f2efea; }
.fx-addrow > svg { width: 18px; height: 18px; color: var(--brand); }
.fx-addrow > span { flex: 1; }
.fx-list { flex: 1; overflow-y: auto; padding-bottom: 24px; }
.fx-group { margin-top: 8px; }
.fx-group-head { display: flex; align-items: center; gap: 6px; padding: 8px 2px 6px; cursor: pointer; user-select: none; font-size: .85rem; }
.fx-group-head svg { width: 14px; height: 14px; color: var(--muted); }
.fx-group-head .fx-count { margin-left: 4px; }
.fx-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) 90px 72px 22px; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid #f2efea; outline: none; }
.fx-row:hover { background: #f8f6f3; }
.fx-row.selected, .fx-row:focus-visible { background: var(--brand-soft); border-bottom-color: transparent; }
.fx-ico { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--muted); }
.fx-ico.folder { color: var(--brand); }
.fx-ico svg { width: 18px; height: 18px; }
.fx-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fx-name small { display: block; color: var(--muted); font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.fx-meta { color: var(--muted); font-size: .8rem; text-align: right; white-space: nowrap; }
.fx-date { font-size: .8rem; text-align: right; color: var(--muted); white-space: nowrap; }
.fx-date.today { color: var(--brand); font-weight: 600; }
.fx-date.recent { color: #2f7fb5; }
.fx-go { color: #c3beb5; display: grid; place-items: center; }
.fx-go svg { width: 16px; height: 16px; }
.fx-uploads:empty { display: none; }
.fx-detail { border-left: 1px solid var(--line); overflow-y: auto; padding: 12px 18px 20px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fx:not(.show-detail) .fx-detail { padding: 0; border: 0; overflow: hidden; }
.fx-detail-head { display: flex; justify-content: flex-end; }
.fx-detail-empty { color: var(--muted); text-align: center; margin-top: 30%; }
.fx-detail-empty svg { width: 34px; height: 34px; opacity: .4; }
.fx-preview { width: 100%; max-height: 260px; object-fit: contain; border-radius: 10px; background: #111; display: block; }
.fx-preview.folder { background: #f3f1ec; color: var(--brand); height: 140px; display: grid; place-items: center; align-content: center; gap: 6px; }
.fx-preview.folder svg { width: 44px; height: 44px; }
.fx-rename { font-weight: 700; font-size: 1.05rem; border-color: transparent !important; padding: 6px 8px !important; }
.fx-rename:hover { border-color: var(--line) !important; }
.fx-info td { padding: 5px 0; border: 0; font-size: .85rem; }
.fx-info td:first-child { color: var(--muted); width: 95px; }
.fx-actions { display: flex; flex-direction: column; gap: 8px; }
.fx-actions .btn { justify-content: flex-start; }
@media (max-width: 1100px) { .fx.show-detail { grid-template-columns: 200px minmax(0, 1fr) 280px; } .fx-row { grid-template-columns: 28px minmax(0, 1fr) 72px 22px; } .fx-meta { display: none; } }
@media (max-width: 860px) {
  .fx, .fx.show-detail { grid-template-columns: 1fr; height: calc(100vh - 120px); position: relative; }
  .fx-side { display: none; }
  .fx.show-side .fx-side { display: flex; position: absolute; inset: 0 25% 0 0; z-index: 5; box-shadow: 6px 0 20px rgba(0,0,0,.15); }
  .fx-back { display: inline-grid; }
  .fx-center { padding: 12px 12px 0; }
  .fx.show-detail .fx-detail { display: flex; position: absolute; inset: 0; background: #fff; z-index: 6; }
  .fx-search { width: 120px !important; }
}
/* Ajustes de espacio cuando el panel de detalle está abierto */
.fx.show-detail { grid-template-columns: 220px minmax(0, 1fr) 320px; }
.fx-nav.child .fx-nav-label { white-space: normal; line-height: 1.25; }
@media (max-width: 1500px) {
  .fx.show-detail .fx-row { grid-template-columns: 28px minmax(0, 1fr) 64px 22px; }
  .fx.show-detail .fx-meta { display: none; }
}
@media (max-width: 860px) { .fx.show-detail { grid-template-columns: 1fr; } }
/* Lista de archivos con casilla (usado → al final) */
.fx-row { grid-template-columns: 26px minmax(0, 1fr) auto 22px !important; padding: 10px 8px; }
.fx-check { width: 18px; height: 18px; border: 2px solid #b9b4ab; border-radius: 4px; background: #fff; padding: 0; cursor: pointer; display: grid; place-items: center; margin-left: 3px; color: #fff; }
.fx-check:hover { border-color: var(--brand); }
.fx-check.on { background: #b9b4ab; border-color: #b9b4ab; }
.fx-check svg { width: 12px; height: 12px; }
.fx-row.used .fx-name { color: #a7a29a; text-decoration: line-through; text-decoration-color: rgba(0,0,0,.2); }
.fx-row.used .fx-date { color: #c3beb5; }
.fx-row.is-dir .fx-name { font-weight: 600; }
.fx-row .fx-date { color: var(--muted); font-size: .82rem; }
.fx-go svg { width: 15px; height: 15px; }
.fx-used-head { font-size: .78rem; font-weight: 700; color: var(--muted); padding: 16px 8px 6px; display: flex; gap: 8px; text-transform: uppercase; letter-spacing: .06em; }
.fx-used-head a { text-transform: none; letter-spacing: 0; font-weight: 500; }
/* Comentarios de archivos */
.fx-row { grid-template-columns: 26px minmax(0, 1fr) auto auto 22px !important; }
.fx-note { display: inline-flex; align-items: center; gap: 2px; color: #9a958c; font-size: .75rem; }
.fx-note svg { width: 15px; height: 15px; }
.fx-comments-box { border-top: 1px solid var(--line); padding-top: 12px; }
.fx-comments-box h3 { margin-bottom: 8px; }
.fx-comments { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; max-height: 260px; overflow-y: auto; }
.fx-comment { display: flex; gap: 8px; align-items: flex-start; }
.fx-comment-body { flex: 1; min-width: 0; }
.fx-comment-text { white-space: pre-wrap; word-wrap: break-word; font-size: .9rem; background: #f6f4f0; border-radius: 8px; padding: 6px 9px; margin-top: 3px; }
.fx-comment .icon-btn { padding: 3px; }
.fx-comment .icon-btn svg { width: 14px; height: 14px; }
.fx-comment-input { display: flex; gap: 6px; align-items: flex-end; }
.fx-comment-input textarea { min-height: 38px; padding: 8px 10px; }
.fx-comment-input .btn { height: 38px; }

/* ---------- Móvil ---------- */
.content { min-width: 0; }
.mobile-top, .board-tabs { display: none; }
@media (max-width: 860px) {
  .mobile-top { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; background: rgba(246,243,238,.92); backdrop-filter: blur(10px); padding: calc(8px + env(safe-area-inset-top)) 14px 8px; border-bottom: 1px solid var(--line); }
  .mobile-top img { width: 30px; height: 30px; border-radius: 8px; }
  .mobile-top .icon-btn svg { width: 22px; height: 22px; }
  .mobile-top .icon-btn.active { color: var(--brand); }
  main { padding-top: 14px; }
  h1 { font-size: 1.3rem; }
  .page-head { margin-bottom: 14px; gap: 8px; }
  /* Inicio: estados en 2×2 y más compactos */
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .card.stat { padding: 12px 14px; }
  .stat b { font-size: 1.35rem; }
  /* Tablero: pestañas de estado que siguen al deslizamiento */
  .board-tabs { display: flex; flex-wrap: nowrap; overflow-x: auto; margin-bottom: 10px; width: 100%; }
  .board-tabs button { flex: 1 0 auto; font-size: .82rem; padding: 6px 10px; }
  .board { grid-template-columns: repeat(4, 86vw); gap: 14px; }
  .filters { gap: 6px; }
  .filters select.compact { flex: 1 1 45%; min-width: 0; }
  /* Archivos: el panel de detalle solo aparece al elegir un archivo */
  .fx-detail { display: none; }
  .fx.show-detail .fx-detail { display: flex; }
  .fx { height: calc(100vh - 190px); }
  .fx-addrow > span { font-size: .85rem; }
  /* Tablas: nombre y avatar en una línea */
  td .row { flex-wrap: nowrap; }
  .chat { height: calc(100vh - 210px); }
}
/* Chat: menciones */
.composer { position: relative; }
.mention-suggest { display: none; position: absolute; left: 52px; right: 60px; bottom: calc(100% - 4px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; z-index: 5; max-height: 280px; overflow-y: auto; }
.mention-suggest.open { display: block; }
.mention-suggest .opt { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; cursor: pointer; }
.mention-suggest .opt.active, .mention-suggest .opt:hover { background: var(--brand-soft); }
.msg .mention.for-me { background: #fde9c4; color: #7a5200; border-radius: 4px; padding: 0 3px; }
@media (max-width: 860px) { .mention-suggest { left: 8px; right: 8px; } }

/* ---------- Libro de estilo destacado en Archivos ---------- */
.fx-style { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 14px; border-radius: 12px; background: var(--profundo); color: var(--cal); cursor: pointer; }
.fx-style:hover { filter: brightness(1.05); }
.fx-style-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.16); flex: none; }
.fx-style-ico svg { width: 20px; height: 20px; }
.fx-style-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.fx-style-text span { font-size: .82rem; opacity: .85; }
.fx-style .btn.primary { background: #fff; color: var(--brand); border-color: #fff; }
.fx-nav-style { background: #efe3c6; color: var(--tinta); font-weight: 700; margin-bottom: 6px; } /* Arena suave */
.fx-nav-style:hover { background: var(--arena); }
.style-book-frame { width: 100%; height: min(75vh, 900px); border: 1px solid var(--line); border-radius: 10px; background: #f3f3f3; }
@media (max-width: 860px) { .fx-style-text span { display: none; } .fx-style { margin-bottom: 10px; } }

/* ---------- Informes de clientes ---------- */
.rp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rp-chips .chip.off { background: #f0eee9; color: var(--muted); font-weight: 500; }
.rp-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed #c6e2ee; border-radius: 12px; background: #f7fbfd; cursor: pointer; text-align: center; color: var(--brand); }
.rp-drop:hover, .rp-drop.over { background: var(--brand-soft); border-color: var(--brand); }
.rp-drop svg { width: 26px; height: 26px; }
.rp-help summary { cursor: pointer; color: var(--brand); font-weight: 600; font-size: .9rem; }
.rp-help ol { margin: 8px 0 0; padding-left: 20px; line-height: 1.6; }
.rp-hint { flex-direction: column; align-items: stretch; gap: 0; margin-bottom: 12px; }
.rp { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 34px 38px; max-width: 980px; }
.rp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; border-bottom: 3px solid var(--brand); padding-bottom: 16px; margin-bottom: 8px; }
.rp-head h1 { margin: 4px 0; font-size: 2rem; letter-spacing: -.02em; }
.rp-head p { margin: 0; }
.rp-kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700; color: var(--brand); }
.rp-logo { height: 46px; }
.rp-section { margin-top: 26px; break-inside: avoid; }
.rp-section h2 { font-size: 1.1rem; margin: 0 0 12px; color: var(--brand); }
.rp-section h3 { font-size: .95rem; margin: 18px 0 6px; }
.rp-highlights { margin: 0; padding-left: 20px; line-height: 1.7; }
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.rp-tile { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfb; }
.rp-tile b { font-size: 1.6rem; letter-spacing: -.02em; color: var(--text); }
.rp-tile-label { font-size: .8rem; font-weight: 600; color: var(--muted); }
.rp-delta { font-size: .78rem; font-weight: 600; color: var(--muted); }
.rp-delta.up, .rp-up { color: var(--ok); }
.rp-delta.down, .rp-down { color: var(--danger); }
.rp-chart { position: relative; }
.rp-chart svg { display: block; overflow: visible; }
.rp-tip { position: absolute; display: none; flex-direction: column; gap: 1px; transform: translate(-50%, calc(-100% - 12px)); background: #00001f; color: #fff; padding: 6px 9px; border-radius: 8px; font-size: .78rem; pointer-events: none; white-space: nowrap; z-index: 2; }
.rp-tip-ad { color: #f3c7b8; }
.rp-adkey { display: inline-block; width: 14px; height: 10px; background: rgba(211,122,94,.18); border: 1px solid rgba(211,122,94,.4); vertical-align: middle; }
.rp-table td, .rp-table th { white-space: nowrap; }
.rp-table td:not(:first-child), .rp-table th:not(:first-child) { text-align: right; }
.rp-post { white-space: normal !important; text-align: left !important; max-width: 320px; font-size: .85rem; }
.rp-split { margin-bottom: 14px; }
.rp-split-bar { display: flex; gap: 2px; height: 22px; margin: 6px 0; }
.rp-split-bar span { display: block; height: 100%; }
.rp-split-bar span:first-child { border-radius: 4px 0 0 4px; }
.rp-split-bar span:last-child { border-radius: 0 4px 4px 0; }
.rp-split-bar span:only-child { border-radius: 4px; }
.rp-split-legend { display: flex; gap: 18px; flex-wrap: wrap; color: var(--text); }
.rp-split-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rp-notes { white-space: pre-wrap; line-height: 1.6; margin: 0; }
.rp-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .rp { padding: 20px 16px; } .rp-head h1 { font-size: 1.5rem; } .rp-logo { height: 34px; } }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff !important; }
  .sidebar, .bottom-nav, .mobile-top, .no-print, #toasts { display: none !important; }
  .shell { display: block !important; }
  .content, main { padding: 0 !important; margin: 0 !important; }
  .rp { box-shadow: none; padding: 0; max-width: none; }
  .rp-tip { display: none !important; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.rp-ok { color: var(--ok); font-weight: 700; }

/* ---------- Informe con el estilo de VAOLA Social (manual de estilo) ---------- */
/* Fondo Blanco Cal, cabecera y pie en campo plano Azul Profundo con el wordmark en Cal,
   titulares en Instrument Serif, tarjetas con borde fino y marca de agua del wordmark. */
.rp { position: relative; overflow: hidden; padding: 0 38px 0; background: var(--cal); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.rp > *:not(.rp-watermark) { position: relative; z-index: 1; }
.rp-head { margin: 0 -38px 10px; padding: 34px 38px 30px; background: var(--profundo); color: var(--cal); border-bottom: 0; align-items: flex-end; }
.rp-head h1 { color: var(--cal); font-family: var(--serif); font-weight: 400; font-size: 3rem; line-height: 1.05; margin: 8px 0 6px; }
.rp-head p { color: rgba(247,243,236,.86); font-size: .95rem; }
.rp-head p em { font-family: var(--serif); font-style: italic; font-size: 1.25rem; color: var(--brisa); }
.rp-kicker { font-family: var(--sans); font-weight: 700; font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; color: var(--brisa); }
.rp-head .rp-logo { height: auto; width: 128px; flex: none; margin-bottom: 4px; }
.rp-section { margin-top: 34px; }
.rp-section h2 { font-family: var(--serif); font-weight: 400; font-size: 1.75rem; color: var(--profundo); margin: 0 0 14px; }
.rp-section h3 { font-family: var(--serif); font-weight: 400; font-size: 1.25rem; color: var(--profundo); }
.rp-highlights li::marker { color: var(--tramuntana); }
.rp-tile { background: #fffdf9; border: 1px solid var(--line); border-radius: 8px; }
.rp-tile b { font-family: var(--serif); font-weight: 400; font-size: 2.1rem; color: var(--profundo); letter-spacing: 0; }
.rp-tile-label { font-weight: 700; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--tramuntana); }
.rp-table thead th { background: transparent; color: var(--tramuntana); font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; border-bottom: 1px solid var(--tinta); }
.rp-notes { font-size: 1rem; }
.rp-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 40px -38px 0; padding: 20px 38px; background: var(--profundo); color: rgba(247,243,236,.86); border-top: 0; }
.rp-foot-logo { width: 84px; flex: none; }
/* Marca de agua: el wordmark «vaola» en Azul Profundo, muy suave */
.rp-watermark { position: absolute; z-index: 0; left: 50%; top: 52%; width: 70%; max-width: 640px; transform: translate(-50%, -50%) rotate(-14deg); opacity: .07; pointer-events: none; user-select: none; }
@media (max-width: 860px) { .rp { padding: 0 16px; } .rp-head, .rp-foot { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; } .rp-head h1 { font-size: 2.2rem; } .rp-head .rp-logo { width: 90px; } }
@media print {
  .rp { overflow: visible; border: 0; padding: 0; background: var(--cal); }
  .rp-head, .rp-foot { margin-left: 0; margin-right: 0; border-radius: 8px; }
  /* En el PDF la marca de agua se repite en todas las páginas */
  .rp-watermark { position: fixed; }
}
/* Lectura de capturas */
.rp-shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.rp-shots figure { margin: 0; position: relative; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f6f5f2; aspect-ratio: 9 / 16; }
.rp-shots img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.rp-shots .icon-btn { position: absolute; top: 4px; right: 4px; background: rgba(255,255,255,.92); }
.rp-airesult { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #c6e2ee; border-radius: 12px; background: #f2f8fb; }
.rp-airesult table td { padding: 3px 10px 3px 0; }

/* ---------- Almacenamiento (v2): barra de espacio usado ---------- */
.storage-bar { height: 12px; border-radius: 999px; background: #ede6d9; overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.storage-bar.warn i { background: var(--warn); }
.storage-bar.sm { height: 6px; margin-bottom: 4px; }
.fx-usage { margin-top: auto; padding: 14px 8px 6px; }
.copy-box { flex: 1; min-width: 0; overflow-x: auto; white-space: nowrap; padding: 8px 10px; background: #efe9de; border-radius: 4px; font-size: .8rem; }

/* =====================================================================
   ESTILO VAOLA SOCIAL (Manual de estilo, edición 1, nov. 2026)
   Paleta del paisaje de Mallorca, Instrument Serif para titulares y
   Nunito Sans para el resto. Mucho aire, colores planos, bordes finos,
   sombras solo al pasar el ratón, botones en forma de píldora.
   ===================================================================== */
body { font-family: var(--sans); font-size: 15px; line-height: 1.5; background: var(--bg); color: var(--text); }
h1, h2, h3, .modal header h2 { font-family: var(--serif); font-weight: 400; letter-spacing: 0; color: var(--profundo); }
h1 { font-size: 2.15rem; line-height: 1.1; }
h2 { font-size: 1.45rem; line-height: 1.15; }
h3 { font-size: 1.2rem; line-height: 1.2; }
h1 em, h2 em, h3 em { font-style: italic; }
a { color: var(--tramuntana); }
::selection { background: var(--brisa); color: var(--tinta); }
.eyebrow { font-family: var(--sans); font-weight: 700; font-size: .72rem; letter-spacing: .32em; text-transform: uppercase; color: var(--tramuntana); }

/* Barra lateral: campo de color Azul Profundo con el wordmark en Blanco Cal */
.sidebar { background: var(--profundo); color: var(--cal); }
.sidebar .logo { flex-direction: column; align-items: flex-start; gap: 6px; padding: 10px 12px 22px; }
.sidebar .logo img.wordmark { width: 104px; height: auto; border-radius: 0; background: none; }
.sidebar .logo span { font-size: .62rem; letter-spacing: .32em; opacity: .8; color: var(--brisa); font-weight: 700; }
.nav a { color: rgba(247,243,236,.86); border-radius: 999px; font-weight: 600; }
.nav a:hover { background: rgba(247,243,236,.10); color: var(--cal); }
.nav a.active { background: var(--cal); color: var(--profundo); }
.sidebar .me { border-radius: 8px; background: rgba(247,243,236,.10); color: var(--cal); }
.bottom-nav { background: var(--card) !important; }
.bottom-nav a.active { color: var(--profundo); }
.mobile-top { background: rgba(247,243,236,.94) !important; }
.mobile-top img { border-radius: 8px; }

/* Tarjetas: fondo Cal claro, borde de 1 px, sin sombra en reposo */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 8px; box-shadow: none; }
.page-head h1 { margin-right: 4px; }

/* Botones en forma de píldora */
.btn { border-radius: 999px; padding: 8px 18px; font-weight: 600; background: var(--card); border-color: var(--line); color: var(--tinta); transition: background .14s, border-color .14s, box-shadow .14s; }
.btn:hover { background: #fff; border-color: var(--brisa); box-shadow: var(--shadow-hover); }
.btn.primary { background: var(--tramuntana); border-color: var(--tramuntana); color: var(--cal); }
.btn.primary:hover { background: var(--profundo); border-color: var(--profundo); }
.btn.sm { border-radius: 999px; padding: 5px 13px; }
.btn.danger { color: var(--danger); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.icon-btn { border-radius: 999px; }
.icon-btn:hover { background: var(--brand-soft); color: var(--profundo); }

/* Pestañas */
.tabs { background: #ede6d9; border-radius: 999px; padding: 3px; }
.tabs button { border-radius: 999px; font-weight: 600; padding: 6px 14px; }
.tabs button.active { background: var(--card); color: var(--profundo); box-shadow: 0 1px 3px rgba(38,109,137,.14); }

/* Etiquetas y campos */
.chip { border-radius: 2px; background: var(--brand-soft); color: var(--profundo); font-weight: 700; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=time], input[type=month], input[type=search], select, textarea {
  border-radius: 4px; background: var(--card); border-color: var(--line);
}
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(44,127,163,.35); border-color: var(--tramuntana); }
label.field { color: #2b2f3d; }
.badge { background: var(--terracota); color: #fff; }

/* Diálogos y avisos */
.modal { background: var(--card); border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,31,.22); }
.modal header, .modal footer { background: var(--card); }
.toast { background: var(--tinta); color: var(--cal); border-radius: 8px; }
.toast.error { background: var(--danger); }
.banner { background: var(--brand-soft); border-color: #c6e2ee; border-radius: 8px; }

/* Entrada */
.login { background: var(--cal); }
.login .card { border-radius: 16px; }
.login img { width: 190px; }

/* Libro de estilo (franja de Archivos): campo plano Azul Profundo */
.fx-style { border-radius: 8px; }

/* Estados de las tareas y barras: colores de la paleta */
.progress i, .storage-bar i { background: var(--tramuntana); }
.rp-ok { color: var(--ok); }

/* Movimiento suave, sin rebotes */
@keyframes fade { from { opacity: 0; transform: translateY(4px); } }
.mobile-top img.mt-wordmark { width: 72px; height: auto; border-radius: 0; }
.splash img { width: 200px; opacity: 1; }

/* Iconos pequeños dentro de las tarjetas de tareas y de los avisos */
.task .meta svg { width: 13px; height: 13px; flex: none; vertical-align: -2px; margin-right: 3px; }
.task .meta .due, .task .meta span[title] { display: inline-flex; align-items: center; }
.banner > svg { width: 20px; height: 20px; flex: none; color: var(--profundo); }
/* Inicio: cuadro «Configura tu app» (notificaciones e instalar), del tamaño de los demás */
.setup-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.setup-row:first-of-type { border-top: 0; }
.setup-row > svg { width: 18px; height: 18px; flex: none; color: var(--tramuntana); }
.setup-row p { margin: 0; flex: 1; font-size: .88rem; color: var(--muted); }
