/* GH Logistics · dettagli "liquid glass" per il gestionale.
   Solo estetica: nessuna funzione, testo o struttura cambia. Colori del marchio, font e logo restano gli stessi.
   Il file si aggiunge agli stili delle pagine (che sono quasi tutti scritti dentro gli elementi):
   per questo molte regole usano !important. Per tornare all'aspetto di prima basta togliere il collegamento a questo file. */

html:root {
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --shadow-sm: inset 0 1px 0 rgba(255,255,255,.9), 0 1px 2px rgba(20,24,31,.04), 0 12px 28px -18px rgba(20,24,31,.16);
  --shadow-md: inset 0 1px 0 rgba(255,255,255,.9), 0 2px 6px rgba(20,24,31,.05), 0 20px 44px -20px rgba(20,24,31,.24);
  --shadow-lg: inset 0 1px 0 rgba(255,255,255,.9), 0 4px 14px rgba(20,24,31,.06), 0 34px 80px -28px rgba(20,24,31,.36);
  --gl-blur: blur(22px) saturate(170%);
  --gl-lucido: inset 0 1px 0 rgba(255,255,255,.3), inset 0 -8px 14px -8px rgba(0,0,0,.16);
  --gl-alone: 0 10px 22px -10px rgba(13,148,136,.65);
}

/* tema notte: stesse ombre, senza il filo bianco */
.gh-root[style*="color-scheme: dark"],
.gh-root[style*="color-scheme: dark"] * {
  --shadow-sm: inset 0 1px 0 rgba(255,255,255,.05), 0 1px 2px rgba(0,0,0,.3), 0 12px 28px -18px rgba(0,0,0,.6);
  --shadow-md: inset 0 1px 0 rgba(255,255,255,.06), 0 2px 6px rgba(0,0,0,.3), 0 20px 44px -20px rgba(0,0,0,.7);
  --shadow-lg: inset 0 1px 0 rgba(255,255,255,.07), 0 4px 14px rgba(0,0,0,.35), 0 34px 80px -28px rgba(0,0,0,.8);
}

/* ---------- sfondo della pagina: due aloni tenui del colore del marchio ---------- */
.gh-root {
  background:
    radial-gradient(900px 560px at 100% -6%, color-mix(in srgb, var(--color-accent-600) 10%, transparent), transparent 62%),
    radial-gradient(820px 560px at 16% 106%, rgba(91,208,197,.10), transparent 60%),
    var(--color-bg) !important;
}
@media (min-width: 821px) { .gh-root { background-attachment: fixed !important; } }

/* ---------- barra laterale: pannello di vetro scuro staccato dal bordo (solo computer) ---------- */
@media (min-width: 821px) {
  .gh-aside, .ds-side {
    margin: 10px 2px 10px 10px;
    top: 10px !important;
    height: calc(100vh - 20px) !important;
    border-radius: 24px;
    background:
      radial-gradient(440px 280px at -12% -6%, rgba(13,148,136,.36), transparent 66%),
      radial-gradient(380px 320px at 112% 106%, rgba(13,148,136,.16), transparent 66%),
      linear-gradient(180deg, #1c222c, #12161d) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16), inset 0 0 0 1px rgba(255,255,255,.06), 0 26px 54px -24px rgba(13,20,30,.6);
  }
}
/* voce attiva del menu */
.gh-aside nav button { border-radius: 13px !important; }
.gh-aside nav button[style*="background: var(--color-accent-600)"],
.ds-side nav button[style*="background: rgb(13, 148, 136)"],
.ds-side nav button[style*="background: #0d9488"] {
  background: linear-gradient(180deg, #12a597, #0d9488) !important;
  box-shadow: var(--gl-lucido), var(--gl-alone);
}
.gh-aside nav button[style*="background: transparent"]:hover { background: rgba(255,255,255,.07) !important; color: #fff !important; }
/* pulsanti in fondo alla barra */
.gh-aside > button[style*="border-radius: 999px"] {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03)) !important;
  border-color: rgba(255,255,255,.14) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.ds-side > div[style*="background: rgb(35, 42, 53)"], .ds-side > div[style*="background: #232a35"] {
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.035)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), inset 0 0 0 1px rgba(255,255,255,.05);
}

/* ---------- intestazione: vetro che lascia intravedere la pagina mentre scorre ---------- */
.gh-header {
  background: color-mix(in srgb, var(--color-surface) 68%, transparent) !important;
  -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur);
  border-bottom-color: color-mix(in srgb, var(--color-divider) 70%, transparent) !important;
  box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 55%, transparent), 0 10px 30px -22px rgba(20,24,31,.35);
}
.gh-root[style*="color-scheme: dark"] .gh-header { box-shadow: inset 0 1px 0 rgba(255,255,255,.05), 0 10px 30px -22px rgba(0,0,0,.8); }
/* pulsanti tondi dell'intestazione (tema, avvisi) */
.gh-header button[style*="border-radius: 999px"][style*="background: transparent"] {
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 90%, transparent), color-mix(in srgb, var(--color-surface) 55%, transparent)) !important;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.gh-header button[style*="border-radius: 999px"][style*="background: transparent"]:hover { transform: translateY(-1px); }
.gh-search .input, .gh-header .input {
  border-radius: 999px !important;
  background: color-mix(in srgb, var(--color-surface) 70%, transparent) !important;
  box-shadow: inset 0 1px 2px rgba(20,24,31,.05);
}

/* ---------- riquadri ---------- */
[style*="background: var(--color-surface)"][style*="box-shadow: var(--shadow-sm)"] {
  border-color: color-mix(in srgb, var(--color-divider) 62%, transparent) !important;
}

/* ---------- menu a tendina e pannelli che si aprono sopra la pagina ---------- */
.gh-dropdown,
[style*="position: absolute"][style*="box-shadow: var(--shadow-lg)"],
[style*="position: absolute"][style*="box-shadow: var(--shadow-md)"] {
  background: color-mix(in srgb, var(--color-surface) 98%, transparent) !important;
  -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur);
  border-color: color-mix(in srgb, var(--color-divider) 55%, transparent) !important;
  border-radius: 18px !important;
}

/* ---------- finestre: lo sfondo si sfoca, il pannello ha bordi più morbidi ---------- */
[style*="position: fixed; inset: 0"][style*="background: rgba"],
.dialog-backdrop {
  -webkit-backdrop-filter: blur(10px) saturate(140%); backdrop-filter: blur(10px) saturate(140%);
}
@media (min-width: 821px) {
  [style*="position: fixed; inset: 0"][style*="place-items: center"] > [style*="background: var(--color-surface)"],
  .dialog { border-radius: 24px !important; box-shadow: var(--shadow-lg) !important; }
}

/* ---------- pulsanti e campi ---------- */
.btn { transition: transform .15s, box-shadow .2s, background .15s, border-color .15s; }
.btn-primary {
  background: linear-gradient(180deg, #11a394, var(--color-accent-600)) !important;
  color: #fff !important;
  box-shadow: var(--gl-lucido), var(--gl-alone);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--gl-lucido), 0 14px 26px -10px rgba(13,148,136,.75); }
.btn-primary:active:not(:disabled) { transform: none; background: var(--color-accent-700) !important; }
.btn-primary:disabled { box-shadow: none; }
.btn-secondary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--color-surface) 96%, transparent), color-mix(in srgb, var(--color-surface) 62%, transparent));
  border-color: color-mix(in srgb, var(--color-divider) 90%, transparent);
  box-shadow: var(--shadow-sm);
}
.btn-secondary:hover:not(:disabled) { transform: translateY(-1px); }
.input, .gh-root select, .gh-root textarea { transition: border-color .15s, box-shadow .15s; }
.input:focus, .input:focus-visible, .gh-root select:focus, .gh-root textarea:focus {
  outline: none; border-color: var(--color-accent-600) !important;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-accent-600) 16%, transparent);
}

/* ---------- pagina di accesso ---------- */
.gh-auth {
  position: relative; overflow: hidden;
  background:
    radial-gradient(620px 460px at 50% 0%, rgba(13,148,136,.18), transparent 66%),
    radial-gradient(520px 420px at 82% 96%, rgba(91,208,197,.18), transparent 64%),
    radial-gradient(480px 400px at 10% 78%, rgba(13,148,136,.09), transparent 64%),
    var(--color-bg) !important;
}
.gh-auth-card {
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.62)) !important;
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255,255,255,.95) !important;
  border-radius: 28px !important;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20,24,31,.05), 0 2px 4px rgba(20,24,31,.04), 0 34px 70px -28px rgba(20,24,31,.3) !important;
}
.gh-auth-card .input { background: rgba(255,255,255,.8); }

/* ---------- chat in basso a destra ---------- */
.gh-chat { border-radius: 22px !important; }

/* ---------- portale dropshipping e portale fornitori (colori scritti a mano) ---------- */
.ds-main [style*="background: var(--sc-surface)"][style*="box-shadow: rgba(20, 24, 31, 0.05)"],
.ds-main [style*="background: var(--sc-surface)"][style*="box-shadow: 0 1px 3px"] {
  box-shadow: var(--shadow-sm) !important;
}
.ds-main [style*="position: absolute"][style*="box-shadow: rgba(20, 24, 31, 0.14)"],
.ds-main [style*="position: absolute"][style*="box-shadow: 0 18px 44px"] {
  background: color-mix(in srgb, var(--sc-surface) 98%, transparent) !important;
  -webkit-backdrop-filter: var(--gl-blur); backdrop-filter: var(--gl-blur);
  box-shadow: var(--shadow-lg) !important;
}
.ds-chips::-webkit-scrollbar { display: none; }
.ds-main button:not(.ds-chip)[style*="background: rgb(13, 148, 136)"][style*="color: rgb(255, 255, 255)"],
.gl-forn button[style*="background: rgb(13, 148, 136)"][style*="color: rgb(255, 255, 255)"] {
  background: linear-gradient(180deg, #11a394, #0d9488) !important;
  box-shadow: var(--gl-lucido), var(--gl-alone);
  transition: transform .15s, box-shadow .2s;
}
.ds-main button:not(.ds-chip)[style*="background: rgb(13, 148, 136)"][style*="color: rgb(255, 255, 255)"]:hover,
.gl-forn button[style*="background: rgb(13, 148, 136)"][style*="color: rgb(255, 255, 255)"]:hover { transform: translateY(-1px); }

/* ---------- chi preferisce meno trasparenze o meno movimento ---------- */
@media (prefers-reduced-transparency: reduce) {
  .gh-header, .gh-dropdown, .gh-auth-card { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--color-surface) !important; }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .btn-primary:hover, .btn-secondary:hover { transition: none; transform: none !important; }
}

/* sfondo del portale dropshipping quando è una pagina a sé */
.ds-root[style*="min-height: 100vh"] {
  background:
    radial-gradient(900px 560px at 100% -6%, rgba(13,148,136,.10), transparent 62%),
    radial-gradient(820px 560px at 16% 106%, rgba(91,208,197,.10), transparent 60%);
}
@media (min-width: 861px) { .ds-root[style*="min-height: 100vh"] { background-attachment: fixed; } }

/* portale fornitori */
.gl-forn [style*="box-shadow: rgba(20, 24, 31, 0.04)"] { box-shadow: var(--shadow-sm) !important; }
.gl-forn-auth {
  background:
    radial-gradient(560px 440px at 82% 4%, rgba(13,148,136,.14), transparent 66%),
    radial-gradient(520px 420px at 96% 100%, rgba(91,208,197,.16), transparent 64%);
}
.gl-forn-auth [style*="box-shadow: rgba(20, 24, 31, 0.06) 0px 10px 30px"] {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.64)) !important;
  -webkit-backdrop-filter: blur(26px) saturate(170%); backdrop-filter: blur(26px) saturate(170%);
  border: 1px solid rgba(255,255,255,.95) !important;
  border-radius: 28px !important;
  box-shadow: inset 0 1px 0 #fff, 0 0 0 1px rgba(20,24,31,.05), 0 2px 4px rgba(20,24,31,.04), 0 34px 70px -28px rgba(20,24,31,.3) !important;
}

/* ---------- app installata da Chrome senza barra del titolo: la pagina occupa anche quella zona ---------- */
@media (display-mode: window-controls-overlay) {
  :root { --gh-barra: env(titlebar-area-height, 0px); }
  .gh-header { padding-top: calc(14px + var(--gh-barra)) !important; -webkit-app-region: drag; app-region: drag; }
  .gh-header input, .gh-header button, .gh-header a, .gh-header select, .gh-header [role="button"] { -webkit-app-region: no-drag; app-region: no-drag; }
  .gh-aside, .ds-side {
    margin-top: calc(10px + var(--gh-barra)) !important;
    top: calc(10px + var(--gh-barra)) !important;
    height: calc(100vh - 20px - var(--gh-barra)) !important;
  }
}

/* ---------- rifiniture comuni (allineate al portale fornitori) ---------- */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
/* cifre tutte della stessa larghezza: importi e contatori non "ballano" e restano in colonna */
.gh-root, .ds-main, .gl-forn { font-variant-numeric: tabular-nums; }
.gh-root h1, .gh-root h2, .gh-root h3, .ds-main h1, .ds-main h2 { text-wrap: balance; }
.gh-root p, .ds-main p { text-wrap: pretty; }
/* contorno neutro sulle foto, così non si confondono con il vetro */
.gh-root img:not([src*="logo"]), .ds-main img:not([src*="logo"]) { outline: 1px solid rgba(0,0,0,.08); outline-offset: -1px; }
/* bordo di selezione da tastiera sempre visibile */
.gh-root :focus-visible, .ds-main :focus-visible { outline: 2px solid var(--color-accent-600, #0d9488); outline-offset: 2px; }
.gh-root .input:focus-visible { outline: none; }
/* pressione tattile sui pulsanti */
.btn:active:not(:disabled) { transform: scale(.97); }
@media (prefers-reduced-motion: reduce) {
  .btn, .btn:active, .btn-primary:hover, .btn-secondary:hover { transform: none !important; transition: none !important; }
}

/* ---------- tabelle proporzionali: entrano sempre nello schermo, senza scorrere di lato ---------- */
[style*="minmax(0px"] > span:not(.tag),
[style*="minmax(0px"] > b,
[style*="minmax(0px"] > span > span:not(.tag) {
  min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
[style*="minmax(0px"] > .tag { justify-self: start; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) and (min-width: 821px) {
  [style*="minmax(0px"] { column-gap: 8px !important; padding-left: 14px !important; padding-right: 14px !important; font-size: 12.5px !important; }
  [style*="minmax(0px"] button { font-size: 11.5px !important; padding-left: 9px !important; padding-right: 9px !important; }
}
