:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --text: #172033;
  --muted: #6f7b8f;
  --line: #e4e9f1;
  --primary: #2457d6;
  --primary-dark: #1947b7;
  --primary-soft: #edf3ff;
  --danger: #cf3f4f;
  --warning: #d58a13;
  --success: #16835d;
  --shadow: 0 14px 38px rgba(34, 52, 86, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; color: var(--primary-dark); }

.global-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  width: 100%;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px clamp(18px, 4vw, 48px);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand-row, .brand, .main-nav { display: flex; align-items: center; }
.brand-row { gap: clamp(22px, 4vw, 54px); }
.brand { gap: 11px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; color: #fff; background: var(--primary);
  font-size: 13px; font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 7px 18px rgba(36, 87, 214, .24);
}
.brand-mark-lens {
  position: relative;
  overflow: hidden;
}
.brand-mark-lens .lens-ring,
.brand-mark-lens .lens-handle,
.brand-mark-lens .lens-glint {
  position: absolute;
  display: block;
}
.brand-mark-lens .lens-ring {
  width: 15px;
  height: 15px;
  border: 2.8px solid #fff;
  border-radius: 50%;
  left: 10px;
  top: 8px;
  animation: brandLensMove 2.2s ease-in-out infinite;
}
.brand-mark-lens .lens-handle {
  width: 10px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  left: 21px;
  top: 22px;
  transform: rotate(45deg);
  transform-origin: left center;
  animation: brandLensHandleMove 2.2s ease-in-out infinite;
}
.brand-mark-lens .lens-glint {
  width: 5px;
  height: 2px;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  left: 14px;
  top: 12px;
  transform: rotate(-35deg);
  animation: brandLensMove 2.2s ease-in-out infinite;
}
@keyframes brandLensMove {
  0%, 100% { transform: translateX(-2px) translateY(0); }
  50% { transform: translateX(2px) translateY(-1px); }
}
@keyframes brandLensHandleMove {
  0%, 100% { transform: translateX(-2px) rotate(45deg); }
  50% { transform: translateX(2px) translateY(-1px) rotate(45deg); }
}
.brand-copy { display: grid; line-height: 1.15; }
.brand-copy strong { font-size: 14px; }
.brand-copy small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.main-nav { gap: 8px; }
.main-nav a {
  color: #44506a; padding: 9px 12px; border-radius: 9px; font-size: 14px; font-weight: 650;
}
.main-nav a:hover { background: var(--primary-soft); color: var(--primary); }
.badge {
  display: inline-grid; min-width: 20px; height: 20px; place-items: center;
  margin-left: 7px; padding: 0 6px; border-radius: 999px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 800;
}
.profile-wrap { position: relative; }
.profile-btn { margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer; }
.profile-icon {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 50%; background: #18233a; color: #fff; font-weight: 750;
}
.profile-menu {
  display: none; position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 215px; padding: 8px; border: 1px solid var(--line);
  border-radius: 13px; background: var(--surface); box-shadow: var(--shadow);
}
.profile-menu.is-open { display: grid; }
.profile-menu a { padding: 10px 12px; color: #344057; border-radius: 8px; font-size: 13px; font-weight: 600; }
.profile-menu a:hover { background: var(--surface-soft); }
.profile-menu .menu-danger { color: var(--danger); }

.container {
  width: min(1420px, calc(100% - 32px));
  margin: 30px auto 48px;
  padding: 0;
  background: transparent;
}
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.page-head h1, .container > header h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.025em; }
.page-head p { margin: 7px 0 0; color: var(--muted); }

.panel, section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
section { padding: clamp(18px, 2vw, 26px); margin-bottom: 20px; }
section h2 { margin: 0 0 16px; font-size: 18px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.muted { color: var(--muted); }

.stats-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px;
}
.stats-grid.stats-grid-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.stat-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; box-shadow: 0 8px 24px rgba(34,52,86,.05);
}
.stat-card span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .045em; }
.stat-card strong { display: block; margin-top: 7px; font-size: 28px; line-height: 1; }

form { margin: 0; }
.form-grid { display: grid; grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto; gap: 12px; align-items: end; }
label { display: grid; gap: 7px; color: #49546b; font-size: 13px; font-weight: 700; }
input[type="email"], input[type="password"], input[type="url"], input[type="text"], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid #d7deea; border-radius: 9px;
  background: #fff; color: var(--text); font: inherit; outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus { border-color: #80a2f4; box-shadow: 0 0 0 3px rgba(36,87,214,.10); }
button, .btn, .btn-cancel, .btn-archive {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 9px 14px; border: 0; border-radius: 9px;
  background: var(--primary); color: #fff; font: inherit; font-size: 13px; font-weight: 750;
  cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover, .btn-archive:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 6px 16px rgba(36,87,214,.18); }
button:active, .btn:active { transform: translateY(1px); }
.btn-secondary, .btn-cancel { background: #eef2f7; color: #4b566c; }
.btn-secondary:hover, .btn-cancel:hover { background: #e1e7ef; color: #28344b; }
.btn-danger { background: #fff0f2; color: var(--danger); }
.btn-danger:hover { background: #ffe2e6; color: #ac293a; box-shadow: none; }
.btn-small { min-height: 34px; padding: 7px 10px; font-size: 12px; }
.inline-form { display: flex; align-items: center; gap: 8px; }
.filter-form { display: flex; align-items: center; gap: 10px; }
.filter-form input { min-width: min(420px, 64vw); }

.table-responsive { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 760px; background: #fff; }
th, td { padding: 13px 14px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th { background: #f8fafc; color: #667187; font-size: 11px; text-transform: uppercase; letter-spacing: .055em; white-space: nowrap; }
td { font-size: 13px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfcff; }
.url-cell { min-width: 290px; }
.url-main { display: block; max-width: 480px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 650; }
.url-host { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.selector-input { min-width: 180px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.status-dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: #b7c0cf; }
.status-dot.ok { background: var(--success); }
.priority-toggle { width: 18px; height: 18px; accent-color: var(--primary); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.pagination a { min-width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #46516a; font-size: 12px; font-weight: 700; }
.pagination a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.scraped-box { max-height: 180px; overflow: auto; padding: 11px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-soft); white-space: pre-wrap; line-height: 1.55; }
mark { padding: 1px 2px; border-radius: 3px; background: #fff0a8; color: inherit; }
tr.changed td:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.empty-state { padding: 34px 20px; text-align: center; color: var(--muted); }
.errors { margin-bottom: 16px; padding: 12px 14px; border: 1px solid #f2bcc3; border-radius: 10px; background: #fff3f5; color: #a72f3e; }

.log-grid { display: grid; gap: 16px; }
.log-card { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.log-card h2 { margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.log-card pre { margin: 0; max-height: 360px; overflow: auto; padding: 15px 16px; background: #101827; color: #d9e2f2; font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }

@media (max-width: 840px) {
  .global-header { align-items: flex-start; padding: 10px 16px; }
  .brand-copy { display: none; }
  .brand-row { gap: 10px; }
  .main-nav a { padding: 9px 8px; }
  .container { width: min(100% - 20px, 1420px); margin-top: 18px; }
  .stats-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .filter-form { align-items: stretch; flex-direction: column; }
  .filter-form input { min-width: 0; }
  .page-head { align-items: flex-start; flex-direction: column; }
}

/* Fonti evento */
.narrow-container { max-width: 1050px; }
.event-source-form { display: grid; gap: 18px; }
.event-form-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(220px, .8fr); gap: 14px; }
.event-source-form textarea { min-height: 310px; resize: vertical; line-height: 1.55; }
.field-help { color: var(--muted); font-weight: 500; line-height: 1.45; }
.form-actions.align-end { display: flex; align-items: end; justify-content: flex-end; }
.success-box { margin-bottom: 18px; padding: 12px 14px; border: 1px solid #a8dec9; border-radius: 10px; background: #effbf6; color: #116b4b; }
.source-feed-card { display: grid; grid-template-columns: minmax(240px, .8fr) minmax(360px, 1.2fr); gap: 26px; align-items: center; }
.source-feed-card h2 { margin: 5px 0 6px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.feed-url-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.feed-url-row input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: #f8fafc; }
.event-source-list { display: grid; gap: 12px; }
.event-source-card { display: flex; justify-content: space-between; gap: 24px; padding: 18px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.event-source-main { min-width: 0; flex: 1; }
.event-source-main h3 { margin: 7px 0 8px; font-size: 17px; }
.event-source-main p { margin: 0 0 8px; color: #4d596f; line-height: 1.55; }
.event-source-meta { display: flex; flex-wrap: wrap; gap: 8px 12px; color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; padding: 3px 7px; border-radius: 999px; font-weight: 800; }
.status-pill.published { color: #116b4b; background: #eaf8f2; }
.status-pill.draft { color: #8a5a0a; background: #fff5dc; }
.source-origin { display: block; max-width: 720px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.event-source-actions { display: flex; flex-wrap: wrap; align-content: flex-start; justify-content: flex-end; gap: 7px; min-width: 210px; }
@media (max-width: 840px) {
  .event-form-grid, .source-feed-card { grid-template-columns: 1fr; }
  .feed-url-row { grid-template-columns: 1fr; }
  .event-source-card { flex-direction: column; }
  .event-source-actions { justify-content: flex-start; min-width: 0; }
}

/* Selezione multipla fonti evento */
.select-col { width: 44px; min-width: 44px; text-align: center; }
.select-col input[type="checkbox"], .batch-include input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none !important; transform: none !important; }
#batch-selected-count { display: inline-grid; min-width: 20px; height: 20px; place-items: center; padding: 0 6px; border-radius: 999px; background: rgba(255,255,255,.2); font-size: 11px; }
.batch-event-form { display: grid; gap: 16px; }
.batch-toolbar { position: sticky; top: 82px; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; }
.batch-toolbar > div { display: grid; gap: 2px; }
.batch-event-list { display: grid; gap: 16px; }
.batch-event-card { display: grid; gap: 15px; margin: 0; }
.batch-event-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.batch-include { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: 9px; color: var(--text); font-size: 14px; }
.batch-event-card textarea { min-height: 210px; resize: vertical; }
.batch-status { max-width: 260px; }
.batch-bottom-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 6px 0 24px; }
@media (max-width: 840px) {
  .batch-toolbar { position: static; align-items: stretch; flex-direction: column; }
  .batch-event-head { align-items: flex-start; flex-direction: column; }
  .batch-bottom-actions { flex-direction: column-reverse; }
}

/* Stato monitor e analisi selettori */
.health-stats { grid-template-columns: repeat(7, minmax(120px, 1fr)); }
.health-stat { color: inherit; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.health-stat:hover { transform: translateY(-1px); border-color: #b9c8e8; }
.health-stat.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(36,87,214,.08); }
.health-table { min-width: 1180px; }
.health-pill { display: inline-flex; align-items: center; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.health-pill.selector { background: #fff3d8; color: #8a5a0a; }
.health-pill.blocked { background: #fff0f2; color: #a72f3e; }
.health-pill.url { background: #ffe9e5; color: #a13a29; }
.health-pill.timeout { background: #f4edff; color: #6840a6; }
.health-pill.ssl { background: #ebf4ff; color: #245ca8; }
.health-pill.fetch { background: #f1f3f6; color: #4e596d; }
.health-pill.healthy { background: #eaf8f2; color: #116b4b; }
.health-pill.unknown { background: #f1f3f6; color: #6a7384; }
.health-http { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 700; }
.health-detail { max-width: 320px; color: #4d596f; line-height: 1.45; }
.selector-code { display: inline-block; max-width: 290px; overflow: hidden; text-overflow: ellipsis; padding: 4px 7px; border: 1px solid #dfe5ef; border-radius: 6px; background: #f7f9fc; color: #33405a; font: 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.selector-code.large { max-width: min(720px, 70vw); font-size: 13px; }
.selector-current-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.selector-suggestions { display: grid; gap: 12px; }
.selector-suggestion { padding: 15px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.selector-suggestion-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.selector-suggestion-head > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.selector-count { color: var(--muted); font-size: 11px; font-weight: 700; }
.selector-preview { margin-top: 12px; padding: 11px 12px; border: 1px solid #e3e8f0; border-radius: 9px; background: #f8fafc; color: #4b566c; font-size: 12px; line-height: 1.55; }
.selector-preview.compact { margin-top: 8px; }
@media (max-width: 1180px) { .health-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 840px) {
  .health-stats { grid-template-columns: 1fr 1fr; }
  .selector-suggestion-head { align-items: flex-start; flex-direction: column; }
}

.browser-status-card{margin:0 0 18px;padding:14px 16px;border:1px solid #d9dee8;border-radius:12px;background:#fff;display:flex;justify-content:space-between;gap:12px;align-items:center}.browser-status-card.available{border-color:#b9dfc5}.browser-status-card.unavailable{border-color:#ead0a8}@media(max-width:760px){.browser-status-card{align-items:flex-start;flex-direction:column}}

/* Notifiche: confronto Adesso / Prima ridimensionabile */
:root { --history-now-width: 50%; }
.history-compare-toolbar {
  position: sticky;
  top: 82px;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 8px 24px rgba(34,52,86,.06);
  backdrop-filter: blur(10px);
}
.history-width-control { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.history-width-control label { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.history-width-control input[type="range"] { width: min(380px, 34vw); accent-color: var(--primary); cursor: ew-resize; }
.history-before-width { color: var(--muted); font-size: 12px; white-space: nowrap; }
.history-list { display: grid; gap: 16px; }
.history-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 6px 22px rgba(34,52,86,.045);
}
.history-card.changed { border-left: 4px solid var(--warning); }
.history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}
.history-card-ident { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.history-card-ident .event-select { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--primary); cursor: pointer; }
.history-site-meta { display: grid; gap: 3px; min-width: 0; }
.history-url { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 750; }
.history-date { color: var(--muted); font-size: 11px; }
.history-card-actions { flex: 0 0 auto; }
.history-compare { display: flex; align-items: stretch; min-width: 720px; width: 100%; background: #f7f9fc; }
.history-compare-pane { min-width: 0; margin: 0; padding: 14px; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
.history-now-pane { flex: 0 0 calc(var(--history-now-width) - 6px); width: calc(var(--history-now-width) - 6px); }
.history-before-pane { flex: 1 1 auto; width: calc(100% - var(--history-now-width) - 6px); background: #fbfcfe; }
.history-pane-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 9px; }
.history-pane-title strong { font-size: 12px; letter-spacing: .055em; }
.history-pane-title span { color: var(--muted); font-size: 11px; }
.history-now-pane .history-pane-title strong { color: var(--primary); }
.history-before-pane .history-pane-title strong { color: #68748a; }
.history-scraped-box { max-height: 300px; min-height: 120px; border-radius: 8px; background: #fff; }
.history-now-content { border-color: #cddafa; background: #fbfdff; }
.history-resizer {
  position: relative;
  flex: 0 0 12px;
  width: 12px;
  min-height: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #edf1f7;
  cursor: ew-resize;
  touch-action: none;
  box-shadow: inset 1px 0 #dfe5ef, inset -1px 0 #dfe5ef;
}
.history-resizer:hover, .history-resizer:focus { background: #dfe8fb; box-shadow: inset 1px 0 #b8c8ed, inset -1px 0 #b8c8ed; }
.history-resizer span { position: absolute; top: 50%; left: 50%; width: 3px; height: 34px; transform: translate(-50%,-50%); border-radius: 999px; background: #93a2ba; }
body.history-resizing { cursor: ew-resize; user-select: none; }

@media (max-width: 840px) {
  .history-compare-toolbar { position: static; align-items: stretch; flex-direction: column; }
  .history-width-control { flex-wrap: wrap; }
  .history-width-control input[type="range"] { width: 100%; order: 3; }
  .history-card-head { align-items: flex-start; flex-direction: column; }
  .history-card-actions { width: 100%; }
  .history-card { overflow-x: auto; }
  .history-compare { display: flex; min-width: 720px; }
  .history-resizer { display: block; }
  .history-scraped-box { max-height: 260px; min-height: 90px; }
}
.history-select-all { display: inline-flex; grid-template-columns: none; align-items: center; gap: 7px; white-space: nowrap; color: #49546b; font-size: 12px; font-weight: 750; }
.history-select-all input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; }
@media (max-width: 840px) { .history-select-all { align-self: flex-start; } }

/* ===== Mobile UX 2026 ===== */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  font-size: 20px;
  line-height: 1;
}
.nav-toggle:hover { background: var(--surface-soft); color: var(--text); box-shadow: none; }

@media (max-width: 900px) {
  body { overflow-x: hidden; }
  .global-header {
    min-height: 62px;
    padding: 9px 12px;
    align-items: center;
    gap: 10px;
  }
  .brand-row {
    min-width: 0;
    flex: 1;
    gap: 10px;
  }
  .brand { min-width: 0; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand-copy { display: grid; min-width: 0; }
  .brand-copy strong { white-space: nowrap; }
  .brand-copy small { display: none; }
  .nav-toggle { display: inline-grid; place-items: center; flex: 0 0 auto; }
  .main-nav {
    display: none;
    position: fixed;
    left: 10px;
    right: 10px;
    top: 68px;
    z-index: 1100;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 18px 45px rgba(15,23,42,.16);
    backdrop-filter: blur(14px);
  }
  .main-nav.is-open { display: grid; gap: 4px; }
  .main-nav a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 10px 12px;
    border-radius: 9px;
    font-size: 14px;
  }
  .main-nav .badge { margin-left: auto; }
  .profile-wrap { flex: 0 0 auto; }
  .profile-icon { width: 36px; height: 36px; }
  .profile-menu {
    position: fixed;
    top: 68px;
    right: 10px;
    left: 10px;
    min-width: 0;
    max-height: calc(100vh - 82px);
    overflow-y: auto;
  }
  .profile-menu a { min-height: 44px; display: flex; align-items: center; }

  .container {
    width: calc(100% - 20px);
    margin: 16px auto 32px;
  }
  section { padding: 16px; border-radius: 13px; }
  .page-head h1, .container > header h1 { font-size: 26px; line-height: 1.15; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card strong { font-size: 24px; }

  input[type="email"], input[type="password"], input[type="url"], input[type="text"], select, textarea {
    min-height: 44px;
    font-size: 16px; /* evita zoom automatico iOS */
  }
  button, .btn, .btn-cancel, .btn-archive { min-height: 44px; }
  .btn-small { min-height: 40px; padding: 8px 10px; }
  .inline-form { min-width: 0; flex-wrap: wrap; }
  .inline-form input, .inline-form select { min-width: 0; flex: 1 1 150px; }
  .filter-form { width: 100%; }
  .filter-form button, .filter-form .btn { width: 100%; }
  .actions { width: 100%; gap: 8px; }
  .actions .btn, .actions button { flex: 1 1 calc(50% - 8px); }

  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
  }
  table { min-width: 700px; }
  th, td { padding: 11px 10px; }
  .url-main { max-width: 72vw; }

  .pagination {
    gap: 7px;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }
  .pagination a { flex: 0 0 38px; min-width: 38px; height: 38px; }
}

@media (max-width: 560px) {
  .global-header { padding-left: 10px; padding-right: 10px; }
  .brand-copy strong { font-size: 13px; }
  .container { width: calc(100% - 16px); }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card span { font-size: 10px; }
  .stat-card strong { font-size: 22px; }
  .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .actions .btn, .actions button { width: 100%; min-width: 0; }
}

@media (max-width: 760px) {
  /* Problemi: la tabella diventa una lista di schede leggibili */
  .health-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .health-table { display: block; min-width: 0; background: transparent; }
  .health-table thead { display: none; }
  .health-table tbody { display: grid; gap: 10px; }
  .health-table tr {
    display: block;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(34,52,86,.04);
  }
  .health-table td {
    display: grid;
    grid-template-columns: 88px minmax(0,1fr);
    gap: 9px;
    align-items: start;
    width: 100%;
    padding: 10px 11px;
    border-bottom: 1px solid var(--line);
  }
  .health-table td:last-child { border-bottom: 0; }
  .health-table td::before {
    color: #94a3b8;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .045em;
  }
  .health-table td:nth-child(1)::before { content: 'Sito'; }
  .health-table td:nth-child(2)::before { content: 'Stato'; }
  .health-table td:nth-child(3)::before { content: 'Dettaglio'; }
  .health-table td:nth-child(4)::before { content: 'Selettore'; }
  .health-table td:nth-child(5)::before { content: 'Ultimo evento'; }
  .health-table td:nth-child(6)::before { content: 'Azioni'; margin-top: 10px; }
  .health-table .url-cell { min-width: 0; }
  .health-table .url-main { max-width: none; white-space: normal; overflow-wrap: anywhere; }
  .health-detail { max-width: none; overflow-wrap: anywhere; }
  .selector-code, .selector-code.large { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-word; }
  .health-table .actions { display: grid; grid-template-columns: 1fr 1fr; }
  .health-table .actions form { display: block !important; }
  .health-table .actions .btn,
  .health-table .actions button { width: 100%; }
  .health-filter-links { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }

  /* Notifiche: toolbar compatta e confronto ancora affiancato come richiesto */
  .history-compare-toolbar { padding: 10px; gap: 10px; }
  .history-width-control { gap: 8px; }
  .history-card-head { padding: 10px 11px; }
  .history-url { white-space: normal; overflow-wrap: anywhere; line-height: 1.35; }
  .history-card-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .history-card-actions .btn,
  .history-card-actions button { width: 100%; }
  .history-card { -webkit-overflow-scrolling: touch; }
  .history-compare { min-width: 640px; }
  .history-compare-pane { padding: 10px; }
}

@media (max-width: 420px) {
  .health-stats { grid-template-columns: 1fr; }
  .health-table td { grid-template-columns: 76px minmax(0,1fr); }
  .history-compare { min-width: 600px; }
}

/* ===== Radio Radicale agenda exporter ===== */
.rr-container { max-width: 1280px; }
.rr-scan-form {
  display: grid;
  grid-template-columns: 170px 170px minmax(420px, 1fr) auto;
  gap: 14px;
  align-items: end;
}
.rr-scan-form input[type="date"] {
  width: 100%; min-height: 42px; padding: 9px 12px;
  border: 1px solid #d7deea; border-radius: 9px; background: #fff; font: inherit;
}
.rr-weekdays { margin: 0; padding: 0; border: 0; min-width: 0; }
.rr-weekdays legend { margin-bottom: 7px; color: #49546b; font-size: 13px; font-weight: 700; }
.rr-weekdays { display: flex; flex-wrap: wrap; gap: 6px; }
.rr-weekdays legend { width: 100%; }
.rr-day { display: inline-flex; grid-template-columns: none; align-items: center; gap: 5px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.rr-day input { width: 16px; height: 16px; accent-color: var(--primary); }
.rr-show-seen { grid-column: 1 / -1; display: inline-flex; grid-template-columns: none; align-items: center; gap: 8px; width: fit-content; }
.rr-show-seen input { width: 18px; height: 18px; accent-color: var(--primary); }
.rr-stats-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
.rr-selection-bar {
  position: sticky; top: 78px; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
}
.rr-selection-bar label { display: inline-flex; grid-template-columns: none; align-items: center; gap: 7px; }
.rr-selection-bar input { width: 18px; height: 18px; accent-color: var(--primary); }
.rr-selection-bar button { margin-left: auto; }
.rr-event-list { display: grid; gap: 11px; }
.rr-event-card { display: grid; grid-template-columns: 34px minmax(0,1fr); gap: 10px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.rr-event-card.is-seen { opacity: .75; background: #fbfcfe; }
.rr-event-select { padding-top: 3px; }
.rr-event-select input { width: 19px; height: 19px; accent-color: var(--primary); }
.rr-event-main h3 { margin: 7px 0 8px; font-size: 17px; line-height: 1.35; }
.rr-event-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 12px; }
.rr-description { color: #47536a; font-size: 13px; line-height: 1.55; }
.rr-description .tipo_media, .rr-description .alert { display: none; }
.rr-source-link { display: inline-flex; margin-top: 9px; font-size: 12px; font-weight: 700; }
.rr-excluded { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-soft); }
.rr-excluded summary { cursor: pointer; font-weight: 700; }
.rr-excluded li { margin: 7px 0; }
@media (max-width: 980px) {
  .rr-scan-form { grid-template-columns: 1fr 1fr; }
  .rr-weekdays { grid-column: 1 / -1; }
  .rr-scan-form > button { grid-column: 1 / -1; }
  .rr-stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .rr-scan-form { grid-template-columns: 1fr; }
  .rr-weekdays, .rr-show-seen, .rr-scan-form > button { grid-column: auto; }
  .rr-day { flex: 1 0 calc(25% - 6px); justify-content: center; }
  .rr-selection-bar { top: 68px; align-items: stretch; }
  .rr-selection-bar button { width: 100%; margin-left: 0; }
  .rr-event-card { grid-template-columns: 28px minmax(0,1fr); padding: 13px 11px; }
}


/* ===== UI alignment hardening: Radio Radicale ===== */
.rr-scan-form > label:not(.rr-show-seen) {
  min-width: 0;
}
.rr-scan-form .rr-weekdays {
  display: flex !important;
  flex-flow: row wrap !important;
  align-items: center !important;
  align-content: flex-start !important;
  gap: 8px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
.rr-scan-form .rr-weekdays > legend {
  flex: 0 0 100% !important;
  width: 100% !important;
  margin: 0 0 7px !important;
  padding: 0 !important;
}
.rr-scan-form .rr-weekdays > .rr-day {
  display: inline-flex !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-width: 66px !important;
  min-height: 40px !important;
  grid-template-columns: none !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 8px 11px !important;
  border: 1px solid var(--line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  cursor: pointer;
}
.rr-scan-form .rr-weekdays > .rr-day > input[type="checkbox"],
.rr-scan-form .rr-show-seen > input[type="checkbox"] {
  display: block !important;
  flex: 0 0 auto !important;
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
}
.rr-scan-form .rr-weekdays > .rr-day > span,
.rr-scan-form .rr-show-seen > span {
  display: inline !important;
  white-space: nowrap;
}
.rr-scan-form .rr-show-seen {
  display: inline-flex !important;
  flex-direction: row !important;
  grid-template-columns: none !important;
  align-items: center !important;
  gap: 8px !important;
  width: fit-content !important;
  min-height: 40px;
  margin: 0 !important;
}
@media (min-width: 981px) {
  .rr-scan-form {
    grid-template-columns: minmax(155px, 180px) minmax(155px, 180px) minmax(540px, 1fr) auto;
  }
  .rr-scan-form .rr-weekdays {
    flex-wrap: nowrap !important;
  }
  .rr-scan-form .rr-weekdays > legend {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
  }
}
@media (max-width: 980px) {
  .rr-scan-form .rr-weekdays { flex-wrap: wrap !important; }
}
@media (max-width: 600px) {
  .rr-scan-form .rr-weekdays > .rr-day {
    flex: 1 1 calc(25% - 8px) !important;
    min-width: 68px !important;
  }
}

/* ===== AgenSalute event finder ===== */
.ags-container { max-width: 1280px; }
.ags-settings-form {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 220px;
  gap: 14px;
  align-items: end;
}
.ags-settings-form label { min-width: 0; }
.ags-settings-form input[type="url"],
.ags-settings-form select,
.ags-settings-form textarea {
  width: 100%;
  margin-top: 6px;
}
.ags-keywords { grid-column: 1 / -1; }
.ags-keywords textarea { min-height: 190px; resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.45; }
.ags-keywords small { display: block; margin-top: 6px; color: var(--muted); }
.ags-settings-actions { grid-column: 1 / -1; display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap; }
.ags-scan-summary { margin: 14px 0; padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); color: #47536a; font-size: 13px; }
.ags-scan-summary details { margin-top: 8px; }
.ags-stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ags-results-head { gap: 12px; }
.ags-selection-bar {
  position: sticky; top: 78px; z-index: 20;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 12px;
  background: rgba(255,255,255,.96); backdrop-filter: blur(10px);
}
.ags-selection-bar label { display: inline-flex; align-items: center; gap: 7px; }
.ags-selection-bar input { width: 18px; height: 18px; accent-color: var(--primary); }
.ags-selection-bar button { margin-left: auto; }
.ags-event-list { display: grid; gap: 10px; }
.ags-event-card {
  display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 10px;
  padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff;
}
.ags-event-card.status-rejected, .ags-event-card.status-exported { opacity: .72; background: #fbfcfe; }
.ags-event-select { padding-top: 3px; }
.ags-event-select input { width: 19px; height: 19px; accent-color: var(--primary); }
.ags-event-main h3 { margin: 8px 0 7px; font-size: 17px; line-height: 1.35; }
.ags-event-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; color: var(--muted); font-size: 12px; align-items: center; }
.ags-organizer { margin: 7px 0 0; color: #566177; font-size: 13px; }
.ags-event-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.ags-event-actions button { min-height: 36px; }

@media (max-width: 860px) {
  .ags-settings-form { grid-template-columns: 1fr; }
  .ags-keywords, .ags-settings-actions { grid-column: auto; }
  .ags-stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .ags-settings-actions { display: grid; grid-template-columns: 1fr; }
  .ags-settings-actions button { width: 100%; }
  .ags-selection-bar { top: 68px; align-items: stretch; }
  .ags-selection-bar button { width: 100%; margin-left: 0; }
  .ags-event-card { grid-template-columns: 28px minmax(0,1fr); padding: 12px 10px; }
  .ags-event-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .ags-event-actions .btn, .ags-event-actions button { width: 100%; }
}
.ags-container .success-message {
  margin-bottom: 16px; padding: 12px 14px;
  border: 1px solid #bfe3cf; border-radius: 10px;
  background: #f0fbf5; color: #276749;
}

/* ===== Production UI system ===== */
.main-nav .notifications-link{font-weight:750;display:inline-flex;align-items:center;gap:6px}
.main-nav .notification-badge{display:inline-grid;min-width:30px;height:30px;place-items:center;padding:0 9px;border-radius:999px;background:var(--danger);color:#fff;font-size:15px;line-height:1;font-weight:850;box-shadow:0 4px 10px rgba(207,63,79,.24)}
.main-nav > a.is-active,.nav-dropdown.is-active > .nav-dropdown-toggle,.nav-dropdown-menu a.is-active{background:var(--primary-soft);color:var(--primary)}
.nav-dropdown{position:relative;display:flex;align-items:center}.nav-dropdown-toggle{display:inline-flex;align-items:center;gap:7px;min-height:38px;margin:0;padding:9px 12px;border:0;border-radius:9px;background:transparent;color:#44506a;box-shadow:none;font:inherit;font-size:14px;font-weight:650;cursor:pointer}.nav-dropdown-toggle:hover,.nav-dropdown-toggle:focus-visible,.nav-dropdown.is-open .nav-dropdown-toggle{background:var(--primary-soft);color:var(--primary);box-shadow:none;outline:none}.nav-dropdown-caret{font-size:11px;transition:transform .16s ease}.nav-dropdown.is-open .nav-dropdown-caret{transform:rotate(180deg)}.nav-dropdown-menu{display:none;position:absolute;top:calc(100% + 8px);left:0;z-index:1200;min-width:215px;padding:7px;border:1px solid var(--line);border-radius:12px;background:var(--surface);box-shadow:var(--shadow)}.nav-dropdown.is-open .nav-dropdown-menu{display:grid;gap:2px}.nav-dropdown-menu a{display:flex;align-items:center;min-height:40px;padding:9px 11px;border-radius:8px;color:#344057;font-size:13px;font-weight:650;white-space:nowrap}.nav-dropdown-menu a:hover{background:var(--surface-soft);color:var(--primary)}
.profile-menu-label{display:block;padding:7px 12px 4px;color:var(--muted);font-size:11px;font-weight:800;letter-spacing:.08em;text-transform:uppercase}.profile-menu .admin-separator{display:block;height:1px;margin:5px 6px;background:var(--line)}
.app-page{width:min(100% - 32px,1320px);margin:28px auto 56px}.app-page.app-page-wide{max-width:1500px}.app-page.app-page-narrow{max-width:920px}.page-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px;margin-bottom:18px;border:1px solid var(--line);border-radius:var(--radius);background:linear-gradient(135deg,#fff 0%,#f8fbff 100%);box-shadow:0 8px 30px rgba(15,23,42,.05)}.page-hero h1{margin:0;font-size:clamp(28px,3vw,38px);letter-spacing:-.03em;color:#0f172a}.page-hero p{margin:7px 0 0;color:var(--muted);max-width:760px}.page-hero-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}
.ui-card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:0 4px 18px rgba(15,23,42,.035)}.ui-card + .ui-card{margin-top:16px}.ui-card h2,.ui-card h3{margin-top:0}.ui-grid{display:grid;gap:16px}.ui-grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.ui-grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ui-form{display:grid;gap:14px}.ui-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.ui-form label,.field-label{display:grid;gap:7px;color:#334155;font-size:.86rem;font-weight:750}.ui-form input,.ui-form select,.ui-form textarea,.ui-input{width:100%;min-height:42px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;font:inherit}.ui-form textarea{min-height:120px;resize:vertical}.ui-form input:focus,.ui-form select:focus,.ui-form textarea:focus,.ui-input:focus{outline:3px solid rgba(36,87,214,.12);border-color:#86a7f4}.ui-subpanel{padding:15px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}.ui-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.ui-actions.end{justify-content:flex-end}.ui-actions.between{justify-content:space-between}.ui-table-wrap{overflow:auto;border:1px solid var(--line);border-radius:12px;background:#fff}.ui-table{width:100%;border-collapse:collapse;min-width:760px}.ui-table th,.ui-table td{padding:12px 14px;border-bottom:1px solid #eef2f7;text-align:left;vertical-align:top}.ui-table th{background:#f8fafc;color:#64748b;font-size:.76rem;text-transform:uppercase;letter-spacing:.05em}.ui-table tr:last-child td{border-bottom:0}.ui-table tbody tr:hover{background:#fbfdff}.ui-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.ui-kpi{padding:16px;border:1px solid var(--line);border-radius:13px;background:#fff}.ui-kpi span{display:block;color:var(--muted);font-size:.76rem;font-weight:750;text-transform:uppercase;letter-spacing:.045em}.ui-kpi strong{display:block;margin-top:6px;font-size:27px}.ui-note{padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-soft);color:#526078;font-size:.9rem}.ui-note.success{border-color:#bfe3cf;background:#f0fbf5;color:#276749}.ui-note.error{border-color:#fecaca;background:#fef2f2;color:#991b1b}.ui-note.warning{border-color:#fde68a;background:#fffbeb;color:#92400e}
.modal-overlay{display:none;position:fixed;inset:0;z-index:1600;padding:24px;background:rgba(15,23,42,.58);overflow:auto}.modal-overlay.is-open{display:grid;place-items:center}.modal-panel{width:min(760px,100%);max-height:min(88vh,900px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:16px;box-shadow:0 24px 70px rgba(15,23,42,.25)}.modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 20px;border-bottom:1px solid var(--line)}.modal-head h2,.modal-head h3{margin:0}.modal-body{padding:20px}.modal-close{border:0;background:transparent;color:#64748b;font-size:27px;line-height:1;cursor:pointer}
.auth-shell{min-height:100vh;display:grid;place-items:center;padding:24px}.auth-card{width:min(440px,100%);padding:28px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:var(--shadow)}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:22px}.auth-card h1{margin:0 0 6px}.auth-card p{color:var(--muted)}
.cron-code{width:100%;min-height:76px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#0f172a;color:#e2e8f0;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:12px;resize:vertical}.job-chip{display:inline-flex;align-items:center;padding:4px 8px;border-radius:999px;background:var(--primary-soft);color:var(--primary);font-size:12px;font-weight:750}
.rr-date-presets{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center;grid-column:1/-1;margin-bottom:.15rem}.rr-date-preset{appearance:none;border:1px solid #cbd5e1;background:#fff;color:#0f172a;border-radius:999px;padding:.58rem .9rem;font:inherit;font-weight:700;cursor:pointer;line-height:1}.rr-date-preset:hover,.rr-date-preset:focus-visible{border-color:#64748b;background:#f8fafc}.rr-date-preset.is-active{background:#0f172a;color:#fff;border-color:#0f172a}
@media(max-width:900px){.app-page{width:min(100% - 20px,1320px);margin-top:16px;margin-bottom:34px}.page-hero{padding:18px;flex-direction:column}.page-hero-actions{width:100%;justify-content:flex-start}.ui-grid-2,.ui-grid-3,.ui-form-grid{grid-template-columns:1fr}.ui-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.main-nav .notification-badge{min-width:32px;height:32px;margin-left:auto}.nav-dropdown{display:block;width:100%}.nav-dropdown-toggle{width:100%;min-height:44px;justify-content:space-between;padding:10px 12px}.nav-dropdown-menu{position:static;min-width:0;margin:2px 0 5px 12px;padding:4px 0 4px 9px;border:0;border-left:2px solid var(--line);border-radius:0;background:transparent;box-shadow:none}.nav-dropdown-menu a{min-height:42px;padding:9px 12px;white-space:normal}}
@media(max-width:600px){.ui-kpi-grid{grid-template-columns:1fr 1fr}.ui-card{padding:15px}.ui-actions{display:grid;grid-template-columns:1fr}.ui-actions .btn,.ui-actions button,.ui-actions a.btn{width:100%;justify-content:center}.rr-date-presets{display:grid;grid-template-columns:1fr}.rr-date-preset{width:100%;border-radius:10px;padding:.72rem .8rem}}
@media(max-width:420px){.ui-kpi-grid{grid-template-columns:1fr}}


/* ===== Refinements 2026-11-08 ===== */
.btn-archive-all{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:11px 18px;border:1px solid #22324a;border-radius:10px;background:#22324a;color:#fff;font-size:14px;font-weight:800;box-shadow:0 6px 16px rgba(34,50,74,.16)}
.btn-archive-all:hover,.btn-archive-all:focus-visible{background:#162237;color:#fff;box-shadow:0 8px 20px rgba(34,50,74,.22)}
.rr-date-preset:hover,.rr-date-preset:focus-visible{color:#0f172a !important}
.rr-date-preset.is-active:hover,.rr-date-preset.is-active:focus-visible{background:#0f172a !important;color:#fff !important;border-color:#0f172a !important}
.mts-date-range{grid-column:1/-1;padding:16px;border:1px solid var(--line);border-radius:12px;background:var(--surface-soft)}
.mts-date-range-head{margin-bottom:12px;align-items:flex-start}.mts-date-range-head h3{margin:0;font-size:16px}.mts-date-range-head p{margin-top:5px}
.mts-date-presets{margin-bottom:12px}.mts-date-clear{margin-left:auto}
.mts-date-fields{display:grid;grid-template-columns:repeat(2,minmax(0,220px));gap:12px}.mts-date-fields label{display:grid;gap:6px}.mts-date-fields input[type="date"]{width:100%;min-height:42px;padding:9px 12px;border:1px solid #d7deea;border-radius:9px;background:#fff;font:inherit}
.parlamento-page-head{margin:0 0 16px;padding:0}.parlamento-page-head h1{font-size:clamp(25px,3vw,34px)}
@media(max-width:600px){.btn-archive-all{width:100%;min-height:48px}.mts-date-fields{grid-template-columns:1fr}.mts-date-clear{margin-left:0}}
