/* Quartick desktop: one accent (coral), soft ink on a grey or graphite ground, never pure white or black
   (`.claude/rules/ui.md`). Spacing follows `Space`: page 24, section 36, block 16, card 18. */

@font-face { font-family: 'Roboto Medium'; src: url('assets/Roboto-Medium.ttf'); font-weight: 500; }

:root {
  --accent: #F04A1D;
  --accent-text: #C93A12;
  --accent-soft: rgba(240, 74, 29, .12);
  --ground: #F2F2F7;
  --card: #FFFFFF;
  --ink: #1D1D1F;
  --secondary: rgba(60, 60, 67, .62);
  --tertiary: rgba(60, 60, 67, .3);
  --field: rgba(118, 118, 128, .12);
  --track: rgba(118, 118, 128, .14);
  --separator: rgba(60, 60, 67, .18);
  --grey: #C7C7CC;
  --future: #E5E5EA;
  --danger: #D70015;
  --overlay: rgba(0, 0, 0, .28);
  --shadow: 0 10px 40px rgba(0, 0, 0, .16);
  --page: 24px;
  --section: 36px;
  --block: 16px;
  --card-pad: 18px;
  --radius: 22px;
  --readable: 720px;
  --wide: 1120px;
  --header-button: 40px;
  --button: 60px;
  --sidebar: 220px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --accent-text: #FF7A52;
    --accent-soft: rgba(240, 74, 29, .2);
    --ground: #1C1C1E;
    --card: #2C2C2E;
    --ink: #F2F2F7;
    --secondary: rgba(235, 235, 245, .62);
    --tertiary: rgba(235, 235, 245, .3);
    --field: rgba(118, 118, 128, .24);
    --track: rgba(118, 118, 128, .28);
    --separator: rgba(84, 84, 88, .6);
    --grey: #545458;
    --future: #3A3A3C;
    --danger: #FF6961;
    --overlay: rgba(0, 0, 0, .5);
    --shadow: 0 10px 40px rgba(0, 0, 0, .5);
  }
}

* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  background: var(--ground);
  color: var(--ink);
  font: 15px/1.4 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  overflow: hidden;
}
input, textarea, select, button { font: inherit; color: inherit; }
input, textarea { user-select: text; }
button { cursor: default; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 10px; }
h1, h2, h3, p { margin: 0; }
hr { border: 0; border-top: .5px solid var(--separator); margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.drag { -webkit-app-region: drag; }
.no-drag, .drag button, .drag input, .drag select, .drag a { -webkit-app-region: no-drag; }

/* Type */
.number { font-family: ui-rounded, 'SF Pro Rounded', -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -.01em; }
.n13 { font-size: 13px; font-weight: 500; } .n14 { font-size: 14px; font-weight: 400; } .n15 { font-size: 15px; font-weight: 500; }
.n17 { font-size: 17px; } .n20 { font-size: 20px; } .n22 { font-size: 22px; } .n24 { font-size: 24px; } .n28 { font-size: 28px; }
.n30 { font-size: 30px; } .n32 { font-size: 32px; } .n44 { font-size: 44px; letter-spacing: -1.5px; } .n48 { font-size: 48px; letter-spacing: -1.5px; }
.n64 { font-size: 64px; letter-spacing: -2px; } .n88 { font-size: 88px; letter-spacing: -3px; }
.title3 { font-size: 20px; font-weight: 700; }
.headline { font-size: 17px; font-weight: 600; }
.display { font-size: 30px; font-weight: 700; letter-spacing: -.5px; }
.outdated-brand { display: flex; align-items: center; gap: 14px; }
.outdated-brand img { border-radius: 16px; }
.display-xl { font-size: 36px; font-weight: 700; letter-spacing: -1px; line-height: 1.1; font-family: ui-rounded, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; }
/* `--sub`: Profilo › Generali › «Sottotitoli e note» (`AppModel.applyTextSize`), on top of the window's text size. */
.footnote { font-size: calc(16px * var(--sub, 1)); } .caption { font-size: calc(15px * var(--sub, 1)); }
.secondary { color: var(--secondary); } .primary { color: var(--ink); }
.accent-text { color: var(--accent-text); } .danger { color: var(--danger) !important; }
.strong { font-weight: 600; } .nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.invisible { visibility: hidden; } .grow { flex: 1; } .center { text-align: center; } .right { margin-left: auto; display: block; }
.lead { font-size: 18px; }
.icon { flex: none; display: block; }

/* Shell: sidebar with the three tabs, content on the right */
.shell { display: flex; height: 100%; }
.sidebar { width: var(--sidebar); flex: none; padding: 12px; display: flex; flex-direction: column; gap: 2px; background: color-mix(in srgb, var(--ground) 82%, var(--card)); border-right: .5px solid var(--separator); }
.sidebar-top { height: 8px; } .sidebar-top.mac { height: 40px; }
.tab { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; font-weight: 500; text-align: left; }
.tab:hover { background: var(--field); }
.tab.on { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.content { flex: 1; position: relative; min-width: 0; height: 100%; }
.screen, .page { position: relative; height: 100%; display: flex; flex-direction: column; }
.scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 0 var(--page) 48px; }
.readable { max-width: var(--readable); margin: 0 auto; display: flex; flex-direction: column; gap: var(--block); }
.readable.wide { max-width: var(--wide); }

/* Tab backgrounds: plain, a tint, or a photo under a veil (78 % of the ground) */
.backdrop { position: absolute; inset: 0; background: var(--ground); z-index: -1; }
.content > .backdrop + * { z-index: 0; }
.content { isolation: isolate; }
.backdrop.photo { background-size: cover; background-position: center; }
.backdrop.photo::after { content: ''; position: absolute; inset: 0; background: color-mix(in srgb, var(--ground) 78%, transparent); }
.tint-sand { background: #EBDDC3; } .tint-mist { background: #D3E3F3; } .tint-sage { background: #D5E8D0; } .tint-rose { background: #F8D5CC; }
.tint-sun { background: #FBE9A6; } .tint-graphite { background: #D2D4D9; } .tint-sky { background: #B9DCFF; } .tint-coral { background: #FFC4B1; }
.tint-lemon { background: #FFF08A; } .tint-mint { background: #B4EFD3; } .tint-pink { background: #FFBFD9; }
@media (prefers-color-scheme: dark) {
  .tint-sand { background: #2B251A; } .tint-mist { background: #18222E; } .tint-sage { background: #1A2B1A; } .tint-rose { background: #33201C; }
  .tint-sun { background: #33290F; } .tint-graphite { background: #0E0F11; } .tint-sky { background: #0F2A44; } .tint-coral { background: #3D1A10; }
  .tint-lemon { background: #363006; } .tint-mint { background: #0E3326; } .tint-pink { background: #3D1228; }
}

/* Headers */
.big-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 28px; min-height: 76px; }
.big-header h1 { font: 700 40px/1.1 ui-rounded, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-actions { display: flex; gap: 8px; align-items: center; }
.date-line { font-size: 20px; font-weight: 500; color: var(--secondary); margin-top: -8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-button, .menu.header-menu .menu-trigger { width: var(--header-button); height: var(--header-button); border-radius: 50%; border: .5px solid var(--separator); background: var(--card); display: grid; place-items: center; position: relative; flex: none; padding: 0; }
.header-button:hover, .menu.header-menu .menu-trigger:hover { background: color-mix(in srgb, var(--card) 85%, var(--ink)); }
.header-button .badge { position: absolute; top: 2px; right: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--ground); pointer-events: none; }
.pop { animation: pop .35s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.page-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 12px var(--page); min-height: 56px; border-bottom: .5px solid var(--separator); background: color-mix(in srgb, var(--ground) 92%, transparent); }
[data-platform="darwin"] .page-bar { padding-top: 14px; }
.page-bar h2 { font-size: 15px; font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-actions { justify-self: end; display: flex; gap: 8px; }
.back { justify-self: start; display: flex; align-items: center; gap: 2px; border: 0; background: none; color: var(--accent-text); font-weight: 500; padding: 4px 6px; border-radius: 8px; }
.back:hover { background: var(--field); }
.page .scroll { padding-top: var(--block); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; min-height: 44px; font-weight: 600; background: var(--card); border: .5px solid var(--separator); }
.btn:hover:not(:disabled) { filter: brightness(.96); }
.btn:disabled { opacity: .45; }
.btn.primary { background: var(--accent); color: #fff; border-color: transparent; }
.btn.ink { background: var(--ink); color: var(--ground); border-color: transparent; }
.btn.danger { background: var(--danger); color: #fff !important; border-color: transparent; }
.btn.plain { background: transparent; border-color: transparent; color: var(--accent-text); }
.btn.plain.danger { background: transparent; color: var(--danger) !important; }
.btn.small { min-height: 32px; padding: 6px 14px; font-size: 14px; }
.btn.mini { min-height: 26px; padding: 3px 10px; font-size: 12px; }
.btn.big { min-height: var(--button); font-size: 22px; font-weight: 700; padding: 0 24px; }
.btn.big.square { width: var(--button); padding: 0; flex: none; }
.wide-button { width: 100%; }
.icon-button { border: 0; background: none; padding: 6px; border-radius: 8px; color: var(--secondary); display: grid; place-items: center; }
.icon-button:hover { background: var(--field); }
.link { border: 0; background: none; color: var(--accent-text); font-weight: 600; padding: 4px 0; min-height: 32px; }
.plain-button { border: 0; background: none; text-align: left; padding: 0; }

/* Cards and rows */
.card { background: var(--card); border-radius: var(--radius); border: .5px solid color-mix(in srgb, var(--separator) 50%, transparent); }
.section { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.section-title { font-size: calc(14px * var(--sub, 1)); font-weight: 600; color: var(--secondary); padding: 0 4px; display: flex; align-items: center; gap: 6px; }
.footer { font-size: calc(16px * var(--sub, 1)); color: var(--secondary); padding: 0 4px; }
.rows { overflow: hidden; }
.rows > * + * { border-top: .5px solid var(--separator); }
.rows > .row, .rows > label.row { margin-left: 0; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 50px; padding: 12px var(--card-pad); background: none; border: 0; text-align: left; }
button.row:hover:not(:disabled) { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.row:disabled, .row.disabled { opacity: .45; }
.row.column { flex-direction: column; align-items: stretch; }
.row-icon { color: var(--secondary); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 500; }
.row-subtitle { font-size: calc(16px * var(--sub, 1)); color: var(--secondary); }
.row-value { color: var(--secondary); text-align: right; max-width: 55%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chev { color: var(--tertiary); }
.row-menu > .menu-trigger { display: flex; align-items: center; width: 100%; min-height: 50px; padding: 12px var(--card-pad); background: none; border: 0; text-align: left; color: inherit; }
.title-line { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.when { font-size: calc(15px * var(--sub, 1)); color: var(--secondary); white-space: nowrap; }
.when.right { display: block; text-align: right; padding: 6px var(--card-pad) 0; }
.link-row { justify-content: space-between; }
.option-row .row-title { font-weight: 400; }
.text-input, .field, .time-input, .select, .text-area { border: .5px solid transparent; background: var(--field); border-radius: 10px; padding: 7px 12px; outline: none; min-height: 34px; transition: background .12s, border-color .12s, box-shadow .12s; }
.text-input:hover, .time-input:hover, .select:hover, .text-area:hover { background: color-mix(in srgb, var(--field) 70%, var(--ink) 6%); }
.text-input:focus, .time-input:focus, .select:focus, .text-area:focus, .field:focus { border-color: var(--accent); background: var(--card); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.text-input:focus-visible, .time-input:focus-visible, .select:focus-visible, .text-area:focus-visible, .field:focus-visible { outline: none; }
.text-input::placeholder, .field::placeholder, .text-area::placeholder { color: var(--tertiary); }
/* Form rows: the label on the left, every control the same width on the right, text left-aligned inside it */
.text-row .text-input, .row > .select { flex: none; width: min(300px, 55%); max-width: none; text-align: left; }
.field { width: 100%; padding: 12px 14px; border-radius: 14px; background: transparent; }
.rows > .field { border-radius: 0; }
.text-area { width: 100%; resize: vertical; padding: 12px; border-radius: 14px; }
.time-input { font-variant-numeric: tabular-nums; }
.day-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.day-chips .btn { min-width: 44px; height: 30px; padding: 0 8px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 32px; max-width: 60%; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 12px; }
.select option { background: var(--card); color: var(--ink); }
.stepper { display: inline-flex; border-radius: 10px; background: var(--field); overflow: hidden; flex: none; }
.stepper button { border: 0; background: none; width: 36px; height: 32px; display: grid; place-items: center; }
.stepper button + button { border-left: .5px solid var(--separator); }
.stepper button:disabled { opacity: .35; }
.switch { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--track); position: relative; flex: none; transition: background .2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch:checked { background: var(--accent); }
.switch:checked::after { transform: translateX(18px); }
.toggle-row { cursor: default; }

.segmented { display: flex; background: var(--track); border-radius: 10px; padding: 2px; gap: 2px; }
.segmented button { flex: 1; border: 0; background: transparent; padding: 6px 12px; border-radius: 8px; font-weight: 500; display: grid; place-items: center; white-space: nowrap; }
.segmented button.on { background: var(--card); box-shadow: 0 1px 4px rgba(0,0,0,.12); font-weight: 600; }
.segmented.icons { flex: none; width: 120px; }

.choices { display: flex; flex-direction: column; gap: 12px; }
.choice-card { display: flex; align-items: flex-start; gap: 14px; width: 100%; padding: var(--card-pad); border-radius: 18px; border: 2px solid transparent; background: var(--card); text-align: left; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--separator) 60%, transparent); }
.choice-card.selected { border-color: var(--ink); }
.choice-card:disabled { opacity: .5; }
.choice-body { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--tertiary); flex: none; margin-top: 1px; }
.radio.on { border: 7px solid var(--accent); }
.kind-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
.kind-grid .choice-card { padding: 14px; gap: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 2px; }
.method-action { flex: none; color: var(--secondary); }
.method-action.link { color: var(--accent); }
.tag { font-size: 12px; font-weight: 600; padding: 3px 8px; background: var(--track); border-radius: 8px; }
.intro { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 6px; }
.preview-bubble { display: flex; gap: 8px; align-items: flex-start; background: var(--ground); border-radius: 14px; padding: 12px; font-size: 14px; }
.preview-bubble .icon { color: #fff; background: var(--accent); border-radius: 6px; padding: 3px; width: 22px; height: 22px; }
.icon-choice { display: flex; align-items: center; gap: 16px; }
.icon-choice img { border-radius: 14px; }
/* Generali › Icona dell’app: three small tiles in a row, the chosen one framed */
.icon-choices { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.icon-choices .choice-card { padding: 12px; justify-content: center; }
.icon-choices .icon-choice { flex-direction: column; gap: 8px; }
.icon-choices .icon-choice img { border-radius: 11px; }
.layout-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.layout-tile { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: 18px; border: 2px solid transparent; background: var(--card); text-align: left; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--separator) 60%, transparent); }
.layout-tile.selected { border-color: var(--ink); }
/* Integrazioni: one block per integration, icon, name and state with a dot */
.integration-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.integration-tile { display: flex; flex-direction: column; gap: 14px; padding: var(--card-pad); border-radius: 18px; background: var(--card); text-align: left; min-width: 0; box-shadow: 0 0 0 .5px color-mix(in srgb, var(--separator) 60%, transparent); }
.integration-tile:hover { filter: brightness(.98); }
.integration-head { display: flex; align-items: center; justify-content: space-between; }
.integration-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--ground); color: var(--secondary); }
.integration-icon.on { background: var(--accent); color: #fff; }
.integration-title { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.integration-state { display: flex; align-items: center; gap: 6px; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.integration-state .dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: color-mix(in srgb, var(--secondary) 50%, transparent); }
.integration-state .dot.on { background: var(--accent); }
.layout-tile-title { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.layout-subtitle { margin: 12px 0 0; }
.layout-sketch { display: flex; flex-direction: column; gap: 5px; height: 112px; padding: 10px; border-radius: 12px; background: var(--ground); }
.sk-bar { display: block; border-radius: 99px; background: color-mix(in srgb, var(--secondary) 45%, transparent); flex: none; }
.sk-bar.strong { background: color-mix(in srgb, var(--ink) 70%, transparent); }
.sk-blocks { display: flex; gap: 5px; flex: none; }
.sk-blocks > span { flex: 1; border-radius: 4px; background: color-mix(in srgb, var(--secondary) 45%, transparent); }
.sk-step { display: flex; align-items: center; gap: 5px; flex: none; }
.sk-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: color-mix(in srgb, var(--secondary) 45%, transparent); }
.sk-dot.on, .sk-punch { background: var(--accent); }
.sk-fill { flex: 1; }
.sk-punch { display: block; height: 10px; border-radius: 99px; flex: none; }
input[type="range"] { width: 100%; accent-color: var(--accent); }

/* Overlays */
.overlay { position: fixed; inset: 0; background: var(--overlay); display: grid; place-items: center; z-index: 50; padding: 24px; animation: fade .15s ease-out; }
.overlay.clear { background: transparent; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: min(620px, 100%); max-height: calc(100vh - 48px); background: var(--ground); border-radius: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column; animation: rise .22s cubic-bezier(.2, .8, .2, 1); }
.sheet.small { width: min(480px, 100%); }
@keyframes rise { from { transform: translateY(16px) scale(.98); opacity: 0; } }
.sheet-bar { display: grid; grid-template-columns: 1fr auto minmax(max-content, 1fr); align-items: center; gap: 8px; padding: 14px 16px 8px; }
.sheet-bar h2 { font-size: 16px; font-weight: 600; text-align: center; }
.sheet-close { justify-self: start; width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--field); display: grid; place-items: center; }
.sheet-actions { justify-self: end; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.sheet-body { overflow-y: auto; padding: 8px var(--page) var(--page); display: flex; flex-direction: column; gap: var(--block); }
.confirm { width: min(380px, 100%); background: var(--card); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; text-align: center; animation: rise .18s ease-out; }
.confirm h2 { font-size: 17px; font-weight: 700; }
.confirm p { color: var(--secondary); font-size: 14px; white-space: pre-line; }
.confirm-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.menu { position: relative; display: inline-flex; }
.menu-trigger { border: 0; background: none; color: var(--secondary); padding: 6px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; min-height: 32px; }
.menu-trigger:hover { background: var(--field); }
.button-menu .menu-trigger { border: .5px solid var(--separator); background: var(--card); color: var(--ink); border-radius: 999px; padding: 8px 16px; font-weight: 600; }
.menu-list, .context-menu { position: absolute; top: calc(100% + 6px); min-width: 230px; background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 6px; z-index: 60; border: .5px solid var(--separator); display: flex; flex-direction: column; }
.menu-list.right { right: 0; } .menu-list.left { left: 0; }
.menu-list button, .context-menu button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 8px 10px; border-radius: 8px; text-align: left; white-space: nowrap; }
.menu-list button:hover:not(:disabled), .context-menu button:hover { background: var(--accent); color: #fff; }
.menu-list button:disabled { opacity: .4; }
.menu-list hr { margin: 4px 6px; }
.menu-header { font-size: 13px; color: var(--secondary); padding: 6px 10px 2px; font-weight: 600; }
.context-menu { position: fixed; top: 40%; left: 50%; transform: translateX(-50%); }
.toast { position: fixed; top: 16px; left: 50%; transform: translate(-50%, -80px); background: var(--card); box-shadow: var(--shadow); border-radius: 999px; padding: 10px 16px; display: flex; gap: 8px; align-items: center; font-weight: 600; transition: transform .25s ease; z-index: 70; }
.toast.show { transform: translate(-50%, 0); }
.toast .icon { color: var(--accent-text); }

/* Loading: the layout under a shimmer, never a spinner */
.skeleton { position: relative; pointer-events: none; }
.skeleton * { color: transparent !important; border-color: transparent !important; }
.skeleton .card, .skeleton .status-pill, .skeleton .btn { background: var(--track) !important; }
.skeleton .icon, .skeleton img, .skeleton svg { opacity: 0; }
.skeleton::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 60%, transparent), transparent); background-size: 220px 100%; background-repeat: no-repeat; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: -300px 0; } to { background-position: 900px 0; } }
.skeleton-rows { display: flex; flex-direction: column; gap: var(--block); padding: 8px 0; }
.skeleton-rows div { display: flex; gap: var(--block); }
.skeleton-rows span { height: 16px; border-radius: 8px; background: var(--track); }
.spinner-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); animation: pulse 1s ease-in-out infinite; display: inline-block; }
.spinner-dot.large { width: 22px; height: 22px; align-self: center; }
.overlay.erasing { z-index: 70; }
.progress-line { display: flex; align-items: center; gap: 10px; color: var(--secondary); }
.progress { height: 6px; border-radius: 3px; background: var(--track); overflow: hidden; }
.progress div { height: 100%; background: var(--ink); border-radius: 3px; transition: width .3s; }
.progress div.accent { background: var(--accent); }

/* Oggi */
.today-content { display: flex; flex-direction: column; gap: 28px; padding-top: 8px; padding-bottom: var(--bar-h, 96px); }
.desk[data-tab=today] > .scroll { padding-bottom: 0; }
.today-classic { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 1060px) { .today-classic { grid-template-columns: 1fr; gap: 28px; } }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack.gap-block { gap: var(--block); }
.gap-section { margin-top: 12px; }
.status-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 10px; padding: 10px var(--block); border-radius: 999px; background: var(--card); border: 0; font-weight: 600; max-width: 100%; }
.status-pill span:nth-child(2) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--ink); }
.status-dot.accent { background: var(--accent); } .status-dot.grey { background: var(--grey); } .status-dot.ink { background: var(--ink); }
.timer { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.timer-figure { line-height: 1; letter-spacing: -.04em; }
.seconds { font-size: 30px; font-weight: 500; color: var(--secondary); }
.timer-subtitle { white-space: nowrap; }
.day-bar-button { display: flex; flex-direction: column; gap: 10px; border: 0; background: none; padding: 14px 0; text-align: left; border-radius: 12px; }
.day-bar-head { display: flex; align-items: center; gap: 10px; }
.day-bar { display: flex; flex-direction: column; gap: 18px; }
.day-track { position: relative; height: 12px; border-radius: 6px; background: var(--track); }
.day-track .work { position: absolute; top: 0; bottom: 0; background: var(--accent); border-radius: 6px; }
.day-track .planned-end { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--grey); }
.day-track .now { position: absolute; top: -5px; height: 22px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.day-ticks { display: flex; justify-content: space-between; font-size: 12px; font-weight: 400; color: var(--secondary); }
/* Under the timer, one block: figures, lunch row and the next planned break right under it, like the lines of a list. */
.day-notes { display: flex; flex-direction: column; gap: 4px; }
.day-notes > .figures { margin-bottom: 12px; }
.day-notes > .lunch-row.asking + .lunch-row { margin-top: 4px; }
.figures { display: flex; flex-wrap: wrap; gap: var(--block) 28px; padding-left: 4px; }
.figures > div { display: flex; flex-direction: column; gap: 2px; }
.figure-title { font-size: 16px; font-weight: 500; color: var(--secondary); }
.lunch-row { display: flex; align-items: center; gap: var(--block); padding-left: 4px; font-size: 16px; }
.lunch-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lunch-text > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lunch-row.asking .lunch-text > span { white-space: normal; }
.lunch-detail { font-size: 16px; }
.break-open { display: flex; align-items: center; gap: var(--block); min-width: 0; margin: -4px; padding: 4px; border: 0; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.break-open:hover { background: color-mix(in srgb, var(--ground) 85%, var(--ink)); }
.lunch-row.asking { padding: 4px 6px 4px var(--card-pad); border-radius: 18px; }
.lunch-menu .menu-trigger { min-height: 44px; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: var(--block); }
.tile { display: flex; flex-direction: column; gap: 10px; padding: var(--card-pad); border-radius: 20px; text-align: left; min-width: 0; }
button.tile:hover { filter: brightness(.98); }
.tile-title { font-size: 16px; font-weight: 600; }
.tile-figure { display: block; }
.tile-foot { display: flex; gap: 10px; }
.tile.stat { gap: 8px; }
.today-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px; }
.summary { display: flex; flex-direction: column; gap: var(--block); }
.summary .today-head { margin-bottom: -6px; }
.punches h2 { margin: 0; }
/* Today's punches on a computer: tiles filling the width, not one long list. */
.punch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.fitted { overflow: hidden; margin: -4px; padding: 4px; }
.show-more { margin-top: 10px; }
.sentinel { height: 1px; }
.punch-tile.ghost { gap: 10px; min-height: 76px; justify-content: center; }
.punch-tile.ghost span { display: block; height: 16px; border-radius: 8px; background: var(--track); animation: pulse 1.2s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .punch-tile.ghost span { animation: none; } }
.punch-tile { display: flex; flex-direction: column; gap: 2px; width: 100%; min-width: 0; padding: 12px 14px; border: .5px solid var(--separator); border-radius: 16px; background: var(--card); text-align: left; }
.punch-tile:hover { background: color-mix(in srgb, var(--card) 94%, var(--ink)); }
.punch-tile-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.punch-tile .row-subtitle { overflow: hidden; text-overflow: ellipsis; }
.punch-list { display: flex; flex-direction: column; }
.punch-list > * + * { border-top: .5px solid var(--separator); }
.punch-row-wrap { position: relative; }
.punch-row { display: flex; align-items: center; gap: var(--block); width: 100%; padding: 12px 4px; border: 0; background: none; text-align: left; border-radius: 10px; }
.punch-row:hover { background: color-mix(in srgb, transparent 92%, var(--ink)); }
.punch-row .time { width: 64px; flex: none; }
.punch-row .row-subtitle { display: flex; gap: 4px; align-items: center; }
.empty { padding: var(--card-pad) 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.chip { border: 0; background: var(--card); border-radius: 999px; padding: 8px 12px; display: inline-flex; gap: 6px; align-items: baseline; }
.timeline { display: flex; flex-direction: column; }
.timeline-punch { display: grid; grid-template-columns: 56px 12px 1fr; align-items: center; gap: var(--block); border: 0; background: none; padding: 8px 0; text-align: left; }
.ring { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--accent); }
.ring.hollow { background: transparent; }
.timeline-gap { display: grid; grid-template-columns: 56px 12px 1fr; gap: var(--block); align-items: center; }
.timeline-gap .stem { grid-column: 2; width: 2px; height: 28px; margin: 0 auto; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.timeline-gap .stem.pause { background: var(--track); }
.timeline-gap .footnote { grid-column: 3; }
.timeline-h { display: flex; flex-wrap: wrap; row-gap: 22px; padding-top: 4px; }
.tl-item { display: flex; align-items: flex-start; }
.tl-node { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; padding: 4px 6px; border: 0; border-radius: 12px; background: none; }
.tl-node:hover { background: color-mix(in srgb, transparent 92%, var(--ink)); }
.tl-link { position: relative; width: 96px; margin-top: 38px; }
.tl-link .stem { display: block; height: 2px; background: color-mix(in srgb, var(--accent) 50%, transparent); }
.tl-link .stem.pause { background: var(--track); }
.tl-link .footnote { position: absolute; top: 8px; left: 0; right: 0; text-align: center; line-height: 1.2; }
.tl-link .stretch { display: flex; flex-direction: column; align-items: center; white-space: nowrap; }
.tl-link.zero { width: 28px; }
.group-hints { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 6px; }
.group-hint { display: flex; align-items: center; gap: 8px; margin: 0; line-height: 1.35; }
.group-hint .link-button, .group-hint .icon-button { flex: none; }
.group-hint .icon-button { padding: 4px; margin-right: -4px; }
.group-head.stray + .group-hint { background: none; padding: 0 0 6px; }
/* Oggi's punches grouped by session (`screens/punch-groups.jsx`): Elenco cards side by side, a line through each. */
.punch-groups.list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; align-items: start; }
.punch-groups.timeline .punch-group + .punch-group, .punch-groups.chips .punch-group + .punch-group { margin-top: 6px; }
.group-card { padding: 0 var(--card-pad) 4px; }
.group-card .group-head { padding: 12px 0; border-bottom: .5px solid var(--separator); }
.group-head { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; font-size: inherit; font-weight: 600; }
.group-head.compact { margin: 0 0 8px; }
.group-head.stray { align-items: center; color: var(--secondary); }
.group-head .spacer { flex: 1; }
.tag.warning { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.row-title .tag { margin-left: 6px; }
.rail-row { display: grid; grid-template-columns: 14px 1fr; gap: 12px; align-items: stretch; }
.rail-row.ignored .punch-row { opacity: .6; }
.rail-row > .footnote { padding: 2px 0; }
.rail { display: flex; flex-direction: column; align-items: center; }
.rail-line { flex: 1; width: 2px; min-height: 4px; }
.rail .ring { flex: none; }
.rail-line.work { background: color-mix(in srgb, var(--accent) 55%, transparent); }
.rail-line.pause { background: var(--grey); }
.ring.ink { background: var(--ink); border-color: var(--ink); }
.ring.hollow { border-color: var(--grey); background: var(--card); }
.ring.dashed { background: transparent; border: 1.5px dashed var(--secondary); }
.tl-node.ignored { opacity: .6; }
.chip.break { background: var(--track); }
.chip.ignored { opacity: .6; box-shadow: inset 0 0 0 1px var(--secondary); }
.off-gap { display: flex; align-items: center; gap: 12px; }
.off-gap .dash { width: 14px; height: 28px; background: linear-gradient(var(--grey) 50%, transparent 50%) center / 2px 7px repeat-y; }
.group-card .off-gap { padding-top: 8px; }
.journal-total { display: flex; align-items: baseline; gap: 6px; }
/* Oggi on a day off with nothing punched (`dayOffCard`): name and line, then «Si riprende». */
.day-off { display: flex; flex-direction: column; gap: var(--block); width: 100%; padding: var(--card-pad); text-align: left; color: inherit; border-radius: 20px; }
.day-off:hover { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.day-off-head, .day-off-back { display: flex; align-items: center; gap: 14px; }
.day-off-head { align-items: flex-start; }
.day-off-back { padding-top: var(--block); border-top: 1px solid var(--separator); }
.day-off-back .row-text { flex: 1; }
.day-off-icon { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.day-off .title2 { font-size: 22px; font-weight: 700; }
.setup-hint { display: flex; align-items: center; padding-right: 8px; border-radius: 18px; }
.setup-hint > .row { flex: 1; }
.hint-close { border: 0; background: none; color: var(--secondary); width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; }
.banner { display: flex; align-items: flex-start; gap: 12px; padding: var(--block); border-radius: 18px; text-align: left; width: 100%; }
.banner-card { border-radius: 18px; }
.export-period { justify-content: space-between; }
.export-range { flex: 1; text-align: center; font-weight: 600; }
.banner-retry { margin: 0 var(--block) 8px 50px; }
.punch-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 12px var(--page); background: linear-gradient(to top, var(--ground) 60%, transparent); pointer-events: none; transition: padding .25s; }
.punch-bar-inner { display: flex; flex-direction: row; gap: 12px; pointer-events: auto; }
.punch-bar-inner .btn.primary { flex: 1; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 35%, transparent); }
.punch-bar-inner .btn.square { background: var(--card); }
.sync-icon { display: grid; place-items: center; color: var(--secondary); }
.sync-icon.accent-text { color: var(--accent-text); }
.sync-icon.pulse { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }

/* Punch sheet */
.type-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.type-grid button { min-height: 52px; border-radius: 16px; border: .5px solid var(--separator); background: var(--card); font-size: 18px; font-weight: 600; }
.type-grid button.on { background: var(--accent-soft); color: var(--accent-text); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.big-time { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.big-time input[type="time"] { font: inherit; font-size: 88px; letter-spacing: -3px; background: none; border: 0; text-align: center; padding: 0; color: var(--ink); }
.big-time input[type="time"]::-webkit-calendar-picker-indicator { display: none; }
.offsets { display: flex; justify-content: center; gap: 10px; }
.big-date { font-size: 20px; padding: 12px; }

/* Attention */
.attention-row { display: flex; align-items: center; }
.attention-row > .row, .attention-row > .grow { flex: 1; min-width: 0; }
.clear-item { border: 0; background: none; color: var(--tertiary); width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; margin-right: 8px; flex: none; }
.clear-item:hover { color: var(--danger); background: var(--field); }
.link-button { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; color: var(--accent-text); padding: 4px 0; font: inherit; }
.row .grow { flex: 1; min-width: 0; }
.danger-text { color: var(--danger); }
.why { margin: 0; padding: 14px var(--card-pad); line-height: 1.45; }

/* Calendario */
.mini-bar { width: 26px; height: 4px; border-radius: 2px; background: var(--track); overflow: hidden; display: block; }
.mini-bar span { display: block; height: 100%; border-radius: 2px; }
.mini-bar .ink, .legend i.ink { background: var(--ink); } .mini-bar .accent, .legend i.accent { background: var(--accent); }
.mini-bar .grey, .legend i.grey { background: var(--grey); } .mini-bar .future { background: var(--future); } .legend i.track { background: var(--track); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--secondary); }
.legend.column { flex-direction: column; gap: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 14px; height: 4px; border-radius: 2px; }
.legend i.square { width: 10px; height: 10px; border-radius: 3px; }
.legend i.dashed { width: 16px; height: 0; border-top: 2px dashed var(--secondary); border-radius: 0; }
.empty-card { padding: var(--card-pad); text-align: center; color: var(--secondary); }
.day-card { padding: 20px; border-radius: 24px; display: flex; flex-direction: column; gap: 8px; }
.day-card-head { display: flex; align-items: center; gap: 8px; }
.day-card-head h3 { flex: 1; }
.day-sub { padding-bottom: 8px; }
.sha { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; user-select: all; }
/* Profilo › «Scarica per Mac e Windows» (web console): why the desktop app, then its installers. */
.dl-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 28px; margin-bottom: var(--block); border-top: 3px solid var(--accent); }
.dl-hero-icon { flex: none; width: 88px; height: 88px; border-radius: 20px; }
.dl-hero-badge { flex: none; width: 88px; height: 88px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.dl-features.three { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dl-hero-text { flex: 1 1 280px; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; }
.dl-hero-title { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.dl-hero-text p { margin: 0; font-size: 16px; line-height: 1.45; max-width: 60ch; }
.dl-why { margin-top: 8px; }
.dl-features { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--block); margin-bottom: var(--section); }
.dl-feature { padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.dl-feature-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); }
.dl-feature-title { font-size: 17px; font-weight: 650; margin: 4px 0 0; }
.dl-feature p { margin: 0; font-size: 15px; line-height: 1.45; }
.day-off { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding: 12px; border-radius: 16px; background: var(--track); }
.day-off > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.day-off-icon { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--card); color: var(--secondary); }
.day-card .punch-list { border-top: .5px solid var(--separator); }
.missing { display: flex; gap: 6px; align-items: center; padding: 10px 0; }
.note-row { padding: 12px 0; border-top: .5px solid var(--separator); min-height: 0; }
.day-actions { display: flex; justify-content: space-between; padding-top: var(--block); }
.chart { display: flex; flex-direction: column; gap: 12px; }
.chart-plot { position: relative; display: flex; align-items: flex-end; gap: 8px; border-bottom: .5px solid var(--separator); }
.bar-col { flex: 1; height: 100%; position: relative; display: flex; align-items: flex-end; justify-content: center; }
.bar-stack { display: flex; flex-direction: column; justify-content: flex-end; width: min(42px, 70%); position: relative; }
.bar { display: block; width: 100%; }
.bar.ink { background: var(--ink); border-radius: 0 0 6px 6px; }
.bar.ink:first-child { border-radius: 6px; }
.bar.accent { background: var(--accent); border-radius: 6px 6px 0 0; }
.bar.accent + .bar.ink { border-radius: 0 0 6px 6px; }
.bar.target { position: absolute; bottom: 0; width: min(42px, 70%); background: var(--track); border-radius: 6px; }
.bar-value { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--secondary); white-space: nowrap; }
.goal-line { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--secondary); z-index: 1; }
.target-tick { position: absolute; width: min(42px, 70%); height: 2px; background: var(--secondary); }
.chart-axis { display: flex; gap: 8px; font-size: 12px; font-weight: 600; }
.chart-axis span { flex: 1; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Profilo and settings */
.profile-row { padding: 14px var(--card-pad); }
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; font-size: 20px; font-weight: 600; flex: none; }
.weekday-name { width: 110px; flex: none; }
.weekdays { display: flex; gap: 6px; }
.weekdays button { width: 34px; height: 34px; border-radius: 50%; border: .5px solid var(--separator); background: none; font-size: 13px; font-weight: 600; color: var(--secondary); }
.weekdays button.on { background: var(--ink); color: var(--ground); border-color: transparent; }
.shift-badge { width: 30px; height: 30px; border-radius: 50%; background: var(--field); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: none; }
.shift-badge.rest { background: none; border: .5px solid var(--separator); color: var(--secondary); font-weight: 500; }
.shift-badge.tinted { background: color-mix(in srgb, var(--shift) 25%, transparent); border: 1.5px solid var(--shift); }
.shift-badge.small { width: 22px; height: 22px; font-size: 11px; }
.shift-changed { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.shift-swatches { display: flex; gap: 8px; }
.shift-swatches button { width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; }
.shift-swatches button[aria-checked="true"] { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--ink); }
.shift-weeks { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; justify-items: center; }
.shift-weeks .head { font-size: 11px; color: var(--secondary); }
.shift-day { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.shift-day-number { font-size: 11px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.shift-day-badge { border-radius: 50%; display: grid; }
.shift-weeks .today .shift-day-badge { box-shadow: 0 0 0 2px var(--accent); }
.shift-weeks .today .shift-day-number { color: var(--accent-text); font-weight: 700; }
.roster-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.roster-counts { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.roster-counts span { display: inline-flex; align-items: center; gap: 4px; }
.roster-palette { display: flex; gap: 8px; flex-wrap: wrap; }
.roster-palette button { display: inline-flex; align-items: center; gap: 6px; border: 1.5px solid transparent; background: var(--field); border-radius: 999px; padding: 4px 10px; font-weight: 600; }
.roster-palette button[aria-checked="true"] { border-color: var(--ink); }
.roster .row { gap: 12px; }
.roster .roster-day { width: 110px; flex: none; }
.roster .today .roster-day { color: var(--accent-text); font-weight: 700; }
/* Shift work: Orario's cycle, «Il giro», the three questions, the shift editor, «Cambia turno», «Prossimo turno» */
.shift-badge.large { width: 38px; height: 38px; font-size: 16px; }
.shift-badge.big { width: 44px; height: 44px; font-size: 19px; }
.shift-row { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; color: inherit; }
.shift-head { display: flex; align-items: center; gap: 14px; padding: var(--card-pad); }
.shift-head-hours { display: flex; flex-direction: column; align-items: flex-end; flex: none; }
.cycle-summary { gap: 6px; }
.cycle-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cycle-badges > span { display: grid; border-radius: 50%; }
.cycle-badges .today { box-shadow: 0 0 0 2px var(--accent); }
.cycle-days { display: flex; flex-wrap: wrap; gap: 8px; }
.cycle-days .menu-trigger { border: 0; background: none; padding: 4px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: inherit; }
.cycle-days .menu-trigger:hover { background: var(--field); }
.cycle-days .menu.today .shift-badge { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--accent); }
.cycle-day-number { font-size: 12px; color: var(--secondary); font-variant-numeric: tabular-nums; }
.cycle-keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cycle-key { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 12px; border-radius: 14px; border: .5px solid var(--separator); background: var(--card); font-weight: 600; text-align: left; }
.cycle-key:hover { background: var(--field); }
.cycle-dots { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 4px; }
.cycle-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--grey); }
.cycle-dots i.rest { background: none; border: 1px solid var(--tertiary); }
.setup-head { display: flex; align-items: center; justify-content: space-between; min-height: 32px; }
.setup-progress { display: flex; gap: 6px; margin-left: auto; }
.setup-progress i { width: 28px; height: 4px; border-radius: 2px; background: var(--track); }
.setup-progress i.on { background: var(--accent); }
.setup-title { font: 700 30px/1.15 ui-rounded, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.5px; }
.shift-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.shift-choices button { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 14px; border-radius: 16px; border: 1.5px solid var(--separator); background: var(--card); text-align: left; font-weight: 600; }
.shift-choices button:hover { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.shift-choices button.on { border-color: var(--accent); background: var(--accent-soft); }
.shift-choice-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.next-shift { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px var(--card-pad); text-align: left; color: inherit; flex: none; }
.next-shift:hover { background: color-mix(in srgb, var(--card) 92%, var(--ink)); }
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 12px; padding: 14px var(--card-pad); }
.swatch { border: 0; background: none; display: flex; flex-direction: column; gap: 6px; align-items: center; padding: 0; }
.swatch-fill { width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--separator); display: grid; place-items: center; color: var(--ink); }
.swatch-fill.plain { background: var(--ground); }
.swatch[aria-pressed="true"] .swatch-fill { border: 2.5px solid var(--ink); }
.sync-status { display: flex; flex-direction: column; gap: 10px; }
.sync-status .section-title { margin: 0; }
.data-group { display: flex; flex-direction: column; gap: 12px; }
.data-group + .data-group { margin-top: 20px; }
.data-group-head { display: flex; flex-direction: column; gap: 4px; padding: 0 4px; }
.data-group-title { margin: 0; font-size: 20px; font-weight: 700; }
.sync-row { display: flex; gap: 14px; align-items: flex-start; }
.link-card .row { padding: var(--card-pad); }
.points { list-style: none; margin: 0; padding: 12px var(--card-pad); display: flex; flex-direction: column; gap: 10px; }
.points li, .primer li { display: flex; gap: 12px; align-items: flex-start; }
.primer { display: flex; flex-direction: column; align-items: center; gap: var(--block); text-align: center; }
.primer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.about-head { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 8px 0; }
.about-head img { border-radius: 24px; }

/* Onboarding */
.onboarding { height: 100%; overflow-y: auto; display: flex; justify-content: center; align-items: flex-start; padding: 48px var(--page); }
.onboarding-column { width: min(560px, 100%); display: flex; flex-direction: column; gap: var(--block); padding-bottom: var(--section); }
/* The first screen on a computer: the app on the left, signing in on the right from the height of «Perché un account
   Quartick», centred in the window, no scrolling; one column (sign-in last) when the window is narrow. */
.onboarding.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 440px); grid-template-areas: "intro ." "benefits panel"; column-gap: 64px; row-gap: 24px; align-items: start; align-content: safe center; max-width: 1080px; margin: 0 auto; padding: 24px 48px; }
.onboarding-intro { grid-area: intro; }
.onboarding-title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.onboarding-title .wordmark { margin-top: 0; }
.onboarding-benefits { grid-area: benefits; min-width: 0; }
.onboarding-benefits .benefits { margin-top: 0; }
.onboarding-panel { grid-area: panel; }
.onboarding-intro, .onboarding-panel { display: flex; flex-direction: column; gap: var(--block); min-width: 0; }
.onboarding-intro > *, .onboarding-panel > * { flex-shrink: 0; }
.onboarding.split .onboarding-intro { flex-direction: row; align-items: center; gap: 24px; }
.onboarding-intro .hero { margin: 0; width: 128px; height: 128px; flex: none; }
.onboarding-intro .hero .n48 { font-size: 26px; }
.onboarding-intro .display-xl { font-size: 40px; }
.onboarding-panel { background: var(--card); border: .5px solid var(--separator); border-radius: 26px; padding: 22px 24px; gap: 14px; box-shadow: var(--shadow); }
.onboarding-panel .card { background: var(--ground); }
.onboarding-panel .account-buttons { margin-top: 0; }
.wordmark-link { color: inherit; text-decoration: none; align-self: flex-start; }
/* «Prima di iniziare»: age and terms after the way in, one narrow column in the middle of the window */
.onboarding-column.consent-step { width: min(480px, 100%); align-self: center; margin: auto 0; }
/* «Il tuo lavoro»: the same narrow column, the progress and «Lo faccio dopo» on top */
.onboarding-column.work-setup { width: min(560px, 100%); }
.work-setup .setup-progress { margin: 0 auto; }
.work-setup .display { margin-bottom: 0; }
.consent-badge { width: 72px; height: 72px; border-radius: 20px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; }
.consent-step .display { margin-bottom: var(--block); }
.consent-step .wide-button { margin-top: var(--block); }
@media (max-width: 900px) {
  .onboarding.split { grid-template-columns: minmax(0, 560px); grid-template-areas: "intro" "benefits" "panel"; justify-content: center; align-content: start; padding: 32px var(--page); }
}
.wordmark { font-weight: 700; font-size: 17px; margin-top: 12px; }
.wordmark .accent, .splash-name .accent { color: var(--accent); }
.hero { position: relative; width: 190px; height: 190px; margin: 0 auto; }
.hero-figure { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dial-ticks line { stroke: var(--grey); stroke-width: 2; stroke-linecap: round; }
.dial-arc { fill: none; stroke: var(--accent); stroke-linecap: round; }
.account-buttons { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.account-buttons.dimmed { opacity: .45; }
.apple-button, .google-button, .email-button { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; border-radius: 999px; width: 100%; }
.google-button { background: #FFFFFF; border: 1px solid #747775; color: #1F1F1F; font: 500 17px 'Roboto Medium', Roboto, sans-serif; }
@media (prefers-color-scheme: dark) { .google-button { background: #131314; border-color: #8E918F; color: #E3E3E3; } }
.apple-button { background: #000; color: #fff; border: 0; font: 600 17px -apple-system, 'Segoe UI', sans-serif; }
@media (prefers-color-scheme: dark) { .apple-button { background: #fff; color: #000; } }
.apple-button:disabled { opacity: .45; }
.email-button { background: var(--card); border: .5px solid var(--separator); font-weight: 600; font-size: 17px; }
.google-button:disabled, .email-button:disabled { opacity: .45; }
.benefits { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.option-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); display: grid; place-items: center; flex: none; }
.consent { padding: 4px 0; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 14px var(--card-pad); }
.check-row input { width: 22px; height: 22px; accent-color: var(--accent); margin: 1px 0 0; flex: none; }
.legal-links { display: flex; gap: var(--block); padding: 0 var(--card-pad) 12px 52px; }
.auth-fields { display: flex; flex-direction: column; gap: 12px; }
.auth-field { display: flex; align-items: center; gap: 12px; background: var(--field); border-radius: 18px; min-height: 56px; padding: 0 6px 0 var(--card-pad); }
.auth-field input { flex: 1; border: 0; background: none; outline: none; min-height: 44px; }
.checklist { list-style: none; padding: 0 4px; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 16px; color: var(--secondary); }
.checklist li { display: flex; align-items: center; gap: 6px; }
.checklist li.ok { color: var(--accent-text); }

/* Splash */
.splash { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: var(--ground); }
.splash-mark { margin-bottom: 30px; }
@media (prefers-color-scheme: dark) { .splash-mark { filter: invert(1) hue-rotate(180deg); } }
.splash-name { font-size: 34px; font-weight: 700; display: flex; }
.splash-name span { opacity: 0; transform: translateY(6px); animation: letter .4s ease-out forwards; }
.splash.lively .splash-name span { transform: translateY(16px); animation: bounce .45s cubic-bezier(.34, 1.56, .64, 1) forwards; }
.splash.lively .splash-mark { animation: wiggle .9s ease-in-out; }
.splash-tagline { opacity: 0; animation: letter .4s ease-out forwards; animation-delay: 1.2s; }
.splash-progress { width: 120px; height: 3px; border-radius: 2px; background: var(--track); overflow: hidden; }
.splash-progress span { display: block; height: 100%; width: 0; background: var(--accent); animation: grow var(--total) linear forwards; }
@keyframes letter { to { opacity: 1; transform: none; } }
@keyframes bounce { to { opacity: 1; transform: none; } }
@keyframes wiggle { 15% { transform: scale(1.1) rotate(8deg); } 30% { transform: scale(1.1) rotate(-8deg); } 45% { transform: scale(1.1) rotate(5deg); } 60% { transform: scale(1.1) rotate(-5deg); } 100% { transform: none; } }
@keyframes grow { to { width: 100%; } }
.splash.reduce .splash-name span, .splash.reduce .splash-tagline { transform: none; animation: letter .6s ease-out forwards; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .splash-name span, .splash-tagline { opacity: 1; transform: none; }
}
@media (max-width: 900px) { :root { --sidebar: 64px; } .tab span { display: none; } .tab { justify-content: center; } }
/* Sheets and dialogs sit over drag regions: they must take the clicks themselves. */
.overlay, .toast { -webkit-app-region: no-drag; }
/* Columns that scroll keep their children at full height: a flex column would squeeze them to fit. */
.onboarding-column > *, .sheet-body > *, .readable > *, .stack > *, .choices > *, .day-card > * { flex-shrink: 0; }

/* Analisi (desktop only): heatmap, week on one axis, histograms, lines, horizontal bars. */
.analysis-issues { align-items: center; border: 0; background: var(--card); color: var(--ink); cursor: pointer; }
.analysis-issues.fix { background: var(--accent-soft); color: var(--accent-text); }
.analysis-issues-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.heatmap { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.heat-months { display: grid; gap: 3px; font-size: 11px; color: var(--secondary); padding-left: 32px; }
.heat-months span { white-space: nowrap; }
.heat-body { display: flex; gap: 6px; }
.heat-days { display: grid; grid-template-rows: repeat(7, 1fr); gap: 3px; font-size: 11px; color: var(--secondary); width: 26px; align-items: center; }
.heat-grid { flex: 1; display: grid; grid-template-rows: repeat(7, auto); gap: 3px; min-width: 0; }
.heat-cell { border: 0; padding: 0; aspect-ratio: 1; border-radius: 3px; background: var(--track); }
.heat-cell:hover { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat-cell.future { opacity: .45; }
.heat-cell.lv1, .heat-key.lv1 { background: color-mix(in srgb, var(--accent) 28%, var(--track)); }
.heat-cell.lv2, .heat-key.lv2 { background: color-mix(in srgb, var(--accent) 52%, var(--track)); }
.heat-cell.lv3, .heat-key.lv3 { background: color-mix(in srgb, var(--accent) 76%, var(--track)); }
.heat-cell.lv4, .heat-key.lv4 { background: var(--accent); }
.heat-cell.lv0.absence, .heat-key.absence { background: transparent; box-shadow: inset 0 0 0 2px var(--grey); }
.heat-cell.lv0.holiday, .heat-key.holiday { background: var(--grey); }
.heat-cell.today, .heat-key.today { outline: 2px solid var(--ink); outline-offset: 1px; }
.heat-key.today { background: transparent; outline-offset: -2px; }
.heat-cell.lv0.rest { background: color-mix(in srgb, var(--track) 55%, transparent); }
.heat-legend { align-items: center; }
.heat-scale { gap: 4px !important; }
.heat-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--track); }

.week-timeline { display: flex; flex-direction: column; gap: 4px; }
.wt-axis { position: relative; height: 16px; margin: 0 92px 0 52px; font-size: 11px; color: var(--secondary); }
.wt-axis span { position: absolute; transform: translateX(-50%); }
.wt-row { display: grid; grid-template-columns: 40px 1fr 80px; gap: 12px; align-items: center; border: 0; background: none; padding: 6px 0; text-align: left; border-radius: 10px; }
.wt-row:hover { background: var(--field); }
.wt-day { display: flex; flex-direction: column; line-height: 1.15; }
.wt-track { position: relative; height: 16px; border-radius: 8px; background: var(--track); overflow: hidden; }
.wt-plan { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--grey) 55%, transparent); }
.wt-work { position: absolute; top: 3px; bottom: 3px; background: var(--accent); border-radius: 5px; }
.wt-figure { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.wt-key-work { background: var(--accent); } .wt-key-plan { background: var(--grey); }

.chart-plot.compare, .chart-plot.histogram { gap: 6px; }
.bar-col.pair { gap: 3px; align-items: flex-end; }
.bar-col.pair .bar-stack { width: min(26px, 45%); }
.bar.solid { background: var(--accent); border-radius: 6px 6px 0 0; }
.bar.other { background: transparent; border: 2px solid var(--grey); border-bottom: 0; border-radius: 6px 6px 0 0; }
.legend i.other { background: transparent; border: 2px solid var(--grey); }
.chart-plot.histogram .bar-stack { width: 80%; }
.bar.median { outline: 2px solid var(--ink); outline-offset: 1px; }



@media (prefers-reduced-motion: no-preference) { .heat-cell { transition: outline-offset .1s; } }

/* Desktop screens (Calendario, Analisi): built for a window, not a phone. A toolbar with the period as the title and
   compact controls; Calendario splits into the period and an inspector with the selected day; Analisi is a 12-column
   grid of cards. Both react to the width of the content (container queries), not of the window. */
.desk { container: desk / inline-size; }
.toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px 20px; padding: 16px var(--page) 14px; border-bottom: .5px solid var(--separator); flex: none; }
[data-platform="darwin"] .toolbar { padding-top: 18px; }
.toolbar-title { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
.toolbar-heading { font: 700 26px/1.2 ui-rounded, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.4px; white-space: nowrap; }
.toolbar-subtitle { font-size: 15px; color: var(--secondary); white-space: nowrap; }
.toolbar-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.toolbar-controls, .jump { -webkit-app-region: no-drag; }
.toolbar .segmented { flex: none; }
.toolbar .segmented button, .segmented.small button { padding: 4px 12px; font-size: 13px; min-height: 26px; }
.segmented.icons.small { width: auto; }
.segmented.icons.small button { padding: 4px 10px; }
.stepper-group { display: inline-flex; border-radius: 8px; background: var(--card); border: .5px solid var(--separator); overflow: hidden; flex: none; }
.stepper-group button { border: 0; background: none; min-height: 30px; padding: 0 10px; display: grid; place-items: center; font-size: 13px; font-weight: 500; }
.stepper-group button + button { border-left: .5px solid var(--separator); }
.stepper-group button:hover { background: var(--field); }
.toolbar-menu .menu-trigger { width: 32px !important; height: 32px !important; }
.toolbar-search { display: flex; align-items: center; gap: 6px; width: 190px; min-height: 30px; padding: 0 8px; border-radius: 8px; background: var(--field); }
.toolbar-search:focus-within { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); }
.toolbar-search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; font-size: 13px; }
.toolbar-search button { border: 0; background: none; color: var(--secondary); padding: 2px; display: grid; place-items: center; }
.jump { position: relative; min-width: 0; }
.jump-trigger { border: 0; background: none; font: inherit; letter-spacing: inherit; padding: 2px 8px; margin-left: -8px; border-radius: 8px; display: inline-flex; align-items: center; gap: 6px; }
.jump-trigger:hover { background: var(--field); }
.popover { position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; width: 280px; display: flex; flex-direction: column; gap: 10px; padding: 14px; background: var(--card); border: .5px solid var(--separator); border-radius: 14px; box-shadow: var(--shadow); }
.popover-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tabs { display: flex; gap: 4px; padding: 0 var(--page); border-bottom: .5px solid var(--separator); flex: none; }
.tabs button { border: 0; background: none; padding: 10px 12px 9px; margin-bottom: -.5px; border-bottom: 2px solid transparent; font-weight: 500; color: var(--secondary); }
.tabs button:hover { color: var(--ink); }
.tabs button.on { color: var(--ink); font-weight: 600; border-bottom-color: var(--accent); }

/* Key figures in one card */
.kpis { display: flex; flex-wrap: wrap; overflow: hidden; flex: none; }
.kpis > .kpi { flex: 1 1 150px; }
.kpis.column { flex-direction: column; flex-wrap: nowrap; height: 100%; }
.kpis.column > .kpi { flex: 1 1 auto; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px var(--card-pad) 16px; box-shadow: -.5px 0 0 var(--separator), 0 -.5px 0 var(--separator); }
.kpi-label { display: flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 600; color: var(--secondary); }
.info { display: inline-flex; }
.info-button { display: inline-flex; padding: 2px; border: 0; border-radius: 50%; background: none; color: var(--secondary); cursor: pointer; }
.info-button:hover, .info-button[aria-expanded="true"] { color: var(--ink); background: var(--track); }
.info-popover { position: fixed; width: 320px; white-space: pre-line; font-size: 15px; font-weight: 400; line-height: 1.4; color: var(--ink); }
.kpi-value { font-size: 26px; line-height: 1.15; }
.kpi-detail { font-size: 15px; color: var(--secondary); }
.quip { margin-top: -6px; }

/* Calendario: the period on the left, the selected day on the right */
.split { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.split-main { overflow: auto; padding: var(--block) var(--page) var(--page); display: flex; flex-direction: column; }
.split-main > .skeleton-wrap { flex: 1; display: flex; flex-direction: column; gap: var(--block); }
.split-side { overflow: auto; padding: var(--block); display: flex; flex-direction: column; gap: var(--block); border-left: .5px solid var(--separator); background: color-mix(in srgb, var(--ground) 65%, var(--card)); }
.split-side .day-card { padding: var(--card-pad); border-radius: var(--radius); flex: none; }
.side-card { padding: var(--card-pad); display: flex; flex-direction: column; gap: 12px; flex: none; }
.side-title { font-size: 15px; font-weight: 600; }
@container desk (max-width: 820px) {
  .split { display: block; overflow: auto; }
  .split-main, .split-side { overflow: visible; }
  .split-side { border-left: 0; border-top: .5px solid var(--separator); padding: var(--block) var(--page) var(--page); }
}
.month-wrap { flex: 1; display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.legend-hint { margin-left: auto; color: var(--tertiary); }
.month { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .5px; background: var(--separator); border: .5px solid var(--separator); border-radius: 14px; overflow: hidden; }
.month-head { background: var(--card); padding: 8px 10px; font-size: 13px; font-weight: 600; color: var(--secondary); }
.cell { position: relative; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px 10px 10px; border: 0; border-radius: 0; background: var(--card); text-align: left; overflow: hidden; }
.cell.outside { background: color-mix(in srgb, var(--card) 45%, var(--ground)); }
.outside .cell-number { color: var(--secondary); font-weight: 400; }
.cell.weekend { background: color-mix(in srgb, var(--card) 78%, var(--ground)); }
.cell.off { background: linear-gradient(var(--track), var(--track)), var(--card); }
button.cell:hover { background: color-mix(in srgb, var(--card) 93%, var(--ink)); }
.cell.selected { box-shadow: inset 0 0 0 2px var(--ink); z-index: 1; }
.cell:focus-visible { outline-offset: -3px; border-radius: 0; }
.cell-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.cell-number { min-width: 26px; height: 26px; margin: -3px 0 0 -5px; padding: 0 5px; border-radius: 13px; display: inline-grid; place-items: center; font-size: 15px; font-weight: 600; }
.weekend .cell-number { color: var(--secondary); }
.today .cell-number { background: var(--accent); color: #fff; }
.cell-shift { display: inline-flex; align-items: center; gap: 3px; }
.cell-body { flex: 1; display: flex; flex-flow: row wrap; align-content: flex-start; align-items: baseline; column-gap: 6px; row-gap: 1px; min-height: 0; }
.cell-hours { font-size: 17px; line-height: 1.2; }
.cell-over { font-size: 12px; }
.cell-tag { font-size: 13px; color: var(--secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; flex: 1 0 100%; min-width: 0; }
.cell .mini-bar { width: 100%; flex: none; }
.week { flex: 1; min-height: 420px; display: grid; grid-template-columns: 52px repeat(7, minmax(0, 1fr)); grid-template-rows: auto 1fr; background: var(--card); border: .5px solid var(--separator); border-radius: 14px; overflow: hidden; }
.week-corner, .week-day { border-bottom: .5px solid var(--separator); }
.week-day { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-left: .5px solid var(--separator); min-width: 0; }
.week-day-name { font-size: 14px; font-weight: 600; color: var(--secondary); white-space: nowrap; }
.week-day .cell-number { margin: 0; font-size: 14px; color: var(--ink); }
.week-day.selected { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.week-hours { position: relative; }
.week-hours span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; font-weight: 500; color: var(--secondary); }
.week-hours span:first-child { transform: none; }
.week-col { position: relative; padding: 0; border: 0; border-left: .5px solid var(--separator); border-radius: 0; background-color: transparent; background-image: linear-gradient(to bottom, var(--separator) .5px, transparent .5px); background-size: 100% calc(100% / var(--hours)); }
.week-col.weekend { background-color: color-mix(in srgb, var(--ground) 40%, transparent); }
.week-col.off { background-color: var(--track); }
.week-col:hover { background-color: color-mix(in srgb, var(--ink) 4%, transparent); }
.week-col.selected { background-color: color-mix(in srgb, var(--ink) 6%, transparent); }
.week-col:focus-visible { outline-offset: -3px; border-radius: 0; }
.week-plan { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--grey) 30%, transparent); }
.week-work { position: absolute; left: 5px; right: 5px; padding: 3px 6px; overflow: hidden; border-radius: 6px; border-left: 3px solid var(--accent); background: color-mix(in srgb, var(--accent) 22%, var(--card)); color: var(--accent-text); font-size: 11px; line-height: 1.25; text-align: left; }
.table-card { overflow-x: auto; flex: none; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--secondary); border-bottom: .5px solid var(--separator); white-space: nowrap; }
.table td { padding: 8px 12px; border-bottom: .5px solid var(--separator); white-space: nowrap; }
.table th:first-child, .table td:first-child { padding-left: var(--card-pad); }
.table th:last-child, .table td:last-child { padding-right: var(--card-pad); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.wrap { white-space: normal; min-width: 140px; color: var(--secondary); }
.table td.wrap.accent-text { color: var(--accent-text); }
.table tbody tr[tabindex]:hover { background: var(--field); }
.table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.table tbody tr:focus-visible { outline-offset: -3px; border-radius: 0; }
.table tr.rest td { color: var(--secondary); }
.table tr.today td:first-child { color: var(--accent-text); font-weight: 600; }
.table tfoot td { font-weight: 600; border-bottom: 0; }
.chart-card .table td:first-child, .chart-card .table th:first-child { padding-left: 0; }
.chart-card .table td:last-child, .chart-card .table th:last-child { padding-right: 0; }
.search-results { display: flex; flex-direction: column; gap: 10px; }
.year { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: var(--block); }
.month-card { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; text-align: left; }
button.month-card:hover { background: color-mix(in srgb, var(--card) 93%, var(--ink)); }
.month-card.selected { box-shadow: inset 0 0 0 2px var(--ink); }
.month-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.month-card-head .number { font-size: 20px; }
.mini-month { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mini-month i, .year-key { aspect-ratio: 1; border-radius: 3px; background: var(--track); }
.mini-month i.blank { background: none; }
.mini-month i.worked, .year-key.worked { background: color-mix(in srgb, var(--ink) 70%, transparent); }
.mini-month i.over, .year-key.over { background: var(--accent); }
.mini-month i.absence, .year-key.absence { background: none; box-shadow: inset 0 0 0 1.5px var(--grey); }
.mini-month i.holiday, .year-key.holiday { background: var(--grey); }
.mini-month i.future { opacity: .5; }
.year-legend { grid-column: 1 / -1; }

/* Analisi: tabs over a grid of cards, two columns from 960 px of content */
.desk-scroll { padding-top: var(--page); }
.dash { max-width: 1320px; margin: 0 auto; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--block); container-type: inline-size; }
.dash > * { grid-column: 1 / -1; min-width: 0; }
@container (min-width: 960px) {
  .dash > .span-8 { grid-column: span 8; }
  .dash > .span-4 { grid-column: span 4; }
}
.issues { display: flex; flex-direction: column; gap: 8px; }
.chart-card { padding: var(--card-pad); display: flex; flex-direction: column; gap: var(--block); }
.chart-card-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 8px 16px; }
.chart-card-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chart-card-title h2 { font-size: 17px; font-weight: 600; }
.chart-card-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.chart-note { font-size: 14px; }
.view-intro { font-size: 14px; max-width: 72ch; }
.analysis-issues { align-items: center; border: 0; background: var(--card); color: var(--ink); }
.analysis-issues.fix { background: var(--accent-soft); color: var(--accent-text); }
.analysis-issues-text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.deltas { display: flex; flex-direction: column; }
.delta { display: grid; grid-template-columns: 1fr auto 96px; align-items: baseline; gap: 12px; padding: 8px 0; border-bottom: .5px solid var(--separator); font-size: 14px; }
.delta .number { text-align: right; }
.delta-change { font-size: 14px; }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar { display: flex; flex-direction: column; gap: 6px; }
.hbar-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; min-width: 0; }
.hbar-value { font-size: 14px; color: var(--secondary); white-space: nowrap; }
.hbar-track { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; }
.hbar-fill { display: block; height: 100%; background: var(--ink); border-radius: 4px; }
/* The balance grows with its row: beside a taller «Rispetto a prima» the plot fills the card, no empty space under it. */
.chart-card > .chart:has(> .lc) { flex: 1; }
.lc { flex: 1; display: grid; grid-template-columns: 56px minmax(0, 1fr); grid-template-rows: minmax(220px, 1fr) 22px; }
.lc-y, .lc-plot, .lc-x { position: relative; }
.lc-y span { position: absolute; right: 10px; transform: translateY(-50%); font-size: 11px; font-weight: 500; color: var(--secondary); white-space: nowrap; }
.lc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc .grid { stroke: var(--separator); stroke-width: 1; }
.lc .zero { stroke: var(--secondary); stroke-width: 1.5; }
.lc .solid { fill: none; stroke: var(--ink); stroke-width: 2.5; stroke-linejoin: round; }
.lc .dashed { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-dasharray: 6 5; }
.lc-x { grid-column: 2; }
.lc-x span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: var(--secondary); white-space: nowrap; }
.lc-x span.start { transform: none; } .lc-x span.end { transform: translateX(-100%); }
.lc-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--tertiary); pointer-events: none; }
.lc-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--ink); transform: translate(-50%, -50%); pointer-events: none; }
.lc-dot.projected { border-color: var(--accent); }
.lc-tip { position: absolute; top: 4px; z-index: 2; transform: translateX(-50%); display: flex; flex-direction: column; padding: 6px 10px; border-radius: 8px; background: var(--card); border: .5px solid var(--separator); box-shadow: var(--shadow); font-size: 12px; white-space: nowrap; pointer-events: none; }
.lc-tip.start { transform: translateX(10px); } .lc-tip.end { transform: translateX(calc(-100% - 10px)); }
.legend i.accent-line { border-top-color: var(--accent); }
.legend i.zero-key { height: 0; border-top: 1.5px solid var(--secondary); border-radius: 0; }

/* The four sections in the window's title bar (default; Profilo › Generali can bring the sidebar back) */
.shell.top-nav { flex-direction: column; }
.shell.top-nav .content { flex: 1; height: auto; min-height: 0; }
.titlebar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; min-height: 48px; padding: 8px 14px; border-bottom: .5px solid var(--separator); background: color-mix(in srgb, var(--ground) 82%, var(--card)); flex: none; }
.titlebar.mac { padding-left: 84px; }
.titlebar-nav { display: flex; gap: 2px; padding: 2px; border-radius: 9px; background: var(--track); -webkit-app-region: no-drag; }
.titlebar-nav button { border: 0; background: none; display: flex; align-items: center; gap: 7px; min-height: 28px; padding: 3px 14px; border-radius: 7px; font-weight: 500; color: var(--secondary); white-space: nowrap; }
.titlebar-nav button:hover { color: var(--ink); }
.titlebar-nav button.on { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.titlebar-end { display: flex; justify-content: flex-end; align-items: center; gap: 10px; -webkit-app-region: no-drag; }
.titlebar-today { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.titlebar-end .btn.small { min-height: 28px; padding: 4px 12px; font-size: 13px; }
@media (max-width: 900px) { .titlebar-nav span { display: none; } .titlebar-nav button { padding: 3px 12px; } }
.toolbar .header-button { width: 32px; height: 32px; }
.toolbar .btn.small { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.today-page { padding-top: var(--page); }

/* Profilo: the list on the left, the chosen page on the right */
.prefs { flex: 1; min-height: 0; display: grid; grid-template-columns: 270px minmax(0, 1fr); }
.prefs-list { overflow: auto; padding: 14px 10px 24px; display: flex; flex-direction: column; gap: 1px; border-right: .5px solid var(--separator); background: color-mix(in srgb, var(--ground) 82%, var(--card)); }
.prefs-list button { flex: none; border: 0; background: none; display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 6px 10px; border-radius: 8px; text-align: left; font-size: 15px; font-weight: 500; }
.prefs-list button:hover { background: var(--field); }
.prefs-list button.on { background: var(--accent); color: #fff; }
.prefs-list button.on .icon, .prefs-list button.on .secondary { color: #fff; }
.prefs-list .prefs-person { min-height: 52px; padding: 6px 10px; margin-bottom: 2px; }
.prefs-list .prefs-person .avatar { width: 40px; height: 40px; font-size: 15px; font-weight: 700; }
.avatar.empty { background: none; border: 2px dashed var(--accent-text); box-sizing: border-box; }
.prefs-group { font-size: calc(13px * var(--sub, 1)); font-weight: 600; color: var(--secondary); padding: 12px 10px 4px; }
.prefs-foot { padding: 16px 10px 0; }
.prefs-pane { min-width: 0; min-height: 0; position: relative; }
.page.in-pane .page-bar { grid-template-columns: auto minmax(0, 1fr) auto; border-bottom: 0; background: none; padding: 18px var(--page) 4px; min-height: 0; }
.page.in-pane .page-bar h2 { font: 700 24px/1.2 ui-rounded, -apple-system, 'Segoe UI Variable Display', 'Segoe UI', sans-serif; letter-spacing: -.3px; text-align: left; }
@media (max-width: 900px) { .prefs { grid-template-columns: 220px minmax(0, 1fr); } }
