﻿:root {
  --eve-navy: #0f172a;
  --eve-teal: #0d9488;
  --eve-bg: #f1f5f9;
  --eve-card: #ffffff;
  --eve-border: #d8dee8;
  --eve-text: #111827;
  --eve-muted: #64748b;
  --eve-danger: #dc2626;
  --eve-warning: #b45309;
  --eve-success: #15803d;
  --eve-radius: 8px;
  --eve-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  --et-polish-line: #d9ded8;
  --et-polish-muted: #667085;
  --et-polish-ink: #111827;
  --et-polish-soft: #f7f8f5;
  --et-primary: #0d9488;
  --et-primary-hover: #0f766e;
  --et-sidebar-active: #134e4a;
  --et-polish-warn: #f97316;
  --et-polish-danger: #dc2626;
  --et-polish-good: #16a34a;
  --et-panel-radius: 8px;
  --et-card-gap: 12px;
  --et-card-min-height: 118px;
  --et-hover-shadow: 0 14px 34px rgba(15, 23, 42, 0.09);
  --et-icon-size: 34px;
  --et-page-bg: #f1f5f9;
  --et-card-bg: #ffffff;
  --et-card-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
  --et-card-shadow-hover: 0 16px 34px rgba(15, 23, 42, 0.09);
  --et-section-gap: 16px;
  --et-field-height: 44px;
  --et-sidebar-bg: #0f172a;
  --et-sidebar-muted: #9ca3af;
  --ws-neutral-accent: #475569;
  --ws-neutral-soft: #f8fafc;
  --ws-neutral-line: #d8dee8;
  --ws-finance-accent: #15803d;
  --ws-finance-soft: #ecfdf3;
  --ws-finance-line: #bbf7d0;
  --ws-project-accent: #1d4ed8;
  --ws-project-soft: #eff6ff;
  --ws-project-line: #bfdbfe;
  --ws-workflow-accent: #b45309;
  --ws-workflow-soft: #fffbeb;
  --ws-workflow-line: #fde68a;
  --ws-technical-accent: #6d28d9;
  --ws-technical-soft: #f5f3ff;
  --ws-technical-line: #ddd6fe;
  --ws-admin-accent: #334155;
  --ws-admin-soft: #f1f5f9;
  --ws-admin-line: #cbd5e1;
}

/* Shared EVE product language. Existing component names remain intact. */
:where(
  .primary-button,
  .secondary-button,
  .inline-button,
  .danger-button,
  .platform-action-button,
  .native-action-button,
  .drawer-engine-actions button,
  .form-actions button
) {
  min-height: 42px;
  border-radius: var(--eve-radius);
  font-weight: 650;
  letter-spacing: 0;
  transition:
    transform 140ms ease,
    background-color 140ms ease,
    border-color 140ms ease,
    box-shadow 140ms ease,
    color 140ms ease,
    opacity 140ms ease;
}

:where(
  .primary-button,
  .secondary-button,
  .inline-button,
  .danger-button,
  .platform-action-button,
  .native-action-button,
  .drawer-engine-actions button,
  .form-actions button
):active:not(:disabled) {
  transform: translateY(1px) scale(0.985);
}

:where(
  .primary-button,
  .platform-action-button.primary,
  .native-action-button.primary
) {
  border-color: var(--eve-teal);
  background: var(--eve-teal);
  color: #fff;
}

:where(
  .primary-button,
  .secondary-button,
  .inline-button,
  .danger-button,
  .platform-action-button,
  .native-action-button
):disabled,
[aria-busy="true"] {
  cursor: wait;
  opacity: 0.58;
  box-shadow: none;
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea
) {
  border-color: var(--eve-border);
  border-radius: var(--eve-radius);
  color: var(--eve-text);
}

:where(
  input:not([type="checkbox"]):not([type="radio"]),
  select
) {
  min-height: 42px;
}

:where(input, select, textarea, button, a):focus-visible {
  outline: 3px solid rgba(13, 148, 136, 0.2);
  outline-offset: 2px;
}

/* EVE 5.4: stable, restrained interaction hierarchy. */
:where(
  .platform-workspace-actions,
  .native-workspace-actions,
  .detail-actions,
  .form-actions,
  .drawer-engine-actions
) {
  gap: 10px;
}

:where(
  .platform-workspace-actions,
  .native-workspace-actions,
  .detail-actions,
  .form-actions,
  .drawer-engine-actions
) > :where(button, a):not(.primary-button):not([type="submit"]) {
  box-shadow: none;
}

:where(
  .platform-view-content,
  .workspace-content,
  .native-workspace-content,
  .today-panel-grid
)[aria-busy="true"] {
  min-height: 180px;
}

.global-search-ranked {
  display: grid;
  gap: 0;
}

.global-search-ranked .global-search-result-row {
  animation: eve-result-in 140ms ease both;
}

.task-save-message:not(:empty) {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
  padding: 8px 10px;
}

.task-message-action {
  min-height: 32px;
  border: 1px solid currentColor;
  border-radius: 7px;
  background: transparent;
  color: inherit;
  padding: 5px 10px;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.client-select-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  width: 100%;
  margin: 5px 0 7px;
}

.client-select-search input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
}

.client-select-search button {
  min-height: 40px;
  padding-inline: 14px;
  white-space: nowrap;
}

.client-select-search small {
  grid-column: 1 / -1;
  min-height: 16px;
  color: var(--eve-muted);
  font-size: 12px;
  font-weight: 500;
}

.onedrive-browser-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}

.onedrive-browser-toolbar h3 {
  margin: 3px 0 0;
  font-size: 18px;
}

.onedrive-browser-scope {
  display: inline-flex;
  gap: 3px;
  margin-top: 10px;
  padding: 3px;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #f8fafc;
}

.onedrive-browser-scope button {
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  padding: 6px 11px;
  background: transparent;
  color: #475467;
  font: inherit;
  font-weight: 700;
}

.onedrive-browser-scope button.active {
  background: #fff;
  color: #0f766e;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.onedrive-browser-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: min(100%, 420px);
}

.onedrive-browser-actions input {
  flex: 1 1 220px;
  min-width: 0;
}

.onedrive-live-list {
  display: grid;
  gap: 8px;
}

.onedrive-file-row.folder {
  border-style: dashed;
  background: #f8fafc;
}

.onedrive-file-row.folder.selected {
  border-color: #0d9488;
  border-style: solid;
  background: #f0fdfa;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.onedrive-file-row.folder .document-icon {
  background: #ecfeff;
  color: #0f766e;
}

.onedrive-selected-folder {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.onedrive-selected-folder span,
.onedrive-selected-folder strong {
  display: block;
}

.onedrive-selected-folder span {
  margin-bottom: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .onedrive-selected-folder {
    align-items: stretch;
    flex-direction: column;
  }

  .onedrive-selected-folder .primary-button {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .onedrive-browser-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .onedrive-browser-actions {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
  }

  .onedrive-browser-actions input {
    flex-basis: calc(100% - 90px);
  }
}

@keyframes eve-result-in {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

:where(
  .panel,
  .workflow-card,
  .workspace-card,
  .platform-card,
  .native-card,
  .invoice-panel,
  .invoice-stat,
  .workspace-empty-state
) {
  border-color: var(--eve-border);
  border-radius: var(--eve-radius);
  background: var(--eve-card);
  box-shadow: var(--eve-shadow);
}

:where(
  .today-panel,
  .eve-executive-card,
  .mobile-coo-card,
  .workspace-card,
  .platform-card,
  .native-card,
  .invoice-panel,
  .invoice-stat
) {
  animation: eve-card-enter 160ms ease-out both;
  transition:
    border-color 150ms ease,
    box-shadow 150ms ease,
    transform 150ms ease;
}

:where(
  .today-panel,
  .eve-executive-card,
  .workspace-card,
  .platform-card,
  .native-card
):hover {
  border-color: #cbd5e1;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.075);
}

:where(
  .drawer-engine-backdrop,
  .invoice-drawer-backdrop,
  .modal-backdrop,
  .command-palette-overlay
) {
  animation: eve-fade-in 140ms ease-out both;
}

:where(
  .drawer-engine-panel,
  .invoice-drawer,
  .modal,
  .command-palette
) {
  animation: eve-panel-enter 160ms ease-out both;
}

@keyframes eve-card-enter {
  from {
    opacity: 0;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes eve-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes eve-panel-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

:where(.status-badge, .platform-status-badge, .native-chip, .invoice-chip) {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0;
}

:where(.workspace-empty-state, .command-empty, .global-search-empty) {
  color: var(--eve-muted);
}

:where(.workspace-empty-state) {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 24px;
  border: 1px dashed var(--eve-border);
  box-shadow: none;
}

.et-workspace-standard body,
.et-workspace-standard-body {
  background: var(--et-page-bg);
}

.standard-workspace-main,
.main,
.workflow-main,
.calendar-main {
  background: var(--et-page-bg);
}

.standard-workspace-page,
.page,
.workflow-main,
.calendar-main {
  color: var(--et-polish-ink);
}

.standard-workspace-page {
  max-width: 1680px;
  margin-inline: auto;
}

.standard-workspace-topbar {
  min-height: 72px;
  border-bottom: 1px solid #e5e7eb;
  background: rgba(248, 250, 252, 0.96);
  backdrop-filter: blur(10px);
}

.workflow-topbar,
.calendar-topbar,
.topbar {
  min-height: 72px;
}

.workflow-sidebar .brand img {
  width: 36px;
  height: 36px;
}

.workflow-sidebar nav a {
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
}

.platform-breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin: 0 0 10px;
  color: var(--et-polish-muted);
  font-size: 12px;
  font-weight: 650;
}

.platform-breadcrumbs a {
  color: var(--et-polish-muted);
  text-decoration: none;
}

.platform-breadcrumbs a:hover {
  color: var(--et-polish-ink);
}

.platform-breadcrumbs .separator {
  color: #94a3b8;
}

.platform-quick-create-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 0 0 12px 0;
  padding: 10px 14px;
  background: var(--et-primary);
  color: #fff;
  border: none;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s;
}

.platform-quick-create-btn:hover {
  background: var(--et-primary-hover);
}

.today-standalone {
  display: grid;
  gap: 16px;
}

.today-hero {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 18px;
  border: 1px solid var(--et-polish-line);
  border-radius: var(--et-panel-radius);
  background: #fff;
  box-shadow: var(--et-card-shadow);
}

.today-hero h1 {
  margin: 3px 0 4px;
  font-size: 24px;
}

.today-hero p {
  margin: 0;
  color: var(--et-polish-muted);
}

.eve-home {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px 16px 28px;
  max-width: 980px;
}

.eve-executive-briefing {
  position: relative;
  display: grid;
  gap: 12px;
  border-radius: 12px;
  background: #111827;
  color: #f8fafc;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .12);
}

.eve-executive-briefing > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.eve-executive-briefing h1,
.eve-executive-briefing h2 {
  margin: 0;
}

.eve-executive-briefing h1 {
  font-size: 24px;
  line-height: 1.2;
}

.eve-executive-briefing h2 {
  margin-top: 5px;
  color: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
}

.eve-briefing-copy {
  max-width: 760px;
  margin: 0;
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.55;
}

.eve-highest-priority {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(255,255,255,.12);
  border-left: 4px solid #14b8a6;
  border-radius: 8px;
  background: rgba(255,255,255,.055);
  padding: 13px 14px;
}

.eve-highest-priority > span,
.eve-top-three > header span,
.eve-completed-today > header span {
  color: #99f6e4;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.eve-highest-priority strong {
  font-size: 18px;
  line-height: 1.25;
}

.eve-highest-priority p,
.eve-highest-priority details p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.45;
}

.eve-highest-priority > a {
  justify-self: start;
  margin-top: 2px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  padding: 0 14px;
  font-weight: 800;
  text-decoration: none;
}

.eve-highest-priority details summary {
  width: fit-content;
  color: #99f6e4;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.eve-top-three {
  display: grid;
  gap: 8px;
}

.eve-top-three ol {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.eve-top-three li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 76px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.05);
  padding: 9px 10px;
}

.eve-top-three li.is-completing,
.coo-recommendation-item.is-completing,
.operations-order-list li.is-completing {
  opacity: .68;
}

.eve-top-three li.is-completed,
.coo-recommendation-item.is-completed,
.operations-order-list li.is-completed {
  transform: scale(.99);
  opacity: .62;
}

.eve-top-three li.is-completed::after,
.coo-recommendation-item.is-completed::after,
.operations-order-list li.is-completed::after {
  content: "Completed";
  color: #0d9488;
  font-size: 12px;
  font-weight: 900;
}

.eve-top-three a {
  display: grid;
  gap: 4px;
  min-width: 0;
  color: #f8fafc;
  text-decoration: none;
}

.eve-top-three a strong,
.eve-top-three a small,
.eve-top-three a span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eve-top-three a small {
  color: #cbd5e1;
}

.eve-top-three a span,
.eve-top-three em {
  display: inline-flex;
  gap: 5px;
  align-items: center;
}

.eve-top-three a span b,
.eve-top-three em b {
  color: #94a3b8;
  font-size: 10px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.eve-top-three em {
  color: #99f6e4;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.eve-completed-today {
  display: grid;
  gap: 6px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .025);
}

.eve-completed-today header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.eve-completed-today header span {
  color: #0f766e;
}

.eve-completed-today header strong {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
}

.eve-completed-today article {
  display: grid;
  gap: 2px;
  border-top: 1px solid #eef2f7;
  padding-top: 7px;
}

.eve-completed-today article > span {
  color: #0d9488;
  font-size: 11px;
  font-weight: 850;
}

.eve-completed-today article small,
.eve-completed-today p {
  margin: 0;
  color: #64748b;
}

.today-focus-mode [data-focus-secondary],
.today-focus-mode #evePanelOverflow,
.today-focus-mode #eveSeeAllBtn {
  display: none !important;
}

.today-focus-mode .eve-executive-briefing::after {
  content: "Focus Mode On";
  position: absolute;
  right: 18px;
  bottom: 18px;
  border: 1px solid rgba(153,246,228,.32);
  border-radius: 999px;
  color: #99f6e4;
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 850;
}

.eve-hero-card {
  background: #0f172a;
  border-radius: 16px;
  padding: 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eve-hero-date {
  font-size: 11px;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.eve-hero-headline {
  font-size: 22px;
  font-weight: 500;
  color: #f8fafc;
  line-height: 1.3;
  margin: 2px 0 0;
}

.eve-hero-sub {
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
  margin: 0 0 6px;
}

.eve-ask-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.05);
  border: 0.5px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.eve-ask-row:hover { background: rgba(255,255,255,0.08); }
.eve-ask-row i { font-size: 16px; color: #64748b; }
.eve-ask-row span { font-size: 12px; color: #94a3b8; flex: 1; }
.eve-ask-row .eve-ask-go {
  font-size: 11px;
  font-weight: 500;
  color: #f8fafc;
  background: var(--et-primary);
  border-radius: 6px;
  padding: 4px 10px;
  flex: 0 0 auto;
}

.eve-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 2px;
}

.eve-chip {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 99px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: opacity 0.15s;
}
.eve-chip:hover { opacity: 0.75; }
.eve-chip-red { background: #fef2f2; color: #b42318; }
.eve-chip-amber { background: #fffbeb; color: #92400e; }
.eve-chip-blue { background: #eff6ff; color: #1e40af; }
.eve-chip-green { background: #f0fdf4; color: #166534; }
.eve-chip-purple { background: #ede9fe; color: #5b21b6; }
a.eve-chip { text-decoration: none; display: inline-flex; align-items: center; }

.eve-priorities {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.eve-section-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--color-text-secondary, var(--et-polish-muted, #667085));
  padding: 0 2px;
  margin-bottom: 2px;
}

.eve-pri-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-background-primary, var(--et-polish-card, #fff));
  border: 0.5px solid var(--color-border-tertiary, var(--et-polish-line, #e5e7eb));
  border-radius: 12px;
  padding: 13px 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.15s;
}
.eve-pri-card:hover { background: var(--color-background-secondary, var(--et-polish-soft, #f8fafc)); }

.eve-pri-card-top {
  border-left: 2px solid #1d4ed8;
  border-radius: 0 12px 12px 0;
}

.eve-pri-num {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary, var(--et-polish-muted, #667085));
  width: 16px;
  text-align: center;
  flex-shrink: 0;
}
.eve-pri-num-top { color: #1d4ed8; }

.eve-pri-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.eve-pri-body strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary, var(--et-polish-ink, #111827));
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.eve-pri-body em {
  font-size: 11px;
  color: var(--color-text-secondary, var(--et-polish-muted, #667085));
  font-style: normal;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.eve-pri-arrow {
  font-size: 16px;
  color: var(--color-text-secondary, var(--et-polish-muted, #667085));
  flex-shrink: 0;
}

.eve-see-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--color-border-tertiary, var(--et-polish-line, #e5e7eb));
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  color: var(--color-text-secondary, var(--et-polish-muted, #667085));
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.eve-see-all-btn i { font-size: 14px; }
.eve-see-all-btn:hover { background: var(--color-background-secondary, var(--et-polish-soft, #f8fafc)); }

.eve-panel-overflow { margin-top: 4px; }
.eve-panel-overflow[hidden] { display: none; }

.eve-briefing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.eve-briefing-section {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--et-polish-line);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.025);
}

.eve-briefing-section > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 10px;
  border-bottom: 1px solid #eef0eb;
}

.eve-briefing-section > header div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eve-briefing-section > header .eve-section-label {
  margin: 0;
}

.eve-briefing-section > header strong {
  display: inline-grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 999px;
  background: #ecfdf5;
  color: #0f766e;
  font-size: 11px;
}

.eve-briefing-section > header a {
  color: #0f766e;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}

.eve-briefing-item {
  display: grid;
  gap: 2px;
  padding: 11px 14px;
  border-bottom: 1px solid #f0f2ee;
  color: var(--et-polish-ink);
  text-decoration: none;
}

.eve-briefing-item:last-child {
  border-bottom: 0;
}

.eve-briefing-item:hover,
.eve-briefing-item:focus-visible {
  background: #f6fbfa;
  outline: 0;
}

.eve-briefing-item span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eve-briefing-item small {
  overflow: hidden;
  color: var(--et-polish-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .eve-home { padding: 10px 10px 20px; gap: 12px; }
  .eve-executive-briefing { padding: 16px; }
  .eve-executive-briefing > header { align-items: stretch; flex-direction: column; }
  .eve-top-three ol { grid-template-columns: 1fr; }
  .eve-hero-headline { font-size: 19px; }
  .eve-briefing-grid { grid-template-columns: 1fr; }
}

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

.today-panel {
  min-height: 188px;
  border: 1px solid var(--et-polish-line);
  border-radius: var(--et-panel-radius);
  background: #fff;
  box-shadow: var(--et-card-shadow);
  overflow: hidden;
}

.today-panel header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #edf1f6;
  background: #f8fafc;
}

.today-panel h2 {
  margin: 0;
  font-size: 14px;
}

.today-count {
  min-width: 28px;
  border-radius: 999px;
  padding: 4px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  background: #e2e8f0;
}

.today-panel-list {
  display: grid;
  gap: 0;
  max-height: 330px;
  overflow: auto;
}

.today-item {
  display: grid;
  gap: 5px;
  padding: 11px 14px;
  border-bottom: 1px solid #edf1f6;
  color: var(--et-polish-ink);
  text-decoration: none;
}

.today-item:hover {
  background: #f8fafc;
}

.today-item strong {
  font-size: 13px;
}

.today-item span {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.today-empty {
  padding: 18px 14px;
  color: var(--et-polish-muted);
  font-size: 13px;
}

.today-panel-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  border-top: 1px solid #f1f5f9;
  background: #fafbfc;
  gap: 8px;
}

.today-view-all {
  font-size: 11px;
  color: #667085;
  text-decoration: none;
  white-space: nowrap;
}

.today-view-all:hover {
  color: #0d9488;
  text-decoration: underline;
}

.today-view-all-empty {
  display: block;
  flex: 1;
}

.today-panel-cta {
  font-size: 11px;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
}

.today-panel-cta:hover {
  background: #1d4ed8;
}

.today-count-zero {
  background: #f1f5f9;
  color: #94a3b8;
}

.today-focus-active [data-panel-title="Outstanding Invoices"],
.today-focus-active [data-panel-title="Quote Follow-ups"],
.today-focus-active [data-panel-title="Quotation Follow-ups"],
.today-focus-active [data-panel-title="Revenue Opportunities"],
.today-focus-active [data-panel-title="Recent AI Imports"],
.today-focus-active [data-panel-title="Today's Site Visits"],
.today-focus-active [data-panel-title="Overdue Council Items"],
.today-focus-active [data-panel-title="Overdue Tasks"] {
  display: none;
}

.today-focus-toggle[data-focus-active="true"] {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.today-panel {
  min-height: 0;
}

.today-panel header {
  padding: 10px 14px;
}

.today-panel h2 {
  font-size: 13px;
  font-weight: 500;
}

.today-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  min-width: 22px;
}

.today-item {
  padding: 9px 14px;
  gap: 3px;
}

.today-item strong {
  font-size: 12px;
  font-weight: 500;
}

.today-item span {
  font-size: 11px;
}

.today-empty {
  padding: 14px;
  font-size: 12px;
  color: #94a3b8;
}

/* EVE - Priority panel */
.today-priority-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 0.5px solid #f3f4f6;
  text-decoration: none;
  color: inherit;
}

.today-priority-item:hover {
  background: #f8fafc;
}

.today-priority-rank {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}

.today-priority-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.today-priority-body strong {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
}

.today-priority-body em {
  font-size: 11px;
  color: #667085;
  font-style: normal;
  line-height: 1.4;
}

/* EVE - Priority badge on panel header */
.today-panel-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 99px;
  background: #fffbeb;
  color: #b45309;
  margin-left: 6px;
}

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

@media (max-width: 720px) {
  .today-panel-grid {
    grid-template-columns: 1fr;
  }
}

.standard-card,
.productivity-page,
.today-command-centre,
.follow-up-system,
.templates-library,
.project-timeline-polish,
.backup-reminder-panel {
  border: 1px solid var(--et-polish-line);
  border-radius: var(--et-panel-radius);
  background: var(--et-card-bg);
  box-shadow: var(--et-card-shadow);
}

.standard-card:hover,
.role-workspace-card:hover,
.document-card:hover,
.template-card:hover {
  box-shadow: var(--et-card-shadow-hover);
}

.workspace-panel-head,
.workspace-list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workspace-panel-head h2,
.workspace-list-head h3 {
  margin: 2px 0 4px;
}

.workspace-panel-head p,
.workspace-list-head span,
.workspace-helper-strip {
  color: var(--et-polish-muted);
}

.workspace-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.workspace-helper-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  font-size: 13px;
}

.standard-table {
  width: 100%;
  border-collapse: collapse;
}

.standard-table th {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  text-transform: none;
}

.standard-table th,
.standard-table td {
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 14px;
  vertical-align: middle;
}

.workspace-empty-state {
  display: grid;
  gap: 6px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 18px;
  background: #f8fafc;
  color: #475569;
}

.workspace-empty-state strong {
  color: #111827;
}

.utility-drawer-card {
  max-width: 1240px;
}

.utility-drawer {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.utility-drawer summary {
  cursor: pointer;
  padding: 12px 14px;
  color: #334155;
  font-weight: 800;
}

.utility-drawer[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.standard-workspace-page input,
.standard-workspace-page select,
.standard-workspace-page textarea,
.standard-card input,
.standard-card select,
.standard-card textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  min-height: var(--et-field-height);
}

.standard-workspace-page label {
  color: #334155;
}

.primary-button,
.inline-button,
.logout-button {
  border-radius: 8px;
  transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.primary-button {
  border-color: var(--et-primary);
  background: var(--et-primary);
  color: #fff;
}

.primary-button:hover,
.primary-button:focus-visible {
  border-color: var(--et-primary-hover);
  background: var(--et-primary-hover);
  color: #fff;
}

.primary-button:hover,
.inline-button:hover,
.logout-button:hover {
  transform: translateY(-1px);
}

.module-primary-action {
  white-space: nowrap;
}

.global-new-project-button {
  white-space: nowrap;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(13, 148, 136, 0.18);
}

.sidebar-new-project-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 20px);
  min-height: 44px;
  margin: -6px 10px 18px;
  border: 1px solid rgba(45, 212, 191, 0.32);
  border-radius: 8px;
  background: #0d9488;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(13, 148, 136, 0.22);
  transition: transform 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.sidebar-new-project-button:hover,
.sidebar-new-project-button:focus-visible {
  background: #0f766e;
  transform: translateY(-1px);
  box-shadow: 0 16px 32px rgba(13, 148, 136, 0.28);
}

.primary-create-highlight {
  outline: 2px solid #2563eb;
  outline-offset: 3px;
  box-shadow: 0 0 0 6px rgba(37, 99, 235, 0.12);
  transition: box-shadow 0.2s ease, outline-color 0.2s ease;
}

.standard-workspace-page a:focus-visible,
.standard-workspace-page button:focus-visible,
.standard-workspace-page input:focus-visible,
.standard-workspace-page select:focus-visible,
.standard-workspace-page textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.global-search-widget {
  position: relative;
  width: min(460px, 100%);
}

.global-search-widget input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--et-polish-ink);
  outline: 0;
}

.global-search-widget input:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.global-search-results {
  position: absolute;
  inset: calc(100% + 8px) 0 auto auto;
  z-index: 80;
  width: min(640px, calc(100vw - 32px));
  max-height: min(620px, 78vh);
  overflow: auto;
  border: 1px solid var(--et-polish-line);
  border-radius: 10px;
  padding: 10px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.22);
}

.global-search-group {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
}

.global-search-group h3 {
  margin: 4px 4px 2px;
  color: var(--et-polish-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.global-search-result {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--et-polish-ink);
  text-align: left;
  cursor: pointer;
}

.global-search-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 6px;
}

.global-search-result-type {
  color: var(--eve-teal) !important;
  font-size: 10px !important;
  font-weight: 800;
  text-transform: uppercase;
}

.global-search-result-open {
  min-width: 60px;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 0 10px;
  background: #fff;
  color: var(--eve-teal);
  font-weight: 700;
  cursor: pointer;
}

.global-search-result-open:hover,
.global-search-result-open:focus-visible {
  border-color: var(--eve-teal);
  background: #f0fdfa;
}

.global-search-result:hover,
.global-search-result:focus-visible {
  border-color: #111827;
  background: #f9fafb;
  outline: 0;
}

.global-search-result strong {
  font-size: 14px;
}

.global-search-result span {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.global-search-empty {
  margin: 0;
  padding: 12px;
  color: var(--et-polish-muted);
}

.productivity-page,
.today-command-centre,
.follow-up-system,
.templates-library,
.project-timeline-polish,
.backup-reminder-panel {
  display: grid;
  gap: 14px;
  margin: 14px 0 18px;
  border: 1px solid var(--et-polish-line);
  border-radius: var(--et-panel-radius);
  padding: 16px;
  background: #fff;
}

.productivity-head,
.backup-reminder-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.productivity-head h2,
.productivity-head p,
.backup-reminder-panel p {
  margin: 0;
}

.productivity-head h2 {
  font-size: 22px;
}

.productivity-head p,
.backup-reminder-panel p,
.template-card p,
.timeline-entry p {
  color: var(--et-polish-muted);
  line-height: 1.45;
}

.productivity-actions,
.timeline-tools,
.follow-up-filters,
.follow-up-card-actions,
.template-card footer {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.productivity-actions .primary-button,
.global-quick-capture {
  background: #111827;
  color: #fff;
}

.today-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.today-summary-strip article {
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.today-summary-strip span,
.today-section header span,
.follow-up-column header span {
  color: var(--et-polish-muted);
  font-size: 12px;
  font-weight: 700;
}

.today-summary-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 24px;
}

.eve-coo-workspace {
  gap: 16px;
}

.eve-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
  padding: 18px;
  border: 1px solid #d8e1ef;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(30, 41, 59, 0.94)),
    #111827;
  color: #fff;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.16);
}

.eve-hero h2,
.eve-hero p {
  margin: 0;
}

.eve-hero h2 {
  margin-top: 4px;
  font-size: 28px;
  letter-spacing: 0;
}

.eve-hero p {
  max-width: 860px;
  color: #dbeafe;
  line-height: 1.55;
}

.eve-hero .eyebrow {
  color: #bfdbfe;
}

.eve-approval-rule,
.eve-mode-card {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
}

.eve-approval-rule {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  padding: 10px 12px;
}

.eve-approval-rule span {
  color: #e0f2fe;
}

.eve-mode-card {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px;
}

.eve-mode-card span,
.eve-mode-card small {
  color: #cbd5e1;
}

.eve-mode-card strong {
  font-size: 20px;
}

.eve-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eve-status-grid article {
  background: #fff;
}

.eve-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 14px;
}

.eve-priority-panel,
.eve-command-panel {
  display: grid;
  gap: 9px;
  border: 1px solid var(--et-polish-line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
}

.eve-command-panel-highlight {
  border-color: #0d9488;
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.18), var(--et-card-shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Client Update Drafter */
.today-item-with-action {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}

.today-item-with-action .today-item,
.today-item-with-action .productivity-item {
  flex: 1;
  min-width: 0;
}

.client-update-draft-btn {
  flex-shrink: 0;
  font-size: 11px;
  padding: 4px 10px;
  margin: 4px 8px 4px 4px;
  opacity: 0.7;
  transition: opacity 0.15s;
  white-space: nowrap;
}

.today-item-with-action:hover .client-update-draft-btn {
  opacity: 1;
}

.client-update-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.client-update-section {
  padding: 0 0 16px;
}

.client-update-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.client-update-section-head strong {
  font-size: 13px;
  font-weight: 500;
  color: #111827;
}

.client-update-status {
  font-size: 11px;
  color: #667085;
}

.client-update-tone {
  display: grid;
  gap: 5px;
  margin-bottom: 8px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.client-update-tone select {
  border: 1px solid #d1d5db;
  border-radius: 7px;
  background: #ffffff;
  color: #111827;
  min-height: 36px;
  padding: 7px 9px;
}

.client-update-textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 7px;
  padding: 10px 12px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  color: #111827;
  background: #fff;
  box-sizing: border-box;
  line-height: 1.5;
}

.client-update-textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.client-update-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.eve-draft-warnings {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  padding: 8px 10px;
  font-size: 12px;
}

.eve-draft-warnings p {
  margin: 0;
}

.client-update-wa-link {
  font-size: 12px;
  padding: 5px 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.client-update-note {
  font-size: 11px;
  color: #9ca3af;
}

.client-update-divider {
  border-top: 1px solid #f3f4f6;
  margin: 0 0 16px;
}

.client-update-approval-note {
  font-size: 11px;
  color: #9ca3af;
  padding-top: 8px;
  border-top: 1px solid #f3f4f6;
  line-height: 1.4;
}

.eve-priority-panel > header,
.eve-command-panel > header,
.eve-review-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eve-priority-panel h3,
.eve-command-panel h3,
.eve-review-card h4 {
  margin: 2px 0 0;
  font-size: 16px;
}

.eve-priority-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.eve-priority-list li::marker {
  color: #0d9488;
  font-weight: 800;
}

.eve-priority-list a {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  color: var(--et-polish-ink);
  text-decoration: none;
  background: #f8fafc;
}

.eve-priority-list a:hover,
.eve-priority-list a:focus-visible {
  border-color: #93c5fd;
  background: #eff6ff;
  outline: 0;
}

.eve-priority-list span,
.eve-next-action small {
  color: var(--et-polish-muted);
}

.eve-priority-list em,
.eve-pill,
.eve-confidence {
  justify-self: start;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.eve-priority-list em.danger {
  background: #fff1f2;
  color: #b42318;
}

.eve-priority-list em.warn {
  background: #fffbeb;
  color: #b45309;
}

.eve-priority-list em.good {
  background: #f0fdf4;
  color: #166534;
}

.eve-next-action {
  display: grid;
  gap: 4px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 12px;
  background: #eff6ff;
}

.eve-next-action p {
  margin: 0;
  font-weight: 800;
}

.eve-command-panel form {
  display: grid;
  gap: 8px;
}

.eve-command-panel label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-weight: 700;
}

.eve-command-panel textarea {
  width: 100%;
  min-height: 68px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  line-height: 1.35;
  resize: vertical;
}

.eve-command-panel textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: 0;
}

.eve-command-examples,
.eve-command-panel footer,
.eve-review-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.eve-command-examples button {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 12px;
}

.eve-command-review {
  display: grid;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}

.eve-command-review > p {
  margin: 0;
  color: var(--et-polish-muted);
}

.eve-thinking {
  display: grid;
  gap: 6px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
}

.eve-thinking span {
  color: #64748b;
  font-size: 13px;
}

.eve-thinking span.active {
  color: #0f172a;
  font-weight: 850;
}

.eve-thinking span.done::before {
  content: "✓ ";
  color: #0d9488;
  font-weight: 900;
}

.eve-review-card {
  display: grid;
  gap: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
}

.eve-review-card.warn {
  border-color: #fed7aa;
  background: #fffbeb;
}

.eve-review-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.eve-review-card dl > div {
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  padding: 9px 10px;
  background: #fff;
}

.eve-review-card dt {
  color: var(--et-polish-muted);
  font-size: 12px;
  font-weight: 800;
}

.eve-review-card dd {
  margin: 3px 0 0;
  color: var(--et-polish-ink);
}

.eve-command-warnings {
  display: grid;
  gap: 6px;
}

.eve-command-warnings p {
  margin: 0;
  border-left: 3px solid #f59e0b;
  padding: 7px 9px;
  background: #fffbeb;
  color: #92400e;
}

.eve-command-result h4 {
  margin: 2px 0 0;
  color: var(--et-polish-ink);
  font-size: 18px;
}

.eve-response-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.eve-response-flow > div {
  min-width: 0;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 9px 10px;
  background: #f8fafc;
}

.eve-response-flow dt {
  color: var(--eve-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.eve-response-flow dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  color: var(--eve-text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.eve-response-details {
  border-top: 1px solid var(--eve-border);
  padding-top: 8px;
}

.eve-response-details > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--eve-teal);
  font-size: 12px;
  font-weight: 800;
}

.eve-response-details[open] > summary {
  margin-bottom: 8px;
}

@media (max-width: 980px) {
  .eve-response-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .eve-response-flow {
    grid-template-columns: 1fr;
  }
}

.eve-command-workload {
  display: grid;
  gap: 3px;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  padding: 10px 12px;
  background: #f0fdfa;
  color: #0f766e;
}

.eve-command-workload span {
  color: #115e59;
  font-size: 12px;
}

.eve-command-results-list {
  display: grid;
  gap: 8px;
}

.eve-command-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}

.eve-command-result-row > a {
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

.eve-command-result-row span {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.eve-command-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.eve-command-suggestions span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.eve-command-draft-task {
  display: grid;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 10px;
  background: #eff6ff;
}

.operations-director-briefing {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: 18px;
  border: 1px solid #d8dee8;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.operations-director-briefing > header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

.operations-director-briefing h2,
.operations-can-wait h3 {
  margin: 0;
  color: #111827;
}

.operations-order-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.operations-order-list li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 9px 0;
  border-bottom: 1px solid #eef2f7;
}

.operations-order-list a {
  display: grid;
  gap: 3px;
  color: inherit;
  text-decoration: none;
}

.operations-order-content {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.operations-order-action {
  color: #0f172a !important;
  font-size: 15px;
  font-weight: 850;
}

.operations-order-facts {
  display: grid;
  grid-template-columns: minmax(110px, 0.8fr) minmax(190px, 2fr) minmax(80px, 0.55fr) minmax(100px, 0.65fr) minmax(80px, 0.55fr);
  gap: 8px 14px;
  margin: 0;
}

.operations-order-facts div {
  min-width: 0;
}

.operations-order-facts dt {
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.operations-order-facts dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: #334155;
  font-size: 13px;
  line-height: 1.35;
}

.operations-order-details {
  width: fit-content;
  max-width: 100%;
}

.operations-order-details summary {
  cursor: pointer;
  color: #0f766e;
  font-size: 12px;
  font-weight: 800;
}

.operations-order-details p {
  max-width: 860px;
  margin: 7px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.5;
}

.eve-recommendation-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  margin-top: -2px;
  cursor: pointer;
}

.eve-recommendation-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.eve-recommendation-checkmark {
  width: 21px;
  height: 21px;
  border: 2px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 3px #fff;
  transition: border-color 140ms ease, background-color 140ms ease, transform 140ms ease;
}

.eve-recommendation-check input:focus-visible + .eve-recommendation-checkmark {
  outline: 3px solid rgba(13, 148, 136, 0.22);
  outline-offset: 2px;
}

.eve-recommendation-check input:checked + .eve-recommendation-checkmark {
  border-color: #0d9488;
  background: #0d9488;
  transform: scale(1.04);
}

@media (max-width: 980px) {
  .operations-order-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.operations-order-list li.is-done {
  opacity: 0.58;
}

.operations-order-list li.is-done strong,
.operations-order-list li.is-done span {
  text-decoration: line-through;
}

.operations-order-list strong {
  color: #0f172a;
}

.operations-order-list span,
.operations-order-list small,
.operations-decision-summary,
.operations-can-wait span {
  color: #64748b;
}

.operations-decision-summary {
  margin: 0;
  font-weight: 800;
}

.operations-can-wait {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.operations-can-wait h3 {
  width: 100%;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.operations-can-wait span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.mobile-coo-card {
  display: grid;
  gap: 12px;
  margin: 16px 0;
  padding: 14px;
  border: 1px solid #d8dee8;
  border-radius: 16px;
  background: #ffffff;
}

.mobile-coo-brief {
  display: grid;
  gap: 4px;
}

.mobile-coo-brief span {
  color: #0d9488;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-coo-brief strong {
  color: #111827;
  font-size: 18px;
}

.mobile-coo-brief small {
  color: #64748b;
}

.mobile-coo-actions,
.mobile-site-mode,
.eve-voice-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-coo-actions button,
.mobile-coo-actions a,
.mobile-site-mode button,
.mobile-site-mode a {
  min-height: 44px;
  border: 1px solid #d8dee8;
  border-radius: 12px;
  padding: 10px 12px;
  background: #f8fafc;
  color: #111827;
  font-weight: 800;
  text-decoration: none;
}

.mobile-coo-actions [data-mobile-eve-action="ask"],
.mobile-coo-actions .mobile-coo-primary {
  background: #0d9488;
  color: #fff;
  border-color: #0d9488;
}

.mobile-coo-more {
  border-top: 1px solid var(--eve-border);
  padding-top: 10px;
}

.mobile-coo-more > summary {
  width: fit-content;
  cursor: pointer;
  color: var(--eve-teal);
  font-size: 13px;
  font-weight: 800;
}

.mobile-coo-more[open] > summary {
  margin-bottom: 10px;
}

.eve-voice-toolbar {
  align-items: center;
}

.eve-voice-feedback {
  margin: 8px 0 0;
  border-left: 3px solid #94a3b8;
  padding: 7px 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.4;
}

.eve-voice-feedback[data-tone="speaking"],
.eve-voice-feedback[data-tone="ready"],
.eve-voice-feedback[data-tone="success"] {
  border-left-color: #0d9488;
  background: #f0fdfa;
  color: #0f766e;
}

.eve-voice-feedback[data-tone="error"] {
  border-left-color: #dc2626;
  background: #fef2f2;
  color: #b91c1c;
}

.eve-voice-settings {
  flex: 0 1 auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 6px 9px;
  background: #f8fafc;
}

.eve-advanced-controls {
  min-width: 150px;
}

.eve-advanced-controls[open] {
  flex: 1 1 260px;
}

.eve-advanced-controls .inline-button {
  margin-top: 8px;
}

.eve-voice-settings summary {
  cursor: pointer;
  font-weight: 800;
}

.eve-voice-settings label {
  margin-top: 8px;
}

.eve-voice-session {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  padding: 12px;
  background: #f8fafc;
}

.eve-voice-session[hidden] {
  display: none;
}

.eve-voice-session > header,
.eve-session-controls,
.eve-session-modes {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.eve-voice-session > header {
  justify-content: space-between;
}

.eve-voice-session h4 {
  margin: 2px 0 0;
  font-size: 18px;
}

.eve-session-modes button {
  border: 1px solid #cbd5e1;
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 800;
  color: #334155;
}

.eve-session-modes button.active {
  border-color: #0d9488;
  background: #ccfbf1;
  color: #115e59;
}

.eve-session-autospeak {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
}

.eve-session-log {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding: 4px;
}

.eve-session-message {
  max-width: min(720px, 100%);
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 10px 12px;
  background: #fff;
}

.eve-session-message.eve {
  background: #0f172a;
  color: #e2e8f0;
  border-color: #1e293b;
}

.eve-session-message strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #0d9488;
}

.eve-session-message p {
  margin: 0;
  line-height: 1.45;
}

.eve-session-suggestions {
  display: grid;
  gap: 10px;
}

.eve-session-suggestion {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe4ef;
  border-radius: 14px;
  padding: 12px;
  background: #fff;
}

.eve-session-suggestion span {
  color: #64748b;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.eve-session-suggestion div {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.proposal-assistant-panel {
  border-color: #ccfbf1;
  background: #f0fdfa;
}

.proposal-assistant-grid {
  margin-top: 10px;
}

.proposal-assistant-output {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.proposal-assistant-review {
  display: grid;
  gap: 10px;
}

.proposal-assistant-actions {
  flex-wrap: wrap;
}

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

.today-section,
.follow-up-column,
.template-card {
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.today-section header,
.follow-up-column header,
.template-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--et-polish-line);
}

.today-section h3,
.follow-up-column h3,
.template-card strong {
  margin: 0;
  font-size: 15px;
}

.today-section.danger header,
.follow-up-card.danger {
  background: #fff1f2;
  border-color: #fecdd3;
}

.today-section.good header,
.follow-up-card.good {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.today-section.finance header {
  background: var(--ws-finance-soft);
  border-color: var(--ws-finance-line);
}

.today-section.project header {
  background: var(--ws-project-soft);
  border-color: var(--ws-project-line);
}

.today-section.workflow header {
  background: var(--ws-workflow-soft);
  border-color: var(--ws-workflow-line);
}

.today-section.technical header {
  background: var(--ws-technical-soft);
  border-color: var(--ws-technical-line);
}

.productivity-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  color: var(--et-polish-ink);
  text-decoration: none;
  border-bottom: 1px solid #eef2f7;
}

.productivity-item:hover,
.productivity-item:focus-visible {
  background: #f8fafc;
  outline: 0;
}

.productivity-item strong,
.productivity-item small {
  display: block;
}

.productivity-item small {
  margin-top: 3px;
  color: var(--et-polish-muted);
}

.productivity-item em {
  border-radius: 999px;
  padding: 4px 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.productivity-item em.danger,
.follow-up-card.danger {
  color: #b42318;
}

.productivity-item em.warn,
.follow-up-card.warn {
  color: #b45309;
}

.productivity-item em.good,
.follow-up-card.good {
  color: #166534;
}

.productivity-more {
  display: block;
  padding: 10px 14px;
  color: #1d4ed8;
  font-weight: 700;
  text-decoration: none;
}

.follow-up-filters a {
  border: 1px solid var(--et-polish-line);
  border-radius: 999px;
  padding: 7px 11px;
  color: var(--et-polish-ink);
  text-decoration: none;
  background: #fff;
}

.follow-up-filters a.active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.follow-up-columns {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.follow-up-card {
  display: grid;
  gap: 10px;
  margin: 10px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}

.follow-up-card small {
  display: block;
  margin-top: 3px;
  color: var(--et-polish-muted);
}

.template-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.template-form label,
.quick-capture-drawer label {
  display: grid;
  gap: 6px;
}

.template-form input,
.template-form select,
.template-form textarea,
.timeline-tools input,
.timeline-tools select,
.productivity-head input,
.quick-capture-drawer input,
.quick-capture-drawer select,
.quick-capture-drawer textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
}

.template-form textarea,
.quick-capture-drawer textarea {
  min-height: 110px;
}

.wide-field {
  grid-column: 1 / -1;
}

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

.template-card {
  display: grid;
}

.template-card p,
.template-card footer {
  padding: 12px 14px;
}

.template-card p {
  min-height: 76px;
  margin: 0;
}

.timeline-list,
.timeline-older {
  display: grid;
  gap: 10px;
}

.timeline-entry {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.timeline-entry time {
  color: var(--et-polish-muted);
  font-size: 12px;
  white-space: nowrap;
}

.timeline-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  background: var(--ws-neutral-accent);
}

.timeline-dot.finance { background: var(--ws-finance-accent); }
.timeline-dot.project { background: var(--ws-project-accent); }
.timeline-dot.workflow { background: var(--ws-workflow-accent); }
.timeline-dot.technical { background: var(--ws-technical-accent); }
.timeline-dot.admin { background: var(--ws-admin-accent); }

.global-quick-capture {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 950;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.22);
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.global-quick-capture:hover,
.global-quick-capture:focus-visible {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.28);
  outline: 3px solid rgba(255, 255, 255, 0.42);
}

.quick-capture-drawer {
  max-width: 780px;
}

.backup-reminder-panel.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

@media (max-width: 900px) {
  .eve-hero,
  .eve-main-grid {
    grid-template-columns: 1fr;
  }

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

  .eve-review-card dl {
    grid-template-columns: 1fr;
  }

  .today-section-grid,
  .template-grid {
    grid-template-columns: 1fr;
  }

  .today-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .productivity-head,
  .backup-reminder-panel {
    display: grid;
  }

  .timeline-tools,
  .productivity-actions {
    width: 100%;
  }

  .timeline-tools > *,
  .productivity-actions > *,
  .follow-up-card-actions > * {
    flex: 1 1 150px;
  }
}

@media (max-width: 560px) {
  .productivity-page,
  .today-command-centre,
  .follow-up-system,
  .templates-library,
  .project-timeline-polish,
  .backup-reminder-panel {
    margin-inline: 0;
    padding: 12px;
  }

  .today-summary-strip {
    grid-template-columns: 1fr;
  }

  .eve-hero {
    padding: 14px;
  }

  .eve-hero h2 {
    font-size: 24px;
  }

  .eve-command-panel footer > *,
  .eve-review-card footer > * {
    flex: 1 1 100%;
  }

  .mobile-coo-card,
  .operations-director-briefing,
  .eve-command-panel {
    border-radius: 14px;
    padding: 14px;
  }

  .mobile-coo-actions,
  .mobile-site-mode,
  .eve-voice-toolbar,
  .chat-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .mobile-coo-actions > *,
  .mobile-site-mode > *,
  .eve-voice-toolbar > *,
  .chat-actions > * {
    width: 100%;
    min-height: 48px;
  }

  .eve-voice-settings {
    grid-column: 1 / -1;
  }

  .operations-order-list {
    padding-left: 18px;
  }

  .operations-order-facts {
    grid-template-columns: 1fr;
  }

  .follow-up-columns {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .productivity-item,
  .timeline-entry {
    grid-template-columns: 1fr;
  }

  .global-quick-capture {
    width: 50px;
    height: 50px;
    font-size: 28px;
  }
}

.dashboard-attention-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.dashboard-attention-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.dashboard-attention-header h2 {
  margin: 0;
  font-size: 18px;
}

.dashboard-attention-header span,
.role-chip {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.logout-button {
  min-height: 40px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #b42318;
  font-weight: 700;
  cursor: pointer;
}

.logout-button:hover,
.logout-button:focus-visible {
  border-color: #b42318;
  background: #fff4f2;
  outline: 0;
}

.recovery-button {
  margin-left: 10px;
  border-color: #16a34a !important;
  color: #166534 !important;
  font-weight: 700;
}

html {
  background: #f8fafc;
}

body {
  min-height: 100svh;
}

.pwa-install-banner,
.pwa-update-notice,
.pwa-install-help {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.pwa-install-banner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: 12px 16px 0;
  padding: 14px 16px;
}

.pwa-install-banner strong,
.pwa-update-notice strong {
  display: block;
  color: #111827;
}

.pwa-install-banner p,
.pwa-update-notice p,
.pwa-install-help p {
  margin: 4px 0 0;
  color: #536176;
  line-height: 1.45;
}

.pwa-install-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pwa-update-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.pwa-install-actions .ghost {
  background: #fff;
}

.pwa-update-actions .ghost {
  background: #fff;
}

.pwa-update-notice {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 1200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: min(460px, calc(100vw - 32px));
  padding: 16px;
}

.pwa-install-help {
  margin-top: 16px;
  padding: 18px;
}

.outlook-calendar-panel {
  margin-top: 16px;
  padding: 18px;
}

.outlook-calendar-head,
.outlook-calendar-toolbar,
.outlook-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.outlook-calendar-head h2 {
  margin: 0;
}

.outlook-calendar-head p,
.outlook-calendar-status p {
  margin: 4px 0 0;
  color: #536176;
}

.outlook-calendar-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.outlook-calendar-status {
  margin-top: 14px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.outlook-status-row {
  justify-content: flex-start;
}

.outlook-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 800;
}

.outlook-status-badge.synced {
  background: #dcfce7;
  color: #166534;
}

.outlook-status-badge.pending {
  background: #fff7ed;
  color: #9a3412;
}

.outlook-status-badge.failed {
  background: #fee2e2;
  color: #991b1b;
}

.outlook-status-badge.conflict {
  background: #fef3c7;
  color: #92400e;
}

.outlook-calendar-content {
  margin-top: 14px;
}

.outlook-auto-sync-card,
.outlook-auto-mini {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
  margin-bottom: 12px;
}

.outlook-auto-sync-card small,
.outlook-auto-mini small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.outlook-auto-sync-controls,
.outlook-auto-mini-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.outlook-auto-sync-controls label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475569;
  font-size: 13px;
}

.outlook-auto-sync-controls select {
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.outlook-auto-sync-status {
  grid-column: 1 / -1;
  color: #334155;
  font-size: 13px;
}

.outlook-calendar-range,
.outlook-calendar-buttons,
.outlook-conflict-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.outlook-calendar-range label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #475569;
  font-size: 12px;
}

.outlook-calendar-range input {
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.outlook-calendar-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  max-height: 420px;
  overflow: auto;
}

.outlook-calendar-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.outlook-calendar-item input {
  width: 18px;
  height: 18px;
}

.outlook-calendar-item strong,
.outlook-calendar-item small,
.outlook-calendar-item em {
  display: block;
}

.outlook-calendar-item small {
  margin-top: 2px;
  color: #64748b;
}

.outlook-calendar-item em {
  margin-top: 3px;
  color: #991b1b;
}

.outlook-source-pill {
  display: inline-flex;
  width: fit-content;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 2px 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
  text-transform: capitalize;
}

.outlook-conflict-actions {
  margin-top: 8px;
}

.outlook-calendar-result {
  margin-top: 12px;
  color: #334155;
}

@media (max-width: 760px) {
  .outlook-auto-sync-card,
  .outlook-auto-mini {
    grid-template-columns: 1fr;
  }

  .outlook-auto-sync-controls,
  .outlook-auto-mini-actions {
    justify-content: stretch;
  }

  .outlook-auto-sync-controls label,
  .outlook-auto-sync-controls select,
  .outlook-auto-sync-controls button,
  .outlook-auto-mini-actions button,
  .outlook-auto-mini-actions a {
    width: 100%;
  }

  .outlook-calendar-item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .outlook-calendar-item .outlook-status-badge {
    grid-column: 2;
    width: max-content;
  }
}

.pwa-install-help-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.pwa-install-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.pwa-install-steps article {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.backup-manager-panel {
  display: grid;
  gap: 16px;
  margin-top: 16px;
  padding: 18px;
}

.backup-manager-head,
.backup-create-row,
.backup-table-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.backup-create-row label {
  display: grid;
  gap: 6px;
}

.backup-create-row input {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 11px 12px;
}

.backup-health-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.backup-health-tile {
  border: 1px solid #e5eaf2;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.backup-health-tile span {
  display: block;
  color: #667085;
  font-size: 12px;
}

.backup-health-tile strong {
  display: block;
  margin-top: 4px;
  color: #111827;
}

.backup-health-tile.valid {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.backup-health-tile.warning,
.backup-health-tile.corrupt {
  border-color: #fed7aa;
  background: #fff7ed;
}

.backup-meta {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: #536176;
}

.backup-meta p,
.backup-meta ul {
  margin: 0;
}

.backup-meta ul {
  padding-left: 18px;
  color: #9a3412;
}

.backup-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5eaf2;
  border-radius: 8px;
}

.backup-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

.backup-table th,
.backup-table td {
  border-bottom: 1px solid #e5eaf2;
  padding: 11px 12px;
  text-align: left;
  vertical-align: top;
}

.backup-table td span {
  display: block;
  color: #667085;
  font-size: 12px;
}

.backup-status {
  display: inline-flex;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 700;
}

.backup-status.valid {
  background: #dcfce7;
  color: #166534;
}

.backup-status.warning,
.backup-status.corrupt {
  background: #ffedd5;
  color: #9a3412;
}

.backup-actions,
.backup-pager {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.backup-preview {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.backup-preview h3 {
  margin: 0 0 10px;
}

.backup-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.backup-warning {
  color: #9a3412;
}

.backup-good {
  color: #166534;
}

.import-export-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 16px;
  background: #fff;
}

.import-export-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.import-export-head h2 {
  margin: 2px 0 4px;
}

.import-export-head p {
  margin: 0;
  color: var(--et-polish-muted);
}

.import-export-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.4fr);
  gap: 14px;
}

.import-export-actions,
.import-preview-card {
  display: grid;
  gap: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.import-export-actions label,
.import-preview-form label {
  display: grid;
  gap: 6px;
  color: var(--et-polish-ink);
  font-weight: 600;
}

.import-export-actions label span,
.import-preview-form label span {
  color: #344054;
  font-size: 13px;
}

.import-export-actions select,
.import-export-actions input,
.import-preview-form select,
.import-preview-form input {
  min-height: 42px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--et-polish-ink);
  font: inherit;
}

.import-export-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

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

.import-preview-form .wide-field {
  grid-column: 1 / -1;
}

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

.import-mapping-grid label {
  display: grid;
  gap: 5px;
  font-size: 13px;
}

.import-mapping-grid select {
  min-height: 38px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 7px 9px;
  background: #fff;
  font: inherit;
}

.import-preview-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
}

.import-preview-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.import-preview-table th,
.import-preview-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.import-preview-table th {
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}

.import-preview-table code {
  white-space: nowrap;
}

.import-preview-result {
  color: var(--et-polish-muted);
  font-size: 13px;
}

.import-warning {
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff7ed;
  color: #9a3412;
}

@supports (padding: max(0px)) {
  .app-shell,
  .workflow-shell,
  .calendar-shell,
  .quote-workspace {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  .topbar,
  .workflow-topbar,
  .calendar-topbar {
    padding-top: max(0px, env(safe-area-inset-top));
  }

  .mobile-bottom-nav {
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
}

.recovery-button:hover,
.recovery-button:focus-visible {
  background: #f0fdf4 !important;
}

.is-disabled-by-role {
  cursor: not-allowed !important;
  opacity: 0.55 !important;
}

.portal-card-lite,
.portal-sharing-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.portal-sharing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.portal-sharing-head h2,
.portal-share-list h3 {
  margin: 0 0 4px;
}

.portal-sharing-head p {
  margin: 0;
  color: #64748b;
}

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

.portal-sharing-grid label {
  display: grid;
  gap: 6px;
}

.portal-sharing-grid span,
.portal-share-row span {
  color: #64748b;
  font-size: 13px;
}

.portal-sharing-grid input,
.portal-sharing-grid select,
.portal-sharing-grid textarea {
  width: 100%;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.portal-sharing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.portal-share-list {
  display: grid;
  gap: 10px;
}

.portal-share-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.attention-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.attention-card {
  display: grid;
  gap: 7px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
  color: var(--et-polish-ink);
  text-align: left;
  cursor: pointer;
}

.attention-card:hover {
  border-color: #111827;
}

.attention-card span {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.attention-card strong {
  font-size: 24px;
}

.attention-card.danger {
  border-top: 3px solid var(--et-polish-danger);
}

.attention-card.warn {
  border-top: 3px solid var(--et-polish-warn);
}

.attention-card.good {
  border-top: 3px solid var(--et-polish-good);
}

.attention-list {
  display: grid;
  gap: 8px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.attention-list h3 {
  margin: 0;
  font-size: 15px;
}

.attention-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
  color: inherit;
  text-decoration: none;
}

.attention-list-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.attention-list-item strong {
  display: block;
}

.attention-list-item span {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.role-chip {
  white-space: nowrap;
}

.clone-record-button,
.quotation-pdf-button,
.invoice-pdf-button {
  margin-left: 8px;
}

.invoice-shortcut-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 14px 16px;
  background: #fff;
}

.invoice-shortcut-bar strong {
  display: block;
  color: var(--et-polish-ink);
  font-size: 20px;
}

.invoice-shortcut-bar p {
  margin: 3px 0 0;
  color: var(--et-polish-muted);
}

.invoice-shortcut-primary {
  min-width: 130px;
}

.new-invoice-highlight {
  animation: invoiceHighlight 1.8s ease;
}

@keyframes invoiceHighlight {
  0%,
  100% {
    box-shadow: 0 0 0 rgba(37, 99, 235, 0);
  }

  18%,
  72% {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.18);
  }
}

.invoice-row-openable .invoice-open-cell {
  cursor: pointer;
}

.invoice-row-openable .invoice-open-cell:hover {
  background: #f8fafc;
}

.quotation-row-openable .quotation-open-cell {
  cursor: pointer;
}

.quotation-row-openable .quotation-open-cell:hover {
  background: #f8fafc;
}

.invoice-open-button,
.invoice-lines-button,
.quotation-open-button {
  margin-right: 8px;
}

.invoice-detail-dialog {
  width: min(1120px, 100%);
}

.invoice-line-editor-dialog {
  width: min(1180px, 100%);
}

.invoice-detail-status,
.invoice-detail-grid {
  display: grid;
  gap: 12px;
}

.invoice-detail-status {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
}

.invoice-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.invoice-detail-box {
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.invoice-detail-box h3 {
  margin: 0 0 10px;
  color: var(--et-polish-ink);
  font-size: 15px;
}

.invoice-detail-box p {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0;
  color: var(--et-polish-muted);
}

.invoice-detail-box p span {
  color: var(--et-polish-muted);
}

.invoice-detail-box p strong {
  color: var(--et-polish-ink);
  text-align: right;
}

.invoice-detail-lines {
  margin-bottom: 14px;
  overflow-x: auto;
}

.invoice-detail-lines table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-detail-lines th,
.invoice-detail-lines td {
  border-bottom: 1px solid #eef2f7;
  padding: 9px;
  text-align: left;
}

.invoice-detail-lines th {
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
}

.invoice-detail-lines td:nth-child(n + 2),
.invoice-detail-lines tfoot td:last-child {
  text-align: right;
}

.invoice-detail-lines tfoot td {
  font-weight: 700;
}

.invoice-line-editor-table {
  overflow-x: auto;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  margin: 14px 0;
}

.invoice-line-editor-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.invoice-line-editor-table th,
.invoice-line-editor-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 9px;
  text-align: left;
  vertical-align: top;
}

.invoice-line-editor-table th {
  background: #f8fafc;
  color: #344054;
  font-size: 12px;
}

.invoice-line-editor-table th:nth-child(2),
.invoice-line-editor-table th:nth-child(3),
.invoice-line-editor-table th:nth-child(4),
.invoice-line-editor-table td:nth-child(2),
.invoice-line-editor-table td:nth-child(3),
.invoice-line-editor-table td:nth-child(4) {
  width: 130px;
}

.invoice-line-editor-table th:last-child,
.invoice-line-editor-table td:last-child {
  width: 110px;
}

.invoice-line-editor-table input {
  width: 100%;
  min-height: 42px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--et-polish-ink);
  font: inherit;
}

.invoice-line-editor-tools {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 12px 0;
}

.invoice-line-editor-tools label {
  width: min(240px, 100%);
}

.invoice-line-editor-summary {
  width: min(360px, 100%);
  margin-left: auto;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 12px 14px;
  background: #f8fafc;
}

.invoice-line-editor-summary p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 6px 0;
}

.invoice-line-editor-summary p:last-child {
  border-top: 1px solid #d8dee8;
  padding-top: 8px;
  font-size: 16px;
}

.danger-lite {
  border-color: #fecaca !important;
  color: #b91c1c !important;
  background: #fff7f7 !important;
}

.invoice-detail-payment {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.4fr;
  gap: 10px;
  border-top: 1px solid #eef2f7;
  padding: 10px 0;
}

.invoice-detail-payment:first-of-type {
  border-top: 0;
}

.invoice-detail-payment span {
  color: var(--et-polish-muted);
}

.quotation-detail-scope p {
  display: block;
  white-space: pre-wrap;
}

.quotation-rich-content {
  line-height: 1.5;
}

.quotation-rich-content + .quotation-rich-content {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #e4e7ec;
}

.quotation-rich-content p {
  margin: 0 0 8px;
}

.quotation-rich-content h2,
.quotation-rich-content h3,
.quotation-rich-content h4 {
  margin: 13px 0 7px;
  color: #173b76;
}

.quotation-rich-content ul,
.quotation-rich-content ol {
  margin: 7px 0 12px;
  padding-left: 24px;
}

.quote-rich-source {
  display: none !important;
}

.quote-rich-text {
  width: 100%;
  overflow: hidden;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  background: #fff;
}

.quote-rich-text:focus-within {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.14);
}

.quote-rich-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 8px;
  border-bottom: 1px solid #d8dee8;
  background: #f8fafc;
}

.quote-rich-toolbar select,
.quote-rich-toolbar button {
  width: auto;
  min-width: 38px;
  min-height: 34px;
  margin: 0;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  padding: 5px 9px;
  background: #fff;
  color: #172033;
  font: inherit;
}

.quote-rich-toolbar select {
  min-width: 106px;
}

.quote-rich-highlight {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  margin: 0;
  border: 1px solid #cfd6e2;
  border-radius: 6px;
  padding: 4px 7px;
  background: #fff;
  color: #172033;
  font-size: 13px;
  font-weight: 700;
}

.quote-rich-highlight input[type="color"] {
  width: 28px;
  min-width: 28px;
  height: 24px;
  min-height: 24px;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.quote-rich-toolbar button:hover,
.quote-rich-toolbar button:focus-visible,
.quote-rich-toolbar select:focus-visible {
  border-color: #0d9488;
  background: #f0fdfa;
  outline: none;
}

.quote-rich-toolbar-divider {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #d8dee8;
}

.quote-rich-canvas {
  min-height: 150px;
  max-height: 440px;
  overflow-y: auto;
  padding: 14px;
  color: #172033;
  line-height: 1.5;
  outline: none;
}

.quote-rich-canvas:empty::before {
  color: #98a2b3;
  content: attr(data-placeholder);
  pointer-events: none;
}

.quote-rich-canvas p {
  margin: 0 0 9px;
}

.quote-rich-canvas h2,
.quote-rich-canvas h3,
.quote-rich-canvas h4 {
  margin: 14px 0 7px;
  color: #173b76;
  line-height: 1.25;
}

.quote-rich-canvas h2 {
  font-size: 1.25rem;
}

.quote-rich-canvas h3 {
  font-size: 1.08rem;
}

.quote-rich-canvas h4 {
  font-size: 1rem;
}

.quote-rich-canvas ul,
.quote-rich-canvas ol {
  margin: 7px 0 12px;
  padding-left: 24px;
}

.quote-rich-canvas li {
  margin-bottom: 4px;
}

.polish-client-select {
  display: grid;
  gap: 7px;
}

.polish-client-select small {
  color: var(--et-polish-muted);
  font-size: 12px;
  line-height: 1.35;
}

.polish-client-select select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--et-polish-ink);
  font: inherit;
}

.polish-client-select select:focus {
  border-color: #111827;
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
  outline: 0;
}

.clone-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(15, 23, 42, 0.42);
}

.clone-dialog {
  width: min(980px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border: 1px solid var(--et-polish-line);
  border-radius: 10px;
  padding: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.clone-dialog,
.clone-dialog * {
  min-width: 0;
}

.clone-dialog header,
.clone-dialog footer {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.clone-dialog h2 {
  margin: 2px 0 6px;
  font-size: 24px;
  overflow-wrap: anywhere;
}

.clone-dialog p {
  margin: 0;
  color: var(--et-polish-muted);
  overflow-wrap: anywhere;
}

.clone-dialog-close {
  width: 40px;
  height: 40px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  background: #fff;
  color: var(--et-polish-ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

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

.clone-dialog label {
  display: grid;
  gap: 7px;
  color: var(--et-polish-ink);
  font-weight: 600;
}

.clone-dialog label span {
  color: #344054;
  font-size: 13px;
}

.clone-dialog input,
.clone-dialog select,
.clone-dialog textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  color: var(--et-polish-ink);
  font: inherit;
  overflow-wrap: anywhere;
}

.clone-dialog .wide-field {
  grid-column: span 2;
}

.clone-dialog-note {
  margin: 4px 0 18px !important;
  color: var(--et-polish-muted);
}

.clone-dialog-note.error {
  color: var(--et-polish-danger);
  font-weight: 700;
}

.clone-dialog footer {
  position: sticky;
  bottom: -20px;
  z-index: 2;
  justify-content: flex-end;
  margin: 18px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--et-polish-line);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  flex-wrap: wrap;
}

.invoice-detail-box,
.invoice-detail-box *,
.client-detail-grid,
.client-detail-grid *,
.project-detail-drawer,
.project-detail-drawer * {
  overflow-wrap: anywhere;
}

.invoice-detail-lines table {
  table-layout: fixed;
  width: 100%;
}

.invoice-detail-lines th,
.invoice-detail-lines td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.finance-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  border-radius: 10px;
  background: #0f766e;
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.2);
  padding: 12px 16px;
  font-weight: 800;
}

.smart-workflow-panel {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #f8fafc;
  padding: 14px;
  display: grid;
  gap: 10px;
}

.smart-workflow-panel strong {
  font-size: 15px;
  color: #111827;
}

.task-project-shortcut {
  align-items: center;
  grid-template-columns: 1fr auto;
}

.task-project-shortcut-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.task-project-shortcut small {
  display: block;
  margin-top: 4px;
  color: var(--et-polish-muted);
  line-height: 1.35;
}

.general-todo-panel {
  margin: 12px 0 16px;
  border-color: #dbe3ee;
  background: #fbfdff;
}

.general-todo-head,
.general-todo-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.general-todo-list {
  display: grid;
  gap: 8px;
}

.general-todo-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  padding: 10px 12px;
}

.general-todo-item strong {
  display: block;
  color: #111827;
}

.general-todo-item small,
.general-todo-item > span:last-child {
  color: #667085;
}

.task-project-dialog .clone-dialog-note {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eff6ff;
  color: #1d4ed8;
}

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

.smart-helper-grid input {
  width: 100%;
}

.smart-field-help,
.smart-workflow-panel small {
  display: block;
  margin-top: 6px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.smart-form-note {
  grid-column: 1 / -1;
  border-radius: 8px;
  padding: 10px 12px;
  background: #eef6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  margin: 6px 0 0;
}

.smart-form-note.error {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.payment-indicator {
  display: inline-flex;
  align-items: center;
  width: max-content;
  margin-left: 8px;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
}

.payment-indicator.current {
  background: #ecfeff;
  color: #0e7490;
}

.payment-indicator.soon {
  background: #fff7ed;
  color: #c2410c;
}

.payment-indicator.overdue {
  background: #fff1f2;
  color: #be123c;
}

.payment-indicator.paid {
  background: #ecfdf5;
  color: #047857;
}

.convert-quote-button,
.invoice-pdf-button,
.clone-record-button,
.record-payment-button {
  margin-left: 8px;
}

.finance-dashboard-panel,
.business-expenses-panel {
  display: grid;
  gap: 14px;
  border: 1px solid var(--et-polish-line);
  border-radius: 8px;
  padding: 16px;
  margin: 0 0 16px;
  background: #fff;
}

.business-expenses-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.business-expenses-head h2 {
  margin: 2px 0 4px;
}

.business-expenses-head p {
  margin: 0;
  color: var(--et-polish-muted);
}

.finance-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.finance-summary-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.finance-summary-strip span {
  display: grid;
  gap: 4px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f8fafc;
}

.finance-summary-strip small {
  color: var(--et-polish-muted);
  font-size: 12px;
}

.finance-summary-strip strong {
  color: var(--et-polish-ink);
  font-size: 16px;
}

.business-expense-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.business-expense-form label {
  display: grid;
  gap: 6px;
  color: var(--et-polish-ink);
  font-weight: 600;
}

.business-expense-form label span {
  color: #344054;
  font-size: 13px;
}

.business-expense-form input,
.business-expense-form select {
  min-height: 42px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--et-polish-ink);
  font: inherit;
}

.business-expense-form .wide-field {
  grid-column: span 2;
}

.business-expense-table-wrap {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.business-expense-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.business-expense-table th,
.business-expense-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px;
  text-align: left;
  font-size: 13px;
}

.business-expense-table th {
  background: #f8fafc;
  color: #344054;
  font-weight: 700;
}

.danger-button {
  border-color: #fecaca !important;
  color: #b42318 !important;
}

.danger-button:hover,
.danger-button:focus-visible {
  border-color: #b42318 !important;
  background: #fff4f2 !important;
}

.payment-history {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.payment-history h3 {
  margin: 0;
  font-size: 15px;
}

.payment-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.7fr) auto auto;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 9px;
  background: #f8fafc;
}

.payment-history-row span {
  display: grid;
  gap: 2px;
  color: var(--et-polish-muted);
  font-size: 12px;
}

.finance-payment-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.finance-grid .attention-card strong {
  font-size: 18px;
}

.client-quick-actions {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  margin: 0 0 18px;
  display: grid;
  gap: 12px;
}

.client-quick-actions-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  align-items: end;
  gap: 14px;
}

.client-quick-actions h3 {
  margin: 2px 0 0;
  color: #111827;
  font-size: 20px;
}

.client-quick-actions label {
  display: grid;
  gap: 5px;
}

.client-quick-actions label span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.client-quick-actions select {
  min-height: 42px;
  border: 1px solid #cfd6e2;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
  font: inherit;
}

.client-quick-primary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.client-quick-secondary {
  border-top: 1px solid #eef2f7;
  padding-top: 8px;
}

.client-quick-secondary summary {
  cursor: pointer;
  color: #475569;
  font-weight: 700;
}

.client-quick-secondary div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.workspace-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  padding: 12px;
  color: #d1d5db;
  background: transparent;
  text-decoration: none;
  cursor: pointer;
}

.workspace-nav-group {
  display: grid;
  gap: 4px;
  margin: 4px 0 8px;
}

.workspace-nav-group summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px 5px;
  color: var(--et-sidebar-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-nav-group summary::-webkit-details-marker {
  display: none;
}

.workspace-nav-group summary::after {
  content: "+";
  float: right;
  font-size: 12px;
  color: #64748b;
}

.workspace-nav-group[open] summary::after {
  content: "-";
}

.workspace-nav-group-items {
  display: grid;
  gap: 3px;
}

.sidebar nav > button[data-section],
.sidebar nav > a[data-section],
.workflow-sidebar nav > button[data-section],
.calendar-sidebar nav > button[data-section] {
  display: none !important;
}

.workspace-nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  flex-shrink: 0;
}

.workspace-nav-icon i {
  font-size: 16px;
  line-height: 1;
}

.workspace-nav-link:hover,
.workspace-nav-link:focus-visible,
.workspace-nav-link.active {
  background: var(--et-sidebar-active);
  color: #fff;
  outline: 0;
}

.workspace-nav-link.active .workspace-nav-icon,
.workspace-nav-link:hover .workspace-nav-icon,
.workspace-nav-link:focus-visible .workspace-nav-icon {
  background: rgba(255, 255, 255, 0.16);
}

.workflow-sidebar .workspace-nav-link,
.calendar-sidebar .workspace-nav-link {
  color: #d1d5db;
}

.workflow-sidebar .workspace-nav-link:hover,
.workflow-sidebar .workspace-nav-link:focus-visible,
.workflow-sidebar .workspace-nav-link.active,
.calendar-sidebar .workspace-nav-link:hover,
.calendar-sidebar .workspace-nav-link:focus-visible,
.calendar-sidebar .workspace-nav-link.active {
  background: var(--et-sidebar-active);
  color: #fff;
}

.mobile-bottom-nav .workspace-nav-link {
  display: grid;
  place-items: center;
  min-height: 48px;
  padding: 6px 4px;
  color: #4b5563;
  font-size: 11px;
  text-align: center;
}

.mobile-bottom-nav .workspace-nav-icon {
  display: none;
}

.mobile-bottom-nav .workspace-nav-link.active {
  background: var(--et-sidebar-active);
  color: #fff;
}

.mobile-bottom-nav .workspace-nav-group {
  display: contents;
}

.mobile-bottom-nav .workspace-nav-group summary {
  display: none;
}

.mobile-bottom-nav .workspace-nav-group-items {
  display: contents;
}

.sidebar,
.workflow-sidebar,
.calendar-sidebar,
.native-sidebar {
  background: var(--et-sidebar-bg, #0f172a);
}

.productivity-actions .primary-button,
.global-quick-capture,
.today-panel-cta:hover,
.today-focus-toggle[data-focus-active="true"] {
  border-color: var(--et-primary, #0d9488);
  background: var(--et-primary, #0d9488);
  color: #fff;
}

.productivity-actions .primary-button:hover,
.global-quick-capture:hover,
.today-panel-cta:hover,
.today-focus-toggle[data-focus-active="true"]:hover {
  border-color: var(--et-primary-hover, #0f766e);
  background: var(--et-primary-hover, #0f766e);
}

.role-workspace-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid var(--et-polish-line);
  border-radius: var(--et-panel-radius);
  padding: 16px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.role-workspace-panel[data-workspace-accent="finance"] {
  border-color: var(--ws-finance-line);
  background: linear-gradient(180deg, var(--ws-finance-soft), #fff 46%);
}

.role-workspace-panel[data-workspace-accent="project"] {
  border-color: var(--ws-project-line);
  background: linear-gradient(180deg, var(--ws-project-soft), #fff 46%);
}

.role-workspace-panel[data-workspace-accent="workflow"] {
  border-color: var(--ws-workflow-line);
  background: linear-gradient(180deg, var(--ws-workflow-soft), #fff 46%);
}

.role-workspace-panel[data-workspace-accent="technical"] {
  border-color: var(--ws-technical-line);
  background: linear-gradient(180deg, var(--ws-technical-soft), #fff 46%);
}

.role-workspace-panel[data-workspace-accent="admin"] {
  border-color: var(--ws-admin-line);
  background: linear-gradient(180deg, var(--ws-admin-soft), #fff 46%);
}

.role-workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.role-workspace-head h2 {
  margin: 4px 0;
  font-size: 22px;
}

.role-workspace-head p {
  margin: 0;
  max-width: 760px;
  color: var(--et-polish-muted);
}

.role-workspace-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.role-readonly-pill {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 12px;
  font-weight: 700;
}

.role-workspace-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--et-card-gap);
}

.role-workspace-card {
  --workspace-accent: var(--ws-neutral-accent);
  --workspace-soft: var(--ws-neutral-soft);
  --workspace-line: var(--ws-neutral-line);
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr;
  column-gap: 11px;
  row-gap: 4px;
  min-height: var(--et-card-min-height);
  border: 1px solid var(--workspace-line);
  border-radius: var(--et-panel-radius);
  padding: 14px;
  background: #f8fafc;
  color: var(--et-polish-ink);
  text-decoration: none;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease;
}

.role-workspace-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: var(--et-panel-radius) 0 0 var(--et-panel-radius);
  background: var(--workspace-accent);
  opacity: 0.78;
}

.workspace-card-icon {
  display: inline-grid;
  grid-row: 1 / span 2;
  width: var(--et-icon-size);
  height: var(--et-icon-size);
  place-items: center;
  border-radius: 8px;
  background: var(--workspace-soft);
  color: var(--workspace-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.role-workspace-card strong {
  align-self: end;
  font-size: 15px;
  line-height: 1.2;
}

.role-workspace-card:hover,
.role-workspace-card:focus-visible {
  transform: translateY(-1px);
  border-color: var(--workspace-accent);
  background: #fff;
  box-shadow: var(--et-hover-shadow);
  outline: 0;
}

.role-workspace-card .workspace-card-copy {
  color: var(--et-polish-muted);
  font-size: 13px;
  line-height: 1.35;
}

.workspace-accent-finance {
  --workspace-accent: var(--ws-finance-accent);
  --workspace-soft: var(--ws-finance-soft);
  --workspace-line: var(--ws-finance-line);
}

.workspace-accent-project {
  --workspace-accent: var(--ws-project-accent);
  --workspace-soft: var(--ws-project-soft);
  --workspace-line: var(--ws-project-line);
}

.workspace-accent-workflow {
  --workspace-accent: var(--ws-workflow-accent);
  --workspace-soft: var(--ws-workflow-soft);
  --workspace-line: var(--ws-workflow-line);
}

.workspace-accent-technical {
  --workspace-accent: var(--ws-technical-accent);
  --workspace-soft: var(--ws-technical-soft);
  --workspace-line: var(--ws-technical-line);
}

.workspace-accent-admin {
  --workspace-accent: var(--ws-admin-accent);
  --workspace-soft: var(--ws-admin-soft);
  --workspace-line: var(--ws-admin-line);
}

.workspace-accent-neutral {
  --workspace-accent: var(--ws-neutral-accent);
  --workspace-soft: var(--ws-neutral-soft);
  --workspace-line: var(--ws-neutral-line);
}

.role-workspace-actions .inline-button {
  border-color: rgba(15, 23, 42, 0.16);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.03);
}

.onedrive-panel,
.onedrive-upload-panel {
  background: #fff;
  border: 1px solid var(--et-polish-line);
}

.onedrive-head {
  align-items: flex-start;
  display: flex;
  gap: 18px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.onedrive-head h2 {
  margin: 4px 0;
}

.onedrive-head p,
.onedrive-status p,
.onedrive-upload-status {
  color: #52627a;
  margin: 0;
}

.onedrive-actions,
.onedrive-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.onedrive-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 8px;
}

.onedrive-status-row > span:not(.outlook-status-badge) {
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 999px;
  color: #334155;
  font-size: 13px;
  padding: 6px 10px;
}

.onedrive-upload-form {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px;
}

.onedrive-upload-form label {
  display: grid;
  gap: 6px;
}

.onedrive-upload-form label span {
  color: #334155;
  font-size: 13px;
  font-weight: 650;
}

.onedrive-upload-form input,
.onedrive-upload-form select,
.onedrive-upload-form textarea {
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font: inherit;
  padding: 11px 12px;
}

.onedrive-upload-form .wide-field,
.onedrive-progress {
  grid-column: 1 / -1;
}

.onedrive-upload-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.onedrive-upload-status.success {
  color: #047857;
}

.onedrive-upload-status.error {
  color: #b91c1c;
}

.onedrive-upload-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.files-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.files-tabs button {
  flex: 0 0 auto;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #475569;
  font-weight: 750;
  cursor: pointer;
}

.files-tabs button:hover,
.files-tabs button:focus-visible,
.files-tabs button.active {
  border-color: var(--ws-project-accent);
  background: var(--ws-project-soft);
  color: var(--ws-project-accent);
  outline: 0;
}

.files-drop-zone {
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  padding: 14px;
  background: #fff;
}

.files-drop-zone strong {
  color: #111827;
}

.files-drop-zone small {
  color: #64748b;
}

.files-drop-zone.is-dragging {
  border-color: var(--ws-project-accent);
  background: var(--ws-project-soft);
}

.onedrive-upload-list h3 {
  font-size: 16px;
  margin: 0;
}

.onedrive-file-row {
  align-items: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  justify-content: space-between;
  padding: 12px;
}

.document-icon {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ws-project-soft);
  color: var(--ws-project-accent);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.onedrive-file-row strong,
.onedrive-file-row span {
  display: block;
}

.onedrive-file-row span {
  color: #64748b;
  font-size: 13px;
}

.onedrive-file-actions {
  align-items: center;
}

@media (max-width: 760px) {
  .role-workspace-head {
    align-items: stretch;
    flex-direction: column;
  }

  .role-workspace-actions {
    justify-content: stretch;
  }

  .role-workspace-actions .inline-button {
    flex: 1 1 150px;
  }

  .role-workspace-grid {
    grid-template-columns: 1fr;
  }
}

.client-quick-actions p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

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

  .portal-share-row {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 820px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 12px;
    overflow: auto;
  }

  .sidebar .brand {
    margin-bottom: 10px;
  }

  .sidebar nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sidebar nav button {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
  }

  .topbar,
  .workflow-topbar,
  .calendar-topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch;
    padding: 14px;
  }

  .topbar .search,
  .global-search-widget,
  .top-actions,
  .detail-actions,
  .email-actions,
  .form-actions,
  .row-actions {
    width: 100%;
  }

  .top-actions,
  .detail-actions,
  .email-actions,
  .form-actions,
  .row-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-button,
  .inline-button,
  .secondary-button,
  .icon-button {
    min-height: 44px;
  }

  .page,
  .workflow-main,
  .calendar-main,
  .examiner-module-page {
    padding: 14px !important;
  }

  .stats-grid,
  .finance-card-grid,
  .dashboard-grid,
  .form-grid,
  .client-workspace,
  .task-detail-columns,
  .settings-page,
  .examiner-grid,
  .tab-grid,
  .quote-workspace {
    grid-template-columns: 1fr !important;
  }

  .table-wrap table,
  .workflow-card table {
    min-width: 720px;
  }

  .clone-record-button,
  .invoice-open-button,
  .invoice-lines-button,
  .quotation-open-button,
  .quotation-pdf-button,
  .invoice-pdf-button,
  .record-payment-button {
    margin: 8px 0 0;
  }

  .invoice-shortcut-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-detail-status,
  .invoice-detail-grid {
    grid-template-columns: 1fr;
  }

  .invoice-line-editor-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-line-editor-tools label,
  .invoice-line-editor-tools button,
  .invoice-line-editor-summary {
    width: 100%;
  }

  .examiner-module-frame {
    min-height: 760px !important;
  }
}

.whatsapp-workspace-panel,
.whatsapp-client-panel {
  border: 1px solid #d8e8df;
  border-radius: 8px;
  background: #f8fffb;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.whatsapp-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.whatsapp-workspace-head h2 {
  margin: 2px 0 4px;
}

.whatsapp-workspace-head p {
  margin: 0;
  color: #5e6a7d;
}

.whatsapp-source-pill,
.communication-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e8f7ed;
  color: #166534;
  border: 1px solid #b7e4c7;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.whatsapp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.whatsapp-grid label,
.whatsapp-log-dialog label {
  display: grid;
  gap: 6px;
}

.whatsapp-grid select,
.whatsapp-grid textarea,
.whatsapp-log-dialog select,
.whatsapp-log-dialog input,
.whatsapp-log-dialog textarea {
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.whatsapp-grid .wide-field {
  grid-column: 1 / -1;
}

.whatsapp-actions,
.whatsapp-log-options,
.whatsapp-flags,
.clone-dialog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.whatsapp-flags label,
.whatsapp-log-options label {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}

.whatsapp-timeline {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.communication-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.communication-entry strong {
  display: block;
  margin: 6px 0 2px;
}

.communication-entry p {
  margin: 0;
  color: #596579;
}

.communication-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  color: #667085;
  font-size: 12px;
}

.communication-meta span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f8fafc;
}

.whatsapp-row-button {
  border-color: #a7e2b7;
  color: #166534;
}

.whatsapp-log-dialog {
  max-width: 860px;
}

.whatsapp-log-dialog .clone-dialog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whatsapp-log-dialog .wide-field {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .pwa-install-banner,
  .pwa-update-notice,
  .pwa-install-help-head,
  .pwa-install-steps,
  .backup-manager-head,
  .backup-create-row,
  .backup-table-head,
  .backup-health-grid,
  .backup-preview-grid,
  .import-export-grid,
  .import-preview-form,
  .import-mapping-grid {
    grid-template-columns: 1fr;
  }

  .import-export-head {
    align-items: stretch;
    flex-direction: column;
  }

  .import-export-button-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .pwa-install-actions,
  .pwa-update-actions {
    justify-content: stretch;
  }

  .pwa-install-actions button,
  .pwa-update-notice button,
  .pwa-install-help-head button {
    width: 100%;
  }

  .attention-grid {
    grid-template-columns: 1fr;
  }

  .portal-sharing-grid {
    grid-template-columns: 1fr;
  }

  .portal-sharing-head {
    align-items: stretch;
    flex-direction: column;
  }

  .global-search-results {
    position: fixed;
    inset: 96px 12px auto 12px;
    width: auto;
    max-height: calc(100vh - 118px);
  }

  .attention-list-item {
    grid-template-columns: 1fr;
  }

  .clone-dialog-backdrop {
    align-items: stretch;
    padding: 10px;
  }

  .clone-dialog {
    max-height: calc(100vh - 20px);
    padding: 14px;
  }

  .clone-dialog header,
  .clone-dialog footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .clone-dialog-grid,
  .clone-dialog .wide-field {
    grid-template-columns: 1fr;
    grid-column: span 1;
  }

  .business-expenses-head {
    flex-direction: column;
  }

  .business-expense-form,
  .finance-summary-strip,
  .finance-payment-grid,
  .invoice-detail-payment,
  .onedrive-upload-form,
  .task-project-shortcut,
  .general-todo-head,
  .general-todo-item,
  .payment-history-row {
    grid-template-columns: 1fr;
  }

  .onedrive-head,
  .onedrive-file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .onedrive-file-row {
    grid-template-columns: 1fr;
  }

  .onedrive-actions,
  .onedrive-file-actions,
  .onedrive-upload-actions,
  .task-project-shortcut-actions {
    justify-content: stretch;
  }

  .onedrive-actions button,
  .onedrive-file-actions a,
  .onedrive-upload-actions button,
  .task-project-shortcut-actions button {
    width: 100%;
  }

  .invoice-detail-box p {
    display: grid;
    gap: 2px;
  }

  .invoice-detail-box p strong {
    text-align: left;
  }

  .business-expense-form .wide-field {
    grid-column: span 1;
  }

  .smart-helper-grid {
    grid-template-columns: 1fr;
  }

.convert-quote-button,
.invoice-pdf-button,
.clone-record-button,
.record-payment-button {
  margin: 8px 0 0;
}

.whatsapp-workspace-panel,
.whatsapp-client-panel {
  border: 1px solid #d8e8df;
  border-radius: 8px;
  background: #f8fffb;
  padding: 16px;
  margin: 0 0 16px;
  box-shadow: 0 8px 20px rgba(16, 24, 40, 0.04);
}

.whatsapp-workspace-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.whatsapp-workspace-head h2 {
  margin: 2px 0 4px;
}

.whatsapp-workspace-head p {
  margin: 0;
  color: #5e6a7d;
}

.whatsapp-source-pill,
.communication-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  background: #e8f7ed;
  color: #166534;
  border: 1px solid #b7e4c7;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.whatsapp-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.whatsapp-grid label,
.whatsapp-log-dialog label {
  display: grid;
  gap: 6px;
}

.whatsapp-grid select,
.whatsapp-grid textarea,
.whatsapp-log-dialog select,
.whatsapp-log-dialog input,
.whatsapp-log-dialog textarea {
  width: 100%;
  border: 1px solid #cfd7e3;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.whatsapp-grid .wide-field {
  grid-column: 1 / -1;
}

.whatsapp-actions,
.whatsapp-log-options,
.whatsapp-flags,
.clone-dialog-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.whatsapp-flags label,
.whatsapp-log-options label {
  display: inline-flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 6px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
}

.whatsapp-timeline {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.communication-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.communication-entry strong {
  display: block;
  margin: 6px 0 2px;
}

.communication-entry p {
  margin: 0;
  color: #596579;
}

.communication-meta {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: flex-start;
  color: #667085;
  font-size: 12px;
}

.communication-meta span {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 4px 7px;
  background: #f8fafc;
}

.whatsapp-row-button {
  border-color: #a7e2b7;
  color: #166534;
}

.whatsapp-log-dialog {
  max-width: 860px;
}

.whatsapp-log-dialog .clone-dialog-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.whatsapp-log-dialog .wide-field {
  grid-column: 1 / -1;
}

.whatsapp-workspace-head,
.communication-entry {
  grid-template-columns: 1fr;
  flex-direction: column;
}

.whatsapp-grid,
.whatsapp-log-dialog .clone-dialog-grid {
  grid-template-columns: 1fr;
}

.whatsapp-actions button,
.whatsapp-actions a {
  width: 100%;
  justify-content: center;
}

.communication-meta {
  justify-content: flex-start;
}

.client-quick-actions-head,
.client-quick-primary {
  grid-template-columns: 1fr;
}
}

/* Platform workspace architecture */
.et-platform-workspace {
  --platform-bg: #f1f5f9;
  --platform-surface: #ffffff;
  --platform-surface-soft: #f7f8f5;
  --platform-line: #d9ded8;
  --platform-line-strong: #cbd5e1;
  --platform-ink: #0f172a;
  --platform-muted: #667085;
  --platform-radius: 10px;
  --platform-radius-sm: 8px;
  --platform-shadow: 0 12px 30px rgba(15, 23, 42, 0.065);
  --platform-shadow-hover: 0 18px 42px rgba(15, 23, 42, 0.11);
  --platform-focus: 0 0 0 3px rgba(13, 148, 136, 0.18);
  --platform-density-gap: 14px;
  color-scheme: light;
}

.et-platform-workspace[data-platform-theme="dark"] {
  --platform-bg: #0b1220;
  --platform-surface: #111827;
  --platform-surface-soft: #172033;
  --platform-line: #263244;
  --platform-line-strong: #334155;
  --platform-ink: #e5edf7;
  --platform-muted: #aab6c5;
  --platform-shadow: 0 16px 38px rgba(0, 0, 0, 0.28);
  --platform-shadow-hover: 0 22px 48px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

.et-platform-workspace[data-platform-theme="dark"] body,
.et-platform-workspace[data-platform-theme="dark"] .main,
.et-platform-workspace[data-platform-theme="dark"] .workflow-main,
.et-platform-workspace[data-platform-theme="dark"] .calendar-main,
.et-platform-workspace[data-platform-theme="dark"] .standard-workspace-main {
  background: var(--platform-bg);
  color: var(--platform-ink);
}

.et-platform-workspace[data-platform-theme="dark"] .platform-card,
.et-platform-workspace[data-platform-theme="dark"] .standard-card,
.et-platform-workspace[data-platform-theme="dark"] .platform-workspace-header,
.et-platform-workspace[data-platform-theme="dark"] .platform-status-card,
.et-platform-workspace[data-platform-theme="dark"] .global-search-results,
.et-platform-workspace[data-platform-theme="dark"] .command-palette,
.et-platform-workspace[data-platform-theme="dark"] .platform-side-inspector {
  background: var(--platform-surface);
  color: var(--platform-ink);
  border-color: var(--platform-line);
}

/* Native workspace hosts for fully migrated standalone modules. */
.native-workspace-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  margin: 0;
  background: var(--platform-bg, #f5f7fb);
  color: var(--platform-ink, #0f172a);
}

.native-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
  padding: 18px 14px;
  color: #ffffff;
  background: #0f172a;
}

.native-sidebar nav {
  display: grid;
  gap: 4px;
}

.native-workspace-main {
  min-width: 0;
  min-height: 100vh;
  background: var(--platform-bg, #f5f7fb);
}

.native-workspace-body {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
  grid-template-columns: 250px minmax(0, 1fr);
}

.native-workspace-body > .native-sidebar {
  position: sticky;
  top: 0;
  grid-column: 1;
  grid-row: 1;
  width: 250px;
  min-width: 250px;
  max-width: 250px;
  height: 100vh;
  z-index: 20;
  overflow-y: auto;
  overflow-x: hidden;
}

.native-workspace-body > .native-workspace-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.native-workspace-main .workflow-topbar {
  padding: 28px 32px 18px;
  margin-bottom: 0;
}

.native-workspace-main .today-standalone {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0 32px 48px;
  overflow-x: hidden;
}

.today-standalone,
.today-hero,
.today-grid,
.today-panel,
.eve-panel,
.eve-priority-panel,
.native-workspace-grid {
  min-width: 0;
  max-width: 100%;
}

.native-workspace-topbar {
  position: sticky;
  top: 0;
  z-index: 35;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--platform-line, #dbe3ee);
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
}

.native-workspace-topbar .top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.native-workspace-page {
  display: grid;
  gap: 14px;
  width: min(100%, 1760px);
  margin: 0 auto;
  padding: 16px;
}

.native-sync-panel {
  margin: 0;
}

.native-workspace-grid {
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr) minmax(260px, 340px);
  gap: 14px;
  align-items: start;
}

.native-calendar-grid {
  grid-template-columns: minmax(200px, 240px) minmax(0, 1fr);
}

.native-calendar-grid .native-right-panel {
  grid-column: 1 / -1;
  position: static;
  max-height: none;
}

.native-panel {
  min-width: 0;
  border: 1px solid var(--platform-line, #dbe3ee);
  border-radius: var(--platform-radius, 10px);
  background: var(--platform-surface, #ffffff);
  box-shadow: var(--platform-shadow, 0 12px 30px rgba(15, 23, 42, 0.065));
}

.native-left-panel,
.native-right-panel {
  position: sticky;
  top: 84px;
  max-height: calc(100vh - 102px);
  overflow: auto;
  padding: 14px;
}

.native-center-panel {
  overflow: hidden;
  padding: 14px;
}

.native-panel-heading {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}

.native-panel-heading h2 {
  margin: 0;
  color: var(--platform-ink, #0f172a);
  font-size: 18px;
  line-height: 1.2;
}

.native-form-stack {
  display: grid;
  gap: 11px;
}

.native-form-stack label,
.native-form-stack input,
.native-form-stack select,
.native-form-stack textarea {
  min-width: 0;
}

.native-status-grid,
.native-status-grid .summary-card,
.native-status-grid .workflow-kpi {
  min-width: 0;
}

.native-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.native-empty-state,
.native-inspector-note {
  display: grid;
  gap: 6px;
  border: 1px dashed var(--platform-line-strong, #cbd5e1);
  border-radius: var(--platform-radius-sm, 8px);
  padding: 14px;
  background: var(--platform-surface-soft, #f8fafc);
}

.native-empty-state strong,
.native-inspector-note strong {
  color: var(--platform-ink, #0f172a);
}

.native-empty-state p,
.native-inspector-note p {
  margin: 0;
  color: var(--platform-muted, #667085);
}

.native-filter-stack,
.native-action-stack {
  display: grid;
  gap: 8px;
}

.native-chip {
  display: inline-flex;
  width: max-content;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--platform-surface-soft, #f8fafc);
  color: var(--platform-muted, #667085);
  font-size: 12px;
  font-weight: 800;
}

button.native-chip {
  cursor: pointer;
}

.native-chip.active,
.native-chip:hover,
.native-chip:focus-visible {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #0f766e;
  outline: 0;
}

.native-chip.workflow {
  background: #fff7ed;
  color: #9a3412;
}

.native-chip.project {
  background: #eff6ff;
  color: #1d4ed8;
}

.native-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.native-action-grid button {
  justify-content: center;
  min-height: 38px;
}

.native-detail-record {
  display: grid;
  gap: 14px;
}

.native-inspector-panel {
  display: grid;
  gap: 14px;
}

.native-record-list,
.native-kanban {
  min-height: 240px;
}

.native-kanban {
  display: grid;
  grid-template-columns: repeat(5, minmax(185px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.native-kanban-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 420px;
  border: 1px solid var(--platform-line, #dbe3ee);
  border-radius: var(--platform-radius-sm, 8px);
  background: var(--platform-surface-soft, #f8fafc);
}

.native-kanban-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--platform-line, #dbe3ee);
  padding: 10px 12px;
}

.native-kanban-heading span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.native-kanban-stack {
  display: grid;
  align-content: start;
  gap: 9px;
  padding: 10px;
}

.native-kanban-card {
  display: grid;
  gap: 5px;
  width: 100%;
  border: 1px solid var(--platform-line, #dbe3ee);
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: var(--platform-ink, #0f172a);
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.native-kanban-card:hover,
.native-kanban-card:focus-visible,
.native-kanban-card.active {
  border-color: #0d9488;
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.18);
}

.native-kanban-card.overdue {
  border-color: #fecaca;
  background: #fff7f7;
}

.council-dams-ref {
  font-family: monospace;
  font-size: 11px;
  color: #0d9488;
  letter-spacing: 0.03em;
}

.council-dams-btn {
  border-color: #99f6e4;
  color: #0f766e;
  background: #f0fdfa;
}

.council-dams-btn:hover {
  background: #ccfbf1;
  border-color: #0d9488;
}

.native-kanban-card span,
.native-kanban-card small,
.native-kanban-card em {
  color: var(--platform-muted, #667085);
  font-style: normal;
}

.native-empty-line {
  margin: 0;
  color: var(--platform-muted, #667085);
  font-size: 13px;
}

.native-calendar-workspace {
  padding: 0;
}

.native-calendar-workspace .calendar-workflow-panel {
  border: 0;
  box-shadow: none;
}

.native-ai-grid {
  grid-template-columns: minmax(230px, 300px) minmax(0, 1fr) minmax(260px, 330px);
}

.native-ai-chat {
  display: grid;
  min-height: 620px;
  grid-template-rows: minmax(0, 1fr) auto;
}

.native-ai-chat .chat-stream {
  min-height: 420px;
  max-height: calc(100vh - 330px);
}

.native-prompt-list {
  display: grid;
  gap: 8px;
}

.native-prompt-list button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.native-ai-status {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.native-calendar-grid .calendar-workflow-header,
.native-calendar-grid .workflow-filters,
.native-calendar-grid .workflow-quick-actions {
  padding-inline: 14px;
}

.native-calendar-grid .workflow-content,
.native-calendar-grid .workflow-kpis,
.native-calendar-grid .workflow-message,
.native-calendar-grid .workflow-quick-form {
  margin-inline: 14px;
}

@media (max-width: 1180px) {
  .native-workspace-grid,
  .native-ai-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .native-left-panel,
  .native-right-panel {
    position: static;
    max-height: none;
  }

  .native-kanban {
    grid-template-columns: repeat(5, minmax(220px, 1fr));
  }
}

@media (max-width: 760px) {
  .native-workspace-body {
    grid-template-columns: 1fr;
  }

  .native-sidebar {
    position: static;
    height: auto;
    max-height: 40vh;
  }

  .native-workspace-page {
    padding: 10px;
  }

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

  .native-action-grid {
    grid-template-columns: 1fr;
  }

  .native-ai-chat {
    min-height: 520px;
  }
}

@media (max-width: 1100px) and (min-width: 761px) {
  .native-workspace-body {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .native-workspace-body > .native-sidebar {
    width: 200px;
    min-width: 200px;
    max-width: 200px;
    padding-inline: 10px;
  }

  .native-workspace-main .workflow-topbar {
    padding-inline: 20px;
  }

  .native-workspace-main .today-standalone {
    padding-inline: 20px;
  }
}

@media (max-width: 760px) {
  .native-workspace-body {
    display: block;
    overflow-x: hidden;
  }

  .native-workspace-body > .native-sidebar {
    position: relative;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    height: auto;
    max-height: none;
  }

  .native-workspace-main .workflow-topbar {
    padding: 16px;
  }

  .native-workspace-main .today-standalone {
    padding: 0 16px 32px;
  }
}

.platform-topbar {
  gap: 12px;
  min-height: 66px;
  border-bottom: 1px solid var(--platform-line);
  background: rgba(248, 250, 252, 0.92);
}

.et-platform-workspace[data-platform-theme="dark"] .platform-topbar {
  background: rgba(15, 23, 42, 0.92);
}

.platform-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: max-content;
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 700;
}

.platform-breadcrumbs a {
  color: inherit;
  text-decoration: none;
}

.platform-breadcrumbs strong {
  color: var(--platform-ink);
}

.platform-sidebar {
  background: #0f172a !important;
}

.platform-sidebar-brand {
  cursor: pointer;
}

.platform-sidebar-nav {
  padding-bottom: 12px;
}

.platform-sidebar-tools {
  display: grid;
  gap: 8px;
  margin: 10px 12px 14px;
}

.platform-sidebar-tools button {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #e5e7eb;
  text-align: left;
}

.platform-sidebar-tools span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.09);
}

.platform-sidebar-tools small {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 800;
}

.platform-page {
  display: grid;
  gap: var(--platform-density-gap);
  max-width: 1680px;
  margin-inline: auto;
}

.platform-workspace-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  padding: 16px;
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.platform-module-clients > .platform-topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  border-bottom: 1px solid var(--platform-line);
  background: color-mix(in srgb, var(--platform-surface) 96%, transparent);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
}

.platform-header-main {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.platform-header-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 10px;
  background: var(--ws-neutral-soft);
  color: var(--ws-neutral-accent);
  font-size: 13px;
  font-weight: 900;
}

.platform-workspace-header h1 {
  margin: 1px 0 4px;
  color: var(--platform-ink);
  font-size: clamp(24px, 2vw, 32px);
  line-height: 1.1;
  letter-spacing: 0;
}

.platform-workspace-header p {
  max-width: 860px;
  margin: 0;
  color: var(--platform-muted);
  font-size: 14px;
}

.platform-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.platform-view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  padding: 6px;
  background: var(--platform-surface);
}

.platform-view-tabs button {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 12px;
  background: transparent;
  color: var(--platform-muted);
  font-weight: 800;
}

.platform-view-tabs button:hover,
.platform-view-tabs button:focus-visible,
.platform-view-tabs button.active {
  border-color: var(--platform-line-strong);
  background: var(--platform-surface-soft);
  color: var(--platform-ink);
  outline: 0;
}

.platform-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.platform-status-card {
  display: grid;
  gap: 5px;
  min-height: 90px;
  border: 1px solid var(--platform-line, #e2e8f0);
  border-left: 3px solid #94a3b8;
  border-radius: var(--platform-radius-sm, 8px);
  padding: 14px 16px;
  background: var(--platform-surface, #fff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
  transition: box-shadow 0.15s;
}

.platform-status-card:hover {
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.09);
}

.platform-status-card span {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.platform-status-card strong {
  color: var(--platform-ink, #0f172a);
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.platform-status-card small {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
}

.platform-status-card.good      { border-left-color: #16a34a; background: #f0fdf4; }
.platform-status-card.warn      { border-left-color: #d97706; background: #fffbeb; }
.platform-status-card.danger    { border-left-color: #dc2626; background: #fff1f2; }
.platform-status-card.finance   { border-left-color: var(--ws-finance-accent);   background: var(--ws-finance-soft);   }
.platform-status-card.project   { border-left-color: var(--ws-project-accent);   background: var(--ws-project-soft);   }
.platform-status-card.workflow  { border-left-color: var(--ws-workflow-accent);  background: var(--ws-workflow-soft);  }
.platform-status-card.technical { border-left-color: var(--ws-technical-accent); background: var(--ws-technical-soft); }
.platform-status-card.neutral   { border-left-color: #94a3b8; }

.platform-view-content {
  display: grid;
  gap: 14px;
  border: 1px solid var(--platform-line);
  border-radius: var(--platform-radius);
  padding: 14px;
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.platform-view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px solid var(--platform-line);
  padding-bottom: 12px;
}

.platform-view-head h2 {
  margin: 2px 0;
  color: var(--platform-ink);
  font-size: 18px;
}

.platform-view-head p {
  margin: 0;
  color: var(--platform-muted);
  font-size: 13px;
}

.platform-record-list {
  display: grid;
  gap: 8px;
}

.platform-record-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--platform-surface);
}

.platform-record-card h3 {
  margin: 2px 0;
  color: var(--platform-ink);
  font-size: 15px;
}

.platform-record-card p,
.platform-record-card span {
  margin: 0;
  color: var(--platform-muted);
}

.platform-record-type {
  display: inline-flex;
  width: max-content;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-size: 11px;
  font-weight: 900;
}

.platform-record-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: var(--platform-muted);
  font-size: 12px;
}

.platform-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.platform-board-column {
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 260px;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  background: var(--platform-surface-soft);
}

.platform-board-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px solid var(--platform-line);
  padding: 10px 12px;
}

.platform-board-column header span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

/* Council pipeline column accent borders */
.council-pipeline-column { border-top: 3px solid #94a3b8; }
.council-pipeline-column[data-board-label*="bdm"]       { border-top-color: #1d4ed8; }
.council-pipeline-column[data-board-label*="hwc"]       { border-top-color: #d97706; }
.council-pipeline-column[data-board-label*="lum"]       { border-top-color: #16a34a; }
.council-pipeline-column[data-board-label*="submit"]    { border-top-color: #0d9488; }
.council-pipeline-column[data-board-label*="approv"]    { border-top-color: #7c3aed; }
.council-pipeline-column[data-board-label*="cape town"] { border-top-color: #1d4ed8; }
.council-pipeline-column[data-board-label*="bellville"] { border-top-color: #1d4ed8; }

.platform-board-column > div {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
}

.platform-board-card {
  display: grid;
  gap: 4px;
  width: 100%;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  padding: 9px;
  background: var(--platform-surface);
  color: var(--platform-ink);
  text-align: left;
}

.platform-board-card:hover,
.platform-board-card:focus-visible,
.platform-record-card:hover {
  border-color: var(--platform-line-strong);
  box-shadow: var(--platform-focus);
  outline: 0;
}

.platform-board-card span,
.platform-board-card small {
  color: var(--platform-muted);
  font-size: 12px;
}

.council-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

.council-card-actions .inline-button {
  min-height: 34px;
  padding: 6px 10px;
}

.platform-empty-state {
  display: grid;
  justify-items: start;
  gap: 9px;
  border: 1px dashed var(--platform-line-strong);
  border-radius: 10px;
  padding: 18px;
  background: var(--platform-surface-soft);
}

.platform-empty-state strong {
  color: var(--platform-ink);
}

.platform-empty-state p {
  max-width: 640px;
  margin: 0;
  color: var(--platform-muted);
}

.platform-list-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
  gap: 10px;
}

.platform-list-tools label {
  display: grid;
  gap: 5px;
}

.platform-list-tools span {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 850;
}

.platform-list-tools input,
.platform-list-tools select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--platform-surface);
  color: var(--platform-ink);
}

.platform-pro-list {
  display: grid;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  overflow: hidden;
  background: var(--platform-surface);
}

.platform-pro-head,
.platform-pro-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
}

.project-pro-head,
.project-pro-row {
  grid-template-columns: minmax(190px, 1.25fr) minmax(150px, 1fr) minmax(105px, .65fr) minmax(120px, .75fr) minmax(170px, 1fr) auto;
}

.client-pro-head,
.client-pro-row {
  grid-template-columns: minmax(190px, 1.2fr) minmax(190px, 1.1fr) minmax(80px, .45fr) minmax(115px, .65fr) minmax(115px, .65fr) auto;
}

.council-list-tools {
  grid-template-columns: minmax(220px, 1.35fr) repeat(4, minmax(140px, .8fr));
}

.council-pro-head,
.council-pro-row {
  grid-template-columns: minmax(190px, 1.15fr) minmax(190px, 1.15fr) minmax(140px, .8fr) minmax(120px, .75fr) minmax(130px, .75fr) auto;
}

.municipality-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 3px 8px;
  background: var(--ws-project-soft);
  color: var(--ws-project-accent);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.council-pipeline-board {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.council-pipeline-card {
  border-left: 3px solid var(--ws-project-accent);
}

.et-platform-workspace[data-platform-theme="dark"] .municipality-badge {
  background: rgba(59, 130, 246, 0.16);
  color: #93c5fd;
}

.et-platform-workspace[data-platform-theme="dark"] .council-pipeline-card {
  border-left-color: #60a5fa;
}

.native-workspace-main .platform-breadcrumbs,
.native-workspace-main .global-search-wrapper {
  max-width: 100%;
}

.platform-pro-head {
  border-bottom: 1px solid var(--platform-line);
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 900;
}

.platform-pro-row {
  border-bottom: 1px solid var(--platform-line);
  color: var(--platform-ink);
}

.council-record-highlight {
  animation: councilRecordHighlight 2.6s ease;
}

@keyframes councilRecordHighlight {
  0%,
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 rgba(13, 148, 136, 0);
  }

  16%,
  76% {
    background: rgba(13, 148, 136, 0.1);
    box-shadow: inset 4px 0 0 rgba(13, 148, 136, 0.8);
  }
}

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

.platform-pro-row > div:first-child {
  display: grid;
  gap: 2px;
}

.platform-pro-row strong {
  color: var(--platform-ink);
}

.platform-pro-row span {
  min-width: 0;
  color: var(--platform-muted);
}

.project-status-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.commercial-status-badge {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.commercial-partially-invoiced {
  background: #fef3c7;
  color: #92400e;
}

.commercial-fully-invoiced {
  background: #dbeafe;
  color: #1d4ed8;
}

.commercial-paid {
  background: #dcfce7;
  color: #166534;
}

.commercial-overdue {
  background: #fee2e2;
  color: #991b1b;
}

.commercial-not-invoiced {
  background: #f1f5f9;
  color: #475569;
}

.project-commercial-card {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 10px;
  background: var(--platform-surface, #fff);
  padding: 14px;
}

.project-commercial-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
}

.project-commercial-card header span,
.project-commercial-grid span {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 4px;
}

.project-commercial-card header strong {
  color: var(--platform-ink, #0f172a);
  font-size: 18px;
}

.project-commercial-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.project-commercial-grid article {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 9px;
  background: var(--platform-surface-soft, #f8fafc);
  padding: 10px;
}

.project-commercial-grid strong {
  display: block;
  overflow: hidden;
  color: var(--platform-ink, #0f172a);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-memory-list,
.project-memory-pinned,
.project-document-missing {
  display: grid;
  gap: 8px;
}

.project-memory-entry {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 9px;
  padding: 10px 12px;
  background: #ffffff;
}

.project-memory-entry span,
.project-commercial-grid small {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  line-height: 1.4;
}

.project-memory-entry strong {
  display: block;
  margin-top: 3px;
  color: var(--platform-ink, #0f172a);
}

.project-memory-form,
.project-document-form {
  display: grid;
  grid-template-columns: minmax(140px, 0.7fr) minmax(120px, 0.5fr) minmax(220px, 1.4fr) auto;
  gap: 8px;
  align-items: center;
}

.project-memory-form input,
.project-memory-form select,
.project-document-form input,
.project-document-form select {
  min-width: 0;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 8px;
  padding: 9px 10px;
  background: #ffffff;
}

.project-memory-pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--platform-muted, #64748b);
  font-size: 13px;
}

.project-document-missing {
  grid-template-columns: repeat(auto-fit, minmax(160px, max-content));
  align-items: center;
}

.project-health-bar article {
  border-left: 4px solid #16a34a;
}

.project-health-bar article.health-blue {
  border-left-color: #2563eb;
}

.project-health-bar article.health-amber {
  border-left-color: #d97706;
}

.project-health-bar article.health-red {
  border-left-color: #dc2626;
}

.submission-readiness-bar {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.submission-readiness-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #16a34a;
}

.submission-readiness-bar.ready-blue span {
  background: #2563eb;
}

.submission-readiness-bar.ready-amber span {
  background: #d97706;
}

.submission-readiness-bar.ready-orange span {
  background: #f97316;
}

.submission-readiness-bar.ready-red span {
  background: #dc2626;
}

.eve-memory-list {
  margin: 0;
  padding-left: 18px;
  color: var(--platform-muted, #64748b);
  font-size: 13px;
  line-height: 1.5;
}

.coo-recommendations-panel {
  grid-column: 1 / -1;
}

.coo-recommendations-panel .coo-summary {
  border: 1px solid rgba(13, 148, 136, 0.2);
  border-radius: 10px;
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 750;
  padding: 10px 12px;
}

.eve-health-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.eve-health-card {
  position: relative;
  display: grid;
  gap: 4px;
  border: 1px solid var(--platform-line, #d7dee8);
  border-left: 5px solid #64748b;
  border-radius: 12px;
  background: #ffffff;
  padding: 13px 14px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.eve-health-card:hover,
.eve-health-card:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.1);
  outline: none;
}

.eve-health-card.green { border-left-color: #16a34a; }
.eve-health-card.blue { border-left-color: #2563eb; }
.eve-health-card.amber { border-left-color: #d97706; }
.eve-health-card.red { border-left-color: #dc2626; }

.eve-health-card span {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.eve-health-card strong {
  color: var(--platform-ink, #0f172a);
  font-size: 30px;
  line-height: 1;
}

.eve-health-card em {
  color: var(--platform-ink, #0f172a);
  font-style: normal;
  font-weight: 800;
}

.eve-health-card small {
  overflow: hidden;
  color: var(--platform-muted, #64748b);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eve-hero-details {
  margin-top: 8px;
}

.eve-hero-details > summary {
  width: fit-content;
  color: #99f6e4;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.eve-hero-details:not([open]) .eve-hero-sub {
  display: none;
}

.eve-executive-cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.eve-loading-skeleton {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.eve-loading-skeleton > div {
  display: grid;
  gap: 12px;
  min-height: 150px;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 16px;
  background: var(--eve-card);
}

.eve-loading-skeleton span,
.eve-loading-skeleton strong,
.eve-loading-skeleton small {
  display: block;
  border-radius: 6px;
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 50%, #eef2f7 75%);
  background-size: 200% 100%;
  animation: eve-skeleton-shimmer 1.1s ease-in-out infinite;
}

.eve-loading-skeleton span { width: 45%; height: 12px; }
.eve-loading-skeleton strong { width: 85%; height: 28px; }
.eve-loading-skeleton small { width: 65%; height: 14px; }

@keyframes eve-skeleton-shimmer {
  from { background-position: 100% 0; }
  to { background-position: -100% 0; }
}

.eve-executive-card {
  min-width: 0;
  min-height: 218px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--eve-border, #d8dee8);
  border-top: 4px solid #64748b;
  border-radius: var(--eve-radius, 8px);
  background: var(--eve-card, #fff);
  box-shadow: var(--eve-shadow);
}

.eve-executive-card.danger { border-top-color: #dc2626; }
.eve-executive-card.warning { border-top-color: #d97706; }
.eve-executive-card.success { border-top-color: #0d9488; }

.eve-executive-card > header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eve-executive-card > header i {
  color: var(--eve-teal, #0d9488);
  font-size: 19px;
}

.eve-executive-card > header h2 {
  margin: 0;
  font-size: 14px;
}

.eve-executive-headline {
  display: grid;
  gap: 3px;
  color: var(--eve-text, #111827);
  text-decoration: none;
}

.eve-executive-headline strong {
  overflow: hidden;
  font-size: 16px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.eve-executive-headline span,
.eve-executive-card > p,
.eve-executive-card details p {
  margin: 0;
  color: var(--eve-muted, #64748b);
  font-size: 12px;
  line-height: 1.45;
}

.eve-executive-card > p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.eve-executive-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.eve-executive-card dl div {
  min-width: 0;
}

.eve-executive-card dt {
  color: var(--eve-muted, #64748b);
  font-size: 10px;
  font-weight: 700;
}

.eve-executive-card dd {
  overflow: hidden;
  margin: 2px 0 0;
  color: var(--eve-text, #111827);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.eve-executive-card details {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.eve-executive-card details summary {
  color: var(--eve-teal, #0d9488);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.eve-executive-card details p {
  margin-top: 7px;
}

.eve-executive-card details a {
  display: inline-flex;
  margin-top: 7px;
  color: var(--eve-teal, #0d9488);
  font-size: 12px;
  font-weight: 750;
}

@media (max-width: 1280px) {
  .eve-executive-cards,
  .eve-loading-skeleton {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .eve-executive-cards,
  .eve-loading-skeleton {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .eve-executive-cards,
  .eve-loading-skeleton {
    grid-template-columns: 1fr;
  }

  .eve-executive-card {
    min-height: 0;
  }
}

.coo-focus-score {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  padding: 6px 10px;
}

.coo-recommendations-list {
  display: grid;
  gap: 10px;
}

.coo-recommendation-item {
  border-left: 4px solid #16a34a;
  padding-left: 8px;
}

.coo-recommendation-item.medium { border-left-color: #d97706; }
.coo-recommendation-item.high { border-left-color: #f97316; }
.coo-recommendation-item.critical { border-left-color: #dc2626; }

.coo-recommendation-item .today-priority-body small {
  display: block;
  margin-top: 4px;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  line-height: 1.35;
}

.coo-factor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 7px;
}

.coo-factor-list b {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  padding: 3px 7px;
}

.priority-heat-badge,
.visual-status-badge {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  padding: 3px 7px;
}

.priority-heat-badge.low,
.visual-status-badge.green {
  background: #dcfce7;
  color: #166534;
}

.priority-heat-badge.medium,
.visual-status-badge.amber {
  background: #fef3c7;
  color: #92400e;
}

.priority-heat-badge.high,
.visual-status-badge.orange {
  background: #ffedd5;
  color: #9a3412;
}

.priority-heat-badge.critical,
.visual-status-badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.visual-status-badge.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.project-communication-card {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 10px;
  background: var(--platform-surface, #fff);
  padding: 14px;
}

.project-communication-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: 0;
}

.project-communication-card header span,
.project-communication-list span {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 850;
}

.project-communication-card header strong {
  display: block;
  color: var(--platform-ink, #0f172a);
  font-size: 16px;
}

.project-communication-card header em {
  border-radius: 999px;
  padding: 3px 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.project-communication-list {
  display: grid;
  gap: 8px;
}

.project-communication-list article {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 9px;
  background: var(--platform-surface-soft, #f8fafc);
  padding: 10px;
}

.project-communication-list p,
.project-communication-empty {
  margin: 3px 0 0;
  color: var(--platform-muted, #64748b);
}

.et-platform-workspace[data-platform-theme="dark"] .project-commercial-card,
.et-platform-workspace[data-platform-theme="dark"] .project-commercial-grid article,
.et-platform-workspace[data-platform-theme="dark"] .project-communication-card,
.et-platform-workspace[data-platform-theme="dark"] .project-communication-list article {
  border-color: rgba(148, 163, 184, .24);
  background: rgba(15, 23, 42, .72);
}

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

  .eve-health-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .project-commercial-grid {
    grid-template-columns: 1fr;
  }

  .eve-health-strip {
    grid-template-columns: 1fr;
  }

  .project-memory-form,
  .project-document-form {
    grid-template-columns: 1fr;
  }
}

.platform-row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.platform-activity-list {
  display: grid;
  gap: 8px;
}

.platform-activity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  padding: 11px 12px;
  background: var(--platform-surface);
}

.platform-activity-card p {
  margin: 2px 0 0;
  color: var(--platform-muted);
}

.platform-activity-card time {
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 800;
}

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

.client-detail-grid article,
.client-detail-notes {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 10px;
  background: var(--platform-surface-soft, #f8fafc);
  padding: 12px;
}

.client-detail-grid span {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 4px;
}

.client-detail-grid strong {
  display: block;
  color: var(--platform-ink, #0f172a);
  font-size: 16px;
}

.client-detail-grid p,
.client-detail-notes p {
  margin: 5px 0 0;
  color: var(--platform-muted, #64748b);
}

.operations-intake-workspace,
.intake-review-shell {
  display: grid;
  gap: 14px;
}

.intake-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.intake-pipeline button {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 10px;
  padding: 10px 12px;
  background: var(--platform-surface, #fff);
  color: var(--platform-muted, #64748b);
  text-align: left;
}

.intake-pipeline button.active {
  border-color: #8b5cf6;
  background: #f5f3ff;
  color: var(--platform-ink, #0f172a);
}

.intake-pipeline button:disabled {
  opacity: .55;
  cursor: not-allowed;
}

.intake-pipeline span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 900;
  font-size: 12px;
}

.intake-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 14px;
  align-items: start;
}

.intake-card {
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 12px;
  background: var(--platform-surface, #fff);
  box-shadow: var(--platform-shadow, 0 10px 30px rgba(15,23,42,.06));
  padding: 16px;
}

.intake-card-head {
  display: grid;
  gap: 5px;
  margin-bottom: 13px;
}

.intake-card-head h2,
.intake-card h3 {
  margin: 0;
  color: var(--platform-ink, #0f172a);
}

.intake-card-head p,
.intake-card p {
  margin: 0;
  color: var(--platform-muted, #64748b);
}

.intake-dropzone {
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 150px;
  border: 1px dashed #a78bfa;
  border-radius: 12px;
  background: #faf5ff;
  color: #4c1d95;
  padding: 18px;
  text-align: center;
  cursor: pointer;
}

.intake-dropzone.dragging {
  background: #ede9fe;
  border-color: #7c3aed;
}

.intake-dropzone input {
  display: none;
}

.intake-paste {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.intake-paste span,
.intake-review-toolbar label span {
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 850;
}

.intake-paste textarea,
.intake-review-toolbar select,
.intake-review-row input,
.intake-review-row textarea {
  width: 100%;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--platform-ink, #0f172a);
}

.intake-actions,
.intake-review-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.intake-stage-list {
  display: grid;
  gap: 10px;
  padding-left: 18px;
  color: var(--platform-muted, #64748b);
}

.intake-stage-list li strong {
  display: block;
  color: var(--platform-ink, #0f172a);
}

.intake-alert {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fffbeb;
  color: #92400e;
}

.intake-alert.error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.intake-alert.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.intake-alert.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.intake-alert small {
  display: block;
  flex-basis: 100%;
  color: inherit;
}

.intake-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #ede9fe;
}

.intake-progress span {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: #7c3aed;
  animation: intake-progress 1s ease-in-out infinite alternate;
}

@keyframes intake-progress {
  from { transform: translateX(-30%); }
  to { transform: translateX(140%); }
}

.intake-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.intake-validation-panel {
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}

.intake-validation-panel.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.intake-validation-panel span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.intake-validation-panel strong {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.intake-validation-panel em {
  grid-column: 1 / -1;
  font-style: normal;
  font-weight: 800;
}

.intake-review-table {
  display: grid;
  border: 1px solid var(--platform-line, #d7dee8);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.intake-review-head,
.intake-review-row {
  display: grid;
  grid-template-columns: 42px 44px minmax(170px, 1fr) minmax(90px, .45fr) minmax(180px, 1fr) minmax(110px, .55fr) minmax(170px, 1fr) minmax(110px, .55fr) minmax(180px, 1fr) minmax(220px, 1.15fr) minmax(130px, .65fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
}

.intake-review-head {
  background: var(--platform-surface-soft, #f8fafc);
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 900;
}

.intake-review-row {
  border-top: 1px solid var(--platform-line, #d7dee8);
}

.intake-review-row.has-warnings {
  background: #fffbeb;
}

.intake-review-row small {
  display: block;
  margin-top: 4px;
  color: var(--platform-muted, #64748b);
}

.intake-check {
  display: grid;
  place-items: center;
}

.intake-check input {
  width: 18px;
  height: 18px;
}

.intake-destination-list {
  display: grid;
  gap: 4px;
  font-size: 12px;
}

.intake-destination-list label {
  display: flex;
  gap: 5px;
  align-items: center;
}

.intake-task-list {
  display: grid;
  gap: 6px;
}

.intake-task-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
}

.intake-task-choice input {
  margin-top: 6px;
}

.intake-task-list small {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 5px 7px;
  background: #eff6ff;
  color: #1d4ed8 !important;
  font-weight: 750;
}

.confidence-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
}

.confidence-badge.good {
  color: #047857;
  background: #d1fae5;
}

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

.confidence-badge.danger {
  color: #b91c1c;
  background: #fee2e2;
}

.intake-warning,
.intake-duplicate {
  color: #92400e !important;
  font-weight: 750;
}

.platform-card,
.platform-form,
.platform-data-table {
  border-radius: var(--platform-radius-sm);
}

.platform-card {
  border: 1px solid var(--platform-line);
  background: var(--platform-surface);
  box-shadow: var(--platform-shadow);
}

.platform-card:hover {
  box-shadow: var(--platform-shadow-hover);
}

.platform-form {
  display: grid;
  gap: 12px;
}

.platform-field span,
.platform-form label > span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.platform-data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
}

.platform-action-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-accent-finance .platform-header-icon,
.workspace-accent-finance .platform-header-icon { background: var(--ws-finance-soft); color: var(--ws-finance-accent); }
.platform-accent-project .platform-header-icon,
.workspace-accent-project .platform-header-icon { background: var(--ws-project-soft); color: var(--ws-project-accent); }
.platform-accent-workflow .platform-header-icon,
.workspace-accent-workflow .platform-header-icon { background: var(--ws-workflow-soft); color: var(--ws-workflow-accent); }
.platform-accent-technical .platform-header-icon,
.workspace-accent-technical .platform-header-icon { background: var(--ws-technical-soft); color: var(--ws-technical-accent); }
.platform-accent-admin .platform-header-icon,
.workspace-accent-admin .platform-header-icon { background: var(--ws-admin-soft); color: var(--ws-admin-accent); }

.global-search-widget {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  background: #fff;
  padding-left: 10px;
}

.global-search-widget input {
  border: 0 !important;
  min-height: 42px;
  padding-left: 4px;
}

.global-search-icon {
  color: #64748b;
  font-weight: 900;
}

.global-search-command-key {
  margin-right: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  padding: 5px 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.command-palette-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: start center;
  padding: 8vh 18px 18px;
  background: rgba(15, 23, 42, 0.48);
}

.command-palette-overlay[hidden] {
  display: none;
}

.command-palette {
  display: grid;
  gap: 12px;
  width: min(860px, 100%);
  max-height: 84vh;
  overflow: hidden;
  border: 1px solid var(--platform-line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.35);
}

.command-palette header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 0;
}

.command-palette h2 {
  margin: 2px 0 0;
  font-size: 22px;
}

.command-palette-close,
.platform-side-inspector header button {
  border: 1px solid var(--platform-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--platform-surface-soft);
  color: var(--platform-ink);
  font-weight: 800;
}

.command-palette-input {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  margin: 0 18px;
  border: 1px solid var(--platform-line-strong);
  border-radius: 10px;
  padding: 0 10px;
  background: var(--platform-surface-soft);
}

.command-palette-input input {
  border: 0;
  min-height: 48px;
  background: transparent;
  font-size: 16px;
  outline: 0;
}

.command-palette-body {
  display: grid;
  gap: 14px;
  overflow: auto;
  padding: 0 18px 18px;
}

.command-section {
  display: grid;
  gap: 8px;
}

.command-section h3 {
  margin: 0;
  color: var(--platform-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.command-tile,
.command-result {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  padding: 11px;
  background: var(--platform-surface);
  color: var(--platform-ink);
  text-align: left;
}

.command-tile:hover,
.command-result:hover,
.command-tile:focus-visible,
.command-result:focus-visible {
  border-color: #64748b;
  box-shadow: var(--platform-focus);
  outline: 0;
}

.command-tile span,
.command-result-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 8px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-size: 12px;
  font-weight: 900;
}

.command-tile small,
.command-result small,
.command-empty {
  color: var(--platform-muted);
}

.command-list {
  display: grid;
  gap: 6px;
}

.command-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: stretch;
}

.command-result {
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
}

.command-pin {
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  padding-inline: 10px;
  background: var(--platform-surface-soft);
  color: var(--platform-muted);
  font-weight: 800;
}

.platform-side-inspector {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 1150;
  display: grid;
  align-content: start;
  gap: 14px;
  width: min(380px, calc(100vw - 28px));
  padding: 18px;
  border-left: 1px solid var(--platform-line);
  background: #fff;
  box-shadow: -18px 0 45px rgba(15, 23, 42, 0.18);
  transform: translateX(105%);
  transition: transform 180ms ease;
}

.platform-inspector-open .platform-side-inspector {
  transform: translateX(0);
}

.platform-side-inspector header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.platform-side-inspector h2,
.platform-side-inspector h3 {
  margin: 0 0 6px;
}

.platform-side-inspector p {
  color: var(--platform-muted);
}

.platform-inspector-chips,
.platform-inspector-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.platform-inspector-chips span,
.platform-inspector-links a {
  border: 1px solid var(--platform-line);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--platform-surface-soft);
  color: var(--platform-ink);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.platform-inspector-recent {
  display: grid;
  gap: 2px;
  border: 1px solid var(--platform-line);
  border-radius: 10px;
  padding: 10px;
  color: var(--platform-ink);
  text-decoration: none;
}

.platform-inspector-recent span {
  color: var(--platform-muted);
  font-size: 12px;
}

.platform-theme-toggle {
  min-width: 70px;
}

.reference-settings-panel {
  display: grid;
  gap: 14px;
}

.reference-settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
}

.reference-rule-card {
  display: grid;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: var(--platform-surface, #fff);
}

.reference-rule-card strong {
  display: block;
  color: var(--platform-ink, #111827);
}

.reference-rule-card small {
  color: var(--platform-muted, #64748b);
  font-size: 12px;
}

.reference-rule-card label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.reference-rule-card input[type="text"],
.reference-rule-card input[type="number"],
.reference-rule-card input:not([type]) {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 8px;
  padding: 7px 9px;
}

.reference-rule-card .toggle-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.reference-health-grid {
  margin-bottom: 10px;
}

.command-result small b {
  color: var(--platform-ink, #111827);
  font-weight: 900;
}

.command-copy {
  background: #eef6ff;
  color: #1d4ed8;
}

.platform-productivity-workspace .standard-card,
.platform-productivity-workspace .panel,
.platform-finance-workspace .standard-card,
.platform-finance-workspace .panel {
  overflow: hidden;
}

.task-store-debug {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.task-store-debug > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #f8fafc;
}

.task-store-debug span {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.task-store-debug strong {
  color: var(--platform-ink, #111827);
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-source-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
}

.task-main-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 12px;
}

.task-main-column {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 260px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #f8fafc;
  overflow: hidden;
}

.task-main-column > header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 12px;
  border-bottom: 1px solid var(--platform-line, #d8dee8);
  background: #fff;
}

.task-main-column > header span {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #e2e8f0;
  font-weight: 800;
  color: #334155;
}

.task-main-column > div {
  display: grid;
  gap: 9px;
  padding: 10px;
}

.task-main-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(15, 23, 42, .05);
}

.task-main-card strong,
.task-main-table-row strong {
  display: block;
  color: var(--platform-ink, #111827);
  font-size: 14px;
}

.task-main-card small,
.task-main-table-row small {
  color: var(--platform-muted, #64748b);
}

.task-main-card-meta,
.task-main-card footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.task-main-card footer {
  justify-content: space-between;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
}

.status-badge.source {
  background: #eef2ff;
  color: #3730a3;
}

.status-badge.workflow {
  background: #ecfdf5;
  color: #047857;
}

.task-inline-status {
  display: grid;
  gap: 5px;
}

.task-inline-status span {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-inline-status select,
.task-table-status {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 8px;
  background: #fff;
  color: var(--platform-ink, #111827);
  padding: 6px 9px;
  font: inherit;
}

.task-main-table {
  display: grid;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.task-main-table-head,
.task-main-table-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) minmax(180px, 1fr) minmax(120px, .7fr) minmax(130px, .7fr) minmax(100px, .5fr) minmax(150px, .8fr) minmax(90px, .45fr);
  gap: 12px;
  align-items: center;
  padding: 11px 14px;
}

.task-main-table-head {
  background: #f8fafc;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-main-table-row {
  border-top: 1px solid var(--platform-line, #d8dee8);
}

.task-calendar-list {
  display: grid;
  gap: 12px;
}

.task-calendar-day {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #fff;
}

.task-calendar-day > header {
  display: flex;
  justify-content: space-between;
  color: var(--platform-ink, #111827);
}

.task-bulk-toolbar {
  display: grid;
  grid-template-columns: auto auto auto minmax(130px, .9fr) minmax(130px, .9fr) minmax(140px, .9fr) auto;
  gap: 10px;
  align-items: end;
  padding: 10px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #f8fafc;
}

.task-bulk-toolbar > span {
  align-self: center;
  color: var(--platform-muted, #64748b);
  font-weight: 800;
}

.task-bulk-toolbar label,
.task-bulk-check {
  display: grid;
  gap: 5px;
}

.task-bulk-toolbar label span,
.task-bulk-check span {
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-bulk-toolbar input,
.task-bulk-toolbar select {
  min-height: 36px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 8px;
  padding: 7px 9px;
}

.task-bulk-check {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  justify-self: start;
}

.task-bulk-check.inline {
  margin-bottom: 5px;
}

.task-render-limit {
  margin: 6px 0;
  padding: 8px 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
}

.task-detail-dialog {
  width: min(1080px, calc(100vw - 42px));
  max-height: calc(100vh - 42px);
  overflow: auto;
}

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

.task-detail-grid .wide-field {
  grid-column: 1 / -1;
}

.task-detail-grid label {
  display: grid;
  gap: 6px;
}

.task-detail-grid label span {
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  font-weight: 800;
}

.task-detail-grid input,
.task-detail-grid select,
.task-detail-grid textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 9px;
  background: #fff;
  color: var(--platform-ink, #111827);
  padding: 9px 10px;
  font: inherit;
}

.task-detail-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.task-detail-meta article,
.task-detail-links > div {
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #f8fafc;
  padding: 11px;
}

.task-detail-meta span {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-detail-meta strong {
  color: var(--platform-ink, #111827);
}

.task-detail-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.task-detail-links h3 {
  margin: 0 0 8px;
  color: var(--platform-ink, #111827);
  font-size: 14px;
}

.task-detail-links p {
  display: grid;
  gap: 3px;
  margin: 0 0 8px;
  color: var(--platform-muted, #64748b);
  font-size: 13px;
}

.platform-module-tasks > [data-platform-view-tabs],
.platform-module-tasks > [data-platform-status-strip],
.platform-module-tasks .platform-view-head {
  display: none;
}

.platform-module-tasks .platform-view-content {
  margin-top: 0;
}

.task-todo-workspace {
  width: min(980px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.tasks-native-page {
  min-height: calc(100vh - 82px);
  background: #f8fafc;
}

[data-task-workspace-root] {
  width: min(1040px, 100%);
  margin: 0 auto;
}

.tasks-native-topbar h1 {
  margin: 2px 0 0;
  font-size: 22px;
}

.task-quick-add {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 120px 150px auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .035);
}

.task-quick-add input,
.task-quick-add select,
.task-search input {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 8px;
  background: #fff;
  color: var(--platform-ink, #111827);
  padding: 8px 10px;
  font: inherit;
}

.task-quick-add input[name="title"] {
  font-weight: 700;
}

.task-quick-add-status {
  grid-column: 1 / -1;
  min-height: 0;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
}

.task-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 2px;
}

.task-filter-row > button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 999px;
  background: #fff;
  color: #475569;
  padding: 6px 11px;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.task-filter-row > button:hover,
.task-filter-row > button:focus-visible,
.task-filter-row > button.active {
  border-color: #99d8d2;
  background: #ecfdf5;
  color: #0f766e;
}

.task-search {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 190px;
  margin-left: auto;
}

.task-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.task-search input {
  width: 100%;
  min-height: 34px;
}

.task-simple-list {
  display: grid;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #fff;
  overflow: visible;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .025);
}

.task-focus-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: 12px;
  margin: 10px 0 12px;
}

.task-focus-column {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #fff;
  padding: 12px;
}

.task-focus-column header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.task-focus-column header strong {
  display: grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
}

.task-focus-item,
.task-alert-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 48px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px 10px;
  color: #0f172a;
  text-align: left;
  text-decoration: none;
}

.task-focus-item {
  grid-template-columns: auto minmax(0, 1fr);
}

.task-focus-item.is-done {
  opacity: .58;
}

.task-focus-item.is-saving {
  opacity: .68;
  pointer-events: none;
}

.task-focus-open {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.task-focus-item em {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #0d9488;
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.task-complete-check.focus {
  width: 30px;
  height: 30px;
}

.task-focus-item strong,
.task-alert-card strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-focus-item small,
.task-alert-card small {
  display: block;
  overflow: hidden;
  color: #64748b;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-alert-card {
  grid-template-columns: auto minmax(0, 1fr);
}

.task-alert-card > span {
  border-radius: 999px;
  background: #e0f2fe;
  padding: 4px 7px;
  color: #0369a1;
  font-size: 11px;
  font-weight: 900;
}

.task-alert-card.danger > span {
  background: #fee2e2;
  color: #b91c1c;
}

.task-alert-card.warn > span {
  background: #fef3c7;
  color: #92400e;
}

.task-alert-card.project > span {
  background: #ede9fe;
  color: #6d28d9;
}

.task-simple-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 70px;
  padding: 11px 14px;
  border-bottom: 1px solid #eef2f7;
  transition: background .15s ease;
  cursor: grab;
}

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

.task-simple-row:hover {
  background: #f8fafc;
}

.task-simple-row.is-done {
  opacity: .4;
}

.task-simple-row.is-saving {
  background: #f8fafc;
}

.task-simple-row.is-dragging {
  opacity: .55;
  cursor: grabbing;
}

.task-simple-row.is-drag-over.drop-before {
  box-shadow: inset 0 3px 0 #0d9488;
}

.task-simple-row.is-drag-over.drop-after {
  box-shadow: inset 0 -3px 0 #0d9488;
}

.task-simple-list.is-saving-order {
  opacity: .8;
}

.task-simple-row.is-done .task-simple-open strong {
  text-decoration: line-through;
}

.task-complete-check {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  cursor: pointer;
}

.task-complete-check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.task-complete-check span {
  width: 20px;
  height: 20px;
  border: 2px solid #94a3b8;
  border-radius: 50%;
  background: #fff;
}

.task-complete-check input:focus-visible + span {
  outline: 3px solid rgba(59, 130, 246, .25);
  outline-offset: 2px;
}

.task-complete-check input:checked + span {
  border-color: #0d9488;
  background: #0d9488;
  box-shadow: inset 0 0 0 4px #fff;
}

.task-simple-open {
  display: grid;
  gap: 5px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--platform-ink, #111827);
  padding: 4px 0;
  text-align: left;
  cursor: pointer;
}

.task-simple-open strong {
  overflow: hidden;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-simple-open small {
  overflow: hidden;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.task-signal-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.task-signal-row em {
  border-radius: 999px;
  background: #ecfdf5;
  padding: 3px 7px;
  color: #047857;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.task-simple-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--platform-muted, #64748b);
  font-size: 12px;
}

.task-drag-handle {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #f8fafc;
  padding: 4px 8px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  cursor: grab;
  user-select: none;
}

.task-row-order-controls {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.task-row-order-controls button {
  min-height: 30px;
  border: 1px solid #d8dee8;
  border-radius: 7px;
  background: #fff;
  padding: 4px 8px;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.task-row-order-controls button:hover,
.task-row-order-controls button:focus-visible {
  border-color: #99f6e4;
  background: #ecfdf5;
  color: #0f766e;
}

.task-row-order-controls button:disabled {
  cursor: wait;
  opacity: .65;
}

.task-simple-meta time:empty {
  display: none;
}

.task-simple-meta time.task-due-overdue {
  color: #b42318;
  font-weight: 700;
}

.task-simple-meta time.task-due-today {
  color: #a16207;
  font-weight: 700;
}

.task-simple-meta time.task-due-future {
  color: var(--platform-muted, #64748b);
}

.task-more-menu {
  position: relative;
}

.task-more-menu summary {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  color: #64748b;
  font-weight: 900;
  list-style: none;
  cursor: pointer;
}

.workspace-nav-compact-group {
  margin: 2px 0;
}

.workspace-nav-compact-group > summary {
  min-height: 42px;
  border-radius: 8px;
  padding: 11px 12px;
  color: #d1d5db;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.workspace-nav-compact-group > summary:hover,
.workspace-nav-compact-group > summary:focus-visible,
.workspace-nav-compact-group[open] > summary {
  background: rgba(255, 255, 255, .06);
  color: #fff;
  outline: 0;
}

.workspace-nav-compact-group > .workspace-nav-group-items {
  margin: 3px 0 6px 12px;
  padding-left: 6px;
  border-left: 1px solid rgba(148, 163, 184, .18);
}

.workspace-nav-compact-group > .workspace-nav-group-items .workspace-nav-link {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.task-more-menu summary::-webkit-details-marker {
  display: none;
}

.task-more-menu summary:hover,
.task-more-menu summary:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
}

.task-more-menu > div {
  position: absolute;
  z-index: 30;
  top: 36px;
  right: 0;
  display: grid;
  min-width: 180px;
  padding: 5px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}

.task-more-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 9px;
  color: #334155;
  text-align: left;
  cursor: pointer;
}

.task-more-menu button:hover,
.task-more-menu button:focus-visible {
  background: #f1f5f9;
}

.priority-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.priority-badge.urgent {
  background: #fef2f2;
  color: #b42318;
}

.priority-badge.high {
  background: #fff7ed;
  color: #c2410c;
}

.priority-badge.medium {
  background: #fefce8;
  color: #854d0e;
}

.priority-badge.low {
  background: #f0fdf4;
  color: #166534;
}

.priority-badge.overdue {
  background: #fef2f2;
  color: #b42318;
}

/* EVE briefing item row with My Day button */
.eve-briefing-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eve-briefing-item-row .eve-briefing-item {
  flex: 1;
  min-width: 0;
}

.eve-my-day-btn {
  flex-shrink: 0;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--platform-line, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.12s, color 0.12s, background 0.12s;
}

.client-health-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.4;
  vertical-align: middle;
}

.client-health-badge.green {
  background: #dcfce7;
  color: #166534;
}

.client-health-badge.amber {
  background: #fef3c7;
  color: #92400e;
}

.client-health-badge.red {
  background: #fee2e2;
  color: #991b1b;
}

.deadline-risk-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  background: #e0f2fe;
  color: #075985;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.4;
  vertical-align: middle;
}

.deadline-risk-badge.high {
  background: #fee2e2;
  color: #991b1b;
}

.deadline-risk-badge.medium {
  background: #fef3c7;
  color: #92400e;
}

.deadline-risk-badge.low {
  background: #dcfce7;
  color: #166534;
}

.eve-my-day-btn:hover {
  border-color: #0d9488;
  color: #0d9488;
  background: #f0fdfa;
}

.eve-my-day-btn:disabled {
  cursor: default;
}

.eve-my-day-btn.is-added {
  border-color: #99d8d2;
  background: #ecfdf5;
  color: #0f766e;
}

.eve-actionable-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.eve-actionable-item > .today-item {
  flex: 1;
  min-width: 0;
}

.eve-item-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
}

.eve-row-complete {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  cursor: pointer;
}

.eve-row-complete input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.eve-row-complete span {
  display: block;
  width: 20px;
  height: 20px;
  border: 2px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  box-shadow: inset 0 0 0 4px #fff;
}

.eve-row-complete input:focus-visible + span {
  outline: 3px solid rgba(13, 148, 136, .18);
  outline-offset: 2px;
}

.eve-row-complete input:checked + span {
  border-color: #0d9488;
  background: #0d9488;
}

.eve-actionable-item.is-completing {
  opacity: .68;
}

.eve-actionable-item.is-completed {
  opacity: .58;
}

.eve-actionable-item.is-completed .today-item strong,
.eve-actionable-item.is-completed .eve-briefing-item span {
  text-decoration: line-through;
}

.eve-item-more {
  position: relative;
}

.eve-item-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  height: 28px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  list-style: none;
  cursor: pointer;
}

.eve-item-more summary::-webkit-details-marker {
  display: none;
}

.eve-item-more summary:hover,
.eve-item-more summary:focus-visible {
  background: #e2e8f0;
  color: #0f172a;
}

.eve-item-more > div {
  position: absolute;
  z-index: 40;
  top: 31px;
  right: 0;
  display: grid;
  min-width: 170px;
  padding: 5px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .16);
}

.eve-item-more a,
.eve-item-more button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 8px 9px;
  color: #334155;
  font: inherit;
  font-size: 12px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.eve-item-more a:hover,
.eve-item-more a:focus-visible,
.eve-item-more button:hover,
.eve-item-more button:focus-visible {
  background: #f1f5f9;
}

.eve-task-toast {
  position: fixed;
  z-index: 260;
  right: 18px;
  bottom: 18px;
  max-width: min(380px, calc(100vw - 36px));
  padding: 11px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .18);
  font-size: 13px;
  font-weight: 700;
}

.eve-task-toast.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.eve-task-toast.error,
.eve-task-message.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.eve-task-message.error {
  margin: 0 0 12px;
  padding: 9px 11px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  font-size: 13px;
}

.task-save-message {
  min-height: 0;
  color: var(--platform-muted, #64748b);
  font-size: 13px;
}

.task-save-message:not(:empty) {
  min-height: 36px;
  padding: 9px 11px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
}

.task-save-message.error:not(:empty),
.task-load-state.error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.task-save-message.success:not(:empty) {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.task-load-state {
  display: grid;
  justify-items: start;
  gap: 8px;
  min-height: 160px;
  padding: 24px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 10px;
  background: #fff;
}

.task-load-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.eve-load-state {
  min-height: 220px;
}

.eve-load-error {
  border-color: rgba(248, 113, 113, .45);
}

.eve-load-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

@media (max-width: 900px) {
  .task-quick-add {
    grid-template-columns: 1fr 1fr;
  }

  .task-quick-add input[name="title"],
  .task-quick-add-status {
    grid-column: 1 / -1;
  }

  .task-search {
    flex: 0 0 190px;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .task-focus-panel {
    grid-template-columns: 1fr;
  }

  .task-quick-add {
    grid-template-columns: 1fr;
  }

  .task-quick-add input[name="title"],
  .task-quick-add-status {
    grid-column: auto;
  }

  .task-simple-row {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .task-simple-meta {
    flex-wrap: wrap;
    grid-column: 2;
    justify-content: flex-start;
    width: 100%;
  }

  .task-row-order-controls {
    order: 2;
  }

  .task-filter-row {
    gap: 5px;
  }

  .task-filter-row > button {
    min-height: 38px;
    padding: 7px 10px;
  }

  .task-search {
    flex: 1 0 100%;
    width: 100%;
  }

  .task-more-menu {
    margin-left: auto;
  }

  .eve-actionable-item,
  .eve-briefing-item-row {
    align-items: flex-start;
  }

  .eve-item-actions {
    padding-top: 3px;
  }

  .eve-my-day-btn {
    padding: 0 7px;
  }
}

.intake-duplicate-panel {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding: 9px;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  background: #fff7ed;
  color: #9a3412;
}

.intake-duplicate-panel strong {
  color: #7c2d12;
}

.intake-duplicate-panel small {
  color: #9a3412;
}

.my-work-grid,
.intelligence-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.automation-rule-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.automation-rule-card,
.automation-suggestion,
.intelligence-card,
.project-health-pill,
.diagnostic-health {
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

.automation-rule-card {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.automation-rule-card.disabled {
  opacity: .58;
}

.automation-rule-card label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-weight: 900;
  color: var(--platform-ink, #111827);
}

.automation-rule-card p,
.automation-rule-card small,
.automation-suggestion p,
.intelligence-card p,
.diagnostic-health p {
  margin: 0;
  color: var(--platform-muted, #64748b);
}

.ai-test-panel {
  align-items: start;
  gap: 10px;
}

.diagnostic-health .ai-test-success {
  color: #047857;
  font-weight: 800;
}

.diagnostic-health .ai-test-failure {
  color: #b91c1c;
  font-weight: 800;
}

.automation-preview {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.automation-preview h3 {
  margin: 0;
  color: var(--platform-ink, #111827);
}

.automation-suggestion {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
}

.diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.diagnostic-grid article {
  padding: 13px;
  border: 1px solid var(--platform-line, #d8dee8);
  border-radius: 12px;
  background: #f8fafc;
}

.diagnostic-grid span,
.intelligence-card span {
  display: block;
  color: var(--platform-muted, #64748b);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.diagnostic-grid strong,
.intelligence-card strong {
  color: var(--platform-ink, #111827);
  font-size: 20px;
}

.diagnostic-health {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
}

.intelligence-card {
  display: grid;
  gap: 7px;
  padding: 13px;
}

.intelligence-card a {
  color: #1d4ed8;
  font-weight: 800;
}

.project-health-strip {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.project-health-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  text-decoration: none;
}

.project-health-pill > span:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.project-health-pill strong {
  color: var(--platform-ink, #111827);
}

.project-health-pill > span:first-child > span {
  color: var(--platform-muted, #64748b);
}

.ai-next-action {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.ai-next-action strong {
  color: #1e3a8a;
}

.ai-next-action p,
.ai-next-action small {
  margin: 0;
  color: #1e40af;
}

@media (max-width: 1024px) {
  .platform-workspace-header {
    display: grid;
  }

  .platform-header-actions {
    justify-content: flex-start;
  }

  .platform-status-strip,
  .command-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-list-tools,
  .platform-pro-head,
  .platform-pro-row,
  .task-main-table-head,
  .task-main-table-row,
  .task-bulk-toolbar,
  .my-work-grid,
  .intelligence-grid,
  .automation-rule-list,
  .diagnostic-grid,
  .task-detail-meta,
  .task-detail-links,
  .task-store-debug {
    grid-template-columns: 1fr 1fr;
  }

  .platform-pro-head,
  .task-main-table-head {
    display: none;
  }

  .task-main-board {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .platform-row-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .platform-topbar {
    align-items: stretch;
  }

  .platform-breadcrumbs {
    display: none;
  }

  .platform-workspace-header {
    padding: 13px;
  }

  .platform-header-main {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .platform-header-icon {
    width: 36px;
    height: 36px;
  }

  .platform-workspace-header h1 {
    font-size: 24px;
  }

  .platform-status-strip,
  .command-grid {
    grid-template-columns: 1fr;
  }

  .platform-list-tools,
  .platform-pro-row,
  .platform-activity-card,
  .client-detail-grid,
  .intake-grid,
  .intake-pipeline,
  .intake-summary-grid,
  .intake-validation-panel,
  .intake-review-head,
  .intake-review-row,
  .task-bulk-toolbar,
  .my-work-grid,
  .intelligence-grid,
  .automation-rule-list,
  .automation-suggestion,
  .diagnostic-grid,
  .task-main-board,
  .task-main-table-row,
  .task-store-debug {
    grid-template-columns: 1fr;
  }

  .task-source-filter {
    display: grid;
  }

  .task-detail-dialog {
    width: calc(100vw - 20px);
  }

  .task-detail-grid,
  .task-detail-meta,
  .task-detail-links {
    grid-template-columns: 1fr;
  }

  .clone-dialog footer,
  .quick-capture-drawer footer,
  .task-detail-dialog footer {
    position: sticky;
    bottom: 0;
    z-index: 3;
    background: #fff;
    padding-top: 10px;
  }

  .global-search-command-key {
    display: none;
  }

  .global-search-widget {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .command-palette-overlay {
    padding-top: 18px;
  }
}

.quick-create-grid {
  display: grid;
  gap: 10px;
}

.quick-create-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.quick-create-option:hover,
.quick-create-option:focus-visible {
  background: #f8fafc;
  border-color: #cbd5e1;
  transform: translateY(-1px);
}

.quick-create-option small {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 12px;
}

.quick-create-icon {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.platform-quick-create-fab {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 180;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 18px 38px rgba(15, 23, 42, .28);
  cursor: pointer;
}

.quick-create-status-banner {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 260;
  max-width: min(560px, calc(100vw - 24px));
  padding: 11px 14px;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  font-weight: 700;
}

.quick-create-fallback-backdrop {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, .42);
}

.quick-create-fallback-modal {
  width: min(430px, 100%);
  max-height: min(720px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 28px 70px rgba(15, 23, 42, .28);
}

.quick-create-fallback-modal header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.quick-create-fallback-modal h2 {
  margin: 3px 0 2px;
  font-size: 20px;
}

.quick-create-fallback-modal p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.quick-create-fallback-modal [data-quick-create-close] {
  width: 38px;
  height: 38px;
  border: 1px solid #d8dee8;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

.quick-create-fallback-modal [data-quick-create-fallback-body] {
  padding: 14px;
}

@media (min-width: 769px) {
  .platform-quick-create-fab {
    display: none;
  }
}

@media (max-width: 768px) {
  .quick-create-fallback-backdrop {
    align-items: end;
    padding: 0;
  }

  .quick-create-fallback-modal {
    width: 100%;
    max-height: calc(100vh - 18px);
    border-radius: 16px 16px 0 0;
  }

  .drawer-engine-actions {
    position: sticky;
    bottom: 0;
    z-index: 4;
    background: #fff;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }
}

.mobile-sidebar-backdrop {
  display: none;
}

.system-trust-indicator {
  display: grid;
  grid-template-columns: 8px auto;
  align-items: center;
  gap: 2px 7px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: var(--eve-radius);
  color: #e2e8f0;
  background: rgba(30, 41, 59, 0.72);
  font-size: 12px;
}

.system-trust-indicator > span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
}

.system-trust-indicator.offline > span {
  background: #f59e0b;
}

.system-trust-indicator small {
  grid-column: 2;
  color: #94a3b8;
}

.native-workspace-main > .workspace-sidebar-toggle {
  display: none;
}

@media (max-width: 760px) {
  html,
  body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .native-workspace-body {
    display: block;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .native-sidebar,
  .workflow-sidebar,
  .calendar-sidebar,
  .native-workspace-body > .native-sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    right: auto;
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    height: 100vh;
    max-height: none;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transform: none;
    transition: left 0.2s ease;
    box-shadow: 18px 0 42px rgba(15, 23, 42, 0.24);
  }

  body.sidebar-open .native-sidebar,
  body.sidebar-open .workflow-sidebar,
  body.sidebar-open .calendar-sidebar,
  body.sidebar-open .native-workspace-body > .native-sidebar,
  body.et-mobile-sidebar-open .native-sidebar,
  body.et-mobile-sidebar-open .workflow-sidebar,
  body.et-mobile-sidebar-open .calendar-sidebar,
  body.et-mobile-sidebar-open .native-workspace-body > .native-sidebar {
    left: 0;
    transform: none;
  }

  .mobile-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 999;
  }

  body.sidebar-open .mobile-sidebar-backdrop,
  body.et-mobile-sidebar-open .mobile-sidebar-backdrop {
    display: block;
  }

  body.sidebar-open,
  body.et-mobile-sidebar-open {
    overflow-x: hidden;
  }

  .native-workspace-main,
  .workflow-main,
  .calendar-main,
  .native-workspace-body > .native-workspace-main {
    grid-column: auto;
    width: 100%;
    max-width: 100vw;
    margin-left: 0;
    padding-left: 0;
    overflow-x: hidden;
  }

  .native-workspace-main > .workspace-sidebar-toggle {
    display: inline-flex;
    margin: 14px 16px 0;
  }

  .today-standalone,
  .native-workspace-main .today-standalone {
    padding-left: 16px;
    padding-right: 16px;
    max-width: 100%;
  }

  :where(
    .page,
    .workflow-main,
    .calendar-main,
    .native-workspace-main,
    .today-standalone,
    .workspace-content,
    .platform-workspace-content
  ) {
    min-width: 0;
    max-width: 100%;
  }

  :where(.clone-dialog-backdrop, .invoice-drawer-backdrop, .drawer-engine-backdrop, .modal-backdrop) {
    padding: 0;
    align-items: end;
    overflow: hidden;
  }

  :where(.clone-dialog, .invoice-drawer, .drawer-engine-panel, .modal) {
    width: 100%;
    max-width: 100vw;
    max-height: calc(100dvh - env(safe-area-inset-top));
    border-radius: 14px 14px 0 0;
    overflow-x: hidden;
    overflow-y: auto;
  }

  :where(.form-actions, .drawer-engine-actions, .invoice-form-grid > footer, .clone-dialog-actions) {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-inline: -16px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--eve-border);
    background: rgba(255, 255, 255, 0.97);
  }

  :where(.invoice-line-table, .platform-table-wrap, .workspace-table-wrap, .data-table-wrap) {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  :where(
    .primary-button,
    .secondary-button,
    .inline-button,
    .danger-button,
    .platform-action-button,
    .native-action-button
  ) {
    min-height: 44px;
  }

  .platform-quick-create-fab {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
  }

  .eve-hero-card p,
  .eve-briefing-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 7;
  }
}

@media print {
  body {
    background: #fff !important;
  }

  .sidebar,
  .topbar,
  .workflow-topbar,
  .calendar-topbar,
  .sync-panel,
  .global-search-widget,
  .dashboard-attention-panel,
  .no-print,
  .detail-actions,
  .form-actions,
  .row-actions {
    display: none !important;
  }

  .app-shell,
  .workflow-shell,
  .calendar-shell,
  .quote-workspace {
    display: block !important;
  }

  .main,
  .page,
  .workflow-main,
  .calendar-main,
  .quote-preview-wrap {
    padding: 0 !important;
    border: 0 !important;
  }

  .panel,
  .workflow-card,
  .quote-preview,
  .printable-record {
    border: 0 !important;
    box-shadow: none !important;
  }
}





