/* Poczta — przegląd poczty (views/mail.js, ADR-086). Tokeny kolorów i klasy (.card, .btn, .chip, .chip-btn) z app.css;
   ten sam język co „Notatka → zadania” (notes.css). Mobile-first, bez nowych kolorów. Karta spotkania i kafel w Rdzeniu
   (grupa 17) dopisują tu swoje reguły. */

.chip-gold { color: var(--gold); border-color: rgba(255, 200, 87, .4); background: var(--gold-soft); }
.chip-cyan { color: var(--cyan); border-color: rgba(99, 225, 255, .4); background: var(--cyan-soft); }

.mail-last { margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.mail-banners, .mail-body { display: grid; gap: 14px; min-width: 0; }
.mail-banners:empty { display: none; }
.mail-body { margin-top: 14px; }
.mail-banners { margin-top: 12px; }
.mail-body > *, .mail-banners > * { min-width: 0; }

/* Banery stanów: złoty = uwaga, czerwony = przegląd wstrzymany. */
.mail-banner { display: grid; gap: 6px; }
.mail-banner.is-gold { border-color: rgba(255, 200, 87, .45); }
.mail-banner.is-gold > b { color: var(--gold); }
.mail-banner.is-red { border-color: rgba(255, 122, 107, .45); }
.mail-banner.is-red > b { color: var(--red); }
.mail-banner .meta, .mail-noise .meta, .mail-backlog .meta { overflow-wrap: anywhere; }

/* Liczniki: pilne, ważne, do wiadomości, szum — klikalne. */
.mail-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mail-sum-tile {
  min-height: 64px; padding: 8px 4px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(6, 17, 26, .7);
  color: var(--text); text-align: center; display: grid; align-content: center; gap: 0;
}
.mail-sum-tile b { font-size: 22px; font-variant-numeric: tabular-nums; }
.mail-sum-tile span { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.mail-sum-tile[aria-pressed="true"] { border-color: var(--line-3); }
.mail-sum-tile.is-p b { color: var(--red); }
.mail-sum-tile.is-w b { color: var(--gold); }
.mail-sum-tile.is-f b { color: var(--cyan); }
.mail-sum-tile.is-n b { color: var(--muted); }

.mail-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; max-width: 100%; }
.mail-chips .chip-btn { flex: none; }

.mlist, .nlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.nlist { gap: 8px; }
.mrow { display: grid; gap: 6px; min-width: 0; }
.mrow > * { min-width: 0; }
.mchips { display: flex; flex-wrap: wrap; gap: 6px; }
.mchips .chip { white-space: normal; }
.msender { font-size: 13.5px; color: var(--text-2); overflow-wrap: anywhere; }
.msubj { font-size: 15.5px; font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.mdue { font-size: 13.5px; color: var(--text); overflow-wrap: anywhere; }
.mdue b { color: var(--gold); }
.mail-link { color: var(--cyan); display: inline-flex; align-items: center; min-height: 44px; }
.mwarn { font-size: 13.5px; color: var(--gold); overflow-wrap: anywhere; }
.mtask { font-size: 13px; color: var(--ok); overflow-wrap: anywhere; }
.mtask.is-held { color: var(--gold); }
.macts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.macts .btn { min-height: 44px; white-space: normal; text-align: center; }

.mail-noise, .mail-backlog { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mail-backlog { flex-direction: column; align-items: stretch; display: grid; gap: 8px; }

.nrow {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--r); background: rgba(6, 17, 26, .7); flex-wrap: wrap;
}
.nrow-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 160px; }
.nsubj { font-size: 14.5px; overflow-wrap: anywhere; }
.nrow .macts { margin: 0; }

@media (min-width: 960px) {
  .mail-body { max-width: 760px; }
}

/* Rdzeń: karta spotkania z maila (views/core.js, makieta karta-spotkania). Wzorzec .note-card / .note-quote / .note-warn
   z notes.css (Rdzeń ładuje oba arkusze); tu tylko to, czego tam nie ma. Teksty z maili łamią się, nie rozpychają ekranu. */
.mcards { display: grid; gap: 10px; min-width: 0; }
.mcards:empty { display: none; }
.decide .mcards { margin: 10px 0; }
.mcard.note-card { margin-top: 0; max-width: none; }
.mcard .note-card-title { overflow-wrap: anywhere; }
.mcard .chip { flex: none; white-space: normal; }
.mc-when { display: grid; gap: 2px; min-width: 0; }
.mc-when b { font-size: 16px; font-variant-numeric: tabular-nums; }
.mc-when .note-meta, .mc-error, .mc-why, .mc-foot { overflow-wrap: anywhere; }
.mcard .note-quote { font-style: normal; }
.mc-error { margin: 0; color: var(--red); font-size: 13.5px; }
.mc-why { margin: 0; }
.mc-foot { margin: 0; font-size: 12.5px; }
.mcard .note-actions .btn { white-space: normal; text-align: center; }
.mdecided-head { margin: 4px 2px 0; }
.mmini { display: grid; gap: 2px; min-width: 0; }
.mmini .note-meta { overflow-wrap: anywhere; }
.mmini.is-ok > b { color: var(--ok); }
.mmini.is-gone > b { color: var(--muted); }

/* Rdzeń: kafel „Poczta” jako czwarty kafel dnia — 2 × 2 na telefonie, 4 w rzędzie od 720 px; w wąskiej kolumnie dnia na
   komputerze (od 1080 px) znów 2 × 2. Link kafla ma pełny cel dotyku. */
.holo-grid.holo-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.holo-grid.holo-grid-4 .holo { min-width: 0; }
.holo-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; margin-top: 2px; }
@media (min-width: 720px) {
  .holo-grid.holo-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1080px) {
  .core-view .holo-grid.holo-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.mconfirm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-width: 0; }
.mconfirm .btn { min-height: 44px; }
.mrow[aria-busy="true"] { opacity: .7; }
