/* Minimizzazione non riuscita. Verrà restituito il contenuto non minimizzato.
(11,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(12,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(13,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(14,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(15,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(16,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(17,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(18,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(19,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(20,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(21,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(22,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(23,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(24,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(25,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(26,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(27,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(28,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(29,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(30,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(31,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(32,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(33,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(34,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(35,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(40,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(41,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(42,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(43,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(44,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(45,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(46,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(47,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(48,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(49,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(50,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(51,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(52,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(53,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(54,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(55,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(56,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(57,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(58,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(59,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(60,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(61,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(62,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(63,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(64,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(69,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(70,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(71,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(72,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(73,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(74,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(75,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(76,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(77,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(78,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(79,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(80,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(81,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(82,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(83,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(84,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(85,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(86,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(87,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(88,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(89,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(90,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(91,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(92,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(93,5): run-time error CSS1062: Expected semicolon or closing curly-brace, found '-'
(101,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(105,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(108,37): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(138,60): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(139,42): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(150,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-bg'
(151,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-text'
(152,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-border'
(156,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-on-bg'
(157,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-on-text'
(158,24): run-time error CSS1039: Token not allowed after unary operator: '-rv-badge-on-bdr'
(164,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(183,47): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(188,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-input-border'
(190,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-input-bg'
(191,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(195,43): run-time error CSS1039: Token not allowed after unary operator: '-rv-input-focus'
(201,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(203,30): run-time error CSS1039: Token not allowed after unary operator: '-rv-empty-border'
(219,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(222,36): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(223,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-tbl-head'
(228,36): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(230,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(232,48): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(243,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(246,24): run-time error CSS1039: Token not allowed after unary operator: '-rv-input-focus'
(247,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-input-bg'
(251,74): run-time error CSS1039: Token not allowed after unary operator: '-rv-chk-accent'
(254,38): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(267,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(270,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-btn-text'
(278,34): run-time error CSS1039: Token not allowed after unary operator: '-rv-btn-hover'
(278,62): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(280,39): run-time error CSS1039: Token not allowed after unary operator: '-rv-primary'
(280,65): run-time error CSS1039: Token not allowed after unary operator: '-rv-primary'
(281,43): run-time error CSS1039: Token not allowed after unary operator: '-rv-primary-hover'
(290,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(293,33): run-time error CSS1039: Token not allowed after unary operator: '-rv-danger-text'
(293,68): run-time error CSS1039: Token not allowed after unary operator: '-rv-danger-hover'
(307,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(314,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(317,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(323,41): run-time error CSS1039: Token not allowed after unary operator: '-rv-btn-hover'
(323,76): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(323,103): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(324,41): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(324,76): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(324,103): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(330,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(347,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(349,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(362,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(368,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(372,49): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(384,40): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(394,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(400,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(406,67): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(407,49): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(411,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(413,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(422,36): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(423,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(434,68): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(441,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(442,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(443,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(449,62): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(453,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(459,48): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(463,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(474,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(480,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(481,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border-h'
(487,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(500,65): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(501,47): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
(514,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-bg'
(515,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(516,24): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(530,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-hint'
(533,36): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(534,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(541,36): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(542,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-text'
(546,46): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(562,22): run-time error CSS1039: Token not allowed after unary operator: '-rv-surface'
(563,29): run-time error CSS1039: Token not allowed after unary operator: '-rv-border'
(571,17): run-time error CSS1039: Token not allowed after unary operator: '-rv-muted'
 */
/* ============================================================
   riga-contratto.css
   Theme tokens + component styles for _RigaContratto.cshtml
   Apply a theme by setting data-theme on <body> or any wrapper.
   Default (no attribute) = light.
   ============================================================ */

/* ── Light ─────────────────────────────────────────────────── */
:root,
[data-theme="light"] {
    --rv-bg:            #ffffff;
    --rv-surface:       #f8f7f6;
    --rv-border:        #e2e0d8;
    --rv-border-h:      #c8c5bc;
    --rv-text:          #1a1917;
    --rv-muted:         #888780;
    --rv-hint:          #b4b2a9;
    --rv-input-bg:      #ffffff;
    --rv-input-border:  #e2e0d8;
    --rv-input-focus:   #888780;
    --rv-tbl-head:      #f4f3f0;
    --rv-empty-border:  #d3d1c7;
    --rv-btn-hover:     #f1efe8;
    --rv-btn-text:      #5f5e5a;
    --rv-badge-bg:      #f1efe8;
    --rv-badge-text:    #5f5e5a;
    --rv-badge-border:  #d3d1c7;
    --rv-badge-on-bg:   #e1f5ee;
    --rv-badge-on-text: #085041;
    --rv-badge-on-bdr:  #5dcaa5;
    --rv-primary:       #185fa5;
    --rv-primary-hover: #e6f1fb;
    --rv-danger-hover:  #fcebeb;
    --rv-danger-text:   #e24b4a;
    --rv-chk-accent:    #1d9e75;
}

/* ── Pastel ─────────────────────────────────────────────────── */
[data-theme="pastel"] {
    --rv-bg:            #fdf8f3;
    --rv-surface:       #faf3ec;
    --rv-border:        #e8d8c8;
    --rv-border-h:      #c8aa90;
    --rv-text:          #4a3728;
    --rv-muted:         #9a7a66;
    --rv-hint:          #c4a890;
    --rv-input-bg:      #fdf8f3;
    --rv-input-border:  #e8d8c8;
    --rv-input-focus:   #9a7a66;
    --rv-tbl-head:      #f5ede4;
    --rv-empty-border:  #dcc4b0;
    --rv-btn-hover:     #f5ede4;
    --rv-btn-text:      #7a5a48;
    --rv-badge-bg:      #f5ede4;
    --rv-badge-text:    #7a5a48;
    --rv-badge-border:  #dcc4b0;
    --rv-badge-on-bg:   #e8f5ee;
    --rv-badge-on-text: #2d6a4a;
    --rv-badge-on-bdr:  #8dcaaa;
    --rv-primary:       #7a5a48;
    --rv-primary-hover: #f5ede4;
    --rv-danger-hover:  #fdf0ee;
    --rv-danger-text:   #c05040;
    --rv-chk-accent:    #6aaa88;
}

/* ── Dark ───────────────────────────────────────────────────── */
[data-theme="dark"] {
    --rv-bg:            #1e1c1a;
    --rv-surface:       #2a2826;
    --rv-border:        #3a3835;
    --rv-border-h:      #5a5855;
    --rv-text:          #f0ede8;
    --rv-muted:         #888780;
    --rv-hint:          #5f5e5a;
    --rv-input-bg:      #1e1c1a;
    --rv-input-border:  #3a3835;
    --rv-input-focus:   #888780;
    --rv-tbl-head:      #242220;
    --rv-empty-border:  #3a3835;
    --rv-btn-hover:     #2a2826;
    --rv-btn-text:      #a0a09a;
    --rv-badge-bg:      #2a2826;
    --rv-badge-text:    #888780;
    --rv-badge-border:  #3a3835;
    --rv-badge-on-bg:   #0d3024;
    --rv-badge-on-text: #5dcaa5;
    --rv-badge-on-bdr:  #0f6e56;
    --rv-primary:       #85b7eb;
    --rv-primary-hover: #0c2a42;
    --rv-danger-hover:  #3a1a1a;
    --rv-danger-text:   #f09595;
    --rv-chk-accent:    #5dcaa5;
}

/* ============================================================
   Component styles — all use var(--rv-*) tokens
   ============================================================ */

.rv-card {
    border: .5px solid var(--rv-border);
    border-radius: 12px;
    margin-bottom: .75rem;
    overflow: hidden;
    background: var(--rv-bg);
    transition: border-color .15s;
}
.rv-card:hover { border-color: var(--rv-border-h); }

/* header button */
.rv-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: .9rem 1.1rem;
    cursor: pointer;
    user-select: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

/* vehicle icon */
.rv-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vi { width: 28px; height: 28px; }

/* info block */
.rv-info  { flex: 1; min-width: 0; }
.rv-name  { font-size: 14px; font-weight: 500; color: var(--rv-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-sub   { font-size: 12px; color: var(--rv-muted); margin-top: 2px; }

/* badge + chevron */
.rv-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.rv-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
    background: var(--rv-badge-bg);
    color: var(--rv-badge-text);
    border: .5px solid var(--rv-badge-border);
    transition: background .2s, color .2s, border-color .2s;
}
.rv-badge--on {
    background: var(--rv-badge-on-bg);
    color: var(--rv-badge-on-text);
    border-color: var(--rv-badge-on-bdr);
}

.rv-chev {
    width: 16px;
    height: 16px;
    color: var(--rv-muted);
    transition: transform .2s;
    flex-shrink: 0;
}
.rv-card.is-open .rv-chev { transform: rotate(180deg); }

/* collapsible body */
.rv-body {
    padding: 0 1.1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease, padding .2s;
}
.rv-card.is-open .rv-body {
    max-height: 1200px;
    padding: .25rem 1.1rem 1.25rem;
}

/* note field */
.rv-note label { font-size: 12px; color: var(--rv-muted); display: block; margin-bottom: 4px; }
.rv-note input {
    width: 100%;
    font-size: 13px;
    padding: 6px 10px;
    border: .5px solid var(--rv-input-border);
    border-radius: 8px;
    background: var(--rv-input-bg);
    color: var(--rv-text);
    outline: none;
    margin-bottom: .9rem;
}
.rv-note input:focus { border-color: var(--rv-input-focus); }

/* empty state */
.rv-empty {
    text-align: center;
    padding: 1.2rem;
    color: var(--rv-muted);
    font-size: 13px;
    border: .5px dashed var(--rv-empty-border);
    border-radius: 8px;
    margin-bottom: .75rem;
}

/* table */
.rv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-bottom: .75rem;
    table-layout: fixed;
}
.rv-table th {
    font-size: 11px;
    font-weight: 500;
    color: var(--rv-muted);
    padding: 5px 7px;
    text-align: left;
    border-bottom: .5px solid var(--rv-border);
    background: var(--rv-tbl-head);
    white-space: nowrap;
}
.rv-table td {
    padding: 4px 6px;
    border-bottom: .5px solid var(--rv-border);
    vertical-align: middle;
    color: var(--rv-text);
}
.rv-table tbody tr:hover td { background: var(--rv-surface); }

.rv-table input[type="text"],
.rv-table input[type="number"],
.rv-table input[type="time"] {
    width: 100%;
    font-size: 12px;
    padding: 3px 5px;
    border: .5px solid transparent;
    border-radius: 4px;
    background: transparent;
    color: var(--rv-text);
}
.rv-table input:focus {
    border-color: var(--rv-input-focus);
    background: var(--rv-input-bg);
    outline: none;
}

.rv-chk { width: 15px; height: 15px; cursor: pointer; accent-color: var(--rv-chk-accent); }

/* column widths */
.col-n    { width: 28px; color: var(--rv-hint); font-size: 11px; text-align: center; }
.col-val  { width: 80px; }
.col-chk  { width: 52px; text-align: center; }
.col-time { width: 80px; }
.col-act  { width: 28px; text-align: center; }

/* action row */
.rv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: .25rem; }

.rv-btn {
    font-size: 12px;
    font-weight: 500;
    padding: 6px 14px;
    border: .5px solid var(--rv-border-h);
    border-radius: 8px;
    background: transparent;
    color: var(--rv-btn-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1;
    transition: background .1s, color .1s;
}
.rv-btn:hover { background: var(--rv-btn-hover); color: var(--rv-text); }

.rv-btn--primary { border-color: var(--rv-primary); color: var(--rv-primary); }
.rv-btn--primary:hover { background: var(--rv-primary-hover); }

.rv-btn-del {
    background: none;
    border: none;
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--rv-hint);
    line-height: 1;
}
.rv-btn-del:hover { color: var(--rv-danger-text); background: var(--rv-danger-hover); }

/* ── Theme switcher bar ─────────────────────────────────────── */
.rv-theme-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 1.25rem;
}
.rv-theme-label {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--rv-muted);
}
.rv-theme-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border: .5px solid var(--rv-border);
    border-radius: 20px;
    background: transparent;
    color: var(--rv-muted);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.rv-theme-btn:hover  { background: var(--rv-btn-hover); border-color: var(--rv-border-h); color: var(--rv-text); }
.rv-theme-btn.active { background: var(--rv-surface);   border-color: var(--rv-border-h); color: var(--rv-text); }

.rv-theme-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: .5px solid var(--rv-border-h);
}

/* ================================================================
   riepilogo-contratto.css
   Styles for the buildRiepilogo() contract summary — Step 5.
   All colours use var(--rv-*) tokens so they respect the active
   theme (light / pastel / dark) set on <html data-theme="...">.
   ================================================================ */

/* ── layout ────────────────────────────────────────────────────── */
#riepilogoContent { font-family: inherit; }

.rp-vi { width: 20px; height: 20px; }

/* ── header card ────────────────────────────────────────────────── */
.rp-header {
    border: .5px solid var(--rv-border);
    border-radius: 12px;
    background: var(--rv-bg);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}
.rp-contract-eyebrow {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--rv-muted);
    margin-bottom: .35rem;
}
.rp-contract-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--rv-text);
    line-height: 1.2;
    margin-bottom: .3rem;
}
.rp-contract-sub { font-size: 13px; color: var(--rv-muted); }
.rp-status { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.rp-status-badge {
    font-size: 11px;
    font-weight: 500;
    padding: 4px 12px;
    border-radius: 20px;
    background: #FAEEDA;
    color: #633806;
    border: .5px solid #EF9F27;
    white-space: nowrap;
}
.rp-ref { font-size: 11px; color: var(--rv-hint); }

/* ── metric pills ───────────────────────────────────────────────── */
.rp-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
}
.rp-metric {
    background: var(--rv-surface);
    border-radius: 8px;
    padding: .85rem 1rem;
}
.rp-metric-label {
    font-size: 11px;
    color: var(--rv-hint);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 500;
}
.rp-metric-value { font-size: 18px; font-weight: 500; color: var(--rv-text); }
.rp-metric-sub   { font-size: 11px; color: var(--rv-muted); margin-top: 2px; }

/* ── generic section card ───────────────────────────────────────── */
.rp-section {
    border: .5px solid var(--rv-border);
    border-radius: 12px;
    background: var(--rv-bg);
    margin-bottom: .75rem;
    overflow: hidden;
}
.rp-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .85rem 1.25rem;
    border-bottom: .5px solid var(--rv-border);
    background: var(--rv-surface);
}
.rp-section-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rp-section-title { font-size: 13px; font-weight: 500; color: var(--rv-text); }
.rp-section-count {
    margin-left: auto;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--rv-bg);
    border: .5px solid var(--rv-border-h);
    color: var(--rv-muted);
}
.rp-section-body { padding: 1rem 1.25rem; }

/* ── dati field grid ────────────────────────────────────────────── */
.rp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 2rem; }
.rp-field { padding: .4rem 0; border-bottom: .5px solid var(--rv-border); }
.rp-field:last-child { border-bottom: none; }
.rp-field-label {
    font-size: 11px;
    color: var(--rv-hint);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 500;
    margin-bottom: 2px;
}
.rp-field-value { font-size: 13px; color: var(--rv-text); font-weight: 500; }

/* ── riga row ───────────────────────────────────────────────────── */
.rp-riga {
    border: .5px solid var(--rv-border);
    border-radius: 8px;
    margin-bottom: .6rem;
    overflow: hidden;
}
.rp-riga:last-child { margin-bottom: 0; }
.rp-riga-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .65rem 1rem;
    background: var(--rv-surface);
}
.rp-riga-num {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--rv-bg);
    border: .5px solid var(--rv-border-h);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 500;
    color: var(--rv-muted);
    flex-shrink: 0;
}
.rp-riga-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rp-riga-info  { flex: 1; min-width: 0; }
.rp-riga-name  { font-size: 13px; font-weight: 500; color: var(--rv-text); }
.rp-riga-note  { font-size: 11px; color: var(--rv-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rp-riga-cnt {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 9px;
    border-radius: 20px;
    background: #E1F5EE;
    color: #085041;
    border: .5px solid #5DCAA5;
}
.rp-riga-cnt.empty {
    background: var(--rv-bg);
    color: var(--rv-hint);
    border-color: var(--rv-border);
}

/* ── scaglioni table ────────────────────────────────────────────── */
.rp-scaglioni { overflow-x: auto; }
.rp-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    table-layout: fixed;
}
.rp-tbl th {
    font-size: 10px;
    font-weight: 500;
    color: var(--rv-hint);
    padding: 5px 8px;
    text-align: left;
    border-bottom: .5px solid var(--rv-border);
    background: var(--rv-surface);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.rp-tbl td {
    padding: 5px 8px;
    border-bottom: .5px solid var(--rv-border);
    color: var(--rv-text);
    vertical-align: middle;
}
.rp-tbl tr:last-child td { border-bottom: none; }
.rp-tbl tbody tr:hover td { background: var(--rv-surface); }

.rp-festivi-yes {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #E1F5EE;
    border: .5px solid #5DCAA5;
    vertical-align: middle;
}
.rp-festivi-no {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--rv-surface);
    border: .5px solid var(--rv-border);
    vertical-align: middle;
}

/* ── empty state ────────────────────────────────────────────────── */
.rp-empty-state {
    text-align: center;
    padding: 1.2rem;
    color: var(--rv-muted);
    font-size: 13px;
    font-style: italic;
}

/* ── alert banner ───────────────────────────────────────────────── */
.rp-alert {
    border-radius: 8px;
    padding: .9rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #FAEEDA;
    border: .5px solid #EF9F27;
    margin-top: 1rem;
}
.rp-alert-title { font-size: 13px; font-weight: 500; color: #412402; margin-bottom: 2px; }
.rp-alert-text  { font-size: 12px; color: #633806; line-height: 1.5; }

/* ── responsive: stack metrics on narrow screens ────────────────── */
@media (max-width: 540px) {
    .rp-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-grid    { grid-template-columns: 1fr; }
    .rp-header  { flex-direction: column; }
    .rp-status  { align-items: flex-start; }
}

