@font-face {
  font-family: "Sarabun";
  src: url("../fonts/sarabun/Sarabun-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sarabun";
  src: url("../fonts/sarabun/Sarabun-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Sarabun";
  src: url("../fonts/sarabun/Sarabun-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  /* Font attivo per tutto il sito (2026-07-09): Sarabun, stile Ydea, deciso in sede di
     revisione del portale Partner. Impostato in codice (UseYdeaFontDefault in
     ApplicationConfigurationService.cs), non da appsettings. Rollback: portare
     UseYdeaFontDefault a false li' (body perde la classe "font-ydea" e torna al
     vecchio font sotto), senza toccare i componenti Blazor/MVC. */
  --app-font-family-default: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  --app-font-family-ydea: "Sarabun", "Segoe UI", Arial, sans-serif;
  --app-font-family: var(--app-font-family-default);
  --bg: #f6f8fb;
  --bg-soft: #eef3f9;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #dbe3ee;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #6b7280;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #eaf2ff;
  --success: #059669;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --teal: #0f766e;
  --shadow: 0 10px 25px rgba(15, 23, 42, .05);
  --radius: 8px;
  --topbar-height: 72px;
  --sidebar-width: 270px;
  --sidebar-collapsed-width: 78px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: linear-gradient(180deg, #f6f8fb 0%, #eef3f9 100%);
  color: var(--text);
  font-family: var(--app-font-family);
  letter-spacing: 0;
}

body.font-ydea {
  --app-font-family: var(--app-font-family-ydea);
}

body button,
body input,
body select,
body textarea,
body .btn,
body .form-control,
body .form-select,
body .dx-widget,
body .dxbl {
  font-family: var(--app-font-family);
}

a {
  color: var(--primary);
}

a:hover {
  color: var(--primary-strong);
}

.app-shell {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
}

.app-global-topbar {
  position: fixed;
  z-index: 1060;
  inset: 0 0 auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--topbar-height);
  max-height: var(--topbar-height);
  padding: 8px 18px;
  overflow: visible;
  border-bottom: 1px solid #dbe3ee;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 8px 22px rgba(15, 23, 42, .08);
}

.app-global-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
  height: 46px;
  max-height: calc(var(--topbar-height) - 16px);
  overflow: hidden;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.app-global-logo img {
  display: block;
  flex: 0 0 auto;
  width: auto !important;
  height: 42px !important;
  max-width: 150px !important;
  max-height: 42px !important;
  object-fit: contain !important;
}

.app-company-context {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  height: 100%;
  max-width: min(48vw, 520px);
  overflow: hidden;
}

.app-partner-home-logo,
.app-partner-topbar-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  justify-content: flex-start;
  gap: 9px;
  width: auto;
  max-width: min(44vw, 250px);
  min-width: 0;
  height: 46px;
  max-height: calc(var(--topbar-height) - 16px);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

.app-partner-home-logo img,
.app-partner-topbar-logo img {
  display: block;
  flex: 0 0 38px;
  width: 38px !important;
  height: 38px !important;
  max-width: 38px !important;
  max-height: 38px !important;
  object-fit: contain !important;
}

.app-partner-wordmark {
  display: inline-flex;
  align-items: baseline;
  min-width: 0;
  overflow: hidden;
  color: #111827;
  font-size: 19px;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-partner-wordmark strong {
  display: inline-block;
  overflow: hidden;
  font: inherit;
  text-overflow: ellipsis;
}

.app-partner-wordmark em {
  display: inline-block;
  margin-left: 5px;
  color: #dc2626;
  font: inherit;
  font-style: normal;
}

.app-company-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  gap: 10px;
  min-width: 0;
  max-width: min(42vw, 420px);
  max-height: calc(var(--topbar-height) - 16px);
  overflow: hidden;
  color: var(--text);
  text-decoration: none;
}

button.app-company-logo {
  appearance: none;
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  text-align: left;
  cursor: pointer;
  box-shadow: none;
}

.app-company-logo img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: 190px !important;
  max-height: 46px !important;
  object-fit: contain !important;
}

.app-company-logo strong {
  max-width: min(34vw, 360px);
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-company-logo:has(> .company-logo.small) {
  min-height: 46px;
}

.app-company-switch-hint {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  opacity: .55;
  transform: rotate(45deg);
  transition: opacity .16s ease, transform .16s ease;
}

button.app-company-logo:hover .app-company-switch-hint,
button.app-company-logo:focus-visible .app-company-switch-hint {
  opacity: .9;
  transform: rotate(45deg) translate(1px, 1px);
}

.topbar-company-switch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid #bfd6fb;
  border-radius: 9px;
  background: #eaf2ff;
  color: var(--primary-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}

.topbar-company-switch:hover,
.topbar-company-switch:focus-visible {
  border-color: var(--primary);
  background: #dbeafe;
  transform: translateY(-1px);
}

.app-global-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}

.app-global-actions form {
  margin: 0;
}

.topbar-impersonation-form,
.inline-action-form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.topbar-impersonation-form {
  gap: 8px;
  min-width: 0;
  max-width: min(42vw, 420px);
  padding: 5px 6px 5px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
}

.topbar-impersonation-label {
  min-width: 0;
  overflow: hidden;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-impersonation-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border: 1px solid var(--primary);
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  padding: 7px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.topbar-impersonation-stop:hover,
.topbar-impersonation-stop:focus-visible {
  background: var(--primary-strong);
  border-color: var(--primary-strong);
}

.app-global-user {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color .16s ease, background .16s ease, color .16s ease;
}

.app-global-user:hover,
.app-global-user:focus-visible {
  border-color: var(--primary);
  background: #dbeafe;
  color: #1e40af;
}

.app-global-user img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.app-global-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color .16s ease, color .16s ease, background .16s ease;
}

.app-global-logout svg {
  display: block;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-global-logout:hover,
.app-global-logout:focus-visible {
  border-color: #bfdbfe;
  background: #eaf2ff;
  color: var(--primary-strong);
}

body.test-environment {
  --test-environment-red: #dc2626;
  --test-environment-red-strong: #991b1b;
  --test-environment-red-soft: #fee2e2;
}

body.test-environment .app-global-topbar {
  border-bottom-color: #7f1d1d;
  background: linear-gradient(90deg, #991b1b 0%, #dc2626 58%, #ef4444 100%);
  box-shadow: 0 10px 24px rgba(127, 29, 29, .24);
  color: #fff;
}

body.test-environment .page-hero {
  border-color: rgba(254, 202, 202, .64);
  background: linear-gradient(135deg, #7f1d1d 0%, #dc2626 58%, #991b1b 100%);
  box-shadow: 0 16px 32px rgba(153, 27, 27, .20);
}

body.test-environment .app-company-logo,
body.test-environment .app-company-logo strong,
body.test-environment .app-global-logo,
body.test-environment .topbar-impersonation-label {
  color: #fff;
}

body.test-environment .topbar-company-switch,
body.test-environment .topbar-impersonation-form,
body.test-environment .app-global-user,
body.test-environment .app-global-logout,
body.test-environment .app-company-logo .company-logo {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

body.test-environment .app-global-topbar .app-company-logo:has(> .company-logo.small) {
  border: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
}

body.test-environment .app-global-topbar .app-company-logo:has(> .company-logo.small) strong {
  color: #fff;
  text-shadow: 0 1px 2px rgba(127, 29, 29, .34);
}

body.test-environment .app-global-topbar .app-company-logo:has(> .company-logo.small) .company-logo.small {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

body.test-environment .app-partner-home-logo,
body.test-environment .app-partner-topbar-logo {
  padding: 3px 8px;
  border-radius: 8px;
  background: #fff;
}

body.test-environment .topbar-company-switch:hover,
body.test-environment .topbar-company-switch:focus-visible,
body.test-environment .app-global-user:hover,
body.test-environment .app-global-user:focus-visible,
body.test-environment .app-global-logout:hover,
body.test-environment .app-global-logout:focus-visible,
body.test-environment button.app-company-logo:hover .company-logo,
body.test-environment button.app-company-logo:focus-visible .company-logo {
  border-color: rgba(255, 255, 255, .64);
  background: rgba(255, 255, 255, .24);
  color: #fff;
}

body.test-environment .topbar-impersonation-stop {
  border-color: #fff;
  background: #fff;
  color: var(--test-environment-red-strong);
}

body.test-environment .sidebar-toggle,
body.test-environment .sidebar-toggle:hover,
body.test-environment .sidebar-toggle:focus-visible,
body.test-environment:has(.sidebar:hover) .sidebar-toggle {
  background: linear-gradient(180deg, #991b1b, #dc2626);
  box-shadow: 0 12px 28px rgba(153, 27, 27, .28);
}

body.test-environment .shell-menu-group summary:hover,
body.test-environment .shell-menu-group summary:focus-visible,
body.test-environment .shell-menu-group.active > summary,
body.test-environment .shell-primary-link:hover,
body.test-environment .shell-primary-link:focus-visible,
body.test-environment .shell-primary-link.active,
body.test-environment .nav-stack a:hover,
body.test-environment .nav-stack a.active,
body.test-environment .nav-stack a[aria-current="page"],
body.test-environment:not(.sidebar-open) .shell-nav .shell-menu-group.shell-flyout-open summary,
body.test-environment .shell-menu-flyout a:hover,
body.test-environment .shell-menu-flyout a:focus-visible,
body.test-environment .shell-menu-flyout a.active {
  background: linear-gradient(90deg, #991b1b 0%, #ef4444 100%);
  color: #fff;
}

body.test-environment .shell-menu-flyout .shell-flyout-title::before {
  background: var(--test-environment-red);
}

body.test-environment .expense-note-list-surface::before,
body.test-environment .expense-note-detail-surface::before,
body.test-environment .work-surface:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before,
body.test-environment .settings-panel:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before {
  background: linear-gradient(90deg, #991b1b 0%, #ef4444 100%);
}

body.test-environment .settings-tab.active {
  box-shadow: inset 0 -3px var(--test-environment-red);
}

.sidebar-toggle {
  position: fixed;
  z-index: 1050;
  top: calc(var(--topbar-height) + 10px);
  left: calc(var(--sidebar-collapsed-width) - 1px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 10px;
  height: 54px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0 8px 8px 0;
  background: linear-gradient(180deg, #0284c7, #0ea5e9);
  box-shadow: 0 10px 22px rgba(14, 116, 144, .20);
  transition: width .16s ease, background .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.sidebar-toggle::before {
  content: "";
}

body.sidebar-open .sidebar-toggle {
  left: calc(var(--sidebar-width) - 1px);
}

.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
body:has(.sidebar:hover) .sidebar-toggle {
  width: 42px;
  background: linear-gradient(180deg, #0369a1, #0284c7);
  box-shadow: 0 12px 28px rgba(14, 116, 144, .28);
}

.sidebar-toggle span {
  display: block;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: #fff;
  opacity: 0;
  transition: opacity .14s ease, transform .14s ease;
}

.sidebar-toggle:hover span,
.sidebar-toggle:focus-visible span,
body:has(.sidebar:hover) .sidebar-toggle span {
  opacity: 1;
}

.sidebar-backdrop,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1030;
  background: rgba(15, 23, 42, .34);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

body.sidebar-open .sidebar-backdrop {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  z-index: 1040;
  top: var(--topbar-height);
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-collapsed-width);
  max-height: calc(100dvh - var(--topbar-height));
  min-height: 0;
  padding: 8px 0 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
  border: 0;
  border-right: 1px solid #dbe3ee;
  border-radius: 0;
  background: var(--surface);
  box-shadow: 8px 0 24px rgba(15, 23, 42, .06);
  transform: translateX(0);
  transition: box-shadow .16s ease;
}

body.sidebar-open .sidebar {
  width: min(var(--sidebar-width), calc(100vw - 30px));
  scrollbar-gutter: auto;
  box-shadow: 12px 0 34px rgba(15, 23, 42, .12);
}

.shell-sidebar {
  background: #fff;
  overflow: hidden;
}

.shell-nav {
  gap: 8px;
  padding: 8px 0 18px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

.shell-sidebar-brand {
  flex: 0 0 auto;
  padding: 14px 12px 16px;
  text-align: center;
  border-top: 1px solid #eef0f2;
  overflow: visible;
}

.shell-sidebar-logo {
  display: inline-flex;
  max-width: 100%;
}

.shell-sidebar-logo img {
  display: block;
  width: auto;
  height: auto;
  max-height: 40px;
  max-width: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.shell-sidebar-company-initial {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #eef2f7;
  color: #334155;
  font-weight: 700;
  font-size: 16px;
}

.shell-sidebar-by {
  display: block;
  margin-top: 6px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  color: #4b5563;
  white-space: nowrap;
  line-height: 1.2;
}

.shell-menu-group {
  display: grid;
  align-content: start;
  gap: 3px;
}

.shell-menu-group summary,
.shell-primary-link {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 7px 16px;
  border-radius: 0 8px 8px 0;
  color: #7f8184;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  line-height: 1.15;
  text-transform: uppercase;
  text-decoration: none;
  list-style: none;
  transition: background .16s ease, color .16s ease;
}

.shell-menu-group summary::-webkit-details-marker {
  display: none;
}

.shell-menu-group summary:hover,
.shell-menu-group summary:focus-visible,
.shell-menu-group.active > summary,
.shell-primary-link:hover,
.shell-primary-link:focus-visible,
.shell-primary-link.active {
  background: linear-gradient(90deg, #0284c7 0%, #72c6e8 100%);
  color: #fff;
}

.shell-line-icon svg {
  display: block;
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.shell-menu-chevron {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transition: transform .16s ease;
}

.shell-menu-chevron::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(45deg) translate(-1px, -1px);
}

.shell-menu-group[open] .shell-menu-chevron {
  transform: rotate(180deg);
}

.shell-menu-children {
  display: grid;
  gap: 2px;
  padding: 4px 0 7px 58px;
}

.shell-flyout-title {
  display: none;
}

.shell-menu-children a,
.shell-empty-item {
  display: block;
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 8px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.25;
  text-decoration: none;
  text-transform: none;
}

.shell-menu-children a:hover,
.shell-menu-children a:focus-visible,
.shell-menu-children a.active {
  background: #eaf2ff;
  color: var(--primary-strong);
}

.shell-empty-item {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 700;
}

body:not(.sidebar-open) .shell-nav {
  gap: 7px;
  padding-top: 10px;
  overflow-x: hidden;
}

body:not(.sidebar-open) .shell-menu-group summary,
body:not(.sidebar-open) .shell-primary-link {
  display: flex;
  min-height: 62px;
  padding: 7px 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.15;
  text-align: center;
}

body:not(.sidebar-open) .shell-menu-group summary > span:nth-child(2),
body:not(.sidebar-open) .shell-primary-link > span:nth-child(2) {
  display: block;
  width: 84px;
  max-width: 84px;
  overflow: hidden;
  color: #7c7f83;
  font-size: 7.8px;
  letter-spacing: .035em;
  text-overflow: clip;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body:not(.sidebar-open) .shell-menu-chevron,
body:not(.sidebar-open) .shell-menu-children {
  display: none;
}

body:not(.sidebar-open) .shell-line-icon svg {
  width: 25px;
  height: 25px;
}

body:not(.sidebar-open) .shell-nav .shell-primary-link,
body:not(.sidebar-open) .shell-nav .shell-menu-group summary {
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  min-height: 62px;
  padding: 7px 0;
  text-align: center;
}

body:not(.sidebar-open) .shell-nav .shell-primary-link > span:nth-child(2),
body:not(.sidebar-open) .shell-nav .shell-menu-group summary > span:nth-child(2) {
  display: block;
  width: 84px;
  max-width: 84px;
  overflow: hidden;
  color: #7c7f83;
  font-size: 7.8px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.mobile-kiosk .sidebar-toggle,
body.mobile-kiosk .sidebar-backdrop,
body.mobile-kiosk .sidebar,
body.mobile-kiosk .topbar,
body.mobile-kiosk .app-global-topbar {
  display: none !important;
}

body.mobile-kiosk .app-shell {
  display: block;
  min-height: 100vh;
}

body.mobile-kiosk .content {
  width: min(100%, 680px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 14px;
}

body.mobile-kiosk .auth-panel,
body.mobile-kiosk .mobile-badge {
  margin-inline: auto;
}

body.auth-page .sidebar-toggle,
body.auth-page .sidebar-backdrop,
body.auth-page .sidebar,
body.auth-page .topbar,
body.auth-page .app-global-topbar {
  display: none !important;
}

body.auth-page .app-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
}

body.auth-page .content {
  width: min(100%, 820px);
  min-height: auto;
  padding: 24px;
}

body.auth-page .auth-panel {
  width: 100%;
  margin: 0 auto;
}

.brand {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
}

body:not(.sidebar-open) .brand,
body:not(.sidebar-open) .sidebar-user,
body:not(.sidebar-open) .sidebar-company,
body:not(.sidebar-open) .menu-search,
body:not(.sidebar-open) .sidebar-footer,
body:not(.sidebar-open) .nav-favorites-sublist {
  display: none;
}

.brand strong,
.sidebar-user strong {
  display: block;
  overflow: hidden;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand > span:not(.brand-mark),
.sidebar-user > div {
  min-width: 0;
}

.sidebar-user-details {
  display: block;
  min-width: 0;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
}

.sidebar-user-details:hover,
.sidebar-user-details:focus-visible {
  color: var(--primary);
}

.brand small,
.sidebar-user span,
.sidebar-user small {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--primary), #0f766e);
  color: #fff;
  font-weight: 800;
}

.brand-logo {
  overflow: hidden;
  border: 1px solid #d8e6f7;
  background: #fff;
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-user {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 42px minmax(0, 1fr) 10px;
  gap: 10px;
  align-items: center;
  margin: 14px 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-weight: 800;
}

.sidebar-user i {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
}

.sidebar-company {
  display: grid;
  flex: 0 0 auto;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.company-logo {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid #d8e6f7;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #eaf2ff, #f4fbff);
  color: var(--primary-strong);
  font-weight: 800;
}

.company-logo.small {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  font-size: 13px;
}

.company-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-company-text {
  min-width: 0;
}

.sidebar-company-text span,
.sidebar-company-text small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-company-text span {
  font-weight: 800;
  text-transform: uppercase;
}

.sidebar-company-text strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switch-button {
  min-height: 30px;
  border: 1px solid #bfd6fb;
  border-radius: 8px;
  background: #eaf2ff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  padding: 5px 8px;
}

.company-switch-button:hover,
.company-switch-button:focus-visible {
  border-color: var(--primary);
  background: #dbeafe;
}

.menu-search {
  flex: 0 0 auto;
  margin-bottom: 12px;
}

.menu-search span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.menu-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

.nav-stack {
  display: grid;
  align-content: start;
  grid-auto-rows: max-content;
  flex: 1 1 auto;
  gap: 7px;
  min-height: 96px;
  overflow-y: auto;
  padding: 30px 0 16px;
  overscroll-behavior: contain;
  scrollbar-gutter: auto;
}

body.sidebar-open .nav-stack {
  gap: 6px;
  padding: 6px 0 18px;
  scrollbar-gutter: auto;
}

.nav-section {
  align-self: start;
  margin: 12px 12px 3px;
  color: #7b7f86;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

body:not(.sidebar-open) .nav-section {
  margin: 14px 0 3px;
  font-size: 9px;
  letter-spacing: .08em;
  text-align: center;
}

.nav-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px;
  align-self: start;
  align-items: center;
  gap: 4px;
  border-radius: 0;
}

.access-denied-shell {
  min-height: min(560px, calc(100dvh - 180px));
  display: grid;
  place-items: center;
  padding: 24px;
}

.access-denied-dialog,
.access-denied-popup-card {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  padding: 24px;
  border: 1px solid #fecdd3;
  border-radius: 18px;
  background: linear-gradient(135deg, #fff 0%, #fff7f7 100%);
  box-shadow: 0 18px 45px rgba(15, 23, 42, .12);
}

.access-denied-dialog h2,
.access-denied-popup-card h2 {
  margin: 2px 0 8px;
  color: #0f172a;
}

.access-denied-dialog p,
.access-denied-popup-card p {
  margin: 0;
  color: #64748b;
}

.access-denied-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #fee2e2;
  color: #dc2626;
  font-weight: 900;
  font-size: 24px;
}

.access-denied-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.access-denied-popup {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .34);
  backdrop-filter: blur(3px);
}

.access-denied-popup-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.readonly-page main.content .readonly-action-form {
  position: relative;
}

.readonly-page main.content .readonly-action-form input:not([type="hidden"]),
.readonly-page main.content .readonly-action-form select,
.readonly-page main.content .readonly-action-form textarea {
  background-color: #f8fafc;
  color: var(--text);
  cursor: not-allowed;
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.readonly-page main.content [data-edit-target][hidden],
.readonly-page main.content [data-open-modal][data-reset-form][hidden] {
  display: none !important;
}

.nav-stack a {
  position: relative;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  min-height: 50px;
  padding: 7px 16px;
  border-radius: 0 8px 8px 0;
  color: #7c7f84;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: .035em;
  text-transform: uppercase;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}

.nav-row .nav-link-main {
  grid-template-columns: 34px minmax(0, 1fr);
  min-width: 0;
}

body:not(.sidebar-open) .nav-row {
  display: block;
}

body:not(.sidebar-open) .nav-stack a,
body:not(.sidebar-open) .nav-row .nav-link-main {
  display: flex;
  min-height: 68px;
  padding: 8px 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #818181;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .06em;
  line-height: 1.16;
  text-align: center;
}

.nav-link-main > span:last-child,
.nav-favorite-link > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:not(.sidebar-open) .nav-link-main > span:last-child {
  width: 76px;
  max-width: 76px;
  white-space: normal;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
  text-align: center;
}

.nav-favorites-sublist {
  display: grid;
  align-self: start;
  gap: 3px;
  margin: -1px 0 4px 42px;
}

.nav-favorites-sublist > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}

.nav-stack .nav-favorite-link {
  grid-template-columns: 16px minmax(0, 1fr);
  min-height: 30px;
  padding: 4px 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 750;
}

.nav-favorite-link small {
  color: var(--warning);
  line-height: 1;
}

.nav-stack a:hover {
  background: linear-gradient(90deg, #0284c7 0%, #72c6e8 100%);
  color: #fff;
}

.nav-stack a.active,
.nav-stack a[aria-current="page"] {
  background: linear-gradient(90deg, #0284c7 0%, #72c6e8 100%);
  color: #fff;
}

.nav-stack a.active::before,
.nav-stack a[aria-current="page"]::before {
  content: none;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: currentColor;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

body:not(.sidebar-open) .nav-icon {
  width: 34px;
  height: 34px;
  font-size: 17px;
}

.sidebar-footer {
  display: grid;
  flex: 0 0 auto;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.portal-preview-switch {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.portal-preview-switch > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.portal-preview-switch > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.portal-preview-switch form,
.portal-preview-switch button {
  width: 100%;
}

.language-select {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.language-select select {
  min-height: 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 5px 8px;
}

.content {
  width: 100%;
  max-width: 100vw;
  min-width: 0;
  min-height: 100vh;
  overflow-x: clip;
  padding: calc(var(--topbar-height) + 24px) 24px 28px calc(var(--sidebar-collapsed-width) + 32px);
  transition: none;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.topbar h1 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.2;
  font-weight: 800;
}

.eyebrow {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.status-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-weight: 800;
}

.status-dot::before {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: currentColor;
  content: "";
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid rgba(216, 230, 247, .5);
  border-radius: var(--radius);
  background: linear-gradient(135deg, #0f172a 0%, #1d4ed8 58%, #0f766e 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.page-hero.compact-page-head {
  grid-template-columns: minmax(0, 1fr);
  min-height: auto;
  padding: 18px 20px;
}

.page-hero.compact-page-head h2 {
  margin: 0;
}

.page-hero.compact-page-head p {
  display: none;
}

.page-hero .eyebrow,
.page-hero p {
  color: rgba(255, 255, 255, .76);
}

.page-hero h1,
.page-hero h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 800;
}

.page-hero h1:focus,
.page-hero h2:focus {
  outline: none;
}

.page-hero p {
  max-width: 760px;
  margin: 0;
}

.page-hero.blazor-page-hero,
.page-hero.partner-blazor-head,
.page-hero.standard-blazor-head {
  grid-template-columns: minmax(0, 1fr) auto;
  margin-bottom: 16px;
  padding: 20px;
}

.page-hero.blazor-page-hero h2,
.page-hero.partner-blazor-head h2,
.page-hero.standard-blazor-head h2 {
  margin: 0;
}

.page-hero.blazor-page-hero .quick-actions,
.page-hero.partner-blazor-head .quick-actions,
.page-hero.standard-blazor-head .quick-actions {
  justify-content: flex-end;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.table-filter-row th {
  padding: 2px 5px;
  background: #fff;
  overflow: visible;
  vertical-align: middle;
}

.table-filter-row input,
.table-filter-row select,
.table-filter-row .dxbl-text-edit {
  box-sizing: border-box;
  min-height: 26px;
  min-width: 110px;
  padding: 2px 6px;
  border-color: #dbe3ee;
  background-color: #fff;
  font-size: 12px;
  line-height: 1.2;
}

.table-filter-row .dxbl-text-edit input {
  box-sizing: border-box;
  width: 100%;
  min-height: 0;
  padding-block: 0;
  font-size: 12px;
  line-height: 1.2;
}

.module-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.module-switcher .btn.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.editor-panel[hidden],
.editor-modal[hidden],
.confirm-modal[hidden],
[data-module-section][hidden] {
  display: none !important;
}

.editor-modal,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1070;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* Lo sfondo sta su uno pseudo-elemento, NON sulla modal stessa:
   backdrop-filter su .editor-modal creerebbe un containing block per i
   discendenti position:fixed, intrappolando il popup del DxDateEdit (anch'esso
   position:fixed) e rompendone posizione/clipping dentro la modal. */
.editor-modal::before,
.confirm-modal::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, .10), transparent 34%),
    rgba(15, 23, 42, .48);
  pointer-events: none;
}

.editor-dialog,
.confirm-dialog {
  display: flex;
  flex-direction: column;
  width: min(940px, 100%);
  max-height: calc(100vh - 48px);
  overflow: hidden;
  border: 1px solid rgba(216, 230, 247, .92);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 26px 72px rgba(15, 23, 42, .24);
}

.editor-dialog.wide {
  width: min(1120px, 100%);
}

.editor-modal.editor-modal-floating-content {
  place-items: start center;
  align-items: start;
  justify-items: center;
  overflow: auto;
  overscroll-behavior: contain;
}

.editor-modal.editor-modal-floating-content .editor-dialog-floating-content {
  max-height: none;
  overflow: visible;
}

.editor-modal.editor-modal-floating-content .editor-body {
  overflow: visible;
}

.company-switch-dialog {
  width: min(620px, 100%);
}

.editor-dialog .surface-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #cfe0f5;
  border-radius: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef5ff 100%);
  box-shadow: none;
}

.editor-dialog .surface-head h2,
.confirm-dialog h2 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0;
}

.editor-dialog .surface-head p,
.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.editor-dialog .surface-head [data-close-modal] {
  min-width: 82px;
  align-self: flex-start;
}

.editor-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 18px 20px 20px;
}

.editor-body .form-grid,
.editor-dialog .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
  margin-bottom: 0;
}

.editor-dialog.wide .form-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.editor-dialog .form-grid label {
  min-width: 0;
}

.editor-dialog .form-grid-wide,
.editor-dialog .admin-wide,
.editor-dialog .field.span-2 {
  grid-column: 1 / -1;
}

.editor-dialog .check-row,
.editor-dialog .check-line {
  position: relative;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  grid-template-rows: minmax(24px, max-content);
  gap: 6px 8px;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
}

.editor-dialog .check-row .dxbl-text,
.editor-dialog .check-line .dxbl-text {
  min-width: 0;
  padding-block: 0;
  line-height: 1.2;
}

.editor-dialog .check-row .dxbl-checkbox-check-element,
.editor-dialog .check-line .dxbl-checkbox-check-element {
  justify-self: end;
  margin-block: 0;
}

.editor-dialog .check-row:has(input[type="checkbox"]:checked),
.editor-dialog .check-line:has(input[type="checkbox"]:checked) {
  border-color: rgba(37, 99, 235, .28);
  background: #eaf2ff;
  color: var(--primary-strong);
}

.editor-dialog .check-row small,
.editor-dialog .check-line small {
  grid-column: 1 / -1;
  margin-top: -4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.editor-dialog .permission-box .check-row {
  min-height: 46px;
  padding: 8px 10px;
}

.timestamp-existing-attachments {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fbff;
}

.timestamp-attachments-dialog {
  width: min(660px, 100%);
}

.timestamp-existing-attachments[hidden] {
  display: none !important;
}

.timestamp-existing-attachments p {
  margin: 2px 0 0;
  font-size: 12px;
  font-weight: 650;
}

.timestamp-existing-attachments-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.timestamp-attachments-modal-list {
  display: grid;
  gap: 10px;
}

.timestamp-attachment-chip,
.timestamp-attachment-empty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 850;
  text-decoration: none;
}

.timestamp-attachment-info {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.timestamp-attachment-info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timestamp-attachment-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.timestamp-attachment-actions .btn {
  min-height: 30px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.timestamp-attachment-chip:hover,
.timestamp-attachment-chip:focus {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.timestamp-attachment-chip small {
  color: var(--muted);
  font-weight: 750;
}

.timestamp-attachment-empty {
  border-color: var(--border);
  color: var(--muted);
}

.timestamp-attachments-modal-list .timestamp-attachment-chip {
  justify-content: space-between;
  width: 100%;
  border-radius: 12px;
}

.timestamp-attachment-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 52px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.timestamp-attachment-indicator:hover,
.timestamp-attachment-indicator:focus {
  border-color: var(--primary);
  background: #dbeafe;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .14);
  transform: translateY(-1px);
}

.timestamp-attachment-indicator svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-stamp-with-attachments {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.report-attachment-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  padding: 0;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-strong);
  cursor: pointer;
  line-height: 1;
  vertical-align: middle;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.report-attachment-indicator:hover,
.report-attachment-indicator:focus {
  border-color: var(--primary);
  background: #dbeafe;
  box-shadow: 0 5px 12px rgba(37, 99, 235, .16);
}

.report-attachment-indicator svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.report-anomaly-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(220, 38, 38, .26);
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  cursor: pointer;
  line-height: 1;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.report-anomaly-indicator:hover,
.report-anomaly-indicator:focus {
  border-color: var(--danger);
  background: var(--danger-soft);
  box-shadow: 0 5px 12px rgba(220, 38, 38, .14);
}

.report-anomaly-indicator svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.report-anomaly-message {
  min-height: 92px;
  padding: 16px;
  border: 1px solid rgba(220, 38, 38, .18);
  border-radius: 14px;
  background: var(--danger-soft);
  color: #7f1d1d;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.5;
  white-space: pre-wrap;
}

.timestamp-attachment-none {
  display: inline-flex;
  justify-content: center;
  min-width: 34px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.modal-form-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr minmax(120px, auto);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.modal-form-actions .btn {
  min-width: 122px;
}

.blazor-save-button {
  position: relative;
}

.blazor-save-button.is-busy {
  cursor: wait;
  opacity: .88;
}

.button-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 999px;
  animation: button-spinner-rotate .72s linear infinite;
}

@keyframes button-spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

.modal-form-actions .btn[data-close-modal],
.modal-form-actions .btn-outline-secondary {
  grid-column: 1;
  justify-self: start;
}

.modal-form-actions .btn[type="submit"],
.modal-form-actions .btn-primary,
.modal-form-actions .btn-danger {
  grid-column: 3;
  justify-self: end;
}

.modal-form-actions.has-danger {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-form-actions.has-danger > .btn-danger {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
  justify-self: start;
}

.modal-form-main-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.modal-form-actions:not(.has-danger) .modal-form-main-actions {
  grid-column: 3;
  justify-self: end;
}

.modal-form-actions.has-danger .modal-form-main-actions .btn,
.modal-form-actions.has-danger > .btn-danger {
  min-width: 122px;
}

.modal-form-actions.has-danger .modal-form-main-actions .btn-outline-secondary,
.modal-form-actions.has-danger .modal-form-main-actions .btn-primary,
.modal-form-actions.has-danger .modal-form-main-actions .btn-danger {
  grid-column: auto;
  justify-self: auto;
}

.modal-inline-alert {
  grid-column: 1 / -1;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(153, 27, 27, 0.08);
}

.editor-body > .modal-inline-alert,
.editor-body > .modal-inline-success,
.editor-body > .modal-inline-warning {
  margin-bottom: 14px;
}

.modal-inline-alert[hidden] {
  display: none !important;
}

.modal-inline-success {
  grid-column: 1 / -1;
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(4, 120, 87, 0.08);
}

.modal-inline-warning {
  grid-column: 1 / -1;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.92rem;
  font-weight: 850;
  line-height: 1.35;
  box-shadow: 0 10px 22px rgba(154, 52, 18, 0.08);
}

.form-feedback {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.35;
}

.form-feedback > strong {
  flex: 0 0 auto;
}

.form-feedback > span {
  min-width: 0;
}

.form-feedback-success {
  border: 1px solid #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.form-feedback-error,
.form-feedback-danger {
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.form-feedback-warning {
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.form-feedback-info {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.form-feedback-dismiss {
  margin: -4px -4px -4px auto;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.editor-dialog .form-grid > button[type="submit"],
.editor-dialog .form-grid > button[data-close-modal] {
  min-width: 122px;
  margin-top: 8px;
}

.editor-dialog .form-grid > button[data-close-modal] {
  grid-column: 1;
  justify-self: start;
}

.editor-dialog .form-grid > button[type="submit"] {
  grid-column: -2 / -1;
  justify-self: end;
}

.company-switch-list {
  display: grid;
  gap: 8px;
  overflow: auto;
  max-height: calc(100vh - 168px);
  padding: 16px;
}

.company-switch-list form {
  margin: 0;
}

.company-switch-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  padding: 10px;
  text-align: left;
}

button.company-switch-row:hover,
button.company-switch-row:focus-visible {
  border-color: var(--primary);
  background: #f4f8ff;
}

.company-switch-row.current {
  border-color: #bfd6fb;
  background: #eaf2ff;
}

.company-switch-row strong,
.company-switch-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.company-switch-row small {
  color: var(--muted);
  font-size: 12px;
}

body.editor-modal-open {
  overflow: hidden;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.work-surface,
.toolbar-surface,
.auth-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

/* Le card .metric della Dashboard usano token dedicati (bordo/radius/ombra piu' soft) definiti
   dallo spec di design della Dashboard: non condividono piu' l'aspetto generico .work-surface. */
.metric {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 18px 20px;
  min-height: auto;
}

.metric > span:first-child {
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.metric strong {
  color: #0f172a;
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1;
}

.metric-role-value {
  font-size: 22px !important;
  letter-spacing: -.01em;
  margin-top: auto;
}

.metric small {
  color: #64748b;
  font-size: 11.5px;
  font-weight: 600;
  margin-top: 11px;
}

.work-surface,
.toolbar-surface,
.auth-panel {
  margin-bottom: 16px;
  padding: 16px;
}

/* ===== Dashboard: header + context strip (design handoff "Dashboard NetHub360") ===== */
.dashboard-header-card {
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  overflow: hidden;
  margin-bottom: 16px;
}

.dashboard-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 16px 26px;
  border-bottom: 1px solid #e2e8f0;
}

.dashboard-header-left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.dashboard-header-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #2563eb;
}

.dashboard-header-title {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -.02em;
  color: #0f172a;
  line-height: 1.15;
  margin-top: 2px;
}

.dashboard-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.dashboard-refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #dbe3ee;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 9px;
  color: #334155;
}

.dashboard-refresh-button:disabled {
  opacity: .6;
  cursor: default;
}

.dashboard-refresh-icon {
  font-size: 14px;
  color: #2563eb;
}

.dashboard-context-strip {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  padding: 9px 26px;
  background: #fbfdff;
}

.dashboard-context-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(5, 150, 105, .14);
}

.dashboard-context-label {
  font-size: 12px;
  color: #334155;
  font-weight: 700;
}

.dashboard-context-sep {
  font-size: 12px;
  color: #cbd5e1;
}

.dashboard-context-time {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

.surface-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
  max-width: 100%;
  gap: 12px;
  margin-bottom: 12px;
}

.work-surface,
.settings-panel,
.settings-tab-shell,
.page-hero,
.compact-page-head,
.table-responsive {
  min-width: 0;
  max-width: 100%;
}

.surface-head > *,
.topbar > * {
  min-width: 0;
}

.surface-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
}

.surface-head span,
.surface-head p {
  color: var(--muted);
}

.surface-head p {
  margin: 4px 0 0;
  font-size: 13px;
}

.report-table-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.table-group-tools {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 7px 8px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: rgba(239, 246, 255, .82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.table-group-tools > span {
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.table-group-tools label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  cursor: pointer;
}

.table-group-tools input {
  accent-color: var(--primary);
}

.table-group-tools button {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 900;
  cursor: pointer;
}

.table-group-dropzone {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1 1 680px;
  min-width: min(100%, 680px);
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: rgba(239, 246, 255, .82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.table-group-dropzone > span {
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.table-group-drop-target {
  display: inline-flex;
  flex: 1 1 420px;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 50px;
  padding: 8px 10px;
  border: 2px dashed #bfdbfe;
  border-radius: 16px;
  background: #fff;
}

.table-group-drop-target em {
  padding: 0 8px;
  color: #64748b;
  font-style: normal;
  font-weight: 750;
}

.table-group-dropzone.is-drag-over .table-group-drop-target {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.table-group-dropzone [data-table-group-clear] {
  min-height: 30px;
  border: 0;
  background: transparent;
  color: var(--primary-strong);
  font-weight: 900;
  cursor: pointer;
}

.table-group-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
  cursor: grab;
}

.table-group-chip:active {
  cursor: grabbing;
}

.table-group-draggable {
  cursor: grab;
}

.table-group-draggable:active {
  cursor: grabbing;
}

.presence-stamps-table.is-group-return-target {
  outline: 3px dashed rgba(37, 99, 235, .35);
  outline-offset: 6px;
}

.report-summary-chip {
  background: #eef6ff;
  color: var(--text-main);
}

.surface-head .report-summary-chip {
  color: var(--text-main);
}

.report-hours-chip-warning {
  border-color: rgba(245, 158, 11, .36);
  background: rgba(245, 158, 11, .14);
  color: #92400e;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
}

.surface-head .report-hours-chip-warning {
  color: #92400e;
}

.surface-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.surface-head > .surface-actions {
  margin-left: auto;
}

.settings-action-button,
.settings-back-button,
.partner-action-button {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  min-height: 34px;
  padding-inline: 12px;
  white-space: nowrap;
}

.inline-action-form {
  display: inline-flex;
  margin: 0;
}

.info-callout {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: #f6f8fb;
}

.info-callout p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-row input {
  font-family: Consolas, "SFMono-Regular", "Segoe UI Mono", monospace;
  font-size: 13px;
}

.metric-number-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.metric-suffix {
  color: #94a3b8;
  font-size: 13px;
  font-weight: 700;
}

.metric-out-of-scope {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  box-shadow: none;
}

.metric-out-of-scope strong {
  color: #94a3b8;
  font-size: 16px;
  margin-top: auto;
}

.metric-out-of-scope small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.45;
  margin-top: 8px;
}

.dashboard-delta-row {
  display: flex;
  align-items: center;
  margin-top: 11px;
}

.dashboard-delta {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}

.dashboard-delta-up {
  background: #ecfdf5;
  color: #047857;
}

.dashboard-delta-down {
  background: #fef2f2;
  color: #dc2626;
}

.dashboard-delta-caption {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  margin-left: 7px;
}

.dashboard-range-switch {
  display: inline-flex;
  background: #e6edf5;
  border-radius: 9px;
  padding: 3px;
  gap: 2px;
}

.dashboard-range-switch button {
  border: none;
  cursor: pointer;
  background: transparent;
  color: #64748b;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 7px;
}

.dashboard-range-switch button.active {
  background: #fff;
  color: #2563eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .12);
}

.dashboard-chart-card {
  /* Contenitore di posizionamento per overlay interni dei grafici DevExpress
     (DxPieChart/DxChart): senza questo la card resta static e un eventuale
     overlay assoluto del grafico si ancora all'antenato posizionato piu'
     vicino piu' in alto nella pagina invece che alla card. */
  position: relative;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 20px 24px 12px;
  margin-bottom: 16px;
}

.dashboard-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 6px;
}

.dashboard-chart-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dashboard-chart-sub {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin: 2px 0 0;
}

.dashboard-chart-total {
  text-align: right;
  flex: 0 0 auto;
}

.dashboard-chart-total-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
}

.dashboard-chart-total-value {
  font-size: 21px;
  font-weight: 900;
  color: #2563eb;
  letter-spacing: -.02em;
  margin-top: 1px;
}

.dashboard-chart-total-suffix {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
  margin-left: 3px;
}

.dashboard-panels-3,
.dashboard-panels-2 {
  display: grid;
  gap: 16px;
}

.dashboard-panels-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.dashboard-panels-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-panel-card {
  position: relative;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 20px 22px;
}

.dashboard-panel-title {
  font-size: 14.5px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.dashboard-panel-sub {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  margin: 2px 0 18px;
}

.dashboard-panel-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-panel-total {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 700;
  white-space: nowrap;
}

.dashboard-donut-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.dashboard-donut-row.dashboard-donut-row-wide {
  gap: 26px;
}

.dashboard-donut-wrap {
  position: relative;
  flex-shrink: 0;
  width: 120px;
  height: 120px;
}

.dashboard-donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.dashboard-donut-center-value {
  font-size: 23px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1;
}

.dashboard-donut-center-label {
  font-size: 9.5px;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-top: 3px;
}

.dashboard-donut-svg {
  /* SVG a mano (stessa tecnica del mockup: cerchi con stroke-dasharray/stroke-dashoffset) al posto
     di DxPieChart, il cui contenitore non si vincolava in modo affidabile alla card. */
  display: block;
  width: 120px;
  height: 120px;
  transform: rotate(-90deg);
  flex-shrink: 0;
}

.dashboard-legend {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.dashboard-legend.dashboard-legend-wide {
  gap: 12px;
}

.dashboard-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.dashboard-legend-row.dashboard-legend-row-wide {
  gap: 9px;
  font-size: 13px;
}

.dashboard-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.dashboard-legend-row-wide .dashboard-legend-dot {
  width: 10px;
  height: 10px;
}

.dashboard-legend-label {
  color: #475569;
  font-weight: 600;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-legend-value {
  color: #0f172a;
  font-weight: 800;
}

.dashboard-legend-pct {
  color: #94a3b8;
  font-weight: 600;
  min-width: 36px;
  text-align: right;
}

.dashboard-bars {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 17px;
}

.dashboard-bars.dashboard-bars-wide {
  gap: 14px;
  margin-top: 18px;
}

.dashboard-bar-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 7px;
  gap: 12px;
}

.dashboard-bar-label {
  color: #475569;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.dashboard-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 2px;
  flex: 0 0 auto;
}

.dashboard-bar-value {
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}

.dashboard-bar-track {
  height: 8px;
  background: #eef3f9;
  border-radius: 999px;
  overflow: hidden;
}

.dashboard-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.dashboard-counter-card {
  display: flex;
  flex-direction: column;
  border: 1px solid #e6edf5;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
  padding: 20px 22px;
}

.dashboard-counter-card > .dashboard-panel-title {
  margin-bottom: 0;
}

.dashboard-counter-card > .dashboard-panel-sub {
  margin: 2px 0 0;
}

.dashboard-counter-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.dashboard-counter-pill {
  display: inline-flex;
  align-items: center;
  padding: 12px 18px;
  border-radius: 14px;
}

.dashboard-counter-pill-warning {
  background: #fffbeb;
}

.dashboard-counter-pill-ok {
  background: #ecfdf5;
}

.dashboard-counter-value {
  font-size: 44px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.03em;
}

.dashboard-counter-warning {
  color: #b45309;
}

.dashboard-counter-ok {
  color: #047857;
}

.dashboard-counter-caption {
  font-size: 12.5px;
  color: #64748b;
  font-weight: 600;
  margin-top: 13px;
}

.dashboard-counter-link {
  font-size: 12px;
  color: #2563eb;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid-wide {
  grid-column: span 2;
}

.standard-date-input {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.standard-date-input > label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

/* Nelle modal editor gli altri campi (Descrizione, Cliente, Importo, ...) hanno
   etichetta in maiuscoletto/sentence-case senza text-transform: la data, sola,
   spiccava in maiuscolo. Allineata alle altre per coerenza nella stessa form. */
.editor-dialog .standard-date-input > label {
  color: #334155;
  font-size: 12px;
  font-weight: 600;
  text-transform: none;
}

.standard-date-edit {
  min-width: 0;
  width: 100%;
}

.standard-date-edit-sm {
  font-size: 12px;
}

/* FIX DECISIVO: DevExpress renderizza i popup in DXBL-POPUP-ROOT a livello
   <body>, dentro un DXBL-POPUP-CELL con position:absolute; z-index:1050 che crea
   uno stacking context a 1050. La modal custom (.editor-modal) e' a z-index 1070:
   percio' tutto il popup-cell (1050) finisce DIETRO la modal e il calendario del
   DxDateEdit non si vede. Lo z-index interno del .dxbl-dropdown e' ininfluente
   perche' confinato nello stacking context del popup-cell. Quando una modal e'
   aperta alziamo il popup-cell sopra la modal: e' questo il punto reale. */
body.editor-modal-open .dxbl-popup-root,
body.editor-modal-open .dxbl-popup-cell {
  z-index: 13050 !important;
}

.editor-modal .dxbl-dropdown,
.editor-modal .dxbl-window,
.editor-modal .dxbl-flyout,
.editor-modal .dxbl-modal,
body.editor-modal-open .dxbl-dropdown,
body.editor-modal-open .dxbl-window,
body.editor-modal-open .dxbl-flyout,
body.editor-modal-open .dxbl-modal {
  z-index: 13050 !important;
}

.editor-modal .dxbl-modal > .dxbl-modal-root,
body.editor-modal-open .dxbl-modal > .dxbl-modal-root {
  z-index: 13060 !important;
}

.editor-modal .dxbl-dropdown > .dxbl-dropdown-dialog,
.editor-modal .dxbl-dropdown > .dxbl-dropdown-dialog.dxbl-edit-dropdown,
.editor-modal .dxbl-window > .dxbl-window-dialog,
.editor-modal .dxbl-modal > .dxbl-modal-root > .dxbl-popup,
.editor-modal .dxbl-modal > .dxbl-modal-root > .dxbl-popup.dxbl-edit-dropdown,
.editor-modal .dxbl-modal > .dxbl-modal-root > .dxbl-popup.dxbl-edit-dropdown > .dxbl-modal-content,
.editor-modal .standard-date-dropdown,
.editor-modal .standard-date-dropdown-body,
body.editor-modal-open .dxbl-dropdown > .dxbl-dropdown-dialog,
body.editor-modal-open .dxbl-dropdown > .dxbl-dropdown-dialog.dxbl-edit-dropdown,
body.editor-modal-open .dxbl-window > .dxbl-window-dialog,
body.editor-modal-open .dxbl-modal > .dxbl-modal-root > .dxbl-popup,
body.editor-modal-open .dxbl-modal > .dxbl-modal-root > .dxbl-popup.dxbl-edit-dropdown,
body.editor-modal-open .dxbl-modal > .dxbl-modal-root > .dxbl-popup.dxbl-edit-dropdown > .dxbl-modal-content,
body.editor-modal-open .standard-date-dropdown,
body.editor-modal-open .standard-date-dropdown-body {
  z-index: 13061 !important;
}

.standard-date-input-validation {
  color: #dc2626;
  font-size: 12px;
  font-weight: 750;
}

.check-line {
  align-self: center;
  display: flex;
  flex-direction: row-reverse;
  gap: 8px;
  align-items: center;
  min-height: 38px;
}

.field-hint {
  color: var(--warning);
  font-size: 11px;
  font-weight: 700;
}

.compact-form {
  max-width: 460px;
  grid-template-columns: 1fr;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
}

.report-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  align-self: end;
  min-height: 38px;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f8fafc;
}

.report-view-switch legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip: rect(0 0 0 0);
}

.report-view-switch label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 118px;
  min-height: 30px;
  margin: 0;
  padding: 4px 12px;
  border-radius: 999px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}

.report-view-switch label.active {
  background: #fff;
  color: var(--primary-strong);
  box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
}

.report-view-switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 600;
}

.form-control,
.form-select,
.menu-search input,
.table-search {
  border-color: var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-weight: 400;
}

input:not([type="button"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]),
select,
textarea,
.dxbl-text-edit input {
  font-weight: 400;
}

.form-control::placeholder,
.form-select::placeholder,
.menu-search input::placeholder,
.table-search::placeholder,
input::placeholder,
textarea::placeholder,
.dxbl-text-edit input::placeholder {
  font-weight: 400;
}

.form-control:disabled,
.form-control[readonly],
.form-select:disabled,
input:disabled:not([type="hidden"]),
input[readonly]:not([type="hidden"]),
select:disabled,
textarea:disabled,
textarea[readonly],
.dxbl-text-edit.dxbl-disabled,
.dxbl-text-edit.dxbl-readonly,
.dxbl-text-edit.dxbl-disabled input,
.dxbl-text-edit.dxbl-readonly input {
  background: transparent !important;
  color: var(--text) !important;
  font-weight: 400 !important;
  opacity: 1 !important;
  -webkit-text-fill-color: var(--text) !important;
}

.form-control:focus,
.form-select:focus,
.menu-search input:focus,
.table-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
}

.blazor-combo-box.dxbl-text-edit {
  width: 100%;
  min-height: 38px;
  border-color: var(--border);
  border-radius: var(--radius);
  color: var(--text);
  background-color: #fff;
}

.blazor-combo-box.dxbl-text-edit:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
}

.blazor-combo-box.dxbl-text-edit .dxbl-btn-group-right,
.blazor-combo-box.dxbl-text-edit .dxbl-edit-btn-dropdown {
  border-left: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.blazor-combo-box.dxbl-text-edit .dxbl-edit-btn-dropdown {
  color: var(--muted);
}

.blazor-combo-box.dxbl-text-edit .dxbl-edit-btn-dropdown:hover,
.blazor-combo-box.dxbl-text-edit .dxbl-edit-btn-dropdown:focus-visible {
  color: var(--primary);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: var(--radius);
  font-weight: 750;
  white-space: nowrap;
}

.btn::first-letter {
  text-transform: uppercase;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
  border-color: var(--primary-strong);
  background: var(--primary-strong);
  color: #fff;
}

.btn-outline-primary {
  border-color: #bcd4ff;
  color: var(--primary);
  background: #fff;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.btn-outline-secondary {
  border-color: var(--border-strong);
  color: #475569;
  background: #fff;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
  border-color: #94a3b8;
  background: #f8fafc;
  color: var(--text);
}

.btn-danger,
.btn-outline-danger:hover,
.btn-outline-danger:focus {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.btn-outline-danger {
  border-color: #fecaca;
  color: var(--danger);
  background: #fff;
}

.compact-filter {
  max-width: 220px;
}

.tag-list,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.tag-list {
  margin-top: 8px;
}

.settings-page-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-page-head h2 {
  margin: 3px 0 4px;
  font-size: 22px;
  font-weight: 800;
}

.settings-page-head p {
  margin: 0;
  color: var(--muted);
}

.settings-form-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 16px;
  align-items: start;
}

.settings-main,
.settings-side {
  display: grid;
  gap: 16px;
}

.settings-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.settings-panel.compact {
  display: grid;
  gap: 8px;
}

.settings-panel.compact p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.settings-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}

.settings-panel-head h3 {
  margin: 2px 0 0;
  font-size: 17px;
  font-weight: 800;
}

.settings-panel-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
}

.settings-panel-subhead h4 {
  margin: 2px 0 0;
  font-size: 15px;
  font-weight: 800;
}

.settings-form-grid,
.list-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.settings-day-schedule {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-soft);
}

.settings-form-grid > .settings-day-schedule.span-2,
.form-grid > .settings-day-schedule.admin-wide {
  grid-column: 1 / -1;
}

.settings-day-schedule__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.settings-day-schedule__header strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.settings-day-schedule__header span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.settings-day-schedule__rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.settings-day-schedule__row {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.settings-day-schedule__row span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.company-two-factor-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(240px, 1fr) minmax(160px, 220px) auto;
}

.company-two-factor-method {
  align-self: stretch;
}

.company-two-factor-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.list-filter-grid {
  grid-template-columns: repeat(6, minmax(140px, 1fr));
}

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.field span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.field.span-2 {
  grid-column: span 2;
}

.field input:disabled,
.field select:disabled,
.field textarea:disabled {
  background: transparent;
  color: var(--text);
  border-style: solid;
  font-weight: 400;
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.color-preview-input {
  border-left: 18px solid var(--primary);
}

.color-preview-input.secondary {
  border-left-color: var(--teal);
}

.upload-placeholder {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 220px;
  padding: 18px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface-soft);
  text-align: center;
  color: var(--muted);
}

.upload-mark {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 30px;
  font-weight: 800;
}

.logo-preview-image {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px;
}

.upload-input {
  max-width: 100%;
  margin-top: 6px;
}

.company-logo-input {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.company-logo-preview {
  display: grid;
  place-items: center;
  flex: 0 0 96px;
  width: 96px;
  height: 96px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.company-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
}

.company-logo-preview span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 24px;
  font-weight: 800;
}

.company-logo-control {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 6px;
}

.company-logo-error {
  color: var(--danger);
  font-weight: 700;
}

.settings-actions {
  display: grid;
  gap: 8px;
}

.settings-actions.horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.settings-tab-shell {
  margin: 0 0 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #f8fafc;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}

.settings-tabs {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  margin-bottom: 16px;
  overflow: visible;
  scrollbar-width: none;
}

.settings-tab-shell .settings-tabs,
.surface-head .settings-tabs,
.commesse-detail-nav .settings-tabs {
  margin-bottom: 0;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab {
  position: relative;
  flex: 1 1 0;
  min-height: 48px;
  min-width: max-content;
  padding: 0 18px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  white-space: nowrap;
}

.settings-tab:hover {
  background: #eef5ff;
  color: var(--primary);
}

.settings-tab.active {
  background: #fff;
  color: var(--text);
  box-shadow: inset 0 -3px var(--primary);
}

.settings-tab.active::before {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 1px;
  background: #fff;
}

.partner-company-tabs {
  padding: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #eaf0f8;
}

.partner-company-tabs .settings-tab {
  border-right-color: #cbd5e1;
  border-radius: 6px;
  color: #334155;
}

.partner-company-tabs .settings-tab:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.partner-company-tabs .settings-tab.active {
  background: #fff;
  color: #0f172a;
  box-shadow: inset 0 -3px #2563eb, 0 1px 2px rgba(15, 23, 42, 0.08);
}

.company-tab-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.company-tab {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-align: left;
}

.company-tab span,
.company-tab small {
  color: var(--muted);
  font-size: 12px;
}

.company-tab.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.company-tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
}

.company-tab-actions form {
  margin: 0;
}

.favorite-star {
  color: #cbd5e1;
  font-size: 22px;
  line-height: 1;
}

.favorite-star.active {
  color: var(--warning);
}

.favorites-help-panel {
  max-width: 980px;
}

.favorite-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.favorite-summary-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.favorite-summary-item > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #fffbeb;
  color: var(--warning);
}

.favorite-summary-item strong,
.favorite-summary-item small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.favorite-summary-item small {
  color: var(--muted);
  font-weight: 750;
}

.empty-table-state {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.empty-table-state .inline-action-form {
  margin-top: 10px;
}

.expense-payment-options {
  display: grid;
  gap: 8px;
}

.expense-payment-options > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.expense-payment-option {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px 12px;
  color: var(--text);
}

.expense-payment-option input[type="checkbox"] {
  grid-column: 2;
  grid-row: span 2;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.expense-payment-option strong {
  font-size: 14px;
  font-weight: 950;
}

.expense-payment-option small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.expense-page-head {
  margin-bottom: 12px;
}

.expense-month-strip {
  margin-bottom: 12px;
}

.expense-month-card {
  position: relative;
  min-width: 150px;
  text-decoration: none;
}

.expense-month-card em {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary-strong);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.expense-month-card.active em {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.expense-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.expense-context-bar {
    align-items: center;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe3ee;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(15, 23, 42, .05);
    display: flex;
    justify-content: space-between;
    margin-bottom: 14px;
    padding: 12px 16px;
}

.expense-context-company,
.expense-context-brand {
    align-items: center;
    display: flex;
    gap: 10px;
}

.expense-context-brand {
    justify-content: flex-end;
    text-align: right;
}

.expense-context-logo {
    align-items: center;
    background: #eaf2ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    color: #1d4ed8;
    display: inline-flex;
    font-weight: 900;
    height: 38px;
    justify-content: center;
    min-width: 38px;
}

.expense-context-bar small {
    color: #64748b;
    display: block;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1.1;
    text-transform: uppercase;
}

.expense-context-bar strong {
    color: #0f172a;
    display: block;
    font-weight: 900;
}

.expense-summary-card {
  display: grid;
  gap: 4px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .045);
}

.expense-summary-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.expense-summary-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-summary-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.expense-detail-total-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 10px;
  margin: 0 0 14px;
}

.expense-total-card {
  display: grid;
  gap: 4px;
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}

.expense-detail-total-grid .expense-total-card {
  justify-items: end;
  text-align: right;
}

.expense-total-card span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.expense-total-card strong {
  color: #0f172a;
  font-size: 20px;
  font-weight: 950;
}

.expense-total-card small {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.expense-total-card.regular {
  background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.expense-total-card.mileage {
  background: linear-gradient(135deg, #ffffff 0%, #eff6ff 100%);
}

.expense-total-card.period {
  background: linear-gradient(135deg, #ffffff 0%, #fff7ed 100%);
}

.expense-total-card.approved {
  background: linear-gradient(135deg, #ffffff 0%, #f5f3ff 100%);
}

.expense-notes-grid {
  grid-template-columns: minmax(360px, .78fr) minmax(0, 1.22fr);
  align-items: start;
}

.expense-approval-list-layout {
  display: block;
  width: 100%;
}

.expense-approval-list-layout .expense-note-list-surface {
  max-width: none;
  width: 100%;
}

.expense-note-list-surface,
.expense-note-detail-surface,
.work-surface:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)),
.work-surface:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)),
.settings-panel:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)),
.settings-panel:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.expense-approval-head .quick-actions {
  justify-content: flex-end;
}

.expense-approval-surface {
  box-shadow: 0 16px 34px rgba(15, 23, 42, .07);
}

.expense-full-surface {
    margin-bottom: 16px;
    max-width: none;
    width: 100%;
}

.expense-approval-filters {
    align-items: end;
    background: #f8fbff;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, .8fr) auto auto;
    margin: 0 0 14px;
    padding: 12px;
}

.expense-approval-filters label {
    color: #334155;
    font-size: .78rem;
    font-weight: 800;
    margin: 0;
}

.approval-amount-form {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.approval-amount-form .form-control {
    max-width: 110px;
    text-align: right;
}

.expense-note-list-surface::before,
.expense-note-detail-surface::before,
.work-surface:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before,
.work-surface:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before,
.settings-panel:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before,
.settings-panel:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table))::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0f766e);
  opacity: .88;
}

.expense-note-table:has(thead th:nth-child(5)),
.expense-rows-table:has(thead th:nth-child(5)) {
  /* La tabella deve dimensionarsi sul contenuto e non riempire forzatamente il
     contenitore: con min-width:100% su schermi larghi lo spazio in eccesso veniva
     ridistribuito sulle colonne (soprattutto quella azioni) creando grossi vuoti. */
  min-width: 0;
}

.expense-note-list-surface .surface-head {
  gap: 12px;
  padding-bottom: 14px;
}

.expense-note-list-surface .surface-head,
.expense-note-detail-surface .surface-head {
  align-items: flex-start;
  flex-direction: column;
}

.expense-note-detail-surface .surface-head.expense-detail-toolbar {
  align-items: center;
  flex-direction: row;
  justify-content: flex-end;
  margin-bottom: 14px;
  padding-bottom: 0;
}

.expense-note-detail-surface .expense-detail-actions {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  margin-left: auto;
  width: 100%;
}

.expense-back-text-button {
  background: #fff;
  border-color: #cfe0ff;
  color: #334155;
  min-height: 34px;
  padding-inline: 14px;
  white-space: nowrap;
}

.expense-back-text-button:hover,
.expense-back-text-button:focus-visible {
  background: #f8fbff;
  border-color: #9bbcff;
  color: #1e40af;
}

.expense-note-list-surface .surface-head {
  align-items: center;
  flex-direction: row;
  justify-content: space-between;
}

.work-surface:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .surface-head,
.work-surface:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .surface-head,
.settings-panel:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .surface-head,
.settings-panel:has(> .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .settings-panel-head,
.settings-panel:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .surface-head,
.settings-panel:has(> .standard-table-shell > .table-responsive > .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) > .settings-panel-head {
  align-items: center;
  flex-direction: row;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.expense-note-detail-surface .surface-head {
  align-items: flex-start;
  flex-direction: column;
}

.expense-note-list-surface .surface-head p,
.expense-note-detail-surface .surface-head p {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
  margin-top: 2px;
}

.expense-note-list-surface .surface-actions {
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
  white-space: nowrap;
}

.expense-toolbar-button {
  min-height: 34px;
}

.expense-note-list-surface .table-responsive,
.expense-note-detail-surface .table-responsive {
  border-radius: 12px;
}

.expense-header-table:has(thead th:nth-child(5)) {
  min-width: 0;
}

.settings-table:has(thead th:nth-child(5)) {
  min-width: 0;
}

.table-command-bar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}

.plan-procedure-hint {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 13px;
}

/* Icona di menu caricata come file (/menu-icone/{id}): a differenza delle icone di sistema, che sono
   SVG inline colorati dal CSS, questa e' un'immagine e mantiene i propri colori. */
.menu-icon-image {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.menu-icon-preview {
  width: 28px;
  height: 28px;
  object-fit: contain;
  display: block;
}

.table-toolbar-split {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 0 0 14px;
  width: 100%;
}

.table-toolbar-left,
.table-toolbar-right {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.table-toolbar-left {
  justify-content: flex-start;
}

.table-toolbar-right {
  justify-content: flex-end;
  margin-left: auto;
}

.manual-toolbar .surface-head {
  margin-bottom: 10px;
}

.manual-search-panel {
  margin-bottom: 16px;
}

.manual-search-row {
  align-items: center;
  display: flex;
  gap: 8px;
  max-width: 760px;
  width: 100%;
}

.manual-search-input {
  flex: 1 1 auto;
  min-width: 0;
}

.manual-layout {
  align-items: flex-start;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
}

.manual-layout.article-layout {
  grid-template-columns: minmax(280px, 330px) minmax(0, 1fr);
}

.manual-layout.management-layout {
  grid-template-columns: minmax(0, 1fr);
  justify-items: stretch;
}

.manual-layout.management-layout .manual-article-surface {
  width: 100%;
}

.manual-sidebar {
  max-height: calc(100vh - 112px);
  overflow: auto;
  position: sticky;
  top: 84px;
}

.manual-nav {
  display: grid;
  gap: 12px;
}

.manual-nav-section {
  display: grid;
  gap: 6px;
}

.manual-nav-section-title {
  background: transparent;
  border: 0;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  padding: 0;
  text-align: left;
  width: 100%;
}

.manual-nav-section-title {
  align-items: flex-end;
  gap: 8px;
}

.manual-nav-section-title span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.manual-nav-section-title small {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 11px;
  font-weight: 800;
}

.manual-nav-section-title:hover span,
.manual-nav-section-title:focus span {
  color: var(--primary);
  outline: none;
}

.manual-nav-link {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

a.manual-nav-link {
  text-decoration: none !important;
}

.manual-nav-link:hover,
.manual-nav-link:focus {
  border-color: #9bb8f5;
  outline: none;
}

.manual-nav-link.active {
  background: #eef5ff;
  border-color: #2563eb;
}

.manual-nav-link strong {
  font-size: 13px;
  line-height: 1.25;
}

.manual-result-card em,
.manual-nav-link span,
.manual-nav-link small,
.manual-article-meta {
  color: var(--muted);
  font-size: 12px;
}

.manual-article-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.manual-state-pill {
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
}

.manual-state-pill.published {
  background: #dcfce7;
  color: #166534;
}

.manual-state-pill.draft {
  background: #fef3c7;
  color: #92400e;
}

.manual-article-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.7;
  max-width: none;
}

.manual-article-body img {
  border: 1px solid var(--border);
  border-radius: 8px;
  display: block;
  height: auto;
  margin: 4px 0 12px;
  max-width: 100%;
}

.manual-reader-grid {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
}

.manual-reader-grid.has-index {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
}

.manual-article-main {
  min-width: 0;
}

.manual-article-body h2,
.manual-article-body h3 {
  color: var(--text);
  font-weight: 850;
  letter-spacing: 0;
  margin: 18px 0 8px;
  scroll-margin-top: 96px;
}

.manual-article-body h2:first-child,
.manual-article-body h3:first-child {
  margin-top: 0;
}

.manual-article-body p,
.manual-article-body ul,
.manual-article-body ol,
.manual-article-body table {
  margin-bottom: 12px;
}

.manual-article-body table {
  border-collapse: collapse;
  width: 100%;
}

.manual-article-body th,
.manual-article-body td {
  border: 1px solid var(--border);
  padding: 7px 9px;
  vertical-align: top;
}

.manual-article-body th {
  background: #f8fafc;
  font-weight: 800;
}

.novita-page {
  display: grid;
  gap: 0;
}

.novita-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.novita-item:first-child {
  padding-top: 4px;
}

.novita-item:last-child {
  border-bottom: none;
}

.novita-item-header {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}

.novita-version {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
}

.novita-type-chip {
  font-size: 11px;
}

.novita-date {
  color: var(--muted);
  font-size: 12.5px;
  margin-left: auto;
}

.novita-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
}

.novita-changelog {
  color: var(--text);
  font-size: 14px;
  line-height: 1.65;
}

.novita-changelog p,
.novita-changelog ul,
.novita-changelog ol {
  margin: 0 0 10px;
}

.novita-changelog ul,
.novita-changelog ol {
  padding-left: 20px;
}

.novita-changelog p:last-child,
.novita-changelog ul:last-child,
.novita-changelog ol:last-child {
  margin-bottom: 0;
}

.novita-load-more {
  padding-top: 8px;
  text-align: center;
}

.manual-home,
.manual-results {
  display: grid;
  gap: 16px;
}

.manual-result-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  text-align: left;
  text-decoration: none;
  width: 100%;
}

a.manual-result-card {
  text-decoration: none !important;
}

.manual-result-card span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.manual-result-list {
  display: grid;
  gap: 8px;
}

.manual-result-card strong {
  font-size: 15px;
  line-height: 1.25;
}

.manual-result-card:hover,
.manual-result-card:focus {
  border-color: #9bb8f5;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  outline: none;
}

.manual-results-editorial {
  max-width: 660px;
  margin: 0 auto;
}

.manual-results-editorial .manual-result-card {
  gap: 6px;
  padding: 16px 18px;
  border-radius: 12px;
}

.manual-results-editorial .manual-result-eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.manual-results-editorial .manual-result-card strong {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text);
}

.manual-result-snippet {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.55;
}

.manual-tree {
  display: grid;
  gap: 8px;
}

.manual-dx-tree {
  color: var(--text);
  font: inherit;
}

/* DxTreeView possiede il proprio markup: la riga cliccabile e' [role="treeitem"],
   non una classe nostra. Lo stile riga/hover/marker va agganciato li', non su
   classi custom che DxTreeView non applica mai. Sezioni e foglie condividono la
   riga base; solo le foglie ricevono il rientro extra (badge/chevron delle
   sezioni sono contenuto reale nel NodeTemplate, non piu' un ::before CSS). */
.manual-dx-tree [role="treeitem"] {
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  gap: 8px;
  padding: 8px 10px;
  transition: background-color .12s ease, border-color .12s ease;
}

.manual-dx-tree [role="treeitem"]:has(.manual-tree-leaf) {
  padding-left: 42px;
}

.manual-dx-tree [role="treeitem"]:hover,
.manual-dx-tree [role="treeitem"]:focus-visible {
  background: #f8fbff;
  border-color: #dbeafe;
  outline: none;
}

.manual-dx-tree [role="treeitem"]:has(.manual-tree-leaf.active) {
  background: #eff6ff;
  border-color: transparent;
  box-shadow: inset 2px 0 0 var(--primary);
}

.manual-tree-main {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  width: 100%;
}

.manual-tree-section {
  gap: 9px;
}

.manual-tree-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 23px;
  height: 23px;
  border-radius: 999px;
  background: #eef3f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.manual-dx-tree [role="treeitem"][aria-expanded="true"] .manual-tree-badge {
  background: var(--primary);
  color: #fff;
}

.manual-tree-section strong {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.25;
}

.manual-tree-chevron {
  flex: 0 0 auto;
  color: #c0ccda;
  font-size: 16px;
  line-height: 1;
  transition: transform .18s ease, color .18s ease;
}

.manual-dx-tree [role="treeitem"][aria-expanded="true"] .manual-tree-chevron {
  color: var(--primary);
  transform: rotate(90deg);
}

.manual-tree-leaf strong {
  flex: 1 1 auto;
  min-width: 0;
  color: #475569;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
}

.manual-tree-leaf small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.manual-tree-leaf.active strong {
  color: #1d4ed8;
  font-weight: 700;
}

.manual-article-index {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  margin-bottom: 0;
  padding: 13px 15px;
}

.manual-article-index:empty {
  display: none;
}

.manual-article-index span {
  color: var(--muted);
  display: block;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.manual-article-index ol {
  display: grid;
  font-size: 13px;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.manual-article-index li.nested {
  margin-left: 14px;
}

.manual-article-index a {
  color: var(--primary-strong);
  font-weight: 800;
  text-decoration: none;
}

.manual-article-index a:hover,
.manual-article-index a:focus {
  text-decoration: underline;
}

.manual-reader-grid .manual-article-index {
  max-height: calc(100vh - 132px);
  overflow: auto;
  position: sticky;
  top: 92px;
}

.manual-editorial {
  max-width: 660px;
  margin: 0 auto;
  padding: 6px 4px 8px;
}

.manual-editorial-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 16px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
}

.manual-editorial-breadcrumb a {
  color: #94a3b8;
  text-decoration: none;
}

.manual-editorial-breadcrumb a:hover,
.manual-editorial-breadcrumb a:focus-visible {
  color: var(--primary);
  text-decoration: underline;
}

.manual-editorial-eyebrow {
  margin: 0 0 10px;
  text-align: center;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
}

.manual-editorial-title {
  margin: 0 0 16px;
  text-align: center;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 38px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  text-wrap: balance;
}

.manual-editorial-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 24px;
  font-size: 13px;
  color: var(--muted);
}

.manual-editorial-meta-sep {
  color: #cbd5e1;
}

.manual-editorial-lead {
  margin: 0 0 28px;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.7;
  color: #475569;
}

.manual-editorial-chips {
  margin: 0 0 32px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.manual-editorial-chips-label {
  display: block;
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}

.manual-editorial-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.manual-editorial-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .12s ease, border-color .12s ease, color .12s ease;
}

.manual-editorial-chip:hover,
.manual-editorial-chip:focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
  outline: none;
}

.manual-editorial-chip.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.manual-editorial-body {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.75;
  color: #334155;
}

.manual-editorial-body h2,
.manual-editorial-body h3,
.manual-editorial-body h4 {
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  color: var(--text);
  line-height: 1.3;
}

.manual-editorial-body h2 {
  margin: 40px 0 14px;
  font-size: 26px;
  font-weight: 700;
}

.manual-editorial-body h2:first-child {
  margin-top: 0;
}

.manual-editorial-body h3 {
  margin: 32px 0 12px;
  font-size: 21px;
  font-weight: 700;
}

.manual-editorial-body h4 {
  margin: 26px 0 10px;
  font-size: 18px;
  font-weight: 700;
}

.manual-editorial-body p {
  margin: 0 0 18px;
}

.manual-editorial-body ul,
.manual-editorial-body ol {
  margin: 0 0 18px;
  padding-left: 24px;
}

.manual-editorial-body li {
  margin-bottom: 6px;
}

.manual-editorial-body a {
  color: var(--primary);
}

.manual-editorial-body img {
  max-width: 100%;
  border-radius: 10px;
}

.manual-editorial-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 20px;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
}

.manual-editorial-body th,
.manual-editorial-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}

.manual-callout {
  display: flex;
  gap: 12px;
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 12px;
  font-family: "Inter", system-ui, sans-serif;
}

.manual-callout-icon {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 999px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.manual-callout-body {
  min-width: 0;
}

.manual-callout-body strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  font-weight: 800;
}

.manual-callout-body p {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}

.manual-callout.tip {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.manual-callout.tip .manual-callout-icon {
  background: var(--primary);
}

.manual-callout.tip .manual-callout-icon::before {
  content: "i";
}

.manual-callout.tip .manual-callout-body strong {
  color: #1d4ed8;
}

.manual-callout.warn {
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.manual-callout.warn .manual-callout-icon {
  background: #f97316;
}

.manual-callout.warn .manual-callout-icon::before {
  content: "!";
}

.manual-callout.warn .manual-callout-body strong {
  color: #c2410c;
}

.manual-callout.note {
  background: #f8fafc;
  border: 1px solid var(--border);
}

.manual-callout.note .manual-callout-icon {
  background: #94a3b8;
}

.manual-callout.note .manual-callout-icon::before {
  content: "•";
}

.manual-callout.note .manual-callout-body strong {
  color: #475569;
}

.manual-editorial-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 40px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  font-family: "Inter", system-ui, sans-serif;
}

.manual-pager-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: border-color .12s ease, background-color .12s ease;
}

.manual-pager-card:hover,
.manual-pager-card:focus-visible {
  border-color: #bfdbfe;
  background: #f8fbff;
  outline: none;
}

.manual-pager-card strong {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
}

.manual-pager-next {
  grid-column: 2;
  align-items: flex-end;
  text-align: right;
}

.manual-pager-direction {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--primary);
}

.manual-pager-spacer {
  grid-column: 1;
}

.manual-editor-form {
  display: grid;
  gap: 14px;
}

.manual-editor-page {
  display: grid;
  gap: 14px;
}

.manual-editor-surface {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.manual-editor-field {
  display: grid;
  gap: 6px;
}

.manual-editor-primary-grid {
  align-items: end;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(320px, 2fr) minmax(220px, 1fr) minmax(160px, auto);
}

.manual-editor-title-field,
.manual-editor-module-field,
.manual-editor-summary-field,
.manual-editor-advanced-grid {
  align-items: start;
  width: 100%;
}

.manual-editor-title-field,
.manual-editor-module-field,
.manual-editor-summary-field,
.manual-editor-advanced-grid > * {
  min-width: 0;
}

.manual-editor-summary-field textarea {
  min-height: 68px;
  resize: vertical;
}

.manual-editor-publish {
  align-items: center;
  align-self: end;
  justify-content: space-between;
  min-height: 44px;
  width: 100%;
}

.manual-editor-advanced {
  border-top: 1px solid var(--border);
  margin-top: 2px;
  padding-top: 12px;
}

.manual-editor-advanced summary,
.manual-editor-preview summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.manual-editor-advanced-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-top: 12px;
}

.manual-editor-preview {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.manual-wysiwyg-editor {
  box-sizing: border-box;
  min-height: 620px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.release-changelog-field {
  grid-template-columns: minmax(0, 1fr) !important;
  margin-top: 2px;
}

.release-changelog-editor {
  box-sizing: border-box;
  min-height: 320px;
  max-width: 100%;
  min-width: 0;
  width: 100%;
}

.release-editor-advanced {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 12px;
}

.release-editor-advanced summary {
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.release-editor-advanced-grid {
  grid-template-columns: minmax(0, 1fr) !important;
  margin-top: 12px;
}

.manual-native-html-editor {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.manual-editor-actions {
  background: transparent;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.manual-confirm-dialog {
  width: min(560px, 100%);
}

.manual-empty-state {
  min-height: 120px;
}

.manual-structure {
  display: grid;
  gap: 12px;
}

.manual-structure-table-wrapper {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  max-width: 100%;
  overflow: auto;
  width: 100%;
}

.manual-structure-table {
  min-width: 760px !important;
}

.manual-structure-table th,
.manual-structure-table td {
  vertical-align: middle;
}

.manual-structure-table tbody tr.manual-structure-row > td {
  background: var(--node-row-bg, #fff) !important;
  border-color: var(--node-row-border, #e8eef7);
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease;
}

.manual-structure-row {
  --node-indent: calc(var(--node-level, 0) * 34px);
  --node-row-bg: #fff;
  --node-row-border: #e8eef7;
  --node-marker: #dbe3ee;
}

.manual-structure-row:nth-child(even) {
  --node-row-bg: #f8fbff;
}

.manual-structure-row:hover {
  --node-row-bg: #f1f6ff;
  --node-row-border: #dbeafe;
}

.manual-structure-row.drop-target {
  --node-row-bg: #eff6ff;
  --node-row-border: #93c5fd;
}

.manual-structure-row.drag-source {
  opacity: .64;
  transform: scale(.995);
}

.manual-structure-table tbody tr.manual-structure-row.drag-source > td {
  outline: 1px dashed #93c5fd;
  outline-offset: -4px;
}

.manual-structure-table tbody tr.manual-structure-row.drop-target > td {
  border-top-color: var(--primary) !important;
  box-shadow: inset 0 3px 0 var(--primary), inset 0 0 0 999px rgba(37, 99, 235, .06), 0 8px 20px rgba(37, 99, 235, .10) !important;
}

.manual-structure-table tbody tr.manual-structure-row > td:first-child::after {
  background: var(--primary);
  border: 3px solid #dbeafe;
  border-radius: 999px;
  content: "";
  height: 13px;
  left: calc(var(--node-indent) + 2px);
  opacity: 0;
  position: absolute;
  top: -7px;
  transition: opacity .14s ease;
  width: 13px;
  z-index: 2;
}

.manual-structure-table tbody tr.manual-structure-row.drop-target > td:first-child::after {
  opacity: 1;
}

.manual-structure-row.grouped {
  --node-marker: #ef4444;
  font-weight: 800;
}

.manual-structure-row.standard {
  --node-marker: #cbd5e1;
  font-weight: 600;
}

.manual-structure-table tbody tr.manual-structure-row > td:first-child {
  background: linear-gradient(to right, transparent 0 var(--node-indent), var(--node-row-bg) var(--node-indent) 100%) !important;
  border-left-color: transparent;
  box-shadow: none !important;
  padding-left: calc(10px + var(--node-indent)) !important;
  position: relative;
}

.manual-structure-table tbody tr.manual-structure-row.drop-target > td:first-child {
  box-shadow: inset 0 3px 0 var(--primary), inset 0 0 0 999px rgba(37, 99, 235, .06) !important;
}

.manual-structure-table tbody tr.manual-structure-row > td:first-child::before {
  background: var(--node-marker);
  border-radius: 999px;
  bottom: 10px;
  content: "";
  left: calc(var(--node-indent) + 2px);
  position: absolute;
  top: 10px;
  width: 3px;
}

.manual-structure-table tbody tr.manual-structure-row.standard > td:first-child::before {
  opacity: .8;
  width: 2px;
}

.manual-structure-table .commesse-node-title {
  align-items: center;
  display: inline-flex;
  gap: 7px;
  max-width: 100%;
  min-width: 0;
}

.manual-structure-table .commesse-chevron {
  align-items: center;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  color: var(--primary-strong);
  display: inline-flex;
  font-size: 13px;
  font-weight: 950;
  height: 22px;
  flex: 0 0 auto;
  justify-content: center;
  line-height: 1;
  width: 22px;
}

.manual-structure-table .commesse-chevron.empty {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

.manual-structure-table .commesse-drag-handle {
  align-items: center;
  background: var(--surface);
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #64748b;
  cursor: grab;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 14px;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  user-select: none;
  width: 24px;
}

.manual-structure-table .commesse-drag-handle:hover,
.manual-structure-table .commesse-drag-handle:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: var(--primary-strong);
  outline: none;
}

.manual-structure-table .commesse-drag-handle:active {
  cursor: grabbing;
}

.manual-structure-table .commesse-drag-handle.disabled {
  cursor: not-allowed;
  opacity: .45;
}

.manual-structure-link,
.manual-structure-section-title {
  color: var(--text);
  font-weight: 850;
  min-width: 0;
}

.manual-structure-link {
  color: var(--primary-strong, #1d4ed8);
  text-decoration: none;
}

.manual-structure-link:hover,
.manual-structure-link:focus {
  text-decoration: underline;
}

.manual-structure-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.manual-structure-table .actions-cell {
  width: 1%;
}

@media (max-width: 900px) {
  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-layout.article-layout,
  .manual-reader-grid.has-index {
    grid-template-columns: 1fr;
  }

  .manual-sidebar {
    max-height: none;
    position: static;
  }

  .manual-reader-grid .manual-article-index {
    max-height: none;
    order: -1;
    position: static;
  }

  .manual-editor-primary-grid,
  .manual-editor-advanced-grid {
    grid-template-columns: 1fr;
  }

  .manual-editor-publish {
    justify-content: flex-start;
    width: fit-content;
  }
}

@media (max-width: 560px) {
  .manual-search-row {
    align-items: stretch;
    flex-direction: column;
  }

  .manual-search-input {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .manual-editorial-title {
    font-size: 28px;
  }

  .manual-editorial-lead {
    font-size: 17px;
  }

  .manual-editorial-meta {
    flex-wrap: wrap;
  }

  .manual-editorial-chip {
    min-height: 44px;
    padding: 10px 16px;
  }

  .manual-editorial-pager {
    grid-template-columns: 1fr;
  }

  .manual-pager-next {
    grid-column: 1;
    align-items: flex-start;
    text-align: left;
  }

  .manual-pager-card {
    min-height: 44px;
  }

  .manual-pager-spacer {
    display: none;
  }
}

.detail-command-bar {
  margin-bottom: 10px;
}

.expense-header-table th,
.expense-header-table td {
  padding: 8px 10px;
  vertical-align: middle;
}

.expense-header-table th,
.expense-header-table td,
.expense-rows-table th,
.expense-rows-table td {
  white-space: nowrap;
}

.expense-header-table td:nth-child(2),
.expense-rows-table td:nth-child(1),
.expense-rows-table td:nth-child(4) {
  white-space: normal;
}

.expense-header-table tbody td,
.expense-rows-table tbody td {
  font-size: 13px;
}

.expense-header-table tbody tr:nth-child(even) td,
.expense-rows-table tbody tr:nth-child(even) td {
  background: #fbfdff;
}

.expense-header-table tbody tr:hover td,
.expense-rows-table tbody tr:hover td {
  background: #f4f8ff;
}

.expense-rows-table tbody tr.expense-approval-row.pending td {
  background-color: #fff8eb !important;
  border-color: #fde7bd;
}

.expense-rows-table tbody tr.expense-approval-row.pending.company-card td {
  background-color: #eff6ff !important;
  border-color: #bfdbfe;
}

.expense-rows-table tbody tr.expense-approval-row.approved td {
  background-color: #ecfdf5 !important;
  border-color: #bbf7d0;
}

.expense-rows-table tbody tr.expense-approval-row.approved.company-card td {
  background-color: #eef6ff !important;
  border-color: #bfdbfe;
}

.expense-rows-table tbody tr.expense-approval-row.rejected td {
  background-color: #fff1f2 !important;
  border-color: #fecdd3;
}

.expense-header-table tbody tr.expense-note-state.pending td {
  background-color: #fff8eb !important;
  border-color: #fde7bd;
}

.expense-header-table tbody tr.expense-note-state.approved td {
  background-color: #ecfdf5 !important;
  border-color: #bbf7d0;
}

.expense-header-table tbody tr.expense-note-state.rejected td {
  background-color: #fff1f2 !important;
  border-color: #fecdd3;
}

.expense-header-table tbody tr.expense-note-state.pending td:first-child {
  box-shadow: inset 4px 0 0 #f59e0b;
}

.expense-header-table tbody tr.expense-note-state.approved td:first-child {
  box-shadow: inset 4px 0 0 #16a34a;
}

.expense-header-table tbody tr.expense-note-state.rejected td:first-child {
  box-shadow: inset 4px 0 0 #dc2626;
}

.expense-rows-table tbody tr.expense-approval-row.reimbursable td:first-child {
  box-shadow: inset 4px 0 0 #16a34a;
}

.expense-rows-table tbody tr.expense-approval-row.company-card td:first-child {
  box-shadow: inset 4px 0 0 #2563eb;
}

.expense-rows-table tbody tr.expense-approval-row.neutral td {
  background: #f8fafc;
}

.expense-rows-table tbody tr.expense-approval-row:hover td {
  filter: brightness(.985);
}

.expense-approval-legend {
  align-items: center;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  font-size: 11px;
  font-weight: 850;
  gap: 8px;
  justify-content: flex-start;
  margin: 0 0 10px;
}

.expense-approval-cell {
  align-items: flex-end;
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.15;
  min-width: 96px;
}

.expense-approval-cell strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 950;
}

.expense-approval-cell span {
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
}

.expense-approval-cell em {
  background: #eaf2ff;
  border-radius: 999px;
  color: #1d4ed8;
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
  padding: 3px 7px;
}

.expense-approval-legend span {
  align-items: center;
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  display: inline-flex;
  gap: 6px;
  line-height: 1;
  padding: 6px 9px;
}

.expense-approval-legend i {
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  width: 18px;
}

.expense-approval-legend i.approved {
  background: #bbf7d0;
}

.expense-approval-legend i.pending {
  background: #fde7bd;
}

.expense-approval-legend i.rejected {
  background: #fecdd3;
}

.expense-approval-legend i.company-card {
  background: #bfdbfe;
}

.expense-filter-row th {
  background: #f8fbff;
  padding: 6px 8px;
}

.expense-filter-row .form-control,
.expense-filter-row .form-select {
  border-color: #dbe3ee;
  border-radius: 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 650;
  min-height: 32px;
  min-width: 120px;
  padding: 5px 8px;
}

.expense-row-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 0 16px;
}

.expense-row-toolbar label {
  color: #64748b;
  display: grid;
  font-size: .78rem;
  font-weight: 850;
  gap: 5px;
  text-transform: uppercase;
}

.expense-row-toolbar input,
.expense-row-toolbar select {
  min-width: 150px;
}

.expense-sort-header {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
  text-transform: uppercase;
}

.expense-sort-header.align-end {
  text-align: right;
  width: 100%;
}

.expense-description-link {
  background: transparent;
  border: 0;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-weight: 850;
  padding: 0;
  text-align: left;
}

.expense-description-link:hover,
.expense-description-link:focus-visible {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.expense-description-link:disabled {
  cursor: wait;
  opacity: .7;
}

.expense-group-row td,
.smart-table-group-row td {
  background: #eaf4ff !important;
  border-block: 1px solid #bfdbfe;
  color: #1e3a8a;
  font-weight: 900;
  padding: 0 !important;
}

.expense-group-row.collapsed td,
.smart-table-group-row.collapsed td {
  background: #f8fafc !important;
}

.expense-group-toggle,
.smart-table-group-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  gap: 10px;
  min-height: 42px;
  padding: 8px 14px;
  text-align: left;
  width: calc(100% - 140px);
}

.expense-group-toggle:hover,
.expense-group-toggle:focus-visible,
.smart-table-group-toggle:hover,
.smart-table-group-toggle:focus-visible {
  color: #2563eb;
}

.expense-group-arrow,
.smart-table-group-arrow {
  align-items: center;
  background: #dbeafe;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-weight: 900;
  height: 24px;
  justify-content: center;
  line-height: 1;
  width: 24px;
}

.expense-group-row em,
.smart-table-group-row em {
  align-items: center;
  color: #0f172a;
  display: inline-flex;
  float: none;
  font-style: normal;
  font-weight: 900;
  justify-content: flex-end;
  min-height: 42px;
  min-width: 120px;
  padding-right: 14px;
  vertical-align: middle;
}

.smart-table-group-toolbar {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 0 12px;
}

.smart-table-group-toolbar select {
  min-width: 150px;
}

.expense-sort-header {
  align-items: center;
  background: transparent;
  border: 0;
  color: inherit;
  display: inline-flex;
  gap: 4px;
  font: inherit;
  font-weight: inherit;
  padding: 0;
  text-align: inherit;
  white-space: nowrap;
}

.expense-sort-header.align-end {
  justify-content: flex-end;
  width: 100%;
}

.expense-sort-header.align-center {
  justify-content: center;
  width: 100%;
}

.expense-sort-icon {
  color: #2563eb;
  display: inline-flex;
  height: 14px;
  line-height: 1;
  margin-left: 4px;
  vertical-align: -2px;
  width: 14px;
}

.expense-sort-icon svg {
  display: block;
  fill: none;
  height: 100%;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.35;
  width: 100%;
}

.expense-mini-col {
  text-align: center;
  width: 34px;
}

.expense-row-dot {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  display: inline-block;
  height: 12px;
  width: 12px;
}

.expense-row-dot.open {
  background: #dcfce7;
  border-color: #86efac;
}

.expense-row-dot.closed {
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.expense-header-table .row-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  gap: 6px;
  min-width: 120px;
  width: 100%;
  white-space: nowrap;
}

.expense-header-table .actions-col {
  min-width: 190px;
  text-align: right;
  width: 190px;
}

.expense-header-table .actions-cell {
  min-width: 190px;
  text-align: right;
  width: 190px;
}

.expense-header-table td:last-child {
  text-align: right;
}

.expense-header-table .expense-header-actions {
  display: grid;
  gap: 6px;
  grid-template-columns: minmax(132px, 1fr) 34px;
  justify-content: end;
  justify-items: end;
  margin-left: auto;
  min-width: 172px;
  width: 100%;
}

.expense-header-table .expense-header-actions.single-action {
  grid-template-columns: minmax(132px, 1fr) 34px;
}

.expense-header-table .expense-action-main-slot {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-height: 28px;
  min-width: 132px;
}

.expense-header-table .expense-action-icon-slot {
  align-items: center;
  display: flex;
  justify-content: flex-end;
  min-height: 28px;
  width: 34px;
}

.expense-rows-table .row-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-end;
  min-width: 72px;
  width: 100%;
  white-space: nowrap;
}

.expense-rows-table .actions-col,
.expense-rows-table .actions-cell {
  min-width: 104px;
  text-align: right;
  width: 104px;
}

.expense-attachment-actions {
  justify-content: center;
  min-width: 72px;
}

.btn-xs {
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.15;
  padding: 4px 8px;
}

.btn-icon-only {
  align-items: center;
  display: inline-flex;
  justify-content: center;
}

.expense-icon-button {
  flex: 0 0 34px;
  font-size: 15px;
  height: 34px;
  line-height: 1;
  padding: 0;
  width: 34px;
}

.blazor-edit-button {
  align-items: center;
  display: inline-flex;
  gap: 6px;
  white-space: nowrap;
}

.expense-approved-input {
  display: inline-block;
  min-width: 92px;
  max-width: 110px;
}

.expense-approved-readonly {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  justify-content: flex-end;
  min-width: 130px;
  white-space: nowrap;
}

.expense-approval-progress {
  display: grid;
  gap: 4px;
  min-width: 230px;
  max-width: 280px;
}

.expense-approval-progress-line {
  align-items: baseline;
  color: #64748b;
  display: grid;
  font-size: 11px;
  font-weight: 850;
  gap: 8px;
  grid-template-columns: 58px minmax(92px, 1fr) 40px;
}

.expense-approval-progress-line strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.expense-approval-progress-line em {
  color: #2563eb;
  font-style: normal;
  text-align: right;
}

.expense-approval-progress small {
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
}

.expense-approval-meter {
  background: #e2e8f0;
  border-radius: 999px;
  height: 5px;
  overflow: hidden;
}

.expense-approval-meter span {
  background: linear-gradient(90deg, #2563eb, #0f766e);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.expense-approval-meter.reimbursable span {
  background: linear-gradient(90deg, #059669, #16a34a);
}

.expense-toolbar-check {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  color: #334155;
  font-size: .78rem;
  font-weight: 850;
  min-height: 30px;
  padding: 4px 10px;
}

.expense-icon-button span {
  display: block;
  font-weight: 950;
  transform: translateY(-1px);
}

.expense-icon-button .button-icon-svg,
.partner-icon-button .button-icon-svg {
  display: block;
  fill: none;
  height: 18px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
  width: 18px;
}

.expense-icon-button.btn-primary,
.expense-icon-button.btn-primary span {
  color: #fff;
}

.expense-new-note-button {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding-inline: 14px;
  white-space: nowrap;
}

.expense-submit-button {
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  min-height: 36px;
  padding-inline: 14px;
  white-space: nowrap;
}

.expense-view-toggle.btn-light {
  background: #fff;
  border-color: #dbe3ee;
  color: #64748b;
}

.expense-view-toggle.btn-light:hover {
  background: #f8fbff;
  border-color: #bfdbfe;
  color: #2563eb;
}

.expense-view-toggle:focus,
.expense-view-toggle:active {
  box-shadow: none;
}

.partner-icon-button {
  flex: 0 0 34px;
  font-size: 15px;
  font-weight: 950;
  height: 34px;
  line-height: 1;
  margin-left: 4px;
  padding: 0;
  text-decoration: none;
  width: 34px;
}

.partner-icon-button span {
  display: block;
  transform: translateY(-1px);
}

.partner-icon-button.btn-outline-danger {
  color: #dc2626;
}

.partner-icon-button.btn-outline-success {
  color: #059669;
}

.partner-icon-button:disabled {
  opacity: .45;
}

.partner-company-name-button {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  text-align: left;
}

.partner-company-name-button:hover,
.partner-company-name-button:focus-visible {
  color: var(--primary-strong);
  text-decoration: none;
}

.table-name-link {
  color: inherit;
  font-weight: 650;
  text-decoration: none;
}

.table-name-link:hover,
.table-name-link:focus-visible {
  color: var(--primary-strong);
  text-decoration: none;
}

.partner-companies-table a.table-name-link,
.partner-companies-table a.table-name-link:hover,
.partner-companies-table a.table-name-link:focus-visible {
  text-decoration: none !important;
}

.row-edit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 24px;
  color: #2563eb;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.row-edit-link:hover,
.row-edit-link:focus-visible {
  color: #1d4ed8;
  text-decoration: none;
}

.data-table tbody tr :where(.row-edit-link, .row-edit-trigger) {
  opacity: 0;
  pointer-events: auto;
  transform: translateX(-2px);
  transition: opacity .12s ease, transform .12s ease;
}

.data-table tbody tr:hover :where(.row-edit-link, .row-edit-trigger),
.data-table tbody tr:focus-within :where(.row-edit-link, .row-edit-trigger),
.data-table tbody tr :where(.row-edit-link, .row-edit-trigger):focus-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

@media (hover: none) {
  .data-table tbody tr :where(.row-edit-link, .row-edit-trigger) {
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }
}

.company-type-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  padding: 4px 8px;
  white-space: nowrap;
}

.company-type-badge.is-primary {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #3730a3;
}

.company-type-badge.is-secondary {
  background: #ecfeff;
  border-color: #a5f3fc;
  color: #155e75;
}

.m365-config-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.m365-connect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.m365-test-link {
  align-items: center;
  display: inline-flex;
  gap: 8px;
  min-height: 34px;
  padding: 6px 12px;
  text-decoration: none;
}

.m365-test-link:hover,
.m365-test-link:focus-visible {
  text-decoration: none;
}

.m365-test-link-icon {
  align-items: center;
  background: #e0f2fe;
  border-radius: 4px;
  color: #0369a1;
  display: inline-flex;
  font-size: 11px;
  font-weight: 950;
  height: 22px;
  justify-content: center;
  line-height: 1;
  width: 34px;
}

.expense-approval-surface .expense-header-table,
.expense-approval-surface .expense-rows-table {
  min-width: 1220px;
}

.expense-approval-surface .surface-actions {
  flex-wrap: nowrap;
  justify-content: flex-start;
  white-space: nowrap;
}

.expense-title-link {
  appearance: none;
  background: transparent;
  border: 0;
  color: #0f172a;
  cursor: pointer;
  display: inline;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
}

.expense-title-link:hover,
.expense-title-link:focus-visible {
  color: #2563eb;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.expense-title-link:disabled {
  cursor: wait;
  opacity: .7;
}

.expense-note-table .chip:empty {
  display: none;
}

.favorite-manage-list {
  display: grid;
  gap: 8px;
}

.favorite-manage-row {
  align-items: center;
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  padding: 12px 14px;
}

.favorite-manage-row.active {
  background: #eef6ff;
  border-color: #bcd7ff;
}

.favorite-manage-row strong {
  color: var(--text);
  display: block;
  font-size: 14px;
  font-weight: 900;
}

.favorite-manage-row span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}

.expense-note-row.table-active > td {
  border-color: #bfdbfe !important;
  background: #eff6ff !important;
}

.expense-note-row.table-active > td:first-child {
  box-shadow: inset 4px 0 var(--primary) !important;
}

.expense-detail-actions {
  max-width: none;
}

.expense-back-icon-button {
  min-width: 34px;
  max-width: 34px;
}

.expense-toolbar-nowrap {
  flex-wrap: nowrap;
  justify-content: flex-end;
  white-space: nowrap;
}

.expense-empty-state {
  min-height: 180px;
  padding: 22px;
  text-align: center;
}

.expense-editor-dialog .surface-head {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .96)),
    linear-gradient(90deg, rgba(37, 99, 235, .16), rgba(15, 118, 110, .12));
}

.expense-editor-dialog.attachments-dialog {
  width: min(1280px, calc(100vw - 48px));
  height: min(820px, calc(100dvh - 48px));
  max-height: min(820px, calc(100dvh - 48px));
}

.expense-editor-dialog.attachments-dialog .editor-body {
  display: grid;
  min-height: 0;
  overflow: hidden;
}

.expense-editor-dialog.attachments-dialog .surface-head p {
  display: none;
}

.expense-modal-section {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.expense-modal-section strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 950;
}

.expense-modal-section span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.expense-field-with-note {
  display: grid;
  gap: 6px;
}

.expense-field-with-note > span,
.expense-field-info span,
.expense-total-preview span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.expense-field-with-note > span strong {
  color: #0f172a;
  font-weight: 950;
  letter-spacing: 0;
  text-transform: none;
}

.expense-field-info {
  align-content: center;
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #f8fbff;
}

.expense-field-info strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 950;
}

.expense-field-info .btn {
  justify-self: start;
}

.expense-total-preview {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #f0fdfa);
}

.expense-total-preview strong {
  color: #0f172a;
  font-size: 22px;
  font-weight: 950;
}

.expense-total-preview small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-left: auto;
}

.form-delete-action,
.expense-delete-form-action {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.form-delete-action > .btn,
.form-delete-action > .dxbl-btn {
  flex: 0 0 auto;
  width: auto;
}

.expense-payment-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.expense-payment-options > span {
  grid-column: 1 / -1;
}

.expense-payment-option {
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease, background .16s ease;
}

.expense-payment-option:hover {
  border-color: #93c5fd;
  transform: translateY(-1px);
}

.expense-payment-option:has(input[type="checkbox"]:checked) {
  border-color: var(--primary);
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18), 0 10px 24px rgba(37, 99, 235, .08);
}

.expense-attachment-field input[type="file"] {
  padding: 18px;
  border-style: dashed;
  background: #f8fbff;
}

.expense-selected-files {
  display: grid;
  gap: 8px;
}

.expense-selected-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.expense-selected-file span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.expense-selected-file strong {
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-selected-file small {
  color: var(--muted);
  font-weight: 800;
}

.expense-limit-warning {
  border: 1px solid #fbbf24;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 850;
}

.expense-table-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 950;
}

.expense-table-flag.on {
  background: #dcfce7;
  color: #047857;
}

.expense-table-flag.off {
  background: #f1f5f9;
  color: #64748b;
}

.expense-attachment-summary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 62px;
  font-weight: 950;
}

.expense-attachment-summary-button.empty {
  border-color: #dbe3ee;
  color: #64748b;
  background: #f8fafc;
}

.expense-existing-attachments {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
  padding: 10px;
}

.expense-existing-attachments > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.expense-attachment-modal,
.expense-attachment-list {
  display: grid;
  gap: 10px;
}

.expense-attachment-modal {
  align-items: stretch;
  /* Il componente rende al massimo 2 figli diretti (attachment-shell + modal-form-actions
     opzionale): con 3 righe l'auto-placement sposta le azioni nella riga 1fr, ancorate in
     basso con align-self:end, lasciando vuota la riga auto e uno spazio morto sopra al footer. */
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.expense-attachment-modal-split {
  column-gap: 12px;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
}

.expense-attachment-modal-listonly {
  grid-template-columns: minmax(0, 1fr);
}

.expense-attachment-modal-split .modal-form-actions {
  align-self: end;
  grid-column: 1 / -1;
}

.expense-attachment-list.compact {
  gap: 8px;
}

.expense-attachment-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: #fff;
  padding: 9px 10px;
}

button.expense-attachment-item {
  color: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

button.expense-attachment-item:hover,
button.expense-attachment-item:focus-visible,
button.expense-attachment-item.active {
  background: #eff6ff;
  border-color: #93c5fd;
  outline: none;
}

.expense-attachment-preview-action {
  align-items: center;
  background: #eff6ff;
  border-radius: 999px;
  color: #2563eb;
  display: inline-flex;
  font-size: 22px;
  font-weight: 900;
  height: 28px;
  justify-content: center;
  line-height: 1;
  width: 28px;
}

.expense-attachment-item > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.expense-attachment-item strong {
  overflow: hidden;
  color: #0f172a;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-attachment-item small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.attachment-workspace.expense-attachment-modal {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
}

.attachment-workspace.expense-attachment-modal-split,
.attachment-workspace.expense-attachment-modal-listonly {
  grid-template-columns: minmax(0, 1fr);
}

.attachment-workspace .modal-form-actions {
  align-self: end;
  grid-column: 1 / -1;
}

.attachment-shell {
  align-items: stretch;
  display: grid;
  gap: 14px;
  grid-column: 1 / -1;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  min-height: 0;
}

.attachment-shell.list-only {
  grid-template-columns: minmax(0, 1fr);
}

.attachment-browser,
.attachment-preview-pane {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  min-width: 0;
}

.attachment-browser {
  display: grid;
  gap: 12px;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  overflow: hidden;
  padding: 12px;
}

.attachment-browser-list {
  align-content: start;
  display: grid;
  gap: 8px;
  grid-auto-rows: min-content;
  min-height: 0;
  overflow: auto;
  padding-right: 2px;
}

.attachment-list-item {
  align-items: start;
  background: #fbfdff;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  color: inherit;
  cursor: pointer;
  display: grid;
  gap: 10px;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 72px;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.attachment-list-item:hover,
.attachment-list-item:focus-visible,
.attachment-list-item.active {
  background: #eff6ff;
  border-color: #93c5fd;
  outline: none;
}

.attachment-list-item.active {
  box-shadow: inset 3px 0 0 #2563eb;
}

.attachment-list-item:focus-visible {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .16);
}

.attachment-type-badge {
  align-items: center;
  background: #eef6ff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  color: #2563eb;
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  height: 42px;
  justify-content: center;
  letter-spacing: .03em;
  width: 42px;
}

.attachment-list-content {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.attachment-list-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.attachment-list-text strong {
  color: #0f172a;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-list-text small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.attachment-list-context {
  display: grid;
  gap: 6px 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.attachment-list-context span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.attachment-list-context .wide {
  grid-column: 1 / -1;
}

.attachment-list-context small {
  color: #64748b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.attachment-list-context strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}

.attachment-preview-pane {
  background: #f8fbff;
  display: grid;
  gap: 12px;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 460px;
  overflow: hidden;
  padding: 12px;
}

.attachment-preview-toolbar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.attachment-preview-actions,
.attachment-zoom-control {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.attachment-toolbar-button {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  min-height: 36px;
  min-width: 36px;
}

.attachment-zoom-control {
  background: #fff;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  color: #334155;
  flex-wrap: nowrap;
  min-height: 38px;
  padding: 0 12px;
}

.attachment-zoom-control input[type="range"] {
  accent-color: #2563eb;
  cursor: pointer;
  width: 118px;
}

.attachment-lens-icon {
  background: linear-gradient(currentColor, currentColor) 5px 6px / 7px 2px no-repeat;
  color: currentColor;
  display: inline-block;
  height: 19px;
  position: relative;
  width: 19px;
}

.attachment-lens-icon.plus {
  background:
    linear-gradient(currentColor, currentColor) 5px 6px / 7px 2px no-repeat,
    linear-gradient(currentColor, currentColor) 8px 3px / 2px 8px no-repeat;
}

.attachment-lens-icon::before {
  border: 2px solid currentColor;
  border-radius: 999px;
  content: "";
  height: 13px;
  left: 0;
  position: absolute;
  top: 0;
  width: 13px;
}

.attachment-lens-icon::after {
  background: currentColor;
  border-radius: 999px;
  bottom: 1px;
  content: "";
  height: 2px;
  position: absolute;
  right: 0;
  transform: rotate(45deg);
  transform-origin: center;
  width: 8px;
}

.attachment-zoom-value {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  min-width: 44px;
  text-align: center;
}

.attachment-preview-frame {
  background: #fff;
  border: 0;
  border-radius: 12px;
  display: block;
  height: 100%;
  min-height: 0;
  width: 100%;
}

.attachment-preview-canvas {
  display: grid;
  height: 100%;
  justify-items: center;
  place-items: center;
  width: 100%;
}

.attachment-preview-viewport {
  background:
    linear-gradient(45deg, rgba(148, 163, 184, .10) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(148, 163, 184, .10) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, .10) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, .10) 75%),
    #fff;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  border: 1px solid #e5edf7;
  display: block;
  overflow: auto;
  padding: 14px;
  text-align: center;
}

.attachment-preview-image {
  display: block;
  height: auto;
  margin: 0 auto;
  max-height: none;
  max-width: none;
  min-height: 0;
  object-fit: contain;
  object-position: center;
  transition: width .12s ease;
}

.attachment-preview-empty {
  align-content: center;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  display: grid;
  gap: 12px;
  height: 100%;
  justify-items: center;
  min-height: 0;
  padding: 24px;
  text-align: center;
}

.attachment-preview-empty strong {
  color: #0f172a;
  font-weight: 900;
}

.attachment-preview-empty span {
  color: #64748b;
  font-weight: 800;
}

.expense-rows-table td:last-child .row-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .expense-editor-dialog.attachments-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 20px);
    max-height: calc(100dvh - 20px);
  }

  .expense-attachment-modal-split {
    grid-template-columns: minmax(180px, 38%) minmax(0, 1fr);
  }

  .attachment-workspace.expense-attachment-modal-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .attachment-shell {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }

  .attachment-browser {
    max-height: 230px;
  }

  .attachment-preview-pane {
    min-height: 420px;
  }

  .attachment-preview-toolbar {
    align-items: center;
    justify-content: flex-start;
  }

  .attachment-preview-actions,
  .attachment-zoom-control {
    justify-content: flex-start;
  }

  .attachment-zoom-control {
    width: 100%;
  }

  .attachment-zoom-control input[type="range"] {
    flex: 1;
    width: auto;
  }

}

.settings-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.settings-link-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--text);
  text-decoration: none;
}

.settings-link-card:hover {
  border-color: #bfdbfe;
  background: #f8fbff;
  color: var(--primary);
}

.settings-link-card > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #bfdbfe;
  border-radius: var(--radius);
  background: #eff6ff;
  color: var(--primary);
  font-weight: 950;
}

.settings-link-card strong,
.settings-link-card small {
  display: block;
  min-width: 0;
}

.settings-link-card small {
  grid-column: 2;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timestamp-profile-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.timestamp-rule {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.timestamp-rule span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.timestamp-rule strong {
  color: var(--text);
  font-size: 14px;
}

.timestamp-profile-block {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.timestamp-reason-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.timestamp-profile-note {
  margin-top: 14px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: var(--radius);
  background: #fff7ed;
  color: #9a3412;
  font-size: 13px;
  font-weight: 700;
}

.timestamp-profile-details {
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.timestamp-profile-details summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 800;
}

.timestamp-profile-details ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.switch-line {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.admin-presence-page {
  display: grid;
  gap: 24px;
}

.presence-title-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 86px;
  padding: 18px 24px;
  border: 1px solid rgba(216, 230, 247, .92);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.presence-title-shell h2 {
  margin: 0;
  color: #1f2937;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.presence-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
}

.presence-period-picker,
.presence-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.presence-period-picker {
  position: relative;
}

.presence-period-picker summary {
  cursor: pointer;
  list-style: none;
}

.presence-period-picker summary::-webkit-details-marker {
  display: none;
}

.presence-period-panel {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(210px, .75fr) minmax(340px, 1fr);
  gap: 22px;
  min-width: min(780px, calc(100vw - 96px));
  padding: 22px;
  border: 1px solid rgba(216, 230, 247, .98);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .18);
}

.presence-preset-list {
  display: grid;
  align-content: start;
  gap: 4px;
  padding-right: 18px;
  border-right: 1px solid var(--border);
}

.presence-preset-list a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--text);
  font-weight: 850;
  text-decoration: none;
}

.presence-preset-list a:hover {
  background: #eef6ff;
  color: var(--primary-strong);
}

.presence-period-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
}

.presence-period-footer {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-weight: 800;
}

.presence-date-field {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.presence-date-field .form-control {
  min-height: 42px;
  border-radius: 999px;
  font-weight: 800;
}

.presence-period-button,
.presence-actions .btn {
  min-height: 46px;
  border-radius: 999px;
  padding-inline: 22px;
  font-weight: 900;
}

.presence-more-menu {
  position: relative;
  flex: 0 0 auto;
}

.presence-more-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #eef3f9;
  color: #334155;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

.presence-more-menu summary::-webkit-details-marker {
  display: none;
}

.presence-more-menu[open] summary {
  border-color: rgba(37, 99, 235, .24);
  background: #eaf2ff;
  color: var(--primary-strong);
}

.presence-more-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  min-width: 232px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .16);
}

.presence-more-list a,
.presence-more-list button {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 800;
  text-align: left;
  text-decoration: none;
}

.presence-more-list a:hover,
.presence-more-list button:hover {
  background: #f1f6ff;
}

.presence-more-list button:disabled {
  cursor: not-allowed;
  opacity: .55;
}

.presence-day-strip {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 0 28px 4px;
  scroll-snap-type: x proximity;
}

.presence-day-card {
  flex: 0 0 112px;
  display: grid;
  gap: 2px;
  justify-items: center;
  min-height: 96px;
  padding: 12px 10px;
  border: 2px solid rgba(14, 165, 233, .72);
  border-radius: 8px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  font: inherit;
  text-decoration: none;
  scroll-snap-align: start;
  text-align: center;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}

.presence-day-card:disabled {
  cursor: progress;
  opacity: .72;
}

.presence-day-card-all {
  flex-basis: 136px;
}

.presence-day-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

.presence-day-card span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
  text-transform: lowercase;
}

.presence-day-card strong {
  color: #1f2937;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.presence-day-card small {
  color: #64748b;
  font-weight: 800;
  text-transform: lowercase;
}

.presence-day-card.active {
  border-color: #168bdc;
  background: #168bdc;
}

.presence-day-card.active span,
.presence-day-card.active strong,
.presence-day-card.active small {
  color: #fff;
}

.presence-today-label {
  margin-top: -22px;
  color: #334155;
  font-weight: 900;
  text-align: center;
}

.presence-subnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 28px;
}

.presence-subnav .module-switcher {
  margin: 0;
}

.presence-table-panel {
  margin-inline: 28px;
  overflow: hidden;
}

.presence-table-panel .surface-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 22px 24px;
}

.presence-table-panel .surface-head > div:first-child {
  display: grid;
  grid-template-columns: minmax(120px, 160px) minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.presence-date-summary {
  display: grid;
  justify-items: center;
  padding-right: 18px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-weight: 750;
}

.presence-date-summary strong {
  color: var(--text);
  font-size: 34px;
  font-weight: 950;
  line-height: 1;
}

.presence-date-summary span {
  font-size: 14px;
}

.presence-table-panel .surface-head h2 {
  margin: 0;
}

.presence-table-panel .surface-actions {
  justify-content: end;
}

.presence-table-panel .table-responsive {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

.presence-table-panel .table-filter-row th {
  background: #fff;
}

.presence-table-panel .table-filter-row input,
.presence-table-panel .table-filter-row select,
.presence-table-panel .table-filter-row .dxbl-text-edit {
  min-height: 44px;
  border-radius: 10px;
  font-weight: 750;
}

.presence-stamps-table {
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.presence-stamps-table thead th {
  border-bottom: 0;
}

.presence-stamps-table tbody tr > td {
  padding: 14px 12px;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  background: #fff;
}

.presence-stamps-table tbody tr > td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 14px 0 0 14px;
}

.presence-stamps-table tbody tr > td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0 14px 14px 0;
}

.presence-stamps-table tbody tr:hover > td {
  background: #f8fbff;
}

.presence-stamps-table tbody tr.table-group-row > td,
.data-table tbody tr.table-group-row > td {
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1e3a8a;
  box-shadow: none;
}

.presence-stamps-table tbody tr.table-group-row > td:first-child,
.data-table tbody tr.table-group-row > td:first-child {
  border-radius: 12px 0 0 12px;
}

.presence-stamps-table tbody tr.table-group-row > td:last-child,
.data-table tbody tr.table-group-row > td:last-child {
  border-radius: 0 12px 12px 0;
}

.table-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: min(100%, 460px);
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.table-group-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #fff;
  color: var(--primary-strong);
  font-size: 14px;
  font-weight: 950;
}

.table-group-label {
  display: inline-grid;
  gap: 1px;
}

.table-group-label small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.table-group-collapsed-item {
  display: none;
}

.table-group-total-cell {
  color: #0f172a !important;
  font-size: 13px;
  font-weight: 950;
}

.table-group-row span {
  margin-right: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.table-group-row strong {
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 900;
}

.table-group-row .table-group-chevron,
.table-group-row .table-group-label {
  margin-right: 0;
  letter-spacing: 0;
  text-transform: none;
}

.table-group-row .table-group-chevron {
  color: var(--primary-strong);
  font-size: 14px;
}


.presence-stamps-table tbody tr.presence-stamp-row-ok > td:first-child {
  box-shadow: inset 4px 0 rgba(5, 150, 105, .7);
}

.presence-stamps-table tbody tr.presence-stamp-row-missed > td {
  border-color: #fed7aa;
  background: #fffaf0;
}

.presence-stamps-table tbody tr.presence-stamp-row-missed > td:first-child {
  box-shadow: inset 4px 0 var(--warning);
}

.presence-stamps-table tbody tr.presence-stamp-row-problem > td {
  border-color: #fecdd3;
  background: #fff6f7;
}

.presence-stamps-table tbody tr.presence-stamp-row-problem > td:first-child {
  box-shadow: inset 4px 0 var(--danger);
}

.presence-person-cell strong,
.presence-job-cell strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
  line-height: 1.25;
}

.presence-job-cell span,
.presence-muted-cell {
  display: block;
  max-width: 220px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}

.presence-day-mini,
.presence-time-chip {
  display: inline-grid;
  min-width: 74px;
  gap: 2px;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.presence-day-mini strong,
.presence-time-chip strong {
  color: var(--text);
  font-size: 14px;
  font-weight: 950;
  line-height: 1;
}

.presence-day-mini span,
.presence-time-chip span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.presence-time-chip {
  min-width: 92px;
  background: rgba(37, 99, 235, .06);
  border-color: rgba(37, 99, 235, .18);
}

.presence-time-chip strong {
  color: #1d4ed8;
  font-size: 16px;
}

.presence-stamps-table .row-actions {
  justify-content: flex-end;
  min-width: 0;
}

/* Timbrature (attivita' + aggregate): righe a riga singola e stessa altezza (~32px) delle
   altre SmartTable. Appiattisce i "chip" riquadrati di Giorno/Effettiva e porta la commessa
   (codice + titolo) su un'unica riga con ellissi. Scoped a .presence-stamps-table: la
   dashboard "Ultime timbrature" usa .recent-stamps-table e resta invariata. */
.presence-stamps-table .presence-day-mini,
.presence-stamps-table .presence-time-chip {
  display: inline;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
}

.presence-stamps-table .presence-day-mini strong,
.presence-stamps-table .presence-time-chip strong {
  font-size: 13.5px;
}

.presence-stamps-table .presence-job-cell {
  display: flex;
  gap: 6px;
  align-items: baseline;
  max-width: 100%;
}

.presence-stamps-table .presence-person-cell strong,
.presence-stamps-table .presence-job-cell strong {
  display: inline;
  flex: 0 0 auto;
  font-size: 13.5px;
}

.presence-stamps-table .presence-job-cell span {
  display: inline;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.recent-stamps-surface {
  overflow: hidden;
}

.recent-stamps-surface .surface-head {
  align-items: center;
  margin-bottom: 16px;
}

.recent-stamps-table {
  min-width: 940px;
  border-spacing: 0 7px;
}

.recent-stamps-table thead th {
  color: #334155;
}

.recent-stamps-table .table-filter-row th {
  padding-block: 8px 12px;
}

.recent-stamps-table .table-filter-row input {
  min-height: 38px;
  border-radius: 999px;
  background: #fff;
}

.recent-stamps-table tbody tr > td {
  padding-block: 12px;
}

.recent-stamps-table .presence-day-mini.compact {
  min-width: 104px;
  padding: 8px 11px;
  background: #fff;
}

.recent-stamps-table .reason-chip {
  border: 1px solid rgba(245, 158, 11, .16);
  background: #fff8e6;
  color: #a16207;
}

.recent-hours {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 30px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--primary-strong);
  font-size: 13px;
  font-weight: 900;
}

.table-empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  min-height: 190px;
  padding: 34px 20px;
  border: 1px dashed #cbd9ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: var(--muted);
  text-align: center;
}

.table-empty-state span {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: #eef6ff;
  color: var(--primary-strong);
  font-size: 20px;
  font-weight: 950;
}

.table-empty-state strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
}

.table-empty-state p {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.table-empty-row td {
  padding: 34px 18px !important;
  text-align: center;
  color: var(--muted);
  background: #f8fbff;
  border: 1px dashed var(--line);
}

.table-empty-row strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 16px;
}

.table-empty-row span {
  display: block;
  font-weight: 800;
}

.compact-empty-state {
  min-height: 132px;
  margin-top: 12px;
}

.user-permissions-panel {
  margin-top: 16px;
}

.user-permissions-table td:first-child {
  min-width: 260px;
}

.user-permissions-table td:first-child strong,
.user-permissions-table td:first-child span {
  display: block;
}

.user-permissions-table .form-select {
  min-width: 190px;
}

.user-permissions-actions {
  justify-content: space-between;
  margin-top: 14px;
}

.table-row-selected {
  background: #eff6ff !important;
  box-shadow: inset 4px 0 #2563eb;
}

.status-strip {
  display: flex;
  align-items: center;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
  color: var(--text);
  font-weight: 800;
}

.status-strip.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status-strip.success {
  border-color: #bbf7d0;
  background: #ecfdf5;
  color: #047857;
}

.status-strip.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.site-procedure-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}

.admin-presence-modal .editor-dialog .surface-head {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  border-bottom: 0;
  background: #224e73;
  color: #fff;
  text-align: center;
}

.admin-presence-modal .editor-dialog .surface-head h2,
.admin-presence-modal .editor-dialog .surface-head p,
.admin-presence-modal .editor-dialog .surface-head .eyebrow {
  color: #fff;
}

.admin-presence-modal .editor-dialog .surface-head p {
  opacity: .86;
}

.admin-presence-modal .editor-dialog {
  border-radius: 16px;
}

.presence-qr-modal .editor-body {
  display: grid;
  gap: 18px;
}

.presence-qr-search {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.presence-qr-search .form-control {
  min-height: 52px;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 750;
}

.presence-qr-list {
  display: grid;
  gap: 14px;
  max-height: min(58vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.presence-qr-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px auto;
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid rgba(216, 230, 247, .95);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .07);
}

.presence-qr-card h3 {
  margin: 4px 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.presence-qr-card p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.presence-qr-preview {
  display: grid;
  place-items: center;
  width: 118px;
  height: 118px;
  border: 1px dashed #bfd4ee;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-align: center;
}

.presence-qr-actions {
  display: grid;
  gap: 8px;
}

.presence-row-hidden {
  display: none;
}

.report-missing-stamp-dialog {
  width: min(720px, 100%);
}

.report-missing-stamp-dialog .surface-head {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.report-missing-stamp-summary {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: #eff6ff;
}

.report-missing-stamp-summary span {
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-missing-stamp-summary strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
}

.report-missing-stamp-summary small {
  color: var(--muted);
  font-weight: 750;
}

.report-missing-stamp-modal .form-control[readonly] {
  background: transparent;
  color: var(--text);
  font-weight: 850;
}

.signature-box {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.signature-toolbar {
  display: flex;
  gap: 6px;
  padding: 8px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.signature-toolbar span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  min-height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.signature-box textarea {
  border: 0;
  border-radius: 0;
}

.compact-management-table th,
.compact-management-table td {
  white-space: nowrap;
}

/* Rete di sicurezza per table-layout:fixed (vedi .data-table:is(...) piu' sotto):
   in fixed layout una colonna non si allarga mai oltre la larghezza assegnata, quindi
   un contenuto piu' lungo di quella larghezza andrebbe altrimenti a traboccare
   visivamente nella colonna accanto invece di restare dentro la propria cella. */
.compact-management-table th,
.compact-management-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Aziende (Partner backoffice): lower row height, no alternating-row striping; hover stays as-is. */
.table-column-title-with-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.table-header-refresh {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.smart-table-header-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: max-content;
  width: max-content;
}

.smart-table-header-with-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  max-width: 100%;
}

.smart-table-header-with-actions .smart-table-sort-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-header-refresh .partner-icon-button {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  margin: 0;
  font-size: 12px;
}

.table-header-refresh .partner-icon-button .button-icon-svg {
  width: 16px;
  height: 16px;
}

.smart-table-header-action-button {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  margin: 0;
  font-size: 12px;
}

.smart-table-header-action-button .button-icon-svg {
  width: 15px;
  height: 15px;
}

.smart-table-header-actions .dxbl-btn.partner-icon-button,
.smart-table-header-actions .dxbl-btn.smart-table-header-action-button {
  flex: 0 0 24px !important;
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 1 !important;
}

.smart-table-header-actions .partner-icon-button > span,
.smart-table-header-actions .smart-table-header-action-button > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  transform: none;
}

.smart-table-header-actions .partner-icon-button .button-icon-svg,
.smart-table-header-actions .smart-table-header-action-button .button-icon-svg {
  width: 16px;
  height: 16px;
}

.partner-smart-table-inline {
  display: block;
  min-width: 0;
  width: 100%;
}

.partner-smart-table-inline .standard-table-shell.smart-table-shell {
  gap: 0;
}

.partner-smart-table-inline .standard-table-top-content {
  margin: 0;
}

.partner-smart-table-inline .smart-table-sort-button {
  font-weight: inherit;
  letter-spacing: inherit;
  text-align: left;
  justify-content: flex-start;
}

.partner-companies-table th,
.partner-companies-table td {
  padding-top: 3px;
  padding-bottom: 3px;
  line-height: 1.2;
  text-align: left;
}

.partner-companies-table tbody tr:nth-child(even) {
  background: transparent;
}

.partner-companies-table .edit-cell {
  width: 84px;
}

.partner-companies-table .actions-col,
.partner-companies-table .actions-cell,
.partner-companies-table .edit-cell {
  min-width: 84px;
  padding-right: 4px;
  padding-left: 4px;
  width: 84px;
}

.compact-management-table.data-table.partner-companies-table {
  table-layout: fixed;
  width: 100%;
  min-width: 1080px;
}

.compact-management-table.data-table.partner-companies-table .refresh-col {
  min-width: 84px;
  width: 84px;
}

.compact-management-table.data-table.partner-companies-table .company-name-col {
  width: 22%;
}

.compact-management-table.data-table.partner-companies-table .company-vat-col {
  width: 11%;
}

.compact-management-table.data-table.partner-companies-table .company-status-col {
  width: 9%;
}

.compact-management-table.data-table.partner-companies-table .company-demo-expiry-col {
  width: 11%;
}

.compact-management-table.data-table.partner-companies-table .company-city-col {
  width: 12%;
}

.compact-management-table.data-table.partner-companies-table .company-province-col {
  width: 7%;
}

.compact-management-table.data-table.partner-companies-table .company-type-col {
  width: 10%;
}

.compact-management-table.data-table.partner-companies-table .company-linked-col {
  width: 18%;
}

.partner-companies-table .linked-companies-cell {
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-search {
  min-height: 26px;
  min-width: 260px;
  padding: 2px 6px;
}

.standard-table-shell {
  width: 100%;
  min-width: 0;
}

.standard-table-shell.has-table-pager > .table-responsive {
  border-bottom-right-radius: 0;
  border-bottom-left-radius: 0;
}

.table-responsive {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: #fff;
  max-width: 100%;
}

.table-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 50px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  color: #5f6f84;
  font-size: 13px;
}

.table-responsive + .table-pager {
  margin-top: -1px;
}

.table-pager-summary {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  white-space: nowrap;
}

.table-pager-count,
.table-pager-total {
  color: #15243b;
  font-weight: 850;
}

.table-pager-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.table-pager-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 1 auto;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
  min-width: 0;
}

.table-pager-actions .blazor-action-text-button {
  min-height: 36px;
}

.table-pager-size-label {
  margin: 0;
  color: #6b7a90;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.table-pager-size-select {
  flex: 0 0 78px;
  width: 78px;
  min-width: 78px;
  height: 38px;
  padding: 6px 30px 6px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background-color: #fff;
  color: #15243b;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
  outline: none;
}

.table-pager-size-select:focus {
  border-color: #7aa7ff;
  box-shadow: 0 0 0 3px rgba(43, 103, 255, 0.12);
}

.table-pager-size-select:disabled {
  color: #15243b;
  background-color: #fff;
  opacity: 1;
}

.table-pager-navigation {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 3px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85);
}

.table-pager-button {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  font-size: 18px;
  line-height: 1;
}

.table-pager-page {
  min-width: 48px;
  text-align: center;
  font-weight: 800;
  color: #15243b;
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .table-pager {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .table-pager-controls {
    justify-content: space-between;
    width: 100%;
  }

  .table-pager-actions {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .table-pager-navigation {
    margin-left: auto;
  }
}

.table {
  min-width: 860px;
  margin-bottom: 0;
}

.data-table th,
.table th {
  border-bottom-color: var(--border);
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
}

.data-table th[data-sortable="true"] {
  cursor: pointer;
}

.data-table td,
.table td {
  border-color: #eef2f7;
  color: #1f2937;
  vertical-align: middle;
}

.data-table tbody tr:nth-child(even),
.table tbody tr:nth-child(even) {
  background: #fbfdff;
}

.data-table tbody tr:hover,
.table tbody tr:hover {
  background: #f1f6ff;
}

.data-table tbody tr.report-row-ok > td,
.table tbody tr.report-row-ok > td {
  border-color: #d1fae5;
  background: #ecfdf5;
}

.data-table tbody tr.report-row-ok > td:first-child,
.table tbody tr.report-row-ok > td:first-child {
  box-shadow: inset 4px 0 rgba(5, 150, 105, .72);
}

.data-table tbody tr.report-row-ok:hover > td,
.table tbody tr.report-row-ok:hover > td {
  border-color: #bbf7d0;
  background: #dcfce7;
}

.data-table tbody tr.report-row-planned > td,
.table tbody tr.report-row-planned > td {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.data-table tbody tr.report-row-planned > td:first-child,
.table tbody tr.report-row-planned > td:first-child {
  box-shadow: inset 4px 0 #2563eb;
}

.data-table tbody tr.report-row-planned:hover > td,
.table tbody tr.report-row-planned:hover > td {
  border-color: #93c5fd;
  background: #dbeafe;
}

.data-table tbody tr.report-row-problem > td,
.table tbody tr.report-row-problem > td {
  border-color: #fecdd3;
  background: var(--danger-soft);
}

.data-table tbody tr.report-row-problem > td:first-child,
.table tbody tr.report-row-problem > td:first-child {
  box-shadow: inset 4px 0 var(--danger);
}

.data-table tbody tr.report-row-problem:hover > td,
.table tbody tr.report-row-problem:hover > td {
  border-color: #fda4af;
  background: #fff1f2;
}

.data-table tbody tr.report-row-missed > td,
.table tbody tr.report-row-missed > td {
  border-color: #fed7aa;
  background: var(--warning-soft);
}

.data-table tbody tr.report-row-missed > td:first-child,
.table tbody tr.report-row-missed > td:first-child {
  box-shadow: inset 4px 0 var(--warning);
}

.data-table tbody tr.report-row-missed:hover > td,
.table tbody tr.report-row-missed:hover > td {
  border-color: #fdba74;
  background: #fff7ed;
}

.table-responsive:has(> .data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table)) {
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) {
  border-collapse: separate;
  border-spacing: 0 4px;
}

/* La tabella riempie sempre il contenitore (width:100%, coerente con lo standard
   del sito: niente spazio vuoto a destra della card). Con table-layout:fixed la
   colonna "libera" (nessuna larghezza dichiarata) assorbirebbe TUTTO lo spazio
   in eccesso senza limite (verificato dal vivo: 800px+ per un semplice titolo
   su schermi larghi). Percentuale invece di nessuna larghezza: la colonna
   libera ora dichiara una % (vedi le singole TableColumnDefinition, es. Titolo/
   Cliente), che sotto table-layout:fixed si risolve rispetto alla larghezza
   fissa della tabella (100% del contenitore) invece che rispetto allo spazio
   residuo: cresce in proporzione allo schermo ma resta sempre entro un limite
   prevedibile, non diventa mai sproporzionata. */
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

/* Colonna "libera" (nessuna larghezza dichiarata): con table-layout:fixed assorbe
   lo spazio residuo su schermi larghi. NOTA: min-width sulla singola cella non
   ha alcun effetto in fixed layout (verificato dal vivo: il browser la ignora
   e la colonna puo' schiacciarsi a 0px se la somma delle colonne fisse supera
   gia' da sola la larghezza disponibile). L'unico meccanismo che il layout
   fixed rispetta e' un min-width sulla tabella stessa, impostato piu' sotto
   per-tabella (somma colonne fisse + margine per la colonna libera): la
   tabella si allarga e scrolla invece di azzerare la colonna, coerente con la
   regola sito-wide sui filtri/celle non compressi oltre leggibilita'. */
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .flex-col {
  white-space: nowrap;
}

.compact-management-table.data-table.standard-users-table { min-width: 1320px; }
.compact-management-table.data-table.user-company-dependency-table { min-width: 660px; }
.compact-management-table.data-table.expense-type-group-table { min-width: 480px; }
.compact-management-table.data-table.expense-note-type-table { min-width: 900px; }
.compact-management-table.data-table.expense-mileage-rate-table { min-width: 400px; }
.compact-management-table.data-table.expense-type-limit-table { min-width: 500px; }
.compact-management-table.data-table.company-work-schedule-table { min-width: 500px; }
.compact-management-table.data-table.user-work-schedule-table { min-width: 620px; }
.compact-management-table.data-table.selected-user-work-schedule-table { min-width: 440px; }
.compact-management-table.data-table.roles-permissions-table { min-width: 640px; }
.compact-management-table.data-table.commesse-rows-table { min-width: 900px; }
/* +130px rispetto al 1300px originale: compensa l'allargamento della colonna
   "Data" (110px -> 240px, vedi SmartTable.razor ApplyRangeFilterMinWidth) in
   modo che le colonne a testo libero (Descrizione/Tipo/Cliente/Commessa)
   mantengano la stessa quota di spazio residuo di prima invece di restringersi. */
.compact-management-table.data-table.expense-rows-icon-only-table { min-width: 1430px; }
/* .absences-table ha gia' un min-width dedicato e responsive (site.css, @media
   max-width:900px, min-width:1280px + wrapper overflow-x:auto): non duplicarlo
   qui per non interferire con quella soglia gia' verificata. */

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) thead th {
  padding: 6px 8px;
  border-bottom: 0;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-align: left;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-filter-row th {
  padding: 2px 6px 3px;
  background: #f8fafc;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-filter-row input,
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-filter-row select,
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-filter-row .dxbl-text-edit,
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-search {
  height: 28px;
  min-height: 28px;
  min-width: 0;
  padding: 1px 6px;
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr {
  background: transparent;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td {
  padding: 4px 6px;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  background: #fff;
  font-size: 12.5px;
  line-height: 1.22;
  text-align: left;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td {
  padding: 3px 6px;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td {
  font-size: 13.5px;
  height: 30px;
  line-height: 1.22;
  padding: 3px 6px;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) thead th,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) thead th {
  font-size: 12px;
  padding-inline: 6px;
  text-align: left;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr {
  height: 31px;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters th,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters th {
  min-height: 31px;
  padding: 3px 6px;
  overflow: visible;
  text-align: left;
  vertical-align: middle;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters :where(.smart-table-filter-control, input, select, .dxbl-text-edit),
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters :where(.smart-table-filter-control, input, select, .dxbl-text-edit) {
  box-sizing: border-box;
  width: 100%;
  height: 28px;
  min-height: 28px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters .smart-table-range-filter,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-header-filters .smart-table-range-filter {
  gap: 4px;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-sort-button,
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .smart-table-sort-button {
  justify-content: flex-start;
  padding: 0;
  text-align: left;
}

/* .smart-table-sort-button e .smart-table-header-with-actions sono flex:
   il text-align/text-end del <th> (colonne numeriche come "Spesa"/"KM") non
   si applica ai loro figli flex, quindi l'intestazione restava a sinistra
   mentre i valori sotto sono allineati a destra. Vince sulle regole sopra
   (comprese quelle scoped per portale) perche' l'allineamento dichiarato
   dalla colonna ha sempre priorita'. */
th.text-end .smart-table-sort-button,
th.text-end .smart-table-header-with-actions,
.text-end .smart-table-sort-button,
.text-end .smart-table-header-with-actions {
  justify-content: flex-end !important;
}

th.text-center .smart-table-sort-button,
th.text-center .smart-table-header-with-actions,
.text-center .smart-table-sort-button,
.text-center .smart-table-header-with-actions {
  justify-content: center !important;
}

body.partner-portal .partner-companies-table th,
body.partner-portal .partner-companies-table td {
  padding-top: 3px;
  padding-bottom: 3px;
}

body.partner-portal .compact-management-table.data-table tbody tr > td .muted-cell.d-block,
body.standard-portal .compact-management-table.data-table tbody tr > td .muted-cell.d-block {
  display: inline !important;
  margin-left: 6px;
  white-space: nowrap;
}

body.partner-portal .surface-head > .surface-actions {
  justify-content: flex-end;
  margin-left: auto;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .table-filter-row .dxbl-text-edit input {
  min-height: 0;
  height: 22px;
  padding-block: 0;
  font-size: 12px;
  line-height: 1.2;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) :where(.chip, .status-pill) {
  border-radius: 6px;
  min-height: 22px;
  padding: 3px 7px;
  font-size: 11px;
  line-height: 1;
}

/* Il badge stato della tabella Assenze usa .absence-status, non .chip/.status-pill:
   la base (min-height:26px, pensata per la vecchia riga non compatta) trascinava
   ancora la riga sopra il target 30-31px anche dopo aver compattato il bottone azione. */
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .absence-status {
  min-height: 22px;
  padding: 0 8px;
  font-size: 11px;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .partner-icon-button {
  flex-basis: 24px;
  width: 24px;
  height: 24px;
  min-height: 24px;
  min-width: 24px;
  margin-left: 0;
  font-size: 13px;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .partner-action-button {
  min-height: 28px;
  padding-inline: 8px;
  border-radius: 8px;
  font-size: 12px;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .row-actions {
  gap: 4px;
  justify-content: flex-end;
  min-width: 0;
  width: 100%;
}

/* Colonna azioni sempre allineata a destra, indipendentemente da come e' reso il
   contenuto: cluster .row-actions (flex justify-end) OPPURE singola icona "grezza"
   (.row-edit-link/.row-edit-trigger) messa direttamente nella cella. Su un elemento
   inline il margin-left:auto si risolve a 0 e non allinea nulla, quindi la cella
   deve avere text-align:right: senza questa regola le tabelle con l'icona grezza
   (es. Utenti) mostravano la matita a sinistra mentre quelle con .row-actions a destra. */
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) :is(td.actions-col, td.actions-cell, td.edit-cell) {
  text-align: right;
}

.compact-management-table.data-table.expense-rows-table .actions-col,
.compact-management-table.data-table.expense-rows-table .actions-cell {
  /* Con table-layout:fixed questa e' la larghezza vincolante della colonna, non un
     suggerimento. !important necessario: SmartTable.razor scrive uno
     style="width:..." inline sull'elemento (da TableColumnDefinition.DefaultWidth
     o, se assente, da Kind), e lo style inline vince sempre su qualunque regola
     CSS esterna a parita' o minor peso.
     expense-note-table, absences-table e settings-table non sono piu' in questo
     elenco: le loro colonne azioni usano ora Kind (ActionsIconOnly/
     ActionsIconPlusButton in TableColumnDefinition), che scrive la larghezza
     corretta direttamente inline senza bisogno di override. Resta
     expense-rows-table perche' non ancora migrata a Kind. */
  text-align: right;
  width: 220px !important;
}

/* Tabella "Righe nota" (dettaglio di un singolo rendiconto): Tipo/Cliente/
   Commessa hanno ora larghezze fisse in base al contenuto (badge/nome corti),
   solo Descrizione resta a testo libero e assorbe lo spazio residuo. Somma
   colonne fisse (azioni 70 + data 240 + tipo 120 + cliente 150 + commessa 180
   + carta 80 + fattura 80 + valore 95 + allegati 92 = 1107) + ~220px per
   Descrizione. */
.compact-management-table.data-table.expense-detail-rows-table { min-width: 1330px; }

/* Tabella struttura Manuale/Guida: una sola icona per riga (aggiungi articolo
   o modifica), mai un cluster. Eredita expense-rows-table (Variant="rows")
   quindi senza questa regola dedicata subirebbe lo stesso stiramento a 220px. */
.compact-management-table.data-table.manual-structure-table .actions-col,
.compact-management-table.data-table.manual-structure-table .actions-cell {
  text-align: right;
  width: 56px !important;
}

.compact-management-table.data-table.manual-structure-table { min-width: 600px; }

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .partner-icon-button.row-edit-trigger {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #2563eb;
  flex-basis: 24px;
  height: 24px;
  min-height: 24px;
  min-width: 24px;
  width: 24px;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .partner-icon-button.row-edit-trigger:hover,
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .partner-icon-button.row-edit-trigger:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #1d4ed8;
}

/* Il bottone azione condiviso da tutte le SmartTable (Note spese, Commesse, Assenze,
   Impostazioni) usa .expense-icon-button, non .partner-icon-button: senza questo
   override restava a 34px (dimensione base non compatta) e trascinava l'intera riga
   a quell'altezza anche quando testo/padding richiedevano solo ~30px. */
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-icon-button {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  font-size: 13px;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-icon-button.row-edit-trigger {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #2563eb;
}

.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-icon-button.row-edit-trigger:hover,
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-icon-button.row-edit-trigger:focus-visible {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #1d4ed8;
}

/* Come sopra per .expense-icon-button: il bottone "Allegati" nelle celle Note spese
   eredita solo le dimensioni base di .btn-sm (~26px), leggermente piu' alto del
   target compatto (~24px), e trascinava la riga a 34px invece di 30-31px. */
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-attachment-summary-button {
  min-height: 24px;
  padding: 2px 8px;
  font-size: 12px;
}

/* Gli "slot" della colonna azioni sulla tabella testata note spese/rendiconti
   (.expense-header-actions, usata quando la riga puo' avere sia un'azione
   principale sia l'icona di modifica) hanno min-height:28px pensato per la
   vecchia altezza riga non compatta: senza questo override restava sopra il
   target 24px del bottone icona e trascinava comunque la riga a ~35px. */
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-action-main-slot,
.compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .expense-action-icon-slot {
  min-height: 24px;
}

.compact-management-table.data-table.partner-companies-table .actions-col,
.compact-management-table.data-table.partner-companies-table .actions-cell,
.compact-management-table.data-table.partner-companies-table .edit-cell {
  min-width: 84px;
  padding-right: 2px;
  padding-left: 2px;
  text-align: right;
  width: 84px;
}

body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.actions-col :where(.row-edit-link, .row-edit-trigger),
body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.actions-cell :where(.row-edit-link, .row-edit-trigger),
body.partner-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.edit-cell :where(.row-edit-link, .row-edit-trigger),
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.actions-col :where(.row-edit-link, .row-edit-trigger),
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.actions-cell :where(.row-edit-link, .row-edit-trigger),
body.standard-portal .compact-management-table.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td.edit-cell :where(.row-edit-link, .row-edit-trigger) {
  margin-left: auto;
  margin-right: 0;
}

body.partner-portal .partner-company-form :where(.form-control, .form-select):not(:disabled),
body.partner-portal .partner-blazor-modal .admin-form :where(.form-control, .form-select):not(:disabled),
.standard-company-detail .partner-company-form :where(.form-control, .form-select):not(:disabled),
.standard-user-profile-detail .partner-company-form :where(.form-control, .form-select):not(:disabled) {
  font-weight: 500;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td :where(a, button, span, strong, em, small) {
  line-height: inherit;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td :where(strong, .table-name-link, .partner-company-name-button) {
  font-weight: 650;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr:nth-child(even) > td {
  background: #f8fbff;
}

.data-table.partner-companies-table tbody tr:nth-child(even),
.table.partner-companies-table tbody tr:nth-child(even) {
  background: transparent;
}

.data-table.partner-companies-table tbody tr:nth-child(even) > td,
.table.partner-companies-table tbody tr:nth-child(even) > td {
  background: #fff;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 0;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr:hover > td {
  border-color: #dbeafe;
  background: #f1f6ff;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) tbody tr > td:first-child {
  box-shadow: inset 3px 0 #dbe3ee;
}

.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) td > strong + .status-pill,
.data-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) td > strong + .chip {
  margin-left: 10px;
  vertical-align: middle;
}

.devexpress-grid-host {
  width: 100%;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) {
  border: 0;
  border-radius: 14px;
  background: transparent;
  overflow-x: auto;
}

.devexpress-grid-host .dx-datagrid {
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  font-family: inherit;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid {
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.devexpress-grid-host .dx-datagrid-headers {
  background: #f8fafc;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-headers {
  border: 1px solid #e8eef7;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #f8fafc;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-header-row > td {
  padding: 10px 12px;
  border-color: #e8eef7;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-filter-row > td {
  padding: 8px 10px 12px;
  border-color: #e8eef7;
  background: #f8fafc;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-filter-row .dx-texteditor,
.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-search-panel {
  min-height: 38px;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.devexpress-grid-host .dx-toolbar {
  padding: 8px;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-toolbar {
  padding: 0 0 10px;
  border: 0;
  background: transparent;
}

.devexpress-grid-host .dx-datagrid-search-panel {
  min-width: 220px;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-rowsview {
  border: 0;
  background: transparent;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-datagrid-rowsview .dx-datagrid-table {
  border-collapse: separate;
  border-spacing: 0 8px;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row > td {
  padding: 13px 12px;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  vertical-align: middle;
}

.devexpress-grid-host.compact-management-table:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row > td {
  padding: 9px 10px;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row.dx-row-alt > td {
  background: #f8fbff;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row > td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 14px 0 0 14px;
  box-shadow: inset 3px 0 #dbe3ee;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row > td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0 14px 14px 0;
}

.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row.dx-state-hover > td,
.devexpress-grid-host:is(.expense-note-table, .expense-rows-table, .commesse-rows-table, .settings-table, .absences-table, .compact-management-table) .dx-data-row:hover > td {
  border-color: #dbeafe;
  background: #f1f6ff;
}

/* Corpo commessa DevExpress (CommessaBodyEditor + harness di test): condiviso tra i due, non duplicare */
.commesse-devexpress-table-shell {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
}

.commesse-devexpress-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.65fr) minmax(220px, 1fr);
  gap: 12px;
  padding: 6px 8px;
  background: #f8fbff;
  border-bottom: 1px solid #cbd5e1;
}

.commesse-devexpress-tree .dxbl-grid-table {
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

.commesse-devexpress-tree .dxbl-grid-table > thead th,
.commesse-devexpress-tree .dxbl-grid-table > thead td,
.commesse-devexpress-tree .dxbl-grid-header {
  border-bottom-color: var(--border) !important;
  background: #f8fafc !important;
  color: #475569 !important;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: default;
  padding: 12px 14px;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr {
  min-height: 44px;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr > td {
  border-color: #eef2f7 !important;
  background: #fff !important;
  color: #1f2937;
  font-size: 13px;
  padding: 10px 14px;
  vertical-align: middle;
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr:nth-child(even) > td {
  background: #f8fbff !important;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr:hover > td {
  background: #f1f6ff !important;
  border-color: #dbeafe !important;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr:has(.row-title-main.selected) > td {
  background: var(--primary-soft) !important;
  border-color: #bfdbfe !important;
  color: var(--primary-strong);
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr:has(.tree-row-title.group) {
  font-weight: 800;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr:has(.tree-row-title.standard) {
  font-weight: 600;
}

.commesse-devexpress-tree .dxbl-grid-table > tbody > tr > td:first-child {
  position: relative;
  border-left-color: transparent !important;
  box-shadow: none !important;
}

.tree-row-title {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding-left: 12px;
  color: inherit;
  white-space: nowrap;
  min-width: 0;
  max-width: 100%;
}

/* Marker verticale che segue l'indentazione DevExpress: mostra la profondita' del nodo */
.tree-row-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 18px;
  width: 2px;
  border-radius: 999px;
  background: #cbd5e1;
  opacity: .8;
}

.tree-row-title.group::before {
  width: 3px;
  background: #ef4444;
  opacity: 1;
}

.row-title-main {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 900;
  padding: 0;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}

.row-title-main:hover,
.row-title-main:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.row-title-main.selected {
  text-decoration: none;
}

.cell-muted {
  color: #8b99ad;
}

.commesse-devexpress-totals {
  display: grid;
  grid-template-columns: 300px 140px 260px 90px 80px 130px 130px 120px 130px 160px 100px 104px;
  align-items: center;
  gap: 0;
  border-top: 2px solid #cbd5e1;
  background: #f8fafc;
  overflow: hidden;
}

.commesse-devexpress-totals > * {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 14px;
  color: var(--text);
  font-weight: 900;
  white-space: nowrap;
}

.commesse-devexpress-totals > *:first-child {
  justify-content: flex-end;
  text-transform: uppercase;
}

.commesse-devexpress-inline-message {
  border: 1px solid #cbd9f2;
  border-radius: 12px;
  color: #24476f;
  padding: 10px 12px;
  font-weight: 700;
}

.commesse-devexpress-inline-message.error {
  border-color: #f3b6b6;
  color: #a32222;
  background: #fff7f7;
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  border: 1px solid rgba(37, 99, 235, 0.16);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.status-pill {
  border-radius: 6px;
}

.status-pill.success::before,
.status-pill.warning::before,
.status-pill.info::before,
.status-pill.danger::before,
.chip.success::before,
.chip.warning::before,
.chip.info::before,
.chip.danger::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: 0 0 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.status-pill.success,
.chip.success {
  background: #f0fdf4;
  color: #047857;
  border-color: rgba(4, 120, 87, 0.18);
}

.status-pill.warning,
.chip.warning {
  background: #fffbeb;
  color: #b45309;
  border-color: rgba(180, 83, 9, 0.18);
}

.status-pill.info,
.chip.info {
  background: #eff6ff;
  color: #2563eb;
  border-color: rgba(37, 99, 235, 0.16);
}

.status-pill.danger,
.chip.danger {
  background: #fef2f2;
  color: #b91c1c;
  border-color: rgba(185, 28, 28, 0.18);
}

.status-pill.neutral,
.chip.neutral {
  background: #f1f5f9;
  color: #475569;
  border-color: rgba(71, 85, 105, 0.18);
}

.muted-cell {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.report-stamp-list {
  display: block;
  max-width: 520px;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  white-space: normal;
}

.report-stamp-cell-missed .report-stamp-list,
.report-stamp-cell-missed strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .18);
  color: #92400e;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
}

.report-stamp-cell-problem .report-stamp-list,
.report-stamp-cell-problem strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(220, 38, 38, .16);
  color: #991b1b;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, .10), 0 8px 18px rgba(220, 38, 38, .12);
}

.report-missing-stamp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  height: 26px;
  border: 1px solid rgba(220, 38, 38, .32);
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.1;
  padding: 0 8px;
  text-decoration: none;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, .10), 0 8px 18px rgba(220, 38, 38, .14);
  animation: reportMissingPulse 1.5s ease-in-out infinite;
}

.report-missing-stamp-action:hover,
.report-missing-stamp-action:focus {
  background: var(--danger);
  color: #fff;
  text-decoration: none;
}

@keyframes reportMissingPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(220, 38, 38, .10), 0 8px 18px rgba(220, 38, 38, .14);
  }

  50% {
    transform: scale(1.08);
    box-shadow: 0 0 0 8px rgba(220, 38, 38, .08), 0 10px 22px rgba(220, 38, 38, .18);
  }
}

.report-stamp-cell-ok .report-stamp-list,
.report-stamp-cell-ok strong {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 150, 105, .12);
  color: #065f46;
  box-shadow: 0 0 0 5px rgba(5, 150, 105, .08), 0 8px 18px rgba(5, 150, 105, .10);
}

.report-hours-under-expected {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 24px;
  min-width: 42px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(245, 158, 11, .18);
  color: #92400e;
  font-weight: 900;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
}

.report-inline-cell {
  min-width: 96px;
  width: 96px;
}

#reports-table {
  table-layout: fixed;
  min-width: 2080px;
}

#reports-table th,
#reports-table td {
  overflow: hidden;
  text-overflow: clip;
}

#reports-table thead th {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.16;
  vertical-align: bottom;
}

#reports-table .report-inline-cell {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

#reports-table .report-definitive-edit-cell {
  width: 134px;
  min-width: 134px;
  max-width: 134px;
}

#reports-table .report-other-absence-cell {
  width: 166px;
  min-width: 166px;
  max-width: 166px;
}

#reports-table .report-other-absence-header {
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
}

#reports-table .report-schedule-action-cell {
  width: 178px;
  min-width: 178px;
  max-width: 178px;
  overflow: visible;
  text-overflow: clip;
}

#reports-table .report-actions-header {
  width: 178px;
  min-width: 178px;
  max-width: 178px;
}

#reports-table .report-status-header,
#reports-table .report-status-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  overflow: visible;
  text-overflow: clip;
}

#reports-table .report-status-header .form-control {
  min-width: 126px;
  width: 100%;
}

#reports-table .report-schedule-action-cell .btn,
#reports-table .report-status-cell .status-pill {
  white-space: nowrap;
}

.report-inline-cell .form-control,
.report-inline-cell .form-select,
.report-inline-edit-form .report-inline-schedule,
.report-inline-edit-form .report-inline-cancel {
  display: none;
}

.report-inline-cell .form-control,
.report-inline-cell .form-select,
.report-inline-edit-form .report-inline-schedule {
  min-height: 32px;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 850;
  text-align: right;
}

.report-inline-edit-form .report-inline-schedule {
  min-width: 150px;
  text-align: left;
}

.report-inline-value {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 32px;
  width: 76px;
  min-width: 76px;
  max-width: 76px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-weight: 850;
  box-sizing: border-box;
}

.report-schedule-action-cell {
  min-width: 310px;
}

.report-inline-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  max-width: 96px;
  height: 25px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 11px;
  font-weight: 950;
  line-height: 1.1;
  padding: 0 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
  animation: reportInlineAddPulse 1.7s ease-in-out infinite;
}

.report-other-absence-cell {
  white-space: nowrap;
}

.report-other-absence-cell .report-inline-add {
  margin-left: 6px;
}

.report-column-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  width: 100%;
  padding: 5px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.report-column-toggle:hover,
.report-column-toggle:focus {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.table-filter-row [data-report-group-toggle] {
  width: 100%;
  min-width: 160px;
}

#reports-table .table-filter-row th {
  vertical-align: middle;
}

.report-inline-add:hover,
.report-inline-add:focus {
  border-color: #f59e0b;
  background: #f59e0b;
  color: #fff;
}

@keyframes reportInlineAddPulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
  }

  50% {
    transform: scale(1.06);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, .08), 0 10px 22px rgba(245, 158, 11, .16);
  }
}

.report-inline-edit-form {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 300px;
}

.report-inline-edit-form .btn {
  min-height: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

tr.is-inline-editing .report-inline-cell .form-control,
tr.is-inline-editing .report-inline-cell .form-select,
tr.is-inline-editing .report-inline-edit-form .report-inline-schedule,
tr.is-inline-editing .report-inline-edit-form .report-inline-cancel,
tr.is-schedule-editing .report-inline-edit-form .report-inline-schedule,
tr.is-schedule-editing .report-inline-edit-form .report-inline-cancel {
  display: inline-flex;
}

tr.is-inline-editing .report-inline-cell .report-inline-value,
tr.is-inline-editing .report-inline-cell .report-inline-add,
tr.is-inline-editing .report-inline-edit-form .report-inline-edit-button,
tr.is-schedule-editing .report-inline-edit-form .report-inline-edit-button {
  display: none;
}

tr.is-inline-editing > td,
tr.is-schedule-editing > td {
  background: #f8fbff !important;
  box-shadow: inset 0 -1px #bfdbfe;
}

[data-report-inline-table].is-definitive-column-editing .report-definitive-edit-cell .form-control {
  display: inline-flex;
}

[data-report-inline-table].is-definitive-column-editing .report-definitive-edit-cell .report-inline-value {
  display: none;
}

[data-report-inline-table].is-absence-group-editing .report-absence-edit-cell .form-control,
[data-report-inline-table].is-overtime-group-editing .report-overtime-edit-cell .form-control {
  display: inline-flex;
}

[data-report-inline-table].is-absence-group-editing .report-absence-edit-cell .report-inline-value,
[data-report-inline-table].is-overtime-group-editing .report-overtime-edit-cell .report-inline-value {
  display: none;
}

.report-empty-cell {
  min-width: 72px;
  background: rgba(246, 248, 251, 0.55);
}

.compact-actions {
  margin-top: 10px;
}

.actions-col {
  width: 1%;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.inline-form {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.user-schedule-cell {
  min-width: 330px;
  max-width: 430px;
}

.user-schedule-current {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-bottom: 8px;
}

.user-schedule-label {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.user-schedule-plan {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fbff;
}

.user-schedule-plan summary {
  cursor: pointer;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 900;
}

.user-schedule-plan ul {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.user-schedule-plan li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff;
  color: var(--text-main);
  font-size: 12px;
}

.user-schedule-plan li span {
  color: var(--text-muted);
  font-weight: 700;
}

.user-schedule-change-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) 132px auto;
  gap: 8px;
  align-items: end;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--line);
}

.user-schedule-change-form label {
  display: grid;
  gap: 3px;
  margin: 0;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.user-schedule-change-form .form-select,
.user-schedule-change-form .form-control {
  min-height: 34px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .user-schedule-cell {
    min-width: 280px;
  }

  .user-schedule-change-form {
    grid-template-columns: 1fr;
  }
}

.hours-input {
  width: 78px;
}

.check-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.permission-box {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-grid.admin-grid-stack {
  grid-template-columns: minmax(0, 1fr);
}

.admin-form {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  margin-bottom: 14px;
}

.partner-inline-editor {
  margin: 0 0 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: linear-gradient(180deg, #fbfdff 0%, #f7faff 100%);
}

.partner-inline-editor > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  padding: 12px 14px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  list-style: none;
}

.partner-inline-editor > summary::-webkit-details-marker {
  display: none;
}

.partner-inline-editor > summary::after {
  content: "Apri";
  flex: 0 0 auto;
  padding: 6px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.partner-inline-editor[open] > summary {
  border-bottom: 1px solid var(--border);
}

.partner-inline-editor[open] > summary::after {
  content: "Chiudi";
  background: #fff;
  color: var(--muted);
}

.partner-inline-editor > form {
  margin: 0;
  padding: 14px;
}

.partner-inline-editor > form.form-grid {
  align-items: end;
}

.dashboard-filter-toolbar .form-grid {
  grid-template-columns: 150px 190px minmax(220px, 320px) auto;
  align-items: end;
}

.blazor-dashboard-shell {
  overflow: hidden;
  padding: 20px;
}

.blazor-dashboard-head {
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 16px;
}

.blazor-dashboard-head p {
  max-width: 680px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.blazor-dashboard-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  min-width: 260px;
}

.blazor-dashboard-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe7f7;
  border-radius: 999px;
  background: #fff;
  color: #52627a;
  font-size: 12px;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.ok {
  background: #059669;
  box-shadow: 0 0 0 4px rgba(5, 150, 105, .12);
}

.legend-dot.warning {
  background: #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .14);
}

.legend-dot.danger {
  background: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, .12);
}

.blazor-dashboard-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.blazor-dashboard-metrics .metric.compact {
  position: relative;
  min-height: 86px;
  padding: 15px;
  overflow: hidden;
  border: 1px solid #dde8f5;
  background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
  box-shadow: none;
}

.blazor-dashboard-metrics .metric.compact::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 13px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  opacity: .14;
}

.blazor-dashboard-metrics .metric.primary::after {
  background: #2563eb;
}

.blazor-dashboard-metrics .metric.success::after {
  background: #059669;
}

.blazor-dashboard-metrics .metric.muted::after {
  background: #64748b;
}

.blazor-dashboard-metrics .metric.danger::after {
  background: #dc2626;
}

.blazor-dashboard-metrics .metric.compact strong {
  font-size: 24px;
}

.blazor-grid-wrap {
  overflow-x: auto;
  border: 1px solid #dbe7f7;
  border-radius: 16px;
  background: #fff;
}

.nethub-blazor-grid {
  overflow: hidden;
  min-width: 1480px;
  border: 0;
  border-radius: 16px;
  background: #fff;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr:nth-child(even) > td {
  background: #f8fbff;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr:hover > td {
  background: #eef6ff;
}

.nethub-blazor-grid .dxbl-grid-header-row > th,
.nethub-blazor-grid .dxbl-grid-filter-row > td {
  background: #f3f7fc;
}

.nethub-blazor-grid .dxbl-grid-header-row > th {
  padding: 6px 8px;
  color: #334155;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nethub-blazor-grid .dxbl-grid-filter-row > td {
  padding: 2px 6px 3px;
}

.nethub-blazor-grid .dxbl-grid-filter-row input,
.nethub-blazor-grid .dxbl-grid-filter-row .dxbl-text-edit {
  height: 28px;
  min-height: 28px;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
}

.nethub-blazor-grid .dxbl-grid-filter-row .dxbl-text-edit input {
  min-height: 0;
  height: 22px;
  padding-block: 0;
  font-size: 12px;
  line-height: 1.2;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr > td {
  padding: 5px 8px;
  line-height: 1.22;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-ok > td {
  border-color: #d1fae5;
  background: #ecfdf5;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-ok > td:first-child {
  box-shadow: inset 4px 0 rgba(5, 150, 105, .72);
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-ok:hover > td {
  border-color: #bbf7d0;
  background: #dcfce7;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-planned > td {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-planned > td:first-child {
  box-shadow: inset 4px 0 #2563eb;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-planned:hover > td {
  border-color: #93c5fd;
  background: #dbeafe;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-problem > td {
  border-color: #fecdd3;
  background: var(--danger-soft);
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-problem > td:first-child {
  box-shadow: inset 4px 0 var(--danger);
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-problem:hover > td {
  border-color: #fda4af;
  background: #fff1f2;
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-missed > td {
  border-color: #fed7aa;
  background: var(--warning-soft);
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-missed > td:first-child {
  box-shadow: inset 4px 0 var(--warning);
}

.nethub-blazor-grid .dxbl-grid-table > tbody > tr.report-row-missed:hover > td {
  border-color: #fdba74;
  background: #fff7ed;
}

.time-chip,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 950;
  line-height: 1;
}

.time-chip.ok {
  color: #064e3b;
  background: #dff9ed;
  box-shadow: 0 0 0 6px rgba(5, 150, 105, .10);
}

.time-chip.missing {
  color: #92400e;
  background: #fff3d7;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, .10);
}

.status-chip.success {
  color: #047857;
  background: #dcfce7;
}

.status-chip.warning {
  color: #b45309;
  background: #fef3c7;
}

.status-chip.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.blazor-empty-state {
  margin-top: 10px;
  border: 1px dashed #cbdcf1;
  border-radius: 16px;
  background: #f8fbff;
}

@media (max-width: 900px) {
  .blazor-dashboard-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .blazor-dashboard-legend {
    justify-content: flex-start;
    min-width: 0;
  }
}

@media (max-width: 560px) {
  .blazor-dashboard-shell {
    padding: 14px;
  }

  .blazor-dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

.partner-inline-editor + .table-responsive,
.partner-inline-editor + .info-callout {
  margin-top: 10px;
}

.work-surface > .surface-head p {
  max-width: 760px;
}

.admin-wide {
  grid-column: 1 / -1;
}

.procedure-capability-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.procedure-capability-panel > span {
  font-size: 0.72rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.permission-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: #334155;
  font-weight: 800;
  white-space: nowrap;
}

.permission-toggle input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.mobile-badge {
  display: grid;
  width: min(100%, 520px);
  max-width: 520px;
  gap: 12px;
  margin: 0 auto;
}

.mobile-badge-head,
.mobile-hero-card,
.mobile-page-bar,
.mobile-mode-choice,
.mobile-user-card,
.location-panel,
.validation-panel,
.offline-panel,
.mobile-feedback-panel,
.mobile-confirm-panel,
.mobile-list-head,
.mobile-history-filter,
.mobile-record-list,
.mobile-bottom-actions,
.mobile-today-list,
.mobile-stamp-form {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-badge-head,
.mobile-hero-card,
.mobile-page-bar,
.mobile-mode-choice,
.location-panel,
.validation-panel,
.offline-panel,
.mobile-feedback-panel,
.mobile-confirm-panel,
.mobile-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
}

.mobile-hero-card {
  align-items: flex-start;
  min-height: 128px;
  border-color: #bfdbfe;
  background: linear-gradient(145deg, #ffffff 0%, #eef6ff 100%);
}

.mobile-hero-logo {
  display: block;
  flex: 0 0 68px;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .08);
}

.mobile-hero-card h2 {
  margin: 4px 0 8px;
  color: var(--text);
  font-size: 28px;
  font-weight: 900;
  letter-spacing: 0;
}

.mobile-page-bar {
  justify-content: flex-start;
  border-radius: 16px;
  background: #fff;
}

.mobile-page-bar .btn {
  flex: 0 0 auto;
}

.mobile-page-bar strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.mobile-mode-choice {
  display: grid;
  align-items: stretch;
  gap: 14px;
  padding: 16px;
}

.mobile-mode-choice h2 {
  margin: 2px 0 6px;
  color: var(--text);
  font-size: 24px;
  font-weight: 950;
}

.mobile-mode-choice p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 750;
}

.mobile-mode-grid {
  display: grid;
  gap: 10px;
}

.mobile-mode-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 4px 12px;
  width: 100%;
  min-height: 96px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #f8fbff;
  padding: 14px;
  color: var(--text);
  text-align: left;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.mobile-mode-card:hover,
.mobile-mode-card:focus-visible {
  border-color: #93c5fd;
  box-shadow: 0 14px 28px rgba(37, 99, 235, .12);
  transform: translateY(-1px);
}

.mobile-mode-card.primary {
  border-color: #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.mobile-mode-icon {
  display: inline-flex;
  grid-row: span 2;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 14px;
  font-weight: 950;
}

.mobile-mode-card.primary .mobile-mode-icon {
  background: var(--primary);
  color: #fff;
}

.mobile-mode-card[data-mobile-mode="position"] .mobile-mode-icon {
  background: #dcfce7;
  color: #047857;
}

.mobile-mode-card strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.mobile-mode-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-form-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 46px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 8px 10px 8px 14px;
}

.mobile-form-mode-bar span {
  color: var(--text);
  font-size: 14px;
  font-weight: 900;
}

.mobile-badge.is-qr-mode .mobile-page-bar,
.mobile-badge.is-qr-mode .mobile-bottom-actions {
  display: none;
}

.mobile-badge.is-qr-mode .mobile-stamp-form {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.mobile-badge.is-qr-mode .mobile-stamp-form > :not(input):not(.mobile-form-mode-bar):not(.mobile-qr-scan) {
  display: none !important;
}

.mobile-badge.is-qr-mode .mobile-form-mode-bar {
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-badge.is-qr-mode .mobile-qr-scan {
  min-height: 360px;
  align-content: center;
  border-radius: 22px;
  padding: 16px;
}

.mobile-badge.is-qr-mode .mobile-qr-scan video {
  min-height: 300px;
}

.mobile-badge.is-qr-mode .mobile-qr-actions {
  grid-template-columns: 1fr;
}

.mobile-badge.is-qr-mode .mobile-qr-actions .btn {
  min-height: 52px;
}

.mobile-badge.is-qr-mode.is-qr-complete .mobile-qr-actions {
  display: none;
}

.mobile-badge:not(.is-qr-mode) .mobile-qr-scan,
.mobile-badge.is-position-mode .mobile-position-hidden,
.mobile-badge.is-position-mode .mobile-section-title,
.mobile-badge.is-position-mode .stamp-actions {
  display: none !important;
}

.mobile-badge-head h2 {
  margin: 2px 0 0;
  font-size: 22px;
  font-weight: 800;
}

.mobile-badge-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--success-soft);
  color: var(--success);
  font-size: 12px;
  font-weight: 800;
}

.connection-pill.is-offline {
  background: var(--warning-soft);
  color: #b45309;
}

.validation-panel {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.location-panel[hidden],
.validation-panel[hidden] {
  display: none;
}

.location-panel {
  align-items: stretch;
  border-color: #d8e6f7;
  background: #f8fbff;
}

.location-panel div {
  display: grid;
  gap: 4px;
}

.location-panel span {
  color: var(--text);
  font-weight: 850;
}

.location-panel small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.validation-panel.is-valid {
  color: var(--success);
}

.validation-panel.is-warning {
  color: #b45309;
}

.validation-panel.is-invalid {
  color: var(--danger);
}

.mobile-feedback-panel {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mobile-confirm-panel {
  border-color: #bfdbfe;
  background: #fff;
}

.mobile-confirm-panel h2,
.mobile-list-head h2 {
  margin: 2px 0 6px;
  font-size: 20px;
  font-weight: 900;
}

.mobile-confirm-panel p,
.mobile-list-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.mobile-confirm-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

.mobile-confirm-actions .btn {
  min-height: 44px;
  min-width: 0;
  width: 100%;
}

.mobile-confirm-actions .btn-outline-secondary {
  grid-column: 1;
  justify-self: start;
}

.mobile-confirm-actions .btn-primary,
.mobile-confirm-actions .btn-danger {
  grid-column: 2;
  justify-self: end;
}

.mobile-feedback-main {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
}

.mobile-feedback-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.mobile-feedback-main strong,
.mobile-feedback-main div > span,
.mobile-feedback-main small {
  display: block;
}

.mobile-feedback-main strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.mobile-feedback-main div > span {
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 750;
}

.mobile-feedback-panel small,
.offline-panel small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.mobile-feedback-panel.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.mobile-feedback-panel.is-success .mobile-feedback-icon {
  background: var(--success);
}

.mobile-feedback-panel.is-success .mobile-feedback-main div > span {
  color: #166534;
}

.mobile-feedback-panel.is-loading {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.mobile-feedback-panel.is-loading .mobile-feedback-icon {
  background: var(--primary);
}

.mobile-feedback-panel.is-warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.mobile-feedback-panel.is-warning .mobile-feedback-icon {
  background: var(--warning);
}

.mobile-feedback-panel.is-warning .mobile-feedback-main div > span {
  color: #9a3412;
}

.mobile-feedback-panel.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.mobile-feedback-panel.is-error .mobile-feedback-icon {
  background: var(--danger);
}

.mobile-feedback-panel.is-error .mobile-feedback-main div > span,
.offline-panel small.is-error {
  color: var(--danger);
}

.stamp-actions .btn.is-loading {
  opacity: .88;
}

.stamp-actions .btn.is-selected {
  outline: 3px solid rgba(37, 99, 235, .18);
  box-shadow: 0 10px 22px rgba(37, 99, 235, .16);
}

.mobile-stamp-form {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.mobile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #f8fbff;
  padding: 12px;
}

.mobile-user-card label,
.mobile-user-card div {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 4px;
  margin: 0;
}

.mobile-user-card label,
.mobile-user-card div > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.mobile-user-card input {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.mobile-user-card strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.mobile-user-card small,
.mobile-user-card .form-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-transform: none;
}

.mobile-user-avatar {
  display: inline-flex;
  flex: 0 0 46px;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: #dbeafe;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
}

.mobile-field {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.mobile-badge .form-control,
.mobile-badge .form-select {
  border-color: #dbe3ee;
  border-radius: 14px;
  min-height: 48px;
  font-weight: 750;
}

.mobile-qr-scan {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #f8fbff;
}

.mobile-qr-scan video {
  display: block;
  width: 100%;
  max-height: 280px;
  border-radius: 14px;
  background: #0f172a;
  object-fit: cover;
}

.mobile-qr-scan video[hidden] {
  display: none;
}

.mobile-qr-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-qr-actions .btn {
  min-height: 46px;
  border-radius: 14px;
  font-weight: 900;
}

.mobile-qr-scan small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-qr-scan.is-scanning {
  border-color: #2563eb;
  background: #eff6ff;
}

.mobile-qr-scan.is-success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.mobile-qr-scan.is-error {
  border-color: #fecaca;
  background: #fef2f2;
}

.mobile-qr-scan.is-success small {
  color: #166534;
}

.mobile-qr-scan.is-error small {
  color: var(--danger);
}

.mobile-date-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-section-title {
  display: grid;
  gap: 2px;
}

.mobile-section-title strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.mobile-switch-row {
  min-height: 52px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #f8fafc;
  padding: 12px;
}

.mobile-today-list {
  padding: 16px;
}

.mobile-history-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 10px;
  padding: 16px;
}

.mobile-record-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.mobile-record-summary {
  gap: 14px;
}

.mobile-record-day {
  display: grid;
  gap: 8px;
}

.mobile-record-day header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.mobile-record-day header strong {
  color: var(--primary);
}

.mobile-record-item {
  display: grid;
  gap: 12px;
  border: 1px solid #dbe3ee;
  border-left: 5px solid #86efac;
  border-radius: 16px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .04);
}

.mobile-record-item.is-missed {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.mobile-record-item.is-absence {
  border-left-color: #2563eb;
  background: #eff6ff;
}

.mobile-record-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-record-item strong,
.mobile-record-item span {
  display: block;
}

.mobile-record-item .status-pill,
.mobile-record-item .chip {
  display: inline-flex;
}

.mobile-record-time {
  color: var(--primary);
  font-size: 28px;
  font-weight: 900;
}

.mobile-record-label {
  font-size: 20px;
  line-height: 1.1;
}

.mobile-record-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-record-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-record-detail span {
  min-width: 0;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.mobile-record-detail strong {
  margin-bottom: 2px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-record-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.mobile-history-section {
  display: grid;
  gap: 12px;
}

.mobile-empty-state {
  display: grid;
  gap: 4px;
  padding: 18px;
  color: var(--muted);
  text-align: center;
}

.mobile-empty-state strong {
  color: var(--text);
}

.mobile-action-grid {
  display: grid;
  gap: 12px;
}

.mobile-action-card {
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  min-height: 92px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
}

.mobile-action-icon {
  display: inline-flex;
  flex: 0 0 54px;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.mobile-action-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.mobile-action-card strong {
  font-size: 20px;
  font-weight: 900;
}

.mobile-action-card small,
.mobile-record-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-action-card:focus,
.mobile-action-card:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--text);
  transform: translateY(-1px);
}

.mobile-install-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  padding: 16px;
  box-shadow: var(--shadow);
}

.mobile-install-card strong,
.mobile-install-card small {
  display: block;
}

.mobile-install-card strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 950;
}

.mobile-install-card small {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-bottom-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  padding: 14px;
}

.mobile-today-list .surface-head {
  margin-bottom: 12px;
}

.mobile-today-list .table {
  min-width: 520px;
}

.stamp-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
  gap: 10px;
}

.stamp-actions .btn {
  min-height: 64px;
  border-radius: 16px;
  font-size: 16px;
  font-weight: 900;
  white-space: normal;
}

.mobile-expense-panel,
.mobile-expense-total-card {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-expense-panel summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 0 16px;
  cursor: pointer;
  color: var(--text);
  font-size: 15px;
  font-weight: 950;
  list-style: none;
}

.mobile-expense-panel summary::-webkit-details-marker {
  display: none;
}

.mobile-expense-panel summary::after {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #eaf2ff;
  color: var(--primary);
  font-weight: 950;
}

.mobile-expense-panel[open] summary::after {
  content: "-";
}

.mobile-expense-form {
  border: 0;
  border-top: 1px solid var(--border);
  border-radius: 0 0 18px 18px;
  box-shadow: none;
}

.mobile-expense-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}

.mobile-expense-chip {
  display: grid;
  flex: 0 0 min(78%, 260px);
  gap: 4px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  background: #fff;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.mobile-expense-chip.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .14);
}

.mobile-expense-chip strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-expense-chip span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.mobile-expense-total-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.mobile-expense-total-card h2 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
}

.mobile-expense-total-card p,
.mobile-expense-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-expense-totals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.mobile-expense-totals span {
  display: grid;
  min-width: 0;
  gap: 2px;
  border: 1px solid #e5edf7;
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.mobile-expense-totals strong {
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
}

.mobile-expense-list {
  padding: 0;
}

.mobile-expense-attachments {
  display: grid;
  gap: 8px;
}

.mobile-expense-attachments span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e5edf7;
  border-radius: 12px;
  background: #f8fbff;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.mobile-expense-attachments a {
  color: var(--primary);
  font-weight: 900;
  text-decoration: none;
}

.mobile-expense-inline-edit {
  border-top: 1px solid #edf2f7;
  padding-top: 8px;
}

.mobile-expense-inline-edit > summary {
  cursor: pointer;
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
  list-style: none;
}

.mobile-expense-delete {
  display: grid;
  margin-top: 8px;
}

.mobile-focus-panel,
.mobile-expense-head,
.mobile-expense-detail,
.mobile-expense-editor {
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow);
}

.mobile-expense-head,
.mobile-expense-detail,
.mobile-expense-editor {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.mobile-expense-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
}

.mobile-expense-head h2,
.mobile-expense-detail-head h2,
.mobile-expense-editor h2 {
  margin: 2px 0 4px;
  color: var(--text);
  font-size: 22px;
  font-weight: 950;
  letter-spacing: 0;
}

.mobile-expense-head p,
.mobile-expense-detail-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.mobile-expense-note-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 4px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}

.mobile-expense-note-card {
  display: grid;
  flex: 0 0 min(82%, 280px);
  gap: 4px;
  min-height: 118px;
  border: 1px solid #dbeafe;
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  color: var(--text);
  text-align: left;
  scroll-snap-align: start;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .04);
}

.mobile-expense-note-card.is-active {
  border-color: #2563eb;
  background: linear-gradient(145deg, #eff6ff 0%, #ffffff 100%);
  box-shadow: 0 14px 30px rgba(37, 99, 235, .14);
}

.mobile-expense-note-card span,
.mobile-expense-note-card small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-expense-note-card strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-expense-note-card b {
  justify-self: start;
  border-radius: 999px;
  background: #eaf2ff;
  padding: 5px 10px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 950;
}

.mobile-expense-detail {
  border-top: 4px solid #2563eb;
}

.mobile-expense-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.mobile-expense-inline-actions,
.mobile-expense-row-actions,
.mobile-approval-edit {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.mobile-expense-row-list {
  display: grid;
  gap: 10px;
}

.mobile-expense-row-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe3ee;
  border-left-width: 4px;
  border-radius: 18px;
  background: #fff;
  padding: 12px;
}

.mobile-expense-row-card.is-reimbursable,
.mobile-expense-row-card.is-pending {
  border-left-color: #2563eb;
  background: #f8fbff;
}

.mobile-expense-row-card.is-card,
.mobile-expense-row-card.is-approved {
  border-left-color: #059669;
  background: #f0fdf4;
}

.mobile-expense-row-card.is-rejected {
  border-left-color: #dc2626;
  background: #fef2f2;
}

.mobile-expense-row-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 4px 10px;
}

.mobile-expense-row-main span,
.mobile-expense-row-meta span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-expense-row-main strong {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-expense-row-main b {
  grid-row: span 2;
  justify-self: end;
  align-self: center;
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.mobile-expense-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mobile-expense-row-meta span {
  border-radius: 999px;
  background: #eef3f9;
  padding: 4px 8px;
}

.mobile-expense-editor {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.mobile-expense-switches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.mobile-expense-switches label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 900;
}

.mobile-expense-switches input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.mobile-expense-two-cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-expense-rate {
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

.mobile-expense-rate small,
.mobile-expense-total-card span,
.mobile-expense-total-card small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.mobile-expense-rate strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 950;
}

.mobile-approval-edit {
  justify-content: stretch;
}

.mobile-approval-edit label {
  display: grid;
  flex: 1;
  gap: 4px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

@media (max-width: 420px) {
  .mobile-expense-two-cols,
  .mobile-expense-switches,
  .mobile-expense-totals {
    grid-template-columns: 1fr;
  }

  .mobile-expense-detail-head,
  .mobile-expense-head {
    grid-template-columns: 1fr;
  }

  .mobile-expense-inline-actions,
  .mobile-expense-row-actions {
    justify-content: flex-start;
  }
}

.auth-panel {
  max-width: 520px;
}

.auth-brand {
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.auth-brand img {
  display: block;
  width: min(260px, 82%);
  height: auto;
}

.auth-link {
  color: var(--primary);
  font-size: .92rem;
  font-weight: 800;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.blazor-auth-copy {
  display: grid;
  gap: 4px;
  margin-bottom: 18px;
}

.blazor-auth-copy h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  letter-spacing: 0;
}

.blazor-auth-copy p {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.auth-actions-row {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr minmax(160px, auto);
  align-items: center;
  gap: 12px;
}

.auth-actions-row .btn-outline-secondary {
  grid-column: 1;
  justify-self: start;
}

.auth-actions-row .btn-primary {
  grid-column: 3;
  justify-self: end;
}

@media (max-width: 420px) {
  .auth-actions-row {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .auth-actions-row .btn-outline-secondary,
  .auth-actions-row .btn-primary {
    grid-column: 1;
    justify-self: stretch;
  }
}

.m365-login-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

/* Reso come <button> dentro il form di login (serve a inviare l'email in POST): i button non
   ereditano font e non hanno il cursore a mano, quindi vanno riallineati esplicitamente. */
.m365-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 42px;
  padding: 0 16px;
  background: #fff;
  border: 1px solid #8c8c8c;
  border-radius: var(--radius);
  color: #1f1f1f;
  font-family: inherit;
  font-size: 15px;
  font-weight: 650;
  line-height: 1;
  text-decoration: none;
  box-shadow: none;
  cursor: pointer;
}

.m365-login-button:hover,
.m365-login-button:focus {
  background: #f3f2f1;
  border-color: #666;
  color: #1f1f1f;
  text-decoration: none;
}

.m365-login-button:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.m365-login-logo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.m365-login-logo-square {
  display: block;
  width: 9px;
  height: 9px;
}

.m365-login-logo-red {
  background: #f25022;
}

.m365-login-logo-green {
  background: #7fba00;
}

.m365-login-logo-blue {
  background: #00a4ef;
}

.m365-login-logo-yellow {
  background: #ffb900;
}

.alert {
  border-radius: var(--radius);
}

.confirm-modal:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.confirm-dialog {
  width: min(460px, 100%);
  padding: 20px;
}

.confirm-actions {
  display: grid;
  grid-template-columns: minmax(120px, auto) 1fr minmax(120px, auto);
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}

.confirm-actions .btn-danger,
.confirm-actions .btn-primary {
  grid-column: 3;
  justify-self: end;
}

.confirm-actions .btn-outline-secondary {
  grid-column: 1;
  justify-self: start;
}

@media (min-width: 1180px) {
  body.sidebar-open .content {
    padding-left: calc(var(--sidebar-width) + 32px);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 0;
    pointer-events: none;
  }
}

@media (max-height: 820px) {
  .sidebar {
    left: 0;
    top: var(--topbar-height);
    bottom: 0;
    max-height: calc(100dvh - var(--topbar-height));
    padding: 10px 0;
  }

  .brand {
    min-height: 42px;
    gap: 9px;
  }

  .brand-mark,
  .avatar,
  .company-logo {
    width: 36px;
    height: 36px;
  }

  .brand-mark {
    flex-basis: 36px;
  }

  .sidebar-user {
    grid-template-columns: 36px minmax(0, 1fr) 9px;
    gap: 8px;
    margin: 10px 0;
    padding: 8px;
  }

  .sidebar-company {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 8px;
    margin-bottom: 10px;
    padding: 8px;
  }

  .menu-search {
    margin-bottom: 8px;
  }

  .menu-search input {
    min-height: 34px;
    padding-block: 6px;
  }

  .nav-section {
    margin: 8px 6px 1px;
  }

  .nav-stack a {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 36px;
    padding: 4px 8px;
    font-size: 13px;
  }

  .nav-row .nav-link-main {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  body:not(.sidebar-open) .nav-row {
    display: block;
  }

  body:not(.sidebar-open) .nav-stack a,
  body:not(.sidebar-open) .nav-row .nav-link-main {
    display: flex;
    min-height: 58px;
    padding: 6px 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 8.5px;
    line-height: 1.1;
    text-align: center;
  }

  body:not(.sidebar-open) .nav-link-main > span:last-child {
    width: 72px;
    max-width: 72px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: keep-all;
  }

  .nav-icon {
    width: 28px;
    height: 28px;
  }

  .nav-favorites-sublist {
    margin-left: 36px;
  }

  .sidebar-footer {
    gap: 8px;
    padding-top: 8px;
  }

  .portal-preview-switch {
    gap: 6px;
    padding: 8px;
  }

  .language-select select {
    min-height: 32px;
  }
}

@media (max-width: 1180px) {
  .metric-grid,
  .dashboard-grid,
  .admin-grid,
  .expense-summary-grid,
  .settings-form-shell {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid,
  .permission-box,
  .list-filter-grid,
  .timestamp-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .content {
    padding: calc(var(--topbar-height) + 14px) 14px 68px;
  }

  .topbar,
  .page-hero,
  .settings-page-head,
  .surface-head,
  .settings-panel-head,
  .table-toolbar-split,
  .mobile-badge-head,
  .location-panel,
  .offline-panel,
  .mobile-feedback-panel,
  .mobile-confirm-panel,
  .mobile-list-head,
  .mobile-record-item {
    align-items: stretch;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .page-hero.blazor-page-hero,
  .page-hero.partner-blazor-head,
  .page-hero.standard-blazor-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-toolbar-left,
  .table-toolbar-right {
    justify-content: flex-start;
    margin-left: 0;
    width: 100%;
  }

  .metric-grid,
  .dashboard-grid,
  .admin-grid,
  .expense-notes-grid,
  .expense-summary-grid,
  .expense-approval-filters,
  .settings-form-shell,
  .settings-form-grid,
  .company-two-factor-grid,
  .list-filter-grid,
  .form-grid,
  .copy-row,
  .permission-box,
  .admin-form,
  .stamp-actions,
  .timestamp-profile-grid {
    grid-template-columns: 1fr;
  }

  .mobile-history-filter {
    grid-template-columns: 1fr;
  }

  .mobile-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mobile-confirm-actions .btn,
  .mobile-record-meta {
    width: 100%;
  }

  .mobile-record-meta {
    align-items: stretch;
  }

  .surface-actions,
  .company-two-factor-actions,
  .settings-actions {
    justify-content: flex-start;
  }

  body.partner-portal .surface-head > .surface-actions {
    justify-content: flex-end;
    margin-left: auto;
  }

  .expense-context-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .expense-context-brand {
    justify-content: flex-start;
    text-align: left;
  }

  .approval-amount-form {
    justify-content: flex-start;
  }

  .field.span-2,
  .form-grid-wide {
    grid-column: auto;
  }

  .table-search {
    width: 100%;
    min-width: 0;
  }

  .presence-command-bar,
  .presence-subnav,
  .presence-table-panel .surface-head {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
    padding-inline: 14px;
  }

  .presence-period-picker,
  .presence-actions {
    flex-wrap: wrap;
  }

  .presence-period-panel {
    position: fixed;
    top: 92px;
    right: 14px;
    left: 14px;
    grid-template-columns: 1fr;
    min-width: 0;
    max-height: calc(100vh - 120px);
    overflow: auto;
  }

  .presence-preset-list {
    padding-right: 0;
    padding-bottom: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .presence-period-fields {
    grid-template-columns: 1fr;
  }

  .presence-period-button,
  .presence-actions .btn {
    flex: 1 1 180px;
  }

  .presence-day-strip {
    padding-inline: 14px;
  }

  .presence-day-card {
    flex-basis: 92px;
    min-height: 82px;
  }

  .expense-month-card {
    min-width: 132px;
  }

  .expense-payment-options {
    grid-template-columns: 1fr;
  }

  .expense-summary-card {
    min-height: 78px;
  }

  .presence-table-panel {
    margin-inline: 0;
  }

  .presence-table-panel .surface-head > div:first-child {
    grid-template-columns: 1fr;
  }

  .presence-date-summary {
    justify-items: start;
    padding-right: 0;
    border-right: 0;
  }

  .presence-qr-card {
    grid-template-columns: 1fr;
  }

  .presence-qr-preview {
    width: 100%;
    min-height: 160px;
  }

  .editor-modal,
  .confirm-modal {
    align-items: end;
    padding: 10px;
  }

  .editor-dialog,
  .confirm-dialog {
    width: 100%;
    max-height: calc(100dvh - 20px);
    border-radius: 18px;
  }

  .editor-dialog .surface-head {
    padding: 14px;
  }

  .editor-body {
    padding: 14px;
  }

  .editor-dialog.wide .form-grid,
  .editor-dialog .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .modal-form-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .modal-form-actions .btn[data-close-modal],
  .modal-form-actions .btn-outline-secondary {
    grid-column: 1;
  }

  .modal-form-actions .btn[type="submit"],
  .modal-form-actions .btn-primary,
  .modal-form-actions .btn-danger {
    grid-column: 2;
  }

  .modal-form-actions.has-danger {
    align-items: stretch;
    flex-direction: column;
  }

  .modal-form-main-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    margin-left: 0;
    width: 100%;
  }

  .modal-form-actions:not(.has-danger) .modal-form-main-actions {
    grid-column: 1 / -1;
    justify-self: stretch;
  }

  .modal-form-actions.has-danger > .btn-danger {
    width: 100%;
  }

  .confirm-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .confirm-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .confirm-actions .btn-danger,
  .confirm-actions .btn-primary {
    grid-column: 2;
  }

  .confirm-actions .btn-outline-secondary {
    grid-column: 1;
  }

}

.partner-blazor-head,
.partner-blazor-nav {
  margin-bottom: 14px;
}

.partner-blazor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.partner-blazor-tabs .btn {
  min-height: 38px;
}

.partner-blazor-modal .editor-dialog {
  max-width: min(1100px, calc(100vw - 40px));
}

.partner-blazor-modal .status-strip {
  margin: 0 24px 16px;
}

.two-factor-panel {
  max-width: 760px;
  gap: 18px;
}

.two-factor-panel.single-method {
  max-width: 760px;
}

.two-factor-heading h1 {
  margin: 4px 0 6px;
  font-size: 1.55rem;
}

.two-factor-heading p,
.two-factor-setup-page .section-heading p {
  color: var(--muted);
  margin: 0;
}

.two-factor-setup-page {
  display: grid;
  gap: 14px;
  width: min(100%, 980px);
  margin: 0 auto;
}

.two-factor-setup-head,
.two-factor-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.two-factor-setup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 20px;
}

.two-factor-setup-head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
}

.two-factor-account {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.two-factor-account span {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.two-factor-state {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.two-factor-state.is-active {
  background: var(--success-soft);
  color: var(--success);
}

.two-factor-card {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.two-factor-authenticator-card[hidden] {
  display: none !important;
}

.two-factor-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}

.two-factor-card-head h3 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 900;
}

.two-factor-preference-card .switch-line {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #f8fbff;
  color: var(--text);
  white-space: nowrap;
}

.two-factor-preference-card .switch-line input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.two-factor-setup-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #f8fbff;
}

.two-factor-authenticator-grid > .two-factor-setup-card {
  padding: 12px;
}

.two-factor-qr-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid #d8e6f7;
  border-radius: 16px;
  background: #fff;
}

.two-factor-qr-block p {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.two-factor-qr-preview {
  display: grid;
  place-items: center;
  flex: 0 0 180px;
  width: 184px;
  height: 184px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}

.two-factor-qr-preview svg,
.two-factor-qr-preview canvas,
.two-factor-qr-image {
  width: 156px;
  height: 156px;
  display: block;
}

.two-factor-qr-preview span {
  color: var(--muted);
  font-weight: 900;
}

.two-factor-guided-setup {
  display: grid;
  gap: 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.two-factor-guided-setup ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.two-factor-manual-key {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #d8e6f7;
  border-radius: var(--radius);
  background: #fff;
}

.two-factor-manual-key span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.two-factor-manual-key strong {
  overflow-wrap: anywhere;
}

.two-factor-method-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.two-factor-panel.single-method .two-factor-method-grid {
  grid-template-columns: minmax(0, 1fr);
}

.two-factor-method-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: none;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.two-factor-panel.single-method .two-factor-method-card {
  display: grid;
  align-items: stretch;
}

.two-factor-panel.single-method .two-factor-setup-card {
  width: min(100%, 420px);
  justify-self: center;
}

.two-factor-panel.single-method .two-factor-form {
  width: min(100%, 360px);
  justify-self: center;
}

.two-factor-panel.single-method .auth-code-input {
  width: 100%;
  max-width: 100%;
}

.two-factor-panel.single-method .modal-actions {
  justify-content: center;
}

.two-factor-status-card {
  text-align: center;
}

.two-factor-status-copy {
  margin: 0;
  color: var(--muted);
  font-weight: 750;
}

.selectable-method-card {
  cursor: pointer;
}

.selectable-method-card:hover,
.selectable-method-card:focus-within {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.selectable-method-card input {
  flex: 0 0 auto;
  margin-top: 2px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.selectable-method-card.is-selected {
  border-color: #2563eb;
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .18);
}

.selectable-method-card.is-disabled {
  opacity: .58;
  cursor: not-allowed;
}

.selectable-method-card.is-disabled:hover,
.selectable-method-card.is-disabled:focus-within {
  border-color: var(--border);
  background: #fff;
  box-shadow: none;
}

.two-factor-method-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.two-factor-method-copy strong {
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
}

.two-factor-method-copy small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.two-factor-method-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.two-factor-method-title strong {
  font-size: 1.05rem;
  color: var(--text);
}

.two-factor-email-hint {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.two-factor-send-email-form {
  margin: 0;
}

.two-factor-authenticator-card {
  gap: 14px;
}

.two-factor-authenticator-grid {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.two-factor-code-form {
  display: grid;
  gap: 14px;
  min-width: 0;
  align-self: stretch;
}

.two-factor-code-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.two-factor-code-form .modal-actions,
.two-factor-preference-card .modal-actions {
  margin-top: 0;
}

.two-factor-setup-card .field-caption {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.auth-secret-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-weight: 800;
  letter-spacing: .06em;
}

.auth-code-input {
  max-width: 260px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
}

.two-factor-details summary {
  cursor: pointer;
  color: var(--primary);
  font-weight: 800;
}

@media (max-width: 760px) {
  .two-factor-setup-page {
    width: 100%;
  }

  .two-factor-setup-head,
  .two-factor-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .two-factor-setup-head,
  .two-factor-card {
    padding: 16px;
  }

  .two-factor-setup-head h2 {
    font-size: 22px;
  }

  .two-factor-account {
    justify-content: flex-start;
  }

  .two-factor-account span {
    max-width: 100%;
  }

  .two-factor-method-grid,
  .two-factor-authenticator-grid {
    grid-template-columns: 1fr;
  }

  .two-factor-qr-preview {
    justify-self: center;
  }

  .auth-code-input {
    max-width: 100%;
  }
}

.mobile-app-shell {
  width: min(100%, 460px);
  min-height: 100dvh;
  align-content: start;
  padding: max(10px, env(safe-area-inset-top)) 10px max(18px, env(safe-area-inset-bottom));
}

.mobile-app-shell .mobile-app-frame {
  display: grid;
  gap: 12px;
}

.mobile-app-shell .mobile-hero-card {
  min-height: 104px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 15% 20%, rgba(255, 255, 255, .32), transparent 28%),
    linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
  color: #fff;
}

.mobile-app-shell .mobile-hero-card h2,
.mobile-app-shell .mobile-hero-card p,
.mobile-app-shell .mobile-hero-card .eyebrow {
  color: #fff;
}

.mobile-app-shell .mobile-hero-logo {
  width: 58px;
  height: 58px;
  border-radius: 18px;
}

.mobile-app-action-card {
  position: relative;
  min-height: 86px;
  border-radius: 22px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.mobile-app-action-card.is-primary {
  border-color: rgba(37, 99, 235, .24);
  background: linear-gradient(135deg, #fff 0%, #eef6ff 100%);
}

.mobile-app-action-card::after {
  content: ">";
  margin-left: auto;
  color: #94a3b8;
  font-size: 22px;
  font-weight: 900;
}

.mobile-app-page-bar {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 12;
  border-radius: 22px;
  box-shadow: 0 16px 32px rgba(15, 23, 42, .10);
}

@media (max-width: 520px) {
  body.mobile-kiosk .content {
    padding: 0;
  }

  .mobile-app-shell {
    width: 100%;
  }

  .mobile-app-action-card {
    padding: 16px;
  }
}

/* Mobile app restyle: shell ispirata a UI kit mobile, funzioni Blazor invariate. */
body.mobile-kiosk {
  background:
    radial-gradient(circle at 50% -12%, rgba(37, 99, 235, .16), transparent 34%),
    linear-gradient(180deg, #f8f7fa 0%, #eef3f9 100%);
}

body.mobile-kiosk .content {
  width: min(100%, 480px);
  padding: 0;
}

.mobile-app-shell {
  width: min(100%, 430px);
  max-width: 430px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(14px, env(safe-area-inset-top)) 14px calc(106px + env(safe-area-inset-bottom));
}

.mobile-app-shell .mobile-app-frame {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: calc(100dvh - 106px);
}

.mobile-app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
  border: 1px solid rgba(219, 227, 238, .92);
  border-radius: 24px;
  background: rgba(255, 255, 255, .88);
  padding: 10px 12px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .08);
  backdrop-filter: blur(12px);
}

.mobile-app-brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
}

.mobile-app-brand img {
  display: block;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  object-fit: cover;
}

.mobile-app-brand div {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.mobile-app-brand strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
  line-height: 1.05;
}

.mobile-app-brand span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-app-avatar,
.mobile-home-count {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, #10b981 0%, #0f766e 100%);
  color: #fff;
  font-size: 15px;
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(15, 118, 110, .18);
}

.mobile-app-content {
  display: grid;
  align-content: start;
  gap: 14px;
}

.mobile-home-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 156px;
  border-radius: 30px;
  background:
    radial-gradient(circle at 18% 16%, rgba(255, 255, 255, .22), transparent 28%),
    linear-gradient(145deg, #211b2a 0%, #0f172a 48%, #0f766e 100%);
  padding: 24px 22px;
  color: #fff;
  box-shadow: 0 24px 48px rgba(15, 23, 42, .22);
}

.mobile-home-hero .eyebrow,
.mobile-home-hero p,
.mobile-home-hero h2 {
  color: #fff;
}

.mobile-home-hero h2 {
  margin: 4px 0 7px;
  font-size: 30px;
  font-weight: 950;
  line-height: 1.02;
}

.mobile-home-hero p {
  margin: 0;
  font-size: 13px;
  font-weight: 800;
  opacity: .82;
  text-transform: capitalize;
}

.mobile-home-count {
  width: 58px;
  height: 58px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 24px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .24);
}

.mobile-app-shell .mobile-action-grid {
  gap: 12px;
}

.mobile-app-action-card {
  min-height: 104px;
  border: 1px solid rgba(219, 227, 238, .95);
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  padding: 16px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.mobile-app-action-card.is-primary {
  border-color: rgba(37, 99, 235, .22);
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
}

.mobile-action-icon {
  border-radius: 20px;
  background: #f1f5f9;
  color: #2563eb;
  font-size: 17px;
}

.mobile-app-action-card.is-primary .mobile-action-icon {
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
  color: #fff;
}

.mobile-action-card strong {
  font-size: 19px;
  line-height: 1.1;
}

.mobile-action-card small {
  line-height: 1.35;
}

.mobile-app-action-card::after {
  content: ">";
  align-self: center;
  margin-left: auto;
  color: #94a3b8;
  font-size: 24px;
  font-weight: 950;
}

.mobile-app-nav {
  position: fixed;
  right: 50%;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  width: min(calc(100vw - 28px), 402px);
  transform: translateX(50%);
  border: 1px solid rgba(219, 227, 238, .96);
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  padding: 8px;
  box-shadow: 0 22px 46px rgba(15, 23, 42, .16);
  backdrop-filter: blur(14px);
}

.mobile-app-nav-item {
  display: grid;
  place-items: center;
  gap: 4px;
  min-width: 0;
  min-height: 58px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #64748b;
  font-weight: 900;
}

.mobile-app-nav-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  background: #f1f5f9;
  color: inherit;
  font-size: 11px;
  font-weight: 950;
}

.mobile-app-nav-item small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-size: 9.5px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-app-nav-item.is-active {
  background: linear-gradient(135deg, #2563eb 0%, #0f766e 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .22);
}

.mobile-app-nav-item.is-active span {
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.mobile-app-page-bar {
  position: static;
  display: flex;
  align-items: center;
  min-height: 58px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0 2px;
  box-shadow: none;
}

.mobile-app-page-bar .btn {
  width: auto;
  min-width: 74px;
  height: 42px;
  border-radius: 16px;
  background: #fff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 950;
}

.mobile-app-page-bar strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.08;
}

.mobile-focus-panel,
.mobile-app-shell .mobile-stamp-form,
.mobile-app-shell .mobile-record-list,
.mobile-app-shell .mobile-list-head,
.mobile-app-shell .mobile-history-filter,
.mobile-app-shell .mobile-today-list,
.mobile-confirm-panel,
.mobile-feedback-panel {
  border-color: rgba(219, 227, 238, .95);
  border-radius: 26px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

.mobile-app-shell .mobile-stamp-form {
  gap: 14px;
  padding: 16px;
}

.mobile-mode-choice {
  border-radius: 26px;
  padding: 18px;
}

.mobile-mode-choice h2 {
  font-size: 25px;
  line-height: 1.05;
}

.mobile-mode-card {
  min-height: 92px;
  border-radius: 24px;
  background: #f8fafc;
  padding: 14px;
}

.mobile-mode-card.primary {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.mobile-mode-icon {
  border-radius: 18px;
}

.mobile-user-card,
.location-panel,
.mobile-switch-row,
.mobile-info-strip {
  border-radius: 22px;
  background: #f8fbff;
}

.mobile-info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #dbeafe;
  padding: 12px 14px;
}

.mobile-info-strip span {
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-info-strip strong {
  color: #0f172a;
  font-weight: 950;
}

.mobile-badge .form-control,
.mobile-badge .form-select {
  min-height: 56px;
  border-radius: 18px;
  background-color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.mobile-badge textarea.form-control {
  min-height: 92px;
}

.mobile-app-shell .btn-primary {
  border-color: #2563eb;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  border-radius: 18px;
  font-weight: 950;
}

.mobile-app-shell .btn-outline-secondary,
.mobile-app-shell .btn-outline-primary {
  border-radius: 18px;
  font-weight: 950;
}

.mobile-app-shell .expense-icon-button {
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 16px;
  font-size: 18px;
}

.mobile-app-shell .mobile-refresh-button {
  align-self: stretch;
  min-height: 56px;
}

.mobile-app-shell .mobile-secondary-action {
  min-height: 54px;
  border-radius: 18px;
  font-weight: 950;
}

.mobile-feedback-panel {
  padding: 14px;
}

.mobile-feedback-icon {
  width: 38px;
  height: 38px;
  font-size: 11px;
}

.mobile-record-item {
  border-radius: 22px;
  padding: 14px;
}

.mobile-record-time {
  font-size: 24px;
}

.mobile-record-detail {
  grid-template-columns: 1fr 1fr;
}

.mobile-install-card {
  margin-top: 0;
  border-radius: 24px;
  background: linear-gradient(135deg, #ffffff 0%, #ecfeff 100%);
}

@media (max-width: 390px) {
  .mobile-app-shell {
    padding-inline: 10px;
  }

  .mobile-home-hero {
    min-height: 142px;
    padding: 20px;
  }

  .mobile-home-hero h2 {
    font-size: 27px;
  }

  .mobile-action-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
  }

  .mobile-action-card strong {
    font-size: 17px;
  }

  .mobile-app-nav {
    width: calc(100vw - 20px);
    padding: 7px;
  }

  .mobile-app-nav-item {
    min-height: 54px;
    border-radius: 17px;
  }

  .mobile-app-nav-item span {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .mobile-app-nav-item small {
    font-size: 8.8px;
  }

  .mobile-record-detail,
  .mobile-date-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile app responsive final pass: ottimizzato per 360, 375, 390, 414, 430, 480 e tablet stretti. */
body.mobile-kiosk,
body.mobile-kiosk * {
  box-sizing: border-box;
}

body.mobile-kiosk {
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -16%, rgba(37, 99, 235, .18), transparent 32%),
    linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

body.mobile-kiosk .content {
  width: 100%;
  max-width: none;
  min-height: 100dvh;
  padding: 0;
}

body.mobile-kiosk .mobile-app-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) clamp(10px, 3.2vw, 18px) calc(108px + env(safe-area-inset-bottom));
}

body.mobile-kiosk .mobile-app-shell .mobile-app-frame,
body.mobile-kiosk .mobile-app-content,
body.mobile-kiosk .mobile-action-copy,
body.mobile-kiosk .mobile-app-brand,
body.mobile-kiosk .mobile-app-brand div,
body.mobile-kiosk .mobile-profile-strip > div,
body.mobile-kiosk .mobile-record-main,
body.mobile-kiosk .mobile-record-detail,
body.mobile-kiosk .mobile-section-title,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-date-row {
  min-width: 0;
}

body.mobile-kiosk .mobile-app-top,
body.mobile-kiosk .mobile-home-hero,
body.mobile-kiosk .mobile-profile-strip,
body.mobile-kiosk .mobile-focus-panel,
body.mobile-kiosk .mobile-stamp-form,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-today-list,
body.mobile-kiosk .mobile-record-list,
body.mobile-kiosk .mobile-feedback-panel,
body.mobile-kiosk .mobile-install-card {
  width: 100%;
  max-width: 100%;
}

body.mobile-kiosk .mobile-app-top {
  min-height: 62px;
  border-radius: clamp(20px, 5vw, 28px);
  padding: 10px 12px;
}

body.mobile-kiosk .mobile-app-brand img {
  width: clamp(38px, 10vw, 46px);
  height: clamp(38px, 10vw, 46px);
  border-radius: 14px;
}

body.mobile-kiosk .mobile-app-brand strong,
body.mobile-kiosk .mobile-profile-strip strong,
body.mobile-kiosk .mobile-record-time,
body.mobile-kiosk .mobile-record-subtitle,
body.mobile-kiosk .mobile-record-detail span,
body.mobile-kiosk .mobile-field,
body.mobile-kiosk .mobile-badge .form-control,
body.mobile-kiosk .mobile-badge .form-select {
  overflow-wrap: anywhere;
}

body.mobile-kiosk .mobile-app-brand span,
body.mobile-kiosk .mobile-app-context,
body.mobile-kiosk .mobile-profile-strip strong,
body.mobile-kiosk .mobile-profile-strip small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-app-context {
  max-width: min(34vw, 148px);
  min-width: 0;
  justify-content: center;
}

body.mobile-kiosk .mobile-home-hero {
  min-height: clamp(132px, 36vw, 166px);
  border-radius: clamp(26px, 7vw, 34px);
  padding: clamp(18px, 5vw, 24px);
}

body.mobile-kiosk .mobile-home-hero h2 {
  font-size: clamp(26px, 7.8vw, 34px);
  letter-spacing: 0;
}

body.mobile-kiosk .mobile-profile-strip,
body.mobile-kiosk .mobile-user-card,
body.mobile-kiosk .mobile-info-strip,
body.mobile-kiosk .location-panel,
body.mobile-kiosk .mobile-mode-card,
body.mobile-kiosk .mobile-record-item {
  border-radius: clamp(18px, 5vw, 24px);
}

body.mobile-kiosk .mobile-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 14px);
}

body.mobile-kiosk .mobile-action-grid .mobile-app-action-card:first-child {
  grid-column: 1 / -1;
}

body.mobile-kiosk .mobile-app-action-card {
  display: flex;
  min-width: 0;
  min-height: clamp(98px, 27vw, 124px);
  border-radius: clamp(22px, 6vw, 28px);
  padding: clamp(13px, 3.8vw, 18px);
}

body.mobile-kiosk .mobile-app-action-card::after {
  flex: 0 0 auto;
}

body.mobile-kiosk .mobile-action-icon {
  flex-basis: clamp(44px, 12vw, 54px);
  width: clamp(44px, 12vw, 54px);
  height: clamp(44px, 12vw, 54px);
  border-radius: clamp(15px, 4.5vw, 20px);
  font-size: clamp(13px, 4vw, 18px);
}

body.mobile-kiosk .mobile-action-card strong {
  font-size: clamp(16px, 4.8vw, 20px);
  line-height: 1.1;
}

body.mobile-kiosk .mobile-action-card small {
  font-size: clamp(12px, 3.4vw, 13.5px);
}

body.mobile-kiosk .mobile-app-page-bar {
  min-height: 50px;
  gap: 10px;
}

body.mobile-kiosk .mobile-app-page-bar .btn {
  flex: 0 0 auto;
  min-width: 52px;
  height: 42px;
  padding-inline: 12px;
}

body.mobile-kiosk .mobile-app-page-bar strong {
  display: block;
  overflow: hidden;
  color: #0f172a;
  font-size: clamp(18px, 5vw, 22px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-app-page-bar .eyebrow {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-stamp-form,
body.mobile-kiosk .mobile-mode-choice,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-today-list {
  padding: clamp(14px, 4vw, 18px);
}

body.mobile-kiosk .mobile-mode-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

body.mobile-kiosk .mobile-field {
  display: grid;
  gap: 7px;
}

body.mobile-kiosk .mobile-badge .form-control,
body.mobile-kiosk .mobile-badge .form-select {
  width: 100%;
  min-height: 54px;
  font-size: 16px;
}

body.mobile-kiosk .mobile-badge input[type="file"].form-control {
  min-height: auto;
  border-style: dashed;
  padding: 16px;
  line-height: 1.35;
}

body.mobile-kiosk .mobile-date-row,
body.mobile-kiosk .mobile-record-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

body.mobile-kiosk .mobile-record-list {
  display: grid;
  gap: 10px;
}

body.mobile-kiosk .mobile-record-main {
  gap: 10px;
}

body.mobile-kiosk .mobile-record-time {
  font-size: clamp(20px, 6vw, 25px);
}

body.mobile-kiosk .mobile-record-detail span {
  min-width: 0;
}

body.mobile-kiosk .mobile-primary-action,
body.mobile-kiosk .mobile-app-shell .btn-primary,
body.mobile-kiosk .mobile-app-shell .btn-outline-primary,
body.mobile-kiosk .mobile-app-shell .btn-outline-secondary {
  min-height: 48px;
}

body.mobile-kiosk .mobile-qr-actions,
body.mobile-kiosk .mobile-confirm-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

body.mobile-kiosk .mobile-confirm-panel {
  width: min(440px, calc(100vw - 24px));
  bottom: calc(92px + env(safe-area-inset-bottom));
}

body.mobile-kiosk .mobile-app-nav {
  right: 50%;
  width: min(448px, calc(100vw - 20px));
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 3px;
  transform: translateX(50%);
}

body.mobile-kiosk .mobile-app-nav-item {
  min-width: 0;
  min-height: clamp(52px, 14vw, 60px);
  padding: 5px 3px;
}

body.mobile-kiosk .mobile-app-nav-item small {
  max-width: 100%;
}

@media (min-width: 481px) and (max-width: 768px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 520px;
    padding-inline: 20px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: min(492px, calc(100vw - 36px));
  }
}

@media (min-width: 769px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 640px;
    padding-inline: 24px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: min(592px, calc(100vw - 48px));
  }

  body.mobile-kiosk .mobile-home-hero {
    min-height: 176px;
  }

  body.mobile-kiosk .mobile-record-detail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 720px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: min(660px, calc(100vw - 64px));
  }
}

@media (orientation: landscape) and (max-height: 540px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: min(760px, 100vw);
    padding-top: max(8px, env(safe-area-inset-top));
    padding-bottom: calc(88px + env(safe-area-inset-bottom));
  }

  body.mobile-kiosk .mobile-app-frame,
  body.mobile-kiosk .mobile-app-content {
    gap: 10px;
  }

  body.mobile-kiosk .mobile-home-hero {
    min-height: 112px;
    padding-block: 16px;
  }

  body.mobile-kiosk .mobile-home-hero h2 {
    font-size: clamp(24px, 5vw, 30px);
  }

  body.mobile-kiosk .mobile-app-action-card {
    min-height: 90px;
  }

  body.mobile-kiosk .mobile-app-nav {
    bottom: max(8px, env(safe-area-inset-bottom));
  }
}

@media (min-resolution: 2dppx) {
  body.mobile-kiosk .mobile-app-top,
  body.mobile-kiosk .mobile-home-hero,
  body.mobile-kiosk .mobile-app-action-card,
  body.mobile-kiosk .mobile-stamp-form,
  body.mobile-kiosk .mobile-record-item,
  body.mobile-kiosk .mobile-app-nav {
    box-shadow: 0 16px 34px rgba(15, 23, 42, .10);
  }
}

@media (max-width: 430px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 100%;
  }

  body.mobile-kiosk .mobile-app-context {
    max-width: 30vw;
  }
}

@media (max-width: 390px) {
  body.mobile-kiosk .mobile-action-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-kiosk .mobile-action-grid .mobile-app-action-card:first-child {
    grid-column: auto;
  }

  body.mobile-kiosk .mobile-date-row,
  body.mobile-kiosk .mobile-record-detail {
    grid-template-columns: 1fr;
  }

  body.mobile-kiosk .mobile-app-brand strong {
    font-size: 15px;
  }

  body.mobile-kiosk .mobile-app-brand span {
    font-size: 11px;
  }
}

@media (max-width: 375px) {
  body.mobile-kiosk .mobile-app-shell {
    padding-inline: 9px;
  }

  body.mobile-kiosk .mobile-app-top {
    gap: 8px;
    padding-inline: 10px;
  }

  body.mobile-kiosk .mobile-app-context {
    display: none;
  }

  body.mobile-kiosk .mobile-home-count {
    width: 52px;
    height: 52px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: calc(100vw - 14px);
    padding: 6px;
  }
}

@media (max-width: 360px) {
  body.mobile-kiosk .mobile-app-shell {
    padding-inline: 8px;
  }

  body.mobile-kiosk .mobile-app-brand img,
  body.mobile-kiosk .mobile-app-avatar {
    width: 38px;
    height: 38px;
  }

  body.mobile-kiosk .mobile-app-nav-item small {
    font-size: 8px;
  }

  body.mobile-kiosk .mobile-mode-card,
  body.mobile-kiosk .mobile-record-item,
  body.mobile-kiosk .mobile-profile-strip {
    padding: 12px;
  }
}

/* Override finale del menu Blazor: evita che le vecchie regole MVC su .nav-stack deformino la sidebar. */
body:not(.sidebar-open) .shell-nav .shell-primary-link,
body:not(.sidebar-open) .shell-nav .shell-menu-group summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 62px;
  padding: 7px 0;
  text-align: center;
}

body:not(.sidebar-open) .shell-nav .shell-primary-link > span:nth-child(2),
body:not(.sidebar-open) .shell-nav .shell-menu-group summary > span:nth-child(2) {
  display: block;
  width: 84px;
  max-width: 84px;
  overflow: hidden;
  color: #7c7f83;
  font-size: 7.8px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: .035em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body:not(.sidebar-open) .shell-nav .shell-menu-chevron,
body:not(.sidebar-open) .shell-nav .shell-menu-children {
  display: none;
}

body:not(.sidebar-open) .sidebar,
body:not(.sidebar-open) .nav-stack {
  scrollbar-width: none;
}

body:not(.sidebar-open) .sidebar::-webkit-scrollbar,
body:not(.sidebar-open) .nav-stack::-webkit-scrollbar {
  width: 0;
  height: 0;
}

body.sidebar-open .shell-nav .shell-primary-link,
body.sidebar-open .shell-nav .shell-menu-group summary {
  grid-template-columns: 38px minmax(0, 1fr) 14px;
  min-height: 50px;
  padding: 8px 8px 8px 20px;
  text-align: left;
}

body.sidebar-open .shell-nav .shell-menu-group {
  display: block;
}

body.sidebar-open .shell-nav .shell-primary-link > span:nth-child(2),
body.sidebar-open .shell-nav .shell-menu-group summary > span:nth-child(2) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.sidebar-open .shell-nav .shell-menu-children {
  min-width: 0;
  padding-right: 4px;
  padding-left: 50px;
}

body.sidebar-open .shell-nav .shell-menu-group:not([open]) > .shell-menu-children {
  display: none;
}

body.sidebar-open .shell-nav .shell-menu-group[open] > .shell-menu-children {
  display: grid;
}

body.sidebar-open .shell-nav .shell-menu-children a {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  text-transform: none;
}

body.sidebar-open .shell-nav .shell-menu-children a > span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
}

body.sidebar-open .sidebar {
  padding-top: 0;
}

body.sidebar-open .shell-nav {
  padding-top: 0;
}

body:not(.sidebar-open) .shell-nav .shell-menu-group.shell-flyout-open summary {
  background: linear-gradient(90deg, #0284c7 0%, #72c6e8 100%);
  color: #fff;
}

body:not(.sidebar-open) .shell-nav .shell-primary-link.active > span:nth-child(2),
body:not(.sidebar-open) .shell-nav .shell-menu-group.active > summary > span:nth-child(2),
body:not(.sidebar-open) .shell-nav .shell-menu-group.shell-flyout-open > summary > span:nth-child(2) {
  color: #fff;
}

.shell-menu-flyout {
  display: grid;
  position: fixed;
  top: var(--topbar-height);
  bottom: 0;
  left: var(--sidebar-collapsed-width);
  z-index: 1045;
  width: min(260px, calc(100vw - var(--sidebar-collapsed-width) - 14px));
  height: calc(100dvh - var(--topbar-height));
  max-height: none;
  align-content: start;
  gap: 14px;
  padding: 32px 28px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  border: 0;
  border-left: 1px solid #dbe3ee;
  border-right: 1px solid #dbe3ee;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: 16px 0 34px rgba(15, 23, 42, .08);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-8px);
  transition: opacity .14s ease, transform .14s ease;
}

.shell-menu-flyout.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

body.sidebar-open .shell-menu-flyout {
  display: none;
}

.shell-menu-flyout .shell-flyout-title {
  display: block;
  position: relative;
  min-width: 0;
  padding: 0 0 22px;
  overflow: hidden;
  border-bottom: 0;
  color: #0f172a;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.15;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.shell-menu-flyout .shell-flyout-title::before {
  position: absolute;
  top: -26px;
  left: -28px;
  width: 2px;
  height: 54px;
  background: #0284c7;
  content: "";
}

.shell-menu-flyout a,
.shell-menu-flyout .shell-empty-item {
  display: block;
  min-height: 40px;
  padding: 8px 10px;
  overflow: hidden;
  border-radius: 8px;
  color: #1f2937;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.2;
  text-decoration: none;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.shell-menu-flyout a > span {
  text-transform: none;
}

.shell-menu-flyout a:hover,
.shell-menu-flyout a:focus-visible,
.shell-menu-flyout a.active {
  background: linear-gradient(90deg, #0284c7 0%, #72c6e8 100%);
  color: #fff;
}

.table-link-button {
  display: inline-flex;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  line-height: 1.2;
  text-align: left;
}

.table-link-button:hover,
.table-link-button:focus-visible {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.user-detail-summary-head {
  justify-content: flex-end;
}

.expense-note-choice-list {
  display: grid;
  gap: 10px;
}

.expense-note-choice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #fff;
  color: #0f172a;
  text-align: left;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .05);
}

.expense-note-choice-card:hover,
.expense-note-choice-card:focus-visible {
  border-color: #93c5fd;
  background: #f8fbff;
}

.expense-note-choice-card span:first-child {
  display: grid;
  gap: 3px;
}

.expense-note-choice-card small {
  color: #64748b;
  font-weight: 700;
}

/* Mobile app UX refresh: overrides kept at the end to avoid changing desktop/MVC behavior. */
.mobile-app-top-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.mobile-app-context {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #eff6ff;
  padding: 0 10px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}

select.mobile-app-context {
  cursor: pointer;
  appearance: none;
  line-height: 1;
  padding-right: 28px;
  background-color: #eff6ff;
  background-image:
    linear-gradient(45deg, transparent 50%, #2563eb 50%),
    linear-gradient(135deg, #2563eb 50%, transparent 50%);
  background-position:
    calc(100% - 15px) 50%,
    calc(100% - 10px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.mobile-home-count {
  display: grid;
  place-items: center;
  gap: 0;
  text-align: center;
}

.mobile-home-count strong {
  display: block;
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.mobile-home-count small {
  display: block;
  color: rgba(255, 255, 255, .78);
  font-size: 10px;
  font-weight: 950;
  line-height: 1.1;
  text-transform: uppercase;
}

.mobile-profile-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(219, 227, 238, .95);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  padding: 14px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .06);
}

.mobile-profile-strip > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.mobile-profile-strip span:not(.mobile-user-avatar) {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-profile-strip strong,
.mobile-profile-strip small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-profile-strip strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 950;
}

.mobile-profile-strip small {
  color: #64748b;
  font-weight: 800;
}

.mobile-app-shell .mobile-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-app-shell .mobile-action-grid .mobile-app-action-card:first-child {
  grid-column: 1 / -1;
}

.mobile-app-action-card {
  align-items: flex-start;
  min-height: 116px;
}

.mobile-app-action-card .mobile-action-copy {
  align-self: stretch;
}

.mobile-app-action-card strong {
  overflow-wrap: normal;
  word-break: normal;
}

.mobile-primary-action {
  width: 100%;
  min-height: 58px;
  border-radius: 20px;
  font-weight: 950;
}

.mobile-app-page-bar .btn span {
  font-size: 19px;
  line-height: 1;
}

.location-panel {
  border: 1px solid #dbeafe;
}

.location-panel.is-ready {
  border-color: #bbf7d0;
  background: #ecfdf5;
}

.location-panel.is-ready span {
  color: #047857;
}

.location-panel.is-needed {
  border-color: #fde68a;
  background: #fffbeb;
}

.location-panel.is-needed span {
  color: #92400e;
}

.mobile-confirm-panel {
  position: fixed;
  right: auto;
  bottom: calc(92px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 1080;
  width: min(402px, calc(100vw - 24px));
  transform: translateX(-50%);
  border-color: #bfdbfe;
  padding: 18px;
}

.mobile-confirm-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mobile-confirm-actions .expense-icon-button {
  width: 100%;
  min-width: 0;
  height: 54px;
}

.mobile-absence .mobile-switch-row {
  justify-content: space-between;
  min-height: 58px;
  border: 1px solid #dbeafe;
  padding: 13px 14px;
}

.mobile-qr-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}

.mobile-qr-actions .expense-icon-button {
  width: 100%;
  height: 54px;
}

@media (max-width: 390px) {
  .mobile-app-shell .mobile-action-grid {
    grid-template-columns: 1fr;
  }

  .mobile-app-shell .mobile-action-grid .mobile-app-action-card:first-child {
    grid-column: auto;
  }

  .mobile-app-nav {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    overflow-x: auto;
  }
}

/* Mobile app action cards: testi leggibili e area touch stabile. */
body.mobile-kiosk .mobile-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(10px, 3vw, 14px);
}

body.mobile-kiosk .mobile-action-grid .mobile-app-action-card:first-child {
  grid-column: 1 / -1;
}

body.mobile-kiosk .mobile-app-action-card {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  min-width: 0;
  min-height: clamp(118px, 30vw, 136px);
  padding: clamp(14px, 3.8vw, 18px) 42px clamp(14px, 3.8vw, 18px) clamp(14px, 3.8vw, 18px);
  cursor: pointer;
  touch-action: manipulation;
}

body.mobile-kiosk .mobile-app-action-card.is-primary {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  min-height: clamp(96px, 24vw, 112px);
  column-gap: 14px;
}

body.mobile-kiosk .mobile-app-action-card:disabled {
  cursor: not-allowed;
  opacity: .58;
}

body.mobile-kiosk .mobile-app-action-card::after {
  position: absolute;
  right: 14px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 0;
  transform: translateY(-50%);
  border-radius: 999px;
  background: #eef2f7;
  color: #64748b;
  font-size: 18px;
  line-height: 1;
}

body.mobile-kiosk .mobile-action-icon {
  flex: none;
  margin-bottom: 12px;
}

body.mobile-kiosk .mobile-app-action-card.is-primary .mobile-action-icon {
  margin-bottom: 0;
}

body.mobile-kiosk .mobile-action-copy {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 5px;
  text-align: left;
}

body.mobile-kiosk .mobile-action-card strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #0f172a;
  font-size: clamp(15px, 4.45vw, 20px);
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

body.mobile-kiosk .mobile-app-action-card.is-primary strong {
  font-size: clamp(20px, 5.6vw, 25px);
}

body.mobile-kiosk .mobile-action-card small {
  display: -webkit-box;
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: clamp(11px, 3.15vw, 13px);
  line-height: 1.28;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: normal;
  word-break: normal;
}

body.mobile-kiosk .mobile-app-nav-item {
  cursor: pointer;
  touch-action: manipulation;
}

@media (max-width: 360px) {
  body.mobile-kiosk .mobile-app-action-card {
    min-height: 112px;
    padding-right: 36px;
  }

  body.mobile-kiosk .mobile-action-icon {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    margin-bottom: 10px;
    border-radius: 15px;
    font-size: 13px;
  }

  body.mobile-kiosk .mobile-action-card strong {
    font-size: 14px;
  }

  body.mobile-kiosk .mobile-action-card small {
    font-size: 10.8px;
  }
}

/* Trackzyn-inspired mobile app skin. Scoped to mobile-kiosk so desktop remains untouched. */
body.mobile-kiosk {
  --mh-bg: #f8f5fb;
  --mh-bg-soft: #f1ebf7;
  --mh-surface: rgba(255, 255, 255, .96);
  --mh-surface-soft: #fbf8ff;
  --mh-text: #211b2a;
  --mh-muted: #81788e;
  --mh-border: #e8e0ef;
  --mh-primary: #8b5cf6;
  --mh-primary-strong: #6d3edb;
  --mh-primary-soft: #f0e9ff;
  --mh-success: #16a34a;
  --mh-warning: #f59e0b;
  --mh-danger: #dc2626;
  --mh-shadow: 0 20px 46px rgba(35, 26, 54, .12);
  --mh-shadow-soft: 0 14px 32px rgba(35, 26, 54, .08);
  --mh-radius-xl: 30px;
  --mh-radius-lg: 24px;
  --mh-radius-md: 18px;
  --mh-touch: 48px;
  min-height: 100dvh;
  color: var(--mh-text);
  background:
    radial-gradient(circle at 16% -8%, rgba(139, 92, 246, .18), transparent 32%),
    radial-gradient(circle at 100% 0%, rgba(20, 184, 166, .12), transparent 28%),
    linear-gradient(180deg, #fffbff 0%, var(--mh-bg) 42%, #eef2f8 100%);
  font-family: var(--app-font-family);
  -webkit-font-smoothing: antialiased;
}

body.mobile-kiosk .content {
  display: block;
  min-height: 100dvh;
  background: transparent;
}

body.mobile-kiosk .mobile-app-shell {
  width: 100%;
  max-width: min(520px, 100vw);
  padding:
    max(14px, env(safe-area-inset-top))
    clamp(14px, 4vw, 22px)
    calc(112px + env(safe-area-inset-bottom));
}

body.mobile-kiosk .mobile-app-shell .mobile-app-frame,
body.mobile-kiosk .mobile-app-content {
  gap: clamp(14px, 3.8vw, 20px);
}

body.mobile-kiosk .mobile-app-top {
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 20;
  min-height: 64px;
  border: 1px solid rgba(232, 224, 239, .92);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  padding: 8px 10px;
  box-shadow: var(--mh-shadow-soft);
  backdrop-filter: blur(18px);
}

body.mobile-kiosk .mobile-app-brand {
  gap: 9px;
}

body.mobile-kiosk .mobile-app-brand img,
body.mobile-kiosk .mobile-user-avatar,
body.mobile-kiosk .mobile-app-avatar {
  border-radius: 18px;
  background: linear-gradient(145deg, #f1ebff, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(139, 92, 246, .12);
}

body.mobile-kiosk .mobile-app-brand img {
  width: 44px;
  height: 44px;
}

body.mobile-kiosk .mobile-app-brand strong {
  color: var(--mh-text);
  font-size: 15px;
  letter-spacing: 0;
}

body.mobile-kiosk .mobile-app-brand span,
body.mobile-kiosk .mobile-profile-strip small,
body.mobile-kiosk .mobile-record-subtitle,
body.mobile-kiosk .field-hint {
  color: var(--mh-muted);
}

body.mobile-kiosk .mobile-app-top-actions {
  gap: 7px;
}

body.mobile-kiosk .mobile-app-context {
  max-width: min(36vw, 150px);
  min-height: 34px;
  border-color: rgba(139, 92, 246, .18);
  background: var(--mh-primary-soft);
  color: var(--mh-primary-strong);
  font-size: 10px;
  letter-spacing: .02em;
}

body.mobile-kiosk select.mobile-app-context {
  background-color: var(--mh-primary-soft);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--mh-primary-strong) 50%),
    linear-gradient(135deg, var(--mh-primary-strong) 50%, transparent 50%);
}

body.mobile-kiosk .mobile-app-avatar {
  width: 38px;
  height: 38px;
  background: var(--mh-primary);
  color: #fff;
  font-size: 13px;
}

body.mobile-kiosk .mobile-home-hero {
  min-height: clamp(146px, 38vw, 182px);
  border: 0;
  border-radius: 34px;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, .24), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(20, 184, 166, .22), transparent 32%),
    linear-gradient(145deg, #20162f 0%, #4f2fb4 55%, #0f766e 100%);
  padding: clamp(22px, 6vw, 30px);
  box-shadow: 0 28px 58px rgba(39, 24, 76, .26);
}

body.mobile-kiosk .mobile-home-hero .eyebrow {
  color: rgba(255, 255, 255, .82);
  font-size: 10px;
  letter-spacing: .08em;
}

body.mobile-kiosk .mobile-home-hero h2 {
  max-width: 250px;
  margin: 5px 0 8px;
  color: #fff;
  font-size: clamp(34px, 9.8vw, 44px);
  line-height: .98;
  letter-spacing: 0;
  text-wrap: balance;
}

body.mobile-kiosk .mobile-home-hero p {
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
  font-weight: 850;
}

body.mobile-kiosk .mobile-home-count {
  width: clamp(62px, 17vw, 74px);
  height: clamp(62px, 17vw, 74px);
  border-radius: 26px;
  background: rgba(255, 255, 255, .14);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .28),
    0 16px 28px rgba(0, 0, 0, .12);
}

body.mobile-kiosk .mobile-home-count strong {
  font-size: clamp(24px, 6.5vw, 30px);
}

body.mobile-kiosk .mobile-profile-strip,
body.mobile-kiosk .mobile-user-card,
body.mobile-kiosk .mobile-info-strip,
body.mobile-kiosk .mobile-focus-panel,
body.mobile-kiosk .mobile-stamp-form,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-today-list,
body.mobile-kiosk .mobile-record-summary,
body.mobile-kiosk .mobile-feedback-panel,
body.mobile-kiosk .mobile-install-card {
  border: 1px solid rgba(232, 224, 239, .92);
  border-radius: var(--mh-radius-lg);
  background: var(--mh-surface);
  box-shadow: var(--mh-shadow-soft);
}

body.mobile-kiosk .mobile-profile-strip {
  padding: 15px;
}

body.mobile-kiosk .mobile-profile-strip span:not(.mobile-user-avatar),
body.mobile-kiosk .mobile-field,
body.mobile-kiosk .mobile-section-title .eyebrow,
body.mobile-kiosk .mobile-list-head .eyebrow {
  color: #6f647e;
}

body.mobile-kiosk .mobile-profile-strip strong,
body.mobile-kiosk .mobile-user-card strong,
body.mobile-kiosk .mobile-section-title strong,
body.mobile-kiosk .mobile-list-head h2 {
  color: var(--mh-text);
}

body.mobile-kiosk .mobile-action-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(12px, 3.4vw, 16px);
}

body.mobile-kiosk .mobile-action-grid .mobile-app-action-card:first-child {
  grid-column: 1 / -1;
}

body.mobile-kiosk .mobile-app-action-card,
body.mobile-kiosk .mobile-app-action-card.is-primary {
  padding-right: 16px;
}

.mobile-app-action-card::after,
body.mobile-kiosk .mobile-app-action-card::after {
  display: none;
  content: none;
}

body.mobile-kiosk .mobile-company-switch {
  display: grid;
  flex: 0 1 min(42vw, 154px);
  min-width: 112px;
  gap: 2px;
  border: 1px solid rgba(139, 92, 246, .20);
  border-radius: 18px;
  background: var(--mh-primary-soft);
  padding: 6px 10px;
}

body.mobile-kiosk .mobile-company-switch span {
  overflow: hidden;
  color: var(--mh-muted);
  font-size: 8.5px;
  font-weight: 950;
  letter-spacing: .08em;
  line-height: 1;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-company-switch select {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--mh-primary-strong);
  font-size: 12px;
  font-weight: 950;
  line-height: 1.1;
  outline: 0;
}

body.mobile-kiosk .mobile-history-selector {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

body.mobile-kiosk .mobile-history-choice-card {
  display: grid;
  min-width: 0;
  min-height: 104px;
  border: 1px solid rgba(232, 224, 239, .95);
  border-radius: 24px;
  background: rgba(255, 255, 255, .94);
  padding: 12px;
  color: var(--mh-text);
  text-align: left;
  box-shadow: var(--mh-shadow-soft);
}

body.mobile-kiosk .mobile-history-choice-card span {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  background: #f3effa;
  color: var(--mh-primary-strong);
  font-size: 12px;
  font-weight: 950;
}

body.mobile-kiosk .mobile-history-choice-card strong {
  overflow: hidden;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 950;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-history-choice-card small {
  overflow: hidden;
  color: var(--mh-muted);
  font-size: 10.5px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mobile-kiosk .mobile-history-choice-card.is-active {
  border-color: rgba(139, 92, 246, .35);
  background: linear-gradient(145deg, #ffffff 0%, #f3edff 100%);
}

body.mobile-kiosk .mobile-app-action-card {
  min-height: clamp(124px, 31vw, 146px);
  border: 1px solid rgba(232, 224, 239, .95);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(255, 255, 255, .9)),
    var(--mh-surface-soft);
  padding: 16px 42px 16px 16px;
  box-shadow: var(--mh-shadow-soft);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

body.mobile-kiosk .mobile-app-action-card.is-primary {
  min-height: clamp(112px, 27vw, 132px);
  border-color: rgba(139, 92, 246, .28);
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, .16), transparent 28%),
    linear-gradient(145deg, #ffffff 0%, #f3edff 100%);
}

body.mobile-kiosk .mobile-app-action-card:hover,
body.mobile-kiosk .mobile-app-action-card:focus-visible,
body.mobile-kiosk .mobile-mode-card:hover,
body.mobile-kiosk .mobile-mode-card:focus-visible,
body.mobile-kiosk .mobile-app-nav-item:focus-visible,
body.mobile-kiosk .mobile-back-button:focus-visible,
body.mobile-kiosk .mobile-primary-action:focus-visible,
body.mobile-kiosk .mobile-app-shell .btn:focus-visible,
body.mobile-kiosk .mobile-badge .form-control:focus,
body.mobile-kiosk .mobile-badge .form-select:focus {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(139, 92, 246, .18), var(--mh-shadow-soft);
}

body.mobile-kiosk .mobile-app-action-card:active,
body.mobile-kiosk .mobile-mode-card:active,
body.mobile-kiosk .mobile-app-nav-item:active,
body.mobile-kiosk .mobile-primary-action:active {
  transform: translateY(1px) scale(.99);
}

body.mobile-kiosk .mobile-action-icon,
body.mobile-kiosk .mobile-mode-icon {
  width: clamp(48px, 12vw, 58px);
  height: clamp(48px, 12vw, 58px);
  border-radius: 20px;
  background: #f3effa;
  color: var(--mh-primary-strong);
  font-size: clamp(14px, 3.8vw, 17px);
  font-weight: 950;
}

body.mobile-kiosk .mobile-app-action-card.is-primary .mobile-action-icon,
body.mobile-kiosk .mobile-mode-card.primary .mobile-mode-icon {
  background: linear-gradient(145deg, var(--mh-primary), #13a38e);
  color: #fff;
  box-shadow: 0 16px 30px rgba(139, 92, 246, .22);
}

body.mobile-kiosk .mobile-app-action-card::after {
  right: 13px;
  width: 30px;
  height: 30px;
  background: rgba(139, 92, 246, .10);
  color: var(--mh-primary-strong);
  content: ">";
}

body.mobile-kiosk .mobile-action-card strong {
  color: var(--mh-text);
  font-size: clamp(17px, 4.8vw, 21px);
  font-weight: 950;
  letter-spacing: 0;
}

body.mobile-kiosk .mobile-app-action-card.is-primary strong {
  font-size: clamp(22px, 6.2vw, 28px);
}

body.mobile-kiosk .mobile-action-card small {
  color: var(--mh-muted);
  font-size: clamp(11.5px, 3.25vw, 13px);
  font-weight: 850;
}

body.mobile-kiosk .mobile-page-bar.mobile-app-page-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  min-height: 56px;
}

body.mobile-kiosk .mobile-back-button {
  display: grid;
  place-items: center;
  width: var(--mh-touch);
  height: var(--mh-touch);
  padding: 0;
  border: 1px solid var(--mh-border);
  border-radius: 16px;
  background: var(--mh-surface);
  color: var(--mh-primary-strong);
  line-height: 1;
  box-shadow: var(--mh-shadow-soft);
}

body.mobile-kiosk .mobile-back-button svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

body.mobile-kiosk .mobile-app-page-bar .eyebrow {
  color: var(--mh-muted);
  font-size: 10px;
  letter-spacing: .08em;
}

body.mobile-kiosk .mobile-app-page-bar strong {
  color: var(--mh-text);
  font-size: clamp(20px, 5.4vw, 24px);
}

body.mobile-kiosk .mobile-mode-choice,
body.mobile-kiosk .mobile-stamp-form,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-today-list {
  padding: clamp(16px, 4.4vw, 22px);
}

body.mobile-kiosk .mobile-mode-choice h2,
body.mobile-kiosk .mobile-list-head h2,
body.mobile-kiosk .mobile-confirm-panel h2 {
  color: var(--mh-text);
  font-size: clamp(24px, 6.8vw, 30px);
  line-height: 1.04;
}

body.mobile-kiosk .mobile-mode-choice p,
body.mobile-kiosk .mobile-list-head p,
body.mobile-kiosk .mobile-confirm-panel p {
  color: var(--mh-muted);
}

body.mobile-kiosk .mobile-mode-card {
  min-height: 94px;
  border: 1px solid var(--mh-border);
  border-radius: 24px;
  background: #fff;
  padding: 15px;
}

body.mobile-kiosk .mobile-mode-card strong {
  color: var(--mh-text);
}

body.mobile-kiosk .mobile-field {
  font-size: 13px;
  font-weight: 900;
}

body.mobile-kiosk .mobile-badge .form-control,
body.mobile-kiosk .mobile-badge .form-select,
body.mobile-kiosk .mobile-badge textarea.form-control {
  min-height: 54px;
  border: 1px solid var(--mh-border);
  border-radius: 18px;
  background: #fff;
  color: var(--mh-text);
  font-size: 16px;
  box-shadow: none;
}

body.mobile-kiosk .mobile-badge textarea.form-control {
  min-height: 104px;
}

body.mobile-kiosk .mobile-switch-row,
body.mobile-kiosk .location-panel {
  border: 1px solid var(--mh-border);
  border-radius: 18px;
  background: #fff;
}

body.mobile-kiosk .mobile-primary-action,
body.mobile-kiosk .mobile-app-shell .btn-primary {
  min-height: 56px;
  border: 0;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--mh-primary), var(--mh-primary-strong));
  color: #fff;
  font-weight: 950;
  box-shadow: 0 16px 28px rgba(139, 92, 246, .24);
}

body.mobile-kiosk .mobile-app-shell .btn-outline-primary,
body.mobile-kiosk .mobile-app-shell .btn-outline-secondary {
  border-color: var(--mh-border);
  border-radius: 18px;
  background: #fff;
  color: var(--mh-primary-strong);
  font-weight: 900;
}

body.mobile-kiosk .mobile-record-list {
  gap: 12px;
}

body.mobile-kiosk .mobile-record-day {
  display: grid;
  gap: 10px;
}

body.mobile-kiosk .mobile-record-day header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--mh-muted);
  font-weight: 900;
}

body.mobile-kiosk .mobile-record-item {
  border: 1px solid var(--mh-border);
  border-radius: 22px;
  background: #fff;
  padding: 15px;
  box-shadow: 0 10px 22px rgba(35, 26, 54, .06);
}

body.mobile-kiosk .mobile-record-item.is-ok {
  border-color: rgba(22, 163, 74, .16);
  background: linear-gradient(180deg, #ffffff 0%, #f5fff8 100%);
}

body.mobile-kiosk .mobile-record-item.is-missed {
  border-color: rgba(245, 158, 11, .24);
  background: linear-gradient(180deg, #ffffff 0%, #fff9ec 100%);
}

body.mobile-kiosk .mobile-record-time {
  color: var(--mh-text);
  font-size: clamp(22px, 6.2vw, 28px);
  line-height: 1;
}

body.mobile-kiosk .status-pill,
body.mobile-kiosk .chip {
  border: 0;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 950;
}

body.mobile-kiosk .status-pill.success,
body.mobile-kiosk .chip.success {
  background: #dcfce7;
  color: #047857;
}

body.mobile-kiosk .status-pill.warning,
body.mobile-kiosk .chip.warning {
  background: #fef3c7;
  color: #b45309;
}

body.mobile-kiosk .mobile-feedback-panel {
  padding: 14px;
}

body.mobile-kiosk .mobile-feedback-icon {
  border-radius: 16px;
}

body.mobile-kiosk .mobile-feedback-panel.is-success {
  border-color: rgba(22, 163, 74, .22);
  background: #f0fdf4;
}

body.mobile-kiosk .mobile-feedback-panel.is-error {
  border-color: rgba(220, 38, 38, .20);
  background: #fff1f2;
}

body.mobile-kiosk .mobile-confirm-panel {
  border: 1px solid rgba(232, 224, 239, .96);
  border-radius: 28px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 28px 70px rgba(35, 26, 54, .24);
  backdrop-filter: blur(18px);
}

body.mobile-kiosk .mobile-app-nav {
  width: min(460px, calc(100vw - 24px));
  border: 1px solid rgba(232, 224, 239, .94);
  border-radius: 30px;
  background: rgba(255, 255, 255, .90);
  padding: 8px;
  box-shadow: 0 24px 54px rgba(35, 26, 54, .18);
  backdrop-filter: blur(18px);
}

body.mobile-kiosk .mobile-app-nav-item {
  min-height: 62px;
  border-radius: 22px;
  color: var(--mh-muted);
}

body.mobile-kiosk .mobile-app-nav-item span {
  width: 32px;
  height: 32px;
  border-radius: 14px;
  background: #f4effb;
  color: inherit;
}

body.mobile-kiosk .mobile-app-nav-item small {
  font-size: 9.5px;
  font-weight: 950;
}

body.mobile-kiosk .mobile-app-nav-item.is-active {
  background: linear-gradient(145deg, var(--mh-primary), #13a38e);
  color: #fff;
}

body.mobile-kiosk .mobile-app-nav-item.is-active span {
  background: rgba(255, 255, 255, .20);
}

@media (max-width: 430px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 100%;
  }

  body.mobile-kiosk .mobile-home-hero h2 {
    max-width: 210px;
  }
}

@media (max-width: 390px) {
  body.mobile-kiosk .mobile-action-grid {
    grid-template-columns: 1fr;
  }

  body.mobile-kiosk .mobile-action-grid .mobile-app-action-card:first-child {
    grid-column: auto;
  }

  body.mobile-kiosk .mobile-app-action-card,
  body.mobile-kiosk .mobile-app-action-card.is-primary {
    min-height: 104px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    column-gap: 13px;
  }

  body.mobile-kiosk .mobile-action-icon {
    margin-bottom: 0;
  }

  body.mobile-kiosk .mobile-app-action-card.is-primary strong,
  body.mobile-kiosk .mobile-action-card strong {
    font-size: clamp(18px, 5.5vw, 22px);
  }

  body.mobile-kiosk .mobile-home-hero {
    align-items: flex-start;
  }
}

@media (max-width: 360px) {
  body.mobile-kiosk .mobile-app-shell {
    padding-inline: 10px;
  }

  body.mobile-kiosk .mobile-app-brand span,
  body.mobile-kiosk .mobile-app-context {
    display: none;
  }

  body.mobile-kiosk .mobile-home-hero h2 {
    font-size: 31px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: calc(100vw - 14px);
    padding: 6px;
  }

  body.mobile-kiosk .mobile-app-nav-item {
    min-height: 56px;
  }

  body.mobile-kiosk .mobile-app-nav-item small {
    font-size: 8px;
  }
}

@media (min-width: 700px) {
  body.mobile-kiosk .mobile-app-shell {
    max-width: 620px;
  }

  body.mobile-kiosk .mobile-app-nav {
    width: min(560px, calc(100vw - 40px));
  }
}

/* Mobile final overrides: niente frecce decorative sulle card e cambio azienda sempre leggibile. */
body.mobile-kiosk .mobile-app-action-card,
body.mobile-kiosk .mobile-app-action-card.is-primary {
  padding-right: 16px;
}

body.mobile-kiosk .mobile-app-action-card::after,
.mobile-app-action-card::after {
  display: none !important;
  content: none !important;
}

body.mobile-kiosk .mobile-app-top-actions {
  min-width: 0;
}

body.mobile-kiosk .mobile-company-switch {
  display: grid;
}

/* Mobile web: allineamento visuale allo stile app MAUI, senza toccare layout desktop. */
body.mobile-kiosk {
  background:
    radial-gradient(circle at 14% -8%, rgba(139, 92, 246, .20), transparent 34%),
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, .14), transparent 30%),
    linear-gradient(180deg, #fffbff 0%, #f6f8fb 44%, #eef3f9 100%);
}

body.mobile-kiosk .mobile-app-shell {
  max-width: min(680px, 100vw);
  padding:
    max(18px, env(safe-area-inset-top))
    clamp(16px, 4vw, 24px)
    calc(116px + env(safe-area-inset-bottom));
}

body.mobile-kiosk .mobile-app-shell .mobile-app-frame,
body.mobile-kiosk .mobile-app-content {
  gap: clamp(16px, 4vw, 22px);
}

body.mobile-kiosk .mobile-app-top {
  min-height: 76px;
  border-radius: 30px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .10);
}

body.mobile-kiosk .mobile-app-brand img {
  width: 52px;
  height: 52px;
  border-radius: 17px;
}

body.mobile-kiosk .mobile-app-brand strong {
  font-size: clamp(16px, 4.2vw, 19px);
  font-weight: 950;
}

body.mobile-kiosk .mobile-app-brand span {
  font-size: clamp(11px, 3.2vw, 13px);
  font-weight: 850;
}

body.mobile-kiosk .mobile-app-avatar {
  width: 46px;
  height: 46px;
  border-radius: 18px;
  background: linear-gradient(145deg, #8b5cf6, #6d3edb);
  font-size: 15px;
}

body.mobile-kiosk .mobile-home-hero {
  min-height: clamp(158px, 34vw, 210px);
  border-radius: 34px;
  background:
    radial-gradient(circle at 22% 20%, rgba(255, 255, 255, .24), transparent 24%),
    radial-gradient(circle at 96% 100%, rgba(20, 184, 166, .24), transparent 34%),
    linear-gradient(145deg, #111827 0%, #5b35dc 56%, #0f766e 100%);
  padding: clamp(24px, 6vw, 34px);
  box-shadow: 0 28px 62px rgba(39, 24, 76, .24);
}

body.mobile-kiosk .mobile-home-hero h2 {
  max-width: 285px;
  font-size: clamp(38px, 10vw, 58px);
  line-height: .95;
}

body.mobile-kiosk .mobile-home-count {
  border-radius: 27px;
  background: rgba(255, 255, 255, .16);
}

body.mobile-kiosk .mobile-profile-strip,
body.mobile-kiosk .mobile-user-card,
body.mobile-kiosk .mobile-info-strip,
body.mobile-kiosk .mobile-focus-panel,
body.mobile-kiosk .mobile-stamp-form,
body.mobile-kiosk .mobile-list-head,
body.mobile-kiosk .mobile-history-filter,
body.mobile-kiosk .mobile-today-list,
body.mobile-kiosk .mobile-record-summary,
body.mobile-kiosk .mobile-feedback-panel,
body.mobile-kiosk .mobile-install-card {
  border-radius: 28px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 18px 40px rgba(15, 23, 42, .08);
}

body.mobile-kiosk .mobile-action-grid {
  gap: clamp(14px, 3.8vw, 18px);
}

body.mobile-kiosk .mobile-app-action-card,
body.mobile-kiosk .mobile-app-action-card.is-primary {
  min-height: clamp(128px, 31vw, 152px);
  border-radius: 30px;
  padding: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(255, 255, 255, .92)),
    #fbf8ff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .08);
}

body.mobile-kiosk .mobile-app-action-card.is-primary {
  min-height: clamp(118px, 28vw, 142px);
  background:
    radial-gradient(circle at 100% 0%, rgba(139, 92, 246, .16), transparent 30%),
    linear-gradient(145deg, #ffffff 0%, #f2ecff 100%);
}

body.mobile-kiosk .mobile-action-icon,
body.mobile-kiosk .mobile-mode-icon {
  border-radius: 20px;
  background: #f3effa;
}

body.mobile-kiosk .mobile-app-action-card.is-primary .mobile-action-icon,
body.mobile-kiosk .mobile-mode-card.primary .mobile-mode-icon {
  background: linear-gradient(145deg, #2563eb, #0f766e);
}

body.mobile-kiosk .mobile-action-card strong {
  font-size: clamp(18px, 4.9vw, 22px);
  line-height: 1.08;
}

body.mobile-kiosk .mobile-action-card small {
  font-size: clamp(12px, 3.35vw, 13.5px);
  line-height: 1.35;
}

body.mobile-kiosk .mobile-app-nav {
  width: min(500px, calc(100vw - 24px));
  border-radius: 30px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 24px 54px rgba(15, 23, 42, .16);
}

body.mobile-kiosk .mobile-app-nav-item {
  min-height: 64px;
  border-radius: 23px;
}

body.mobile-kiosk .mobile-app-nav-item.is-active {
  background: linear-gradient(145deg, #2563eb, #0f766e);
}

body.mobile-kiosk .mobile-badge .form-control,
body.mobile-kiosk .mobile-badge .form-select,
body.mobile-kiosk .mobile-badge textarea.form-control {
  border-radius: 18px;
  background: #ffffff;
}

@media (max-width: 390px) {
  body.mobile-kiosk .mobile-app-action-card,
  body.mobile-kiosk .mobile-app-action-card.is-primary {
    min-height: 108px;
  }

  body.mobile-kiosk .mobile-action-grid {
    grid-template-columns: 1fr;
  }
}

#components-reconnect-modal.blazor-reconnect-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .36);
  backdrop-filter: blur(6px);
}

#components-reconnect-modal.components-reconnect-hide {
  display: none;
}

.blazor-reconnect-card {
  width: min(560px, 100%);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid #dbe3ee;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .28);
}

.blazor-reconnect-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #eef4ff;
  color: #2563eb;
  font-weight: 900;
  font-size: 22px;
}

#components-reconnect-modal.components-reconnect-failed .blazor-reconnect-icon,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect-icon {
  background: #fff1f2;
  color: #dc2626;
}

.blazor-reconnect-title,
.blazor-reconnect-message {
  display: none;
}

#components-reconnect-modal.components-reconnect-show .blazor-reconnect-title-show,
#components-reconnect-modal.components-reconnect-failed .blazor-reconnect-title-failed,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect-title-rejected {
  display: block;
}

#components-reconnect-modal.components-reconnect-show .blazor-reconnect-message-show,
#components-reconnect-modal.components-reconnect-failed .blazor-reconnect-message-failed,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect-message-rejected {
  display: block;
}

.blazor-reconnect-copy strong {
  color: #0f172a;
  font-size: 1.25rem;
}

.blazor-reconnect-copy p {
  margin: 8px 0 18px;
  color: #64748b;
}

.blazor-reconnect-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.blazor-reconnect-action-login {
  display: none;
}

#components-reconnect-modal.components-reconnect-failed .blazor-reconnect-action-login,
#components-reconnect-modal.components-reconnect-rejected .blazor-reconnect-action-login {
  display: inline-flex;
}

.blazor-runtime-error {
  min-height: min(460px, 72vh);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.blazor-runtime-error-card {
  width: min(640px, 100%);
  padding: 28px;
  border: 1px solid #fecdd3;
  border-radius: 20px;
  background: #fff7f8;
  box-shadow: 0 24px 60px rgba(190, 18, 60, .12);
}

.blazor-runtime-error-card h2 {
  margin: 4px 0 8px;
  color: #9f1239;
}

.blazor-runtime-error-card p {
  margin: 0 0 18px;
  color: #64748b;
}

.blazor-runtime-error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.absences-page {
  display: block;
}

.absences-head {
  align-items: center;
}

.absences-alert {
  margin: 0;
  border-radius: 14px;
}

.absences-empty {
  padding: 28px;
  border: 1px solid #dbe7f5;
  border-radius: 18px;
  background: #f8fbff;
  color: #64748b;
  font-weight: 700;
}

.absences-planning {
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.absences-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
}

.absences-table:has(thead th:nth-child(5)) {
  /* niente larghezza minima forzata: la tabella si dimensiona sul contenuto
     (width:max-content nella regola generale) e scrolla in .absences-table-wrap */
  min-width: 0;
}

.absences-table .absence-main-cell strong,
.absences-table .absence-main-cell span {
  display: block;
}

.absences-table .absence-main-cell span,
.absences-table .absence-muted {
  color: #64748b;
  font-size: 12px;
  font-weight: 750;
}

.absences-table .absence-notes-cell {
  max-width: 300px;
  white-space: normal;
}

.absences-table .absence-status {
  display: inline-flex;
}

.absences-table .absences-row-actions {
  min-width: 190px;
}

.actions-column {
  width: 1%;
  min-width: 190px;
  white-space: nowrap;
  text-align: right;
}

.actions-column .btn {
  margin-left: 8px;
}

.absences-page .expense-icon-button {
  flex: 0 0 34px;
}

.absence-status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3152c9;
  font-weight: 800;
  font-size: .78rem;
}

.absence-status.is-approved {
  background: #dcfce7;
  color: #15803d;
}

.absence-status.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.absence-status.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.absence-scheduler {
  min-height: 680px;
}

.legend-filter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.legend-filter-title {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.legend-filter-options {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.legend-filter-option {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #dbe3ee;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  pointer-events: auto;
}

.legend-filter-option span:not(.legend-filter-marker) {
  color: inherit;
}

.legend-filter-option:hover,
.legend-filter-option:focus-visible {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.legend-filter-option.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 0 0 .16rem rgba(37, 99, 235, .12);
}

.legend-filter-option.is-all {
  color: #334155;
}

.legend-filter-option.is-draft {
  background: #eef2ff;
  color: #3152c9;
}

.legend-filter-option.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.legend-filter-option.is-approved {
  background: #dcfce7;
  color: #15803d;
}

.legend-filter-option.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.legend-filter-option.is-ok {
  background: #dcfce7;
  color: #047857;
}

.legend-filter-option.is-problem {
  background: #fee2e2;
  color: #b91c1c;
}

.legend-filter-option.is-missed {
  background: #fef3c7;
  color: #92400e;
}

.legend-filter-option.is-planned {
  background: #eff6ff;
  color: #1d4ed8;
}

.legend-filter-option.is-missed-value {
  background: #fff7ed;
  color: #c2410c;
}

.legend-filter-option.is-draft:not(.is-active),
.legend-filter-option.is-pending:not(.is-active),
.legend-filter-option.is-approved:not(.is-active),
.legend-filter-option.is-rejected:not(.is-active),
.legend-filter-option.is-ok:not(.is-active),
.legend-filter-option.is-problem:not(.is-active),
.legend-filter-option.is-missed:not(.is-active),
.legend-filter-option.is-planned:not(.is-active),
.legend-filter-option.is-missed-value:not(.is-active) {
  border-color: transparent;
}

.legend-filter-marker {
  width: 4px;
  height: 16px;
  border-radius: 999px;
  background: #94a3b8;
}

.legend-filter-marker.is-absence,
.agenda-item-marker.is-absence,
.legend-filter-marker.is-absence-approved,
.agenda-item-marker.is-absence-approved {
  background: #dc2626;
}

.agenda-item-marker.is-absence-pending {
  background: #f9a8d4;
}

.legend-filter-marker.is-sickness,
.agenda-item-marker.is-sickness,
.legend-filter-marker.is-sickness-approved,
.agenda-item-marker.is-sickness-approved {
  background: #7c3aed;
}

.agenda-item-marker.is-sickness-pending {
  background: #c4b5fd;
}

.legend-filter-marker.is-smart-working,
.agenda-item-marker.is-smart-working,
.legend-filter-marker.is-smart-working-approved,
.agenda-item-marker.is-smart-working-approved {
  background: #16a34a;
}

.agenda-item-marker.is-smart-working-pending {
  background: #86efac;
}

.agenda-panel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #f8fbff;
  overflow: hidden;
}

.agenda-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  border-bottom: 1px solid #dbe7f5;
}

.agenda-panel-head h3 {
  margin: 0;
  font-size: 1rem;
}

.agenda-panel-head div {
  display: grid;
  gap: 3px;
}

.agenda-panel-head span {
  color: #64748b;
  font-size: .78rem;
  font-weight: 800;
  text-transform: capitalize;
}

.agenda-panel-head > strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e0ecff;
  color: #2563eb;
  font-size: .82rem;
  font-weight: 900;
}

.agenda-panel-list {
  display: grid;
  gap: 8px;
  padding: 10px;
  overflow-y: auto;
}

.agenda-list-item {
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}

.agenda-list-item.is-sickness,
.agenda-list-item.is-sickness-approved,
.agenda-list-item.is-sickness-pending {
  border-color: #ddd6fe;
  background: #faf5ff;
}

.agenda-item-marker {
  align-self: stretch;
  border-radius: 999px;
  background: #94a3b8;
}

.agenda-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.agenda-item-main strong,
.agenda-item-main small,
.agenda-item-meta {
  min-width: 0;
  overflow-wrap: anywhere;
}

.agenda-item-main strong {
  color: #0f172a;
  font-size: .9rem;
  line-height: 1.2;
}

.agenda-item-main small {
  color: #475569;
  font-size: .8rem;
  font-weight: 700;
}

.agenda-item-meta {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.agenda-item-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3152c9;
  font-size: .72rem;
  font-weight: 900;
  white-space: nowrap;
}

.agenda-item-status.is-approved {
  background: #dcfce7;
  color: #15803d;
}

.agenda-item-status.is-rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.agenda-item-status.is-pending {
  background: #fef3c7;
  color: #92400e;
}

.agenda-panel-empty {
  display: grid;
  gap: 4px;
  padding: 18px 14px;
  color: #64748b;
}

.agenda-panel-empty strong {
  color: #334155;
}

.planning-calendar-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.planning-month-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-self: start;
  padding: 4px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}

.planning-month-toolbar .planning-month-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}

.planning-month-toolbar .planning-month-nav-button:hover,
.planning-month-toolbar .planning-month-nav-button:focus-visible {
  background: #e0ecff;
  color: #1d4ed8;
}

.planning-month-toolbar .planning-month-nav-button {
  font-size: 1.35rem;
  line-height: 1;
}

.planning-month-toolbar strong {
  min-width: 132px;
  color: #0f172a;
  font-size: .95rem;
  font-weight: 900;
  text-align: center;
  text-transform: capitalize;
}

.planning-view-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding-left: 4px;
  border-left: 1px solid #dbe7f5;
}

.planning-view-button {
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  font-size: .78rem;
  font-weight: 850;
}

.planning-view-button:hover,
.planning-view-button:focus-visible,
.planning-view-button.is-active {
  background: #eff6ff;
  color: #1d4ed8;
}

.planning-scheduler-appointment {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 2px 8px 2px 10px;
  border-radius: 4px;
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.is-planning-absence,
.planning-scheduler-appointment.is-planning-absence {
  background: #dc2626 !important;
  border-left: 4px solid #ef4444;
}

.is-planning-smart-working,
.planning-scheduler-appointment.is-planning-smart-working {
  background: #16a34a !important;
  border-left: 4px solid #22c55e;
}

.is-planning-sickness,
.planning-scheduler-appointment.is-planning-sickness {
  background: #7c3aed !important;
  border-left: 4px solid #a78bfa;
}

.is-planning-appointment-text {
  color: #fff !important;
  font-weight: 800;
}

.planning-day-view {
  min-height: 680px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.planning-day-list {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.planning-day-item {
  display: grid;
  grid-template-columns: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 8px;
  background: #fff;
}

.planning-day-item.is-absence-approved,
.planning-day-item.is-absence-pending {
  border-color: #fecaca;
  background: #fff7f7;
}

.planning-day-item.is-smart-working-approved,
.planning-day-item.is-smart-working-pending {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.planning-day-item.is-sickness-approved,
.planning-day-item.is-sickness-pending {
  border-color: #ddd6fe;
  background: #faf5ff;
}

.planning-day-item-main {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.planning-day-item-main strong,
.planning-day-item-main span,
.planning-day-item-main small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.planning-day-item-main strong {
  color: #0f172a;
  font-size: .9rem;
  font-weight: 900;
  line-height: 1.25;
}

.planning-day-item-main span {
  color: #475569;
  font-size: .8rem;
  font-weight: 800;
}

.planning-day-item-main small {
  color: #64748b;
  font-size: .78rem;
  font-weight: 650;
}

.planning-day-empty {
  min-height: 220px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.absences-planning-toolbar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
  flex-wrap: wrap;
}

.absences-planning-filter-group {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  min-width: 0;
}

.absences-planning-add-button {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.absences-planning-action-group {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.absences-new-request-chooser {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 8;
  display: flex;
  gap: 6px;
  min-width: max-content;
  padding: 6px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .10);
}

.absences-new-request-option {
  justify-content: flex-start;
  width: auto;
  min-height: 32px;
  border-color: #dbe3ee;
  background: #fff;
  color: #334155;
  font-size: .82rem;
  font-weight: 850;
  padding-inline: 12px;
  border-radius: 999px;
}

.absences-new-request-option:hover,
.absences-new-request-option:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.absences-new-request-option.is-smart-working {
  color: #0f766e;
}

.absences-new-request-option.is-sickness {
  color: #6d28d9;
}

.absences-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.absences-legend-group {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.absences-legend-title {
  color: #64748b;
  font-size: .72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.absences-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: .86rem;
  font-weight: 800;
}

.absences-legend-dot {
  width: 18px;
  height: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 4px 0 #dbe7f5;
}

.absences-legend-dot.is-absence {
  border-color: #dbe7f5;
  background: #fff;
  box-shadow: inset 4px 0 #dbe7f5;
}

.absences-legend-dot.is-smart-working {
  border-color: #5eead4;
  background: #f0fdfa;
  box-shadow: inset 4px 0 #14b8a6;
}

.absences-planning-filters {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.absences-planning-filters label {
  display: grid;
  gap: 6px;
  margin: 0;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.absences-planning-filters .form-select {
  min-width: 170px;
  min-height: 38px;
  border-color: #dbe3ee;
  border-radius: 999px;
  background-color: #fff;
  color: #334155;
  text-transform: none;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 34px 5px 12px;
}

.absences-planning-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  padding: 18px;
}

.absences-modal .absences-dialog {
  max-height: calc(100dvh - 40px);
  overflow: hidden;
}

.absences-modal .editor-body {
  overflow-y: auto;
}

.absences-modal .surface-head {
  align-items: flex-start;
}

.absences-form-grid {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 14px;
  align-items: start;
}

.absences-form-grid .form-field {
  display: grid;
  gap: 6px;
  margin: 0;
  min-width: 0;
}

.absences-form-grid .form-field > span,
.absences-form-grid .standard-date-input > label {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.absences-form-grid .form-control,
.absences-form-grid .form-select,
.absences-form-grid .standard-date-edit.dxbl-text-edit,
.absences-form-grid .blazor-combo-box.dxbl-text-edit,
.absences-day-table .form-control,
.absences-day-table .form-select,
.absences-day-table .standard-date-edit.dxbl-text-edit,
.absences-day-table .blazor-combo-box.dxbl-text-edit {
  border-color: #dbe3ee;
  border-radius: 10px;
  background-color: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  min-height: 38px;
}

.absences-form-grid .standard-date-edit.dxbl-text-edit,
.absences-form-grid .blazor-combo-box.dxbl-text-edit,
.absences-day-table .standard-date-edit.dxbl-text-edit,
.absences-day-table .blazor-combo-box.dxbl-text-edit {
  padding: 0;
  overflow: hidden;
  box-shadow: none;
}

.absences-form-grid .standard-date-edit.dxbl-text-edit input,
.absences-form-grid .blazor-combo-box.dxbl-text-edit input,
.absences-day-table .standard-date-edit.dxbl-text-edit input,
.absences-day-table .blazor-combo-box.dxbl-text-edit input {
  min-height: 36px;
  padding: 5px 10px 5px 12px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.absences-form-grid .standard-date-edit.dxbl-text-edit input::placeholder,
.absences-form-grid .blazor-combo-box.dxbl-text-edit input::placeholder,
.absences-day-table .standard-date-edit.dxbl-text-edit input::placeholder,
.absences-day-table .blazor-combo-box.dxbl-text-edit input::placeholder {
  color: #94a3b8;
  font-weight: 650;
}

.absences-form-grid .standard-date-edit.dxbl-text-edit button,
.absences-form-grid .standard-date-edit.dxbl-text-edit .dxbl-btn,
.absences-form-grid .blazor-combo-box.dxbl-text-edit button,
.absences-form-grid .blazor-combo-box.dxbl-text-edit .dxbl-btn,
.absences-day-table .standard-date-edit.dxbl-text-edit button,
.absences-day-table .standard-date-edit.dxbl-text-edit .dxbl-btn,
.absences-day-table .blazor-combo-box.dxbl-text-edit button,
.absences-day-table .blazor-combo-box.dxbl-text-edit .dxbl-btn {
  min-width: 34px;
  border: 0;
  background: transparent;
  color: #64748b;
}

.absences-form-grid .standard-date-edit.dxbl-text-edit button:hover,
.absences-form-grid .standard-date-edit.dxbl-text-edit .dxbl-btn:hover,
.absences-form-grid .blazor-combo-box.dxbl-text-edit button:hover,
.absences-form-grid .blazor-combo-box.dxbl-text-edit .dxbl-btn:hover,
.absences-day-table .standard-date-edit.dxbl-text-edit button:hover,
.absences-day-table .standard-date-edit.dxbl-text-edit .dxbl-btn:hover,
.absences-day-table .blazor-combo-box.dxbl-text-edit button:hover,
.absences-day-table .blazor-combo-box.dxbl-text-edit .dxbl-btn:hover {
  background: #f8fbff;
  color: #2563eb;
}

.absences-form-grid .form-control:focus,
.absences-form-grid .form-select:focus,
.absences-form-grid .standard-date-edit.dxbl-text-edit:focus-within,
.absences-form-grid .blazor-combo-box.dxbl-text-edit:focus-within,
.absences-day-table .form-control:focus,
.absences-day-table .form-select:focus,
.absences-day-table .standard-date-edit.dxbl-text-edit:focus-within,
.absences-day-table .blazor-combo-box.dxbl-text-edit:focus-within,
.absences-planning-filters .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .14);
}

.absences-form-grid .form-control:disabled,
.absences-form-grid .form-control[readonly],
.absences-form-grid .form-select:disabled,
.absences-form-grid .standard-date-edit.dxbl-text-edit.dxbl-disabled,
.absences-form-grid .standard-date-edit.dxbl-text-edit.dxbl-readonly,
.absences-form-grid .blazor-combo-box.dxbl-text-edit.dxbl-disabled,
.absences-form-grid .blazor-combo-box.dxbl-text-edit.dxbl-readonly,
.absences-day-table .form-control:disabled,
.absences-day-table .form-control[readonly],
.absences-day-table .form-select:disabled,
.absences-day-table .standard-date-edit.dxbl-text-edit.dxbl-disabled,
.absences-day-table .standard-date-edit.dxbl-text-edit.dxbl-readonly,
.absences-day-table .blazor-combo-box.dxbl-text-edit.dxbl-disabled,
.absences-day-table .blazor-combo-box.dxbl-text-edit.dxbl-readonly {
  background-color: transparent !important;
  color: #334155 !important;
  font-weight: 400;
  opacity: 1;
  -webkit-text-fill-color: #334155;
}

.absences-form-grid textarea.form-control {
  min-height: 92px;
}

.form-field-wide {
  grid-column: 1 / -1;
}

.absences-check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f8fbff;
  font-weight: 800;
}

.absences-day-plan {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #f8fbff;
}

.absences-day-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.absences-day-plan-head h3 {
  margin: 0;
  font-size: 1.05rem;
}

.absences-day-plan-head p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: .9rem;
  font-weight: 600;
}

.absences-day-plan-head > span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e0ecff;
  color: #2563eb;
  font-weight: 900;
  white-space: nowrap;
}

.absences-day-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
  color: #64748b;
  font-weight: 800;
}

.absences-overlap-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid #fed7aa;
  border-radius: 14px;
  background: #fff7ed;
  color: #9a3412;
}

.absences-overlap-card strong,
.absences-overlap-card span {
  display: block;
}

.absences-overlap-card strong {
  margin-bottom: 4px;
  color: #7c2d12;
  font-size: .95rem;
  font-weight: 900;
}

.absences-overlap-card span {
  font-size: .9rem;
  font-weight: 700;
}

.absences-overlap-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  gap: 10px;
}

.absences-day-table-wrap {
  max-height: min(46vh, 460px);
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: transparent;
  padding: 8px;
}

.absences-day-table {
  width: 100%;
  min-width: 960px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.absences-day-col-date {
  width: 160px;
}

.absences-day-col-standard {
  width: 140px;
}

.absences-day-col-kind {
  width: 230px;
}

.absences-day-col-defined-time {
  width: 320px;
}

.absences-day-col-actions {
  width: 110px;
}

.absences-day-table th,
.absences-day-table td {
  padding: 9px 10px;
  border-bottom: 0;
  vertical-align: middle;
}

.absences-day-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.absences-day-table tbody tr > td {
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  background: #fff;
  color: #1f2937;
  font-size: 13px;
}

.absences-day-table tbody tr:nth-child(even) > td {
  background: #f8fbff;
}

.absences-day-table tbody tr:hover > td {
  border-color: #dbeafe;
  background: #f1f6ff;
}

.absences-day-table tbody tr > td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 14px 0 0 14px;
  box-shadow: inset 3px 0 #dbe3ee;
}

.absences-day-table tbody tr > td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0 14px 14px 0;
}

.absences-day-table td:first-child {
  min-width: 160px;
}

.absences-day-table .form-control,
.absences-day-table .blazor-combo-box {
  width: 100%;
  max-width: 100%;
}

.absences-day-table td:first-child strong,
.absences-day-table td:first-child span,
.absences-day-table td:first-child em {
  display: block;
}

.absences-day-table td:first-child span,
.absences-day-table td:first-child em,
.absences-day-muted {
  color: #64748b;
  font-size: .82rem;
  font-style: normal;
  font-weight: 700;
}

.absences-day-table tr.is-disabled td {
  border-color: #fecdd3;
  background: #fff1f2 !important;
  color: #991b1b;
}

.absences-day-table tr.is-disabled .absences-day-muted {
  color: #b91c1c;
}

.absences-day-table tr.is-excluded td {
  border-color: #e2e8f0;
  background: #f8fafc !important;
  color: #64748b;
}

.absences-day-table tr.is-excluded .absences-day-muted {
  color: #94a3b8;
}

.absences-day-table tr.is-partial td:first-child {
  border-left-color: #fde7bd;
  box-shadow: inset 4px 0 #f59e0b;
}

.absences-day-table tr.is-full-day td:first-child {
  border-left-color: #bfdbfe;
  box-shadow: inset 4px 0 #2563eb;
}

.absences-day-table tr.is-excluded td:first-child,
.absences-day-table tr.is-disabled td:first-child {
  border-left-color: #e2e8f0;
  box-shadow: inset 4px 0 #cbd5e1;
}

.absences-day-table tr.is-disabled td:first-child {
  border-left-color: #fecdd3;
  box-shadow: inset 4px 0 #ef4444;
}

.absences-day-row-actions {
  min-width: 0;
  text-align: center;
  white-space: nowrap;
}

.absences-day-table .actions-column {
  min-width: 0;
}

.absences-defined-time {
  display: grid;
  grid-template-columns: minmax(78px, 92px) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.absences-defined-time .absences-day-muted {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
}

.absences-hours-input {
  text-align: right;
}

.absences-modal-close {
  font-size: 1.15rem;
  line-height: 1;
}

.absences-time-range {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.absences-time-range-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.absences-time-range .form-control {
  min-width: 0;
}

.absences-add-range-button {
  justify-content: center;
  width: 100%;
}

@media (max-width: 760px) {
  .absences-defined-time {
    grid-template-columns: 1fr;
  }

  .absences-time-range-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  }
}

.absences-modal-footer {
  margin-top: 18px;
  padding: 16px 0 0;
  border-top: 1px solid #e2e8f0;
}

@media (max-width: 900px) {
  .absences-table-wrap {
    overflow-x: auto;
  }

  .absences-table {
    min-width: 1280px;
  }

  .absence-scheduler {
    min-height: 560px;
  }

  .absences-planning-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .absences-head {
    align-items: stretch;
  }

  .absences-planning-toolbar {
    align-items: stretch;
  }

  .absences-planning-filter-group,
  .absences-planning-action-group,
  .absences-planning-add-button {
    width: 100%;
  }

  .absences-planning-action-group {
    justify-content: stretch;
  }

  .absences-new-request-chooser {
    display: grid;
    left: 0;
    right: 0;
    min-width: 0;
  }

  .absences-new-request-option {
    width: 100%;
    justify-content: center;
  }

  .legend-filter {
    width: 100%;
    align-items: flex-start;
  }

  .legend-filter-title {
    width: 52px;
    padding-top: 8px;
  }

  .legend-filter-options {
    flex: 1 1 0;
  }

  .agenda-list-item {
    grid-template-columns: 4px minmax(0, 1fr);
  }

  .agenda-item-status {
    grid-column: 2;
    justify-self: start;
  }

  .absences-planning-filters {
    width: 100%;
  }

  .absences-planning-filters label {
    flex: 1 1 160px;
  }

  .absences-form-grid {
    grid-template-columns: 1fr;
  }

  .absences-overlap-card {
    align-items: stretch;
    flex-direction: column;
  }

  .absences-overlap-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .absences-overlap-actions .btn,
  .absences-overlap-actions button {
    flex: 1 1 160px;
  }

  .absences-day-plan-head {
    display: grid;
  }

  .actions-column {
    min-width: 170px;
  }
}

.smart-table-surface {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.smart-table-surface::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0f766e);
  opacity: .88;
}

.smart-table-surface > .surface-head {
  align-items: center;
  flex-direction: row;
  gap: 12px;
  justify-content: space-between;
  padding-bottom: 14px;
}

.smart-table-surface > .standard-table-shell > .table-responsive {
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.standard-table-shell.smart-table-shell {
  display: grid;
  gap: 12px;
}

.standard-table-top-content {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.smart-customers-table {
  /* Niente riempimento forzato: la tabella si dimensiona sul contenuto.
     Con table-layout:fixed le colonne restano alle larghezze di progetto. */
  min-width: 0 !important;
  table-layout: fixed;
}

.smart-customers-table tbody td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.smart-customers-table .commesse-document-main-button {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.smart-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  max-width: 100%;
}

.smart-table-toolbar-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 260px;
  min-width: min(220px, 100%);
}

.smart-table-toolbar-actions,
.notification-page-actions,
.notification-dropdown-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  min-width: 0;
}

.smart-table-toolbar-actions {
  flex: 0 1 auto;
  justify-content: flex-end;
  max-width: 100%;
}

.smart-table-search,
.smart-table-filter-control {
  min-height: 38px;
}

.smart-table-search {
  flex: 1 1 auto;
  min-width: 0;
}

.smart-table-clear-search {
  flex: 0 0 auto;
}

.smart-table-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 12px;
}

.smart-table-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.smart-table-filter-modal .smart-table-filter-dialog {
  width: min(1280px, calc(100vw - 48px));
}

.smart-table-filter-modal {
  align-items: flex-start;
  overflow-y: auto;
  padding-top: 54px;
  padding-bottom: 54px;
}

.smart-table-filter-modal .surface-head {
  padding: 26px 32px 18px;
  border-bottom: 0;
  background: #fff;
}

.smart-table-filter-modal .surface-head h2 {
  margin-top: 4px;
  font-size: 28px;
  line-height: 1.12;
}

.smart-table-filter-modal .editor-body {
  padding: 0;
}

.smart-table-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  margin: 0 32px 18px;
  padding: 0 16px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #f8fbff;
}

.smart-table-filter-summary-status {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  color: #344256;
  font-size: 16px;
  font-weight: 750;
}

.smart-table-filter-summary-icon {
  display: inline-block;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  background: #65758a;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 5h18l-7 8v5l-4 2v-7L3 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.smart-table-reset-link {
  min-width: auto;
  padding-inline: 0;
  color: var(--primary);
  font-weight: 900;
}

.smart-table-filter-modal-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  gap: 28px;
  align-items: stretch;
  padding: 0 32px 24px;
}

.smart-table-filter-presets,
.smart-table-filter-editor {
  min-width: 0;
  background: transparent;
}

.smart-table-filter-editor {
  display: grid;
  gap: 26px;
}

.smart-table-filter-group {
  display: grid;
  gap: 18px;
  padding-bottom: 26px;
  border-bottom: 1px solid #d8e4f2;
}

.smart-table-filter-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.smart-table-filter-group h3,
.smart-table-filter-presets h3 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.2;
}

.smart-table-filter-presets {
  display: grid;
  align-content: start;
  gap: 20px;
  padding-left: 28px;
  border-left: 1px solid #d8e4f2;
}

.smart-table-filter-save {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  gap: 16px;
  margin-bottom: 8px;
}

.smart-table-filter-save .blazor-action-text-button,
.smart-table-filter-save .btn {
  width: 100%;
  min-height: 50px;
  border-radius: 10px;
}

.smart-table-preset-name {
  display: grid;
  gap: 8px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  text-transform: none;
}

.smart-table-filter-save .btn-primary,
.smart-table-filter-save .btn-primary:disabled,
.smart-table-filter-save .btn-primary.dxbl-disabled,
.smart-table-filter-save .btn-primary[aria-disabled="true"] {
  border-color: var(--primary) !important;
  background: var(--primary) !important;
  color: #fff !important;
}

.smart-table-filter-save .btn-primary:disabled,
.smart-table-filter-save .btn-primary.dxbl-disabled,
.smart-table-filter-save .btn-primary[aria-disabled="true"] {
  opacity: .58;
}

.smart-table-filter-preset-list {
  display: grid;
  gap: 8px;
}

.smart-table-filter-preset-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 12px;
  min-height: 58px;
  padding: 8px 12px;
  border: 1px solid #d8e4f2;
  border-radius: 8px;
  background: #fff;
}

.smart-table-filter-preset-row > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-table-filter-preset-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.smart-table-preset-apply {
  min-width: auto;
  padding-inline: 0;
  color: var(--primary);
  font-weight: 900;
}

.smart-table-advanced-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px 28px;
}

.smart-table-filter-field {
  display: grid;
  gap: 10px;
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.smart-table-filter-field > span {
  color: var(--text);
  font-size: 14px;
  font-weight: 850;
  text-transform: none;
}

.smart-table-filter-modal .smart-table-filter-control {
  min-height: 50px;
  border-color: #d0dbe9;
  border-radius: 8px;
  font-size: 15px;
}

.smart-table-filter-modal .modal-form-actions {
  margin-top: 0;
  padding: 22px 32px;
  border-top-color: #d8e4f2;
}

.smart-table-filter-modal .modal-form-actions:not(.has-danger) .modal-form-main-actions {
  grid-column: 1 / -1;
  justify-self: stretch;
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-left: 0;
}

.smart-table-filter-modal .modal-form-actions .btn {
  min-height: 52px;
  min-width: 176px;
  border-radius: 8px;
}

.smart-table-header-filters th {
  background: #f8fafc;
  padding: 8px;
  overflow: visible;
  vertical-align: middle;
}

.smart-table-header-filters :where(.smart-table-filter-control, input, select, .dxbl-text-edit, .dxbl-input) {
  box-sizing: border-box;
  min-width: 110px;
}

.smart-table-header-filters .dxbl-text-edit.smart-table-filter-control input {
  min-height: 0;
  padding-block: 0;
}

.smart-table-header-filters .blazor-combo-box.dxbl-text-edit.smart-table-filter-control .dxbl-edit-btn-dropdown {
  min-height: 28px;
}

.smart-table-range-filter {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.smart-table-multiselect {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.smart-table-multiselect .smart-table-option-switch,
.smart-table-column-controls .smart-table-option-switch {
  width: 100%;
  min-width: 0;
}

.smart-table-option-switch label,
.smart-table-option-switch .dxbl-checkbox-label {
  min-width: 0;
  color: var(--text);
  font-weight: 800;
}

.smart-table-column-options {
  display: grid;
  gap: 8px;
}

.smart-table-column-option {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(180px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 8px;
  border: 1px solid transparent;
  border-bottom-color: var(--border);
  border-radius: 8px;
  transition: background-color .14s ease, border-color .14s ease, box-shadow .14s ease, opacity .14s ease, transform .14s ease;
}

.smart-table-column-option.drag-source {
  background: #f8fbff;
  opacity: .64;
  outline: 1px dashed #93c5fd;
  outline-offset: -4px;
  transform: scale(.995);
}

.smart-table-column-option.drop-target {
  border-color: #bfdbfe;
  background: rgba(37, 99, 235, .06);
  box-shadow: inset 0 3px 0 var(--primary), 0 8px 20px rgba(37, 99, 235, .10);
}

.smart-table-column-option::before {
  background: var(--primary);
  border-radius: 999px;
  content: "";
  height: 3px;
  left: 10px;
  opacity: 0;
  position: absolute;
  right: 10px;
  top: -2px;
  transition: opacity .14s ease;
}

.smart-table-column-option::after {
  background: var(--primary);
  border: 3px solid #dbeafe;
  border-radius: 999px;
  content: "";
  height: 13px;
  left: 10px;
  opacity: 0;
  position: absolute;
  top: -7px;
  transition: opacity .14s ease;
  width: 13px;
}

.smart-table-column-option.drop-target::before,
.smart-table-column-option.drop-target::after {
  opacity: 1;
}

.smart-table-column-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: var(--surface);
  color: #64748b;
  cursor: grab;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  user-select: none;
}

.smart-table-column-drag-handle:hover,
.smart-table-column-drag-handle:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  color: var(--primary-strong);
  outline: none;
}

.smart-table-column-drag-handle:active {
  cursor: grabbing;
}

.smart-table-column-meta {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.smart-table-column-meta strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.smart-table-column-required {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.smart-table-filter-option-tag {
  justify-self: start;
  width: fit-content;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 1px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.smart-table-filter-options-intro {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 13px;
}

.smart-table-column-option:last-child {
  border-bottom-color: transparent;
}

.smart-table-column-controls {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 120px;
}

.smart-table-column-switch {
  justify-content: flex-end;
}

.smart-table-small-button {
  min-width: 30px;
  width: 30px;
  height: 30px;
}

.smart-table-width-input {
  width: 96px;
}

.smart-table-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 800;
  text-transform: uppercase;
  white-space: nowrap;
}

.smart-table-state,
.notification-state,
.smart-table-error,
.notification-error {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: var(--muted);
}

.smart-table-error,
.notification-error {
  color: var(--danger);
}

.smart-table-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 999px;
  animation: nethub-spin .75s linear infinite;
}

@keyframes nethub-spin {
  to {
    transform: rotate(360deg);
  }
}

/* Modal unica "Impostazioni tabella" (SmartTableSettingsModal): sostituisce le tre modal
   separate Filtri/Colonne/Filtri visibili con un hub a sidebar, un solo pulsante toolbar.
   Riferimento: design handoff "Grafica Blazor per analisi", direzione 1c. */
.smart-table-settings-dialog {
  width: min(788px, 96vw);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.smart-table-settings-dialog .editor-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

/* .modal-form-actions e' pensato come riga di un .form-grid (grid-column:1/-1),
   qui invece e' figlio flex diretto di .editor-body: senza flex-shrink:0 si
   comprime insieme a .smart-table-settings-body quando il contenuto e' alto,
   con effetto "footer tagliato" segnalato dall'utente. */
.smart-table-settings-dialog .editor-body > .modal-form-actions {
  flex: 0 0 auto;
  padding: 14px 18px;
  margin-top: 0;
  border-top: 1px solid var(--border);
}

.smart-table-settings-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 212px 1fr;
  overflow: hidden;
}

.smart-table-settings-sidebar {
  display: flex;
  flex-direction: column;
  padding: 14px 12px;
  background: #f8fafc;
  border-right: 1px solid #eef3f9;
  overflow-y: auto;
}

.smart-table-settings-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.smart-table-settings-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  width: 100%;
  padding: 9px 11px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-size: 12.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.smart-table-settings-nav-item:hover {
  background: #eef2f7;
}

.smart-table-settings-nav-item.active {
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  box-shadow: inset 2px 0 0 var(--primary);
}

.smart-table-settings-nav-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.smart-table-settings-nav-count.active {
  background: var(--primary);
  color: #fff;
}

.smart-table-settings-divider {
  height: 1px;
  margin: 14px 2px;
  background: #e5ebf3;
}

.smart-table-settings-presets {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-table-settings-presets-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #94a3b8;
}

.smart-table-settings-presets-empty {
  margin: 0;
  color: var(--muted);
  font-size: 11.5px;
}

.smart-table-settings-preset-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e8eef6;
  border-radius: 9px;
  background: #fff;
}

.smart-table-settings-preset-row.applied {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.smart-table-settings-preset-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  border: none;
  background: transparent;
  padding: 0;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.smart-table-settings-preset-count {
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
}

.smart-table-settings-preset-delete {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #94a3b8;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.smart-table-settings-preset-delete:hover {
  background: #fef2f2;
  color: var(--danger);
}

.smart-table-settings-preset-save-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.smart-table-settings-preset-input {
  min-height: 34px;
}

.smart-table-settings-preset-save-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.smart-table-settings-preset-add {
  border: 1px dashed #bcd0ea;
  border-radius: 9px;
  padding: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.smart-table-settings-preset-add:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.smart-table-settings-content {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 18px;
}

.smart-table-settings-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.smart-table-settings-section-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
}

.smart-table-settings-section-intro {
  margin: -6px 0 14px;
  color: #94a3b8;
  font-size: 11.5px;
}

.smart-table-settings-chip {
  flex: 0 0 auto;
  padding: 3px 9px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.smart-table-settings-group {
  margin-bottom: 20px;
}

.smart-table-settings-group-label {
  display: block;
  margin-bottom: 9px;
  color: #94a3b8;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.smart-table-settings-drag-handle {
  display: grid;
  grid-template-columns: repeat(2, 3px);
  grid-auto-rows: 3px;
  gap: 3px;
  width: 14px;
  height: 15px;
  align-content: center;
  justify-content: center;
  cursor: grab;
}

.smart-table-settings-drag-handle span {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #94a3b8;
}

.smart-table-settings-drag-handle:active {
  cursor: grabbing;
}

.smart-table-settings-tag {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #eef3f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}

.smart-table-settings-tag.fixed {
  background: #eff6ff;
  color: #1d4ed8;
}

.smart-table-settings-visibility-list {
  display: grid;
  gap: 8px;
}

.smart-table-settings-visibility-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid #eef2f7;
  border-radius: 9px;
}

.smart-table-settings-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border: 1px solid #dbe3ee;
  border-radius: 9px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.smart-table-settings-toggle:hover {
  border-color: #93c5fd;
  color: var(--primary-strong);
}

.smart-table-settings-toggle.open {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.smart-table-settings-toggle .button-icon-svg {
  display: block;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
}

.smart-table-settings-toggle.icon-only {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  padding: 0;
  justify-content: center;
}

.smart-table-settings-toggle.icon-only .button-icon-svg {
  width: 15px;
  height: 15px;
}

/* Badge conteggio filtri attivi: ancorato in overlay sull'angolo dell'icona,
   non in linea con essa, altrimenti nei 24px del pulsante icon-only i due
   elementi si accavallano/deformano (segnalato dall'utente come pulsante
   "sminchiato"). Renderizzato solo quando il conteggio e' > 0. */
.smart-table-settings-toggle.icon-only .smart-table-settings-toggle-count {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  border: 2px solid #fff;
  font-size: 9px;
  line-height: 10px;
}

.smart-table-settings-toggle-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}

.smart-table-settings-toggle-count.active {
  background: var(--primary);
  color: #fff;
}

/* Sotto ~520px il pulsante "Impostazioni tabella" diventa icona sola col solo count pill,
   coerente con gli altri icon-button del toolbar (stesso pattern di .smart-table-clear-search
   e affini). */
@media (max-width: 520px) {
  .smart-table-settings-toggle:not(.icon-only) {
    padding: 7px;
  }

  .smart-table-settings-toggle:not(.icon-only) .smart-table-settings-toggle-label {
    display: none;
  }
}

@media (max-width: 900px) {
  .smart-table-filter-modal-grid {
    grid-template-columns: 1fr;
  }

  .smart-table-filter-presets {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid #d8e4f2;
    padding-top: 22px;
  }

  .smart-table-filter-save,
  .smart-table-filter-preset-row {
    grid-template-columns: 1fr;
  }

  .smart-table-filter-preset-actions {
    justify-content: flex-start;
  }

  .smart-table-settings-dialog {
    width: min(96vw, 720px);
  }

  .smart-table-settings-body {
    grid-template-columns: 1fr;
  }

  .smart-table-settings-sidebar {
    border-right: 0;
    border-bottom: 1px solid #eef3f9;
  }

  .smart-table-settings-nav {
    flex-direction: row;
    overflow-x: auto;
  }

  .smart-table-settings-nav-item {
    flex: 0 0 auto;
    white-space: nowrap;
  }
}

@media (max-width: 640px) {
  .smart-table-advanced-grid {
    grid-template-columns: 1fr;
  }

  .smart-table-settings-dialog {
    width: 100vw;
    max-height: 100dvh;
    border-radius: 0;
  }

  .smart-table-settings-nav-item,
  .smart-table-settings-preset-row,
  .smart-table-settings-visibility-row,
  .smart-table-column-option {
    min-height: 44px;
  }
}

.notification-bell-shell {
  position: relative;
  flex-shrink: 0;
}

.notification-bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.notification-bell svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.notification-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1080;
  width: min(380px, calc(100vw - 28px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: var(--radius, 12px);
  background: var(--surface, #fff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  padding: 12px;
}

.notification-dropdown-head,
.notification-dropdown-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border, #dbe3ee);
}

.notification-dropdown-head strong {
  color: var(--text, #0f172a);
  font-size: 14px;
  font-weight: 850;
}

.notification-dropdown-actions {
  padding: 10px 0 0;
  border-top: 1px solid var(--border, #dbe3ee);
  border-bottom: 0;
  justify-content: flex-end;
}

.notification-dropdown-actions a,
.notification-page-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--border-strong, #cbd5e1);
  border-radius: 8px;
  background: #fff;
  color: var(--primary-strong, #1d4ed8);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.notification-dropdown-actions a:hover,
.notification-dropdown-actions a:focus-visible,
.notification-page-actions a:hover,
.notification-page-actions a:focus-visible {
  border-color: var(--primary, #2563eb);
  background: var(--primary-soft, #eaf2ff);
  color: var(--primary-strong, #1d4ed8);
}

.help-menu-shell {
  position: relative;
  flex-shrink: 0;
}

.help-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.help-menu-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 1080;
  display: grid;
  width: 180px;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: var(--radius, 12px);
  background: var(--surface, #fff);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .18);
  padding: 6px;
}

.help-menu-dropdown a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 8px;
  color: var(--text, #0f172a);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.help-menu-dropdown a:hover,
.help-menu-dropdown a:focus-visible {
  background: var(--primary-soft, #eaf2ff);
  color: var(--primary-strong, #1d4ed8);
}

.notification-feed {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.notification-feed-item {
  appearance: none;
  box-sizing: border-box;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-width: 0;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: var(--radius, 12px);
  background: var(--surface, #fff);
  padding: 10px;
  font: inherit;
  text-align: left;
  color: var(--text, #0f172a);
  cursor: pointer;
}

.notification-feed-item.is-unread {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.notification-feed-item:hover,
.notification-feed-item:focus-visible {
  border-color: #bcd4ff;
  background: #f8fbff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .10);
  outline: 0;
}

.notification-feed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #eff6ff;
  color: var(--notification-icon-color, var(--primary));
  font-weight: 800;
}

.notification-feed-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.notification-feed-title,
.notification-feed-message {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.notification-feed-title {
  font-weight: 800;
}

.notification-feed-message,
.notification-feed-time,
.notification-feed-end,
.notification-preference-status {
  color: var(--muted, #64748b);
  font-size: 13px;
}

.notification-feed-time {
  justify-self: end;
  white-space: nowrap;
}

.notification-page {
  display: grid;
  gap: 14px;
}

.notification-page > .notification-feed {
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border, #dbe3ee);
  border-radius: var(--radius, 12px);
  background: var(--surface, #fff);
}

.notification-page > .notification-feed .notification-feed-item {
  border: 0;
  border-bottom: 1px solid var(--border, #dbe3ee);
  border-radius: 0;
  box-shadow: none;
  padding: 12px 14px;
}

.notification-page > .notification-feed .notification-feed-item:last-of-type {
  border-bottom: 0;
}

.notification-page > .notification-feed .notification-feed-item:hover,
.notification-page > .notification-feed .notification-feed-item:focus-visible {
  background: #f8fbff;
  box-shadow: inset 3px 0 0 var(--primary, #2563eb);
}

.notification-page > .notification-feed .notification-feed-end {
  border-top: 1px solid var(--border, #dbe3ee);
  padding: 10px 14px;
}

.notification-filter-tabs {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 16px;
}

.notification-preference-matrix {
  display: grid;
  gap: 12px;
}

.notification-module-group {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.notification-module-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: var(--surface-soft);
  font-weight: 800;
  cursor: pointer;
}

.notification-preference-table {
  display: grid;
}

.notification-preference-row {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 88px 88px 88px minmax(80px, auto);
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--border);
}

.notification-preference-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.notification-channel-switch {
  display: flex;
  justify-content: center;
}

.notification-toast-host {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 1090;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}

.notification-toast {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 10px;
}

.notification-toast-body,
.notification-toast-close {
  border: 0;
  background: transparent;
  color: var(--text);
}

.notification-toast-body {
  display: grid;
  gap: 2px;
  text-align: left;
}

.notification-toast-body span {
  color: var(--muted);
}

.notification-toast-close {
  font-size: 22px;
  line-height: 1;
}

body label {
  font-family: var(--app-font-family) !important;
  font-weight: 600 !important;
}

body :where(.form-control, .form-select, input:not([type="button"]):not([type="checkbox"]):not([type="file"]):not([type="hidden"]):not([type="image"]):not([type="radio"]):not([type="range"]):not([type="reset"]):not([type="submit"]), select, textarea, .dxbl-text-edit, .dxbl-text-edit input, .dxbl-input) {
  font-family: var(--app-font-family) !important;
  font-weight: 400 !important;
}

body .form-control::placeholder,
body .form-select::placeholder,
body input::placeholder,
body textarea::placeholder,
body .dxbl-text-edit input::placeholder {
  font-weight: 400 !important;
}
