/* ==========================================================================
   SubZero-Link — compléments de pages (clients, abonnements, infrastructure,
   alertes, finances, paramètres). S'appuie exclusivement sur les jetons
   de app.css (clair + sombre). À charger APRÈS app.css.
   ========================================================================== */

/* Barre de filtres sans séparateur (carte isolée) */
.filters--bare { border-bottom: 0; }

/* Plage de dates dans les filtres */
.date-range .input { width: 150px; }

/* Totaux du filtre (finances) */
.fin-totals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.fin-totals > div { padding: 14px 20px; border-right: 1px solid var(--border); min-width: 0; }
.fin-totals > div:last-child { border-right: 0; }
.fin-totals .k { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.fin-totals .v { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Type d'opération (modale transaction) */
.tx-type { display: flex; width: 100%; }
.tx-type label { flex: 1; justify-content: center; }
.tx-type label span { justify-content: center; width: calc(100% + 26px); }

/* Ressource : groupes de clients hébergés */
.host-group + .host-group { border-top: 1px solid var(--border); }
.host-group-head { display: flex; align-items: center; gap: 10px; padding: 12px 20px 4px; }
.host-group .list-plain > li { padding: 10px 20px 10px 60px; border-bottom: 0; }
.host-group .list-plain > li:last-child { padding-bottom: 14px; }

/* Paramètres */
.setting-tile { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.threshold--warning { border-color: color-mix(in srgb, var(--warning) 40%, var(--border)); background: var(--warning-soft); }
.threshold--warning b { color: var(--warning-ink); }
.threshold--danger { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); background: var(--danger-soft); }
.threshold--danger b { color: var(--danger-ink); }
.pw-eye { position: absolute; right: 6px; }
.input-group .pw-eye ~ .input, .input-group .input:has(+ .pw-eye) { padding-right: 44px; }

/* Alertes : liste */
.alert-list { animation: fadeUp .3s var(--ease) both; }

/* Ressource : carte « Consommation » (resources/monitoring :: card) */
.mon-state { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mon-gauges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mon-gauge { --tone: var(--success); padding: 14px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.mon-gauge.tone-warning { --tone: var(--warning); border-color: color-mix(in srgb, var(--warning) 35%, var(--border)); }
.mon-gauge.tone-danger { --tone: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
.mon-gauge .k { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--text-3); }
.mon-gauge .v { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -.02em; margin: 6px 0 8px; font-variant-numeric: tabular-nums; }
.mon-bar { position: relative; }
.mon-mark { position: absolute; top: -3px; width: 2px; height: 12px; margin-left: -1px; border-radius: 1px; background: var(--text-2); opacity: .55; }
.mon-spark { display: block; width: 100%; height: 44px; margin-top: 10px; overflow: visible; }
.mon-spark .l { fill: none; stroke: var(--tone); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.mon-spark .a { fill: var(--tone); opacity: .12; }
.mon-spark .thr { stroke: var(--text-3); stroke-width: 1; stroke-dasharray: 3 3; opacity: .6; vector-effect: non-scaling-stroke; }
.mon-cmd { white-space: pre-wrap; word-break: break-all; font-family: var(--font-mono); }
.mon-foot { flex-wrap: wrap; justify-content: flex-start; font-size: 12px; color: var(--text-2); }
.mon-foot > span { display: inline-flex; align-items: center; gap: 5px; }
.mon-install summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.mon-install[open] { flex-basis: 100%; }
.mon-pitch { margin: 0; padding-left: 18px; display: grid; gap: 6px; }

@media (max-width: 720px) {
  .fin-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fin-totals > div:nth-child(2) { border-right: 0; }
  .fin-totals > div:nth-child(-n+2) { border-bottom: 1px solid var(--border); }
  .date-range { flex: 1 1 100%; }
  .date-range .input { flex: 1; width: auto; }
  .host-group .list-plain > li { padding-left: 20px; }
  .tx-type { flex-direction: column; }
  .mon-gauges { grid-template-columns: minmax(0, 1fr); }
}
