/* Jestion UI 1.0 — screen interface only.
   Canonical tokens and adapters for existing functional component classes.
   No print rules, generated documents, signature canvas or VIVO selectors. */
@media screen {
body.jestion-ui,body.jestion-registro {
  --bg:#f4f6f9; --sfondo:#f4f6f9;
  --surface:#fff; --bg-surface:#fff; --bg-secondary:#fff; --bg-card:#fff; --carta:#fff;
  --bg-hover:#f3f6fa; --bg-card-hover:#f8fafc; --surface-hover:#f3f6fa; --carta-alta:#f8fafc;
  --text:#202b3b; --testo:#202b3b; --text-primary:#202b3b;
  --text-secondary:#596579; --text-muted:#596579; --text-tertiary:#68758a;
  --muted:#596579; --sec:#596579; --testo-sec:#596579; --testo-ter:#68758a;
  --accent:#0967ce; --accent-color:#0967ce; --primary:#0967ce; --blu:#0967ce; --c-accent:#0967ce;
  --accent-hover:#0755ad; --accent-bg:#eaf3ff; --accent-glow:#eaf3ff; --blu-tenue:#eaf3ff;
  --accent-border:#b4d4fa; --accent-light:#0967ce;
  --border:#dbe2eb; --border-color:#dbe2eb; --border-light:#e9edf3; --filo:#dbe2eb; --sep:#dbe2eb;
  --border-hover:#aebdce; --border-strong:#aebdce; --filo-forte:#aebdce;
  --danger:#ba302b; --text-danger:#ba302b; --danger-text:#ba302b; --rosso:#ba302b;
  --danger-bg:#fff0ee; --danger-border:#edc2bd; --rosso-tenue:#fff0ee;
  --warning:#a35d08; --warn:#a35d08; --warning-text:#8b5108; --ambra:#a35d08;
  --warning-bg:#fff6e5; --warn-bg:#fff6e5; --warn-border:#ead5ae; --ambra-tenue:#fff6e5;
  --success:#217548; --success-text:#217548; --ok:#217548; --verde:#217548;
  --success-bg:#eaf6ee; --ok-bg:#eaf6ee; --ok-border:#b8d9c4; --verde-tenue:#eaf6ee;
  --info:#0967ce; --info-bg:#eaf3ff; --overlay:rgba(26,38,55,.38);
  --font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; --sf:var(--font);
  --fs-xs:12px; --fs-sm:13px; --fs-base:14px; --fs-md:16px; --fs-lg:18px; --fs-xl:24px; --fs-2xl:28px;
  --t-titolo:24px; --t-sezione:18px; --t-corpo:14px; --t-sec:13px; --t-piccolo:13px; --t-etichetta:12px;
  --radius:12px; --radius-sm:8px; --radius-md:12px; --radius-lg:16px; --radius-full:999px;
  --r-s:8px; --r-m:12px; --r-l:16px;
  --shadow:0 1px 3px rgba(26,38,55,.05); --shadow-lg:0 12px 40px rgba(26,38,55,.13);
  --ombra:var(--shadow); --ombra-alta:var(--shadow-lg);
  --sidebar-w:232px; --barra:232px; --topbar-h:64px; --sidebar-bg:#fff; --sidebar-text:#596579;
  background:var(--bg); color:var(--text); font-family:var(--font); font-size:14px; line-height:1.5;
  -webkit-font-smoothing:antialiased;
}
body.jestion-ui *, body.jestion-ui *::before, body.jestion-ui *::after { box-sizing:border-box; }
body.jestion-ui :is(h1,h2,h3) { color:var(--text); line-height:1.3; letter-spacing:-.025em; }
body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header,.testata) h1 { font-size:24px; font-weight:700; }
body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header) { gap:16px; margin-bottom:24px; flex-wrap:wrap; }
body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header)>div { min-width:0; }
body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header) h1 { overflow-wrap:anywhere; }
body.jestion-ui :is(.section-header,.fs-card-head) { gap:12px; flex-wrap:wrap; }
body.jestion-ui .content { margin-left:232px; min-width:0; }
body.jestion-ui .page-content { padding:28px 32px 48px; max-width:1600px; margin:0 auto; }
body.jestion-ui .sidebar { width:232px; border-right:1px solid var(--border); box-shadow:none; padding:24px 16px 16px; }
body.jestion-ui .sidebar .logo { padding:0 8px 28px; gap:12px; }
body.jestion-ui .sidebar .segno-j { width:40px; height:40px; }
body.jestion-ui .nav-links { display:flex; flex-direction:column; gap:4px; }
body.jestion-ui .nav-links li { margin:0; }
body.jestion-ui .nav-links li a { display:flex; gap:12px; align-items:center; min-height:44px; padding:10px 12px; border-radius:8px; font-size:14px; font-weight:500; color:var(--text-secondary); border:0; }
body.jestion-ui .nav-links li a:hover { color:var(--text); background:var(--bg-hover); }
body.jestion-ui .nav-links li :is(a.active,a.j-active) { color:var(--accent); background:var(--accent-bg); font-weight:600; box-shadow:none; }
body.jestion-ui .nav-links .j-nav-admin { margin-top:16px; padding-top:16px; border-top:1px solid var(--border); }
body.jestion-ui .topbar { height:64px; gap:16px; padding:12px 32px; border-bottom:1px solid var(--border); background:#fff; box-shadow:none; }
body.jestion-ui .search-global { width:min(460px,100%); min-width:0; }
body.jestion-ui .search-global input { width:100%; background:var(--bg); }
body.jestion-ui .search-results { box-shadow:var(--shadow-lg); border-radius:12px; }
body.jestion-ui :is(.btn-back,.btn-logout,.hamburger) { border:1px solid var(--border); border-radius:8px; color:var(--text-secondary); background:#fff; min-width:40px; min-height:40px; align-items:center; justify-content:center; box-shadow:none; }
body.jestion-ui .btn-back { display:inline-flex; padding:6px 10px!important; margin:0!important; background:#fff!important; border:1px solid var(--border)!important; color:var(--text-secondary)!important; font-size:16px!important; font-weight:500!important; }
body.jestion-ui .btn-logout { display:inline-flex; font-size:18px; }
body.jestion-ui .j-logout { display:flex!important; justify-content:center; padding:9px 12px!important; color:var(--text-secondary)!important; border:1px solid var(--border)!important; border-radius:8px!important; font-size:13px!important; margin-bottom:12px!important; background:#fff!important; }
body.jestion-ui .j-logout:hover { color:var(--text)!important; background:var(--bg-hover)!important; }
/* Shared controls: specificity isolates visual rules from legacy page styles. */
body.jestion-ui :is(.btn,.fs-btn,.fp-btn,.action-btn,.cta,.fs-person-action,.quick-action) {
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  min-height:40px; padding:9px 14px; border:1px solid var(--border); border-radius:8px;
  font-family:var(--font); font-size:14px; line-height:20px; font-weight:600;
  color:var(--text); background:#fff; background-image:none; box-shadow:none;
  text-decoration:none; cursor:pointer; transition:background-color .15s,border-color .15s;
  vertical-align:middle; transform:none; white-space:normal; text-align:center;
}
body.jestion-ui :is(.btn,.fs-btn,.fp-btn,.action-btn,.cta,.fs-person-action,.quick-action):hover { background:var(--bg-hover); border-color:var(--border-hover); box-shadow:none; transform:none; }
body.jestion-ui :is(.btn-primary,.btn-genera,.btn.pieno,.fs-btn.primary,.fp-btn.primary,.action-btn.primary,.cta,.quick-action.principale) { background:var(--accent); color:#fff; border-color:var(--accent); }
body.jestion-ui :is(.btn-primary,.btn-genera,.btn.pieno,.fs-btn.primary,.fp-btn.primary,.action-btn.primary,.cta,.quick-action.principale):hover { background:var(--accent-hover); color:#fff; border-color:var(--accent-hover); }
body.jestion-ui :is(.btn-danger,.btn.male,.fs-person-action.remove) { background:#fff; color:var(--danger); border-color:var(--danger-border); }
body.jestion-ui :is(.btn-danger,.btn.male,.fs-person-action.remove):hover { background:var(--danger-bg); border-color:var(--danger); }
body.jestion-ui :is(.btn-ghost,.quick-action.quieto) { background:transparent; border-color:transparent; color:var(--text-secondary); }
body.jestion-ui :is(.btn-small,.btn-compact,.fs-person-action) { min-height:34px; padding:6px 10px; font-size:13px; }
body.jestion-ui :is(button,input,select,textarea):disabled { opacity:.5; cursor:not-allowed; box-shadow:none; }
body.jestion-ui :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),select,textarea) {
  min-height:40px; max-width:100%; padding-top:9px; padding-bottom:9px;
  border:1px solid var(--border); border-radius:8px; color:var(--text); background-color:#fff;
  font-family:var(--font); font-size:14px; line-height:20px; box-shadow:none;
}
body.jestion-ui :is(input,textarea)::placeholder { color:#68758a; opacity:1; }
body.jestion-ui :is(input,select,textarea):focus { border-color:var(--accent); outline:2px solid var(--accent); outline-offset:2px; box-shadow:none; }
body.jestion-ui :is(input,textarea)[readonly] { background:var(--bg); color:var(--text-secondary); }
body.jestion-ui textarea { min-height:96px; resize:vertical; }
body.jestion-ui :is(input[type=checkbox],input[type=radio]) { accent-color:var(--accent); }
body.jestion-ui :is(.hour-grid label,.role-check) { position:relative; }
body.jestion-ui :is(.hour-grid,.role-check) input[type=checkbox] { width:1px; height:1px; min-width:0; min-height:0; padding:0; clip-path:inset(50%); }
body.jestion-ui :is(.hour-grid,.role-check) input:focus-visible+span { outline:2px solid var(--accent); outline-offset:3px; }
body.jestion-ui :is(.form-group,.fs-field,.modal-box,.campo,.riga-campo) label { color:var(--text-secondary); font-size:13px; font-weight:600; letter-spacing:0; }
body.jestion-ui :is(a,button,summary,[tabindex]):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
body.jestion-ui :is(.card,.detail-card,.fs-card,.kanban-col,.planner-section,.settings-card,.riquadro,.company-tools,.company-master-summary,.company-area-card) { background:#fff; border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow); }
body.jestion-ui :is(.detail-card,.fs-card,.settings-card) { padding:20px; }
body.jestion-ui :is(.detail-card,.fs-card,.riquadro) h2 { font-size:18px; }
body.jestion-ui :is(.detail-card h3,.section-header h2) { font-size:16px; font-weight:600; }
body.jestion-ui :is(.fs-step,.fs-person-avatar,.kanban-count) { background:var(--accent-bg); color:var(--accent); }
body.jestion-ui .fs-step { display:inline-flex; width:26px; height:26px; align-items:center; justify-content:center; border-radius:999px; flex:none; }
body.jestion-ui .kanban-col .kanban-count { background:var(--accent-bg); color:var(--accent); }
body.jestion-ui .kanban-col.col-fatte .kanban-count { background:var(--success-bg); color:var(--success-text); }
body.jestion-ui :is(.fs-state.done,.fs-person-card.selected .fs-person-avatar) { background:var(--success-bg); color:var(--success-text); }
body.jestion-ui .fs-person-card.selected { border-color:var(--ok-border); background:#f7fcf8; }
body.jestion-ui :is(.fs-person-card,.kanban-card,.ana-card,.card-conta) { border-radius:12px; box-shadow:none; }
body.jestion-ui :is(.kanban-card,.ana-card,.card-conta):hover { transform:none; border-color:var(--border-hover); box-shadow:var(--shadow); }
body.jestion-ui .formazione-semplice { max-width:1120px; }
body.jestion-ui .fs-state { background:var(--warning-bg); color:var(--warning-text); border-radius:999px; }
body.jestion-ui :is(.modal-box,.modal-content) { border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow-lg); max-height:calc(100dvh - 32px); overflow-y:auto; }
body.jestion-ui .modal-overlay { background:var(--overlay); }
body.jestion-ui :is(.modal-actions,.modal-footer,.form-actions) { gap:8px; flex-wrap:wrap; }
body.jestion-ui :is(.modal-close,.ana-search-clear,.fs-remove,.risk-clear) { min-width:32px; min-height:32px; border-radius:6px; }
body.jestion-ui :is(.badge,.status-badge,.kc-badge,.alert-pill) { font-size:12px; font-weight:600; line-height:1.5; border-radius:999px; }
body.jestion-ui :is(.table-container,.table-wrap,.table-responsive) { border:1px solid var(--border); border-radius:12px; overflow-x:auto; background:#fff; }
body.jestion-ui table { border-collapse:collapse; }
body.jestion-ui th { background:#f7f9fc; color:var(--text-secondary); font-size:12px; font-weight:600; letter-spacing:.02em; padding:12px; text-align:left; }
body.jestion-ui td { padding:12px; border-bottom:1px solid var(--border-light); font-size:13px; }
body.jestion-ui :is(.empty-state,.fs-empty) { padding:32px 16px; color:var(--text-secondary); }
body.jestion-ui :is(.company-section-nav,.tabs,.filter-tabs) { gap:8px; flex-wrap:wrap; }
body.jestion-ui .company-section-nav a { border-radius:8px; font-size:13px; }
body.jestion-ui :is(.success,.text-success) { color:var(--success-text); }
body.jestion-ui :is(.text-danger,.sc-rosso) { color:var(--danger-text); }
/* The alternate access-management shell adopts the same navigation metrics. */
body.jestion-ui .barra { width:232px; padding:24px 16px 16px; border-right:1px solid var(--border); }
body.jestion-ui .barra .marchio { padding:0 8px 28px; gap:12px; }
body.jestion-ui .barra .segno-j { width:40px; height:40px; }
body.jestion-ui .voci { gap:4px; }
body.jestion-ui .voci a { min-height:44px; padding:10px 12px; border-radius:8px; font-size:14px; color:var(--text-secondary); font-weight:500; }
body.jestion-ui .voci a.qui { background:var(--accent-bg); color:var(--accent); font-weight:600; }
body.jestion-ui .foglio { padding:28px 32px 48px; }
body.jestion-ui .guscio .foglio { margin-left:232px; }
body.jestion-ui>.guscio { width:100%; }
body.jestion-ui .guscio .foglio>:not(.topbar) { max-width:1536px; margin-left:auto; margin-right:auto; }
body.jestion-ui .guscio .foglio>.topbar { margin:-28px -32px 28px; }
body.jestion-ui :is(.company-form-card,.fs-optional) { background:#fff; border-color:var(--border); border-radius:12px; box-shadow:var(--shadow); }
body.jestion-ui .risk-toggle { min-height:40px; border-radius:8px; }
body.jestion-ui .risk-toggle.active { background:var(--accent-bg); border-color:var(--accent); color:var(--accent); }
/* Legacy inline colors: bridge to semantic tokens without altering print. */
body.jestion-ui [style*="color:#6c5ce7"],body.jestion-ui [style*="color: #6c5ce7"] { color:var(--accent)!important; }
body.jestion-ui [style*="color:#00b894"],body.jestion-ui [style*="color: #00b894"] { color:var(--success-text)!important; }
body.jestion-ui .accesso { padding:32px; margin:64px auto; max-width:440px; background:#fff; border:1px solid var(--border); border-radius:16px; box-shadow:var(--shadow); }
body.jestion-ui .accesso h1 { font-size:28px; }
body.jestion-ui .accesso .campo { background:transparent; border-radius:0; overflow:visible; }
body.jestion-ui .accesso .campo .r { padding:0; gap:8px; }
body.jestion-ui .accesso input { padding-left:12px; padding-right:12px; }
body.jestion-ui .accesso .cta { width:100%; }
body.jestion-ui .accesso .fuori { font-size:13px; }
/* Signature acquisition: canvas dimensions, pixels and scripts are deliberately untouched. */
body.jestion-ui .fp-header { color:var(--text); }
body.jestion-ui .fp-header h1 { font-size:20px; }
/* The customer register keeps its mobile task grid and document renderer. */
body.jestion-registro :is(.stato,.legenda,.storico) { border:1px solid var(--border); border-radius:12px; box-shadow:var(--shadow); }
body.jestion-registro :is(.filtri button,.datebar .frecc) { border-radius:8px; }
body.jestion-registro :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea) { font-family:var(--font); color:var(--text); border-color:var(--border); border-radius:8px; }
body.jestion-registro :is(a,button,input,select,textarea):focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media (max-width:1000px) {
  body.jestion-ui .page-content,body.jestion-ui .foglio { padding:24px; }
  body.jestion-ui .topbar { padding:12px 24px; }
  body.jestion-ui .guscio .foglio>.topbar { margin:-24px -24px 24px; }
}
@media (max-width:768px) {
  body.jestion-ui .content { margin-left:0; }
  body.jestion-ui .guscio .foglio { margin-left:0; padding:20px 16px 32px; }
  body.jestion-ui .guscio .foglio>.topbar { margin:-20px -16px 20px; }
  body.jestion-ui .page-content { padding:20px 16px 32px; }
  body.jestion-ui .topbar { gap:10px; padding:10px 16px; }
  body.jestion-ui .hamburger { display:flex; flex-direction:column; flex-shrink:0; }
  body.jestion-ui .search-global { flex:1; width:auto; }
  body.jestion-ui .user-info { margin-left:0; }
  body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header) h1 { font-size:22px; }
  body.jestion-ui :is(.page-header,.ana-header,.form-topbar,.fs-header) { margin-bottom:20px; }
  body.jestion-ui .fs-header { align-items:flex-start; }
  body.jestion-ui .ana-header { align-items:flex-start; }
  body.jestion-ui .ana-header-right { flex-wrap:wrap; }
  body.jestion-ui .accesso { margin:24px 16px; padding:24px; }
  body.jestion-ui .form-grid { grid-template-columns:1fr; }
  body.jestion-ui :is(.btn,.fs-btn,.fp-btn,.action-btn,.cta,.fs-person-action,.quick-action) { min-height:40px; }
}
@media (prefers-reduced-motion:reduce) {
  body.jestion-ui *,body.jestion-ui *::before,body.jestion-ui *::after { animation:none!important; transition:none!important; scroll-behavior:auto!important; }
}
}
