/* PrivacyGuardin layout fixes from the visual audit (31 October 2026): every screen x Light, Warm, Future x 1440/1100/820/420 px.
   Loaded after the theme files, so these rules apply in every theme. (keep this file) */

/* 1. Bell: the icon is centred in its button; the count sits on the button's corner with a ring in the bar's colour, never on the bell */
.notif-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 32px; height: 32px; overflow: visible; }
.notif-btn > svg { display: block; flex: none; }
.notif-btn .notif-n { top: -8px; right: -8px; min-width: 17px; height: 17px; padding: 0 4px; font-size: 10px; line-height: 17px; box-sizing: border-box; box-shadow: 0 0 0 2px var(--surface); }
[data-theme="warm"] .notif-btn .notif-n { box-shadow: 0 0 0 2px var(--warm-header); }
[data-theme="future"] .notif-btn .notif-n { box-shadow: 0 0 0 2px #0B1020, 0 0 10px rgba(255, 77, 109, .55); }

/* 2. Sidebar: a long label ends in "…" (the full name shows on hover), never runs into the edge;
   the Future theme's active item keeps its marker inside its own border (it already has an inner left glow) */
.side-item { min-width: 0; }
.side-item .side-label { min-width: 0; flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
[data-theme="future"] .side-item.on::before { display: none; }
/* the organisation box: the name may use two lines and is never cut at the box edge */
.side-context > div:not(.ring) { min-width: 0; flex: 1 1 auto; }
.side-context .ctx-name { white-space: normal; overflow: hidden; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* 3. Organisation policies: the result card moves below when there is not enough room; questions keep a readable width */
div:has(> .pol-main) { flex-wrap: wrap; row-gap: 18px; }
div:has(> .pol-main) > .pol-main { flex: 1 1 420px !important; min-width: 0; }
div:has(> .pol-main) > .pol-result { flex: 1 1 330px !important; width: auto !important; max-width: 100%; }
.pol-q .status-btns { flex-wrap: wrap; }

/* 4. Phone width: wide tables scroll sideways inside their card, multi-column forms become one column, long tab rows wrap */
@media (max-width: 520px) {
  .shell-main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .c2-tabs, .case-tabs { flex-wrap: wrap; }
  .card [style*="grid-template-columns"]:not(.ropa-kpis) { grid-template-columns: 1fr !important; }
  .card .field, .card label.field { min-width: 0; }
  div:has(> .pol-main) > div:first-child { width: 100% !important; margin-right: 0 !important; }
  div:has(> .pol-main) > .pol-main { margin-right: 0 !important; flex-basis: 100% !important; }
}

/* 5. Reports: the rotated DRAFT mark stays inside the report page instead of widening the screen */
.report-paper { overflow: hidden; }
