/* Shared visual foundation; page-specific grids, navigation and state stay local. */
:root.quicko-design,
.quicko-design body {
  --qd-bg: #101518;
  --qd-surface: #1c2428;
  --qd-raised: #253036;
  --qd-line: #4a585e;
  --qd-text: #eef2f3;
  --qd-muted: #b6c1c4;
  --qd-accent: #70c5a1;
  --qd-active: #234b3c;
  --bg: var(--qd-bg);
  --bg-soft: var(--qd-surface);
  --bg-2: var(--qd-surface);
  --surface: var(--qd-surface);
  --surface-2: var(--qd-raised);
  --panel: var(--qd-surface);
  --panel-2: var(--qd-raised);
  --panel-3: var(--qd-raised);
  --text: var(--qd-text);
  --muted: var(--qd-muted);
  --line: var(--qd-line);
  --brand: var(--qd-accent);
  --brand-2: #e3bd72;
  --accent: var(--qd-accent);
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 8px;
  --shadow: none;
  --exec-bg: var(--qd-bg);
  --exec-surface: var(--qd-surface);
  --exec-surface-soft: var(--qd-raised);
  --exec-text: var(--qd-text);
  --exec-muted: var(--qd-muted);
  --exec-border: var(--qd-line);
  --exec-shadow: none;
  --ops-surface: var(--qd-surface);
  --ops-surface-soft: var(--qd-raised);
  --ops-border: var(--qd-line);
  --ops-shadow: none;
  --ops-glow: none;
  color-scheme: dark;
}

html.quicko-design,
.quicko-design body {
  background: var(--qd-bg) !important;
  color: var(--qd-text) !important;
}
.quicko-design body {
  font-family: "Segoe UI", system-ui, sans-serif !important;
  font-size: 15px !important;
  line-height: 1.5;
  letter-spacing: 0 !important;
}
.quicko-design body::before,
.quicko-design body::after {
  display: none !important;
}
.quicko-design :is(.nav, .nav-inner, .nav .brand, .nav .cta) {
  background: var(--qd-bg) !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.quicko-design .nav .brand {
  border: 0 !important;
  padding: 0 !important;
}
.quicko-design .nav .logo {
  width: 64px !important;
  height: 44px !important;
  object-fit: contain;
}
.quicko-design[data-quicko-layout="public"] :is(img, video) {
  max-width: 100%;
}
.quicko-design[data-quicko-layout="public"] header > #logo {
  width: 64px;
  height: 44px;
  object-fit: contain;
}
.quicko-design .nav .brand-title {
  font-size: 14px !important;
}
.quicko-design .nav .brand-title b {
  background: none !important;
  font-family: inherit !important;
  -webkit-text-fill-color: var(--qd-text) !important;
  text-shadow: none;
  font-size: 14px !important;
  letter-spacing: 0 !important;
  color: var(--qd-text) !important;
}
.quicko-design .nav-inner {
  padding-block: 12px !important;
}
.quicko-design [hidden] {
  display: none !important;
}
.quicko-design :is(h1, h2, h3, h4, h5, h6, p, a, label, button, input, select, textarea) {
  font-family: inherit !important;
  letter-spacing: 0 !important;
}
.quicko-design :is(h1, h2, h3, h4, h5, h6) {
  overflow-wrap: anywhere;
}
.quicko-design[data-quicko-layout="workspace"] :is(h1, h2, h3, h4, h5, h6) {
  color: var(--qd-text) !important;
  line-height: 1.3;
}
.quicko-design[data-quicko-layout="workspace"] h1 {
  font-size: 28px !important;
}
.quicko-design[data-quicko-layout="workspace"] h2 {
  font-size: 20px !important;
}
.quicko-design[data-quicko-layout="workspace"] :is(h3, h4) {
  font-size: 17px !important;
}
.quicko-design .leaflet-popup-content :is(h1, h2, h3, h4, h5, h6) {
  color: #18212a !important;
}
.quicko-design
  :is(
    .muted,
    .qx-muted,
    .text-muted,
    .emp-jobMeta,
    .emp-kicker,
    .workspace-brand,
    .employee-current-job__meta,
    .employee-table-subtitle,
    .employee-checklist-progress,
    .workspace-stats span,
    .employee-timeline-item time,
    .employee-timeline-item span,
    .employee-current-job__section > span
  ) {
  color: var(--qd-muted) !important;
}

.quicko-design
  :is(
    .btn,
    .qx-btn,
    .qx-tab,
    .emp-actionBtn,
    .ops-action,
    .quicko-system-link,
    .quicko-shell-fab,
    .nav-item,
    .tab,
    .tab-btn,
    .employee-workspace-page button
  ):not(.leaflet-control-zoom-in):not(.leaflet-control-zoom-out) {
  background: var(--qd-raised) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-line) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
  text-shadow: none;
}
.quicko-design
  :is(
    .btn-primary,
    .qx-btn-primary,
    .btn.primary,
    button.primary,
    .qx-tab.is-active,
    .tab.is-active,
    .tab-btn.active,
    .nav-item.active,
    .emp-actionBtn--primary,
    .btn-brand
  ) {
  background: var(--qd-active) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-accent) !important;
}
.quicko-design :is(.btn-danger, .qx-btn-danger, button.danger) {
  background: #532d33 !important;
  color: #ffe6e9 !important;
  border-color: #c57680 !important;
}
.quicko-design
  :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]):not([type="range"]):not(
    [type="color"]
  ):not([type="hidden"]) {
  background: var(--qd-bg) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-line) !important;
  border-radius: 6px !important;
  box-shadow: none;
  max-width: 100%;
  min-width: 0;
}
.quicko-design ::placeholder {
  color: var(--qd-muted);
  opacity: 1;
}
.quicko-design :is(input[type="checkbox"], input[type="radio"], input[type="range"]) {
  accent-color: var(--qd-accent);
}
.quicko-design :is(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--qd-accent) !important;
  outline-offset: 3px;
}
.quicko-design :is(button, input, select, textarea):disabled {
  cursor: not-allowed;
}

.quicko-design
  :is(
    .card,
    .panel,
    .qx-card,
    .stat-card,
    .kpi-card,
    .metric-card,
    .ops-card,
    .quicko-system-card,
    .crm-card,
    .employee-upload-card,
    .emp-jobCard,
    .emp-statCard,
    .emp-card,
    .emp-bottomNav,
    .workspace-bottomNav,
    .sidebar,
    .topbar,
    .quicko-system-sidebar,
    .auth-card,
    .auth-panel,
    .qx-moreMenu,
    .dropdown-menu,
    .modal-content,
    dialog
  ) {
  background: var(--qd-surface) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.quicko-design :is(dialog, .modal-content)::backdrop {
  background: rgb(0 0 0 / 65%);
}
.quicko-design :is(.qx-row, .qx-assignment, .qx-itemRow) {
  background: var(--qd-surface) !important;
  color: var(--qd-text) !important;
  border-radius: 6px !important;
  box-shadow: none !important;
}
.quicko-design :is(.qx-row.is-active, .employee-jobs-table .is-active, .employee-timeline-item.is-active) {
  background: var(--qd-active) !important;
  border-color: var(--qd-accent) !important;
}
.quicko-design[data-quicko-layout="workspace"]
  :is(
    .qx-content,
    .qx-pageHeader,
    .ops-hero,
    .quicko-system-hero,
    .employee-admin-hero,
    .crm-hero,
    .emp-hero,
    .workspace-header,
    .admin-hero,
    .dashboard-hero,
    .ceo-hero,
    .dash-hero,
    .hero-panel,
    .tower-hub-hero
  ) {
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.quicko-design[data-quicko-layout="workspace"]
  :is(
    [class$="-hero"],
    [class*="-hero "],
    .admin-dashboard-hero-copy,
    .admin-dashboard-hero-actions,
    .admin-dashboard-focus,
    .admin-dashboard-metric,
    .admin-dashboard-mission,
    .dashboard-hub-head
  ) {
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.quicko-design[data-quicko-layout="workspace"]
  :is([class$="-hero"], [class*="-hero "], .admin-dashboard-hero-copy, .admin-dashboard-focus) {
  padding: 16px 0 !important;
}
.quicko-design .tower-hub-hero-summary,
.quicko-design .tower-hub-pill-row {
  display: none;
}
.quicko-design[data-quicko-layout="workspace"]
  :is(
    .ops-hero,
    .quicko-system-hero,
    .employee-admin-hero,
    .crm-hero,
    .qx-pageHeader,
    .tower-hub-hero
  )::after {
  display: none;
}
.quicko-design :is(.qx-main, .workspace-shell, .emp-shell) {
  max-width: 1440px;
  box-sizing: border-box;
}
.quicko-design :is(.sidebar h1, .quicko-system-sidebar h1) {
  font-size: 18px !important;
}
.quicko-design :is(th, td) {
  border-color: var(--qd-line) !important;
}
.quicko-design th {
  color: var(--qd-muted) !important;
}
.quicko-design
  :is(.employee-app, .employee-workspace-page)
  :is(.emp-jobTitle, .emp-headline h1, .emp-statValue) {
  color: var(--qd-text) !important;
}
.quicko-design :is(.emp-empty, .emp-jobCard, .employee-upload-card) :is(p, span, strong) {
  color: inherit;
}
.quicko-design .employee-table-title {
  color: var(--qd-accent) !important;
}
.quicko-design
  :is(
    [class$="-card"],
    [class*="-card "],
    .qx-systemCard,
    .qx-qualityBlock,
    .qx-headerSignal,
    .emp-moreMenu,
    .emp-footerNav,
    .workspace-nav,
    .cp-stat
  ) {
  background: var(--qd-surface) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-line) !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}
.quicko-design .employee-app button {
  background: var(--qd-raised) !important;
  color: var(--qd-text) !important;
  border-color: var(--qd-line) !important;
  border-radius: 6px !important;
}
.quicko-design .employee-app button[aria-pressed="true"] {
  background: var(--qd-active) !important;
  border-color: var(--qd-accent) !important;
}
.quicko-design :is(.emp-kpi strong, .emp-grid aside strong, .emp-menuItem) {
  color: var(--qd-text) !important;
}
.quicko-design
  :is(
    .emp-kpi span,
    .emp-filters label,
    .emp-updateBar,
    #jobResultCount,
    #employeeDraftState,
    .employee-photo-row span,
    .employee-upload-card span,
    .employee-empty
  ) {
  color: var(--qd-muted) !important;
}
.quicko-design :is(.emp-footerNav, .workspace-nav) a {
  color: var(--qd-muted) !important;
}
.quicko-design :is(.emp-footerNav, .workspace-nav) a[aria-current="page"] {
  background: var(--qd-active) !important;
  color: var(--qd-text) !important;
}
.quicko-design .emp-grid > .emp-card {
  background: none !important;
  border-radius: 0 !important;
}
.quicko-design .cp-heroCard {
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border-color: transparent !important;
}
.quicko-design .quicko-logout-status {
  padding: 10px 12px;
  border-left: 3px solid #b91c1c;
  background: #fef2f2;
  color: #991b1b;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.quicko-design .offline-badge {
  background: #493c23 !important;
  color: #ffe1a2 !important;
  border-color: #e3bd72 !important;
}
.quicko-design :is([class$="Card"], [class*="Card "], [class$="Panel"], [class*="Panel "],
  .cd-miniMetric, .cd-metric, .cd-asideInfo > div) {
  background: var(--qd-surface) !important;
  color: var(--qd-text) !important;
  border-radius: 8px !important;
  border-color: var(--qd-line) !important;
  box-shadow: none !important;
}
.quicko-design[data-quicko-layout="workspace"] :is(div, section, header, aside)[class*="-hero"],
.quicko-design[data-quicko-layout="workspace"] main > section {
  background: none !important;
  border-radius: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.quicko-design[data-quicko-layout="workspace"] :is(div, section, header, aside)[class*="-hero"] {
  min-height: 0 !important;
  padding: 12px 0 !important;
}
.quicko-design .nav-inner,
.quicko-design .nav .cta { border: 0 !important; }

.quicko-design .customer-dashboard-shell {
  gap: 16px;
}
.quicko-design .customer-dashboard-shell .cd-hero {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}
.quicko-design .customer-dashboard-shell .cd-pageHeader {
  margin: 8px 0 0 !important;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.quicko-design .customer-dashboard-shell .cd-heroAside {
  display: grid;
  gap: 12px;
}
.quicko-design .customer-dashboard-shell .cd-miniGrid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.quicko-design .customer-dashboard-shell .cd-asideInfo {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.quicko-design .customer-dashboard-shell .cd-asideInfo > div {
  background: none !important;
  border-width: 0 0 0 2px;
  border-radius: 0 !important;
  padding: 8px 12px;
}
.quicko-design .customer-dashboard-shell :is(.cd-miniMetric, .cd-metric) {
  min-height: 0;
  padding: 12px;
}
.quicko-design .customer-dashboard-shell :is(.cd-miniMetric, .cd-metric, .cd-asideInfo) strong {
  margin-top: 6px;
  overflow-wrap: anywhere;
}
.quicko-design .customer-dashboard-shell .cd-metric strong {
  font-size: 20px;
  line-height: 1.35;
}
.quicko-design .customer-dashboard-shell :is(.cd-miniMetric, .cd-metric, .cd-asideInfo) span {
  color: var(--qd-muted);
}
.quicko-design .customer-dashboard-shell .cd-upgradeFrame {
  padding: 0;
  gap: 12px;
}

@media (max-width: 760px) {
  .quicko-design .customer-dashboard-shell :is(.cd-miniGrid, .cd-snapshot) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .quicko-design .customer-dashboard-shell .cd-asideInfo {
    grid-template-columns: minmax(0, 1fr);
  }
  .quicko-design .customer-dashboard-shell .cd-asideInfo > div {
    display: grid;
    grid-template-columns: minmax(90px, 1fr) minmax(0, 2fr);
    align-items: start;
    gap: 8px;
  }
  .quicko-design .customer-dashboard-shell .cd-asideInfo strong {
    margin-top: 0;
    font-size: 14px;
  }
  .quicko-design[data-quicko-layout="workspace"] h1 {
    font-size: 26px !important;
  }
  .quicko-design :is(.qx-main, .workspace-shell, .emp-shell) {
    padding-inline: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .quicko-design {
    scroll-behavior: auto;
  }
}
