/* =========================================================================
   Wasabi · hoja de estilo única para todas las páginas.
   Mobile first: lo que ves sin media query es el móvil; a partir de 880px
   la navegación pasa de barra inferior a columna lateral.
   ========================================================================= */

:root {
  /* Superficies y texto */
  --bg:            #f4f6f2;
  --surface:       #ffffff;
  --surface-2:     #fafbf8;
  --surface-3:     #eef1ea;
  --line:          #e3e7dd;
  --line-strong:   #cfd6c8;
  --text:          #1b211c;
  --text-2:        #55605a;
  --text-3:        #838d85;

  /* Acento: verde wasabi */
  --accent:        #4c8c5a;
  --accent-hover:  #3e7549;
  --accent-soft:   #e9f2eb;
  --accent-line:   #c3ddc9;

  /* Estados */
  --danger:        #bd4b3f;
  --danger-soft:   #fbeceb;
  --warn:          #a9761c;
  --warn-soft:     #fbf2e1;
  --info:          #3d6f96;
  --info-soft:     #e9f1f7;

  /* Formas */
  --r-sm: 8px;
  --r:    12px;
  --r-lg: 18px;
  --shadow-1: 0 1px 2px rgba(27, 33, 28, .05);
  --shadow-2: 0 4px 16px rgba(27, 33, 28, .08);
  --shadow-3: 0 18px 48px rgba(27, 33, 28, .18);

  --nav-h: 66px;
  --bar-h: 56px;
  --side-w: 236px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.011em; }
h1 { font-size: 1.3rem; }
h2 { font-size: 1.05rem; }
h3 { font-size: .95rem; }
p  { margin: 0 0 .8em; }
a  { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------------------------------------------------------------- arranque */

.boot {
  min-height: 100dvh;
  display: grid;
  place-items: center;
}

.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--accent-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  display: inline-block;
  animation: spin .7s linear infinite;
}
.spinner--sm { width: 15px; height: 15px; border-width: 2px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ layout */

.app { min-height: 100dvh; }

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Barra superior (móvil) */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--bar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  padding-top: env(safe-area-inset-top);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__title {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__actions { display: flex; align-items: center; gap: 6px; }

.main {
  flex: 1;
  padding: 16px 14px calc(var(--nav-h) + env(safe-area-inset-bottom) + 18px);
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
}

/* Navegación inferior (móvil) */
.bottomnav {
  position: fixed;
  z-index: 30;
  left: 0; right: 0; bottom: 0;
  display: flex;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(1.4) blur(10px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottomnav a {
  flex: 1;
  height: var(--nav-h);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: .69rem;
  font-weight: 500;
  letter-spacing: .01em;
  color: var(--text-3);
  text-decoration: none;
}
.bottomnav a svg { width: 22px; height: 22px; }
.bottomnav a[aria-current="page"] { color: var(--accent); }

.sidebar { display: none; }

/* Columna lateral a partir de tableta */
@media (min-width: 880px) {
  .shell { flex-direction: row; }

  .sidebar {
    display: flex;
    flex-direction: column;
    width: var(--side-w);
    flex: 0 0 var(--side-w);
    border-right: 1px solid var(--line);
    background: var(--surface);
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 22px 14px 16px;
  }
  .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 20px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-size: 1.06rem;
  }
  .brand__mark {
    width: 30px; height: 30px;
    border-radius: 9px;
    background: var(--accent);
    color: #fff;
    display: grid;
    place-items: center;
    flex: none;
  }
  .brand__mark svg { width: 17px; height: 17px; }

  .sidenav { display: flex; flex-direction: column; gap: 2px; }
  .sidenav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 10px;
    border-radius: var(--r-sm);
    color: var(--text-2);
    font-weight: 500;
    font-size: .93rem;
    text-decoration: none;
  }
  .sidenav a svg { width: 19px; height: 19px; flex: none; }
  .sidenav a:hover { background: var(--surface-3); color: var(--text); text-decoration: none; }
  .sidenav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-hover); }

  .sideuser {
    margin-top: auto;
    border-top: 1px solid var(--line);
    padding-top: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  .sideuser__info { min-width: 0; flex: 1; }
  .sideuser__name {
    font-size: .88rem; font-weight: 600;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .sideuser__group { font-size: .76rem; color: var(--text-3); }

  .bottomnav { display: none; }
  .topbar {
    height: 68px;
    padding: 0 32px;
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
    position: static;
  }
  .topbar__title { font-size: 1.45rem; }
  .main { padding: 4px 32px 48px; }
  .content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
}

/* ---------------------------------------------------------------- avatares */

.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-hover);
  display: grid;
  place-items: center;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  flex: none;
  border: 1px solid var(--accent-line);
}
.avatar--sm { width: 26px; height: 26px; font-size: .66rem; }
.avatar--muted { background: var(--surface-3); color: var(--text-3); border-color: var(--line); }

/* ---------------------------------------------------------------- botones */

.btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: .9rem;
  font-weight: 550;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  transition: background .13s ease, border-color .13s ease, opacity .13s ease;
}
.btn svg { width: 17px; height: 17px; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(.5px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn--danger { color: var(--danger); border-color: #e6c4c0; background: var(--surface); }
.btn--danger:hover { background: var(--danger-soft); }

.btn--ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); color: var(--text); }

.btn--sm { padding: 6px 10px; font-size: .83rem; }
.btn--icon { padding: 7px; border-radius: var(--r-sm); }
.btn--icon svg { width: 18px; height: 18px; }
.btn--block { width: 100%; }

/* --------------------------------------------------------------- tarjetas */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-1);
}
.card__body { padding: 16px; }
.card__head {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.card__head h2 { flex: 1; min-width: 0; }

/* -------------------------------------------------------------- cabeceras */

.pagehead {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.pagehead__text { flex: 1; min-width: 0; }
.pagehead__sub { color: var(--text-3); font-size: .86rem; margin-top: 2px; }

.section-title {
  font-size: .78rem;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 22px 0 9px;
}

/* --------------------------------------------------------------- filtros */

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .toolbar { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .toolbar .search { max-width: 320px; }
}

.search { position: relative; flex: 1; min-width: 0; }
.search svg {
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  width: 17px; height: 17px;
  color: var(--text-3);
  pointer-events: none;
}
.search input { padding-left: 34px; }

.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text-2);
  font: inherit;
  font-size: .83rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.chip:hover { background: var(--surface-3); }
.chip[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--accent-hover);
}

/* --------------------------------------------------------------- listados */

.list { display: flex; flex-direction: column; gap: 8px; }

.row {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 13px 14px;
  box-shadow: var(--shadow-1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
  font: inherit;
  color: inherit;
  text-decoration: none;
}
a.row:hover, button.row:hover { border-color: var(--line-strong); text-decoration: none; }
button.row { cursor: pointer; }

.row__main { flex: 1; min-width: 0; }
.row__title {
  font-weight: 600;
  font-size: .96rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.row__title--done { text-decoration: line-through; color: var(--text-3); }
.row__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 4px;
  font-size: .82rem;
  color: var(--text-3);
}
.row__meta strong { color: var(--text-2); font-weight: 550; }
.row__side { display: flex; align-items: center; gap: 6px; flex: none; }
.row__actions { display: flex; gap: 2px; flex: none; }

/* ---------------------------------------------------------------- badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .01em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--text-2);
  border: 1px solid transparent;
  white-space: nowrap;
}
.badge--ok      { background: var(--accent-soft); color: var(--accent-hover); border-color: var(--accent-line); }
.badge--info    { background: var(--info-soft);   color: var(--info); }
.badge--warn    { background: var(--warn-soft);   color: var(--warn); }
.badge--danger  { background: var(--danger-soft); color: var(--danger); }
.badge--muted   { background: var(--surface-3);   color: var(--text-3); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.prio { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- formularios */

.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field > label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 5px;
}
.field__hint { font-size: .78rem; color: var(--text-3); margin-top: 5px; }
.field__error { font-size: .78rem; color: var(--danger); margin-top: 5px; font-weight: 500; }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=search], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .93rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  padding: 9px 11px;
  -webkit-appearance: none;
  appearance: none;
}
textarea { resize: vertical; min-height: 78px; line-height: 1.45; }
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23838d85' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  padding-right: 32px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-soft);
}
input::placeholder, textarea::placeholder { color: var(--text-3); }

.field-row { display: flex; flex-direction: column; gap: 0; }
@media (min-width: 560px) {
  .field-row { flex-direction: row; gap: 12px; }
  .field-row > .field { flex: 1; }
}

.check {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .92rem;
  cursor: pointer;
}
.check input { width: 18px; height: 18px; accent-color: var(--accent); margin: 0; flex: none; }

/* ----------------------------------------------------------------- modales */

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(27, 33, 28, .38);
  backdrop-filter: blur(2px);
  animation: fade .16s ease;
}
@keyframes fade { from { opacity: 0; } }

.modal__sheet {
  background: var(--surface);
  width: 100%;
  max-height: 92dvh;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: var(--shadow-3);
  display: flex;
  flex-direction: column;
  animation: rise .22s cubic-bezier(.22, .9, .3, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
@keyframes rise { from { transform: translateY(22px); opacity: .6; } }

.modal__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--line);
}
.modal__head h2 { flex: 1; min-width: 0; font-size: 1.02rem; }
.modal__body { padding: 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal__foot {
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  display: flex;
  gap: 8px;
  background: var(--surface-2);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.modal__foot .btn { flex: 1; }

@media (min-width: 620px) {
  .modal { align-items: center; padding: 24px; }
  .modal__sheet { max-width: 520px; border-radius: var(--r-lg); max-height: 86dvh; }
  .modal__foot { border-radius: 0 0 var(--r-lg) var(--r-lg); justify-content: flex-end; }
  .modal__foot .btn { flex: none; min-width: 108px; }
  .modal__sheet--wide { max-width: 640px; }
}

/* ------------------------------------------------------------------ avisos */

.toasts {
  position: fixed;
  z-index: 80;
  left: 12px; right: 12px;
  bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 12px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
@media (min-width: 880px) {
  .toasts { left: auto; right: 24px; bottom: 24px; width: 380px; }
}
.toast {
  background: var(--text);
  color: #fff;
  padding: 11px 14px;
  border-radius: var(--r);
  font-size: .89rem;
  box-shadow: var(--shadow-2);
  animation: rise .2s ease;
  pointer-events: auto;
  display: flex;
  gap: 9px;
  align-items: flex-start;
}
.toast--ok    { background: #2f6b3d; }
.toast--error { background: #9c3a30; }
.toast--warn  { background: #8a5c12; }
.toast__hint { display: block; opacity: .82; font-size: .82rem; margin-top: 2px; }

/* --------------------------------------------------------------- vacíos */

.empty {
  text-align: center;
  padding: 42px 20px;
  color: var(--text-3);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r);
}
.empty h3 { color: var(--text-2); margin-bottom: 5px; }
.empty p { font-size: .88rem; margin-bottom: 14px; }

.loading { display: grid; place-items: center; padding: 42px; }

.alert {
  border-radius: var(--r-sm);
  padding: 10px 12px;
  font-size: .87rem;
  margin-bottom: 14px;
  border: 1px solid transparent;
}
.alert--error { background: var(--danger-soft); color: var(--danger); border-color: #edc9c4; }
.alert--info  { background: var(--info-soft);   color: var(--info); }
.alert--warn  { background: var(--warn-soft);   color: var(--warn); }
.alert strong { display: block; margin-bottom: 2px; }

/* --------------------------------------------------------------- métricas */

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
@media (min-width: 560px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 12px 14px;
}
.stat__n { font-size: 1.5rem; font-weight: 650; letter-spacing: -.02em; line-height: 1.1; }
.stat__k { font-size: .77rem; color: var(--text-3); margin-top: 2px; }

.deflist { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .deflist { grid-template-columns: repeat(2, 1fr); } }
.deflist div { min-width: 0; }
.deflist dt { font-size: .77rem; color: var(--text-3); margin-bottom: 1px; }
.deflist dd { margin: 0; font-size: .92rem; font-weight: 500; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- utilidad */

.stack     { display: flex; flex-direction: column; gap: 8px; }
.inline    { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer    { flex: 1; }
.muted     { color: var(--text-3); }
.small     { font-size: .84rem; }
.mono      { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85em; }
.center    { text-align: center; }
.hidden    { display: none !important; }
.nowrap    { white-space: nowrap; }
.mt-2      { margin-top: 16px; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.load-more { display: grid; place-items: center; padding: 14px 0 4px; }

/* ------------------------------------------------------------------ login */

.login {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px;
  background:
    radial-gradient(1100px 520px at 50% -10%, #e9f2eb 0%, rgba(233, 242, 235, 0) 62%),
    var(--bg);
}
.login__box { width: 100%; max-width: 388px; }
.login__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  text-align: center;
}
.login__mark {
  width: 54px; height: 54px;
  border-radius: 16px;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 8px 22px rgba(76, 140, 90, .28);
}
.login__mark svg { width: 28px; height: 28px; }
.login__brand h1 { font-size: 1.3rem; }
.login__brand p { color: var(--text-3); font-size: .88rem; margin: 0; }
.login__foot {
  text-align: center;
  font-size: .78rem;
  color: var(--text-3);
  margin-top: 16px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ================================================================ ADECAFF */
/* Socios, facturación, cartera y remesas. Mobile first: lo que va sin media
   query es el móvil, y las consultas sólo añaden. */

/* Importes: alineados a la derecha y con cifras de ancho fijo, para que una
   columna de euros se pueda leer de un vistazo. */
.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 550;
}
.money--big  { font-size: 1.15rem; font-weight: 650; letter-spacing: -.01em; }
.money--due  { color: var(--danger); }
.money--zero { color: var(--text-3); font-weight: 500; }

/* Fila seleccionable con casilla: la pantalla de preparar una remesa. */
.pick {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
}
.pick + .pick { margin-top: 6px; }
.pick--on     { border-color: var(--accent-line); background: var(--accent-soft); }
.pick--off    { opacity: .62; }
.pick input[type="checkbox"] { margin-top: 3px; width: 17px; height: 17px; flex: none; accent-color: var(--accent); }
.pick__main   { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pick__title  { font-weight: 550; overflow-wrap: anywhere; }
.pick__meta   { font-size: .8rem; color: var(--text-3); display: flex; flex-wrap: wrap; gap: 4px 10px; }
.pick__amount { text-align: right; flex: none; }

/* Barra fija con lo seleccionado, para no perder de vista el total. */
.selbar {
  position: sticky;
  bottom: 0;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.selbar__n { font-size: .87rem; }

/* Líneas de una factura. Apiladas en móvil, en rejilla a partir de 620. */
.lines { display: flex; flex-direction: column; }
.line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.line:last-child   { border-bottom: 0; }
.line__concept     { font-weight: 550; overflow-wrap: anywhere; }
.line__detail      { font-size: .8rem; color: var(--text-3); grid-column: 1 / -1; }
.line__calc        { font-size: .8rem; color: var(--text-3); }
.line__actions     { grid-column: 2; justify-self: end; }

/* Bloque de totales de una factura. */
.totals { margin-left: auto; max-width: 320px; display: grid; gap: 5px; }
.totals__row  { display: flex; justify-content: space-between; gap: 16px; font-size: .88rem; }
.totals__row span:first-child { color: var(--text-3); }
.totals__sum  {
  display: flex; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line-strong); margin-top: 5px; padding-top: 7px;
  font-weight: 650; font-size: 1.05rem;
}

/* Cabecera de una ficha: nombre, estado y cifras. */
.sheet__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.sheet__title { font-size: 1.2rem; font-weight: 650; letter-spacing: -.01em; }

/* Aviso de datos incompletos o provisionales dentro de una ficha. */
.notice {
  border: 1px solid var(--warn);
  background: var(--warn-soft);
  border-radius: var(--r);
  padding: 10px 12px;
  font-size: .86rem;
}
.notice--info { border-color: var(--info); background: var(--info-soft); }

@media (min-width: 620px) {
  .line { grid-template-columns: 1fr 96px 96px 110px auto; align-items: baseline; }
  .line__detail { grid-column: 1 / -1; }
  .line__calc   { text-align: right; }
}
