@import url("/static/tokens.css");
.type-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.type-card { min-width: 0; padding: 17px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); }
.type-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.type-mark { display: grid; width: 42px; height: 42px; flex: 0 0 auto; place-items: center; border: 1px solid var(--fpr-border); border-radius: 12px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 11px; font-weight: 780; letter-spacing: .3px; }
.type-card h3 { margin: 14px 0 4px; color: var(--fpr-ink-950); font-size: 14px; font-weight: 720; }
.type-card > p { min-height: 34px; margin: 0; color: var(--fpr-text-muted); font-size: 10px; line-height: 1.6; }
.type-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--fpr-text-muted); font-size: 9px; }
.type-built-in { padding: 3px 7px; border-radius: 20px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-weight: 650; }
.plant-list { display: grid; gap: 11px; }
.plant-card { padding: 17px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); }
.plant-heading { display: flex; align-items: center; gap: 12px; }
.plant-identity { display: grid; min-width: 0; gap: 3px; }
.plant-identity h3 { overflow: hidden; margin: 0; color: var(--fpr-ink-950); font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.plant-identity > span { color: var(--fpr-text-muted); font-size: 10px; }
.plant-open { margin-left: auto; white-space: nowrap; }
.plant-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 20px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--fpr-border); }
.plant-meta > span { min-width: 0; color: var(--fpr-text); font-size: 10px; overflow-wrap: anywhere; }
.plant-meta strong { display: block; margin-bottom: 3px; color: var(--fpr-text-muted); font-size: 9px; font-weight: 650; }
.field-textarea { min-height: 92px; resize: vertical; }
.pairing-code { max-width: 220px; font-size: 22px; font-weight: 750; letter-spacing: 6px; text-transform: uppercase; }
.workstation-config-list { display: grid; gap: 10px; margin-bottom: 14px; }
.analysis-schedule { margin: 0 0 14px; padding: 12px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); }
.analysis-schedule legend { padding: 0 5px; color: var(--fpr-ink-900); font-size: 11px; font-weight: 700; }
.analysis-schedule > small { display: block; margin-top: 8px; color: var(--fpr-text-muted); font-size: 9px; }
.analysis-time-ranges { display: grid; grid-template-columns: repeat(5, minmax(100px, 1fr)); gap: 8px; }
.analysis-time-range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.analysis-time-range label { color: var(--fpr-text-muted); font-size: 9px; }
.analysis-time-range .field-control { min-height: 36px; margin-top: 3px; padding: 6px; }
.configuration-delivery { display: flex; align-items: center; gap: 7px; }
.monitor-mode-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 13px; }
.monitor-mode-selector label { display: flex; min-width: 0; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface); cursor: pointer; }
.monitor-mode-selector label:has(input:checked) { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.monitor-mode-selector input { margin-top: 2px; }
.monitor-mode-selector span { display: grid; gap: 3px; }
.monitor-mode-selector strong { color: var(--fpr-ink-900); font-size: 12px; }
.monitor-mode-selector small { color: var(--fpr-text-muted); font-size: 10px; line-height: 1.45; }
.workstation-config-card { overflow: hidden; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface); }
.workstation-config-card:has([data-plant-toggle]:checked) { border-color: var(--fpr-brand-600); }
.workstation-config-header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--fpr-surface-soft); }
.config-plant-toggle { display: flex; min-width: 0; align-items: center; gap: 10px; cursor: pointer; }
.config-plant-toggle > span { display: grid; min-width: 0; gap: 2px; }
.config-plant-toggle strong { color: var(--fpr-ink-900); font-size: 12px; }
.config-plant-toggle small { color: var(--fpr-text-muted); font-size: 10px; }
.workstation-config-fields { padding: 12px; }
.workstation-config-fields[hidden] { display: none; }
.config-mode { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 10px; color: var(--fpr-text); font-size: 10px; }
.config-mode label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.camera-selection-table { overflow-x: auto; border: 1px solid var(--fpr-border); }
.camera-selection-head, .camera-selection-row { display: grid; grid-template-columns: minmax(210px, 1fr) 80px 100px; align-items: center; gap: 8px; padding: 7px 10px; }
.camera-selection-head, .camera-selection-row { min-width: 430px; }
.camera-selection-head { color: var(--fpr-text-muted); background: var(--fpr-surface-soft); font-size: 9px; font-weight: 700; text-transform: uppercase; }
.camera-selection-row { border-top: 1px solid var(--fpr-border); font-size: 10px; }
.camera-selection-identity { display: flex; min-width: 0; align-items: center; gap: 9px; }
.camera-selection-identity > span:last-child { display: grid; min-width: 0; gap: 1px; }
.camera-selection-row strong { color: var(--fpr-ink-900); font-size: 11px; }
.camera-selection-row small { color: var(--fpr-text-muted); font-size: 9px; }
.camera-selection-row label { display: flex; justify-content: center; }
.camera-quality { grid-column: 1 / -1; display: grid; gap: 9px; padding: 10px 0 3px; border-top: 1px solid var(--fpr-border); }
.camera-quality-current { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; color: var(--fpr-text); }
.camera-quality-current strong { font-size: 10px; }
.camera-quality-current > span { font-size: 10px; font-weight: 650; }
.camera-quality-current small { width: 100%; }
.camera-quality-current a { color: var(--fpr-brand-700); font-weight: 650; }
.quality-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.quality-presets label { min-height: 44px; align-items: center; justify-content: flex-start; gap: 6px; padding: 7px 8px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); cursor: pointer; }
.quality-presets label:has(input:checked) { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.quality-presets span { display: grid; gap: 2px; color: var(--fpr-ink-900); font-size: 10px; font-weight: 680; }
.quality-presets small { font-size: 8px; font-weight: 500; line-height: 1.35; }
.quality-custom { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quality-custom[hidden] { display: none; }
.quality-custom label { display: grid; justify-content: stretch; gap: 4px; color: var(--fpr-text-muted); font-size: 9px; font-weight: 650; }
.quality-custom input { width: 100%; min-width: 0; }
.camera-analysis-options { grid-column: 1 / -1; padding: 10px 0 3px; border-top: 1px solid var(--fpr-border); }
.analysis-region-editor { display: grid; gap: 8px; width: min(100%, 960px); }
.analysis-region-editor[hidden] { display: none; }
.analysis-region-editor canvas { display: block; width: 100%; height: auto; border: 1px solid var(--fpr-border-strong); border-radius: 4px; background: var(--fpr-ink-950); cursor: crosshair; touch-action: none; }
.analysis-region-actions { display: flex; align-items: center; gap: 7px; }
.analysis-region-actions [data-region-count] { margin-left: auto; color: var(--fpr-text-muted); font-size: 9px; font-weight: 700; }
.analysis-region-actions .is-armed { border-color: var(--fpr-brand-600); color: var(--fpr-brand-700); background: var(--fpr-brand-100); }
.camera-preview-button, .camera-preview-empty { display: grid; width: 72px; height: 40px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid var(--fpr-border); border-radius: 4px; background: var(--fpr-surface-soft); }
.camera-preview-button { padding: 0; cursor: zoom-in; }
.camera-preview-button:hover, .camera-preview-button:focus-visible { border-color: var(--fpr-brand-600); outline: 2px solid var(--fpr-brand-100); outline-offset: 1px; }
.camera-preview-button img { display: block; width: 100%; height: 100%; object-fit: cover; }
.camera-preview-empty { color: var(--fpr-text-subtle); font-size: 8px; font-weight: 700; }
.snapshot-preview-dialog { width: min(1100px, calc(100vw - 28px)); }
.snapshot-preview-body { display: grid; place-items: center; padding: 0; background: var(--fpr-ink-950); }
.snapshot-preview-body img { display: block; width: 100%; height: auto; max-height: calc(100vh - 150px); object-fit: contain; }
.detail-grid-wide { grid-column: 1 / -1; }
.plant-delete { margin-top: 18px; }
.section-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.section-link-card { display: flex; min-width: 0; align-items: center; gap: 13px; padding: 16px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); color: inherit; background: var(--fpr-surface); text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.section-link-card:hover { transform: translateY(-1px); border-color: var(--fpr-brand-600); box-shadow: var(--fpr-shadow-sm); }
.section-link-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 10px; font-weight: 750; }
.section-link-card > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.section-link-card strong { color: var(--fpr-ink-900); font-size: 12px; font-weight: 700; }
.section-link-card small { color: var(--fpr-text-muted); font-size: 10px; line-height: 1.5; }
.section-link-arrow { margin-left: auto; color: var(--fpr-brand-700); font-size: 17px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; margin: 0; }
.detail-grid > div { padding: 15px 0; border-top: 1px solid var(--fpr-border); }
.detail-grid dt { margin-bottom: 5px; color: var(--fpr-text-muted); font-size: 10px; font-weight: 600; }
.detail-grid dd { margin: 0; color: var(--fpr-ink-900); font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.search-form { display: flex; align-items: center; gap: 9px; margin: 0 0 16px; }
.search-form .field-control { min-width: 0; flex: 1 1 auto; }
.search-icon { margin-right: -32px; z-index: 1; padding-left: 11px; color: var(--fpr-text-muted); font-size: 19px; line-height: 1; }
.search-form input { padding-left: 34px; }
.customer-cell { display: flex; align-items: center; gap: 10px; min-width: 190px; }
.customer-type-icon { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; border-radius: 9px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 9px; font-weight: 750; }
.contact-count { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding-inline: 5px; border-radius: 20px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 9px; font-weight: 730; }
.muted-value { color: var(--fpr-text-subtle); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; color: var(--fpr-text-muted); font-size: 10px; }
.breadcrumbs a { color: var(--fpr-brand-700); font-weight: 650; text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-list { display: grid; gap: 11px; }
.contact-card { padding: 16px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); }
.contact-heading { display: flex; align-items: center; gap: 11px; }
.contact-avatar { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 12px; font-weight: 750; }
.contact-identity h3 { margin: 0 0 2px; color: var(--fpr-ink-950); font-size: 12px; font-weight: 700; }
.contact-identity > span { color: var(--fpr-text-muted); font-size: 10px; }
.contact-details { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0 49px; color: var(--fpr-text-muted); font-size: 10px; }
.contact-details a { color: var(--fpr-brand-700); text-decoration: none; }
.contact-details a:hover { text-decoration: underline; text-underline-offset: 3px; }
.contact-remove { margin-top: 9px; }
.add-contact-details { margin-top: 18px; border: 1px dashed var(--fpr-border-strong); border-radius: var(--fpr-radius-md); background: var(--fpr-surface-soft); }
.add-contact-details > summary { display: flex; min-height: 49px; align-items: center; gap: 9px; padding: 0 14px; color: var(--fpr-brand-700); font-size: 11px; font-weight: 690; cursor: pointer; list-style: none; }
.add-contact-details > summary::-webkit-details-marker { display: none; }
.add-contact-details[open] > summary { border-bottom: 1px solid var(--fpr-border); }
.add-contact-plus { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 7px; color: var(--fpr-surface); background: var(--fpr-brand-700); font-size: 17px; line-height: 1; }
.add-contact-content { padding: 17px; }
.contact-empty { margin-bottom: 16px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.section-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.section-toolbar .panel-heading { flex: 1 1 auto; margin: 0; }
.compact-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; overflow: hidden; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-border); }
.compact-summary > div { min-width: 0; padding: 14px 16px; background: var(--fpr-surface); }
.compact-summary span { display: block; margin-bottom: 4px; color: var(--fpr-text-muted); font-size: 9px; font-weight: 650; text-transform: uppercase; }
.compact-summary strong { display: block; overflow: hidden; color: var(--fpr-ink-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.entity-list { display: grid; border-top: 1px solid var(--fpr-border); }
.entity-row { display: grid; grid-template-columns: minmax(180px, 1.2fr) minmax(180px, 1fr) auto; align-items: center; gap: 16px; min-width: 0; padding: 13px 2px; border-bottom: 1px solid var(--fpr-border); }
.entity-row-main { min-width: 0; }
.entity-row-main strong { display: block; overflow: hidden; color: var(--fpr-ink-900); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.entity-row-main small, .entity-row-meta { color: var(--fpr-text-muted); font-size: 10px; }
.entity-row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.app-dialog { width: min(720px, calc(100vw - 32px)); max-height: min(880px, calc(100vh - 32px)); padding: 0; overflow: hidden; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); color: var(--fpr-text); background: var(--fpr-surface); box-shadow: 0 24px 70px rgb(15 23 42 / 24%); }
.app-dialog::backdrop { background: rgb(15 23 42 / 48%); backdrop-filter: blur(3px); }
.dialog-shell { display: grid; max-height: inherit; grid-template-rows: auto minmax(0, 1fr); }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 22px 17px; border-bottom: 1px solid var(--fpr-border); }
.dialog-header h2 { margin: 2px 0 4px; color: var(--fpr-ink-950); font-size: 19px; font-weight: 720; }
.dialog-header p { margin: 0; color: var(--fpr-text-muted); font-size: 10px; }
.dialog-close { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); color: var(--fpr-text-muted); background: var(--fpr-surface); font-size: 20px; cursor: pointer; }
.dialog-close:hover { color: var(--fpr-ink-900); background: var(--fpr-surface-soft); }
.dialog-body { overflow-y: auto; padding: 21px 22px 24px; }
.dialog-actions { position: sticky; bottom: -24px; display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin: 20px -22px -24px; padding: 15px 22px; border-top: 1px solid var(--fpr-border); background: var(--fpr-surface); }
.verification-result { margin-top: 16px; padding: 13px 14px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); }
.verification-result strong { display: block; margin-bottom: 3px; font-size: 11px; }
.verification-result p { margin: 0; font-size: 10px; line-height: 1.55; }
.verification-pending { color: var(--fpr-brand-700); background: var(--fpr-brand-100); }
.verification-success { border-color: var(--fpr-success-100); color: var(--fpr-success-700); background: var(--fpr-success-100); }
.verification-error { border-color: var(--fpr-warning-100); color: var(--fpr-warning-700); background: var(--fpr-warning-100); }

/* Shell applicativa e menu globale */
.app-shell { min-height: 100vh; background: var(--fpr-page); }
.app-header { position: sticky; z-index: 20; top: 0; display: flex; min-height: 72px; align-items: center; gap: 30px; padding: 0 max(24px, calc((100vw - var(--fpr-content-width)) / 2)); border-bottom: 1px solid var(--fpr-border); background: var(--fpr-surface); box-shadow: var(--fpr-shadow-sm); }
.app-header .brand { flex: 0 0 auto; }
.app-header .brand-logo-frame { width: 82px; height: 36px; }
.app-header .brand-caption { font-size: 9px; }
.app-nav { display: flex; height: 72px; align-items: stretch; gap: 5px; }
.app-nav a { position: relative; display: inline-flex; align-items: center; padding: 0 13px; color: var(--fpr-text-muted); font-size: 12px; font-weight: 620; text-decoration: none; transition: color .15s ease, background .15s ease; }
.app-nav a:hover { color: var(--fpr-brand-700); background: var(--fpr-surface-soft); }
.app-nav a[aria-current="page"] { color: var(--fpr-brand-700); }
.app-nav a[aria-current="page"]::after { position: absolute; right: 12px; bottom: 0; left: 12px; height: 2px; border-radius: 2px 2px 0 0; background: var(--fpr-brand-600); content: ""; }
.header-user { display: flex; min-width: 0; align-items: center; gap: 10px; margin-left: auto; }
.user-avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; border: 1px solid var(--fpr-border); border-radius: 50%; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 12px; font-weight: 750; }
.user-meta { display: grid; min-width: 0; gap: 1px; }
.user-meta strong { overflow: hidden; max-width: 180px; color: var(--fpr-ink-900); font-size: 11px; font-weight: 670; text-overflow: ellipsis; white-space: nowrap; }
.user-meta small { color: var(--fpr-text-muted); font-size: 10px; }
.logout-form { margin-left: 8px; }
.button-quiet { display: inline-flex; min-height: 36px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid transparent; border-radius: var(--fpr-radius-sm); color: var(--fpr-text-muted); background: transparent; font-size: 11px; font-weight: 650; cursor: pointer; }
.button-quiet:hover { border-color: var(--fpr-border); color: var(--fpr-danger-700); background: var(--fpr-danger-100); }

/* Pagine autenticate */
.dashboard { width: min(100% - 48px, var(--fpr-content-width)); margin: 0 auto; padding: 39px 0 70px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; margin-bottom: 25px; }
.page-heading-copy { max-width: 730px; }
.page-eyebrow { margin-bottom: 9px; color: var(--fpr-brand-700); font-size: 10px; font-weight: 740; letter-spacing: 1.15px; text-transform: uppercase; }
.page-title { margin: 0 0 7px; color: var(--fpr-ink-950); font-size: clamp(29px, 4vw, 37px); font-weight: 720; letter-spacing: -1.35px; line-height: 1.16; }
.page-description { max-width: 680px; margin: 0; color: var(--fpr-text-muted); font-size: 13px; line-height: 1.7; }
.heading-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 22px 0; }
.metric { display: flex; min-height: 88px; align-items: center; gap: 13px; padding: 17px 19px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); box-shadow: var(--fpr-shadow-sm); }
.metric-icon { display: grid; width: 38px; height: 38px; flex: 0 0 auto; place-items: center; border-radius: 11px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 11px; font-weight: 760; }
.metric-value { display: block; color: var(--fpr-ink-950); font-size: 21px; font-weight: 740; line-height: 1.1; }
.metric-label { display: block; margin-top: 4px; color: var(--fpr-text-muted); font-size: 10px; font-weight: 590; }
.content-panel { margin: 19px 0; padding: 23px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); box-shadow: var(--fpr-shadow-sm); }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel-kicker { margin-bottom: 5px; color: var(--fpr-brand-700); font-size: 9px; font-weight: 750; letter-spacing: 1.1px; text-transform: uppercase; }
.panel-title { margin: 0; color: var(--fpr-ink-950); font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.panel-description { margin: 5px 0 0; color: var(--fpr-text-muted); font-size: 11px; line-height: 1.65; }
.panel-count { display: inline-flex; min-width: 27px; height: 25px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--fpr-border); border-radius: 20px; color: var(--fpr-text-muted); background: var(--fpr-surface-soft); font-size: 10px; font-weight: 680; }
.panel-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(270px, .85fr); gap: 18px; }
.side-note { align-self: start; padding: 17px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-brand-100); }
.side-note strong { display: block; margin-bottom: 5px; color: var(--fpr-ink-900); font-size: 12px; }
.side-note p { margin: 0; color: var(--fpr-text-muted); font-size: 11px; line-height: 1.7; }

/* Moduli e feedback */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 16px; }
.field { display: grid; min-width: 0; align-content: start; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field-label { color: var(--fpr-ink-900); font-size: 11px; font-weight: 660; }
.required-mark { margin-left: 3px; color: var(--fpr-danger-700); }
.field-control { width: 100%; min-height: 42px; padding: 9px 11px; border: 1px solid var(--fpr-border-strong); border-radius: var(--fpr-radius-sm); outline: none; color: var(--fpr-text); background: var(--fpr-surface); font-size: 12px; transition: border-color .15s ease, box-shadow .15s ease, background .15s ease; }
.field-control::placeholder { color: var(--fpr-text-subtle); }
.field-control:hover { border-color: var(--fpr-border-strong); }
.field-control:focus { border-color: var(--fpr-focus); box-shadow: 0 0 0 3px var(--fpr-brand-100); }
.field-control[aria-invalid="true"] { border-color: var(--fpr-danger-700); background: var(--fpr-surface); }
.field-control:disabled { color: var(--fpr-text-subtle); background: var(--fpr-surface-soft); cursor: not-allowed; }
select.field-control { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23637486' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; }
.field-help { color: var(--fpr-text-muted); font-size: 10px; line-height: 1.55; }
.field-error { min-height: 0; color: var(--fpr-danger-700); font-size: 10px; line-height: 1.4; }
.field-error:empty { display: none; }
.password-wrap { position: relative; }
.password-wrap .field-control { padding-right: 67px; }
.password-toggle { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); padding: 5px 6px; border: 0; border-radius: 5px; color: var(--fpr-brand-700); background: transparent; font-size: 10px; font-weight: 690; cursor: pointer; }
.password-toggle:hover { background: var(--fpr-brand-100); }
.form-actions { display: flex; align-items: center; gap: 10px; margin-top: 2px; }
.form-actions .button-primary { min-width: 150px; }
.alert { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; padding: 12px 14px; border: 1px solid transparent; border-radius: var(--fpr-radius-sm); font-size: 11px; }
.alert p { margin: 2px 0 0; line-height: 1.6; }
.alert-icon { display: grid; width: 19px; height: 19px; flex: 0 0 auto; place-items: center; border-radius: 50%; font-size: 11px; font-weight: 750; }
.alert-error { border-color: var(--fpr-danger-100); color: var(--fpr-danger-700); background: var(--fpr-danger-100); }
.alert-error .alert-icon { color: var(--fpr-surface); background: var(--fpr-danger-700); }
.alert-success { border-color: var(--fpr-success-100); color: var(--fpr-success-700); background: var(--fpr-success-100); }
.alert-success .alert-icon { color: var(--fpr-surface); background: var(--fpr-success-700); }
.alert-warning { border-color: var(--fpr-warning-100); color: var(--fpr-warning-700); background: var(--fpr-warning-100); }
.button-primary { display: inline-flex; min-height: 42px; align-items: center; justify-content: center; gap: 10px; padding: 0 15px; border: 1px solid var(--fpr-brand-700); border-radius: var(--fpr-radius-sm); color: var(--fpr-surface); background: var(--fpr-brand-700); box-shadow: var(--fpr-shadow-sm); font-size: 11px; font-weight: 690; text-decoration: none; cursor: pointer; transition: transform .15s ease, background .15s ease, box-shadow .15s ease; }
.button-primary:hover { transform: translateY(-1px); border-color: var(--fpr-brand-600); background: var(--fpr-brand-600); box-shadow: var(--fpr-shadow-md); }
.button-primary:disabled { transform: none; opacity: .7; cursor: wait; }
.button-secondary { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 12px; border: 1px solid var(--fpr-border-strong); border-radius: var(--fpr-radius-sm); color: var(--fpr-ink-900); background: var(--fpr-surface); font-size: 10px; font-weight: 660; text-decoration: none; cursor: pointer; transition: background .15s ease, border-color .15s ease; }
.button-secondary:hover { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.button-danger { color: var(--fpr-danger-700); }

/* Istituti e utenti */
.record-list { display: grid; gap: 11px; }
.record-card { padding: 16px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-md); background: var(--fpr-surface); transition: border-color .15s ease, box-shadow .15s ease; }
.record-card:hover { border-color: var(--fpr-border-strong); box-shadow: var(--fpr-shadow-sm); }
.record-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.record-title { margin: 0 0 5px; color: var(--fpr-ink-950); font-size: 13px; font-weight: 710; }
.record-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; color: var(--fpr-text-muted); font-size: 10px; }
.record-meta span { overflow-wrap: anywhere; }
.record-submeta { margin-top: 7px; color: var(--fpr-text-muted); font-size: 10px; }
.status-badge { display: inline-flex; min-height: 23px; flex: 0 0 auto; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid transparent; border-radius: 30px; font-size: 9px; font-weight: 730; letter-spacing: .3px; }
.status-badge::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; }
.status-active { border-color: var(--fpr-success-100); color: var(--fpr-success-700); background: var(--fpr-success-100); }
.status-inactive { border-color: var(--fpr-danger-100); color: var(--fpr-danger-700); background: var(--fpr-danger-100); }
.role-badge { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: 6px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 9px; font-weight: 710; }
.record-actions { display: flex; align-items: center; gap: 13px; margin-top: 11px; }
.inline-form { display: inline-flex; margin: 0; }
.button-link { padding: 0; border: 0; color: var(--fpr-brand-700); background: none; font-size: 10px; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.button-link:hover { color: var(--fpr-ink-900); }
.button-link.danger { color: var(--fpr-danger-700); }
.details-panel { margin-top: 14px; border-top: 1px solid var(--fpr-border); }
.details-panel summary { padding: 12px 0 2px; color: var(--fpr-brand-700); font-size: 10px; font-weight: 660; cursor: pointer; }
.details-content { padding-top: 15px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); }
.data-table { width: 100%; border-collapse: collapse; background: var(--fpr-surface); text-align: left; }
.data-table th { padding: 10px 12px; border-bottom: 1px solid var(--fpr-border); color: var(--fpr-text-muted); background: var(--fpr-surface-soft); font-size: 9px; font-weight: 720; letter-spacing: .55px; text-transform: uppercase; white-space: nowrap; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--fpr-border); color: var(--fpr-text); font-size: 10px; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--fpr-surface-soft); }
.table-name { display: block; color: var(--fpr-ink-900); font-size: 11px; font-weight: 680; }
.table-sub { display: block; margin-top: 3px; color: var(--fpr-text-muted); font-size: 9px; }
.table-actions { display: flex; justify-content: flex-end; }
.empty-state { display: grid; justify-items: center; padding: 33px 16px; border: 1px dashed var(--fpr-border-strong); border-radius: var(--fpr-radius-md); background: var(--fpr-surface-soft); text-align: center; }
.empty-icon { display: grid; width: 42px; height: 42px; place-items: center; margin-bottom: 12px; border-radius: 13px; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 13px; font-weight: 760; }
.empty-state strong { color: var(--fpr-ink-900); font-size: 12px; }
.empty-state p { max-width: 340px; margin: 5px 0 0; color: var(--fpr-text-muted); font-size: 10px; line-height: 1.6; }
.app-footer { display: flex; min-height: 50px; align-items: center; justify-content: space-between; gap: 15px; width: min(100% - 48px, var(--fpr-content-width)); margin: 0 auto; border-top: 1px solid var(--fpr-border); color: var(--fpr-text-subtle); font-size: 9px; font-weight: 650; letter-spacing: .55px; }

/* Login and account landing */
.auth-shell { min-height: 100vh; background: var(--fpr-surface); }
.auth-topbar { display: flex; min-height: 76px; align-items: center; justify-content: space-between; width: min(100% - 48px, 1320px); margin: 0 auto; border-bottom: 1px solid var(--fpr-border); }
.auth-topnote { color: var(--fpr-text-muted); font-size: 10px; font-weight: 640; letter-spacing: .8px; }
.login-layout { display: grid; min-height: min(690px, calc(100vh - 128px)); grid-template-columns: minmax(0, 1fr) minmax(390px, .82fr); align-items: center; gap: clamp(35px, 7vw, 100px); width: min(100% - 48px, 1120px); margin: 0 auto; padding: 55px 0; }
.login-intro { max-width: 520px; }
.login-intro .hero-title { font-size: clamp(39px, 5vw, 59px); }
.login-benefits { display: grid; gap: 12px; margin: 27px 0 0; padding: 0; list-style: none; }
.login-benefits li { display: flex; align-items: center; gap: 10px; color: var(--fpr-text-muted); font-size: 11px; }
.benefit-check { display: grid; width: 20px; height: 20px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 10px; font-weight: 750; }
.login-card { padding: clamp(24px, 3.6vw, 38px); border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-lg); background: var(--fpr-surface); box-shadow: var(--fpr-shadow-md); }
.login-card-heading { margin-bottom: 22px; }
.login-card-heading h2 { margin: 0 0 5px; color: var(--fpr-ink-950); font-size: 21px; font-weight: 730; letter-spacing: -.5px; }
.login-card-heading p { margin: 0; color: var(--fpr-text-muted); font-size: 11px; }
.login-form { display: grid; gap: 15px; }
.login-form .button-primary { width: 100%; min-height: 45px; margin-top: 5px; }
.login-footnote { margin: 17px 0 0; color: var(--fpr-text-muted); font-size: 10px; line-height: 1.65; text-align: center; }
.auth-footer { display: flex; min-height: 52px; align-items: center; justify-content: space-between; gap: 15px; width: min(100% - 48px, 1320px); margin: 0 auto; border-top: 1px solid var(--fpr-border); color: var(--fpr-text-subtle); font-size: 9px; font-weight: 650; letter-spacing: .5px; }
.secure-note { display: inline-flex; align-items: center; gap: 6px; color: var(--fpr-success-700); }
.access-layout { display: grid; min-height: calc(100vh - 130px); align-content: center; justify-items: start; width: min(100% - 48px, 760px); margin: 0 auto; padding: 50px 0; }
.notice-panel { width: min(100%, 620px); margin-top: 22px; }

@media (max-width: 920px) {
  .app-header { gap: 18px; padding-inline: 20px; }
  .app-header .brand-caption, .app-header .brand-divider { display: none; }
  .user-meta { display: none; }
  .panel-grid { grid-template-columns: 1fr; }
  .login-layout { gap: 35px; grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr); }
}
@media (max-width: 700px) {
  .app-header { position: relative; min-height: 63px; flex-wrap: wrap; gap: 0 12px; padding: 0 16px 8px; }
  .app-header .brand { min-height: 56px; }
  .app-header .brand-logo-frame { width: 75px; height: 33px; }
  .app-nav { order: 3; overflow-x: auto; width: 100%; height: 40px; margin-top: 2px; scrollbar-width: thin; }
  .app-nav a { flex: 0 0 auto; padding-inline: 11px; font-size: 10px; }
  .app-nav a[aria-current="page"]::after { right: 10px; left: 10px; }
  .header-user { gap: 7px; }
  .user-avatar { width: 30px; height: 30px; }
  .logout-form { margin-left: 0; }
  .button-quiet { min-height: 32px; padding-inline: 7px; font-size: 10px; }
  .dashboard { width: min(100% - 30px, var(--fpr-content-width)); padding: 27px 0 45px; }
  .section-links, .detail-grid { grid-template-columns: 1fr; }
  .type-grid { grid-template-columns: 1fr; }
  .plant-meta { grid-template-columns: 1fr; gap: 10px; }
  .plant-heading { align-items: flex-start; flex-wrap: wrap; }
  .quality-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quality-custom { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-time-ranges { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plant-open { margin-left: auto; }
  .search-form { flex-wrap: wrap; }
  .search-form .field-control { flex-basis: calc(100% - 90px); }
  .search-form .button-secondary { flex: 0 0 auto; }
  .contact-details { margin-left: 0; flex-direction: column; }
  .compact-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .entity-row { grid-template-columns: 1fr; gap: 7px; }
  .entity-row-actions { justify-content: flex-start; }
  .app-dialog { width: 100vw; max-width: none; max-height: calc(100vh - 12px); margin: auto 0 0; border-radius: var(--fpr-radius-md) var(--fpr-radius-md) 0 0; }
  .dialog-header, .dialog-body { padding-right: 16px; padding-left: 16px; }
  .dialog-actions { margin-right: -16px; margin-left: -16px; padding-right: 16px; padding-left: 16px; }
  .add-contact-content { padding: 13px; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 14px; margin-bottom: 18px; }
  .page-title { font-size: 29px; }
  .page-description { font-size: 12px; }
  .heading-actions { width: 100%; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin: 15px 0; }
  .metric { min-height: 82px; align-items: flex-start; flex-direction: column; gap: 7px; padding: 11px; }
  .metric-icon { width: 26px; height: 26px; border-radius: 8px; font-size: 8px; }
  .metric-value { font-size: 17px; }
  .metric-label { font-size: 8px; line-height: 1.35; }
  .content-panel { margin: 14px 0; padding: 17px 14px; }
  .panel-heading { margin-bottom: 15px; }
  .panel-title { font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .field-wide { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button-primary { width: 100%; }
  .record-card { padding: 13px; }
  .record-top { gap: 8px; }
  .record-meta { gap: 5px 9px; }
  .table-wrap { margin-inline: -1px; }
  .data-table th, .data-table td { padding: 9px 8px; }
  .data-table th { font-size: 8px; }
  .app-footer { width: min(100% - 30px, var(--fpr-content-width)); min-height: 58px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 2px; font-size: 8px; }
  .auth-topbar { width: min(100% - 32px, 1320px); min-height: 64px; }
  .auth-topnote { font-size: 9px; }
  .login-layout { min-height: 0; grid-template-columns: 1fr; gap: 24px; width: min(100% - 32px, 520px); padding: 35px 0 42px; }
  .login-intro .hero-title { margin-bottom: 11px; font-size: 38px; }
  .login-intro > .hero-copy { margin-bottom: 0; font-size: 13px; }
  .login-benefits { display: none; }
  .login-card { padding: 22px 18px; border-radius: var(--fpr-radius-md); box-shadow: var(--fpr-shadow-sm); }
  .login-card-heading h2 { font-size: 19px; }
  .auth-footer { width: min(100% - 32px, 1320px); min-height: 59px; align-items: flex-start; justify-content: center; flex-direction: column; gap: 3px; font-size: 8px; }
  .access-layout { width: min(100% - 32px, 760px); min-height: calc(100vh - 123px); }
}
@media (max-width: 390px) {
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 61px; align-items: center; flex-direction: row; padding: 10px 12px; }
  .metric-icon { width: 32px; height: 32px; }
  .metric-label { font-size: 9px; }
  .record-top { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; } }

/* Densità operativa: superfici piatte, controlli compatti, dati leggibili. */
body { font-size: 14px; }
.app-header { min-height: 60px; gap: 22px; box-shadow: none; }
.app-header .brand-logo-frame { width: 76px; height: 33px; }
.app-header .brand-caption { font-size: 8px; letter-spacing: 1px; }
.app-nav { height: 60px; gap: 2px; }
.app-nav a { padding-inline: 11px; font-size: 11px; }
.header-user { gap: 8px; }
.user-avatar { width: 30px; height: 30px; font-size: 11px; }
.button-quiet { min-height: 32px; padding-inline: 9px; font-size: 10px; }
.dashboard { padding: 24px 0 48px; }
.breadcrumbs { flex-wrap: wrap; gap: 6px 8px; margin-bottom: 11px; font-size: 10px; }
.page-heading { align-items: center; gap: 18px; margin-bottom: 16px; }
.page-heading-copy { max-width: 800px; }
.page-eyebrow { margin-bottom: 5px; font-size: 9px; letter-spacing: .8px; }
.page-title { margin-bottom: 4px; font-size: clamp(25px, 3vw, 30px); font-weight: 700; letter-spacing: 0; line-height: 1.2; }
.page-description { max-width: 760px; font-size: 12px; line-height: 1.5; }
.heading-actions { flex-wrap: wrap; gap: 7px; }
.metrics { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 13px 0; }
.metric { min-height: 62px; gap: 10px; padding: 10px 13px; border-radius: var(--fpr-radius-sm); box-shadow: none; }
.metric-icon, .metric .type-mark { width: 30px; height: 30px; border-radius: 7px; font-size: 9px; }
.metric-value { font-size: 17px; }
.metric-label { margin-top: 2px; font-size: 10px; }
.content-panel { margin: 11px 0; padding: 16px; border-radius: var(--fpr-radius-sm); box-shadow: none; }
.panel-heading { gap: 12px; margin-bottom: 11px; }
.panel-kicker { margin-bottom: 3px; font-size: 8px; letter-spacing: .8px; }
.panel-title { font-size: 15px; letter-spacing: 0; }
.panel-description { margin-top: 3px; font-size: 11px; line-height: 1.5; }
.panel-count { min-width: 24px; height: 22px; padding-inline: 7px; font-size: 9px; }
.section-toolbar { gap: 10px; margin-bottom: 11px; }
.compact-summary { border-radius: var(--fpr-radius-sm); }
.compact-summary > div { padding: 10px 12px; }
.compact-summary span { margin-bottom: 2px; font-size: 9px; }
.compact-summary strong { font-size: 12px; }
.entity-row { gap: 12px; padding: 9px 2px; }
.entity-row-main strong { font-size: 12px; }
.entity-row-main small, .entity-row-meta { font-size: 11px; line-height: 1.45; }
.entity-row-actions { gap: 9px; }
.detail-grid { gap: 0 18px; }
.detail-grid > div { padding: 10px 0; }
.detail-grid dt { margin-bottom: 3px; font-size: 10px; }
.detail-grid dd { font-size: 12px; }
.type-grid { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 8px; }
.type-card, .plant-card, .section-link-card { padding: 13px; border-radius: var(--fpr-radius-sm); box-shadow: none; }
.type-mark { width: 34px; height: 34px; border-radius: 7px; font-size: 10px; }
.type-card h3 { margin: 9px 0 3px; font-size: 13px; }
.type-card > p { min-height: 30px; font-size: 11px; line-height: 1.45; }
.type-card-meta { margin-top: 8px; font-size: 10px; }
.record-list { gap: 0; border-top: 1px solid var(--fpr-border); }
.record-card { padding: 11px 2px; border: 0; border-bottom: 1px solid var(--fpr-border); border-radius: 0; background: transparent; }
.record-card:hover { border-color: var(--fpr-border); background: var(--fpr-surface-soft); box-shadow: none; }
.record-title { margin-bottom: 3px; font-size: 12px; }
.record-meta, .record-submeta { font-size: 11px; }
.record-submeta { margin-top: 4px; }
.record-actions { gap: 11px; margin-top: 7px; }
.status-badge { min-height: 21px; padding-inline: 7px; border-radius: 12px; font-size: 9px; }
.role-badge { min-height: 21px; font-size: 9px; }
.button-primary, .button-secondary { min-height: 36px; padding-inline: 12px; border-radius: var(--fpr-radius-sm); box-shadow: none; font-size: 10px; }
.button-primary:hover { transform: none; box-shadow: none; }
.button-link { font-size: 10px; text-decoration: none; }
.button-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.form-grid { gap: 11px 13px; }
.field { gap: 4px; }
.field-label { font-size: 10px; }
.field-control { min-height: 38px; padding: 7px 10px; font-size: 12px; }
.field-help, .field-error { font-size: 9px; }
.field-textarea { min-height: 76px; }
.alert { margin: 10px 0; padding: 9px 11px; font-size: 10px; }
.table-wrap { border-radius: 0; }
.data-table { min-width: 640px; }
.data-table th { padding: 7px 9px; font-size: 9px; letter-spacing: .35px; }
.data-table td { padding: 8px 9px; font-size: 11px; }
.table-name { font-size: 12px; }
.table-sub { margin-top: 1px; font-size: 10px; }
.empty-state { padding: 24px 14px; border-radius: var(--fpr-radius-sm); }
.empty-icon { width: 34px; height: 34px; margin-bottom: 8px; border-radius: 8px; font-size: 11px; }
.empty-state strong { font-size: 12px; }
.empty-state p { margin-top: 3px; font-size: 11px; }
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: start; gap: 10px; }
.snapshot-card { min-width: 0; margin: 0; overflow: hidden; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface-soft); }
.snapshot-card img { display: block; width: 100%; height: auto; }
.snapshot-card figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 10px; }
.snapshot-card figcaption strong { color: var(--fpr-ink-900); font-size: 11px; }
.snapshot-card figcaption span { color: var(--fpr-text-muted); font-size: 9px; text-align: right; }
.app-dialog { width: min(620px, calc(100vw - 28px)); max-height: min(820px, calc(100vh - 28px)); border-radius: var(--fpr-radius-sm); box-shadow: var(--fpr-shadow-md); }
.app-dialog::backdrop { background: rgb(15 23 42 / 42%); backdrop-filter: none; }
.dialog-header { gap: 12px; padding: 15px 16px 13px; }
.dialog-header h2 { margin: 1px 0 2px; font-size: 16px; }
.dialog-header p { font-size: 10px; }
.dialog-close { width: 30px; height: 30px; border-radius: 5px; font-size: 18px; }
.dialog-body { padding: 15px 16px 18px; }
.dialog-actions { bottom: -18px; flex-wrap: wrap; margin: 15px -16px -18px; padding: 11px 16px; }
.side-note { padding: 12px; border-radius: var(--fpr-radius-sm); }
.side-note strong { margin-bottom: 3px; font-size: 11px; }
.side-note p { font-size: 10px; line-height: 1.5; }
.app-footer { min-height: 42px; }
.login-intro .hero-title { font-size: 46px; letter-spacing: 0; }

@media (max-width: 700px) {
  .app-header { min-height: 56px; padding-bottom: 6px; }
  .app-header .brand { min-height: 50px; }
  .app-nav { height: 36px; }
  .dashboard { padding: 20px 0 38px; }
  .page-heading { gap: 10px; margin-bottom: 13px; }
  .page-title { font-size: 25px; }
  .login-intro .hero-title { font-size: 32px; }
  .heading-actions { width: 100%; }
  .heading-actions > * { flex: 1 1 auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 10px 0; }
  .metric { min-height: 54px; align-items: center; flex-direction: row; gap: 8px; padding: 8px 10px; }
  .metric-icon { width: 28px; height: 28px; }
  .content-panel { margin: 9px 0; padding: 13px; }
  .snapshot-grid { grid-template-columns: 1fr; }
  .monitor-mode-selector { grid-template-columns: 1fr; }
  .section-toolbar { align-items: stretch; flex-direction: column; }
  .section-toolbar > .button-primary, .section-toolbar > .button-secondary { width: 100%; }
  .dialog-actions > * { flex: 1 1 auto; }
  .data-table { min-width: 600px; }
}

/* Configurazione postazione: gerarchia operativa e dettagli avanzati in modale. */
.workstation-detail-page { max-width: 1180px; }
.workstation-heading .heading-actions { flex-wrap: wrap; }
.workstation-mode-panel { display: grid; grid-template-columns: minmax(180px, .35fr) minmax(0, 1fr); align-items: center; gap: 22px; }
.workstation-mode-panel .panel-heading { margin: 0; }
.workstation-mode-panel form { display: flex; align-items: center; gap: 12px; }
.workstation-mode-panel .monitor-mode-selector { flex: 1 1 auto; margin: 0; }
.workstation-mode-panel .form-actions { margin: 0; }
.workstation-configuration-panel { padding: 0; overflow: hidden; }
.workstation-config-heading { padding: 20px 22px 17px; border-bottom: 1px solid var(--fpr-border); background: var(--fpr-surface-soft); }
.configuration-delivery { flex-wrap: wrap; justify-content: flex-end; }
.configuration-step { padding: 22px; }
.configuration-step + .configuration-step { border-top: 1px solid var(--fpr-border); }
.configuration-step-heading { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 16px; }
.configuration-step-number { display: grid; width: 25px; height: 25px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--fpr-surface); background: var(--fpr-ink-900); font-size: 10px; font-weight: 750; }
.configuration-step-heading h3 { margin: 1px 0 2px; color: var(--fpr-ink-950); font-size: 14px; }
.configuration-step-heading p { margin: 0; color: var(--fpr-text-muted); font-size: 10px; }
.analysis-schedule { margin: 0; border: 0; border-radius: 0; }
.schedule-mode-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 8px; margin: 0 0 14px 36px; }
.schedule-mode-selector label { display: flex; min-height: 58px; align-items: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); cursor: pointer; }
.schedule-mode-selector label:has(input:checked) { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.schedule-mode-selector input { margin-top: 2px; }
.schedule-mode-selector span { display: grid; gap: 2px; }
.schedule-mode-selector strong { color: var(--fpr-ink-900); font-size: 11px; }
.schedule-mode-selector small { color: var(--fpr-text-muted); font-size: 9px; }
.analysis-time-ranges { display: grid; max-width: 650px; gap: 7px; margin-left: 36px; }
.analysis-time-ranges[hidden] { display: none; }
.analysis-time-range { display: grid; grid-template-columns: 24px minmax(125px, 1fr) 22px minmax(125px, 1fr) 32px; align-items: end; gap: 8px; padding: 9px 10px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface-soft); }
.analysis-time-range[hidden] { display: none; }
.analysis-time-range-index { display: grid; width: 22px; height: 22px; margin-bottom: 7px; place-items: center; border-radius: 50%; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 9px; font-weight: 750; }
.analysis-time-range label { display: grid; gap: 3px; color: var(--fpr-text-muted); font-size: 9px; font-weight: 650; }
.analysis-time-range .field-control { min-height: 34px; margin: 0; padding: 5px 8px; background: var(--fpr-surface); }
.analysis-time-separator { align-self: center; padding-top: 16px; color: var(--fpr-text-subtle); text-align: center; }
.icon-button { display: grid; width: 30px; height: 30px; padding: 0; place-items: center; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); color: var(--fpr-text-muted); background: var(--fpr-surface); cursor: pointer; }
.icon-button:hover { border-color: var(--fpr-danger-700); color: var(--fpr-danger-700); }
.analysis-time-remove { margin-bottom: 2px; font-size: 16px; }
.analysis-time-add { margin: 9px 0 0 36px; }
.analysis-time-add[hidden] { display: none; }
.schedule-help { max-width: 650px; margin: 9px 0 0 36px; color: var(--fpr-text-muted); font-size: 9px; }
.workstation-config-list { margin: 0; gap: 12px; }
.workstation-config-card { border-color: var(--fpr-border-strong); }
.workstation-config-card:has([data-plant-toggle]:checked) { box-shadow: 0 0 0 1px var(--fpr-brand-100); }
.workstation-config-header { min-height: 62px; padding: 12px 14px; }
.config-plant-toggle input { width: 17px; height: 17px; }
.config-plant-toggle strong { font-size: 13px; }
.plant-selection-state { min-width: 58px; padding: 4px 7px; border-radius: 12px; color: var(--fpr-text-muted); background: var(--fpr-surface); font-size: 9px; font-weight: 700; text-align: center; }
.workstation-config-card:has([data-plant-toggle]:checked) .plant-selection-state { color: var(--fpr-brand-700); background: var(--fpr-brand-100); }
.workstation-config-fields { padding: 0; }
.plant-display-setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--fpr-border); color: var(--fpr-text-muted); font-size: 9px; font-weight: 700; }
.compact-segmented { display: inline-flex; padding: 2px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface-soft); }
.compact-segmented label { cursor: pointer; }
.compact-segmented input { position: absolute; opacity: 0; pointer-events: none; }
.compact-segmented span { display: block; padding: 5px 9px; border-radius: 3px; color: var(--fpr-text-muted); font-size: 9px; }
.compact-segmented label:has(input:checked) span { color: var(--fpr-ink-900); background: var(--fpr-surface); box-shadow: var(--fpr-shadow-sm); }
.camera-selection-table { overflow: visible; border: 0; border-top: 1px solid var(--fpr-border); }
.camera-selection-head, .camera-selection-row { min-width: 0; grid-template-columns: minmax(260px, 1fr) 82px 82px 94px; gap: 10px; padding: 9px 14px; }
.camera-selection-head { background: var(--fpr-surface); }
.camera-selection-row { min-height: 65px; }
.camera-selection-row:nth-child(odd) { background: var(--fpr-surface-soft); }
.camera-selection-identity strong { font-size: 11px; }
.camera-selection-identity > span:last-child { gap: 2px; }
.camera-config-summary { color: var(--fpr-text-muted); font-size: 8px; }
.camera-toggle input { width: 17px; height: 17px; accent-color: var(--fpr-brand-700); }
.camera-config-open { min-height: 32px; padding-inline: 10px; }
.camera-config-dialog { width: min(1080px, calc(100vw - 28px)); max-height: calc(100vh - 28px); }
.camera-config-dialog .dialog-shell { min-height: 0; }
.camera-config-dialog-body { display: grid; gap: 20px; overflow-y: auto; }
.camera-dialog-section { min-width: 0; padding: 0; border: 0; }
.camera-dialog-section + .camera-dialog-section { padding-top: 18px; border-top: 1px solid var(--fpr-border); }
.camera-dialog-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.camera-dialog-section-heading h3 { margin: 0; color: var(--fpr-ink-950); font-size: 13px; }
.camera-dialog-section-heading p { margin: 3px 0 0; color: var(--fpr-text-muted); font-size: 10px; }
.camera-dialog-section-heading > span { color: var(--fpr-text-muted); font-size: 9px; }
.camera-config-dialog .camera-quality { display: block; }
.camera-config-dialog .camera-analysis-options { display: block; padding: 18px 0 0; }
.camera-config-dialog .camera-analysis-options[hidden] { display: none; }
.analysis-mode-selector { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.analysis-mode-selector label { display: flex; min-height: 58px; align-items: flex-start; justify-content: flex-start; gap: 9px; padding: 11px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); cursor: pointer; }
.analysis-mode-selector label:has(input:checked) { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.analysis-mode-selector label:has(input:disabled) { opacity: .55; cursor: not-allowed; }
.analysis-mode-selector input { margin-top: 2px; }
.analysis-mode-selector span { display: grid; gap: 2px; }
.analysis-mode-selector strong { color: var(--fpr-ink-900); font-size: 11px; }
.analysis-mode-selector small { color: var(--fpr-text-muted); font-size: 9px; }
.analysis-full-preview[hidden] { display: none; }
.analysis-full-preview img { display: block; width: 100%; max-height: 58vh; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-ink-950); object-fit: contain; }
.analysis-region-editor { width: 100%; }
.analysis-canvas-wrap { position: relative; }
.analysis-region-editor canvas { max-height: 58vh; object-fit: contain; }
.analysis-draw-hint { position: absolute; right: 10px; bottom: 10px; padding: 5px 8px; border-radius: 4px; color: var(--fpr-surface); background: rgb(15 23 42 / 82%); font-size: 9px; pointer-events: none; }
.analysis-region-actions { min-height: 36px; }
.analysis-region-actions [data-region-count] { font-size: 10px; }
.analysis-disabled-note, .camera-preview-unavailable { padding: 12px; border: 1px dashed var(--fpr-border-strong); border-radius: var(--fpr-radius-sm); color: var(--fpr-text-muted); background: var(--fpr-surface-soft); font-size: 10px; }
.analysis-disabled-note[hidden] { display: none; }
.workstation-config-error { margin: 0 22px; }
.workstation-save-bar { position: sticky; bottom: 0; z-index: 4; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 22px; border-top: 1px solid var(--fpr-border-strong); background: rgb(255 255 255 / 96%); box-shadow: 0 -8px 18px rgb(15 23 42 / 5%); }
.workstation-save-bar > div { display: grid; gap: 2px; }
.workstation-save-bar strong { color: var(--fpr-ink-900); font-size: 11px; }
.workstation-save-bar span { color: var(--fpr-text-muted); font-size: 9px; }
.workstation-identity-disclosure { padding: 0; }
.workstation-identity-disclosure summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px; cursor: pointer; list-style: none; }
.workstation-identity-disclosure summary::-webkit-details-marker { display: none; }
.workstation-identity-disclosure summary > span:first-child { display: grid; gap: 2px; }
.workstation-identity-disclosure summary strong { color: var(--fpr-ink-900); font-size: 11px; }
.workstation-identity-disclosure summary small { color: var(--fpr-text-muted); font-size: 9px; }
.workstation-identity-disclosure[open] summary { border-bottom: 1px solid var(--fpr-border); }
.workstation-identity-disclosure .detail-grid { padding: 0 17px 10px; }

@media (max-width: 820px) {
  .workstation-mode-panel { display: block; }
  .workstation-mode-panel .panel-heading { margin-bottom: 12px; }
  .workstation-mode-panel form { align-items: stretch; flex-direction: column; }
  .workstation-mode-panel .form-actions .button-secondary { width: 100%; }
  .camera-selection-head, .camera-selection-row { grid-template-columns: minmax(220px, 1fr) 70px 70px 88px; }
}

@media (max-width: 700px) {
  .workstation-config-heading { align-items: flex-start; padding: 16px 14px; }
  .configuration-delivery { justify-content: flex-start; }
  .configuration-step { padding: 17px 14px; }
  .schedule-mode-selector { grid-template-columns: 1fr; margin-left: 0; }
  .analysis-time-ranges { margin-left: 0; }
  .analysis-time-range { grid-template-columns: 22px minmax(0, 1fr) 16px minmax(0, 1fr) 30px; gap: 5px; padding: 8px; }
  .analysis-time-add, .schedule-help { margin-left: 0; }
  .plant-display-setting { align-items: flex-start; flex-direction: column; }
  .camera-selection-head { display: none; }
  .camera-selection-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; padding: 11px; }
  .camera-selection-identity { grid-column: 1 / -1; }
  .camera-toggle { min-height: 34px; gap: 7px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); background: var(--fpr-surface); }
  .camera-toggle:has(input[name^="visible_"])::after { content: "Visualizza"; color: var(--fpr-text); font-size: 9px; }
  .camera-toggle:has(input[name^="analysis_"])::after { content: "Analizza"; color: var(--fpr-text); font-size: 9px; }
  .camera-config-open { grid-column: 1 / -1; width: 100%; }
  .camera-config-dialog { width: 100vw; max-height: calc(100vh - 8px); }
  .camera-config-dialog-body { padding: 13px; }
  .quality-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .analysis-mode-selector { grid-template-columns: 1fr; }
  .analysis-region-actions { align-items: stretch; flex-wrap: wrap; }
  .analysis-region-actions [data-region-count] { width: 100%; margin: 0; }
  .analysis-draw-hint { display: none; }
  .workstation-save-bar { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .workstation-save-bar .button-primary { width: 100%; }
}

/* Account: creazione a larghezza piena e lista facilmente filtrabile. */
.accounts-page { max-width: 1120px; }
.accounts-page .metrics { margin: 16px 0; }
.accounts-page .metric { min-height: 68px; padding: 12px 15px; box-shadow: none; }
.account-dialog { width: min(800px, calc(100vw - 28px)); }
.account-dialog-body { display: grid; gap: 18px; }
.account-guidance { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--fpr-success-100); border-radius: var(--fpr-radius-sm); color: var(--fpr-success-700); background: var(--fpr-success-100); }
.account-guidance-icon { display: grid; width: 21px; height: 21px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--fpr-surface); background: var(--fpr-success-700); font-size: 11px; font-weight: 750; }
.account-guidance strong { display: block; margin: 1px 0 2px; color: var(--fpr-ink-900); font-size: 11px; }
.account-guidance p { margin: 0; color: var(--fpr-text); font-size: 10px; line-height: 1.5; }
.account-create-form { display: grid; gap: 18px; }
.account-form-section { min-width: 0; margin: 0; padding: 0; border: 0; }
.account-form-section + .account-form-section { padding-top: 17px; border-top: 1px solid var(--fpr-border); }
.account-form-section legend { width: 100%; margin-bottom: 11px; padding: 0; color: var(--fpr-ink-950); font-size: 12px; font-weight: 720; }
.account-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.account-create-form .dialog-actions { position: sticky; bottom: -18px; z-index: 2; margin-top: 0; background: var(--fpr-surface); }
.account-list-panel { padding: 0; overflow: hidden; }
.account-list-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 19px 20px 15px; }
.account-list-tools { display: grid; grid-template-columns: minmax(240px, 1fr) 180px 160px; gap: 8px; padding: 11px 20px; border-top: 1px solid var(--fpr-border); background: var(--fpr-surface-soft); }
.account-list-tools .field-control { min-height: 36px; padding-block: 6px; font-size: 10px; background-color: var(--fpr-surface); }
.account-table-wrap { border-width: 1px 0 0; border-radius: 0; }
.account-table th:first-child, .account-table td:first-child { padding-left: 20px; }
.account-table th:last-child, .account-table td:last-child { padding-right: 20px; }
.account-user { display: flex; min-width: 230px; align-items: center; gap: 10px; }
.account-user > span:last-child { min-width: 0; }
.account-avatar { display: grid; width: 32px; height: 32px; flex: 0 0 auto; place-items: center; border-radius: 50%; color: var(--fpr-brand-700); background: var(--fpr-brand-100); font-size: 11px; font-weight: 750; text-transform: uppercase; }
.account-user .table-name, .account-user .table-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-empty-value { color: var(--fpr-text-subtle); }
.account-filter-empty { display: grid; justify-items: center; gap: 3px; padding: 28px 15px; border-top: 1px solid var(--fpr-border); color: var(--fpr-text-muted); text-align: center; }
.account-filter-empty[hidden] { display: none; }
.account-filter-empty strong { color: var(--fpr-ink-900); font-size: 11px; }
.account-filter-empty span { font-size: 9px; }

@media (max-width: 700px) {
  .accounts-page .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .accounts-page .metric { min-width: 0; align-items: flex-start; flex-direction: column; }
  .account-dialog { width: 100vw; }
  .account-form-grid { grid-template-columns: 1fr; }
  .account-list-heading { padding: 16px 14px 13px; }
  .account-list-tools { grid-template-columns: 1fr; padding: 10px 14px; }
  .account-table th:first-child, .account-table td:first-child { padding-left: 12px; }
  .account-table th:last-child, .account-table td:last-child { padding-right: 12px; }
}

/* Clienti e impianti: percorso unico, gerarchia compatta e form a passaggi. */
.customers-page, .customer-detail-page, .customer-plants-page, .plant-detail-page { max-width: 1120px; }
.customers-page .metrics, .customer-plants-page .metrics { margin: 16px 0; }
.customers-page .metric, .customer-plants-page .metric { min-height: 68px; padding: 12px 15px; box-shadow: none; }
.customer-dialog { width: min(760px, calc(100vw - 28px)); }
.customer-create-form { gap: 13px 16px; }
.customer-create-form > [data-kind-fields="company"].field-wide { grid-column: 1 / -1; }
.customer-list-panel { padding: 20px; }
.customer-list-panel .search-form { max-width: 760px; margin-bottom: 14px; }
.customer-table td { height: 58px; }
.customer-summary-panel { padding: 18px 20px; }
.customer-summary-panel .section-toolbar { margin-bottom: 8px; }
.customer-summary-panel .compact-summary { border-top: 1px solid var(--fpr-border); }
.customer-section { padding: 20px; }
.contact-directory { border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); overflow: hidden; }
.contact-directory-row { grid-template-columns: 38px minmax(150px, .8fr) minmax(230px, 1.2fr) auto; border: 0; border-bottom: 1px solid var(--fpr-border); border-radius: 0; }
.contact-directory-row:last-child { border-bottom: 0; }
.contact-directory-row .contact-avatar { width: 34px; height: 34px; font-size: 10px; }
.contact-directory-row .entity-row-meta { display: grid; gap: 2px; }
.customer-plant-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.customer-plant-preview > a { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 11px 12px; border: 1px solid var(--fpr-border); border-radius: var(--fpr-radius-sm); color: inherit; background: var(--fpr-surface-soft); text-decoration: none; }
.customer-plant-preview > a:hover { border-color: var(--fpr-brand-600); background: var(--fpr-brand-100); }
.customer-plant-preview > a > span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.customer-plant-preview strong { overflow: hidden; color: var(--fpr-ink-900); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-plant-preview small { color: var(--fpr-text-muted); font-size: 9px; }
.customer-plant-preview > a > span:last-child { margin-left: auto; color: var(--fpr-brand-700); }
.customer-plants-list { padding: 20px; }
.customer-plants-page .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-plants-page .plant-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.customer-plants-page .plant-card { padding: 14px; }
.customer-plants-page .plant-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.customer-plants-page .plant-meta > span:last-child { grid-column: 1 / -1; }
.secure-note { color: var(--fpr-success-700); font-weight: 650; }
.plant-form-page { max-width: 900px; }
.plant-form-panel { padding: 0; overflow: hidden; }
.plant-form-panel > .panel-heading { margin: 0; padding: 20px 22px 16px; border-bottom: 1px solid var(--fpr-border); background: var(--fpr-surface-soft); }
.plant-form-panel > .alert { margin: 16px 22px 0; }
.plant-editor-form { display: grid; gap: 0; }
.plant-form-section { min-width: 0; margin: 0; padding: 20px 22px; border: 0; }
.plant-form-section + .plant-form-section { border-top: 1px solid var(--fpr-border); }
.plant-form-section legend { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 14px; padding: 0; color: var(--fpr-ink-950); font-size: 13px; font-weight: 720; }
.plant-form-section legend span { display: grid; width: 23px; height: 23px; place-items: center; border-radius: 50%; color: var(--fpr-surface); background: var(--fpr-ink-900); font-size: 9px; }
.plant-editor-form > .verification-result { margin: 0 22px 16px; }
.plant-form-actions { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 13px 22px; border-top: 1px solid var(--fpr-border-strong); background: rgb(255 255 255 / 96%); box-shadow: 0 -8px 18px rgb(15 23 42 / 5%); }
.plant-overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.plant-overview-grid .content-panel { margin: 0; }
.plant-overview-grid .detail-grid { grid-template-columns: 1fr; }
.plant-overview-grid .detail-grid > div:first-child { border-top: 0; }
.plant-detail-page .section-toolbar form { flex: 0 0 auto; }
.snapshot-card > button { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; background: var(--fpr-ink-950); cursor: zoom-in; }
.snapshot-card > button:focus-visible { outline: 3px solid var(--fpr-focus); outline-offset: -3px; }
.snapshot-card > button img { transition: transform .18s ease; }
.snapshot-card > button:hover img { transform: scale(1.015); }
.plant-danger-zone { padding: 0; border-color: var(--fpr-danger-100); box-shadow: none; }
.plant-danger-zone summary { padding: 13px 16px; color: var(--fpr-danger-700); font-size: 10px; font-weight: 700; cursor: pointer; }
.plant-danger-zone > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; border-top: 1px solid var(--fpr-danger-100); }
.plant-danger-zone p { margin: 0; color: var(--fpr-text-muted); font-size: 10px; }

@media (max-width: 800px) {
  .customer-plants-page .plant-list { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .customers-page .metrics, .customer-plants-page .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-dialog { width: 100vw; }
  .customer-list-panel, .customer-section, .customer-plants-list { padding: 14px; }
  .customer-list-panel .table-wrap { margin-inline: 0; }
  .contact-directory-row { grid-template-columns: 34px minmax(0, 1fr); gap: 7px 10px; }
  .contact-directory-row .entity-row-meta, .contact-directory-row .entity-row-actions { grid-column: 2; }
  .customer-plant-preview { grid-template-columns: 1fr; }
  .plant-form-panel > .panel-heading, .plant-form-section { padding-right: 14px; padding-left: 14px; }
  .plant-form-panel > .alert, .plant-editor-form > .verification-result { margin-right: 14px; margin-left: 14px; }
  .plant-form-actions { align-items: stretch; flex-direction: column; padding: 12px 14px; }
  .plant-form-actions > * { width: 100%; }
  .plant-overview-grid { grid-template-columns: 1fr; }
  .plant-detail-page .section-toolbar form, .plant-detail-page .section-toolbar form button { width: 100%; }
  .plant-danger-zone > div { align-items: flex-start; flex-direction: column; }
}
