/* Grafica scritta da ChatGPT (26/11), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — DESIGN SYSTEM
   Cornice comune, navigazione e pagina Cruscotto
   ============================================================ */

:root {
    color-scheme: light;

    /* Colori del marchio */
    --brand-dark: #0e1929;
    --brand-dark-deep: #0b1422;
    --brand-dark-light: #192638;
    --brand-orange: #ff790b;
    --brand-orange-hover: #ed6800;
    --brand-orange-light: #fff0e2;
    --brand-orange-gradient: linear-gradient(90deg, #ff6800, #ff861c);

    /* Superfici */
    --body-bg: #f3f5fa;
    --surface: #ffffff;
    --surface-secondary: #f7f8fb;
    --surface-muted: #edf0f5;
    --border: #e1e5ed;
    --border-strong: #cfd6e2;

    /* Testi */
    --text-primary: #101827;
    --text-secondary: #475467;
    --text-muted: #697586;
    --text-inverse: #ffffff;
    --text-sidebar: #e9edf4;

    /* Stati */
    --success: #15803d;
    --success-bg: #d9f7e3;
    --danger: #d92535;
    --danger-bg: #ffe0e3;
    --warning: #d96800;
    --warning-bg: #ffead7;
    --info: #174ea6;
    --info-bg: #dfebff;

    /* Grafici */
    --chart-sales: #10366d;
    --chart-profit: #ff790b;
    --chart-grid: #dbe2ed;
    --chart-market-it: #10366d;
    --chart-market-de: #ff790b;
    --chart-market-fr: #ffbd8c;
    --chart-market-es: #d6dce7;

    /* Dimensioni della cornice */
    --topbar-height: clamp(52px, 3.45vw, 52px);
    --sidebar-width: clamp(216px, 14.7vw, 216px);
    --main-padding: clamp(18px, 1.55vw, 21.2px);
    --layout-gap: clamp(12px, 1vw, 13.7px);

    /* Menu adattivo all'altezza disponibile */
    --nav-item-height: clamp(
        16px,
        calc((100dvh - var(--topbar-height) - 124px) / 34),
        27px
    );
    --nav-section-gap: clamp(4px, 0.85vh, 12px);
    --nav-font-size: clamp(12px, 0.86vw, 12px);

    /* Tipografia */
    --font-family: system-ui, 'Segoe UI', sans-serif;
    --font-size-base: clamp(13px, 0.79vw, 13px);
    --font-size-small: clamp(11px, 0.73vw, 11px);
    --font-size-title: clamp(28px, 2.15vw, 29.4px);
    --font-size-card-title: clamp(18px, 1.3vw, 18px);
    --font-size-kpi: clamp(25px, 1.95vw, 26.6px);

    /* Forme e ombre */
    --radius-small: 6px;
    --radius-medium: 10px;
    --radius-large: 14px;
    --radius-xl: 18px;

    --shadow-card:
        0 2px 5px rgba(15, 23, 42, 0.045),
        0 5px 16px rgba(15, 23, 42, 0.025);

    --shadow-hover:
        0 4px 12px rgba(15, 23, 42, 0.08),
        0 8px 22px rgba(15, 23, 42, 0.04);

    --transition: 150ms ease;
}


/* ============================================================
   01. RESET
   ============================================================ */

:where(.g-body) *,
:where(.g-body) *::before,
:where(.g-body) *::after {
    box-sizing: border-box;
}

html:has(body.g-body) {
    width: 100%;
    min-height: 100%;
    margin: 0;
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.g-body {
    width: 100%;
    min-width: 0;
    min-height: 100vh;
    margin: 0;
    background: var(--brand-dark);
    color: var(--text-primary);
    line-height: 1.45;
    overflow-x: hidden;
}

:where(.g-body) h1,
:where(.g-body) h2,
:where(.g-body) h3,
:where(.g-body) h4,
:where(.g-body) h5,
:where(.g-body) h6,
:where(.g-body) p,
:where(.g-body) figure {
    margin: 0;
}

:where(.g-body) ul,
:where(.g-body) ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:where(.g-body) a {
    color: inherit;
    text-decoration: none;
}

:where(.g-body) button,
:where(.g-body) input,
:where(.g-body) select,
:where(.g-body) textarea {
    font: inherit;
}

:where(.g-body) button {
    cursor: pointer;
}

:where(.g-body) button,
:where(.g-body) input,
:where(.g-body) select {
    -webkit-tap-highlight-color: transparent;
}

:where(.g-body) button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

:where(.g-body) button,
:where(.g-body) a,
:where(.g-body) input,
:where(.g-body) select,
:where(.g-body) summary {
    outline-offset: 3px;
}

:where(.g-body) :focus-visible {
    outline: 2px solid var(--brand-orange);
}

:where(.g-body) svg {
    display: block;
    flex-shrink: 0;
}

:where(.g-body) table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

:where(.g-body) [hidden] {
    display: none !important;
}

:where(.g-body) ::selection {
    background: #ffe0c4;
    color: var(--brand-dark);
}


/* ============================================================
   02. STRUTTURA GENERALE DELL'APPLICAZIONE
   ============================================================ */

.g-app {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    grid-template-rows: var(--topbar-height) minmax(0, 1fr);
    grid-template-areas:
        "topbar topbar"
        "sidebar main";

    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.g-main-content {
    grid-area: main;
    display: flex;
    flex-direction: column;
    gap: var(--layout-gap);

    min-width: 0;
    min-height: calc(100dvh - var(--topbar-height));

    margin-left: 0;
    padding: var(--main-padding);

    background: var(--body-bg);
    background-image: linear-gradient(
        135deg,
        #f8f9fc 0%,
        #f3f5fa 60%,
        #f0f3f8 100%
    );

    border-radius: 15px 15px 0 0;
}

.g-dashboard {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
}


/* ============================================================
   03. ICONE SVG
   ============================================================ */

.g-icon {
    width: 20px;
    height: 20px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;

    flex-shrink: 0;
    vertical-align: middle;
}

.g-icon-xs {
    width: 13px;
    height: 13px;
}

.g-icon-sm {
    width: 16px;
    height: 16px;
}

.g-icon-md {
    width: 20px;
    height: 20px;
}

.g-icon-lg {
    width: 26px;
    height: 26px;
}

.g-icon-xl {
    width: 34px;
    height: 34px;
}

.g-icon-orange {
    color: var(--brand-orange);
}

.g-icon-success {
    color: var(--success);
}

.g-icon-danger {
    color: var(--danger);
}

.g-icon-muted {
    color: var(--text-muted);
}


/* ============================================================
   04. BARRA SUPERIORE COMUNE
   ============================================================ */

.g-topbar {
    grid-area: topbar;
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;
    height: var(--topbar-height);
    min-height: var(--topbar-height);

    padding: 0 clamp(18px, 1.4vw, 19.1px);

    color: var(--text-inverse);
    background: linear-gradient(
        100deg,
        #101c2c 0%,
        #0c1625 60%,
        #0a1220 100%
    );
}

.g-topbar-left,
.g-topbar-right {
    display: flex;
    align-items: center;
}

.g-topbar-left {
    min-width: 0;
}

.g-topbar-right {
    gap: clamp(20px, 2vw, 27.3px);
}


/* Logo DeskZon */

.g-brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    color: #ffffff;
    white-space: nowrap;
    user-select: none;
}

.g-brand-icon {
    width: clamp(29px, 2.2vw, 30.1px);
    height: clamp(29px, 2.2vw, 30.1px);

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    color: var(--brand-orange);
}

.g-brand-name {
    font-size: clamp(27px, 1.85vw, 27px);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -1.3px;
}

.g-brand-accent {
    color: var(--brand-orange);
}


/* Aiuto e notifiche */

.g-topbar-button {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    padding: 5px;

    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 9px;

    transition: background var(--transition);
}

.g-topbar-button:hover {
    background: rgba(255, 255, 255, 0.09);
}

.g-topbar-button .g-icon {
    width: clamp(23px, 1.55vw, 23px);
    height: clamp(23px, 1.55vw, 23px);
    stroke-width: 1.8;
}

.g-notification-dot {
    position: absolute;
    top: 3px;
    right: 3px;

    width: 11px;
    height: 11px;

    background: var(--brand-orange);
    border: 2px solid var(--brand-dark);
    border-radius: 50%;
}


/* Profilo aziendale */

.g-company-profile {
    display: inline-flex;
    align-items: center;
    gap: 11px;

    padding: 0;
    color: #ffffff;
    background: none;
    border: 0;

    white-space: nowrap;
}

.g-company-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(34px, 2.4vw, 34px);
    height: clamp(34px, 2.4vw, 34px);

    color: #ffffff;
    background: var(--brand-orange-gradient);
    border-radius: 50%;

    font-size: clamp(14px, 1vw, 14px);
    font-weight: 700;
}

.g-company-name {
    font-size: clamp(13px, 0.88vw, 13px);
    font-weight: 550;
}

.g-company-profile > .g-icon,
.g-company-chevron {
    width: 16px;
    height: 16px;
    margin-left: 1px;
    color: #ffffff;
}

.g-company-profile:hover .g-company-name {
    color: #ffd6b5;
}


/* ============================================================
   05. MENU LATERALE COMUNE
   ============================================================ */

.g-sidebar {
    grid-area: sidebar;
    position: sticky;
    top: var(--topbar-height);

    display: flex;
    flex-direction: column;

    width: var(--sidebar-width);
    height: calc(100vh - var(--topbar-height));
    height: calc(100dvh - var(--topbar-height));

    min-width: 0;
    padding:
        clamp(5px, 0.9vh, 12px)
        clamp(10px, 0.9vw, 12.3px)
        8px;

    color: var(--text-sidebar);
    background: linear-gradient(
        160deg,
        #101b2b 0%,
        #0e1928 55%,
        #0b1523 100%
    );

    overflow: visible;
}

.g-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: var(--nav-section-gap);

    width: 100%;
    min-height: 0;
}


/* Sezioni details / summary */

.g-nav-section {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.g-nav-section > summary {
    display: flex;
    align-items: center;
    gap: clamp(9px, 0.85vw, 11.6px);

    min-width: 0;
    height: calc(var(--nav-item-height) + 5px);
    padding: 0 4px;

    color: #ffffff;

    font-size: calc(var(--nav-font-size) + 1px);
    font-weight: 700;
    line-height: 1.1;

    list-style: none;
    cursor: pointer;
    user-select: none;

    border-radius: var(--radius-small);
    transition: background var(--transition);
}

.g-nav-section > summary::-webkit-details-marker {
    display: none;
}

.g-nav-section > summary::marker {
    content: "";
}

.g-nav-section > summary:hover {
    background: rgba(255, 255, 255, 0.055);
}

.g-nav-section-icon {
    width: clamp(18px, 1.45vw, 19.8px);
    height: clamp(18px, 1.45vw, 19.8px);

    color: var(--brand-orange);
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.g-nav-section-title {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.g-nav-chevron {
    width: 14px;
    height: 14px;
    margin-left: auto;

    color: #eef2f9;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;

    transition: transform var(--transition);
}

.g-nav-section:not([open]) .g-nav-chevron {
    transform: rotate(-90deg);
}

.g-nav-section[open] .g-nav-chevron {
    transform: rotate(0deg);
}


/* Elenco delle voci */

.g-nav-items {
    display: flex;
    flex-direction: column;
    gap: 0;

    min-width: 0;
    margin-top: 1px;
    padding: 0 0 0 10px;
}

.g-nav-section:not([open]) > .g-nav-items {
    display: none;
}

.g-nav-item {
    display: flex;
    align-items: center;

    width: 100%;
    min-width: 0;
    height: var(--nav-item-height);

    padding: 0 5px 0 clamp(25px, 1.95vw, 26.6px);

    color: var(--text-sidebar);
    border-radius: 8px;

    font-size: var(--nav-font-size);
    font-weight: 450;
    line-height: 1.1;

    white-space: nowrap;

    transition:
        background var(--transition),
        color var(--transition);
}

.g-nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.075);
}

.g-nav-item.g-active,
.g-nav-item[aria-current="page"] {
    color: #ffffff;
    background: var(--brand-orange-gradient);
    font-weight: 650;
}

.g-nav-item.g-active:hover,
.g-nav-item[aria-current="page"]:hover {
    background: linear-gradient(90deg, #f56800, #ff8c29);
}

.g-nav-item:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

.g-nav-item-label {
    display: block;
    min-width: 0;
}


/* ============================================================
   06. INTESTAZIONE DELLA PAGINA
   ============================================================ */

.g-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--layout-gap);

    width: 100%;
    min-width: 0;
}

.g-page-heading {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1vw, 13.7px);

    flex: 1 1 auto;
    min-width: 0;
}

.g-page-heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(39px, 3.1vw, 42.3px);
    height: clamp(39px, 3.1vw, 42.3px);

    color: var(--brand-orange);
    flex-shrink: 0;
}

.g-page-heading-icon .g-icon {
    width: 100%;
    height: 100%;
    stroke-width: 1.8;
}

.g-page-heading-text {
    min-width: 0;
}

.g-page-title {
    color: var(--text-primary);
    font-size: var(--font-size-title);
    font-weight: 750;
    line-height: 1.13;
    letter-spacing: -0.045em;
}

.g-page-subtitle {
    margin-top: 3px;

    color: var(--text-secondary);
    font-size: clamp(12px, 0.93vw, 12.7px);
    font-weight: 400;
    line-height: 1.35;
}

.g-page-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.15vw, 15.7px);

    flex: 0 1 49%;
    min-width: 0;
}


/* ============================================================
   07. CAMPI, FILTRI E PULSANTI
   ============================================================ */

.g-control {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
    min-height: clamp(38px, 2.65vw, 38px);
    padding: 0 13px;

    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-medium);

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.g-control:hover {
    border-color: #aeb9ca;
    background: #ffffff;
}

.g-control:focus-within {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 121, 11, 0.1);
}

.g-control > .g-icon {
    color: var(--text-muted);
    width: 19px;
    height: 19px;
}

.g-period-filter {
    flex: 0 0 auto;
    width: clamp(175px, 14vw, 191.2px);
}

.g-period-filter select {
    font-weight: 500;
}

.g-select-control {
    position: relative;
}

.g-select-control select {
    appearance: none;
    -webkit-appearance: none;

    width: 100%;
    min-width: 0;
    padding: 9px 24px 9px 0;

    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;

    cursor: pointer;
}

.g-select-control .g-select-chevron {
    position: absolute;
    top: 50%;
    right: 13px;

    width: 15px;
    height: 15px;

    color: var(--text-secondary);
    transform: translateY(-50%);
    pointer-events: none;
}

.g-search-control {
    flex: 1 1 auto;
    min-width: 140px;
}

.g-search-control input {
    width: 100%;
    min-width: 0;
    padding: 9px 0;

    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;
}

.g-search-control input::placeholder {
    color: #748094;
    opacity: 1;
}

.g-search-control input::-webkit-search-cancel-button {
    cursor: pointer;
}

.g-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-height: 40px;
    padding: 10px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    font-size: var(--font-size-base);
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.g-button-primary {
    color: #ffffff;
    background: var(--brand-orange-gradient);
}

.g-button-primary:hover {
    background: var(--brand-orange-hover);
    box-shadow: 0 3px 10px rgba(255, 121, 11, 0.2);
}

.g-button-outline {
    color: var(--brand-orange-hover);
    background: #ffffff;
    border-color: var(--brand-orange);
}

.g-button-outline:hover {
    background: var(--brand-orange-light);
}

.g-button-secondary {
    color: var(--text-primary);
    background: #ffffff;
    border-color: var(--border-strong);
}

.g-button-secondary:hover {
    background: var(--surface-secondary);
}

.g-button .g-icon {
    width: 18px;
    height: 18px;
}


/* ============================================================
   08. COMPONENTE SCHEDA COMUNE
   ============================================================ */

.g-card {
    min-width: 0;
    padding: clamp(15px, 1.3vw, 17.8px);

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow-card);
}

.g-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-width: 0;
    margin-bottom: clamp(12px, 1.1vw, 15px);
}

.g-card-heading {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
}

.g-card-heading > .g-icon {
    width: clamp(21px, 1.55vw, 21.2px);
    height: clamp(21px, 1.55vw, 21.2px);
    color: var(--brand-orange);
}

.g-card-title {
    min-width: 0;

    color: var(--text-primary);
    font-size: var(--font-size-card-title);
    font-weight: 730;
    line-height: 1.22;
    letter-spacing: -0.035em;
}

.g-card-subtitle {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: var(--font-size-small);
}

.g-card-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--brand-orange-hover);
    font-weight: 600;
    white-space: nowrap;
}

.g-card-link:hover {
    text-decoration: underline;
}


/* ============================================================
   09. RIQUADRI KPI DEL CRUSCOTTO
   ============================================================ */

.g-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--layout-gap);

    width: 100%;
}

.g-kpi-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(9px, 0.8vw, 10.9px);

    min-width: 0;
    min-height: clamp(112px, 15vh, 184px);
    padding: clamp(13px, 1vw, 13.7px);

    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    box-shadow: var(--shadow-card);
}

.g-kpi-top {
    display: flex;
    align-items: flex-start;
    gap: clamp(9px, 0.85vw, 11.6px);

    min-width: 0;
}

.g-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(40px, 3.15vw, 43px);
    height: clamp(40px, 3.15vw, 43px);

    color: var(--brand-orange);
    background: linear-gradient(
        145deg,
        #fff3e9 0%,
        #ffe6d0 100%
    );

    border-radius: 11px;
    flex-shrink: 0;
}

.g-kpi-icon .g-icon {
    width: clamp(25px, 1.85vw, 25.3px);
    height: clamp(25px, 1.85vw, 25.3px);
    stroke-width: 1.8;
}

.g-kpi-info {
    flex: 1 1 auto;
    min-width: 0;
}

.g-kpi-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
    min-width: 0;
}

.g-kpi-label {
    color: var(--text-primary);
    font-size: clamp(12px, 0.96vw, 13.1px);
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
}

.g-kpi-value {
    margin-top: 5px;

    color: var(--text-primary);
    font-size: var(--font-size-kpi);
    font-weight: 780;
    line-height: 1.16;
    letter-spacing: -0.045em;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.g-kpi-change {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 3px;

    padding: 4px 7px;

    border-radius: 8px;

    font-size: clamp(10px, 0.73vw, 10px);
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;

    flex-shrink: 0;
}

.g-kpi-change.g-positive {
    color: #126b32;
    background: var(--success-bg);
}

.g-kpi-change.g-negative {
    color: var(--danger);
    background: var(--danger-bg);
}

.g-kpi-change.g-neutral {
    color: var(--text-secondary);
    background: var(--surface-muted);
}

.g-kpi-change .g-icon {
    width: 12px;
    height: 12px;
    stroke-width: 2.2;
}


/* Mini grafici KPI */

.g-sparkline {
    display: block;
    width: 100%;
    height: clamp(29px, 4.6vh, 52px);

    overflow: visible;
}

.g-sparkline-line {
    fill: none;
    stroke: var(--chart-profit);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.g-sparkline-area {
    fill: #fff0e2;
    fill-opacity: 0.9;
    stroke: none;
}

.g-sparkline-gradient-start {
    stop-color: #ff790b;
    stop-opacity: 0.23;
}

.g-sparkline-gradient-end {
    stop-color: #ff790b;
    stop-opacity: 0.015;
}


/* ============================================================
   10. GRIGLIA DEI GRAFICI PRINCIPALI
   ============================================================ */

.g-dashboard-charts {
    display: grid;
    grid-template-columns: minmax(0, 1.57fr) minmax(0, 1fr);
    gap: var(--layout-gap);

    width: 100%;
    min-width: 0;
}

.g-sales-chart-card,
.g-markets-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: clamp(245px, 31.5vh, 420px);
}

.g-sales-chart-card {
    padding-bottom: clamp(11px, 1vw, 13.7px);
}

.g-sales-chart-card .g-card-header,
.g-markets-card .g-card-header {
    margin-bottom: clamp(8px, 0.75vw, 10.2px);
}


/* ============================================================
   11. GRAFICO VENDITE E PROFITTO
   ============================================================ */

.g-chart-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;

    min-width: 0;
    min-height: 0;
}

.g-sales-chart {
    display: block;

    width: 100%;
    height: clamp(180px, 23.5vh, 335px);

    overflow: visible;
}

.g-chart-grid-line {
    fill: none;
    stroke: var(--chart-grid);
    stroke-width: 1;
    stroke-dasharray: 4 3;
    vector-effect: non-scaling-stroke;
}

.g-chart-axis {
    fill: none;
    stroke: #c6cfdd;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.g-chart-tick {
    fill: none;
    stroke: #d0d7e2;
    stroke-width: 1;
    vector-effect: non-scaling-stroke;
}

.g-chart-axis-label {
    fill: #344054;
    font-family: var(--font-family);
    font-size: 12px;
    font-weight: 450;
    font-variant-numeric: tabular-nums;
}

.g-chart-axis-label-x {
    text-anchor: middle;
}

.g-chart-axis-label-y {
    text-anchor: end;
}

.g-chart-sales-area {
    fill: #c5d5ec;
    fill-opacity: 0.55;
    stroke: none;
}

.g-chart-profit-area {
    fill: #ffe2c7;
    fill-opacity: 0.7;
    stroke: none;
}

.g-chart-sales-gradient-start {
    stop-color: #24579b;
    stop-opacity: 0.28;
}

.g-chart-sales-gradient-end {
    stop-color: #24579b;
    stop-opacity: 0.025;
}

.g-chart-profit-gradient-start {
    stop-color: #ff790b;
    stop-opacity: 0.18;
}

.g-chart-profit-gradient-end {
    stop-color: #ff790b;
    stop-opacity: 0.01;
}

.g-chart-sales-line {
    fill: none;
    stroke: var(--chart-sales);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.g-chart-profit-line {
    fill: none;
    stroke: var(--chart-profit);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.g-chart-sales-point {
    fill: var(--chart-sales);
    stroke: var(--chart-sales);
    stroke-width: 1;
}

.g-chart-profit-point {
    fill: var(--chart-profit);
    stroke: var(--chart-profit);
    stroke-width: 1;
}


/* Legenda grafico */

.g-chart-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(18px, 1.8vw, 24.6px);

    margin-top: 5px;
    padding: 0 0 2px;
}

.g-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 450;
    white-space: nowrap;
}

.g-legend-dot {
    display: inline-block;

    width: 12px;
    height: 12px;

    border-radius: 50%;
    flex-shrink: 0;
}

.g-legend-dot.g-sales {
    background: var(--chart-sales);
}

.g-legend-dot.g-profit {
    background: var(--chart-profit);
}


/* ============================================================
   12. VENDITE PER MERCATO
   ============================================================ */

.g-markets-content {
    display: grid;
    grid-template-columns: minmax(115px, 0.95fr) minmax(0, 1.5fr);
    align-items: center;
    gap: clamp(13px, 1.4vw, 19.1px);

    flex: 1 1 auto;
    min-width: 0;
}

.g-donut-wrapper {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 290px;
    margin-inline: auto;
}


/* Grafico a ciambella realizzato interamente in CSS */

.g-donut-chart {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    aspect-ratio: 1 / 1;

    background: conic-gradient(
        var(--chart-market-it) 0% 45.3%,
        var(--chart-market-de) 45.3% 68.2%,
        var(--chart-market-fr) 68.2% 84.7%,
        var(--chart-market-es) 84.7% 100%
    );

    border-radius: 50%;
}

.g-donut-chart::before {
    position: absolute;
    inset: 17.5%;

    content: "";
    background: #ffffff;
    border-radius: 50%;
}

.g-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;

    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    gap: 4px;

    width: 70%;

    text-align: center;
    transform: translate(-50%, -50%);
}

.g-donut-total {
    color: var(--text-primary);
    font-size: clamp(14px, 1.15vw, 15.7px);
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: -0.045em;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.g-donut-label {
    color: var(--text-primary);
    font-size: clamp(10px, 0.78vw, 10.7px);
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
}


/* Alternativa grafico a ciambella SVG */

.g-donut-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

.g-donut-track {
    fill: none;
    stroke: var(--surface-muted);
    stroke-width: 18;
}

.g-donut-segment {
    fill: none;
    stroke-width: 18;
    stroke-linecap: butt;
}

.g-donut-segment.g-market-it {
    stroke: var(--chart-market-it);
}

.g-donut-segment.g-market-de {
    stroke: var(--chart-market-de);
}

.g-donut-segment.g-market-fr {
    stroke: var(--chart-market-fr);
}

.g-donut-segment.g-market-es {
    stroke: var(--chart-market-es);
}


/* Elenco mercati */

.g-market-list {
    display: flex;
    flex-direction: column;

    width: 100%;
    min-width: 0;
}

.g-market-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: clamp(6px, 0.65vw, 8.9px);

    min-width: 0;
    min-height: clamp(38px, 4.4vh, 61px);
    padding: 8px 0;

    border-bottom: 1px solid var(--border);
}

.g-market-row:last-child {
    border-bottom: 0;
}

.g-market-color {
    display: block;
    width: clamp(14px, 1.05vw, 14.3px);
    height: clamp(14px, 1.05vw, 14.3px);

    border-radius: 4px;
    flex-shrink: 0;
}

.g-market-color.g-market-it {
    background: var(--chart-market-it);
}

.g-market-color.g-market-de {
    background: var(--chart-market-de);
}

.g-market-color.g-market-fr {
    background: var(--chart-market-fr);
}

.g-market-color.g-market-es {
    background: var(--chart-market-es);
}

.g-market-name {
    color: var(--text-primary);
    font-size: clamp(11px, 0.9vw, 12.3px);
    font-weight: 650;
    white-space: nowrap;
}

.g-market-amount {
    color: var(--text-primary);
    font-size: clamp(11px, 0.93vw, 12.7px);
    font-weight: 550;
    text-align: right;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.g-market-percentage {
    min-width: 43px;
    padding: 4px 7px;

    color: #344054;
    background: #e9edf5;
    border-radius: 999px;

    font-size: clamp(10px, 0.73vw, 10px);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.g-market-percentage.g-highlight {
    color: #146b42;
    background: #d9f2e7;
}


/* ============================================================
   13. GRIGLIA INFERIORE DEL CRUSCOTTO
   ============================================================ */

.g-dashboard-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.13fr) minmax(0, 1fr);
    gap: var(--layout-gap);

    flex: 1 0 auto;

    width: 100%;
    min-width: 0;
}

.g-products-card,
.g-tasks-card {
    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: clamp(220px, 25.5vh, 345px);

    padding-top: clamp(12px, 1vw, 13.7px);
    padding-bottom: clamp(12px, 1vw, 13.7px);
}

.g-products-card .g-card-header,
.g-tasks-card .g-card-header {
    margin-bottom: clamp(8px, 0.8vw, 10.9px);
}


/* ============================================================
   14. TABELLA PRODOTTI PIÙ REDDITIZI
   ============================================================ */

.g-table-wrapper {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd3df transparent;
}

.g-data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;

    color: var(--text-primary);
    font-size: var(--font-size-base);
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.g-data-table thead {
    background: var(--surface-muted);
}

.g-data-table th {
    padding: clamp(7px, 0.6vw, 8.2px) 11px;

    color: var(--text-primary);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
}

.g-data-table th:first-child {
    border-radius: 8px 0 0 8px;
}

.g-data-table th:last-child {
    border-radius: 0 8px 8px 0;
}

.g-data-table td {
    padding: clamp(5px, 0.55vh, 10px) 11px;

    color: var(--text-primary);
    border-bottom: 1px solid #e5e9f0;

    font-weight: 450;
    line-height: 1.3;
    vertical-align: middle;
}

.g-data-table tbody tr:nth-child(even) {
    background: #f7f8fa;
}

.g-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.g-data-table tbody tr:hover {
    background: #fff5ec;
}

.g-data-table .g-numeric {
    text-align: right;
    white-space: nowrap;
}

.g-data-table .g-center {
    text-align: center;
}

.g-data-table .g-sku {
    color: #344054;
    font-size: 0.92em;
    white-space: nowrap;
}

.g-data-table .g-product-name {
    font-weight: 500;
}

.g-data-table .g-profit-value {
    font-weight: 650;
    white-space: nowrap;
}

.g-data-table .g-positive-value {
    color: var(--success);
    font-weight: 700;
}

.g-data-table .g-negative-value {
    color: var(--danger);
    font-weight: 700;
}

.g-products-table {
    table-layout: auto;
}

.g-products-table th,
.g-products-table td {
    padding-right: clamp(5px, 0.7vw, 9.6px);
    padding-left: clamp(5px, 0.7vw, 9.6px);
}

.g-products-table .g-sku {
    font-size: clamp(10px, 0.76vw, 10.4px);
}

.g-products-table .g-product-name {
    font-size: clamp(11px, 0.82vw, 11.2px);
}

.g-products-table th:nth-child(3),
.g-products-table td:nth-child(3) {
    text-align: right;
    white-space: nowrap;
}

.g-products-table th:nth-child(4),
.g-products-table td:nth-child(4) {
    text-align: center;
    white-space: nowrap;
}


/* ============================================================
   15. ETICHETTE DI STATO
   ============================================================ */

.g-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-width: 42px;
    padding: 4px 11px;

    border-radius: 999px;

    font-size: clamp(11px, 0.76vw, 11px);
    font-weight: 650;
    line-height: 1.2;
    white-space: nowrap;
}

.g-badge-success {
    color: #126b32;
    background: #d5f5df;
}

.g-badge-danger {
    color: #bd1728;
    background: #ffdcdf;
}

.g-badge-warning {
    color: #ce5c00;
    background: #ffe7ce;
}

.g-badge-info {
    color: #144ca2;
    background: #dce9ff;
}

.g-badge-neutral {
    color: #475467;
    background: #e9edf4;
}

.g-badge-orange {
    color: #d85d00;
    background: var(--brand-orange-light);
}

.g-badge-margin {
    min-width: clamp(45px, 3.45vw, 47.1px);
    padding: 3px 10px;

    color: #11652d;
    background: linear-gradient(
        90deg,
        #d9f8e4,
        #c9f1d8
    );

    font-weight: 700;
}

.g-badge-count {
    padding: 5px 12px;

    color: #e26300;
    background: #fff0df;

    font-size: var(--font-size-small);
    font-weight: 700;
}


/* ============================================================
   16. RIQUADRO "DA FARE OGGI"
   ============================================================ */

.g-tasks-list {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;

    width: 100%;
    min-width: 0;
}

.g-task-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: clamp(8px, 0.9vw, 12.3px);

    flex: 1 0 auto;

    min-height: clamp(32px, 3.9vh, 53px);
    padding: 6px 1px;

    border-bottom: 1px solid var(--border);
}

.g-task-row:last-child {
    border-bottom: 0;
}

.g-task-row:hover {
    background: #fafbfd;
}

.g-task-check {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.g-task-checkbox {
    appearance: none;
    -webkit-appearance: none;

    position: relative;
    display: inline-grid;
    place-content: center;

    width: clamp(17px, 1.2vw, 17px);
    height: clamp(17px, 1.2vw, 17px);

    margin: 0;

    background: #ffffff;
    border: 1.6px solid #8793a7;
    border-radius: 5px;

    cursor: pointer;

    transition:
        background var(--transition),
        border-color var(--transition);
}

.g-task-checkbox:hover {
    border-color: var(--brand-orange);
}

.g-task-checkbox:checked {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}

.g-task-checkbox:checked::after {
    width: 6px;
    height: 10px;

    content: "";
    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: translateY(-1px) rotate(45deg);
}

.g-task-description {
    min-width: 0;

    color: var(--text-primary);
    font-size: clamp(12px, 0.93vw, 12.7px);
    font-weight: 500;
    line-height: 1.3;

    cursor: pointer;
}

.g-task-number {
    color: #ef6b00;
    font-weight: 750;
}

.g-task-row:has(.g-task-checkbox:checked) .g-task-description {
    color: var(--text-muted);
    text-decoration: line-through;
}

.g-task-row:has(.g-task-checkbox:checked) .g-task-number {
    color: var(--text-muted);
}

.g-task-row:has(.g-task-checkbox:checked) .g-badge {
    opacity: 0.5;
}

.g-task-row .g-badge {
    min-width: clamp(60px, 5vw, 68.3px);
    padding-top: 4px;
    padding-bottom: 4px;
}

.g-task-link {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 26px;

    color: var(--text-muted);
    border-radius: 5px;
}

.g-task-link .g-icon {
    width: 16px;
    height: 16px;
    stroke-width: 1.8;
}

.g-task-link:hover {
    color: var(--brand-orange);
    background: var(--brand-orange-light);
}


/* ============================================================
   17. BARRA INFERIORE DEL CRUSCOTTO
   ============================================================ */

.g-dashboard-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    width: 100%;
    min-width: 0;
    min-height: 30px;
    padding: clamp(9px, 0.85vw, 11.6px) 4px 0;

    color: var(--text-secondary);
    border-top: 1px solid #dce2ec;

    font-size: var(--font-size-small);
    font-weight: 450;
}

.g-footer-left,
.g-footer-right {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.g-footer-right {
    justify-content: flex-end;
}

.g-footer-right .g-icon {
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
}

.g-status-dot {
    position: relative;

    display: inline-block;
    width: 11px;
    height: 11px;

    background: #159447;
    border-radius: 50%;

    box-shadow: 0 0 0 4px rgba(21, 148, 71, 0.12);
    flex-shrink: 0;
}

.g-status-dot.g-offline {
    background: var(--danger);
    box-shadow: 0 0 0 4px rgba(217, 37, 53, 0.12);
}

.g-status-dot.g-pending {
    background: var(--brand-orange);
    box-shadow: 0 0 0 4px rgba(255, 121, 11, 0.12);
}

.g-footer-period {
    white-space: nowrap;
}


/* ============================================================
   18. COMPONENTI RIUTILIZZABILI NELLE ALTRE PAGINE
   ============================================================ */

.g-filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;

    width: 100%;
    min-width: 0;
    padding: 12px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-medium);
}

.g-filter-group {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.g-filter-label {
    color: var(--text-primary);
    font-weight: 600;
    white-space: nowrap;
}

.g-filter-spacer {
    flex: 1 1 auto;
}

.g-section-heading {
    color: var(--text-primary);
    font-size: var(--font-size-card-title);
    font-weight: 700;
    line-height: 1.3;
}

.g-divider {
    width: 100%;
    height: 1px;
    margin: 10px 0;
    background: var(--border);
}

.g-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;

    min-height: 180px;
    padding: 30px;

    color: var(--text-muted);
    text-align: center;
}

.g-empty-state > .g-icon {
    width: 40px;
    height: 40px;
    color: var(--brand-orange);
}

.g-empty-state-title {
    color: var(--text-primary);
    font-size: 18px;
    font-weight: 650;
}

.g-data-table tfoot td {
    padding-top: 13px;
    padding-bottom: 13px;

    color: var(--text-primary);
    background: #fff0e3;
    border-top: 1px solid #ffd8b6;
    border-bottom: 1px solid #ffd8b6;

    font-weight: 750;
    white-space: nowrap;
}

.g-data-table tfoot td:first-child {
    border-left: 1px solid #ffd8b6;
    border-radius: 8px 0 0 8px;
}

.g-data-table tfoot td:last-child {
    border-right: 1px solid #ffd8b6;
    border-radius: 0 8px 8px 0;
}


/* Paginazione */

.g-pagination {
    display: flex;
    align-items: center;
    gap: 7px;
}

.g-pagination-label {
    margin-right: 10px;

    color: var(--text-secondary);
    font-size: var(--font-size-small);
}

.g-pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 34px;
    height: 34px;
    padding: 0 8px;

    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 8px;

    font-weight: 550;
}

.g-pagination-button:hover {
    border-color: var(--brand-orange);
}

.g-pagination-button.g-active,
.g-pagination-button[aria-current="page"] {
    color: #ffffff;
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}


/* ============================================================
   19. CLASSI DI UTILITÀ
   ============================================================ */

.g-text-primary {
    color: var(--text-primary);
}

.g-text-secondary {
    color: var(--text-secondary);
}

.g-text-muted {
    color: var(--text-muted);
}

.g-text-orange {
    color: var(--brand-orange-hover);
}

.g-text-success {
    color: var(--success);
}

.g-text-danger {
    color: var(--danger);
}

.g-text-right {
    text-align: right;
}

.g-text-center {
    text-align: center;
}

.g-font-medium {
    font-weight: 500;
}

.g-font-semibold {
    font-weight: 600;
}

.g-font-bold {
    font-weight: 700;
}

.g-nowrap {
    white-space: nowrap;
}

.g-tabular-nums {
    font-variant-numeric: tabular-nums;
}

.g-truncate {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.g-flex {
    display: flex;
}

.g-items-center {
    align-items: center;
}

.g-justify-between {
    justify-content: space-between;
}

.g-flex-1 {
    flex: 1;
    min-width: 0;
}

.g-w-full {
    width: 100%;
}

.g-sr-only {
    position: absolute;

    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    clip-path: inset(50%);

    border: 0;
    white-space: nowrap;
}


/* ============================================================
   20. SCHERMI DESKTOP 1440 - 1599 PX
   ============================================================ */

@media (min-width: 1280px) and (max-width: 1599px) {

    :root {
        --sidebar-width: 216px;
        --main-padding: 18px;
        --layout-gap: 12px;
        --nav-font-size: 12px;
        --font-size-kpi: 26px;
        --font-size-card-title: 19px;
    }

    .g-page-heading {
        gap: 10px;
    }

    .g-page-subtitle {
        font-size: 12px;
    }

    .g-page-actions {
        flex-basis: 44%;
        gap: 10px;
    }

    .g-period-filter {
        width: 174px;
    }

    .g-kpi-card {
        padding: 12px;
    }

    .g-kpi-top {
        gap: 8px;
    }

    .g-kpi-icon {
        width: 39px;
        height: 39px;
    }

    .g-kpi-label {
        font-size: 12px;
    }

    .g-kpi-change {
        padding: 3px 5px;
        font-size: 10px;
    }

    .g-card {
        padding-right: 15px;
        padding-left: 15px;
    }

    .g-markets-content {
        grid-template-columns: minmax(105px, 0.88fr) minmax(0, 1.5fr);
        gap: 10px;
    }

    .g-market-row {
        gap: 6px;
    }

    .g-market-name,
.g-market-amount {
        font-size: 11px;
    }

    .g-market-percentage {
        min-width: 40px;
        padding: 4px 5px;
    }

    .g-products-table {
        font-size: 12px;
    }

    .g-task-description {
        font-size: 12px;
    }
}


/* ============================================================
   21. SCHERMI DESKTOP 1920 PX
   ============================================================ */




/* ============================================================
   22. SCHERMI DESKTOP 2560 PX E ULTRAWIDE
   ============================================================ */




/* ============================================================
   23. ADATTAMENTO ALL'ALTEZZA DEL MONITOR
   Menu interamente visibile senza scorrimento laterale
   ============================================================ */

@media (min-height: 1100px) {

    :root {
        --nav-item-height: 27px;
        --nav-section-gap: 12px;
    }

    .g-sidebar {
        padding-top: 14px;
    }

    .g-dashboard {
        gap: var(--layout-gap);
    }

    .g-sales-chart-card,
.g-markets-card {
        min-height: 32vh;
    }

    .g-products-card,
.g-tasks-card {
        min-height: 26vh;
    }
}

@media (max-height: 900px) {

    :root {
        --nav-item-height: clamp(
            16px,
            calc((100dvh - var(--topbar-height) - 104px) / 34),
            24px
        );
        --nav-section-gap: 6px;
    }

    .g-sidebar {
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .g-nav-section > summary {
        height: calc(var(--nav-item-height) + 4px);
    }

    .g-main-content {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .g-kpi-card {
        min-height: 112px;
    }

    .g-sales-chart-card,
.g-markets-card {
        min-height: 245px;
    }

    .g-products-card,
.g-tasks-card {
        min-height: 210px;
    }
}

@media (max-height: 800px) {

    :root {
        --topbar-height: 50px;
        --nav-item-height: clamp(
            14px,
            calc((100dvh - var(--topbar-height) - 84px) / 34),
            21px
        );
        --nav-section-gap: 4px;
        --nav-font-size: 12px;
        --layout-gap: 11px;
    }

    .g-sidebar {
        padding-top: 3px;
        padding-bottom: 3px;
    }

    .g-nav-section > summary {
        height: calc(var(--nav-item-height) + 3px);
        font-size: 13px;
    }

    .g-nav-section-icon {
        width: 19px;
        height: 19px;
    }

    .g-nav-items {
        margin-top: 0;
    }

    .g-page-title {
        font-size: 29px;
    }

    .g-kpi-card {
        min-height: 100px;
        gap: 5px;
    }

    .g-sparkline {
        height: 29px;
    }

    .g-sales-chart-card,
.g-markets-card {
        min-height: 220px;
    }

    .g-sales-chart {
        height: 174px;
    }

    .g-products-card,
.g-tasks-card {
        min-height: 190px;
    }

    .g-task-row {
        min-height: 30px;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .g-dashboard-footer {
        padding-top: 7px;
    }
}

@media (max-height: 700px) {

    :root {
        --nav-item-height: clamp(
            12px,
            calc((100dvh - var(--topbar-height) - 54px) / 34),
            17px
        );
        --nav-section-gap: 2px;
        --nav-font-size: 11px;
    }

    .g-sidebar {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .g-nav-section > summary {
        height: calc(var(--nav-item-height) + 2px);
        font-size: 12px;
    }

    .g-nav-section-icon {
        width: 15px;
        height: 15px;
    }

    .g-nav-chevron {
        width: 11px;
        height: 11px;
    }

    .g-nav-item {
        border-radius: 5px;
    }
}

@media (max-height: 540px) {

    .g-sidebar {
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #344054 transparent;
    }

    .g-nav-item {
        min-height: 15px;
    }

    .g-nav-section > summary {
        min-height: 18px;
    }
}


/* ============================================================
   24. SCHERMI DESKTOP COMPATTI E TABLET
   ============================================================ */

@media (max-width: 1279px) {

    :root {
        --sidebar-width: 205px;
        --main-padding: 16px;
        --layout-gap: 12px;
        --nav-font-size: 12px;
    }

    .g-page-header {
        flex-wrap: wrap;
    }

    .g-page-heading {
        flex-basis: 100%;
    }

    .g-page-actions {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .g-search-control {
        max-width: 420px;
    }

    .g-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .g-dashboard-charts {
        grid-template-columns: minmax(0, 1fr);
    }

    .g-dashboard-bottom {
        grid-template-columns: minmax(0, 1fr);
    }

    .g-sales-chart {
        height: 270px;
    }

    .g-markets-content {
        grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1.3fr);
        gap: 24px;
    }

    .g-donut-wrapper {
        max-width: 220px;
    }

    .g-market-name,
.g-market-amount {
        font-size: 14px;
    }

    .g-products-table {
        font-size: 13px;
    }

    .g-task-description {
        font-size: 14px;
    }

    .g-products-card,
.g-tasks-card {
        min-height: 230px;
    }
}


/* ============================================================
   25. ADATTAMENTO A SCHERMI STRETTI
   ============================================================ */

@media (max-width: 767px) {

    :root {
        --topbar-height: 55px;
        --sidebar-width: 100%;
        --main-padding: 12px;
        --layout-gap: 12px;
        --nav-item-height: 29px;
        --nav-section-gap: 6px;
        --nav-font-size: 13px;
    }

    .g-app {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: var(--topbar-height) auto 1fr;
        grid-template-areas:
            "topbar"
            "sidebar"
            "main";
    }

    .g-topbar {
        padding: 0 12px;
    }

    .g-topbar-right {
        gap: 7px;
    }

    .g-brand-name {
        font-size: 24px;
    }

    .g-brand-icon {
        width: 25px;
        height: 25px;
    }

    .g-topbar-button {
        width: 30px;
        height: 30px;
    }

    .g-topbar-button .g-icon {
        width: 21px;
        height: 21px;
    }

    .g-company-profile {
        gap: 5px;
    }

    .g-company-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }

    .g-company-name {
        display: none;
    }

    .g-sidebar {
        position: static;

        width: 100%;
        height: auto;
        padding: 9px 12px 12px;

        overflow: visible;
    }

    .g-sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: 10px 8px;
    }

    .g-nav-section > summary {
        font-size: 13px;
    }

    .g-nav-items {
        padding-left: 0;
    }

    .g-nav-item {
        min-height: 29px;
        height: auto;
        padding: 6px 9px 6px 24px;

        font-size: 11px;
        white-space: normal;
    }

    .g-main-content {
        min-height: 0;
        border-radius: 12px 12px 0 0;
    }

    .g-page-heading-icon {
        width: 35px;
        height: 35px;
    }

    .g-page-title {
        font-size: 27px;
    }

    .g-page-subtitle {
        font-size: 12px;
    }

    .g-page-actions {
        flex-wrap: wrap;
        gap: 9px;
    }

    .g-period-filter {
        flex: 1 1 100%;
        width: 100%;
    }

    .g-search-control {
        flex: 1 1 100%;
        max-width: none;
    }

    .g-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .g-kpi-card {
        min-height: 125px;
        padding: 10px;
    }

    .g-kpi-top {
        gap: 6px;
    }

    .g-kpi-icon {
        width: 29px;
        height: 29px;
        border-radius: 7px;
    }

    .g-kpi-icon .g-icon {
        width: 19px;
        height: 19px;
    }

    .g-kpi-label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .g-kpi-label {
        font-size: 11px;
    }

    .g-kpi-value {
        font-size: clamp(19px, 4.8vw, 26px);
    }

    .g-kpi-change {
        font-size: 9px;
        padding: 2px 5px;
    }

    .g-card {
        padding: 13px;
    }

    .g-card-title {
        font-size: 18px;
    }

    .g-sales-chart {
        height: 200px;
    }

    .g-markets-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .g-donut-wrapper {
        max-width: 185px;
    }

    .g-donut-total {
        font-size: 20px;
    }

    .g-donut-label {
        font-size: 12px;
    }

    .g-market-name,
.g-market-amount {
        font-size: 13px;
    }

    .g-market-row {
        min-height: 42px;
    }

    .g-products-table {
        min-width: 475px;
    }

    .g-task-row {
        gap: 7px;
        min-height: 42px;
    }

    .g-task-description {
        font-size: 12px;
    }

    .g-task-row .g-badge {
        min-width: 50px;
        padding-right: 7px;
        padding-left: 7px;
        font-size: 10px;
    }

    .g-task-link {
        width: 16px;
    }

    .g-dashboard-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .g-footer-right {
        justify-content: flex-start;
    }
}


/* ============================================================
   26. ACCESSIBILITÀ E MOVIMENTO RIDOTTO
   ============================================================ */

@media (prefers-reduced-motion: reduce) {

    :where(.g-body) *,
:where(.g-body) *::before,
:where(.g-body) *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}


/* ============================================================
   27. STAMPA
   ============================================================ */

@media print {

    :root {
        --body-bg: #ffffff;
        --surface: #ffffff;
        --text-primary: #000000;
    }

    html:has(body.g-body),
body.g-body {
        width: 100%;
        min-height: 0;
        background: #ffffff;
    }

    .g-app {
        display: block;
        min-height: 0;
    }

    .g-topbar,
.g-sidebar,
.g-page-actions,
.g-task-link,
.g-pagination,
.g-filter-bar,
.g-button {
        display: none !important;
    }

    .g-main-content {
        display: block;
        min-height: 0;
        padding: 0;
        background: #ffffff;
        border-radius: 0;
    }

    .g-dashboard {
        display: block;
    }

    .g-page-header,
.g-kpi-grid,
.g-dashboard-charts,
.g-dashboard-bottom {
        margin-bottom: 15px;
    }

    .g-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .g-dashboard-charts {
        grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    }

    .g-dashboard-bottom {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .g-card,
.g-kpi-card {
        box-shadow: none;
        border: 1px solid #d5d5d5;
        break-inside: avoid;
    }

    .g-table-wrapper {
        overflow: visible;
    }

    .g-data-table {
        font-size: 10px;
    }

    .g-data-table thead {
        display: table-header-group;
    }

    .g-data-table tr {
        break-inside: avoid;
    }

    .g-donut-chart,
.g-badge,
.g-kpi-icon,
.g-market-color,
.g-legend-dot,
.g-data-table th,
.g-data-table tfoot td {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
/* Grafica scritta da ChatGPT (26/11), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — TABELLA PROFITTO
   Aggiungere queste regole in fondo al file style.css esistente.
   ============================================================ */

.g-profit-page {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
}

.g-profit-page .g-page-heading {
    flex-basis: 100%;
}


/* ============================================================
   FILTRI DELLA TABELLA PROFITTO
   ============================================================ */

.g-profit-filters {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 1vw, 13.7px);

    width: 100%;
    padding: clamp(10px, 0.8vw, 10.9px) 0;

    background: transparent;
    border: 0;
}

.g-profit-filters .g-filter-group {
    gap: clamp(8px, 0.75vw, 10.2px);
}

.g-profit-filters .g-filter-label {
    font-size: var(--font-size-base);
    font-weight: 650;
}

.g-profit-period {
    width: clamp(170px, 14.5vw, 198.1px);
}

.g-profit-date {
    width: clamp(140px, 10.5vw, 143.4px);
}

.g-profit-date input {
    width: 100%;
    min-width: 0;
    padding: 8px 0;

    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: 0;

    font-variant-numeric: tabular-nums;
}

.g-profit-date input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.65;
}

.g-profit-store {
    width: clamp(180px, 14vw, 191.2px);
}

.g-profit-export {
    min-height: clamp(38px, 2.65vw, 38px);
    padding-inline: clamp(14px, 1.2vw, 16.4px);
}

.g-profit-export .g-icon {
    width: 20px;
    height: 20px;
}


/* ============================================================
   RIEPILOGO ECONOMICO
   ============================================================ */

.g-profit-kpi-grid .g-kpi-card {
    min-height: clamp(110px, 14vh, 180px);
}

.g-profit-kpi-grid .g-kpi-icon {
    color: var(--brand-orange);
    background: linear-gradient(
        145deg,
        #fff3e9,
        #ffe6d0
    );
}


/* ============================================================
   CONTENITORE TABELLA
   ============================================================ */

.g-profit-table-card {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;

    min-width: 0;
    padding: clamp(12px, 1vw, 13.7px);

    overflow: hidden;
}

.g-profit-table-card .g-table-wrapper {
    flex: 1 1 auto;
}

.g-profit-table {
    width: 100%;
    min-width: 1010px;

    border-collapse: separate;
    border-spacing: 0;

    font-size: clamp(11px, 0.83vw, 11.3px);
    font-variant-numeric: tabular-nums;
    table-layout: auto;
}

.g-profit-table thead {
    background: #edf0f5;
}

.g-profit-table thead th {
    height: clamp(42px, 4.8vh, 62px);
    padding: 10px clamp(7px, 0.65vw, 8.9px);

    color: var(--text-primary);

    font-size: clamp(11px, 0.83vw, 11.3px);
    font-weight: 700;
    line-height: 1.2;
    vertical-align: middle;

    white-space: nowrap;
}

.g-profit-table thead th:first-child {
    min-width: 100px;
}

.g-profit-table thead th:last-child {
    min-width: 75px;
}

.g-profit-table tbody td {
    height: clamp(33px, 4.4vh, 57px);
    padding: clamp(7px, 0.75vh, 14px)
             clamp(7px, 0.65vw, 8.9px);

    border-bottom: 1px solid #e6eaf1;

    font-weight: 450;
    line-height: 1.25;
    vertical-align: middle;
    white-space: nowrap;
}

.g-profit-table tbody tr:nth-child(odd) {
    background: #ffffff;
}

.g-profit-table tbody tr:nth-child(even) {
    background: #f5f7fa;
}

.g-profit-table tbody tr:hover {
    background: #fff5eb;
}

.g-profit-table tbody td:first-child {
    border-radius: 6px 0 0 6px;
}

.g-profit-table tbody td:last-child {
    border-radius: 0 6px 6px 0;
}


/* Intestazione ordinamento */

.g-profit-sort-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;

    color: inherit;
    font-weight: inherit;
}

.g-profit-sort-link .g-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.g-profit-sort-link:hover {
    color: var(--brand-orange-hover);
}

.g-profit-day {
    font-weight: 550;
}

.g-profit-quantity {
    color: var(--text-primary);
    font-weight: 550;
}

.g-profit-cost {
    color: var(--text-secondary);
}

.g-profit-revenue {
    color: var(--text-primary);
    font-weight: 550;
}

.g-profit-table td.g-profit-positive {
    color: var(--success);
    font-weight: 750;
}

.g-profit-table td.g-profit-negative {
    color: var(--danger);
    font-weight: 750;
}

.g-profit-table td.g-profit-zero {
    color: var(--text-muted);
    font-weight: 650;
}


/* Margini percentuali */

.g-profit-margin {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: clamp(49px, 3.8vw, 51.9px);
    padding: 4px 9px;

    border-radius: 999px;

    font-size: clamp(11px, 0.77vw, 11px);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.g-profit-margin-positive {
    color: #126b32;
    background: #d4f4df;
}

.g-profit-margin-low {
    color: #b45d00;
    background: #ffead3;
}

.g-profit-margin-negative {
    color: #bd1728;
    background: #ffe0e3;
}


/* ============================================================
   RIGA TOTALE PERIODO
   ============================================================ */

.g-profit-table tfoot td {
    height: clamp(48px, 5.4vh, 70px);
    padding: 12px clamp(7px, 0.65vw, 8.9px);

    color: var(--text-primary);
    background: linear-gradient(
        180deg,
        #fff3e8,
        #ffeddb
    );

    border-top: 1px solid #ffd8b5;
    border-bottom: 1px solid #ffd8b5;

    font-weight: 750;
    font-size: clamp(11px, 0.87vw, 11.9px);
    vertical-align: middle;
    white-space: nowrap;
}

.g-profit-table tfoot td:first-child {
    border-left: 1px solid #ffd8b5;
    border-radius: 8px 0 0 8px;
}

.g-profit-table tfoot td:last-child {
    border-right: 1px solid #ffd8b5;
    border-radius: 0 8px 8px 0;
}

.g-profit-table tfoot .g-profit-positive {
    color: var(--success);
    font-weight: 800;
}

.g-profit-table tfoot .g-profit-negative {
    color: var(--danger);
}

.g-profit-table tfoot .g-profit-margin {
    font-weight: 750;
}

.g-profit-table tfoot .g-profit-total-spacer td {
    height: 12px;
    padding: 0;
    background: transparent;
    border: 0;
}


/* ============================================================
   INFORMAZIONI E PAGINAZIONE
   ============================================================ */

.g-profit-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;

    width: 100%;
    min-height: 42px;
    padding: 4px 3px 0;

    color: var(--text-secondary);
    font-size: var(--font-size-small);
}

.g-profit-footer-status {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.g-profit-footer-divider {
    width: 1px;
    height: 24px;
    margin-inline: 5px;
    background: var(--border-strong);
}

.g-profit-sync-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    padding: 5px 10px;

    color: #13723c;
    background: #dcf7e7;
    border-radius: 7px;

    font-size: var(--font-size-small);
    font-weight: 550;
}

.g-profit-sync-status .g-icon {
    width: 15px;
    height: 15px;
}

.g-profit-footer .g-pagination {
    margin-left: auto;
}

.g-profit-footer .g-pagination-button {
    min-width: clamp(32px, 2.2vw, 32px);
    height: clamp(32px, 2.2vw, 32px);
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.035);
}

.g-profit-footer .g-pagination-button .g-icon {
    width: 16px;
    height: 16px;
}


/* ============================================================
   DESKTOP COMPATTO
   ============================================================ */

@media (min-width: 1280px) and (max-width: 1599px) {

    .g-profit-filters {
        gap: 10px;
    }

    .g-profit-filters .g-filter-group {
        gap: 7px;
    }

    .g-profit-period {
        width: 165px;
    }

    .g-profit-date {
        width: 130px;
    }

    .g-profit-store {
        width: 160px;
    }

    .g-profit-filters .g-control {
        padding-inline: 9px;
    }

    .g-profit-filters .g-filter-label {
        font-size: 12px;
    }

    .g-profit-table thead th,
.g-profit-table tbody td,
.g-profit-table tfoot td {
        padding-inline: 7px;
    }

    .g-profit-table {
        font-size: 12px;
    }

    .g-profit-table thead th {
        font-size: 11px;
    }

    .g-profit-table tfoot td {
        font-size: 12px;
    }
}


/* ============================================================
   DESKTOP 1920 PX E SUPERIORI
   ============================================================ */






/* ============================================================
   ADATTAMENTO ALL'ALTEZZA
   ============================================================ */

@media (max-height: 900px) {

    .g-profit-filters {
        padding-top: 3px;
        padding-bottom: 3px;
    }

    .g-profit-kpi-grid .g-kpi-card {
        min-height: 108px;
    }

    .g-profit-table thead th {
        height: 43px;
    }

    .g-profit-table tbody td {
        height: 34px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .g-profit-table tfoot td {
        height: 44px;
        padding-top: 9px;
        padding-bottom: 9px;
    }
}

@media (max-height: 800px) {

    .g-profit-kpi-grid .g-kpi-card {
        min-height: 94px;
    }

    .g-profit-kpi-grid .g-sparkline {
        height: 26px;
    }

    .g-profit-table thead th {
        height: 37px;
    }

    .g-profit-table tbody td {
        height: 29px;
        padding-top: 5px;
        padding-bottom: 5px;
    }

    .g-profit-table tfoot td {
        height: 40px;
        padding-top: 7px;
        padding-bottom: 7px;
    }

    .g-profit-table tfoot .g-profit-total-spacer td {
        height: 7px;
        padding: 0;
    }
}


/* ============================================================
   TABLET E MOBILE
   ============================================================ */

@media (max-width: 1279px) {

    .g-profit-filters {
        gap: 12px;
    }

    .g-profit-filters .g-filter-spacer {
        display: none;
    }

    .g-profit-export {
        margin-left: auto;
    }

    .g-profit-table-card {
        flex-grow: 0;
    }

    .g-profit-table {
        min-width: 1050px;
    }

    .g-profit-footer {
        align-items: flex-start;
    }
}

@media (max-width: 767px) {

    .g-profit-filters {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .g-profit-filters .g-filter-group {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }

    .g-profit-filters .g-filter-group:first-child {
        grid-column: 1 / -1;
    }

    .g-profit-period,
.g-profit-date,
.g-profit-store {
        width: 100%;
    }

    .g-profit-export {
        align-self: end;
        width: 100%;
        margin-left: 0;
    }

    .g-profit-table-card {
        padding: 10px;
    }

    .g-profit-table {
        min-width: 1000px;
    }

    .g-profit-table tbody td {
        height: 38px;
    }

    .g-profit-footer {
        flex-direction: column;
        gap: 14px;
    }

    .g-profit-footer-status {
        gap: 10px;
    }

    .g-profit-footer-divider {
        display: none;
    }

    .g-profit-footer .g-pagination {
        width: 100%;
        margin-left: 0;
        flex-wrap: wrap;
    }

    .g-profit-footer .g-pagination-label {
        flex: 1 1 100%;
        margin-bottom: 4px;
    }
}


/* ============================================================
   STAMPA TABELLA PROFITTO
   ============================================================ */

@media print {

    .g-profit-filters,
.g-profit-footer .g-pagination,
.g-profit-export {
        display: none !important;
    }

    .g-profit-page {
        display: block;
    }

    .g-profit-kpi-grid {
        margin: 15px 0;
    }

    .g-profit-table-card {
        padding: 0;
        border: 0;
        overflow: visible;
    }

    .g-profit-table {
        min-width: 0;
        font-size: 9px;
    }

    .g-profit-table thead th,
.g-profit-table tbody td,
.g-profit-table tfoot td {
        height: auto;
        padding: 5px;
        font-size: 9px;
    }

    .g-profit-table tfoot {
        display: table-footer-group;
    }

    .g-profit-margin {
        min-width: 0;
        padding: 3px 5px;
        font-size: 9px;
    }

    .g-profit-table thead,
.g-profit-table tfoot td,
.g-profit-margin {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Grafica scritta da ChatGPT (26/11), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — BACHECA ORDINI
   Aggiungere in fondo al file style.css esistente.
   ============================================================ */

.g-orders-board {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
}

.g-orders-board .g-page-heading {
    flex-basis: 100%;
}


/* ============================================================
   RICERCA, FILTRI E AZIONI
   ============================================================ */

.g-board-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(10px, 0.95vw, 13px);
    width: 100%;
    min-width: 0;
    padding: clamp(8px, 0.7vw, 9.6px) 0;
}

.g-board-search {
    flex: 1 1 250px;
    min-width: 180px;
}

.g-board-filter {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding-right: 15px;
}

.g-board-filter-label {
    color: var(--text-primary);
    font-weight: 700;
    white-space: nowrap;
}

.g-board-channel-filter {
    flex: 0 1 200px;
}

.g-board-courier-filter {
    flex: 0 1 200px;
}

.g-board-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.g-board-toolbar .g-button {
    min-height: clamp(38px, 2.65vw, 38px);
    padding-inline: clamp(11px, 1.05vw, 14.3px);
}

.g-board-toolbar-actions .g-icon {
    width: 20px;
    height: 20px;
}


/* ============================================================
   GRIGLIA KANBAN
   ============================================================ */

.g-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: start;
    gap: clamp(10px, 0.85vw, 11.6px);
    flex: 1;
    width: 100%;
    min-width: 0;
}

.g-kanban-column {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
    min-height: 100%;
    border-radius: var(--radius-large);
}

.g-kanban-column.g-prepare {
    --column-color: #e76b00;
    --column-background: #ffead9;
    --column-count: #ff790b;
    --column-border: #ffd7b7;
    --column-soft: #fff5ed;
}

.g-kanban-column.g-print {
    --column-color: #225fbc;
    --column-background: #dfeaff;
    --column-count: #347bdc;
    --column-border: #c7dbf8;
    --column-soft: #f1f6ff;
}

.g-kanban-column.g-pack {
    --column-color: #6545c6;
    --column-background: #ebe4fc;
    --column-count: #8567e9;
    --column-border: #dcd0fa;
    --column-soft: #f7f3ff;
}

.g-kanban-column.g-shipped {
    --column-color: #188039;
    --column-background: #dff4e3;
    --column-count: #24933c;
    --column-border: #c9e8d0;
    --column-soft: #f0faf2;
}


/* ============================================================
   INTESTAZIONI DELLE COLONNE
   ============================================================ */

.g-kanban-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    min-height: clamp(49px, 6.1vh, 76px);
    padding: clamp(11px, 1vw, 13.7px);
    background: var(--column-background);
    border: 1px solid var(--column-border);
    border-radius: 12px;
}

.g-kanban-heading {
    display: flex;
    align-items: center;
    gap: clamp(8px, 0.8vw, 10.9px);
    min-width: 0;
}

.g-kanban-heading > .g-icon {
    width: clamp(24px, 1.9vw, 26px);
    height: clamp(24px, 1.9vw, 26px);
    color: var(--column-color);
    stroke-width: 1.8;
}

.g-kanban-title {
    color: var(--text-primary);
    font-size: clamp(16px, 1.35vw, 18.4px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.g-kanban-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: clamp(30px, 2.55vw, 34.8px);
    min-height: clamp(27px, 2.1vw, 28.7px);
    padding: 4px 11px;
    color: #ffffff;
    background: var(--column-count);
    border-radius: 999px;
    font-size: clamp(13px, 1vw, 13.7px);
    font-weight: 750;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.g-kanban-list {
    display: flex;
    flex-direction: column;
    gap: clamp(8px, 0.65vw, 8.9px);
    width: 100%;
    min-width: 0;
}


/* ============================================================
   SCHEDE ORDINE
   ============================================================ */

.g-order-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: clamp(9px, 0.7vw, 9.6px);
    min-width: 0;
    padding: clamp(10px, 0.85vw, 11.6px);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.g-order-card:hover {
    border-color: #c4cddc;
    box-shadow: var(--shadow-hover);
}

.g-order-card.g-is-overdue {
    border-left: 3px solid var(--danger);
}

.g-order-card.g-is-urgent {
    border-left: 3px solid var(--brand-orange);
}

.g-order-card.g-is-shipped {
    border-left: 3px solid #24933c;
}

.g-order-card-top {
    display: grid;
    grid-template-columns:
        clamp(54px, 4.65vw, 63.5px)
        minmax(0, 1fr)
        19px;
    align-items: start;
    gap: clamp(7px, 0.65vw, 8.9px);
    min-width: 0;
}


/* ============================================================
   ANTEPRIME PRODOTTI
   ============================================================ */

.g-order-thumbnail {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: linear-gradient(
        145deg,
        #f5f6f8,
        #e8ebef
    );
    border: 1px solid #e8ebef;
    border-radius: 8px;
    overflow: hidden;
}

.g-order-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.g-order-thumbnail > svg {
    display: block;
    width: 100%;
    height: 100%;
}

.g-product-illustration {
    width: 100%;
    height: 100%;
}

.g-order-product-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.g-order-product-title {
    color: var(--text-primary);
    font-size: clamp(12px, 0.95vw, 13px);
    font-weight: 730;
    line-height: 1.28;
    letter-spacing: -0.02em;
    overflow-wrap: anywhere;
}

.g-order-number {
    color: var(--text-secondary);
    font-size: clamp(9px, 0.68vw, 9.3px);
    font-weight: 500;
    line-height: 1.35;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.g-order-number:hover {
    color: var(--brand-orange-hover);
}


/* ============================================================
   CANALI DI VENDITA
   ============================================================ */

.g-order-channel {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    min-height: 23px;
    padding: 3px 8px;
    color: var(--text-primary);
    background: #edf0f5;
    border-radius: 7px;
    font-size: clamp(10px, 0.72vw, 10px);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.g-order-channel-amazon {
    color: #172437;
    background: #f0f1f4;
}

.g-order-channel-shopify {
    color: #367315;
    background: #eaf5df;
}

.g-channel-logo {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
}

.g-channel-logo-amazon {
    color: #182233;
}

.g-channel-logo-shopify {
    color: #599628;
}


/* ============================================================
   MENU CONTESTUALE ORDINE — DETAILS / SUMMARY
   ============================================================ */

.g-order-menu {
    position: relative;
    align-self: start;
    min-width: 0;
}

.g-order-menu > summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 23px;
    height: 25px;
    margin-left: -3px;
    padding: 0;
    color: var(--text-secondary);
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.g-order-menu > summary::-webkit-details-marker {
    display: none;
}

.g-order-menu > summary::marker {
    content: "";
}

.g-order-menu > summary:hover,
.g-order-menu[open] > summary {
    color: var(--brand-orange-hover);
    background: var(--brand-orange-light);
}

.g-order-menu > summary .g-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

.g-order-menu-panel {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    min-width: 185px;
    padding: 5px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.15);
}

.g-order-menu:not([open]) .g-order-menu-panel {
    display: none;
}

.g-order-menu-item {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    text-align: left;
    line-height: 1.3;
    white-space: nowrap;
    cursor: pointer;
}

.g-order-menu-item .g-icon {
    width: 15px;
    height: 15px;
    color: var(--text-muted);
}

.g-order-menu-item:hover {
    color: var(--brand-orange-hover);
    background: var(--brand-orange-light);
}

.g-order-menu-item:hover .g-icon {
    color: var(--brand-orange-hover);
}

.g-order-menu-divider {
    display: block;
    height: 1px;
    margin: 4px 5px;
    background: var(--border);
}

.g-order-menu-item.g-danger {
    color: var(--danger);
}

.g-order-menu-item.g-danger:hover {
    background: var(--danger-bg);
}


/* ============================================================
   DETTAGLI ORDINE
   ============================================================ */

.g-order-details {
    display: flex;
    flex-direction: column;
    gap: clamp(5px, 0.55vh, 9px);
    min-width: 0;
    padding-left: clamp(2px, 0.15vw, 2px);
}

.g-order-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    color: var(--text-primary);
    font-size: clamp(11px, 0.77vw, 11px);
    line-height: 1.35;
}

.g-order-detail-row > .g-icon {
    width: clamp(14px, 1vw, 14px);
    height: clamp(14px, 1vw, 14px);
    margin-top: 1px;
    color: #536174;
    stroke-width: 1.7;
}

.g-order-detail-text {
    min-width: 0;
    overflow-wrap: anywhere;
}

.g-order-detail-label {
    color: var(--text-muted);
    font-weight: 450;
}

.g-order-detail-value {
    color: var(--text-primary);
    font-weight: 550;
}

.g-order-sku {
    font-size: clamp(10px, 0.73vw, 10px);
    font-weight: 550;
    letter-spacing: 0.015em;
    overflow-wrap: anywhere;
}

.g-order-deadline {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.g-order-deadline.g-overdue {
    color: var(--danger);
}

.g-order-deadline.g-urgent {
    color: #d65d00;
}

.g-order-deadline.g-completed {
    color: var(--success);
}

.g-order-courier {
    font-weight: 650;
}


/* ============================================================
   ETICHETTE URGENZA E STATO
   ============================================================ */

.g-order-status-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
    min-height: 23px;
}

.g-order-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: clamp(10px, 0.73vw, 10px);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.g-order-status .g-icon {
    width: 13px;
    height: 13px;
    stroke-width: 2;
}

.g-order-status.g-overdue {
    color: #c41d30;
    background: #ffe0e4;
}

.g-order-status.g-urgent {
    color: #cd5800;
    background: #ffe6cf;
}

.g-order-status.g-normal {
    color: #536174;
    background: #edf0f5;
}

.g-order-status.g-completed {
    color: #147332;
    background: #dff5e5;
}


/* ============================================================
   AZIONI SULLE SCHEDE
   ============================================================ */

.g-order-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 7px;
    min-width: 0;
    padding-top: 9px;
    border-top: 1px solid var(--border);
}

.g-order-card-actions > form {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.g-order-next-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: clamp(29px, 2.2vw, 30.1px);
    padding: 6px 9px;
    color: var(--column-color);
    background: var(--column-soft);
    border: 1px solid var(--column-border);
    border-radius: 7px;
    font-size: clamp(10px, 0.76vw, 10.4px);
    font-weight: 650;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition);
}

.g-order-next-button .g-icon {
    width: 14px;
    height: 14px;
    stroke-width: 2;
}

.g-order-next-button:hover {
    color: #ffffff;
    background: var(--column-count);
    border-color: var(--column-count);
}

.g-order-detail-button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: clamp(30px, 2.2vw, 30.1px);
    min-height: clamp(29px, 2.2vw, 30.1px);
    color: var(--text-secondary);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.g-order-detail-button .g-icon {
    width: 16px;
    height: 16px;
}

.g-order-detail-button:hover {
    color: var(--brand-orange-hover);
    background: var(--brand-orange-light);
    border-color: #ffbf8c;
}

.g-order-tracking-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    min-height: clamp(29px, 2.2vw, 30.1px);
    padding: 6px 10px;
    color: #167437;
    background: #f0faf2;
    border: 1px solid #cce9d3;
    border-radius: 7px;
    font-size: clamp(10px, 0.76vw, 10.4px);
    font-weight: 650;
    line-height: 1.2;
}

.g-order-tracking-link:hover {
    background: #dff4e3;
}

.g-order-tracking-link .g-icon {
    width: 15px;
    height: 15px;
}


/* ============================================================
   CARICAMENTO ALTRI ORDINI
   ============================================================ */

.g-kanban-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    min-height: 35px;
    padding: 8px;
    color: var(--column-color);
    background: transparent;
    border: 1px dashed var(--column-border);
    border-radius: 8px;
    font-size: var(--font-size-small);
    font-weight: 600;
    text-align: center;
}

.g-kanban-more:hover {
    background: var(--column-soft);
    border-color: var(--column-color);
}

.g-kanban-more .g-icon {
    width: 14px;
    height: 14px;
}


/* ============================================================
   BARRA INFERIORE
   ============================================================ */

.g-board-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    width: 100%;
    min-height: 30px;
    padding: 10px 4px 0;
    color: var(--text-secondary);
    border-top: 1px solid var(--border);
    font-size: var(--font-size-small);
}

.g-board-footer-summary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.g-board-footer-summary .g-icon {
    width: 17px;
    height: 17px;
}

.g-board-footer-total {
    color: var(--text-primary);
    font-weight: 700;
}


/* ============================================================
   DESKTOP 1440 PX
   ============================================================ */

@media (min-width: 1280px) and (max-width: 1599px) {

    .g-board-toolbar {
        gap: 8px;
    }

    .g-board-search {
        min-width: 175px;
        flex-basis: 190px;
    }

    .g-board-channel-filter,
.g-board-courier-filter {
        flex-basis: 158px;
    }

    .g-board-filter {
        gap: 6px;
        padding-left: 9px;
    }

    .g-board-toolbar .g-button {
        padding-inline: 10px;
        font-size: 12px;
    }

    .g-board-toolbar-actions {
        gap: 7px;
    }

    .g-kanban-header {
        gap: 6px;
        padding: 10px;
    }

    .g-kanban-heading {
        gap: 7px;
    }

    .g-kanban-title {
        font-size: 17px;
    }

    .g-kanban-count {
        min-width: 29px;
        padding-inline: 8px;
        font-size: 13px;
    }

    .g-order-card {
        padding: 9px;
        gap: 8px;
    }

    .g-order-card-top {
        grid-template-columns: 54px minmax(0, 1fr) 15px;
        gap: 7px;
    }

    .g-order-product-title {
        font-size: 12px;
    }

    .g-order-number {
        font-size: 10px;
    }

    .g-order-detail-row {
        font-size: 11px;
    }

    .g-order-next-button {
        padding-inline: 5px;
        font-size: 10px;
    }
}


/* ============================================================
   DESKTOP 1920 PX
   ============================================================ */




/* ============================================================
   DESKTOP 2560 PX
   ============================================================ */




/* ============================================================
   ADATTAMENTO ALL'ALTEZZA
   ============================================================ */

@media (max-height: 900px) {

    .g-board-toolbar {
        padding-top: 2px;
        padding-bottom: 2px;
    }

    .g-order-card {
        gap: 7px;
    }

    .g-order-details {
        gap: 4px;
    }

    .g-order-card-actions {
        padding-top: 6px;
    }
}

@media (max-height: 800px) {

    .g-kanban-header {
        min-height: 45px;
        padding-block: 8px;
    }

    .g-kanban-list {
        gap: 7px;
    }

    .g-order-card {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .g-order-thumbnail {
        max-width: 65px;
    }

    .g-order-status-row {
        min-height: 20px;
    }

    .g-order-status {
        padding-top: 3px;
        padding-bottom: 3px;
    }
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1279px) {

    .g-kanban-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
    }

    .g-board-toolbar-actions {
        margin-left: 0;
    }

    .g-board-channel-filter,
.g-board-courier-filter {
        flex: 1 1 160px;
    }

    .g-order-card-top {
        grid-template-columns: 70px minmax(0, 1fr) 20px;
    }

    .g-order-product-title {
        font-size: 14px;
    }

    .g-order-detail-row {
        font-size: 12px;
    }

    .g-order-number {
        font-size: 11px;
    }

    .g-order-next-button {
        font-size: 12px;
    }

    .g-kanban-title {
        font-size: 19px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .g-board-toolbar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .g-board-search {
        grid-column: 1 / -1;
        max-width: none;
    }

    .g-board-filter {
        width: 100%;
        padding-left: 9px;
        gap: 6px;
    }

    .g-board-filter-label {
        font-size: 11px;
    }

    .g-board-filter select {
        font-size: 12px;
    }

    .g-board-toolbar-actions {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .g-board-toolbar-actions .g-button {
        width: 100%;
        padding-inline: 7px;
        font-size: 12px;
    }

    .g-kanban-board {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
    }

    .g-kanban-header {
        padding: 12px;
    }

    .g-kanban-title {
        font-size: 20px;
    }

    .g-order-card {
        padding: 12px;
        gap: 10px;
    }

    .g-order-card-top {
        grid-template-columns: 76px minmax(0, 1fr) 22px;
        gap: 10px;
    }

    .g-order-thumbnail {
        max-width: none;
    }

    .g-order-product-title {
        font-size: 15px;
    }

    .g-order-number {
        font-size: 11px;
    }

    .g-order-detail-row {
        font-size: 12px;
    }

    .g-order-next-button {
        min-height: 35px;
        font-size: 12px;
    }

    .g-board-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ============================================================
   STAMPA
   ============================================================ */

@media print {

    .g-board-toolbar,
.g-order-menu,
.g-order-card-actions,
.g-kanban-more {
        display: none !important;
    }

    .g-orders-board {
        display: block;
    }

    .g-kanban-board {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 12px;
    }

    .g-kanban-header {
        min-height: 35px;
        padding: 7px;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .g-kanban-title {
        font-size: 13px;
    }

    .g-order-card {
        padding: 7px;
        box-shadow: none;
        break-inside: avoid;
    }

    .g-order-product-title {
        font-size: 11px;
    }

    .g-order-detail-row,
.g-order-number {
        font-size: 9px;
    }

    .g-order-channel,
.g-order-status,
.g-kanban-count {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Grafica scritta da ChatGPT (26/11), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — CANALI COLLEGATI
   Aggiungere queste regole in fondo al file style.css esistente.
   ============================================================ */

.g-channels-page {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
}

.g-channels-page .g-page-heading {
    flex: 1 1 auto;
}

.g-channels-page .g-page-actions {
    flex: 0 0 auto;
}

.g-channels-add-button {
    min-height: clamp(40px, 2.8vw, 40px);
    padding-inline: clamp(16px, 1.4vw, 19.1px);
}


/* ============================================================
   RIEPILOGO CANALI COLLEGATI
   ============================================================ */

.g-channels-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--layout-gap);
    width: 100%;
    min-width: 0;
}

.g-channel-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: clamp(14px, 1.15vw, 15.7px);
    min-width: 0;
    min-height: clamp(150px, 18vh, 225px);
    padding: clamp(15px, 1.35vw, 18.4px);

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    box-shadow: var(--shadow-card);
}

.g-channel-card.g-connected {
    border-top: 3px solid #27934d;
}

.g-channel-card.g-coming-soon {
    border-top: 3px solid #d3d9e3;
}

.g-channel-card-top {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.05vw, 14.3px);
    min-width: 0;
}

.g-channel-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(48px, 4.3vw, 58.7px);
    height: clamp(48px, 4.3vw, 58.7px);

    border-radius: 13px;
    font-size: clamp(23px, 2vw, 27.3px);
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.05em;
}

.g-channel-avatar .g-icon {
    width: 55%;
    height: 55%;
    stroke-width: 1.7;
}

.g-channel-avatar.g-amazon {
    color: #df7100;
    background: #fff0dd;
}

.g-channel-avatar.g-shopify {
    color: #3f842a;
    background: #e9f5e3;
}

.g-channel-avatar.g-ebay {
    color: #2863bf;
    background: #e8f0ff;
}

.g-channel-avatar.g-woocommerce {
    color: #8050be;
    background: #f1e8fc;
}

.g-channel-card-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    min-width: 0;
}

.g-channel-card-title {
    color: var(--text-primary);
    font-size: clamp(17px, 1.35vw, 18.4px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.035em;
    overflow-wrap: anywhere;
}

.g-channel-card-description {
    color: var(--text-secondary);
    font-size: var(--font-size-small);
    line-height: 1.4;
}

.g-channel-connection-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;

    border-radius: 999px;
    font-size: var(--font-size-small);
    font-weight: 650;
    white-space: nowrap;
}

.g-channel-connection-status.g-connected {
    color: #18713b;
    background: #e0f5e7;
}

.g-channel-connection-status.g-pending {
    color: #b85d00;
    background: #fff0dc;
}

.g-channel-connection-status.g-upcoming {
    color: #647084;
    background: #edf0f5;
}

.g-channel-status-dot {
    display: inline-block;
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: currentColor;
    border-radius: 50%;
}

.g-channel-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 9px;

    min-width: 0;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.g-channel-update {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;

    color: var(--text-muted);
    font-size: var(--font-size-small);
    line-height: 1.35;
}

.g-channel-update .g-icon {
    width: 16px;
    height: 16px;
}

.g-channel-availability {
    display: flex;
    align-items: center;
    gap: 8px;

    color: var(--text-muted);
    font-size: var(--font-size-small);
    line-height: 1.4;
}

.g-channel-availability .g-icon {
    width: 17px;
    height: 17px;
}

.g-channel-card-button {
    min-height: 34px;
    padding: 7px 13px;
    font-size: var(--font-size-small);
}

.g-channel-card-button:disabled {
    color: var(--text-muted);
    background: var(--surface-muted);
    border-color: var(--border);
    opacity: 0.85;
}


/* ============================================================
   PERCORSO GUIDATO AMAZON
   ============================================================ */

.g-connection-wizard {
    display: flex;
    flex-direction: column;
    gap: clamp(18px, 1.45vw, 19.8px);
    flex: 1 0 auto;

    min-width: 0;
    padding: clamp(20px, 1.7vw, 23.2px);
}

.g-wizard-heading {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.05vw, 14.3px);
    min-width: 0;
}

.g-wizard-heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(44px, 3.6vw, 49.2px);
    height: clamp(44px, 3.6vw, 49.2px);

    color: var(--brand-orange);
    background: var(--brand-orange-light);
    border-radius: 13px;
}

.g-wizard-heading-icon .g-icon {
    width: 60%;
    height: 60%;
}

.g-wizard-title {
    color: var(--text-primary);
    font-size: clamp(23px, 1.8vw, 24.6px);
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.g-wizard-description {
    margin-top: 5px;

    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.5;
}


/* ============================================================
   INDICATORE DEI QUATTRO PASSI
   ============================================================ */

.g-wizard-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));

    width: 100%;
    padding: clamp(10px, 1vw, 13.7px) 0;
}

.g-wizard-step {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 11px;

    min-width: 0;
    padding: 0 10px;
    text-align: center;
}

.g-wizard-step:not(:last-child)::after {
    position: absolute;
    top: calc(clamp(38px, 3.1vw, 42.3px) / 2);
    left: 50%;
    z-index: 0;

    width: 100%;
    height: 2px;

    content: "";
    background: #dce2eb;
}

.g-wizard-step-number {
    position: relative;
    z-index: 1;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(38px, 3.1vw, 42.3px);
    height: clamp(38px, 3.1vw, 42.3px);

    color: #697586;
    background: #f0f2f6;
    border: 2px solid #d9dfe9;
    border-radius: 50%;

    font-size: clamp(17px, 1.4vw, 19.1px);
    font-weight: 750;
    line-height: 1;
}

.g-wizard-step-label {
    max-width: 230px;
    min-height: 36px;

    color: var(--text-muted);
    font-size: clamp(12px, 0.97vw, 13.3px);
    font-weight: 600;
    line-height: 1.35;
}

.g-wizard-step.g-active .g-wizard-step-number,
.g-wizard-step[aria-current="step"] .g-wizard-step-number {
    color: #ffffff;
    background: var(--brand-orange-gradient);
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 5px rgba(255, 121, 11, 0.12);
}

.g-wizard-step.g-active .g-wizard-step-label,
.g-wizard-step[aria-current="step"] .g-wizard-step-label {
    color: var(--brand-orange-hover);
    font-weight: 750;
}

.g-wizard-step.g-completed .g-wizard-step-number {
    color: #ffffff;
    background: var(--success);
    border-color: var(--success);
}

.g-wizard-step.g-completed::after {
    background: var(--success);
}

.g-wizard-step.g-completed .g-wizard-step-label {
    color: var(--success);
}


/* ============================================================
   CONTENUTO DEL PERCORSO GUIDATO
   ============================================================ */

.g-wizard-content {
    display: grid;
    grid-template-columns: minmax(0, 1.95fr) minmax(260px, 1fr);
    align-items: start;
    gap: clamp(20px, 2vw, 27.3px);

    width: 100%;
    min-width: 0;
    padding-top: clamp(15px, 1.2vw, 16.4px);

    border-top: 1px solid var(--border);
}

.g-wizard-main {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 1.35vw, 18.4px);
    min-width: 0;
}

.g-wizard-section-title {
    color: var(--text-primary);
    font-size: clamp(19px, 1.45vw, 19.8px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.03em;
}

.g-wizard-section-description {
    margin-top: 7px;

    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.5;
}


/* ============================================================
   GRIGLIA PAESI E CASELLE DI SPUNTA
   ============================================================ */

.g-country-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.g-country-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(10px, 0.85vw, 11.6px);
    width: 100%;
}

.g-country-option {
    position: relative;

    display: flex;
    align-items: center;
    gap: clamp(9px, 0.85vw, 11.6px);

    min-width: 0;
    min-height: clamp(59px, 7.2vh, 95px);
    padding: clamp(10px, 1vw, 13.7px);

    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 10px;

    cursor: pointer;
    user-select: none;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.g-country-option:hover {
    background: #fff9f3;
    border-color: #ffb47c;
}

.g-country-option:has(.g-country-checkbox:checked) {
    background: #fff4e9;
    border-color: var(--brand-orange);
    box-shadow: inset 0 0 0 1px var(--brand-orange);
}

.g-country-option:has(.g-country-checkbox:focus-visible) {
    outline: 2px solid var(--brand-orange);
    outline-offset: 3px;
}

.g-country-flag {
    display: block;
    flex-shrink: 0;

    width: clamp(31px, 2.7vw, 36.9px);
    height: auto;
    aspect-ratio: 3 / 2;

    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 4px;
    overflow: hidden;

    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.09);
}

.g-country-globe {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(31px, 2.7vw, 36.9px);
    aspect-ratio: 3 / 2;

    color: #64748b;
    background: #edf1f7;
    border-radius: 5px;
}

.g-country-globe .g-icon {
    width: 80%;
    height: 80%;
}

.g-country-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.g-country-name {
    color: var(--text-primary);
    font-size: clamp(12px, 0.99vw, 13.5px);
    font-weight: 650;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.g-country-marketplace {
    color: var(--text-muted);
    font-size: clamp(10px, 0.73vw, 10px);
    line-height: 1.3;
    white-space: nowrap;
}

.g-country-checkbox {
    appearance: none;
    -webkit-appearance: none;

    position: relative;

    display: grid;
    place-content: center;
    flex-shrink: 0;

    width: clamp(18px, 1.25vw, 18px);
    height: clamp(18px, 1.25vw, 18px);

    margin: 0 0 0 auto;

    background: #ffffff;
    border: 1.5px solid #b5bfce;
    border-radius: 5px;

    cursor: pointer;

    transition:
        border-color var(--transition),
        background var(--transition);
}

.g-country-checkbox:checked {
    background: var(--brand-orange);
    border-color: var(--brand-orange);
}

.g-country-checkbox:checked::after {
    display: block;

    width: 6px;
    height: 11px;

    content: "";
    border: solid #ffffff;
    border-width: 0 2px 2px 0;

    transform: translateY(-1px) rotate(45deg);
}

.g-country-checkbox:hover {
    border-color: var(--brand-orange);
}

.g-country-selection-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    margin-top: 13px;

    color: var(--text-muted);
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.g-country-selection-note .g-icon {
    width: 17px;
    height: 17px;
    margin-top: 2px;
    color: var(--brand-orange);
}


/* ============================================================
   PULSANTI DEL PERCORSO GUIDATO
   ============================================================ */

.g-wizard-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 14px;

    width: 100%;
    padding-top: clamp(10px, 0.9vw, 12.3px);
}

.g-wizard-cancel {
    min-height: 44px;
    padding: 10px 19px;

    color: var(--text-secondary);
    background: transparent;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-medium);

    font-size: var(--font-size-base);
    font-weight: 600;
}

.g-wizard-cancel:hover {
    color: var(--text-primary);
    background: var(--surface-secondary);
}

.g-wizard-continue {
    min-width: clamp(160px, 14vw, 191.2px);
    min-height: clamp(45px, 3.35vw, 45.8px);

    padding-inline: clamp(20px, 1.6vw, 21.9px);

    font-size: clamp(14px, 1.05vw, 14.3px);
    font-weight: 700;
}

.g-wizard-continue .g-icon {
    width: 21px;
    height: 21px;
}

.g-wizard-main:not(:has(.g-country-checkbox:checked)) .g-wizard-continue {
    color: #ffffff;
    background: #a4adba;
    box-shadow: none;
    pointer-events: none;
}

.g-wizard-main:not(:has(.g-country-checkbox:checked)) .g-wizard-continue:focus {
    outline-color: #a4adba;
}


/* ============================================================
   RIQUADRO SICUREZZA DEI DATI
   ============================================================ */

.g-security-panel {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: clamp(15px, 1.4vw, 19.1px);

    min-width: 0;
    padding: clamp(20px, 1.65vw, 22.5px);

    background: linear-gradient(
        145deg,
        #fff5e9 0%,
        #ffeddb 100%
    );

    border: 1px solid #ffd2a9;
    border-radius: var(--radius-large);
}

.g-security-panel-heading {
    display: flex;
    align-items: center;
    gap: clamp(11px, 1vw, 13.7px);
    min-width: 0;
}

.g-security-shield {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(45px, 4vw, 54.6px);
    height: clamp(45px, 4vw, 54.6px);

    color: var(--brand-orange);
    background: #ffe2c6;
    border-radius: 15px;
}

.g-security-shield .g-icon {
    width: 65%;
    height: 65%;
    stroke-width: 1.8;
}

.g-security-panel-title {
    color: #a64b06;
    font-size: clamp(18px, 1.45vw, 19.8px);
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.035em;
}

.g-security-intro {
    color: #5d4636;
    font-size: clamp(13px, 0.99vw, 13.5px);
    line-height: 1.65;
}

.g-security-intro strong {
    font-weight: 700;
}

.g-security-features {
    display: flex;
    flex-direction: column;
    gap: clamp(13px, 1.15vw, 15.7px);
}

.g-security-feature {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 11px;
    min-width: 0;
}

.g-security-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(28px, 2.05vw, 28px);
    height: clamp(28px, 2.05vw, 28px);

    color: #d56908;
    background: #ffe0c1;
    border-radius: 8px;
}

.g-security-feature-icon .g-icon {
    width: 65%;
    height: 65%;
    stroke-width: 1.9;
}

.g-security-feature-title {
    color: #6f3b13;
    font-size: clamp(12px, 0.98vw, 13.4px);
    font-weight: 700;
    line-height: 1.35;
}

.g-security-feature-description {
    margin-top: 4px;

    color: #715745;
    font-size: var(--font-size-small);
    line-height: 1.5;
}

.g-security-panel-footer {
    display: flex;
    align-items: flex-start;
    gap: 9px;

    padding-top: 15px;

    color: #a15b28;
    border-top: 1px solid #f4c69f;

    font-size: var(--font-size-small);
    line-height: 1.45;
}

.g-security-panel-footer .g-icon {
    width: 18px;
    height: 18px;
    margin-top: 1px;
}

.g-security-policy-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: #b9570b;
    font-size: var(--font-size-small);
    font-weight: 650;
}

.g-security-policy-link:hover {
    text-decoration: underline;
}

.g-security-policy-link .g-icon {
    width: 15px;
    height: 15px;
}


/* ============================================================
   FOOTER CANALI COLLEGATI
   ============================================================ */

.g-channels-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;

    width: 100%;
    min-height: 32px;
    padding: 9px 3px 0;

    color: var(--text-secondary);
    border-top: 1px solid var(--border);

    font-size: var(--font-size-small);
}

.g-channels-help {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    color: var(--text-secondary);
    font-weight: 500;
}

.g-channels-help .g-icon {
    width: 17px;
    height: 17px;
    color: var(--brand-orange);
}

.g-channels-help:hover {
    color: var(--brand-orange-hover);
}


/* ============================================================
   DESKTOP 1440 PX
   ============================================================ */

@media (min-width: 1280px) and (max-width: 1599px) {

    .g-channel-card {
        padding: 16px;
        min-height: 145px;
    }

    .g-channel-avatar {
        width: 52px;
        height: 52px;
        font-size: 26px;
    }

    .g-channel-card-title {
        font-size: 20px;
    }

    .g-connection-wizard {
        padding: 20px;
        gap: 17px;
    }

    .g-wizard-content {
        grid-template-columns: minmax(0, 1.95fr) minmax(265px, 1fr);
        gap: 20px;
    }

    .g-country-grid {
        gap: 9px;
    }

    .g-country-option {
        gap: 8px;
        min-height: 64px;
        padding: 10px;
    }

    .g-country-name {
        font-size: 13px;
    }

    .g-country-marketplace {
        font-size: 10px;
    }

    .g-country-flag,
.g-country-globe {
        width: 34px;
    }

    .g-country-checkbox {
        width: 17px;
        height: 17px;
    }

    .g-security-panel {
        padding: 18px;
        gap: 16px;
    }

    .g-security-panel-title {
        font-size: 20px;
    }

    .g-security-intro {
        font-size: 13px;
    }
}


/* ============================================================
   DESKTOP 1920 PX
   ============================================================ */




/* ============================================================
   DESKTOP 2560 PX
   ============================================================ */




/* ============================================================
   ADATTAMENTO ALL'ALTEZZA DEL MONITOR
   ============================================================ */

@media (max-height: 900px) {

    .g-channel-card {
        min-height: 130px;
        gap: 11px;
    }

    .g-channel-card-bottom {
        padding-top: 9px;
    }

    .g-connection-wizard {
        gap: 15px;
    }

    .g-wizard-steps {
        padding-top: 6px;
        padding-bottom: 6px;
    }

    .g-wizard-step {
        gap: 8px;
    }

    .g-wizard-content {
        padding-top: 15px;
    }

    .g-wizard-main {
        gap: 14px;
    }

    .g-country-option {
        min-height: 58px;
    }

    .g-security-panel {
        gap: 15px;
    }

    .g-security-features {
        gap: 12px;
    }

    .g-wizard-actions {
        padding-top: 3px;
    }
}

@media (max-height: 800px) {

    .g-channel-card {
        min-height: 115px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .g-channel-card-top {
        gap: 10px;
    }

    .g-channel-avatar {
        width: 44px;
        height: 44px;
        font-size: 23px;
    }

    .g-connection-wizard {
        gap: 12px;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .g-wizard-step-number {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .g-wizard-step:not(:last-child)::after {
        top: 17px;
    }

    .g-wizard-step-label {
        min-height: 30px;
        font-size: 12px;
    }

    .g-country-grid {
        gap: 8px;
    }

    .g-country-option {
        min-height: 52px;
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .g-security-panel {
        padding-top: 15px;
        padding-bottom: 15px;
        gap: 12px;
    }

    .g-security-features {
        gap: 10px;
    }

    .g-security-panel-footer {
        padding-top: 10px;
    }
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1279px) {

    .g-channels-page .g-page-heading {
        flex-basis: 100%;
    }

    .g-channels-page .g-page-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .g-channels-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .g-channel-card {
        padding: 13px;
    }

    .g-channel-card-top {
        flex-wrap: wrap;
    }

    .g-channel-card-title {
        font-size: 17px;
    }

    .g-wizard-content {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .g-country-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .g-country-option {
        min-height: 65px;
    }

    .g-country-name {
        font-size: 14px;
    }

    .g-security-features {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .g-security-panel {
        padding: 22px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .g-channels-page .g-page-actions {
        justify-content: stretch;
    }

    .g-channels-add-button {
        width: 100%;
    }

    .g-channels-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 10px;
    }

    .g-channel-card {
        min-height: 120px;
        padding: 15px;
    }

    .g-channel-card-top {
        flex-wrap: nowrap;
    }

    .g-channel-avatar {
        width: 50px;
        height: 50px;
        font-size: 25px;
    }

    .g-channel-card-title {
        font-size: 20px;
    }

    .g-connection-wizard {
        padding: 15px;
        gap: 20px;
    }

    .g-wizard-heading {
        align-items: flex-start;
        gap: 10px;
    }

    .g-wizard-heading-icon {
        width: 40px;
        height: 40px;
    }

    .g-wizard-title {
        font-size: 22px;
    }

    .g-wizard-description {
        font-size: 12px;
    }

    .g-wizard-steps {
        padding: 4px 0;
    }

    .g-wizard-step {
        gap: 8px;
        padding-inline: 3px;
    }

    .g-wizard-step-number {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .g-wizard-step:not(:last-child)::after {
        top: 15px;
    }

    .g-wizard-step-label {
        font-size: 10px;
        line-height: 1.4;
    }

    .g-wizard-content {
        padding-top: 16px;
        gap: 20px;
    }

    .g-wizard-section-title {
        font-size: 19px;
    }

    .g-country-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .g-country-option {
        min-height: 62px;
        gap: 7px;
        padding: 9px;
    }

    .g-country-flag,
.g-country-globe {
        width: 29px;
    }

    .g-country-name {
        font-size: 12px;
    }

    .g-country-marketplace {
        font-size: 10px;
    }

    .g-country-checkbox {
        width: 16px;
        height: 16px;
    }

    .g-wizard-actions {
        display: grid;
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
        gap: 9px;
    }

    .g-wizard-cancel,
.g-wizard-continue {
        width: 100%;
        min-width: 0;
    }

    .g-security-panel {
        padding: 18px;
        gap: 17px;
    }

    .g-security-features {
        grid-template-columns: minmax(0, 1fr);
        gap: 15px;
    }

    .g-security-panel-title {
        font-size: 21px;
    }

    .g-security-intro {
        font-size: 13px;
    }

    .g-channels-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* ============================================================
   STAMPA
   ============================================================ */

@media print {

    .g-channels-add-button,
.g-wizard-actions,
.g-channel-card-button,
.g-channels-help {
        display: none !important;
    }

    .g-channels-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        margin-bottom: 15px;
    }

    .g-connection-wizard {
        padding: 15px;
        box-shadow: none;
    }

    .g-wizard-content {
        grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    }

    .g-country-option,
.g-country-flag,
.g-country-checkbox,
.g-channel-avatar,
.g-channel-connection-status,
.g-wizard-step-number,
.g-security-panel {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}

/* Grafica scritta da ChatGPT (26/11), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — PAGINA ACCESSO
   Aggiungere queste regole in fondo al file style.css esistente.
   ============================================================ */

.g-login-page {
    min-height: 100vh;
    min-height: 100dvh;
    background: #ffffff;
}

.g-login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}


/* ============================================================
   PANNELLO SINISTRO — PRESENTAZIONE
   ============================================================ */

.g-login-presentation {
    position: relative;
    isolation: isolate;

    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
    min-height: 100%;
    padding:
        clamp(35px, 4.5vh, 90px)
        clamp(40px, 4.6vw, 62.8px);

    color: #ffffff;

    background:
        radial-gradient(
            ellipse at 100% 100%,
            rgba(29, 64, 109, 0.35),
            transparent 65%
        ),
        linear-gradient(
            145deg,
            #0c1625 0%,
            #101e31 50%,
            #142942 100%
        );

    overflow: hidden;
}


/* Fascia arancione */

.g-login-presentation::before {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: -1;

    height: 7px;

    content: "";
    background: var(--brand-orange-gradient);
}


/* Elementi grafici decorativi */

.g-login-presentation::after {
    position: absolute;
    right: -280px;
    bottom: -320px;
    z-index: -1;

    width: 650px;
    height: 650px;

    content: "";
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 50%;

    box-shadow:
        0 0 0 70px rgba(255, 255, 255, 0.018),
        0 0 0 140px rgba(255, 255, 255, 0.012),
        0 0 0 210px rgba(255, 255, 255, 0.008);

    pointer-events: none;
}

.g-login-presentation-content {
    display: flex;
    flex-direction: column;
    gap: clamp(25px, 3.4vh, 52px);

    width: 100%;
    max-width: 850px;
    margin-inline: auto;
}


/* ============================================================
   LOGO DESKZON
   ============================================================ */

.g-login-brand {
    align-self: flex-start;
    gap: 12px;
}

.g-login-brand .g-brand-icon {
    width: clamp(43px, 3.6vw, 49.2px);
    height: clamp(43px, 3.6vw, 49.2px);
    stroke-width: 1.9;
}

.g-login-brand .g-brand-name {
    font-size: clamp(37px, 3.1vw, 42.3px);
    font-weight: 750;
    letter-spacing: -0.055em;
}

.g-login-brand .g-brand-accent {
    color: var(--brand-orange);
}


/* ============================================================
   TITOLO DI PRESENTAZIONE
   ============================================================ */

.g-login-marketing {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.g-login-marketing-kicker {
    display: flex;
    align-items: center;
    gap: 9px;

    color: #ff9e52;

    font-size: clamp(10px, 0.78vw, 10.7px);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.g-login-marketing-kicker::before {
    display: block;
    flex-shrink: 0;

    width: 27px;
    height: 3px;

    content: "";
    background: var(--brand-orange);
    border-radius: 3px;
}

.g-login-marketing-title {
    max-width: 810px;

    color: #ffffff;
    font-size: clamp(35px, 3.45vw, 47.1px);
    font-weight: 780;
    line-height: 1.13;
    letter-spacing: -0.047em;
}

.g-login-marketing-accent {
    display: block;
    color: var(--brand-orange);
}

.g-login-marketing-description {
    max-width: 700px;

    color: #c1cddd;
    font-size: clamp(14px, 1.08vw, 14.8px);
    font-weight: 400;
    line-height: 1.65;
}


/* ============================================================
   VANTAGGI DELLA PIATTAFORMA
   ============================================================ */

.g-login-features {
    display: flex;
    flex-direction: column;
    gap: clamp(15px, 2vh, 28px);

    width: 100%;
}

.g-login-feature {
    display: flex;
    align-items: center;
    gap: clamp(13px, 1.15vw, 15.7px);

    min-width: 0;
}

.g-login-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(43px, 3.45vw, 47.1px);
    height: clamp(43px, 3.45vw, 47.1px);

    color: #ff923b;
    background: rgba(255, 121, 11, 0.09);
    border: 1px solid rgba(255, 121, 11, 0.3);
    border-radius: 12px;
}

.g-login-feature-icon .g-icon {
    width: 56%;
    height: 56%;
    stroke-width: 1.7;
}

.g-login-feature-content {
    min-width: 0;
}

.g-login-feature-title {
    color: #ffffff;
    font-size: clamp(14px, 1.13vw, 15.4px);
    font-weight: 650;
    line-height: 1.35;
}

.g-login-feature-description {
    margin-top: 4px;

    color: #aebed2;
    font-size: clamp(11px, 0.84vw, 11.5px);
    font-weight: 400;
    line-height: 1.45;
}


/* ============================================================
   ANTEPRIMA DIMOSTRATIVA DEL CRUSCOTTO
   ============================================================ */

.g-login-preview {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: clamp(13px, 1.15vw, 15.7px);

    min-width: 0;
    padding: clamp(17px, 1.6vw, 21.9px);

    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.075),
        rgba(255, 255, 255, 0.025)
    );

    border: 1px solid rgba(190, 211, 240, 0.18);
    border-radius: 16px;

    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.17);
}

.g-login-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    min-width: 0;
}

.g-login-preview-title {
    color: #ffffff;
    font-size: clamp(13px, 1.02vw, 13.9px);
    font-weight: 650;
}

.g-login-preview-period {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 9px;

    color: #c3cfdf;
    background: rgba(255, 255, 255, 0.045);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 6px;

    font-size: clamp(10px, 0.73vw, 10px);
    white-space: nowrap;
}

.g-login-preview-period .g-icon {
    width: 13px;
    height: 13px;
}

.g-login-preview-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;

    min-width: 0;
}

.g-login-preview-kpi {
    display: flex;
    flex-direction: column;
    gap: 5px;

    min-width: 0;
    padding: clamp(9px, 0.85vw, 11.6px);

    background: rgba(7, 15, 27, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.085);
    border-radius: 9px;
}

.g-login-preview-kpi-label {
    color: #b9c7da;
    font-size: clamp(10px, 0.73vw, 10px);
    font-weight: 450;
    white-space: nowrap;
}

.g-login-preview-kpi-value {
    color: #ffffff;
    font-size: clamp(17px, 1.4vw, 19.1px);
    font-weight: 740;
    line-height: 1.2;
    letter-spacing: -0.035em;

    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.g-login-preview-kpi-value.g-accent {
    color: #ff923b;
}

.g-login-preview-change {
    display: flex;
    align-items: center;
    gap: 4px;

    color: #72daa0;
    font-size: clamp(10px, 0.7vw, 10px);
    font-weight: 600;
}

.g-login-preview-change .g-icon {
    width: 12px;
    height: 12px;
}


/* Grafico SVG */

.g-login-preview-chart {
    display: block;

    width: 100%;
    height: clamp(105px, 13.5vh, 220px);

    overflow: visible;
}

.g-login-chart-grid {
    fill: none;
    stroke: #90a8c6;
    stroke-opacity: 0.18;
    stroke-width: 1;
    stroke-dasharray: 4 4;
    vector-effect: non-scaling-stroke;
}

.g-login-chart-label {
    fill: #aabbd1;
    font-family: var(--font-family);
    font-size: 10px;
    font-weight: 400;
}

.g-login-chart-label-y {
    text-anchor: end;
}

.g-login-chart-label-x {
    text-anchor: middle;
}

.g-login-chart-sales {
    fill: none;
    stroke: #86b3ee;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.g-login-chart-profit {
    fill: none;
    stroke: var(--brand-orange);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.g-login-chart-sales-start {
    stop-color: #6d9bd6;
    stop-opacity: 0.2;
}

.g-login-chart-sales-end {
    stop-color: #6d9bd6;
    stop-opacity: 0;
}

.g-login-chart-profit-start {
    stop-color: #ff790b;
    stop-opacity: 0.27;
}

.g-login-chart-profit-end {
    stop-color: #ff790b;
    stop-opacity: 0;
}

.g-login-preview-legend {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 23px;
}

.g-login-preview-legend .g-legend-item {
    color: #c2cfe0;
    font-size: clamp(10px, 0.73vw, 10px);
}

.g-login-preview-legend .g-legend-dot {
    width: 9px;
    height: 9px;
}

.g-login-preview-legend .g-legend-dot.g-sales {
    background: #86b3ee;
}

.g-login-preview-legend .g-legend-dot.g-profit {
    background: var(--brand-orange);
}

.g-login-preview-caption {
    color: #98abc3;
    font-size: clamp(10px, 0.7vw, 10px);
    text-align: center;
}


/* ============================================================
   PANNELLO DESTRO — ACCESSO
   ============================================================ */

.g-login-access {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-width: 0;
    min-height: 100%;
    padding:
        clamp(30px, 5vh, 85px)
        clamp(35px, 4.8vw, 65.6px);

    background: #ffffff;
}

.g-login-access-inner {
    display: flex;
    flex-direction: column;
    gap: clamp(23px, 3.4vh, 48px);

    width: 100%;
    max-width: 540px;
}

.g-login-access-heading {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.g-login-access-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: clamp(48px, 3.75vw, 51.2px);
    height: clamp(48px, 3.75vw, 51.2px);
    margin-bottom: 8px;

    color: var(--brand-orange);
    background: var(--brand-orange-light);
    border-radius: 14px;
}

.g-login-access-icon .g-icon {
    width: 56%;
    height: 56%;
    stroke-width: 1.8;
}

.g-login-title {
    color: var(--text-primary);
    font-size: clamp(30px, 2.5vw, 34.1px);
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.047em;
}

.g-login-subtitle {
    color: var(--text-secondary);
    font-size: clamp(14px, 1vw, 14px);
    font-weight: 400;
    line-height: 1.65;
}


/* ============================================================
   FORM DI ACCESSO
   ============================================================ */

.g-login-form {
    display: flex;
    flex-direction: column;
    gap: clamp(19px, 2.5vh, 34px);

    width: 100%;
}

.g-login-field {
    display: flex;
    flex-direction: column;
    gap: 9px;

    width: 100%;
    min-width: 0;
}

.g-login-field-label {
    display: block;

    color: var(--text-primary);
    font-size: clamp(13px, 0.98vw, 13.4px);
    font-weight: 650;
    line-height: 1.3;
}

.g-login-field-control {
    position: relative;

    display: flex;
    align-items: center;
    gap: 13px;

    width: 100%;
    min-width: 0;
    min-height: clamp(53px, 3.65vw, 53px);
    padding: 0 clamp(13px, 1.1vw, 15px);

    background: #ffffff;
    border: 1px solid #cfd6e1;
    border-radius: 10px;

    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.g-login-field-control:hover {
    border-color: #9faabb;
}

.g-login-field-control:focus-within {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 4px rgba(255, 121, 11, 0.095);
}

.g-login-field-control > .g-icon {
    width: clamp(19px, 1.35vw, 19px);
    height: clamp(19px, 1.35vw, 19px);

    color: #7b8799;
    stroke-width: 1.7;
}

.g-login-field-control:focus-within > .g-icon {
    color: var(--brand-orange-hover);
}

.g-login-field-control input {
    flex: 1 1 auto;

    width: 100%;
    min-width: 0;
    min-height: 100%;
    padding: 15px 0;

    color: var(--text-primary);
    background: transparent;
    border: 0;
    outline: none;

    font-family: var(--font-family);
    font-size: clamp(14px, 1.05vw, 14.3px);
    font-weight: 450;
    line-height: 1.3;
}

.g-login-field-control input:focus-visible {
    outline: none;
}

.g-login-field-control input::placeholder {
    color: #929cac;
    font-weight: 400;
    opacity: 1;
}

.g-login-field-control input:-webkit-autofill {
    -webkit-text-fill-color: var(--text-primary);
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
}

.g-login-field-control input::-ms-reveal,
.g-login-field-control input::-ms-clear {
    display: none;
}


/* ============================================================
   PULSANTE MOSTRA PASSWORD
   ============================================================ */

.g-login-password-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: clamp(30px, 2.1vw, 30px);
    height: clamp(30px, 2.1vw, 30px);
    margin-right: -5px;
    padding: 5px;

    color: #748196;
    background: transparent;
    border: 0;
    border-radius: 6px;

    cursor: pointer;

    transition:
        color var(--transition),
        background var(--transition);
}

.g-login-password-toggle:hover {
    color: var(--brand-orange-hover);
    background: var(--brand-orange-light);
}

.g-login-password-toggle .g-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.7;
}

.g-login-password-toggle .g-login-eye-off {
    display: none;
}

.g-login-password-toggle[aria-pressed="true"] .g-login-eye {
    display: none;
}

.g-login-password-toggle[aria-pressed="true"] .g-login-eye-off {
    display: block;
}


/* ============================================================
   RECUPERO PASSWORD
   ============================================================ */

.g-login-password-options {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    width: 100%;
    margin-top: 2px;
}

.g-login-forgot-password {
    color: var(--brand-orange-hover);

    font-size: clamp(12px, 0.89vw, 12.2px);
    font-weight: 650;
    line-height: 1.4;
}

.g-login-forgot-password:hover {
    color: #b94d00;
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ============================================================
   CODICE DI SICUREZZA A SEI CIFRE
   Un unico input reale, sei caselle grafiche.
   ============================================================ */

.g-login-verification {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
    padding-top: 4px;
}

.g-login-verification-heading {
    display: flex;
    align-items: center;
    gap: 9px;
}

.g-login-verification-heading > .g-icon {
    width: 19px;
    height: 19px;

    color: var(--brand-orange);
    stroke-width: 1.8;
}

.g-login-verification-description {
    color: var(--text-muted);
    font-size: clamp(12px, 0.86vw, 12px);
    line-height: 1.5;
}

.g-login-code-control {
    --code-gap: clamp(5px, 0.55vw, 7.5px);
    --code-height: clamp(53px, 4.1vw, 56px);
    --code-cell-width: calc(
        (100% - 5 * var(--code-gap)) / 6
    );

    position: relative;

    width: 100%;
    height: var(--code-height);

    font-size: clamp(23px, 1.8vw, 24.6px);
    font-family: monospace;
}

.g-login-code-boxes {
    position: absolute;
    inset: 0;

    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: var(--code-gap);

    pointer-events: none;
}

.g-login-code-box {
    display: flex;
    align-items: center;
    justify-content: center;

    min-width: 0;
    height: 100%;

    color: #b6bfcd;
    background: #ffffff;
    border: 1px solid #cfd6e1;
    border-radius: 10px;

    transition:
        background var(--transition),
        border-color var(--transition),
        box-shadow var(--transition);
}

.g-login-code-box::after {
    width: 11px;
    height: 2px;

    content: "";
    background: #cdd4df;
    border-radius: 2px;

    transition: opacity var(--transition);
}


/* Input reale sopra le sei caselle */

.g-login-code-input {
    position: relative;
    z-index: 1;

    display: block;

    width: 100%;
    height: 100%;
    margin: 0;

    padding-block: 0;
    padding-inline-start: calc(
        (var(--code-cell-width) - 1ch) / 2
    );
    padding-inline-end: 0;

    color: var(--text-primary);
    background: transparent;
    border: 0;
    border-radius: 10px;
    outline: none;

    font-family: monospace;
    font-size: inherit;
    font-weight: 600;
    line-height: var(--code-height);
    font-variant-numeric: tabular-nums;

    letter-spacing: calc(
        var(--code-cell-width) + var(--code-gap) - 1ch
    );

    text-align: left;
    caret-color: var(--brand-orange);
}

.g-login-code-input:focus-visible {
    outline: none;
}

.g-login-code-control:focus-within .g-login-code-box {
    border-color: var(--brand-orange);
    box-shadow: 0 0 0 3px rgba(255, 121, 11, 0.07);
}

.g-login-code-control:focus-within .g-login-code-box::after,
.g-login-code-control:has(
    .g-login-code-input:not(:placeholder-shown)
) .g-login-code-box::after {
    opacity: 0;
}

.g-login-code-control:has(.g-login-code-input:valid)
.g-login-code-box {
    border-color: #68b986;
    background: #f7fcf9;
}

.g-login-code-control:has(
    .g-login-code-input:user-invalid
) .g-login-code-box {
    border-color: var(--danger);
    background: #fff7f7;
}

.g-login-verification-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    color: var(--text-muted);
    font-size: clamp(11px, 0.78vw, 11px);
    line-height: 1.5;
}

.g-login-verification-note .g-icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
}


/* ============================================================
   PULSANTE PRINCIPALE ACCEDI
   ============================================================ */

.g-login-submit {
    width: 100%;
    min-height: clamp(53px, 3.8vw, 53px);
    margin-top: 3px;
    padding: 15px 24px;

    color: #ffffff;
    background: var(--brand-orange-gradient);
    border: 0;
    border-radius: 10px;

    font-size: clamp(16px, 1.2vw, 16.4px);
    font-weight: 720;
    line-height: 1.3;

    box-shadow:
        0 3px 7px rgba(255, 112, 0, 0.15),
        0 8px 20px rgba(255, 112, 0, 0.09);

    transition:
        background var(--transition),
        box-shadow var(--transition),
        transform var(--transition);
}

.g-login-submit:hover {
    background: linear-gradient(
        90deg,
        #ed6300,
        #ff8016
    );

    box-shadow:
        0 5px 12px rgba(255, 112, 0, 0.22),
        0 10px 25px rgba(255, 112, 0, 0.12);
}

.g-login-submit:active {
    transform: translateY(1px);
}

.g-login-submit .g-icon {
    width: 21px;
    height: 21px;
    stroke-width: 2;
}


/* ============================================================
   CREAZIONE NUOVO ACCOUNT
   ============================================================ */

.g-login-register {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;

    width: 100%;
    margin-top: -4px;

    color: var(--text-secondary);
    font-size: clamp(13px, 0.94vw, 13px);
    line-height: 1.5;
    text-align: center;
}

.g-login-register-link {
    color: var(--brand-orange-hover);
    font-weight: 700;
}

.g-login-register-link:hover {
    color: #b94d00;
    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ============================================================
   SICUREZZA E PRIVACY
   ============================================================ */

.g-login-security {
    display: flex;
    flex-direction: column;
    gap: 13px;

    width: 100%;
    padding-top: clamp(19px, 2.2vh, 34px);

    border-top: 1px solid var(--border);
}

.g-login-security-line {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    color: var(--text-secondary);
    font-size: clamp(11px, 0.8vw, 11px);
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
}

.g-login-security-line > .g-icon {
    width: 21px;
    height: 21px;

    color: #24934b;
    stroke-width: 1.8;
}

.g-login-legal {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;

    color: var(--text-muted);
    font-size: clamp(10px, 0.72vw, 10px);
    text-align: center;
}

.g-login-legal a:hover {
    color: var(--brand-orange-hover);
    text-decoration: underline;
}

.g-login-legal-separator {
    width: 3px;
    height: 3px;

    background: #a9b3c1;
    border-radius: 50%;
}


/* ============================================================
   MESSAGGI DI ERRORE DEL BACKEND
   ============================================================ */

.g-login-error {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    width: 100%;
    padding: 13px 15px;

    color: #b42332;
    background: #fff0f1;
    border: 1px solid #f5c1c7;
    border-radius: 9px;

    font-size: var(--font-size-base);
    line-height: 1.5;
}

.g-login-error > .g-icon {
    width: 19px;
    height: 19px;
    margin-top: 1px;
}

.g-login-field-control:has(input[aria-invalid="true"]) {
    border-color: var(--danger);
}

.g-login-field-error {
    color: var(--danger);
    font-size: var(--font-size-small);
    line-height: 1.4;
}


/* ============================================================
   DESKTOP 1440 PX
   ============================================================ */

@media (min-width: 1280px) and (max-width: 1599px) {

    .g-login-presentation {
        padding-inline: 52px;
    }

    .g-login-access {
        padding-inline: 65px;
    }

    .g-login-access-inner {
        max-width: 450px;
    }

    .g-login-marketing-title {
        font-size: 47px;
    }

    .g-login-marketing-description {
        font-size: 15px;
    }

    .g-login-feature-title {
        font-size: 16px;
    }

    .g-login-feature-description {
        font-size: 12px;
    }

    .g-login-title {
        font-size: 37px;
    }

    .g-login-preview {
        padding: 17px;
    }
}


/* ============================================================
   DESKTOP 1920 PX
   ============================================================ */




/* ============================================================
   DESKTOP 2560 PX
   ============================================================ */




/* ============================================================
   ADATTAMENTO ALL'ALTEZZA DEL MONITOR
   ============================================================ */

@media (max-height: 950px) and (min-width: 1024px) {

    .g-login-presentation,
.g-login-access {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .g-login-presentation-content {
        gap: 25px;
    }

    .g-login-features {
        gap: 14px;
    }

    .g-login-marketing {
        gap: 10px;
    }

    .g-login-feature-icon {
        width: 44px;
        height: 44px;
    }

    .g-login-preview {
        gap: 12px;
    }

    .g-login-preview-chart {
        height: 112px;
    }

    .g-login-access-inner {
        gap: 23px;
    }

    .g-login-form {
        gap: 19px;
    }

    .g-login-access-icon {
        width: 47px;
        height: 47px;
        margin-bottom: 3px;
    }

    .g-login-security {
        padding-top: 17px;
    }
}

@media (max-height: 800px) and (min-width: 1024px) {

    .g-login-presentation,
.g-login-access {
        padding-top: 22px;
        padding-bottom: 22px;
    }

    .g-login-presentation-content {
        gap: 19px;
    }

    .g-login-brand .g-brand-icon {
        width: 39px;
        height: 39px;
    }

    .g-login-brand .g-brand-name {
        font-size: 36px;
    }

    .g-login-marketing-title {
        font-size: clamp(32px, 2.9vw, 39.6px);
    }

    .g-login-marketing-description {
        font-size: 13px;
    }

    .g-login-features {
        gap: 11px;
    }

    .g-login-feature-icon {
        width: 38px;
        height: 38px;
        border-radius: 9px;
    }

    .g-login-feature-title {
        font-size: 14px;
    }

    .g-login-feature-description {
        margin-top: 2px;
        font-size: 11px;
    }

    .g-login-preview {
        padding: 13px;
        gap: 9px;
    }

    .g-login-preview-kpi {
        padding: 8px 10px;
    }

    .g-login-preview-chart {
        height: 95px;
    }

    .g-login-access-inner {
        gap: 18px;
    }

    .g-login-access-heading {
        gap: 7px;
    }

    .g-login-access-icon {
        width: 40px;
        height: 40px;
    }

    .g-login-title {
        font-size: 34px;
    }

    .g-login-subtitle {
        font-size: 13px;
    }

    .g-login-form {
        gap: 15px;
    }

    .g-login-field {
        gap: 7px;
    }

    .g-login-field-control {
        min-height: 47px;
    }

    .g-login-field-control input {
        padding-block: 12px;
    }

    .g-login-verification {
        gap: 9px;
    }

    .g-login-code-control {
        --code-height: 50px;
    }

    .g-login-submit {
        min-height: 49px;
    }

    .g-login-security {
        padding-top: 13px;
        gap: 9px;
    }
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 1279px) {

    .g-login-presentation {
        padding-inline: 35px;
    }

    .g-login-access {
        padding-inline: 35px;
    }

    .g-login-marketing-title {
        font-size: clamp(32px, 3.7vw, 46px);
    }

    .g-login-preview-kpis {
        gap: 7px;
    }

    .g-login-preview-kpi {
        padding: 9px;
    }

    .g-login-preview-kpi-value {
        font-size: 18px;
    }
}

@media (max-width: 1023px) {

    .g-login-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .g-login-presentation {
        min-height: auto;
        padding: 36px 45px;
    }

    .g-login-presentation-content {
        max-width: 650px;
        gap: 25px;
    }

    .g-login-marketing-title {
        max-width: 650px;
        font-size: 42px;
    }

    .g-login-features,
.g-login-preview {
        display: none;
    }

    .g-login-access {
        min-height: auto;
        padding: 45px 35px 55px;
    }

    .g-login-access-inner {
        max-width: 500px;
        gap: 25px;
    }

    .g-login-title {
        font-size: 36px;
    }

    .g-login-form {
        gap: 22px;
    }

    .g-login-field-control {
        min-height: 55px;
    }

    .g-login-code-control {
        --code-height: 58px;
        --code-gap: 8px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    .g-login-presentation {
        padding: 26px 24px 30px;
    }

    .g-login-presentation::before {
        height: 5px;
    }

    .g-login-presentation-content {
        gap: 20px;
    }

    .g-login-brand {
        gap: 8px;
    }

    .g-login-brand .g-brand-icon {
        width: 35px;
        height: 35px;
    }

    .g-login-brand .g-brand-name {
        font-size: 32px;
    }

    .g-login-marketing {
        gap: 10px;
    }

    .g-login-marketing-kicker {
        font-size: 9px;
    }

    .g-login-marketing-title {
        font-size: clamp(28px, 7vw, 38px);
    }

    .g-login-marketing-description {
        font-size: 13px;
        line-height: 1.6;
    }

    .g-login-access {
        padding: 30px 24px 35px;
    }

    .g-login-access-inner {
        gap: 23px;
    }

    .g-login-access-icon {
        display: none;
    }

    .g-login-title {
        font-size: 30px;
    }

    .g-login-subtitle {
        font-size: 13px;
    }

    .g-login-field-label {
        font-size: 14px;
    }

    .g-login-field-control {
        gap: 10px;
        min-height: 52px;
        padding-inline: 12px;
    }

    .g-login-field-control input {
        font-size: 16px;
    }

    .g-login-form {
        gap: 19px;
    }

    .g-login-code-control {
        --code-gap: 6px;
        --code-height: 53px;

        font-size: 25px;
    }

    .g-login-code-box {
        border-radius: 8px;
    }

    .g-login-submit {
        min-height: 53px;
        font-size: 17px;
    }

    .g-login-register {
        font-size: 13px;
    }

    .g-login-security-line {
        font-size: 11px;
    }

    .g-login-security-line > .g-icon {
        width: 18px;
        height: 18px;
    }

    .g-login-legal {
        gap: 8px;
        font-size: 11px;
    }
}

/* Grafica scritta da ChatGPT (27/11, Recensioni e messaggi), adattata: classi g-*, regole solo nelle pagine interne */
/* ============================================================
   DESKZON — RECENSIONI E MESSAGGI
   Aggiungere in fondo al file style.css esistente.

   Dimensioni fisse di riferimento: desktop 1366 px.
   Nessun ingrandimento su monitor 1920 o 2560 px.
   Larghezza dei contenuti fluida.
   ============================================================ */


/* ============================================================
   01. DIMENSIONI DELLA CORNICE
   ============================================================ */







































.g-reviews-page .g-card {
    padding: 16px;
    border-radius: 12px;
}

.g-reviews-page .g-card-header {
    margin-bottom: 14px;
}

.g-reviews-page .g-card-heading {
    gap: 9px;
}

.g-reviews-page .g-card-heading > .g-icon {
    width: 22px;
    height: 22px;
}

.g-reviews-page .g-card-title {
    font-size: 18px;
}

.g-reviews-page .g-button {
    min-height: 36px;
    padding: 9px 14px;
    font-size: 12px;
}

.g-reviews-page .g-button .g-icon {
    width: 16px;
    height: 16px;
}

.g-reviews-page .g-control {
    min-height: 36px;
    padding: 0 11px;
    font-size: 12px;
    border-radius: 8px;
}

.g-reviews-page .g-badge {
    font-size: 11px;
    padding: 4px 9px;
}


/* ============================================================
   02. STRUTTURA PRINCIPALE
   ============================================================ */

.g-reviews-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 14px;

    width: 100%;
    min-width: 0;
}

.g-reviews-page .g-page-header {
    min-height: 52px;
}

.g-reviews-page .g-page-heading {
    flex: 1 1 auto;
    gap: 12px;
}

.g-reviews-page .g-page-heading-icon {
    width: 42px;
    height: 42px;
}

.g-reviews-page .g-page-title {
    font-size: 29px;
    letter-spacing: -0.035em;
}

.g-reviews-page .g-page-subtitle {
    margin-top: 5px;
    font-size: 12px;
}

.g-reviews-page .g-page-actions {
    flex: 0 0 auto;
    gap: 10px;
}

.g-reviews-download {
    min-height: 40px;
}

.g-reviews-download .g-icon {
    width: 18px;
    height: 18px;
}


/* ============================================================
   03. INDICATORI PRINCIPALI
   ============================================================ */

.g-reviews-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.g-reviews-kpi {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    min-width: 0;
    min-height: 112px;
    padding: 15px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
}

.g-reviews-kpi-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;

    width: 43px;
    height: 43px;

    border-radius: 10px;

    color: var(--brand-orange);
    background: var(--brand-orange-light);
}

.g-reviews-kpi-icon .g-icon {
    width: 24px;
    height: 24px;
    stroke-width: 1.8;
}

.g-reviews-kpi-icon.g-green {
    color: #188044;
    background: #e4f6e9;
}

.g-reviews-kpi-icon.g-blue {
    color: #2867bf;
    background: #e7effe;
}

.g-reviews-kpi-info {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;

    min-width: 0;
}

.g-reviews-kpi-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
}

.g-reviews-kpi-value {
    color: var(--text-primary);
    font-size: 28px;
    font-weight: 780;
    line-height: 1.15;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
}

.g-reviews-kpi-value small {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.g-reviews-kpi-note {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.3;
}

.g-reviews-kpi-note .g-icon {
    width: 13px;
    height: 13px;
}

.g-reviews-kpi-note.g-positive {
    color: var(--success);
    font-weight: 600;
}

.g-reviews-urgent-count {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 3px 8px;

    color: #c62837;
    background: #ffeaec;
    border-radius: 6px;

    font-size: 11px;
    font-weight: 700;
}

.g-reviews-urgent-count .g-icon {
    width: 12px;
    height: 12px;
}


/* ============================================================
   04. CASELLA DI POSTA — LAYOUT PRINCIPALE
   ============================================================ */

.g-reviews-inbox {
    display: grid;
    grid-template-columns: minmax(315px, 36%) minmax(0, 1fr);

    width: 100%;
    min-width: 0;
    min-height: 570px;

    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);

    overflow: hidden;
}

.g-inbox-sidebar {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: #ffffff;
    border-right: 1px solid var(--border);
}

.g-inbox-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    padding: 15px 14px 12px;
}

.g-inbox-title {
    display: flex;
    align-items: center;
    gap: 9px;

    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
}

.g-inbox-title .g-icon {
    width: 20px;
    height: 20px;
    color: var(--brand-orange);
}

.g-inbox-total {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 550;
}


/* ============================================================
   05. SCHEDE FILTRO MESSAGGI
   ============================================================ */

.g-inbox-tabs {
    display: flex;
    align-items: stretch;
    gap: 3px;

    padding: 0 12px;

    border-bottom: 1px solid var(--border);
}

.g-inbox-tab {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;

    flex: 1;
    min-height: 40px;
    padding: 7px 5px;

    color: var(--text-muted);
    border-bottom: 2px solid transparent;

    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-align: center;
    white-space: nowrap;

    transition:
        color var(--transition),
        background var(--transition),
        border-color var(--transition);
}

.g-inbox-tab:hover {
    color: var(--brand-orange-hover);
    background: #fff9f3;
}

.g-inbox-tab.g-active,
.g-inbox-tab[aria-current="page"] {
    color: var(--brand-orange-hover);
    border-bottom-color: var(--brand-orange);
    font-weight: 750;
}

.g-inbox-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 19px;
    height: 18px;
    padding: 2px 5px;

    color: var(--text-secondary);
    background: #edf0f5;
    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
}

.g-inbox-tab.g-active .g-inbox-tab-count {
    color: #c85b00;
    background: #ffe8d4;
}


/* ============================================================
   06. RICERCA MESSAGGI
   ============================================================ */

.g-inbox-search-form {
    display: flex;
    align-items: center;
    gap: 7px;

    padding: 11px 12px;

    background: #ffffff;
    border-bottom: 1px solid var(--border);
}

.g-inbox-search {
    flex: 1;
    min-width: 0;
    background: #f7f8fa;
}

.g-inbox-search input {
    font-size: 12px;
}

.g-inbox-search > .g-icon {
    width: 16px;
    height: 16px;
}

.g-inbox-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 35px;
    height: 36px;
    flex-shrink: 0;

    color: var(--text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
}

.g-inbox-search-submit .g-icon {
    width: 17px;
    height: 17px;
}

.g-inbox-search-submit:hover {
    color: var(--brand-orange);
    border-color: var(--brand-orange);
}


/* ============================================================
   07. ELENCO MESSAGGI
   ============================================================ */

.g-inbox-message-list {
    display: flex;
    flex-direction: column;

    flex: 1;
    min-width: 0;
    max-height: 650px;

    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d3dae4 transparent;
}

.g-inbox-message {
    position: relative;

    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
    padding: 12px 13px 12px 15px;

    background: #ffffff;
    border-bottom: 1px solid #e8ebf0;
    border-left: 3px solid transparent;

    transition:
        background var(--transition),
        border-color var(--transition);
}

.g-inbox-message:last-child {
    border-bottom: 0;
}

.g-inbox-message:hover {
    background: #f8f9fb;
}

.g-inbox-message.g-selected,
.g-inbox-message[aria-current="true"] {
    background: #fff4e9;
    border-left-color: var(--brand-orange);
}

.g-inbox-message.g-unread:not(.g-selected) {
    background: #fcfdff;
}

.g-inbox-message-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.g-inbox-sender {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.g-inbox-unread-dot {
    display: block;

    width: 7px;
    height: 7px;
    flex-shrink: 0;

    background: #286bd4;
    border-radius: 50%;
}

.g-inbox-read-dot {
    width: 7px;
    height: 7px;
    flex-shrink: 0;

    background: transparent;
}

.g-inbox-customer-name {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.g-inbox-message-time {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.g-inbox-message.g-unread .g-inbox-message-time {
    color: var(--text-primary);
    font-weight: 650;
}

.g-inbox-message-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 0;
}

.g-inbox-order-number {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.g-inbox-market {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    color: var(--text-secondary);
    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.g-inbox-flag {
    width: 17px;
    height: 12px;

    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 2px;

    overflow: hidden;
    flex-shrink: 0;
}

.g-inbox-message-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.g-message-topic {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    padding: 3px 7px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 650;
    line-height: 1.4;
}

.g-message-topic.g-delivery {
    color: #ba5b00;
    background: #ffead5;
}

.g-message-topic.g-cancellation {
    color: #bd2738;
    background: #ffe4e7;
}

.g-message-topic.g-refund {
    color: #7444b0;
    background: #eee5fb;
}

.g-message-topic.g-customization {
    color: #245eb4;
    background: #e3edff;
}

.g-message-topic.g-product {
    color: #167c43;
    background: #def4e5;
}

.g-message-topic.g-other {
    color: #5b687a;
    background: #e9edf3;
}

.g-message-urgent-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 3px 7px;

    color: #b91c2d;
    background: #ffe1e5;
    border: 1px solid #f8c7ce;
    border-radius: 5px;

    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.g-message-urgent-badge .g-icon {
    width: 11px;
    height: 11px;
}

.g-inbox-message-preview {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    max-height: 34px;

    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 400;
    line-height: 17px;

    overflow: hidden;
    overflow-wrap: anywhere;
}


/* ============================================================
   08. FOOTER ELENCO MESSAGGI
   ============================================================ */

.g-inbox-list-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    min-height: 43px;
    margin-top: auto;
    padding: 9px 13px;

    color: var(--text-muted);
    background: #fafbfd;
    border-top: 1px solid var(--border);

    font-size: 11px;
}

.g-inbox-list-pagination {
    display: flex;
    align-items: center;
    gap: 5px;
}

.g-inbox-list-pagination .g-pagination-button {
    min-width: 26px;
    height: 26px;
    padding: 3px;
    border-radius: 5px;
}

.g-inbox-list-pagination .g-icon {
    width: 14px;
    height: 14px;
}


/* ============================================================
   09. MESSAGGIO APERTO
   ============================================================ */

.g-message-detail {
    display: flex;
    flex-direction: column;

    min-width: 0;

    background: #ffffff;
}

.g-message-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;

    min-width: 0;
    padding: 19px 20px;

    border-bottom: 1px solid var(--border);
}

.g-message-detail-person {
    display: flex;
    align-items: flex-start;
    gap: 12px;

    min-width: 0;
}

.g-message-avatar {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 43px;
    height: 43px;
    flex-shrink: 0;

    color: #b85b12;
    background: #ffead8;
    border-radius: 50%;

    font-size: 18px;
    font-weight: 750;
}

.g-message-detail-identity {
    display: flex;
    flex-direction: column;
    gap: 6px;

    min-width: 0;
}

.g-message-detail-name-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.g-message-detail-name {
    color: var(--text-primary);
    font-size: 19px;
    font-weight: 750;
    line-height: 1.25;
}

.g-message-detail-market {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
}

.g-message-detail-market .g-inbox-flag {
    width: 20px;
    height: 14px;
}

.g-message-detail-order {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.g-message-detail-order a {
    color: #245eaa;
    font-weight: 600;
}

.g-message-detail-order a:hover {
    text-decoration: underline;
}

.g-message-detail-product {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 550;
    overflow-wrap: anywhere;
}

.g-message-detail-header-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;

    flex-shrink: 0;
}

.g-message-order-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--brand-orange-hover);
    font-size: 11px;
    font-weight: 650;
}

.g-message-order-link .g-icon {
    width: 13px;
    height: 13px;
}

.g-message-order-link:hover {
    text-decoration: underline;
}


/* ============================================================
   10. CONVERSAZIONE CLIENTE
   ============================================================ */

.g-message-detail-content {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 18px;

    min-width: 0;
    padding: 19px 20px;

    background: #fafbfd;
}

.g-message-conversation-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.g-message-conversation-heading::before,
.g-message-conversation-heading::after {
    height: 1px;
    flex: 1;

    content: "";
    background: #dfe4ec;
}

.g-message-conversation-date {
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 500;
    white-space: nowrap;
}

.g-customer-message {
    display: flex;
    flex-direction: column;
    gap: 10px;

    width: 100%;
    min-width: 0;
}

.g-customer-message-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.g-customer-message-author {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text-primary);
    font-size: 12px;
    font-weight: 650;
}

.g-customer-message-author .g-icon {
    width: 16px;
    height: 16px;
    color: var(--text-muted);
}

.g-customer-message-time {
    color: var(--text-muted);
    font-size: 11px;
    white-space: nowrap;
}

.g-customer-message-bubble {
    display: flex;
    flex-direction: column;
    gap: 12px;

    width: 100%;
    padding: 15px 17px;

    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 3px 12px 12px 12px;

    font-size: 13px;
    line-height: 1.65;
}

.g-customer-message-original {
    display: flex;
    align-items: center;
    gap: 7px;

    color: var(--text-muted);
    font-size: 11px;
}

.g-customer-message-original .g-icon {
    width: 15px;
    height: 15px;
}

.g-message-translation {
    display: block;
    padding: 11px 13px;

    background: #f0f4fa;
    border: 1px solid #dfe7f3;
    border-radius: 8px;
}

.g-message-translation > summary {
    display: flex;
    align-items: center;
    gap: 8px;

    color: #285d9f;

    font-size: 12px;
    font-weight: 650;
    list-style: none;
    cursor: pointer;
}

.g-message-translation > summary::-webkit-details-marker {
    display: none;
}

.g-message-translation > summary::marker {
    content: "";
}

.g-message-translation > summary .g-icon {
    width: 15px;
    height: 15px;
}

.g-message-translation-chevron {
    margin-left: auto;
}

.g-message-translation[open] .g-message-translation-chevron {
    transform: rotate(180deg);
}

.g-message-translation-text {
    margin-top: 10px;
    padding-top: 10px;

    color: var(--text-secondary);
    border-top: 1px solid #d8e1ef;

    font-size: 12px;
    line-height: 1.65;
}


/* ============================================================
   11. RISPOSTA PROPOSTA DALL'AI
   ============================================================ */

.g-ai-reply-panel {
    display: flex;
    flex-direction: column;
    gap: 13px;

    width: 100%;
    min-width: 0;
    padding: 16px;

    background: linear-gradient(
        145deg,
        #fffaf5,
        #ffffff
    );

    border: 1px solid #ffdbbb;
    border-radius: 11px;
}

.g-ai-reply-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;

    min-width: 0;
}

.g-ai-reply-heading {
    display: flex;
    align-items: center;
    gap: 10px;

    min-width: 0;
}

.g-ai-reply-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    flex-shrink: 0;

    color: var(--brand-orange);
    background: #ffe9d4;
    border-radius: 9px;
}

.g-ai-reply-icon .g-icon {
    width: 22px;
    height: 22px;
    stroke-width: 1.7;
}

.g-ai-reply-title {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 750;
    line-height: 1.3;
}

.g-ai-reply-subtitle {
    margin-top: 4px;

    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.4;
}

.g-ai-language-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 5px 9px;

    color: #765022;
    background: #fff1df;
    border: 1px solid #f3d9b8;
    border-radius: 6px;

    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.g-ai-reply-form {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
}

.g-ai-reply-textarea {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 205px;
    padding: 14px;

    color: var(--text-primary);
    background: #ffffff;
    border: 1px solid #d9dfe8;
    border-radius: 8px;

    font-family: var(--font-family);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.65;

    resize: vertical;

    transition:
        border-color var(--transition),
        box-shadow var(--transition);
}

.g-ai-reply-textarea:focus {
    border-color: var(--brand-orange);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 121, 11, 0.1);
}

.g-ai-reply-textarea::placeholder {
    color: var(--text-muted);
}

.g-ai-reply-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.g-ai-reply-editable {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--text-muted);
    font-size: 10px;
}

.g-ai-reply-editable .g-icon {
    width: 13px;
    height: 13px;
}

.g-ai-draft-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: #90600b;
    font-size: 10px;
    font-weight: 600;
}

.g-ai-draft-badge::before {
    width: 6px;
    height: 6px;

    content: "";
    background: #dc9817;
    border-radius: 50%;
}

.g-ai-reply-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;

    width: 100%;
}

.g-ai-send-button {
    min-width: 143px;
    min-height: 38px;
}

.g-ai-regenerate-button {
    min-height: 38px;
}

.g-ai-resolve-button {
    margin-left: auto;
    min-height: 38px;
    color: #198044;
}

.g-ai-resolve-button:hover {
    color: #12652f;
    background: #eff9f2;
    border-color: #b8dfc5;
}

.g-ai-review-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    padding-top: 1px;

    color: #9b652e;
    font-size: 11px;
    line-height: 1.5;
}

.g-ai-review-note .g-icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    color: #dd7d20;
}


/* ============================================================
   12. AREA RICHIESTE RECENSIONI ED EMAIL
   ============================================================ */

.g-reviews-bottom-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 275px;
    align-items: start;
    gap: 14px;

    width: 100%;
    min-width: 0;
}

.g-review-requests-card {
    display: flex;
    flex-direction: column;
    gap: 14px;

    min-width: 0;
}

.g-review-requests-card .g-card-header {
    margin-bottom: 0;
}

.g-review-requests-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.g-review-requests-heading > .g-icon {
    width: 24px;
    height: 24px;
    color: var(--brand-orange);
}

.g-review-requests-description {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.45;
}


/* ============================================================
   13. IMPOSTAZIONI RICHIESTA AUTOMATICA
   ============================================================ */

.g-review-settings {
    display: flex;
    flex-direction: column;
    gap: 12px;

    min-width: 0;
    padding: 13px;

    background: #f7f9fc;
    border: 1px solid var(--border);
    border-radius: 9px;
}

.g-review-settings-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.g-review-switch-label {
    display: inline-flex;
    align-items: center;
    gap: 9px;

    cursor: pointer;
    user-select: none;
}

.g-review-switch {
    position: relative;

    display: inline-flex;
    align-items: center;

    width: 38px;
    height: 22px;
    flex-shrink: 0;
}

.g-review-switch-input {
    position: absolute;
    inset: 0;
    z-index: 1;

    width: 100%;
    height: 100%;
    margin: 0;

    opacity: 0;
    cursor: pointer;
}

.g-review-switch-track {
    position: absolute;
    inset: 0;

    background: #bac3d0;
    border-radius: 999px;

    transition: background var(--transition);
}

.g-review-switch-track::before {
    position: absolute;
    top: 3px;
    left: 3px;

    width: 16px;
    height: 16px;

    content: "";
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);

    transition: transform var(--transition);
}

.g-review-switch-input:checked + .g-review-switch-track {
    background: var(--brand-orange);
}

.g-review-switch-input:checked + .g-review-switch-track::before {
    transform: translateX(16px);
}

.g-review-switch-input:focus-visible + .g-review-switch-track {
    outline: 2px solid var(--brand-orange);
    outline-offset: 3px;
}

.g-review-switch-text {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.g-review-delay-group {
    display: flex;
    align-items: center;
    gap: 8px;

    min-width: 0;
}

.g-review-delay-control {
    width: 65px;
    min-height: 33px;
    background: #ffffff;
}

.g-review-delay-control select {
    padding: 7px 17px 7px 0;
    font-weight: 650;
}

.g-review-delay-control .g-select-chevron {
    width: 12px;
    height: 12px;
    right: 8px;
}

.g-review-delay-label {
    color: var(--text-secondary);
    font-size: 12px;
    white-space: nowrap;
}

.g-review-settings-save {
    margin-left: auto;
}

.g-review-settings:not(:has(.g-review-switch-input:checked))
.g-review-delay-group {
    opacity: 0.6;
}

.g-review-settings-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    color: var(--text-muted);
    font-size: 11px;
    line-height: 1.5;
}

.g-review-settings-note .g-icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
    color: var(--brand-orange);
}


/* ============================================================
   14. TABELLA ULTIME RICHIESTE DI RECENSIONE
   ============================================================ */

.g-review-history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;

    min-width: 0;
}

.g-review-history-title {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 700;
}

.g-review-history-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;

    color: var(--brand-orange-hover);
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
}

.g-review-history-link:hover {
    text-decoration: underline;
}

.g-review-history-link .g-icon {
    width: 13px;
    height: 13px;
}

.g-review-history-table {
    width: 100%;
    min-width: 580px;

    font-size: 11px;
    table-layout: auto;
}

.g-review-history-table thead th {
    padding: 10px 9px;

    color: var(--text-primary);
    background: #edf0f5;

    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.g-review-history-table tbody td {
    padding: 11px 9px;

    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.4;
}

.g-review-history-table tbody tr:nth-child(even) {
    background: #f8f9fb;
}

.g-review-history-table tbody tr:hover {
    background: #fff6ed;
}

.g-review-order-id {
    color: #345b8b;
    font-size: 10px;
    font-weight: 550;
    white-space: nowrap;
}

.g-review-order-id:hover {
    text-decoration: underline;
}

.g-review-product-name {
    color: var(--text-primary);
    font-weight: 550;
}

.g-review-date {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.g-review-request-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;

    padding: 4px 7px;

    border-radius: 5px;

    font-size: 10px;
    font-weight: 650;
    white-space: nowrap;
}

.g-review-request-status .g-icon {
    width: 12px;
    height: 12px;
}

.g-review-request-status.g-sent {
    color: #177039;
    background: #dff3e5;
}

.g-review-request-status.g-scheduled {
    color: #2661b6;
    background: #e3edfc;
}

.g-review-request-status.g-pending {
    color: #ab6207;
    background: #ffeed6;
}

.g-review-request-status.g-failed {
    color: #bf2634;
    background: #ffe0e4;
}


/* ============================================================
   15. CASELLA EMAIL COLLEGATA
   ============================================================ */

.g-connected-email-card {
    display: flex;
    flex-direction: column;
    gap: 15px;

    min-width: 0;
}

.g-connected-email-card .g-card-header {
    margin-bottom: 0;
}

.g-connected-email-card .g-card-title {
    font-size: 16px;
}

.g-connected-email-identity {
    display: flex;
    align-items: flex-start;
    gap: 10px;

    min-width: 0;
}

.g-connected-email-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 39px;
    height: 39px;
    flex-shrink: 0;

    color: var(--brand-orange);
    background: var(--brand-orange-light);
    border-radius: 9px;
}

.g-connected-email-icon .g-icon {
    width: 21px;
    height: 21px;
}

.g-connected-email-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;

    min-width: 0;
}

.g-connected-email-address {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.g-connected-email-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 4px 8px;

    color: #14783b;
    background: #e0f5e7;
    border-radius: 6px;

    font-size: 11px;
    font-weight: 650;
}

.g-connected-email-status-dot {
    width: 7px;
    height: 7px;

    background: #21954a;
    border-radius: 50%;
}

.g-connected-email-details {
    display: flex;
    flex-direction: column;
    gap: 11px;

    padding-top: 13px;
    border-top: 1px solid var(--border);
}

.g-connected-email-detail {
    display: flex;
    align-items: flex-start;
    gap: 8px;

    color: var(--text-secondary);
    font-size: 11px;
    line-height: 1.5;
}

.g-connected-email-detail > .g-icon {
    width: 16px;
    height: 16px;
    margin-top: 1px;

    color: var(--text-muted);
}

.g-connected-email-detail-label {
    display: block;

    color: var(--text-muted);
    font-size: 10px;
}

.g-connected-email-detail-value {
    display: block;

    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
}

.g-connected-email-change {
    width: 100%;
    min-height: 36px;
}

.g-connected-email-note {
    display: flex;
    align-items: flex-start;
    gap: 7px;

    padding: 10px;

    color: var(--text-muted);
    background: #f6f8fb;
    border-radius: 7px;

    font-size: 10px;
    line-height: 1.5;
}

.g-connected-email-note .g-icon {
    width: 15px;
    height: 15px;
    margin-top: 1px;
}


/* ============================================================
   16. FOOTER PAGINA
   ============================================================ */

.g-reviews-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;

    min-height: 32px;
    padding: 9px 3px 0;

    color: var(--text-muted);
    border-top: 1px solid var(--border);

    font-size: 11px;
}

.g-reviews-footer .g-status-dot {
    width: 8px;
    height: 8px;
    box-shadow: 0 0 0 3px rgba(21, 148, 71, 0.11);
}

.g-reviews-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    color: var(--text-secondary);
    font-size: 11px;
}

.g-reviews-footer-link .g-icon {
    width: 15px;
    height: 15px;
    color: var(--brand-orange);
}

.g-reviews-footer-link:hover {
    color: var(--brand-orange-hover);
}


/* ============================================================
   17. ADATTAMENTO A MONITOR POCO ALTI
   ============================================================ */

@media (max-height: 800px) {

    

    

    

    

    .g-reviews-kpi {
        min-height: 100px;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .g-inbox-message-list {
        max-height: 570px;
    }
}




/* ============================================================
   18. DESKTOP COMPATTO E TABLET
   Nessuna regola di ingrandimento per schermi grandi.
   ============================================================ */

@media (max-width: 1279px) {

    .g-reviews-page .g-page-header {
        flex-wrap: wrap;
        gap: 10px;
    }

    .g-reviews-page .g-page-heading {
        flex-basis: 100%;
    }

    .g-reviews-page .g-page-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }

    .g-reviews-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .g-reviews-inbox {
        grid-template-columns: minmax(265px, 36%) minmax(0, 1fr);
    }

    .g-message-detail-header,
.g-message-detail-content {
        padding: 15px;
    }

    .g-message-detail-header {
        flex-wrap: wrap;
    }

    .g-message-detail-header-actions {
        align-items: flex-start;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .g-ai-reply-panel {
        padding: 13px;
    }

    .g-ai-resolve-button {
        margin-left: 0;
    }

    .g-reviews-bottom-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .g-connected-email-card {
        max-width: 420px;
    }
}

@media (max-width: 1023px) {

    .g-reviews-inbox {
        grid-template-columns: minmax(0, 1fr);
    }

    .g-inbox-sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .g-inbox-message-list {
        max-height: 370px;
    }

    .g-message-detail-header {
        padding-top: 18px;
    }

    .g-review-settings-save {
        margin-left: 0;
    }
}


/* ============================================================
   19. MOBILE
   ============================================================ */

@media (max-width: 767px) {

    

    

    

    

    

    

    

    

    

    

    

    .g-reviews-page .g-page-title {
        font-size: 25px;
    }

    .g-reviews-page .g-page-heading-icon {
        width: 34px;
        height: 34px;
    }

    .g-reviews-page .g-page-subtitle {
        font-size: 11px;
    }

    .g-reviews-page .g-page-actions {
        flex-basis: 100%;
    }

    .g-reviews-download {
        width: 100%;
    }

    .g-reviews-kpi-grid {
        gap: 8px;
    }

    .g-reviews-kpi {
        gap: 8px;
        min-height: 108px;
        padding: 10px;
    }

    .g-reviews-kpi-icon {
        width: 30px;
        height: 30px;
        border-radius: 7px;
    }

    .g-reviews-kpi-icon .g-icon {
        width: 18px;
        height: 18px;
    }

    .g-reviews-kpi-label {
        font-size: 11px;
    }

    .g-reviews-kpi-value {
        font-size: 24px;
    }

    .g-reviews-kpi-note {
        font-size: 10px;
    }

    .g-reviews-urgent-count {
        padding: 3px 5px;
        font-size: 10px;
    }

    .g-message-detail-header,
.g-message-detail-content {
        padding: 13px;
    }

    .g-message-avatar {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }

    .g-message-detail-name {
        font-size: 17px;
    }

    .g-customer-message-bubble {
        padding: 12px;
        font-size: 12px;
    }

    .g-ai-reply-panel {
        padding: 12px;
    }

    .g-ai-reply-title {
        font-size: 15px;
    }

    .g-ai-reply-textarea {
        min-height: 230px;
        font-size: 13px;
    }

    .g-ai-reply-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .g-ai-send-button {
        grid-column: 1 / -1;
        min-width: 0;
    }

    .g-ai-reply-actions .g-button {
        width: 100%;
        padding-inline: 8px;
        white-space: normal;
    }

    .g-review-settings-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 13px;
    }

    .g-review-settings-save {
        width: 100%;
    }

    .g-review-history-heading {
        flex-wrap: wrap;
    }

    .g-connected-email-card {
        max-width: none;
    }

    .g-reviews-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* ============================================================
   20. STAMPA
   ============================================================ */

@media print {

    .g-reviews-download,
.g-inbox-sidebar,
.g-ai-reply-actions,
.g-review-settings,
.g-connected-email-change {
        display: none !important;
    }

    .g-reviews-inbox,
.g-reviews-bottom-grid {
        display: block;
        min-height: 0;
    }

    .g-message-detail-content {
        background: #ffffff;
    }

    .g-ai-reply-textarea {
        min-height: 230px;
        resize: none;
    }

    .g-review-requests-card,
.g-connected-email-card {
        margin-top: 15px;
        max-width: none;
        break-inside: avoid;
    }

    .g-reviews-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .g-review-history-table {
        min-width: 0;
    }
}

/* --- Adattamenti DeskZon: annullano regole generiche di app.css dentro la grafica ChatGPT --- */
.g-body .g-task-description { display: block; gap: 0; }
.g-body .g-task-checkbox { min-height: 0; padding: 0; }
.g-select-control select,
.g-profit-date input,
.g-search-control input { min-height: 0; border-radius: 0; font: inherit; }
.g-select-control select:focus,
.g-profit-date input:focus,
.g-search-control input:focus { outline: 0; }
.g-body .g-kpi-note { margin: 2px 0 0; color: var(--text-muted); font-size: 0.8em; }
.g-body .g-sparkline-wait path { fill: none; stroke: var(--border-strong); stroke-width: 2; stroke-dasharray: 6 6; vector-effect: non-scaling-stroke; }
.g-donut-segment.g-market-5 { stroke: #94a3b8; }
.g-donut-segment.g-market-6 { stroke: #64748b; }
.g-market-color.g-market-5 { background: #94a3b8; }
.g-market-color.g-market-6 { background: #64748b; }
.g-body .g-account > summary { list-style: none; }
.g-body .g-account > summary::-webkit-details-marker { display: none; }
.g-pagination-button[aria-disabled="true"] { opacity: 0.45; cursor: default; }
.g-board-sync { display: inline; margin: 0; }
.g-board-sync-button { display: inline-flex; align-items: center; gap: 6px; padding: 0; color: var(--brand-orange-hover); background: transparent; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.g-board-sync-button .g-icon { width: 15px; height: 15px; }
.g-order-menu-panel form { margin: 0; }
.g-kanban-list > p.g-kanban-more { margin: 0; color: var(--text-muted); }
body.g-body { font-family: inherit; font-size: inherit; }
.g-channel-card-bottom form { margin: 0; }
.g-country-option > .g-icon { width: 18px; height: 18px; margin-left: auto; color: var(--text-muted); }
.g-country-checkbox { min-height: 0; padding: 0; }
.g-country-option { font-weight: inherit; }
.g-icon-orange { color: var(--brand-orange); }
.g-login-page .g-login-field-label { display: block; gap: 0; }
.g-login-page > .prova { position: relative; z-index: 2; }
.g-login-code-control:has(.g-login-code-input:placeholder-shown) .g-login-code-box { border-color: #cfd6e1; background: #ffffff; }
.g-login-code-control:focus-within .g-login-code-box { border-color: var(--brand-orange); }
.g-login-password-toggle { box-shadow: none; min-height: 0; }

/* Codice a 6 cifre: ogni cifra nella sua casella (la versione di ChatGPT usava
   percentuali dentro letter-spacing, che il browser ignora: cifre tutte nella prima casella) */
.g-login-code-control { container-type: inline-size; overflow: clip; }
.g-login-code-input {
  --cella: calc((100cqw - 5 * var(--code-gap)) / 6);
  width: calc(100% + var(--cella));
  padding-inline-start: calc((var(--cella) - 1ch) / 2);
  letter-spacing: calc(var(--cella) + var(--code-gap) - 1ch);
}

/* Collega la casella email (pagina Recensioni e messaggi) */
.g-mailbox-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; align-items: start; }
.g-mailbox-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.g-mailbox-card .g-card-header { margin-bottom: 0; }
.g-mailbox-form { display: flex; flex-direction: column; gap: 14px; max-width: 520px; }
.g-mailbox-field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 650; color: var(--text-primary); }
.g-mailbox-field small { font-weight: 400; color: var(--text-muted); font-size: 11px; line-height: 1.45; }
.g-mailbox-field .g-control input { width: 100%; border: 0; background: transparent; font: inherit; font-weight: 400; outline: none; }
.g-mailbox-advanced { display: flex; flex-direction: column; gap: 12px; font-size: 12px; color: var(--text-secondary); }
.g-mailbox-advanced summary { cursor: pointer; margin-bottom: 10px; }
.g-mailbox-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.g-mailbox-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
@media (max-width: 1023px) { .g-mailbox-grid { grid-template-columns: minmax(0, 1fr); } }
.g-reviews-download[disabled] { opacity: .55; cursor: not-allowed; }
