﻿/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   GTQ Company Area â€” CSS
   Estende /app/company-admin.css (gia incluso)
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

/* Assicura che l'attributo hidden funzioni anche con display espliciti */
[hidden] { display: none !important; }

/* Tema verde â€” distingue l'area azienda dall'admin */
:root {
  --orange: #16a34a;
  --orange-lt: #f0fdf4;
  --orange-dk: #15803d;
  --orange2: #15803d;
  --orange-glow: rgba(22,163,74,0.12);

  --bg: #eceae4;

  /* Card globali â€” modifica qui per cambiare l'aspetto di tutte le card */
  --card-head-bg: #ffffff;
  --card-title-color: var(--orange);
  --card-title-size: 11px;
  --app-bg-themed: var(--bg);
}

[data-theme="dark"] {
  --app-bg-themed: #111712;
}

[data-theme="light"] {
  --app-bg-themed: #eceae4;
}

[data-theme] body,
[data-theme] #appCard,
[data-theme] #gtqMain,
[data-theme] #mainContent {
  background: var(--app-bg-themed);
}

.co-sa-empty-company {
  padding: 48px 24px;
  text-align: center;
  color: var(--text2);
}

[data-theme="dark"] .co-sa-empty-company {
  color: #c9d7c4;
}

[data-theme="dark"] .co-sa-empty-company strong {
  color: #eef2ec;
}

[data-theme="dark"] #gtqSidebar {
  background: rgba(17,23,18,.92);
  border-right: 1px solid rgba(101,179,58,.15);
}

[data-theme="dark"] #gtqTopbar {
  background: rgba(17,23,18,.92);
  border-bottom-color: rgba(101,179,58,.15);
  box-shadow: none;
}

[data-theme="dark"] #gtqTopbar .topbar-title {
  color: #eef2ec;
}

/* Override colori arancio hardcoded nel CSS admin */
input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 3px rgba(22,163,74,.08) !important;
}
button.primary:focus, button.primary:active {
  box-shadow: 0 4px 12px rgba(22,163,74,.25) !important;
}

/* Override box-shadow arancio hardcoded in admin CSS su tutti i button hover */
button:hover:not(:disabled) {
  box-shadow: 0 4px 12px rgba(22,163,74,.25);
}
button.secondary:hover:not(:disabled),
#gtqSidebar .sb-item:hover:not(:disabled) {
  box-shadow: none;
  transform: none;
}

.sb-item.active {
  background: #16a34a !important;
}

#gtqSidebar .sb-item.co-plan-alert-blink {
  border: 1px solid #f97316 !important;
  color: #f97316 !important;
  background: #fff7ed !important;
  animation: co-plan-alert-pulse 1.1s ease-in-out infinite;
}

#gtqSidebar .sb-item.co-plan-alert-blink.active {
  background: #f97316 !important;
  color: #ffffff !important;
  border-color: #fb923c !important;
}

@keyframes co-plan-alert-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.10); }
  50% { box-shadow: 0 0 0 6px rgba(249, 115, 22, 0.22); }
}
input[type="checkbox"] { accent-color: #16a34a; }
input[type="radio"] { accent-color: #16a34a; }

/* LOGIN â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
#loginOverlay {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

[data-theme="dark"] #loginOverlay {
  --login-bg: #111712;
  --login-bg2: #181f18;
  --login-surface: #1a221a;
  --login-border: rgba(101,179,58,.16);
  --login-border-strong: rgba(101,179,58,.24);
  --login-text: #eef2ec;
  --login-muted: #8fa889;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(101,179,58,.14) 0%, transparent 70%),
    var(--login-bg);
}

[data-theme="light"] #loginOverlay {
  --login-bg: #f2f5f0;
  --login-bg2: #ffffff;
  --login-surface: #ffffff;
  --login-border: rgba(101,179,58,.18);
  --login-border-strong: rgba(101,179,58,.28);
  --login-text: #1e2b1a;
  --login-muted: #5a5a5a;
  background:
    radial-gradient(ellipse 70% 55% at 50% -5%, rgba(101,179,58,.14) 0%, transparent 70%),
    var(--login-bg);
}

[data-theme] .co-login-card {
  background: var(--login-surface);
  border-color: var(--login-border);
}

[data-theme] .co-login-brand {
  border-bottom-color: var(--login-border);
}

[data-theme] .co-login-brand-name {
  color: var(--login-text);
}

[data-theme] .co-login-brand-sub,
[data-theme] .co-login-body label,
[data-theme] .co-login-status {
  color: var(--login-muted);
}

[data-theme] .co-login-body input {
  background: var(--login-bg2);
  border-color: var(--login-border-strong);
  color: var(--login-text);
}

[data-theme] .co-login-body input::placeholder {
  color: var(--login-muted);
}

[data-theme] .co-login-body input:-webkit-autofill,
[data-theme] .co-login-body input:-webkit-autofill:hover,
[data-theme] .co-login-body input:-webkit-autofill:focus,
[data-theme] .co-login-body input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--login-text);
  box-shadow: 0 0 0 1000px var(--login-bg2) inset;
  -webkit-box-shadow: 0 0 0 1000px var(--login-bg2) inset;
  border-color: var(--login-border-strong);
  caret-color: var(--login-text);
  transition: background-color 9999s ease-out 0s;
}

.co-login-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(380px, 94vw);
  overflow: hidden;
}

.co-login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border2);
}

.co-login-brand-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.co-login-brand-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .08em;
  color: var(--text2);
  text-transform: uppercase;
}

.co-login-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.co-login-status {
  min-height: 18px;
  font-size: 12px;
}

/* SIDEBAR override â€” sottolinea brand come "AZIENDA" â”€â”€ */
#gtqSidebar .sb-brand-sub {
  font-size: 9px;
  letter-spacing: .1em;
  color: var(--text2);
}

/* OVERVIEW â€” stat grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.co-overview-alert {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #f97316;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.co-overview-alert--error {
  border-color: #ef4444;
  background: #fef2f2;
  color: #b91c1c;
}

[data-theme="dark"] .co-overview-alert {
  background: rgba(249, 115, 22, 0.12);
  color: #fb923c;
  border-color: rgba(249, 115, 22, 0.4);
}

[data-theme="dark"] .co-overview-alert--error {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
}

#planExpiryOverlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg, #0b0f14);
  display: flex;
  align-items: center;
  justify-content: center;
}

.co-stat-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
}

.co-stat-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text2);
  margin-bottom: 6px;
}

.co-stat-val {
  font-size: 28px;
  font-weight: 700;
  color: var(--orange);
  line-height: 1;
}

.co-stat-sub {
  font-size: 11px;
  color: var(--text2);
  margin-top: 4px;
}

/* PIANO â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-plan-current {
  background: var(--orange-lt, #fff4ed);
  border: 1px solid var(--orange);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}

.co-plan-current-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}

.co-plan-current-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.co-plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
}

.co-plan-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 16px;
}

.co-plan-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.co-plan-card-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--orange);
}

.co-plan-card-desc {
  font-size: 12px;
  color: var(--text2);
  margin-top: 8px;
}

/* OPERATORI â€” sezione ancorata, scroll solo nella lista */
/* Blocca scrollbar esterna quando la sezione Ã¨ visibile */
#gtqMain:has(#operatoriSection:not(.hidden)) {
  overflow: hidden;
}

/* PIANO - card sottoscrizioni estesa, scroll solo nella tabella */
#gtqMain:has(#pianoSection:not(.hidden)) {
  overflow: hidden;
}

#pianoSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#pianoContent {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

#coSubscriptionsCard {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#coSubscriptionsCard .co-card-section-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#operatoriSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

/* #operatoriContent Ã¨ il div diretto â†’ va nella catena flex */
#operatoriSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#operatoriSection .co-card-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#operatoriSection .co-card-section-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0;
}

/* CONDIVISIONE â€” due card affiancate, scroll interno per lista */
#gtqMain:has(#condivisioneSection:not(.hidden)) {
  overflow: hidden;
}

#condivisioneSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#condivisioneSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#condivisioneRoot {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.co-cond-lists {
  flex: 1;
  display: flex;
  gap: 16px;
  min-height: 0;
}

.co-cond-lists .co-card-section {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.co-cond-lists .co-card-section-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0;
}

.co-cond-lists .co-operator-row {
  padding-left: 14px;
  padding-right: 14px;
}

/* DOWNLOAD â€” sezione ancorata, scroll solo nella lista */
#gtqMain:has(#downloadSection:not(.hidden)) {
  overflow: hidden;
}

#downloadSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#downloadSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#downloadSection .co-card-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#downloadSection .co-card-section-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-top: 0;
}

/* TAG â€” sezione ancorata, scroll solo nella lista */
#gtqMain:has(#tagSection:not(.hidden)) {
  overflow: hidden;
}

#tagSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#tagSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#tagSection .co-card-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#tagSection .co-card-section-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0;
}

/* SA OVERVIEW â€” sezione ancorata, scroll solo nella lista aziende */
#gtqMain:has(#saOverviewSection:not(.hidden)) {
  overflow: hidden;
}

#saOverviewSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#saOverviewSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#saOverviewSection .co-card-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

#saOverviewSection .co-card-section-body {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 0;
}

/* SA PIANI â€” home card fissa in alto, piani card occupa spazio rimanente */
#gtqMain:has(#saPianiSection:not(.hidden)) { overflow: hidden; }
#saPianiSection { height: calc(100vh - var(--topbar-h) - 28px); display:flex; flex-direction:column; overflow:hidden; }
#saPianiContent { flex:1; display:flex; flex-direction:column; gap:12px; min-height:0; overflow:hidden; }
#saPianiManageCard { flex:1; display:flex; flex-direction:column; min-height:0; margin-bottom:0; }
#saPianiManageCard .co-card-section-body { flex:1; overflow-y:auto; min-height:0; padding:0; }
#saPianiHomeCard { flex:0 0 auto; display:flex; flex-direction:column; margin-bottom:0; }
#saPianiHomeCard .co-card-section-body { overflow-x:auto; overflow-y:hidden; }
#saPianiStatus { flex-shrink:0; }

/* SA AZIENDE â€” card unica full-height con scroll interno */
#gtqMain:has(#saAziendeSection:not(.hidden)) { overflow: hidden; }
#saAziendeSection { height: calc(100vh - var(--topbar-h) - 28px); display:flex; flex-direction:column; overflow:hidden; }
#saAziendeContent { flex:1; display:flex; flex-direction:column; min-height:0; overflow:hidden; }
#saAziendeCard { flex:1; display:flex; flex-direction:column; min-height:0; margin-bottom:0; }
#saAziendeCard .co-card-section-body { flex:1; display:flex; flex-direction:column; min-height:0; padding:0; }

/* FOTO â€” sezione ancorata, scroll solo nella griglia foto */
#gtqMain:has(#fotoSection:not(.hidden)) { overflow: hidden; }

#fotoSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#fotoSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.co-foto-grid-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 14px;
  overflow: hidden;
}

.co-foto-grid-scroll {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-top: 4px;
}

.co-map-toggle {
  display: flex;
  gap: 3px;
}
.co-map-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 12px;
  font-family: inherit;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
  line-height: 1;
}
.co-map-toggle-btn.active {
  background: var(--orange);
  color: #fff;
  border-color: var(--orange);
}
.co-map-toggle-btn:hover:not(.active) {
  background: var(--surface2, rgba(0,0,0,.05));
}
[data-theme="dark"] .co-map-toggle-btn:hover:not(.active) {
  background: rgba(255,255,255,.07);
}
#coFotoMap {
  flex: 1;
  min-height: 420px;
  position: relative;
  z-index: 0;
}
/* zoom controls più piccoli */
#coFotoMap .leaflet-control-zoom a {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  font-size: 14px !important;
}
/* toggle mappa/satellite — eredita stile leaflet-bar a, override solo dimensioni e stato attivo */
#coFotoMap .co-map-layer-toggle {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#coFotoMap .co-map-layer-toggle svg { width: 13px; height: 13px; display: block; }
#coFotoMap .co-map-layer-toggle.active { background: var(--orange) !important; color: #fff !important; }
[data-theme="dark"] #coFotoMap .co-map-layer-toggle.active { background: var(--orange) !important; color: #fff !important; }

/* DEALMAP — Mappa: stessa struttura full-height/leaflet di Foto */
#gtqMain:has(#dealmapMappaSection:not(.hidden), #dealmapImpostazioniSection:not(.hidden)) { overflow: hidden; }

#dealmapMappaSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}

#dealmapMappaSection > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* DEALMAP — Impostazioni: stesso vincolo di altezza della Mappa (nessuno
   scroll di PAGINA), ma qui il contenuto (3 card impilate) puo' essere piu'
   alto del viewport -- scroll interno sul contenitore invece di far
   crescere la pagina, come tutte le altre liste lunghe dell'app. */
#dealmapImpostazioniSection {
  height: calc(100vh - var(--topbar-h) - 28px);
  display: flex;
  flex-direction: column;
}
#dealmapImpostazioniSection > div {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#coDealmapMap {
  flex: 1;
  min-height: 420px;
  position: relative;
  z-index: 0;
}
#coDealmapMap .leaflet-control-zoom a {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  font-size: 14px !important;
}
#coDealmapMap .co-map-layer-toggle {
  width: 24px !important;
  height: 24px !important;
  line-height: 24px !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 0;
}
#coDealmapMap .co-map-layer-toggle svg { width: 13px; height: 13px; display: block; }
#coDealmapMap .co-map-layer-toggle.active { background: var(--orange) !important; color: #fff !important; }
[data-theme="dark"] #coDealmapMap .co-map-layer-toggle.active { background: var(--orange) !important; color: #fff !important; }

.dealmap-tree-header {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 2px;
  font-size: 11px;
  border-bottom: 1px solid var(--border2);
}
.dealmap-tree-header:hover, .dealmap-tree-item:hover { background: var(--bg); border-radius: 4px; }
.dealmap-tree-item[data-node-id] { color: var(--text); }
.dealmap-caret { display: inline-block; width: 16px; font-size: 18px; line-height: 1; }

/* Intestazione di gruppo "PROVINCIA · Regione" -- pura cornice (non un nodo
   dell'albero): stile da divisore, non da riga pari grado delle categorie.
   Il contenitore figli NON indenta: la gerarchia si legge dallo stile, non dal
   rientro, cosi' questo livello non ruba spazio orizzontale ai nomi profondi. */
.dealmap-tree-provgroup { margin-bottom: 2px; }
.dealmap-provgroup-header {
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 9.5px;
  font-weight: 700;
  color: var(--text2);
  background: var(--bg);
  border-top: 1px solid var(--border2);
  border-bottom: 1px solid var(--border2);
  padding: 3px 2px;
}
.dealmap-provgroup-header .dealmap-caret { font-size: 14px; }
.dealmap-provgroup-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* padding-right: il conteggio e' l'ultimo figlio e sarebbe a filo del bordo
   (con la scrollbar della bandella subito accanto). */
.dealmap-provgroup-count { flex: 0 0 auto; font-weight: 400; text-transform: none; letter-spacing: 0; opacity: .75; padding-right: 8px; }

/* Categorie disattivate dal filtro occhio: grigie invece di nascoste, cosi'
   restano visibili in elenco ma segnalate come escluse dalla vista mappa. */
#coDealmapTreeContainer.cap-hidden .dealmap-cat-cap,
#coDealmapTreeContainer.asc-hidden .dealmap-cat-asc,
#coDealmapTreeContainer.tipo1-hidden .dealmap-cat-tipo1,
#coDealmapTreeContainer.tipo2-hidden .dealmap-cat-tipo2,
#coDealmapTreeContainer.tipo3-hidden .dealmap-cat-tipo3,
#coDealmapTreeContainer.tipo4-hidden .dealmap-cat-tipo4,
#coDealmapTreeContainer.settori-hidden .dealmap-tree-item[data-node-id] {
  opacity: .4;
}

/* Filtro occhio individuale di riga (piu' granulare del filtro di categoria
   sopra): 2 colonne ancorate a destra, visibili solo al hover della riga --
   mirino (centra sulla mappa) e occhio (mostra/nascondi). Nodo nascosto
   individualmente resta grigio anche senza hover. */
.dealmap-row-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  margin-left: auto;
  opacity: 0;
  transition: opacity .12s;
}
.dealmap-tree-header:hover .dealmap-row-actions { opacity: 1; }
.dealmap-row-action {
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dealmap-row-action:hover { color: var(--orange); }
.dealmap-row-action svg { width: 13px; height: 13px; display: block; }
.dealmap-row-is-hidden { opacity: .4; }

/* Drag&drop: riga target valida evidenziata durante il dragover. */
/* !important: le righe categoria/comune hanno un background-color/color INLINE
   (colorazione palette da _applyTreeHighlight) che altrimenti vince sulla
   classe -> il target ISTAT non si evidenziava, le cartelle sì (nessun inline).
   Alla rimozione della classe l'inline torna, quindi nessun effetto residuo. */
.dealmap-tree-header.dealmap-drop-target {
  background: var(--orange) !important;
  color: #fff !important;
  border-radius: 4px;
  outline: 1px dashed #fff;
  outline-offset: -3px;
}
/* (2026-07-24) .dealmap-drop-before/.dealmap-drop-after rimosse: il riordino
   e' ora LIVE (i wrapper si spostano nel DOM durante il dragover, pattern
   palette) -- nessuna linea di inserimento necessaria. */

/* Tabelle editabili (Tecnologia/Copertura) in Dealmap Impostazioni --
   griglia CSS con subgrid implicito via grid-template-columns sul contenitore
   in JS, qui solo lo stile delle celle. */
.dealmap-imp-head {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--text2);
  padding: 6px 4px;
  border-bottom: 2px solid var(--border);
  background: var(--bg);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dealmap-imp-cell {
  padding: 4px 4px;
  border-bottom: 1px solid var(--border2);
  display: flex;
  align-items: center;
  min-height: 28px;
  min-width: 0;
  overflow: hidden;
}
.dealmap-imp-cell input {
  font-size: 12px;
  padding: 2px 0;
  min-width: 0;
  box-sizing: border-box;
}
.dealmap-imp-cell input[type="text"] {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}
.dealmap-imp-cell input:focus { outline: 1px solid var(--orange); border-radius: 2px; }

/* Toggle "Modifica" nell'header bandella -- abilitato solo con una selezione
   attiva; stato attivo (barra aperta) evidenziato in arancio come gli altri
   toggle dell'app (es. .co-map-layer-toggle.active). */
.dealmap-edit-toggle:disabled { opacity: .4; cursor: not-allowed; }
.dealmap-edit-toggle.active { background: var(--orange) !important; color: #fff !important; border-color: var(--orange) !important; }

/* Finestra "Modifica" -- NON si estende per tutta la larghezza della mappa:
   e' una finestra a se', larghezza propria basata sulla quantita' di bottoni
   (9 x 64px + gap + padding), centrata in alto e ancorata al bordo superiore
   (top:0) per l'animazione a tenda. #coDealmapMapWrap ha overflow:hidden:
   quando e' translate(-50%,-100%) la finestra resta clippata sopra il bordo,
   effetto tenda che si apre verso il basso restando centrata orizzontalmente. */
.dealmap-editbar {
  position: absolute;
  top: 0;
  left: 50%;
  width: max-content; /* si adatta al contenuto (riga bottoni/breadcrumb),
                          non piu' larghezza fissa */
  max-width: calc(100% - 24px); /* non sborda mai fuori dalla mappa */
  /* niente height fissa: breadcrumb (32) + azioni (64) = 96px a form chiuso,
     piu' alta quando la sub-window "Crea Folder" e' aperta */
  z-index: 20;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  transform: translate(-50%, -100%);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  pointer-events: none;
  box-sizing: border-box;
}
.dealmap-editbar.is-open { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.dealmap-editbar-breadcrumb {
  height: 32px;
  box-sizing: border-box;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Riga bottoni a dimensione fissa, centrata nella larghezza propria della
   finestra (non piu' distribuita su tutta la mappa) -- con le icone vincolate
   a 16x16 (vedi sotto) i 9 bottoni ci stanno comodamente nei 660px. */
.dealmap-editbar-actions {
  height: 64px;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 4px 8px;
}
.dealmap-editbar-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  width: auto; /* larghezza = label + padding uniforme (non piu' fissa a 64px:
                  ogni bottone ha la stessa "aria" ai lati del proprio testo) */
  height: 56px;
  box-sizing: border-box;
  padding: 6px 6px;
  border: none;
  background: none;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text2);
  font-size: 10px;
  white-space: nowrap;
}
.dealmap-editbar-btn:hover { background: var(--orange); color: #fff; }
/* !important: queste icone sono SVG grezzi senza dimensioni proprie affidabili
   in ogni contesto (alcune condivise con altri moduli, es. ICON_PENCIL/
   ICON_TRASH) -- qui vogliamo la certezza assoluta che restino 16x16 dentro
   la barra Modifica, indipendentemente da qualunque altra regola. */
.dealmap-editbar-btn svg { width: 16px !important; height: 16px !important; flex-shrink: 0; display: block; }
.dealmap-editbar-btn:disabled { opacity: .35; cursor: not-allowed; }
.dealmap-editbar-btn:disabled:hover { background: none; color: var(--text2); }

/* Sub-window "Crea Folder" sotto la riga bottoni -- slide verticale
   (max-height) dentro la barra Modifica: campo nome + Annulla/Salva. */
.dealmap-subform {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  border-top: 0 solid var(--border2);
  transition: max-height .2s ease, opacity .2s ease, padding .2s ease;
}
.dealmap-subform.is-open {
  max-height: 56px;
  opacity: 1;
  padding: 8px 10px;
  border-top: 1px solid var(--border2);
}
.dealmap-subform input {
  flex: 1;
  min-width: 160px;
  padding: 6px 9px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  box-sizing: border-box;
}

/* Bordo arancio + sfumatura verso l'interno quando la modalita' Modifica e'
   attiva. NON puo' stare sul contenitore #coDealmapMapWrap: il div mappa
   (#coDealmapMap, inset:0) e le sue tile Leaflet lo coprono interamente, e un
   box-shadow inset comunque non si dipinge MAI sopra i figli -- l'ombra
   restava invisibile sotto la mappa. Serve un overlay DEDICATO sopra la mappa
   (z-index alto, pointer-events:none per non bloccare drag/click sulla mappa
   sottostante), che disegna bordo+glow con le proprie inset box-shadow. */
.dealmap-edit-glow {
  position: absolute;
  inset: 0;
  z-index: 25; /* sopra .dealmap-editbar (z-index:20): la linea di contorno
                  della mappa passa DAVANTI al box Modifica ancorato in alto */
  pointer-events: none;
  opacity: 0;
  transition: opacity .22s ease;
  border-radius: 8px;
}
/* Ombra verde (matcha la linea = var(--orange), che nonostante il nome e'
   #16a34a verde): rgba(22,163,74,...) e' lo stesso verde in forma trasparente. */
#coDealmapMapWrap.dealmap-edit-active .dealmap-edit-glow {
  opacity: 1;
  box-shadow: inset 0 0 0 2px var(--orange), inset 0 0 28px rgba(22,163,74,.45);
}

/* Bottone "+" nei risultati di ricerca mappa -- aggiunge il risultato alla
   selezione corrente invece di sostituirla. */
.co-dealmap-add-btn {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border2);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 0;
}
.co-dealmap-add-btn:hover { background: var(--bg); border-color: var(--text2); color: var(--text); }

/* Map popup tile */
.gtq-map-popup-wrap .leaflet-popup-content-wrapper { padding: 0; overflow: hidden; border-radius: 10px; }
.gtq-map-popup-wrap .leaflet-popup-content { margin: 0; }
.gtq-map-popup-wrap .leaflet-popup-close-button { position: absolute; top: 4px; right: 4px; z-index: 10; width: 20px; height: 20px; background: rgba(15,23,42,.7); color: #fff !important; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 14px; line-height: 1; padding: 0; }
.gtq-map-tile { position: relative; width: 180px; aspect-ratio: 3/4; overflow: hidden; container-type: inline-size; }
.gtq-map-tile-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gtq-map-tile-top { position: absolute; top: 0; left: 0; right: 0; z-index: 2; padding: 5px 8px; background: rgba(15,23,42,.5); color: #f8fafc; font-weight: 800; font-size: 11px; letter-spacing: .5px; text-transform: uppercase; text-shadow: 0 1px 4px rgba(0,0,0,.7); }
.gtq-map-tile-btm { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; padding: 6px 8px 7px; background: rgba(15,23,42,.5); display: grid; gap: 2px; }
.gtq-map-tile-dt { font-size: 10px; font-weight: 700; color: #fff; line-height: 1.3; }
.gtq-map-tile-loc { font-size: 10px; color: #cbd5e1; line-height: 1.3; }

/* TAG — flat grid unico: header sticky + righe dati allineate */
.co-tag-list-grid {
  display: grid;
  grid-template-columns: repeat(7, auto) 1fr;
  column-gap: 8px;
  padding: 0 14px;
  align-content: start;
}

.co-tag-row > .co-tag-grid-cell:last-child { justify-content: flex-end; }
.co-tag-header-wrap > .co-tag-grid-head:nth-last-child(2) { text-align: right; }
.co-tag-edit-btn svg { width: 13px; height: 13px; }

.co-tag-header-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.co-tag-grid-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  padding: 5px 6px;
}

.co-tag-header-sep {
  grid-column: 1 / -1;
  border-bottom: 2px solid var(--border2);
}

.co-tag-grid-cell {
  display: flex;
  align-items: center;
  padding: 5px 6px;
  min-width: 0;
}

/* OPERATORI â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-operator-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
}

.co-operator-row:last-child { border-bottom: none; }

.co-operator-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--orange-lt, #fff4ed);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.co-operator-info { flex: 1; min-width: 0; }

.co-operator-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-operator-meta {
  font-size: 11px;
  color: var(--text2);
  margin-top: 2px;
}

.co-operator-key {
  font-family: monospace;
  font-size: 11px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--text2);
}

.co-connected-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  flex-shrink: 0;
}

.co-connected-dot.off { background: var(--border2); }

/* OPERATORI grid â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-op-list-grid {
  display: grid;
  grid-template-columns: repeat(9, auto) 1fr;
  column-gap: 8px;
  padding: 0 14px;
  align-content: start;
}

.co-op-header-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}

.co-op-grid-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  padding: 5px 0;
}

.co-op-header-sep {
  grid-column: 1 / -1;
  border-bottom: 2px solid var(--border2);
}

.co-op-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  border-bottom: 1px solid var(--border2);
}

.co-op-row:last-child { border-bottom: none; }
.co-op-row:hover { background: var(--orange-lt, #fff4ed); }

.co-op-cell {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6px 0;
  min-width: 0;
  font-size: 12px;
  color: var(--text2);
}

/* TAG â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-tag-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  border-bottom: 1px solid var(--border2);
}

.co-tag-row:last-child { border-bottom: none; }
.co-tag-row:hover { background: var(--orange-lt, #fff4ed); }

.co-tag-badge {
  font-size: 11px;
  font-weight: 600;
  background: var(--orange-lt, #fff4ed);
  color: var(--orange);
  border-radius: 4px;
  padding: 2px 8px;
  font-family: monospace;
  letter-spacing: .04em;
}

/* CONDIVISIONE â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-pin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border2);
}

.co-pin-row:last-child { border-bottom: none; }

.co-pin-code {
  font-family: monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--orange);
  background: var(--orange-lt, #fff4ed);
  border-radius: 6px;
  padding: 4px 10px;
  flex-shrink: 0;
}

/* FOTO â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */

/* Filter cards row */
.co-filter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 20;
}

.co-filter-grid .co-card-section {
  position: relative;
  overflow: visible;
}

.co-filter-grid .co-card-section:nth-child(2) {
  flex: none;
  width: 349px;
}

.co-filter-grid .co-card-section-body {
  overflow: visible;
}


.co-filter-col-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .07em;
  color: var(--text2);
  text-transform: uppercase;
  margin-bottom: 5px;
}


.co-filter-check {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  margin-bottom: 3px;
  white-space: nowrap;
}

.co-grid-cols-ctrl { display: flex; align-items: center; gap: 6px; }

.co-cols-step {
  width: auto !important; height: auto;
  display: flex; align-items: center; justify-content: center;
  border: none;
  border-radius: 0;
  background: none;
  color: var(--orange);
  font-size: 15px; line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  transition: color .12s;
}
.co-cols-step:hover:not(:disabled) {
  background: none !important;
  color: var(--orange) !important;
  border-color: transparent !important;
  transform: none !important;
  box-shadow: none !important;
}

.co-cols-value { font-size: 13px; font-weight: 700; min-width: 22px; text-align: center; }


/* Filter dropdown */
.co-filter-reset-btn {
  width: auto !important;
  font-size: 11px;
  padding: 0 8px;
  border: 1px solid var(--border2);
  border-radius: 100px;
  background: var(--surface);
  color: var(--text2);
  cursor: pointer;
  margin: 0;
  display: inline-block;
  line-height: 1.4;
  flex-shrink: 0;
}
.co-filter-reset-btn:hover:not(:disabled) {
  background: var(--surface) !important;
  border-color: var(--orange) !important;
  color: var(--orange) !important;
  transform: none !important;
  box-shadow: none !important;
}

.co-filter-dropdown-wrap {
  position: relative;
  width: 110px;
}

.co-filter-dropdown-wrap.is-open {
  z-index: 30;
}

.co-filter-dropdown-trigger {
  width: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 3px 8px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm, 6px);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 12px;
}
.co-filter-dropdown-trigger:hover:not(:disabled) {
  border-color: var(--orange) !important;
  background: var(--orange-lt) !important;
  color: var(--orange) !important;
  transform: none !important;
  box-shadow: none !important;
}
.co-filter-dropdown-trigger.has-selection {
  border-color: var(--orange);
  background: var(--orange-lt);
  color: var(--orange);
}

.co-filter-dropdown-panel {
  display: none;
  position: absolute;
  top: calc(100% + 3px);
  left: 0;
  z-index: 31;
  min-width: max(150px, 100%);
  width: max-content;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  box-shadow: 0 4px 14px rgba(0,0,0,.13);
  max-height: 220px;
  overflow-y: auto;
}
.co-filter-dropdown-panel.open { display: block; }

.co-filter-checklist-item {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text);
  border-bottom: 1px solid var(--border2);
  cursor: pointer;
}
.co-filter-checklist-item:last-child { border-bottom: none; }
.co-filter-checklist-item.is-checked { background: var(--orange-lt); color: var(--orange); }


.co-export-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
}
.co-export-cols > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 0 10px;
}
.co-export-cols > div:first-child { padding-left: 0; }
.co-export-cols > div + div { border-left: 1px solid var(--border2); }


/* Photo grid */
.co-photo-grid { display: grid; gap: 8px; margin-top: 10px; }

.co-photo-tile {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--border2);
  cursor: pointer;
  aspect-ratio: 1;
  transition: outline .1s;
  container-type: inline-size;
}
.co-photo-tile.selected { outline: 2px solid var(--orange); outline-offset: -2px; }

.co-photo-tile img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .15s;
}
.co-photo-tile:hover img { transform: scale(1.03); }

.co-photo-tile-meta {
  padding: 6px 6px 4px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.co-photo-tile-date {
  font-size: 10px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.co-photo-tile-comune {
  font-size: 10px; color: var(--text2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Skeleton shimmer while tile image loads */
.co-tile-loading {
  background: var(--border2);
  overflow: hidden;
}
.co-tile-loading::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,.07) 50%,
    transparent 100%
  );
  background-size: 200% 100%;
  animation: co-tile-shimmer .9s infinite linear;
}
@keyframes co-tile-shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* IMPOSTAZIONI â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-settings-section {
  margin-bottom: 20px;
}

.co-settings-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--orange);
  margin-bottom: 10px;
}

.co-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px;
}

.co-check-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  padding: 4px 0;
}

.co-check-item input[type="checkbox"] {
  accent-color: var(--orange);
  width: 14px;
  height: 14px;
  cursor: pointer;
  flex-shrink: 0;
}

/* FORM helpers â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-card-section {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.co-card-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--card-head-bg);
  border-bottom: 1px solid var(--border2);
  border-radius: var(--radius) var(--radius) 0 0;
}

.co-card-section-title {
  font-size: var(--card-title-size);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--card-title-color);
}

.co-card-section-body {
  padding: 8px;
}

/* Export rows (sezione Download) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-export-table {
  display: grid;
  grid-template-columns: 36px max-content 70px 140px 140px minmax(16px,1fr) max-content;
  gap: 0;
}

.co-export-head,
.co-export-row {
  display: contents;
}

.co-export-head {
  padding: 5px 0 5px 0;
}
.co-export-head > span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  min-height: 26px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
  box-shadow: 0 2px 4px var(--surface);
}
.co-export-head > span:not(:first-child) { padding-left: 16px; }
.co-export-head > span:last-child { justify-content: flex-end; }

.co-export-cell {
  min-height: 48px;
  border-bottom: 1px solid var(--border2);
  background: var(--surface);
  display: flex;
  align-items: center;
}

.co-export-row:last-child > .co-export-cell { border-bottom: none; }
.co-export-cell:not(.co-export-cell-icon) { padding-left: 16px; }

.co-export-cell-icon {
  justify-content: center;
}

.co-export-icon {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  background: transparent;
  border: 1px solid rgba(17,24,39,.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(17,24,39,.62);
}

.co-export-icon svg {
  width: 17px !important;
  height: 17px !important;
  stroke-width: 1.25;
}

.co-export-info {
  min-width: 0;
  padding-right: 16px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.co-export-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.co-export-meta {
  font-size: 11px;
  color: var(--text2);
  margin-top: 1px;
}
.co-export-col-date {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.co-export-col-size {
  font-size: 11px;
  color: var(--text2);
  white-space: nowrap;
  text-align: left;
  justify-content: flex-start;
}
.co-export-col-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  justify-content: flex-end;
}

.co-export-col-actions .dl-btn-delete svg {
  width: 15px !important;
  height: 15px !important;
  stroke-width: 2;
}

.co-export-progress {
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin-top: 5px;
  overflow: hidden;
}

.co-export-progress-bar {
  height: 4px;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.4s;
}

.co-export-status-pending  { color: var(--text2); font-size: 11px; }
.co-export-status-process  { color: var(--orange); font-size: 11px; }
.co-export-status-ready    { color: #16a34a;       font-size: 11px; }
.co-export-status-error    { color: #dc2626;       font-size: 11px; }

/* Utility â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-empty {
  text-align: center;
  color: var(--text2);
  font-size: 13px;
  padding: 32px 0;
}

.co-load-more {
  text-align: center;
  padding: 12px 0;
}

.co-photo-chip {
  font-size: 9px;
  font-weight: 600;
  background: rgba(0,0,0,.55);
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Form inline label+input â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-form-inline {
  display: flex;
  align-items: stretch;
  margin-bottom: 8px;
  gap: 0;
}

.co-form-lbl {
  flex-shrink: 0;
  width: 10em;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px 0 14px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--orange);
  background: transparent;
  border: 1px solid var(--border2);
  border-right: none;
  border-radius: var(--radius-sm, 6px) 0 0 var(--radius-sm, 6px);
  white-space: nowrap;
}

.co-form-inline input[type="text"],
.co-form-inline input[type="tel"],
.co-form-inline input[type="email"],
.co-form-inline input[type="password"] {
  flex: 1;
  border-radius: 0 var(--radius-sm, 6px) var(--radius-sm, 6px) 0 !important;
  margin: 0 !important;
}

/* Bottoni icona outline â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-icon-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px !important;
  width: auto !important;
  min-width: 0 !important;
  color: var(--orange) !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--radius-sm, 4px) !important;
}
.co-icon-btn svg { width: 18px; height: 18px; display: block; }
.co-icon-btn:hover:not(:disabled) {
  background: var(--orange-lt) !important;
  box-shadow: none !important;
  transform: none !important;
}
.co-icon-btn.danger {
  color: var(--red, #ef4444) !important;
}
.co-icon-btn.danger:hover:not(:disabled) {
  background: #fef2f2 !important;
}

/* Lista utenti card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-ut-list {
  display: grid;
  grid-template-columns: 28px 44px minmax(220px, 1fr) minmax(150px, 220px) auto 28px;
  column-gap: 8px;
  padding: 0 14px;
  align-content: start;
}
.co-ut-header-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface);
}
.co-ut-grid-head {
  font-size: 11px;
  font-weight: 600;
  color: var(--text2);
  padding: 5px 0;
}
.co-ut-header-sep {
  grid-column: 1 / -1;
  border-bottom: 2px solid var(--border2);
}
.co-ut-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: subgrid;
  align-items: center;
  border-bottom: 1px solid var(--border2);
}
.co-ut-row:last-child { border-bottom: none; }
.co-ut-row:hover { background: var(--orange-lt, #fff4ed); }
.co-ut-row-inactive { opacity: .5; }
.co-ut-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border2);
}
.co-ut-dot-on { background: #22c55e; }
.co-ut-cell {
  display: flex;
  align-items: center;
  padding: 6px 0;
  min-width: 0;
}
.co-ut-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.co-ut-email { font-size: 11px; font-weight: 400; color: var(--text2); }
.co-ut-phone { font-size: 12px; font-weight: 500; color: var(--text2); white-space: nowrap; }
.co-ut-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 100px;
  background: var(--border2);
  color: var(--text2);
}
.co-ut-badge-admin { background: #fef3c7; color: #92400e; }
.co-ut-badge-manager { background: #dbeafe; color: #1e40af; }
.co-ut-badge-viewer { background: #f0fdf4; color: #166534; }

.admin-photo-delete-btn:hover { background: rgba(220,38,38,.85) !important; color: #fff !important; border-color: transparent !important; transform: none !important; box-shadow: none !important; }

button.ghost { opacity: .35 !important; pointer-events: none !important; }

#fotoSection .admin-photo-tile.selected { border-color: #16a34a; }
#fotoSection .admin-photo-tile.co-tile-excluded { border-color: #ef4444 !important; opacity: .55; }

/* Omit button â€” center of tile */
.co-omit-btn {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 36px; height: 36px;
  background: rgba(0,0,0,.45); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; opacity: 0;
  transition: opacity .15s, background .15s;
  z-index: 3;
}
.co-omit-btn svg { width: 20px; height: 20px; }
.admin-photo-tile:hover .co-omit-btn { opacity: 1; }
.co-omit-btn.active { opacity: 1 !important; background: #ef4444; }

/* Count split: active + omitted */
.co-excl-count { color: #ef4444; margin-left: 3px; }
.co-date-header .co-excl-count,
.co-tag-header  .co-excl-count { color: rgba(255,255,255,.85); }

#fotoSection .admin-photo-tile { border: 2px solid #9ca3af; }
#fotoSection .admin-photo-tile:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,.22); }
#fotoSection .admin-photo-frame { aspect-ratio: 3 / 4; }
#fotoSection .admin-photo-frame img { object-fit: cover; object-position: center; background: transparent; }
#fotoSection .admin-photo-delete-btn { top: -2px !important; right: -2px !important; width: 24px !important; height: 24px !important; border-radius: 0 0 0 5px !important; }
#fotoSection .admin-photo-overlay-left .admin-photo-chip {
  font-size: 10px;
  padding: 1px 6px;
  background: rgba(248, 250, 252, .82);
  border-color: rgba(148, 163, 184, .55);
}
#fotoSection .admin-photo-overlay-left .admin-photo-chip.admin-photo-chip-danger {
  background: rgba(254, 226, 226, .82);
  border-color: rgba(252, 165, 165, .75);
}
#fotoSection .admin-photo-overlay-right { bottom: 6px; }
#fotoSection .admin-photo-tile.co-has-bottom-overlay .admin-photo-overlay-right { bottom: 24px; }
#fotoSection .admin-photo-tile.co-has-bottom-overlay.co-has-stamp-overlay-line.co-has-comune-overlay-line .admin-photo-overlay-right { bottom: 44px; }
#coPhotoGrid.co-hide-comune .admin-photo-tile.co-has-bottom-overlay .admin-photo-overlay-right { bottom: 24px; }
#coPhotoGrid.co-hide-date.co-hide-time .admin-photo-tile.co-has-bottom-overlay .admin-photo-overlay-right { bottom: 24px; }
#coPhotoGrid.co-hide-date.co-hide-time.co-hide-comune .admin-photo-tile.co-has-bottom-overlay .admin-photo-overlay-right { bottom: 6px; }
#fotoSection .admin-photo-overlay-bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 5px 6px 4px;
  display: grid;
  gap: 2px;
  background: rgba(15,23,42,.5);
}
#fotoSection .admin-photo-overlay-bottom .admin-photo-stamp {
  font-size: 10px;
  font-weight: 700;
  color: #f8fafc;
  text-shadow: 0 1px 1px rgba(2,6,23,.45);
}
#fotoSection .admin-photo-overlay-bottom .admin-photo-line {
  display: flex;
  align-items: center;
  gap: 4px;
}
#fotoSection .admin-photo-overlay-bottom .admin-photo-comune {
  font-size: 11px;
  color: #e2e8f0;
  text-shadow: 0 1px 1px rgba(2,6,23,.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}


/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   VIEW CHECKBOX CSS TOGGLES
   Avoiding full renderPhotoGrid() on checkbox change
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.co-tile-data-card {
  position: absolute;
  bottom: clamp(4px, 2cqw, 10px);
  left: clamp(4px, 2cqw, 10px);
  z-index: 2;
  padding: clamp(4px, 1.8cqw, 8px) clamp(5px, 2cqw, 10px) clamp(3px, 1.5cqw, 7px);
  background: rgba(15,23,42,.55);
  border: 1px solid rgba(109,220,58,.45);
  border-radius: clamp(5px, 2cqw, 10px);
  display: grid;
  gap: clamp(1px, 0.6cqw, 3px);
  min-width: 50%;
  max-width: calc(100% - clamp(8px, 4cqw, 20px));
  pointer-events: none;
}
.co-tdc-row { display: flex; align-items: flex-start; gap: clamp(2px, 1.2cqw, 5px); min-width: 0; }
.co-tdc-icon { flex-shrink: 0; width: clamp(7px, 2.8cqw, 11px); height: clamp(7px, 2.8cqw, 11px); margin-top: 1px; opacity: .85; display: flex; align-items: center; justify-content: center; }
.co-tdc-icon svg { width: clamp(7px, 2.8cqw, 11px); height: clamp(7px, 2.8cqw, 11px); display: block; }
.co-tdc-text { display: flex; flex-direction: column; min-width: 0; }
.co-tdc-label { font-size: clamp(4px, 1.8cqw, 6px); font-weight: 700; letter-spacing: .06em; color: #6ddc3a; text-transform: uppercase; line-height: 1.2; }
.co-tdc-val { font-size: clamp(6px, 2.5cqw, 9px); font-weight: 600; color: #fff; line-height: 1.3; white-space: pre-line; text-shadow: 0 1px 3px rgba(0,0,0,.5); }
#coPhotoGrid.co-grid-hide-data .co-tile-data-card { display: none; }
#coPhotoGrid.co-hide-elimina  .admin-photo-delete-btn    { display: none; }
#coPhotoGrid.co-hide-ometti   .co-omit-btn               { display: none !important; }
#coPhotoGrid.co-view-updating { opacity: .92; transition: opacity .12s ease; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   PHOTO GROUPS (Data â†’ Tag)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.co-photo-groups { display: flex; flex-direction: column; }

/* â”€â”€ Date group â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-date-group { margin-bottom: 4px; }

.co-date-header {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 6px;
  background: #374151; color: #f9fafb;
  border: none; text-align: left; cursor: pointer; user-select: none;
  min-height: 26px;
  position: sticky;
  top: 0;
  z-index: 5;
  transition: background .12s;
}
.co-date-header:hover { background: #4b5563 !important; transform: none !important; box-shadow: none !important; }

.co-date-arrow {
  display: inline-block; font-size: 18px; color: #d1d5db; flex-shrink: 0;
  transition: transform .18s;
}
.co-date-group.collapsed .co-date-arrow { transform: rotate(-90deg); }

.co-date-label { font-size: 12px; font-weight: 700; }
.co-date-count {
  font-size: 10px; font-weight: 600; color: #9ca3af;
  background: rgba(0,0,0,.2); padding: 1px 7px; border-radius: 20px;
  flex-shrink: 0;
}
.co-group-spacer { flex: 1; }
.co-group-msg {
  font-size: 11px; font-style: italic; opacity: .85;
  white-space: nowrap; flex-shrink: 0;
  padding-right: 12px; margin-right: 12px;
  border-right: 1px solid var(--border2);
  color: var(--text2);
}
.co-group-msg:empty { padding-right: 0; margin-right: 0; border-right: none; }
.co-date-header .co-group-msg,
.co-tag-header  .co-group-msg { color: rgba(255,255,255,.85); border-right-color: rgba(255,255,255,.25); }
.co-group-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; padding-right: 12px; }

.co-action-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; padding: 0;
  background: transparent; border: none; border-radius: 4px;
  cursor: pointer; color: inherit; opacity: 0.65; flex-shrink: 0;
  transition: opacity .15s, background .15s;
}
.co-action-btn:hover { opacity: 1 !important; transform: none !important; box-shadow: none !important; }
.co-action-btn svg { width: 15px; height: 15px; display: block; }

/* hover bg per sfondi scuri (data, tag) */
.co-date-header .co-action-btn:hover { background: rgba(255,255,255,.15) !important; }
.co-tag-header  .co-action-btn:hover { background: rgba(255,255,255,.15) !important; }
/* hover bg per sfondi chiari (comune, foto header) */
.co-comune-header .co-action-btn:hover { background: rgba(0,0,0,.1) !important; }
#coFotoHeaderActions .co-action-btn { color: var(--text2); }
#coFotoHeaderActions .co-action-btn:hover { background: rgba(0,0,0,.07) !important; }

.co-date-body { margin-top: 3px; padding-left: 8px; display: flex; flex-direction: column; gap: 3px; }
.co-date-group.collapsed .co-date-body { display: none; }

/* â”€â”€ Tag group â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-tag-group { }

.co-tag-header {
  width: 100%; display: flex; align-items: center; gap: 6px;
  padding: 3px 8px; border-radius: 5px;
  background: rgba(255,83,8,.75); color: #fff;
  border: none; text-align: left; cursor: pointer; user-select: none;
  min-height: 24px;
  transition: background .12s;
}
.co-tag-header:hover { background: rgba(255,83,8,.9) !important; transform: none !important; box-shadow: none !important; }

.co-tag-name { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.co-tag-count {
  font-size: 10px; font-weight: 600; color: rgba(255,255,255,.9);
  background: rgba(0,0,0,.2); padding: 1px 7px; border-radius: 20px;
  flex-shrink: 0;
}
.co-tag-arrow {
  display: inline-block; font-size: 18px; color: rgba(255,255,255,.85); flex-shrink: 0;
  transition: transform .18s;
}
.co-tag-group.collapsed .co-tag-arrow { transform: rotate(-90deg); }

.co-tag-body { margin-top: 3px; padding-left: 8px; display: flex; flex-direction: column; gap: 3px; }
.co-tag-group.collapsed .co-tag-body { display: none; }

/* â”€â”€ Comune group â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.co-comune-header {
  width: 100%; display: flex; align-items: center; gap: 6px;
  padding: 2px 8px; border-radius: 4px;
  background: #d1d5db; color: #374151;
  border: none; text-align: left; cursor: pointer; user-select: none;
  min-height: 22px;
  transition: background .12s;
}
.co-comune-header:hover { background: #b8bec7 !important; transform: none !important; box-shadow: none !important; }

.co-comune-arrow {
  display: inline-block; font-size: 18px; color: #6b7280; flex-shrink: 0;
  transition: transform .18s;
}
.co-comune-group.collapsed .co-comune-arrow { transform: rotate(-90deg); }

.co-comune-name { font-size: 11px; font-weight: 600; }
.co-comune-count {
  font-size: 10px; font-weight: 600; color: #374151;
  background: rgba(0,0,0,.12); padding: 1px 7px; border-radius: 20px;
  flex-shrink: 0;
}

.co-comune-grid {
  display: grid;
  grid-template-columns: repeat(var(--co-grid-cols, 10), minmax(0,1fr));
  gap: 4px; padding: 6px 0 4px;
}
.co-comune-group.collapsed .co-comune-grid { display: none; }

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   LIGHTBOX FOTO (company)
â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */
.co-lightbox {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(2,6,23,.9);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  animation: co-lb-fade .18s ease both;
}
@keyframes co-lb-fade { from { opacity:0 } to { opacity:1 } }
.co-lightbox[hidden] { display: none !important; }

.co-lightbox-panel {
  position: relative;
  width: min(880px, 100%);
  max-height: calc(100vh - 32px);
  display: flex; flex-direction: column;
  background: #0d1b35;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.07);
  animation: co-lb-pop .22s cubic-bezier(.22,1,.36,1) both;
}
@keyframes co-lb-pop { from { transform: scale(.96) translateY(10px); opacity:0 } to { transform:none; opacity:1 } }

.co-lightbox-image-area {
  position: relative; flex: 1; min-height: 0;
  background: #060d1e;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.co-lightbox-media {
  position: relative; display: inline-block;
  max-width: 100%; max-height: calc(100vh - 120px);
  line-height: 0;
}
.co-lightbox-img {
  max-width: 100%; max-height: calc(100vh - 120px);
  display: block; object-fit: contain;
}

/* overlay banda alta (tag) */
.co-lightbox-top-bar {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 13px 14px;
  background: rgba(15,23,42,.5);
  pointer-events: none;
  display: flex; align-items: center; gap: 10px;
}
.co-lightbox-tag-icon { width: 20px; height: 20px; flex-shrink: 0; }
.co-lightbox-tag-label {
  color: #fff; font-weight: 800; font-size: 17px;
  letter-spacing: .5px; text-transform: uppercase;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}

/* overlay card info (bottom-left) */
.co-lb-card {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(15,23,42,.55);
  border: 1px solid rgba(109,220,58,.45);
  border-radius: 12px;
  padding: 10px 12px 8px;
  pointer-events: none;
  min-width: 170px; max-width: 240px;
}
.co-lb-row {
  display: flex; align-items: flex-start; gap: 7px;
  padding: 3px 0;
}
.co-lb-icon {
  width: 20px; height: 20px; flex-shrink: 0;
  margin-top: 1px;
  display: flex; align-items: center; justify-content: center;
}
.co-lb-icon svg { width: 20px; height: 20px; display: block; }
.co-lb-field { display: flex; flex-direction: column; min-width: 0; }
.co-lb-label {
  font-size: 8px; font-weight: 700; letter-spacing: .9px;
  text-transform: uppercase; color: #6ddc3a;
  line-height: 1.2;
}
.co-lb-value {
  font-size: 11.5px; font-weight: 600; color: #fff;
  line-height: 1.35; word-break: break-word;
  text-shadow: 0 1px 4px rgba(0,0,0,.5);
  white-space: pre-line;
}
/* wordmark chip bottom-right */
.co-lb-wm-chip {
  position: absolute; bottom: 7px; right: 7px;
  background: rgba(15,23,42,.5);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 100px;
  padding: 5px 12px;
  pointer-events: none;
  display: flex; align-items: center;
}
.co-lb-wm-chip-img { height: 13px; width: auto; display: block; opacity: .9; }

/* Loading spinner */
.co-lightbox-loading {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(6,13,30,.55);
}
.co-lightbox-loading.hidden { display: none; }
.co-lightbox-spinner {
  width: 36px; height: 36px;
  border: 3px solid rgba(255,255,255,.12);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: co-spin .65s linear infinite;
}
@keyframes co-spin { to { transform: rotate(360deg); } }

/* Frecce navigazione */
.co-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; padding: 0;
  border-radius: 50%;
  background: rgba(15,23,42,.6);
  border: 1px solid rgba(255,255,255,.13);
  color: #e2e8f0; font-size: 30px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .15s;
  z-index: 4;
}
.co-lightbox-prev { left: 10px; }
.co-lightbox-next { right: 10px; }
.co-lightbox-nav:hover:not(:disabled) {
  background: rgba(15,23,42,.9) !important;
  border-color: rgba(255,255,255,.3) !important;
  transform: translateY(-50%) scale(1.1) !important;
  box-shadow: none !important;
}

/* Footer */
.co-lightbox-footer {
  padding: 9px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: #0d1b35;
  border-top: 1px solid rgba(255,255,255,.06);
  flex-shrink: 0;
}
.co-lightbox-meta { flex: 1; color: #94a3b8; font-size: 12px; font-weight: 500; }
.co-lightbox-counter {
  color: #64748b; font-size: 11px; font-weight: 600;
  background: rgba(255,255,255,.06);
  padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}

/* Pulsante chiudi */
.co-lightbox-close {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  width: 32px; height: 32px; padding: 0;
  border-radius: 50%;
  background: rgba(15,23,42,.65);
  border: 1px solid rgba(255,255,255,.13);
  color: #94a3b8; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s, border-color .15s;
}
.co-lightbox-close:hover { background: rgba(239,68,68,.8); color: #fff; border-color: transparent; }
