﻿/* =====================================================================
   AROGIS - tema Bootstrap 5
   Sostituisce css/style_new.css + css/themes.css (tema Eakroko / BS3).
   Variabili in :root; nessun colore "hard coded" fuori da qui.
   ===================================================================== */
:root {
  --ar-nav-h: 56px;                 /* aggiornata via JS (checkMenu) */
  --ar-path-h: 30px;
  --ar-left-w: 270px;
  --ar-navbar-bg: #1c2b3a;          /* slate (come arogis_modern.css) */
  --ar-navbar-bg2: #14202c;
  --ar-navbar-fg: #e2e8f0;
  --ar-accent: #2a6e4a;             /* verde AROGIS (arogis_modern.css --green) */
  --ar-accent-mid: #3d9e6b;
  --ar-accent-light: #e8f5ee;
  --ar-body-bg: #f2f5f8;
  --bs-link-color-rgb: 42, 110, 74;
  --bs-link-hover-color-rgb: 61, 158, 107;
  --ar-card-border: #dbe2ea;
  --ar-card-head: #f8fafc;
  --ar-muted: #64748b;
  /* eventi calendario (it_calendajson.asp emette le classi ar-ev / ar-ev-r) */
  --ar-cal-ev-bg: var(--ar-accent);
  --ar-cal-ev-fg: #ffffff;
  --ar-cal-ev-r-bg: #dc2626;
  --ar-cal-ev-r-fg: #ffffff;
  --ar-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-font-size: .875rem;
  --bs-body-font-family: var(--ar-font);
  --bs-border-radius: .375rem;
}

html { font-size: 14px; }
body.ar-body {
  background: var(--ar-body-bg);
  font-family: var(--ar-font);
  padding-top: calc(var(--ar-nav-h) + var(--ar-path-h));
  color: #1f2937;
}

/* ---------- Navbar ------------------------------------------------- */
.ar-navbar {
  background: linear-gradient(180deg, var(--ar-navbar-bg) 0%, var(--ar-navbar-bg2) 100%);
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
  min-height: var(--ar-nav-h);
  padding-top: .25rem; padding-bottom: .25rem;
}
.ar-navbar .navbar-brand.ar-brand { display: flex; align-items: center; padding-top: .2rem; padding-bottom: .2rem; }
.ar-navbar .navbar-brand.ar-brand .ar-brand-img { height: 30px; width: auto; display: block; }
@media (max-width: 575.98px) { .ar-navbar .navbar-brand.ar-brand .ar-brand-img { height: 26px; } }
.ar-navbar .nav-link { color: var(--ar-navbar-fg); padding: .5rem .75rem; white-space: nowrap; }
.ar-navbar .nav-link:hover, .ar-navbar .nav-link:focus { color: #fff; background: rgba(255,255,255,.08); border-radius: .375rem; }
.ar-navbar .nav-item.active > .nav-link, .ar-navbar .nav-link.active { color: #fff; background: rgba(255,255,255,.14); border-radius: .375rem; }
.ar-navbar .dropdown-menu { font-size: .875rem; border-color: var(--ar-card-border); }
.ar-navbar .dropdown-item { padding: .35rem 1rem; }
.ar-navbar .ar-logo img { background: #fff; border-radius: .25rem; padding: 2px 6px; }
.ar-navbar .ar-usernav img { vertical-align: middle; }

/* sottomenu a scomparsa (dropend) */
.dropdown-menu .ar-submenu > .dropdown-toggle::after { float: right; margin-top: .5em; }
@media (min-width: 992px) {
  .ar-navbar .dropdown-menu .dropdown-menu { top: -.5rem; left: 100%; margin-left: 0; }
  .ar-navbar .ar-submenu:hover > .dropdown-menu { display: block; }
}
@media (max-width: 991.98px) {
  .ar-navbar .dropdown-menu { border: 0; background: rgba(255,255,255,.06); }
  .ar-navbar .dropdown-menu .dropdown-item { color: var(--ar-navbar-fg); }
  .ar-navbar .dropdown-menu .dropdown-menu { margin-left: 1rem; }
  .ar-navbar .dropdown-item:hover { background: rgba(255,255,255,.1); color: #fff; }
}

/* ---------- Path bar (breadcrumb) -------------------------------- */
.ar-pathbar {
  position: fixed; top: var(--ar-nav-h); left: 0; right: 0; z-index: 1020;
  height: var(--ar-path-h); line-height: var(--ar-path-h);
  padding: 0 1rem; font-size: .8rem; color: #334155;
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--ar-card-border);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ar-pathbar a { color: #334155; text-decoration: none; }
.ar-pathbar a:hover { color: var(--ar-accent); }
.ar-pathbar .fa-chevron-right { font-size: .65rem; color: #94a3b8; margin: 0 .25rem; }
body.ar-body.ar-nopath { padding-top: var(--ar-nav-h); }
.ar-pathbar.d-none ~ .ar-content { margin-top: calc(-1 * var(--ar-path-h)); }

/* ---------- Contenuto -------------------------------------------- */
.ar-content { padding: .75rem .25rem 1rem; }
.ar-content > #main > .container-fluid { padding-left: .75rem; padding-right: .75rem; }

/* layout a due colonne (pagine con mnleft: #left + #main) */
body.ar-has-left .ar-content { display: flex; align-items: flex-start; gap: .75rem; padding-left: .75rem; padding-right: .75rem; }
body.ar-has-left #left {
  flex: 0 0 var(--ar-left-w); width: var(--ar-left-w); max-width: 100%;
  background: #fff; border: 1px solid var(--ar-card-border); border-radius: .5rem;
  padding: .75rem; position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem);
  max-height: calc(100vh - var(--ar-nav-h) - var(--ar-path-h) - 1.5rem); overflow: auto;
}
body.ar-has-left #left .btn { margin-bottom: .35rem; text-align: left; }
body.ar-has-left #left table { width: 100%; font-size: .85rem; }
body.ar-has-left #main { flex: 1 1 auto; min-width: 0; }
/* pagine in cui un <form> (o un div) avvolge #left e #main: il wrapper non deve rompere il flex */
body.ar-has-left .ar-content > form, body.ar-has-left .ar-content > div:has(> #left), body.ar-has-left .ar-content > div:has(> #main) { display: contents; }
/* i modali, i dialog e gli overlay che stanno a fianco di #left/#main restano com'e' (BS5 li nasconde/posiziona da solo) */
body.ar-has-left .ar-content > .modal { display: none; }
body.ar-has-left .ar-content > .modal.show { display: block; }
body.ar-has-left .ar-content > form.d-flex { display: flex !important; flex: 1 1 auto; min-width: 0; }
.text-justify { text-align: justify !important; }
tr.tbrigaBianco > td, .tbrigaBianco { background: #fff; }
tr.tbrigaGiallo > td, .tbrigaGiallo { background: #fef9c3; }
tr.tbrigaArancio > td, .tbrigaArancio { background: #ffedd5; }
tr.tbrigaRosso > td, .tbrigaRosso { background: #fee2e2; }
/* tbrigaC / tbrigaS = righe alternate (chiaro/scuro), NON allineamento */
tr.tbrigaC > td, .tbrigaC { background: #f8fafc; } tr.tbrigaS > td, .tbrigaS { background: #fff; } .tbrigaF { font-weight: 600; }
.tbrigaR, .tbrigaR > td { color: #b91c1c; }
.tbrigaV, .tbrigaV > td { color: #15803d; }
.tbrigaXX, .tbrigaXX > td { background: #fee2e2; }
tr.tbcellaG > td, td.tbcellaG { background: #dcfce7; }
.card.ar-box.lime > .card-header { background: #ecfccb; }
.card.ar-box.teal > .card-header { background: #ccfbf1; }
.card.ar-box.purple > .card-header { background: #ede9fe; }
.card.ar-box.pink > .card-header, .card.ar-box.magenta > .card-header { background: #fce7f3; }
.card.ar-box.lightgrey > .card-header { background: #f1f5f9; }
.card.ar-box.satgreen > .card-header, .card.ar-box.green > .card-header { background: #dcfce7; }
.card.ar-box.satblue > .card-header, .card.ar-box.darkblue > .card-header { background: #dbeafe; }
.card.ar-box.lightred > .card-header { background: #fee2e2; }
.card.ar-box.brown > .card-header { background: #fef3c7; }
.card.ar-box.black > .card-header { background: #e5e7eb; }
/* chat allarme (co_allarme.asp) */
ul.messages { list-style: none; padding: 0; margin: 0; }
ul.messages > li { background: #f1f5f9; border-radius: .75rem; padding: .5rem .75rem; margin-bottom: .5rem; max-width: 85%; font-size: .85rem; }
ul.messages > li.mio, ul.messages > li.right { background: var(--ar-accent-light); margin-left: auto; }
ul.messages > li small, ul.messages > li .time { color: var(--ar-muted); font-size: .72rem; display: block; }
#left .ar-foto-mini, .ar-foto-mini { width: 40px; height: 40px; object-fit: cover; border-radius: .25rem; }
@media (max-width: 991.98px) {
  body.ar-has-left .ar-content { display: block; }
  body.ar-has-left #left { position: static; width: auto; max-height: none; margin-bottom: .75rem; display: none; }
  body.ar-has-left.ar-left-open #left { display: block; }
}

/* ---------- Card / "box" ----------------------------------------- */
.card.ar-box, .box { margin-bottom: 1rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; background: #fff; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.card.ar-box > .card-header, .box > .box-title {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  background: var(--ar-card-head); border-bottom: 1px solid var(--ar-card-border);
  padding: .5rem .875rem; min-height: 2.5rem;
  border-top-left-radius: .5rem; border-top-right-radius: .5rem;
}
.card.ar-box > .card-header h3, .card.ar-box > .card-header h4, .box > .box-title h3 {
  font-size: .95rem; font-weight: 600; margin: 0; color: #0f172a; text-transform: none; letter-spacing: 0;
}
.card.ar-box > .card-header:empty { display: none; }
.card.ar-box > .card-header .actions, .box .actions { display: flex; align-items: center; gap: .25rem; margin-left: auto; }
.card.ar-box > .card-header .actions a, .box .actions a { color: var(--ar-muted); padding: .15rem .4rem; border-radius: .25rem; text-decoration: none; }
.card.ar-box > .card-header .actions a:hover { background: #e2e8f0; color: #0f172a; }
.card.ar-box > .card-header .actions a.btn-success, .card.ar-box > .card-header .actions a.btn-primary, .card.ar-box > .card-header .actions a.btn-danger, .card.ar-box > .card-header .actions a.btn-warning { color: #fff; }
.card.ar-box > .card-header .actions a.btn-success:hover { background: #157347; color: #fff; }
.card.ar-box > .card-header .actions a.btn-primary:hover { background: var(--ar-accent-dark, #1f6b45); color: #fff; }
.card.ar-box > .card-body, .box > .box-content { padding: .875rem; }
.card.ar-box > .card-body.p-0 > .table, .box > .box-content.nopadding > .table { margin-bottom: 0; }
.card.ar-box.box-small > .card-header { padding: .35rem .75rem; min-height: 2rem; }
.card.ar-box.box-small > .card-body { padding: .5rem; }
.card.ar-box.box-mini > .card-body { padding: .35rem .5rem; }
.card.ar-box.ar-collapsed > .card-body, .card.ar-box.ar-collapsed > .table { display: none; }
.card.ar-box .card-body .card.ar-box { box-shadow: none; }
/* colori box (box-color + classi tema) */
.card.ar-box.red > .card-header, .box.red > .box-title { background: #fee2e2; }
.card.ar-box.green > .card-header, .box.green > .box-title { background: #dcfce7; }
.card.ar-box.blue > .card-header, .box.blue > .box-title { background: #dbeafe; }
.card.ar-box.orange > .card-header, .box.orange > .box-title { background: #ffedd5; }
.card.ar-box.yellow > .card-header { background: #fef9c3; }
.card.ar-box.grey > .card-header { background: #e5e7eb; }

/* Pannelli collassabili (ex panel-group) */
.card .card-header .ar-panel-toggle { display: block; color: inherit; text-decoration: none; font-weight: 600; }
.card .card-header .ar-panel-toggle::before { content: "\f078"; font: var(--fa-font-solid); font-size: .7rem; margin-right: .5rem; color: var(--ar-muted); transition: transform .2s; display: inline-block; }
.card .card-header .ar-panel-toggle.collapsed::before { transform: rotate(-90deg); }
.card .card-header .card-title { margin: 0; font-size: .95rem; }

/* ---------- Form --------------------------------------------------- */
.form-group { margin-bottom: .75rem; }
.form-label, .control-label, label.inline { font-size: .78rem; font-weight: 600; color: #475569; margin-bottom: .2rem; text-transform: none; }
.form-control-sm, .form-select-sm { font-size: .82rem; }
.form-control, .form-select { border-color: #cbd5e1; }
.form-control:focus, .form-select:focus { border-color: var(--ar-accent-mid); box-shadow: 0 0 0 .2rem rgba(42,110,74,.15); }
.form-control[readonly] { background: #f8fafc; }
.form-action { padding-top: 1.35rem; }
.form-group-xs { margin-bottom: .5rem; }
.form-group .btn.full, .btn.full { width: 100%; }
.check-line { display: inline-flex; align-items: center; gap: .35rem; margin-right: .75rem; }
.check-line input[type=checkbox], .check-line input[type=radio] { margin: 0; }
.ar-inline-check { display: inline-flex; align-items: center; gap: .35rem; }
.form-horizontal .row.mb-2 > .col-form-label { text-align: right; }
.input-group .btn { z-index: 0; }
.input-group-btn { display: contents; }
/* select2 dentro form compatti */
.select2-container--bootstrap-5 .select2-selection { min-height: calc(1.5em + .5rem + 2px); font-size: .82rem; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { font-size: .78rem; }
.select2-container { max-width: 100%; }
/* toggle legacy (bootstrap-toggle) -> form-switch */
.form-switch .form-check-input { width: 2.25em; height: 1.2em; cursor: pointer; }
.boxsuggerimenti { position: relative; z-index: 1030; }
.boxsuggerimenti .list-group-item { padding: .3rem .6rem; font-size: .82rem; cursor: pointer; }

/* datepicker / timepicker */
.datepicker, .bootstrap-timepicker-widget { font-size: .85rem; z-index: 1060 !important; }
.datepicker table tr td.active, .datepicker table tr td.active:hover { background-image: none; background-color: #0d6efd; }
.datepicker table tr td.today { background: #fef9c3; }

/* ---------- Pulsanti ---------------------------------------------- */
.btn { --bs-btn-font-size: .82rem; }
.btn-primary { --bs-btn-bg: var(--ar-accent); --bs-btn-border-color: var(--ar-accent); --bs-btn-hover-bg: #235c3e; --bs-btn-hover-border-color: #235c3e; --bs-btn-active-bg: #1d4d34; --bs-btn-active-border-color: #1d4d34; --bs-btn-disabled-bg: #7fb497; --bs-btn-disabled-border-color: #7fb497; --bs-btn-focus-shadow-rgb: 42, 110, 74; }
.btn-outline-primary { --bs-btn-color: var(--ar-accent); --bs-btn-border-color: var(--ar-accent); --bs-btn-hover-bg: var(--ar-accent); --bs-btn-hover-border-color: var(--ar-accent); --bs-btn-active-bg: var(--ar-accent); --bs-btn-active-border-color: var(--ar-accent); --bs-btn-focus-shadow-rgb: 42, 110, 74; }
.btn-info { --bs-btn-bg: #0e7490; --bs-btn-border-color: #0e7490; --bs-btn-color: #fff; --bs-btn-hover-bg: #155e75; --bs-btn-hover-border-color: #155e75; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #164e63; --bs-btn-active-color: #fff; }
.text-bg-primary, .bg-primary { background-color: var(--ar-accent) !important; }
.form-check-input:checked { background-color: var(--ar-accent); border-color: var(--ar-accent); }
.nav-tabs .nav-link.active { border-bottom: 2px solid var(--ar-accent); }
.page-link { color: var(--ar-accent); } .active > .page-link, .page-link.active { background-color: var(--ar-accent); border-color: var(--ar-accent); }
.datepicker table tr td.active, .datepicker table tr td.active:hover { background-color: var(--ar-accent) !important; }
.select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__rendered .select2-selection__choice { background: var(--ar-accent-light); border-color: #a7d9bc; }
.btn-sm, .btn-mini, .btn-xs { --bs-btn-padding-y: .2rem; --bs-btn-padding-x: .5rem; --bs-btn-font-size: .76rem; }
.btn-green { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; --bs-btn-color: #fff; --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #166534; --bs-btn-active-color: #fff; }
.btn-red { --bs-btn-bg: #dc2626; --bs-btn-border-color: #dc2626; --bs-btn-color: #fff; --bs-btn-hover-bg: #b91c1c; --bs-btn-hover-border-color: #b91c1c; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #991b1b; --bs-btn-active-color: #fff; }
.btn-default { --bs-btn-bg: #fff; --bs-btn-border-color: #cbd5e1; --bs-btn-color: #1f2937; --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-border-color: #94a3b8; --bs-btn-hover-color: #0f172a; }
.btn.form-control { display: inline-block; width: auto; }
.btn_toolbar-vertical { display: block; width: 100%; text-align: left; margin-bottom: .25rem; }
.bsend, .bsalva, .bcerca, .baddp, .beditp, .buttonrappmenu { display: inline-block; padding: .3rem .75rem; font-size: .82rem; border: 1px solid #cbd5e1; border-radius: .375rem; background: #fff; color: #1f2937; cursor: pointer; }
.bsend:hover, .bsalva:hover, .bcerca:hover, .baddp:hover, .beditp:hover, .buttonrappmenu:hover { background: #f1f5f9; }
.bsalva { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.bsalva:hover { background: #235c3e; }
.bsend { background: #16a34a; border-color: #16a34a; color: #fff; }
.bsend:hover { background: #15803d; }

/* colori pulsanti del vecchio tema (usati anche da VBScript in it_top.asp: sticona) */
.btn-lightgrey { --bs-btn-bg: #cbd5e1; --bs-btn-border-color: #cbd5e1; --bs-btn-color: #1f2937; --bs-btn-hover-bg: #94a3b8; --bs-btn-hover-border-color: #94a3b8; --bs-btn-hover-color: #0f172a; }
.btn-grey { --bs-btn-bg: #64748b; --bs-btn-border-color: #64748b; --bs-btn-color: #fff; --bs-btn-hover-bg: #475569; --bs-btn-hover-border-color: #475569; --bs-btn-hover-color: #fff; }
.btn-yellow { --bs-btn-bg: #eab308; --bs-btn-border-color: #eab308; --bs-btn-color: #1f2937; --bs-btn-hover-bg: #ca8a04; --bs-btn-hover-border-color: #ca8a04; --bs-btn-hover-color: #1f2937; }
.btn-orange { --bs-btn-bg: #ea580c; --bs-btn-border-color: #ea580c; --bs-btn-color: #fff; --bs-btn-hover-bg: #c2410c; --bs-btn-hover-border-color: #c2410c; --bs-btn-hover-color: #fff; }
.btn-lime { --bs-btn-bg: #84cc16; --bs-btn-border-color: #84cc16; --bs-btn-color: #1f2937; --bs-btn-hover-bg: #65a30d; --bs-btn-hover-border-color: #65a30d; --bs-btn-hover-color: #fff; }
.btn-teal { --bs-btn-bg: #0d9488; --bs-btn-border-color: #0d9488; --bs-btn-color: #fff; --bs-btn-hover-bg: #0f766e; --bs-btn-hover-border-color: #0f766e; --bs-btn-hover-color: #fff; }
.btn-purple { --bs-btn-bg: #7c3aed; --bs-btn-border-color: #7c3aed; --bs-btn-color: #fff; --bs-btn-hover-bg: #6d28d9; --bs-btn-hover-border-color: #6d28d9; --bs-btn-hover-color: #fff; }
.btn-pink { --bs-btn-bg: #db2777; --bs-btn-border-color: #db2777; --bs-btn-color: #fff; --bs-btn-hover-bg: #be185d; --bs-btn-hover-border-color: #be185d; --bs-btn-hover-color: #fff; }
.btn-magenta { --bs-btn-bg: #c026d3; --bs-btn-border-color: #c026d3; --bs-btn-color: #fff; --bs-btn-hover-bg: #a21caf; --bs-btn-hover-border-color: #a21caf; --bs-btn-hover-color: #fff; }
.btn-brown { --bs-btn-bg: #92400e; --bs-btn-border-color: #92400e; --bs-btn-color: #fff; --bs-btn-hover-bg: #78350f; --bs-btn-hover-border-color: #78350f; --bs-btn-hover-color: #fff; }
.btn-blue, .btn-satblue { --bs-btn-bg: #2563eb; --bs-btn-border-color: #2563eb; --bs-btn-color: #fff; --bs-btn-hover-bg: #1d4ed8; --bs-btn-hover-border-color: #1d4ed8; --bs-btn-hover-color: #fff; }
.btn-darkblue { --bs-btn-bg: #1e3a8a; --bs-btn-border-color: #1e3a8a; --bs-btn-color: #fff; --bs-btn-hover-bg: #172554; --bs-btn-hover-border-color: #172554; --bs-btn-hover-color: #fff; }
.btn-satgreen { --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a; --bs-btn-color: #fff; --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d; --bs-btn-hover-color: #fff; }
.btn-lightred { --bs-btn-bg: #f87171; --bs-btn-border-color: #f87171; --bs-btn-color: #fff; --bs-btn-hover-bg: #ef4444; --bs-btn-hover-border-color: #ef4444; --bs-btn-hover-color: #fff; }
.btn-black { --bs-btn-bg: #111827; --bs-btn-border-color: #111827; --bs-btn-color: #fff; --bs-btn-hover-bg: #000; --bs-btn-hover-border-color: #000; --bs-btn-hover-color: #fff; }
.btn-white { --bs-btn-bg: #fff; --bs-btn-border-color: #cbd5e1; --bs-btn-color: #1f2937; --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-border-color: #94a3b8; --bs-btn-hover-color: #0f172a; }
.scrollable { max-height: 400px; overflow: auto; }
.scrollable[data-height="200"] { max-height: 200px; } .scrollable[data-height="300"] { max-height: 300px; } .scrollable[data-height="500"] { max-height: 500px; } .scrollable[data-height="600"] { max-height: 600px; }

/* ---------- Tabelle ----------------------------------------------- */
.table { font-size: .82rem; --bs-table-striped-bg: #f8fafc; }
.table > :not(caption) > * > * { padding: .35rem .5rem; vertical-align: middle; }
.table > thead > tr > th, .table th { font-weight: 600; color: #334155; background: #f1f5f9; border-bottom: 2px solid #cbd5e1; white-space: nowrap; }
.table-nomargin { margin-bottom: 0; }
.table .form-control-sm, .table .form-select-sm { min-width: 4rem; }
.table td .btn-sm, .table td .btn-mini { white-space: nowrap; }
.table td a > .fa { font-size: 1rem; }
/* classi tabella legacy (tbtesta, tbrigac, ...) */
.tbtesta, .tbtestal, .titolo > td, .titolo > th, tr.titolo { background: #e2e8f0; color: #0f172a; font-weight: 600; padding: .35rem .5rem; border-bottom: 1px solid #cbd5e1; }
.tbtesta { text-align: center; }
.tbtestal { text-align: left; }
.tbparametri { background: #f8fafc; padding: .35rem .5rem; font-weight: 600; color: #475569; }
.tbrigac, .tbrigas, .tbrigar, .tbrigax, .tbrigab, .tbstatl, .tbcella, .tbcellac, .tbcellaS, .tbcellaC, .tbcellaE { padding: .3rem .5rem; border-bottom: 1px solid #e2e8f0; }
.tbrigac, .tbcellac { text-align: center; }
.tbrigar { text-align: right; }
.tbrigas, .tbstatl { text-align: left; }
.tbrigab { font-weight: 600; }
.tbrigax { background: #fef9c3; }
tr.tbcellaS > td, td.tbcellaS { background: #fff; }
tr.tbcellaC > td, td.tbcellaC { background: #f8fafc; }
tr.tbcellaE > td, td.tbcellaE { background: #fee2e2; }
.bbottom { border-top: 2px solid #cbd5e1; background: #f8fafc; font-weight: 600; }
table.dataTable { width: 100% !important; }
div.dt-container .dt-search input, div.dt-container .dt-length select { font-size: .82rem; }
div.dt-container .dt-buttons .btn { --bs-btn-font-size: .76rem; }
.dt-buttons { margin-bottom: .5rem; }

/* ---------- Alert / badge ----------------------------------------- */
.alert { padding: .6rem .9rem; font-size: .85rem; }
.alert .close { float: right; border: 0; background: transparent; font-size: 1.25rem; line-height: 1; opacity: .5; }
.alert .close:hover { opacity: 1; }
.badge { font-weight: 600; }
.label { display: inline-block; padding: .2em .5em; font-size: 75%; font-weight: 600; line-height: 1; color: #fff; border-radius: .25rem; background: #64748b; }
.label-success { background: #16a34a; } .label-danger, .label-lightred { background: #dc2626; } .label-warning { background: #d97706; } .label-info { background: #0891b2; } .label-primary { background: #0d6efd; }

/* ---------- Modal / jQuery UI ------------------------------------- */
.modal-header { padding: .75rem 1rem; background: var(--ar-card-head); }
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-body { font-size: .875rem; }
.modal-footer { padding: .5rem .75rem; }
.modal-header .btn-close { order: 99; margin-left: auto; }
.ui-dialog { z-index: 1055 !important; font-family: var(--ar-font); font-size: .875rem; border-radius: .5rem; box-shadow: 0 10px 30px rgba(0,0,0,.25); padding: 0; }
.ui-dialog .ui-dialog-titlebar { background: var(--ar-card-head); border: 0; border-bottom: 1px solid var(--ar-card-border); border-radius: .5rem .5rem 0 0; font-weight: 600; }
.ui-dialog .ui-dialog-content { padding: .75rem 1rem; }
.ui-dialog .ui-dialog-buttonpane { border-top: 1px solid var(--ar-card-border); margin: 0; padding: .4rem .5rem; }
.ui-dialog .ui-dialog-buttonpane button { font-size: .82rem; padding: .3rem .75rem; border-radius: .375rem; }
.ui-widget-overlay { background: #0f172a; opacity: .5; z-index: 1050 !important; }
.ui-accordion .ui-accordion-header { background: var(--ar-card-head); border: 1px solid var(--ar-card-border); font-weight: 600; font-size: .875rem; }
.ui-accordion .ui-accordion-content { border: 1px solid var(--ar-card-border); border-top: 0; padding: .75rem; }
.ui-autocomplete { z-index: 1070 !important; font-size: .82rem; max-height: 260px; overflow-y: auto; }
.ui-widget { font-family: var(--ar-font); }

/* ---------- Nav tabs ---------------------------------------------- */
.nav-tabs { border-bottom: 1px solid var(--ar-card-border); margin-bottom: .75rem; }
.nav-tabs .nav-link { color: #475569; font-size: .85rem; padding: .45rem .9rem; }
.nav-tabs .nav-link.active { font-weight: 600; color: #0f172a; }
.nav-tabs .nav-link input[type=checkbox] { margin-right: .25rem; vertical-align: middle; }

/* ---------- Varie legacy ------------------------------------------ */
.hide { display: none !important; }
.pull-right { float: right !important; }
.pull-left { float: left !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.nopadding { padding: 0 !important; }
.inline { display: inline-block; margin-right: .5rem; }
.subtitle { font-size: .8rem; color: var(--ar-muted); }
.style2, .style3, .auto-style1, .msonormal { font-family: inherit; }
.ultdiv { }
.italic { font-style: italic; }
.ar-help p, .ar-help li { line-height: 1.55; }
.ar-help img { max-width: 100%; height: auto; border: 1px solid var(--ar-card-border); border-radius: .375rem; }
.ar-help h1, .ar-help h2, .ar-help h3 { margin-top: 1.25rem; }
.tooltip { font-size: .78rem; }
img { max-width: 100%; }
.fc { font-size: .85rem; }
.fc-toolbar h2 { font-size: 1.1rem; }
.fc button { text-transform: capitalize; }
.map, #map { border-radius: .375rem; overflow: hidden; }
.gritter-item-wrapper { z-index: 1090; }
.ar-page-title { font-size: 1.1rem; font-weight: 600; margin: 0 0 .75rem; color: #0f172a; }

/* stampa */
@media print {
  body.ar-body { padding-top: 0; background: #fff; }
  .ar-navbar, .ar-pathbar, #left, .dt-buttons, .btn, .actions { display: none !important; }
  .card.ar-box { border: 0; box-shadow: none; }
}


/* =====================================================================
   HOME / componenti nuovi (v2, 2026-09) - accordion laterale, tile, calendario, news
   ===================================================================== */
.card.ar-box > .card-header h3 i:first-child { color: var(--ar-accent); width: 1.25rem; text-align: center; margin-right: .4rem; }
.card.ar-box > .card-header .actions .badge { font-size: .7rem; }

/* --- sidebar: menu ad accordion --- */
.ar-menu { list-style: none; margin: 0; padding: .35rem .5rem .5rem; }
.ar-menu li { margin: 1px 0; }
.ar-menu a { display: flex; align-items: center; gap: .5rem; padding: .42rem .65rem; border-radius: .5rem; color: #1f2937; text-decoration: none; font-weight: 500; line-height: 1.25; }
.ar-menu a:hover { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-menu a i.fa-fw { color: var(--ar-muted); font-size: .85rem; flex: 0 0 auto; }
.ar-menu a:hover i.fa-fw, .ar-menu a.ar-tog[aria-expanded="true"] i.fa-fw { color: var(--ar-accent); }
.ar-menu a.ar-tog::after { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .62rem; margin-left: auto; color: var(--ar-muted); transition: transform .2s; }
.ar-menu a.ar-tog[aria-expanded="true"]::after { transform: rotate(90deg); }
.ar-menu a.ar-tog[aria-expanded="true"] { color: var(--ar-accent); background: var(--ar-accent-light); }
.ar-menu .ar-menu { padding: .15rem 0 .25rem .75rem; margin-left: .85rem; border-left: 2px solid var(--ar-card-border); }
.ar-menu .ar-menu a { font-weight: 400; font-size: .86rem; padding: .32rem .6rem; }
.ar-menu .ar-menu .ar-menu a { font-size: .83rem; color: #3d4a5c; }
.ar-menu .ar-menu .ar-menu a.ar-tog::after { font-size: .55rem; }
.ar-menu .ar-menu .ar-menu a:not(.ar-tog)::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ar-card-border); flex: 0 0 auto; }
.ar-menu .ar-menu .ar-menu a:not(.ar-tog):hover::before { background: var(--ar-accent); }

/* --- sidebar: menu veloce (elenco) --- */
.ar-quick a { display: flex; align-items: center; gap: .5rem; padding: .5rem .75rem; border-radius: .5rem; text-decoration: none; color: #1f2937; font-weight: 600; font-size: .86rem; }
.ar-quick a:hover { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-quick a i.fa-fw { color: var(--ar-muted); font-size: .75rem; }
.ar-quick a:hover i.fa-fw { color: var(--ar-accent); }

/* --- tile del menu veloce --- */
.ar-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: .65rem; }
.ar-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; aspect-ratio: 1 / 1; padding: .6rem .5rem; border-radius: .75rem; text-decoration: none; color: #fff; background: var(--tile, #4b5563); box-shadow: 0 1px 2px rgba(15,23,42,.08); transition: transform .15s, box-shadow .15s; overflow: hidden; }
.ar-tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%); pointer-events: none; }
.ar-tile:hover, .ar-tile:focus { transform: translateY(-2px); box-shadow: 0 8px 20px -8px rgba(15,23,42,.35); color: #fff; }
.ar-tile > i { font-size: 1.85rem; line-height: 1; }
.ar-tile .name { font-size: .74rem; font-weight: 600; text-align: center; line-height: 1.15; text-wrap: balance; overflow-wrap: anywhere; }
.ar-tile .mono { width: 2.1rem; height: 2.1rem; border-radius: 50%; background: rgba(255,255,255,.22); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1rem; }
.ar-tile.red { --tile: #dc2626; } .ar-tile.lightred { --tile: #f87171; } .ar-tile.orange { --tile: #ea580c; } .ar-tile.yellow { --tile: #ca8a04; }
.ar-tile.green { --tile: #16a34a; } .ar-tile.satgreen { --tile: #0f766e; } .ar-tile.lime { --tile: #65a30d; } .ar-tile.teal { --tile: #0d9488; }
.ar-tile.blue { --tile: #2563eb; } .ar-tile.darkblue, .ar-tile.satblue { --tile: #1e3a8a; } .ar-tile.purple { --tile: #7c3aed; } .ar-tile.magenta { --tile: #c026d3; }
.ar-tile.pink { --tile: #db2777; } .ar-tile.brown { --tile: #92400e; } .ar-tile.lightgrey, .ar-tile.grey { --tile: #64748b; } .ar-tile.black { --tile: #111827; } .ar-tile.white { --tile: #94a3b8; }
@media (max-width: 575.98px) { .ar-tiles { grid-template-columns: repeat(3, 1fr); } }

/* --- fascia loghi sotto le tile --- */
.ar-logos { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 1.25rem; padding: .75rem 1rem; border-top: 1px solid var(--ar-card-border); background: #fafbfc; border-radius: 0 0 .5rem .5rem; }
.ar-logos img { max-height: 40px; max-width: 110px; filter: grayscale(1); opacity: .75; transition: .15s; }
.ar-logos a:hover img { filter: none; opacity: 1; }

/* --- FullCalendar 3: restyle --- */
.ar-filter { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .6rem; }
.ar-cal .fc-toolbar { margin-bottom: .6rem; }
.ar-cal .fc-toolbar h2 { font-size: 1rem; font-weight: 600; text-transform: capitalize; line-height: 2rem; }
.ar-cal .fc button, .fc-unthemed .fc-button { background: #fff; border: 1px solid var(--ar-card-border); box-shadow: none; text-shadow: none; color: #1f2937; height: 2rem; padding: 0 .7rem; font-size: .8rem; border-radius: .5rem; text-transform: none; }
.ar-cal .fc button:hover { background: var(--ar-accent-light); }
.ar-cal .fc .fc-state-active, .fc-unthemed .fc-button.fc-state-active { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-cal .fc-unthemed th, .ar-cal .fc-unthemed td, .ar-cal .fc-unthemed .fc-divider, .ar-cal .fc-unthemed .fc-row, .ar-cal .fc-unthemed .fc-popover { border-color: #eef1f5; }
.ar-cal .fc th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); padding: .35rem 0; font-weight: 600; }
.ar-cal .fc-day-number { font-size: .78rem; color: #3d4a5c; padding: .25rem .4rem; }
.ar-cal .fc-unthemed td.fc-today { background: var(--ar-accent-light); }
.ar-cal .fc-event { border: 0; border-radius: .4rem; padding: .1rem .35rem; font-size: .72rem; font-weight: 500; }
.fc-event.ar-ev { background: var(--ar-cal-ev-bg); color: var(--ar-cal-ev-fg); border-color: var(--ar-cal-ev-bg); }
.fc-event.ar-ev-r { background: var(--ar-cal-ev-r-bg); color: var(--ar-cal-ev-r-fg); border-color: var(--ar-cal-ev-r-bg); }
.fc-event.ar-ev .fc-time, .fc-event.ar-ev-r .fc-time { opacity: .85; font-weight: 600; }
.ar-cal .fc-unthemed .fc-content-skeleton td { border: 0; }
.ar-cal .fc-more { font-size: .72rem; color: var(--ar-accent); }
.ar-cal .fc-unthemed .fc-popover { border-radius: .5rem; box-shadow: 0 8px 24px -8px rgba(15,23,42,.35); }

/* --- news --- */
.ar-news { list-style: none; margin: 0; padding: 0; }
.ar-news li a { display: flex; gap: .75rem; padding: .65rem .35rem; border-bottom: 1px solid #eef1f5; text-decoration: none; color: #1f2937; }
.ar-news li:last-child a { border-bottom: 0; }
.ar-news li a:hover { background: #fafbfc; }
.ar-news li a:hover .t { color: var(--ar-accent); }
.ar-news .d { flex: 0 0 46px; align-self: flex-start; text-align: center; background: var(--ar-accent-light); border-radius: .5rem; padding: .3rem 0; line-height: 1.1; }
.ar-news .d b { display: block; font-size: 1.05rem; color: var(--ar-accent); }
.ar-news .d small { font-size: .62rem; text-transform: uppercase; color: var(--ar-accent); font-weight: 600; }
.ar-news .b { flex: 1 1 auto; min-width: 0; }
.ar-news .t { font-weight: 600; font-size: .86rem; line-height: 1.3; }
.ar-news .x { font-size: .78rem; color: #475569; margin-top: .15rem; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ar-news .x img { display: none; }
.ar-news .s { font-size: .72rem; color: var(--ar-muted); margin-top: .3rem; display: flex; gap: .5rem; align-items: center; }
.ar-news .s .badge { font-weight: 500; }
.ar-news .badge-cnsas { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-news .badge-web { background: #eef2ff; color: #3730a3; }
.ar-news-scroll { max-height: 480px; overflow: auto; }


/* =====================================================================
   SCHEDE (mn_anagen e simili): testata record, sezioni a schede, ricerca, elenco risultati
   ===================================================================== */
.ar-rec-head { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h)); z-index: 1020; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem .875rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ar-rec-head .who { display: flex; align-items: center; gap: .75rem; flex: 1 1 260px; min-width: 0; }
.ar-rec-head .who img, .ar-rec-head .ar-avatar-lg { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: #e2e8f0; flex: 0 0 auto; }
.ar-rec-head .ar-avatar-lg { display: inline-flex; align-items: center; justify-content: center; color: var(--ar-muted); }
.ar-rec-head h1 { font-size: 1.05rem; font-weight: 700; margin: 0; line-height: 1.25; }
.ar-rec-head h1 .code { color: var(--ar-muted); font-weight: 500; font-size: .85rem; margin-left: .25rem; }
.ar-rec-head .meta { font-size: .78rem; color: var(--ar-muted); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .1rem; }
.ar-rec-head .meta .badge { font-weight: 500; }
.ar-rec-head .act { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.ar-rec-head .act .btn, .ar-rec-head .act input[type=submit] { white-space: nowrap; }
.ar-rec-head .act table td { padding: 0 .15rem; }
.ar-rec-head .act .form-control { width: 80px !important; display: inline-block; }

.ar-sections { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + var(--ar-rec-h, 0px)); z-index: 1010; background: var(--ar-body-bg); padding: .25rem 0 .6rem; }
.ar-sections .nav-pills .nav-link { font-size: .84rem; font-weight: 500; color: #334155; padding: .38rem .8rem; border-radius: .5rem; background: #fff; border: 1px solid var(--ar-card-border); }
.ar-sections .nav-pills .nav-link:hover { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-sections .nav-pills .nav-link.active { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-sections .nav-pills .nav-link .badge { font-size: .65rem; vertical-align: middle; }
.ar-sections .nav-pills .nav-link.active .badge { background: rgba(255,255,255,.25) !important; color: #fff; }
@media (max-width: 767.98px) { .ar-rec-head, .ar-sections { position: static; } }
.ar-legacy { display: none; }
.ar-sec-content > .tab-pane > .card, .ar-sec-content [data-ar-slot] > .card { margin-bottom: 1rem; }
.ar-sec-content .card.ar-box.box-small > .card-header { padding: .5rem .875rem; min-height: 2.5rem; }
tr.ar-hist-toggle td { background: #fafbfc; }

/* barra di ricerca */
.ar-search-card > .card-body { padding: .6rem .875rem; }
.ar-search-row .row { align-items: center; }
.ar-search-input .input-group-text { background: #fff; color: var(--ar-muted); border-right: 0; }
.ar-search-input .form-control { border-left: 0; }
.ar-filter-tabs.nav-tabs { border-bottom: 1px solid var(--ar-card-border); }
.ar-filter-tabs .nav-link { font-size: .82rem; padding: .4rem .7rem; color: #334155; border: 0; border-bottom: 2px solid transparent; }
.ar-filter-tabs .nav-link.active { color: var(--ar-accent); border-bottom-color: var(--ar-accent); background: transparent; }
.ar-filter-tabs .nav-item .form-check-input { margin-top: 0; }
.ar-filter-content { font-size: .84rem; background: #fafbfc; border-radius: 0 0 .5rem .5rem; }
.ar-filter-summary { font-size: .78rem; border: 0; background: transparent; color: var(--ar-muted); margin-top: .35rem; padding-right: 2rem !important; }
.ar-filter-summary b { color: #1f2937; font-weight: 600; }

/* elenco risultati (offcanvas) */
.ar-offlist { width: 340px; }
.ar-offlist .offcanvas-header { border-bottom: 1px solid var(--ar-card-border); padding: .75rem 1rem; }
.ar-offlist .offcanvas-title { font-size: .95rem; font-weight: 600; }
.ar-list-table td { vertical-align: middle; padding: .35rem .6rem; }
.ar-list-table td.img { width: 48px; }
.ar-list-table td.img img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.ar-list-table td.user a { font-weight: 600; text-decoration: none; color: #1f2937; display: block; }
.ar-list-table tr:hover td { background: var(--ar-accent-light); }
.ar-list-table td.icon { width: 40px; text-align: right; color: var(--ar-muted); }

/* autocomplete con foto (jQuery UI) */
.ui-autocomplete.ar-ac-people { border: 1px solid var(--ar-card-border); border-radius: .5rem; box-shadow: 0 10px 30px -10px rgba(15,23,42,.35); padding: .25rem; max-height: 340px; overflow: auto; font-family: var(--ar-font); font-size: .86rem; z-index: 1060; }
.ar-ac-people .ui-menu-item-wrapper { padding: .25rem .4rem; border: 0; border-radius: .4rem; }
.ar-ac-people .ui-menu-item-wrapper.ui-state-active { background: var(--ar-accent-light); color: var(--ar-accent); margin: 0; }
.ar-ac-item { display: flex; align-items: center; gap: .6rem; }
.ar-ac-item img, .ar-ac-item .ar-ac-ph { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #e2e8f0; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; color: var(--ar-muted); }
.ar-ac-item .n { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-ac-item .c { font-size: .72rem; color: var(--ar-muted); }


/* campi a griglia con etichetta sopra (schede) */
.ar-sub { font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-accent); margin: 1rem 0 .5rem; padding-bottom: .25rem; border-bottom: 1px solid var(--ar-card-border); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.card-body > .ar-sub:first-child, .ar-resdom .ar-sub { margin-top: 0; }
.ar-field > .form-label { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); font-weight: 600; margin-bottom: .15rem; display: block; }
.ar-field .form-control, .ar-field .form-select { font-size: .86rem; }
.ar-field .form-control-plaintext, .ar-field > b, .ar-field .fs-5 { font-size: .95rem !important; font-weight: 600; padding: .25rem 0; }
.ar-field .col-form-label { padding-top: .3rem; padding-bottom: 0; font-size: .82rem; color: var(--ar-muted); }
.ar-field table.table { margin-bottom: 0; font-size: .82rem; }
.ar-field table.table td, .ar-field table.table th { padding: .2rem .25rem; border: 0; font-weight: 500; color: var(--ar-muted); font-size: .72rem; text-transform: uppercase; }
.ar-field table.table td { color: inherit; text-transform: none; font-size: .86rem; }
.ar-field .attenzione { color: #b91c1c; font-size: .8rem; display: block; margin-top: .25rem; }
.ar-field-extra { flex: 0 0 auto; max-width: 50%; }
.ar-field-extra .btn { width: auto !important; white-space: nowrap; }
.ar-resdom { margin-top: .75rem; }
.ar-field input[name$="cap"], .ar-field input[name$="cap_dom"] { min-width: 70px; }
.ar-field input[name$="provincia"], .ar-field input[name$="provincia_dom"], .ar-field input[name="an_nasc_provincia"] { min-width: 48px; }
.ar-field .fa-2 { font-size: 1.1rem; vertical-align: middle; }


/* consultazione anagrafiche (vw_anagen): colonne, tabella risultati, paginazione */
.ar-cols { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .5rem .875rem; border-bottom: 1px solid var(--ar-card-border); background: #fafbfc; font-size: .78rem; }
.ar-cols .lbl { color: var(--ar-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; font-size: .7rem; margin-right: .25rem; }
.ar-col-chip { background: var(--ar-accent-light); color: var(--ar-accent); font-weight: 500; font-size: .76rem; padding: .3rem .55rem; border-radius: .5rem; display: inline-flex; align-items: center; gap: .35rem; text-transform: none; }
.ar-col-chip a { color: var(--ar-accent); opacity: .6; text-decoration: none; }
.ar-col-chip a:hover { opacity: 1; color: #b91c1c; }
.ar-addcampo { width: 240px; }
.ar-addcampo .input-group-text { background: #fff; color: var(--ar-accent); }
.ar-query-avvisi ul { padding-left: 1.2rem; }
.ar-results .table { font-size: .84rem; margin: 0; }
.ar-results .table > thead > tr > th { background: #f8fafc; vertical-align: top; border-bottom: 2px solid var(--ar-card-border); padding: .4rem .5rem; }
.ar-results .table > tbody > tr > td { vertical-align: middle; padding: .3rem .5rem; }
.ar-results .table > tbody > tr:hover > td { background: var(--ar-accent-light); }
.ar-th-top { display: flex; align-items: center; gap: .35rem; margin-bottom: .3rem; min-height: 1.4rem; }
.ar-th-name { font-weight: 600; font-size: .78rem; color: #1f2937; text-transform: none; }
.ar-th-tools { display: inline-flex; gap: .15rem; margin-left: auto; }
.ar-th-tools a, .ar-th-tools i[onclick] { color: #94a3b8; padding: .1rem .25rem; border-radius: .25rem; text-decoration: none; font-size: .78rem; cursor: pointer; }
.ar-th-tools a:hover, .ar-th-tools i[onclick]:hover { color: var(--ar-accent); background: #fff; }
.ar-th-tools a.on { color: var(--ar-accent); background: #fff; }
.ar-th-sorted .ar-th-name { color: var(--ar-accent); }
.ar-th-filter { min-width: 120px; }
.ar-th-filter .form-control { font-size: .78rem; }
.ar-th-filter .form-control.ar-filter-on { border-color: var(--ar-accent); background: var(--ar-accent-light); }
.ar-td-foto { width: 40px; padding-top: .2rem !important; padding-bottom: .2rem !important; line-height: 0; }
.ar-results .ar-foto-mini { width: 30px; height: 30px; min-width: 30px; max-width: none; }
.ar-td-nofoto a::before { content: "\f2bd"; font-family: "Font Awesome 6 Free"; font-weight: 400; color: #cbd5e1; font-size: 1.35rem; line-height: 30px; display: inline-block; width: 30px; text-align: center; }
.ar-pager { position: sticky; bottom: 0; z-index: 1000; background: #fff; border-top: 1px solid var(--ar-card-border); padding: .4rem .875rem; margin: .5rem -1rem 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .82rem; box-shadow: 0 -2px 8px rgba(15,23,42,.05); }
.ar-pager a { color: var(--ar-accent); text-decoration: none; padding: .15rem .4rem; border-radius: .35rem; }
.ar-pager a:hover { background: var(--ar-accent-light); }
.ar-pager #numana { margin-left: auto; color: var(--ar-muted); }
.ar-pager form { display: inline-flex !important; align-items: center; gap: .35rem; }
.ar-pager form .form-control { width: 64px !important; }

/* ---- Query salvate: bottone in testata e modal ---- */
.ar-qbtn-on { background: var(--ar-accent-light); color: var(--ar-accent); border: 1px solid var(--ar-accent); font-weight: 600; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-qbtn-on:hover { background: var(--ar-accent); color: #fff; }
.ar-qbtn-id { opacity: .65; font-weight: 400; margin-left: .35rem; font-size: .75rem; }
.ar-qmodal .modal-content { border: 0; border-radius: .9rem; box-shadow: 0 20px 60px rgba(15,23,42,.25); }
.ar-qmodal .modal-header { background: var(--ar-accent-light); border-bottom: 1px solid var(--ar-card-border); border-radius: .9rem .9rem 0 0; }
.ar-qmodal .modal-title { color: var(--ar-accent); font-weight: 700; font-size: 1rem; }
.ar-qmodal .form-label { font-size: .75rem; font-weight: 600; color: var(--ar-muted); margin-bottom: .15rem; text-transform: uppercase; letter-spacing: .02em; }
.ar-qcur { border: 1px solid var(--ar-accent); border-left-width: 4px; border-radius: .6rem; padding: .7rem .9rem; margin-bottom: 1rem; background: linear-gradient(180deg, #fff, var(--ar-accent-light)); }
.ar-qcur-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ar-qcur-tag { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; font-weight: 700; color: var(--ar-accent); }
.ar-qcur-title { font-weight: 700; font-size: 1.02rem; color: #0f172a; }
.ar-qcur-id { color: var(--ar-muted); font-size: .8rem; }
.ar-qcur-act { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.ar-qvis { font-weight: 500; font-size: .7rem; }
.ar-qvis-p { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.ar-qvis-c { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ar-qvis-m { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.ar-qmine { background: var(--ar-accent-light); color: var(--ar-accent); border: 1px solid var(--ar-accent); font-weight: 600; font-size: .7rem; }
.ar-qlink .form-control { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem; background: #fff; color: #0f172a; }
.ar-qlink .form-text { font-size: .74rem; }
.ar-qtabs .nav-link { font-size: .82rem; padding: .3rem .8rem; color: var(--ar-muted); }
.ar-qtabs .nav-link.active { background: var(--ar-accent); color: #fff; }
.ar-qlist { max-height: 320px; overflow-y: auto; border-radius: .5rem; }
.ar-qitem { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .5rem .8rem; font-size: .88rem; text-align: left; }
.ar-qitem-title { font-weight: 500; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-qitem-meta { display: inline-flex; align-items: center; gap: .4rem; flex: 0 0 auto; }
.ar-qitem-id { color: var(--ar-muted); font-size: .76rem; }
.ar-qitem-own { color: var(--ar-muted); font-size: .76rem; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-qitem.active { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-qitem.active .ar-qitem-id, .ar-qitem.active .ar-qitem-own { color: rgba(255,255,255,.8); }
.ar-qitem.active .ar-qmine { background: rgba(255,255,255,.2); color: #fff; border-color: rgba(255,255,255,.5); }
.ar-qmodal [data-qf].active { background: var(--ar-accent); color: #fff; border-color: var(--ar-accent); }
.ar-qsel { background: #f8fafc; border: 1px dashed var(--ar-card-border); border-radius: .5rem; padding: .5rem .7rem; font-size: .8rem; display: flex; flex-direction: column; gap: .35rem; }
.ar-qsel-row { display: flex; gap: .6rem; align-items: flex-start; flex-wrap: wrap; }
.ar-qsel-lbl { font-weight: 600; color: var(--ar-muted); white-space: nowrap; font-size: .74rem; text-transform: uppercase; letter-spacing: .02em; padding-top: .2rem; }
.ar-qsel .ar-col-chip { font-size: .7rem; padding: .2rem .45rem; margin: .1rem 0; }

/* ---- Rapportini: stati, elenco ---- */
:root { --ar-st-D-bg:#fef3c7; --ar-st-D-fg:#92400e; --ar-st-I-bg:#fee2e2; --ar-st-I-fg:#b91c1c; --ar-st-R-bg:#ffedd5; --ar-st-R-fg:#c2410c; --ar-st-V-bg:#dcfce7; --ar-st-V-fg:#15803d; --ar-st-C-bg:#f1f5f9; --ar-st-C-fg:#475569; }
.ar-st { display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; padding: .22rem .55rem; border-radius: .4rem; white-space: nowrap; background: #f1f5f9; color: #475569; line-height: 1.1; }
.ar-st-D { background: var(--ar-st-D-bg); color: var(--ar-st-D-fg); }
.ar-st-I { background: var(--ar-st-I-bg); color: var(--ar-st-I-fg); }
.ar-st-R { background: var(--ar-st-R-bg); color: var(--ar-st-R-fg); }
.ar-st-V { background: var(--ar-st-V-bg); color: var(--ar-st-V-fg); }
.ar-st-C { background: var(--ar-st-C-bg); color: var(--ar-st-C-fg); }
.ar-st-lg { font-size: .8rem; padding: .3rem .7rem; }
.ar-legend { display: flex; gap: .35rem; flex-wrap: wrap; }
.ar-legend .ar-st { font-size: .62rem; opacity: .9; }
.ar-tipo { display: inline-block; font-size: .68rem; font-weight: 600; padding: .15rem .45rem; border-radius: 999px; border: 1px solid var(--ar-card-border); color: var(--ar-muted); white-space: nowrap; }
.ar-tipo-S { border-color: var(--ar-accent); color: var(--ar-accent); background: var(--ar-accent-light); }
.ar-w-num { width: 5.5rem !important; }
.ar-search-row .form-label { font-size: .72rem; font-weight: 600; color: var(--ar-muted); text-transform: uppercase; letter-spacing: .02em; margin-bottom: .15rem; }
.ar-rp-table { font-size: .82rem; }
.ar-rp-table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); background: #f8fafc; border-bottom: 2px solid var(--ar-card-border); white-space: nowrap; }
.ar-rp-table td { vertical-align: middle; padding: .45rem .5rem; }
.ar-rp-row { cursor: pointer; }
.ar-rp-row:hover td { background: var(--ar-accent-light) !important; }
.ar-th-num { width: 2.4rem; text-align: right; font-size: .74rem; }
.ar-rp-num small { color: var(--ar-muted); font-size: .72rem; }
.ar-rp-sep { color: #cbd5e1; }
.ar-rp-staz { text-transform: capitalize; font-weight: 500; }
.ar-rp-des { max-width: 260px; color: #334155; }
.ar-rp-eve { line-height: 1.3; white-space: nowrap; }
.ar-rp-luogo { font-size: .76rem; color: #334155; }
.ar-rp-class { font-size: .78rem; }
.ar-open { color: var(--ar-accent); padding: .2rem .45rem; border-radius: .35rem; }
.ar-open:hover { background: var(--ar-accent); color: #fff; }
.ar-results .dataTables_wrapper .row:first-child { padding: .4rem .75rem 0; }
.ar-results .dataTables_wrapper .row:last-child { padding: .4rem .75rem; font-size: .8rem; }

/* ---- Rapportino (rp_intervento): testata, schede, sezioni ---- */
.ar-rp-head { background: #fff; border: 1px solid var(--ar-card-border); border-radius: .75rem; padding: .65rem 1rem; display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; align-items: center; box-shadow: 0 1px 2px rgba(15,23,42,.04); margin-bottom: .5rem; }
.ar-rp-head .who { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.ar-rp-head .ico { width: 42px; height: 42px; border-radius: .7rem; background: var(--ar-accent-light); color: var(--ar-accent); display: flex; align-items: center; justify-content: center; font-size: 1.25rem; flex: 0 0 auto; }
.ar-rp-head .t1 { font-size: 1.02rem; font-weight: 700; line-height: 1.2; display: flex; align-items: center; flex-wrap: wrap; gap: .25rem; }
.ar-rp-head .t2 { font-size: .78rem; color: var(--ar-muted); }
.ar-rp-head .meta { display: flex; gap: 1.25rem; flex-wrap: wrap; padding-left: 1.5rem; border-left: 1px solid var(--ar-card-border); }
.ar-rp-head .meta .k { font-size: .64rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); font-weight: 600; white-space: nowrap; }
.ar-rp-head .meta .v { font-weight: 600; font-size: .86rem; white-space: nowrap; }
.ar-rp-head .act { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.ar-dirty { font-size: .72rem; color: #b45309; background: #fef3c7; border: 1px solid #fcd34d; border-radius: 999px; padding: .15rem .6rem; font-weight: 600; }
.ar-pulse { box-shadow: 0 0 0 3px rgba(42,110,74,.25); }
.ar-rp-menu { font-size: .84rem; min-width: 240px; }
.ar-rp-menu .dropdown-item i { width: 1.35rem; color: var(--ar-muted); }
.ar-rp-menu .dropdown-item.text-danger i { color: inherit; }
.ar-rp-menu .dropdown-item-text i { width: 1.35rem; }
.ar-rp-tabs { display: flex; gap: .35rem; flex-wrap: wrap; align-items: center; margin: 0 0 .6rem; position: sticky; top: var(--ar-nav-h, 56px); z-index: 20; background: var(--ar-body-bg, #f3f5f8); padding: .4rem 0; }
.ar-rp-tabs .grp { font-size: .64rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 700; margin: 0 .3rem 0 .2rem; white-space: nowrap; }
.ar-rp-tabs .sep { width: 1px; height: 24px; background: var(--ar-card-border); margin: 0 .5rem; }
.ar-rp-tabs .ar-tab { border: 1px solid var(--ar-card-border); background: #fff; color: #334155; border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; font-weight: 500; display: inline-flex; align-items: center; gap: .4rem; line-height: 1.2; }
.ar-rp-tabs .ar-tab i { color: var(--ar-muted); font-size: .78rem; }
.ar-rp-tabs .ar-tab .badge { background: #eef2f6; color: #475569; font-weight: 600; font-size: .68rem; padding: .15rem .4rem; }
.ar-rp-tabs .ar-tab:hover { border-color: var(--ar-accent); color: var(--ar-accent); }
.ar-rp-tabs .ar-tab.active { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-rp-tabs .ar-tab.active i { color: #fff; }
.ar-rp-tabs .ar-tab.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.ar-rp-main { margin: 0; }
.ar-rp-pane { display: none; }
.ar-rp-pane > .card-header { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.ar-rp-pane > .card-header h3 { margin: 0; }
.ar-rp-pane > .card-header .actions { margin-left: auto; }
.ar-shared, .ar-own { font-size: .66rem; font-weight: 600; border-radius: 999px; padding: .12rem .55rem; white-space: nowrap; }
.ar-shared { color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; }
.ar-own { color: var(--ar-accent); background: var(--ar-accent-light); border: 1px solid #bfe0cf; }
.ar-rp-body { padding: .9rem 1rem 1rem !important; }
.ar-rp-body .ar-sub { margin-top: 1.1rem; }
.ar-rp-body .ar-sub:first-child, .ar-rp-body .collapse + .ar-sub, .ar-rp-body .collapse.show + .ar-sub { margin-top: 0; }
.ar-help { font-size: .72rem; color: var(--ar-muted); margin-top: .2rem; min-height: 1em; }
.ar-help-miss { color: #b45309; font-weight: 600; }
.ar-val { font-size: .86rem; font-weight: 600; padding-top: .25rem; min-height: 1.9rem; }
.ar-seg .btn { font-size: .78rem; }
.ar-seg .btn-check:checked + .btn { font-weight: 600; }
.ar-note { background: #f8fafc; border: 1px dashed var(--ar-card-border); color: #475569; font-size: .76rem; padding: .5rem .75rem; border-radius: .5rem; line-height: 1.45; }
/* stazioni */
.ar-staz { display: flex; align-items: center; gap: .7rem; padding: .45rem .8rem; border: 1px solid var(--ar-card-border); border-radius: .6rem; background: #fff; margin-bottom: .4rem; flex-wrap: wrap; font-size: .84rem; }
.ar-staz.resp { border-color: var(--ar-accent); background: linear-gradient(90deg, var(--ar-accent-light), #fff 45%); }
.ar-staz .tag { font-size: .62rem; text-transform: uppercase; font-weight: 700; letter-spacing: .04em; color: var(--ar-accent); white-space: nowrap; }
.ar-staz .nm { font-weight: 700; }
.ar-staz .rap { color: var(--ar-muted); font-size: .78rem; display: inline-flex; align-items: center; gap: .3rem; }
.ar-staz .rap a { color: var(--ar-accent); text-decoration: none; }
.ar-staz .r { margin-left: auto; display: flex; gap: .35rem; }
.ar-add-input { min-width: 300px; }
/* riquadri mezzi / enti */
.ar-res { border: 1px solid var(--ar-card-border); border-radius: .6rem; overflow: hidden; background: #fff; height: 100%; display: flex; flex-direction: column; }
.ar-res-h { display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem; background: #f8fafc; border-bottom: 1px solid var(--ar-card-border); font-weight: 600; font-size: .8rem; }
.ar-res-h i { color: var(--ar-accent); width: 18px; text-align: center; }
.ar-res-h .n { margin-left: auto; background: #eef2f6; color: #475569; border-radius: 999px; font-size: .68rem; padding: .1rem .5rem; font-weight: 600; }
.ar-res-empty .ar-res-h .n { opacity: .5; }
.ar-res-table { font-size: .8rem; }
.ar-res-table td { vertical-align: middle; border-color: #eef2f6; padding: .35rem .6rem; }
.ar-res-table td:first-child { width: 55%; }
.ar-res-table td:nth-child(2) { white-space: nowrap; }
.ar-res-table td:last-child { text-align: right; width: 44px; }
.ar-res-table .form-control, .ar-res-table .form-select { font-size: .76rem; }
.ar-res-table tr.ar-res-add td, .ar-list-table tr.ar-res-add td { background: #fbfcfd; border-top: 1px dashed var(--ar-card-border); }
.ar-res-table .ar-res-del, .ar-diag-table .ar-res-del { padding: .1rem .4rem; border-color: transparent; color: #94a3b8; }
.ar-res-table .ar-res-del:hover, .ar-diag-table .ar-res-del:hover { color: #fff; background: #dc2626; border-color: #dc2626; }
.ar-res-table .ar-quest { font-size: .68rem; padding: .05rem .4rem; margin-left: .3rem; }
.ar-res-table .datepick { max-width: 105px; }
/* persone soccorse */
.ar-pers { border: 1px solid var(--ar-card-border); border-radius: .7rem; margin-bottom: .6rem; background: #fff; overflow: hidden; }
.ar-pers-h { display: flex; align-items: center; gap: .8rem; padding: .55rem .9rem; cursor: pointer; }
.ar-pers-h:hover { background: #f8fafc; }
.ar-pers-h .num { width: 30px; height: 30px; border-radius: 50%; background: var(--ar-accent); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex: 0 0 auto; }
.ar-pers-h .txt { min-width: 0; }
.ar-pers-h .nm { font-weight: 700; font-size: .9rem; }
.ar-pers-h .sm { color: var(--ar-muted); font-size: .76rem; }
.ar-pers-h .r { margin-left: auto; display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.ar-pers-chev { color: var(--ar-muted); transition: transform .2s; }
.ar-pers-h[aria-expanded="true"] .ar-pers-chev { transform: rotate(180deg); }
.ar-pers-b { border-top: 1px solid var(--ar-card-border); padding: .9rem .9rem 1rem; background: #fbfcfd; }
.ar-pers-b .form-group { margin-bottom: .35rem; }
.ar-pers-b .form-label { font-size: .72rem; font-weight: 600; color: var(--ar-muted); margin-bottom: .15rem; }
.ar-pers-b .form-check { padding-top: .2rem; }
.ar-pers-b .form-check-label { font-size: .8rem; }
.ar-pers-b .ar-sub { margin-top: 1rem; }
.ar-pers-b .col-lg-4 > .ar-sub:first-child { margin-top: 0; }
.ar-crit { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: .35rem; background: #f1f5f9; color: #475569; white-space: nowrap; }
.ar-crit-1 { background: #dcfce7; color: #15803d; } .ar-crit-2 { background: #fef3c7; color: #92400e; } .ar-crit-3 { background: #fee2e2; color: #b91c1c; } .ar-crit-4 { background: #1f2937; color: #fff; } .ar-crit-0 { background: #e0f2fe; color: #0369a1; }
.ar-lock { color: #b45309; font-size: .66rem; text-transform: none; letter-spacing: 0; font-weight: 600; }
.ar-sens { border-left: 3px solid #f59e0b; }
.ar-sens-hidden { display: inline-block; font-size: .74rem; color: #92400e; background: #fef3c7; border-radius: .35rem; padding: .3rem .55rem; font-style: italic; }
.form-control.red, .form-select.red { background: #fffbeb; border-color: #f59e0b; }
.ar-diag-table td { font-size: .78rem; }
/* firme */
.ar-iter { display: flex; flex-direction: column; gap: .4rem; }
.ar-iter-step { display: flex; align-items: center; gap: .8rem; padding: .55rem .8rem; border: 1px solid var(--ar-card-border); border-radius: .6rem; background: #fff; flex-wrap: wrap; }
.ar-iter-step .num { width: 28px; height: 28px; border-radius: 50%; background: #f1f5f9; color: #475569; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; flex: 0 0 auto; }
.ar-iter-step.cur { border-color: var(--ar-accent); background: linear-gradient(90deg, var(--ar-accent-light), #fff 40%); }
.ar-iter-step.cur .num { background: var(--ar-accent); color: #fff; }
.ar-iter-step.done .num { background: #dcfce7; color: #15803d; }
.ar-iter-step .txt { min-width: 0; }
.ar-iter-step .nm { font-weight: 700; font-size: .86rem; }
.ar-iter-step .sm { font-size: .76rem; color: var(--ar-muted); }
.ar-iter-step .r { margin-left: auto; display: flex; gap: .35rem; flex-wrap: wrap; }
.ar-stflow { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; }
.ar-stflow i { color: #cbd5e1; font-size: .7rem; }
.ar-stflow .ar-st { opacity: .55; }
.ar-stflow .ar-st.on { opacity: 1; box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }
.ar-stflow .ar-st.done { opacity: .9; background: #dcfce7; color: #15803d; }
.ar-chk { list-style: none; margin: 0; padding: 0; font-size: .8rem; }
.ar-chk li { display: flex; gap: .45rem; padding: .22rem 0; color: #b91c1c; border-bottom: 1px dashed #fee2e2; align-items: flex-start; }
.ar-chk li i { margin-top: .2rem; flex: 0 0 auto; }
/* soccorritori */
.ar-socc-table td { vertical-align: middle; font-size: .8rem; }
.ar-socc-table .form-control, .ar-socc-table .form-select { font-size: .76rem; min-width: 64px; }
.ar-socc-table td .btn { white-space: nowrap; }
.ar-capo { background: var(--ar-accent); color: #fff; font-size: .62rem; padding: .15rem .35rem; }
.ar-socc-pick { border: 1px solid var(--ar-card-border); border-radius: .6rem; background: #fff; overflow: hidden; }
.ar-socc-pick-h { background: #f8fafc; border-bottom: 1px solid var(--ar-card-border); padding: .45rem .7rem; font-size: .78rem; font-weight: 600; }
.ar-socc-pick-b { max-height: 420px; overflow-y: auto; padding: .3rem .5rem; }
.ar-socc-opt { display: flex; gap: .5rem; align-items: center; font-size: .8rem; padding: .2rem .25rem; border-radius: .35rem; cursor: pointer; margin: 0; }
.ar-socc-opt:hover { background: var(--ar-accent-light); }
.ar-socc-opt .form-check-input { margin: 0; flex: 0 0 auto; }
.ar-socc-pick-f { padding: .5rem; border-top: 1px solid var(--ar-card-border); background: #fbfcfd; }
.ar-tl-table td, .ar-doc-table td { vertical-align: middle; font-size: .82rem; }
.ar-tl-table .datetimepick { min-width: 150px; }
@media (max-width: 991.98px) { .ar-rp-head .meta { border-left: 0; padding-left: 0; } .ar-rp-head .act { margin-left: 0; width: 100%; } }

/* ---- Elenco eventi ad albero (rp_eventielenco) ---- */
.ar-st-X { background: #fee2e2; color: #b91c1c; border: 1px dashed #fca5a5; }
.ar-st-P { background: #f3e8ff; color: #6b21a8; }
.ar-w-date { width: 7.2rem !important; }
.ar-evtree-head, .ar-ev-h, .ar-node { display: flex; align-items: center; gap: .5rem; }
.ar-evtree-head { padding: .4rem .75rem .4rem 2.6rem; background: #f8fafc; border-bottom: 2px solid var(--ar-card-border); font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); font-weight: 600; }
.ar-evtree-head a { color: inherit; text-decoration: none; } .ar-evtree-head a:hover { color: var(--ar-accent); }
.ar-evtree-head a i { opacity: .5; font-size: .65rem; }
.c-ev { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.c-num { flex: 0 0 70px; white-space: nowrap; } .c-num small { color: var(--ar-muted); }
.c-data { flex: 0 0 90px; white-space: nowrap; }
.c-luogo { flex: 0 0 170px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-des { flex: 1 1 200px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; }
.c-del { flex: 0 0 62px; white-space: nowrap; color: var(--ar-muted); }
.c-stato { flex: 0 0 150px; white-space: nowrap; }
.c-all { flex: 0 0 44px; text-align: center; font-size: .78rem; }
.c-act { flex: 0 0 34px; text-align: right; }
.ar-evtree { font-size: .82rem; }
.ar-ev { border-bottom: 1px solid var(--ar-card-border); }
.ar-ev:last-child { border-bottom: 0; }
.ar-ev-h { padding: .55rem .75rem; background: #fff; position: relative; }
.ar-ev-h:hover { background: #f8fafc; }
.ar-ev-tog { border: 0; background: transparent; width: 26px; height: 26px; border-radius: 50%; color: var(--ar-accent); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.ar-ev-tog:hover { background: var(--ar-accent-light); }
.ar-ev-tog i { transition: transform .2s; }
.ar-ev.collapsed .ar-ev-tog i { transform: rotate(-90deg); }
.ar-ev.collapsed .ar-ev-b { display: none; }
.ar-ev-title { color: #0f172a; text-decoration: none; font-size: .9rem; }
.ar-ev-title:hover { color: var(--ar-accent); text-decoration: underline; }
.ar-ev-reg { font-size: .72rem; color: #1d4ed8; font-style: italic; }
.ar-ev-class { font-size: .74rem; color: var(--ar-muted); background: #f1f5f9; border-radius: .35rem; padding: .1rem .45rem; white-space: nowrap; }
.ar-ev-sum { display: inline-flex; gap: .2rem; }
.ar-ev-sum .ar-st { font-size: .62rem; padding: .12rem .4rem; min-width: 1.5rem; text-align: center; }
.ar-ev-h .c-data, .ar-ev-h .c-luogo, .ar-ev-h .c-des, .ar-ev-h .c-stato { cursor: pointer; }
.ar-ev-b { background: #fbfcfd; }
.ar-node { padding: .35rem .75rem .35rem 2.1rem; border-top: 1px dashed #e2e8f0; position: relative; }
.ar-node::before { content: ""; position: absolute; left: 1.05rem; top: 0; bottom: 0; border-left: 2px solid #dbe2ea; }
.ar-node::after { content: ""; position: absolute; left: 1.05rem; top: 50%; width: .7rem; border-top: 2px solid #dbe2ea; }
.ar-ev-b .ar-node:last-child::before { bottom: 50%; }
.ar-node-link { cursor: pointer; }
.ar-node-link:hover { background: var(--ar-accent-light); }
.ar-node-staz { text-transform: capitalize; font-weight: 500; }
.ar-node-reg { color: var(--ar-muted); font-size: .74rem; text-transform: capitalize; }
.ar-node-base { color: var(--ar-muted); font-size: .74rem; }
.ar-node-tag { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 700; color: var(--ar-accent); background: var(--ar-accent-light); border-radius: .3rem; padding: .1rem .4rem; white-space: nowrap; }
.ar-node-tag-lost { color: #6b21a8; background: #f3e8ff; }
.ar-node-todo { background: #fffafa; }
.ar-node-add { color: var(--ar-muted); }
.ar-add-link { color: var(--ar-accent); text-decoration: none; font-weight: 600; font-size: .78rem; border: 1px dashed var(--ar-accent); border-radius: .4rem; padding: .15rem .5rem; }
.ar-add-link:hover { background: var(--ar-accent); color: #fff; }
.ar-open-warn { color: #dc2626; } .ar-open-warn:hover { background: #dc2626; color: #fff; }
.ar-evpager { font-size: .82rem; }
@media (max-width: 991.98px) { .c-num, .c-del, .c-all { display: none; } .c-luogo { flex-basis: 120px; } .c-stato { flex-basis: auto; } }
.ar-ro { font-size: .72rem; color: #1d4ed8; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 999px; padding: .15rem .6rem; font-weight: 600; white-space: nowrap; }
.ar-node .c-ev { flex-wrap: nowrap; overflow: hidden; }
.ar-node .c-ev .ar-node-staz { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-node .c-ev .ar-node-reg { white-space: nowrap; flex: 0 0 auto; }
.ar-vol-table tr:first-child td { font-weight: 600; background: #f8fafc; font-size: .74rem; color: var(--ar-muted); text-transform: uppercase; }
.ar-vol-table td { font-size: .8rem; vertical-align: middle; white-space: nowrap; }
.ar-vol-table td a { color: var(--ar-accent); text-decoration: none; }
.ar-rp-table tr.ar-node-todo td { background: #fffafa; }

/* ---- Appuntamenti ---- */
.ar-cap { text-transform: capitalize; }
.ar-ap-past td { color: #64748b; }
.ar-ap-past td .fw-semibold { color: #475569; }
.ar-reg-sel { max-width: 200px; }
.ar-chkgroup { border: 1px solid var(--ar-card-border); border-radius: .6rem; padding: .6rem .8rem; background: #fff; height: 100%; }
.ar-chkgroup-h { font-size: .78rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
.ar-chkgroup .form-check { font-size: .82rem; padding-top: .15rem; padding-bottom: .15rem; }
.ar-chkgroup .form-check-label { line-height: 1.35; }
.ar-cal-table td { vertical-align: middle; }
.ar-cal-table .form-control, .ar-cal-table .form-select { font-size: .8rem; }
.ar-ap-panes > .card { margin-bottom: .75rem; }
.ar-ap-panes > .card > .card-header h3 { font-size: .92rem; text-transform: none; }
/* telefono: testata e schede compatte, filtri a tutta larghezza */
@media (max-width: 767.98px) {
  .ar-rp-head { padding: .6rem .75rem; gap: .5rem; }
  .ar-rp-head .t1 { font-size: .95rem; }
  .ar-rp-head .meta { gap: .75rem; width: 100%; }
  .ar-rp-head .act .btn { flex: 1 1 auto; }
  .ar-rp-tabs { position: static; overflow-x: auto; flex-wrap: nowrap; padding-bottom: .5rem; -webkit-overflow-scrolling: touch; }
  .ar-rp-tabs .ar-tab { white-space: nowrap; }
  .ar-rp-tabs .grp { display: none; }
  .ar-search-row > [class*="col-"] { flex: 1 1 48%; max-width: 100%; }
  .ar-search-row .ar-w-num, .ar-search-row .ar-w-date { width: 100% !important; }
  .ar-staz, .ar-iter-step { flex-wrap: wrap; }
  .ar-staz .r, .ar-iter-step .r { margin-left: 0; width: 100%; }
  .ar-pers-h { flex-wrap: wrap; }
  .ar-pers-h .r { margin-left: 0; width: 100%; justify-content: flex-start; }
  .ar-evtree-head { display: none !important; }
  .ar-ev-h, .ar-node { flex-wrap: wrap; row-gap: .2rem; }
  .c-luogo, .c-des { flex: 1 1 100%; white-space: normal; }
  .c-data { flex: 0 0 auto; }
}
.ar-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .78rem !important; }
.ar-sentlist { list-style: none; padding: 0; margin: 0; font-size: .82rem; }
.ar-sentlist li { padding: .25rem 0; border-bottom: 1px dashed var(--ar-card-border); }
.ar-sentlist a { color: #0f172a; text-decoration: none; } .ar-sentlist a:hover { color: var(--ar-accent); }
.ar-sent-view { font-size: .72rem; background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .6rem; max-height: 300px; overflow: auto; white-space: pre-wrap; margin-top: .5rem; }
/* partecipanti appuntamento */
.ar-part-tools { display: flex; flex-wrap: wrap; gap: .5rem .75rem; align-items: center; margin-bottom: .6rem; }
.ar-part-add { flex: 1 1 320px; min-width: 260px; }
.ar-part-add .ar-w-tipo { max-width: 170px; flex: 0 0 auto; }
.ar-part-filter { flex: 0 1 300px; }
.ar-part-filter .form-select { font-size: .78rem; }
.ar-part-stats { display: inline-flex; gap: .25rem; }
.ar-part-stats .ar-st { font-size: .68rem; min-width: 2.2rem; text-align: center; }
.ar-part-actions { margin-left: auto; display: inline-flex; gap: .3rem; align-items: center; flex-wrap: wrap; }
.ar-foto-switch { margin: 0 .25rem; display: inline-flex; align-items: center; gap: .35rem; }
.ar-foto-switch .form-check-input { margin: 0; }
.ar-eti-menu { min-width: 260px; }
.ar-eti-menu .form-label { font-size: .72rem; font-weight: 600; color: var(--ar-muted); margin-bottom: .15rem; }
.ar-part-table { font-size: .8rem; }
.ar-part-table thead th { white-space: nowrap; vertical-align: bottom; }
.ar-part-table td { vertical-align: middle; }
.ar-part-table .ar-th-day { line-height: 1.1; }
.ar-part-table .ar-th-day small { font-size: .66rem; }
.ar-part-nome a { color: #0f172a; text-decoration: none; font-weight: 600; }
.ar-part-nome a:hover { color: var(--ar-accent); }
.ar-part-row.ar-part-I .ar-part-nome a { color: #15803d; }
.ar-part-row.ar-part-C .ar-part-nome a { color: #b91c1c; text-decoration: line-through; }
.ar-part-row.ar-part-L .ar-part-nome a { color: #92400e; }
.ar-stato-sel { font-size: .74rem !important; min-width: 110px; }
.ar-stato-sel.ar-stato-I { border-color: #86efac; background-color: #f0fdf4; }
.ar-stato-sel.ar-stato-C { border-color: #fca5a5; background-color: #fef2f2; }
.ar-stato-sel.ar-stato-L { border-color: #fcd34d; background-color: #fffbeb; }
.ar-part-table .form-control, .ar-part-table .form-select { font-size: .76rem; }
.ar-part-table input[type=text].form-control { min-width: 56px; }
.ar-ico-btn { color: var(--ar-accent); cursor: pointer; padding: .2rem .3rem; border-radius: .3rem; }
.ar-ico-btn:hover { background: var(--ar-accent-light); }
.ar-prs { background: #f8fafc; }
.ar-prs-ok { background: #dcfce7 !important; }
.ar-prs-no { background: #fee2e2 !important; }
.ar-part-table tfoot td { background: #f8fafc; font-weight: 600; border-top: 2px solid var(--ar-card-border); }
.ar-part-table .ar-td-foto img { cursor: zoom-in; }

/* ---- Leggibilita': etichette dei campi ben distinte da valori e note ---- */
:root { --ar-label: #3b4a5e; --ar-value: #0f172a; --ar-help-fg: #8a94a6; }
.ar-field .form-label, .ar-rp-body .form-label, .ar-pers-b .form-label, .ar-search-row .form-label, .ar-qmodal .form-label, .ar-eti-menu .form-label, .ar-chkgroup-h {
  font-size: .7rem; font-weight: 700; color: var(--ar-label); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .2rem; line-height: 1.2;
}
.ar-field .form-label .fw-normal, .ar-rp-body .form-label .fw-normal { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--ar-help-fg); }
.ar-rp-head .meta .k { font-size: .64rem; font-weight: 700; color: var(--ar-label); letter-spacing: .06em; }
.ar-rp-head .meta .v { color: var(--ar-value); font-size: .9rem; }
/* valori e campi di input: piu' scuri e con bordo piu' netto */
.ar-rp-body .form-control, .ar-rp-body .form-select, .ar-pers-b .form-control, .ar-pers-b .form-select, .ar-search-row .form-control, .ar-search-row .form-select, .ar-qmodal .form-control, .ar-qmodal .form-select {
  color: var(--ar-value); border-color: #c3ccd8; font-size: .86rem; font-weight: 500; background-color: #fff;
}
.ar-rp-body .form-control:focus, .ar-rp-body .form-select:focus, .ar-pers-b .form-control:focus, .ar-pers-b .form-select:focus { border-color: var(--ar-accent); box-shadow: 0 0 0 .2rem rgba(42,110,74,.15); }
.ar-rp-body .form-control[readonly], .ar-pers-b .form-control[readonly] { background-color: #f8fafc; color: #475569; font-weight: 500; }
.ar-val { color: var(--ar-value); font-size: .9rem; font-weight: 600; }
/* note e aiuti: piu' leggeri e in corsivo, cosi' non si confondono con le etichette */
.ar-help, .form-text { font-size: .72rem; color: var(--ar-help-fg); font-style: italic; text-transform: none; letter-spacing: 0; font-weight: 400; }
.ar-help-miss { color: #b45309; font-style: normal; font-weight: 600; }
/* titoli di sezione: verde con riga, chiaramente diversi dalle etichette */
.ar-sub { color: var(--ar-accent); font-size: .74rem; font-weight: 700; letter-spacing: .08em; }
.ar-sub::after { background: #cfe3d8; }
.ar-sub .fw-normal { color: var(--ar-help-fg); font-weight: 400; letter-spacing: 0; text-transform: none; }
/* caselle di spunta: testo dell'opzione in colore valore */
.ar-chkgroup .form-check-label, .ar-rp-body .form-check-label { color: var(--ar-value); font-weight: 500; }
/* testate delle tabelle: stessa gerarchia delle etichette */
.ar-list-table thead th, .ar-rp-table thead th, .ar-evtree-head { color: var(--ar-label); font-weight: 700; letter-spacing: .05em; }
.ar-list-table td, .ar-rp-table td { color: var(--ar-value); }
/* riepiloghi in testata scheda */
.ar-rp-head .t2 { color: #475569; font-weight: 500; }
.ar-rp-head .t2 b { color: var(--ar-value); }
/* pannelli mezzi/risorse: intestazione riquadro */
.ar-res-h { color: var(--ar-label); text-transform: uppercase; font-size: .7rem; letter-spacing: .05em; }

/* ---- Stessa gerarchia etichette/valori/note su TUTTO il sito (pagine non ancora rifatte) ---- */
.ar-body label.form-label, .ar-body .col-form-label, .ar-body .form-group > label, .ar-body legend {
  font-size: .7rem; font-weight: 700; color: var(--ar-label); text-transform: uppercase; letter-spacing: .06em; line-height: 1.25;
}
.ar-body .col-form-label { padding-top: calc(.25rem + 2px); }
.ar-body .form-control, .ar-body .form-select, .ar-body textarea.form-control { color: var(--ar-value); border-color: #c3ccd8; font-weight: 500; }
.ar-body .form-control:focus, .ar-body .form-select:focus { border-color: var(--ar-accent); box-shadow: 0 0 0 .2rem rgba(42,110,74,.15); }
.ar-body .form-control[readonly] { background-color: #f8fafc; color: #475569; }
.ar-body .form-check-label { color: var(--ar-value); font-weight: 500; }
.ar-body .form-text, .ar-body .help-block, .ar-body small.text-muted { color: var(--ar-help-fg); font-style: italic; }
.ar-body .table thead th, .ar-body .table > thead > tr > th, .ar-body table.table > tr:first-child > th {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-label); font-weight: 700; background: #f8fafc; border-bottom: 2px solid var(--ar-card-border); vertical-align: bottom;
}
.ar-body .table td { color: var(--ar-value); }
.ar-body .card.ar-box > .card-header h3, .ar-body .card.ar-box > .card-header h4 { color: var(--ar-value); }


/* ---- Appuntamento: filtro inviti / esclusioni ---- */
.ar-inv-table td { vertical-align: middle; }
.ar-inv-table .ar-inv-lbl { font-size: .7rem; font-weight: 700; color: var(--ar-label); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; width: 1%; }
.ar-inv-table td.ar-inv-grp { width: 3.2rem; }
.ar-inv-table .ar-inv-grp .form-check-input { margin: 0; width: 1.1rem; height: 1.1rem; cursor: pointer; }
.ar-inv-table .ar-inv-grp .form-check-input:checked { background-color: var(--ar-accent); border-color: var(--ar-accent); }
.ar-inv-table tr.ar-inv-sep td { background: #f8fafc; padding: .2rem .5rem; border-top: 2px dashed var(--ar-card-border); }
.ar-inv-table tr.ar-inv-sep .ar-st { font-size: .65rem; }
.ar-inv-table tfoot td { background: #fbfcfd; }
.ar-inv-table .form-select-sm, .ar-inv-table .form-control-sm { min-width: 10rem; }

/* ---- Appuntamento: sotto-schede (crediti, mantenimenti, ruoli, votazioni, rimborsi) ---- */
.card.ar-subcard { border: 1px solid var(--ar-card-border); border-radius: .5rem; box-shadow: none; margin-bottom: 1rem; }
.card.ar-subcard > .card-header { background: #f8fafc; border-bottom: 1px solid var(--ar-card-border); padding: .5rem .85rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card.ar-subcard > .card-header .card-title, .card.ar-subcard > .card-header h3, .card.ar-subcard > .card-header h4 { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-accent); margin: 0; }
.card.ar-subcard > .card-header .card-title i, .card.ar-subcard > .card-header h3 i { margin-right: .35rem; opacity: .8; }
.card.ar-subcard > .card-header .ar-cnt { margin-left: auto; font-size: .7rem; color: var(--ar-muted); }
.card.ar-subcard .card-body { padding: .75rem .85rem; }
.card.ar-subcard .card-body .row { row-gap: .5rem; }
.card.ar-subcard .ar-list-table { margin-bottom: 0; }

/* ---- Appuntamento: iscrizioni ---- */
.ar-iscr-table td { vertical-align: middle; }
.ar-iscr-table .c-vol { font-weight: 600; color: var(--ar-value); }
.ar-iscr-table .c-act { width: 1%; white-space: nowrap; text-align: right; }

/* ---- larghezze utili ---- */
.ar-w-eur { max-width: 9rem; }
.ar-w-eur .form-control { text-align: right; font-variant-numeric: tabular-nums; }

@media (max-width: 767.98px) {
  .ar-inv-table .form-select-sm, .ar-inv-table .form-control-sm { min-width: 7rem; }
  .ar-inv-table td.ar-inv-grp { width: 2.4rem; padding-left: .15rem; padding-right: .15rem; }
  .ar-inv-table .ar-inv-lbl { white-space: normal; }
  .card.ar-subcard .card-body { padding: .6rem; }
  .ar-w-eur { max-width: none; }
}

/* ---- Documenti: elenco / archivio ---- */
.ar-doc-list td { vertical-align: middle; }
.ar-doc-list .c-tit { min-width: 16rem; }
.ar-doc-list .ar-doc-tit { font-weight: 600; color: var(--ar-value); }
.ar-doc-list .ar-doc-ogg { font-size: .74rem; color: var(--ar-help-fg); line-height: 1.25; margin-top: .1rem; }
.ar-doc-list .c-aut { white-space: nowrap; }
.ar-doc-n { display: inline-block; font-size: .74rem; font-weight: 600; color: var(--ar-accent); background: var(--ar-accent-light); border-radius: 999px; padding: .1rem .5rem; }
.ar-doc-list tr.ar-doc-new .ar-doc-tit { color: var(--ar-accent); }
.ar-doc-list tr.ar-doc-new .ar-doc-tit::before { content: ""; display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--ar-accent); margin-right: .4rem; vertical-align: middle; }
.ar-tipi-table td { vertical-align: middle; }
.ar-tipi-table td.ar-w-num, .ar-tipi-table th.ar-w-num { width: 6rem; }
.ar-tipi-table .ar-tipo { text-decoration: none; }
.ar-rp-tabs .ar-tab.warn { border-color: #f59e0b; color: #92400e; background: #fffbeb; }
.ar-rp-tabs .ar-tab.warn i, .ar-rp-tabs .ar-tab.warn .badge { color: #b45309; }
.ar-rp-tabs .ar-tab.warn .badge { background: #fef3c7; }

/* ---- Documento: dettaglio ---- */
.ar-doc-head .ico { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-doc-text { font-size: .9rem; line-height: 1.55; color: var(--ar-value); white-space: normal; }
.ar-w-thumb { width: 64px; }
.ar-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: .35rem; border: 1px solid var(--ar-card-border); background: #f8fafc; }
.ar-crit-table th { width: 30%; font-size: .7rem; font-weight: 700; color: var(--ar-label); text-transform: uppercase; letter-spacing: .05em; vertical-align: top; padding-top: .55rem; }
.ar-crit-table td { line-height: 1.7; }
.ar-w-filter { max-width: 12rem; }
.ar-dest-list { display: flex; flex-wrap: wrap; gap: .3rem; max-height: 22rem; overflow: auto; padding: .5rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; background: #fbfcfd; }
.ar-dest { font-size: .78rem; padding: .15rem .5rem; border-radius: 999px; background: #fff; border: 1px solid var(--ar-card-border); color: var(--ar-value); white-space: nowrap; }
.ar-kpis { display: flex; gap: .75rem; flex-wrap: wrap; }
.ar-kpi { min-width: 7rem; padding: .5rem .8rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; background: #fbfcfd; }
.ar-kpi .k { font-size: .68rem; font-weight: 700; color: var(--ar-label); text-transform: uppercase; letter-spacing: .05em; }
.ar-kpi .v { font-size: 1.25rem; font-weight: 700; color: var(--ar-value); line-height: 1.2; }

/* ---- Archivio: allegati in griglia ---- */
.ar-att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .75rem; }
.ar-att { display: flex; gap: .75rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .6rem; background: #fff; }
.ar-att-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: .4rem; border: 1px solid var(--ar-card-border); background: #f8fafc; }
.ar-att-b { min-width: 0; flex: 1; }
.ar-att-name { font-weight: 600; color: var(--ar-value); font-size: .88rem; word-break: break-word; }
.ar-att-meta { font-size: .74rem; color: var(--ar-help-fg); margin: .15rem 0 .3rem; display: flex; gap: .4rem; align-items: center; }
.ar-att-video { width: 100%; max-height: 220px; border-radius: .4rem; background: #000; margin: .3rem 0; }

@media (max-width: 767.98px) {
  .ar-doc-list .c-aut { white-space: normal; }
  .ar-doc-list .c-tit { min-width: 12rem; }
  .ar-att-grid { grid-template-columns: 1fr; }
  .ar-kpi { flex: 1; min-width: 5rem; }
  .ar-dest-list { max-height: 14rem; }
  .ar-w-filter { max-width: 8rem; }
}

/* ---- dc_ricerca.asp: ricerca intelligente documenti ---- */
.ar-ask { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.ar-ask-box { position: relative; flex: 1 1 22rem; }
.ar-ask-box .form-control { padding: .7rem 2.4rem .7rem 2.6rem; font-size: 1.02rem; border-radius: 2rem; border-color: var(--ar-card-border); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.ar-ask-box .form-control:focus { border-color: var(--ar-accent); box-shadow: 0 0 0 .2rem rgba(42,110,74,.15); }
.ar-ask-ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ar-muted); }
.ar-ask-clear { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); color: var(--ar-muted); padding: .2rem .5rem; text-decoration: none; }
.ar-ask-actions { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ar-wait { color: var(--ar-muted); font-size: .9rem; }
.ar-hits { display: flex; flex-direction: column; }
.ar-hit { padding: .8rem 1rem; border-bottom: 1px solid var(--ar-card-border); transition: background .3s; }
.ar-hit:last-child { border-bottom: 0; }
.ar-hit-flash { background: var(--ar-accent-light); }
.ar-hit-h { display: flex; gap: .75rem; align-items: flex-start; }
.ar-hit-n { flex: 0 0 auto; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--ar-accent); color: #fff; font-size: .8rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; margin-top: .1rem; }
.ar-hit-t { flex: 1 1 auto; min-width: 0; }
.ar-hit-t .ar-doc-tit { font-size: .98rem; }
.ar-hit-meta { font-size: .78rem; color: var(--ar-muted); display: flex; flex-wrap: wrap; gap: .2rem .5rem; align-items: center; margin-top: .15rem; }
.ar-hit-kv { display: inline-flex; gap: .3rem; align-items: baseline; }
.ar-hit-kv > span { text-transform: uppercase; font-size: .66rem; letter-spacing: .03em; font-weight: 600; }
.ar-hit-score { flex: 0 0 auto; display: flex; align-items: center; gap: .4rem; font-size: .75rem; color: var(--ar-muted); min-width: 6rem; justify-content: flex-end; }
.ar-hit-bar { width: 3.5rem; height: .35rem; border-radius: .2rem; background: #e5eaf0; overflow: hidden; }
.ar-hit-bar i { display: block; height: 100%; background: var(--ar-accent); border-radius: .2rem; }
.ar-hit-x { margin: .45rem 0 0; padding: .45rem .7rem; font-size: .84rem; color: #374151; background: #f6f8fa; border-left: 3px solid var(--ar-accent); border-radius: .25rem; }
.ar-hit-xl { text-transform: uppercase; font-size: .66rem; letter-spacing: .03em; font-weight: 600; color: var(--ar-muted); margin-right: .3rem; }
.ar-hit-act { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .55rem; }
.ar-hit-act .btn-link { font-size: .8rem; text-decoration: none; }
.ar-hit-fn { font-weight: 400; opacity: .8; max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
.ar-summary { margin-top: .6rem; padding: .7rem .9rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; background: #fff; font-size: .875rem; }
.ar-summary-h { display: flex; align-items: center; font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .02em; color: var(--ar-accent); margin-bottom: .4rem; }
.ar-summary-h a { color: var(--ar-muted); text-decoration: none; }
.ar-summary-b p, .ar-answer-b p { margin: 0 0 .5rem; }
.ar-summary-b ul, .ar-answer-b ul { margin: 0 0 .5rem; padding-left: 1.2rem; }
.ar-summary-b li, .ar-answer-b li { margin-bottom: .15rem; }
.ar-md-h { font-weight: 700; margin: .5rem 0 .25rem; }
.ar-answer-b { font-size: .95rem; line-height: 1.55; }
.ar-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .3rem; margin: 0 .1rem; border-radius: .65rem; background: var(--ar-accent-light); color: var(--ar-accent); font-size: .72rem; font-weight: 700; text-decoration: none; vertical-align: text-top; }
.ar-cite:hover { background: var(--ar-accent); color: #fff; }
@media (max-width: 767.98px) {
  .ar-hit-score { min-width: 0; }
  .ar-hit-bar { display: none; }
  .ar-hit-fn { max-width: 9rem; }
  .ar-ask-actions { width: 100%; justify-content: space-between; }
}

/* ---- co_monitor112.asp: monitor allarmi GeoResQ ---- */
.ar-mon-map { height: 60vh; min-height: 260px; width: 100%; border-radius: 0 0 .5rem .5rem; overflow: hidden; background: #e9eef2; }
.ar-mon-scena { width: auto; max-width: 11rem; display: inline-block; font-size: .78rem; }
.ar-mon-tools { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .6rem .75rem; border-bottom: 1px solid var(--ar-card-border); }
.ar-mon-sec:empty { display: none; }
.ar-mon-sech { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); padding: .55rem .75rem .25rem; border-top: 1px solid var(--ar-card-border); }
.ar-mon-row { display: flex; align-items: center; gap: .5rem; padding: .35rem .75rem; font-size: .85rem; color: inherit; text-decoration: none; }
.ar-mon-row:hover { background: var(--ar-accent-light); }
.ar-mon-row > i { width: 1.1rem; text-align: center; }
.ar-mon-row-t { font-weight: 600; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-mon-empty { padding: 1rem .75rem; color: var(--ar-muted); font-size: .875rem; }
.ar-mon-table th { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); }
.ar-mon-new td { background: #fff1f0; }
@keyframes ar-mon-blink { 50% { opacity: .35; } }
.ar-mon-new .ar-st { animation: ar-mon-blink 1.2s infinite; }
.ar-mon-pin { width: 32px; height: 32px; cursor: pointer; filter: drop-shadow(0 1px 2px rgba(0,0,0,.4)); }
.ar-kv > div { display: flex; gap: .75rem; padding: .3rem 0; border-bottom: 1px solid var(--ar-card-border); font-size: .875rem; }
.ar-kv > div:last-child { border-bottom: 0; }
.ar-kv > div > span:first-child { flex: 0 0 9rem; font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--ar-muted); font-weight: 600; padding-top: .15rem; }
@media (max-width: 991.98px) {
  .ar-mon-map { height: 45vh; }
  .ar-mon-list .card-body { max-height: 60vh; overflow: auto; }
}
/* schede caricate da srv (SMS Locator / allarme) dentro #dettaglio */
#dettaglio .box > .box-title h3 i { margin-right: .35rem; }
#dettaglio .ar-det-row > label { margin-bottom: 0; }
#dettaglio .form-group .form-label, #dettaglio .control-label { font-size: .72rem; }
#dettaglio .ar-det-bar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; padding-top: .75rem; margin-top: .5rem; border-top: 1px solid var(--ar-card-border); }
#dettaglio .ar-det-bar .ar-det-sx { margin-right: auto; }
#dettaglio .ar-det-scroll { max-height: 60vh; overflow: auto; }
#dettaglio .ar-det-scroll table th { font-size: .75rem; color: var(--ar-muted); text-transform: uppercase; }
#dettaglio .ar-det-scroll table td { font-size: .82rem; }
#dettaglio .alert .btn-close { float: right; }
#dettaglio input[disabled].form-control, #dettaglio textarea[disabled].form-control { background: #f3f5f7; color: #495057; }
.ar-mon-live { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: #cbd5e1; vertical-align: middle; margin-left: .25rem; }
.ar-mon-live-on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.2); }
.ar-mon-reg { width: auto; max-width: 12rem; font-size: .78rem; }
.ar-mon-scenav { width: auto; min-width: 9rem; max-width: 16rem; display: inline-block; font-size: .78rem; vertical-align: middle; }
.ar-mon-mapcard .card-header .actions { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; justify-content: flex-end; }
.ar-mon-mapcard .card-header .actions .select2-container { width: auto !important; min-width: 9rem; max-width: 16rem; }
.ar-mon-embar { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; padding: .5rem .75rem; border-top: 1px solid var(--ar-card-border); font-size: .8rem; }
.ar-mon-em.active { background: var(--ar-accent); color: #fff; border-color: var(--ar-accent); }
.ar-mon-tipoimg { height: 16px; vertical-align: -3px; margin-right: .3rem; }
.ar-mon-follow td { background: var(--ar-accent-light); }
.ar-mon-pin-em { width: 26px; height: 26px; }
#dettaglio .ar-det-kv { border-bottom: 1px dashed #e5e9ee; padding: .2rem 0; font-size: .85rem; }
#dettaglio .ar-det-kv > .col-sm-6:first-child strong { font-size: .72rem; text-transform: uppercase; letter-spacing: .02em; color: var(--ar-muted); font-weight: 600; }
#dettaglio h4 { font-size: .85rem; font-weight: 600; margin: .75rem 0 .25rem; }
#dettaglio .ar-det-btntable td { padding: .2rem 0; border: 0; }
#dettaglio .ar-det-btntable .btn { white-space: normal; }
#dettaglio .box-title h3 img { height: 20px; vertical-align: middle; }
@media (max-width: 991.98px) {
  .ar-mon-mapcard .card-header { flex-wrap: wrap; }
  .ar-mon-mapcard .card-header .actions { width: 100%; justify-content: flex-start; margin-top: .3rem; }
}

/* ---- Elisoccorso: elenco giornalieri (rp_elirapgioele) ---- */
.ar-eli-filt .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-eli-legend { font-size: .78rem; color: var(--ar-muted); display: flex; align-items: center; padding-bottom: .35rem; }
.ar-eli-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; background: #cbd5e1; vertical-align: middle; margin-right: .35rem; }
.ar-eli-dot-ok, tr.ar-eli-ok .ar-eli-dot { background: #22c55e; }
.ar-eli-dot-no, tr.ar-eli-no .ar-eli-dot { background: #ef4444; }
.ar-eli-tbl { font-size: .82rem; }
.ar-eli-tbl th { white-space: nowrap; font-size: .72rem; }
.ar-eli-tbl td { vertical-align: middle; }
.ar-eli-tbl td.ar-eli-st, .ar-eli-tbl th.ar-eli-st { width: 1.6rem; padding-right: 0; }
.ar-eli-tbl td.ar-eli-st .ar-eli-dot { margin: 0; }
tr.ar-eli-row { cursor: pointer; }
tr.ar-eli-no > td:first-child { border-left: 3px solid #ef4444; }
tr.ar-eli-ok > td:first-child { border-left: 3px solid #22c55e; }
.ar-eli-te { font-weight: 600; color: #1f2937; }
.ar-eli-cnsas { background: #fab750; color: #4a2c00; }
.ar-eli-open { padding: .15rem .45rem; }
.ar-eli-foot { font-size: .8rem; color: var(--ar-muted); display: flex; flex-wrap: wrap; align-items: center; background: var(--ar-card-head); }
@media (max-width: 767.98px) {
	.ar-eli-tbl { font-size: .78rem; }
	.ar-eli-filt .card-header .actions .btn { padding: .2rem .5rem; }
}

/* ---- Elisoccorso: dettaglio giornaliero (rp_elirapgioNEW) ---- */
.ar-eli-side .card-body { padding: .6rem .75rem; }
.ar-eli-head { font-size: .95rem; }
.ar-eli-head b { font-size: 1.05rem; }
.ar-eli-meta { display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; color: #334155; margin-top: .3rem; }
.ar-eli-meta i { width: 1.1rem; color: var(--ar-muted); }
.ar-eli-nav { display: flex; flex-direction: column; gap: 2px; margin: .6rem 0; }
.ar-eli-nav .btn { text-align: left; border: 1px solid transparent; background: #fff; color: #1f2937; font-size: .82rem; padding: .4rem .6rem; display: flex; align-items: center; gap: .45rem; border-radius: .4rem; position: relative; }
.ar-eli-nav .btn:hover { background: #f1f5f9; border-color: var(--ar-card-border); }
.ar-eli-nav .btn.btn-info, .ar-eli-nav .btn.btn-info:hover { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-eli-nav .btn .ar-eli-chev { margin-left: auto; font-size: .65rem; opacity: .6; }
.ar-eli-nav .btn > i:first-child { width: 1.1rem; text-align: center; opacity: .8; }
.ar-eli-tag { font-size: .62rem; font-weight: 700; letter-spacing: .02em; padding: .1rem .35rem; border-radius: .3rem; background: #e2e8f0; color: #334155; line-height: 1.2; }
.ar-eli-tag-cnsas { background: #fab750; color: #4a2c00; }
.ar-eli-nav .btn.btn-info .ar-eli-tag { background: rgba(255,255,255,.85); color: #1f2937; }
.ar-eli-nav .btn.btn-info .ar-eli-tag-cnsas { background: #fab750; color: #4a2c00; }
.ar-eli-side .dropdown-menu { font-size: .84rem; }
.ar-eli-acts { display: flex; flex-direction: column; gap: .3rem; margin-top: .6rem; }
.ar-eli-acts .btn { width: 100%; }
.ar-eli-main .card.ar-box .card-body { background: #fff; }
.ar-eli-main .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-eli-main label.form-control { background: #f8fafc; color: #1f2937; min-height: calc(1.5em + .5rem + 2px); }
.ar-eli-main .form-group { margin-bottom: .55rem; }
.ar-eli-main #tabs-missione .nav-link { font-size: .82rem; padding: .4rem .7rem; }
.ar-eli-main .tab-content.padding { padding: .75rem; }
.ar-eli-main .panel-group .card > .card-header { background: #f1f5f9; }
.ar-eli-main .panel-group .card > .card-header > h4 { font-size: .88rem; }
.ar-eli-main .table th { font-size: .72rem; white-space: nowrap; }
.ar-eli-hho { font-size: .72rem; color: var(--ar-muted); display: block; margin-top: .15rem; }
.ar-eli-hho b { font-weight: 600; }
.ar-eli-ttl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
#jattendere { display: none; }
@media (min-width: 992px) {
	.ar-eli-side { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); }
	.ar-eli-nav { max-height: 55vh; overflow-y: auto; }
}
@media (max-width: 991.98px) {
	.ar-eli-nav { flex-direction: row; flex-wrap: wrap; }
	.ar-eli-nav .btn { flex: 1 1 auto; width: auto; min-width: 45%; }
	.ar-eli-nav .btn .ar-eli-chev { display: none; }
	.ar-eli-acts { flex-direction: row; flex-wrap: wrap; }
	.ar-eli-acts .btn, .ar-eli-acts .dropdown { width: auto; flex: 1 1 45%; }
	.ar-eli-acts .dropdown .btn { width: 100%; }
}

/* ---- Ricerca funzioni di menu + help (js/ar_cerca.js, it_cerca.asp, it_cercamenu.asp) ---- */
.ar-cm { position: relative; }
.ar-cm-card .card-body { padding: .75rem .9rem; }
.ar-cm-box { position: relative; }
.ar-cm-box .form-control { padding: .6rem 4.5rem .6rem 2.6rem; font-size: 1rem; border-radius: .6rem; border-color: var(--ar-card-border); box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ar-cm-box .form-control:focus { border-color: var(--ar-accent); box-shadow: 0 0 0 .2rem rgba(42,110,74,.15); }
.ar-cm-ico { position: absolute; left: .95rem; top: 50%; transform: translateY(-50%); color: var(--ar-muted); pointer-events: none; }
.ar-cm-spin { position: absolute; right: 2.6rem; top: 50%; margin-top: -.5rem; color: var(--ar-accent); }
.ar-cm-clear { position: absolute; right: .9rem; top: 50%; transform: translateY(-50%); font-size: .7rem; }
.ar-cm-res { position: absolute; left: 0; right: 0; top: calc(100% - 1.2rem); z-index: 1040; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .6rem; box-shadow: 0 12px 32px rgba(15,23,42,.14); max-height: 60vh; overflow-y: auto; padding: .3rem; }
.ar-cm-item { display: flex; flex-direction: column; gap: .1rem; padding: .5rem .7rem; border-radius: .45rem; text-decoration: none; color: #1f2937; }
.ar-cm-item:hover, .ar-cm-item.active { background: var(--ar-accent-light); color: #1f2937; }
.ar-cm-t { font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.ar-cm-t mark, .ar-cm-d mark { background: #fef08a; padding: 0 .1rem; border-radius: .2rem; }
.ar-cm-ai { color: var(--ar-accent-mid); font-size: .72rem; }
.ar-cm-p { font-size: .72rem; color: var(--ar-muted); }
.ar-cm-d { font-size: .78rem; color: #475569; }
.ar-cm-empty { padding: .8rem; color: var(--ar-muted); font-size: .85rem; text-align: center; }
.ar-cm-sec { font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ar-muted); padding: .6rem .7rem .2rem; border-top: 1px solid var(--ar-card-border); margin-top: .3rem; }
.ar-cm-help .ar-cm-t { color: var(--ar-accent); font-weight: 600; }
.ar-cm-askrow { padding: .5rem .5rem .3rem; border-top: 1px solid var(--ar-card-border); margin-top: .3rem; text-align: center; }
.ar-cm-note { font-size: .74rem; color: var(--ar-muted); min-height: 1.1rem; margin-top: .35rem; padding: 0 .2rem; }
.ar-cm-note a.disabled { pointer-events: none; opacity: .5; }
.ar-cm-ans { margin-top: .6rem; border: 1px solid var(--ar-card-border); border-radius: .6rem; background: #fff; overflow: hidden; }
.ar-cm-ans-h { display: flex; align-items: center; gap: .4rem; padding: .5rem .8rem; background: var(--ar-accent-light); color: var(--ar-accent); font-weight: 600; font-size: .85rem; }
.ar-cm-ans-h .btn-close { margin-left: auto; font-size: .65rem; }
.ar-cm-ans-b { padding: .7rem .9rem; font-size: .9rem; line-height: 1.55; }
.ar-cm-ans-b p { margin-bottom: .5rem; }
.ar-cm-ans-b ul, .ar-cm-ans-b ol { padding-left: 1.3rem; margin-bottom: .5rem; }
.ar-cm-cite { display: inline-block; font-size: .68rem; font-weight: 700; line-height: 1; padding: .12rem .35rem; margin: 0 .1rem; border-radius: .3rem; background: var(--ar-accent-light); color: var(--ar-accent); text-decoration: none; vertical-align: super; }
.ar-cm-ans-f { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; padding: .5rem .8rem .7rem; border-top: 1px dashed var(--ar-card-border); font-size: .78rem; }
.ar-cm-ans-fl { color: var(--ar-muted); margin-right: .2rem; }
.ar-cm-fonte { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .55rem; border-radius: 999px; border: 1px solid var(--ar-card-border); color: #1f2937; text-decoration: none; background: #f8fafc; }
.ar-cm-fonte:hover { border-color: var(--ar-accent); color: var(--ar-accent); }
.ar-cm-fonte-menu { background: var(--ar-accent-light); border-color: transparent; }
.ar-cm-fonte small { color: var(--ar-muted); }
.ar-cm-fn { font-weight: 700; font-size: .68rem; color: var(--ar-accent); }
.ar-cm-wait { padding: .8rem; font-size: .85rem; color: var(--ar-muted); }
.ar-cm-hint { font-size: .74rem; color: var(--ar-muted); margin-top: .8rem; }
.ar-cm-hint kbd { font-size: .7rem; }
/* risposta statistica: tabelline dei risultati del motore (st_motore.asp) */
.ar-cm-st { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem; padding: 0 .9rem .7rem; }
.ar-cm-st-card { border: 1px solid var(--ar-card-border); border-radius: .5rem; background: #fff; overflow: hidden; }
.ar-cm-st-h { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem .6rem; font-size: .78rem; font-weight: 600; color: #334155; background: #f8fafc; border-bottom: 1px solid var(--ar-card-border); }
.ar-cm-st-h a { font-weight: 500; font-size: .72rem; white-space: nowrap; text-decoration: none; }
.ar-cm-st-tbl { font-size: .8rem; }
.ar-cm-st-tbl td { padding: .25rem .6rem; border-color: #eef2f6; }
.ar-cm-st-tbl td:last-child { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.ar-cm-st-k2 { display: block; font-size: .7rem; color: var(--ar-muted); }
.ar-cm-st-tot td { border-top: 2px solid #cbd5e1; font-weight: 700; }
.ar-cm-st-big { font-size: 1.6rem; font-weight: 700; color: var(--ar-accent); padding: .5rem .7rem; font-variant-numeric: tabular-nums; }
.ar-cm-st-err { padding: .5rem .7rem; font-size: .8rem; color: #9a3412; }
.ar-cm-st-all { font-size: .74rem; margin: .3rem .6rem .5rem; }
.ar-cm-st-nota { padding: 0 .9rem .6rem; font-size: .76rem; color: var(--ar-muted); }
.ar-cm-fonte-stat { background: #ecfdf5; border-color: transparent; }
/* nel modal i risultati stanno nel flusso (il modal cresce) */
#arCmModal .ar-cm-res { position: static; box-shadow: none; max-height: 55vh; margin-top: .5rem; }
#arCmModal .modal-body { padding: .9rem 1rem 1rem; }
.ar-nav-search { color: rgba(255,255,255,.85); font-size: 1.05rem; padding: .35rem .6rem; margin-right: .5rem; border-radius: .4rem; text-decoration: none; line-height: 1; }
.ar-nav-search:hover, .ar-nav-search:focus { color: #fff; background: rgba(255,255,255,.12); }
@media (max-width: 575.98px) {
	.ar-cm-box .form-control { font-size: .92rem; padding-left: 2.3rem; }
	.ar-cm-res { max-height: 55vh; }
	.ar-cm-dialog { margin: .5rem; }
}
@media (min-width: 992px) { .ar-nav-search { margin-right: 0; margin-left: .5rem; } }

/* ---- Help (pagine hl_*) ---- */
.ar-hl-body { font-size: .92rem; line-height: 1.6; color: #1f2937; max-width: 62rem; }
.ar-hl-body h1, .ar-hl-body h2 { font-size: 1.15rem; font-weight: 700; color: var(--ar-accent); margin: 1.4rem 0 .6rem; padding-bottom: .3rem; border-bottom: 1px solid var(--ar-card-border); text-align: left !important; }
.ar-hl-body h3 { font-size: 1rem; font-weight: 600; color: #1f2937; margin: 1.1rem 0 .4rem; }
.ar-hl-body h4 { font-size: .95rem; font-weight: 600; margin: .9rem 0 .3rem; }
.ar-hl-body p, .ar-hl-body li { line-height: 1.6; }
.ar-hl-body ul, .ar-hl-body ol { padding-left: 1.4rem; }
.ar-hl-body img { max-width: 100%; height: auto; border: 1px solid var(--ar-card-border); border-radius: .375rem; margin: .3rem 0; }
.ar-hl-body table { font-size: .85rem; }
.ar-hl-body .tbtesta td, .ar-hl-body .tbtesta th { background: var(--ar-card-head); font-weight: 600; }
.ar-hl-body hr { margin: 1.2rem 0; }
.ar-hl-body .text-justify { text-align: left !important; }
.ar-hl-body a { text-decoration: underline; text-decoration-color: rgba(42,110,74,.35); }
.ar-hl-body a:hover { text-decoration-color: var(--ar-accent); }
.ar-hl-body .small.text-muted { font-size: .74rem; margin-top: 1.5rem; }
.ar-hl-side { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); }
.ar-hl-toc { display: flex; flex-direction: column; max-height: 60vh; overflow-y: auto; }
.ar-hl-toc a { display: block; padding: .3rem .6rem; font-size: .82rem; color: #334155; text-decoration: none; border-left: 2px solid transparent; border-radius: 0 .3rem .3rem 0; }
.ar-hl-toc a:hover { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-hl-toc a.ar-hl-toc-2 { padding-left: 1.4rem; font-size: .78rem; color: var(--ar-muted); }
.ar-hl-foot { font-size: .8rem; display: flex; flex-direction: column; gap: .3rem; background: var(--ar-card-head); }
.ar-hl-tocm { border-bottom: 1px solid var(--ar-card-border); background: #fafbfc; }
.ar-hl-tocm-t { display: flex; align-items: center; padding: .5rem .9rem; font-size: .82rem; color: #334155; text-decoration: none; }
.ar-hl-tocm-t .fa-chevron-down { transition: transform .2s; }
.ar-hl-tocm-t:not(.collapsed) .fa-chevron-down { transform: rotate(180deg); }
.ar-hl-tocm .ar-hl-toc { max-height: none; padding: 0 .5rem .5rem; }
.ar-hl-idx li { margin-bottom: .5rem; font-size: .95rem; }
.ar-hl-idx li i { color: var(--ar-accent); }
.ar-hl-video embed { max-width: 100%; }
@media print { .ar-navbar, .ar-pathbar, .ar-hl-side, .ar-hl-tocm, .card-header .actions { display: none !important; } .ar-hl-body { max-width: none; } }
.ar-hl-fig { margin: 1rem 0 1.4rem; }
.ar-hl-fig img, .ar-hl-fig svg { display: block; max-width: 100%; height: auto; border: 1px solid var(--ar-card-border); border-radius: .5rem; box-shadow: 0 4px 14px rgba(15,23,42,.08); background: #fff; }
.ar-hl-fig figcaption { font-size: .82rem; color: #475569; line-height: 1.5; margin-top: .5rem; padding: .5rem .75rem; border-left: 3px solid var(--ar-accent); background: var(--ar-card-head); border-radius: 0 .4rem .4rem 0; }
.ar-hl-venn svg { padding: .5rem; }

/* ---- vuoto.asp: pagina di sezione del menu ---- */
.ar-vu-tiles { margin-bottom: 1rem; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
.ar-vu-sec { border: 1px solid var(--ar-card-border); border-radius: .6rem; margin-top: .75rem; overflow: hidden; background: #fff; }
.ar-vu-sech { display: flex; align-items: center; gap: .5rem; padding: .55rem .85rem; background: var(--ar-card-head); color: #1f2937; font-weight: 600; font-size: .9rem; text-decoration: none; border-bottom: 1px solid var(--ar-card-border); }
.ar-vu-sech:hover { color: var(--ar-accent); }
.ar-vu-sech > i:first-child { color: var(--ar-accent); }
.ar-vu-sech .fa-chevron-right { font-size: .7rem; color: var(--ar-muted); }
.ar-vu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0; }
.ar-vu-item { display: flex; align-items: center; gap: .5rem; padding: .5rem .85rem; font-size: .86rem; color: #1f2937; text-decoration: none; border-bottom: 1px solid #f1f5f9; border-right: 1px solid #f1f5f9; }
.ar-vu-item:hover { background: var(--ar-accent-light); color: var(--ar-accent); }
.ar-vu-item i { color: var(--ar-muted); }
@media (max-width: 575.98px) { .ar-vu-tiles { grid-template-columns: repeat(3, 1fr); } .ar-vu-list { grid-template-columns: 1fr; } }

/* ---- Registro presenze: elenco (pr_lisgio) e giornata (pr_giorno) ---- */
.ar-pg-filt .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-pg-legend { font-size: .78rem; color: var(--ar-muted); display: flex; align-items: center; flex-wrap: wrap; gap: .25rem 1rem; padding-top: .25rem; }
.ar-pg-dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.ar-pg-dot-no { background: #ef4444; } .ar-pg-dot-ok { background: #22c55e; } .ar-pg-dot-exp { background: #2563eb; }
.ar-pg-tbl { font-size: .82rem; }
.ar-pg-tbl th { font-size: .72rem; white-space: nowrap; }
.ar-pg-tbl td { vertical-align: middle; }
.ar-pg-tbl td.ar-pg-st, .ar-pg-tbl th.ar-pg-st { width: 2rem; padding-right: 0; }
tr.ar-pg-no > td:first-child { border-left: 3px solid #ef4444; }
tr.ar-pg-ok > td:first-child { border-left: 3px solid #22c55e; }
tr.ar-pg-exp > td:first-child { border-left: 3px solid #2563eb; }
tr.ar-pg-exp > td { background-color: rgba(37,99,235,.05); }
.ar-pg-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; font-size: .7rem; }
.ar-pg-badge-no { background: #fee2e2; color: #b91c1c; } .ar-pg-badge-ok { background: #dcfce7; color: #15803d; } .ar-pg-badge-exp { background: #dbeafe; color: #1d4ed8; }
.ar-pg-aut { display: inline-block; font-size: .7rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px; white-space: nowrap; }
.ar-pg-aut-no { background: #fef3c7; color: #92400e; } .ar-pg-aut-ok { background: #dcfce7; color: #15803d; }
.ar-pg-chk { margin-right: .35rem; vertical-align: middle; }
.ar-pg-note { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-pg-btn { padding: .15rem .45rem; }
.ar-pg-res { font-size: .84rem; }
.ar-pg-res th { font-size: .72rem; }
.ar-pg-body .dataTables_wrapper > .row:first-child { padding: .5rem .75rem 0; }
.ar-pg-body .dataTables_wrapper > .row:last-child { padding: .25rem .75rem .5rem; }
@media (max-width: 767.98px) { .ar-pg-tbl { font-size: .78rem; } .ar-pg-note { max-width: 10rem; } }
/* denuncia infortunio (dn_denuncia.asp): wizard a passi + contenuto */
.ar-dn-grid { min-height: 50vh; }
.ar-dn-wiz { background: #f8fafc; border-right: 1px solid var(--ar-card-border); padding: .35rem 0 .75rem; }
.ar-dn-wiz > .row { margin: 0; }
.ar-dn-wiz .wizard-chapter { padding: .7rem .75rem .25rem; }
.wizard-chapter label { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); margin: 0; }
.ar-dn-wiz .wizard-item { padding: .45rem .75rem .45rem 1.15rem; border-left: 3px solid transparent; cursor: pointer; font-size: .82rem; line-height: 1.3; }
.wizard-item label { margin: 0; cursor: pointer; font-weight: 500; color: #334155; }
.wizard-item:hover { background: #eef2f6; }
.wizard-item.active { background: #fff; border-left-color: var(--ar-accent); }
.wizard-item.active label { font-weight: 600; color: #0f172a; }
.wizard-item.disabled { opacity: .6; pointer-events: none; }
.ar-dn-cont { padding: 1rem; background: #fff; }
/* passi numerati della sezione 1 */
.ar-body .ar-dn-wiz .wizard-item label.form-label { display: flex; align-items: center; gap: .5rem; text-transform: none; letter-spacing: 0; font-size: .82rem; }
.ar-dn-n { flex: 0 0 auto; width: 1.35rem; height: 1.35rem; border-radius: 50%; border: 1.5px solid #94a3b8; color: #475569; background: #fff; font-size: .7rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.wizard-item.active .ar-dn-n { border-color: var(--ar-accent); background: var(--ar-accent); color: #fff; }
/* timeline degli eventi (sezione 2) */
.ar-dn-tl { position: relative; margin-top: .25rem; }
.ar-dn-tl > .row { margin: 0; }
.ar-dn-tl .wizard-item { position: relative; display: flex; align-items: flex-start; gap: .6rem; padding: .4rem .75rem .4rem .9rem; }
.ar-dn-tl .wizard-item::before { content: ""; position: absolute; left: calc(.9rem + .7rem - 1px); top: 0; bottom: 0; width: 2px; background: #cbd5e1; }
.ar-dn-tl > .row:first-child .wizard-item::before { top: 50%; }
.ar-dn-tl > .row:last-child .wizard-item::before { bottom: 50%; }
.ar-dn-tl .wizard-item.active::before { left: calc(.9rem + .7rem - 1px - 3px); }
.ar-dn-tl-dot { position: relative; z-index: 1; flex: 0 0 auto; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .7rem; margin-top: .05rem; box-shadow: 0 0 0 3px #f8fafc; }
.wizard-item.active .ar-dn-tl-dot { box-shadow: 0 0 0 3px #fff; }
.ar-dn-tl-done .ar-dn-tl-dot { background: #198754; color: #fff; }
.ar-dn-tl-next .ar-dn-tl-dot { background: #fff; color: #d97706; border: 2px solid #f59e0b; animation: ar-dn-blink 2s ease-in-out infinite; }
@keyframes ar-dn-blink { 50% { box-shadow: 0 0 0 5px rgba(245, 158, 11, .25); } }
.ar-body .ar-dn-wiz .ar-dn-tl .wizard-item label.form-label { display: block; min-width: 0; }
.ar-dn-tl .wizard-item label b { display: block; font-weight: 500; color: #475569; text-transform: none; letter-spacing: 0; }
.ar-dn-tl .wizard-item label small { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); }
.ar-dn-tl-next label b { color: #0f172a; font-weight: 600; }
.ar-dn-tl .wizard-item.active label b { color: #0f172a; font-weight: 600; }
/* tabelle della denuncia: bordi marcati */
.ar-dn .ar-pg-tbl { border: 1px solid #94a3b8; }
.ar-dn .ar-pg-tbl th, .ar-dn .ar-pg-tbl td { border: 1px solid #cbd5e1; }
.ar-dn .ar-pg-tbl thead th { background: #e2e8f0; color: #1e293b; border-bottom: 2px solid #94a3b8; }
.ar-dn .table-responsive { border-radius: .35rem; }
.ar-dn-empty { border: 1px dashed #cbd5e1; border-radius: .35rem; background: #f8fafc; color: var(--ar-muted); font-size: .82rem; padding: .55rem .75rem; }
.ar-dn-cont h4 { font-size: .9rem; }
@media (min-width: 992px) { .ar-dn-wiz { max-height: 78vh; overflow-y: auto; position: sticky; top: calc(var(--ar-nav-h) + .5rem); } }
@media (max-width: 991.98px) { .ar-dn-wiz { max-height: 36vh; overflow-y: auto; border-right: 0; border-bottom: 1px solid var(--ar-card-border); } .ar-dn-cont { padding: .75rem; } }
/* scuole: controlli nell'intestazione (budget regioni) e form 001 */
.card.ar-box > .card-header .ar-sc-inl { display: flex; align-items: center; gap: .4rem; margin-left: .75rem; flex-wrap: wrap; }
.card.ar-box > .card-header .ar-sc-inl .form-select { width: auto; max-width: 16rem; }
.ar-sc-anno { width: 5.5rem !important; }
.ar-sc-corso .form-label { margin-bottom: .15rem; }
.ar-sc-corso .col-auto .btn { margin-bottom: .25rem; }
/* agenda personale (gn_calendario.asp) */
.ar-gn-body { display: flex; gap: 1.25rem; align-items: flex-start; }
.ar-gn-side { flex: 0 0 11rem; padding-top: .25rem; }
.ar-gn-cal { flex: 1 1 auto; min-width: 0; }
.ar-gn-filters { display: flex; flex-direction: column; gap: .45rem; }
.ar-gn-chk { display: flex; align-items: center; gap: .5rem; font-size: .84rem; font-weight: 600; cursor: pointer; user-select: none; margin: 0; --ar-gn-c: #64748b; }
.ar-gn-chk input { position: absolute; opacity: 0; width: 0; height: 0; }
.ar-gn-box { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; border-radius: .3rem; box-shadow: inset 0 0 0 2px var(--ar-gn-c); background: #fff; position: relative; }
.ar-gn-chk input:checked ~ .ar-gn-box { background: var(--ar-gn-c); }
.ar-gn-chk input:checked ~ .ar-gn-box::after { content: ""; position: absolute; left: .38rem; top: .17rem; width: .35rem; height: .65rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ar-gn-chk input:focus-visible ~ .ar-gn-box { outline: 2px solid var(--ar-accent); outline-offset: 2px; }
.ar-gn-chk-red { --ar-gn-c: #de512a; } .ar-gn-chk-blue { --ar-gn-c: #2ab7de; } .ar-gn-chk-yellow { --ar-gn-c: #e9c629; } .ar-gn-chk-green { --ar-gn-c: #33cc55; } .ar-gn-chk-purple { --ar-gn-c: #b02fc2; } .ar-gn-chk-brown { --ar-gn-c: #cc3355; }
.ar-gn-oper { padding: .6rem 1rem; } .ar-gn-oper .form-label { font-size: .72rem; margin-bottom: .15rem; } .ar-gn-oper .form-control { max-width: 26rem; }
.ar-gn-foot { font-size: .8rem; color: var(--ar-muted); background: #f8fafc; }
.ar-gn .fc-content { padding: 2px; font-size: .78rem; font-weight: 500; }
.ar-gn .fc-event { cursor: pointer; border-radius: 4px; }
.ar-gn .fc-time { display: none; }
.ar-gn .fc-day-grid-event { background-color: transparent; }
.ar-gn .fc-time-grid-event { background-color: #f3f3f7; border: 2px solid #ddd; margin: 3px; }
.ar-gn .fc-month-view .fc-title { display: flex; align-items: center; gap: 4px; }
.ar-gn .fc-list-item-title, .ar-gn .fc-list-item-time { font-size: .85rem; }
.ar-gn .fc-list-heading td { background: #f8fafc; font-size: .8rem; }
@media (max-width: 991.98px) {
	.ar-gn-body { flex-direction: column; align-items: stretch; gap: .75rem; }
	.ar-gn-side { flex: none; width: 100%; padding-top: 0; }
	.ar-gn-cal { width: 100%; overflow-x: auto; }
	.ar-gn-side .ar-sp-lbl { display: none; }
	.ar-gn-filters { flex-direction: row; flex-wrap: wrap; gap: .4rem .9rem; }
	.ar-gn-chk { font-size: .8rem; }
	.ar-gn .fc-toolbar .fc-left, .ar-gn .fc-toolbar .fc-right { float: none; }
	.ar-gn .fc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
	.ar-gn .fc-toolbar .fc-center { order: -1; flex: 1 1 100%; text-align: left; }
	.ar-gn .fc-toolbar .fc-right { margin-left: auto; }
}
/* dettaglio evento dell'agenda: popover sul desktop, foglio in basso sul telefono */
.calendar-event-detail { position: absolute; opacity: 0; pointer-events: none; top: 60px; left: 60px; display: flex; flex-direction: column; gap: .8rem; padding: 1rem; border-radius: .9rem; background: #fff; border: 1px solid var(--ar-card-border); box-shadow: 0 12px 32px -8px rgba(15,23,42,.35); z-index: 9999; transform: translateY(33%); transition: transform 150ms ease, opacity 150ms ease; max-width: 350px; }
.calendar-event-detail.active { opacity: 1; transform: translateY(0); pointer-events: all; }
.calendar-event-detail .ar-gn-x { position: absolute; top: .7rem; right: .7rem; font-size: .7rem; }
.calendar-event-detail-title { padding-right: 1.5rem; }
.calendar-event-detail-title { font-size: 1rem; font-weight: 600; margin: 0; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.calendar-event-detail-subtitle { font-size: .8rem; opacity: .65; font-weight: 400; }
.calendar-event-detail-items { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; }
.calendar-event-detail-items > span > i { width: 1.25rem; color: var(--ar-muted); }
@media (max-width: 767.98px) {
	.calendar-event-detail { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; max-width: none; border-radius: 1rem 1rem 0 0; transform: translateY(100%); padding-bottom: calc(1rem + env(safe-area-inset-bottom)); }
	.calendar-event-detail.active { transform: translateY(0); }
}
/* scheda dotazione: sottotitoli di sezione e pannelli "nuovo movimento / nuova assegnazione" */
.ar-mg-h { display: flex; align-items: center; gap: .5rem; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #334155; margin: 1.1rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px solid var(--ar-card-border); }
.ar-mg-h i { color: var(--ar-accent); }
.ar-mg-h .ar-mg-h-a { margin-left: auto; font-size: .74rem; font-weight: 500; text-transform: none; letter-spacing: 0; }
.ar-mg-new { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .35rem .5rem .75rem; margin: .5rem 0 1rem; }
.ar-mg-new > [class*="col-"] { padding-left: .5rem; padding-right: .5rem; }
.ar-mg-new .form-label { font-size: .72rem; margin-bottom: .15rem; color: var(--ar-muted); }
.ar-mg-new .btn { white-space: nowrap; }
.ar-mg-matr { max-width: 30rem; }
.ar-mg-foto { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; margin-top: .25rem; }
.ar-mg-img { width: 96px; height: 96px; object-fit: cover; border-radius: .5rem; border: 1px solid var(--ar-card-border); }
.ar-mg-qr { display: flex; align-items: center; gap: .6rem; max-width: 22rem; }
.ar-mg-qr small { font-size: .74rem; line-height: 1.3; }
.ar-rp-body .ar-mg-new { margin-top: .5rem; }

/* tabelle chiave/valore delle pagine amministrative: sul telefono etichetta sopra e campo sotto */
.ar-kv-tbl > tbody > tr > th, .ar-kv-tbl td.tbtestaL { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); font-weight: 600; white-space: nowrap; vertical-align: middle; }
@media (max-width: 767.98px) {
  .ar-kv-tbl, .ar-kv-tbl > tbody, .ar-kv-tbl > tbody > tr, .ar-kv-tbl > tbody > tr > th, .ar-kv-tbl > tbody > tr > td { display: block; width: 100%; }
  .ar-kv-tbl > tbody > tr { border-bottom: 1px solid var(--ar-card-border); padding: .35rem 0; }
  .ar-kv-tbl > tbody > tr > th, .ar-kv-tbl td.tbtestaL { border: 0; padding: 0 0 .15rem; white-space: normal; }
  .ar-kv-tbl > tbody > tr > td { border: 0; padding: 0; }
}

/* creazione nuovo rapportino (rp_nuovo): 3 passi */
.ar-rpn-step > .card-header h3 { display: flex; align-items: center; gap: .5rem; }
.ar-rpn-n { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--ar-accent); color: #fff; font-size: .78rem; font-weight: 700; flex: 0 0 auto; }
.ar-rpn-done > .card-header h3 .ar-rpn-n { background: #22c55e; }
.ar-rpn-opt { white-space: normal; text-align: left; }
.ar-rpn-eve { white-space: normal; text-align: left; font-size: .8rem; line-height: 1.3; }
@media (max-width: 991.98px) { .ar-rpn-step .ar-rp-body { max-height: none; } }
/* subtotali / totali nelle tabelle risultati (es. rimborsi CAI) e paginazione a pie' di card */
.ar-pg-tbl tr.ar-pg-sub td { background: #f8fafc; border-top: 2px solid #cbd5e1; font-weight: 600; color: #334155; }
.ar-pg-tbl tr.ar-pg-tot td { background: #eef2f6; border-top: 2px solid #94a3b8; font-weight: 700; }
.ar-pg-pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem; margin: .5rem 0 1rem; }
.ar-pg-pager .ar-pg-maxrec { width: 4.5rem; margin: 0; }
.ar-pg-pager .pagination { margin: 0; }

/* giornata */
.ar-pgd .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-pgd .form-group { margin-bottom: .6rem; }
.ar-pgd-dt { display: flex; gap: .35rem; }
.ar-pgd-dt .datepick { flex: 1 1 60%; min-width: 0; }
.ar-pgd-dt .timepick { flex: 1 1 40%; min-width: 4.5rem; }
.ar-pgd-sub { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ar-muted); margin: .9rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--ar-card-border); }
.ar-pgd-acts { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; padding-top: .75rem; margin-top: .5rem; border-top: 1px solid var(--ar-card-border); }
.ar-pgd-firma { display: inline-flex; align-items: center; gap: .4rem; font-size: .82rem; padding: .3rem .7rem; border-radius: .4rem; background: #dcfce7; color: #15803d; font-weight: 600; }
.ar-pgd-tag { font-size: .68rem; font-weight: 700; padding: .15rem .5rem; border-radius: 999px; margin-left: .5rem; vertical-align: middle; }
.ar-pgd-tag-no { background: #fee2e2; color: #b91c1c; } .ar-pgd-tag-ok { background: #dcfce7; color: #15803d; } .ar-pgd-tag-exp { background: #dbeafe; color: #1d4ed8; } .ar-pgd-tag-ro { background: #f1f5f9; color: #475569; }
.ar-pgd-doc { border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .6rem .75rem; margin-bottom: .6rem; background: #fafbfc; }
.ar-pgd-doc img { max-height: 120px; object-fit: cover; }
.ar-pgd-docnew { border: 1px dashed var(--ar-accent-mid); border-radius: .5rem; padding: .6rem .75rem; background: var(--ar-accent-light); }
.ar-pgd .table-responsive { margin-bottom: .75rem; }

/* ---- Registro presenze: struttura tipi (pr_struttura.asp) ---- */
.ar-prs .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-prs-lbl { font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); }
.ar-prs-tipo { border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .75rem; background: #fafbfc; margin-top: .5rem; }
.ar-prs-conv { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--ar-card-border); }
.ar-prs-tbl { font-size: .82rem; min-width: 900px; }
.ar-prs-tbl th { white-space: nowrap; font-size: .72rem; text-transform: uppercase; color: var(--ar-muted); }
.ar-prs-tbl td { vertical-align: middle; }
.ar-prs-tbl .form-control, .ar-prs-tbl .form-select { min-width: 90px; }
.ar-prs-tbl td:nth-child(2) .form-control { min-width: 160px; }
.ar-prs-help { font-size: .86rem; }
.ar-prs-help dt { font-weight: 600; margin-top: .5rem; }
.ar-prs-help dd { margin-bottom: .25rem; color: #374151; }
.ar-prs-help ul { padding-left: 1.1rem; }
@media (max-width: 575.98px) { .ar-prs-tipo { padding: .6rem; } }

/* ---- Registro presenze: convalidatori / firmatari (pr_autoriz.asp, pr_nomif.asp) ---- */
.ar-pra-tipo { font-weight: 400; color: var(--ar-muted); font-size: .95rem; }
.ar-pra-tipo::before { content: "\00b7"; margin: 0 .4rem; }
.ar-pra-hint { font-size: .8rem; color: var(--ar-muted); }
.ar-pra-tbl { font-size: .85rem; }
.ar-pra-tbl th { font-size: .72rem; text-transform: uppercase; color: var(--ar-muted); white-space: nowrap; }
.ar-pra-tbl td { vertical-align: middle; }
.ar-pra-tbl .datepick { min-width: 7.5rem; }
.ar-pra-tbl td:first-child { min-width: 11rem; }
.ar-pra-nome { font-weight: 500; }
tr.ar-pra-new > td { background: var(--ar-accent-light) !important; }
.ar-pra-add .form-control { min-width: 0; }
@media (max-width: 575.98px) { .ar-pra-tbl { font-size: .8rem; } .ar-pra-tbl .datepick { min-width: 6.5rem; } }

/* ---- righe cliccabili generiche ---- */
tr.ar-row { cursor: pointer; }
tr.ar-row:hover > td { background-color: #eef4f0 !important; }

/* ---- Rimborsi spese (sp_*.asp) ---- */
.ar-sp-dot-N { background: #94a3b8; } .ar-sp-dot-I { background: #f59e0b; } .ar-sp-dot-V { background: #2563eb; } .ar-sp-dot-P { background: #22c55e; } .ar-sp-dot-E { background: #ef4444; }
tr.ar-sp-N > td:first-child { border-left: 3px solid #94a3b8; } tr.ar-sp-I > td:first-child { border-left: 3px solid #f59e0b; }
tr.ar-sp-V > td:first-child { border-left: 3px solid #2563eb; } tr.ar-sp-P > td:first-child { border-left: 3px solid #22c55e; }
.ar-sp-tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 1rem; white-space: nowrap; background: #f1f5f9; color: #475569; }
.ar-sp-tag-N { background: #f1f5f9; color: #475569; } .ar-sp-tag-I { background: #fef3c7; color: #b45309; } .ar-sp-tag-V { background: #dbeafe; color: #1d4ed8; } .ar-sp-tag-P { background: #dcfce7; color: #15803d; }
.ar-sp-tbl td.text-end { font-variant-numeric: tabular-nums; }
/* dettaglio richiesta (sp_richiesta.asp) */
.ar-sp-head { padding: .5rem .25rem .75rem; border-bottom: 1px solid var(--ar-card-border); margin-bottom: .5rem; }
.ar-sp-num { font-size: .9rem; } .ar-sp-who { font-weight: 600; font-size: .95rem; line-height: 1.25; margin: .15rem 0; } .ar-sp-meta { font-size: .78rem; color: var(--ar-muted); margin-bottom: .35rem; }
.ar-sp-nav .btn { white-space: normal; } .ar-sp-tipo-full::after { content: "\2022"; float: right; color: #22c55e; }
.ar-sp-acts { border-top: 1px solid var(--ar-card-border); margin-top: .5rem; padding-top: .6rem; }
.ar-sp-info { font-size: .8rem; color: var(--ar-muted); padding: .35rem .25rem; }
.ar-sp-lbl { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); }
.ar-sp-main .col-form-label { padding-bottom: 0; }
.ar-sp-note { font-size: .82rem; color: var(--ar-muted); margin-bottom: .6rem; }
.ar-sp-riep { font-size: .85rem; } .ar-sp-riep tfoot td { border-top: 2px solid var(--ar-card-border); }
.ar-sp-det { font-size: .82rem; min-width: 900px; } .ar-sp-det th { font-size: .7rem; text-transform: uppercase; color: var(--ar-muted); white-space: nowrap; }
.ar-sp-det td { vertical-align: top; } .ar-sp-det td:first-child { min-width: 150px; } .ar-sp-det .form-control, .ar-sp-det .form-select { min-width: 90px; }
.ar-sp-det textarea { min-width: 180px; }
tr.ar-sp-new > td { background: var(--ar-accent-light) !important; }
.ar-sp-docs { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0; }
.ar-sp-doc { display: flex; flex-direction: column; align-items: center; gap: .2rem; } .ar-sp-doc img { width: 40px; height: 40px; object-fit: cover; border-radius: .3rem; border: 1px solid var(--ar-card-border); }
.ar-sp-docadd { display: flex; gap: .3rem; }
.ar-sp-tot > td { border-top: 2px solid var(--ar-card-border); background: #f8fafc !important; }

/* ---- Dotazioni (mg_*.asp) ---- */
.ar-mg-filt .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-mg-grp { border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem .5rem .75rem; margin: 0 0 .5rem; background: #fafbfc; }
.ar-mg-grp > [class*="col-"] { padding-left: .5rem; padding-right: .5rem; }
.ar-mg-tbl { font-size: .82rem; } .ar-mg-des { min-width: 14rem; }
tr.ar-mg-noeff > td:first-child { border-left: 3px solid #ef4444; }
.ar-mg-title { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; flex-wrap: wrap; }
.ar-mg-title h1 { font-size: 1.15rem; font-weight: 600; margin: 0; flex: 1 1 auto; min-width: 0; }
.ar-mg-t { font-size: .85rem; } .ar-mg-t th { font-size: .72rem; text-transform: uppercase; color: var(--ar-muted); white-space: nowrap; }
.ar-mg-sub { font-size: .8rem; } .ar-mg-sub th { font-size: .7rem; text-transform: uppercase; color: var(--ar-muted); white-space: nowrap; }
.ar-mg-sub .form-control, .ar-mg-sub .form-select { min-width: 80px; }
.ar-mg-tree { font-size: .9rem; } .ar-mg-tree ul.tree-menu { margin: 0; }
.ar-mg-etic .form-select, .ar-mg-etic .form-control { font-size: .8rem; }
.ar-mg-eti { min-width: 1400px; } .ar-mg-eti .form-control, .ar-mg-eti .form-select { min-width: 60px; }
.ar-mg-eti th { font-size: .7rem; }
@media (max-width: 991.98px) { .ar-mg-title h1 { font-size: 1.05rem; } }

/* ---- Reperibilità (re_*.asp) ---- */
.ar-re .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-re-dot-empty { background: #ef4444; } .ar-re-dot-lock { background: #22c55e; } .ar-re-dot-s { background: #f59e0b; }
.ar-re-wrap { max-height: calc(100vh - 260px); overflow: auto; }
.ar-re-tbl { font-size: .82rem; border-collapse: separate; border-spacing: 0; }
.ar-re-tbl thead th { position: sticky; top: 0; z-index: 3; background: #f8fafc; font-size: .72rem; text-transform: uppercase; color: var(--ar-muted); white-space: nowrap; border-bottom: 1px solid var(--ar-card-border); }
.ar-re-tbl thead th small { text-transform: none; font-size: .72rem; }
.ar-re-tbl tbody th { position: sticky; left: 0; z-index: 2; background: #fff; font-weight: 600; white-space: nowrap; font-size: .8rem; border-right: 1px solid var(--ar-card-border); }
.ar-re-tbl thead th:first-child { left: 0; z-index: 4; }
.ar-re-tbl tbody th a { margin-left: .35rem; color: var(--ar-muted); } .ar-re-tbl tbody th a:hover { color: var(--ar-accent); }
.ar-re-tbl tbody th.ar-re-today { background: #dcfce7; } .ar-re-tbl tbody th.ar-re-wend { background: #fef3c7; }
.ar-re-tbl td { min-width: 12rem; vertical-align: middle; padding: .25rem .35rem; border-bottom: 1px solid #eef2f6; }
.ar-re-tbl td.ar-re-n { background: #f1f5f9; } .ar-re-tbl td.ar-re-s { background: #fde68a; }
.ar-re-tbl td.ar-re-empty { background: #fee2e2; box-shadow: inset 3px 0 0 #ef4444; }
.ar-re-tbl td.ar-re-lock { background: #dcfce7; box-shadow: inset 3px 0 0 #22c55e; }
.ar-re-tbl td.ar-re-lock .form-control { border-color: #86efac; }
.ar-re-tbl td .form-control:disabled { background: transparent; border-color: transparent; color: #0f172a; }
.ar-re-cal td { min-width: 9rem; font-size: .82rem; }
.ar-re-cal td.ar-re-empty { background: #fee2e2; box-shadow: none; }
.ar-re-lettera { font-size: .9rem; line-height: 1.5; max-width: 60rem; }
.ar-re-invio { border-top: 1px solid var(--ar-card-border); margin-top: 1rem; padding-top: .75rem; }
#totali { overflow-x: auto; max-width: 100%; } #totali table { font-size: .82rem; } #totali .dt-buttons { flex-wrap: wrap; }
@media (max-width: 767.98px) { .ar-re-wrap { max-height: none; } .ar-re-tbl td { min-width: 10rem; } }

/* ---- Allertamenti / tracciamenti (all_gestiti.asp) ---- */
.ar-all-dot-chiuso { background: #94a3b8; }
tr.ar-all-aperto > td:first-child { border-left: 3px solid #22c55e; } tr.ar-all-chiuso > td:first-child { border-left: 3px solid #94a3b8; }
tr.ar-all-chiuso > td { color: #475569; }
.ar-all-tbl .ar-pg-note { max-width: 14rem; }

/* ---- Statistiche interventi (rp_statistiche.asp) ---- */
.ar-st-filt .form-label { font-size: .72rem; margin-bottom: .15rem; }
.ar-st-hint { font-size: .78rem; color: var(--ar-muted); padding-bottom: .3rem; }
.ar-st-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: .6rem; margin-bottom: .75rem; }
.ar-st-k { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .6rem .8rem; text-decoration: none; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.04); border-left: 4px solid var(--ar-accent); }
.ar-st-k:hover { background: #f8fafc; color: #0f172a; }
.ar-st-kv { font-size: 1.45rem; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ar-st-kl { font-size: .74rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); margin-top: .15rem; }
.ar-st-ks { font-size: .74rem; color: var(--ar-muted); }
.ar-st-k-main { border-left-color: #2a78d6; } .ar-st-k-bad { border-left-color: #12305c; } .ar-st-k-warn { border-left-color: #eb6834; }
.ar-st-nav { display: flex; gap: .35rem; overflow-x: auto; padding: .1rem 0 .5rem; margin-bottom: .5rem; scrollbar-width: thin; }
.ar-st-nav a { flex: 0 0 auto; font-size: .78rem; padding: .25rem .65rem; border-radius: 1rem; border: 1px solid var(--ar-card-border); background: #fff; color: #334155; text-decoration: none; white-space: nowrap; }
.ar-st-nav a:hover { background: var(--ar-accent-light); border-color: var(--ar-accent-mid); color: var(--ar-accent); }
.ar-stc .card-body { padding: .6rem .75rem; }
.ar-st-tbl { font-size: .8rem; }
.ar-st-tbl th, .ar-st-tbl td { white-space: nowrap; padding: .25rem .4rem; vertical-align: middle; }
.ar-st-tbl thead th, .ar-st-tbl tr:first-child th { font-size: .7rem; text-transform: uppercase; color: var(--ar-muted); }
.ar-st-tbl tr > th:first-child { font-weight: 500; text-transform: none; font-size: .8rem; color: #0f172a; white-space: normal; min-width: 9rem; }
.ar-st-tbl td { text-align: right; font-variant-numeric: tabular-nums; }
.ar-st-tbl td small { color: var(--ar-muted); }
.ar-st-tbl tr.ar-st-tot > * { border-top: 2px solid var(--ar-card-border); font-weight: 600; background: #f8fafc; }
.ar-st-tbl a { color: inherit; text-decoration: none; border-bottom: 1px dotted #94a3b8; }
.ar-st-tbl a:hover { color: var(--ar-accent); border-bottom-color: var(--ar-accent); }
.ar-st-tbl .fa-star { color: #f59e0b; font-size: .7rem; margin-right: .2rem; }
.ar-st-tbl h4 { font-size: .8rem; font-weight: 600; text-transform: uppercase; color: var(--ar-muted); letter-spacing: .04em; margin: .35rem 0 .1rem; }
.ar-st-chart { position: relative; width: 100%; min-height: 180px; }
.ar-st-tg .btn { padding: .15rem .5rem; }
@media (max-width: 575.98px) { .ar-st-kpi { grid-template-columns: repeat(2, 1fr); gap: .45rem; } .ar-st-kv { font-size: 1.25rem; } }
/* statistiche: mensili, previsionale, eventi */
.ar-mens-tbl th, .ar-mens-tbl td { white-space: nowrap; }
.ar-mens-filtri b { font-weight: 600; }
.ar-pre .form-select[multiple] { font-size: .8rem; }
.ar-pre-leg { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; font-size: .78rem; }
.ar-pre-sw { display: inline-block; width: .9rem; height: .9rem; border: 1px solid #cbd5e1; border-radius: .2rem; vertical-align: middle; margin-right: .25rem; }
.ar-pre-cal { font-size: .72rem; } .ar-pre-cal .tbtesta { font-size: .7rem; } .ar-pre-cal a { text-decoration: none; }
.ar-aid-res { max-height: 70vh; overflow: auto; }
.ar-soc-tbl { font-size: .78rem; }

/* ---- telefono: DataTables e tabelle larghe non devono allargare la pagina (v57) ---- */
/* i select2 dentro le tabelle lasciano la <select> originale in position:absolute: senza un
   contenitore posizionato scappano dallo scorrimento e allargano la pagina (mn_menu, co_reperibilita, mp_scene) */
.table-responsive { position: relative; }
/* testate delle card con molti bottoni (estrai/nuovo/importa...): sul telefono vanno a capo invece di allargare la pagina */
@media (max-width: 767.98px) {
	.card.ar-box > .card-header { flex-wrap: wrap; }
	.card.ar-box > .card-header .actions { flex-wrap: wrap; justify-content: flex-end; row-gap: .25rem; max-width: 100%; min-width: 0; flex: 1 1 100%; margin-left: 0; }
	.card.ar-box > .card-header .actions .btn, .card.ar-box > .card-header .actions input[type=submit] { white-space: normal; }
}
.dt-container { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dt-container .dt-scroll, .dt-container .dt-scroll-head, .dt-container .dt-scroll-body { max-width: 100%; }
.ar-auto-resp { margin-bottom: .5rem; }
.ar-auto-resp > .table { margin-bottom: 0; }
@media (max-width: 767.98px) {
	.dt-container .dt-layout-row { flex-wrap: wrap; }
	.dt-container .dt-buttons .btn { padding: .25rem .5rem; font-size: .8rem; }
	.dt-container .dt-info, .dt-container .dt-paging { font-size: .8rem; }
}

/* ---- monitor di centrale: lista | mappa | scheda, altezza = finestra ---- */
.ar-mon-shell { display: flex; gap: .75rem; align-items: stretch; height: var(--ar-mon-h, 72vh); min-height: 0; }
.ar-mon-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.ar-mon-col > .card.ar-box { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; margin-bottom: 0; }
.ar-mon-col > .card.ar-box > .card-header { flex: 0 0 auto; }
.ar-mon-col > .card.ar-box > .card-body { flex: 1 1 auto; min-height: 0; overflow: auto; }
.ar-mon-col-list { flex: 0 0 clamp(18rem, 22%, 26rem); width: clamp(18rem, 22%, 26rem); }
.ar-mon-col-map { flex: 1 1 auto; }
.ar-mon-col-det { flex: 0 0 clamp(26rem, 40%, 70rem); width: clamp(26rem, 40%, 70rem); }
.ar-mon-mapcard > .card-body { display: flex; flex-direction: column; overflow: hidden !important; }
.ar-mon-shell .ar-mon-map { flex: 1 1 auto; height: auto; min-height: 220px; border-radius: 0; }
.ar-mon-shell .ar-mon-embar { flex: 0 0 auto; }
.ar-mon-list > .card-body { max-height: none !important; }
.ar-mon-detbody { padding: .6rem !important; container-type: inline-size; container-name: det; }
.ar-mon-off { width: min(100%, 46rem); }
.ar-mon-off .offcanvas-body { container-type: inline-size; container-name: det; padding: .6rem; }
/* le schede (co_allarme*, co_smssos*) nascono a 4 colonne affiancate: nel pannello si impilano,
   e tornano a 2 o 4 colonne solo quando il pannello e' davvero largo (monitor grandi) */
#dettaglio > .row { margin-left: -.375rem; margin-right: -.375rem; }
#dettaglio > .row > form { display: flex; flex-wrap: wrap; width: 100%; align-items: flex-start; }
#dettaglio > .row > form > [class*="col-"], #dettaglio > .row > [class*="col-"] { flex: 0 0 auto; width: 100%; padding-left: .375rem; padding-right: .375rem; }
#dettaglio .card.ar-box { margin-bottom: .6rem; }
#dettaglio .card.ar-box > .card-body { padding: .6rem .7rem; }
#dettaglio .card.ar-box > .card-header { min-height: 2.4rem; padding: .35rem .7rem; }
#dettaglio .card.ar-box > .card-header h3 { font-size: .88rem; }
#dettaglio .ar-det-kv > .col-sm-6 { width: 50%; }
@container det (min-width: 46rem) {
  #dettaglio > .row > form > [class*="col-"], #dettaglio > .row > [class*="col-"] { width: 50%; }
}
@container det (min-width: 92rem) {
  #dettaglio > .row > form > [class*="col-"], #dettaglio > .row > [class*="col-"] { width: 25%; }
}
@media (max-width: 1199.98px) {
  .ar-mon-col-det { display: none !important; }
  .ar-mon-col-list { flex-basis: clamp(16rem, 36%, 24rem); width: clamp(16rem, 36%, 24rem); }
}
@media (max-width: 767.98px) {
  .ar-mon-shell { display: block; height: auto; }
  .ar-mon-col { display: block; }
  .ar-mon-col > .card.ar-box { display: block; margin-bottom: .75rem; }
  .ar-mon-col-list, .ar-mon-col-map { width: auto; }
  .ar-mon-list > .card-body { max-height: 50vh !important; overflow: auto; }
  .ar-mon-mapcard > .card-body { display: block; }
  .ar-mon-shell .ar-mon-map { height: 48vh; min-height: 240px; }
  .ar-mon-off { width: 100%; }
}
/* elenco allarmi: colonne in piu' solo se la lista e' larga (container query) */
.ar-mon-list > .card-body { container-type: inline-size; container-name: lista; }
.ar-mon-cn { display: none; }
@container lista (max-width: 30rem) {
  .ar-mon-cw { display: none; }
  .ar-mon-cn { display: block; }
  .ar-mon-table td, .ar-mon-table th { padding-left: .35rem; padding-right: .35rem; }
}
/* ---- monitor: stati allarme, sirena, marker, scheda ---- */
.ar-mon-table .ar-st { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .5rem; border-radius: .35rem; font-size: .66rem; font-weight: 700; letter-spacing: .03em; white-space: nowrap; }
.ar-st-new { background: #e40800; color: #fff; }
.ar-st-ope { background: #fde68a; color: #713f12; }
.ar-st-ko { background: #bae6fd; color: #075985; }
.ar-kv .ar-st { font-size: .72rem; padding: .15rem .45rem; border-radius: .3rem; font-weight: 700; }
tr.ar-mon-new > td { background: #fff1f0 !important; }
tr.ar-mon-new > td:first-child { border-left: 4px solid #e40800; }
tr.ar-mon-ope > td:first-child { border-left: 4px solid #f59e0b; }
tr.ar-mon-ko > td:first-child { border-left: 4px solid #0ea5e9; }
.ar-mon-alert { background: #e40800; color: #fff; font-size: .82rem; padding: .45rem .75rem; display: flex; align-items: center; animation: ar-mon-blink 1.6s infinite; }
.ar-mon-audio { background: #111827; color: #fde68a; font-size: .85rem; padding: .5rem .9rem; border-radius: .5rem; margin-bottom: .6rem; cursor: pointer; display: flex; align-items: center; animation: ar-mon-blink 1.6s infinite; }
.ar-mon-has-new .ar-mon-list > .card-header { background: #fff1f0; }
@container lista (max-width: 30rem) { .ar-mon-table .ar-st-t { display: none; } .ar-mon-table .ar-st { padding: .3rem .45rem; font-size: .8rem; } }
/* marker: pin colorato con icona font */
.ar-pin { position: relative; width: 34px; height: 44px; cursor: pointer; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.ar-pin-body { position: absolute; left: 1px; top: 0; width: 32px; height: 32px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--pc, #e40800); border: 2px solid #fff; box-sizing: border-box; display: flex; align-items: center; justify-content: center; }
.ar-pin-body i { transform: rotate(45deg); color: #fff; font-size: 15px; }
.ar-pin-tip { display: none; }
.ar-pin-ring { position: absolute; left: -3px; top: -3px; width: 40px; height: 40px; border-radius: 50%; border: 3px solid #e40800; animation: ar-pin-ring 1.4s ease-out infinite; pointer-events: none; }
@keyframes ar-pin-ring { 0% { transform: scale(.6); opacity: .9; } 100% { transform: scale(1.9); opacity: 0; } }
/* scheda: sezioni come elementi del pannello (ordine via flex), chat in evidenza */
#dettaglio > .row.ar-det-flat > form, #dettaglio > .row.ar-det-flat > form > [class*="col-"], #dettaglio > .row.ar-det-flat > [class*="col-"] { display: contents; }
#dettaglio > .row.ar-det-flat { column-gap: .6rem; padding: 0 .375rem; margin: 0; align-items: flex-start; }
#dettaglio > .row.ar-det-flat .card.ar-box { width: 100%; }
#dettaglio .ar-det-top { width: 100%; margin-bottom: .6rem; }
#dettaglio .ar-det-top .btn { padding: .7rem 1rem; font-size: 1rem; font-weight: 700; }
#dettaglio .card.ar-det-chat { border: 2px solid var(--ar-accent, #198754); }
#dettaglio .card.ar-det-chat > .card-header { background: var(--ar-accent-light, #eaf3ee); }
#dettaglio .card.ar-det-chat > .card-header h3 { font-size: 1rem; }
#dettaglio .card.ar-det-chat #messaggi { max-height: 42vh; overflow: auto; }
#dettaglio .card.ar-det-chat #nuovomsgtxt { font-size: 1rem; padding: .55rem .75rem; }
#dettaglio .card.ar-det-chat #nuovomsg { margin-bottom: .6rem; }
#dettaglio .card.ar-det-chat #nuovomsg > li { max-width: 100%; background: transparent; padding: 0; }
#dettaglio .card.ar-det-sec > .card-header { opacity: .9; }
#dettaglio .card.ar-det-sec.ar-det-closed > .card-header { border-bottom: 0; }
#dettaglio .card.ar-det-sec.ar-det-closed { margin-bottom: .35rem; }
@container det (min-width: 46rem) {
  #dettaglio > .row.ar-det-flat .card.ar-box { width: calc(50% - .3rem); }
  #dettaglio > .row.ar-det-flat .card.ar-det-chat, #dettaglio > .row.ar-det-flat .card.ar-det-sec { width: 100%; }
}
@container det (min-width: 92rem) {
  #dettaglio > .row.ar-det-flat .card.ar-box { width: calc(25% - .45rem); }
  #dettaglio > .row.ar-det-flat .card.ar-det-chat { width: calc(50% - .3rem); }
  #dettaglio > .row.ar-det-flat .card.ar-det-sec { width: calc(50% - .3rem); }
}
#dettaglio .ar-det-chat ul.messages > li.left, #dettaglio .ar-det-chat ul.messages > li.right { display: flex; gap: .6rem; align-items: flex-start; }
#dettaglio .ar-det-chat ul.messages > li .image { flex: 0 0 auto; color: var(--ar-muted); }
#dettaglio .ar-det-chat ul.messages > li .image i { font-size: 1.3rem; }
#dettaglio .ar-det-chat ul.messages > li .message { flex: 1 1 auto; min-width: 0; }
#dettaglio .ar-det-chat ul.messages > li .message .name { font-size: .72rem; font-weight: 700; text-transform: uppercase; color: var(--ar-muted); }
#dettaglio .ar-det-chat ul.messages > li .message p { margin: .15rem 0 .2rem; font-size: .95rem; }
#dettaglio .ar-det-chat ul.messages > li.right { background: #e0f2fe; }
#dettaglio .ar-det-chat ul.messages > li.right .message .name { color: #075985; }
#dettaglio .ar-det-moretg { display: block; font-size: .78rem; color: var(--ar-muted); text-decoration: none; padding: .4rem 0 0; border-top: 1px dashed var(--ar-card-border); margin-top: .4rem; }
#dettaglio .ar-det-more { padding-top: .4rem; }
#dettaglio .card.ar-det-ext > .card-header { background: #fff7ed; }
/* ---- scheda allarme: timeline evento ---- */
#dettaglio .ar-tl-info { font-size: .82rem; align-items: center; margin-bottom: .5rem; }
#dettaglio .ar-tl-info > [class*="col-"] { width: auto; flex: 0 0 auto; padding-right: 1rem; }
#dettaglio .ar-tl-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); font-weight: 600; }
#dettaglio .ar-tl-act { margin-bottom: .6rem; }
#dettaglio .ar-tl-act > [class*="col-"] { width: auto; flex: 0 0 auto; }
#dettaglio .ar-tl-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); margin: .6rem 0 .3rem; }
#dettaglio .ar-tl-add { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem .35rem; margin: 0 0 .75rem; }
#dettaglio .ar-tl-add > [class*="col-"] { width: 100%; }
#dettaglio .ar-tl-add > [class*="col-"]:last-child { text-align: right; }
#dettaglio ul.ar-tl { list-style: none; margin: 0; padding: 0 0 0 1.1rem; position: relative; }
#dettaglio ul.ar-tl::before { content: ""; position: absolute; left: .33rem; top: .4rem; bottom: .4rem; width: 2px; background: #d6dde6; }
#dettaglio .ar-tl-i { position: relative; padding: 0 0 .9rem .9rem; }
#dettaglio .ar-tl-i:last-child { padding-bottom: .2rem; }
#dettaglio .ar-tl-dot { position: absolute; left: -1.1rem; top: .3rem; width: .8rem; height: .8rem; border-radius: 50%; background: #fff; border: 3px solid var(--ar-accent, #198754); }
#dettaglio .ar-tl-i:last-child .ar-tl-dot { background: var(--ar-accent, #198754); box-shadow: 0 0 0 4px rgba(25,135,84,.15); }
#dettaglio .ar-tl-meta { display: flex; flex-wrap: wrap; gap: .25rem 1rem; font-size: .72rem; color: var(--ar-muted); }
#dettaglio .ar-tl-time { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
#dettaglio .ar-tl-t { font-weight: 600; font-size: .88rem; margin: .1rem 0; }
#dettaglio .ar-tl-cla { background: #e0e7ff; color: #3730a3; font-weight: 600; font-size: .66rem; vertical-align: middle; }
#dettaglio .ar-tl-d { font-size: .85rem; color: #334155; white-space: pre-line; background: #f8fafc; border-radius: .4rem; padding: .35rem .55rem; }
/* comunicazioni esterne: inoltri come schede piccole su piu' colonne */
#dettaglio .ar-det-h { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); margin: .75rem 0 .3rem; }
#dettaglio .ar-det-ext table.table { margin-bottom: 0; }
#dettaglio .ar-det-ext table.table > tbody { display: flex; flex-wrap: wrap; gap: .4rem; }
#dettaglio .ar-det-ext table.table > tbody > tr { display: block; flex: 1 1 14rem; max-width: 100%; }
#dettaglio .ar-det-ext table.table > tbody > tr > td { display: block; padding: 0; border: 0; height: 100%; }
#dettaglio .ar-inoltra { width: 100%; height: 100%; text-align: left; font-size: .76rem; line-height: 1.25; padding: .4rem .55rem; border-radius: .45rem; }
#dettaglio .ar-inoltra b { font-weight: 600; }
#dettaglio .ar-det-ext .alert { margin-bottom: 0; height: 100%; }
@container det (min-width: 46rem) {
  #dettaglio .ar-tl-add > .col-sm-3 { width: 50%; }
  #dettaglio .ar-tl-add > .col-sm-4 { width: 80%; }
  #dettaglio .ar-tl-add > .col-sm-2 { width: 20%; }
}
/* ---- scheda allarme: localizzazione ---- */
#dettaglio .ar-loc-coord { display: grid; grid-template-columns: max-content 1fr; gap: .35rem .6rem; align-items: center; margin: 0 0 .6rem; }
#dettaglio .ar-loc-coord > [class*="col-"] { width: auto; padding: 0; }
#dettaglio .ar-loc-coord > [class*="col-"]:nth-child(2), #dettaglio .ar-loc-coord > [class*="col-"]:nth-child(4) { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 1.05rem; font-weight: 600; letter-spacing: .02em; }
#dettaglio .ar-loc-coord > [class*="col-"]:nth-child(5) { grid-column: 1 / -1; }
#dettaglio .ar-loc-coord .btn { white-space: nowrap; min-width: 4.5rem; }
#dettaglio .ar-loc-coord .btn-lime { background: var(--ar-accent-light, #eaf3ee); border-color: var(--ar-accent, #198754); color: var(--ar-accent, #198754); }
#dettaglio .ar-loc-coord .row { --bs-gutter-x: .3rem; }
#dettaglio .ar-loc-kv { display: flex; flex-wrap: wrap; gap: .25rem 0; margin: 0; padding: .3rem 0; border-top: 1px dashed #e5e9ee; font-size: .85rem; }
#dettaglio .ar-loc-kv > [class*="col-"] { width: auto; padding: 0 1rem 0 0; flex: 0 0 auto; }
#dettaglio .ar-loc-kv > .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); font-weight: 600; padding-right: .4rem; align-self: center; }
#dettaglio .ar-loc-kv input.form-control { display: inline-block; width: 5rem; }
#dettaglio .ar-loc-row { margin: 0; padding: .4rem 0 0; border-top: 1px dashed #e5e9ee; font-size: .85rem; }
#dettaglio .ar-loc-row > [class*="col-"] { width: 100%; padding: 0; }
#dettaglio .ar-loc-row > .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); font-weight: 600; margin-bottom: .15rem; }
#dettaglio .ar-loc-fwd .form-control { display: inline-block; width: calc(100% - 6rem); vertical-align: middle; }
#dettaglio .ar-loc-fwd .btn { vertical-align: middle; }
#dettaglio .ar-loc-row .alert { margin-top: .4rem; }
#dettaglio .ar-tl-cls { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
#dettaglio .ar-tl-sel { width: auto; display: inline-block; font-size: .78rem; padding-right: 1.8rem; }
@container det (min-width: 46rem) {
  #dettaglio .ar-loc-coord { grid-template-columns: max-content 1fr max-content 1fr; }
  #dettaglio .ar-loc-coord > [class*="col-"]:nth-child(5) { grid-column: auto; grid-column-start: 1; grid-column-end: -1; }
  #dettaglio .ar-loc-row > [class*="col-"] { width: auto; }
  #dettaglio .ar-loc-row > .k { width: 11rem; }
  #dettaglio .ar-loc-row > .col-sm-10 { width: calc(100% - 11rem); }
}
/* ---- all_monitor: evento+messaggi | invitati | operatore+mappa ---- */
.ar-all-shell { display: flex; gap: .75rem; align-items: stretch; height: var(--ar-all-h, auto); min-height: 0; }
.ar-all-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: .75rem; }
.ar-all-col-ev { flex: 0 0 clamp(20rem, 27%, 34rem); width: clamp(20rem, 27%, 34rem); overflow: auto; }
.ar-all-col-inv { flex: 1 1 auto; }
.ar-all-col-map { flex: 0 0 clamp(20rem, 30%, 40rem); width: clamp(20rem, 30%, 40rem); }
.ar-all-col > .card.ar-box { margin-bottom: 0; flex: 0 0 auto; }
.ar-all-col-inv > .card.ar-all-invcard { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.ar-all-invcard > .card-body { flex: 1 1 auto; min-height: 0; overflow: auto; display: flex; flex-direction: column; }
.ar-all-invcard #invita { flex: 0 0 auto; }
.ar-all-invcard #invitati { flex: 1 1 auto; min-height: 0; overflow: auto; height: auto !important; container-type: inline-size; container-name: inv; }
.ar-all-col-map > #operatore { order: 0; flex: 0 1 auto; min-height: 0; overflow: auto; }
.ar-all-col-map > #operatore:empty { display: none; }
.ar-all-col-map > #mapnot { order: 1; }
.ar-all-col-map > #mapnot:empty { display: none; }
.ar-all-col-map > .card.ar-all-mapcard { order: 2; flex: 1 1 auto; display: flex; flex-direction: column; min-height: 16rem; }
.ar-all-mapcard > .card-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.ar-all-mapcard > .card-body > .row:first-child { flex: 1 1 auto; min-height: 0; margin: 0; }
.ar-all-mapcard > .card-body > .row:first-child > .map { height: 100% !important; min-height: 220px; padding: 0; border-radius: 0; }
.ar-all-mapcard .card-header .actions a { padding: .2rem .4rem; font-size: 1rem; }
.ar-all-mapcard > .card-body > .row.g-2 { flex: 0 0 auto; }
/* elenco invitati */
.ar-inv-table th { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); white-space: nowrap; }
.ar-inv-table th a { color: inherit; text-decoration: none; }
.ar-inv-table td { vertical-align: middle; font-size: .85rem; }
.ar-inv-nome { cursor: pointer; }
.ar-inv-n { font-weight: 600; }
.ar-inv-sub { display: none; font-size: .72rem; color: var(--ar-muted); }
.ar-inv-st { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: .45rem; color: #fff; font-size: .9rem; cursor: pointer; }
.ar-inv-lime, .ar-inv-green { background: #16a34a; }
.ar-inv-red { background: #dc2626; }
.ar-inv-magenta { background: #c026d3; }
.ar-inv-orange, .ar-inv-yellow { background: #f59e0b; }
.ar-inv-blue { background: #2563eb; }
.ar-inv-grey, .ar-inv-gray, .ar-inv-silver, .ar-inv-black { background: #94a3b8; }
.ar-inv-msg { color: #dc2626; cursor: pointer; margin-left: .25rem; animation: ar-mon-blink 1.6s infinite; }
.ar-inv-table .ar-ico-btn { padding: .15rem .35rem; }
@container inv (max-width: 34rem) {
  .ar-inv-cw { display: none; }
  .ar-inv-sub { display: block; }
}
@media (max-width: 1199.98px) {
  .ar-all-shell { display: block; height: auto; }
  .ar-all-col { display: block; width: auto; }
  .ar-all-col > .card.ar-box, .ar-all-col > #operatore { margin-bottom: .75rem; }
  .ar-all-invcard #invitati { max-height: 60vh; }
  .ar-all-mapcard > .card-body > .row:first-child > .map { height: 45vh !important; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .ar-all-shell { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }
  .ar-all-col-map { grid-column: 1 / -1; }
}
.ar-all-col { overflow-x: hidden; }
.ar-all-col-ev .row { --bs-gutter-x: .5rem; }
.ar-all-col-ev .row > .col-sm-2 { width: 33.333%; }
.ar-all-col-ev .row > .col-sm-3 { width: 50%; }
.ar-all-col-ev .form-label { font-size: .68rem; margin-bottom: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-all-col-ev .alert { font-size: .78rem; }
.ar-all-mapcard > .card-body > .row.g-2 > [class*="col-"] { width: auto; flex: 1 1 auto; min-width: 0; }
.ar-all-mapcard > .card-body > .row.g-2 .form-label { font-size: .68rem; white-space: nowrap; }
.ar-all-mapcard > .card-body > .row.g-2 .chosen-container, .ar-all-mapcard > .card-body > .row.g-2 .select2-container { min-width: 9rem; }
.ar-all-col-map > #operatore { flex: 0 1 auto; max-height: 55%; }
.ar-all-mapcard > .card-body > .row:first-child { position: relative; min-height: 200px; }
.ar-all-mapcard > .card-body > .row:first-child > .map { position: absolute; inset: 0; height: auto !important; min-height: 0; }
.ar-all-invcard > .card-body { overflow-x: hidden; }
.ar-inv-table { width: 100%; }
.ar-all-col-map { overflow: hidden; }
.ar-all-col-map > .card.ar-all-mapcard { min-height: 0; flex: 1 1 14rem; }
.ar-all-col-ev .form-label { display: block; }
/* ---- all_112: posizionamento/mappa/nuovo allertamento | elenco allertamenti ---- */
.ar-112-shell { display: flex; gap: .75rem; align-items: stretch; height: var(--ar-112-h, auto); min-height: 0; }
.ar-112-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; gap: .75rem; }
.ar-112-col-sx { flex: 0 0 clamp(24rem, 50%, 60rem); width: clamp(24rem, 50%, 60rem); overflow: auto; overflow-x: hidden; }
.ar-112-col-dx { flex: 1 1 auto; }
.ar-112-col > .card.ar-box { margin-bottom: 0; flex: 0 0 auto; }
.ar-112-col-dx > .card.ar-112-listcard { flex: 1 1 auto; display: flex; flex-direction: column; min-height: 0; }
.ar-112-listcard > .card-body { flex: 1 1 auto; min-height: 0; overflow: auto; container-type: inline-size; container-name: ev; }
.ar-112-filt { gap: .35rem; }
.ar-112-filt .form-select { width: auto; font-size: .78rem; }
.ar-112-gg { width: 6.5rem; }
.ar-112-mapcard #aid_map { height: 420px; }
.ar-112-col-sx .row { --bs-gutter-x: .5rem; }
.ar-112-col-sx .form-label { font-size: .68rem; margin-bottom: .1rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-112-col-sx .row > .col-sm-2 { width: 33.333%; }
.ar-112-col-sx .chosen-container { width: 100% !important; }
/* elenco allertamenti a schede */
.ar-ev-list { padding: .35rem; }
.ar-ev { border: 1px solid var(--ar-card-border); border-left: 4px solid #94a3b8; border-radius: .5rem; background: #fff; padding: .45rem .6rem; margin-bottom: .45rem; }
.ar-ev-A, .ar-ev-I { border-left-color: #16a34a; }
.ar-ev-C { border-left-color: #94a3b8; background: #fafbfc; }
.ar-ev-x { border-left-color: #dc2626; }
.ar-ev-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .7rem; }
.ar-ev-id { font-weight: 800; font-size: 1.05rem; color: #0f172a; text-decoration: none; }
.ar-ev-x .ar-ev-id { color: #dc2626; }
a.ar-ev-id:hover { text-decoration: underline; }
.ar-ev-118 { font-weight: 600; font-size: .9rem; color: #1e3a8a; }
.ar-ev-topo { font-weight: 600; font-size: .92rem; cursor: pointer; flex: 1 1 14rem; min-width: 0; }
.ar-ev-staz { font-size: .78rem; color: var(--ar-muted); }
.ar-ev-coord { font-size: .74rem !important; color: var(--ar-muted); }
.ar-ev-act { margin-left: auto; white-space: nowrap; }
.ar-ev-row { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; font-size: .82rem; margin-top: .3rem; }
.ar-ev-sub { padding-left: .9rem; border-left: 2px dashed #e2e8f0; margin-left: .55rem; margin-top: .25rem; color: #475569; }
.ar-ev-st { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; border-radius: .4rem; color: #fff; font-size: .75rem; }
.ar-ev-st.btn-success { background: #16a34a; } .ar-ev-st.btn-info { background: #0ea5e9; } .ar-ev-st.btn-danger { background: #dc2626; }
.ar-ev-st-chiuso { background: #64748b; } .ar-ev-st-ann { background: #dc2626; }
.ar-ev-when { font-weight: 600; }
.ar-ev-who { cursor: default; }
.ar-ev-who .k { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); margin-right: .15rem; }
.ar-ev-who .ar-ico-btn { padding: .1rem .3rem; }
@container ev (max-width: 36rem) {
  .ar-ev-coord { display: none; }
  .ar-ev-staz { width: 100%; }
}
@media (max-width: 1199.98px) {
  .ar-112-shell { display: block; height: auto; }
  .ar-112-col { display: block; width: auto; }
  .ar-112-col > .card.ar-box { margin-bottom: .75rem; }
  .ar-112-listcard > .card-body { max-height: 70vh; }
}
@media (min-width: 768px) and (max-width: 1199.98px) {
  .ar-112-shell { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; align-items: start; }
}

/* ---- agenda quadri (vl_agenda_cnsas) ---- */
.ar-ag { max-width: 1500px; margin: 0 auto; }
.ar-ag-head { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .5rem); z-index: 5; }
.ar-ag-reg { font-weight: 400; color: var(--ar-muted); margin-left: .4rem; }
.ar-ag-tools { gap: .4rem; flex-wrap: wrap; }
.ar-ag-cerca { width: 16rem; }
.ar-ag-regsel { width: auto; font-size: .78rem; }
.ar-ag-nav { display: flex; flex-wrap: wrap; gap: .3rem; padding: .45rem .75rem; border-top: 1px solid var(--ar-card-border); }
.ar-ag-nav:empty { display: none; }
.ar-ag-navi { font-size: .74rem; padding: .2rem .55rem; border-radius: 1rem; background: #f1f5f9; color: #334155; text-decoration: none; white-space: nowrap; }
.ar-ag-navi:hover { background: var(--ar-accent-light, #eaf3ee); color: var(--ar-accent, #198754); }
.ar-ag-sez { margin-top: 1.1rem; }
.ar-ag-h2 { font-size: 1rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #334155; margin: 0 0 .6rem; display: flex; align-items: center; }
.ar-ag-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .6rem; }
.ar-ag-grid:empty { display: none; }
.ar-ag-p { display: flex; gap: .7rem; align-items: flex-start; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .7rem; padding: .6rem .65rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, transform .15s; }
.ar-ag-p:hover { box-shadow: 0 6px 18px rgba(15,23,42,.1); transform: translateY(-1px); }
.ar-ag-foto { flex: 0 0 auto; width: 58px; height: 58px; border-radius: 50%; overflow: hidden; background: #e2e8f0; cursor: zoom-in; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--ar-card-border); }
.ar-ag-foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-ag-info { flex: 1 1 auto; min-width: 0; }
.ar-ag-ruolo { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-accent, #198754); font-weight: 700; }
.ar-ag-nome { font-weight: 700; font-size: .95rem; line-height: 1.2; margin: .1rem 0 .3rem; }
.ar-ag-cont { display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; }
.ar-ag-tel, .ar-ag-mail { color: #334155; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-ag-tel i, .ar-ag-mail i { width: 1.1rem; color: var(--ar-muted); font-size: .72rem; }
.ar-ag-tel:hover, .ar-ag-mail:hover { color: var(--ar-accent, #198754); }
.ar-ag-az { display: flex; flex-direction: column; gap: .15rem; flex: 0 0 auto; }
.ar-ag-az .ar-ico-btn { padding: .2rem .4rem; color: var(--ar-muted); }
.ar-ag-az .ar-ico-btn:hover { color: var(--ar-accent, #198754); }
.ar-ag-zona { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .8rem; padding: .8rem; }
.ar-ag-zhead { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; margin-bottom: .7rem; padding-bottom: .6rem; border-bottom: 2px solid var(--ar-accent, #198754); }
.ar-ag-ztit { font-size: 1.05rem; color: #0f172a; display: flex; align-items: center; }
.ar-ag-ztit b { font-weight: 800; }
.ar-ag-zdel { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .6rem; font-size: .85rem; }
.ar-ag-zdel .ar-ag-nome { margin: 0; font-size: .9rem; }
.ar-ag-zdel .ar-ag-cont { flex-direction: row; flex-wrap: wrap; gap: .2rem .8rem; }
.ar-ag-staz { margin-top: .8rem; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .7rem; padding: .6rem .7rem; }
.ar-ag-shead { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem 1.2rem; margin-bottom: .5rem; }
.ar-ag-stit { font-size: .9rem; color: #0f172a; display: flex; align-items: center; }
.ar-ag-stit b { font-weight: 800; margin-left: .3rem; }
.ar-ag-shead .ar-ag-cont { flex-direction: row; flex-wrap: wrap; gap: .2rem .8rem; }
.ar-ag-staz .ar-ag-grid { grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: .5rem; }
.ar-ag-staz .ar-ag-p { border-color: #eef2f6; box-shadow: none; background: #fbfcfd; }
.ar-ag-vuoto { padding: 2rem; text-align: center; color: var(--ar-muted); }
@media (max-width: 767.98px) {
  .ar-ag-head { position: static; }
  .ar-ag-cerca { width: 100%; }
  .ar-ag-tools { width: 100%; }
  .ar-ag-grid { grid-template-columns: 1fr; }
  .ar-ag-zona { padding: .6rem; }
}

/* ---- riquadri KPI (riusabili) ---- */
.ar-kpis { display: flex; flex-wrap: wrap; gap: .5rem; padding: .6rem .75rem; border-top: 1px solid var(--ar-card-border); }
.ar-kpi { flex: 1 1 8rem; background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .6rem; padding: .5rem .75rem; display: flex; flex-direction: column; }
.ar-kpi-v { font-size: 1.4rem; font-weight: 800; line-height: 1.1; color: #0f172a; }
.ar-kpi-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 600; }
/* ---- appuntamenti fatti (vl_schedaapp) ---- */
.ar-app-tools { gap: .4rem; flex-wrap: wrap; }
.ar-app-cerca { width: 15rem; }
.ar-app-anno { border-bottom: 1px solid var(--ar-card-border); }
.ar-app-anno > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; }
.ar-app-anno > summary::-webkit-details-marker { display: none; }
.ar-app-anno > summary::before { content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: var(--ar-muted); font-size: .8rem; width: .8rem; transition: transform .15s; }
.ar-app-anno[open] > summary::before { transform: rotate(180deg); }
.ar-app-anno[open] > summary { background: #f8fafc; }
.ar-app-y { font-weight: 800; font-size: 1.05rem; min-width: 3.2rem; }
.ar-app-ytot { font-size: .8rem; color: #334155; white-space: nowrap; }
.ar-app-bar { flex: 1 1 4rem; height: .4rem; background: #e2e8f0; border-radius: .2rem; overflow: hidden; min-width: 3rem; }
.ar-app-bar > span { display: block; height: 100%; background: var(--ar-accent, #198754); }
.ar-app-tab td { font-size: .82rem; padding: .3rem .75rem; border-color: #f1f5f9; }
.ar-app-tab .ar-app-cat { font-weight: 600; color: #334155; white-space: nowrap; }
.ar-app-list { max-height: 72vh; overflow: auto; }
.ar-app-ly { position: sticky; top: 0; z-index: 1; background: #f1f5f9; font-weight: 800; font-size: .78rem; letter-spacing: .05em; padding: .3rem .75rem; border-bottom: 1px solid var(--ar-card-border); }
.ar-app-i { display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; border-bottom: 1px solid #f1f5f9; font-size: .88rem; }
.ar-app-i:hover { background: #fbfcfd; }
.ar-app-d { flex: 0 0 5.6rem; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .78rem; color: var(--ar-muted); }
.ar-app-t { flex: 1 1 auto; min-width: 0; font-weight: 600; }
.ar-app-c { display: block; font-size: .72rem; font-weight: 400; color: var(--ar-muted); }
.ar-app-cat1 { color: var(--ar-accent, #198754); font-weight: 600; }
.ar-app-h, .ar-app-g { flex: 0 0 3.2rem; text-align: right; font-weight: 700; font-size: .85rem; }
.ar-app-h small, .ar-app-g small { font-weight: 400; color: var(--ar-muted); margin-left: .1rem; }
@media (max-width: 575.98px) {
  .ar-app-cerca { width: 100%; }
  .ar-app-d { flex-basis: 4.6rem; }
  .ar-app-g { display: none; }
  .ar-app-ytot { white-space: normal; }
}

/* ---- portale del volontario (vl_default): sidebar + pagina in iframe ---- */
body.ar-vl { --ar-left-w: 280px; }
body.ar-vl .ar-content { padding-bottom: .5rem; }
body.ar-vl #left.ar-vl-side { padding: 0; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: column; background: #fff; }
.ar-vl-gtog { margin-top: .3rem; }
.ar-vl-ruoli { padding-bottom: .3rem; border-bottom: 1px solid var(--ar-card-border); }
body.ar-vl #left.ar-vl-side > * { flex: 0 0 auto; }
.ar-vl-me { display: flex; align-items: center; gap: .7rem; padding: .85rem .9rem; background: linear-gradient(135deg, var(--ar-navbar-bg) 0%, var(--ar-navbar-bg2) 100%); color: #fff; }
.ar-vl-foto { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.6); cursor: zoom-in; background: #334155; flex: 0 0 auto; }
.ar-vl-men { min-width: 0; }
.ar-vl-nome { font-weight: 700; font-size: .98rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-vl-sub { font-size: .74rem; color: rgba(255,255,255,.7); line-height: 1.25; }
.ar-vl-g { font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ar-muted); padding: .8rem .9rem .25rem; }
.ar-vl-voce { display: flex; align-items: center; gap: .6rem; padding: .42rem .9rem; margin: 0 .4rem; border-radius: .45rem; color: #1e293b; text-decoration: none; font-size: .86rem; line-height: 1.25; transition: background .12s, color .12s; }
.ar-vl-voce i { width: 1.25rem; text-align: center; color: var(--ar-muted); font-size: .9rem; flex: 0 0 auto; }
.ar-vl-voce:hover { background: #f1f5f9; color: #0f172a; }
.ar-vl-voce.attivo { background: var(--ar-accent-light, #eaf3ee); color: var(--ar-accent, #198754); font-weight: 600; }
.ar-vl-voce.attivo i { color: var(--ar-accent, #198754); }
.ar-vl-voce.ar-vl-esci { color: #b91c1c; }
.ar-vl-voce.ar-vl-esci i { color: #b91c1c; }
.ar-vl-voce.ar-vl-esci:hover { background: #fef2f2; }
.ar-vl-ruoli { padding: 0 .4rem; }
.ar-vl-ruolo { display: flex; align-items: center; gap: .5rem; padding: .38rem .5rem; border-radius: .45rem; font-size: .8rem; color: #334155; text-decoration: none; }
.ar-vl-ruolo img { width: 16px; height: 16px; flex: 0 0 auto; }
.ar-vl-ruolo .ar-vl-ricona { width: 1.25rem; text-align: center; color: var(--ar-muted); font-size: .95rem; flex: 0 0 auto; }
.ar-vl-ruolo.attivo .ar-vl-ricona { color: var(--ar-accent, #198754); }
.ar-vl-ruolo span { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-vl-ruolo i { color: var(--ar-muted); font-size: .75rem; }
.ar-vl-ruolo.attivo { background: var(--ar-accent-light, #eaf3ee); color: var(--ar-accent, #198754); font-weight: 600; }
.ar-vl-ruolo.attivo i { color: var(--ar-accent, #198754); }
a.ar-vl-ruolo:hover { background: #f1f5f9; }
.ar-vl-chat { padding: 0 .9rem; font-size: .82rem; }
.ar-vl-chat:empty { display: none; }
.ar-vl-links { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .7rem .9rem; border-top: 1px solid var(--ar-card-border); background: #f8fafc; }
.ar-vl-links a { display: flex; align-items: center; gap: .4rem; font-size: .74rem; color: var(--ar-muted); text-decoration: none; }
.ar-vl-links img { height: 26px; width: auto; }
.ar-vl-frame { margin: 0; }
.ar-vl-frame iframe { height: calc(100vh - var(--ar-nav-h) - 1.5rem); min-height: 480px; }
@media (max-width: 991.98px) {
  body.ar-vl #left.ar-vl-side { max-height: none; }
  .ar-vl-links { margin-top: .5rem; }
  .ar-vl-frame iframe { height: calc(100vh - var(--ar-nav-h) - 1rem); }
}
/* pagina aperta dentro un iframe (portale volontario): niente navbar/breadcrumb doppi */
html.ar-in-frame { --ar-path-h: 0px; }
html.ar-in-frame .ar-navbar, html.ar-in-frame .ar-pathbar { display: none !important; }
html.ar-in-frame body.ar-body { padding-top: 0; }
html.ar-in-frame .ar-pathbar.d-none ~ .ar-content { margin-top: 0; }
/* ---- interventi fatti (vl_schedaint): voce apribile con dettaglio ---- */
details.ar-int-i { display: block; padding: 0; }
details.ar-int-i > summary { list-style: none; display: flex; align-items: center; gap: .6rem; padding: .45rem .75rem; cursor: pointer; }
details.ar-int-i > summary::-webkit-details-marker { display: none; }
details.ar-int-i[open] > summary { background: #f8fafc; }
.ar-int-det { padding: .3rem .75rem .6rem 7rem; font-size: .8rem; color: #334155; display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; background: #fbfcfd; border-top: 1px dashed #e2e8f0; }
.ar-int-des { flex: 1 1 100%; font-style: italic; }
.ar-int-kv i { width: 1.2rem; color: var(--ar-muted); font-size: .75rem; }
@media (max-width: 575.98px) { .ar-int-det { padding-left: .75rem; } }
/* ---- contatti (preferiti / stazione / ricerca) ---- */
.ar-vlc-page .ar-ag-grid { grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.ar-vlc-ruoli { font-size: .72rem; color: var(--ar-muted); margin: -.15rem 0 .3rem; line-height: 1.3; }
.ar-vlc-del:hover { color: #b91c1c !important; }
.ar-vlc-form { max-width: 40rem; }
@media (max-width: 575.98px) { .ar-vlc-page .ar-ag-grid { grid-template-columns: 1fr; } }
.ar-vlc-r::after { content: " \00b7 "; color: #cbd5e1; }
.ar-vlc-r:last-child::after { content: ""; }
.ar-vlc-plus { font-size: .7rem; font-weight: 700; color: var(--ar-accent, #198754); text-decoration: none; margin-left: .2rem; }
/* ---- applicazioni (vl_applicazioni) ---- */
body.ar-vla { background: var(--ar-body-bg, #f3f5f8); margin: 0; }
.ar-vla-wrap { padding: .75rem; max-width: 1100px; margin: 0 auto; }
.ar-vla-top { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.ar-vla-crumb { display: flex; align-items: center; gap: .35rem; font-size: .85rem; color: var(--ar-muted); }
.ar-vla-crumb span + span::before { content: "\203a"; margin: 0 .3rem; color: #cbd5e1; }
.ar-vla-crumb span:last-child { color: #0f172a; font-weight: 700; }
.ar-vla-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr)); gap: .6rem; }
.ar-vla-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; min-height: 6.5rem; padding: .9rem .6rem; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .8rem; text-decoration: none; color: #1e293b; text-align: center; font-weight: 600; font-size: .85rem; line-height: 1.2; box-shadow: 0 1px 2px rgba(15,23,42,.04); transition: box-shadow .15s, transform .15s, border-color .15s; }
.ar-vla-tile > i { font-size: 1.7rem; color: var(--ar-accent, #198754); }
.ar-vla-tile:hover { box-shadow: 0 8px 20px rgba(15,23,42,.12); transform: translateY(-2px); border-color: var(--ar-accent, #198754); color: #0f172a; }
.ar-vla-tile small { position: absolute; top: .45rem; right: .55rem; color: #cbd5e1; font-size: .7rem; }
.ar-vla-cart > i { color: #d97706; }
@media (max-width: 575.98px) { .ar-vla-grid { grid-template-columns: repeat(2, 1fr); } .ar-vla-tile { min-height: 5.5rem; } }

/* ---- elenco eventi (vl_eventi) ---- */
.ar-vle-page { max-width: 1400px; margin: 0 auto; }
.ar-vle-tools { gap: .4rem; flex-wrap: wrap; }
.ar-vle-tools .form-select { width: auto; max-width: 16rem; }
.ar-vle-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .75rem; }
.ar-vle-i { display: grid; grid-template-columns: 11rem minmax(0, 1fr) auto; gap: .25rem 1rem; align-items: start; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .7rem; padding: .6rem .8rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ar-vle-when { display: flex; flex-direction: column; gap: .15rem; }
.ar-vle-gg { font-size: .8rem; text-decoration: none; color: #0f172a; white-space: nowrap; }
.ar-vle-gg span { color: var(--ar-muted); font-size: .72rem; }
.ar-vle-gg:hover { color: var(--ar-accent, #198754); }
.ar-vle-tipo { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-accent, #198754); font-weight: 700; }
.ar-vle-tit { font-weight: 700; font-size: .95rem; line-height: 1.25; }
.ar-vle-ogg { font-size: .8rem; color: #334155; margin-top: .15rem; }
.ar-vle-dove { font-size: .78rem; color: var(--ar-muted); margin-top: .2rem; }
.ar-vle-dove i { width: 1rem; }
.ar-vle-docs { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .4rem; }
.ar-vle-doc { display: inline-flex; align-items: center; gap: .3rem; font-size: .74rem; padding: .15rem .5rem; border-radius: 1rem; background: #f1f5f9; color: #334155; text-decoration: none; }
.ar-vle-doc:hover { background: var(--ar-accent-light, #eaf3ee); color: var(--ar-accent, #198754); }
.ar-vle-side { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; min-width: 9rem; }
.ar-vle-st { font-size: .7rem; font-weight: 600; padding: .35rem .55rem; }
@media (max-width: 767.98px) {
  .ar-vle-i { grid-template-columns: 1fr; }
  .ar-vle-when { flex-direction: row; flex-wrap: wrap; gap: .2rem .8rem; }
  .ar-vle-side { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; min-width: 0; }
  .ar-vle-tools .form-select { max-width: 100%; }
}
/* ---- chat tra volontari (vl_chat) ---- */
body.ar-vlchat { margin: 0; background: #e9edf2; }
.ar-vlchat-wrap { display: flex; flex-direction: column; height: 100vh; max-width: 900px; margin: 0 auto; background: #f3f5f8; }
.ar-vlchat-head { display: flex; align-items: center; gap: .6rem; padding: .5rem .75rem; background: #fff; border-bottom: 1px solid var(--ar-card-border); box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.ar-vlchat-foto { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #e2e8f0; }
.ar-vlchat-nome { font-weight: 700; line-height: 1.15; }
.ar-vlchat-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); }
.ar-vlchat-msgs { flex: 1 1 auto; overflow-y: auto; padding: .75rem; display: flex; flex-direction: column; gap: .35rem; }
.ar-vlchat-gg { text-align: center; margin: .5rem 0 .25rem; }
.ar-vlchat-gg span { font-size: .68rem; background: #dbe2ea; color: #475569; border-radius: 1rem; padding: .15rem .6rem; }
.ar-vlchat-m { display: flex; align-items: flex-end; gap: .4rem; max-width: 80%; }
.ar-vlchat-m img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.ar-vlchat-m.mio { align-self: flex-end; flex-direction: row-reverse; }
.ar-vlchat-b { background: #fff; border-radius: .9rem .9rem .9rem .2rem; padding: .4rem .7rem; box-shadow: 0 1px 1px rgba(15,23,42,.06); font-size: .9rem; }
.ar-vlchat-m.mio .ar-vlchat-b { background: var(--ar-accent-light, #d9f0e3); border-radius: .9rem .9rem .2rem .9rem; }
.ar-vlchat-a { font-size: .68rem; font-weight: 700; color: var(--ar-accent, #198754); }
.ar-vlchat-t { white-space: pre-wrap; word-break: break-word; }
.ar-vlchat-h { font-size: .64rem; color: var(--ar-muted); text-align: right; margin-top: .1rem; }
.ar-vlchat-vuoto { margin: auto; text-align: center; color: var(--ar-muted); }
.ar-vlchat-form { display: flex; gap: .5rem; align-items: flex-end; padding: .5rem .75rem; background: #fff; border-top: 1px solid var(--ar-card-border); }
.ar-vlchat-form textarea { resize: none; border-radius: 1.2rem; padding: .5rem .9rem; max-height: 160px; }
.ar-vlchat-form .btn { border-radius: 50%; width: 2.6rem; height: 2.6rem; padding: 0; flex: 0 0 auto; }
/* ---- scheda anagrafica volontario (vl_schedaana) ---- */
.ar-ana { max-width: 1500px; margin: 0 auto; }
.ar-ana-head { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .5rem); z-index: 5; margin-bottom: .75rem; }
.ar-ana-top { display: flex; align-items: center; gap: 1rem; padding: .8rem 1rem; flex-wrap: wrap; }
.ar-ana-foto { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; background: #e2e8f0; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--ar-card-border); cursor: zoom-in; flex: 0 0 auto; }
.ar-ana-who { flex: 1 1 auto; min-width: 0; }
.ar-ana-nome { font-size: 1.35rem; font-weight: 800; line-height: 1.15; color: #0f172a; }
.ar-ana-sub { font-size: .82rem; color: #334155; margin-top: .15rem; }
.ar-ana-cont { display: flex; flex-wrap: wrap; gap: .2rem 1rem; margin-top: .35rem; font-size: .82rem; }
.ar-ana-cont a { color: #334155; text-decoration: none; }
.ar-ana-cont a i { width: 1.1rem; color: var(--ar-muted); font-size: .75rem; }
.ar-ana-cont a:hover { color: var(--ar-accent, #198754); }
.ar-ana-az { display: flex; gap: .4rem; flex-wrap: wrap; }
.ar-ana-nav { display: flex; flex-wrap: wrap; gap: .3rem; padding: .45rem .75rem; border-top: 1px solid var(--ar-card-border); }
.ar-ana-nav:empty { display: none; }
.ar-ana .card.ar-box { scroll-margin-top: calc(var(--ar-nav-h) + var(--ar-path-h) + 9rem); }
.ar-ana .card-body > table.table { margin-bottom: 0; }
.ar-ana .table-striped > tbody > tr:nth-of-type(odd) > * { --bs-table-accent-bg: transparent; }
.ar-ana .card-body > table.table > tbody > tr > th:first-child, .ar-ana .card-body > table.table > tr > th:first-child { width: 11rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); font-weight: 600; vertical-align: middle; padding-top: .45rem; padding-bottom: .45rem; }
.ar-ana .card-body > table.table th[colspan] { width: auto; font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-accent, #198754) !important; background: #f8fafc; padding-top: .5rem; }
.ar-ana .card-body > table.table th[colspan] b { font-weight: 700; }
.ar-ana .card-body > table.table td { font-size: .88rem; vertical-align: middle; padding-top: .4rem; padding-bottom: .4rem; }
.ar-ana .card-body > table.table td table.table-borderless td, .ar-ana .card-body > table.table td table.table-sm td, .ar-ana .card-body > table.table td table.table-sm th { padding: .15rem .5rem .15rem 0; font-size: .82rem; border: 0; }
.ar-ana .card-body > table.table td table.table-sm th { font-size: .66rem; text-transform: uppercase; color: var(--ar-muted); font-weight: 600; }
.ar-ana .card-body > table.table td table small { font-size: .66rem; text-transform: uppercase; color: var(--ar-muted); }
.ar-ana .card.ar-box .card-header h3 i { color: var(--ar-accent, #198754); }
@media (max-width: 767.98px) {
  .ar-ana-head { position: static; }
  .ar-ana-foto { width: 56px; height: 56px; }
  .ar-ana-nome { font-size: 1.1rem; }
  .ar-ana .card-body > table.table > tbody > tr > th:first-child { width: 7.5rem; }
}
/* ---- calendario eventi (vl_calendario) ---- */
.ar-cal { max-width: 1500px; margin: 0 auto; }
.ar-cal-tools .ar-cal-anno { width: auto; border-radius: 0; }
.ar-cal-leg { display: flex; align-items: center; gap: .4rem 1rem; flex-wrap: wrap; font-size: .74rem; color: var(--ar-muted); padding: .4rem .75rem; border-top: 1px solid var(--ar-card-border); }
.ar-cal-lg { display: inline-block; width: .9rem; height: .9rem; border-radius: 50%; vertical-align: middle; margin-right: .2rem; }
.ar-cal-lg.oggi { box-shadow: inset 0 0 0 2px #f59e0b; }
.ar-cal-lg.app { background: var(--ar-accent-light, #d9f0e3); box-shadow: inset 0 0 0 1px var(--ar-accent, #198754); }
.ar-cal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: .75rem; margin-top: .75rem; }
.ar-cal-m { background: #fff; border: 1px solid var(--ar-card-border); border-radius: .8rem; padding: .6rem .7rem .4rem; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ar-cal-m.oggi { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245,158,11,.15); }
.ar-cal-mh { font-weight: 800; font-size: .95rem; margin-bottom: .3rem; color: #0f172a; }
.ar-cal-mh span { font-weight: 400; color: var(--ar-muted); font-size: .8rem; }
.ar-cal-m table.table { margin: 0; table-layout: fixed; }
.ar-cal-m table.table th, .ar-cal-m table.table td { border: 0; padding: .1rem 0; text-align: center; font-size: .78rem; height: 1.9rem; vertical-align: middle; }
.ar-cal-m table.table th { font-size: .62rem; text-transform: uppercase; color: var(--ar-muted); font-weight: 600; height: auto; }
.ar-cal-m table.table th[style] { color: #dc2626 !important; }
.ar-cal-m table.table td span[style] { color: #dc2626 !important; }
.ar-cal-m table.table td[style] { background: transparent !important; }
.ar-cal-m table.table td[style]::before { content: ""; }
.ar-cal-m table.table td[style] { box-shadow: inset 0 0 0 2px #f59e0b; border-radius: 50%; font-weight: 700; }
.ar-cal-m table.table td.appcalapp { padding: 0; }
.ar-cal-m table.table td.appcalapp a { display: inline-flex; align-items: center; justify-content: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ar-accent-light, #d9f0e3); color: var(--ar-accent, #198754); text-decoration: none; }
.ar-cal-m table.table td.appcalapp a b { font-weight: 700; }
.ar-cal-m table.table td.appcalapp a:hover { background: var(--ar-accent, #198754); color: #fff; }
@media (max-width: 575.98px) { .ar-cal-grid { grid-template-columns: 1fr; } }
/* ---- dotazioni personali (vl_magazzino) ---- */
.ar-mag-tab th { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); font-weight: 600; white-space: nowrap; }
.ar-mag-tab td { font-size: .85rem; vertical-align: middle; }
.ar-mag-tab tr.ar-mag-ok > td:first-child { box-shadow: inset 3px 0 0 #16a34a; }
.ar-mag-tab tr.ar-mag-ko > td { background: #fef2f2; }
.ar-mag-tab tr.ar-mag-ko > td:first-child { box-shadow: inset 3px 0 0 #dc2626; }
.ar-mag-tab td.ar-mag-ruolo { background: #f8fafc; color: var(--ar-accent, #198754); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; padding-top: .5rem; }
.ar-mag-tab td.ar-mag-ruolo b { color: #0f172a; }
.ar-mag-tab .photo-hover { color: var(--ar-accent, #198754); font-size: 1.1rem; }
/* ---- le tue tracce (vl_traccia) ---- */
body.ar-has-left #left.ar-trk-side { --ar-left-w: 340px; padding: 0; display: flex; flex-direction: column; overflow: hidden; height: calc(100vh - var(--ar-nav-h) - var(--ar-path-h) - 1.5rem); }
.ar-trk-form { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.ar-trk-top { padding: .6rem .6rem .4rem; border-bottom: 1px solid var(--ar-card-border); display: flex; flex-direction: column; gap: .4rem; }
.ar-trk-scena { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--ar-muted); }
.ar-trk-scena .form-select { font-size: .78rem; }
.ar-trk-list { flex: 1 1 auto; min-height: 8rem; overflow-y: auto; }
.ar-trk-det { flex: 0 0 auto; overflow-y: auto; max-height: 55%; }
.ar-trk-i { display: block; padding: .45rem .7rem; border-bottom: 1px solid #f1f5f9; text-decoration: none; color: #1e293b; border-left: 3px solid transparent; }
.ar-trk-i:hover { background: #f8fafc; }
.ar-trk-i.attivo { background: var(--ar-accent-light, #eaf3ee); border-left-color: var(--ar-accent, #198754); }
.ar-trk-nome { display: block; font-weight: 700; font-size: .86rem; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-trk-nome .badge { font-size: .6rem; vertical-align: middle; }
.ar-trk-info { display: flex; flex-wrap: wrap; gap: .1rem .7rem; font-size: .72rem; color: var(--ar-muted); margin-top: .15rem; }
.ar-trk-info i { width: .95rem; font-size: .66rem; }
.ar-trk-det { border-top: 2px solid var(--ar-accent, #198754); padding: .6rem .7rem; font-size: .8rem; }
.ar-trk-dh { display: flex; align-items: center; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ar-trk-dt { font-weight: 800; font-size: .92rem; min-width: 0; }
.ar-trk-dt i { color: var(--ar-accent, #198754); margin-right: .35rem; }
.ar-trk-da { display: flex; gap: .3rem; }
.ar-trk-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr)); gap: .35rem; margin-bottom: .5rem; }
.ar-trk-kpi { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .35rem .5rem; display: flex; flex-direction: column; }
.ar-trk-kpi b { font-size: .92rem; line-height: 1.15; }
.ar-trk-kpi span { font-size: .6rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); }
.ar-trk-kv { display: grid; grid-template-columns: 1fr 1fr; gap: .25rem .6rem; }
.ar-trk-kv > div { display: flex; flex-direction: column; font-size: .68rem; color: var(--ar-muted); text-transform: uppercase; letter-spacing: .03em; }
.ar-trk-kv > div i { display: none; }
.ar-trk-kv > div b { font-size: .8rem; color: #0f172a; text-transform: none; letter-spacing: 0; }
.ar-trk-map { height: calc(100vh - var(--ar-nav-h) - var(--ar-path-h) - 2rem); min-height: 420px; }
@media (max-width: 991.98px) {
  body.ar-has-left #left.ar-trk-side { display: none; }
  body.ar-has-left.ar-left-open #left.ar-trk-side { display: flex; height: auto; }
  .ar-trk-list { max-height: 40vh; }
  .ar-trk-map { height: 70vh; min-height: 320px; }
}
/* ---- eventi del giorno (ap_appcal) ---- */
.ar-apc-brand { display: flex; align-items: center; gap: .75rem; margin: 0 0 .75rem; font-weight: 700; color: #0f172a; }
.ar-apc-brand img { height: 44px; width: auto; }
.ar-apc { max-width: 1100px; margin: 0 auto .75rem; }
.ar-apc .card-header h3 { flex-wrap: wrap; }
.ar-apc-tipo { font-size: .64rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-accent, #198754); background: var(--ar-accent-light, #eaf3ee); border-radius: 1rem; padding: .15rem .55rem; margin-right: .5rem; font-weight: 700; white-space: nowrap; }
.ar-apc-id { font-size: .74rem; color: var(--ar-muted); margin-right: .5rem; white-space: nowrap; }
.ar-apc-body { padding: .6rem .9rem .75rem; }
.ar-apc-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ar-apc-chip { display: inline-flex; align-items: center; gap: .4rem; background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .3rem .6rem; font-size: .82rem; color: #0f172a; font-weight: 600; max-width: 100%; }
.ar-apc-chip i { color: var(--ar-muted); font-size: .75rem; }
.ar-apc-chip small { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 600; }
.ar-apc-cf span { background: #fff7ed; color: #9a3412; border-radius: 1rem; padding: .05rem .45rem; font-size: .74rem; }
.ar-apc-cf i { color: #f59e0b; }
.ar-apc-desc { margin-top: .6rem; font-size: .88rem; color: #334155; line-height: 1.4; }
.ar-apc-sec { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: .3rem 1rem; align-items: start; margin-top: .6rem; padding-top: .55rem; border-top: 1px dashed var(--ar-card-border); }
.ar-apc-k { font-size: .68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 700; padding-top: .25rem; }
.ar-apc-k i { width: 1.2rem; color: var(--ar-accent, #198754); }
.ar-apc-gg { display: flex; flex-wrap: wrap; gap: .35rem; }
.ar-apc-g { display: inline-flex; align-items: center; gap: .45rem; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .25rem .6rem; font-size: .82rem; cursor: pointer; background: #fff; }
.ar-apc-g:has(input:checked) { border-color: var(--ar-accent, #198754); background: var(--ar-accent-light, #eaf3ee); }
.ar-apc-g input { margin: 0; }
.ar-apc-g span { color: var(--ar-muted); font-size: .76rem; }
.ar-apc-az { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.ar-apc-st { font-size: .72rem; padding: .4rem .6rem; }
.ar-apc-docs { display: flex; flex-wrap: wrap; gap: .35rem; }
.ar-apc-doc { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; padding: .25rem .6rem; border-radius: 1rem; background: #f1f5f9; color: #334155; text-decoration: none; cursor: pointer; }
.ar-apc-doc:hover { background: var(--ar-accent-light, #eaf3ee); color: var(--ar-accent, #198754); }
.ar-apc-qr { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ar-apc-qr #qrcode img { border: 1px solid var(--ar-card-border); padding: .25rem; background: #fff; }
.ar-apc-agg { display: inline-flex; align-items: center; margin: .25rem auto 1rem; }
@media (max-width: 575.98px) {
  .ar-apc-sec { grid-template-columns: 1fr; gap: .2rem; }
  .ar-apc-body { padding: .5rem .6rem .6rem; }
}
.ar-apc-day { max-width: 1100px; margin: 0 auto .6rem; display: flex; align-items: center; gap: .5rem; font-size: 1rem; color: #334155; }
.ar-apc-day > i { color: var(--ar-accent, #198754); }
/* ---- giornata / rimborso (pr_giorno): due colonne, riepilogo sticky, documenti compatti ---- */
.ar-pgd-wrap { max-width: 1600px; margin: 0 auto; }
.ar-pgd-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .5rem; }
.ar-pgd-chip { display: inline-flex; align-items: center; gap: .35rem; font-size: .76rem; background: #f1f5f9; color: #334155; border-radius: 1rem; padding: .15rem .6rem; }
.ar-pgd-chip i { color: var(--ar-muted); font-size: .7rem; }
.ar-pgd-sub { font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ar-accent, #198754); font-weight: 700; margin: .9rem 0 .4rem; padding-bottom: .25rem; border-bottom: 1px solid var(--ar-card-border); }
.ar-pgd .form-control:disabled, .ar-pgd .form-select:disabled { background: #f8fafc; color: #475569; }
.ar-pgd-side .card { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); }
.ar-pgd-stato { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .7rem; }
.ar-pgd-stato .ar-pgd-tag { font-size: .78rem; padding: .35rem .7rem; }
.ar-pgd-stato .ar-pgd-tag i { margin-right: .35rem; }
.ar-pgd-kv > div { display: flex; justify-content: space-between; gap: .75rem; font-size: .82rem; padding: .3rem 0; border-bottom: 1px dashed var(--ar-card-border); }
.ar-pgd-kv > div span { color: var(--ar-muted); flex: 0 0 auto; }
.ar-pgd-kv > div b { text-align: right; font-weight: 600; }
.ar-pgd-tot { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; margin: .8rem 0; }
.ar-pgd-tot-i { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .6rem; padding: .45rem .5rem; display: flex; flex-direction: column; align-items: center; }
.ar-pgd-tot-i b { font-size: 1.05rem; line-height: 1.1; white-space: nowrap; }
.ar-pgd-tot-i span { font-size: .62rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 600; }
.ar-pgd-acts-side { display: flex; flex-direction: column; gap: .4rem; margin-top: .4rem; }
.ar-pgd-acts-side .btn { width: 100%; }
.ar-pgd-acts-side .ar-pgd-firma { display: block; text-align: center; font-size: .8rem; color: #334155; padding: .4rem; background: #ecfdf5; border-radius: .5rem; }
.ar-pgd-acts-side .ar-pgd-firma i { color: #16a34a; margin-right: .35rem; }
.ar-pgd-back { display: block; text-align: center; font-size: .8rem; margin-top: .6rem; color: var(--ar-muted); text-decoration: none; }
.ar-pgd-back:hover { color: var(--ar-accent, #198754); }
.ar-pgd-dochead { font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 700; padding: 0 .25rem .3rem; }
.ar-pgd-doc { padding: .45rem .25rem; border-bottom: 1px solid #f1f5f9; }
.ar-pgd-doc:hover { background: #fbfcfd; }
.ar-pgd-thumb { position: relative; display: inline-block; width: 64px; height: 48px; border-radius: .4rem; overflow: hidden; border: 1px solid var(--ar-card-border); background: #f1f5f9; vertical-align: middle; }
.ar-pgd-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ar-pgd-thumb span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; background: rgba(15,23,42,.35); opacity: 0; transition: opacity .15s; }
.ar-pgd-thumb:hover span { opacity: 1; }
.ar-pgd-file { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: #0f172a; text-decoration: none; max-width: 100%; }
.ar-pgd-file i { color: #dc2626; font-size: 1.1rem; }
.ar-pgd-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ar-pgd-file small { color: var(--ar-muted); }
.ar-pgd-file:hover span { text-decoration: underline; }
.ar-pgd-doctot { display: flex; justify-content: flex-end; align-items: baseline; gap: .4rem; padding: .5rem .25rem 0; font-size: .82rem; color: var(--ar-muted); }
.ar-pgd-doctot b { color: #0f172a; font-size: .95rem; }
.ar-pgd-nodoc { font-size: .84rem; color: var(--ar-muted); padding: .5rem .25rem .25rem; }
.ar-pgd-docnew { border: 1px dashed var(--ar-accent, #198754); border-radius: .6rem; padding: .5rem .35rem; background: #f7fdf9; margin: 0; }
@media (max-width: 1199.98px) {
  .ar-pgd-side .card { position: static; }
  .ar-pgd-acts-side { flex-direction: row; flex-wrap: wrap; }
  .ar-pgd-acts-side .btn { width: auto; flex: 1 1 auto; }
}
/* fatturazione istruttori (sc_fatistr.asp) */
.ar-fs-sub { display: block; font-weight: 400; color: var(--ar-muted); font-size: .74rem; margin-top: .1rem; }
.ar-fs-sub i { font-size: .68rem; margin-right: .25rem; }
.ar-fs-tbl td { vertical-align: middle; }
.ar-fs-fat { max-width: 11rem; }
.ar-fs-imp-g { max-width: 9rem; margin-left: auto; }
.ar-fs-imp-g .input-group-text { padding: .1rem .4rem; font-size: .75rem; }
.ar-fs-nofat { font-size: .7rem; text-transform: uppercase; letter-spacing: .03em; color: #b45309; background: #fef3c7; border-radius: .25rem; padding: .1rem .4rem; }
.ar-fs-fatn { font-weight: 600; color: #0f172a; }
.ar-fs-fatn i { color: var(--ar-muted); margin-right: .3rem; }
.ar-fs-tbl tfoot th { background: #eef2f6; border-top: 2px solid #94a3b8; font-size: .8rem; }
.ar-fs-riep .card-body { padding: .75rem; }
.ar-fs-kpi { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-bottom: .75rem; }
.ar-fs-kpi > div { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .4rem; padding: .5rem .6rem; text-align: center; }
.ar-fs-kpi b { display: block; font-size: 1.05rem; color: #0f172a; line-height: 1.2; }
.ar-fs-kpi b small { font-size: .7rem; color: var(--ar-muted); font-weight: 400; }
.ar-fs-kpi span { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); }
.ar-fs-ist-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); margin: .25rem 0 .35rem; }
.ar-fs-ist { font-size: .8rem; }
.ar-fs-ist th { font-size: .68rem; text-transform: uppercase; color: var(--ar-muted); font-weight: 600; border-bottom: 2px solid #cbd5e1; white-space: nowrap; }
.ar-fs-ist td { vertical-align: middle; }
.ar-fs-ist-l { cursor: pointer; }
.ar-fs-ist-l:hover td { background: #eef2f6; }
@media (min-width: 1200px) { .ar-fs-riep { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); max-height: calc(100vh - var(--ar-nav-h) - var(--ar-path-h) - 1.5rem); overflow-y: auto; } }
/* richieste 001 (sc_corsi / sc_corso) */
.ar-sc-who { font-weight: 600; color: #0f172a; text-decoration: none; }
.ar-sc-who:hover { text-decoration: underline; }
.ar-sc-sub { display: flex; flex-wrap: wrap; gap: .15rem .8rem; font-size: .74rem; color: var(--ar-muted); margin-top: .1rem; }
.ar-sc-sub i { font-size: .66rem; margin-right: .25rem; opacity: .8; }
.ar-sc-pian { display: inline-block; margin-left: .4rem; font-size: .66rem; text-transform: uppercase; letter-spacing: .03em; padding: .1rem .4rem; border-radius: .25rem; background: #dcfce7; color: #15803d; }
.ar-sc-pian-no { background: #fef3c7; color: #b45309; }
.ar-sc-corso .form-group { margin-bottom: .35rem; }
.ar-sc-corso .ar-pgd-sub { margin-top: .9rem; }
.ar-sc-corso .ar-pgd-sub i { margin-right: .4rem; opacity: .7; }
.ar-sc-acts .alert { padding-right: 2.2rem; }
.ar-sc-corso .ar-pgd-sub:first-child { margin-top: 0; }
.ar-sc-acts .row { --bs-gutter-y: .4rem; margin-top: 0 !important; }
.ar-sc-acts .row > [class*="col"] { flex: 0 0 100%; width: 100%; max-width: 100%; }
.ar-sc-acts .btn { width: 100%; }
.ar-sc-acts .form-group { margin: 0; }
.ar-sc-acts .alert { font-size: .8rem; padding: .5rem .75rem; margin: .5rem 0; }
.ar-sc-prev-h { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); margin-top: .75rem; }
.ar-sc-side .ar-pgd-tot { grid-template-columns: repeat(3, 1fr); }
/* calendario istruttori (sc_calendarioistr.asp) */
.ar-ci-cal .ar-cal { padding: .75rem; }
.ar-ci-legend { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-size: .72rem; color: var(--ar-muted); }
.ar-ci-leg i { display: inline-block; width: .8rem; height: .8rem; border-radius: .2rem; margin-right: .3rem; vertical-align: -2px; border: 1px solid rgba(0,0,0,.08); }
.ar-cal .fc-event.ar-ci-ev { border-left: 3px solid rgba(0,0,0,.18); }
.ar-cal .fc-event.ar-ci-ev .fc-title { white-space: normal; line-height: 1.25; }
.ar-cal .fc-event.ar-ci-ev .fc-title { display: block; }
.ar-ci-side .ar-ci-filt { padding: .6rem .75rem; }
.ar-ci-kpi { display: grid; grid-template-columns: repeat(3, 1fr); gap: .4rem; padding: .6rem .75rem; }
.ar-ci-kpi > div { background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .4rem; text-align: center; padding: .4rem .3rem; }
.ar-ci-kpi b { display: block; font-size: 1rem; color: #0f172a; line-height: 1.2; }
.ar-ci-kpi span { font-size: .62rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); }
.ar-ci-cerca { position: relative; padding: 0 .75rem .5rem; }
.ar-ci-cerca i { position: absolute; left: 1.35rem; top: .55rem; font-size: .75rem; color: var(--ar-muted); }
.ar-ci-cerca input { padding-left: 1.8rem; }
.ar-ci-list { max-height: 62vh; overflow-y: auto; border-top: 1px solid var(--ar-card-border); }
.ar-ci-i { padding: .45rem .75rem .5rem; border-bottom: 1px solid #f1f5f9; }
.ar-ci-i:hover { background: #f8fafc; }
.ar-ci-top { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; font-size: .8rem; }
.ar-ci-nome { font-weight: 500; color: #0f172a; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-ci-gg { white-space: nowrap; color: var(--ar-muted); font-size: .74rem; }
.ar-ci-gg b { color: #0f172a; font-size: .86rem; }
.ar-ci-gg small { margin-left: .3rem; font-size: .68rem; }
.ar-ci-bar { height: 5px; border-radius: 3px; background: #eef2f6; margin-top: .3rem; overflow: hidden; }
.ar-ci-bar span { display: block; height: 100%; background: var(--ar-accent); border-radius: 3px; }
.ar-ci-neg .ar-ci-gg b { color: #b91c1c; }
.ar-ci-neg .ar-ci-nome::after { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; color: #b91c1c; font-size: .66rem; margin-left: .35rem; }
.ar-ci-empty { padding: 1rem .75rem; color: var(--ar-muted); font-size: .82rem; }
.ar-ci-busy { opacity: .5; pointer-events: none; }
@media (min-width: 1200px) { .ar-ci-side { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); } }
/* calendario pianificazioni (sc_calendario.asp) */
.ar-cp-hint { font-size: .74rem; color: var(--ar-muted); margin-bottom: .5rem; }
.ar-cp-per { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); padding: .6rem .75rem .35rem; font-weight: 600; }
.ar-cp-list { max-height: 68vh; overflow-y: auto; border-top: 1px solid var(--ar-card-border); }
.ar-cp-i { padding: .45rem .75rem .45rem .65rem; border-left: 4px solid #e2e8f0; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.ar-cp-i:hover { background: #f8fafc; }
.ar-cp-d { font-size: .72rem; font-weight: 600; color: var(--ar-accent); }
.ar-cp-t { font-size: .82rem; color: #0f172a; line-height: 1.25; }
.ar-cp-reg { font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ar-muted); margin-left: .25rem; }
.ar-cp-a { font-size: .74rem; color: #475569; margin-top: .1rem; }
.ar-cp-m { font-size: .7rem; color: var(--ar-muted); margin-top: .15rem; }
.ar-cp-m i { font-size: .64rem; margin-right: .3rem; }
.ar-cal .fc-event.ar-ci-ev.fc-draggable { cursor: grab; }
/* modale pianificazione corso (sc_pianifica.asp) */
.ar-pian .modal-body { padding: 1rem; }
.ar-pian-head { display: flex; align-items: center; gap: .7rem; background: #f8fafc; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem .75rem; margin-bottom: .25rem; }
.ar-pian-head > i { color: var(--ar-accent); font-size: 1.1rem; }
.ar-pian-head b { display: block; font-size: .9rem; line-height: 1.2; }
.ar-pian-head span { font-size: .74rem; color: var(--ar-muted); }
.ar-pian .form-group { margin-bottom: .25rem; }
.ar-pian-cal { background: #fff; border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem; }
.ar-pian-cal .fc-toolbar h2 { font-size: .9rem; line-height: 2rem; }
.ar-pian-cal .fc-event { font-size: .7rem; }
.ar-pian .modal-footer .btn { flex: 1 1 auto; }
@media (min-width: 992px) { .ar-pian-calcol { position: sticky; top: 0; align-self: flex-start; } .ar-pian .modal-footer .btn { flex: 0 0 auto; } }
@media (max-width: 991.98px) { .ar-pian .modal-body { padding: .75rem; } .ar-pian-cal .fc-day-number { font-size: .7rem; } }
/* ---- contabilita' (cn_*) ---- */
.ar-cn-nav { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .75rem; }
.ar-cn-nav-i { display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .7rem; border-radius: 999px; border: 1px solid var(--ar-card-border); background: #fff; color: #334155; font-size: .78rem; text-decoration: none; }
.ar-cn-nav-i:hover { background: var(--ar-accent-light); color: #0f172a; }
.ar-cn-nav-i.active { background: var(--ar-accent); border-color: var(--ar-accent); color: #fff; }
.ar-cn-nav-i i { font-size: .72rem; opacity: .85; }
@media (max-width: 767.98px) { .ar-cn-nav-i span { display: none; } .ar-cn-nav-i { padding: .35rem .55rem; } .ar-cn-nav-i i { font-size: .85rem; } }
.ar-cn .card-header .actions { display: flex; gap: .4rem; align-items: center; }
.ar-cn-cerca { width: 12rem; }
.ar-cn-tbl td { vertical-align: middle; }
.ar-cn-tbl .form-select-sm, .ar-cn-tbl .form-control-sm { font-size: .78rem; padding-top: .15rem; padding-bottom: .15rem; }
.ar-cn-off td { opacity: .55; }
.ar-cn-late td { background: #fff7ed !important; }
.ar-cn-grp td { background: #f1f5f9; font-weight: 600; color: #334155; border-top: 2px solid #cbd5e1; }
.ar-cn-tot td, .ar-cn-tot th { background: #eef2f6; border-top: 2px solid #94a3b8; font-weight: 600; }
.ar-cn-ini td { background: #f8fafc; font-style: italic; }
.ar-cn-new td { background: #f0fdf4; }
.ar-cn-righe { font-size: .74rem; line-height: 1.35; color: #475569; }
.ar-cn-d, .ar-cn-a { display: inline-block; width: 1.1rem; text-align: center; border-radius: .2rem; font-size: .64rem; font-weight: 700; }
.ar-cn-d { background: #dbeafe; color: #1d4ed8; } .ar-cn-a { background: #fee2e2; color: #b91c1c; }
.ar-cn-orig { font-size: .66rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); background: #f1f5f9; border-radius: .2rem; padding: 0 .3rem; }
.ar-cn-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: .6rem; }
.ar-cn-kpi { display: block; background: #fff; border: 1px solid var(--ar-card-border); border-radius: .6rem; padding: .7rem .85rem; text-decoration: none; color: #0f172a; box-shadow: 0 1px 2px rgba(15,23,42,.04); }
.ar-cn-kpi:hover { border-color: var(--ar-accent); color: #0f172a; }
.ar-cn-kpi .k { display: block; font-size: .66rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ar-muted); font-weight: 600; }
.ar-cn-kpi b { display: block; font-size: 1.25rem; line-height: 1.3; margin: .15rem 0; }
.ar-cn-kpi small { color: var(--ar-muted); font-size: .72rem; }
.ar-cn-righe-tbl th { font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; color: var(--ar-muted); font-weight: 600; }
.ar-cn-righe-tbl td { vertical-align: middle; padding: .25rem .3rem; }
.ar-cn-righe-tbl .form-control-sm, .ar-cn-righe-tbl .form-select-sm { font-size: .8rem; }
.ar-cn-rn { font-size: .72rem; }
.ar-cn-quadra { font-size: .8rem; font-weight: 600; }
.ar-cn-quadra.ok { color: #15803d; } .ar-cn-quadra.ko { color: #b91c1c; }
.ar-cn-help { line-height: 1.45; }
.ar-cn-scad-i { border: 1px solid var(--ar-card-border); border-radius: .5rem; padding: .5rem .6rem; margin-bottom: .5rem; font-size: .82rem; background: #f8fafc; }
.ar-cn-pag { font-size: .76rem; color: #334155; margin-top: .25rem; }
.ar-cn-pagfrm { margin-top: .5rem; padding-top: .5rem; border-top: 1px dashed #cbd5e1; }
.ar-cn-mov .ar-pgd-sub { margin-top: .9rem; }
.ar-cn .ar-pgd-sub i, .ar-cn-mov .ar-pgd-sub i { margin-right: .4rem; opacity: .7; }
.ar-cn-ric .ar-cn-node td { font-weight: 600; background: #f8fafc; }
.ar-cn-ric .ar-cn-l0 td { background: #eef2f6; border-top: 2px solid #cbd5e1; }
.ar-cn-ric .ar-cn-leaf td { font-size: .8rem; }
@media (min-width: 1200px) { .ar-cn-side { position: sticky; top: calc(var(--ar-nav-h) + var(--ar-path-h) + .75rem); } }
