:root {
  color-scheme: dark;
  --bg: #070b18;
  --bg-deep: #030611;
  --ink: #f8fbff;
  --muted: #9ca9c8;
  --panel: rgba(14, 21, 42, 0.78);
  --panel-strong: rgba(20, 30, 56, 0.92);
  --panel-border: rgba(143, 178, 255, 0.18);
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.18);
  --accent-deep: #c4b5fd;
  --accent-cyan: #22d3ee;
  --accent-blue: #3b82f6;
  --success: #34d399;
  --warning: #f59e0b;
  --info-soft: rgba(59, 130, 246, 0.18);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, 0.14);
  --focus-ring: rgba(34, 211, 238, 0.42);
  --glow-purple: 0 0 34px rgba(139, 92, 246, 0.3);
  --glow-cyan: 0 0 30px rgba(34, 211, 238, 0.22);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Aptos", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 16% 12%, rgba(139, 92, 246, 0.28), transparent 28%),
    radial-gradient(circle at 82% 0%, rgba(34, 211, 238, 0.18), transparent 26%),
    radial-gradient(circle at 70% 92%, rgba(59, 130, 246, 0.14), transparent 28%),
    linear-gradient(145deg, var(--bg-deep) 0%, #081025 52%, var(--bg) 100%);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.68;
  transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(34, 211, 238, 0.12), var(--glow-cyan);
}

a {
  color: inherit;
}

.login-shell,
.loading-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card,
.loading-card {
  width: min(560px, 100%);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  box-shadow: var(--shadow);
  padding: 34px;
  backdrop-filter: blur(12px);
}

.login-provider {
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.24);
}

.login-card {
  width: min(480px, 100%);
  border-radius: 8px;
  padding: 32px;
}

.login-card h1 {
  margin-bottom: 10px;
  font-size: 1.72rem;
  letter-spacing: 0;
}

.login-card .lede {
  margin: 0 0 18px;
  line-height: 1.55;
}

.login-workspace {
  display: grid;
  gap: 3px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 178, 255, 0.16);
  border-radius: 8px;
  background: rgba(143, 178, 255, 0.08);
}

.login-workspace span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.login-workspace strong {
  color: var(--ink);
}

.login-helper {
  margin: 10px 0 0;
  text-align: center;
}

.login-guidance {
  display: grid;
  gap: 5px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.18);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.06);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.login-guidance strong {
  color: var(--ink);
}

.eyebrow {
  margin: 0 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.75rem;
  color: var(--accent-cyan);
}

.brand-block h1,
.topbar h2,
.hero-panel h2,
.loading-card h1 {
  margin: 0;
  font-family: "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.lede,
.soft,
small {
  color: var(--muted);
}

.stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

.stack.compact {
  gap: 10px;
}

.login-provider {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  background: #2563eb;
  color: white;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
}

.login-fallback-form {
  margin-top: 10px;
}

.login-divider {
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid rgba(31, 42, 55, 0.12);
}

.credential-strip {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.credential-chip {
  padding: 12px 14px;
  border-radius: 18px;
  background: #f7faf9;
  border: 1px solid rgba(15, 118, 110, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.gusto-payment-workspace {
  gap: 16px;
}

.gusto-import-panel .panel-head {
  align-items: flex-start;
  gap: 24px;
}

.gusto-import-panel .panel-head > div:first-child {
  max-width: 760px;
}

.gusto-batch-meta {
  min-width: 240px;
  display: grid;
  gap: 4px;
  text-align: right;
  color: var(--muted);
  font-size: 0.82rem;
}

.gusto-batch-meta strong {
  color: var(--ink);
  overflow-wrap: anywhere;
}

.gusto-file-picker {
  max-width: 660px;
}

.gusto-file-picker input {
  min-height: 46px;
  padding: 8px;
  border: 1px dashed rgba(34, 211, 238, 0.44);
  background: rgba(8, 18, 38, 0.56);
}

.gusto-file-picker input::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.46);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(14, 116, 144, 0.32);
  cursor: pointer;
}

.document-inbox-workspace {
  gap: 16px;
}

.document-inbox-upload-panel .panel-head {
  align-items: flex-start;
  gap: 24px;
}

.document-inbox-upload-panel .panel-head > div:first-child {
  max-width: 760px;
}

.document-inbox-file-picker {
  max-width: 720px;
}

.document-inbox-file-picker input {
  min-height: 46px;
  padding: 8px;
  border: 1px dashed rgba(34, 211, 238, 0.44);
  background: rgba(8, 18, 38, 0.56);
}

.document-inbox-file-picker input::file-selector-button {
  min-height: 36px;
  margin-right: 12px;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, 0.46);
  border-radius: 6px;
  color: var(--ink);
  background: rgba(14, 116, 144, 0.32);
  cursor: pointer;
}

.document-inbox-preview,
.document-inbox-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  background: rgba(8, 18, 38, 0.48);
}

.document-inbox-list {
  display: grid;
  gap: 10px;
}

.document-inbox-file-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.document-inbox-file-meta strong,
.document-inbox-file-meta span,
.document-inbox-file-meta p,
.document-inbox-file-meta small {
  overflow-wrap: anywhere;
}

.document-inbox-file-meta span,
.document-inbox-file-meta small {
  color: var(--muted);
}

.document-inbox-file-meta p {
  margin: 5px 0 0;
}

.gusto-import-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px 20px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  background: rgba(8, 18, 38, 0.48);
}

.gusto-import-preview > button {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.gusto-import-preview-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.gusto-import-preview-counts span {
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.gusto-review-summary .metric-card {
  min-height: 96px;
}

.gusto-review-metric,
.gusto-duplicate-metric {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(120, 53, 15, 0.14);
}

.gusto-duplicate-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

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

.gusto-contractor-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 6px;
  background: rgba(8, 18, 38, 0.4);
}

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

.gusto-contractor-card dl div {
  display: grid;
  gap: 2px;
}

.gusto-contractor-card dt {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.gusto-contractor-card dd {
  margin: 0;
  font-weight: 700;
}

.gusto-payment-table {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
}

.gusto-payment-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.15fr) minmax(190px, 1.25fr) minmax(74px, 0.48fr) minmax(96px, 0.62fr) minmax(150px, 0.9fr) minmax(220px, 1.35fr);
  gap: 14px;
  align-items: start;
  padding: 13px 14px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(7, 16, 34, 0.34);
}

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

.gusto-payment-row.has-duplicate {
  border-left: 3px solid #f59e0b;
  background: rgba(120, 53, 15, 0.12);
}

.gusto-payment-row > div {
  min-width: 0;
}

.gusto-payment-row strong,
.gusto-payment-row p {
  overflow-wrap: anywhere;
}

.gusto-payment-row small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.gusto-payment-head {
  color: var(--muted);
  background: rgba(15, 29, 55, 0.78);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
}

.gusto-payment-row details {
  margin-top: 8px;
}

.gusto-payment-row summary {
  width: fit-content;
  color: var(--accent-cyan);
  cursor: pointer;
  font-weight: 700;
}

.gusto-payment-row details p {
  margin-top: 8px;
  color: var(--muted);
}

.gusto-status-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
}

.gusto-status-badge.success {
  border-color: rgba(52, 211, 153, 0.42);
  color: #86efac;
  background: rgba(6, 78, 59, 0.34);
}

.gusto-status-badge.processing {
  border-color: rgba(34, 211, 238, 0.4);
  color: #67e8f9;
  background: rgba(14, 116, 144, 0.26);
}

.gusto-status-badge.warning {
  border-color: rgba(245, 158, 11, 0.5);
  color: #fcd34d;
  background: rgba(120, 53, 15, 0.28);
}

.gusto-duplicate-label {
  color: #fcd34d;
}

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

  .gusto-payment-table {
    border: 0;
    overflow: visible;
  }

  .gusto-payment-head {
    display: none;
  }

  .gusto-payment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 6px;
  }

  .gusto-payment-row > [role="cell"]::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .gusto-payment-row > [role="cell"]:nth-child(1)::before { content: "Contractor"; }
  .gusto-payment-row > [role="cell"]:nth-child(2)::before { content: "Period"; }
  .gusto-payment-row > [role="cell"]:nth-child(3)::before { content: "Hours"; }
  .gusto-payment-row > [role="cell"]:nth-child(4)::before { content: "USD amount"; }
  .gusto-payment-row > [role="cell"]:nth-child(5)::before { content: "Status"; }
  .gusto-payment-row > [role="cell"]:nth-child(6)::before { content: "Review detail"; }
}

@media (max-width: 640px) {
  .gusto-import-panel .panel-head {
    display: grid;
    gap: 12px;
  }

  .gusto-batch-meta {
    min-width: 0;
    text-align: left;
  }

  .gusto-import-preview,
  .gusto-review-summary,
  .gusto-payment-row {
    grid-template-columns: 1fr;
  }

  .gusto-import-preview > button {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    min-height: 44px;
  }

  .document-inbox-upload-panel .panel-head,
  .document-inbox-preview,
  .document-inbox-row {
    grid-template-columns: 1fr;
  }

  .document-inbox-row .button-row,
  .document-inbox-preview > button {
    width: 100%;
  }

  .document-inbox-row .button-row > *,
  .document-inbox-preview > button {
    flex: 1;
    min-height: 44px;
  }

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

.workspace-inline-loading {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.workspace-inline-loading-indicator {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(87, 211, 255, 0.24);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: workspace-inline-spin 700ms linear infinite;
}

@keyframes workspace-inline-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-inline-loading-indicator {
    animation: none;
  }
}

.mobile-shell-header,
.mobile-bottom-nav,
.mobile-time-overview,
.mobile-time-primary-action,
.mobile-week-sheet,
.mobile-week-cell-date {
  display: none;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  grid-template-rows: 1fr;
}

.app-topnav {
  position: sticky;
  top: 0;
  min-height: 100vh;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 18px;
  padding: 18px 16px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.92), rgba(7, 11, 24, 0.96)),
    radial-gradient(circle at 40% 0%, rgba(139, 92, 246, 0.28), transparent 38%);
  color: white;
  border-right: 1px solid rgba(143, 178, 255, 0.16);
  box-shadow: 18px 0 50px rgba(0, 0, 0, 0.34);
  overflow-y: auto;
}

.app-brand-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 6px;
  background: #ffffff;
  overflow: hidden;
}

.app-brand-logo {
  display: block;
  width: 100%;
  height: auto;
  max-height: 48px;
  object-fit: contain;
}

.app-main-nav,
.app-account-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-main-nav {
  flex-direction: column;
  align-items: stretch;
  flex-wrap: nowrap;
}

.app-account-bar {
  margin-top: auto;
  align-items: stretch;
  flex-direction: column;
}

.app-main-link,
.section-tab,
.ghost,
.secondary,
.primary,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  min-height: 44px;
  padding: 12px 14px;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.app-main-link {
  position: relative;
  width: 100%;
  justify-content: flex-start;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 700;
  border: 1px solid transparent;
  overflow: hidden;
}

.nav-link-inner,
.icon-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.icons8-icon {
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.app-topnav .icons8-icon {
  filter: none;
  opacity: 0.94;
}

.app-main-link.active {
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.34), rgba(34, 211, 238, 0.12));
  color: white;
  border-color: rgba(167, 139, 250, 0.44);
  box-shadow: inset 3px 0 0 var(--accent-cyan), 0 0 26px rgba(139, 92, 246, 0.2);
}

.app-main-link:hover {
  background: rgba(143, 178, 255, 0.09);
  border-color: rgba(143, 178, 255, 0.18);
}

.app-account-bar .ghost {
  background: rgba(143, 178, 255, 0.1);
  color: white;
  border: 1px solid rgba(143, 178, 255, 0.14);
}

.app-account-bar .icon-button {
  justify-content: flex-start;
  gap: 12px;
  padding-inline: 14px;
}

.app-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 18px;
  background: rgba(143, 178, 255, 0.1);
  border: 1px solid rgba(143, 178, 255, 0.14);
  color: white;
  font-weight: 600;
}

.app-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.78), rgba(34, 211, 238, 0.56));
  border: 1px solid rgba(255, 255, 255, 0.24);
}

.app-main-shell {
  min-height: 100vh;
}

.main-shell {
  padding: 24px;
  display: grid;
  align-content: start;
  gap: 20px;
  min-width: 0;
}

.app-secondary-nav {
  margin: 0;
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid rgba(143, 178, 255, 0.13);
  border-radius: 22px;
  background: rgba(13, 20, 40, 0.62);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.app-secondary-link {
  position: relative;
  border: 0;
  border: 1px solid transparent;
  border-radius: 14px;
  min-height: 44px;
  padding: 10px 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.app-secondary-link.active {
  color: var(--ink);
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(34, 211, 238, 0.1);
  box-shadow: inset 0 -1px 0 rgba(34, 211, 238, 0.38);
}

.shell-promo {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 20px 22px;
  border-radius: 24px;
  background: #22211f;
  color: white;
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.shell-promo .icons8-icon {
  filter: brightness(0) invert(1);
}

.shell-promo-icon {
  position: relative;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 2px dashed rgba(249, 115, 22, 0.82);
  background: #243041;
}

.shell-promo-badge {
  position: absolute;
  top: 18px;
  left: 42px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ff6b1a;
  color: white;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.shell-promo-copy {
  display: grid;
  gap: 6px;
}

.shell-promo-copy h3,
.shell-promo-copy p {
  margin: 0;
}

.shell-promo-eyebrow {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.shell-promo-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.shell-promo-link,
.shell-promo-close {
  border: 0;
  background: transparent;
  color: #fb923c;
  font-weight: 700;
}

.shell-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  text-decoration: none;
}

.shell-promo-link.secondary {
  color: #fb923c;
}

.shell-promo-close {
  padding: 2px;
  align-self: start;
  opacity: 0.85;
}

.shell-promo-close:hover,
.shell-promo-link:hover {
  opacity: 0.9;
}

.flash-toast-wrap {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 -4px;
  position: sticky;
  top: 14px;
  z-index: 12;
  pointer-events: none;
}

.flash-toast {
  width: min(420px, 100%);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
  pointer-events: auto;
}

.flash-toast-close {
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 1.15rem;
  line-height: 1;
  min-width: 40px;
  min-height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  padding: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  padding: 2px 4px;
}

.topbar-compact {
  justify-content: flex-end;
  align-items: center;
  min-height: 0;
}

.topbar-compact .topbar-actions {
  gap: 16px;
}

.topbar-compact .link-button {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(143, 178, 255, 0.08);
  color: var(--accent-cyan);
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(34, 211, 238, 0.14);
}

.topbar h2,
.topbar p {
  margin: 0;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.section-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.section-tab {
  background: rgba(143, 178, 255, 0.08);
  color: var(--ink);
  font-weight: 600;
  border: 1px solid rgba(143, 178, 255, 0.12);
}

.section-tab.active {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.26), rgba(34, 211, 238, 0.14));
  color: white;
  border-color: rgba(34, 211, 238, 0.3);
  box-shadow: var(--glow-cyan);
}

.panel,
.hero-panel,
.metric-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.accent-panel {
  background: linear-gradient(180deg, rgba(34, 211, 238, 0.14), rgba(139, 92, 246, 0.1));
}

.hero-panel {
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(18, 28, 56, 0.9), rgba(13, 20, 40, 0.72));
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -90px -110px auto;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.28), transparent 68%);
  pointer-events: none;
}

.report-hero {
  padding: 22px 24px;
  align-items: center;
}

.hero-detail {
  min-width: 210px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(143, 178, 255, 0.1);
  border: 1px solid rgba(143, 178, 255, 0.16);
}

.metric-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-card {
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.metric-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid rgba(34, 211, 238, 0.24);
  pointer-events: none;
}

.metric-card p,
.metric-label {
  margin: 0 0 8px;
  color: var(--muted);
}

.metric-card strong,
.metric-value {
  font-size: 1.55rem;
  color: #f8fbff;
}

.metric-value.smallish {
  font-size: 1.15rem;
}

.compact-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.setup-span-all {
  grid-column: 1 / -1;
}

.auth-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.auth-status-card {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(143, 178, 255, 0.08);
  border: 1px solid rgba(143, 178, 255, 0.12);
}

.auth-status-card h4 {
  margin: 0 0 12px;
}

.auth-status-card p {
  margin: 0 0 10px;
}

.mono-inline {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.95em;
}

.button-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.workspace-toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid rgba(143, 178, 255, 0.12);
  border-radius: 16px;
  background: rgba(13, 20, 40, 0.56);
  box-shadow: none;
}

.workspace-toolbar p {
  display: none;
}

.expense-workspace-toolbar,
.billing-workspace-toolbar {
  border-radius: 8px;
}

.expense-toolbar-summary,
.billing-toolbar-summary {
  font-variant-numeric: tabular-nums;
}

.expense-filter-form {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.expense-filter-form label {
  min-width: 150px;
}

.expense-filter-form label > span {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 700;
}

.expense-filter-form select,
.expense-filter-form input {
  width: 100%;
  min-height: 42px;
}

.expense-composer-panel {
  width: min(100%, 1080px);
}

.expense-amount-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.expense-composer-actions {
  justify-content: space-between;
}

.panel.expense-ledger-panel,
.panel.invoice-ledger-panel {
  padding: 0;
  overflow: hidden;
}

.expense-ledger-heading,
.invoice-ledger-panel-head {
  padding: 18px 20px;
}

.expense-ledger-heading p,
.invoice-ledger-panel-head p {
  margin: 4px 0 0;
}

.expense-week-list {
  display: grid;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.expense-week-group {
  min-width: 0;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.expense-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  background: rgba(9, 14, 30, 0.42);
}

.expense-week-head h4,
.expense-week-head strong {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.expense-table-wrap {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.expense-ledger-table {
  table-layout: fixed;
}

.expense-ledger-table th,
.expense-ledger-table td {
  padding: 11px 14px;
  vertical-align: middle;
}

.expense-ledger-table th:first-child,
.expense-ledger-table td:first-child {
  width: 88px;
  padding-left: 20px;
}

.expense-ledger-table th:nth-child(3),
.expense-ledger-table td:nth-child(3) {
  width: 150px;
}

.expense-ledger-table th:nth-child(4),
.expense-ledger-table td:nth-child(4) {
  width: 130px;
  text-align: right;
}

.expense-ledger-table th:nth-child(5),
.expense-ledger-table td:nth-child(5) {
  width: 112px;
}

.expense-ledger-table th:last-child,
.expense-ledger-table td:last-child {
  width: 144px;
  padding-right: 20px;
}

.expense-ledger-date strong,
.expense-ledger-date span,
.expense-ledger-detail strong,
.expense-ledger-detail span,
.expense-ledger-detail small,
.expense-ledger-detail p {
  display: block;
}

.expense-ledger-date span,
.expense-ledger-detail span,
.expense-ledger-detail small,
.expense-ledger-detail p {
  color: var(--muted);
}

.expense-ledger-detail p {
  margin: 3px 0 0;
}

.expense-ledger-amount,
.expense-ledger-actions {
  white-space: nowrap;
}

.expense-ledger-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.invoice-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 20px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
  background: rgba(9, 14, 30, 0.38);
}

.invoice-status-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
}

.invoice-status-tabs .active {
  color: var(--ink);
  border-color: rgba(34, 211, 238, 0.58);
  background: rgba(34, 211, 238, 0.1);
}

.invoice-search-wrap,
.invoice-search-field {
  width: min(320px, 100%);
}

.invoice-search-wrap {
  position: relative;
}

.invoice-search-field input {
  width: 100%;
}

.invoice-search-wrap:has(.invoice-search-clear) .invoice-search-field input {
  padding-right: 44px;
}

.invoice-search-clear {
  position: absolute;
  top: 50%;
  right: 5px;
  min-width: 34px;
  width: 34px;
  height: 34px;
  transform: translateY(-50%);
}

.invoice-ledger-head,
.invoice-detail.invoice-ledger-row > summary {
  display: grid;
  grid-template-columns: 118px 138px 124px 105px minmax(220px, 1fr) 145px 40px;
  gap: 14px;
  align-items: center;
  justify-content: stretch;
}

.invoice-ledger-head {
  padding: 10px 20px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

.invoice-ledger-list {
  display: grid;
}

.invoice-ledger-row {
  padding: 0;
  border: 0;
  border-top: 1px solid rgba(143, 178, 255, 0.1);
  border-radius: 0;
  background: transparent;
}

.invoice-detail.invoice-ledger-row > summary {
  min-height: 54px;
  padding: 11px 20px;
}

.invoice-detail.invoice-ledger-row > summary:hover,
.invoice-detail.invoice-ledger-row > summary:focus-visible,
.invoice-detail.invoice-ledger-row[open] > summary {
  background: rgba(34, 211, 238, 0.06);
}

.invoice-ledger-date,
.invoice-ledger-client {
  color: var(--muted);
}

.invoice-ledger-date {
  display: grid;
  gap: 2px;
}

.invoice-ledger-date small {
  color: var(--text);
  font-size: 0.72rem;
  line-height: 1.2;
}

.invoice-ledger-client,
.invoice-ledger-id {
  overflow-wrap: anywhere;
}

.invoice-ledger-id,
.invoice-expense-summary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.invoice-expense-indicator {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 24px;
  padding: 2px 6px;
  border: 1px solid rgba(34, 211, 238, 0.34);
  border-radius: 999px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.08);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.invoice-expense-indicator img {
  width: 14px;
  height: 14px;
}

.invoice-ledger-balance {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-ledger-actions-head {
  text-align: center;
}

.invoice-ledger-menu-trigger {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  justify-self: end;
  color: var(--muted);
  opacity: 0.62;
}

.invoice-detail.invoice-ledger-row > summary:hover .invoice-ledger-menu-trigger,
.invoice-detail.invoice-ledger-row > summary:focus-within .invoice-ledger-menu-trigger,
.invoice-ledger-menu-trigger[aria-expanded="true"] {
  color: var(--ink);
  opacity: 1;
}

.invoice-row-context-menu {
  position: fixed;
  z-index: 180;
  display: grid;
  width: min(252px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #111a31;
  box-shadow: 0 18px 46px rgba(1, 6, 20, 0.48);
}

.invoice-row-context-menu[hidden] {
  display: none;
}

.invoice-row-context-menu-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 10px 10px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
}

.invoice-row-context-menu-heading strong,
.invoice-row-context-menu-heading span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-row-context-menu-heading strong {
  font-size: 0.82rem;
}

.invoice-row-context-menu-heading span {
  color: var(--muted);
  font-size: 0.76rem;
}

.invoice-row-context-menu button,
.invoice-row-context-menu a {
  display: flex;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
}

.invoice-row-context-menu button:hover,
.invoice-row-context-menu button:focus-visible,
.invoice-row-context-menu a:hover,
.invoice-row-context-menu a:focus-visible {
  background: rgba(34, 211, 238, 0.09);
}

.invoice-row-context-menu button:focus-visible,
.invoice-row-context-menu a:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: -2px;
}

.invoice-row-context-menu button.danger {
  color: #fda4af;
}

.invoice-row-context-menu-separator {
  height: 1px;
  margin: 5px 4px;
  background: rgba(143, 178, 255, 0.14);
}

.invoice-ledger-detail {
  padding: 0 20px 18px;
  border-top: 1px solid rgba(143, 178, 255, 0.08);
}

.recent-payments-panel {
  max-width: 980px;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .invoice-ledger-row {
  background: transparent;
  border-color: rgba(143, 178, 255, 0.1);
  box-shadow: none;
}

.invoice-generation-form {
  gap: 16px;
}

.invoice-form-section {
  display: grid;
  gap: 14px;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(143, 178, 255, 0.16);
  border-radius: 8px;
  background: rgba(8, 14, 32, 0.44);
}

.invoice-form-section legend {
  padding: 0 7px;
  color: #f8fbff;
  font-size: 0.92rem;
  font-weight: 800;
}

.invoice-project-picker {
  display: grid;
  gap: 10px;
}

.invoice-project-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-weight: 700;
}

.invoice-project-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 240px;
  padding: 4px;
  overflow: auto;
}

.invoice-project-option {
  min-height: 44px;
  padding: 9px 10px;
  border: 1px solid rgba(143, 178, 255, 0.12);
  border-radius: 6px;
  background: rgba(143, 178, 255, 0.05);
}

.invoice-project-option:has(input:checked) {
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.08);
}

.invoice-approval-safety {
  border-color: rgba(245, 158, 11, 0.3);
  background: rgba(245, 158, 11, 0.06);
}

.invoice-approval-safety .checkbox-row {
  align-items: flex-start;
}

.invoice-approval-safety small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.45;
}

.invoice-preview-card {
  display: grid;
  gap: 16px;
}

.invoice-preview-card .panel-head,
.invoice-preview-card .metric-grid,
.invoice-preview-card p {
  margin-block: 0;
}

.invoice-preview-card .metric-card {
  min-height: 92px;
  padding: 13px 14px;
  border-radius: 8px;
  box-shadow: none;
}

.invoice-preview-card .metric-card strong {
  font-size: 1.15rem;
}

.invoice-preview-alert {
  display: grid;
  gap: 6px;
  padding: 13px 14px;
  border: 1px solid;
  border-radius: 6px;
}

.invoice-preview-alert p,
.invoice-preview-alert ul {
  margin: 0;
}

.invoice-preview-alert ul {
  display: grid;
  gap: 4px;
  padding-left: 20px;
}

.invoice-preview-alert.warning {
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
}

.invoice-preview-alert.error {
  border-color: rgba(248, 113, 113, 0.58);
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
}

.invoice-preview-alert.neutral {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(14, 165, 233, 0.08);
  color: var(--ink);
}

.invoice-project-preview-table table,
.invoice-preview-lines table {
  min-width: 620px;
}

.invoice-preview-details {
  border: 1px solid rgba(143, 178, 255, 0.14);
  border-radius: 8px;
  background: rgba(8, 14, 32, 0.38);
}

.invoice-preview-details > summary {
  min-height: 44px;
  padding: 12px 14px;
  cursor: pointer;
  color: var(--ink);
  font-weight: 750;
}

.invoice-preview-detail-body {
  display: grid;
  gap: 16px;
  padding: 0 14px 14px;
}

.invoice-preview-lines {
  display: grid;
  gap: 8px;
}

.invoice-preview-lines h4 {
  margin: 0;
}

.invoice-editor-card {
  display: grid;
  gap: 18px;
  padding: 20px;
}

.invoice-editor-head {
  align-items: flex-start;
}

.invoice-editor-head .eyebrow,
.invoice-editor-head h3,
.invoice-editor-head p {
  margin: 0;
}

.invoice-editor-form {
  gap: 20px;
}

.invoice-editor-meta-grid {
  grid-template-columns: repeat(3, minmax(150px, 1fr));
}

.invoice-editor-client-grid {
  grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
}

.invoice-editor-subject {
  min-width: 0;
}

.invoice-editor-readonly-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(143, 178, 255, 0.14);
  border-radius: 6px;
  background: rgba(143, 178, 255, 0.045);
  color: var(--ink);
  font-weight: 750;
}

.invoice-editor-lines-section {
  display: grid;
  gap: 10px;
  border-top: 1px solid rgba(143, 178, 255, 0.16);
  border-bottom: 1px solid rgba(143, 178, 255, 0.16);
}

.invoice-editor-section-head,
.invoice-editor-line-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.invoice-editor-section-head {
  padding: 14px 0 10px;
}

.invoice-editor-section-head h4,
.invoice-editor-section-head p {
  margin: 0;
}

.invoice-editor-lines {
  display: grid;
}

.invoice-editor-line {
  display: grid;
  gap: 11px;
  min-width: 0;
  padding: 15px 0;
  border-top: 1px solid rgba(143, 178, 255, 0.1);
}

.invoice-editor-line-head > div,
.invoice-line-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.invoice-line-source {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(143, 178, 255, 0.14);
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.invoice-line-source.tracked {
  border-color: rgba(34, 211, 238, 0.28);
  background: rgba(34, 211, 238, 0.06);
  color: #a5f3fc;
}

.invoice-editor-line-grid {
  display: grid;
  grid-template-columns: 116px minmax(240px, 1.8fr) minmax(180px, 1fr) 112px 132px 124px;
  gap: 10px;
  align-items: end;
}

.invoice-editor-line-grid label,
.invoice-editor-line-grid input,
.invoice-editor-line-grid select {
  min-width: 0;
  width: 100%;
}

.invoice-editor-line-grid label > span,
.invoice-line-amount > span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.invoice-line-amount {
  display: grid;
  align-content: center;
  min-height: 42px;
  padding: 2px 0 0 8px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-line-amount > span {
  margin-bottom: 2px;
}

.invoice-line-source-note {
  margin: 0;
  font-size: 0.82rem;
}

.invoice-editor-calculation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 28px;
  align-items: start;
}

.invoice-editor-settings {
  display: grid;
  gap: 14px;
}

.invoice-editor-totals {
  display: grid;
  gap: 9px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}

.invoice-editor-totals > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 5px 0;
  color: var(--muted);
}

.invoice-editor-totals strong {
  color: var(--ink);
}

.invoice-editor-totals .invoice-editor-total {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 211, 238, 0.3);
  color: var(--ink);
  font-size: 1.08rem;
}

.invoice-editor-actions {
  justify-content: flex-end;
}

@media (max-width: 1280px) {
  .invoice-editor-line-grid {
    grid-template-columns: 110px minmax(240px, 1fr) minmax(180px, 0.8fr) 104px 124px;
  }

  .invoice-line-amount {
    grid-column: -2 / -1;
  }
}

@media (max-width: 980px) {
  .invoice-editor-meta-grid,
  .invoice-editor-client-grid,
  .invoice-editor-calculation {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-editor-line-grid {
    grid-template-columns: 110px minmax(220px, 1fr) minmax(180px, 0.8fr);
  }

  .invoice-editor-line-grid label:nth-of-type(4),
  .invoice-editor-line-grid label:nth-of-type(5),
  .invoice-line-amount {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .invoice-editor-card {
    padding: 14px;
  }

  .invoice-editor-head,
  .invoice-editor-section-head,
  .invoice-editor-line-head,
  .invoice-editor-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-editor-meta-grid,
  .invoice-editor-client-grid,
  .invoice-editor-calculation,
  .invoice-editor-line-grid {
    grid-template-columns: 1fr;
  }

  .invoice-editor-section-head > button,
  .invoice-editor-actions > button {
    width: 100%;
    min-height: 44px;
  }

  .invoice-line-actions {
    width: 100%;
  }

  .invoice-line-actions .danger {
    margin-left: auto;
  }

  .invoice-line-amount {
    justify-items: start;
    padding-left: 0;
    text-align: left;
  }
}

.compact-stat-bar {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.compact-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(143, 178, 255, 0.08);
  border: 1px solid rgba(143, 178, 255, 0.12);
}

.compact-stat span {
  color: var(--muted);
  font-size: 0.9rem;
}

.compact-stat strong {
  font-size: 1.15rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.project-portfolio-shell {
  display: grid;
  gap: 14px;
}

.project-portfolio-toolbar {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
}

.project-toolbar-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: end;
  flex-wrap: wrap;
}

.project-toolbar-search {
  min-width: min(100%, 360px);
  display: grid;
  gap: 6px;
}

.project-toolbar-search input {
  width: min(360px, 100%);
  background: rgba(255, 255, 255, 0.96);
}

.project-filter-bar {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.project-filter-field {
  min-width: 168px;
  display: grid;
  gap: 0;
}

.project-filter-field select {
  width: 100%;
  background: rgba(255, 255, 255, 0.96);
}

.project-toolbar-summary {
  margin: 0;
  font-size: 0.95rem;
}

.project-portfolio-head {
  margin-bottom: 0;
}

.project-portfolio-table-wrap {
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 20px;
  overflow: auto;
  background: rgba(255, 255, 255, 0.96);
}

.project-portfolio-table {
  min-width: 820px;
}

.project-portfolio-table th,
.project-portfolio-table td {
  padding: 14px 12px;
  vertical-align: top;
}

.project-portfolio-table tbody tr:not(.project-client-row) {
  transition: background 140ms ease;
}

.project-portfolio-table tbody tr:not(.project-client-row):hover {
  background: rgba(34, 211, 238, 0.045);
}

.project-portfolio-table thead th {
  background: #f2f2f0;
  border-bottom-color: rgba(31, 42, 55, 0.12);
  white-space: nowrap;
}

.team-week-summary-bar,
.contractor-report-summary {
  margin-bottom: 14px;
}

.team-overview-panel {
  padding: 16px 18px 18px;
}

.team-shell-toolbar,
.team-overview-toolbar,
.team-period-bar,
.team-person-cell,
.team-summary-meter-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.team-shell-toolbar {
  margin-bottom: 14px;
}

.team-overview-toolbar {
  margin-bottom: 14px;
}

.team-shell-toolbar-left,
.team-period-side {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.team-period-side {
  justify-content: flex-end;
}

.team-filter-form {
  margin: 0;
  min-width: min(220px, 100%);
}

.team-filter-form select {
  min-width: 180px;
}

.team-period-bar {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.team-period-bar h3 {
  margin: 0;
  font-size: 1.35rem;
}

.team-period-note {
  font-size: 0.92rem;
}

.team-summary-strip {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 0.72fr) minmax(260px, 1.56fr);
  margin-bottom: 18px;
}

.team-summary-figure {
  display: grid;
  gap: 6px;
  align-content: start;
}

.team-summary-figure span {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 600;
}

.team-summary-figure strong {
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
}

.team-summary-meter-card {
  display: grid;
  gap: 12px;
  align-content: start;
}

.team-summary-meter-copy {
  display: grid;
  gap: 8px;
}

.team-summary-meter-row span {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--ink);
  font-weight: 600;
}

.team-summary-meter-row strong {
  font-size: 1.08rem;
}

.team-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  display: inline-block;
}

.team-dot.billable,
.team-summary-meter-fill.billable {
  background: #365ecf;
}

.team-dot.unbillable,
.team-summary-meter-fill.unbillable {
  background: #90afe9;
}

.team-summary-meter-track {
  position: relative;
  height: 22px;
  border: 1px solid rgba(31, 42, 55, 0.14);
  border-radius: 4px;
  background: rgba(31, 42, 55, 0.03);
  overflow: hidden;
}

.team-summary-meter-fill {
  position: absolute;
  inset: 0 auto 0 0;
}

.team-summary-meter-scale {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.project-client-row td {
  background: #f2f2f0;
  font-weight: 700;
  border-bottom-color: rgba(31, 42, 55, 0.12);
  padding-top: 7px;
  padding-bottom: 7px;
}

.project-client-row .soft {
  margin-left: 8px;
  font-weight: 500;
  font-size: 0.88rem;
}

.project-project-cell strong {
  display: block;
  line-height: 1.25;
  font-size: 1.06rem;
}

.project-project-cell {
  min-width: 360px;
}

.project-project-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.project-type-tag,
.project-archive-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  line-height: 1;
}

.project-type-tag {
  border: 1px solid rgba(31, 42, 55, 0.14);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.92);
}

.project-archive-tag {
  border: 1px solid rgba(180, 35, 24, 0.16);
  color: var(--danger);
  background: rgba(180, 35, 24, 0.06);
}

.project-project-cell .soft {
  margin-top: 3px;
  font-size: 0.92rem;
  line-height: 1.3;
}

.project-compact-stack {
  line-height: 1.15;
}

.project-compact-stack > div + div {
  margin-top: 2px;
}

.project-compact-stack > div:first-child {
  font-weight: 700;
}

.project-compact-stack .soft {
  font-size: 0.88rem;
}

.project-metric-cell {
  min-width: 118px;
}

.project-metric-note {
  line-height: 1.1;
}

.project-table-actions {
  min-width: 116px;
  white-space: nowrap;
}

.project-table-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  align-items: center;
}

.project-editor-route-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 2px 2px 6px;
}

.project-editor-route-head h2,
.project-editor-route-head .eyebrow {
  margin: 0;
}

.project-editor-route-head > div {
  display: grid;
  gap: 4px;
}

.project-editor-active .project-composer-panel {
  width: min(100%, 1180px);
}

.project-portfolio-shell[hidden] {
  display: none !important;
}

.danger-text {
  color: var(--danger);
}

.report-toolbar {
  display: grid;
  gap: 14px;
}

.report-period-shell {
  display: grid;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.report-period-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.report-period-title-wrap {
  display: grid;
  gap: 10px;
}

.report-period-title-wrap h2 {
  margin: 0;
  font-family: "Bahnschrift", "Aptos Display", "Segoe UI", sans-serif;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.report-period-title-wrap .timesheet-period-bar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.report-period-actions {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
}

.report-updating-status {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--soft);
  font-size: 0.85rem;
  font-weight: 700;
}

.inline-action-menu {
  position: relative;
  display: inline-flex;
}

.inline-action-menu summary {
  list-style: none;
  cursor: pointer;
}

.inline-action-menu summary::-webkit-details-marker {
  display: none;
}

.inline-action-menu[open] .inline-action-menu-trigger {
  background: rgba(31, 42, 55, 0.1);
}

.inline-action-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 182px;
  padding: 8px;
  border: 1px solid rgba(31, 42, 55, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 48px rgba(31, 42, 55, 0.14);
  display: grid;
  gap: 4px;
  z-index: 36;
}

.inline-action-menu-item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}

.inline-action-menu-item:hover,
.inline-action-menu-item:focus-visible {
  background: rgba(31, 42, 55, 0.06);
  outline: none;
}

.report-period-picker {
  display: grid;
  gap: 6px;
}

.report-period-picker select {
  min-width: 132px;
}

.report-period-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.report-period-date-range {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.report-period-range-chip {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
  padding: 10px 14px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.74);
}

.report-period-helper {
  margin: 0;
  max-width: 840px;
}

.report-period-form {
  display: grid;
  gap: 12px;
}

.report-export-menu {
  margin-right: 2px;
}

.app-secondary-nav-reports {
  overflow-x: auto;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}

.app-secondary-nav-reports .app-secondary-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.report-period-controls {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(180px, 0.9fr) repeat(2, minmax(180px, 1fr)) auto;
  align-items: end;
}

.report-inline-field {
  min-width: 0;
}

.report-inline-field span {
  font-size: 0.88rem;
}

.report-date-field input {
  min-width: 0;
}

.report-checkbox-row {
  padding-top: 0;
}

.report-table-panel .panel-head {
  align-items: end;
}

.report-entity-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.16);
}

.report-entity-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.report-entity-tab {
  position: relative;
  flex: 0 0 auto;
  min-height: 46px;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.report-entity-tab::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: transparent;
}

.report-entity-tab:hover,
.report-entity-tab:focus-visible,
.report-entity-tab.active {
  color: var(--ink);
}

.report-entity-tab.active::after {
  background: var(--accent-cyan);
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.42);
}

.report-entity-panel {
  padding-top: 16px;
}

.metric-card > .soft {
  display: block;
  margin-top: 6px;
}

.time-entity-table th,
.time-entity-table td {
  vertical-align: middle;
}

.time-entity-table-clients th:nth-child(n + 2),
.time-entity-table-clients td:nth-child(n + 2),
.time-entity-table-tasks th:nth-child(n + 2),
.time-entity-table-tasks td:nth-child(n + 2),
.time-entity-table-projects th:nth-child(n + 3),
.time-entity-table-projects td:nth-child(n + 3),
.time-entity-table-teammates th:nth-child(n + 2),
.time-entity-table-teammates td:nth-child(n + 2) {
  text-align: right;
  white-space: nowrap;
}

.time-entity-table .action-cell {
  min-width: 132px;
}

.contractor-report-panel {
  padding-top: 14px;
}

.contractor-report-head {
  margin-bottom: 6px;
}

.contractor-report-total {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.contractor-report-total strong {
  font-size: 1.3rem;
}

.contractor-report-total span {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-table tfoot th,
.report-table tfoot td {
  background: rgba(31, 42, 55, 0.04);
  font-weight: 700;
}

.contractor-report-table td strong + .soft {
  margin-top: 4px;
}

.contractor-report-table td .soft + .soft {
  margin-top: 2px;
}

.report-aging-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-aging-card {
  border: 1px solid rgba(31, 42, 55, 0.1);
  border-radius: 14px;
  padding: 14px;
  background: #f7f7f4;
  display: grid;
  gap: 4px;
}

.report-aging-card p {
  margin: 0;
  color: var(--muted);
}

.report-aging-card strong {
  font-size: 1.12rem;
}

.report-detail-head {
  align-items: flex-start;
  gap: 16px;
}

.report-detail-summary {
  display: grid;
  gap: 4px;
  justify-items: end;
  text-align: right;
}

.report-detail-summary strong {
  font-size: 1.28rem;
}

.report-detail-summary span {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-detail-table td,
.report-detail-table th,
.report-activity-table td,
.report-activity-table th {
  vertical-align: top;
}

.report-detail-table td strong + .soft,
.report-activity-table td strong + .soft {
  margin-top: 4px;
}

.report-notes-cell {
  min-width: 220px;
  max-width: 340px;
}

.consultant-summary {
  display: block;
  min-width: 0;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-left: 3px solid var(--accent-cyan);
  border-radius: 7px;
  background: rgba(34, 211, 238, 0.08);
}

.consultant-summary strong {
  display: block;
  color: var(--accent-cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  line-height: 1.25;
  text-transform: uppercase;
}

.consultant-summary-copy {
  display: block;
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.report-consultant-summary {
  max-width: 100%;
}

.team-summary-row.is-selected td {
  background: rgba(15, 118, 110, 0.08);
}

.team-summary-row.is-selected td:first-child {
  box-shadow: inset 3px 0 0 rgba(15, 118, 110, 0.65);
}

.team-overview-table thead th {
  background: #f2f2f0;
  border-bottom-color: rgba(31, 42, 55, 0.12);
  white-space: nowrap;
}

.team-group-block table td,
.team-group-block table th,
.contractor-report-table td,
.contractor-report-table th {
  padding-top: 11px;
  padding-bottom: 11px;
}

.team-person-cell {
  justify-content: flex-start;
  gap: 10px;
}

.team-person-link {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.team-person-link strong,
.team-person-link .soft {
  margin: 0;
}

.team-person-link:hover strong,
.team-person-link:focus-visible strong {
  text-decoration: underline;
}

.team-timer-cell {
  min-width: 170px;
}

.team-last-login-cell {
  min-width: 158px;
}

.team-timer-presence {
  color: var(--muted);
  font-size: 0.86rem;
}

.team-timer-presence.idle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.team-timer-presence.running {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-timer-presence-head {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #34d399;
  white-space: nowrap;
}

.team-timer-elapsed {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.team-timer-work,
.team-timer-presence small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-timer-work {
  color: var(--ink);
  font-weight: 650;
}

.team-presence-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.72);
}

.team-timer-presence.running .team-presence-dot {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
  animation: team-presence-pulse 1.8s ease-in-out infinite;
}

.team-last-login {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1.35;
  white-space: nowrap;
}

.team-last-login.never {
  color: var(--muted);
}

.team-member-presence-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  background: rgba(247, 242, 233, 0.42);
}

.team-member-presence-card .team-timer-presence.running {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.1);
}

.team-member-presence-card .team-timer-work,
.team-member-presence-card .team-timer-presence small {
  max-width: 100%;
}

.team-member-last-login {
  display: grid;
  gap: 4px;
}

.team-member-last-login > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.team-member-timer-row {
  align-items: start;
}

.teammate-presence-bar {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(280px, 1.2fr);
  gap: 20px;
  align-items: center;
  padding: 12px 16px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  background: rgba(13, 24, 45, 0.84);
}

.teammate-presence-identity,
.teammate-presence-timer {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.teammate-presence-identity > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.teammate-presence-identity > div > span {
  color: var(--muted);
  font-size: 0.84rem;
}

.teammate-presence-timer {
  justify-content: space-between;
}

.teammate-presence-timer .team-timer-presence {
  min-width: 0;
}

@keyframes team-presence-pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.72;
    transform: scale(0.88);
  }
}

@media (prefers-reduced-motion: reduce) {
  .team-timer-presence.running .team-presence-dot {
    animation: none;
  }
}

@media (max-width: 820px) {
  .teammate-presence-bar {
    grid-template-columns: 1fr;
  }

  .teammate-presence-timer {
    align-items: flex-start;
    flex-direction: column;
  }
}

.team-person-avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 42, 55, 0.8);
  color: #fff;
  font-size: 0.98rem;
  font-weight: 700;
  flex-shrink: 0;
}

.team-person-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.team-person-copy strong,
.team-person-copy .soft {
  margin: 0;
}

.team-actions-menu-wrap {
  position: relative;
  display: inline-flex;
}

.team-actions-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  padding: 8px;
  border: 1px solid rgba(31, 42, 55, 0.12);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(31, 42, 55, 0.14);
  display: grid;
  gap: 4px;
  z-index: 30;
}

.team-actions-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  text-align: left;
}

.team-actions-menu-item:hover,
.team-actions-menu-item:focus-visible {
  background: rgba(31, 42, 55, 0.06);
  outline: none;
}

.team-row-actions-button {
  min-width: 92px;
  justify-content: center;
}

.secret-note {
  margin: 0;
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h3 {
  margin: 0;
}

.composer-panel {
  transition: box-shadow 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.composer-panel.collapsed {
  padding: 14px 16px;
  box-shadow: none;
}

.composer-panel.collapsed .panel-head {
  margin-bottom: 8px;
}

.composer-panel.collapsed .panel-head .soft {
  display: none;
}

.composer-panel.expanded {
  border-color: rgba(34, 211, 238, 0.22);
  box-shadow: var(--shadow), var(--glow-cyan);
}

.composer-panel-preview {
  padding: 14px 16px;
  border: 1px dashed rgba(143, 178, 255, 0.2);
  border-radius: 16px;
  background: rgba(143, 178, 255, 0.07);
}

.composer-panel-preview p {
  margin: 0;
  line-height: 1.4;
}

.project-composer-panel.collapsed .composer-panel-preview,
.project-task-panel.collapsed .composer-panel-preview,
.team-invite-panel.collapsed .composer-panel-preview {
  padding: 8px 10px;
  border-style: solid;
  border-color: rgba(143, 178, 255, 0.12);
  border-radius: 12px;
  background: rgba(143, 178, 255, 0.06);
  font-size: 0.95rem;
}

.composer-panel-body {
  display: grid;
  gap: 14px;
}

.composer-panel.collapsed .composer-panel-body {
  display: none;
}

.composer-panel.expanded .composer-panel-preview {
  display: none;
}

.two-up,
.setup-grid {
  display: grid;
  gap: 16px;
  align-items: start;
}

.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.two-up.wide-first {
  grid-template-columns: 1.25fr 1fr;
}

.setup-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-access-preview {
  display: grid;
  grid-template-columns: minmax(110px, auto) minmax(0, 1fr);
  gap: 7px 14px;
  padding: 12px 14px;
  border: 1px solid rgba(70, 214, 255, 0.2);
  border-radius: 8px;
  background: rgba(70, 214, 255, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
}

.role-access-preview strong {
  color: var(--ink);
}

.role-classification-note {
  border-color: rgba(70, 214, 255, 0.2);
}

.permission-profile-toolbar,
.permission-editor-head,
.permission-editor-actions,
.permission-boundary-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.permission-profile-toolbar h3,
.permission-profile-toolbar p,
.permission-editor-head h3,
.permission-editor-head p {
  margin: 0;
}

.permission-profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  align-items: start;
  gap: 16px;
}

.permission-profile-directory,
.permission-assignment-panel,
.permission-profile-editor {
  min-width: 0;
}

.permission-profile-list,
.permission-assignment-list {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.permission-profile-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid rgba(143, 178, 255, 0.1);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.permission-profile-row:hover,
.permission-profile-row:focus-visible {
  background: rgba(34, 211, 238, 0.06);
}

.permission-profile-row.is-archived {
  opacity: 0.62;
}

.standard-role-card:hover {
  background: transparent;
}

.permission-profile-leading,
.permission-assignment-person {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.permission-profile-leading > span:last-child,
.permission-assignment-person > span:last-child {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.permission-profile-leading small,
.permission-assignment-person small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-profile-leading small {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  text-overflow: clip;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.permission-profile-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(34, 211, 238, 0.26);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.1);
  color: #a5f3fc;
  font-weight: 800;
}

.permission-profile-meta {
  display: grid;
  grid-template-columns: auto 36px;
  align-items: center;
  justify-items: end;
  gap: 3px 9px;
  text-align: right;
}

.permission-profile-meta small {
  grid-column: 1 / -1;
  color: var(--muted);
}

.permission-assignment-row {
  min-height: 64px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(170px, 0.72fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(143, 178, 255, 0.1);
}

.permission-assignment-row select {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 8px;
}

.permission-editor-fields {
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(260px, 1.3fr) 126px;
  align-items: end;
  gap: 12px;
}

.permission-editor-count {
  min-height: 68px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 2px 8px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, 0.2);
  border-radius: 8px;
  background: rgba(34, 211, 238, 0.06);
}

.permission-editor-count span,
.permission-editor-count small {
  color: var(--muted);
  font-size: 0.78rem;
}

.permission-editor-count strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
  color: #a5f3fc;
  font-size: 1.4rem;
}

.permission-category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 10px;
}

.permission-category {
  overflow: hidden;
  border: 1px solid rgba(143, 178, 255, 0.14);
  border-radius: 8px;
  background: rgba(10, 17, 35, 0.52);
}

.permission-category > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  cursor: pointer;
}

.permission-category > summary > span:first-child {
  display: grid;
  gap: 3px;
}

.permission-category > summary small {
  color: var(--muted);
  line-height: 1.35;
}

.permission-grant-list {
  display: grid;
  border-top: 1px solid rgba(143, 178, 255, 0.1);
}

.permission-grant-row {
  min-height: 50px;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.08);
}

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

.permission-grant-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent-cyan);
}

.permission-grant-row > span {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.permission-grant-row strong {
  color: var(--ink);
  font-size: 0.88rem;
}

.permission-grant-row small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 0.74rem;
}

.permission-grant-row.is-locked {
  background: rgba(143, 178, 255, 0.035);
}

.permission-editor-actions {
  padding-top: 4px;
}

.permission-boundary-note {
  justify-content: flex-start;
  padding: 12px 14px;
  border-left: 3px solid var(--accent-cyan);
  background: rgba(34, 211, 238, 0.06);
  color: var(--muted);
}

.permission-boundary-note strong {
  color: var(--ink);
  white-space: nowrap;
}

.permission-summary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.settings-admin-section {
  padding-top: 4px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.report-access-note {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 9px 12px;
  border-left: 3px solid var(--cyan);
  background: rgba(70, 214, 255, 0.06);
  color: var(--muted);
  font-size: 0.9rem;
}

.report-access-note strong {
  color: var(--ink);
  white-space: nowrap;
}

.cash-tax-profit-card {
  border-color: rgba(52, 211, 153, 0.42);
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.2), var(--panel));
}

.cash-tax-balance-card {
  border-color: rgba(245, 158, 11, 0.42);
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.2), var(--panel));
}

.cash-tax-data-note {
  border-left-color: #f59e0b;
  background: rgba(120, 53, 15, 0.12);
}

.cash-tax-method-note {
  border-left-color: rgba(139, 92, 246, 0.85);
  background: rgba(76, 29, 149, 0.12);
}

.cash-tax-payment-panel td:last-child,
.cash-tax-detail-grid td:last-child {
  white-space: nowrap;
}

label {
  display: grid;
  gap: 6px;
}

label span {
  font-size: 0.92rem;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(143, 178, 255, 0.18);
  border-radius: 14px;
  padding: 12px 14px;
  background: var(--panel-strong);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: rgba(156, 169, 200, 0.74);
}

textarea {
  resize: vertical;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row.inline {
  padding-top: 4px;
}

.checkbox-row input {
  width: auto;
}

.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  color: white;
  box-shadow: 0 16px 34px rgba(139, 92, 246, 0.26);
}

.secondary {
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.9), rgba(59, 130, 246, 0.9));
  color: #03111d;
  font-weight: 800;
}

.ghost,
.link-button {
  background: rgba(143, 178, 255, 0.08);
  color: var(--ink);
  border: 1px solid rgba(143, 178, 255, 0.14);
}

.danger {
  color: var(--danger);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.app-main-link:hover,
.section-tab:hover,
.link-button:hover {
  transform: translateY(-1px);
}

.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
}

.projects-filter-grid {
  margin-bottom: 16px;
}

.top-gap {
  margin-top: 16px;
}

.project-budget-block {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(31, 42, 55, 0.04);
}

.project-detail-actions {
  margin: 8px 0 4px;
}

.project-detail-shell {
  display: grid;
  gap: 14px;
}

.project-detail-head {
  align-items: start;
}

.project-detail-workspace {
  display: grid;
  grid-template-columns: minmax(210px, 0.38fr) minmax(0, 1.62fr);
  gap: 16px;
  align-items: start;
}

.project-detail-section-rail {
  display: grid;
  gap: 14px;
}

.project-detail-section-card {
  padding: 14px 16px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 16px;
  background: rgba(31, 42, 55, 0.03);
  display: grid;
  gap: 4px;
}

.project-detail-section-card p,
.project-detail-section-card strong {
  margin: 0;
}

.project-detail-side {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.project-detail-tab-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}

.project-detail-tab-button {
  width: 100%;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(31, 42, 55, 0.04);
  color: var(--ink);
  padding: 11px 13px;
  border-radius: 14px;
  text-align: left;
  display: block;
}

.project-detail-tab-button strong,
.project-detail-tab-button small,
.project-detail-tab-copy h4,
.project-detail-tab-copy p {
  display: block;
}

.project-detail-tab-button.active {
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.24);
  color: var(--accent-deep);
  font-weight: 700;
}

.project-detail-tab-panel {
  gap: 16px;
}

.project-overview-summary-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-detail-tab-copy h4,
.project-detail-tab-copy p {
  margin: 0;
}

.project-setup-section {
  display: grid;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.project-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  flex-wrap: wrap;
}

.project-section-head h4,
.project-section-head p {
  margin: 0;
}

.project-type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-type-card {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.project-type-card strong,
.project-type-card span {
  display: block;
}

.project-type-card span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.project-type-card.active {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.16);
  background: rgba(249, 115, 22, 0.06);
}

.project-rate-budget-panel {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.05);
}

.project-rate-budget-panel p,
.project-rate-budget-panel strong {
  margin: 0;
}

.project-sheet-form {
  gap: 18px;
}

.project-sheet-section {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.project-sheet-section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  flex-wrap: wrap;
}

.project-sheet-section-head h4,
.project-sheet-section-head p {
  margin: 0;
}

.project-sheet-basics-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-hidden-control {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.project-type-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.project-type-choice {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
}

.project-type-choice strong,
.project-type-choice span {
  display: block;
}

.project-type-choice span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.3;
}

.project-type-choice.active {
  border-color: rgba(249, 115, 22, 0.5);
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.16);
  background: rgba(249, 115, 22, 0.06);
}

.project-sheet-billing-card {
  display: grid;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(249, 115, 22, 0.22);
  background: rgba(249, 115, 22, 0.05);
}

.project-sheet-billing-head strong,
.project-sheet-billing-head p {
  margin: 0;
}

.project-segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 8px;
  justify-content: start;
}

.project-segmented-option {
  position: relative;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  background: rgba(255, 255, 255, 0.92);
  font-weight: 600;
}

.project-segmented-option.active {
  border-color: rgba(15, 118, 110, 0.24);
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-deep);
}

.project-sheet-billing-grid,
.project-sheet-invoice-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.project-form-table {
  display: grid;
  gap: 0;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
}

.project-form-table-head,
.project-form-table-row {
  display: grid;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.project-form-table-head {
  background: rgba(31, 42, 55, 0.06);
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--muted);
}

.project-form-table-row + .project-form-table-row {
  border-top: 1px solid rgba(31, 42, 55, 0.08);
}

.project-task-table-head,
.project-task-table-row {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) 110px 130px auto;
}

.project-task-table-row.draft input[type="text"],
.project-task-table-row.draft input[type="number"] {
  min-width: 0;
}

.project-task-name-cell {
  min-width: 0;
}

.project-task-name-cell strong {
  display: block;
  overflow-wrap: anywhere;
}

.project-task-table-row.inactive {
  opacity: 0.68;
}

.project-task-availability,
.project-task-new-actions {
  justify-content: flex-start;
}

.project-task-composer {
  display: grid;
  grid-template-columns: minmax(0, 2fr) 140px 110px auto;
  gap: 12px;
  align-items: end;
  padding: 14px;
  border-top: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(31, 42, 55, 0.025);
}

.project-task-composer label:not(.checkbox-row) {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.project-task-composer input {
  min-width: 0;
}

.project-task-composer-billable {
  min-height: 42px;
  align-items: center;
}

.project-team-table-head,
.project-team-table-row {
  grid-template-columns: minmax(0, 1.9fr) 120px 120px 160px auto;
}

.project-team-person {
  display: flex;
  gap: 12px;
  align-items: start;
}

.project-team-person span {
  display: grid;
  gap: 2px;
}

.project-manager-toggle {
  justify-content: flex-start;
}

.project-sheet-actions {
  display: flex;
  justify-content: flex-start;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.project-budget-progress {
  display: grid;
  gap: 8px;
}

.project-notes-panel {
  margin-top: 2px;
}

.project-budget-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
}

.progress-track {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(31, 42, 55, 0.12);
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #4b83d8);
}

.progress-fill.danger {
  background: linear-gradient(90deg, #d97706, #dc2626);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  text-align: left;
  vertical-align: top;
}

th {
  font-size: 0.86rem;
  color: var(--muted);
  font-weight: 600;
}

.action-cell {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  position: relative;
}

.action-cell .team-actions-menu-wrap {
  margin-left: auto;
}

.list-stack {
  display: grid;
  gap: 10px;
}

.project-task-panel .list-stack,
.team-directory-panel .list-stack {
  gap: 8px;
}

.project-task-panel.collapsed .list-stack,
.team-directory-panel .list-stack {
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.list-stack.tight {
  gap: 8px;
}

.data-health-grid {
  margin-top: 16px;
}

.list-row,
.line-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(31, 42, 55, 0.04);
}

.project-task-panel .list-row,
.team-directory-panel .list-row {
  padding: 10px 12px;
  border-radius: 14px;
}

.user-row .ghost {
  min-width: 88px;
}

.manage-directory-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(120px, 0.5fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-radius: 0;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  background: transparent;
}

.manage-directory-row:last-child {
  border-bottom: 0;
}

.manage-directory-copy {
  min-width: 0;
}

.manage-directory-copy p {
  margin: 4px 0 0;
  line-height: 1.35;
}

.manage-directory-meta {
  display: grid;
  gap: 4px;
  justify-items: start;
}

.manage-directory-meta strong,
.manage-directory-meta small {
  display: block;
}

.manage-directory-row .button-row,
.manage-directory-row .align-right {
  justify-content: flex-end;
}

.manage-directory-row .ghost {
  min-width: 72px;
}

.manage-category-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  padding-top: 12px;
  padding-bottom: 12px;
}

.manage-category-leading {
  justify-self: start;
}

.manage-category-copy p {
  margin-top: 5px;
}

.manage-category-row .button-row {
  gap: 8px;
}

.manage-client-row {
  grid-template-columns: auto minmax(0, 1.4fr) minmax(90px, 0.28fr) auto;
  padding-top: 12px;
  padding-bottom: 12px;
}

.manage-task-row {
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.45fr) auto;
}

.manage-client-leading {
  display: flex;
  align-items: center;
}

.manage-client-actions {
  gap: 10px;
  flex-wrap: wrap;
}

.manage-client-actions .icon-button {
  gap: 8px;
}

.client-contact-modal {
  width: min(520px, 100%);
}

.client-contact-actions {
  justify-content: flex-end;
}

.task-filter-form {
  min-width: min(100%, 360px);
}

.task-directory-group + .task-directory-group {
  margin-top: 18px;
}

.task-directory-group-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  padding: 0 0 10px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.task-directory-group-head h4,
.task-directory-group-head p {
  margin: 0;
}

.task-directory-group-head > span {
  white-space: nowrap;
}

.panel-head .soft {
  margin: 4px 0 0;
}

.team-directory-panel.compact-empty .panel-head {
  margin-bottom: 10px;
}

.empty-directory-note {
  margin: 0;
}

.align-right {
  text-align: right;
}

.inset-panel {
  background: rgba(31, 42, 55, 0.02);
  border: 1px solid rgba(31, 42, 55, 0.06);
}

.project-activity-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(31, 42, 55, 0.06);
  background: rgba(31, 42, 55, 0.03);
}

.project-activity-icon {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(39, 146, 49, 0.08);
}

.project-activity-copy strong,
.project-activity-copy p,
.project-activity-copy small {
  display: block;
}

.project-activity-copy p,
.project-activity-copy small {
  margin: 4px 0 0;
}

.project-activity-value {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.timer-live {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto 132px;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  border-radius: 8px;
  background: #0c1a30;
  border: 1px solid rgba(34, 211, 238, 0.34);
  box-shadow: 0 12px 34px rgba(1, 6, 20, 0.22);
}

.timer-live-label {
  margin: 0;
  color: #dffbff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0;
}

.timer-live-status {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #67e8f9;
  background: #0e2d3a;
  border: 1px solid rgba(34, 211, 238, 0.7);
}

.timer-live-work {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.timer-live-time {
  display: grid;
  gap: 2px;
  justify-items: end;
  min-width: 100px;
}

.timer-live-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.timer-live h3 {
  margin: 0;
  color: #f8fbff;
  font-size: 1.16rem;
  font-variant-numeric: tabular-nums;
}

.timer-live-time > span {
  color: rgba(210, 220, 242, 0.7);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timer-live-work p {
  margin: 0;
  line-height: 1.35;
}

.timer-live-context {
  color: rgba(210, 220, 242, 0.74);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timer-live-save-status {
  color: #67e8f9;
  font-size: 0.74rem;
  font-weight: 800;
}

.timer-stop-button,
.timer-start-confirm {
  min-height: 42px;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 800;
}

.timer-stop-button {
  color: #fecdd3;
  background: #341824;
  border: 1px solid rgba(251, 113, 133, 0.92);
}

.timer-stop-button:hover,
.timer-stop-button:focus-visible {
  color: #fff1f2;
  background: #4a1d2c;
  border-color: #fda4af;
}

.timer-start-confirm {
  color: #ecfeff;
  background: #0e7490;
  border: 1px solid rgba(103, 232, 249, 0.72);
}

.timer-start-confirm:hover,
.timer-start-confirm:focus-visible {
  background: #0891b2;
}

.day-entry-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 12px 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.timesheet-header,
.day-entry-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.timesheet-header {
  align-self: start;
  justify-self: start;
  justify-content: space-between;
  align-items: center;
  width: min(100%, 1540px);
  max-width: 1540px;
  gap: 8px;
}

.timesheet-header h3 {
  margin: 0;
  font-size: 1.42rem;
  line-height: 1.12;
  letter-spacing: 0;
}

.timesheet-status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 4px;
}

.week-state-banner {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(31, 42, 55, 0.08);
}

.week-state-banner h4,
.week-state-banner p {
  margin: 0;
}

.week-state-banner.submitted {
  background: rgba(249, 115, 22, 0.1);
  border-color: rgba(249, 115, 22, 0.22);
}

.week-state-banner.approved {
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.2);
}

.week-state-banner.open {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.16);
}

.week-state-meta {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.week-state-meta strong {
  font-size: 1.1rem;
}

.week-state-meta span,
.week-state-meta small {
  color: var(--muted);
}

.timesheet-period-bar,
.timesheet-nav,
.timesheet-toggle-bar,
.timesheet-row-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.timesheet-toggle-bar {
  justify-content: flex-end;
}

.timesheet-toggle-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timesheet-toggle-group + .timesheet-toggle-group {
  margin-left: 4px;
  padding-left: 12px;
  border-left: 1px solid rgba(31, 42, 55, 0.08);
}

.timesheet-user-switcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  margin: 0;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  min-height: 34px;
  min-width: 132px;
}

.timesheet-user-switcher-face {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  width: 100%;
  max-width: 188px;
  padding: 8px 30px 8px 12px;
  border: 1px solid rgba(34, 211, 238, 0.3);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.66);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.timesheet-user-switcher-face::after {
  content: "";
  position: absolute;
  right: 12px;
  top: 50%;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transform: translateY(-35%);
  opacity: 0.74;
}

.timesheet-user-switcher-label {
  display: block;
  max-width: 138px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timesheet-user-switcher.is-viewing-other .timesheet-user-switcher-face {
  border-color: rgba(249, 115, 22, 0.42);
  color: #fed7aa;
}

.timesheet-user-switcher:focus-within .timesheet-user-switcher-face {
  border-color: rgba(34, 211, 238, 0.78);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.16);
}

.timesheet-user-switcher select {
  position: absolute;
  inset: 0;
  min-height: 34px;
  width: 100%;
  min-width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.timesheet-user-readonly,
.timesheet-readonly-chip {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
}

.timesheet-readonly-chip {
  max-width: min(520px, 100%);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.timesheet-overview {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.slim {
  padding: 10px 12px;
  border-radius: 12px;
}

.timesheet-header .slim {
  padding: 8px 10px;
  border-radius: 10px;
}

.square {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.active-toggle {
  background: rgba(34, 211, 238, 0.1);
  color: #0e7490;
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28);
}

.timesheet-panel {
  padding: 0;
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.94);
  width: min(100%, 1540px);
  max-width: 1540px;
  margin-right: auto;
}

.timesheet-grid-head,
.timesheet-row,
.timesheet-grid-foot {
  display: grid;
  grid-template-columns: minmax(420px, 2.8fr) repeat(7, minmax(66px, 1fr)) 60px;
  min-width: 942px;
}

.timesheet-grid-days,
.timesheet-row-days,
.timesheet-foot-days {
  display: contents;
}

.timesheet-grid-head {
  background: #efefeb;
  border-bottom: 1px solid rgba(31, 42, 55, 0.1);
}

.timesheet-grid-spacer,
.timesheet-grid-total {
  padding: 8px 10px;
}

.timesheet-grid-total {
  display: flex;
  align-items: end;
  justify-content: center;
  color: var(--muted);
  font-weight: 700;
}

.timesheet-calendar-panel {
  display: grid;
  gap: 10px;
  width: min(100%, 1540px);
  max-width: 1540px;
  margin-right: auto;
}

.timesheet-calendar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.timesheet-calendar-head h3,
.timesheet-calendar-head p {
  margin: 0;
}

.timesheet-calendar-week-total {
  min-width: 150px;
  display: grid;
  gap: 2px;
  justify-items: end;
  color: var(--muted);
}

.timesheet-calendar-week-total strong {
  color: var(--text);
  font-size: 1.28rem;
}

.timesheet-calendar-tabs {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  overflow: hidden;
  border: 1px solid rgba(31, 42, 55, 0.12);
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.68);
}

.timesheet-calendar-tab {
  min-height: 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 8px;
  align-items: center;
  padding: 8px 10px;
  border: 0;
  border-right: 1px solid rgba(31, 42, 55, 0.1);
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.timesheet-calendar-tab:last-child {
  border-right: 0;
}

.timesheet-calendar-tab span,
.timesheet-calendar-tab em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
  font-weight: 700;
}

.timesheet-calendar-tab strong {
  font-size: 0.9rem;
}

.timesheet-calendar-tab small {
  justify-self: end;
  color: var(--text);
  font-weight: 800;
}

.timesheet-calendar-tab.selected {
  background: rgba(34, 211, 238, 0.1);
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.55);
}

.timesheet-calendar-board {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(31, 42, 55, 0.12);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: rgba(255, 255, 255, 0.48);
}

.timesheet-calendar-hour-rail {
  display: grid;
  grid-template-rows: repeat(23, minmax(18px, 1fr));
  padding: 10px 8px 12px 0;
  border-right: 1px solid rgba(31, 42, 55, 0.1);
  background: rgba(31, 42, 55, 0.03);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: right;
}

.timesheet-calendar-hour-rail span {
  min-height: 18px;
}

.timesheet-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  align-items: stretch;
  min-width: 826px;
}

.timesheet-calendar-day {
  min-height: 430px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 8px;
  padding: 10px;
  border-left: 1px solid rgba(31, 42, 55, 0.08);
  background: transparent;
}

.timesheet-calendar-day.selected {
  background: rgba(34, 211, 238, 0.06);
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.44);
}

.timesheet-calendar-day-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
}

.timesheet-calendar-date {
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  display: grid;
  gap: 1px;
  min-height: 34px;
}

.timesheet-calendar-date span,
.timesheet-calendar-date small,
.timesheet-calendar-total span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
}

.timesheet-calendar-date strong {
  font-size: 1rem;
}

.timesheet-calendar-total {
  display: grid;
  gap: 1px;
  justify-items: end;
  color: var(--muted);
}

.timesheet-calendar-total strong {
  color: var(--text);
}

.timesheet-calendar-column-lane {
  min-height: 300px;
  padding-top: 4px;
  background-image: linear-gradient(to bottom, rgba(31, 42, 55, 0.08) 1px, transparent 1px);
  background-size: 100% 18px;
}

.timesheet-calendar-entry-list {
  display: grid;
  gap: 6px;
  align-content: start;
}

.timesheet-calendar-entry {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  padding: 7px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.timesheet-calendar-entry-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.timesheet-calendar-entry-copy strong,
.timesheet-calendar-entry-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timesheet-calendar-entry-copy strong {
  font-size: 0.82rem;
}

.timesheet-calendar-entry-copy span,
.timesheet-calendar-empty {
  color: var(--muted);
  font-size: 0.76rem;
}

.timesheet-calendar-empty {
  margin: 4px 0 0;
}

.timesheet-calendar-open-day {
  justify-self: start;
}

.timesheet-day-header {
  border: 0;
  border-left: 1px solid rgba(31, 42, 55, 0.08);
  background: #efefeb;
  min-height: 50px;
  display: grid;
  gap: 2px;
  place-content: center;
  text-align: center;
  padding: 7px 5px;
}

.timesheet-day-header span {
  color: var(--muted);
  font-size: 0.78rem;
}

.timesheet-day-header strong {
  font-size: 0.9rem;
}

.timesheet-day-header small,
.timesheet-row-total small,
.timesheet-cell small {
  color: var(--muted);
}

.timesheet-day-header.selected {
  background: rgba(34, 211, 238, 0.06);
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.45);
}

.timesheet-day-header,
.timesheet-row-total,
.timesheet-foot-total,
.timesheet-foot-week-total {
  position: relative;
}

.timesheet-day-header.time-warning,
.timesheet-row-total.time-warning,
.timesheet-foot-total.time-warning,
.timesheet-foot-week-total.time-warning {
  color: #b45309;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.42);
}

.timesheet-grid-body {
  display: grid;
}

.timesheet-row {
  background: white;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.timesheet-row-summary,
.timesheet-row-total {
  padding: 7px 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.timesheet-row-summary {
  position: relative;
  border-left: 2px solid rgba(34, 211, 238, 0.72);
}

.timesheet-row-summary.empty {
  border-left-color: rgba(31, 42, 55, 0.12);
}

.timesheet-row-copy p {
  margin: 2px 0 0;
  font-size: 0.8rem;
  line-height: 1.24;
}

.timesheet-row-copy strong {
  display: block;
  font-size: 0.9rem;
  line-height: 1.18;
}

.timesheet-row-actions {
  justify-content: end;
  max-width: none;
  align-self: center;
  flex-wrap: nowrap;
  gap: 4px;
}

.timesheet-row-actions .secondary-row-action {
  opacity: 0.26;
  background: transparent;
  border-color: transparent;
}

.timesheet-row:hover .timesheet-row-actions .secondary-row-action,
.timesheet-row:focus-within .timesheet-row-actions .secondary-row-action {
  opacity: 1;
}

.timesheet-cell {
  position: relative;
  margin: 4px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  min-height: 40px;
  padding: 3px 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.timesheet-cell span {
  min-height: 1.1rem;
  font-weight: 600;
  font-size: 0.9rem;
}

.timesheet-cell.filled {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(31, 42, 55, 0.16);
  box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.14);
}

.timesheet-cell.selected {
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.28);
  padding: 4px;
}

.timesheet-cell:focus-within {
  border-color: rgba(34, 211, 238, 0.54);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.32), 0 0 0 2px rgba(34, 211, 238, 0.08);
}

.timesheet-cell.time-warning {
  border-color: rgba(245, 158, 11, 0.62);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.22);
}

.timesheet-cell.saving {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.24);
}

.timesheet-cell.save-error {
  border-color: rgba(251, 113, 133, 0.5);
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.22);
}

.timesheet-cell.saved {
  box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.22);
}

.timesheet-cell.read-only {
  opacity: 0.82;
}

.timesheet-cell.payroll-locked {
  border-color: rgba(34, 211, 238, 0.36);
  background: rgba(8, 145, 178, 0.09);
  box-shadow: inset 3px 0 0 rgba(34, 211, 238, 0.62);
}

.timesheet-cell input {
  width: 100%;
  text-align: center;
  border-radius: 8px;
  min-height: 30px;
  padding: 5px;
  border: 1px solid rgba(31, 42, 55, 0.14);
  background: white;
}

.timesheet-cell input::placeholder {
  color: rgba(100, 116, 139, 0.56);
}

.cell-save-status {
  display: block;
  margin-top: 2px;
  font-size: 0.68rem;
  line-height: 1.1;
  color: var(--muted);
}

.cell-save-status.error {
  color: #fb7185;
}

.timesheet-payroll-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  margin-top: 5px;
  padding: 4px 8px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
}

.timesheet-payroll-status::before {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.timesheet-payroll-status.paid {
  color: #6ee7b7;
  border-color: rgba(52, 211, 153, 0.4);
  background: rgba(6, 78, 59, 0.34);
}

.timesheet-payroll-status.processing {
  color: #67e8f9;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(8, 145, 178, 0.2);
}

.timesheet-payroll-status.review {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.48);
  background: rgba(120, 53, 15, 0.3);
}

.timesheet-payroll-status.compact {
  margin: 0;
  padding: 3px 7px;
  font-size: 0.72rem;
  white-space: nowrap;
}

.time-entry-source-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.time-entry-source-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.1);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.time-entry-source-tag.retro {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.14);
  color: #b45309;
}

.time-entry-source-tag.timer {
  border-color: rgba(8, 145, 178, 0.3);
  background: rgba(6, 182, 212, 0.12);
  color: #0e7490;
}

.time-entry-source-tag.manual {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(59, 130, 246, 0.1);
  color: #1d4ed8;
}

.time-entry-source-tag.import {
  border-color: rgba(124, 58, 237, 0.24);
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

.time-entry-source-tag:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.72);
  outline-offset: 2px;
}

.time-entry-source-wrap.compact .time-entry-source-tag {
  min-height: 18px;
  padding: 2px 5px;
  font-size: 0.61rem;
}

.timesheet-cell > .time-entry-source-wrap {
  position: absolute;
  right: 5px;
  bottom: 4px;
  z-index: 4;
}

.timesheet-cell > .time-entry-source-wrap + .tooltip-content,
.timesheet-cell .time-entry-source-wrap .tooltip-content {
  top: calc(100% + 8px);
  bottom: auto;
}

.cell-retry-button {
  margin-top: 4px;
  min-height: 30px;
  padding: 5px 8px;
}

.cell-time-warning,
.day-time-warning,
.cell-error-indicator,
.status-tooltip-indicator {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
  font-size: 0.7rem;
  font-weight: 800;
  line-height: 1;
}

.cell-error-indicator,
.status-tooltip-indicator.error {
  background: rgba(251, 113, 133, 0.17);
  color: #be123c;
}

.status-tooltip-indicator {
  position: relative;
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.status-tooltip-indicator.saved {
  background: rgba(52, 211, 153, 0.14);
  color: #047857;
}

.status-tooltip-indicator.saving {
  background: rgba(34, 211, 238, 0.14);
  color: #0e7490;
}

.status-tooltip-indicator.warning {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.cell-time-warning {
  position: absolute;
  left: 6px;
  top: 6px;
}

.cell-error-indicator {
  position: absolute;
  left: 6px;
  bottom: 6px;
}

.day-time-warning {
  margin-inline: auto;
}

.tooltip-trigger {
  cursor: help;
  touch-action: manipulation;
}

.tooltip-action-trigger {
  min-height: 26px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.04);
  color: var(--muted);
  padding: 4px 10px;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
}

.tooltip-action-trigger:hover,
.tooltip-action-trigger:focus-visible,
.tooltip-action-trigger[data-tooltip-open="true"] {
  outline: none;
  transform: translateY(-1px);
}

.tooltip-action-trigger.warning {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.12);
  color: #b45309;
}

.tooltip-action-trigger.error {
  border-color: rgba(251, 113, 133, 0.34);
  background: rgba(251, 113, 133, 0.12);
  color: #be123c;
}

.tooltip-action-trigger.warning:hover,
.tooltip-action-trigger.warning:focus-visible,
.tooltip-action-trigger.warning[data-tooltip-open="true"] {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.14);
}

.tooltip-action-trigger.error:hover,
.tooltip-action-trigger.error:focus-visible,
.tooltip-action-trigger.error[data-tooltip-open="true"] {
  box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.14);
}

.week-summary-disclosure {
  display: inline-flex;
  position: relative;
  align-items: center;
  max-width: min(420px, 100%);
}

.week-summary-disclosure summary {
  list-style: none;
}

.week-summary-disclosure summary::-webkit-details-marker {
  display: none;
}

.week-summary-disclosure[open] {
  display: grid;
  gap: 7px;
  grid-column: 1 / -1;
  justify-items: start;
}

.week-summary-detail-panel {
  max-width: min(620px, 100%);
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.4;
  white-space: normal;
}

.week-summary-disclosure:not([open]) > .week-summary-detail-panel {
  display: none;
}

.week-summary-disclosure[open] > .tooltip-content {
  display: none;
}

.tooltip-content {
  position: absolute;
  z-index: 40;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(280px, 72vw);
  transform: translateX(-50%) translateY(4px);
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 8px;
  background: rgba(10, 16, 32, 0.98);
  color: #f8fafc;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.28);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.35;
  padding: 8px 10px;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  visibility: hidden;
  white-space: normal;
}

.timesheet-cell .tooltip-content {
  top: calc(100% + 8px);
  bottom: auto;
}

.tooltip-trigger[data-tooltip-open="true"] + .tooltip-content,
.tooltip-trigger:hover + .tooltip-content,
.tooltip-trigger:focus + .tooltip-content,
.week-summary-disclosure summary:hover + .tooltip-content,
.week-summary-disclosure summary:focus + .tooltip-content,
.submit-week-tooltip-wrap:hover .tooltip-content,
.submit-week-tooltip-wrap:focus .tooltip-content,
.submit-week-tooltip-wrap:focus-within .tooltip-content,
button[aria-describedby]:hover + .tooltip-content,
button[aria-describedby]:focus + .tooltip-content {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  visibility: visible;
}

.cell-note-dot {
  position: absolute;
  top: 6px;
  right: 7px;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22d3ee;
  box-shadow: 0 0 10px rgba(34, 211, 238, 0.55);
  cursor: help;
}

.cell-note-dot + .tooltip-content {
  top: calc(100% + 8px);
  bottom: auto;
}

.week-cell-note-tooltip {
  --week-cell-note-tooltip-shift: -50%;
  width: min(420px, calc(100vw - 32px));
  display: grid;
  gap: 9px;
  font-weight: 500;
  transform: translateX(var(--week-cell-note-tooltip-shift)) translateY(4px);
}

.week-cell-note-tooltip-date {
  color: #cbd5e1;
  font-size: 0.7rem;
  font-weight: 750;
}

.week-cell-note-tooltip-section {
  display: grid;
  gap: 3px;
}

.week-cell-note-tooltip-section + .week-cell-note-tooltip-section {
  padding-top: 8px;
  border-top: 1px solid rgba(148, 163, 184, 0.24);
}

.week-cell-note-tooltip-section strong {
  color: #f8fafc;
  font-size: 0.72rem;
  font-weight: 800;
}

.week-cell-note-tooltip-section.consultant-summary-section strong {
  color: #67e8f9;
}

.week-cell-note-tooltip-copy {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.week-cell-note-tooltip-hint {
  display: none;
  color: #a5b4c8;
  font-size: 0.68rem;
  font-weight: 650;
}

.timesheet-row-days > .timesheet-cell:nth-child(-n + 2) .week-cell-note-tooltip {
  --week-cell-note-tooltip-shift: 0%;
  left: 4px;
  right: auto;
}

.timesheet-row-days > .timesheet-cell:nth-last-child(-n + 2) .week-cell-note-tooltip {
  --week-cell-note-tooltip-shift: 0%;
  right: 4px;
  left: auto;
}

.timesheet-cell:hover .cell-note-dot + .tooltip-content,
.timesheet-cell:focus .cell-note-dot + .tooltip-content,
.timesheet-cell:focus-within .cell-note-dot + .tooltip-content,
.timesheet-cell:hover .time-entry-source-wrap .tooltip-content,
.timesheet-cell:focus .time-entry-source-wrap .tooltip-content,
.timesheet-cell:focus-within .time-entry-source-wrap .tooltip-content {
  opacity: 1;
  transform: translateX(var(--week-cell-note-tooltip-shift, -50%)) translateY(0);
  visibility: visible;
}

.week-note-button.has-note {
  color: #0891b2;
  border-color: rgba(34, 211, 238, 0.42);
  background: rgba(34, 211, 238, 0.12);
}

.modal-backdrop.week-notes-backdrop {
  z-index: 120;
}

.week-notes-modal {
  width: min(640px, 100%);
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
}

.week-notes-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.week-notes-head h3,
.week-notes-head p {
  margin: 0;
}

.week-notes-form {
  display: grid;
  gap: 12px;
}

.week-notes-day {
  display: grid;
  grid-template-columns: minmax(92px, 0.28fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 10px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.76);
}

.week-notes-day-meta {
  display: grid;
  gap: 3px;
}

.week-notes-day-meta small {
  color: var(--muted);
}

.week-notes-day textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
}

.week-note-consultant-summary {
  grid-column: 2;
  margin-top: -4px;
}

.week-notes-day.payroll-locked {
  border-color: rgba(34, 211, 238, 0.34);
  background: rgba(8, 145, 178, 0.09);
}

.week-notes-empty {
  padding: 18px;
  border: 1px dashed rgba(31, 42, 55, 0.18);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.week-notes-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.timesheet-row-total {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.sheet-icon-button {
  width: 34px;
  min-width: 34px;
  height: 34px;
  border-radius: 10px;
  padding: 0;
}

.sheet-icon-button .icons8-icon {
  opacity: 0.72;
}

.sheet-icon-button.danger .icons8-icon,
.ghost.danger.sheet-icon-button .icons8-icon {
  opacity: 0.78;
}

.timesheet-grid-foot {
  background: rgba(247, 242, 233, 0.9);
  border-top: 1px solid rgba(31, 42, 55, 0.08);
}

.timesheet-foot-actions,
.timesheet-foot-week-total,
.timesheet-foot-total {
  padding: 9px 12px;
}

.timesheet-foot-week-total .tooltip-content,
.timesheet-foot-total .tooltip-content {
  left: auto;
  right: 0;
  transform: translateY(4px);
}

.timesheet-foot-week-total .tooltip-trigger[data-tooltip-open="true"] + .tooltip-content,
.timesheet-foot-week-total .tooltip-trigger:hover + .tooltip-content,
.timesheet-foot-week-total .tooltip-trigger:focus + .tooltip-content,
.timesheet-foot-total .tooltip-trigger[data-tooltip-open="true"] + .tooltip-content,
.timesheet-foot-total .tooltip-trigger:hover + .tooltip-content,
.timesheet-foot-total .tooltip-trigger:focus + .tooltip-content {
  transform: translateY(0);
}

.timesheet-foot-actions {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.timesheet-foot-button-row,
.timesheet-foot-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.timesheet-foot-meta {
  min-width: 0;
  justify-content: flex-start;
  position: relative;
}

.timesheet-foot-status-stack {
  display: grid;
  gap: 6px;
  min-width: 0;
  flex: 1 1 420px;
}

.timesheet-foot-status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.timesheet-foot-meta strong {
  font-size: 0.95rem;
}

.timesheet-foot-meta span,
.timesheet-foot-meta small {
  color: var(--muted);
}

.autosave-status {
  min-height: 34px;
}

.autosave-status .tooltip-content {
  left: 0;
  right: auto;
  width: min(320px, calc(100vw - 48px));
  transform: translateY(4px);
}

.autosave-status .tooltip-trigger[data-tooltip-open="true"] + .tooltip-content,
.autosave-status .tooltip-trigger:hover + .tooltip-content,
.autosave-status .tooltip-trigger:focus + .tooltip-content {
  transform: translateY(0);
}

.autosave-status.saving span {
  color: #0e7490;
}

.autosave-status.error span {
  color: #be123c;
}

.autosave-status.saved span {
  color: #047857;
}

.autosave-retry-button {
  min-height: 30px;
  padding: 5px 9px;
}

.week-draft-discard-button {
  min-height: 30px;
  padding: 5px 9px;
  color: #9f1239;
}

.week-blocking-summary,
.week-warning-summary {
  min-height: 34px;
  padding-inline: 0;
}

.week-blocking-summary:has(.week-summary-disclosure[open]),
.week-warning-summary:has(.week-summary-disclosure[open]) {
  align-items: start;
}

.week-blocking-summary > span:not(.tooltip-content) {
  color: #be123c;
}

.week-warning-summary > span:not(.tooltip-content) {
  color: #b45309;
}

.submit-week-tooltip-wrap {
  display: inline-flex;
  position: relative;
}

.submit-week-tooltip-wrap:focus-visible {
  outline: 2px solid rgba(34, 211, 238, 0.78);
  outline-offset: 3px;
}

.submit-week-tooltip-wrap .tooltip-content {
  left: auto;
  right: 0;
  transform: translateY(4px);
}

.submit-week-tooltip-wrap:hover .tooltip-content,
.submit-week-tooltip-wrap:focus .tooltip-content,
.submit-week-tooltip-wrap:focus-within .tooltip-content,
.submit-week-tooltip-wrap .tooltip-trigger[data-tooltip-open="true"] + .tooltip-content {
  transform: translateY(0);
}

.timesheet-foot-total,
.timesheet-foot-week-total {
  display: flex;
  align-items: center;
  justify-content: center;
}

.timesheet-foot-total.selected {
  background: rgba(249, 115, 22, 0.06);
}

.timesheet-foot-week-total {
  flex-direction: column;
  gap: 2px;
  text-align: center;
}

.timesheet-foot-week-total small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.timesheet-day-panel {
  margin-top: 18px;
}

.day-mode-panel {
  display: grid;
  gap: 14px;
  width: min(1192px, 100%);
}

.day-mode-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.day-mode-content {
  display: grid;
  gap: 8px;
}

.day-track-launch {
  width: auto;
  min-height: 58px;
  border: 1px solid rgba(34, 211, 238, 0.32);
  border-radius: 7px;
  background: #0e7490;
  color: #fff;
  padding: 0 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  box-shadow: 0 8px 22px rgba(14, 116, 144, 0.2);
}

.day-track-launch:hover,
.day-track-launch:focus-visible {
  background: #0891b2;
  border-color: rgba(103, 232, 249, 0.64);
}

.day-track-launch-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.18);
}

.day-track-launch-icon .icons8-icon {
  filter: brightness(0) invert(1);
}

.day-mode-launcher-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.day-mode-content {
  gap: 8px;
  max-width: 1192px;
  width: min(1192px, 100%);
}

.day-mode-section {
  display: grid;
  gap: 6px;
}

.day-mode-section + .day-mode-section {
  margin-top: 6px;
}

.day-mode-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
}

.day-mode-section-head-with-button {
  align-items: center;
}

.day-mode-section-head h3,
.day-mode-section-head p {
  margin: 0;
}

.day-mode-section-help {
  color: var(--muted);
  margin-top: 2px;
}

.day-mode-content-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  flex-wrap: wrap;
}

.day-mode-content-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.day-mode-content-head h3,
.day-mode-content-head p {
  margin: 0;
}

.day-mode-summary {
  display: grid;
  gap: 2px;
  min-width: 88px;
  text-align: right;
}

.day-mode-summary span {
  font-size: 1.08rem;
  font-weight: 700;
}

.day-mode-summary small {
  color: var(--muted);
  font-size: 0.88rem;
}

.day-mode-week-bar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(190px, 240px);
  gap: 8px;
  align-items: stretch;
  padding-bottom: 0;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.day-mode-entry-actions {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.day-mode-week-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0;
}

.day-mode-week-total {
  display: grid;
  align-content: center;
  gap: 2px;
  min-width: 190px;
  justify-items: end;
  text-align: right;
  min-height: 58px;
  padding: 7px 10px;
  border-left: 1px solid rgba(143, 178, 255, 0.12);
  position: relative;
}

.day-mode-week-total span {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.day-mode-week-total strong {
  font-size: 1rem;
}

.day-mode-week-total small {
  color: var(--muted);
  font-size: 0.78rem;
}

.day-mode-week-total.time-warning {
  background: rgba(245, 158, 11, 0.06);
  border-left-color: rgba(245, 158, 11, 0.34);
}

.day-mode-week-total.time-warning > strong {
  color: #b45309;
}

.day-mode-week-warning {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 4px 10px 8px;
  border-top: 1px solid rgba(245, 158, 11, 0.14);
}

.day-mode-week-warning > span {
  color: #b45309;
  font-size: 0.76rem;
  font-weight: 800;
}

.day-mode-week-warning .week-summary-disclosure[open] {
  display: grid;
  width: min(460px, 100%);
  max-width: 100%;
  justify-items: end;
}

.day-mode-week-warning .week-summary-detail-panel {
  position: static;
  width: 100%;
  max-width: 460px;
  max-height: 260px;
  margin-top: 8px;
  overflow: auto;
  text-align: left;
}

.day-mode-week-status {
  margin-top: 2px;
}

.day-mode-date-chip {
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 7px 7px 0 0;
  background: transparent;
  min-height: 64px;
  padding: 8px 10px 9px;
  display: grid;
  align-content: center;
  gap: 1px;
  text-align: left;
}

.day-mode-date-chip strong {
  font-size: 0.82rem;
}

.day-mode-date-chip span,
.day-mode-date-chip small {
  color: var(--muted);
  font-size: 0.8rem;
}

.day-mode-date-chip.selected {
  background: rgba(34, 211, 238, 0.11);
  border-color: rgba(34, 211, 238, 0.9);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.2);
}

.day-mode-date-chip.selected strong,
.day-mode-date-chip.selected span,
.day-mode-date-chip.selected small {
  color: #0e7490;
}

.day-mode-actions,
.modal-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.day-empty-state {
  min-height: 260px;
  padding: 28px;
  border-radius: 20px;
  background: rgba(31, 42, 55, 0.04);
  border: 1px solid rgba(31, 42, 55, 0.07);
  display: grid;
  place-items: center;
  text-align: center;
}

.day-empty-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.copy-rows-modal {
  max-width: 680px;
}

.copy-row-preview-list {
  display: grid;
  gap: 10px;
  max-height: min(460px, 52vh);
  overflow: auto;
  padding-right: 4px;
}

.copy-row-preview-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 55, 0.1);
  background: rgba(31, 42, 55, 0.04);
}

.copy-row-preview-item strong,
.copy-row-preview-item small {
  display: block;
}

.copy-row-preview-item small {
  color: var(--muted);
  margin-top: 2px;
}

.day-quick-grid {
  --day-quick-columns: minmax(360px, 1fr) 104px 150px 174px 64px;
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(31, 42, 55, 0.08);
  max-width: none;
}

.day-quick-grid-head {
  display: grid;
  grid-template-columns: var(--day-quick-columns);
  gap: 16px;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.day-quick-grid-head span:not(:first-child) {
  text-align: left;
}

.day-mode-helper {
  margin: 0;
}

.day-mode-copy-button {
  justify-content: flex-start;
}

.day-mode-compact-toggle {
  justify-content: center;
}

.day-mode-entry-actions .day-mode-copy-button {
  width: auto;
  min-height: 58px;
  justify-content: center;
  padding-inline: 10px;
}

.day-quick-row {
  display: grid;
  grid-template-columns: var(--day-quick-columns);
  gap: 10px 16px;
  min-height: 72px;
  padding: 8px 10px;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  position: relative;
}

.day-quick-row-compact {
  padding: 9px 10px;
  border-radius: 12px;
  gap: 10px 14px;
}

.day-quick-row.row-first {
  align-items: center;
}

.day-quick-row.row-first.day-quick-row-has-entries {
  align-items: center;
  min-height: 72px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.day-quick-row.saved-only {
  opacity: 0.96;
}

.day-quick-row-copy p {
  margin: 3px 0 0;
  line-height: 1.32;
}

.day-quick-row-copy strong {
  display: block;
  font-size: 1.05rem;
}

.day-quick-row-has-entries .day-quick-row-copy {
  min-width: 0;
}

.day-quick-row-has-entries .day-quick-row-copy strong,
.day-quick-row-has-entries .day-quick-row-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-quick-row-has-entries .day-quick-row-copy strong {
  font-size: 0.94rem;
  line-height: 1.15;
}

.day-quick-row-has-entries .day-quick-row-copy p {
  margin-top: 2px;
  font-size: 0.86rem;
  line-height: 1.2;
}

.day-row-multiple-help {
  max-width: 520px;
  margin-top: 5px;
  padding-left: 8px;
  border-left: 2px solid rgba(245, 158, 11, 0.62);
  color: #fde68a;
  font-size: 0.78rem;
}

.day-quick-row-inputs {
  display: grid;
  gap: 8px;
  align-content: start;
  grid-column: 2;
  grid-row: 1;
}

.day-quick-row-inputs label {
  display: grid;
  gap: 6px;
}

.day-quick-row-inputs label > span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.day-quick-row-inputs input {
  width: 100%;
  min-height: 44px;
  border-radius: 8px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

.day-quick-row-inputs input[aria-invalid="true"] {
  border-color: rgba(239, 68, 68, 0.64);
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.28);
}

.day-row-input-error {
  color: #fca5a5;
  font-size: 0.82rem;
  line-height: 1.3;
}

.day-row-notes {
  display: grid;
  gap: 8px;
  grid-column: 3;
  grid-row: 1;
  align-self: center;
}

.day-row-notes summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 700;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 178, 255, 0.18);
  border-radius: 8px;
  background: rgba(143, 178, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.day-row-summary-chip {
  display: none;
}

.day-row-notes[open] summary {
  color: var(--ink);
}

.day-row-notes[open] {
  grid-column: 1 / -1;
  grid-row: 2;
  align-self: stretch;
  padding: 8px 10px;
  border: 1px solid rgba(143, 178, 255, 0.14);
  border-radius: 8px;
  background: rgba(143, 178, 255, 0.04);
}

.day-row-notes[open] summary {
  justify-self: start;
}

.day-row-notes:not([open]) textarea {
  display: none;
}

.day-quick-row-has-entries .day-row-notes:not([open]) {
  position: static;
}

.day-quick-row-has-entries .day-row-notes:not([open]) summary,
.day-row-saved-entries:not([open]) summary {
  min-width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid rgba(143, 178, 255, 0.16);
  border-radius: 8px;
  background: rgba(143, 178, 255, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1;
  justify-content: center;
}

.day-quick-row-has-entries .day-row-notes:not([open]) summary::-webkit-details-marker,
.day-row-saved-entries:not([open]) summary::-webkit-details-marker {
  display: none;
}

.day-quick-row-has-entries .day-row-notes:not([open]) .day-row-summary-chip,
.day-row-saved-entries:not([open]) .day-row-summary-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.day-row-notes textarea {
  min-height: 74px;
  resize: vertical;
}

.day-quick-row-actions {
  display: grid;
  gap: 6px;
  justify-items: stretch;
  align-content: center;
  grid-column: 5;
  grid-row: 1;
}

.day-row-timer-cell {
  grid-column: 4;
  grid-row: 1;
  align-self: center;
}

.day-row-timer-action,
.day-row-edit-action {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.day-row-timer-action {
  width: 100%;
  padding: 9px 14px;
}

.day-row-timer-action.is-start {
  color: #cffafe;
  background: #0f2f43;
  border: 1px solid rgba(34, 211, 238, 0.62);
}

.day-row-timer-action.is-start:hover,
.day-row-timer-action.is-start:focus-visible {
  color: #ecfeff;
  background: #164e63;
  border-color: #67e8f9;
}

.day-row-timer-action.is-stop {
  color: #fecdd3;
  background: #341824;
  border: 1px solid rgba(251, 113, 133, 0.92);
}

.day-row-timer-action.is-stop:hover,
.day-row-timer-action.is-stop:focus-visible {
  color: #fff1f2;
  background: #4a1d2c;
  border-color: #fda4af;
}

.day-row-timer-action:disabled {
  color: rgba(210, 220, 242, 0.5);
  background: rgba(15, 31, 54, 0.72);
  border-color: rgba(143, 178, 255, 0.14);
  box-shadow: none;
}

.day-row-edit-action {
  width: 100%;
  padding: 9px 8px;
  color: rgba(226, 235, 252, 0.88);
  background: #10182d;
  border: 1px solid rgba(143, 178, 255, 0.22);
}

.day-row-edit-action:hover,
.day-row-edit-action:focus-visible,
.day-row-edit-action.day-row-save-action:not(:disabled) {
  color: #ecfeff;
  border-color: rgba(34, 211, 238, 0.58);
  background: #123145;
}

.day-row-edit-action:disabled {
  color: rgba(210, 220, 242, 0.48);
  background: rgba(16, 24, 45, 0.72);
  border-color: rgba(143, 178, 255, 0.12);
  opacity: 1;
}

.day-row-legacy-action {
  position: relative;
  width: 100%;
}

.day-row-legacy-action .tooltip-content {
  right: 0;
  left: auto;
  width: min(320px, calc(100vw - 40px));
}

.day-quick-row.is-timer-active {
  background: #0e1b31;
}

.day-quick-row.is-timer-active::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: #22d3ee;
}

.day-quick-row-statuses {
  min-height: 0;
  justify-self: start;
  margin-top: 4px;
}

.day-quick-row-button-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.day-row-action-button {
  min-width: 0;
}

.day-row-action-button-idle {
  display: none;
}

.day-row-action-button.secondary:disabled,
.day-row-action-button:disabled {
  background: rgba(143, 178, 255, 0.12);
  color: rgba(156, 169, 200, 0.86);
  border-color: rgba(143, 178, 255, 0.32);
  box-shadow: none;
  opacity: 1;
}

.day-row-secondary-action {
  color: var(--muted);
  background: transparent;
  padding-inline: 6px;
}

.day-row-more-actions {
  position: relative;
}

.day-row-more-actions summary {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid rgba(143, 178, 255, 0.16);
  border-radius: 10px;
  background: rgba(143, 178, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 800;
}

.day-row-more-actions summary::-webkit-details-marker {
  display: none;
}

.day-row-more-actions summary::after {
  content: "...";
  margin-left: 4px;
  transform: translateY(-2px);
}

.day-row-more-actions[open] summary {
  color: var(--ink);
  border-color: rgba(34, 211, 238, 0.32);
  background: rgba(34, 211, 238, 0.08);
}

.day-row-more-actions:not([open]) > .day-row-more-action-list {
  display: none;
}

.day-row-more-action-list {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 20;
  min-width: 190px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(143, 178, 255, 0.18);
  border-radius: 12px;
  background: rgba(11, 18, 32, 0.98);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

.day-row-more-action-list .ghost {
  width: 100%;
  justify-content: flex-start;
}

.day-row-saved-entries {
  grid-column: 4;
  grid-row: 1;
  padding: 0 2px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
}

.day-row-saved-entries:not([open]) {
  position: static;
  max-width: 100%;
  align-self: center;
}

.day-row-saved-entries summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
}

.day-row-saved-entries[open] {
  grid-column: 1 / -1;
  grid-row: 3;
  padding: 8px 10px;
  border-color: rgba(31, 42, 55, 0.08);
  background: rgba(31, 42, 55, 0.025);
}

.day-row-legacy-entries,
.day-row-legacy-entries[open] {
  grid-column: 1 / -1;
  grid-row: 2;
  margin-top: 2px;
  padding: 8px 10px;
  border-color: rgba(245, 158, 11, 0.24);
  background: rgba(245, 158, 11, 0.05);
}

.day-row-legacy-entries:not([open]) {
  justify-self: end;
  width: auto;
  min-width: 154px;
}

.day-row-legacy-entries summary {
  min-height: 40px;
  color: #fde68a;
}

.day-row-legacy-entries .day-row-summary-chip {
  display: inline-flex;
}

.day-row-legacy-entries[open] summary {
  color: #fef3c7;
}

.day-row-saved-entries[open] summary {
  color: var(--ink);
}

.day-row-saved-entries:not([open]) > .day-row-saved-entry-list {
  display: none;
}

.day-row-saved-entry-list {
  display: grid;
  gap: 0;
  padding-top: 4px;
}

.day-entry-card.compact {
  padding: 6px 0;
  background: transparent;
  align-items: center;
  gap: 8px;
}

.day-row-saved-entry-list .day-entry-card.compact:last-child {
  border-bottom: 0;
}

.day-row-saved-entry-list .day-entry-title-row {
  justify-content: flex-start;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.day-row-saved-entry-list .entry-duration {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.day-row-saved-entry-list .entry-duration-secondary {
  font-size: 0.74rem;
}

.day-row-saved-entry-list .day-entry-actions {
  gap: 6px;
}

.inline-delete-confirm {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px;
  border: 1px solid rgba(251, 113, 133, 0.28);
  border-radius: 10px;
  background: rgba(251, 113, 133, 0.08);
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 800;
}

.inline-delete-confirm .ghost {
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 8px;
}

.selected-day-stat {
  text-align: right;
}

.selected-day-stat.compact strong {
  font-size: 1.15rem;
}

.selected-day-head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.selected-day-stat span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
}

.selected-day-stat strong {
  font-size: 1.25rem;
}

.day-entry-list {
  display: grid;
  gap: 0;
}

.day-entry-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.day-entry-main p {
  margin: 0;
  line-height: 1.35;
}

.day-entry-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.entry-duration {
  display: grid;
  gap: 2px;
}

.entry-duration.align-end {
  justify-items: end;
  text-align: right;
}

.entry-duration-primary {
  font-weight: 700;
  white-space: nowrap;
}

.entry-duration-secondary {
  color: #6b7280;
  font-size: 0.78rem;
  line-height: 1.2;
  white-space: nowrap;
}

.day-entry-side {
  min-width: 0;
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.day-entries-panel.embedded {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 42, 55, 0.08);
}

.selected-day-week-detail summary div p {
  margin: 4px 0 0;
}

.selected-day-review-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 42, 55, 0.24);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 40;
}

.modal-card {
  width: min(520px, 100%);
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 22px 60px rgba(31, 42, 55, 0.18);
}

.team-member-editor-backdrop {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(5px);
}

.team-member-editor-modal {
  width: min(920px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 8px;
}

.team-member-editor-modal > .panel-head {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
}

.team-member-editor-modal > .panel-head p,
.team-member-editor-modal > .panel-head h3 {
  margin: 0;
}

.team-member-editor-actions {
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.time-picker-modal {
  width: min(560px, 100%);
  padding: 18px 22px 20px;
}

.time-picker-empty-assignment {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 6px;
  background: rgba(34, 211, 238, 0.08);
}

.time-picker-empty-assignment p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.time-entry-editor-backdrop {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(5px);
}

.time-entry-editor-modal {
  width: min(760px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 8px;
}

.time-entry-editor-head {
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
}

.time-entry-editor-head p,
.time-entry-editor-head h3 {
  margin: 0;
}

.time-entry-editor-actions {
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.timer-start-backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.timer-start-modal {
  width: min(560px, 100%);
  padding: 22px;
  border-radius: 8px;
  background: #0e152a;
  border: 1px solid rgba(143, 178, 255, 0.22);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.5);
}

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

.timer-start-head h3 {
  margin: 0;
}

.timer-start-assignment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 178, 255, 0.24);
  border-radius: 6px;
  background: rgba(20, 30, 56, 0.72);
}

.timer-start-assignment-copy,
.timer-start-current-total {
  display: grid;
  gap: 4px;
}

.timer-start-assignment-copy span {
  color: var(--muted);
}

.timer-start-current-total {
  min-width: 118px;
  justify-items: end;
  padding: 8px 10px;
  border: 1px solid rgba(143, 178, 255, 0.2);
  border-radius: 6px;
  background: rgba(143, 178, 255, 0.06);
}

.timer-start-current-total small {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.timer-start-current-total strong {
  font-size: 1.15rem;
}

.timer-start-modal label > span {
  font-weight: 700;
}

.timer-start-modal textarea {
  min-height: 112px;
  resize: vertical;
  background: #080e20;
  border-color: rgba(143, 178, 255, 0.28);
}

.approval-action-backdrop {
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(4px);
}

.approval-action-modal {
  width: min(520px, 100%);
  border-radius: 8px;
}

.approval-action-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.approval-action-head h3,
.approval-action-head p {
  margin: 0;
}

.approval-action-context {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(143, 178, 255, 0.18);
  border-radius: 6px;
  background: rgba(8, 14, 32, 0.72);
}

.approval-action-context span {
  color: var(--muted);
}

.approval-action-modal textarea {
  min-height: 104px;
  resize: vertical;
}

.approval-action-confirm.danger {
  background: #b42318;
  border-color: #b42318;
  color: #fff;
}

.approval-action-confirm.danger:hover {
  background: #d92d20;
  border-color: #d92d20;
}

.timer-start-actions {
  justify-content: flex-start;
}

.time-picker-head {
  display: grid;
  gap: 6px;
  margin-bottom: 6px;
  text-align: center;
}

.time-picker-head h3,
.time-picker-head p {
  margin: 0;
}

.time-picker-inline-note {
  margin: 0;
}

.time-picker-work-fields {
  display: grid;
  gap: 10px;
}

.time-picker-field-label {
  font-weight: 700;
}

.time-picker-work-fields select {
  width: 100%;
}

.time-picker-hours {
  align-self: stretch;
}

.time-picker-hours input {
  text-align: center;
  min-height: 52px;
  font-size: 1.32rem;
  font-weight: 700;
}

.time-picker-actions {
  justify-content: space-between;
  gap: 14px;
  align-items: end;
}

.time-picker-quiet-action {
  color: var(--muted);
  background: transparent;
  padding-inline: 8px;
}

.time-picker-alt-action {
  color: var(--muted);
  background: transparent;
  padding-inline: 6px;
}

.time-picker-secondary-actions,
.time-picker-primary-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.time-picker-secondary-actions {
  justify-content: flex-end;
}

.invoice-detail {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(31, 42, 55, 0.04);
}

.invoice-detail summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
}

.invoice-detail summary::-webkit-details-marker {
  display: none;
}

.invoice-meta {
  margin: 12px 0;
  color: var(--muted);
}

.line-list {
  display: grid;
  gap: 8px;
}

.invoice-actions {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(31, 42, 55, 0.08);
  text-transform: capitalize;
}

.status-pill.paid {
  background: var(--accent-soft);
  color: #065f46;
}

.status-pill.partial {
  background: rgba(249, 115, 22, 0.14);
  color: #9a3412;
}

.status-pill.error {
  background: rgba(239, 68, 68, 0.14);
  color: #991b1b;
}

.status-pill.draft {
  background: var(--info-soft);
  color: #1d4ed8;
}

.status-pill.neutral {
  background: rgba(31, 42, 55, 0.08);
  color: var(--ink);
  text-transform: none;
}

.banner {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
}

.banner.error {
  background: var(--danger-soft);
  color: var(--danger);
}

.banner.success {
  background: rgba(15, 118, 110, 0.1);
  color: var(--accent-deep);
}

.banner.neutral {
  background: rgba(31, 42, 55, 0.08);
  color: var(--ink);
}

.empty-state {
  display: grid;
  gap: 6px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(31, 42, 55, 0.035);
  border: 1px solid rgba(31, 42, 55, 0.07);
}

.empty-state.compact {
  padding: 12px 14px;
}

.empty-state strong,
.empty-state p {
  margin: 0;
}

.empty-state p {
  color: var(--muted);
  line-height: 1.4;
}

.timesheet-empty-state {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.empty-table-cell {
  padding: 0;
}

.note-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 12px;
}

.line-editor {
  display: grid;
  gap: 8px;
}

.line-editor-row {
  display: grid;
  grid-template-columns: 2fr 0.8fr 0.8fr auto;
  gap: 10px;
}

.compact-row {
  padding: 10px 12px;
}

.group-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(31, 42, 55, 0.03);
  border: 1px solid rgba(31, 42, 55, 0.06);
}

.group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.team-group-block + .team-group-block {
  margin-top: 16px;
}

.group-head h4 {
  margin: 0;
}

.group-project-rollup {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.project-team-selector {
  display: grid;
  gap: 10px;
}

.project-team-option {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.project-team-copy {
  display: grid;
  gap: 4px;
}

.project-team-copy strong,
.project-team-copy small {
  margin: 0;
}

.project-task-editor {
  display: grid;
  gap: 10px;
}

.project-task-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(140px, 0.8fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(255, 255, 255, 0.72);
}

.project-task-row input[type="text"],
.project-task-row input[type="number"] {
  min-width: 0;
}

.team-member-detail-shell,
.team-member-detail-panel {
  display: grid;
  gap: 16px;
}

.team-member-detail-shell {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.team-detail-topbar,
.team-member-detail-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.team-detail-topbar.team-detail-topbar-actions {
  justify-content: end;
}

.team-member-detail-header p {
  margin: 0;
  max-width: 760px;
}

.team-member-avatar {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #353535;
  color: white;
  font-size: 1.45rem;
  font-weight: 700;
}

.team-member-meta h3,
.team-member-meta p {
  margin: 0;
}

.team-member-meta {
  display: grid;
  gap: 4px;
}

.team-member-summary-bar,
.team-member-meta-bar {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.team-member-workspace {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1.58fr);
  gap: 30px;
  align-items: start;
}

.team-member-section-rail {
  display: grid;
  gap: 18px;
}

.team-member-summary-grid {
  display: grid;
  gap: 10px;
}

.team-member-summary-stat {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 16px;
  background: rgba(247, 242, 233, 0.48);
}

.team-member-summary-stat span,
.team-member-summary-stat small {
  color: var(--muted);
}

.team-member-summary-stat strong {
  font-size: 1.08rem;
}

.team-member-identity-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: start;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.12);
}

.team-member-section-summary p,
.team-member-section-summary strong {
  margin: 0;
}

.team-member-section-summary {
  display: grid;
  gap: 6px;
}

.team-member-section-summary .group-project-rollup {
  margin-top: 4px;
}

.team-detail-tab-strip {
  display: grid;
  gap: 0;
  grid-template-columns: 1fr;
  border-top: 1px solid rgba(31, 42, 55, 0.12);
  border-bottom: 1px solid rgba(31, 42, 55, 0.12);
  background: transparent;
}

.team-detail-tab {
  width: 100%;
  border: 0;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
  background: transparent;
  color: var(--ink);
  padding: 14px 18px;
  border-radius: 0;
  text-align: left;
  display: block;
  font-weight: 600;
}

.team-detail-tab:last-child {
  border-bottom: 0;
}

.team-detail-tab strong {
  display: block;
  margin: 0;
}

.team-detail-tab small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
}

.team-detail-tab.active {
  background: rgba(15, 118, 110, 0.08);
  box-shadow: inset 4px 0 0 var(--accent);
  color: var(--ink);
}

.team-member-detail-panel {
  min-width: 0;
  background: white;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 20px;
  padding: 18px 20px 20px;
}

.team-member-page-head {
  align-items: start;
}

.team-member-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.team-member-sheet {
  padding: 0;
  border-radius: 0;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: white;
  display: grid;
  gap: 0;
}

.team-member-sheet h4 {
  margin: 0;
  font-size: 1rem;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(31, 42, 55, 0.08);
}

.team-member-sheet .list-stack,
.team-member-sheet > p.soft {
  padding: 14px 16px 16px;
}

.team-member-note {
  padding: 14px 16px;
  display: grid;
  gap: 10px;
}

.team-member-note strong,
.team-member-note p {
  margin: 0;
}

.team-rate-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.team-rate-section-head h4,
.team-rate-section-head p {
  margin: 0;
}

.team-rate-form {
  gap: 12px;
}

.team-rate-form-lockup {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  border-radius: 14px;
  background: rgba(31, 42, 55, 0.03);
}

.team-rate-form-lockup span {
  color: var(--muted);
}

.team-activity-list {
  display: grid;
  gap: 14px;
}

.team-activity-day {
  padding: 16px 18px;
  border-radius: 22px;
  border: 1px solid rgba(31, 42, 55, 0.08);
  background: rgba(255, 255, 255, 0.82);
  display: grid;
  gap: 12px;
}

.team-activity-day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.team-activity-day-body {
  display: grid;
  gap: 10px;
}

.team-entry-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  padding-top: 10px;
  border-top: 1px solid rgba(31, 42, 55, 0.08);
}

.team-entry-line:first-child {
  border-top: 0;
  padding-top: 0;
}

.team-entry-line p {
  margin: 4px 0 0;
}

.team-entry-line-copy {
  min-width: 0;
}

.team-entry-consultant-summary {
  max-width: 720px;
}

.team-entry-line-meta {
  display: grid;
  justify-items: end;
  gap: 6px;
}

.team-breakdown-table td {
  vertical-align: top;
}

.inline-action {
  margin-left: 0;
}

.approval-detail .table-wrap {
  margin: 14px 0;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .panel,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .hero-panel,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .metric-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .auth-status-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .group-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-type-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-detail-section-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-setup-section,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-sheet-section,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-sheet-billing-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-type-choice,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-rate-budget-panel,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-summary-meter-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-detail-panel,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-sheet,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-summary-stat,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-activity-day,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-aging-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .invoice-detail,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .empty-state,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .modal-card {
  background:
    linear-gradient(180deg, rgba(20, 30, 56, 0.86), rgba(11, 17, 34, 0.78));
  border-color: rgba(143, 178, 255, 0.17);
  box-shadow: var(--shadow);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-empty-state {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .panel-head,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-period-meta-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-period-bar,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-client-row td,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .manage-directory-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-entry-line,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-activity-day-head,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-sheet h4,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-identity-block,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab-strip,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] th,
.app-shell[data-design-direction="dark-futuristic-dashboard"] td {
  border-color: rgba(143, 178, 255, 0.1);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .table-wrap,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-portfolio-table-wrap,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-form-table,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-task-table-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-task-composer,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-team-table-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-team-selector,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-team-option,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-task-row {
  background: rgba(9, 14, 30, 0.64);
  border-color: rgba(143, 178, 255, 0.14);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] table,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-grid-foot,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-client-row td,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-portfolio-table thead th,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-overview-table thead th,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-summary-row.is-selected td,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-table tfoot th,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-table tfoot td {
  background: rgba(9, 14, 30, 0.58);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .list-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .line-row,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-entry-card,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-empty-state,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-saved-entries,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .copy-row-preview-item,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .composer-panel-preview,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-period-range-chip,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .compact-stat,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .selected-day-stat {
  background: rgba(143, 178, 255, 0.07);
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-quick-row {
  border-bottom-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timer-start-modal {
  background: #0e152a;
  border-color: rgba(143, 178, 255, 0.22);
  box-shadow: 0 26px 72px rgba(0, 0, 0, 0.5);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-quick-grid-head {
  border-color: rgba(143, 178, 255, 0.12);
  color: rgba(214, 224, 246, 0.72);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-quick-row-copy p,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip span,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip small,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-week-total small {
  color: rgba(210, 220, 242, 0.78);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip.selected {
  background: rgba(34, 211, 238, 0.13);
  border-color: var(--accent-cyan);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.22);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-project-cell .soft,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-metric-note,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-toolbar-summary {
  color: rgba(218, 228, 248, 0.78);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-type-tag {
  color: rgba(224, 243, 255, 0.88);
  background: rgba(34, 211, 238, 0.08);
  border-color: rgba(34, 211, 238, 0.2);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-segmented-option {
  color: rgba(224, 232, 250, 0.82);
  background: rgba(9, 14, 30, 0.72);
  border-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-client-row td {
  background: rgba(21, 32, 58, 0.96);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-portfolio-table tbody tr:not(.project-client-row):hover {
  background: rgba(34, 211, 238, 0.06);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip.selected strong,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip.selected span,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-date-chip.selected small {
  color: #dffbff;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-week-total {
  border-left-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-week-total.time-warning {
  background: rgba(245, 158, 11, 0.08);
  border-left-color: rgba(245, 158, 11, 0.4);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-week-total.time-warning > strong,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-mode-week-warning > span {
  color: #fde68a;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-notes:not([open]) summary,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-saved-entries:not([open]) summary,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-more-actions summary {
  color: rgba(226, 235, 252, 0.86);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-entry-card.compact {
  background: transparent;
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-notes summary,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-saved-entries summary,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .copy-row-preview-item small {
  color: var(--muted);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-notes[open] summary,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-row-saved-entries[open] summary {
  color: var(--accent-cyan);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timer-live {
  background: #0c1a30;
  border-color: rgba(34, 211, 238, 0.34);
  box-shadow: 0 12px 34px rgba(1, 6, 20, 0.3);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timer-live-label,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-period-title-wrap h2,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-period-bar h3 {
  color: var(--accent-cyan);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-activity-icon,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-track-launch-icon {
  background: rgba(34, 211, 238, 0.16);
  color: var(--accent-cyan);
  border: 1px solid rgba(34, 211, 238, 0.2);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-person-avatar,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-avatar {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.86), rgba(34, 211, 238, 0.68));
  border: 1px solid rgba(34, 211, 238, 0.2);
  box-shadow: var(--glow-cyan);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-presence-card {
  background: rgba(9, 14, 30, 0.58);
  border-color: rgba(143, 178, 255, 0.14);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-presence-card .team-timer-presence.running {
  border-bottom-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab {
  background: rgba(143, 178, 255, 0.04);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab:hover,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab:focus-visible {
  background: rgba(34, 211, 238, 0.1);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab.active {
  background: rgba(139, 92, 246, 0.2);
  box-shadow: inset 4px 0 0 var(--accent-cyan), 0 0 22px rgba(139, 92, 246, 0.16);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-member-sheet h4 {
  background: rgba(13, 20, 40, 0.72);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-state-banner,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .banner.neutral {
  background: rgba(143, 178, 255, 0.08);
  border-color: rgba(143, 178, 255, 0.14);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-state-banner.submitted,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill.partial {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.24);
  color: #fde68a;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill.error {
  background: rgba(239, 68, 68, 0.16);
  border-color: rgba(248, 113, 113, 0.26);
  color: #fecaca;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-state-banner.approved,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill.paid,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .banner.success {
  background: rgba(52, 211, 153, 0.14);
  border-color: rgba(52, 211, 153, 0.22);
  color: #bbf7d0;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-state-banner.open,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill.draft {
  background: rgba(59, 130, 246, 0.16);
  border-color: rgba(59, 130, 246, 0.24);
  color: #bfdbfe;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-pill.neutral {
  border: 1px solid rgba(143, 178, 255, 0.16);
  background: rgba(143, 178, 255, 0.1);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-detail-tab-button.active,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-type-card.active,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-type-choice.active,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-segmented-option.active {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(34, 211, 238, 0.26);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-period-bar,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-day-header {
  background: rgba(13, 20, 40, 0.74);
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-entry-source-tag {
  border-color: rgba(143, 178, 255, 0.18);
  background: rgba(143, 178, 255, 0.1);
  color: rgba(219, 228, 255, 0.82);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-entry-source-tag.retro {
  border-color: rgba(245, 158, 11, 0.34);
  background: rgba(245, 158, 11, 0.16);
  color: #fde68a;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-entry-source-tag.timer {
  border-color: rgba(34, 211, 238, 0.3);
  background: rgba(34, 211, 238, 0.12);
  color: #a5f3fc;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-entry-source-tag.manual {
  border-color: rgba(96, 165, 250, 0.28);
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-entry-source-tag.import {
  border-color: rgba(167, 139, 250, 0.28);
  background: rgba(139, 92, 246, 0.14);
  color: #ddd6fe;
}

.time-workspace-day,
.time-workspace-week {
  width: min(100%, 1540px);
  max-width: 1540px;
}

.time-workspace-day > .teammate-presence-bar,
.time-workspace-week > .teammate-presence-bar {
  width: 100%;
  max-width: 1540px;
  border-radius: 8px;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-workspace-day .timesheet-header,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-workspace-week .timesheet-header {
  min-height: 64px;
  padding: 9px 14px;
  border: 1px solid rgba(143, 178, 255, 0.16);
  border-radius: 8px;
  background: #0c182c;
  box-shadow: 0 10px 28px rgba(1, 6, 20, 0.2);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-workspace-day .timesheet-period-bar,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .time-workspace-week .timesheet-period-bar {
  background: transparent;
  border-color: transparent;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .report-period-title-wrap .timesheet-period-bar {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

@media (min-width: 1181px) {
  .time-workspace-day .day-quick-row-inputs,
  .time-workspace-day .day-row-notes:not([open]),
  .time-workspace-day .day-row-timer-cell,
  .time-workspace-day .day-quick-row-actions {
    align-self: center;
  }

  .time-workspace-day .day-row-notes:not([open]) {
    gap: 0;
    height: 44px;
  }

  .time-workspace-day .day-quick-row-inputs input,
  .time-workspace-day .day-row-notes:not([open]) summary,
  .time-workspace-day .day-row-timer-action,
  .time-workspace-day .day-row-edit-action {
    height: 44px;
    min-height: 44px;
  }
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-toggle-group + .timesheet-toggle-group {
  border-left-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .active-toggle {
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.16)),
    rgba(13, 20, 40, 0.9);
  border-color: rgba(34, 211, 238, 0.32);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.14), var(--glow-cyan);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .active-toggle:disabled {
  opacity: 1;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-panel {
  background: rgba(9, 14, 30, 0.66);
  border-color: rgba(143, 178, 255, 0.18);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-panel {
  background: rgba(9, 14, 30, 0.66);
  border-color: rgba(143, 178, 255, 0.18);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-tabs,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-board {
  background: rgba(10, 16, 32, 0.72);
  border-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-tab {
  border-color: rgba(143, 178, 255, 0.14);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-tab.selected {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.24), rgba(34, 211, 238, 0.1));
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-hour-rail {
  background: rgba(7, 12, 26, 0.8);
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-day {
  background: transparent;
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-day.selected {
  background: rgba(34, 211, 238, 0.07);
  border-color: rgba(34, 211, 238, 0.28);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-column-lane {
  background-image: linear-gradient(to bottom, rgba(143, 178, 255, 0.12) 1px, transparent 1px);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-calendar-entry {
  background: rgba(143, 178, 255, 0.07);
  border-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-grid-head {
  background:
    linear-gradient(90deg, rgba(139, 92, 246, 0.1), rgba(34, 211, 238, 0.06)),
    rgba(13, 20, 40, 0.92);
  border-bottom-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-grid-spacer,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-grid-total {
  background: rgba(13, 20, 40, 0.92);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row {
  background: rgba(10, 16, 32, 0.82);
  border-bottom-color: rgba(143, 178, 255, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-summary {
  background: rgba(10, 16, 32, 0.72);
  border-left-color: rgba(34, 211, 238, 0.58);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-summary.empty {
  border-left-color: rgba(143, 178, 255, 0.18);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-grid-foot {
  background: rgba(9, 14, 30, 0.86);
  border-top-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-day-header.selected,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.selected,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-foot-total.selected {
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(34, 211, 238, 0.06)),
    rgba(20, 30, 56, 0.82);
  border-color: rgba(34, 211, 238, 0.2);
  box-shadow: inset 0 -2px 0 rgba(34, 211, 238, 0.46);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell input {
  background: rgba(20, 30, 56, 0.78);
  border-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.selected {
  background:
    linear-gradient(135deg, rgba(139, 92, 246, 0.12), rgba(34, 211, 238, 0.04)),
    rgba(20, 30, 56, 0.76);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell:focus-within {
  border-color: rgba(34, 211, 238, 0.42);
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.2), 0 0 0 2px rgba(34, 211, 238, 0.08);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.filled {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.3), 0 0 16px rgba(34, 211, 238, 0.08);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-actions .sheet-icon-button {
  background: rgba(143, 178, 255, 0.08);
  border-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-actions .secondary-row-action {
  background: transparent;
  border-color: transparent;
  opacity: 0.34;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row:hover .timesheet-row-actions .secondary-row-action,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row:focus-within .timesheet-row-actions .secondary-row-action {
  opacity: 1;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-actions .sheet-icon-button:hover,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-actions .sheet-icon-button:focus-visible {
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.28);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-note-button.has-note {
  background: rgba(34, 211, 238, 0.16);
  border-color: rgba(34, 211, 238, 0.36);
  color: var(--accent-cyan);
  box-shadow: 0 0 18px rgba(34, 211, 238, 0.12);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.saving {
  box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.28), 0 0 16px rgba(34, 211, 238, 0.08);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.save-error {
  border-color: rgba(251, 113, 133, 0.48);
  box-shadow: inset 0 0 0 1px rgba(251, 113, 133, 0.22);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-cell.time-warning {
  border-color: rgba(245, 158, 11, 0.58);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28), 0 0 16px rgba(245, 158, 11, 0.08);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-day-header.time-warning,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-total.time-warning,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-foot-total.time-warning,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-foot-week-total.time-warning {
  color: #fde68a;
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.34);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .cell-time-warning,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .day-time-warning,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-tooltip-indicator.warning {
  background: rgba(245, 158, 11, 0.2);
  color: #fde68a;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .cell-error-indicator,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .status-tooltip-indicator.error {
  background: rgba(251, 113, 133, 0.2);
  color: #fda4af;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-blocking-summary > span:not(.tooltip-content) {
  color: #fda4af;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-warning-summary > span:not(.tooltip-content) {
  color: #fde68a;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-summary-detail-panel {
  border-color: rgba(143, 178, 255, 0.18);
  background: rgba(6, 10, 24, 0.74);
  color: rgba(230, 238, 255, 0.88);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .cell-save-status {
  color: var(--muted);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .cell-save-status.error {
  color: #fda4af;
}


.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-notes-day {
  background: rgba(20, 30, 56, 0.68);
  border-color: rgba(143, 178, 255, 0.16);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-notes-day textarea {
  background: rgba(20, 30, 56, 0.92);
  border-color: rgba(143, 178, 255, 0.18);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .week-notes-empty {
  border-color: rgba(143, 178, 255, 0.2);
}


.app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-foot-week-total small {
  color: rgba(191, 219, 254, 0.72);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .inline-action-menu-panel,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-actions-menu {
  background: rgba(12, 18, 36, 0.98);
  border-color: rgba(143, 178, 255, 0.18);
  box-shadow: var(--shadow);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .inline-action-menu-item,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-actions-menu-item {
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .inline-action-menu-item:hover,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .inline-action-menu-item:focus-visible,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-actions-menu-item:hover,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-actions-menu-item:focus-visible {
  background: rgba(34, 211, 238, 0.1);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-dot.billable,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-summary-meter-fill.billable {
  background: linear-gradient(90deg, var(--accent), var(--accent-cyan));
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-dot.unbillable,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-summary-meter-fill.unbillable {
  background: rgba(143, 178, 255, 0.32);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .team-summary-meter-track {
  background: rgba(9, 14, 30, 0.8);
  border-color: rgba(143, 178, 255, 0.18);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .timer-live-icon {
  color: #67e8f9;
  background: transparent;
  border: 0;
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-toolbar-search input,
.app-shell[data-design-direction="dark-futuristic-dashboard"] .project-filter-field select {
  background: rgba(20, 30, 56, 0.92);
  border-color: rgba(143, 178, 255, 0.18);
  color: var(--ink);
}

.app-shell[data-design-direction="dark-futuristic-dashboard"] .invoice-detail.invoice-ledger-row {
  background: transparent;
  border-color: rgba(143, 178, 255, 0.1);
  border-radius: 0;
  box-shadow: none;
}

.timer-live.timer-ignition,
.day-quick-row.timer-ignition,
.timer-start-modal {
  --timer-ignition-spring: linear(0, 0.03, 0.1077, 0.2165, 0.342, 0.4728, 0.6001, 0.7175, 0.8208, 0.9077, 0.9776, 1.0307, 1.0684, 1.0925, 1.1051, 1.1084, 1.1047, 1.096, 1.084, 1.0703, 1.0561, 1.0424, 1.0297, 1.0187, 1.0094, 1.0019, 0.9963, 0.9923, 0.9898, 0.9885, 0.9882, 0.9887, 0.9897, 0.991, 0.9925, 0.994, 0.9955, 0.9969, 0.9981, 0.9991, 0.9998, 1.0004, 1.0009, 1.0011, 1.0012, 1.0013, 1.0012, 1.0011, 1.001, 1.0008, 1.0006);
}

.timer-start-backdrop {
  animation: timer-modal-scrim 2s linear 1 both;
}

.timer-start-modal {
  transform-origin: center;
  animation:
    timer-modal-opacity 2s linear 1 both,
    timer-modal-translate 2s linear 1 both,
    timer-modal-scale 2s linear 1 both;
}

.timer-live.timer-ignition {
  transform-origin: center;
  animation:
    timer-bar-opacity 2s linear 1 both,
    timer-bar-translate 2s linear 1 both,
    timer-bar-scale 2s linear 1 both;
}

.timer-live.timer-ignition .timer-live-status {
  transform-origin: center;
  animation:
    timer-status-border 2s linear 1 both,
    timer-status-opacity 2s linear 1 both,
    timer-status-background 2s linear 1 both,
    timer-status-scale 2s linear 1 both;
}

.timer-live.timer-ignition #timer-elapsed {
  transform-origin: center;
  animation:
    timer-elapsed-opacity 2s linear 1 both,
    timer-elapsed-scale 2s linear 1 both;
}

.timer-live.timer-ignition .timer-stop-button-top {
  transform-origin: center;
  animation:
    timer-stop-opacity 2s linear 1 both,
    timer-stop-scale 2s linear 1 both;
}

.day-quick-row.is-timer-active.timer-ignition {
  animation: timer-row-background 2s linear 1 both;
}

.day-quick-row.is-timer-active.timer-ignition .day-row-timer-action.is-stop {
  transform-origin: center;
  animation:
    timer-row-stop-opacity 2s linear 1 both,
    timer-row-stop-scale 2s linear 1 both;
}

.day-quick-row.is-timer-active.timer-ignition::before {
  animation:
    timer-rail-height 2s linear 1 both,
    timer-rail-opacity 2s linear 1 both;
}

.timer-live.timer-ignition .timer-live-save-status {
  animation: timer-save-status-opacity 2s linear 1 both;
}

@keyframes timer-modal-scrim {
  0% { animation-timing-function: ease-out; opacity: 0; }
  8%, 100% { opacity: 1; }
}

@keyframes timer-modal-opacity {
  0%, 2% { opacity: 0; }
  2% { animation-timing-function: ease-out; }
  10%, 100% { opacity: 1; }
}

@keyframes timer-modal-translate {
  0%, 2% { translate: 0 8px; }
  2% { animation-timing-function: ease-out; }
  11%, 100% { translate: 0 0; }
}

@keyframes timer-modal-scale {
  0%, 2% { scale: 0.985; }
  2% { animation-timing-function: var(--timer-ignition-spring); }
  11%, 100% { scale: 1; }
}

@keyframes timer-bar-opacity {
  0%, 4% { opacity: 0; }
  4% { animation-timing-function: ease-out; }
  21%, 100% { opacity: 1; }
}

@keyframes timer-bar-translate {
  0%, 4% { translate: 0 -10px; }
  4% { animation-timing-function: ease-out; }
  21%, 100% { translate: 0 0; }
}

@keyframes timer-bar-scale {
  0%, 4% { scale: 0.99; }
  4% { animation-timing-function: var(--timer-ignition-spring); }
  21%, 100% { scale: 1; }
}

@keyframes timer-status-border {
  0%, 11% { border-width: 1px; }
  11% { animation-timing-function: ease-out; }
  21% { animation-timing-function: ease-in-out; border-width: 2px; }
  35%, 100% { border-width: 1px; }
}

@keyframes timer-status-opacity {
  0%, 11% { opacity: 0; }
  11% { animation-timing-function: ease-out; }
  22%, 100% { opacity: 1; }
}

@keyframes timer-status-background {
  0%, 11% { background-color: #0e2d3a; }
  11% { animation-timing-function: ease-out; }
  21% { animation-timing-function: ease-in-out; background-color: #155e75; }
  35%, 100% { background-color: #0e2d3a; }
}

@keyframes timer-status-scale {
  0%, 11% { scale: 0.88; }
  11% { animation-timing-function: var(--timer-ignition-spring); }
  24%, 100% { scale: 1; }
}

@keyframes timer-elapsed-opacity {
  0%, 15% { opacity: 0; }
  15% { animation-timing-function: ease-out; }
  26%, 100% { opacity: 1; }
}

@keyframes timer-elapsed-scale {
  0%, 15% { scale: 0.94; }
  15% { animation-timing-function: var(--timer-ignition-spring); }
  28%, 100% { scale: 1; }
}

@keyframes timer-stop-opacity {
  0%, 18% { opacity: 0; }
  18% { animation-timing-function: ease-out; }
  31%, 100% { opacity: 1; }
}

@keyframes timer-stop-scale {
  0%, 18% { scale: 0.96; }
  18% { animation-timing-function: var(--timer-ignition-spring); }
  31%, 100% { scale: 1; }
}

@keyframes timer-row-background {
  0%, 8% { background-color: #121c35; }
  8% { animation-timing-function: ease-out; }
  26%, 100% { background-color: #0e1b31; }
}

@keyframes timer-row-stop-opacity {
  0%, 14% { opacity: 0; }
  14% { animation-timing-function: ease-out; }
  27%, 100% { opacity: 1; }
}

@keyframes timer-row-stop-scale {
  0%, 14% { scale: 0.96; }
  14% { animation-timing-function: var(--timer-ignition-spring); }
  27%, 100% { scale: 1; }
}

@keyframes timer-rail-height {
  0%, 10% { height: 1px; }
  10% { animation-timing-function: ease-out; }
  25%, 100% { height: 100%; }
}

@keyframes timer-rail-opacity {
  0%, 9% { opacity: 0; }
  9% { animation-timing-function: ease-out; }
  15%, 100% { opacity: 1; }
}

@keyframes timer-save-status-opacity {
  0%, 22% { opacity: 0; }
  22% { animation-timing-function: ease-out; }
  34%, 100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .timer-start-backdrop,
  .timer-start-modal,
  .timer-live.timer-ignition,
  .timer-live.timer-ignition .timer-live-status,
  .timer-live.timer-ignition #timer-elapsed,
  .timer-live.timer-ignition .timer-stop-button-top,
  .timer-live.timer-ignition .timer-live-save-status,
  .day-quick-row.is-timer-active.timer-ignition,
  .day-quick-row.is-timer-active.timer-ignition::before,
  .day-quick-row.is-timer-active.timer-ignition .day-row-timer-action.is-stop {
    animation: none !important;
  }
}

@media (max-width: 1180px) {
  .permission-profile-layout,
  .permission-editor-fields {
    grid-template-columns: 1fr;
  }

  .permission-editor-count {
    width: min(220px, 100%);
  }

  .metric-grid,
  .auth-status-grid,
  .setup-grid,
  .field-grid,
  .two-up,
  .two-up.wide-first {
    grid-template-columns: 1fr;
  }

  .invoice-ledger-head,
  .invoice-detail.invoice-ledger-row > summary {
    grid-template-columns: 116px 124px 104px minmax(180px, 1fr) 126px;
  }

  .day-quick-row {
    grid-template-columns: 1fr;
  }

  .day-quick-grid-head {
    display: none;
  }

  .day-quick-row-copy,
  .day-quick-row-inputs,
  .day-row-notes,
  .day-row-timer-cell,
  .day-row-saved-entries,
  .day-quick-row-actions,
  .day-row-notes[open],
  .day-row-saved-entries[open] {
    grid-column: 1;
    grid-row: auto;
  }

  .day-quick-row-copy {
    order: 1;
  }

  .day-quick-row-inputs {
    order: 2;
  }

  .day-row-notes {
    order: 3;
  }

  .day-row-timer-cell {
    order: 4;
  }

  .day-row-saved-entries {
    order: 5;
  }

  .day-quick-row-actions {
    order: 6;
  }

  .day-quick-row.row-first.day-quick-row-has-entries {
    align-items: start;
    min-height: 0;
    padding-bottom: 10px;
  }

  .day-quick-row-inputs label > span {
    position: static;
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
  }

  .day-quick-row-has-entries .day-row-notes:not([open]) {
    position: static;
  }

  .day-row-saved-entries:not([open]) {
    position: static;
    justify-self: start;
    width: min(100%, 180px);
  }

  .project-activity-item {
    grid-template-columns: auto 1fr;
  }

  .project-activity-value {
    grid-column: 1 / -1;
    justify-items: start;
    text-align: left;
  }

  .day-mode-week-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-mode-week-bar {
    grid-template-columns: 1fr;
  }

  .timesheet-calendar-tabs,
  .timesheet-calendar-board {
    overflow-x: auto;
  }

  .timesheet-calendar-tabs {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .timesheet-calendar-grid {
    grid-template-columns: repeat(7, minmax(118px, 1fr));
  }

  .selected-day-head-actions {
    justify-content: flex-start;
  }

  .day-mode-shell {
    grid-template-columns: 1fr;
  }

  .selected-day-review-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-stat-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .team-summary-strip {
    grid-template-columns: 1fr;
  }

  .team-shell-toolbar,
  .team-period-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-toolbar-row {
    align-items: start;
    flex-direction: column;
  }

  .project-toolbar-search,
  .project-toolbar-search input {
    width: 100%;
  }

  .project-sheet-basics-grid,
  .project-sheet-billing-grid,
  .project-sheet-invoice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .project-detail-workspace,
  .project-detail-tab-strip {
    grid-template-columns: 1fr;
  }

  .team-member-sheet-grid {
    grid-template-columns: 1fr;
  }

  .team-member-facts,
  .team-detail-tab-strip,
  .team-member-workspace {
    grid-template-columns: 1fr;
  }

  .team-member-detail-panel {
    padding: 16px;
  }

  .shell-promo {
    grid-template-columns: 1fr;
  }

  .shell-promo-close {
    justify-self: end;
  }

  .app-topnav {
    align-items: flex-start;
  }

  .app-main-nav,
  .app-account-bar {
    width: 100%;
  }

  .day-quick-row-actions {
    justify-items: start;
  }

  .day-quick-row-button-strip {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }

  .app-topnav {
    position: relative;
    top: auto;
    min-height: 0;
    height: auto;
    flex-direction: row;
    align-items: flex-start;
    padding: 16px 18px;
    gap: 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(143, 178, 255, 0.16);
    overflow: visible;
  }

  .app-brand-lockup {
    min-width: 220px;
    width: 220px;
  }

  .app-main-nav {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }

  .app-main-link {
    width: auto;
  }

  .app-main-link.active {
    box-shadow: inset 0 -2px 0 var(--accent-cyan), 0 0 22px rgba(139, 92, 246, 0.2);
  }

  .app-account-bar {
    margin-top: 0;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
  }

  .app-user-chip {
    width: auto;
  }

  .app-main-shell {
    min-height: calc(100vh - 96px);
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  .team-member-editor-backdrop {
    place-items: end center;
    padding: 8px;
  }

  .team-member-editor-modal {
    max-height: calc(100vh - 16px);
    padding: 16px;
  }

  .team-member-editor-actions,
  .team-member-editor-actions button {
    width: 100%;
  }

  .cell-retry-button,
  .autosave-retry-button,
  .week-draft-discard-button {
    min-height: 44px;
    padding: 8px 12px;
  }

  .permission-profile-toolbar,
  .permission-editor-head,
  .permission-editor-actions,
  .permission-boundary-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .permission-category-grid {
    grid-template-columns: 1fr;
  }

  .permission-assignment-row {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px 0;
  }

  .permission-assignment-row label,
  .permission-assignment-row select,
  .permission-assignment-row button {
    width: 100%;
  }

  .permission-profile-row {
    grid-template-columns: 1fr;
  }

  .permission-profile-meta {
    grid-template-columns: auto auto 1fr;
    justify-items: start;
    text-align: left;
  }

  .permission-profile-meta small {
    grid-column: auto;
  }

  .role-access-preview {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .role-access-preview span + strong {
    margin-top: 7px;
  }

  .report-access-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }

  .main-shell,
  .app-topnav {
    padding: 18px;
  }

  .app-secondary-nav {
    margin: -18px -18px 0;
    padding: 0 18px;
    gap: 14px;
  }

  .app-topnav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand account"
      "nav nav";
    align-items: center;
    padding: 10px 12px;
    gap: 8px 10px;
  }

  .app-brand-lockup {
    grid-area: brand;
    width: min(220px, 100%);
    min-width: 0;
  }

  .app-brand-logo {
    max-height: 38px;
  }

  .app-main-nav {
    grid-area: nav;
    width: 100%;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
    padding-bottom: 2px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
  }

  .app-account-bar {
    grid-area: account;
    width: auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 4px;
  }

  .app-main-link {
    flex: 0 0 auto;
    width: auto;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .app-account-bar .ghost,
  .app-user-chip {
    width: auto;
    min-height: 44px;
  }

  .app-account-bar .icon-button {
    min-width: 44px;
    padding: 8px;
  }

  .app-account-bar .icon-button > span {
    display: none;
  }

  .app-user-chip {
    padding: 4px 6px;
  }

  .app-user-chip > span:last-child {
    display: none;
  }

  .app-avatar {
    width: 30px;
    height: 30px;
  }

  .app-account-bar .ghost:not(.icon-button) {
    padding: 8px 10px;
  }

  .app-account-bar,
  .app-main-nav,
  .section-tabs {
    max-width: 100%;
  }

  .expense-workspace-toolbar,
  .billing-workspace-toolbar,
  .invoice-filter-bar,
  .expense-composer-actions,
  .expense-week-head {
    align-items: stretch;
    flex-direction: column;
  }

  .expense-amount-grid {
    grid-template-columns: 1fr;
  }

  .expense-toolbar-summary,
  .billing-toolbar-summary {
    text-align: left;
  }

  .expense-ledger-table,
  .expense-ledger-table tbody,
  .expense-ledger-table tr,
  .expense-ledger-table td {
    display: block;
    width: 100%;
  }

  .expense-ledger-table thead {
    display: none;
  }

  .expense-ledger-table tr {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 8px 12px;
    padding: 14px 16px;
    border-top: 1px solid rgba(143, 178, 255, 0.1);
  }

  .expense-ledger-table td,
  .expense-ledger-table td:first-child,
  .expense-ledger-table td:nth-child(3),
  .expense-ledger-table td:nth-child(4),
  .expense-ledger-table td:nth-child(5),
  .expense-ledger-table td:last-child {
    width: auto;
    padding: 0;
  }

  .expense-ledger-date {
    grid-column: 1;
    grid-row: 1 / span 2;
  }

  .expense-ledger-detail {
    grid-column: 2;
  }

  .expense-ledger-amount {
    grid-column: 3;
    grid-row: 1;
  }

  .expense-ledger-status,
  .expense-ledger-receipt {
    grid-column: 2;
  }

  .expense-ledger-actions {
    grid-column: 3;
  }

  .expense-ledger-action-row {
    justify-content: flex-end;
  }

  .expense-action-menu .inline-action-menu-panel {
    top: auto;
    bottom: calc(100% + 6px);
  }

  .invoice-filter-bar,
  .invoice-search-wrap,
  .invoice-search-field {
    width: 100%;
  }

  .invoice-ledger-head {
    display: none;
  }

  .invoice-detail.invoice-ledger-row > summary {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 7px 12px;
    padding: 14px 16px;
  }

  .invoice-ledger-status {
    grid-column: 1;
    grid-row: 1;
  }

  .invoice-ledger-balance {
    grid-column: 2;
    grid-row: 1;
  }

  .invoice-ledger-client {
    grid-column: 1;
    grid-row: 2;
  }

  .invoice-ledger-menu-trigger {
    grid-column: 2;
    grid-row: 2;
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    opacity: 1;
  }

  .invoice-ledger-date {
    grid-column: 1;
    grid-row: 3;
  }

  .invoice-ledger-id {
    grid-column: 2;
    grid-row: 3;
    text-align: right;
  }

  .invoice-ledger-due {
    grid-column: 1 / -1;
    grid-row: 4;
  }

  .invoice-ledger-detail {
    padding: 0 16px 16px;
  }

  .team-shell-toolbar,
  .team-shell-toolbar-left,
  .team-overview-toolbar,
  .team-period-side,
  .team-person-cell,
  .team-summary-meter-row,
  .team-summary-meter-scale {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-shell-toolbar-left,
  .team-period-side {
    width: 100%;
  }

  .team-filter-form,
  .team-filter-form select {
    width: 100%;
  }

  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .shell-promo {
    padding: 18px;
  }

  .compact-stat-bar {
    grid-template-columns: 1fr;
  }

  .report-period-actions,
  .report-period-meta-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-entity-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .report-entity-tabs {
    width: 100%;
    gap: 20px;
  }

  .report-entity-bar > .ghost {
    align-self: flex-start;
  }

  .report-period-date-range,
  .report-period-controls {
    grid-template-columns: 1fr;
  }

  .report-period-range-chip {
    justify-items: start;
    text-align: left;
    width: 100%;
  }

  .report-aging-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-detail-summary {
    justify-items: start;
    text-align: left;
  }

  .project-budget-head {
    align-items: start;
    flex-direction: column;
  }

  .project-type-grid {
    grid-template-columns: 1fr;
  }

  .project-type-choice-grid,
  .project-sheet-basics-grid,
  .project-sheet-billing-grid,
  .project-sheet-invoice-grid {
    grid-template-columns: 1fr;
  }

  .project-segmented {
    grid-auto-flow: row;
  }

  .project-team-option {
    align-items: start;
    flex-direction: column;
  }

  .project-task-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-form-table-head {
    display: none;
  }

  .project-task-table-row,
  .project-team-table-row,
  .project-task-composer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-activity-item {
    grid-template-columns: 1fr;
  }

  .project-activity-value {
    grid-column: auto;
  }

  .project-section-head {
    align-items: start;
    flex-direction: column;
  }

  .manage-directory-row {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .manage-client-row {
    grid-template-columns: 1fr;
  }

  .manage-task-row {
    grid-template-columns: 1fr;
  }

  .team-entry-line,
  .team-activity-day-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .team-entry-line-meta {
    justify-items: start;
  }

  .manage-client-leading {
    justify-content: flex-start;
  }

  .task-directory-group-head {
    align-items: start;
    flex-direction: column;
  }

  .manage-directory-row .button-row,
  .manage-directory-row .align-right {
    justify-content: flex-start;
    text-align: left;
  }

  .project-filter-bar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .project-filter-field {
    width: 100%;
  }

  .team-member-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .timesheet-header,
  .timesheet-period-bar {
    align-items: start;
    flex-direction: column;
  }

  .timesheet-toggle-bar {
    justify-content: flex-start;
  }

  .timesheet-grid-head,
  .timesheet-row {
    grid-template-columns: minmax(0, 1fr) minmax(108px, 0.72fr) 78px;
    min-width: 0;
  }

  .timesheet-grid-foot {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .timesheet-grid-head .timesheet-day-header:not(.selected),
  .timesheet-row .timesheet-cell:not(.selected),
  .timesheet-grid-foot .timesheet-foot-total:not(.selected) {
    display: none;
  }

  .timesheet-foot-actions {
    grid-column: 1 / -1;
    align-items: flex-start;
  }

  .timesheet-foot-status-stack {
    flex-basis: 100%;
  }

  .timesheet-row-summary {
    flex-direction: column;
  }

  .timesheet-row-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .timesheet-row-actions .secondary-row-action,
  .app-shell[data-design-direction="dark-futuristic-dashboard"] .timesheet-row-actions .secondary-row-action {
    opacity: 1;
  }

  .timesheet-row-actions .sheet-icon-button,
  .day-quick-row-button-strip .sheet-icon-button {
    width: 44px;
    min-width: 44px;
    height: 44px;
  }

  .timesheet-toggle-group + .timesheet-toggle-group {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
  }

  .week-notes-day {
    grid-template-columns: 1fr;
  }

  .week-note-consultant-summary {
    grid-column: 1;
    margin-top: 0;
  }

  .day-row-action-button {
    min-width: 112px;
    min-height: 44px;
  }

  .day-row-secondary-action {
    min-height: 44px;
    padding-inline: 12px;
  }

  .day-quick-row-has-entries .day-row-notes:not([open]) summary,
  .day-row-saved-entries:not([open]) summary,
  .day-row-more-actions summary {
    min-height: 44px;
  }

  .timesheet-grid-total,
  .timesheet-row-total,
  .timesheet-foot-week-total,
  .timesheet-foot-total {
    padding-inline: 8px;
  }

  .timesheet-cell {
    margin: 8px 4px;
    min-height: 58px;
  }

  .action-cell,
  .line-editor-row {
    grid-template-columns: 1fr;
  }

  .day-mode-week-strip {
    grid-template-columns: repeat(7, minmax(46px, 1fr));
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .day-mode-date-chip {
    min-height: 58px;
    padding: 6px 4px;
    text-align: center;
  }

  .timer-live {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .timer-live-status {
    justify-self: start;
  }

  .timer-live-time {
    justify-items: start;
  }

  .timer-stop-button-top {
    width: 100%;
  }

  .timer-stop-button-top,
  .day-row-timer-action,
  .day-row-edit-action,
  .timer-start-actions button,
  .timer-start-head .square {
    min-height: 44px;
  }

  .time-picker-actions {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .time-picker-secondary-actions,
  .time-picker-primary-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .time-picker-secondary-actions > *,
  .time-picker-primary-actions > *,
  .invoice-actions > *,
  .topbar-actions > *,
  .report-period-actions > * {
    min-height: 44px;
  }

  .week-state-banner,
  .hero-panel,
  .list-row,
  .line-row,
  .day-entry-card,
  .invoice-actions {
    flex-direction: column;
    align-items: start;
  }

  .week-state-meta {
    justify-items: start;
    text-align: left;
  }

  .day-entry-title-row {
    flex-direction: column;
  }

  .day-entry-side {
    justify-items: start;
    text-align: left;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  .app-secondary-nav {
    width: calc(100vw - 36px);
    min-width: 0;
    max-width: calc(100vw - 36px);
    margin-inline: 0;
    padding-inline: 0;
  }

  .main-shell,
  .main-shell > *,
  .report-period-shell,
  .report-period-form,
  .report-period-head,
  .report-period-meta-row,
  .metric-grid,
  .report-entity-bar,
  .report-table-panel {
    min-width: 0;
    max-width: 100%;
  }

  .report-period-head {
    align-items: stretch;
    flex-direction: column;
  }

  .report-period-actions {
    width: 100%;
    align-items: stretch;
  }

  .report-period-actions > * {
    width: 100%;
  }

  .expense-workspace-toolbar {
    align-items: stretch;
  }

  .expense-filter-form {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
    margin-left: 0;
  }

  .expense-filter-form label {
    min-width: 0;
  }

  .expense-week-list {
    max-height: none;
    overflow-y: visible;
  }

  .project-editor-route-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .project-editor-route-head .ghost {
    width: 100%;
  }

  .project-portfolio-table-wrap {
    overflow: visible;
  }

  .project-portfolio-table,
  .project-portfolio-table tbody,
  .project-portfolio-table tr,
  .project-portfolio-table td {
    display: block;
    width: 100%;
  }

  .project-portfolio-table {
    min-width: 0;
  }

  .project-portfolio-table thead {
    display: none;
  }

  .project-portfolio-table tbody {
    display: grid;
  }

  .project-portfolio-table tr:not(.project-client-row) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 16px;
    border-bottom: 1px solid rgba(143, 178, 255, 0.12);
  }

  .project-client-row td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
  }

  .project-project-cell,
  .project-table-actions {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .project-metric-cell,
  .project-table-actions {
    min-width: 0;
  }

  .project-metric-cell::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .project-table-action-row {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .invoice-project-options,
  .invoice-choice-grid,
  .invoice-date-grid {
    grid-template-columns: 1fr;
  }

  .invoice-form-section {
    padding: 13px;
  }

  .invoice-project-picker-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .invoice-project-picker-head .button-row,
  .invoice-preview-card .button-row,
  .invoice-preview-card .button-row > button {
    width: 100%;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    min-width: 320px;
    min-height: 100dvh;
    background: #05070b;
  }

  .app-shell {
    display: block;
    min-height: 100dvh;
    background: #05070b;
  }

  .app-topnav {
    display: none;
  }

  .mobile-shell-header {
    position: sticky;
    top: 0;
    z-index: 60;
    min-height: 76px;
    padding: 18px 20px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: rgba(5, 7, 11, 0.97);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(16px);
  }

  .mobile-shell-header h1 {
    margin: 0;
    color: #f8fafc;
    font-family: "Aptos", "Segoe UI", sans-serif;
    font-size: 1.82rem;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: 0;
  }

  .mobile-shell-menu {
    position: relative;
  }

  .mobile-shell-menu > summary {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #f8fafc;
    background: transparent;
    list-style: none;
    cursor: pointer;
  }

  .mobile-shell-menu > summary::-webkit-details-marker {
    display: none;
  }

  .mobile-shell-menu[open] > summary {
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-shell-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(270px, calc(100vw - 32px));
    padding: 8px;
    display: grid;
    gap: 4px;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 8px;
    background: #11151d;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.48);
  }

  .mobile-shell-menu-panel > button,
  .mobile-shell-menu-group > button {
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #d7dce5;
    background: transparent;
    text-align: left;
  }

  .mobile-shell-menu-panel > button:hover,
  .mobile-shell-menu-panel > button:focus-visible,
  .mobile-shell-menu-panel > button.active,
  .mobile-shell-menu-group > button:hover,
  .mobile-shell-menu-group > button:focus-visible,
  .mobile-shell-menu-group > button.active {
    color: #ffffff;
    background: rgba(34, 211, 238, 0.12);
  }

  .mobile-shell-menu-group {
    padding: 4px 0 8px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-shell-menu-group > span {
    grid-column: 1 / -1;
    padding: 2px 8px 4px;
    color: #8f98a8;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  .mobile-shell-menu-group > button {
    justify-content: center;
    padding-inline: 8px;
  }

  .app-main-shell {
    min-height: calc(100dvh - 76px);
  }

  .main-shell,
  .app-main-shell {
    padding: 16px 20px calc(96px + env(safe-area-inset-bottom));
    gap: 16px;
  }

  .app-shell.mobile-time-action-visible .app-main-shell {
    padding-bottom: calc(164px + env(safe-area-inset-bottom));
  }

  .app-secondary-nav {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 4px;
    gap: 4px;
    border-radius: 8px;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .app-secondary-link {
    flex: 0 0 auto;
    border-radius: 6px;
    box-shadow: none;
  }

  .topbar {
    padding: 0;
  }

  .topbar > div:first-child {
    display: none;
  }

  .topbar-actions,
  .topbar-actions > * {
    width: 100%;
  }

  .time-workspace-day {
    gap: 0;
  }

  .time-workspace-day > .timesheet-header {
    display: none;
  }

  .mobile-time-overview {
    display: block;
    margin: 0 -20px;
    background: #05070b;
  }

  .mobile-time-period-row {
    min-height: 66px;
    padding: 4px 20px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .mobile-time-date-control {
    min-width: 0;
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.025);
  }

  .mobile-time-date-control strong {
    min-width: 0;
    overflow: hidden;
    color: #f8fafc;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-time-period-actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .mobile-time-period-actions button {
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    color: #f8fafc;
    background: transparent;
  }

  .mobile-time-period-actions button:hover,
  .mobile-time-period-actions button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
  }

  .mobile-time-next-day .icons8-icon {
    transform: rotate(180deg);
  }

  .mobile-time-week-strip {
    padding: 4px 16px 14px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-time-day {
    min-width: 0;
    min-height: 80px;
    padding: 2px 0;
    border: 0;
    border-radius: 8px;
    display: grid;
    grid-template-rows: 18px 38px 18px;
    justify-items: center;
    align-items: center;
    color: #f8fafc;
    background: transparent;
  }

  .mobile-time-day:hover,
  .mobile-time-day:focus-visible {
    background: rgba(255, 255, 255, 0.05);
  }

  .mobile-time-day-name {
    color: #9aa2af;
    font-size: 0.65rem;
    font-weight: 650;
  }

  .mobile-time-day strong {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #f8fafc;
    font-size: 1.18rem;
    line-height: 1;
  }

  .mobile-time-day small {
    color: #a4acb8;
    font-size: 0.72rem;
  }

  .mobile-time-day.selected strong {
    color: #03141b;
    background: #22d3ee;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.14);
  }

  .mobile-time-day.selected small {
    color: #67e8f9;
  }

  .mobile-time-week-summary {
    min-height: 62px;
    padding: 17px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    font-size: 1rem;
  }

  .mobile-time-week-summary > span:first-child {
    margin-right: auto;
  }

  .mobile-time-week-summary > span:first-child strong {
    font-weight: 650;
  }

  .mobile-time-week-summary.time-warning > span:first-child {
    color: #fbbf24;
  }

  .mobile-time-week-summary .week-summary-disclosure {
    position: static;
  }

  .mobile-time-week-summary .week-summary-detail-panel {
    position: fixed;
    left: 16px;
    right: 16px;
    top: 162px;
    width: auto;
    max-width: none;
    z-index: 80;
  }

  .day-mode-panel {
    width: calc(100% + 40px);
    margin: 0 -20px;
    padding: 0 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  .day-mode-content,
  .day-mode-shell {
    gap: 0;
  }

  .day-mode-week-bar {
    display: none;
  }

  .day-mode-section {
    gap: 10px;
  }

  .day-mode-empty-no-time {
    display: none;
  }

  .day-quick-grid {
    gap: 10px;
  }

  .day-quick-row {
    padding: 14px;
    gap: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #0c1220;
    box-shadow: none;
  }

  .day-quick-row-copy strong {
    font-size: 0.98rem;
  }

  .day-quick-row-copy p,
  .day-quick-row-copy .soft {
    font-size: 0.82rem;
    line-height: 1.4;
  }

  .day-quick-row-inputs input,
  .day-row-notes summary,
  .day-row-timer-action,
  .day-row-edit-action {
    min-height: 48px;
  }

  .mobile-time-primary-action {
    position: fixed;
    left: 20px;
    right: 20px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    z-index: 51;
    display: block;
    padding-bottom: 10px;
    pointer-events: none;
  }

  .mobile-time-primary-action button {
    width: 100%;
    min-height: 58px;
    border: 1px solid rgba(103, 232, 249, 0.54);
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #02141b;
    background: #22d3ee;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 12px 34px rgba(6, 182, 212, 0.28);
    pointer-events: auto;
  }

  .mobile-time-primary-action button:hover,
  .mobile-time-primary-action button:focus-visible {
    background: #67e8f9;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    min-height: calc(76px + env(safe-area-inset-bottom));
    padding: 7px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-count), minmax(0, 1fr));
    background: #15171b;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-bottom-nav button {
    min-width: 0;
    min-height: 60px;
    padding: 5px 2px;
    border: 0;
    border-radius: 8px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 3px;
    color: #a5adb9;
    background: transparent;
  }

  .mobile-bottom-nav button span {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.7rem;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav button.active {
    color: #22d3ee;
  }

  .mobile-bottom-nav button:hover,
  .mobile-bottom-nav button:focus-visible {
    background: rgba(255, 255, 255, 0.06);
  }
}

@media (max-width: 380px) {
  .mobile-shell-header,
  .mobile-time-period-row,
  .mobile-time-week-summary {
    padding-inline: 16px;
  }

  .main-shell,
  .app-main-shell {
    padding-inline: 16px;
  }

  .mobile-time-overview {
    margin-inline: -16px;
  }

  .day-mode-panel {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 16px;
  }

  .mobile-time-date-control strong {
    font-size: 0.92rem;
  }

  .mobile-time-primary-action {
    left: 16px;
    right: 16px;
  }
}

/* Provider-neutral invoice workspace */
.invoice-area-header,
.invoice-source-shell,
.app-invoice-editor-shell,
.invoice-overview-metrics,
.app-invoice-ledger,
.invoice-empty-workspace,
.invoice-configure-layout {
  width: min(1180px, 100%);
  margin-inline: auto;
}

.invoice-area-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--panel-border);
}

.invoice-area-title-row,
.invoice-area-actions,
.invoice-workspace-tabs,
.invoice-filter-bar,
.invoice-ledger-selects,
.invoice-source-actions,
.invoice-dialog-actions,
.invoice-table-actions,
.invoice-editor-actions,
.invoice-chart-head,
.invoice-chart-legend {
  display: flex;
  align-items: center;
}

.invoice-area-title-row {
  justify-content: space-between;
  gap: 20px;
  padding: 4px 0 16px;
}

.invoice-area-title-row h2,
.invoice-source-shell > h2,
.app-invoice-editor-title h2,
.invoice-year-chart h3,
.invoice-source-section h3,
.invoice-configure-content h2 {
  margin: 0;
  letter-spacing: 0;
}

.invoice-area-actions {
  justify-content: flex-end;
  gap: 10px;
}

.invoice-area-actions .primary,
.invoice-table-actions .secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.invoice-header-search {
  width: min(290px, 28vw);
}

.invoice-header-search label,
.invoice-header-search input {
  width: 100%;
}

.invoice-actions-menu-wrap {
  position: relative;
}

.invoice-actions-popover {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  width: 220px;
  padding: 6px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: #111a31;
  box-shadow: var(--shadow);
}

.invoice-actions-popover button {
  min-height: 38px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.invoice-actions-popover button:hover,
.invoice-actions-popover button:focus-visible {
  background: rgba(34, 211, 238, 0.09);
}

.invoice-workspace-tabs {
  gap: 28px;
  min-height: 46px;
}

.invoice-workspace-tab {
  align-self: stretch;
  padding: 0 2px;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.invoice-workspace-tab.active {
  border-bottom-color: var(--accent-cyan);
  color: var(--ink);
}

.invoice-new-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid rgba(143, 178, 255, 0.2);
  background: #111a31 !important;
}

[data-invoice-new-dialog] {
  background: rgba(2, 6, 23, 0.76);
  backdrop-filter: blur(5px);
}

.invoice-new-dialog .modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.invoice-new-dialog .modal-head h2 {
  margin: 0;
}

.invoice-new-form,
.invoice-kind-fieldset,
.invoice-choice-card,
.invoice-frequency-card,
.invoice-source-form,
.invoice-source-section,
.invoice-radio-option,
.invoice-recurring-settings,
.invoice-configure-content,
.invoice-notes-field,
.app-invoice-editor-form {
  display: grid;
}

.invoice-new-form {
  gap: 14px;
}

.invoice-new-form > label > span,
.invoice-source-form label > span:first-child,
.app-invoice-meta-grid label > span:first-child,
.invoice-notes-field > span,
.invoice-configure-content label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.app-text-action {
  width: max-content;
  padding: 2px 0;
  border: 0;
  color: #67e8f9;
  background: transparent;
  font-weight: 700;
}

.app-text-action .icons8-icon {
  vertical-align: -2px;
}

.invoice-kind-fieldset {
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.invoice-kind-fieldset legend {
  margin-bottom: 7px;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 750;
}

.invoice-choice-card,
.invoice-frequency-card {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  min-height: 64px;
  padding: 12px 14px;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
  background: rgba(143, 178, 255, 0.04);
  cursor: pointer;
}

.invoice-choice-card.selected,
.invoice-frequency-card.selected {
  border-color: rgba(34, 211, 238, 0.7);
  background: rgba(34, 211, 238, 0.08);
}

.invoice-choice-card strong,
.invoice-choice-card small,
.invoice-frequency-card strong,
.invoice-frequency-card small,
.invoice-radio-option strong,
.invoice-radio-option small {
  display: block;
}

.invoice-choice-card small,
.invoice-frequency-card small,
.invoice-radio-option small {
  margin-top: 3px;
  line-height: 1.35;
}

.invoice-dialog-actions,
.invoice-source-actions,
.invoice-editor-actions {
  gap: 9px;
}

.invoice-dialog-actions {
  justify-content: flex-end;
  padding-top: 4px;
}

.invoice-source-shell,
.app-invoice-editor-shell {
  padding: 4px 0 40px;
}

.app-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  margin-bottom: 12px;
  padding: 4px 0;
  border: 0;
  color: #67e8f9;
  background: transparent;
  font-weight: 750;
}

.invoice-source-shell > h2,
.app-invoice-editor-title {
  padding-bottom: 18px;
  border-bottom: 1px solid var(--panel-border);
}

.app-invoice-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
}

.app-invoice-editor-title h2 {
  font-size: clamp(1.55rem, 2.1vw, 2rem);
  line-height: 1.15;
}

.invoice-source-form {
  gap: 0;
}

.invoice-source-section {
  gap: 10px;
  padding: 24px 0;
  border-bottom: 1px solid var(--panel-border);
}

.invoice-source-section h3 {
  margin-bottom: 4px;
  font-size: 1.08rem;
}

.invoice-frequency-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 680px;
}

.invoice-recurring-settings {
  gap: 13px;
}

.invoice-recurring-grid,
.invoice-date-range {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 280px));
  gap: 12px;
}

.invoice-custom-frequency,
.invoice-duration-count,
.invoice-inline-radio-control {
  display: flex;
  align-items: center;
  gap: 9px;
}

.invoice-custom-frequency input,
.invoice-duration-count input {
  width: 90px;
}

.invoice-duration-count {
  flex-wrap: wrap;
  padding-left: 28px;
}

.invoice-duration-count small {
  flex-basis: 100%;
}

.invoice-project-source-table-wrap,
.invoice-editor-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--panel-border);
  border-radius: 6px;
}

.invoice-project-source-table,
.invoice-editor-table {
  width: 100%;
  border-collapse: collapse;
}

.invoice-project-source-table {
  min-width: 760px;
}

.invoice-project-source-table th,
.invoice-project-source-table td,
.invoice-editor-table th,
.invoice-editor-table td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
  vertical-align: middle;
  text-align: left;
}

.invoice-project-source-table th,
.invoice-editor-table th {
  color: var(--muted);
  background: rgba(8, 14, 32, 0.52);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
}

.invoice-project-source-table th:not(:first-child),
.invoice-project-source-table td:not(:first-child) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.invoice-project-source-name {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
}

.invoice-project-source-name strong,
.invoice-project-source-name small {
  display: block;
}

.invoice-source-label {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-source-helper {
  max-width: 680px;
  margin: 0 0 2px 28px;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.invoice-nonbillable-rate {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.invoice-editor-table input[readonly][data-invoice-line-field="unitPrice"] {
  color: var(--muted);
  background: rgba(8, 14, 32, 0.46);
  cursor: not-allowed;
}

.invoice-radio-option {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  cursor: pointer;
}

.invoice-radio-option.disabled {
  opacity: 0.58;
  cursor: not-allowed;
}

.invoice-inline-radio-control {
  flex-wrap: wrap;
}

.invoice-inline-radio-control > .invoice-radio-option {
  flex: 0 1 auto;
}

.invoice-inline-radio-control > select {
  width: min(250px, 100%);
}

.invoice-display-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 9px 22px;
  max-width: 760px;
}

.invoice-attachment-choice {
  margin-top: 8px;
}

.invoice-approval-safety {
  padding: 16px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.06);
}

.invoice-source-actions {
  justify-content: flex-start;
  padding-top: 20px;
}

.invoice-overview-metrics {
  display: grid;
  grid-template-columns: minmax(260px, 0.42fr) minmax(420px, 1fr);
  min-height: 180px;
  margin-bottom: 18px;
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.invoice-total-summary,
.invoice-year-chart {
  padding: 20px;
}

.invoice-total-summary {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: center;
  gap: 8px 20px;
  border-right: 1px solid var(--panel-border);
}

.invoice-total-summary > span,
.invoice-total-summary > small {
  color: var(--muted);
}

.invoice-total-summary > strong {
  text-align: right;
  font-size: 1.18rem;
  font-variant-numeric: tabular-nums;
}

.invoice-total-summary > small {
  grid-column: 1 / -1;
}

.invoice-year-chart {
  display: grid;
  gap: 10px;
}

.invoice-chart-head {
  justify-content: space-between;
}

.invoice-chart-head button[data-direction="1"] .icons8-icon {
  transform: rotate(180deg);
}

.invoice-chart-bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(8px, 1fr));
  align-items: end;
  gap: 6px;
  min-height: 64px;
  padding: 4px 0;
  border-bottom: 1px solid rgba(143, 178, 255, 0.18);
}

.invoice-chart-month {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 2px;
  height: 62px;
}

.invoice-chart-open,
.invoice-chart-paid {
  width: 5px;
  min-height: 2px;
  border-radius: 2px 2px 0 0;
}

.invoice-chart-open,
.invoice-chart-legend i.open {
  background: #f59e0b;
}

.invoice-chart-paid,
.invoice-chart-legend i.paid {
  background: #34d399;
}

.invoice-chart-legend {
  justify-content: flex-end;
  gap: 14px;
  color: var(--muted);
  font-size: 0.8rem;
}

.invoice-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.invoice-chart-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.app-invoice-ledger {
  margin-bottom: 24px;
}

.invoice-recovery-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border-color: rgba(34, 211, 238, 0.38);
}

.invoice-recovery-banner > div:first-child {
  display: grid;
  gap: 4px;
}

.invoice-recovery-banner span {
  color: var(--muted);
}

.invoice-recovery-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.app-invoice-ledger .invoice-ledger-head,
.app-invoice-ledger .invoice-detail.invoice-ledger-row > summary {
  grid-template-columns: 118px 138px 124px 105px minmax(220px, 1fr) 145px 40px;
}

.invoice-ledger-due {
  color: var(--muted);
}

.invoice-filter-bar {
  justify-content: space-between;
}

.invoice-status-tabs,
.invoice-ledger-selects {
  gap: 8px;
}

.invoice-status-tabs button span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  min-height: 22px;
  margin-left: 4px;
  padding: 0 5px;
  border-radius: 11px;
  background: rgba(143, 178, 255, 0.13);
}

.invoice-ledger-selects select {
  min-width: 150px;
}

.invoice-ledger-total {
  display: flex;
  justify-content: flex-end;
  gap: 28px;
  padding: 14px 20px;
  border-top: 1px solid var(--panel-border);
  font-variant-numeric: tabular-nums;
}

.invoice-empty-workspace {
  min-height: 300px;
  padding: 42px 20px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  text-align: center;
}

.invoice-configure-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
}

.invoice-configure-layout > nav {
  display: grid;
  align-content: start;
  gap: 4px;
}

.invoice-configure-layout > nav button {
  min-height: 40px;
  padding: 8px 10px;
  border: 0;
  border-radius: 4px;
  color: var(--muted);
  background: transparent;
  text-align: left;
}

.invoice-configure-layout > nav button.active {
  color: var(--ink);
  background: rgba(34, 211, 238, 0.1);
}

.invoice-configure-content {
  gap: 14px;
  max-width: 720px;
}

.invoice-configure-content > .soft {
  margin: 0 0 8px;
  line-height: 1.55;
}

.invoice-configure-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.invoice-configure-field-grid > label,
.invoice-configure-option-list {
  min-width: 0;
}

.invoice-configure-percent {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 38px;
  align-items: stretch;
  margin: 0 !important;
  color: var(--ink) !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

.invoice-configure-percent input {
  border-radius: 6px 0 0 6px;
}

.invoice-configure-percent > span {
  display: grid;
  place-items: center;
  border: 1px solid var(--panel-border);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  background: rgba(143, 178, 255, 0.05);
}

.invoice-configure-option-list {
  display: grid;
  gap: 4px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
  border-bottom: 1px solid rgba(143, 178, 255, 0.12);
}

.invoice-configure-checkbox {
  min-height: 58px;
  margin: 0;
  padding: 10px 2px;
}

.invoice-configure-checkbox + .invoice-configure-checkbox {
  border-top: 1px solid rgba(143, 178, 255, 0.08);
}

.invoice-configure-checkbox > span {
  display: grid !important;
  gap: 3px;
  margin: 0 !important;
}

.invoice-configure-checkbox small,
.invoice-configure-content label > small {
  color: var(--muted);
  font-weight: 500;
  line-height: 1.45;
}

.invoice-configure-unavailable {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-left: 3px solid rgba(148, 163, 184, 0.55);
  color: var(--muted);
  background: rgba(143, 178, 255, 0.045);
}

.invoice-configure-unavailable strong {
  color: var(--ink);
}

.invoice-configure-actions {
  display: flex;
  justify-content: flex-start;
  padding-top: 10px;
  border-top: 1px solid rgba(143, 178, 255, 0.12);
}

.invoice-configure-readonly {
  margin: 8px 0 0;
  padding: 10px 12px;
  color: var(--muted);
  background: rgba(143, 178, 255, 0.045);
}

.invoice-configure-content :disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

.app-invoice-editor-shell {
  display: grid;
  gap: 24px;
  width: min(1040px, 100%);
  margin-inline: 0 auto;
  padding-top: 0;
}

.app-invoice-editor-form {
  gap: 26px;
}

.app-invoice-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 56px;
  row-gap: 32px;
  width: 100%;
  margin-bottom: 8px;
}

.app-invoice-meta-column {
  display: grid;
  align-content: start;
  gap: 18px;
  min-width: 0;
}

.invoice-meta-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  min-width: 0;
}

.invoice-meta-label {
  padding-top: 8px;
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 800;
  line-height: 1.18;
}

.invoice-meta-control {
  display: block;
  min-width: 0;
}

.invoice-meta-row-compact .invoice-meta-control {
  width: min(176px, 100%);
}

.app-invoice-meta-grid input:not([type="hidden"]),
.app-invoice-meta-grid select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 0.86rem;
}

.invoice-number-control {
  display: grid;
  grid-template-columns: minmax(132px, 168px) minmax(58px, auto);
  align-items: center;
  gap: 10px;
}

.invoice-number-control small {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.invoice-due-control {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
}

.invoice-service-period-control {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) auto minmax(118px, 1fr);
  align-items: center;
  gap: 7px;
  width: min(340px, 100%) !important;
}

.invoice-service-period-control > span {
  color: var(--muted);
  font-size: 0.78rem;
}

.invoice-subject-field {
  grid-column: 1 / -1;
  width: 100%;
}

.invoice-percent-input {
  display: grid;
  grid-template-columns: minmax(0, 74px) 28px;
  align-items: center;
  width: max-content;
  max-width: 100%;
}

.invoice-percent-input > span {
  display: grid;
  place-items: center;
  align-self: stretch;
  margin: 0;
  border: 1px solid var(--panel-border);
  border-left: 0;
  border-radius: 0 6px 6px 0;
  color: var(--muted);
  background: rgba(143, 178, 255, 0.05);
}

.invoice-percent-input input {
  border-radius: 5px 0 0 5px;
}

.invoice-tax-button {
  justify-content: flex-start;
  width: fit-content;
  max-width: 240px;
  min-height: 36px;
  padding: 5px 0;
  color: #67e8f9;
  background: transparent;
  box-shadow: none;
  font-size: 0.84rem;
  line-height: 1.25;
  text-align: left;
  text-decoration: underline;
  text-decoration-color: rgba(103, 232, 249, 0.55);
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.invoice-editor-table {
  min-width: 900px;
  table-layout: fixed;
}

@media (min-width: 701px) {
  .app-invoice-editor-shell .invoice-editor-table-wrap {
    border-inline: 0;
    border-radius: 0;
  }
}

.invoice-editor-table .invoice-editor-line {
  display: table-row;
}

.invoice-editor-table .invoice-line-amount {
  display: table-cell;
}

.invoice-editor-table .invoice-project-summary-line td {
  padding: 13px 16px;
  border-top: 1px solid rgba(34, 211, 238, 0.32);
  border-bottom: 1px solid rgba(34, 211, 238, 0.2);
  color: var(--ink);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.12), rgba(139, 92, 246, 0.07));
  text-align: left;
}

.invoice-editor-table .invoice-project-summary-line strong,
.invoice-editor-table .invoice-project-summary-line small {
  display: block;
}

.invoice-editor-table .invoice-project-summary-line strong {
  font-size: 0.86rem;
  line-height: 1.45;
}

.invoice-editor-table .invoice-project-summary-line small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.invoice-record-project-summary {
  display: block;
  border: 1px solid rgba(34, 211, 238, 0.24);
  color: var(--ink);
  background: linear-gradient(90deg, rgba(34, 211, 238, 0.1), rgba(139, 92, 246, 0.06));
}

.invoice-record-project-summary strong {
  line-height: 1.45;
}

.invoice-editor-table th:first-child,
.invoice-editor-table td:first-child {
  width: 48px;
  text-align: center;
}

.invoice-editor-table th:nth-child(2),
.invoice-editor-table td:nth-child(2) {
  width: 136px;
}

.invoice-editor-table th:nth-child(3),
.invoice-editor-table td:nth-child(3) {
  width: auto;
}

.invoice-editor-table th:nth-child(4),
.invoice-editor-table td:nth-child(4),
.invoice-editor-table th:nth-child(5),
.invoice-editor-table td:nth-child(5) {
  width: 110px;
}

.invoice-editor-table th:last-child,
.invoice-editor-table td:last-child {
  width: 112px;
  text-align: right;
}

.invoice-editor-table th {
  padding: 10px 12px;
  background: rgba(148, 163, 184, 0.09);
  font-size: 0.7rem;
  letter-spacing: 0;
}

.invoice-editor-table tbody td {
  padding: 12px;
}

.invoice-editor-table td input,
.invoice-editor-table td select,
.invoice-editor-table td textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 5px;
  font-size: 0.84rem;
}

.invoice-editor-table td textarea {
  min-height: 62px;
  line-height: 1.35;
  resize: vertical;
}

.invoice-editor-table td input[type="number"] {
  padding-inline: 9px;
  font-variant-numeric: tabular-nums;
}

.invoice-line-delete-cell {
  vertical-align: top;
}

.invoice-line-reorder-controls {
  display: grid;
  gap: 4px;
  margin-top: 4px;
}

.invoice-linked-project-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin-top: 9px;
}

.invoice-linked-project-row label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.invoice-project-help {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--panel-border);
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.invoice-line-source-note {
  display: block;
  margin-top: 6px;
  font-size: 0.74rem;
  line-height: 1.3;
}

.invoice-editor-table tr[hidden] {
  display: none !important;
}

.invoice-editor-footer {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(380px, 460px);
  gap: 32px;
  align-items: start;
  padding: 18px 12px 6px;
  border-top: 1px solid var(--panel-border);
}

.invoice-editor-footer-tools {
  min-width: 0;
}

.invoice-table-actions {
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.invoice-add-line-button {
  gap: 5px;
  min-height: 34px;
  padding: 6px 10px;
  border-color: var(--panel-border);
  color: var(--ink);
  background: rgba(148, 163, 184, 0.05);
  font-size: 0.82rem;
  font-weight: 750;
}

.invoice-add-line-button:hover,
.invoice-add-line-button:focus-visible {
  border-color: rgba(103, 232, 249, 0.52);
  background: rgba(103, 232, 249, 0.08);
}

.invoice-reorder-button {
  align-self: center;
  min-height: 34px;
  padding-inline: 2px;
  font-size: 0.8rem;
}

.invoice-total-hours {
  justify-content: flex-start;
  gap: 9px;
  width: max-content;
  max-width: 100%;
  color: var(--muted);
}

.invoice-editor-table .invoice-total-hours input {
  flex: 0 0 17px;
  width: 17px;
  height: 17px;
  min-height: 17px;
  padding: 0;
  border-radius: 4px;
}

.invoice-total-hours span {
  color: var(--muted);
  font-size: 0.8rem;
}

.invoice-editor-financial-summary {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.invoice-project-subtotals {
  display: grid;
  gap: 9px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--panel-border);
}

.invoice-project-subtotals-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.invoice-project-subtotals-heading strong {
  color: var(--ink);
  font-size: 0.82rem;
}

.invoice-project-subtotals-heading span {
  color: var(--muted);
  font-size: 0.72rem;
  text-align: right;
}

.invoice-project-subtotal-list,
.invoice-total-rows {
  display: grid;
  gap: 8px;
}

.invoice-project-subtotal-row,
.invoice-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: baseline;
}

.invoice-summary-row[hidden] {
  display: none !important;
}

.invoice-project-subtotal-row span,
.invoice-summary-row span {
  min-width: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.invoice-project-subtotal-row strong,
.invoice-summary-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.invoice-project-subtotal-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.invoice-detail-project-subtotals {
  display: grid;
  gap: 8px;
  width: min(420px, 100%);
  margin: 14px 0 0 auto;
  padding-top: 12px;
  border-top: 1px solid var(--panel-border);
}

.invoice-detail-project-subtotals > strong {
  font-size: 0.82rem;
}

.invoice-detail-project-subtotal-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  color: var(--muted);
}

.invoice-detail-project-subtotal-row strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.invoice-amount-due-row {
  margin-top: 3px;
  padding-top: 12px;
  border-top: 1px solid rgba(34, 211, 238, 0.26);
  font-size: 0.9rem;
}

.invoice-amount-due-row span,
.invoice-amount-due-row strong {
  color: var(--ink);
  font-weight: 800;
}

.invoice-notes-field {
  gap: 6px;
  max-width: 100%;
}

.invoice-notes-field textarea {
  min-height: 104px;
  padding: 9px 10px;
  border-radius: 5px;
}

.invoice-notes-field > span small {
  font-weight: 500;
}

.invoice-editor-actions {
  justify-content: flex-start;
  gap: 8px;
}

.invoice-editor-actions > button {
  min-width: 0;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 5px;
  font-size: 0.84rem;
}

.invoice-editor-actions .primary {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
  box-shadow: none;
  font-weight: 800;
}

.invoice-editor-actions .primary:hover,
.invoice-editor-actions .primary:focus-visible {
  border-color: #22c55e;
  background: #22c55e;
}

@media (max-width: 1180px) {
  .app-invoice-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .invoice-area-title-row,
  .invoice-filter-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-area-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .invoice-header-search {
    width: min(100%, 360px);
  }

  .invoice-overview-metrics,
  .app-invoice-meta-grid,
  .invoice-configure-layout {
    grid-template-columns: 1fr 1fr;
  }

  .invoice-total-summary {
    border-right: 0;
    border-bottom: 1px solid var(--panel-border);
  }

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

  .invoice-configure-layout {
    grid-template-columns: 180px minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .invoice-recovery-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-recovery-actions {
    width: 100%;
    margin-left: 0;
  }

  .invoice-recovery-actions > * {
    flex: 1;
  }

  .invoice-area-title-row,
  .invoice-workspace-tabs,
  .invoice-area-actions,
  .invoice-ledger-selects,
  .invoice-source-actions,
  .invoice-dialog-actions,
  .invoice-editor-actions {
    align-items: stretch;
  }

  .invoice-area-title-row,
  .invoice-area-actions,
  .invoice-ledger-selects,
  .invoice-source-actions,
  .invoice-dialog-actions,
  .invoice-editor-actions {
    flex-direction: column;
  }

  .invoice-area-actions > *,
  .invoice-source-actions > *,
  .invoice-dialog-actions > *,
  .invoice-editor-actions > * {
    width: 100%;
  }

  .invoice-workspace-tabs {
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .invoice-workspace-tabs::-webkit-scrollbar {
    display: none;
  }

  .invoice-frequency-cards,
  .invoice-recurring-grid,
  .invoice-date-range,
  .invoice-display-options,
  .app-invoice-meta-grid,
  .invoice-configure-layout {
    grid-template-columns: 1fr;
  }

  .invoice-inline-radio-control {
    align-items: stretch;
    flex-direction: column;
  }

  .invoice-inline-radio-control > select,
  .invoice-radio-option {
    width: 100%;
  }

  .invoice-radio-option {
    min-height: 44px;
    padding: 8px 0;
  }

  .invoice-source-helper {
    margin-left: 0;
  }

  .invoice-overview-metrics {
    border-radius: 6px;
  }

  .invoice-year-chart,
  .invoice-total-summary {
    padding: 16px;
  }

  .invoice-status-tabs {
    width: 100%;
    overflow-x: auto;
  }

  .invoice-status-tabs button {
    white-space: nowrap;
  }

  .invoice-configure-layout > nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .invoice-configure-field-grid {
    grid-template-columns: 1fr;
  }

  .invoice-configure-layout > nav button {
    min-height: 44px;
  }

  .invoice-configure-actions .primary {
    width: 100%;
  }

  .invoice-subject-field {
    grid-column: auto;
  }

  .invoice-meta-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .invoice-meta-label {
    padding-top: 0;
  }

  .invoice-meta-row-compact .invoice-meta-control,
  .invoice-subject-field,
  .invoice-tax-button {
    width: 100%;
    max-width: none;
  }

  .invoice-number-control {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .invoice-service-period-control {
    grid-template-columns: 1fr;
    width: 100% !important;
  }

  .invoice-service-period-control > span {
    display: none;
  }

  .app-invoice-meta-grid input:not([type="hidden"]),
  .app-invoice-meta-grid select,
  .invoice-tax-button,
  .invoice-editor-table td input,
  .invoice-editor-table td select,
  .invoice-editor-table td textarea,
  .invoice-editor-actions > button {
    min-height: 44px;
  }

  .invoice-editor-table-wrap {
    overflow: visible;
  }

  .invoice-editor-table {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .invoice-editor-table thead {
    display: none;
  }

  .invoice-editor-table tbody {
    display: grid;
    gap: 12px;
  }

  .invoice-editor-table .invoice-editor-line {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px 12px;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: rgba(14, 22, 43, 0.72);
  }

  .invoice-editor-table .invoice-project-summary-line {
    display: block;
    padding: 0;
  }

  .invoice-editor-table .invoice-project-summary-line td {
    display: grid;
    width: 100% !important;
    padding: 13px 14px;
  }

  .invoice-editor-table tbody td {
    display: grid;
    gap: 6px;
    width: auto !important;
    padding: 0;
    border: 0;
    text-align: left !important;
  }

  .invoice-editor-table tbody td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .invoice-editor-table .invoice-line-delete-cell {
    grid-column: 1;
    grid-row: 1;
  }

  .invoice-editor-table tbody td:nth-child(2) {
    grid-column: 2;
    grid-row: 1;
  }

  .invoice-editor-table tbody td:nth-child(n + 3) {
    grid-column: 1 / -1;
  }

  .invoice-editor-table .invoice-line-amount {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--panel-border);
  }

  .invoice-editor-table .invoice-line-amount::before {
    margin-right: 12px;
  }

  .invoice-editor-footer {
    grid-template-columns: 1fr;
    gap: 22px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--panel-border);
    border-radius: 6px;
    background: rgba(8, 14, 32, 0.35);
  }

  .invoice-editor-footer-tools {
    padding-bottom: 18px;
    border-bottom: 1px solid var(--panel-border);
  }

  .invoice-project-subtotals-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .invoice-project-subtotals-heading span {
    text-align: left;
  }

  .invoice-table-actions {
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
  }

  .invoice-add-line-button {
    flex: 1 1 150px;
  }

  .invoice-total-hours {
    width: 100%;
  }
}
/* Android-first workspace refinements. Keep desktop density while giving touch
   screens a compact app chrome and content-shaped controls. */
@media (max-width: 760px), (pointer: coarse) and (max-width: 1024px) {
  .mobile-shell-header {
    min-height: 64px;
    padding: 10px 16px;
    gap: 12px;
  }

  .mobile-shell-header h1 {
    font-size: 1.4rem;
    font-weight: 760;
  }

  .mobile-shell-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .mobile-time-mode-switch {
    grid-column: 2;
    justify-self: center;
    width: min(188px, 50vw);
    min-width: 0;
    min-height: 50px;
    padding: 3px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.02);
  }

  .mobile-time-mode-switch button {
    min-width: 0;
    min-height: 44px;
    padding: 7px 12px;
    border: 0;
    border-radius: 6px;
    color: #aab2c2;
    background: transparent;
    font-size: 0.88rem;
    font-weight: 750;
  }

  .mobile-time-mode-switch button:hover,
  .mobile-time-mode-switch button:focus-visible,
  .mobile-time-mode-switch button.active {
    color: #67e8f9;
    background: rgba(34, 211, 238, 0.1);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.56);
  }

  .mobile-shell-header .mobile-shell-menu {
    grid-column: 3;
    justify-self: end;
  }

  .mobile-shell-menu-panel {
    width: min(300px, calc(100vw - 24px));
  }

  .week-notes-backdrop {
    place-items: stretch;
    padding: calc(12px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom));
    overflow: hidden;
  }

  .week-notes-modal {
    width: 100%;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: auto 0;
    padding: 18px 16px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scroll-padding-block: 96px 84px;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
  }

  .week-notes-head {
    position: sticky;
    top: -18px;
    z-index: 2;
    margin: 0 0 2px;
    padding: 18px 0 12px;
    border-bottom: 1px solid rgba(143, 178, 255, 0.14);
    background: #10182d;
  }

  .week-notes-actions {
    position: sticky;
    bottom: -18px;
    z-index: 2;
    margin-top: 0;
    padding: 12px 0 18px;
    border-top: 1px solid rgba(143, 178, 255, 0.14);
    background: #0b1122;
  }

  .app-main-shell {
    min-height: calc(100dvh - 64px);
  }

  .main-shell,
  .app-main-shell {
    padding: 12px 16px calc(84px + env(safe-area-inset-bottom));
    gap: 12px;
  }

  .app-shell.mobile-time-action-visible .app-main-shell {
    padding-bottom: calc(154px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    min-height: calc(68px + env(safe-area-inset-bottom));
    padding: 5px 6px env(safe-area-inset-bottom);
    background: #11151d;
  }

  .mobile-bottom-nav button {
    min-height: 56px;
    border-radius: 8px;
    gap: 2px;
  }

  .mobile-bottom-nav button span {
    font-size: 0.72rem;
    font-weight: 650;
  }

  .mobile-bottom-nav button.active {
    background: rgba(34, 211, 238, 0.1);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.2);
  }

  .app-secondary-nav,
  .app-secondary-nav-reports,
  .invoice-workspace-tabs {
    width: calc(100% + 32px);
    max-width: none;
    margin-inline: -16px;
    padding-inline: 16px;
    gap: 4px;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .app-secondary-nav::-webkit-scrollbar,
  .invoice-workspace-tabs::-webkit-scrollbar,
  .project-filter-bar::-webkit-scrollbar,
  .team-detail-tab-strip::-webkit-scrollbar {
    display: none;
  }

  .app-secondary-link,
  .app-secondary-nav-reports .app-secondary-link,
  .invoice-workspace-tab {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 9px 14px;
    font-size: 0.88rem;
    white-space: nowrap;
  }

  .mobile-time-overview {
    margin-inline: -16px;
  }

  .mobile-time-period-row {
    min-height: 58px;
    padding: 2px 16px 8px;
  }

  .mobile-time-date-control {
    min-height: 44px;
    padding: 9px 12px;
  }

  .mobile-time-date-control strong {
    font-size: 0.96rem;
  }

  .mobile-time-week-strip {
    padding: 2px 10px 10px;
    gap: 0;
  }

  .mobile-time-day {
    min-height: 72px;
    grid-template-rows: 17px 34px 17px;
  }

  .mobile-time-day strong {
    width: 34px;
    height: 34px;
    font-size: 1.06rem;
  }

  .mobile-time-week-summary {
    min-height: 52px;
    padding: 13px 16px;
    font-size: 0.92rem;
  }

  .mobile-time-week-summary .week-summary-detail-panel {
    top: 132px;
    left: 12px;
    right: 12px;
  }

  .mobile-time-overview-week .mobile-time-period-row {
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    display: grid;
    align-items: center;
    gap: 6px;
    padding-top: 8px;
  }

  .mobile-time-overview-week .mobile-time-date-control {
    min-width: 0;
    padding-inline: 4px;
    justify-content: center;
    border: 0;
    background: transparent;
  }

  .mobile-time-overview-week .mobile-time-date-control strong {
    font-weight: 700;
    text-align: center;
  }

  .mobile-time-overview-week .mobile-time-period-actions {
    width: 44px;
  }

  .mobile-time-overview-week .mobile-time-week-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }

  .mobile-time-overview-week .mobile-time-week-summary.has-payroll-status {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  .mobile-time-week-summary .timesheet-payroll-status {
    justify-self: start;
  }

  .mobile-time-autosave {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    color: #99a4b6;
    font-size: 0.78rem;
    text-align: right;
    white-space: nowrap;
    gap: 4px;
  }

  .mobile-time-autosave.saved span {
    color: #34d399;
  }

  .mobile-time-autosave .timesheet-foot-meta,
  .mobile-time-autosave .autosave-status {
    min-width: 0;
  }

  .time-workspace-week {
    gap: 10px;
  }

  .time-workspace-week > .timesheet-header {
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .time-workspace-week > .timesheet-header .timesheet-period-bar,
  .time-workspace-week > .timesheet-header .timesheet-toggle-group {
    display: none;
  }

  .time-workspace-week > .timesheet-header .timesheet-toggle-bar {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
  }

  .time-workspace-week .timesheet-user-switcher {
    flex: 1 1 180px;
    max-width: 100%;
  }

  .time-workspace-week .timesheet-user-switcher-face {
    max-width: none;
  }

  .time-workspace-week .submit-week-tooltip-wrap {
    display: none;
  }

  .time-workspace-week > .timesheet-panel {
    border-radius: 8px;
  }

  .mobile-week-sheet {
    width: 100%;
    min-width: 0;
    display: block;
  }

  .mobile-week-copy-actions {
    margin-bottom: 9px;
    display: flex;
    justify-content: flex-end;
  }

  .mobile-week-copy-actions button {
    min-height: 44px;
  }

  .mobile-week-row-list {
    display: grid;
    gap: 9px;
  }

  .mobile-week-row {
    --mobile-week-accent: #22d3ee;
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-left: 3px solid var(--mobile-week-accent);
    border-radius: 8px;
    background: #0c1220;
  }

  .mobile-week-row-accent-2 {
    --mobile-week-accent: #4f8cff;
  }

  .mobile-week-row-accent-3 {
    --mobile-week-accent: #2dd4bf;
  }

  .mobile-week-row-accent-4 {
    --mobile-week-accent: #9b6cff;
  }

  .mobile-week-row-accent-5 {
    --mobile-week-accent: #f59e0b;
  }

  .mobile-week-row.expanded {
    border-color: rgba(148, 163, 184, 0.3);
    border-left-color: var(--mobile-week-accent);
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
  }

  .mobile-week-row-toggle {
    width: 100%;
    min-width: 0;
    min-height: 76px;
    padding: 13px 12px 13px 14px;
    border: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 28px;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    background: transparent;
    text-align: left;
  }

  .mobile-week-row-toggle:hover,
  .mobile-week-row-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.035);
  }

  .mobile-week-row-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
  }

  .mobile-week-row-copy strong,
  .mobile-week-row-copy small {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .mobile-week-row-copy strong {
    font-size: 0.96rem;
    line-height: 1.24;
  }

  .mobile-week-row-copy small {
    color: #aab4c7;
    font-size: 0.82rem;
    line-height: 1.25;
  }

  .mobile-week-row-total {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 1rem;
    white-space: nowrap;
  }

  .mobile-week-row-chevron {
    width: 28px;
    height: 44px;
    display: grid;
    place-items: center;
  }

  .mobile-week-row-panel {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
  }

  .mobile-week-row-days {
    min-width: 0;
    padding: 12px 8px 10px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
  }

  .mobile-week-row-days .timesheet-cell {
    width: 100%;
    min-width: 0;
    min-height: 82px;
    margin: 0;
    padding: 5px 2px 7px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 7px;
    display: grid;
    grid-template-rows: 18px minmax(34px, 1fr);
    align-items: center;
    justify-items: center;
    gap: 4px;
    background: rgba(3, 8, 18, 0.42);
  }

  .mobile-week-row-days .timesheet-cell.selected {
    border-color: rgba(34, 211, 238, 0.78);
    background: rgba(34, 211, 238, 0.12);
  }

  .mobile-week-row-days .mobile-week-cell-date {
    display: block;
    color: #aab4c7;
    font-size: 0.66rem;
    font-weight: 750;
    white-space: nowrap;
  }

  .mobile-week-row-days .cell-note-dot {
    min-height: 7px;
  }

  .mobile-week-row-days .timesheet-cell .week-cell-note-tooltip {
    position: fixed;
    z-index: 80;
    inset: auto 12px calc(146px + env(safe-area-inset-bottom, 0px));
    width: auto;
    max-height: min(260px, calc(100dvh - 170px));
    overflow: hidden;
    transform: translateY(4px);
  }

  .mobile-week-row-days .week-cell-note-tooltip-copy {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
  }

  .mobile-week-row-days .week-cell-note-tooltip-hint {
    display: block;
  }

  .mobile-week-row-days .timesheet-cell:hover .cell-note-dot + .week-cell-note-tooltip,
  .mobile-week-row-days .timesheet-cell:focus .cell-note-dot + .week-cell-note-tooltip,
  .mobile-week-row-days .timesheet-cell:focus-within .cell-note-dot + .week-cell-note-tooltip {
    transform: translateY(0);
  }

  .mobile-week-row-days .timesheet-cell input,
  .mobile-week-row-days .week-cell-duration {
    width: 100%;
    min-width: 0;
    padding: 0;
    border: 0;
    color: #f8fafc;
    background: transparent;
    font-size: clamp(0.72rem, 3.5vw, 0.94rem);
    font-weight: 760;
    text-align: center;
  }

  .mobile-week-row-days .timesheet-cell input {
    min-height: 44px;
  }

  .mobile-week-row-days .timesheet-cell input:focus {
    outline: 0;
  }

  .mobile-week-row-days .cell-save-status:not(.error) {
    display: none;
  }

  .mobile-week-row-days .cell-save-status.error {
    position: absolute;
    left: 2px;
    right: 2px;
    bottom: 1px;
    overflow: hidden;
    font-size: 0.54rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-week-row-tools {
    padding: 0 10px 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
  }

  .mobile-week-row-tools button {
    width: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 6px;
    display: grid;
    place-items: center;
    color: #aeb8c9;
    background: rgba(255, 255, 255, 0.025);
  }

  .mobile-week-row-tools button.has-note {
    color: #67e8f9;
  }

  .mobile-week-status-summaries {
    padding: 10px 2px 0;
    display: grid;
    gap: 6px;
  }

  .mobile-time-primary-action {
    left: 16px;
    right: 16px;
    bottom: calc(68px + env(safe-area-inset-bottom));
  }

  .mobile-time-primary-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 9px;
    pointer-events: auto;
  }

  .mobile-time-primary-actions.has-submit {
    grid-template-columns: minmax(0, 3fr) minmax(98px, 1fr);
  }

  .mobile-time-primary-action button,
  .mobile-submit-week-tooltip-wrap {
    min-height: 56px;
  }

  .mobile-submit-week-tooltip-wrap {
    min-width: 0;
    display: block;
    pointer-events: auto;
  }

  .mobile-time-primary-action .mobile-submit-week-action {
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid rgba(139, 92, 246, 0.7);
    border-radius: 8px;
    color: #ffffff;
    background: #6658e8;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.05;
    white-space: normal;
  }

  .mobile-time-primary-action .mobile-submit-week-action:hover,
  .mobile-time-primary-action .mobile-submit-week-action:focus-visible {
    background: #7668ef;
  }

  .mobile-time-primary-action .mobile-submit-week-action:disabled {
    color: #aeb4c6;
    background: #292b45;
    border-color: rgba(139, 92, 246, 0.28);
  }

  .day-quick-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .day-quick-row-copy,
  .day-quick-row-inputs,
  .day-row-timer-cell,
  .day-row-saved-entries {
    grid-column: 1 / -1;
  }

  .day-quick-row-copy .day-row-client-name {
    display: none;
  }

  .day-row-notes {
    grid-column: 1;
    grid-row: 3;
    width: 100%;
  }

  .day-quick-row-actions {
    grid-column: 2;
    grid-row: 3;
    width: 100%;
  }

  .day-row-notes summary,
  .day-quick-row-actions .day-row-edit-action {
    width: 100%;
  }

  .day-row-timer-cell {
    grid-row: 4;
  }

  .day-row-timer-cell:empty {
    display: none;
  }

  .day-row-saved-entries {
    grid-row: 5;
  }

  .project-portfolio-shell {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 14px;
    border-radius: 8px;
  }

  .project-portfolio-toolbar,
  .project-toolbar-row {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 10px;
  }

  .project-toolbar-search,
  .project-toolbar-search input,
  .project-portfolio-head,
  .project-portfolio-table-wrap,
  .project-portfolio-table {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .project-toolbar-row.primary-row .project-toolbar-search {
    order: -1;
  }

  .project-toolbar-row.primary-row > .button-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .project-toolbar-row.primary-row > .button-row > button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .project-filter-bar {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    margin-inline: 0;
    padding: 0 0 6px;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
    scrollbar-width: none;
  }

  .project-filter-field {
    flex: 0 0 min(68vw, 230px);
    width: auto;
    scroll-snap-align: start;
  }

  .project-filter-field select {
    min-height: 44px;
  }

  .project-toolbar-summary {
    width: 100%;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .project-portfolio-head {
    margin-top: 4px;
  }

  .project-portfolio-head p {
    display: none;
  }

  .project-project-cell .project-client-name {
    display: none;
  }

  .project-portfolio-table tbody {
    gap: 8px;
  }

  .project-portfolio-table tr:not(.project-client-row) {
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(143, 178, 255, 0.14);
    border-radius: 8px;
    background: rgba(8, 14, 32, 0.42);
  }

  .project-client-row td {
    padding: 8px 2px 4px;
    background: transparent;
  }

  .project-table-action-row > button {
    min-width: 104px;
    min-height: 44px;
  }

  .report-period-shell,
  .report-table-panel {
    padding: 14px;
    border-radius: 8px;
  }

  .report-entity-tab {
    min-width: 44px;
  }

  .checkbox-row {
    min-height: 44px;
  }

  .checkbox-row input[type="checkbox"] {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
  }

  .report-period-head {
    display: grid;
    gap: 10px;
  }

  .report-period-title-wrap .timesheet-period-bar,
  .team-period-bar .timesheet-period-bar {
    width: 100%;
    display: grid;
    grid-template-columns: 44px 44px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
  }

  .report-period-title-wrap h2,
  .team-period-bar h3 {
    min-width: 0;
    font-size: 1.14rem;
    line-height: 1.25;
  }

  .report-period-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
  }

  .report-period-picker {
    grid-column: 1;
    grid-row: 1;
  }

  .report-period-picker select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }

  .report-export-menu {
    grid-column: 2;
    grid-row: 1;
  }

  .report-export-menu .inline-action-menu-trigger {
    min-height: 44px;
  }

  .report-updating-status {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 22px;
    font-size: 0.76rem;
  }

  .report-period-meta-row {
    padding-bottom: 8px;
  }

  .report-period-meta-row > .stack {
    display: none;
  }

  .report-period-range-chip {
    width: 100%;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-radius: 8px;
    text-align: left;
  }

  .report-period-range-chip strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.84rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .report-detail-head {
    gap: 12px;
  }

  .report-detail-summary {
    min-width: 72px;
  }

  .report-activity-table,
  .report-activity-table tbody,
  .report-activity-table tr,
  .report-activity-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .report-activity-table thead {
    display: none;
  }

  .report-activity-table tbody {
    display: grid;
    gap: 10px;
  }

  .report-activity-table .report-activity-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 14px;
    border: 1px solid rgba(143, 178, 255, 0.14);
    border-radius: 8px;
    background: rgba(8, 14, 32, 0.46);
  }

  .report-activity-table td {
    padding: 0;
    border: 0;
  }

  .report-activity-table td::before,
  .team-overview-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
  }

  .report-activity-table td[data-label="Context"],
  .report-activity-table td[data-label="Action"] {
    grid-column: 1 / -1;
  }

  .report-activity-table td[data-label="Context"] .soft {
    margin-top: 4px;
    line-height: 1.45;
  }

  .report-activity-table .action-cell button {
    width: 100%;
    min-height: 44px;
  }

  .team-overview-panel {
    padding: 14px;
    border-radius: 8px;
  }

  .team-shell-toolbar {
    display: grid;
    gap: 8px;
    margin-bottom: 10px;
  }

  .team-shell-toolbar-left {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
  }

  .team-shell-toolbar-left > *,
  .team-shell-toolbar-left button {
    min-width: 0;
  }

  .team-shell-toolbar-left button {
    min-height: 44px;
    padding-inline: 10px;
    justify-content: center;
  }

  .team-shell-toolbar > button {
    width: fit-content;
    min-height: 44px;
  }

  .team-period-bar {
    display: grid;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
  }

  .team-period-side {
    width: 100%;
    display: grid;
    gap: 6px;
  }

  .team-filter-form,
  .team-filter-form select {
    width: 100%;
    min-width: 0;
  }

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

  .team-summary-meter-card {
    grid-column: 1 / -1;
  }

  .team-overview-table,
  .team-overview-table tbody,
  .team-overview-table tr,
  .team-overview-table td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  .team-overview-table thead {
    display: none;
  }

  .team-overview-table tbody {
    display: grid;
    gap: 10px;
  }

  .team-overview-table .team-summary-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(143, 178, 255, 0.14);
    border-radius: 8px;
    background: rgba(8, 14, 32, 0.46);
  }

  .team-overview-table td {
    padding: 0;
    border: 0;
  }

  .team-overview-table td[data-label="Person"],
  .team-overview-table td[data-label="Timer"],
  .team-overview-table td[data-label="Last login"],
  .team-overview-table td[data-label="Actions"] {
    grid-column: 1 / -1;
  }

  .team-overview-table .action-cell button {
    min-height: 44px;
  }

  .team-member-detail-shell {
    gap: 12px;
  }

  .team-member-detail-header .button-row {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .team-member-detail-header .button-row button {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .team-member-workspace {
    display: block;
  }

  .team-member-section-rail {
    gap: 12px;
  }

  .team-member-identity-block {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    padding: 0 0 12px;
  }

  .team-member-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }

  .team-member-presence-card {
    padding: 12px;
    border-radius: 8px;
  }

  .team-member-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .team-member-summary-stat {
    padding: 10px 12px;
    border-radius: 8px;
  }

  .team-detail-tab-strip {
    width: calc(100% + 32px);
    margin-inline: -16px;
    padding-inline: 16px;
    display: flex;
    grid-template-columns: none;
    gap: 4px;
    overflow-x: auto;
    border-top: 0;
    scroll-padding-inline: 16px;
    scrollbar-width: none;
  }

  .team-detail-tab {
    flex: 0 0 auto;
    width: auto;
    min-width: 124px;
    min-height: 48px;
    padding: 9px 12px;
    border: 0;
    border-bottom: 3px solid transparent;
    border-radius: 6px 6px 0 0;
    text-align: center;
  }

  .team-detail-tab small {
    margin-top: 2px;
    font-size: 0.72rem;
  }

  .team-detail-tab.active,
  .app-shell[data-design-direction="dark-futuristic-dashboard"] .team-detail-tab.active {
    border-bottom-color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
    box-shadow: none;
  }

  .team-member-detail-panel {
    margin-top: 12px;
    padding: 14px;
    border-radius: 8px;
  }

  .invoice-area-header {
    margin-bottom: 12px;
  }

  .invoice-area-title-row {
    padding: 0 0 12px;
  }

  .invoice-area-title-row > h2 {
    display: none;
  }

  .invoice-area-actions {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .invoice-area-actions > .primary {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .invoice-actions-menu-wrap {
    grid-column: 2;
    grid-row: 1;
  }

  .invoice-actions-menu-wrap > button {
    min-width: 96px;
    min-height: 44px;
  }

  .invoice-header-search {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
  }

  .invoice-header-search input {
    min-height: 44px;
  }

  .invoice-workspace-tabs {
    min-height: 44px;
    gap: 12px;
  }

  .invoice-workspace-tab {
    padding-inline: 4px;
  }

  .invoice-overview-metrics,
  .app-invoice-ledger {
    border-radius: 8px;
  }

  .invoice-filter-bar {
    gap: 10px;
  }

  .invoice-ledger-selects {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .invoice-ledger-selects label,
  .invoice-ledger-selects select {
    width: 100%;
    min-width: 0;
  }

  .settings-admin-section {
    gap: 12px;
  }

  .settings-admin-section > .panel,
  .settings-profile-section > .panel {
    border-radius: 8px;
  }
}

