﻿/* ==========================================================================
   CEShop redesign - "banco tecnico"
   Foglio comune delle nuove schermate (Redesign.Master / RedesignAdmin.Master).
   Tutto e` dentro .rd per non toccare le pagine esistenti che usano Bootstrap 3.
   ========================================================================== */

.rd {
	--rd-ground: #F2F3EF;
	--rd-surface: #FFFFFF;
	--rd-surface-2: #F7F8F5;
	--rd-ink: #16191D;
	--rd-ink-2: #3F454C;
	--rd-muted: #5B6169;
	--rd-line: #DCDFD8;
	--rd-line-2: #ECEEE8;
	--rd-input: #C9CDC4;
	--rd-petrol: #0F5C6E;
	--rd-petrol-dark: #0A4250;
	--rd-petrol-tint: #E3EFF1;
	--rd-petrol-row: #F3F8F9;
	--rd-amber: #F0B23A;
	--rd-amber-tint: #FDF1D8;
	--rd-amber-text: #6E4800;
	--rd-amber-row: #FFFBF2;
	--rd-green: #1F7A4D;
	--rd-green-text: #1F5E3E;
	--rd-green-tint: #E3F1E9;
	--rd-red: #B3261E;
	--rd-red-text: #8E1F18;
	--rd-red-tint: #FBE9E7;
	--rd-dark: #16191D;
	--rd-dark-2: #2A3036;
	--rd-radius: 14px;
	--rd-radius-sm: 10px;
	--rd-mono: 'IBM Plex Mono', Consolas, monospace;

	min-height: 100vh;
	background: var(--rd-ground);
	color: var(--rd-ink);
	font-family: 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.45;
}

.rd *, .rd *::before, .rd *::after { box-sizing: border-box; }
.rd a { color: var(--rd-petrol); }
.rd a:hover, .rd a:focus { color: var(--rd-petrol-dark); }
.rd h1, .rd h2, .rd h3 { font-family: inherit; color: inherit; margin: 0; }
.rd h1 { font-size: 30px; line-height: 1.15; font-weight: 700; letter-spacing: -0.02em; }
.rd h2 { font-size: 17px; font-weight: 600; line-height: 1.3; }
.rd h3 { font-size: 17px; font-weight: 600; line-height: 1.3; }
.rd p { margin: 0; }
.rd button, .rd input, .rd select, .rd textarea { font-family: inherit; font-size: inherit; }
.rd :focus-visible { outline: 3px solid var(--rd-petrol-tint); outline-offset: 2px; }
.rd .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.rd-mono { font-family: var(--rd-mono); }
.rd-muted { color: var(--rd-muted); }
.rd-small { font-size: 13px; }
.rd-eyebrow { font-size: 13px; color: var(--rd-muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.rd-right { text-align: right; }
.rd-center { text-align: center; }
.rd-stack { display: flex; flex-direction: column; gap: 4px; }
.rd-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rd-between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }

/* ---------- testata cliente ---------- */
.rd-header { background: var(--rd-surface); border-bottom: 1px solid var(--rd-line); }
.rd-header-inner { max-width: 1360px; margin: 0 auto; padding: 14px 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; }
.rd-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--rd-ink) !important; font-weight: 700; font-size: 19px; letter-spacing: -0.01em; }
.rd-brand-mark { width: 34px; height: 34px; border-radius: 8px; background: var(--rd-petrol); color: #FFFFFF; display: grid; place-items: center; font-family: var(--rd-mono); font-weight: 600; font-size: 14px; }
.rd-context { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--rd-line); border-radius: 999px; background: var(--rd-surface); color: var(--rd-ink) !important; font-size: 13px; min-height: 40px; text-decoration: none; }
.rd-context strong { font-weight: 600; }
.rd-search { flex: 1 1 380px; display: flex; align-items: center; gap: 10px; padding: 0 12px; height: 44px; border: 1px solid var(--rd-input); border-radius: var(--rd-radius-sm); background: var(--rd-surface-2); }
.rd-search input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15px; color: var(--rd-ink); height: 40px; }
.rd-search kbd { font-family: var(--rd-mono); font-size: 12px; color: var(--rd-muted); border: 1px solid var(--rd-line); border-radius: 6px; padding: 2px 6px; background: var(--rd-surface); box-shadow: none; }
.rd-tools { display: flex; align-items: center; gap: 4px; }
.rd-icon-btn { position: relative; width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--rd-radius-sm); color: var(--rd-ink) !important; text-decoration: none; background: transparent; border: 0; }
.rd-icon-btn:hover { background: var(--rd-surface-2); }
.rd-badge { position: absolute; top: 6px; right: 4px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--rd-petrol); color: #FFFFFF; font-size: 11px; font-weight: 600; display: grid; place-items: center; padding: 0 4px; line-height: 1; }
.rd-badge-amber { background: var(--rd-amber); color: var(--rd-ink); font-weight: 700; }
.rd-tabs { max-width: 1360px; margin: 0 auto; padding: 0 32px; display: flex; flex-wrap: wrap; gap: 4px; }
.rd-tabs a { padding: 12px 14px; text-decoration: none; color: var(--rd-muted); border-bottom: 3px solid transparent; }
.rd-tabs a:hover { color: var(--rd-ink); }
.rd-tabs a[aria-current="page"] { color: var(--rd-ink); font-weight: 600; border-bottom-color: var(--rd-petrol); }

.rd-main { max-width: 1360px; margin: 0 auto; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 24px; }
.rd-columns { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.rd-col-main { flex: 999 1 640px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.rd-col-side { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

/* ---------- amministrazione (barra laterale) ---------- */
.rd-admin { display: flex; flex-wrap: wrap; align-items: stretch; }
.rd-sidebar { flex: 1 1 220px; max-width: 100%; background: var(--rd-dark); color: #FFFFFF; padding: 22px 14px; display: flex; flex-direction: column; gap: 4px; }
.rd-sidebar .rd-brand { color: #FFFFFF !important; padding: 0 10px 18px; }
.rd-sidebar .rd-brand-mark { background: var(--rd-amber); color: var(--rd-ink); }
.rd-sidebar .rd-brand small { display: block; font-size: 12px; font-weight: 400; color: #B9BEC4; letter-spacing: 0; }
.rd-sidebar a.rd-side-link { padding: 10px 12px; border-radius: 8px; color: #D6DADF !important; text-decoration: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.rd-sidebar a.rd-side-link:hover { background: #23292F; }
.rd-sidebar a.rd-side-link[aria-current="page"] { background: var(--rd-dark-2); color: #FFFFFF !important; font-weight: 600; }
.rd-side-count { font-family: var(--rd-mono); font-size: 12px; padding: 1px 7px; border-radius: 999px; background: var(--rd-amber); color: var(--rd-ink); }
.rd-sidebar .rd-side-sep { margin: 14px 12px 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #8C9299; }
.rd-admin-main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 56px; display: flex; flex-direction: column; gap: 20px; }

/* ---------- carte ---------- */
.rd-card { background: var(--rd-surface); border: 1px solid var(--rd-line); border-radius: var(--rd-radius); }
.rd-card-pad { padding: 20px; }
.rd-card-head { padding: 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rd-line-2); }
.rd-card-dark { background: var(--rd-dark); color: #FFFFFF; border-color: var(--rd-dark); }
.rd-card-dark .rd-muted { color: #B9BEC4; }
.rd-card-accent { border: 2px solid var(--rd-petrol); }
.rd-card-flush { overflow: hidden; }
.rd-gap { display: flex; flex-direction: column; gap: 12px; }
.rd-gap-lg { display: flex; flex-direction: column; gap: 16px; }
/* ---------- pulsanti ---------- */
.rd-btn, .rd a.rd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 12px; font-size: 14px; border-radius: var(--rd-radius-sm); border: 1px solid var(--rd-input); background: var(--rd-surface); color: var(--rd-ink); font-weight: 500; text-decoration: none; cursor: pointer; line-height: 1.2; }
.rd-btn:hover { background: var(--rd-surface-2); color: var(--rd-ink); text-decoration: none; }
.rd-btn-primary, .rd a.rd-btn-primary { background: var(--rd-petrol); border-color: var(--rd-petrol); color: #FFFFFF; font-weight: 600; }
.rd-btn-primary:hover, .rd a.rd-btn-primary:hover { background: var(--rd-petrol-dark); color: #FFFFFF; }
.rd-btn-outline, .rd a.rd-btn-outline { border-color: var(--rd-petrol); color: var(--rd-petrol); font-weight: 600; }
.rd-btn-amber, .rd a.rd-btn-amber { background: var(--rd-amber); border-color: var(--rd-amber); color: var(--rd-ink); font-weight: 700; min-height: 48px; font-size: 16px; }
.rd-btn-amber:hover, .rd a.rd-btn-amber:hover { background: #E3A22B; color: var(--rd-ink); }
.rd-btn-ghost-dark, .rd a.rd-btn-ghost-dark { background: transparent; border-color: #4A5159; color: #FFFFFF; }
.rd-btn-ghost-dark:hover { background: #23292F; color: #FFFFFF; }
.rd-btn-block { width: 100%; }
.rd-btn[disabled], .rd-btn.aspNetDisabled, .rd-btn:disabled { background: var(--rd-line); border-color: var(--rd-line); color: var(--rd-muted); cursor: not-allowed; }
.rd-pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; border: 1px solid var(--rd-input); background: var(--rd-surface); color: var(--rd-ink) !important; text-decoration: none !important; }
.rd-pill[aria-pressed="true"], .rd-pill.rd-on { border-color: var(--rd-petrol); background: var(--rd-petrol); color: #FFFFFF !important; }

/* ---------- etichette di stato (sempre con testo) ---------- */
.rd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--rd-line-2); color: var(--rd-ink-2); }
.rd-chip-amber { background: var(--rd-amber-tint); color: var(--rd-amber-text); }
.rd-chip-red { background: var(--rd-red-tint); color: var(--rd-red-text); }
.rd-chip-green { background: var(--rd-green-tint); color: var(--rd-green-text); }
.rd-chip-petrol { background: var(--rd-petrol-tint); color: var(--rd-petrol-dark); }
.rd-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--rd-muted); flex: none; }
.rd-dot-green { background: var(--rd-green); }
.rd-dot-amber { background: #E0A12E; }
.rd-dot-grey { background: #8C9299; }
.rd-dot-red { background: var(--rd-red); }
.rd-text-green { color: var(--rd-green-text); }
.rd-text-amber { color: #8A5A00; }
.rd-text-red { color: var(--rd-red-text); }

/* ---------- tabelle ---------- */
.rd-scroll { overflow-x: auto; }
.rd-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rd-table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--rd-muted); text-transform: uppercase; letter-spacing: 0.05em; background: var(--rd-surface-2); white-space: nowrap; }
.rd-table td { padding: 10px 12px; border-top: 1px solid var(--rd-line-2); vertical-align: middle; }
.rd-table th:first-child, .rd-table td:first-child { padding-left: 20px; }
.rd-table th:last-child, .rd-table td:last-child { padding-right: 20px; }
.rd-table tr.rd-row-on td { background: var(--rd-petrol-row); }
.rd-table tr.rd-row-warn td { background: var(--rd-amber-row); }
.rd-table .rd-code { font-family: var(--rd-mono); font-size: 13px; color: var(--rd-muted); }
.rd-thumb { flex: none; width: 44px; height: 44px; border-radius: var(--rd-radius-sm); background: var(--rd-petrol-tint); color: var(--rd-petrol-dark); display: grid; place-items: center; font-family: var(--rd-mono); font-weight: 600; font-size: 13px; overflow: hidden; }
.rd-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rd-item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.rd-item-text { min-width: 0; }
.rd-item-title { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 360px; }

/* ---------- quantita` ---------- */
.rd-stepper { display: inline-flex; align-items: center; border: 1px solid var(--rd-input); border-radius: var(--rd-radius-sm); overflow: hidden; background: var(--rd-surface); }
.rd-stepper button, .rd-stepper a { width: 44px; height: 40px; border: 0; background: var(--rd-surface-2); color: var(--rd-ink) !important; font-size: 20px; line-height: 40px; text-align: center; text-decoration: none !important; cursor: pointer; }
.rd-stepper button:hover, .rd-stepper a:hover { background: var(--rd-line-2); }
.rd-stepper input { width: 56px; height: 40px; border: 0; text-align: center; font-family: var(--rd-mono); font-weight: 600; font-size: 15px; background: var(--rd-surface); }

/* ---------- campi ---------- */
.rd-field { display: flex; flex-direction: column; gap: 4px; }
.rd-field label, .rd-label { font-size: 12px; font-weight: 600; color: var(--rd-muted); }
/* altezze come il resto del sito (.btn e .form-control): 32 / 40 / 48 px */
.rd-input, .rd select.rd-input, .rd textarea.rd-input { height: 40px; padding: 0 12px; border: 1px solid var(--rd-input); border-radius: var(--rd-radius-sm); background: var(--rd-surface); color: var(--rd-ink); min-width: 0; }
.rd textarea.rd-input { height: auto; padding: 12px; resize: vertical; line-height: 1.55; background: var(--rd-surface-2); }
.rd textarea.rd-input.rd-mono { font-size: 14px; }
.rd-check { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.rd-check input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--rd-petrol); margin: 0; }

/* ---------- indicatori ---------- */
.rd-meter { height: 8px; border-radius: 4px; background: var(--rd-line-2); overflow: hidden; }
.rd-meter > span { display: block; height: 100%; border-radius: 4px; background: var(--rd-petrol); }
.rd-card-dark .rd-meter { background: #343A41; }
.rd-card-dark .rd-meter > span { background: var(--rd-amber); }
.rd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.rd-kpi { text-align: left; padding: 16px; border-radius: 12px; border: 1px solid var(--rd-line); background: var(--rd-surface); display: flex; flex-direction: column; gap: 6px; color: var(--rd-ink) !important; text-decoration: none !important; }
.rd-kpi.rd-on { border: 2px solid var(--rd-petrol); background: var(--rd-petrol-row); }
.rd-kpi-label { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.rd-kpi-value { font-family: var(--rd-mono); font-size: 30px; font-weight: 600; line-height: 1.1; }
.rd-bars { display: flex; gap: 2px; align-items: stretch; }
.rd-bar { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.rd-bar-area { height: 76px; display: flex; align-items: flex-end; border-bottom: 1px solid var(--rd-input); }
.rd-bar-area span { display: block; width: 100%; border-radius: 4px 4px 0 0; background: var(--rd-petrol); }
.rd-bar-area span.rd-bar-light { background: var(--rd-petrol); opacity: 0.55; }
.rd-bar-area span.rd-bar-zero { background: var(--rd-line); }
.rd-bar-label { font-size: 11px; color: var(--rd-muted); text-align: center; white-space: nowrap; height: 14px; }

/* ---------- avanzamento ordine ---------- */
.rd-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.rd-steps li { display: flex; flex-direction: column; gap: 6px; }
.rd-steps .rd-step-bar { height: 6px; border-radius: 3px; background: var(--rd-petrol); }
.rd-steps .rd-step-now .rd-step-bar { background: linear-gradient(90deg, var(--rd-petrol) 0 60%, var(--rd-amber) 60% 100%); }
.rd-steps .rd-step-todo .rd-step-bar { background: repeating-linear-gradient(90deg, var(--rd-input) 0 8px, transparent 8px 12px); }
.rd-steps .rd-step-name { font-size: 13px; font-weight: 600; }
.rd-steps .rd-step-todo .rd-step-name { font-weight: 500; color: var(--rd-ink-2); }
.rd-steps .rd-step-when { font-size: 12px; color: var(--rd-muted); }

/* ---------- elenchi ---------- */
.rd-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.rd-list-item { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: var(--rd-radius-sm); border: 1px solid transparent; text-decoration: none !important; color: var(--rd-ink) !important; }
.rd-list-item:hover { background: var(--rd-surface-2); }
.rd-list-item.rd-on { background: var(--rd-petrol-row); border-color: var(--rd-petrol-tint); }
.rd-list-item.rd-dashed { border: 1px dashed #A9AFA6; }
.rd-feed-link { display: flex; gap: 12px; align-items: flex-start; text-decoration: none !important; color: var(--rd-ink) !important; padding: 10px; margin: 0 -10px; border-radius: var(--rd-radius-sm); }
.rd-feed-link:hover { background: var(--rd-surface-2); }
.rd-feed-icon { flex: none; width: 36px; height: 36px; border-radius: 9px; background: var(--rd-petrol-tint); color: var(--rd-petrol); display: grid; place-items: center; }
.rd-feed-icon.rd-amber { background: var(--rd-amber-tint); color: #8A5A00; }

/* ---------- avvisi ---------- */
.rd-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 14px; background: var(--rd-surface-2); }
.rd-notice-amber { background: var(--rd-amber-tint); color: #4D3300; }
.rd-notice-red { background: var(--rd-red-tint); color: var(--rd-red-text); }
.rd-notice-green { background: var(--rd-green-tint); color: var(--rd-green-text); }
.rd-empty { padding: 28px 20px; text-align: center; color: var(--rd-muted); }

/* ---------- smartphone ---------- */
@media (max-width: 720px) {
	.rd-header-inner, .rd-tabs, .rd-main { padding-left: 16px; padding-right: 16px; }
	.rd-admin-main { padding: 20px 16px 40px; }
	.rd h1 { font-size: 25px; }
	.rd-item-title { max-width: 220px; }
}

/* ---------- sala controllo ---------- */
.rd-modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rd-mode, .rd a.rd-mode { text-align: left; padding: 16px; min-height: 96px; border-radius: 12px; display: flex; flex-direction: column; gap: 6px; color: var(--rd-ink) !important; border: 1px solid var(--rd-line); background: var(--rd-surface); text-decoration: none !important; }
.rd a.rd-mode:hover { background: var(--rd-surface-2); }
.rd-mode.rd-on, .rd a.rd-mode.rd-on { border: 2px solid var(--rd-ink); background: var(--rd-surface-2); }
.rd-mode-info { border-style: dashed; }
.rd-mode-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.rd-mode-desc { font-size: 13px; line-height: 1.4; color: var(--rd-muted); }
.rd-matrix { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.rd-matrix-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 10px; background: var(--rd-surface-2); }
.rd-matrix-icon { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.rd-pass { background: var(--rd-green-tint); color: var(--rd-green-text); }
.rd-stop { background: var(--rd-red-tint); color: var(--rd-red-text); }
.rd-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rd-checklist li { display: flex; gap: 10px; align-items: flex-start; }
.rd-checklist .fa { margin-top: 3px; width: 18px; text-align: center; }
.rd-chip-big { font-size: 14px; padding: 8px 14px; }
.rd-cards { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.rd-cards > * { flex: 1 1 340px; min-width: 0; }
.rd a.aspNetDisabled, .rd a.rd-btn.aspNetDisabled { background: var(--rd-line); border-color: var(--rd-line); color: var(--rd-muted) !important; cursor: not-allowed; pointer-events: none; }
