:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f5f7fa;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  background: #f5f7fa;
}

.menu-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  display: none;
  background: #ffffff;
  color: #14213d;
  border: 1px solid #e2e8f0;
}

a {
  color: inherit;
  text-decoration: none;
}

.sidebar {
  height: 100vh;
  max-height: 100vh;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #111827;
  color: #f8fafc;
  border-right: 1px solid #273244;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: #34d399;
  color: #052e1b;
  font-weight: 900;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #9ca3af;
  font-size: 13px;
}

.nav {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  padding-right: 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.nav-item,
.logout {
  padding: 11px 12px;
  border-radius: 8px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 750;
}

.nav-item.active,
.nav-item:hover,
.logout:hover {
  background: #2563eb;
  color: #ffffff;
}

.logout {
  flex-shrink: 0;
  margin-top: 16px;
}

.shell {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.notify {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #ef4444;
}

.search-box {
  min-width: 260px;
  position: relative;
  margin: 0;
}

.search-box input {
  padding-right: 34px;
}

.search-box span {
  position: absolute;
  right: 11px;
  top: 50%;
  color: #64748b;
  transform: translateY(-50%);
}

.grow {
  min-width: 0;
  flex: 1;
}

.eyebrow {
  margin: 0 0 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  letter-spacing: 0;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
}

h2 {
  font-size: 18px;
}

.user-pill {
  max-width: 320px;
  min-height: 40px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #d8e0e8;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 750;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.login-card {
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.metric {
  min-height: 94px;
  padding: 18px;
  display: grid;
  align-content: space-between;
}

.metric.blue {
  border-left: 4px solid #2563eb;
}

.metric.green {
  border-left: 4px solid #16a34a;
}

.metric.amber {
  border-left: 4px solid #f59e0b;
}

.metric.red {
  border-left: 4px solid #ef4444;
}

.metric span {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.metric strong {
  font-size: 28px;
  line-height: 1;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 18px;
  align-items: start;
}

.workspace.single-column {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.wide {
  min-width: 0;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-header {
  min-height: 72px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #e7edf3;
}

.detail-panel {
  margin-top: 18px;
}

.table {
  display: grid;
}

.table-row {
  min-height: 62px;
  display: grid;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid #edf2f7;
  color: #334155;
  font-size: 14px;
}

.table-row:last-child {
  border-bottom: 0;
}

.table-head {
  min-height: 42px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.companies-grid {
  grid-template-columns: 1.35fr 1.1fr 110px 100px 70px;
}

.employee-grid {
  grid-template-columns: 1.3fr 150px 130px 280px;
}

.points-grid {
  grid-template-columns: 1.5fr 140px 120px 140px 120px;
}

.recent-grid {
  grid-template-columns: 1.2fr 1fr 100px;
}

.subscription-grid {
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
}

.subscriptions-page-grid {
  grid-template-columns: 1.4fr 1fr 120px 130px 160px 120px;
}

.schedule-page-grid {
  grid-template-columns: 1fr 2.2fr 100px 90px 90px;
}

.schedule-assignment-grid {
  grid-template-columns: 1.2fr 0.8fr 1fr 2fr 100px;
}

.users-grid {
  grid-template-columns: 1.4fr 1fr 1fr 100px;
}

.support-grid {
  grid-template-columns: 110px 1.5fr 1fr 110px 140px;
}

.employees-page-grid {
  grid-template-columns: 1.5fr 90px 1fr 1fr 100px 130px 70px;
}

.units-page-grid {
  grid-template-columns: 1.25fr 1.2fr 1.5fr 120px 170px;
}

.mirror-grid {
  grid-template-columns: 80px repeat(6, 1fr);
}

.report-grid {
  grid-template-columns: 1.4fr 120px 100px 120px 120px;
}

.report-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.report-form button {
  margin-top: 0;
}

.secondary-action {
  border: 1px solid #cfd8e3;
  background: #ffffff;
  color: #2563eb;
}

.secondary-action:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.table-row strong,
.table-row small,
.summary-grid strong {
  display: block;
}

.table-row small {
  margin-top: 3px;
  color: #718096;
  font-size: 12px;
}

.table-link:hover,
.table-link.selected {
  background: #edf7f3;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.row-actions form {
  margin: 0;
}

.row-actions a,
.row-actions button {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid #dbe4ef;
  background: #ffffff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 850;
}

.row-actions button:hover,
.row-actions a:hover {
  background: #eff6ff;
}

.badge,
.status {
  border-radius: 999px;
  padding: 5px 9px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 850;
}

.badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.badge.red,
.badge.danger {
  background: #fee2e2;
  color: #991b1b;
}

.status.inactive {
  background: #f1f5f9;
  color: #475569;
}

.form-panel {
  padding: 0 18px 18px;
}

.form-panel .panel-header {
  margin: 0 -18px 16px;
}

label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.weekday-field {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.weekday-field legend {
  margin-bottom: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.weekday-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.weekday-options label {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  cursor: pointer;
}

.weekday-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.weekday-options label:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.week-schedule-field {
  border: 0;
  padding: 0;
  margin: 0 0 12px;
}

.week-schedule-field legend {
  margin-bottom: 8px;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.week-schedule-head,
.week-schedule-row {
  display: grid;
  grid-template-columns: 82px repeat(4, minmax(96px, 1fr));
  gap: 8px;
  align-items: center;
}

.week-schedule-head {
  margin-bottom: 6px;
  color: #718096;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.week-schedule-row {
  margin-bottom: 8px;
}

.week-schedule-row input {
  min-height: 36px;
}

.day-toggle {
  margin: 0;
}

.day-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-toggle span {
  min-height: 36px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #64748b;
}

.day-toggle:has(input:checked) span {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid #cfd8e3;
  border-radius: 8px;
  padding: 0 11px;
  background: #ffffff;
  color: #172033;
  font: inherit;
}

input:focus,
select:focus {
  border-color: #0f766e;
  outline: 3px solid rgba(15, 118, 110, 0.14);
}

button {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #2563eb;
  color: #ffffff;
  font-weight: 850;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

.danger {
  border: 1px solid #fecaca;
  background: #ffffff;
  color: #ef4444;
}

.danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

.primary-link {
  min-height: 40px;
  border: 0;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 850;
}

.icon-button {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #475569;
  font-size: 22px;
  line-height: 1;
}

.icon-button:hover {
  background: #f8fafc;
  color: #14213d;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.48);
}

.modal.is-open {
  display: grid;
}

.modal-dialog {
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
}

.modal-card {
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.form-panel button {
  width: 100%;
  margin-top: 4px;
}

.inline-form {
  display: grid;
  grid-template-columns: 1fr 1fr 72px;
  gap: 8px;
}

.inline-form input,
.inline-form button {
  min-height: 34px;
  font-size: 12px;
}

.divider {
  height: 1px;
  margin: 16px 0;
  background: #e7edf3;
}

.point-form {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1.4fr 140px 120px 180px 130px;
  gap: 10px;
  border-bottom: 1px solid #e7edf3;
  background: #fbfcfe;
}

.empty {
  padding: 22px 18px;
  color: #64748b;
}

.toolbar,
.filters {
  margin-bottom: 18px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.avatar {
  width: 34px;
  height: 34px;
  margin-right: 8px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.line-chart,
.bar-chart,
.stack-chart {
  height: 230px;
  padding: 18px;
  display: flex;
  align-items: end;
  gap: 12px;
}

.line-chart span,
.bar-chart span {
  flex: 1;
  min-width: 12px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #2563eb, #93c5fd);
}

.stack-chart span {
  flex: 1;
  height: 70%;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(180deg, #16a34a 0 52%, #f59e0b 52% 78%, #ef4444 78%);
}

.donut {
  width: 172px;
  height: 172px;
  margin: 26px auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#2563eb 0 31%, #16a34a 31% 80%, #f59e0b 80%);
  position: relative;
}

.donut::after {
  content: "";
  width: 110px;
  height: 110px;
  position: absolute;
  border-radius: 50%;
  background: #ffffff;
}

.donut strong,
.donut span {
  z-index: 1;
}

.donut strong {
  font-size: 28px;
}

.donut span {
  margin-top: 44px;
  color: #64748b;
  font-size: 12px;
}

.donut.company {
  background: conic-gradient(#2563eb 0 40%, #16a34a 40% 68%, #f59e0b 68% 86%, #cbd5e1 86%);
}

.legend,
.summary-list,
.alert-list,
.timeline,
.permission-grid,
.approval-list,
.unit-grid {
  padding: 16px 18px;
  display: grid;
  gap: 10px;
}

.legend {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.summary-list span,
.alert-list span,
.permission-grid span,
.timeline span,
.approval-list article,
.unit-grid span {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
}

.summary-list span {
  display: flex;
  justify-content: space-between;
}

.timeline span {
  display: grid;
  gap: 4px;
  border-left: 3px solid #2563eb;
}

.timeline small {
  color: #64748b;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.plan-card {
  padding: 22px;
}

.plan-card h2 {
  margin-bottom: 14px;
}

.plan-card strong {
  display: block;
  font-size: 32px;
  margin-bottom: 18px;
}

.plan-card ul {
  min-height: 130px;
  padding-left: 18px;
  color: #475569;
  line-height: 1.8;
}

.plan-card.green {
  border-color: #16a34a;
}

.detail-shell {
  margin-top: 18px;
}

.company-hero {
  min-height: 96px;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.company-title,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.settings-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.schedule-grid {
  padding: 18px;
  display: grid;
  grid-template-columns: 180px repeat(7, minmax(90px, 1fr));
  gap: 8px;
  overflow-x: auto;
}

.schedule-grid span {
  min-height: 42px;
  padding: 10px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 750;
}

.schedule-name {
  justify-content: start;
  background: #ffffff;
}

.work {
  background: #dcfce7;
  color: #166534;
}

.off {
  background: #fee2e2;
  color: #991b1b;
}

.approval-list article {
  display: grid;
  grid-template-columns: 1fr 2fr 90px 90px;
  align-items: center;
  gap: 10px;
}

.inline-action {
  margin: 0;
}

.inline-action button {
  min-height: 40px;
}

.unit-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.unit-grid b {
  display: block;
  margin-bottom: 8px;
}

.green {
  color: #16a34a;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: #edf2f7;
}

.summary-grid span {
  min-height: 82px;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 6px;
  background: #ffffff;
  color: #334155;
}

.summary-grid strong {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
}

.login-screen {
  display: block;
  background: linear-gradient(120deg, #102a43, #0f766e);
}

.login-wrap {
  min-height: 100vh;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: center;
  gap: 40px;
}

.login-copy {
  color: #ffffff;
}

.login-copy .eyebrow {
  color: #bbf7d0;
}

.login-copy h1 {
  max-width: 680px;
  margin-top: 18px;
  font-size: 44px;
}

.login-copy p:last-child {
  max-width: 560px;
  color: #dbeafe;
  font-size: 17px;
  line-height: 1.55;
}

.login-card {
  padding: 24px;
}

.alert {
  padding: 12px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b;
  font-size: 13px;
  font-weight: 750;
}

.hint {
  display: block;
  margin-top: 12px;
  color: #64748b;
  font-size: 12px;
}

@media (max-width: 1100px) {
  .metrics,
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace,
  .login-wrap {
    grid-template-columns: 1fr;
  }

  .point-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Final reference-aligned interface */
:root {
  --ui-bg: #f5f8fc;
  --ui-sidebar: #0a1933;
  --ui-sidebar-deep: #0c213f;
  --ui-primary: #0f5bf5;
  --ui-primary-hover: #084bd3;
  --ui-text: #0c1830;
  --ui-muted: #5d6f89;
  --ui-border: #e1e8f2;
  --ui-shadow: 0 8px 28px rgba(24, 43, 77, 0.06);
}

html {
  background: var(--ui-bg);
}

body {
  min-width: 320px;
  grid-template-columns: 248px minmax(0, 1fr);
  color: var(--ui-text);
  background: var(--ui-bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 248px;
  height: 100vh;
  max-height: 100vh;
  padding: 30px 20px 20px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--ui-sidebar), var(--ui-sidebar-deep));
  border: 0;
  box-shadow: none;
}

.brand {
  min-height: 58px;
  margin: 0 8px 42px;
  padding: 0;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.brand-mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(145deg, #34d7b1, #10bf87);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 191, 135, 0.2);
}

.brand strong {
  max-width: 142px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
}

.brand span {
  margin-top: 3px;
  color: #a9b7cb;
  font-size: 13px;
}

.nav {
  gap: 5px;
  padding-right: 0;
}

.nav-item,
.logout {
  min-height: 45px;
  padding: 0 15px;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  color: #c8d3e3;
  font-size: 13px;
  font-weight: 700;
}

.nav-item svg,
.logout svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #9fb0c8;
}

.nav-item:hover,
.logout:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: none;
}

.nav-item.active {
  background: linear-gradient(135deg, #1769ef, #078ddf);
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(10, 101, 232, 0.3);
}

.nav-item.active svg {
  color: #ffffff;
}

.logout {
  flex-shrink: 0;
  margin-top: 14px;
}

.shell {
  width: 100%;
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 36px 46px;
}

.topbar {
  min-height: 82px;
  margin: 0 0 24px;
  padding: 0 2px;
  align-items: flex-start;
  border: 0;
}

.topbar > div:nth-child(2) {
  min-width: 280px;
}

.topbar .eyebrow {
  margin-bottom: 7px;
  color: #1154dc;
  font-size: 11px;
  font-weight: 850;
}

.topbar h1 {
  margin: 0;
  color: var(--ui-text);
  font-size: 31px;
  font-weight: 850;
  line-height: 1.1;
}

.page-subtitle {
  margin: 8px 0 0;
  color: var(--ui-muted);
  font-size: 13px;
}

.top-actions {
  min-width: min(660px, 54vw);
  padding: 8px 0 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 48px minmax(240px, auto);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.search-box {
  min-width: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

.search-box > svg {
  position: static;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #8292aa;
  transform: none;
}

.search-box input {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

.search-box input:focus {
  border: 0;
  box-shadow: none;
  outline: 0;
}

.search-box kbd {
  color: #8a98ad;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}

.notify {
  position: relative;
  width: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: #ffffff;
  color: #263750;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

.notify::after {
  display: none;
}

.notify svg {
  width: 19px;
  height: 19px;
}

.notify span {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ef3340;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

.user-pill {
  min-height: 48px;
  padding: 0 15px;
  gap: 10px;
  border: 1px solid var(--ui-border);
  border-radius: 8px;
  background: #ffffff;
  color: #15233a;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

.user-pill > span:not(.avatar) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-pill > svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: #76869c;
}

.avatar {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  background: #e9f0ff;
  color: #1458dc;
}

.panel,
.metric,
.login-card,
.toolbar,
.filters {
  border: 1px solid var(--ui-border);
  border-radius: 9px;
  background: #ffffff;
  box-shadow: var(--ui-shadow);
}

.panel:hover,
.metric:hover {
  box-shadow: var(--ui-shadow);
  transform: none;
}

.panel-header {
  min-height: 68px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--ui-border);
}

.panel-header h2 {
  font-size: 16px;
  font-weight: 800;
}

.metrics {
  gap: 14px;
  margin-bottom: 18px;
}

.metric {
  min-height: 108px;
  padding: 19px 20px;
  border-left: 1px solid var(--ui-border);
}

.metric::before,
.metric::after {
  display: none;
}

.metric > span:not(.metric-icon) {
  color: #5c6d86;
  font-size: 11px;
  font-weight: 750;
  text-transform: none;
}

.metric strong {
  margin-top: 6px;
  color: var(--ui-text);
  font-size: 27px;
  line-height: 1;
}

.metric small {
  margin-top: 7px;
  color: #687a94;
  font-size: 11px;
}

.metric-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1765eb;
}

.metric-icon svg {
  width: 18px;
  height: 18px;
}

.metric.green .metric-icon { background: #e4f8ef; color: #11a765; }
.metric.amber .metric-icon { background: #fff3dc; color: #f19a12; }
.metric.red .metric-icon { background: #ffe9eb; color: #ed3545; }

button,
.primary-link {
  min-height: 40px;
  padding: 0 16px;
  gap: 7px;
  border: 1px solid var(--ui-primary);
  border-radius: 7px;
  background: var(--ui-primary);
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(15, 91, 245, 0.2);
  font-size: 13px;
  font-weight: 750;
}

button:hover,
.primary-link:hover {
  border-color: var(--ui-primary-hover);
  background: var(--ui-primary-hover);
  box-shadow: 0 8px 18px rgba(15, 91, 245, 0.24);
  transform: none;
}

button svg,
.primary-link svg {
  width: 17px;
  height: 17px;
}

input,
select,
textarea {
  min-height: 42px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #ffffff;
}

input:focus,
select:focus,
textarea:focus {
  border-color: #72a0fb;
  outline: 3px solid rgba(15, 91, 245, 0.1);
}

.toolbar,
.filters {
  margin-bottom: 18px;
  padding: 13px;
}

.table-head {
  background: #f8fafd;
  color: #667893;
}

.table-row {
  border-bottom-color: #e9eef5;
  color: #35465f;
}

.table-row:not(.table-head):hover {
  background: #fafcff;
}

.badge {
  width: fit-content;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
}

.badge.ok { background: #ddf7e9; color: #079654; }
.badge.warn { background: #fff0d4; color: #d77b00; }
.badge.danger { background: #ffe4e7; color: #de2638; }

.modal {
  z-index: 100;
  background: rgba(8, 22, 44, 0.58);
  backdrop-filter: blur(5px);
}

.modal-card {
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(8, 22, 44, 0.28);
}

.modal-card .icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  border-color: #e0e7f0;
  background: #ffffff;
  color: #53647c;
  box-shadow: none;
}

/* Schedule workspace mirrors the supplied reference */
.schedule-workspace {
  overflow: hidden;
}

.schedule-tabs {
  min-height: 65px;
  padding: 0 13px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ui-border);
}

.tab-list {
  height: 65px;
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.tab-button {
  position: relative;
  min-width: 106px;
  min-height: 65px;
  padding: 0 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #51627b;
  box-shadow: none;
  font-size: 14px;
}

.tab-button:hover {
  border: 0;
  background: transparent;
  color: var(--ui-primary);
  box-shadow: none;
}

.tab-button.is-active {
  color: var(--ui-primary);
}

.tab-button.is-active::after {
  content: "";
  position: absolute;
  right: 5px;
  bottom: -1px;
  left: 5px;
  height: 2px;
  background: var(--ui-primary);
}

.schedule-tabs .primary-link {
  display: inline-flex;
  align-items: center;
}

.schedule-content[hidden] {
  display: none;
}

.schedule-metrics {
  padding: 20px 18px 16px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.schedule-stat {
  min-height: 104px;
  padding: 17px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
}

.schedule-stat-icon {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e9f0ff;
  color: #1262f3;
}

.schedule-stat-icon svg {
  width: 23px;
  height: 23px;
}

.schedule-stat.green { border-color: #dbeee5; background: #fbfefc; }
.schedule-stat.green .schedule-stat-icon { background: #e1f8ec; color: #12af68; }
.schedule-stat.amber { border-color: #f3e7d1; background: #fffefa; }
.schedule-stat.amber .schedule-stat-icon { background: #fff2da; color: #f29a0c; }
.schedule-stat.violet { border-color: #eae2f7; background: #fefcff; }
.schedule-stat.violet .schedule-stat-icon { background: #f1e8ff; color: #7d28ed; }

.schedule-stat > span:last-child {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.schedule-stat small {
  color: #5d6d86;
  font-size: 11px;
  font-weight: 750;
}

.schedule-stat strong {
  color: #0b1830;
  font-size: 24px;
  line-height: 1.1;
}

.schedule-stat em {
  overflow: hidden;
  color: #5f708a;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-toolbar {
  margin: 0 18px 14px;
  min-height: 62px;
  padding: 11px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e4ebf3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 3px 14px rgba(20, 40, 75, 0.035);
}

.schedule-search {
  width: min(370px, 100%);
  height: 40px;
  margin: 0 auto 0 0;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce5ef;
  border-radius: 7px;
}

.schedule-search svg {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  color: #8292a8;
}

.schedule-search input {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  outline: 0;
}

.schedule-search input:focus {
  outline: 0;
}

.schedule-status {
  min-width: 168px;
  height: 40px;
  margin: 0;
  padding-left: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #dce5ef;
  border-radius: 7px;
  color: #22334c;
  font-size: 12px;
  font-weight: 750;
}

.schedule-status select {
  min-width: 0;
  min-height: 38px;
  padding: 0 28px 0 2px;
  border: 0;
  outline: 0;
  font-weight: 750;
}

.schedule-filter-button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid #dce5ef;
  background: #ffffff;
  color: #273850;
  box-shadow: none;
}

.schedule-filter-button:hover {
  border-color: #c6d5e8;
  background: #f8fafd;
  color: #15253e;
  box-shadow: none;
}

.schedule-list {
  padding: 0 18px;
  display: grid;
  gap: 0;
}

.schedule-card {
  min-height: 94px;
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 58px minmax(260px, 1.45fr) minmax(130px, 0.72fr) minmax(110px, 0.55fr) minmax(110px, 0.55fr) 54px;
  align-items: center;
  gap: 16px;
  border: 1px solid #e5ebf3;
  border-bottom: 0;
  background: #ffffff;
}

.schedule-card:first-of-type {
  border-radius: 8px 8px 0 0;
}

.schedule-card:last-of-type {
  border-bottom: 1px solid #e5ebf3;
  border-radius: 0 0 8px 8px;
}

.schedule-card:only-of-type {
  border-bottom: 1px solid #e5ebf3;
  border-radius: 8px;
}

.schedule-card:hover {
  position: relative;
  z-index: 1;
  background: #fbfdff;
  border-color: #cfdced;
}

.schedule-card[hidden] {
  display: none;
}

.schedule-card-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1162f3;
}

.schedule-card-icon svg {
  width: 22px;
  height: 22px;
}

.schedule-card-icon.tone-1 { background: #f0e8ff; color: #7e2de9; }
.schedule-card-icon.tone-2 { background: #fff0df; color: #ef7f0a; }
.schedule-card-icon.tone-3 { background: #e2f8ed; color: #0eaa63; }

.schedule-card-main,
.schedule-card-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.schedule-card-main strong {
  color: #101d34;
  font-size: 14px;
  font-weight: 800;
}

.schedule-card-main span {
  overflow: hidden;
  color: #40536e;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-card-meta small {
  color: #657791;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.schedule-card-meta strong {
  color: #152139;
  font-size: 12px;
  font-weight: 800;
}

.schedule-card-actions {
  display: flex;
  justify-content: flex-end;
}

.schedule-card-actions button {
  width: 40px;
  min-height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #ffffff;
  color: #233752;
  box-shadow: none;
}

.schedule-card-actions button:hover {
  border-color: #b9c9dc;
  background: #f8fafd;
  box-shadow: none;
}

.schedule-footer {
  min-height: 70px;
  padding: 16px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #586b85;
  font-size: 12px;
}

.schedule-page-size {
  min-height: 36px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dce5ef;
  border-radius: 7px;
  background: #ffffff;
}

.schedule-page-size svg {
  width: 14px;
  height: 14px;
}

.assignment-heading {
  min-height: 92px;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--ui-border);
}

.assignment-heading > span {
  color: #60718a;
  font-size: 12px;
  font-weight: 750;
}

.assignment-table {
  padding: 16px 18px 22px;
}

.assignment-table .table-row:not(.table-head) {
  min-height: 70px;
  border: 1px solid #e7edf4;
  border-bottom: 0;
}

.assignment-table .table-row:not(.table-head):last-child {
  border-bottom: 1px solid #e7edf4;
}

.assignment-table .table-row > span:first-child {
  display: flex;
  align-items: center;
  gap: 9px;
}

.assignment-table .row-actions button {
  display: inline-flex;
  align-items: center;
  border-color: #d7e3f5;
  background: #f4f8ff;
  color: #1458dc;
  box-shadow: none;
}

@media (max-width: 1320px) {
  .top-actions {
    min-width: 500px;
    grid-template-columns: minmax(190px, 1fr) 48px minmax(200px, auto);
  }

  .schedule-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-list {
    overflow-x: auto;
  }

  .schedule-card {
    min-width: 920px;
  }
}

@media (max-width: 1100px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    width: 248px;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .menu-button {
    flex: 0 0 42px;
    width: 42px;
    min-height: 42px;
    padding: 0;
    display: grid;
    place-items: center;
    border-color: var(--ui-border);
    background: #ffffff;
    color: #20324b;
    box-shadow: none;
  }

  .shell {
    padding: 24px;
  }

  .topbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }

  .top-actions {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    grid-template-columns: minmax(220px, 1fr) 48px minmax(220px, auto);
  }

  .toolbar,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .shell {
    padding: 18px 14px 30px;
  }

  .topbar {
    margin-bottom: 20px;
  }

  .topbar h1 {
    font-size: 25px;
  }

  .page-subtitle {
    font-size: 12px;
  }

  .top-actions {
    grid-template-columns: 1fr 48px;
  }

  .user-pill {
    grid-column: 1 / -1;
  }

  .schedule-tabs {
    min-height: 112px;
    padding: 0 12px 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .tab-list,
  .tab-button {
    min-height: 58px;
    height: 58px;
  }

  .schedule-tabs .primary-link {
    width: 100%;
    justify-content: center;
  }

  .schedule-metrics {
    grid-template-columns: 1fr;
  }

  .schedule-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .schedule-search,
  .schedule-status,
  .schedule-filter-button {
    width: 100%;
  }

  .schedule-status select {
    flex: 1;
  }

  .schedule-footer,
  .assignment-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }
}

/* Compact list pattern shared by every data listing */
body.mode-system .panel > .table,
body.mode-company .panel > .table,
body.mode-system .workspace.single-column .panel > .table,
body.mode-company .workspace.single-column .panel > .table {
  width: 100%;
  padding: 0;
  display: block;
  overflow-x: auto;
  background: #ffffff;
  scrollbar-width: thin;
  scrollbar-color: #c9d5e5 transparent;
}

body.mode-system .table-row,
body.mode-company .table-row,
body.mode-system .workspace.single-column .panel > .table .table-row:not(.table-head),
body.mode-company .workspace.single-column .panel > .table .table-row:not(.table-head) {
  width: 100%;
  min-width: 860px;
  min-height: 54px;
  padding: 9px 16px;
  gap: 14px;
  align-items: center;
  border: 0;
  border-bottom: 1px solid #e9eef5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  color: #35465f;
  font-size: 12px;
  transform: none;
}

body.mode-system .table-row:last-child,
body.mode-company .table-row:last-child,
body.mode-system .workspace.single-column .panel > .table .table-row:not(.table-head):last-child,
body.mode-company .workspace.single-column .panel > .table .table-row:not(.table-head):last-child {
  border-bottom: 0;
}

body.mode-system .table-row:not(.table-head):hover,
body.mode-company .table-row:not(.table-head):hover,
body.mode-system .workspace.single-column .panel > .table .table-row:not(.table-head):hover,
body.mode-company .workspace.single-column .panel > .table .table-row:not(.table-head):hover {
  border-color: #e9eef5;
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

body.mode-system .table-head,
body.mode-company .table-head,
body.mode-system .workspace.single-column .panel > .table .table-head,
body.mode-company .workspace.single-column .panel > .table .table-head {
  min-height: 40px;
  padding-block: 8px;
  display: grid;
  border-bottom: 1px solid #dfe7f1;
  background: #f7f9fc;
  color: #62738c;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

body.mode-system .table-row > span,
body.mode-company .table-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mode-system .table-row b,
body.mode-system .table-row strong,
body.mode-company .table-row b,
body.mode-company .table-row strong {
  color: #15233a;
  font-size: 12px;
  font-weight: 750;
}

body.mode-system .table-row small,
body.mode-company .table-row small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: #718199;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mode-system .employees-page-grid > span::before,
body.mode-system .units-page-grid > span::before,
body.mode-system .schedule-page-grid > span::before,
body.mode-system .schedule-assignment-grid > span::before,
body.mode-company .employees-page-grid > span::before,
body.mode-company .units-page-grid > span::before,
body.mode-company .schedule-page-grid > span::before,
body.mode-company .schedule-assignment-grid > span::before {
  display: none;
  content: none;
}

body.mode-system .companies-grid,
body.mode-company .companies-grid {
  min-width: 900px;
  grid-template-columns: minmax(220px, 1.45fr) minmax(190px, 1.1fr) 100px 100px 92px;
}

body.mode-system .employees-page-grid,
body.mode-company .employees-page-grid {
  min-width: 980px;
  grid-template-columns: minmax(230px, 1.55fr) 76px minmax(135px, 0.9fr) minmax(130px, 0.9fr) 90px 110px 78px;
}

body.mode-system .units-page-grid,
body.mode-company .units-page-grid {
  min-width: 900px;
  grid-template-columns: minmax(190px, 1.1fr) minmax(200px, 1.1fr) minmax(240px, 1.4fr) 105px 145px;
}

body.mode-system .subscription-grid,
body.mode-company .subscription-grid {
  min-width: 760px;
  grid-template-columns: minmax(190px, 1.3fr) minmax(160px, 1fr) minmax(150px, 1fr) 110px;
}

body.mode-system .subscriptions-page-grid,
body.mode-company .subscriptions-page-grid {
  min-width: 920px;
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) 105px 115px 135px 105px;
}

body.mode-system .users-grid,
body.mode-company .users-grid {
  min-width: 760px;
  grid-template-columns: minmax(240px, 1.5fr) minmax(170px, 1fr) 130px 100px;
}

body.mode-system .support-grid,
body.mode-company .support-grid {
  min-width: 820px;
  grid-template-columns: 80px minmax(220px, 1.5fr) minmax(170px, 1fr) 100px 115px;
}

body.mode-system .points-grid,
body.mode-company .points-grid,
body.mode-system .report-grid,
body.mode-company .report-grid {
  min-width: 720px;
  grid-template-columns: minmax(220px, 1.5fr) 110px 90px 110px 110px;
}

body.mode-system .mirror-grid,
body.mode-company .mirror-grid {
  min-width: 900px;
  grid-template-columns: 90px minmax(190px, 1.3fr) 80px 110px 110px minmax(160px, 1fr) 70px;
}

body.mode-system .schedule-assignment-grid,
body.mode-company .schedule-assignment-grid {
  min-width: 900px;
  grid-template-columns: minmax(210px, 1.2fr) minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(230px, 1.35fr) 100px;
}

body.mode-system .employees-page-grid > span,
body.mode-system .units-page-grid > span,
body.mode-system .schedule-assignment-grid > span,
body.mode-company .employees-page-grid > span,
body.mode-company .units-page-grid > span,
body.mode-company .schedule-assignment-grid > span {
  display: block;
}

body.mode-company .employees-page-grid > span:first-child {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 9px;
}

body.mode-company .employees-page-grid > span:first-child .avatar {
  width: 30px;
  height: 30px;
  grid-row: 1 / 3;
}

body.mode-company .employees-page-grid > span:first-child b,
body.mode-company .employees-page-grid > span:first-child small {
  grid-column: 2;
}

body.mode-system .row-actions,
body.mode-company .row-actions,
body.mode-system .workspace.single-column .panel > .table .row-actions,
body.mode-company .workspace.single-column .panel > .table .row-actions {
  min-height: 32px;
  padding: 0;
  display: flex;
  align-self: center;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  border: 0;
}

body.mode-system .row-actions button,
body.mode-system .row-actions a,
body.mode-company .row-actions button,
body.mode-company .row-actions a,
body.mode-system .workspace.single-column .panel > .table .row-actions button,
body.mode-system .workspace.single-column .panel > .table .row-actions a,
body.mode-company .workspace.single-column .panel > .table .row-actions button,
body.mode-company .workspace.single-column .panel > .table .row-actions a {
  min-width: 0;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid #d8e3f2;
  border-radius: 6px;
  background: #f4f8ff;
  color: #1458dc;
  box-shadow: none;
  font-size: 10px;
}

body.mode-system .panel-header,
body.mode-company .panel-header {
  min-height: 58px;
  padding: 14px 16px;
}

body.mode-system .panel-header h2,
body.mode-company .panel-header h2 {
  font-size: 14px;
}

body.mode-system .panel-header .eyebrow,
body.mode-company .panel-header .eyebrow {
  margin-bottom: 3px;
  font-size: 9px;
}

body.mode-system .timeline,
body.mode-system .summary-list,
body.mode-system .alert-list,
body.mode-company .timeline,
body.mode-company .summary-list,
body.mode-company .alert-list {
  padding: 10px 12px;
  gap: 6px;
}

body.mode-system .timeline span,
body.mode-system .summary-list span,
body.mode-system .alert-list span,
body.mode-company .timeline span,
body.mode-company .summary-list span,
body.mode-company .alert-list span {
  min-height: 44px;
  padding: 9px 11px;
}

body.mode-company .schedule-card {
  min-height: 66px;
  padding: 8px 14px;
  grid-template-columns: 42px minmax(230px, 1.45fr) minmax(120px, 0.72fr) 100px 100px 44px;
  gap: 12px;
}

body.mode-company .schedule-card-icon {
  width: 36px;
  height: 36px;
}

body.mode-company .schedule-card-icon svg {
  width: 17px;
  height: 17px;
}

body.mode-company .schedule-card-actions button {
  width: 34px;
  min-height: 30px;
}

@media (max-width: 920px) {
  body.mode-system .employees-page-grid,
  body.mode-company .employees-page-grid {
    grid-template-columns: minmax(230px, 1.55fr) 76px minmax(135px, 0.9fr) minmax(130px, 0.9fr) 90px 110px 78px;
  }

  body.mode-system .units-page-grid,
  body.mode-company .units-page-grid {
    grid-template-columns: minmax(190px, 1.1fr) minmax(200px, 1.1fr) minmax(240px, 1.4fr) 105px 145px;
  }

  body.mode-system .schedule-assignment-grid,
  body.mode-company .schedule-assignment-grid {
    grid-template-columns: minmax(210px, 1.2fr) minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(230px, 1.35fr) 100px;
  }

  body.mode-system .row-actions,
  body.mode-company .row-actions,
  body.mode-system .workspace.single-column .panel > .table .row-actions,
  body.mode-company .workspace.single-column .panel > .table .row-actions {
    grid-column: auto;
    padding: 0;
    border: 0;
  }
}

/* Header and records must use the exact same column tracks */
body.mode-system .table-row,
body.mode-company .table-row,
body.mode-system .workspace.single-column .panel > .table .table-row,
body.mode-company .workspace.single-column .panel > .table .table-row {
  display: grid;
  align-items: center;
  column-gap: 14px;
}

body.mode-system .table-row.companies-grid,
body.mode-company .table-row.companies-grid {
  min-width: 900px;
  grid-template-columns: minmax(220px, 1.45fr) minmax(190px, 1.1fr) 100px 100px 92px;
}

body.mode-system .table-row.employees-page-grid,
body.mode-company .table-row.employees-page-grid {
  min-width: 980px;
  grid-template-columns: minmax(230px, 1.55fr) 76px minmax(135px, 0.9fr) minmax(130px, 0.9fr) 90px 110px 78px;
}

body.mode-system .table-row.units-page-grid,
body.mode-company .table-row.units-page-grid {
  min-width: 900px;
  grid-template-columns: minmax(190px, 1.1fr) minmax(200px, 1.1fr) minmax(240px, 1.4fr) 105px 145px;
}

body.mode-system .table-row.subscription-grid,
body.mode-company .table-row.subscription-grid {
  min-width: 760px;
  grid-template-columns: minmax(190px, 1.3fr) minmax(160px, 1fr) minmax(150px, 1fr) 110px;
}

body.mode-system .table-row.subscriptions-page-grid,
body.mode-company .table-row.subscriptions-page-grid {
  min-width: 920px;
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) 105px 115px 135px 105px;
}

body.mode-system .table-row.users-grid,
body.mode-company .table-row.users-grid {
  min-width: 760px;
  grid-template-columns: minmax(240px, 1.5fr) minmax(170px, 1fr) 130px 100px;
}

body.mode-system .table-row.support-grid,
body.mode-company .table-row.support-grid {
  min-width: 820px;
  grid-template-columns: 80px minmax(220px, 1.5fr) minmax(170px, 1fr) 100px 115px;
}

body.mode-system .table-row.points-grid,
body.mode-company .table-row.points-grid,
body.mode-system .table-row.report-grid,
body.mode-company .table-row.report-grid {
  min-width: 720px;
  grid-template-columns: minmax(220px, 1.5fr) 110px 90px 110px 110px;
}

body.mode-system .table-row.mirror-grid,
body.mode-company .table-row.mirror-grid {
  min-width: 900px;
  grid-template-columns: 90px minmax(190px, 1.3fr) 80px 110px 110px minmax(160px, 1fr) 70px;
}

body.mode-system .table-row.schedule-assignment-grid,
body.mode-company .table-row.schedule-assignment-grid {
  min-width: 900px;
  grid-template-columns: minmax(210px, 1.2fr) minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(230px, 1.35fr) 100px;
}

body.mode-system .table-row > span,
body.mode-company .table-row > span {
  align-self: center;
}

body.mode-system .table-row .row-actions,
body.mode-company .table-row .row-actions {
  justify-self: stretch;
  justify-content: flex-end;
}

/* List and action polish */
.toolbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(170px, 1fr)) minmax(260px, 1.2fr) auto;
  align-items: end;
}

.toolbar select,
.toolbar input {
  min-width: 0;
}

.toolbar .primary-link,
.toolbar button {
  width: auto;
  min-width: max-content;
  white-space: nowrap;
}

.panel > .table {
  width: 100%;
  overflow-x: auto;
}

.table-row {
  min-width: 980px;
  gap: 16px;
  padding: 14px 20px;
}

.table-row > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.table-head {
  min-height: 46px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.table-head > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.employees-page-grid {
  min-width: 1120px;
  grid-template-columns: minmax(260px, 1.7fr) 90px minmax(170px, 1fr) minmax(150px, 1fr) 110px 130px 120px;
}

.companies-grid {
  min-width: 980px;
  grid-template-columns: minmax(260px, 1.5fr) minmax(220px, 1fr) 110px 110px 140px;
}

.units-page-grid {
  min-width: 1040px;
  grid-template-columns: minmax(230px, 1.2fr) minmax(220px, 1fr) minmax(260px, 1.4fr) 130px 180px;
}

.schedule-page-grid {
  min-width: 980px;
  grid-template-columns: minmax(220px, 1fr) minmax(360px, 2fr) 110px 100px 130px;
}

.schedule-assignment-grid {
  min-width: 1040px;
  grid-template-columns: minmax(240px, 1.2fr) minmax(160px, 0.8fr) minmax(190px, 1fr) minmax(280px, 1.4fr) 130px;
}

.points-grid,
.report-grid,
.mirror-grid,
.subscription-grid,
.subscriptions-page-grid,
.users-grid,
.support-grid {
  min-width: 900px;
}

.table-row .avatar {
  vertical-align: middle;
}

.table-row b {
  color: #0f172a;
}

.row-actions {
  justify-content: flex-end;
}

.row-actions a,
.row-actions button {
  width: auto;
  min-width: 76px;
  white-space: nowrap;
}

.row-actions form {
  display: inline-flex;
}

.form-panel .row-actions button,
.row-actions button {
  margin-top: 0;
}

@media (max-width: 1100px) {
  .toolbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar .primary-link,
  .toolbar button {
    width: 100%;
  }
}

@media (max-width: 680px) {
  .toolbar {
    grid-template-columns: 1fr;
  }
}

/* Horizontal card lists */
.workspace.single-column .panel > .table {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow: visible;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}

.workspace.single-column .panel > .table .table-head {
  display: none;
}

.workspace.single-column .panel > .table .table-row:not(.table-head) {
  min-width: 0;
  min-height: 88px;
  padding: 18px;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.workspace.single-column .panel > .table .table-row:not(.table-head):hover {
  border-color: rgba(37, 99, 235, 0.28);
  background: #ffffff;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
  transform: translateY(-2px);
}

.employees-page-grid {
  grid-template-columns: minmax(260px, 1.8fr) 92px minmax(170px, 1fr) minmax(150px, 1fr) 110px 130px 112px;
}

.units-page-grid {
  grid-template-columns: minmax(230px, 1.3fr) minmax(210px, 1fr) minmax(260px, 1.4fr) 120px 170px;
}

.schedule-page-grid,
.schedule-assignment-grid {
  align-items: center;
}

.employees-page-grid > span,
.units-page-grid > span,
.schedule-page-grid > span,
.schedule-assignment-grid > span {
  display: grid;
  align-content: center;
  gap: 4px;
}

.employees-page-grid > span::before,
.units-page-grid > span::before,
.schedule-page-grid > span::before,
.schedule-assignment-grid > span::before {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.employees-page-grid > span:nth-child(1)::before {
  content: "Funcionário";
}

.employees-page-grid > span:nth-child(2)::before {
  content: "Matrícula";
}

.employees-page-grid > span:nth-child(3)::before {
  content: "Unidade";
}

.employees-page-grid > span:nth-child(4)::before {
  content: "Cargo";
}

.employees-page-grid > span:nth-child(5)::before {
  content: "Jornada";
}

.employees-page-grid > span:nth-child(6)::before {
  content: "Status";
}

.units-page-grid > span:nth-child(1)::before {
  content: "Unidade";
}

.units-page-grid > span:nth-child(2)::before {
  content: "Contato";
}

.units-page-grid > span:nth-child(3)::before {
  content: "Endereço";
}

.units-page-grid > span:nth-child(4)::before {
  content: "Status";
}

.schedule-page-grid > span:nth-child(1)::before,
.schedule-assignment-grid > span:nth-child(1)::before {
  content: "Nome";
}

.schedule-page-grid > span:nth-child(2)::before {
  content: "Configuração";
}

.schedule-page-grid > span:nth-child(3)::before {
  content: "Funcionários";
}

.schedule-page-grid > span:nth-child(4)::before {
  content: "Status";
}

.schedule-assignment-grid > span:nth-child(2)::before {
  content: "Cargo";
}

.schedule-assignment-grid > span:nth-child(3)::before {
  content: "Jornada";
}

.schedule-assignment-grid > span:nth-child(4)::before {
  content: "Resumo";
}

.workspace.single-column .panel > .table .row-actions {
  align-self: stretch;
  justify-content: flex-end;
  padding-left: 14px;
  border-left: 1px solid #edf2f7;
}

.workspace.single-column .panel > .table .row-actions::before {
  content: "";
}

.workspace.single-column .panel > .table .row-actions button,
.workspace.single-column .panel > .table .row-actions a {
  min-width: 88px;
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.workspace.single-column .panel > .table .row-actions button:hover,
.workspace.single-column .panel > .table .row-actions a:hover {
  background: #dbeafe;
}

@media (max-width: 920px) {
  .employees-page-grid,
  .units-page-grid,
  .schedule-page-grid,
  .schedule-assignment-grid {
    grid-template-columns: 1fr 1fr;
  }

  .workspace.single-column .panel > .table .row-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    padding: 12px 0 0;
    border-left: 0;
    border-top: 1px solid #edf2f7;
  }
}

/* Click-style admin shell */
:root {
  --click-bg: #f3f7fc;
  --click-sidebar: #071733;
  --click-sidebar-2: #0b1f42;
  --click-text: #071426;
  --click-muted: #53657f;
  --click-line: #dfe8f3;
  --click-blue: #1458f5;
  --click-green: #19b878;
}

body {
  grid-template-columns: 292px minmax(0, 1fr);
  background: var(--click-bg);
  color: var(--click-text);
}

.sidebar {
  width: 292px;
  padding: 32px 24px 24px;
  background:
    radial-gradient(circle at 18% 8%, rgba(20, 88, 245, 0.28), transparent 14rem),
    linear-gradient(180deg, var(--click-sidebar), var(--click-sidebar-2));
  box-shadow: none;
}

.brand {
  min-height: 74px;
  margin-bottom: 48px;
  padding: 0;
  border: 0;
  background: transparent;
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, #34d399, #16c7a1);
}

.brand strong {
  color: #ffffff;
  font-size: 18px;
  line-height: 1.25;
}

.brand span {
  margin-top: 4px;
  color: #98a9c3;
  font-size: 14px;
}

.nav {
  gap: 12px;
}

.nav-item,
.logout {
  min-height: 52px;
  padding: 0 18px;
  border-radius: 10px;
  color: #c9d5e8;
  font-size: 15px;
  font-weight: 800;
}

.nav-item:hover,
.logout:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: transparent;
  transform: none;
}

.nav-item.active {
  background: linear-gradient(135deg, #1463ff, #0ea5e9);
  box-shadow: 0 16px 34px rgba(20, 99, 255, 0.30);
}

.logout {
  margin-top: 22px;
}

.shell {
  padding: 36px 42px 52px;
}

.topbar {
  min-height: 88px;
  margin-bottom: 28px;
  padding: 0;
  align-items: flex-start;
  border-bottom: 0;
}

.topbar h1 {
  margin-top: 6px;
  font-size: 34px;
  line-height: 1.08;
  font-weight: 900;
}

.page-subtitle {
  margin: 10px 0 0;
  color: var(--click-muted);
  font-size: 15px;
  line-height: 1.45;
}

.top-actions {
  min-width: min(760px, 54vw);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) 54px minmax(250px, auto);
  gap: 14px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-box {
  min-width: 0;
}

.search-box input,
.notify,
.user-pill {
  min-height: 54px;
  border: 1px solid var(--click-line);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.notify {
  width: 54px;
}

.user-pill {
  padding: 0 18px;
}

.toolbar,
.filters {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid var(--click-line);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

.panel,
.metric,
.login-card {
  border: 1px solid var(--click-line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 10px 32px rgba(15, 23, 42, 0.055);
}

.panel-header {
  min-height: 78px;
  padding: 22px 24px;
}

.metric {
  min-height: 122px;
  padding: 22px 24px;
}

.metric strong {
  font-size: 30px;
}

.workspace.single-column .panel > .table {
  padding: 18px;
  gap: 14px;
  background: #ffffff;
}

.workspace.single-column .panel > .table .table-row:not(.table-head) {
  min-height: 104px;
  padding: 20px 22px;
  border-color: #e3ebf5;
  border-radius: 15px;
  background:
    linear-gradient(90deg, rgba(20, 88, 245, 0.025), transparent 32%),
    #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.workspace.single-column .panel > .table .table-row:not(.table-head):hover {
  border-color: rgba(20, 88, 245, 0.32);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.09);
}

.employees-page-grid {
  grid-template-columns: minmax(300px, 1.8fr) 110px minmax(200px, 1.1fr) minmax(180px, 1fr) 130px 150px 132px;
}

.units-page-grid {
  grid-template-columns: minmax(280px, 1.45fr) minmax(230px, 1.05fr) minmax(300px, 1.45fr) 140px 190px;
}

.schedule-page-grid {
  grid-template-columns: minmax(300px, 1.4fr) minmax(380px, 1.8fr) 130px 130px 150px;
}

.schedule-assignment-grid {
  grid-template-columns: minmax(270px, 1.2fr) minmax(180px, 0.8fr) minmax(220px, 1fr) minmax(320px, 1.4fr) 150px;
}

.table-row strong,
.table-row b {
  color: #0b1730;
  font-size: 15px;
}

.table-row small {
  color: #667895;
  font-size: 12px;
}

.employees-page-grid > span::before,
.units-page-grid > span::before,
.schedule-page-grid > span::before,
.schedule-assignment-grid > span::before {
  margin-bottom: 2px;
  color: #60728d;
  font-size: 10px;
}

.workspace.single-column .panel > .table .row-actions {
  padding-left: 18px;
  border-left-color: #e8eef6;
}

.workspace.single-column .panel > .table .row-actions button,
.workspace.single-column .panel > .table .row-actions a {
  min-width: 104px;
  min-height: 40px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  background: #f5f8ff;
  color: #1458f5;
}

.workspace.single-column .panel > .table .row-actions button:hover,
.workspace.single-column .panel > .table .row-actions a:hover {
  background: #eaf1ff;
}

.badge {
  width: fit-content;
  border: 0;
  padding: 7px 12px;
  border-radius: 999px;
}

button,
.primary-link {
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #1458f5, #0b63ff);
}

button:hover,
.primary-link:hover {
  background: linear-gradient(135deg, #0f4bda, #0a58e7);
}

input,
select {
  min-height: 44px;
  border-color: var(--click-line);
}

@media (max-width: 1180px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
  }

  .topbar,
  .top-actions {
    min-width: 0;
    grid-template-columns: 1fr;
  }
}

/* Visual geofence selector */
.geofence-picker {
  display: grid;
  gap: 12px;
}

.geofence-controls {
  padding: 14px;
  display: grid;
  gap: 12px;
  border: 1px solid #dbe7f5;
  border-radius: 14px;
  background: #f8fbff;
}

.geofence-controls[hidden] {
  display: none;
}

.geofence-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.geofence-heading > div {
  display: grid;
  gap: 3px;
}

.geofence-heading strong {
  color: #0b1730;
  font-size: 14px;
}

.geofence-heading small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.form-panel .geofence-location-button {
  width: auto;
  min-width: max-content;
  margin: 0;
  gap: 7px;
  border: 1px solid #cfe0ff;
  background: #ffffff;
  color: #1458f5;
}

.form-panel .geofence-location-button:hover {
  background: #eaf1ff;
}

.form-panel .geofence-location-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.geofence-location-button svg {
  width: 16px;
  height: 16px;
}

.geofence-map {
  width: 100%;
  height: 320px;
  overflow: hidden;
  border: 1px solid #cfdced;
  border-radius: 12px;
  background: #e8eef6;
  z-index: 0;
}

.geofence-map:focus-within {
  border-color: #1458f5;
  box-shadow: 0 0 0 4px rgba(20, 88, 245, 0.12);
}

.geofence-radius label {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px 16px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.geofence-radius output {
  min-width: 72px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8f0ff;
  color: #1458f5;
  text-align: center;
  font-weight: 900;
}

.geofence-radius input[type="range"] {
  min-height: 24px;
  grid-column: 1 / -1;
  padding: 0;
  accent-color: #1458f5;
  box-shadow: none;
}

.geofence-feedback {
  margin: 0;
  min-height: 20px;
  color: #166534;
  font-size: 12px;
  font-weight: 750;
}

.geofence-feedback.is-error {
  color: #b91c1c;
}

.mirror-address {
  color: #334155;
  line-height: 1.4;
}

.mirror-address.is-loading,
.mirror-address.is-muted {
  color: #8492a6;
  font-size: 12px;
}

.mirror-address.is-loading::before {
  content: "";
  width: 7px;
  height: 7px;
  margin-right: 7px;
  display: inline-block;
  border-radius: 999px;
  background: #1458f5;
  animation: address-pulse 1s ease-in-out infinite alternate;
}

@keyframes address-pulse {
  to { opacity: 0.25; }
}

.leaflet-control-attribution {
  font-size: 10px;
}

@media (max-width: 620px) {
  .geofence-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .form-panel .geofence-location-button {
    width: 100%;
  }

  .geofence-map {
    height: 280px;
  }
}

/* Client dashboard matching the visual reference */
.client-dashboard-filters {
  grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.8fr) minmax(160px, 0.7fr) minmax(160px, 0.7fr) 156px;
  margin-bottom: 24px;
  padding: 18px;
}

.client-dashboard-filters label {
  color: #475a75;
  font-size: 12px;
}

.client-dashboard-metrics {
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.client-dashboard-metrics .metric {
  min-height: 124px;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(20, 88, 245, 0.035), transparent 46%),
    #ffffff;
}

.client-dashboard-metrics .metric.green {
  background:
    linear-gradient(135deg, rgba(25, 184, 120, 0.08), transparent 48%),
    #ffffff;
}

.client-dashboard-metrics .metric.amber {
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.10), transparent 48%),
    #ffffff;
}

.client-dashboard-metrics .metric.red {
  background:
    linear-gradient(135deg, rgba(244, 63, 94, 0.08), transparent 48%),
    #ffffff;
}

.client-dashboard-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  gap: 22px;
}

.client-dashboard-grid .panel {
  border-radius: 16px;
  background: #ffffff;
}

.client-dashboard-grid .panel.wide {
  grid-row: span 2;
}

.client-dashboard-grid .panel-header {
  min-height: 82px;
  padding: 24px 26px;
}

.client-dashboard-grid .panel-header small,
.client-dashboard-grid .panel-header a {
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
}

.client-dashboard-grid .chart-bars {
  min-height: 330px;
  padding: 28px 26px 20px;
  border-top: 1px solid #edf2f7;
}

.client-dashboard-grid .chart-column {
  min-width: 54px;
  height: 276px;
}

.client-dashboard-grid .chart-column i {
  background: linear-gradient(180deg, #1463ff, #74a8ff);
}

.client-dashboard-grid .compact-bars {
  min-height: 268px;
  padding-inline: 20px;
}

.client-dashboard-grid .compact-bars .chart-column {
  min-width: 34px;
  height: 220px;
}

.client-dashboard-grid .summary-list,
.client-dashboard-grid .timeline {
  display: grid;
  gap: 12px;
}

.client-dashboard-grid .summary-list span,
.client-dashboard-grid .timeline span {
  min-height: 58px;
  padding: 14px 16px;
  border: 1px solid #e3ebf5;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(20, 88, 245, 0.035), transparent 42%),
    #ffffff;
}

.client-dashboard-grid .summary-list b,
.client-dashboard-grid .timeline b {
  color: #0b1730;
}

@media (max-width: 1320px) {
  .client-dashboard-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .client-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .client-dashboard-grid .panel.wide {
    grid-row: auto;
  }
}

@media (max-width: 860px) {
  .client-dashboard-filters,
  .client-dashboard-metrics {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  body {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
  }

  .shell {
    padding: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .metrics,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .table {
    overflow-x: auto;
  }

  .companies-grid,
  .employee-grid,
  .points-grid {
    min-width: 780px;
  }

  .point-form {
    grid-template-columns: 1fr;
  }

  .login-copy h1 {
    font-size: 32px;
  }
}

/* SaaS visual refresh */
:root {
  --bg: #f3f6fb;
  --surface: rgba(255, 255, 255, 0.92);
  --ink: #0f172a;
  --muted: #64748b;
  --line-soft: #edf2f7;
  --blue: #2563eb;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 14px 36px rgba(15, 23, 42, 0.09);
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 10%, rgba(37, 99, 235, 0.12), transparent 24rem),
    radial-gradient(circle at 92% 6%, rgba(16, 185, 129, 0.10), transparent 22rem),
    linear-gradient(135deg, #f8fafc 0%, var(--bg) 46%, #eef4fb 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(7, 20, 42, 0.98), rgba(15, 23, 42, 0.96));
  border-right: 1px solid rgba(148, 163, 184, 0.16);
  box-shadow: 18px 0 50px rgba(15, 23, 42, 0.16);
}

.brand {
  padding: 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
}

.brand-mark {
  background: linear-gradient(135deg, #34d399, #22c55e);
  color: #052e16;
  box-shadow: 0 12px 28px rgba(52, 211, 153, 0.28);
}

.nav {
  min-height: 0;
  overflow-y: auto;
  gap: 6px;
}

.nav-item,
.logout {
  min-height: 43px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item:hover,
.logout:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(148, 163, 184, 0.18);
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(37, 99, 235, 0.26);
}

.shell {
  padding: 30px clamp(20px, 3vw, 40px);
}

.topbar {
  min-height: 76px;
  margin-bottom: 24px;
  padding: 0 0 18px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.24);
}

.topbar h1 {
  color: #0f172a;
  font-size: clamp(26px, 2.3vw, 36px);
  font-weight: 850;
}

.eyebrow {
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

.top-actions {
  padding: 8px;
  border: 1px solid rgba(219, 228, 238, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.search-box input,
input,
select {
  border-color: #d7e0ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.02);
}

input:focus,
select:focus {
  border-color: #2563eb;
  outline: 4px solid rgba(37, 99, 235, 0.12);
}

.notify {
  position: relative;
  border-radius: 10px;
  background: #fff7ed;
  color: #ea580c;
}

.notify::after {
  content: "";
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff7ed;
  border-radius: 999px;
  background: #ef4444;
}

.user-pill {
  border-color: #e2e8f0;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
}

.avatar {
  background: linear-gradient(135deg, #dbeafe, #ccfbf1);
  color: #1e40af;
}

.metrics {
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 16px;
}

.metric,
.panel,
.login-card {
  border-color: rgba(219, 228, 238, 0.94);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric {
  position: relative;
  min-height: 118px;
  padding: 20px;
  overflow: hidden;
  border-left: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.metric:hover,
.panel:hover {
  box-shadow: var(--shadow-md);
}

.metric:hover {
  transform: translateY(-2px);
}

.metric::before {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(37, 99, 235, 0.11);
}

.metric::after {
  content: "";
  position: absolute;
  right: 31px;
  top: 31px;
  width: 16px;
  height: 16px;
  border: 4px solid #2563eb;
  border-radius: 999px;
}

.metric.green::before {
  background: rgba(5, 150, 105, 0.12);
}

.metric.green::after {
  border-color: #059669;
}

.metric.amber::before {
  background: rgba(217, 119, 6, 0.12);
}

.metric.amber::after {
  border-color: #d97706;
}

.metric.red::before {
  background: rgba(220, 38, 38, 0.10);
}

.metric.red::after {
  border-color: #dc2626;
}

.metric span {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.metric strong {
  color: #0f172a;
  font-size: 32px;
  font-weight: 900;
}

.metric small {
  color: #64748b;
}

.dashboard-grid,
.workspace {
  gap: 20px;
}

.panel {
  transition: box-shadow 0.18s ease;
}

.panel-header {
  min-height: 76px;
  padding: 20px;
  border-bottom-color: rgba(226, 232, 240, 0.82);
}

.panel-header h2 {
  color: #0f172a;
  font-weight: 850;
}

.table {
  overflow-x: auto;
}

.table-row {
  border-bottom-color: var(--line-soft);
  color: #334155;
}

.table-row:not(.table-head):hover {
  background: rgba(248, 250, 252, 0.95);
}

.table-head {
  background: #f8fafc;
  color: #64748b;
}

.line-chart,
.bar-chart,
.stack-chart {
  padding: 22px;
  gap: 10px;
  background:
    linear-gradient(to top, rgba(226, 232, 240, 0.7) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(239, 246, 255, 0.72), rgba(255, 255, 255, 0));
}

.line-chart span,
.bar-chart span {
  min-width: 16px;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.donut {
  width: 188px;
  height: 188px;
  margin: 24px auto 14px;
  border: 28px solid #2563eb;
  border-left-color: #14b8a6;
  border-bottom-color: #22c55e;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px #e2e8f0, 0 18px 38px rgba(15, 23, 42, 0.08);
}

.legend,
.alert-list,
.timeline,
.summary-list {
  padding: 18px 20px;
}

.alert-list span,
.timeline span,
.summary-list span {
  border-radius: 12px;
  border-color: #e2e8f0;
  background: #ffffff;
}

.toolbar,
.filters {
  border-color: rgba(219, 228, 238, 0.94);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-sm);
}

button,
.primary-link {
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.20);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

button:hover,
.primary-link:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
  transform: translateY(-1px);
}

.row-actions button,
.row-actions a,
.secondary-action,
.icon-button,
.danger {
  box-shadow: none;
}

.row-actions button:hover,
.row-actions a:hover,
.secondary-action:hover,
.icon-button:hover,
.danger:hover {
  transform: none;
}

.badge {
  border: 1px solid rgba(22, 101, 52, 0.12);
}

.modal {
  background: rgba(15, 23, 42, 0.58);
  backdrop-filter: blur(8px);
}

.modal-card {
  border-radius: 16px;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.32);
}

.plans-grid {
  gap: 18px;
}

.plan-card {
  padding: 22px;
}

.plan-card strong {
  color: #0f172a;
  font-size: 30px;
}

.company-hero {
  padding: 22px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.10), rgba(20, 184, 166, 0.09)),
    #ffffff;
}

.dashboard-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) minmax(150px, 0.7fr) 150px;
}

.dashboard-filters label {
  margin: 0;
}

.chart-bars {
  min-height: 260px;
  padding: 22px 20px 16px;
  display: flex;
  align-items: end;
  gap: 10px;
  overflow-x: auto;
  background:
    linear-gradient(to top, rgba(226, 232, 240, 0.7) 1px, transparent 1px) 0 0 / 100% 25%,
    linear-gradient(180deg, rgba(239, 246, 255, 0.76), rgba(255, 255, 255, 0));
}

.chart-column {
  min-width: 44px;
  height: 220px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 24px;
  align-items: end;
  justify-items: center;
  gap: 8px;
}

.chart-column i {
  width: 100%;
  min-height: 8px;
  display: block;
  border-radius: 999px 999px 8px 8px;
  background: linear-gradient(180deg, #2563eb, #60a5fa);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.18);
}

.chart-column small {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.compact-bars {
  min-height: 250px;
  gap: 6px;
}

.compact-bars .chart-column {
  min-width: 32px;
}

.chart-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid #edf2f7;
}

.chart-summary span {
  padding: 14px 18px;
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.chart-summary b {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 16px;
}

.strong-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 0;
}

.strong-list li {
  min-height: 42px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  color: #334155;
  font-weight: 750;
}

.strong-list b {
  color: #0f172a;
  font-size: 16px;
}

@media (max-width: 1100px) {
  .sidebar {
    position: relative;
    height: auto;
    max-height: none;
    overflow: visible;
  }

  .nav {
    overflow: visible;
  }

  .topbar,
  .top-actions,
  .toolbar,
  .filters {
    align-items: stretch;
    flex-direction: column;
  }

  .search-box {
    min-width: 100%;
  }

  .dashboard-filters,
  .chart-summary {
    grid-template-columns: 1fr;
  }
}

/* Unified visual system for every SaaS and company screen */
html,
body {
  background: var(--ui-bg, #f5f8fc);
}

body.mode-system,
body.mode-company {
  grid-template-columns: 248px minmax(0, 1fr);
  color: var(--ui-text, #0c1830);
  background: #f5f8fc;
}

body.mode-system .sidebar,
body.mode-company .sidebar {
  position: sticky;
  top: 0;
  width: 248px;
  height: 100vh;
  max-height: 100vh;
  padding: 30px 20px 20px;
  overflow: hidden;
  border: 0;
  background: linear-gradient(145deg, #091831, #0b2140);
  box-shadow: none;
}

body.mode-system .brand,
body.mode-company .brand {
  min-height: 58px;
  margin: 0 8px 42px;
  padding: 0;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
}

body.mode-system .brand-mark,
body.mode-company .brand-mark {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: linear-gradient(145deg, #34d7b1, #10bf87);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(16, 191, 135, 0.2);
}

body.mode-system .brand strong,
body.mode-company .brand strong {
  max-width: 142px;
  overflow: hidden;
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
}

body.mode-system .brand span,
body.mode-company .brand span {
  margin-top: 3px;
  color: #a9b7cb;
  font-size: 13px;
}

body.mode-system .nav,
body.mode-company .nav {
  gap: 5px;
}

body.mode-system .nav-item,
body.mode-system .logout,
body.mode-company .nav-item,
body.mode-company .logout {
  min-height: 45px;
  padding: 0 15px;
  gap: 12px;
  border: 0;
  border-radius: 7px;
  color: #c8d3e3;
  font-size: 13px;
  font-weight: 700;
  box-shadow: none;
}

body.mode-system .nav-item svg,
body.mode-system .logout svg,
body.mode-company .nav-item svg,
body.mode-company .logout svg {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  color: #9fb0c8;
}

body.mode-system .nav-item:hover,
body.mode-system .logout:hover,
body.mode-company .nav-item:hover,
body.mode-company .logout:hover {
  border: 0;
  background: rgba(255, 255, 255, 0.07);
  color: #ffffff;
  transform: none;
}

body.mode-system .nav-item.active,
body.mode-company .nav-item.active {
  background: linear-gradient(135deg, #1769ef, #078ddf);
  color: #ffffff;
  box-shadow: 0 9px 22px rgba(10, 101, 232, 0.3);
}

body.mode-system .nav-item.active svg,
body.mode-company .nav-item.active svg {
  color: #ffffff;
}

body.mode-system .logout,
body.mode-company .logout {
  flex-shrink: 0;
  margin-top: 14px;
}

body.mode-system .shell,
body.mode-company .shell {
  width: 100%;
  max-width: 1600px;
  min-width: 0;
  margin: 0 auto;
  padding: 28px 36px 46px;
}

body.mode-system .topbar,
body.mode-company .topbar {
  min-height: 82px;
  margin: 0 0 24px;
  padding: 0 2px;
  align-items: flex-start;
  border: 0;
}

body.mode-system .topbar .eyebrow,
body.mode-company .topbar .eyebrow {
  margin-bottom: 7px;
  color: #1154dc;
  font-size: 11px;
  font-weight: 850;
}

body.mode-system .topbar h1,
body.mode-company .topbar h1 {
  margin: 0;
  color: #0c1830;
  font-size: 31px;
  font-weight: 850;
  line-height: 1.1;
}

body.mode-system .page-subtitle,
body.mode-company .page-subtitle {
  margin: 8px 0 0;
  color: #5d6f89;
  font-size: 13px;
}

body.mode-system .top-actions,
body.mode-company .top-actions {
  min-width: min(660px, 54vw);
  padding: 8px 0 0;
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 48px minmax(240px, auto);
  align-items: center;
  gap: 12px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

body.mode-system .search-box,
body.mode-company .search-box {
  min-width: 0;
  height: 48px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

body.mode-system .search-box > svg,
body.mode-company .search-box > svg {
  position: static;
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  color: #8292aa;
  transform: none;
}

body.mode-system .search-box input,
body.mode-company .search-box input {
  width: 100%;
  min-height: 0;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  outline: 0;
}

body.mode-system .search-box kbd,
body.mode-company .search-box kbd {
  color: #8a98ad;
  font: inherit;
  font-size: 11px;
  white-space: nowrap;
}

body.mode-system .notify,
body.mode-company .notify {
  position: relative;
  width: 48px;
  min-height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
  color: #263750;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

body.mode-system .notify::after,
body.mode-company .notify::after {
  display: none;
}

body.mode-system .notify span,
body.mode-company .notify span {
  position: absolute;
  top: 7px;
  right: 7px;
  min-width: 15px;
  height: 15px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #ef3340;
  color: #ffffff;
  font-size: 8px;
  font-weight: 900;
}

body.mode-system .user-pill,
body.mode-company .user-pill {
  min-height: 48px;
  padding: 0 15px;
  gap: 10px;
  border: 1px solid #e1e8f2;
  border-radius: 8px;
  background: #ffffff;
  color: #15233a;
  box-shadow: 0 4px 18px rgba(24, 43, 77, 0.04);
}

body.mode-system .user-pill > span:not(.avatar),
body.mode-company .user-pill > span:not(.avatar) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.mode-system .user-pill > svg,
body.mode-company .user-pill > svg {
  flex: 0 0 15px;
  width: 15px;
  height: 15px;
  margin-left: auto;
  color: #76869c;
}

body.mode-system .panel,
body.mode-system .metric,
body.mode-system .toolbar,
body.mode-system .filters,
body.mode-company .panel,
body.mode-company .metric,
body.mode-company .toolbar,
body.mode-company .filters {
  border: 1px solid #e1e8f2;
  border-radius: 9px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(24, 43, 77, 0.06);
}

body.mode-system .panel:hover,
body.mode-system .metric:hover,
body.mode-company .panel:hover,
body.mode-company .metric:hover {
  box-shadow: 0 8px 28px rgba(24, 43, 77, 0.06);
  transform: none;
}

body.mode-system .panel-header,
body.mode-company .panel-header {
  min-height: 68px;
  padding: 18px 22px;
  border-bottom: 1px solid #e1e8f2;
}

body.mode-system .metrics,
body.mode-company .metrics {
  gap: 14px;
  margin-bottom: 18px;
}

body.mode-system .metric,
body.mode-company .metric {
  min-height: 108px;
  padding: 19px 20px;
  border-left: 1px solid #e1e8f2;
}

body.mode-system .metric::before,
body.mode-system .metric::after,
body.mode-company .metric::before,
body.mode-company .metric::after {
  display: none;
}

body.mode-system .metric-icon,
body.mode-company .metric-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1765eb;
}

body.mode-system .metric.green .metric-icon,
body.mode-company .metric.green .metric-icon { background: #e4f8ef; color: #11a765; }
body.mode-system .metric.amber .metric-icon,
body.mode-company .metric.amber .metric-icon { background: #fff3dc; color: #f19a12; }
body.mode-system .metric.red .metric-icon,
body.mode-company .metric.red .metric-icon { background: #ffe9eb; color: #ed3545; }

body.mode-system button,
body.mode-system .primary-link,
body.mode-company button,
body.mode-company .primary-link {
  border-radius: 7px;
}

body.mode-system .primary-link,
body.mode-company .primary-link,
body.mode-system .form-panel > button,
body.mode-company .form-panel > button,
body.mode-system .form-panel form > button,
body.mode-company .form-panel form > button {
  border-color: #0f5bf5;
  background: #0f5bf5;
  color: #ffffff;
  box-shadow: 0 7px 16px rgba(15, 91, 245, 0.2);
}

body.mode-system .primary-link:hover,
body.mode-company .primary-link:hover {
  border-color: #084bd3;
  background: #084bd3;
  transform: none;
}

body.mode-system input,
body.mode-system select,
body.mode-system textarea,
body.mode-company input,
body.mode-company select,
body.mode-company textarea {
  min-height: 42px;
  border: 1px solid #dbe4ef;
  border-radius: 7px;
  background: #ffffff;
}

body.mode-system .toolbar,
body.mode-system .filters,
body.mode-company .toolbar,
body.mode-company .filters {
  margin-bottom: 18px;
  padding: 13px;
}

body.mode-system .table-head,
body.mode-company .table-head {
  background: #f8fafd;
  color: #667893;
}

body.mode-system .table-row,
body.mode-company .table-row {
  border-bottom-color: #e9eef5;
  color: #35465f;
}

body.mode-system .badge,
body.mode-company .badge {
  width: fit-content;
  padding: 5px 10px;
  border: 0;
  border-radius: 999px;
  font-size: 11px;
}

body.mode-system .badge.ok,
body.mode-company .badge.ok { background: #ddf7e9; color: #079654; }
body.mode-system .badge.warn,
body.mode-company .badge.warn { background: #fff0d4; color: #d77b00; }
body.mode-system .badge.danger,
body.mode-company .badge.danger { background: #ffe4e7; color: #de2638; }

body.mode-system .plans-grid,
body.mode-company .plans-grid,
body.mode-system .dashboard-grid,
body.mode-company .dashboard-grid,
body.mode-system .workspace,
body.mode-company .workspace {
  gap: 18px;
}

body.mode-system .plan-card,
body.mode-company .plan-card {
  border-radius: 9px;
  box-shadow: 0 8px 28px rgba(24, 43, 77, 0.06);
}

body.mode-system .summary-list span,
body.mode-system .timeline span,
body.mode-system .alert-list span,
body.mode-company .summary-list span,
body.mode-company .timeline span,
body.mode-company .alert-list span {
  border-color: #e4eaf2;
  border-radius: 7px;
  background: #ffffff;
}

body.mode-system .modal,
body.mode-company .modal {
  z-index: 100;
  background: rgba(8, 22, 44, 0.58);
  backdrop-filter: blur(5px);
}

body.mode-system .modal-card,
body.mode-company .modal-card {
  border: 1px solid #dfe7f1;
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(8, 22, 44, 0.28);
}

@media (max-width: 1100px) {
  body.mode-system,
  body.mode-company {
    grid-template-columns: 1fr;
  }

  body.mode-system .sidebar,
  body.mode-company .sidebar {
    position: fixed;
    width: 248px;
    height: 100vh;
    max-height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  body.mode-system.sidebar-open .sidebar,
  body.mode-company.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.mode-system .shell,
  body.mode-company .shell {
    padding: 24px;
  }

  body.mode-system .topbar,
  body.mode-company .topbar {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: start;
  }

  body.mode-system .top-actions,
  body.mode-company .top-actions {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
    grid-template-columns: minmax(220px, 1fr) 48px minmax(220px, auto);
  }
}

@media (max-width: 760px) {
  body.mode-system .shell,
  body.mode-company .shell {
    padding: 18px 14px 30px;
  }

  body.mode-system .topbar h1,
  body.mode-company .topbar h1 {
    font-size: 25px;
  }

  body.mode-system .top-actions,
  body.mode-company .top-actions {
    grid-template-columns: 1fr 48px;
  }

  body.mode-system .user-pill,
  body.mode-company .user-pill {
    grid-column: 1 / -1;
  }
}

/* Final list density authority */
body.mode-system .panel > .table,
body.mode-company .panel > .table,
body.mode-system .workspace.single-column .panel > .table,
body.mode-company .workspace.single-column .panel > .table {
  padding: 0;
  display: block;
  overflow-x: auto;
  background: #ffffff;
}

body.mode-system .table-head,
body.mode-company .table-head,
body.mode-system .workspace.single-column .panel > .table .table-head,
body.mode-company .workspace.single-column .panel > .table .table-head {
  min-height: 40px;
  padding: 8px 16px;
  display: grid;
  border-bottom: 1px solid #dfe7f1;
  background: #f7f9fc;
}

body.mode-system .table-row,
body.mode-company .table-row,
body.mode-system .workspace.single-column .panel > .table .table-row:not(.table-head),
body.mode-company .workspace.single-column .panel > .table .table-row:not(.table-head) {
  min-height: 54px;
  padding: 9px 16px;
  display: grid;
  align-items: center;
  column-gap: 14px;
  border: 0;
  border-bottom: 1px solid #e9eef5;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  transform: none;
}

body.mode-system .table-row:not(.table-head):hover,
body.mode-company .table-row:not(.table-head):hover,
body.mode-system .workspace.single-column .panel > .table .table-row:not(.table-head):hover,
body.mode-company .workspace.single-column .panel > .table .table-row:not(.table-head):hover {
  background: #f8fbff;
  box-shadow: none;
  transform: none;
}

body.mode-system .employees-page-grid > span::before,
body.mode-system .units-page-grid > span::before,
body.mode-system .schedule-assignment-grid > span::before,
body.mode-company .employees-page-grid > span::before,
body.mode-company .units-page-grid > span::before,
body.mode-company .schedule-assignment-grid > span::before {
  display: none;
  content: none;
}

body.mode-system .workspace.single-column .panel > .table .row-actions,
body.mode-company .workspace.single-column .panel > .table .row-actions {
  min-height: 32px;
  padding: 0;
  align-self: center;
  border: 0;
}

body.mode-system .panel-header,
body.mode-company .panel-header {
  min-height: 58px;
  padding: 14px 16px;
}

@media (max-width: 920px) {
  body.mode-system .employees-page-grid,
  body.mode-company .employees-page-grid {
    grid-template-columns: minmax(230px, 1.55fr) 76px minmax(135px, 0.9fr) minmax(130px, 0.9fr) 90px 110px 78px;
  }

  body.mode-system .units-page-grid,
  body.mode-company .units-page-grid {
    grid-template-columns: minmax(190px, 1.1fr) minmax(200px, 1.1fr) minmax(240px, 1.4fr) 105px 145px;
  }

  body.mode-system .schedule-assignment-grid,
  body.mode-company .schedule-assignment-grid {
    grid-template-columns: minmax(210px, 1.2fr) minmax(140px, 0.8fr) minmax(170px, 1fr) minmax(230px, 1.35fr) 100px;
  }
}

body.mode-company .table-row.adjustments-grid {
  min-width: 1060px;
  grid-template-columns: 32px minmax(180px, 1.1fr) 90px 96px 82px minmax(250px, 1.55fr) 100px 176px;
}

body.mode-company .table-row.excused-grid {
  min-width: 980px;
  grid-template-columns: minmax(210px, 1.35fr) 105px 95px 95px 105px 85px minmax(230px, 1.5fr);
}

body.mode-company .table-row.excused-report-grid {
  min-width: 780px;
  grid-template-columns: minmax(220px, 1.25fr) 110px 125px 100px minmax(280px, 1.65fr);
}

body.mode-company .client-dashboard-metrics {
  grid-template-columns: repeat(6, minmax(150px, 1fr));
}

body.mode-company .adjustment-actions {
  gap: 5px;
}

body.mode-company .adjustment-actions .approve-action,
body.mode-company .adjustment-actions .reject-action {
  width: 30px;
  min-width: 30px;
  padding: 0;
  display: grid;
  place-items: center;
}

body.mode-company .adjustment-actions .approve-action {
  border-color: #c9eedb;
  background: #e8f8f0;
  color: #078b51;
}

body.mode-company .adjustment-actions .reject-action {
  border-color: #f6ced3;
  background: #fff0f2;
  color: #d62f41;
}

.adjustment-detail {
  width: min(680px, calc(100vw - 28px));
  padding: 0;
}

.adjustment-detail-body {
  padding: 18px;
  display: grid;
  gap: 16px;
}

.adjustment-detail-body dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.adjustment-detail-body dl div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #e4eaf2;
  border-radius: 7px;
  background: #f9fbfd;
}

.adjustment-detail-body dt {
  margin-bottom: 4px;
  color: #697a92;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}

.adjustment-detail-body dd {
  margin: 0;
  color: #1b2a42;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.adjustment-detail-body h3 {
  margin: 0;
  color: #15233a;
  font-size: 12px;
}

.adjustment-items,
.adjustment-attachments {
  display: grid;
  gap: 7px;
}

.adjustment-items span,
.adjustment-attachments a {
  min-height: 42px;
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e3eaf3;
  border-radius: 7px;
  color: #30435f;
  font-size: 11px;
}

.adjustment-items small {
  color: #687a94;
}

.adjustment-attachments a {
  justify-content: flex-start;
  color: #1458dc;
}

.adjustment-attachments svg {
  width: 15px;
  height: 15px;
}

@media (max-width: 640px) {
  .adjustment-detail-body dl {
    grid-template-columns: 1fr;
  }
}

.bulk-list-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

body.mode-company .bulk-list-actions button {
  min-height: 34px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
  font-size: 11px;
}

body.mode-company .bulk-list-actions button:disabled {
  border-color: #dce4ee;
  background: #eef2f7;
  color: #8a98ab;
  cursor: not-allowed;
  opacity: 1;
}

.bulk-list-actions mark {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: inherit;
  font-size: 9px;
}

.selection-cell {
  display: grid;
  place-items: center;
  overflow: visible !important;
}

body.mode-company input[type="checkbox"][data-adjustment-select],
body.mode-company input[type="checkbox"][data-select-all-adjustments] {
  width: 15px;
  min-width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  padding: 0;
  accent-color: #0f5bf5;
  cursor: pointer;
  box-shadow: none;
}

body.mode-company input[type="checkbox"][data-select-all-adjustments]:disabled {
  cursor: not-allowed;
}

@media (max-width: 720px) {
  .bulk-list-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  body.mode-company .bulk-list-actions button {
    justify-content: center;
  }
}

.notification-layout {
  display: grid;
  grid-template-columns: minmax(280px, .8fr) minmax(420px, 1.2fr);
  gap: 18px;
  margin-bottom: 18px;
}

.notification-compose .form-panel,
.notification-rules-form {
  display: grid;
  gap: 14px;
}

.notification-rule-card {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 15px;
  border: 1px solid #e3eaf3;
  border-radius: 14px;
}

.notification-rule-card legend {
  padding: 0 7px;
  font-weight: 700;
}

.notification-rule-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.notification-rule-toggles label {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}

body.mode-company .notification-rule-toggles input[type="checkbox"] {
  width: 16px;
  min-width: 16px;
  height: 16px;
  min-height: 16px;
  margin: 0;
  accent-color: #0f5bf5;
}

.notification-history {
  display: grid;
}

.notification-history article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid #edf1f6;
}

.notification-history article:last-child {
  border-bottom: 0;
}

.notification-history p {
  margin: 5px 0;
  color: #526174;
}

@media (max-width: 980px) {
  .notification-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .notification-history article {
    align-items: flex-start;
    flex-direction: column;
  }
}
