/* Area condòmini di Ready Condominio (stile del canvas di design, vicino al frontend di Superior Fidelity).
   Colori dell'amministratore dalle variabili del layout: --rc-primary, --rc-accent (+ on/soft). */
:root {
    --rc-bg: #efece5;
    --rc-text: #1d2b2f;
    --rc-muted: #55666b;
    --rc-muted-dark: #3d5054;
    --rc-line: #edf0f0;
    --rc-soft: #f4f2ec;
    --rc-yes: #2f7a4f;
    --rc-no: #c9692f;
    --rc-abstain: #9aa5a8;
    --rc-radius: 16px;
    --rc-shadow: 0 10px 30px rgba(29, 43, 47, .14);
    --rc-shadow-small: 0 2px 10px rgba(29, 43, 47, .08);
    --rc-display: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
    --rc-font: "Nunito Sans", "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.rc-body { margin: 0; background: var(--rc-bg); color: var(--rc-text); font-family: var(--rc-font); font-size: 16px; line-height: 1.45; }
a { color: var(--rc-primary); }
a:hover { color: var(--rc-text); }
h1, h2, h3 { font-family: var(--rc-display); font-weight: 600; margin: 0; color: inherit; }
p { margin: 0; }
[hidden] { display: none !important; }
img { max-width: 100%; }

/* pagina */
.rc-page { max-width: 560px; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.rc-content { padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.rc-content-overlap { margin-top: -66px; }

/* intestazione */
.rc-header { background: var(--rc-primary); color: var(--rc-on-primary); padding: calc(16px + env(safe-area-inset-top)) 16px 18px; border-radius: 0 0 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.rc-header-large { padding-bottom: 92px; gap: 18px; }
.rc-header-bar { display: flex; align-items: center; gap: 10px; }
.rc-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: inherit; text-decoration: none; }
.rc-brand:hover { color: inherit; }
.rc-brand-text { display: flex; flex-direction: column; min-width: 0; }
.rc-brand-name { font-family: var(--rc-display); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-brand-sub { font-size: 13px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-logo { width: 42px; height: 42px; border-radius: 10px; background: #fff; color: var(--rc-primary); display: inline-flex; align-items: center; justify-content: center; font-family: var(--rc-display); font-weight: 700; font-size: 16px; flex-shrink: 0; }
.rc-logo-large { width: 64px; height: 64px; border-radius: 16px; font-size: 24px; background: var(--rc-primary); color: var(--rc-on-primary); }
.rc-icon-button { position: relative; width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); color: inherit; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-icon-button:hover { color: inherit; background: rgba(255, 255, 255, .12); }
.rc-badge { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--rc-accent); color: var(--rc-on-accent); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.rc-hello { display: flex; flex-direction: column; gap: 4px; }
.rc-hello-name { font-size: 15px; opacity: .9; }
.rc-hello-unit { font-family: var(--rc-display); font-size: 26px; font-weight: 600; line-height: 1.2; }
.rc-hello-detail { font-size: 14px; opacity: .85; }
.rc-header-title { display: flex; flex-direction: column; gap: 4px; }
.rc-header-title h1 { font-size: 24px; line-height: 1.2; }
.rc-header-title p { opacity: .85; font-size: 14px; }
.rc-back { color: inherit; display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: 14px; text-decoration: none; opacity: .9; min-height: 32px; }
.rc-back:hover { color: inherit; opacity: 1; }

/* riquadri */
.rc-card { background: #fff; border-radius: var(--rc-radius); box-shadow: var(--rc-shadow-small); padding: 16px; display: flex; flex-direction: column; gap: 10px; color: var(--rc-text); text-decoration: none; }
a.rc-card:hover { color: var(--rc-text); }
.rc-card-title { font-family: var(--rc-display); font-weight: 600; font-size: 18px; line-height: 1.25; color: var(--rc-text); text-decoration: none; }
.rc-hero-card { box-shadow: var(--rc-shadow); border-radius: 18px; padding: 18px; gap: 12px; }
.rc-hero-top, .rc-row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.rc-eyebrow { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; font-weight: 800; color: var(--rc-muted); }
.rc-hero-amount { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rc-amount { font-family: var(--rc-display); font-size: 40px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-amount-label { font-size: 15px; font-weight: 700; color: var(--rc-muted); }
.rc-mini-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rc-mini { background: var(--rc-soft); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.rc-mini-label { font-size: 12px; font-weight: 800; color: var(--rc-muted); }
.rc-mini-value { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.rc-mini-ok { background: #e3f1e6; }
.rc-mini-ok .rc-mini-label, .rc-mini-ok .rc-mini-value { color: #2a5a33; }
.rc-accent-card { background: var(--rc-accent-soft); box-shadow: none; }
.rc-event { display: flex; align-items: center; gap: 12px; }
.rc-date-tile { width: 48px; height: 48px; border-radius: 12px; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-date-tile span { font-size: 11px; font-weight: 800; text-transform: uppercase; color: #8a4b0f; }
.rc-date-tile strong { font-family: var(--rc-display); font-size: 18px; line-height: 1; }
.rc-muted { color: var(--rc-muted); font-size: 14px; }
.rc-muted-dark { color: var(--rc-muted-dark); font-size: 14px; }
.rc-strong { color: var(--rc-text); }
.rc-welcome { background: #e3f1e6; box-shadow: none; display: block; }
.rc-link-card strong { font-family: var(--rc-display); font-size: 17px; }
.rc-note-small { font-size: 13px; color: var(--rc-muted); }
.rc-ok-text { color: var(--rc-yes); }
.rc-empty { color: var(--rc-muted); padding: 6px 0; }
.rc-h2 { font-size: 18px; }

/* sezioni ed elenchi */
.rc-section { display: flex; flex-direction: column; gap: 10px; }
.rc-section-head { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; }
.rc-section-head h2 { font-size: 20px; }
.rc-section-head a { font-size: 14px; font-weight: 800; }
.rc-list { padding: 0 16px; gap: 0; }
.rc-list-row { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--rc-line); text-decoration: none; color: var(--rc-text); }
.rc-list-row:last-child { border-bottom: 0; }
.rc-list-row:hover { color: var(--rc-primary); }
.rc-list-row.is-new .rc-list-title { color: var(--rc-primary); }
.rc-list-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.rc-list-title { font-weight: 800; font-size: 15px; line-height: 1.3; }
.rc-list-meta { font-size: 13px; color: var(--rc-muted); }
.rc-dot { width: 10px; height: 10px; border-radius: 999px; background: #cfd6d8; margin-top: 6px; flex-shrink: 0; }
.rc-dot-notice { background: var(--rc-primary); }
.rc-dot-state-1 { background: #1f5fae; }
.rc-dot-state-2 { background: #7a4fbf; }
.rc-dot-state-3 { background: #c9692f; }
.rc-dot-state-4 { background: #2f7a4f; }
.rc-doc-row { flex-direction: row; align-items: center; gap: 12px; padding: 14px; }
.rc-doc-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--rc-primary-soft); color: var(--rc-primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* chip, filtri, stati */
.rc-chip { display: inline-flex; align-items: center; white-space: nowrap; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: #eef1f2; color: var(--rc-muted); }
.rc-chip-warn { background: #fdf0e6; color: #8a4b0f; }
.rc-chip-ok { background: #e3f1e6; color: #2a5a33; }
.rc-chip-state-1 { background: #e3ecfb; color: #1f5fae; }
.rc-chip-state-2 { background: #efe6fa; color: #6a3fa0; }
.rc-chip-state-3 { background: #fcebd9; color: #a35a12; }
.rc-chip-state-4 { background: #e3f1e6; color: #2a5a33; }
.rc-chip-poll-1 { background: #fff3d6; color: #8a6510; }
.rc-chip-poll-2 { background: #e3f1e6; color: #2a5a33; }
.rc-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.rc-chips::-webkit-scrollbar { display: none; }
.rc-filter { white-space: nowrap; min-height: 40px; padding: 0 14px; border-radius: 999px; background: #fff; color: var(--rc-text); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; text-decoration: none; box-shadow: var(--rc-shadow-small); }
.rc-filter.is-active { background: var(--rc-text); color: #fff; }
.rc-steps { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; font-size: 12px; font-weight: 700; color: var(--rc-muted); }
.rc-steps li { display: flex; flex-direction: column; gap: 6px; }
.rc-steps li span { height: 6px; border-radius: 3px; background: #e4e8e9; }
.rc-steps li.is-done span { background: var(--rc-primary); }
.rc-steps li.is-current { color: var(--rc-text); }

/* messaggi */
.rc-message { gap: 8px; }
.rc-message-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.rc-message-body { white-space: normal; overflow-wrap: anywhere; }
.rc-message-admin { border-left: 4px solid var(--rc-primary); }
.rc-message-mine { background: #fbfaf6; }
.rc-photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-photos img, .rc-photo-small { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; }
.rc-photo-small { width: 120px; }

/* pulsanti e moduli */
.rc-button { min-height: 48px; padding: 0 18px; border-radius: 12px; border: 0; font: inherit; font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; }
.rc-button-primary { background: var(--rc-primary); color: var(--rc-on-primary); }
.rc-button-primary:hover { color: var(--rc-on-primary); filter: brightness(1.08); }
.rc-button-dark { background: var(--rc-text); color: #fff; min-height: 44px; font-size: 14px; }
.rc-button-dark:hover { color: #fff; }
.rc-button-light { background: #fff; color: var(--rc-text); border: 1px solid #d9dfe0; }
.rc-button-light:hover { color: var(--rc-text); background: var(--rc-soft); }
.rc-button-light.is-active { background: var(--rc-primary-soft); border-color: var(--rc-primary); color: var(--rc-primary); }
.rc-button-block { width: 100%; }
.rc-button[disabled] { opacity: .6; cursor: default; }
.rc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-form { gap: 14px; }
.rc-form > .rc-button { width: 100%; }
.rc-field { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; }
.rc-field input, .rc-field textarea, .rc-field select { font: inherit; font-weight: 400; font-size: 16px; min-height: 48px; padding: 10px 12px; border: 1px solid #cfd6d8; border-radius: 12px; background: #fff; color: var(--rc-text); width: 100%; }
.rc-field textarea { resize: vertical; }
.rc-field input:focus, .rc-field textarea:focus { outline: 2px solid var(--rc-primary); outline-offset: 1px; border-color: transparent; }
.rc-field.has-error input, .rc-field.has-error textarea { border-color: #c0392b; }
.rc-field-error { color: #b03a2e; font-weight: 700; font-size: 13px; }
.rc-form-error { color: #b03a2e; font-weight: 700; font-size: 14px; }
.rc-choices { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.rc-choices legend { font-weight: 800; font-size: 14px; margin-bottom: 6px; padding: 0; }
.rc-choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #d9dfe0; border-radius: 12px; padding: 12px; cursor: pointer; }
.rc-choice input { margin-top: 4px; accent-color: var(--rc-primary); width: 18px; height: 18px; }
.rc-choice span { display: flex; flex-direction: column; }
.rc-choice small { color: var(--rc-muted); font-size: 13px; }
.rc-choice:has(input:checked) { border-color: var(--rc-primary); background: var(--rc-primary-soft); }
.rc-file { display: flex; flex-direction: column; gap: 6px; font-weight: 700; color: var(--rc-primary); cursor: pointer; }
.rc-file input { font-size: 14px; color: var(--rc-muted); }
.rc-note { display: flex; gap: 10px; background: var(--rc-soft); border-radius: 12px; padding: 12px; font-size: 14px; }
.rc-note svg { flex-shrink: 0; }
.rc-ok-box { display: flex; flex-direction: column; gap: 2px; background: #e3f1e6; color: #2a5a33; border-radius: 12px; padding: 12px; }
.rc-ok-title { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.rc-ok-name { font-family: var(--rc-display); font-size: 18px; font-weight: 600; color: var(--rc-text); }
.rc-ok-text { font-size: 14px; color: var(--rc-muted-dark); }
.rc-help summary { cursor: pointer; color: var(--rc-primary); font-weight: 700; font-size: 14px; }
.rc-help p { margin-top: 6px; font-size: 14px; color: var(--rc-muted); }

/* accesso */
.rc-login { max-width: 440px; margin: 0 auto; padding: calc(32px + env(safe-area-inset-top)) 16px 32px; display: flex; flex-direction: column; gap: 16px; min-height: 100vh; }
.rc-login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 12px 0; }
.rc-login-name { font-family: var(--rc-display); font-size: 24px; font-weight: 600; }
.rc-login-sub { color: var(--rc-muted); }
.rc-login-card { box-shadow: var(--rc-shadow); gap: 16px; }
.rc-tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--rc-soft); border-radius: 12px; padding: 4px; gap: 4px; }
.rc-tab { min-height: 44px; border: 0; border-radius: 10px; background: transparent; font: inherit; font-weight: 800; color: var(--rc-muted); cursor: pointer; }
.rc-tab[aria-selected="true"] { background: #fff; color: var(--rc-text); box-shadow: var(--rc-shadow-small); }
.rc-install-hint { flex-direction: row; align-items: center; gap: 12px; }
.rc-install-hint > span:last-child { display: flex; flex-direction: column; }
.rc-install-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--rc-accent-soft); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-login-footer { text-align: center; font-size: 13px; color: var(--rc-muted); margin-top: auto; }
.rc-title { font-size: 22px; }

/* votazioni */
.rc-stack { position: relative; display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #e7ebec; }
.rc-stack-yes { background: var(--rc-primary); }
.rc-stack-no { background: var(--rc-no); }
.rc-stack-abstain { background: var(--rc-abstain); }
.rc-stack-threshold { position: absolute; left: 50%; top: -2px; bottom: -2px; width: 2px; background: var(--rc-text); }
.rc-legend { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--rc-muted-dark); }
.rc-legend li { display: flex; align-items: center; gap: 6px; }
.rc-legend strong { color: var(--rc-text); margin-left: 2px; }
.rc-legend-column { flex-direction: column; gap: 8px; }
.rc-legend-column small { margin-left: auto; padding-left: 8px; }
.rc-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: #e7ebec; flex-shrink: 0; }
.rc-key-yes { background: var(--rc-primary); }
.rc-key-no { background: var(--rc-no); }
.rc-key-abstain { background: var(--rc-abstain); }
.rc-key-partial { background: var(--rc-accent); }
.rc-key-due { background: var(--rc-accent); }
.rc-key-paid { background: var(--rc-primary); }
.rc-vote-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rc-vote { min-height: 52px; border-radius: 12px; border: 2px solid #d9dfe0; background: #fff; font: inherit; font-weight: 800; font-size: 14px; color: var(--rc-text); cursor: pointer; }
.rc-vote-1.is-active { border-color: var(--rc-primary); background: var(--rc-primary); color: var(--rc-on-primary); }
.rc-vote-2.is-active { border-color: var(--rc-no); background: var(--rc-no); color: #fff; }
.rc-vote-3.is-active { border-color: var(--rc-abstain); background: var(--rc-abstain); color: #fff; }

/* conti */
.rc-breakdown { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.rc-breakdown li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--rc-line); font-size: 15px; }
.rc-breakdown li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
.rc-breakdown-total { border-bottom: 0 !important; font-weight: 800; font-size: 16px !important; }
.rc-minus { color: var(--rc-yes); }
.rc-bars { display: flex; align-items: flex-end; gap: 18px; height: 160px; padding: 8px 4px 0; border-bottom: 1px solid #d9dfe0; }
.rc-bar-group { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rc-bar-pair { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.rc-bar { width: 24px; border-radius: 6px 6px 0 0; min-height: 2px; }
.rc-bar-due { background: var(--rc-accent); }
.rc-bar-paid { background: var(--rc-primary); }
.rc-bar-label { font-size: 13px; font-weight: 800; color: var(--rc-muted); margin-bottom: -26px; }
.rc-bars + .rc-legend { margin-top: 26px; }
.rc-year { border-top: 1px solid var(--rc-line); padding-top: 8px; }
.rc-year summary { display: flex; justify-content: space-between; cursor: pointer; font-weight: 800; padding: 6px 0; }
.rc-donut-wrap { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rc-donut { width: 140px; height: 140px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rc-donut span { width: 88px; height: 88px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.rc-donut strong { font-family: var(--rc-display); font-size: 18px; }
.rc-donut small { color: var(--rc-muted); font-size: 12px; }
.rc-donut-wrap .rc-legend { flex: 1; min-width: 180px; }

/* rappresentante */
.rc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.rc-stat { align-items: flex-start; gap: 2px; padding: 12px; }
.rc-stat strong { font-family: var(--rc-display); font-size: 22px; }
.rc-stat span { font-size: 12px; color: var(--rc-muted); font-weight: 700; }
.rc-unit-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.rc-unit { text-align: center; border-radius: 10px; padding: 8px 0; font-weight: 800; font-size: 13px; background: #e7ebec; color: var(--rc-muted); }
.rc-unit-done { background: var(--rc-primary); color: var(--rc-on-primary); }
.rc-unit-partial { background: var(--rc-accent); color: var(--rc-on-accent); }
.rc-agenda { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* menu in basso */
.rc-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; background: #fff; border-top: 1px solid #e3e8e9; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); padding: 8px 4px calc(10px + env(safe-area-inset-bottom)); }
.rc-nav a { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 44px; justify-content: center; font-size: 12px; font-weight: 700; color: var(--rc-muted); text-decoration: none; }
.rc-nav a.is-active { color: var(--rc-primary); font-weight: 800; }
@media (min-width: 600px) {
    .rc-nav { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 18px 18px 0 0; border: 1px solid #e3e8e9; border-bottom: 0; }
}

/* avviso a comparsa */
.rc-toast { position: fixed; left: 50%; bottom: calc(90px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); background: var(--rc-text); color: #fff; padding: 12px 16px; border-radius: 12px; font-weight: 700; font-size: 14px; z-index: 20; box-shadow: var(--rc-shadow); }
