:root {
  --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: 300px;
  --sidebar-collapsed-width: 86px;
}

* {
  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: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  letter-spacing: 0;
}

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);
  padding: 8px 18px;
  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;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.app-global-logo img {
  display: block;
  width: auto;
  height: 42px;
  max-width: 150px;
  object-fit: contain;
}

.app-company-context {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  max-width: min(48vw, 520px);
}

.app-company-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
}

.app-company-logo img {
  display: block;
  width: auto;
  height: 46px;
  max-width: 190px;
  object-fit: contain;
}

.app-company-logo strong {
  max-width: min(34vw, 360px);
  overflow: hidden;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

.app-global-actions form {
  margin: 0;
}

.app-global-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 14px;
  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);
}

.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;
}

.shell-nav {
  gap: 8px;
  padding: 8px 0 18px;
}

.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%, 520px);
  min-height: auto;
  padding: 24px;
}

body.auth-page .auth-panel {
  width: 100%;
  margin: 0;
}

.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: #64748b;
  cursor: not-allowed;
}

.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 h2 {
  margin: 4px 0 6px;
  font-size: 24px;
  font-weight: 800;
}

.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: 6px;
  background: #fff;
}

.table-filter-row input,
.table-filter-row select {
  min-width: 110px;
  border-color: #dbe3ee;
  background-color: #fff;
  font-size: 12px;
}

.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;
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, .10), transparent 34%),
    rgba(15, 23, 42, .48);
  backdrop-filter: blur(8px);
}

.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%);
}

.company-switch-dialog {
  width: min(620px, 100%);
}

.editor-dialog .surface-head {
  flex: 0 0 auto;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 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: stretch;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px 10px;
  align-items: center;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #f8fbff;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
}

.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 input[type="checkbox"],
.editor-dialog .check-line input[type="checkbox"] {
  appearance: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #e5e7eb;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, .10);
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.editor-dialog .check-row input[type="checkbox"]::before,
.editor-dialog .check-line input[type="checkbox"]::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 3px 8px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.editor-dialog .check-row input[type="checkbox"]:checked,
.editor-dialog .check-line input[type="checkbox"]:checked {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .10);
}

.editor-dialog .check-row input[type="checkbox"]:checked::before,
.editor-dialog .check-line input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}

.editor-dialog .check-row input[type="checkbox"]:focus-visible,
.editor-dialog .check-line input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(37, 99, 235, .34);
  outline-offset: 2px;
}

.editor-dialog .check-row input[type="checkbox"]:disabled,
.editor-dialog .check-line input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: .68;
}

.editor-dialog .check-row small,
.editor-dialog .check-line small {
  grid-column: 2;
  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;
}

.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-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);
}

.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);
}

.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: 12px;
  margin-bottom: 16px;
}

.metric,
.work-surface,
.toolbar-surface,
.auth-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 112px;
  padding: 16px;
}

.metric span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
}

.metric small {
  color: var(--muted);
  font-size: 12px;
}

.work-surface,
.toolbar-surface,
.auth-panel {
  margin-bottom: 16px;
  padding: 16px;
}

.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-row-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 255, 255, .82);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
}

.report-row-legend-title {
  color: var(--text-main);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.report-row-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.report-row-legend-item strong {
  color: var(--text-main);
  font-size: 12px;
}

.report-row-legend-mark {
  width: 34px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.report-row-legend-mark.ok {
  border: 1px solid rgba(5, 150, 105, .26);
  background: linear-gradient(90deg, var(--success) 0 5px, #ecfdf5 5px 100%);
  box-shadow: inset 4px 0 var(--success);
}

.report-row-legend-mark.problem {
  border: 1px solid rgba(220, 38, 38, .28);
  background: linear-gradient(90deg, var(--danger) 0 5px, var(--danger-soft) 5px 100%);
  box-shadow: inset 4px 0 var(--danger);
}

.report-row-legend-mark.missed {
  border: 1px solid rgba(245, 158, 11, .32);
  background: linear-gradient(90deg, var(--warning) 0 5px, var(--warning-soft) 5px 100%);
  box-shadow: inset 4px 0 var(--warning);
}

.report-row-legend-mark.planned {
  border: 1px solid rgba(37, 99, 235, .28);
  background: linear-gradient(90deg, var(--primary) 0 5px, #eff6ff 5px 100%);
  box-shadow: inset 4px 0 var(--primary);
}

.report-row-legend-mark.missed-value {
  width: 42px;
  border: 1px solid rgba(245, 158, 11, .26);
  background: rgba(245, 158, 11, .18);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, .10), 0 8px 18px rgba(245, 158, 11, .12);
}

.report-summary-chip {
  background: #eef6ff;
  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-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.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;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, .9fr);
  gap: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
  align-items: end;
}

.form-grid-wide {
  grid-column: span 2;
}

.check-line {
  align-self: center;
  display: flex;
  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: 750;
}

.form-control,
.form-select,
.menu-search input,
.table-search {
  border-color: var(--border);
  border-radius: var(--radius);
  color: var(--text);
}

.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);
}

.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;
}

.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: #f8fafc;
  color: #94a3b8;
  border-style: dashed;
}

.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;
}

.settings-actions {
  display: grid;
  gap: 8px;
}

.settings-actions.horizontal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.settings-tab-shell {
  margin: 0 0 14px;
  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;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.settings-tab {
  position: relative;
  min-height: 48px;
  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;
}

.company-tab-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.company-tab {
  display: grid;
  gap: 2px;
  min-width: 220px;
  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: auto minmax(0, 1fr);
  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-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 {
    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 {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #0f766e);
  opacity: .88;
}

.expense-note-table,
.expense-rows-table {
  min-width: 100%;
}

.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-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-start;
  white-space: nowrap;
}

.expense-note-list-surface .table-responsive,
.expense-note-detail-surface .table-responsive {
  border-radius: 12px;
}

.expense-header-table {
  min-width: 1280px;
}

.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;
  border-bottom: 1px solid #cbd5e1;
  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-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 {
  display: inline-flex;
  flex-wrap: nowrap;
  justify-content: flex-start;
  gap: 6px;
  min-width: 120px;
  white-space: nowrap;
}

.expense-header-table .actions-col {
  min-width: 132px;
}

.expense-rows-table .row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-start;
  min-width: 72px;
  white-space: nowrap;
}

.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;
}

.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.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-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;
}

.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-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;
}

.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-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-split {
  align-items: stretch;
  grid-template-columns: minmax(220px, 320px) minmax(360px, 1fr);
}

.expense-attachment-modal-split .modal-form-actions {
  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;
}

.expense-attachment-preview-pane {
  background: #f8fbff;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  display: grid;
  gap: 10px;
  grid-template-rows: auto minmax(360px, 62vh);
  min-width: 0;
  padding: 10px;
}

.expense-attachment-preview-head {
  align-items: center;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.expense-attachment-preview-head strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.expense-attachment-preview-frame {
  background: #fff;
  border: 0;
  border-radius: 10px;
  height: 100%;
  min-height: 360px;
  width: 100%;
}

.expense-rows-table td:last-child .row-actions {
  justify-content: center;
}

@media (max-width: 900px) {
  .expense-attachment-modal-split {
    grid-template-columns: 1fr;
  }

  .expense-attachment-preview-pane {
    grid-template-rows: auto minmax(300px, 52vh);
  }
}

.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;
  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 {
  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: 160px;
}

.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;
}

.site-procedure-sync {
  margin-bottom: 16px;
}

.site-procedure-sync .surface-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.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: #f8fafc;
  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;
}

.table-search {
  min-height: 38px;
  min-width: 260px;
  padding: 8px 10px;
}

.table-responsive {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: auto;
  background: #fff;
}

.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:not(.presence-stamps-table):not(#reports-table)) {
  border: 0;
  border-radius: 14px;
  background: transparent;
}

.data-table:not(.presence-stamps-table):not(#reports-table) {
  min-width: 960px;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.data-table:not(.presence-stamps-table):not(#reports-table) thead th {
  border-bottom: 0;
  background: #f8fafc;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.data-table:not(.presence-stamps-table):not(#reports-table) .table-filter-row th {
  padding: 8px 10px 12px;
  background: #f8fafc;
}

.data-table:not(.presence-stamps-table):not(#reports-table) .table-filter-row input,
.data-table:not(.presence-stamps-table):not(#reports-table) .table-filter-row select,
.data-table:not(.presence-stamps-table):not(#reports-table) .table-search {
  min-height: 38px;
  min-width: 0;
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr {
  background: transparent;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr > td {
  padding: 13px 12px;
  border-top: 1px solid #e8eef7;
  border-bottom: 1px solid #e8eef7;
  background: #fff;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr:nth-child(even) > td {
  background: #f8fbff;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr > td:first-child {
  border-left: 1px solid #e8eef7;
  border-radius: 14px 0 0 14px;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr > td:last-child {
  border-right: 1px solid #e8eef7;
  border-radius: 0 14px 14px 0;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr:hover > td {
  border-color: #dbeafe;
  background: #f1f6ff;
}

.data-table:not(.presence-stamps-table):not(#reports-table) tbody tr > td:first-child {
  box-shadow: inset 3px 0 #dbe3ee;
}

.devexpress-grid-host {
  width: 100%;
}

.devexpress-grid-host .dx-datagrid {
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  font-family: inherit;
}

.devexpress-grid-host .dx-datagrid-headers {
  background: #f8fafc;
}

.devexpress-grid-host .dx-toolbar {
  padding: 8px;
}

.devexpress-grid-host .dx-datagrid-search-panel {
  min-width: 220px;
}

.status-pill,
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.success,
.chip.success {
  background: var(--success-soft);
  color: var(--success);
}

.status-pill.warning,
.chip.warning {
  background: var(--warning-soft);
  color: #b45309;
}

.status-pill.info,
.chip.info {
  background: #eaf2ff;
  color: #1d4ed8;
}

.status-pill.danger,
.chip.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.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;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(220, 38, 38, .32);
  border-radius: 999px;
  background: #fff;
  color: var(--danger);
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  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: 146px;
  min-width: 146px;
  max-width: 146px;
}

#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;
  width: 25px;
  height: 25px;
  border: 1px solid rgba(245, 158, 11, .34);
  border-radius: 999px;
  background: #fff7ed;
  color: #b45309;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  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;
  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 {
  color: #334155;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.nethub-blazor-grid .dxbl-grid-filter-row input,
.nethub-blazor-grid .dxbl-grid-filter-row .dxbl-text-edit {
  border-radius: 10px;
}

.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;
}

.login-divider {
  margin: 18px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.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;
}

.m365-login-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.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,
  .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);
  }

  .metric-grid,
  .dashboard-grid,
  .admin-grid,
  .expense-notes-grid,
  .expense-summary-grid,
  .expense-approval-filters,
  .settings-form-shell,
  .settings-form-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,
  .settings-actions {
    justify-content: flex-start;
  }

  .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;
  }

  .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;
}

.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-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-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8fbff;
}

.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: 180px;
  height: 180px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  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-method-grid {
  display: grid;
  gap: 14px;
}

.two-factor-method-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .06);
}

.selectable-method-card {
  cursor: pointer;
}

.selectable-method-card input {
  width: 18px;
  height: 18px;
}

.selectable-method-card.is-selected {
  border-color: #2563eb;
  box-shadow: 0 14px 34px rgba(37, 99, 235, .12);
}

.selectable-method-card.is-disabled {
  opacity: .58;
  cursor: not-allowed;
}

.two-factor-method-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.two-factor-method-title strong {
  font-size: 1.05rem;
  color: var(--ink);
}

.two-factor-email-hint {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

.two-factor-send-email-form {
  margin: 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 {
  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;
}

.two-factor-setup-page {
  max-width: 760px;
}

.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-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-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(310px, 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-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

.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: Inter, "Segoe UI", Roboto, Arial, sans-serif;
  -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);
  border: 1px solid var(--mh-border);
  border-radius: 18px;
  background: var(--mh-surface);
  color: var(--mh-primary-strong);
  font-size: 30px;
  font-weight: 750;
  line-height: 1;
  box-shadow: var(--mh-shadow-soft);
}

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;
}
