:root {
    --font-ggtec: "Inter", "Segoe UI Variable", "Segoe UI", Aptos, "Roboto", Arial, sans-serif;
    --ink: #12212B;
    --muted: #667681;
    --line: #DCE5E8;
    --line-soft: #edf3f5;
    --page: #F4F7F8;
    --panel: #FFFFFF;
    --green: #0E9B6F;
    --green-dark: #087853;
    --blue: #102A3A;
    --blue-soft: #eaf3f7;
    --soft-green: #DDF5EC;
    --amber: #b9782c;
    --danger: #a63838;
    --canali: #7fa9d2;
    --canali-strong: #416f9f;
    --quadri: #2f9b3b;
    --quadri-strong: #24792b;
    --shadow: 0 16px 34px rgba(20, 59, 82, .08);
    --soft-shadow: 0 8px 22px rgba(20, 59, 82, .055);
    --focus-ring: 0 0 0 3px rgba(12, 118, 86, .16);
}

html {
    background: var(--page);
}

body {
    background:
        linear-gradient(180deg, #fbfdfd 0, #f4f8f9 310px, var(--page) 100%);
    color: var(--ink);
    font-family: var(--font-ggtec);
    font-size: 15.5px;
    letter-spacing: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font-family: var(--font-ggtec);
}

.main {
    width: min(1800px, calc(100% - 48px));
    margin: 34px auto 54px;
}

.topbar {
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line-soft);
    box-shadow: 0 8px 24px rgba(20, 59, 82, .055);
}

.topbar-inner {
    width: min(1800px, calc(100% - 48px));
    min-height: 72px;
}

.page-container {
    width: 100%;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.page-container-wide {
    width: 100%;
    max-width: 1800px;
    margin-left: auto;
    margin-right: auto;
}

.brand {
    gap: 13px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-color: var(--line-soft);
    box-shadow: 0 8px 18px rgba(20, 59, 82, .08);
}

.brand-title {
    color: var(--blue);
    font-size: 18px;
    font-weight: 850;
}

.brand-subtitle {
    color: var(--muted);
    font-size: 12.5px;
}

.nav-actions {
    gap: 10px;
}

.role-pill,
.beta-badge,
.status-badge,
.budget-state,
.economic-badge {
    border-radius: 999px;
    letter-spacing: 0;
}

.role-pill {
    border-color: var(--line-soft);
    background: #f7fbfa;
    color: var(--blue);
    padding: 8px 13px;
}

.button {
    min-height: 42px;
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    font-size: 14.5px;
    font-weight: 800;
    padding: 10px 16px;
    box-shadow: 0 10px 20px rgba(12, 118, 86, .16);
    transition: transform .14s ease, box-shadow .14s ease, background .14s ease, border-color .14s ease;
}

.button:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(12, 118, 86, .2);
}

.button.secondary {
    background: var(--blue);
    box-shadow: 0 10px 20px rgba(20, 59, 82, .16);
}

.button.secondary:hover {
    box-shadow: 0 12px 26px rgba(20, 59, 82, .22);
}

.button.danger {
    background: var(--danger);
    border: 1px solid #8f2c2c;
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(166, 56, 56, .16);
}

.button.danger:hover {
    box-shadow: 0 12px 26px rgba(166, 56, 56, .22);
}

.button.subtle {
    background: #edf7f2;
    border: 1px solid #cfe5d9;
    color: var(--green-dark);
    box-shadow: none;
}

.button.ghost {
    background: #ffffff;
    border: 1px solid var(--line);
    color: var(--blue);
    box-shadow: none;
}

.button.disabled {
    background: #eef3f5;
    border: 1px solid var(--line);
    color: var(--muted);
    box-shadow: none;
}

.panel,
.login-panel,
.status-strip,
.dashboard-head.module-head,
.dg-command-head,
.production-section,
.summary-card,
.kpi-card,
.area-card,
.quick-card,
.comparison-box,
.chart-box,
.report-row {
    border-color: var(--line-soft);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: var(--soft-shadow);
}

.panel,
.production-section {
    padding: 26px;
}

.dashboard-head,
.section-title,
.section-brand-head {
    margin-bottom: 20px;
}

.dashboard-head h1,
.panel h1,
.login-panel h1,
.dg-command-head h1 {
    color: var(--ink);
    font-weight: 850;
}

.section-title h2,
.section-brand-title h2,
.chart-box h3,
.dashboard-kpi h3 {
    color: var(--ink);
    font-weight: 850;
}

.eyebrow,
.area-tag {
    letter-spacing: 0;
    font-size: 12px;
}

.section-note,
.muted,
.table-subtext,
.kpi-period {
    color: var(--muted);
}

.area-grid,
.quick-grid,
.kpi-grid,
.summary-grid {
    gap: 16px;
}

.area-card,
.quick-card {
    border-color: var(--line-soft);
}

.area-card {
    min-height: 184px;
    padding: 21px;
}

.area-card:hover,
.quick-card:hover {
    border-color: #c7dbe2;
    box-shadow: 0 18px 34px rgba(20, 59, 82, .11);
}

.area-card strong {
    color: var(--ink);
    font-size: 21px;
    font-weight: 850;
}

.area-logo,
.module-logo,
.section-brand-logo,
.login-logo,
.dg-command-logo {
    border-color: var(--line-soft);
    background: #ffffff;
}

.quick-card {
    min-height: 96px;
    padding: 16px;
}

.quick-token {
    background: var(--blue-soft);
    color: var(--blue);
}

.summary-card,
.kpi-card {
    padding: 18px;
}

.summary-card strong {
    color: var(--ink);
    font-size: 25px;
    font-weight: 850;
}

.kpi-card {
    border-top-width: 3px;
}

.kpi-main-number {
    font-size: 28px;
    font-weight: 850;
}

.metric-line {
    gap: 18px;
}

.metric-line strong,
.money {
    font-variant-numeric: tabular-nums;
}

.metric-line.total {
    border-top-color: var(--line-soft);
}

.dg-command-head {
    padding: 24px;
}

.dg-command-meta {
    color: var(--muted);
}

.production-section {
    margin-top: 20px;
}

.production-section.canali,
.production-section.reports-canali {
    border-left-color: var(--canali-strong);
}

.production-section.quadri,
.production-section.reports-quadri {
    border-left-color: var(--quadri);
}

.filter-bar {
    gap: 16px;
}

.field {
    gap: 8px;
}

label {
    color: #21323b;
    font-size: 13.5px;
    font-weight: 800;
}

input[type="date"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="text"],
select,
textarea {
    min-height: 44px;
    border-color: var(--line);
    border-radius: 8px;
    background: #fbfdfd;
    color: var(--ink);
    padding: 10px 12px;
    transition: border-color .14s ease, box-shadow .14s ease, background .14s ease;
}

input[type="date"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="text"]:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: var(--green);
    background: #ffffff;
    box-shadow: var(--focus-ring);
}

textarea {
    line-height: 1.5;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    border-color: var(--line-soft);
    border-radius: 8px;
    box-shadow: none;
}

table {
    width: 100%;
    font-size: 14.5px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    white-space: normal;
}

.table-nowrap,
.status-badge,
.economic-badge,
.compact-actions,
.actions-row.compact-actions,
.money {
    white-space: nowrap;
}

.text-cell {
    min-width: 180px;
}

th,
td {
    border-bottom-color: var(--line-soft);
    padding: 13px 14px;
}

th {
    background: #f6fafb;
    color: #5a6c76;
    font-size: 12px;
    font-weight: 850;
}

tbody tr:hover td {
    background: #fbfdfd;
}

.dg-table th {
    background: #f1f7f8;
}

.document-matrix-table {
    min-width: 1320px;
    font-size: 13.5px;
}

.document-matrix-table th,
.document-matrix-table td {
    padding: 10px 9px;
}

.document-matrix-table th:nth-child(1),
.document-matrix-table td:nth-child(1),
.document-matrix-table th:nth-child(n+5),
.document-matrix-table td:nth-child(n+5) {
    white-space: nowrap;
}

.document-matrix-table td:nth-child(2),
.document-matrix-table td:nth-child(3) {
    min-width: 170px;
}

.document-matrix-table .document-matrix-actions {
    gap: 5px;
}

.document-matrix-table .document-matrix-actions .button {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12.5px;
}

.material-chip {
    border-color: var(--line-soft);
    background: #f7fbfb;
    border-radius: 999px;
}

.placeholder-note {
    border-color: #cbd9de;
    background: #fbfdfd;
}

.flash,
.error-list,
.alert {
    border-radius: 8px;
}

.login-shell {
    padding: 28px 0;
}

.login-panel {
    border-top-color: var(--green);
    padding: 28px;
}

.login-subtitle {
    color: var(--muted);
}

.chart-box canvas {
    border-radius: 8px;
}

.home-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    padding: 30px;
    box-shadow: 0 10px 26px rgba(20, 59, 82, .055);
}

.home-hero-brand {
    display: flex;
    align-items: center;
    gap: 22px;
}

.home-hero-logo {
    width: 190px;
    height: 76px;
    object-fit: contain;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    padding: 9px 12px;
}

.home-hero h1 {
    margin: 0;
    color: var(--ink);
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.04;
    font-weight: 850;
}

.home-hero p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 18px;
}

.home-user-panel {
    min-width: 230px;
    display: grid;
    gap: 7px;
    justify-items: end;
    color: var(--muted);
}

.home-user-panel strong {
    color: var(--ink);
}

.workspace-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 22px;
}

.workspace-card {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 26px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    padding: 30px;
    box-shadow: 0 10px 26px rgba(20, 59, 82, .055);
}

.workspace-card.produzione {
    border-top: 4px solid var(--green);
}

.workspace-card.quadri-operativa {
    border-top: 4px solid var(--quadri);
}

.workspace-card.controllo {
    border-top: 4px solid var(--blue);
}

.workspace-card.archivi {
    border-top: 4px solid #9db2bd;
}

.workspace-label {
    display: inline-flex;
    color: var(--green);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.workspace-card.controllo .workspace-label {
    color: var(--blue);
}

.workspace-card.quadri-operativa .workspace-label {
    color: var(--quadri-strong);
}

.workspace-card.archivi .workspace-label {
    color: #627884;
}

.workspace-card h2,
.control-card h2 {
    margin: 10px 0 8px;
    color: var(--ink);
    font-size: 27px;
    line-height: 1.1;
    font-weight: 850;
    letter-spacing: 0;
}

.workspace-card p,
.control-card p {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.5;
}

.workspace-actions {
    display: grid;
    gap: 10px;
}

.workspace-link {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfd;
    color: var(--blue);
    padding: 10px 13px;
    text-decoration: none;
    font-weight: 800;
    transition: border-color .14s ease, background .14s ease, transform .14s ease;
}

.workspace-link:hover {
    transform: translateY(-1px);
    border-color: #c6d9df;
    background: #ffffff;
}

.workspace-link.canali {
    color: var(--canali-strong);
}

.workspace-link.quadri {
    color: var(--quadri-strong);
}

.workspace-link.dg {
    color: var(--blue);
}

.control-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.control-card {
    min-height: 260px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    padding: 26px;
    box-shadow: 0 10px 26px rgba(20, 59, 82, .055);
}

.control-card.canali {
    border-top: 4px solid var(--canali-strong);
}

.control-card.quadri {
    border-top: 4px solid var(--quadri);
}

.control-card.commesse {
    border-top: 4px solid var(--blue);
}

.control-logo {
    width: 150px;
    height: 58px;
    object-fit: contain;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    padding: 6px 8px;
}

.control-symbol {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--blue-soft);
    color: var(--blue);
    font-weight: 900;
}

.dg-command-head.slim {
    margin-bottom: 0;
    padding: 26px 30px;
}

.dg-command-head.slim .dg-command-logo {
    width: 170px;
    height: 66px;
}

.dg-command-head.slim h1 {
    font-size: clamp(32px, 4vw, 44px);
}

.compact-section {
    padding: 24px;
}

.compact-section .section-brand-head {
    margin-bottom: 16px;
}

.compact-section h2 {
    font-size: 22px;
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.permission-list {
    display: grid;
    gap: 6px;
}

.permission-check {
    margin: 0;
    min-height: 38px;
    align-items: center;
}

@media (max-width: 720px) {
    .main,
    .topbar-inner {
        width: min(100% - 24px, 1800px);
    }

    .panel,
    .production-section,
    .dg-command-head {
        padding: 18px;
    }

    .area-card,
    .quick-card {
        min-height: auto;
    }

    th,
    td {
        padding: 11px 12px;
    }

    .home-hero,
    .home-hero-brand,
    .dg-command-head.slim {
        align-items: flex-start;
        flex-direction: column;
    }

    .home-user-panel {
        width: 100%;
        justify-items: start;
    }

    .home-hero-logo {
        width: 100%;
        max-width: 260px;
    }

    .workspace-grid,
    .control-grid {
        grid-template-columns: 1fr;
    }
}

/* GGTEC premium site-operator design system */
.ggtec-app-shell {
    width: 100%;
    display: grid;
    gap: 22px;
}

.ggtec-site-shell {
    max-width: 1480px;
    margin: 0 auto;
}

.ggtec-page-header,
.ggtec-hero-card {
    border: 1px solid rgba(220, 229, 232, .92);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(16, 42, 58, .075);
}

.ggtec-page-header.mobile-report-head,
.ggtec-site-shell .dashboard-head {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0;
    padding: 24px;
    color: var(--ink);
}

.ggtec-page-header.mobile-report-head.cantieri,
.ggtec-site-shell .dashboard-head {
    background:
        linear-gradient(135deg, rgba(16, 42, 58, .98), rgba(12, 64, 70, .96)),
        #102A3A;
    color: #ffffff;
}

.ggtec-page-header.mobile-report-head.cantieri h1,
.ggtec-site-shell .dashboard-head h1 {
    margin: 3px 0 6px;
    color: #ffffff;
    font-size: 29px;
    line-height: 1.12;
    font-weight: 850;
}

.ggtec-page-header.mobile-report-head.cantieri p,
.ggtec-site-shell .dashboard-head .section-note {
    color: rgba(255, 255, 255, .78);
}

.ggtec-page-header .eyebrow,
.ggtec-site-shell .dashboard-head .eyebrow {
    color: #9be1c7;
    font-weight: 850;
}

.ggtec-site-shell .dashboard-head .button.secondary {
    border-color: rgba(255, 255, 255, .18);
    background: var(--green);
    color: #ffffff;
}

.ggtec-site-shell .dashboard-head .button.ghost,
.ggtec-site-shell .dashboard-head .button.subtle {
    border-color: rgba(255, 255, 255, .24);
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
}

.site-operator-hero.ggtec-hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    align-items: stretch;
    gap: 18px;
    margin: 0;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(16, 42, 58, .98), rgba(14, 93, 82, .94)),
        #102A3A;
    color: #ffffff;
}

.site-operator-hero.ggtec-hero-card::before,
.site-operator-hero.ggtec-hero-card::after {
    display: none;
}

.site-operator-brand.ggtec-hero-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-operator-brand.ggtec-hero-brand img {
    width: 84px;
    height: 84px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 8px;
    background: rgba(255, 255, 255, .95);
    padding: 10px;
    object-fit: contain;
}

.site-operator-brand.ggtec-hero-brand h1 {
    margin: 3px 0 7px;
    color: #ffffff;
    font-size: 34px;
    line-height: 1.05;
    font-weight: 850;
}

.site-operator-brand.ggtec-hero-brand p {
    max-width: 620px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    line-height: 1.5;
}

.site-operator-brand.ggtec-hero-brand .eyebrow {
    color: #9be1c7;
    font-weight: 850;
}

.ggtec-user-card.site-operator-user {
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 8px;
    background: rgba(255, 255, 255, .10);
    padding: 18px;
    box-shadow: none;
}

.ggtec-user-card.site-operator-user span {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    font-weight: 750;
}

.ggtec-user-card.site-operator-user strong {
    color: #ffffff;
    font-size: 18px;
}

.ggtec-user-card.site-operator-user button {
    min-height: 38px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    background: rgba(255, 255, 255, .12);
    color: #ffffff;
    padding: 8px 13px;
    font-weight: 800;
}

.ggtec-module-grid.mobile-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.ggtec-module-card.mobile-dashboard-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid var(--line);
    border-top: 4px solid var(--green);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    padding: 19px;
    text-decoration: none;
    box-shadow: 0 14px 30px rgba(16, 42, 58, .07);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.ggtec-module-card.mobile-dashboard-card:hover {
    transform: translateY(-2px);
    border-color: #c6d9df;
    box-shadow: 0 20px 42px rgba(16, 42, 58, .11);
}

.ggtec-module-card.mobile-dashboard-card.primary {
    border-top-color: var(--green);
}

.ggtec-module-card.mobile-dashboard-card.documenti {
    border-top-color: var(--blue);
}

.ggtec-module-card.mobile-dashboard-card.moduli {
    border-top-color: #4f8db5;
}

.ggtec-module-card.mobile-dashboard-card.storico {
    border-top-color: #7a91a0;
}

.ggtec-module-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ggtec-icon-badge {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(14, 155, 111, .22);
    border-radius: 8px;
    background: var(--soft-green);
    color: var(--green-dark);
    font-style: normal;
    font-size: 13px;
    font-weight: 900;
}

.ggtec-module-card.documenti .ggtec-icon-badge {
    border-color: rgba(16, 42, 58, .2);
    background: var(--blue-soft);
    color: var(--blue);
}

.ggtec-module-card.moduli .ggtec-icon-badge {
    border-color: rgba(79, 141, 181, .2);
    background: #eaf4f8;
    color: #2f6f91;
}

.ggtec-module-card.storico .ggtec-icon-badge {
    border-color: rgba(122, 145, 160, .24);
    background: #f0f5f6;
    color: #566b77;
}

.ggtec-module-card.mobile-dashboard-card > small,
.ggtec-module-card .ggtec-module-kicker {
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.ggtec-module-card.mobile-dashboard-card span,
.ggtec-module-card .ggtec-module-title {
    display: block;
    color: var(--ink);
    font-size: 18px;
    line-height: 1.18;
    font-weight: 850;
}

.ggtec-module-card.mobile-dashboard-card p,
.ggtec-module-card .ggtec-module-text {
    margin: 0;
    color: var(--muted);
    font-size: 14.5px;
    line-height: 1.45;
}

.ggtec-module-card-button,
.ggtec-module-card.mobile-dashboard-card b {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    padding: 8px 13px;
    font-size: 13px;
    font-weight: 850;
}

.ggtec-section-card.mobile-section,
.ggtec-site-shell .mobile-section,
.ggtec-site-shell .panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    padding: 22px;
    box-shadow: 0 12px 28px rgba(16, 42, 58, .055);
}

.ggtec-form-section.mobile-section,
.ggtec-site-shell form.mobile-report-form > .mobile-section {
    display: grid;
    gap: 16px;
}

.ggtec-site-shell .mobile-section h2,
.ggtec-site-shell .panel h2 {
    margin: 0;
    color: var(--ink);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 850;
}

.ggtec-site-shell .mobile-section-title,
.ggtec-site-shell .section-title {
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 4px;
}

.ggtec-site-shell .mobile-field {
    display: grid;
    gap: 7px;
}

.ggtec-site-shell .mobile-field label,
.ggtec-site-shell label {
    color: #23343d;
    font-size: 13px;
    font-weight: 850;
}

.ggtec-site-shell input[type="date"],
.ggtec-site-shell input[type="email"],
.ggtec-site-shell input[type="number"],
.ggtec-site-shell input[type="password"],
.ggtec-site-shell input[type="search"],
.ggtec-site-shell input[type="text"],
.ggtec-site-shell input[type="file"],
.ggtec-site-shell select,
.ggtec-site-shell textarea {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfd;
    color: var(--ink);
}

.ggtec-site-shell textarea {
    min-height: 116px;
}

.ggtec-site-shell .mobile-readonly {
    min-height: 48px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f7fbfb;
    color: var(--ink);
    padding: 12px;
}

.ggtec-site-shell .mobile-repeat-card,
.ggtec-site-shell .photo-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfd;
    box-shadow: none;
}

.ggtec-site-shell .mobile-check {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.ggtec-primary-button,
.ggtec-site-shell .mobile-primary-action,
.ggtec-site-shell .mobile-save-button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--green);
    border-radius: 8px;
    background: var(--green);
    color: #ffffff;
    padding: 10px 16px;
    text-decoration: none;
    font-weight: 850;
    box-shadow: 0 12px 22px rgba(14, 155, 111, .20);
}

.ggtec-secondary-button,
.ggtec-site-shell .mobile-secondary-action,
.ggtec-site-shell .button.ghost,
.ggtec-site-shell .button.subtle {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--blue);
    padding: 9px 14px;
    text-decoration: none;
    font-weight: 850;
    box-shadow: none;
}

.ggtec-site-shell .mobile-save-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    padding: 14px;
    box-shadow: 0 16px 32px rgba(16, 42, 58, .08);
}

.ggtec-status-badge,
.ggtec-site-shell .signature-required {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    border: 1px solid rgba(14, 155, 111, .22);
    border-radius: 999px;
    background: var(--soft-green);
    color: var(--green-dark);
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 850;
}

.ggtec-signature-box.signature-section {
    border-top: 4px solid var(--green);
}

.ggtec-site-shell .signature-pad-wrap {
    border: 1px dashed rgba(16, 42, 58, .34);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(244, 247, 248, .72)),
        #ffffff;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .75);
}

.ggtec-site-shell .signature-placeholder {
    color: rgba(18, 33, 43, .26);
    font-size: 28px;
    font-weight: 850;
}

.ggtec-site-shell .signature-actions {
    align-items: center;
}

.ggtec-site-shell .signature-feedback {
    color: var(--muted);
    font-weight: 750;
}

.ggtec-site-shell .mobile-list {
    display: grid;
    gap: 10px;
}

.ggtec-site-shell .mobile-list-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    padding: 14px;
    box-shadow: 0 8px 18px rgba(16, 42, 58, .045);
}

.ggtec-site-shell .mobile-list-item:hover {
    border-color: #c6d9df;
    background: #fbfdfd;
}

.ggtec-site-shell .mobile-list-item span,
.ggtec-site-shell .report-meta span {
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 800;
}

.ggtec-site-shell .mobile-list-item .ggtec-status-badge,
.ggtec-site-shell .report-meta .ggtec-status-badge {
    width: fit-content;
    color: var(--green-dark);
    font-size: 12px;
}

.ggtec-site-shell .mobile-list-item strong,
.ggtec-site-shell .report-meta strong {
    color: var(--ink);
}

.ggtec-site-shell .report-meta {
    gap: 12px;
}

.ggtec-site-shell .report-meta > div {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfd;
    padding: 13px;
}

.ggtec-site-shell .summary-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 10px 22px rgba(16, 42, 58, .055);
}

.ggtec-site-shell .table-wrap {
    border: 1px solid var(--line);
    border-radius: 8px;
}

@media (max-width: 1040px) {
    .ggtec-module-grid.mobile-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .site-operator-hero.ggtec-hero-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .ggtec-site-shell {
        gap: 16px;
    }

    .site-operator-hero.ggtec-hero-card,
    .ggtec-page-header.mobile-report-head,
    .ggtec-site-shell .dashboard-head,
    .ggtec-section-card.mobile-section,
    .ggtec-site-shell .mobile-section,
    .ggtec-site-shell .panel {
        padding: 17px;
    }

    .site-operator-brand.ggtec-hero-brand {
        align-items: flex-start;
    }

    .site-operator-brand.ggtec-hero-brand img {
        width: 64px;
        height: 64px;
    }

    .site-operator-brand.ggtec-hero-brand h1,
    .ggtec-page-header.mobile-report-head.cantieri h1,
    .ggtec-site-shell .dashboard-head h1 {
        font-size: 25px;
    }

    .ggtec-module-grid.mobile-dashboard-grid {
        grid-template-columns: 1fr;
    }

    .ggtec-module-card.mobile-dashboard-card {
        min-height: 174px;
    }

    .ggtec-site-shell .mobile-save-bar,
    .ggtec-site-shell .mobile-action-stack.compact {
        align-items: stretch;
        flex-direction: column;
    }

    .ggtec-site-shell .mobile-save-button,
    .ggtec-site-shell .mobile-primary-action,
    .ggtec-site-shell .mobile-secondary-action {
        width: 100%;
    }
}

/* Fase 1: dashboard operatore cantiere mobile-first */
body.site-mobile-dashboard-page {
    min-height: 100vh;
    background:
        linear-gradient(180deg, #e9f1f3 0, #f4f7f8 210px, #f4f7f8 100%);
}

body.site-mobile-dashboard-page .topbar {
    display: none;
}

body.site-mobile-dashboard-page .main {
    width: 100%;
    margin: 0;
    padding: 0;
}

.site-mobile-shell {
    width: min(100%, 1180px);
    min-height: 100svh;
    display: grid;
    align-content: start;
    gap: 14px;
    margin: 0 auto;
    padding: 14px;
    color: #12212B;
}

.site-dashboard-topbar {
    min-height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid rgba(220, 229, 232, .86);
    border-radius: 22px;
    background: rgba(255, 255, 255, .94);
    padding: 9px 10px 9px 12px;
    box-shadow: 0 14px 32px rgba(16, 42, 58, .075);
}

.site-dashboard-brand,
.site-brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #102A3A;
    text-decoration: none;
}

.site-dashboard-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid #DCE5E8;
    border-radius: 14px;
    background: #ffffff;
}

.site-dashboard-mark img {
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.site-dashboard-brand strong,
.site-dashboard-brand small {
    display: block;
    line-height: 1.08;
}

.site-dashboard-brand strong {
    font-size: 18px;
    font-weight: 900;
}

.site-dashboard-brand small {
    margin-top: 2px;
    color: #667681;
    font-size: 12px;
    font-weight: 800;
}

.site-dashboard-logout,
.site-logout-button {
    min-height: 42px;
    border: 1px solid #DCE5E8;
    border-radius: 14px;
    background: #F4F7F8;
    color: #102A3A;
    padding: 9px 14px;
    font-weight: 850;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.site-dashboard-logout:hover,
.site-dashboard-logout:focus-visible,
.site-logout-button:hover,
.site-logout-button:focus-visible {
    outline: 0;
    border-color: rgba(14, 155, 111, .45);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(14, 155, 111, .14);
}

.site-dashboard-logout:active,
.site-logout-button:active {
    transform: scale(.98);
}

.site-hero-card {
    display: block;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 24px;
    background:
        linear-gradient(135deg, #102A3A 0%, #0b4550 58%, #0E9B6F 140%),
        #102A3A;
    color: #ffffff;
    padding: 18px;
    box-shadow: 0 18px 36px rgba(16, 42, 58, .18);
}

.site-hero-content {
    display: grid;
    gap: 10px;
}

.site-hero-meta-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.site-hero-date,
.site-hero-role {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 850;
}

.site-hero-date {
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .10);
    color: rgba(255, 255, 255, .84);
}

.site-hero-role {
    border: 1px solid rgba(221, 245, 236, .36);
    background: rgba(221, 245, 236, .16);
    color: #bff3df;
}

.site-user-title {
    margin: 0;
    color: #ffffff;
    font-size: clamp(27px, 6vw, 38px);
    line-height: 1.02;
    font-weight: 900;
}

.site-hero-card p:not(.site-hero-date) {
    max-width: 640px;
    margin: 0;
    color: rgba(255, 255, 255, .82);
    font-size: 15px;
    line-height: 1.45;
}

.site-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.site-mobile-shell .site-module-card {
    --module-accent: #0E9B6F;
    --module-soft: #DDF5EC;
    min-height: 112px;
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "icon title action"
        "icon description action";
    align-items: center;
    column-gap: 13px;
    row-gap: 5px;
    border: 1px solid rgba(220, 229, 232, .96);
    border-top: 0;
    border-radius: 22px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(249, 252, 252, .96)),
        #ffffff;
    color: #12212B;
    padding: 15px;
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(16, 42, 58, .09);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.site-mobile-shell .site-module-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: var(--module-accent);
}

.site-mobile-shell .site-module-card.primary {
    --module-accent: #0E9B6F;
    --module-soft: #DDF5EC;
}

.site-mobile-shell .site-module-card.storico {
    --module-accent: #102A3A;
    --module-soft: #EAF3F7;
}

.site-mobile-shell .site-module-card.moduli {
    --module-accent: #287CA3;
    --module-soft: #E7F3F7;
}

.site-mobile-shell .site-module-card.documenti {
    --module-accent: #5F7480;
    --module-soft: #EEF3F5;
}

.site-mobile-shell .site-module-card:hover,
.site-mobile-shell .site-module-card:focus-visible {
    outline: 0;
    transform: translateY(-2px);
    border-color: rgba(14, 155, 111, .28);
    box-shadow: 0 22px 42px rgba(16, 42, 58, .14);
}

.site-mobile-shell .site-module-card:active {
    transform: scale(.985);
}

.site-module-card-top {
    grid-area: icon;
    display: grid;
    place-items: center;
}

.site-mobile-shell .site-module-icon {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(16, 42, 58, .10);
    border-radius: 16px;
    background: var(--module-soft);
    color: var(--module-accent);
}

.site-mobile-shell .site-module-icon svg {
    width: 27px;
    height: 27px;
}

.site-mobile-shell .site-module-kicker {
    display: none;
    color: #667681;
    font-size: 11.5px;
    font-weight: 900;
    text-transform: uppercase;
}

.site-mobile-shell .site-module-title {
    grid-area: title;
    color: #12212B;
    font-size: 15.5px;
    line-height: 1.16;
    font-weight: 900;
}

.site-mobile-shell .site-module-description {
    grid-area: description;
    margin: 0;
    color: #667681;
    font-size: 13.5px;
    line-height: 1.42;
}

.site-mobile-shell .site-module-action {
    grid-area: action;
    min-height: 42px;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(220, 229, 232, .88);
    border-radius: 999px;
    background: #ffffff;
    color: var(--module-accent);
    padding: 8px 11px;
    font-size: 12.5px;
    font-weight: 900;
    box-shadow: none;
}

.site-module-arrow {
    display: inline-flex;
    align-items: center;
    color: currentColor;
    font-size: 20px;
    line-height: 1;
    transform: translateY(-1px);
}

.site-dashboard-flash {
    border-color: rgba(14, 155, 111, .24);
    background: #DDF5EC;
    color: #087853;
}

.site-recent-panel {
    margin-top: 2px;
}

@media (max-width: 1080px) {
    .site-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .site-mobile-shell {
        width: 100%;
        gap: 14px;
        padding: 16px;
    }

    .site-dashboard-topbar {
        min-height: 56px;
    }

    .site-hero-card {
        padding: 16px;
    }

    .site-module-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .site-mobile-shell .site-module-card {
        min-height: auto;
        padding: 14px;
    }

    .site-mobile-shell .site-module-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 390px) {
    .site-mobile-shell {
        padding: 14px;
    }

    .site-user-title {
        font-size: 27px;
    }

    .site-dashboard-brand strong {
        font-size: 17px;
    }
}
