/* OneCloud 360 — premium unification layer
   Loaded last. Deepens elevation, refines hierarchy, unifies every module. */

/* ── Shared icon language ──────────────────────────────────────────── */
.oc-icon {
  display: block;
  width: 1em;
  height: 1em;
  flex: 0 0 auto;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.nav-icon { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; font-size: 18px; }
.nav-chevron { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
.nav-group.expanded > .nav-group-button .nav-chevron .oc-icon { transform: rotate(90deg); }
.nav-group-button .nav-chevron .oc-icon { transition: transform var(--duration) var(--ease); }
.settings-tabs .settings-tab > span:first-child { display: grid; place-items: center; min-width: 20px; min-height: 20px; }
.settings-tabs .settings-tab > span:first-child .oc-icon { width: 19px; height: 19px; }
.business-metric-icon .oc-icon,
.finance-metric-icon .oc-icon,
.report-icon .oc-icon,
.metric-icon .oc-icon { width: 1em; height: 1em; }
.activity-mark .oc-icon { width: 14px; height: 14px; }
.search-icon, .calendar-icon { display: inline-flex; align-items: center; justify-content: center; }
.collapse-chevron { width: 18px; height: 18px; display: inline-grid; place-items: center; }
.sidebar.collapsed .sidebar-collapse::before { content: none; }
.sidebar.collapsed .collapse-chevron .oc-icon { transform: rotate(180deg); }
.mobile-menu .oc-icon { width: 20px; height: 20px; }
.notification-button > span .oc-icon { width: 19px; height: 19px; }
.new-button > span .oc-icon { width: 16px; height: 16px; }

/* Shared module workflow: identify the current area, show the next action,
   and keep section switching familiar across all business workspaces. */
.module-heading h1 {
  display: flex;
  align-items: center;
  gap: 11px;
}
.module-title-icon {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid color-mix(in srgb, var(--brand) 13%, var(--line));
  border-radius: 11px;
  background: linear-gradient(145deg, var(--surface), var(--brand-tint));
  color: var(--brand);
}
.module-title-icon .oc-icon { width: 20px; height: 20px; stroke-width: 1.85; }
.workflow-action-icon,
.quick-option-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  vertical-align: middle;
}
.workflow-action-icon .oc-icon,
.quick-option-icon .oc-icon { width: 15px; height: 15px; stroke-width: 1.9; }
.module-heading button,
.business-heading-actions button,
.crm-heading-actions button,
.finance-heading-actions button,
.project-quick-action { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.quick-option > i { display: inline-grid; place-items: center; }
.quick-option > i .oc-icon { width: 18px; height: 18px; }
.crm-overview-icon { display: inline-grid; place-items: center; }
.crm-overview-icon .oc-icon { width: 19px; height: 19px; stroke-width: 1.9; }
.invoice-brand-mark .oc-icon { width: 20px; height: 20px; }
.settings-icon-field > span .oc-icon { width: 17px; height: 17px; }
.module-page [role="tablist"] { display: flex; align-items: stretch; gap: 3px; overflow-x: auto; scrollbar-width: thin; }
.module-page [role="tab"] {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.module-page [role="tab"]:hover { color: var(--brand); background: var(--brand-tint); }
.module-page [role="tab"].active,
.module-page [role="tab"][aria-selected="true"] { border-bottom-color: var(--brand); color: var(--brand); font-weight: 700; }
.module-page [role="tab"]:focus-visible { outline: 2px solid var(--brand); outline-offset: -3px; border-radius: 6px; }
.business-metric-icon.violet { background: var(--brand-tint); color: var(--brand); }
.business-metric-icon.blue { background: var(--info-soft); color: var(--info-ink); }
.business-metric-icon.orange { background: var(--warning-soft); color: var(--warning-ink); }
.business-metric-icon.green { background: var(--success-soft); color: var(--success-ink); }
@media (max-width: 600px) {
  .module-title-icon { width: 32px; height: 32px; flex-basis: 32px; border-radius: 9px; }
  .module-title-icon .oc-icon { width: 18px; height: 18px; }
  .module-heading h1 { gap: 8px; }
}

/* ── Global polish ─────────────────────────────────────────────────── */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: var(--leading);
}

/* Subtle ambient depth on the app shell */
.app-shell {
  background:
    radial-gradient(ellipse 70% 40% at 0% 0%, rgba(0, 117, 143, 0.04) 0%, transparent 50%),
    var(--canvas);
}

.main-area,
.main-content,
.content-area {
  background: transparent;
}

/* ── Sidebar elevation ─────────────────────────────────────────────── */
.sidebar {
  background: linear-gradient(180deg 0% 100%);
  border-right: 1px solid var(--line);
  box-shadow:
    1px 0 0 rgba(12, 23, 28, 0.02),
    4px 0 24px rgba(12, 23, 28, 0.03);
}

/* Brand area breathing room */
.brand {
  height: 72px;
  padding: 0 20px;
}

/* ── Module headings ───────────────────────────────────────────────── */
.module-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 6px 0 28px;
}
.module-heading h1 {
  font-family: var(--display);
  font-size: 28px;
  font-weight: var(--font-weight-extrabold);
  letter-spacing: var(--tracking-tighter);
  margin: 0;
  color: var(--ink);
  line-height: var(--leading-tight);
}
.module-heading .eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 10.5px;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
}
.module-heading .subheading {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 5px;
  line-height: var(--leading-snug);
}

/* ── Toolbars & search ─────────────────────────────────────────────── */
.module-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.module-search {
  height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  max-width: 400px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--muted);
  box-shadow: var(--shadow-xs), var(--shadow-inner);
  transition:
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}
.module-search:focus-within {
  border-color: var(--brand-light);
  box-shadow: var(--focus), var(--shadow-sm);
}
.module-search span {
  font-size: 15px;
  opacity: 0.55;
}
.module-search input {
  border: 0;
  outline: 0;
  width: 100%;
  font-size: 13.5px;
  color: var(--ink);
  background: transparent;
}
.module-search input::placeholder {
  color: var(--muted-soft);
}

.filter-button {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow-xs);
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    color var(--duration) var(--ease);
}
.filter-button:hover {
  background: var(--brand-tint);
  border-color: color-mix(in srgb, var(--brand) 25%, var(--line));
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

.record-count {
  margin-left: auto;
  color: var(--muted-soft);
  font-size: 12.5px;
  font-weight: var(--font-weight-medium);
  letter-spacing: 0.01em;
}

/* ── Tables — refined data surfaces ────────────────────────────────── */
.module-table-panel {
  padding: 0;
  min-height: 280px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.module-table {
  min-width: 650px;
  width: 100%;
  border-collapse: collapse;
}
.module-table thead th {
  padding: 13px 18px;
  text-align: left;
  font-size: 10.5px;
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: linear-gradient(180deg, var(--brand-mist) 0%, var(--surface-sunken) 100%);
  border-bottom: 1px solid var(--line);
}
.module-table tbody td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line-subtle);
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: background-color var(--duration-fast) var(--ease);
}
.module-table tbody tr:last-child td {
  border-bottom: 0;
}
.module-table tbody tr:hover td {
  background: var(--brand-mist);
}
.module-table .empty-table {
  text-align: center;
  padding: 64px 20px;
  color: var(--muted);
  font-size: 14px;
}

/* ── Report / card grids ───────────────────────────────────────────── */
.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}
.report-card {
  padding: 20px;
  min-height: 172px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  transition:
    box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}
.report-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 16%, var(--line));
}
.report-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: linear-gradient(145deg, var(--brand-tint) 0%, var(--brand-soft) 100%);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 17px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.report-card h2 {
  font-family: var(--display);
  font-size: 14.5px;
  font-weight: var(--font-weight-bold);
  margin: 14px 0 6px;
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.report-card p {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  min-height: 36px;
  margin: 0 0 10px;
}
.report-result {
  font-family: var(--display);
  font-size: 20px;
  font-weight: var(--font-weight-extrabold);
  color: var(--ink);
  margin-bottom: 8px;
  letter-spacing: var(--tracking-tight);
}

/* ── Panels ────────────────────────────────────────────────────────── */
.panel,
.card,
.settings-panel,
.finance-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}

.dashboard-grid {
  gap: 18px;
}
.dashboard-grid .panel,
.bottom-grid .panel {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  overflow: hidden;
}

/* ── Primary actions ───────────────────────────────────────────────── */
button.primary-button,
button.new-button,
a.primary-button,
a.new-button {
  background: var(--brand-gradient) !important;
  color: var(--brand-ink) !important;
  border: 0 !important;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-brand), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.015em;
  transition:
    background var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease),
    transform var(--duration-fast) var(--ease),
    filter var(--duration) var(--ease);
}
button.primary-button:hover,
button.new-button:hover,
a.primary-button:hover,
a.new-button:hover {
  background: var(--brand-gradient-hover) !important;
  box-shadow: var(--shadow-brand-lg), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  filter: brightness(1.02);
}
button.primary-button:active,
button.new-button:active {
  transform: translateY(1px) scale(0.985);
}

/* ── Plan card ─────────────────────────────────────────────────────── */
.plan-card {
  background:
    linear-gradient(155deg, var(--brand-tint) 0% 40%, var(--brand-mist) 100%);
  border: 1px solid color-mix(in srgb, var(--brand) 18%, var(--line));
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-xs);
}
.plan-card .plan-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.plan-card .plan-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-glow), 0 0 12px var(--brand-glow);
}
.plan-card strong {
  font-size: 13px;
  color: var(--ink);
  font-weight: var(--font-weight-bold);
}
.plan-card p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.plan-progress {
  height: 5px;
  background: rgba(0, 117, 143, 0.1);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-bottom: 7px;
}
.plan-progress span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--brand-gradient);
  border-radius: var(--radius-full);
  box-shadow: 0 0 8px var(--brand-glow);
}
.plan-card small {
  font-size: 11px;
  color: var(--muted-soft);
}

/* ── Profile ───────────────────────────────────────────────────────── */
.profile-button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 6px 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
  border-radius: var(--radius);
  transition: background-color var(--duration) var(--ease);
}
.profile-button:hover {
  background: var(--brand-tint);
}
.profile-avatar,
.workspace-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: linear-gradient(145deg);
  font-weight: var(--font-weight-bold);
  color: var(--warning-ink);
  font-size: 12px;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

/* ── Tabs ──────────────────────────────────────────────────────────── */
.workspace-tabs,
.module-tabs,
.tab-list {
  display: flex;
  gap: 3px;
  padding: 4px;
  background: var(--brand-tint);
  border-radius: var(--radius);
  margin-bottom: 20px;
  box-shadow: var(--shadow-inner);
}
.workspace-tabs button,
.module-tabs button,
.tab-list button,
.tab-btn {
  border: 0;
  background: transparent;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: var(--font-weight-semibold);
  color: var(--muted);
  cursor: pointer;
  transition:
    background-color var(--duration) var(--ease),
    color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease);
}
.workspace-tabs button.active,
.module-tabs button.active,
.tab-list button.active,
.tab-btn.active {
  background: var(--surface);
  color: var(--brand-dark);
  box-shadow: var(--shadow-sm);
}

/* ── Status ────────────────────────────────────────────────────────── */
.status-chip,
.status-badge,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 11px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.015em;
}

/* ── Scrollbars ────────────────────────────────────────────────────── */
.nav-list::-webkit-scrollbar,
.module-table-panel::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
.nav-list::-webkit-scrollbar-thumb,
.module-table-panel::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 3px;
}
.nav-list::-webkit-scrollbar-thumb:hover,
.module-table-panel::-webkit-scrollbar-thumb:hover {
  background: var(--muted-soft);
}

/* ── Toasts & dialogs ──────────────────────────────────────────────── */
.toast,
.notification {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--line);
  backdrop-filter: blur(8px);
}

.dialog,
.modal,
.oc-dialog {
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--line);
  background: var(--surface);
}

/* ── Payroll / statutory ─────────────────────────────────────────────── */
.payroll-statutory-panel,
.payroll-panel,
.statutory-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.payroll-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.payroll-panel-heading h2,
.payroll-panel-heading h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 17px;
  font-weight: var(--font-weight-bold);
  color: var(--ink);
  letter-spacing: var(--tracking-tight);
}
.payroll-statutory-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 16px !important;
}
.payroll-statutory-form > section {
  display: block !important;
  min-width: 0 !important;
  padding: 16px !important;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.payroll-statutory-form > section > h3 {
  margin: 0 0 13px;
  color: var(--ink);
  font: 650 12px var(--font);
}
.payroll-statutory-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 14px 16px !important;
}
.payroll-statutory-field {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
}
.payroll-statutory-field > span {
  display: block !important;
  min-height: 2.7em;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.payroll-statutory-field > input,
.payroll-statutory-field > select {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 42px;
  padding: 9px 11px;
  font-size: 13px;
}
.payroll-statutory-check {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}
.payroll-statutory-check > span { min-width: 0; }
.payroll-statutory-check > input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--brand);
}
.payroll-statutory-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding-top: 1px;
}
.payroll-statutory-actions > p {
  max-width: 66ch;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}
/* Payroll statutory forms are dense, regulated records: keep every label above
   its control and give each section a clear, predictable reading order. */
#pageContent .module-page.dashboard-system .payroll-statutory-panel form.payroll-statutory-form {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: start !important;
  gap: 16px !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form > section {
  display: block !important;
  min-width: 0 !important;
  padding: 16px !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form .payroll-statutory-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  align-items: start !important;
  gap: 14px 16px !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid > label.payroll-statutory-field {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: minmax(2.7em, auto) auto !important;
  align-content: start !important;
  align-items: stretch !important;
  justify-items: stretch !important;
  gap: 6px !important;
  min-width: 0 !important;
  width: 100% !important;
  white-space: normal !important;
  line-height: 1.4 !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid > label.payroll-statutory-field > span {
  display: block !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow-wrap: anywhere !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid > label.payroll-statutory-field > input,
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid > label.payroll-statutory-field > select {
  display: block !important;
  grid-column: 1 !important;
  width: 100% !important;
  min-width: 0 !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid > label.payroll-statutory-check {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  min-width: 0 !important;
  width: 100% !important;
  min-height: 42px !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form.payroll-employer-form > section:first-of-type {
  grid-column: 1 / -1 !important;
}
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form.payroll-employer-form > section:nth-of-type(2),
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form.payroll-employer-form > section:nth-of-type(3) {
  grid-column: 1 / -1 !important;
}
@media (max-width: 1040px) {
  .payroll-statutory-grid,
  #pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form .payroll-statutory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}
@media (max-width: 760px) {
  .payroll-statutory-panel { padding: 16px; }
  .payroll-statutory-grid,
  #pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form .payroll-statutory-grid { grid-template-columns: minmax(0, 1fr) !important; }
}
@media (max-width: 520px) {
  .payroll-statutory-grid,
  #pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-form .payroll-statutory-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .payroll-statutory-form > section { padding: 12px; }
}

/* Keep employer registration grouped by statutory scheme so the fields do not
   flow across unrelated PAYE, SDL and UIF controls. */
.payroll-employer-identity-grid,
.payroll-registration-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.payroll-employer-identity-grid { align-items: start; }
.payroll-registration-grid { margin-top: 16px; }
.payroll-registration-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-subtle);
  border-radius: var(--radius-sm);
  background: var(--surface);
}
.payroll-registration-card h4,
.payroll-statutory-subgroup > h4 {
  margin: 0;
  color: var(--ink-soft);
  font: 600 12px var(--font);
}
.payroll-registration-card .payroll-statutory-check,
.payroll-registration-card .payroll-statutory-field { width: 100%; }
.payroll-statutory-subgroup { display: grid; gap: 12px; }
.payroll-statutory-subgroup + .payroll-statutory-subgroup { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-subtle); }
#pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid.payroll-grid-two { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
@media (max-width: 1040px) {
  .payroll-employer-identity-grid,
  .payroll-registration-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .payroll-employer-identity-grid,
  .payroll-registration-grid,
  #pageContent .module-page.dashboard-system .payroll-statutory-panel .payroll-statutory-grid.payroll-grid-two { grid-template-columns: minmax(0, 1fr) !important; }
}

/* ── Billing ───────────────────────────────────────────────────────── */
.billing-card,
.pricing-card,
.billing-plan-card {
  border-radius: var(--radius-xl) !important;
  box-shadow: var(--shadow-sm) !important;
  border: 1px solid var(--line) !important;
  transition:
    box-shadow var(--duration) var(--ease),
    transform var(--duration) var(--ease),
    border-color var(--duration) var(--ease);
}
.billing-card:hover,
.pricing-card:hover,
.billing-plan-card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}
.billing-plan-card.is-current {
  border-color: var(--brand) !important;
  box-shadow:
    0 0 0 2px color-mix(in srgb, var(--brand) 18%, transparent),
    var(--shadow-md) !important;
}

/* ── Workspace switcher polish ─────────────────────────────────────── */
.workspace-switcher {
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-xs) !important;
  border: 1px solid var(--line) !important;
  transition:
    background-color var(--duration) var(--ease),
    border-color var(--duration) var(--ease),
    box-shadow var(--duration) var(--ease) !important;
}
.workspace-switcher:hover {
  background: var(--brand-mist) !important;
  border-color: color-mix(in srgb, var(--brand) 22%, var(--line)) !important;
  box-shadow: var(--shadow-sm) !important;
}

/* ── Selection ─────────────────────────────────────────────────────── */
::selection {
  background: var(--brand-soft);
  color: var(--brand-dark);
}

/* ── Auth screen ambient ───────────────────────────────────────────── */
.auth-screen {
  background:
    radial-gradient(ellipse 90% 55% at 50% -15%, rgba(0, 117, 143, 0.09) 0%, transparent 55%),
    radial-gradient(ellipse 50% 40% at 95% 95%, rgba(42, 155, 176, 0.07) 0%, transparent 50%),
    radial-gradient(ellipse 40% 30% at 5% 80%, rgba(0, 80, 97, 0.04) 0%, transparent 45%),
    var(--canvas) !important;
}
.auth-card {
  border-radius: var(--radius-2xl) !important;
  box-shadow: var(--shadow-xl) !important;
  border: 1px solid color-mix(in srgb, var(--brand) 8%, var(--line)) !important;
}

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .report-grid { grid-template-columns: 1fr; }
  .module-heading {
    flex-direction: column;
    align-items: stretch;
  }
  .module-heading h1 { font-size: 24px; }
  .module-search { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .report-card,
  .module-search,
  .filter-button,
  button.primary-button,
  button.new-button,
  .billing-card,
  .pricing-card,
  .billing-plan-card {
    transition: none;
  }
  button.primary-button:active,
  button.new-button:active {
    transform: none;
  }
}

/* Compact, lighter hierarchy across every module page. */
.module-heading {
  gap: 14px;
  margin-bottom: 20px;
}
.module-heading h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.45px;
}
.module-title-icon {
  width: 32px;
  height: 32px;
  flex-basis: 32px;
  border-radius: 9px;
}
.module-title-icon .oc-icon { width: 18px; height: 18px; stroke-width: 1.7; }
.module-heading .eyebrow {
  margin-bottom: 4px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.075em;
}
.module-heading .subheading {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.45;
}
.module-page h2 { font-weight: 600; }
.module-page [role="tab"] {
  min-height: 38px;
  font-size: 11px;
  font-weight: 500;
}
.module-page [role="tab"].active,
.module-page [role="tab"][aria-selected="true"] { font-weight: 600; }
.module-page [role="tab"] > span {
  font-weight: 500;
}
.quick-menu { padding: 6px; }
.quick-option { gap: 10px; padding: 9px 8px; }
.quick-option strong {
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}
.quick-option small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.4;
}
.quick-option > i {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid color-mix(in srgb, var(--brand) 10%, transparent);
  border-radius: 8px;
}
.quick-option > i .oc-icon { width: 16px; height: 16px; stroke-width: 1.8; }
.popover-head h3 { font-weight: 600; letter-spacing: -0.2px; }
.popover-head p { color: var(--muted); line-height: 1.45; }

/* Compact sidebar navigation so more modules fit at normal display scale. */
.sidebar {
  width: 216px;
  flex-basis: 216px;
}
.brand { height: 62px; padding: 0 16px; }
.workspace-switcher { margin: 3px 10px 8px; padding: 7px 9px; gap: 8px; }
.workspace-avatar { width: 28px; height: 28px; }
.sidebar-collapse { height: 28px; margin: 0 8px 3px; }
.sidebar.collapsed .sidebar-collapse .sidebar-collapse-label { display: none; }
.sidebar.collapsed .sidebar-collapse .collapse-chevron { display: inline-grid; }
.nav-list { padding: 3px 8px 8px; }
.nav-group { margin: 0; }
.nav-group-button { height: 30px; min-height: 30px; gap: 8px; padding: 0 9px; font-size: 10.5px; font-weight: 500; }
.nav-item { height: 29px; min-height: 29px; gap: 8px; padding: 0 9px; font-size: 10.5px; font-weight: 500; }
.nav-item.nav-subitem { min-height: 27px; padding: 3px 9px; font-size: 10px; }
.nav-icon { width: 16px; height: 16px; }
.nav-icon .oc-icon { width: 15px; height: 15px; stroke-width: 1.75; }
.nav-chevron { width: 15px; height: 15px; }
.nav-chevron .oc-icon { width: 13px; height: 13px; }
.sidebar-bottom { padding: 7px 9px 10px; }
.plan-card { margin: 5px 2px 7px; padding: 8px 9px; }
.plan-card p { margin: 5px 0 6px; font-size: 9px; }
.plan-card small { margin-top: 5px; }
.profile-button { gap: 7px; padding-top: 6px; }

/* Align the selected CRM marker precisely with the active tab. */
.crm-tabs { gap: 0; }
.crm-tab.active::after { right: 0; left: 0; height: 2px; border-radius: 0; }

@media (max-width: 960px) {
  .sidebar { width: min(300px, 88vw); flex-basis: 300px; }
}

/* Keep the shared shell compact, with icons and labels on the same baseline. */
.topbar-actions { align-items: center; }
.new-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  display: inline-grid;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  white-space: nowrap;
}
.new-button > span:first-child {
  width: 16px;
  height: 16px;
  display: inline-grid;
  place-items: center;
  margin: 0;
  line-height: 1;
}
.new-button > span:first-child .oc-icon { width: 16px; height: 16px; }
.module-heading h1,
.invoice-editor-heading h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.45px;
}

/* The New menu uses the same icon and type system across every create action. */
.popover.quick-create-popover {
  width: min(520px, calc(100vw - 24px));
  max-height: calc(100dvh - 78px);
  overflow: hidden;
}
.quick-create-popover .quick-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 5px;
  max-height: calc(100dvh - 154px);
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.quick-create-popover .quick-option {
  min-width: 0;
  min-height: 50px;
  align-items: center;
  gap: 9px;
  padding: 7px;
}
.quick-option-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 28px;
  border: 1px solid color-mix(in srgb, var(--brand) 11%, var(--line));
  border-radius: 8px;
  background: var(--brand-tint);
  color: var(--brand);
}
.quick-option-icon .oc-icon { width: 16px; height: 16px; stroke-width: 1.8; }
.quick-option-copy { min-width: 0; display: grid; gap: 2px; }
.quick-create-popover .quick-option strong,
.quick-create-popover .quick-option small { overflow-wrap: anywhere; }
.quick-create-popover .quick-option strong { font-size: 11px; line-height: 1.25; }
.quick-create-popover .quick-option small { margin: 0; font-size: 9px; line-height: 1.3; }
.quick-create-popover .popover-head h3 { font-size: 15px; font-weight: 600; }
.quick-create-popover .popover-head p { font-size: 10px; }
.workspace-list { max-height: min(48vh, 380px); overflow: auto; padding: 6px; }
.workspace-list .quick-option { gap: 10px; padding: 9px 8px; }
.workspace-list .quick-option > i {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-tint);
  color: var(--brand);
  font-size: 11px;
  font-style: normal;
  font-weight: 700;
}
.workspace-add-option { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; }
.workspace-create-form { display: grid; gap: 11px; padding: 15px 17px 17px; }
.workspace-create-form .form-field input { min-height: 37px; background: var(--surface); }
.workspace-create-note { margin: 0; padding: 10px 11px; border-radius: 8px; background: var(--brand-tint); color: var(--muted); font-size: 10px; line-height: 1.5; }
.workspace-create-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.workspace-create-actions [role="status"] { min-width: 0; color: var(--muted); font-size: 10px; overflow-wrap: anywhere; }
.workspace-create-actions button { flex: 0 0 auto; }
.crm-overview-icon { width: 35px; height: 35px; flex: 0 0 35px; border-radius: 10px; background: var(--brand-tint); color: var(--brand); }
.crm-overview-icon .oc-icon { width: 18px; height: 18px; stroke-width: 1.8; }
.leave-setup-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.leave-setup-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-tint);
  color: var(--brand);
}
.leave-setup-icon .oc-icon { width: 18px; height: 18px; }
.leave-setup-panel > div { min-width: 0; flex: 1; }
.leave-setup-panel h2 { margin: 0 0 3px; font-size: 12px; font-weight: 600; }
.leave-setup-panel p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.45; }
.leave-setup-panel.is-ready { border-color: color-mix(in srgb, var(--success-ink) 24%, var(--line)); background: color-mix(in srgb, var(--success-soft) 42%, white); }
.leave-setup-panel.is-attention { border-color: color-mix(in srgb, var(--warning-ink) 25%, var(--line)); background: color-mix(in srgb, var(--warning-soft) 38%, white); }
.sidebar-collapse { gap: 6px; font-size: 13px; }
.sidebar-collapse .collapse-chevron { flex: 0 0 16px; width: 16px; height: 16px; }
.sidebar-collapse-label { white-space: nowrap; }
.invoice-reference-helper { color: var(--muted); font-size: 10px; }
@media (max-width: 560px) {
  .quick-create-popover .quick-menu { grid-template-columns: 1fr; max-height: calc(100dvh - 145px); }
  .new-button { min-width: 75px; min-height: 33px; padding: 0 10px; }
}
html { background: var(--canvas); }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-optical-sizing: auto;
  letter-spacing: 0;
}

.app-shell { background: var(--canvas); }
.sidebar {
  background: var(--surface);
  border-right-color: var(--line);
  box-shadow: none;
}
.topbar {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--line);
  box-shadow: none;
  backdrop-filter: blur(8px);
}
.workspace-switcher { box-shadow: none; }
.workspace-switcher:hover { background: var(--brand-mist); border-color: var(--line-strong); }
.workspace-avatar {
  background: var(--brand-tint) !important;
  color: var(--ink-soft) !important;
  border: 1px solid var(--line);
}
.profile-avatar {
  background-color: var(--brand-tint) !important;
  color: var(--ink-soft) !important;
  border: 1px solid var(--line);
}
.nav-item.active,
.nav-group.contains-active > .nav-group-button {
  background: var(--brand-tint);
  color: var(--brand-dark);
  box-shadow: inset 2px 0 var(--brand);
}
.nav-item:hover,
.nav-group-button:hover,
.icon-button:hover { background: var(--brand-mist); color: var(--brand-dark); }

.module-heading { margin-bottom: 19px; }
.module-heading h1,
.invoice-editor-heading h1 {
  color: var(--ink);
  font-family: var(--display);
  font-size: 23px;
  font-weight: 650;
  letter-spacing: -0.55px;
}
.module-heading .eyebrow {
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.075em;
}
.module-heading .subheading { color: var(--muted); }

.panel,
.card,
.settings-panel,
.finance-panel,
.module-table-panel,
.report-card,
.dashboard-grid .panel,
.bottom-grid .panel {
  border-color: var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}
.report-card:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.module-table thead th { background: var(--surface-sunken); }
.module-table tbody tr:hover td { background: var(--brand-mist); }

.module-title-icon,
.report-icon,
.crm-overview-icon,
.business-metric-icon,
.finance-metric-icon,
.metric-icon {
  background: var(--brand-tint);
  color: var(--brand-dark);
  box-shadow: none !important;
}
.business-metric-icon.violet,
.business-metric-icon.blue,
.business-metric-icon.orange,
.business-metric-icon.green {
  background: var(--brand-tint);
  color: var(--brand-dark);
}
.business-metric-icon.violet { background:var(--brand-tint); color:var(--brand); }
.business-metric-icon.blue { background:var(--info-soft); color:var(--info); }
.business-metric-icon.orange { background:var(--warning-soft); color:var(--warning); }
.business-metric-icon.green { background:var(--success-soft); color:var(--success); }

button.primary-button,
button.new-button,
a.primary-button,
a.new-button,
.primary-button,
.new-button {
  background: var(--brand) !important;
  color: var(--surface) !important;
  border: 1px solid var(--brand) !important;
  border-radius: 6px;
  box-shadow: none !important;
  font-weight: 600;
  letter-spacing: 0;
}
button.primary-button:hover,
button.new-button:hover,
a.primary-button:hover,
a.new-button:hover,
.primary-button:hover,
.new-button:hover {
  background: var(--brand-hover) !important;
  border-color: var(--brand-hover) !important;
  box-shadow: none !important;
  filter: none;
}
.new-button { min-height: 35px; }
.secondary-button,
.filter-button {
  box-shadow: none;
}
.secondary-button:hover,
.filter-button:hover { background: var(--brand-mist); border-color: var(--line-strong); }

.team-chat-whatsapp { gap: 10px; }
.team-chat-sidebar,
.team-chat-conversation-panel,
.team-chat-info-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xs);
}
.team-chat-sidebar-heading,
.team-chat-conversation-heading,
.team-chat-composer,
.team-chat-readonly-note { border-color: var(--line); }
.team-chat-conversation-option,
.team-chat-person-option { border-radius: 6px; }
.team-chat-conversation-option.active {
  background: var(--brand-tint);
  box-shadow: inset 2px 0 var(--brand);
}
.team-chat-message-stream {
  background: var(--palette-f5f7f6);
  background-image: none;
}
.team-chat-bubble { box-shadow: 0 1px 2px rgba(22, 37, 40, 0.04); }
.team-chat-message.mine .team-chat-bubble { background: var(--palette-e8f1ee); border-color: var(--palette-d8e5e0); }
.chat-send-button { background: var(--brand); box-shadow: none; }
.chat-send-button:hover { background: var(--brand-hover); }

::selection { background: var(--palette-dce9e7); color: var(--palette-18353b); }
:focus-visible { outline-color: var(--brand); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

/* Account and workspace controls live in the shared top-right header. */
.topbar-actions { gap: 9px; }
.topbar-actions .workspace-switcher {
  display: inline-flex;
  flex: 0 1 188px;
  align-items: center;
  gap: 8px;
  min-width: 132px;
  max-width: 188px;
  height: 38px;
  margin: 0;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: none;
}
.topbar-actions .workspace-switcher:hover,
.topbar-actions .topbar-profile-button:hover {
  border-color: var(--line-strong);
  background: var(--brand-mist);
}
.topbar-actions .workspace-avatar {
  display: grid;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 6px;
  font-size: 9px;
}
.topbar-actions .workspace-copy { min-width: 0; align-items: flex-start; gap: 0; }
.topbar-actions .workspace-copy strong {
  max-width: 124px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 600;
}
.topbar-actions .workspace-copy small { display: none; }
.topbar-actions .workspace-switcher > .chevron {
  display: grid;
  flex: 0 0 14px;
  width: 14px;
  place-items: center;
  font-size: 12px;
}
.topbar-actions .topbar-profile-button {
  display: inline-flex;
  flex: 0 1 182px;
  align-items: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  max-width: 182px;
  min-height: 38px;
  padding: 2px 5px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  text-align: left;
}
.topbar-actions .profile-avatar {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 9px;
}
.topbar-actions .profile-copy { display: grid; min-width: 0; gap: 2px; }
.topbar-actions .profile-copy strong,
.topbar-actions .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-actions .profile-copy strong { color: var(--ink); font-size: 10px; font-weight: 600; }
.topbar-actions .profile-copy small { color: var(--muted); font-size: 9px; }
.topbar-actions .topbar-profile-button > .chevron { flex: 0 0 auto; font-size: 13px; }
.sidebar-bottom { padding-top: 10px; }

@media (max-width: 1120px) {
  .topbar-actions .workspace-copy,
  .topbar-actions .profile-copy { display: none; }
  .topbar-actions .workspace-switcher,
  .topbar-actions .topbar-profile-button {
    flex: 0 0 38px;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    max-width: 38px;
    padding: 3px;
  }
  .topbar-actions .workspace-switcher > .chevron,
  .topbar-actions .topbar-profile-button > .chevron { display: none; }
}
@media (max-width: 600px) {
  .topbar-actions { gap: 5px; }
  .topbar-actions .workspace-switcher,
  .topbar-actions .topbar-profile-button { flex-basis: 32px; width: 32px; min-width: 32px; max-width: 32px; height: 32px; min-height: 32px; }
  .topbar-actions .workspace-avatar { flex-basis: 25px; width: 25px; height: 25px; }
  .topbar-actions .profile-avatar { flex-basis: 27px; width: 27px; height: 27px; }
  .topbar-actions .new-button { min-width: 58px; }
}
@media (max-width: 430px) {
  .breadcrumb #breadcrumbWorkspace,
  .breadcrumb .slash { display: none; }
}

/* Reference-led dashboards: cool, precise surfaces with OneCloud teal accents. */
main#mainContent,
#pageContent { background:var(--canvas); }
.module-heading h1,.dashboard-system .module-heading h1 { color:var(--palette-12334a); }
.panel,.dashboard-system .panel { border-color:var(--palette-dceaf0); border-radius:8px; box-shadow:0 2px 7px rgba(20,63,83,.035); }
.business-metric { border-color:var(--palette-dcecf2); }
.business-metric-icon { border-radius:50%; }
.business-metric-icon:not(.blue):not(.orange):not(.green):not(.violet) { background:var(--palette-e5f5f8); color:var(--palette-0086a1); }
.dashboard-panel { border-color:var(--palette-deedf2); }
.dashboard-panel-heading h2,.calendar-side-heading h2,.calendar-mini-heading h2 { color:var(--palette-153751); }
.dashboard-panel-heading p,.dashboard-system .business-metric em { color:var(--palette-7792a5); }
.dashboard-table th,.calendar-weekday { background:var(--palette-f4f9fb); }
.support-workspace.dashboard-system .business-metric-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric { display:flex; flex-direction:row; align-items:center; justify-content:flex-start; gap:12px; min-height:88px; padding:14px; border-color:var(--palette-dcecf2); background:var(--surface); box-shadow:0 2px 7px rgba(20,63,83,.035); text-align:left; }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric > .business-metric-icon { width:36px; height:36px; flex:0 0 36px; border-radius:50%; }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric > div { display:grid; gap:4px; min-width:0; }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric small { color:var(--palette-648094); font-size:9px; }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric strong { color:var(--palette-173244); font:700 17px var(--display); }
.support-workspace.dashboard-system .finance-metric-grid .finance-card.business-metric em { overflow:hidden; color:var(--palette-7892a4); font-size:8px; font-style:normal; text-overflow:ellipsis; white-space:nowrap; }
.support-workspace.dashboard-system .support-layout { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(310px,.85fr); }
.support-workspace.dashboard-system .support-queue-panel { border-radius:8px; }
.support-report-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.support-report-grid > :last-child { grid-column:1/-1; }
.support-report-grid > * { min-width:0; }
.sla-visual-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:0 0 12px; }
.dashboard-donut-layout { display:grid; grid-template-columns:minmax(120px,.7fr) minmax(130px,1fr); align-items:center; gap:14px; min-height:155px; }
.dashboard-donut { display:grid; width:min(100%,145px); aspect-ratio:1; place-items:center; margin:auto; border-radius:50%; }
.dashboard-donut > span { display:grid; width:62%; height:62%; place-content:center; border-radius:50%; background:var(--surface); text-align:center; }
.dashboard-donut > span strong { color:var(--palette-12334a); font:700 20px var(--display); }
.dashboard-donut > span small { color:var(--palette-7792a5); font-size:8px; }
.dashboard-donut-legend { display:grid; gap:11px; min-width:0; }
.dashboard-donut-legend > div { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--palette-5f7d91); font-size:9px; }
.dashboard-donut-legend > div > span { display:inline-flex; align-items:center; gap:7px; }
.dashboard-donut-legend i { display:inline-block; width:9px; height:9px; border-radius:50%; background:var(--legend-color); }
.dashboard-donut-legend strong { color:var(--palette-12334a); font-size:9px; }
.support-trend-chart { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); align-items:end; gap:8px; min-height:165px; padding:12px 3px 0; }
.support-trend-chart > .dashboard-empty { grid-column:1/-1; width:100%; min-height:120px; display:grid; place-items:center; padding:20px; border:1px dashed var(--palette-dceaf0); border-radius:7px; background:var(--palette-fbfdfe); text-align:center; }
.support-trend-column { display:grid; grid-template-rows:15px 1fr 19px; justify-items:center; align-items:end; gap:4px; height:145px; }
.support-trend-column strong { color:var(--palette-5d7b90); font-size:8px; }
.support-trend-column > i { display:flex; align-items:end; width:min(28px,80%); height:100%; overflow:hidden; border-radius:5px 5px 2px 2px; background:var(--palette-eff6f8); }
.support-trend-column b { display:block; width:100%; min-height:2px; border-radius:5px 5px 0 0; background:var(--palette-1497b2); }
.support-trend-column small { color:var(--palette-7792a5); font-size:7px; white-space:nowrap; }
.knowledge-dashboard-layout { grid-template-columns:minmax(170px,.58fr) minmax(380px,1.5fr) minmax(275px,.95fr); }
.knowledge-categories { display:grid; align-content:start; gap:14px; min-height:320px; padding:14px; }
.knowledge-category-heading,.calendar-side-heading,.calendar-mini-heading { display:flex; align-items:center; justify-content:space-between; gap:9px; }
.knowledge-category-heading h2,.knowledge-categories h2,.documents-quick-actions h2,.calendar-quick-panel h2 { margin:0; color:var(--palette-153751); font:650 11px var(--display); }
.knowledge-category-heading > span,.calendar-side-heading > span { display:grid; min-width:22px; height:22px; place-items:center; border-radius:50%; background:var(--palette-eaf5f8); color:var(--brand); font-size:8px; }
.knowledge-category-list { display:grid; gap:4px; }
.knowledge-category-button { display:flex; justify-content:space-between; align-items:center; gap:7px; width:100%; min-height:34px; padding:0 8px; border:1px solid transparent; border-radius:6px; background:transparent; color:var(--palette-5f7d91); font:500 9px var(--display); text-align:left; cursor:pointer; }
.knowledge-category-button small { color:var(--palette-7992a2); font-size:8px; }
.knowledge-category-button:hover,.knowledge-category-button.active { border-color:var(--palette-d9edf2); background:var(--palette-eff8fa); color:var(--palette-006c82); }
.knowledge-category-button.active { font-weight:650; }
.knowledge-category-empty { margin:0; color:var(--palette-7992a2); font-size:8px; line-height:1.5; }
.knowledge-category-note { margin-top:auto; padding:12px; border:1px solid var(--palette-dceef3); border-radius:7px; background:var(--palette-f2f9fb); }
.knowledge-category-note strong { color:var(--palette-17465e); font-size:9px; }
.knowledge-category-note p { margin:5px 0 0; color:var(--palette-718b9e); font-size:8px; line-height:1.5; }
.knowledge-inspector { position:sticky; top:12px; }
.knowledge-library,.knowledge-inspector { border-radius:8px; }
.knowledge-library .dashboard-table { width:100%; min-width:0; table-layout:fixed; }
.knowledge-library .dashboard-table th,.knowledge-library .dashboard-table td { overflow:hidden; padding-inline:7px; text-overflow:ellipsis; white-space:nowrap; }
.knowledge-library .work-table-record-link { display:block; max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.work-data-table { min-width:700px; }
.work-data-table thead th { background:var(--palette-f4f9fb); }
.work-data-table tbody tr:hover,.work-data-table tbody tr.selected { background:var(--palette-eff8fa); }
.work-data-table tbody td { color:var(--palette-56758b); }
.work-table-record-link { color:var(--palette-006d86); }
.tasks-workspace .work-workspace-layout { grid-template-columns:minmax(0,1.55fr) minmax(290px,.8fr); gap:12px; }
.tasks-workspace .work-toolbar { margin:0; }
.tasks-workspace .work-list-column { overflow:hidden; border:1px solid var(--palette-dceaf0); border-radius:8px; background:var(--surface); }
.tasks-workspace .work-toolbar,.tasks-workspace .work-scopebar { padding:11px 12px 0; }
.tasks-workspace #workRecordList { padding:0 12px 12px; }
.tasks-workspace .work-data-table td,.documents-workspace .work-data-table td { height:47px; }
.documents-workspace .work-workspace-layout { grid-template-columns:minmax(0,1.5fr) minmax(280px,.75fr); gap:12px; }
.documents-context-panel { position:static; max-height:none; min-height:0; display:grid; align-content:start; gap:12px; overflow:visible; padding:14px; }
.documents-context-panel .work-inspector-heading,.documents-context-panel .work-inspector-body { padding-left:2px; padding-right:2px; }
.documents-recent-panel { padding-top:11px; border-top:1px solid var(--line-subtle); }
.documents-recent-list { display:grid; margin-top:7px; }
.documents-recent-item { display:flex; align-items:center; gap:9px; width:100%; padding:9px 2px; border:0; border-top:1px solid var(--palette-edf3f6); background:var(--surface); text-align:left; cursor:pointer; }
.documents-recent-item > span:last-child { display:grid; gap:4px; min-width:0; }
.documents-recent-item strong { overflow:hidden; color:var(--palette-244960); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.documents-recent-item small { overflow:hidden; color:var(--palette-7891a2); font-size:8px; text-overflow:ellipsis; white-space:nowrap; }
.documents-file-mark { display:grid; width:31px; height:31px; flex:0 0 31px; place-items:center; border-radius:7px; background:var(--palette-eaf6f9); color:var(--palette-007b94); }
.calendar-content-layout { grid-template-columns:minmax(0,1fr) minmax(260px,.34fr); gap:12px; }
.calendar-workspace .work-list-column { min-width:0; }
.calendar-workspace .work-scopebar { margin-bottom:8px; }
.calendar-context-panel { position:static; max-height:none; min-height:0; display:grid; align-content:start; gap:11px; overflow:visible; padding:0; border:0; background:transparent; box-shadow:none; }
.calendar-mini-panel,.calendar-upcoming-panel,.calendar-quick-panel,.calendar-selected-panel { min-width:0; padding:13px; }
.calendar-mini-heading h2,.calendar-side-heading h2 { margin:0; font:650 10px var(--display); }
.calendar-mini-controls { display:flex; gap:2px; }
.calendar-mini-controls .icon-button { width:24px; height:24px; min-height:24px; color:var(--palette-4e7185); }
.calendar-mini-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:2px; margin-top:9px; }
.calendar-mini-weekday,.calendar-mini-day { display:grid; min-height:25px; place-items:center; color:var(--palette-56778c); font-size:8px; }
.calendar-mini-weekday { color:var(--palette-8aa0ae); font-size:7px; font-weight:650; }
.calendar-mini-day.outside-month { color:var(--palette-b5c1c8); }
.calendar-mini-day.today { border-radius:50%; background:var(--brand); color:var(--surface); font-weight:700; }
.calendar-upcoming-list { display:grid; margin-top:6px; }
.calendar-upcoming-item { display:flex; align-items:center; gap:9px; width:100%; padding:8px 0; border:0; border-top:1px solid var(--palette-edf3f6); background:var(--surface); text-align:left; cursor:pointer; }
.calendar-upcoming-date { display:grid; width:34px; height:36px; flex:0 0 34px; place-content:center; border-radius:6px; background:var(--palette-eaf5f8); color:var(--brand); text-align:center; }
.calendar-upcoming-date strong { font:700 12px var(--display); }
.calendar-upcoming-date small { font-size:7px; }
.calendar-upcoming-copy { display:grid; gap:4px; min-width:0; }
.calendar-upcoming-copy strong { overflow:hidden; color:var(--palette-244960); font-size:9px; text-overflow:ellipsis; white-space:nowrap; }
.calendar-upcoming-copy small,.calendar-side-empty { color:var(--palette-7891a2); font-size:8px; line-height:1.5; }
.calendar-side-empty { margin:8px 0 0; }
.calendar-quick-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:9px; }
.calendar-quick-actions button,.documents-quick-actions > button { display:flex; align-items:center; justify-content:flex-start; gap:7px; min-height:34px; padding:0 8px; border:1px solid var(--palette-e0edf2); border-radius:6px; background:var(--palette-f8fbfc); color:var(--palette-37657b); font:550 8px var(--display); cursor:pointer; }
.calendar-quick-actions button:hover,.documents-quick-actions > button:hover { border-color:var(--palette-b5dbe4); background:var(--palette-eff8fa); color:var(--palette-006b82); }
.calendar-quick-actions svg,.documents-quick-actions svg { width:14px; height:14px; flex:0 0 14px; }
.documents-quick-actions { display:grid; gap:6px; padding-top:11px; border-top:1px solid var(--line-subtle); }
.documents-quick-actions h2 { margin-bottom:3px; }
.documents-quick-actions > button { width:100%; }
.documents-quick-actions > .primary-button { justify-content:center; border-color:var(--brand); background:var(--brand); color:var(--surface); }
.calendar-selected-panel { padding:0; overflow:hidden; }
.calendar-selected-panel .work-inspector-heading { padding:13px; }
.calendar-selected-panel .work-inspector-body { max-height:230px; padding:12px; }

@media (max-width:1180px) {
  .knowledge-dashboard-layout { grid-template-columns:minmax(155px,.5fr) minmax(320px,1.35fr) minmax(250px,.9fr); }
  .support-report-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .support-report-grid > :last-child { grid-column:1/-1; }
}
@media (max-width:900px) {
  .knowledge-dashboard-layout { grid-template-columns:minmax(0,1fr) minmax(270px,.8fr); }
  .knowledge-categories { grid-column:1/-1; min-height:0; }
  .knowledge-category-list { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .knowledge-category-note { display:none; }
  .support-report-grid,.sla-visual-grid { grid-template-columns:minmax(0,1fr); }
  .support-report-grid > :last-child { grid-column:auto; }
  .calendar-content-layout,.documents-workspace .work-workspace-layout,.tasks-workspace .work-workspace-layout { grid-template-columns:minmax(0,1fr); }
  .calendar-context-panel { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-selected-panel { grid-column:1/-1; }
  .documents-context-panel { grid-template-columns:minmax(0,1fr) minmax(220px,.7fr); }
  .documents-context-panel > .work-inspector-heading,.documents-context-panel > .work-inspector-body { grid-column:1/-1; }
}
@media (max-width:620px) {
  .support-workspace.dashboard-system .business-metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .knowledge-dashboard-layout { grid-template-columns:minmax(0,1fr); }
  .knowledge-categories,.knowledge-category-list { grid-column:auto; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .calendar-context-panel,.documents-context-panel { grid-template-columns:minmax(0,1fr); }
  .calendar-selected-panel,.documents-context-panel > .work-inspector-heading,.documents-context-panel > .work-inspector-body { grid-column:auto; }
}


.pdf-engine-app{max-width:none!important;margin:-4px -8px 0!important}
.pdf-engine-heading{gap:18px}
.pdf-engine-heading .secondary-button{display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.pdf-engine-frame-wrap{height:calc(100vh - 205px);min-height:620px;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-sm)}
.pdf-engine-frame-wrap iframe{display:block;width:100%;height:100%;border:0;background:var(--surface)}
@media(max-width:700px){.pdf-engine-heading{align-items:flex-start;flex-direction:column}.pdf-engine-frame-wrap{height:calc(100vh - 245px);min-height:540px}}

.workspace-fullscreen-button{white-space:nowrap}
.pdf-engine-app:fullscreen,
#sheetsWorkspace:fullscreen,
.pdf-engine-app.workspace-fullscreen-fallback,
#sheetsWorkspace.workspace-fullscreen-fallback{
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:14px!important;
  box-sizing:border-box;
  display:flex!important;
  flex-direction:column;
  overflow:hidden;
  background:var(--canvas);
}
.pdf-engine-app:fullscreen .pdf-engine-frame-wrap,
.pdf-engine-app.workspace-fullscreen-fallback .pdf-engine-frame-wrap{
  flex:1;
  height:auto;
  min-height:0;
}
#sheetsWorkspace:fullscreen .sheet-grid-wrap,
#sheetsWorkspace.workspace-fullscreen-fallback .sheet-grid-wrap{
  flex:1;
  min-height:0;
  max-height:none;
}

/* Final workspace navigation and alignment refinements. */
.sidebar > .brand .brand-logo-full{width:96px;max-width:100%;}
.crm-section-navigation{display:flex;align-items:stretch;gap:2px;margin:0 0 15px;overflow-x:auto;border-bottom:1px solid var(--line);scrollbar-width:thin;}
.crm-section-link{position:relative;display:flex;flex:0 0 auto;align-items:center;justify-content:center;min-height:42px;padding:0 13px;border:0;background:transparent;color:var(--muted);font-size:10px;font-weight:600;white-space:nowrap;cursor:pointer;}
.crm-section-link:hover,.crm-section-link.active{color:var(--brand);background:color-mix(in srgb,var(--brand) 4%,transparent);}
.crm-section-link.active::after{position:absolute;right:11px;bottom:0;left:11px;height:2px;border-radius:2px 2px 0 0;background:var(--brand);content:'';}
.finance-workspace-tab.active::after{background:var(--brand);}
.finance-workspace-tab:hover,.finance-workspace-tab.active{color:var(--brand);}
.finance-workspace-tab:focus-visible{outline-color:var(--brand);}
.crm-tab.active::after{background:var(--brand);}
.crm-tab.active,.crm-tab:hover{color:var(--brand);}
.wp-tabs button.active:after{background:var(--brand);border-radius:2px 2px 0 0;}
.pdf-engine-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;}
.pdf-engine-heading .workspace-fullscreen-button{flex:0 0 auto;margin-left:auto;}
.sheets-workspace>.module-heading{align-items:center;}
.sheets-workspace .module-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.sheets-workspace .sheet-book-picker{display:flex;align-items:center;gap:8px;margin:0;color:var(--muted);font-size:10px;white-space:nowrap;}
.sheets-workspace .sheet-book-picker select{width:180px;height:36px;max-width:26vw;}
@media(max-width:900px){
  .sheets-workspace>.module-heading{align-items:flex-start;flex-direction:column;}
  .sheets-workspace .module-actions{width:100%;justify-content:flex-start;}
}
@media(max-width:700px){
  .pdf-engine-heading{align-items:flex-start;}
  .pdf-engine-heading .workspace-fullscreen-button{margin-left:0;}
  .crm-section-link{min-height:38px;padding:0 10px;font-size:9px;}
  .sheets-workspace .sheet-book-picker{flex-basis:100%;justify-content:space-between;}
  .sheets-workspace .sheet-book-picker select{max-width:none;flex:1;}
}

/* Full-width Team and Knowledge Base layouts override legacy centered column limits. */
.dashboard-system{width:100%;max-width:none}
.team-dashboard-layout{width:100%;grid-template-columns:repeat(3,minmax(0,1fr))}
.knowledge-dashboard-layout{width:100%;max-width:none;grid-template-columns:minmax(210px,.56fr) minmax(0,1.75fr) minmax(280px,.9fr)}
.knowledge-library,.knowledge-inspector,.knowledge-categories{min-width:0}
@media(max-width:1100px){.team-dashboard-layout{grid-template-columns:repeat(2,minmax(0,1fr))}.knowledge-dashboard-layout{grid-template-columns:minmax(190px,.6fr) minmax(0,1.5fr)}.knowledge-inspector{grid-column:1/-1}}
@media(max-width:900px){.team-dashboard-layout{grid-template-columns:minmax(0,1fr)}.knowledge-dashboard-layout{grid-template-columns:minmax(0,1fr)}.knowledge-inspector{grid-column:auto}}
.hr-org-tree,.hr-org-tree-children{list-style:none;margin:0;padding:0}.hr-org-tree{display:grid;gap:12px;padding:4px}.hr-org-tree-node{min-width:0}.hr-org-person{display:flex;align-items:center;gap:10px;min-height:58px;padding:10px 12px;border:1px solid var(--line,#e7edf0);border-radius:10px;background:var(--surface,#fff)}.hr-org-person-copy{display:grid;gap:3px;min-width:0;flex:1}.hr-org-person-copy strong{font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hr-org-person-copy small{font-size:10px;color:var(--muted,#77818a);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.hr-org-tree-children{display:grid;gap:9px;margin:9px 0 0 23px;padding-left:15px;border-left:1px solid var(--line,#dfe8eb)}.hr-org-tree-children>.hr-org-tree-node{position:relative}.hr-org-tree-children>.hr-org-tree-node:before{content:"";position:absolute;left:-15px;top:28px;width:15px;border-top:1px solid var(--line,#dfe8eb)}@media(max-width:640px){.hr-org-person{align-items:flex-start}.hr-org-person>.status-badge{margin-left:auto}.hr-org-tree-children{margin-left:12px;padding-left:10px}.hr-org-tree-children>.hr-org-tree-node:before{left:-10px;width:10px}}
