/* BandManager — stile */
:root {
  --bg: #f6f7fb; --surface: #ffffff; --surface-2: #f9fafc; --border: #e4e6ef; --border-strong: #cfd3e1;
  --text: #1b1d2a; --text-2: #4b5068; --muted: #6b7088;
  --primary: #4338ca; --primary-600: #3730a3; --primary-50: #eef0ff;
  --danger: #c62828; --success: #15803d; --warning: #b45309;
  --radius: 10px; --radius-sm: 7px; --shadow: 0 1px 2px rgba(20, 22, 50, .06), 0 1px 1px rgba(20, 22, 50, .03);
  --shadow-lg: 0 18px 50px rgba(20, 22, 50, .2);
  --sidebar: 236px; --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 14px/1.5 var(--font); color: var(--text); background: var(--bg); }
body.no-scroll { overflow: hidden; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 15px; margin: 0; }
h3 { font-size: 14px; margin: 0 0 8px; }
p { margin: 0 0 8px; }
code { background: #eef0f6; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 999; border-radius: 6px; }
.skip-link:focus { left: 8px; }
.boot { padding: 40px; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 14px; } .mb { margin-bottom: 14px; }
.pad { padding: 16px; } .pad-x { padding: 0 14px 10px; } .pad-l { padding-left: 8px; }
.strike { text-decoration: line-through; color: var(--muted); }
.text-red { color: var(--danger); } .text-green { color: var(--success); } .text-amber { color: var(--warning); } .text-blue { color: #1d4ed8; }
.only-mobile { display: none !important; }
.pre, pre { white-space: pre-wrap; font: 13px/1.55 var(--font); margin: 0; }

/* ── Layout ── */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); background: #17183b; color: #c9cbe6; display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; z-index: 40; }
.brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg, #6366f1, #4338ca); display: grid; place-items: center; color: #fff; }
.brand-name { font-weight: 700; color: #fff; line-height: 1.2; }
.brand-sub { font-size: 11.5px; opacity: .7; }
.brand.big { margin-bottom: 18px; padding: 0; }
.brand.big .brand-name { color: var(--text); font-size: 17px; }
.brand.big .brand-sub { color: var(--muted); opacity: 1; }
.nav { flex: 1; overflow-y: auto; padding: 6px 10px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: #c9cbe6; margin-bottom: 2px; font-weight: 500; }
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; text-decoration: none; }
.nav-item.active { background: rgba(129, 140, 248, .22); color: #fff; }
.nav-count { margin-left: auto; background: #6366f1; color: #fff; border-radius: 10px; padding: 0 7px; font-size: 11.5px; }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; color: inherit; }
.me:hover { text-decoration: none; }
.me-name { color: #fff; font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-role { font-size: 11.5px; opacity: .7; }
.sidebar .icon-btn { color: #c9cbe6; }
.content { flex: 1; margin-left: var(--sidebar); min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 10px 24px; background: rgba(246, 247, 251, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.search-trigger { flex: 1; max-width: 520px; display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--muted); font: inherit; cursor: pointer; text-align: left; }
.search-trigger span { flex: 1; }
.search-trigger kbd { font: 11px var(--font); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.notif-btn { position: relative; }
.notif-count { position: absolute; top: 0; right: 0; background: var(--danger); color: #fff; font-size: 10.5px; border-radius: 9px; padding: 0 5px; line-height: 16px; }
.main { padding: 22px 24px 60px; max-width: 1440px; width: 100%; outline: none; }
.sidebar-overlay { display: none; }
.mobile-nav { display: none; }

/* ── Componenti ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 13px; border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font: 500 13.5px var(--font); cursor: pointer; white-space: nowrap; min-height: 36px; text-decoration: none; }
.btn:hover { background: var(--surface-2); text-decoration: none; border-color: #b8bdd0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.loading { position: relative; color: transparent !important; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: var(--primary) transparent var(--primary) transparent; border-radius: 50%; animation: spin .8s linear infinite; }
.btn-primary.loading::after { border-color: #fff transparent #fff transparent; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #a61f1f; }
.btn-danger-ghost { color: var(--danger); }
.btn-sm { padding: 4px 10px; min-height: 30px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.btn-col { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; border: 0; background: transparent; color: var(--text-2); cursor: pointer; flex: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.link { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 16px; }
.card > .card-head, section.card > .card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-head h2, .card-head h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
section.card > :not(.card-head):not(.table-wrap):not(.list-item):not(.messages):not(ul):not(.empty):not(.timeline):not(.musician-event):not(.progress) { margin-left: 16px; margin-right: 16px; }
section.card > .kv, section.card > p, section.card > .mini-stats, section.card > .readiness, section.card > details, section.card > .callout, section.card > .bars, section.card > .avail, section.card > .btn-row, section.card > .btn, section.card > .quote-totals, section.card > dl, section.card > .table { margin-top: 12px; margin-bottom: 12px; }
section.card > .progress { margin: 12px 16px; }
.card-more { display: block; text-align: center; padding: 10px; border-top: 1px solid var(--border); }
.muted-card { opacity: .75; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-flex; align-items: center; gap: 2px; font-size: 13px; margin-bottom: 4px; color: var(--muted); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 19px; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--ring, transparent); }
.badge-strong { font-weight: 700; letter-spacing: .02em; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; background: #c5c8d6; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; font-size: 12px; font-weight: 700; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font-size: 12px; cursor: pointer; color: var(--text-2); font-family: inherit; margin: 2px; }
.chip:hover { border-color: var(--primary); color: var(--primary); }

/* Toni */
.tone-gray { background: #f1f2f6; color: #4b5068; --ring: #e1e3ec; }
.tone-slate { background: #eef1f5; color: #475569; --ring: #dbe1ea; }
.tone-blue { background: #eaf2ff; color: #1d4ed8; --ring: #c9dcff; }
.tone-indigo { background: #eef0ff; color: #4338ca; --ring: #d6dafe; }
.tone-violet { background: #f4efff; color: #6d28d9; --ring: #e2d6fe; }
.tone-cyan { background: #e6f8fb; color: #0e7490; --ring: #bfeaf2; }
.tone-amber { background: #fff7e6; color: #92400e; --ring: #fde4b0; }
.tone-orange { background: #fff1e8; color: #c2410c; --ring: #fed7bf; }
.tone-green { background: #ebf9ef; color: #15803d; --ring: #c6ecd3; }
.tone-emerald { background: #e7f8f1; color: #047857; --ring: #bfeedc; }
.tone-red { background: #fdeeee; color: #b91c1c; --ring: #f8cfcf; }
.tone-dot-gray, .tone-dot-slate { background: #94a3b8; } .tone-dot-blue { background: #3b82f6; } .tone-dot-indigo { background: #6366f1; } .tone-dot-violet { background: #8b5cf6; }
.tone-dot-cyan { background: #06b6d4; } .tone-dot-amber { background: #f59e0b; } .tone-dot-orange { background: #f97316; } .tone-dot-green { background: #16a34a; } .tone-dot-emerald { background: #059669; } .tone-dot-red { background: #ef4444; }
.tone-bg-green { background: #16a34a; } .tone-bg-amber { background: #f59e0b; } .tone-bg-red { background: #ef4444; }
.callout { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border-radius: 8px; margin: 0 0 12px; box-shadow: inset 0 0 0 1px var(--ring); }
.callout .icon { margin-top: 1px; }

/* Stat */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stats .card { margin: 0; }
.stat { padding: 12px 14px; display: block; color: inherit; }
a.stat:hover { text-decoration: none; border-color: var(--primary); }
.stat-label { font-size: 12px; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 21px; font-weight: 700; letter-spacing: -.01em; margin-top: 2px; }
.stat-sub { font-size: 11.5px; color: var(--muted); }
.small-stats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.mini-stats > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; }
.mini-stats span { display: block; font-size: 11.5px; color: var(--muted); }
.mini-stats b { font-size: 15px; }
.progress { height: 7px; background: #eceef4; border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 99px; transition: width .3s; }

/* Dashboard */
.dash-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dash-grid .card { margin: 0; }
.todo-list, .simple-list, .busy-list, .notif-list, .thread-list, .pay-list, .task-mini, .checklist, .live-lineup { list-style: none; margin: 0; padding: 0; }
.todo { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.todo:hover { background: var(--surface-2); text-decoration: none; }
.todo .icon { color: var(--muted); width: 16px; }
.todo-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.prio-1 .todo-dot { background: #ef4444; } .prio-2 .todo-dot { background: #f59e0b; } .prio-3 .todo-dot { background: #94a3b8; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); color: var(--text); }
.list-item:hover { background: var(--surface-2); text-decoration: none; }
.li-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.date-chip { width: 46px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 2px 0; background: var(--surface-2); line-height: 1.15; }
.date-chip span { display: block; font-size: 10.5px; color: var(--muted); text-transform: uppercase; }
.date-chip b { font-size: 17px; }
.readiness { padding: 10px 16px 4px; }
.readiness-head { margin-bottom: 6px; }
.checklist li { display: flex; align-items: center; gap: 8px; padding: 4px 0; flex-wrap: wrap; }
.checklist li.ok .icon { color: var(--success); }
.checklist li.ko .icon { color: var(--warning); }
.checklist li.ok a, .checklist li.ok span { color: var(--text-2); }
section.card > .checklist { margin: 8px 16px 12px; }
.simple-list li, .busy-list li { border-bottom: 1px solid var(--border); }
.simple-list li > a, .busy-list li > a, .simple-list li { display: flex; align-items: center; gap: 10px; padding: 8px 16px; color: var(--text); }
.simple-list li > a { padding: 0; flex: 1; }
.simple-list li:has(> a) { padding: 8px 16px; }
.simple-list li > a:hover, .busy-list li > a:hover { text-decoration: none; color: var(--primary); }
.busy-list li > a { padding: 7px 16px; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; padding: 10px 16px; font-size: 12px; color: var(--text-2); align-items: center; }
.legend > span { display: inline-flex; align-items: center; gap: 5px; }
.live-cta { display: flex; align-items: center; gap: 12px; padding: 16px; color: #fff; background: linear-gradient(120deg, #4338ca, #7c3aed); border: 0; }
.live-cta span { display: block; opacity: .85; font-size: 13px; }
.live-cta:hover { text-decoration: none; }
.musician-event { border-bottom: 1px solid var(--border); }
.musician-event .list-item { border: 0; }

/* Empty */
.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty-icon { width: 34px; height: 34px; color: #b8bdd0; margin-bottom: 6px; }
.empty-title { font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty .btn { margin-top: 10px; }
.empty.error .empty-icon { color: var(--danger); }

/* Tabelle */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: #f8f9ff; }
.table .num, .num { text-align: right; white-space: nowrap; }
.table.compact td, .table.compact th { padding: 6px 8px; }
.preview-table { max-height: 50vh; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }

/* Form */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field.inline { flex-direction: row; align-items: center; gap: 6px; margin: 0; }
.req { color: var(--danger); }
.input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); font: 14px var(--font); color: var(--text); background: #fff; min-height: 38px; }
textarea.input { resize: vertical; min-height: 64px; line-height: 1.45; }
.input:focus { outline: 2px solid rgba(67, 56, 202, .35); border-color: var(--primary); outline-offset: 0; }
.input[aria-invalid="true"] { border-color: var(--danger); background: #fff8f8; }
.input:disabled { background: var(--surface-2); color: var(--muted); }
.input-sm { min-height: 30px; padding: 3px 6px; font-size: 12.5px; width: auto; }
.input-affix { display: flex; align-items: center; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; padding-left: 10px; gap: 6px; }
.input-affix .input { border: 0; min-height: 36px; padding-left: 2px; }
.input-affix .input:focus { outline: none; }
.input-affix:focus-within { outline: 2px solid rgba(67, 56, 202, .35); border-color: var(--primary); }
.input-affix span, .input-affix .icon { color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.field-error { font-size: 12px; color: var(--danger); min-height: 0; }
.field-error:empty { display: none; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin: 4px 0 8px; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.form-grid { display: grid; gap: 0 14px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
.row-end { display: flex; gap: 10px; align-items: flex-end; }
.row-end .btn { margin-bottom: 12px; }
.details { margin: 4px 0 12px; }
.details summary { cursor: pointer; font-weight: 600; color: var(--text-2); padding: 6px 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.filters .input { width: auto; min-width: 160px; }
.search-inline { display: flex; gap: 10px; align-items: center; flex: 1; min-width: 220px; max-width: 420px; }
.seg { display: inline-flex; background: #eceef5; border-radius: 9px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg a { padding: 5px 11px; border-radius: 7px; color: var(--text-2); font-weight: 500; font-size: 13px; white-space: nowrap; }
.seg a:hover { text-decoration: none; color: var(--text); }
.seg a.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.switch { position: relative; display: inline-block; width: 38px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd0dd; border-radius: 22px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(16px); }
.switch input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: thin; }
.tab { padding: 9px 13px; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--primary); border-color: var(--primary); }
.tab-count { background: #e8eaf3; color: var(--text-2); border-radius: 9px; padding: 0 6px; font-size: 11px; margin-left: 3px; }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 220px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 50; }
.dropdown-menu.right, .topbar .dropdown-menu { left: auto; right: 0; }
.dropdown-menu button { display: flex; width: 100%; gap: 8px; align-items: center; padding: 8px 10px; border: 0; background: none; border-radius: 7px; font: 13.5px var(--font); color: var(--text); cursor: pointer; text-align: left; }
.dropdown-menu button:hover, .dropdown-menu button:focus { background: var(--primary-50); outline: none; }
.dropdown-menu .danger { color: var(--danger); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 17, 40, .45); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; animation: pop .15s; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-sm { max-width: 420px; } .modal-md { max-width: 620px; } .modal-lg { max-width: 820px; } .modal-xl { max-width: 1080px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 16px; }
.modal-body { padding: 16px 18px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.palette .input-affix { margin-bottom: 8px; }
.palette-list { list-style: none; margin: 0 0 8px; padding: 0; max-height: 55vh; overflow-y: auto; }
.palette-list li { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.palette-list li.sel, .palette-list li:hover { background: var(--primary-50); }
.pl-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-sub { color: var(--muted); font-size: 12.5px; margin-left: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }

/* Toast */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 10px; background: #1f2135; color: #fff; box-shadow: var(--shadow-lg); animation: pop .2s; transition: opacity .4s; }
.toast-error { background: #9f1c1c; }
.toast-success .icon { color: #86efac; }
.toast.out { opacity: 0; }

/* Auth */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(1200px 500px at 50% -10%, #e0e3ff, var(--bg)); }
.auth-card { background: #fff; border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px; width: 100%; max-width: 420px; }
.auth-card.wide { max-width: 860px; }
.auth-card h1 { margin-bottom: 16px; font-size: 20px; }
.auth-card .callout { margin-top: 16px; }
.setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.setup-grid .card { margin: 0; }

/* Evento */
.event-head h1 { font-size: 24px; }
.head-side { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.status-select { width: auto; font-weight: 600; }
.summary-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 14px; }
.summary-strip > div { background: #fff; padding: 10px 14px; display: flex; flex-direction: column; gap: 3px; }
.summary-strip span { font-size: 11.5px; color: var(--muted); }
.summary-strip small { color: var(--muted); }
.action-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.two-col > .card { margin: 0 0 16px; }
.col { min-width: 0; }
.kv { display: grid; grid-template-columns: minmax(130px, 34%) 1fr; margin: 0; }
.kv > div { display: contents; }
.kv dt { color: var(--muted); font-size: 12.5px; padding: 5px 10px 5px 0; border-bottom: 1px dashed #eef0f5; }
.kv dd { margin: 0; padding: 5px 0; border-bottom: 1px dashed #eef0f5; overflow-wrap: anywhere; }
.kv.compact dt, .kv.compact dd { padding: 3px 0; }
.avail { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); margin-bottom: 12px; }
.avail ul { margin: 0; padding-left: 18px; width: 100%; }
.avail-NOT_AVAILABLE { background: #fff6f6; border-color: #f8cfcf; }
.avail-POTENTIAL_CONFLICT { background: #fffbef; border-color: #fde4b0; }
.avail-AVAILABLE { background: #f3fcf6; border-color: #c6ecd3; }
.task-mini li { display: flex; align-items: center; gap: 8px; padding: 6px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.task-mini li .check { flex: 1; margin: 0; }
.task-mini li.done span { text-decoration: line-through; color: var(--muted); }
section.card > .task-mini { margin: 0; }
.pay-list li { display: flex; align-items: center; gap: 10px; padding: 9px 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.quote-totals { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; margin: 12px 0; }
.quote-totals > div { display: flex; gap: 20px; min-width: 240px; justify-content: space-between; }
.quote-totals .grand { font-size: 16px; border-top: 1px solid var(--border); padding-top: 4px; }
.quote-totals.inline { margin-right: 16px; }
.quote-table td { padding: 6px; }
.contract-preview { max-height: 70vh; overflow-y: auto; padding: 12px 16px; font-size: 12.8px; background: #fcfcfe; }
section.card > .contract-preview { margin: 0; }
.messages { display: flex; flex-direction: column; gap: 12px; padding: 4px 0; }
.msg { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; background: #fff; max-width: 92%; }
.msg.out { align-self: flex-end; background: #f6f6ff; border-color: #dcdffb; }
.msg.draft { border-style: dashed; border-color: #f2c26b; background: #fffcf3; }
.msg header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 4px; }
.msg-time { margin-left: auto; font-size: 12px; color: var(--muted); }
.msg-subject { font-weight: 600; margin-bottom: 6px; }
.msg-body { white-space: normal; overflow-wrap: anywhere; color: var(--text-2); }
.msg .btn-row { margin-top: 10px; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.email-preview .pre { background: var(--surface-2); padding: 12px; border-radius: 8px; }
.extract-flags { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; margin-bottom: 10px; }
.timeline { list-style: none; margin: 0; padding: 12px 16px; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: #eceef4; }
.timeline li:last-child::before { display: none; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 5px; flex: none; position: relative; z-index: 1; }
.tl-title { font-weight: 600; }
.tl-meta { font-size: 12.5px; color: var(--text-2); }
.meta-kv { margin-right: 8px; }
.tl-time { font-size: 12px; color: var(--muted); }
.vars { margin-top: 6px; }
.action-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 10px 0; }

/* Live */
.bare { min-height: 100vh; background: #0f1028; }
.live { max-width: 560px; margin: 0 auto; padding: 0 14px 40px; color: #eef0ff; font-size: 16px; }
.live-head { display: flex; gap: 10px; align-items: center; padding: 16px 0 10px; position: sticky; top: 0; background: #0f1028; z-index: 2; }
.live-head h1 { font-size: 21px; color: #fff; }
.live-back { color: #fff; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .08); }
.live-date { color: #a5a9d9; font-size: 13px; text-transform: capitalize; }
.live-block { background: #1b1d42; border-radius: 14px; padding: 14px 16px; margin-bottom: 12px; }
.live-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #a5a9d9; margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.live-big { font-size: 20px; font-weight: 700; color: #fff; }
.live-btn { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 10px; padding: 14px; border-radius: 12px; background: rgba(255, 255, 255, .1); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none !important; min-height: 52px; }
.live-btn.primary { background: #6366f1; }
.live-btn .icon { width: 22px; height: 22px; }
.live-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.live-times > div { background: #1b1d42; border-radius: 14px; padding: 12px 8px; text-align: center; display: flex; flex-direction: column; }
.live-times span { font-size: 11px; letter-spacing: .08em; color: #a5a9d9; }
.live-times b { font-size: 26px; color: #fff; }
.live-times small { color: #a5a9d9; }
.live-note { margin-top: 8px; color: #d4d6f5; }
.live-lineup li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.live-lineup span { color: #a5a9d9; width: 110px; font-size: 14px; }
.live-lineup b { flex: 1; color: #fff; }
.live-lineup a { color: #fff; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.live-setlist { font: 16px/1.7 var(--font); color: #fff; }
.live .badge { font-size: 11px; }

/* Pipeline */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; scroll-snap-type: x proximity; }
.kcol { flex: 0 0 264px; background: #eceef5; border-radius: 12px; padding: 10px; scroll-snap-align: start; }
.kcol header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 0 2px 8px; }
.kcol header b { font-size: 13px; }
.kcount { background: #fff; border-radius: 9px; padding: 0 7px; font-size: 11.5px; color: var(--text-2); }
.kval { width: 100%; font-size: 12px; color: var(--muted); }
.kcards { min-height: 60px; display: flex; flex-direction: column; gap: 8px; border-radius: 8px; transition: background .15s; }
.kcards.over { background: #dfe2fb; outline: 2px dashed #8b8ff0; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: var(--shadow); cursor: grab; }
.kcard.dragging { opacity: .5; }
.kc-title { font-weight: 600; color: var(--text); display: block; }
.kc-sub { font-size: 12.5px; color: var(--muted); }
.kc-meta { display: flex; gap: 8px; font-size: 12px; color: var(--text-2); margin: 6px 0; flex-wrap: wrap; }
.kc-meta .icon { width: 13px; height: 13px; }
.kc-foot { display: flex; align-items: center; gap: 8px; }
.kc-move { margin-left: auto; max-width: 110px; border: 1px solid var(--border); border-radius: 6px; font-size: 11.5px; background: var(--surface-2); }

/* Calendario */
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.cal-toolbar h2 { font-size: 17px; margin-left: 8px; }
.cal-month { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.cal-dow, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow div { padding: 8px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); text-align: center; }
.cal-cell { min-height: 108px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 4px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell.out { background: #fafbfd; }
.cal-cell.out .cal-day { color: #b7bccc; }
.cal-cell.today .cal-day { background: var(--primary); color: #fff; }
.cal-day { font-size: 12px; font-weight: 600; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.cal-ev { display: block; font-size: 11.5px; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: inherit; box-shadow: inset 3px 0 0 currentColor; }
.cal-ev:hover { text-decoration: none; filter: brightness(.96); }
.cal-block { font-size: 11px; color: #b91c1c; background: repeating-linear-gradient(45deg, #fff1f1, #fff1f1 4px, #ffe4e4 4px, #ffe4e4 8px); border-radius: 5px; padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 3px; align-items: center; }
.cal-block .icon { width: 11px; height: 11px; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-wday { background: #fff; border: 1px solid var(--border); border-radius: 10px; min-height: 260px; padding: 8px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cal-wday.today { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.cal-wday-head { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.cal-wday-head b { color: var(--text); font-size: 16px; }
.cal-wday .cal-ev { white-space: normal; }
.agenda-month { margin: 16px 0 8px; font-size: 15px; }

/* Inbox */
.inbox { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 16px; align-items: start; }
.inbox .card { margin: 0; }
.inbox-list { max-height: calc(100vh - 230px); overflow-y: auto; position: sticky; top: 70px; }
.inbox-tabs { margin-bottom: 12px; }
.thread { display: block; padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); border-left: 3px solid transparent; }
.thread:hover { background: var(--surface-2); text-decoration: none; }
.thread.active { background: var(--primary-50); border-left-color: var(--primary); }
.thread.unread .th-subj { font-weight: 700; color: var(--text); }
.th-top { display: flex; justify-content: space-between; gap: 8px; }
.th-subj { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.th-meta { display: flex; gap: 6px; align-items: center; margin-top: 4px; flex-wrap: wrap; }
.th-action { font-size: 12px; margin-top: 4px; display: flex; gap: 4px; align-items: center; }
.th-action .icon { width: 13px; height: 13px; }
.thread-detail { padding: 14px 16px; }
.td-head { border-bottom: 1px solid var(--border); padding-bottom: 12px; margin-bottom: 12px; }
.td-head h2 { font-size: 17px; margin-bottom: 4px; }
.td-links { margin-bottom: 10px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.td-links .icon { width: 15px; height: 15px; }
.lead-card { border-color: #c9dcff; box-shadow: 0 0 0 3px #eaf2ff; }
.lead-card .kv, .summary-card .kv { margin: 10px 16px; }
.lead-card .btn-row, .lead-card .avail, .lead-card .callout { margin-left: 16px; margin-right: 16px; }
.lead-card .btn-row { margin-bottom: 14px; }
.summary-card { border-color: #e2d6fe; }

/* Report */
.bars { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 92px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.bar-track { background: #eef0f6; border-radius: 4px; height: 14px; overflow: hidden; }
.bar { height: 100%; background: linear-gradient(90deg, #6366f1, #818cf8); border-radius: 4px; }
.bar-val { text-align: right; font-weight: 600; }

/* Impostazioni */
.settings-form { max-width: 860px; }
.settings-form h3 { margin-top: 10px; }
.tpl-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 16px; align-items: start; }
.tpl-list a { display: block; padding: 7px 16px; color: var(--text); border-left: 3px solid transparent; }
.tpl-list a.active { background: var(--primary-50); border-left-color: var(--primary); }
.tpl-list a:hover { text-decoration: none; background: var(--surface-2); }
.tpl-group { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 16px 4px; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 1180px) {
  .summary-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .inbox { grid-template-columns: 320px minmax(0, 1fr); }
}
@media (max-width: 980px) {
  .dash-grid, .two-col { grid-template-columns: minmax(0, 1fr); }
  .tpl-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-flex !important; }
  .only-desktop { display: none; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-overlay.open { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 35; }
  .content { margin-left: 0; }
  .topbar { padding: 8px 12px; }
  .search-trigger kbd, .search-trigger span { display: none; }
  .search-trigger { flex: 0 0 auto; padding: 8px; }
  .main { padding: 14px 12px 90px; }
  .hide-sm { display: none; }
  .mobile-nav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 30; background: #fff; border-top: 1px solid var(--border); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); }
  .mobile-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11px; color: var(--muted); padding: 5px 0; border-radius: 8px; }
  .mobile-nav a.active { color: var(--primary); background: var(--primary-50); }
  .mobile-nav a:hover { text-decoration: none; }
  .inbox { grid-template-columns: 1fr; }
  .inbox.has-sel .inbox-list { display: none; }
  .inbox:not(.has-sel) .inbox-detail { display: none; }
  .inbox-list { max-height: none; position: static; }
  .setup-grid { grid-template-columns: 1fr; }
  #toasts { left: 12px; right: 12px; bottom: 76px; max-width: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 19px; }
  .event-head h1 { font-size: 20px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-value { font-size: 18px; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid.cols-2, .form-grid.cols-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .row-end { flex-direction: column; align-items: stretch; }
  .filters .input, .search-inline { min-width: 0; max-width: none; width: 100%; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border: 0; padding-bottom: 0; }
  .modal-backdrop { padding: 0; align-items: end; }
  .modal { max-height: 94vh; border-radius: 16px 16px 0 0; max-width: none !important; }
  .page-head { flex-direction: column; }
  .action-bar .btn { flex: 1 1 calc(50% - 8px); }
  .cal-cell { min-height: 64px; padding: 2px; }
  .cal-ev { font-size: 10px; padding: 1px 3px; }
  .cal-block { font-size: 0; padding: 2px; height: 6px; }
  .cal-week { grid-template-columns: 1fr; }
  .cal-wday { min-height: 0; }
  .bar-row { grid-template-columns: 90px 1fr 70px; }
  .msg { max-width: 100%; }
  /* Tabelle a schede su mobile */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--border); padding: 8px 0; }
  .table td { border: 0; padding: 3px 12px; text-align: left !important; }
  .table td[data-label]:not([data-label=""])::before { content: attr(data-label); display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
  .quote-table td::before { display: none !important; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
@media print {
  .sidebar, .topbar, .mobile-nav, .action-bar, .btn, .tabs { display: none !important; }
  .content { margin: 0; }
  body { background: #fff; }
}
.search-inline .check { white-space: nowrap; margin: 0; }

/* ═════════════ Tema Lo Squadrone (nero · giallo · rosso) ═════════════ */
:root {
  --sq-yellow: #ffe500; --sq-yellow-600: #f2d500; --sq-red: #e30613; --sq-black: #0a0a0a;
  --primary: #0a0a0a; --primary-600: #000; --primary-50: #fff8c2;
  --bg: #f4f3ee; --border: #e3e1d8; --border-strong: #cbc8bb;
}
body { background: var(--bg); }
a { color: #a3000f; }
h1 { font-weight: 800; letter-spacing: -.015em; }
.page-head h1 { display: inline-block; box-shadow: inset 0 -.38em 0 var(--sq-yellow); padding: 0 .1em; }
.boot { display: grid; place-items: center; min-height: 100vh; background: #000; color: #ccc; text-align: center; }
.boot img { max-width: 80vw; height: auto; }

.btn-primary { background: var(--sq-yellow); border-color: var(--sq-black); color: var(--sq-black); font-weight: 700; }
.btn-primary:hover { background: var(--sq-yellow-600); border-color: #000; color: #000; }
.btn-primary.loading::after { border-color: #000 transparent #000 transparent; }
.btn-danger { background: var(--sq-red); border-color: var(--sq-red); }
.input:focus, .input-affix:focus-within { outline: 2px solid rgba(255, 229, 0, .9); border-color: #000; }
:focus-visible { outline: 2px solid #000; box-shadow: 0 0 0 4px var(--sq-yellow); }

.sidebar { background: #000; color: #d6d6d6; border-right: 3px solid var(--sq-yellow); }
.brand { padding: 12px 12px 6px; display: block; }
.brand-img { width: 100%; height: auto; display: block; border-radius: 6px; }
.nav-item { color: #d6d6d6; }
.nav-item:hover { background: rgba(255, 229, 0, .12); color: #fff; }
.nav-item.active { background: var(--sq-yellow); color: #000; font-weight: 700; }
.nav-item.active .icon { color: #000; }
.nav-count { background: var(--sq-red); }
.sidebar-foot { border-top-color: rgba(255, 229, 0, .25); }
.sidebar .avatar { background: var(--sq-yellow); color: #000; }
.topbar { background: rgba(244, 243, 238, .94); border-bottom: 3px solid #000; }
.notif-count { background: var(--sq-red); }
.net-status { display: inline-flex; gap: 6px; align-items: center; background: var(--sq-red); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.net-status[hidden] { display: none; }
.tab.active { color: #000; border-color: var(--sq-yellow); border-bottom-width: 3px; font-weight: 700; }
.seg a.active { background: var(--sq-yellow); color: #000; font-weight: 700; }
.mobile-nav { border-top: 3px solid #000; }
.mobile-nav a.active { color: #000; background: var(--sq-yellow); font-weight: 700; }
.dropdown-menu button:hover, .dropdown-menu button:focus { background: var(--primary-50); }
.thread.active { background: var(--primary-50); border-left-color: #000; }
.palette-list li.sel, .palette-list li:hover { background: var(--primary-50); }
.tpl-list a.active { background: var(--primary-50); border-left-color: #000; }
.cal-cell.today .cal-day { background: var(--sq-red); }
.cal-wday.today { border-color: var(--sq-red); box-shadow: 0 0 0 1px var(--sq-red); }
.kcards.over { background: #fff6b3; outline-color: #000; }
.bar { background: linear-gradient(90deg, #111, #444); }
.live-cta { background: linear-gradient(120deg, #000, #333); border: 2px solid var(--sq-yellow); }
.stat { border-top: 3px solid transparent; }
a.stat:hover { border-color: var(--border); border-top-color: var(--sq-yellow); }
.toast-success .icon { color: var(--sq-yellow); }
.toast { background: #000; border-left: 4px solid var(--sq-yellow); }
.toast-error { background: #7a0009; border-left-color: #fff; }

/* Accesso */
.auth-wrap { background: radial-gradient(900px 420px at 50% -5%, rgba(255, 229, 0, .25), #000 70%); }
.auth-card { border: 3px solid var(--sq-yellow); }
.auth-logo { width: 100%; max-width: 360px; display: block; margin: -8px auto 14px; border-radius: 8px; }
.auth-card h1 { text-align: center; }
.steps-list { padding-left: 20px; margin: 0 0 12px; }
.steps-list li { margin-bottom: 4px; }
.qr-box { display: grid; place-items: center; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; margin: 8px auto 10px; width: fit-content; }
.socio-row { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 12px; padding: 8px 12px 0; }
.socio-row legend { font-weight: 700; padding: 0 6px; }
.copy-box { display: flex; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sagra-card { border-color: #000; box-shadow: 0 0 0 3px var(--sq-yellow); }
section.card.sagra-card > .btn-row { margin: 12px 16px; }

/* Modalità live */
.bare, .live-head { background: #000; }
.live-block, .live-times > div { background: #161616; border: 1px solid #262626; }
.live-btn.primary { background: var(--sq-yellow); color: #000; }
.live-date, .live-label, .live-times span, .live-times small, .live-lineup span { color: #ffe97a; }

/* Modulo pubblico sagra */
body.public-form { background: #000; }
.pf-wrap { max-width: 760px; margin: 0 auto; padding: 16px 14px 40px; }
.pf-logo { width: 100%; max-width: 520px; display: block; margin: 0 auto 14px; }
.pf-card { background: #fff; border: 3px solid var(--sq-yellow); border-radius: 16px; padding: 22px; }
.pf-card fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px 2px; margin: 0 0 14px; }
.pf-card legend { font-weight: 800; padding: 0 6px; background: var(--sq-yellow); border-radius: 4px; }
.pf-foot { color: #aaa; font-size: 12px; text-align: center; margin-top: 12px; }
@media (max-width: 640px) { .pf-card { padding: 14px; } }
.topbar-logo img { height: 34px; width: auto; display: block; border-radius: 4px; }
.test-badge { background: var(--sq-red); color: #fff; font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; letter-spacing: .03em; white-space: nowrap; }

/* ── Chi suona ── */
.lu-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 0 10px; }
.lu-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px 3px 7px; border-radius: 999px; font-size: 12.5px; line-height: 20px; box-shadow: inset 0 0 0 1px var(--ring, transparent); }
.lu-chip .icon { width: 14px; height: 14px; }
.lu-chip b { font-weight: 700; text-transform: capitalize; }
.lu-row { border-bottom: 1px solid var(--border); }
.lu-row .list-item { border: 0; }
.lu-row .lu-chips { padding: 0 16px 12px 76px; }
@media (max-width: 640px) { .lu-row .lu-chips { padding-left: 16px; } }
.musician-event .lu-chips { padding-top: 0; }

/* ── Smistamento richieste ── */
.temp-badge { font-weight: 800; letter-spacing: .03em; }
.temp-badge.big { font-size: 14px; padding: 3px 12px; line-height: 22px; }
.th-top .temp-badge { margin-right: 6px; }
.triage-card { border-left: 5px solid var(--border); }
.triage-card.temp-hot { border-left-color: #e30613; }
.triage-card.temp-warm { border-left-color: #f59e0b; }
.triage-card.temp-cold { border-left-color: #3b82f6; }
.triage-card h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.triage-title { font-size: 14px; font-weight: 600; }
.seg.small-seg button, .seg.small-seg a { padding: 3px 9px; font-size: 12px; border: 0; background: none; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 600; font-family: inherit; }
.seg.small-seg .active { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.reasons { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 3px; }
.reasons li { display: flex; gap: 8px; align-items: baseline; font-size: 13px; }
.reasons .pts { min-width: 34px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-3, #888); }
.reasons li.plus .pts { color: #16a34a; }
.reasons li.minus .pts { color: #dc2626; }
.triage-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.triage-meta .btn-row { margin-top: 6px; }
@media (max-width: 760px) { .triage-meta { grid-template-columns: 1fr; } }
.avatar-xs { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; background: #111; color: #ffe500; font-size: 9.5px; font-weight: 700; margin-left: 4px; }

/* ── Area musicisti: Backstage ── */
.crew { max-width: 980px; }
.pass { position: relative; overflow: hidden; border-radius: 18px; margin-bottom: 16px; color: #fff; padding: 16px 18px 0;
  background: radial-gradient(120% 140% at 0% 0%, #2a2a2a 0%, #0a0a0a 55%), #0a0a0a; border: 2px solid var(--sq-yellow);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .55), 0 0 0 4px rgba(255, 229, 0, .12);
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .25s ease-out; animation: pass-in .55s cubic-bezier(.2, .9, .3, 1.2) both; }
.pass-holo { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: .55;
  background: radial-gradient(260px 200px at var(--mx, 80%) var(--my, 10%), rgba(255, 229, 0, .28), transparent 70%),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .10) 45%, rgba(255, 229, 0, .14) 50%, transparent 62%);
  background-size: 100% 100%, 250% 100%; animation: holo 6s linear infinite; }
@keyframes holo { from { background-position: 0 0, 130% 0; } to { background-position: 0 0, -130% 0; } }
@keyframes pass-in { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.pass-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.pass-logo { height: 34px; width: auto; border-radius: 4px; }
.pass-tag { font: 800 10.5px/1 var(--font); letter-spacing: .16em; color: #000; background: var(--sq-yellow); padding: 5px 9px; border-radius: 4px; }
.pass-main { display: flex; align-items: center; gap: 14px; margin: 14px 0 8px; position: relative; }
.pass-avatar { position: relative; width: 66px; height: 66px; flex: none; border-radius: 50%; display: grid; place-items: center; font: 900 24px var(--font); color: #000;
  background: conic-gradient(from 210deg, var(--sq-yellow), #fff59a, var(--sq-yellow), #ffb800, var(--sq-yellow)); box-shadow: 0 0 0 3px #000, 0 0 0 5px var(--sq-yellow); }
.pass-avatar span { position: absolute; right: -6px; bottom: -4px; font-size: 22px; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .6)); animation: wiggle 3.2s ease-in-out infinite; }
@keyframes wiggle { 0%, 86%, 100% { transform: rotate(0); } 90% { transform: rotate(-14deg); } 95% { transform: rotate(12deg); } }
.pass-hello { color: var(--sq-yellow); font-weight: 700; font-size: 13px; }
.pass-name { font: 900 24px/1.1 var(--font); letter-spacing: -.02em; text-transform: uppercase; }
.pass-role { margin-top: 4px; color: #ddd; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pass-badge { font: 800 10.5px/1 var(--font); letter-spacing: .12em; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--sq-yellow); color: var(--sq-yellow); }
.pass-badge.gold { color: #000; border: 0; background: linear-gradient(90deg, #ffb800, #ffe500, #fff6a0, #ffe500, #ffb800); background-size: 200% 100%; animation: gold 3s linear infinite; }
@keyframes gold { to { background-position: -200% 0; } }
.pass-no { text-align: right; font: 900 22px/1 var(--font); color: var(--sq-yellow); }
.pass-no span { display: block; font-size: 10px; letter-spacing: .2em; color: #999; margin-bottom: 3px; }
.pass-tag-no { display: none; }
@media (max-width: 640px) { .pass-tag-no { display: inline; } }
.pass-sub { position: relative; color: #f5f0c0; margin: 0 0 6px; font-size: 13.5px; }
.pass-next { position: relative; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 10px -18px 0; padding: 12px 18px; background: rgba(255, 229, 0, .08); border-top: 1px dashed rgba(255, 229, 0, .45); }
.pass-next span { display: block; font: 800 10.5px var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--sq-yellow); }
.pass-next b { display: block; font-size: 16px; }
.pass-next small { color: #bbb; }
.pass-next.empty b { font-size: 14px; font-weight: 600; color: #fff; }
.cd { display: flex; gap: 6px; }
.cd > div { min-width: 52px; text-align: center; background: #000; border: 1px solid #333; border-radius: 10px; padding: 6px 4px 4px; }
.cd b { display: block; font: 900 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--sq-yellow); }
.cd b.tick { animation: tick .35s ease-out; }
@keyframes tick { from { transform: translateY(-6px); opacity: .2; } }
.cd span { font-size: 9.5px !important; color: #999 !important; letter-spacing: .1em !important; }
.cd-live { font: 900 20px var(--font); color: var(--sq-yellow); animation: pulse 1s ease-in-out infinite alternate; }
.pass-strip { height: 10px; margin: 0 -18px; background: repeating-linear-gradient(90deg, var(--sq-yellow) 0 14px, #000 14px 28px); }

.crew-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.cs { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px; text-align: center; box-shadow: var(--shadow); transition: transform .15s; animation: rise .5s both; }
.cs:nth-child(2) { animation-delay: .06s; } .cs:nth-child(3) { animation-delay: .12s; } .cs:nth-child(4) { animation-delay: .18s; }
.cs:hover { transform: translateY(-2px); }
.cs-e { font-size: 22px; display: block; }
.cs b { display: block; font: 900 28px/1.1 var(--font); }
.cs > span:last-child { font-size: 12px; color: var(--muted); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

.welcome { display: flex; gap: 14px; align-items: flex-start; padding: 16px; margin-bottom: 16px; border-radius: 16px; background: linear-gradient(135deg, #fff9c4, #ffe500); border: 2px solid #000; animation: rise .5s both; transition: opacity .3s, transform .3s; }
.welcome.bye { opacity: 0; transform: scale(.97); }
.welcome h2 { font-size: 18px; margin-bottom: 4px; }
.welcome ol { margin: 6px 0 12px; padding-left: 20px; }
.welcome-e { font-size: 38px; animation: wiggle 2.4s ease-in-out infinite; }

.ask-card { border: 2px solid var(--sq-red); }
.pulse-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--sq-red); margin-left: 4px; vertical-align: middle; animation: pulse 1s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .35; transform: scale(.85); } to { opacity: 1; transform: scale(1.1); } }
.tickets { display: grid; gap: 10px; padding: 12px 0; }
.ticket { display: flex; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); overflow: hidden; transition: transform .15s, box-shadow .15s; animation: rise .4s both; }
.ticket:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -12px rgba(0, 0, 0, .35); }
.ticket-stub { flex: none; width: 66px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; color: #fff; position: relative; line-height: 1.1; text-transform: uppercase; }
.ticket-stub:hover { text-decoration: none; }
.ticket-stub::after { content: ""; position: absolute; right: -1px; top: 6px; bottom: 6px; border-right: 2px dashed var(--surface); }
.ticket-stub span { font-size: 10.5px; color: var(--sq-yellow); font-weight: 700; letter-spacing: .06em; }
.ticket-stub b { font: 900 26px/1 var(--font); }
.ticket.yes .ticket-stub { background: var(--sq-yellow); color: #000; } .ticket.yes .ticket-stub span { color: #000; }
.ticket.no { opacity: .7; } .ticket.no .ticket-stub { background: #777; }
.ticket.ask { border-color: var(--sq-red); box-shadow: 0 0 0 3px rgba(227, 6, 19, .08); }
.ticket.ask .ticket-stub { background: var(--sq-red); } .ticket.ask .ticket-stub span { color: #fff; }
.ticket-body { flex: 1; min-width: 0; padding: 10px 12px 10px 14px; }
.ticket-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ticket-title { font-weight: 800; font-size: 15px; color: var(--text); }
.ticket-state { flex: none; font: 800 11px/1 var(--font); padding: 5px 8px; border-radius: 999px; background: #f1f1ec; }
.ticket.yes .ticket-state { background: #000; color: var(--sq-yellow); }
.ticket.ask .ticket-state { background: var(--sq-red); color: #fff; animation: pulse 1s ease-in-out infinite alternate; }
.ticket-sub { color: var(--muted); font-size: 12.5px; margin: 2px 0 4px; }
.ticket .lu-chips { padding: 2px 0 6px; }
.ticket-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.btn-yes, .btn-no { font: 800 14px var(--font); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: transform .12s, background .15s; border: 2px solid #000; }
.btn-yes { background: var(--sq-yellow); color: #000; }
.btn-yes:hover { transform: scale(1.04); }
.btn-yes:active, .btn-no:active { transform: scale(.94); }
.btn-yes.on { background: #000; color: var(--sq-yellow); box-shadow: 0 0 0 3px var(--sq-yellow); }
.btn-no { background: #fff; color: #333; border-color: #bbb; font-weight: 700; }
.btn-no.on { background: #555; color: #fff; border-color: #555; }
.btn-yes.loading, .btn-no.loading { opacity: .6; }

/* Calendario personale */
.mycal { scroll-margin-top: 70px; transition: box-shadow .4s; }
.mycal.glow { box-shadow: 0 0 0 4px var(--sq-yellow), 0 12px 30px -10px rgba(0, 0, 0, .4); }
.mycal-fixed { margin-top: 14px; }
.mycal-label { font-size: 13px; margin-bottom: 6px; }
.wd-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.wd-pill { min-width: 46px; padding: 8px 10px; border-radius: 999px; border: 2px solid #000; background: #fff; font: 800 13px var(--font); cursor: pointer; transition: transform .12s, background .15s; }
.wd-pill:hover { transform: translateY(-1px); }
.wd-pill.on { background: repeating-linear-gradient(135deg, #e30613 0 6px, #b8000c 6px 12px); color: #fff; border-color: #7a0009; }
.mycal-body { margin-top: 14px; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.mycal-body.slide-l .mc-grid { animation: slide-l .28s ease-out; } .mycal-body.slide-r .mc-grid { animation: slide-r .28s ease-out; }
@keyframes slide-l { from { opacity: 0; transform: translateX(28px); } } @keyframes slide-r { from { opacity: 0; transform: translateX(-28px); } }
.mc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.mc-title { text-align: center; } .mc-title b { display: block; font-size: 17px; } .mc-title span { font-size: 12px; color: var(--muted); }
.mc-dow, .mc-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.mc-dow span { text-align: center; font: 800 11px var(--font); color: var(--muted); }
.mc-grid { margin-top: 4px; }
.mc-cell { position: relative; aspect-ratio: 1 / 1; min-height: 40px; max-height: 76px; border-radius: 10px; border: 1.5px solid var(--border-strong); background: #fff; cursor: pointer; padding: 4px; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; font: inherit; color: var(--text); transition: transform .1s, background .15s; touch-action: manipulation; }
.mc-cell:hover:not(:disabled) { border-color: #000; transform: translateY(-1px); }
.mc-cell:active:not(:disabled) { transform: scale(.92); }
.mc-n { font-weight: 800; font-size: 13px; line-height: 1; }
.mc-mark { align-self: flex-end; font-weight: 900; font-size: 14px; line-height: 1; }
.mc-cell.out { opacity: .4; }
.mc-cell.past { background: #f3f3f0; color: #aaa; cursor: default; border-color: transparent; }
.mc-cell.today { box-shadow: 0 0 0 2px #000; }
.mc-cell.off { background: var(--sq-red); color: #fff; border-color: #a3000f; }
.mc-cell.weekly { background: repeating-linear-gradient(135deg, #e30613 0 6px, #c4000f 6px 12px); color: #fff; border-color: #a3000f; }
.mc-cell.exception { border: 2px solid #15803d; } .mc-cell.exception .mc-mark { color: #15803d; }
.mc-cell.band .mc-mark { color: #000; font-size: 18px; }
.mc-cell.gig { background: var(--sq-yellow); border-color: #000; color: #000; }
.mc-cell.gig .mc-mark { animation: wiggle 2.6s ease-in-out infinite; }
.mc-cell.ask { border: 2px dashed var(--sq-red); } .mc-cell.ask .mc-mark { color: var(--sq-red); }
.mc-cell.past.off, .mc-cell.past.weekly, .mc-cell.past.gig { opacity: .45; }
.mc-cell.pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.5); }
@keyframes pop { 0% { transform: scale(.7); } 100% { transform: scale(1); } }
.painting .mc-cell { cursor: crosshair; }
.mc-cell.paint { transform: scale(.9); }
.mc-cell.paint-off { background: var(--sq-red); color: #fff; } .mc-cell.paint-free { background: #fff; color: var(--text); border-color: #15803d; }
.mc-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); margin-top: 10px; }
.mc-legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { width: 13px; height: 13px; border-radius: 4px; border: 1.5px solid var(--border-strong); display: inline-block; }
.lg.off { background: var(--sq-red); border-color: #a3000f; } .lg.weekly { background: repeating-linear-gradient(135deg, #e30613 0 3px, #9a000b 3px 6px); border-color: #a3000f; }
.lg.gig { background: var(--sq-yellow); border-color: #000; } .lg.ask { border: 1.5px dashed var(--sq-red); }
.mycal-hint { font-size: 12.5px; color: var(--text-2); }
.mycal-foot { margin-bottom: 4px; }
.periods { list-style: none; margin: 4px 16px 14px; padding: 0; display: grid; gap: 6px; }
.periods li { display: flex; align-items: center; gap: 10px; padding: 6px 4px 6px 10px; border-radius: 10px; background: #fff3f3; border: 1px solid #f5c2c5; }
.wd-pill.pop { animation: pop .35s cubic-bezier(.2, .9, .3, 1.5); }

/* Traguardi */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; padding: 12px 0 14px; }
.bdg { border: 1px solid var(--border); border-radius: 12px; padding: 10px 8px; text-align: center; background: #fafaf7; filter: grayscale(1); opacity: .75; }
.bdg b { display: block; font-size: 12.5px; line-height: 1.2; margin-top: 2px; }
.bdg small { display: block; font-size: 11px; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.bdg-e { font-size: 26px; display: block; }
.bdg.done { filter: none; opacity: 1; background: linear-gradient(160deg, #fffbe0, #fff); border: 2px solid var(--sq-yellow); box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .5); }
.bdg.done .bdg-e { animation: wiggle 4s ease-in-out infinite; }
.bdg-bar { height: 5px; border-radius: 4px; background: #e6e6e0; margin: 6px 4px 2px; overflow: hidden; }
.bdg-bar i { display: block; height: 100%; background: #000; border-radius: 4px; }

/* La Squadra */
.crew-label { font: 800 11px var(--font); text-transform: uppercase; letter-spacing: .12em; margin-top: 12px; }
.crew-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-top: 6px; margin-bottom: 12px; }
.crew-m { text-align: center; padding: 8px 4px; border-radius: 12px; transition: transform .15s, background .15s; }
.crew-m:hover { transform: translateY(-2px); background: #fafaf3; }
.crew-av { position: relative; display: inline-grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #111; color: #fff; font: 800 16px var(--font); box-shadow: 0 0 0 2px #ddd; }
.crew-av i { position: absolute; right: -6px; bottom: -4px; font-style: normal; font-size: 18px; }
.crew-m.on .crew-av { box-shadow: 0 0 0 3px var(--sq-yellow), 0 0 14px rgba(255, 229, 0, .9); }
.crew-m.is-me .crew-av { background: var(--sq-yellow); color: #000; }
.crew-m b { display: block; font-size: 12.5px; margin-top: 4px; }
.crew-m small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crew-next { margin-top: 12px; padding: 8px 12px; border-radius: 10px; background: #000; color: #fff; font-size: 13px; }
.crew-next b { color: var(--sq-yellow); }
canvas.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 9999; }
.cal-block.weekly { opacity: .75; font-style: italic; }

@media (max-width: 640px) {
  .pass { padding: 14px 14px 0; border-radius: 16px; }
  .pass-name { font-size: 20px; }
  .pass-avatar { width: 56px; height: 56px; font-size: 20px; }
  .pass-no { display: none; }
  .pass-name { word-break: break-word; }
  .wd-pills { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .wd-pill { min-width: 0; padding: 8px 0; font-size: 12px; }
  .pass-next { margin: 10px -14px 0; padding: 12px 14px; }
  .pass-strip { margin: 0 -14px; }
  .cd { width: 100%; } .cd > div { flex: 1; min-width: 0; }
  .crew-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mc-dow, .mc-grid { gap: 3px; }
  .mc-cell { border-radius: 8px; padding: 3px; min-height: 38px; }
  .mc-n { font-size: 12px; }
  .ticket-stub { width: 58px; }
  .btn-yes, .btn-no { flex: 1; padding: 11px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .pass, .pass-holo, .pass-avatar span, .pass-badge.gold, .cs, .welcome, .welcome-e, .ticket, .ticket.ask .ticket-state, .pulse-dot, .mc-cell.gig .mc-mark, .bdg.done .bdg-e, .cd-live { animation: none !important; }
  .pass { transform: none; }
}

/* ── Percorso della richiesta ── */
.flow-card { border: 2px solid #000; }
.flow-steps { list-style: none; display: flex; gap: 4px; margin: 12px 16px 6px; padding: 0; counter-reset: s; overflow-x: auto; }
.flow-steps li { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; font-size: 11.5px; color: var(--muted); position: relative; }
.flow-steps li::before { content: ""; position: absolute; top: 13px; left: -50%; right: 50%; height: 3px; background: var(--border-strong); z-index: 0; }
.flow-steps li:first-child::before { display: none; }
.flow-steps li span { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: #fff; border: 2px solid var(--border-strong); color: var(--muted); }
.flow-steps li.done { color: var(--text); } .flow-steps li.done span { background: #000; border-color: #000; color: var(--sq-yellow); }
.flow-steps li.done::before, .flow-steps li.cur::before { background: #000; }
.flow-steps li.cur { color: #000; font-weight: 800; } .flow-steps li.cur span { background: var(--sq-yellow); border-color: #000; color: #000; box-shadow: 0 0 0 4px rgba(255, 229, 0, .35); }
.flow-steps li.lost span { background: #777; border-color: #777; color: #fff; }
.flow-body { margin: 8px 16px; }
.flow-body .kv { margin-top: 6px; }
.flow-btns { margin: 4px 16px 14px; flex-wrap: wrap; }
.client-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; margin-bottom: 14px; border: 1px solid var(--border); background: var(--surface); }
.client-status.st-prospect { background: #fff8db; border-color: #f2d500; } .client-status.st-client { background: #ecfdf3; border-color: #a7e3bd; }
.badge.big { font-size: 13px; padding: 4px 10px; }
.sec-score { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; margin-bottom: 12px; color: #fff; }
.sec-score b { font: 900 30px var(--font); } .sec-score.bad { background: #a3000f; } .sec-score.mid { background: #b45309; } .sec-score.good { background: #15803d; }
.sec-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sec-list li { display: flex; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); }
.sec-list li.lv-critical { border-color: #f5a3a9; background: #fff4f4; } .sec-list li.lv-important { border-color: #f6d28b; background: #fffaf0; }
.sec-list .sec-i { font-size: 18px; }
a.chip { text-decoration: none; color: inherit; } a.chip:hover { background: var(--sq-yellow); }

/* ── Foto dei musicisti ── */
.face { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; flex: none; background: #111; color: #fff; font-weight: 800; font-size: 13px; }
.face.sm { width: 32px; height: 32px; font-size: 11px; }
.name-face { display: inline-flex; align-items: center; gap: 10px; }
.pass-avatar.has-photo { padding: 0; overflow: visible; }
.pass-avatar.has-photo .face { width: 100%; height: 100%; border: 3px solid #000; }
.crew-av.has-photo { background: #000; }
.crew-av.has-photo .face { width: 100%; height: 100%; }
.crew-no { position: absolute; left: -6px; top: -4px; font: 900 10.5px/1 var(--font); font-style: normal; background: var(--sq-yellow); color: #000; border: 1.5px solid #000; border-radius: 6px; padding: 3px 4px; }
.crew-star { color: #d4a000; font-size: 11px; }
.crew-lines { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 4px 14px; }
.crew-line .crew-wall { margin-bottom: 6px; }
.crew-line .crew-label { display: inline-block; background: var(--sq-yellow); color: #000; padding: 3px 8px; border-radius: 4px; transform: skewX(-8deg); }
.squad-list { list-style: none; margin: 10px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.squad-list li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 10px; }
.squad-list .face, .table .face { width: 36px; height: 36px; }
.squad-list .grow { min-width: 0; }
.squad-list .sq-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 3px; }
.squad-list .sq-accbox { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; max-width: 52%; }
.squad-list .sq-acc { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; cursor: pointer; }
.squad-list .sq-mail { width: 190px; max-width: 100%; padding: 5px 8px; font-size: 13px; }
.squad-list .sq-mail:disabled { opacity: .45; }
.reset-card { border-color: color-mix(in srgb, var(--danger) 40%, var(--border)); }
code.pw { font-size: 13px; background: #fff6b3; padding: 3px 7px; user-select: all; }
.crew-av.has-photo { width: 58px; height: 58px; }

/* Le date nel calendario del telefono */
.cal-sub .cal-sub-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.cal-sub .cal-sub-grid > div { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.cal-sub h3 { margin: 0; font-size: 15px; }
.cal-sub .cal-scope { display: inline-flex; }
.cal-sub .cal-scope button { border: 0; background: transparent; font: inherit; padding: 6px 12px; cursor: pointer; border-radius: 7px; }
.cal-sub .cal-scope button.active { background: var(--sq-yellow); font-weight: 700; color: #000; }
.cal-sub .btn { white-space: normal; text-align: left; }
