/* Biners ERP/CRM — brand from the official logo lockup:
   navy #181838, cyan #00A0F8 (braces), orange #F09818 (tagline). */

:root {
  --navy: #181838;
  --navy-mid: #222850;
  --navy-deep: #0c0e22;
  --navy-soft: #2a3158;
  --cyan: #00a0f8;
  --cyan-deep: #0086d1;
  --orange: #f09818;
  --orange-soft: #ffb347;
  /* Legacy aliases used across components (previously Mahaly green). */
  --green: var(--navy);
  --green-mid: var(--navy-mid);
  --green-deep: var(--navy-deep);
  --green-soft: var(--navy-soft);
  --green-glow: var(--cyan);
  --mint: #7dd3fc;
  --cream: #eef2ff;
  --page: #f0f3fa;
  --surface: #ffffff;
  --surface-muted: #f6f8fc;
  --line: rgba(24, 24, 56, 0.1);
  --line-strong: rgba(24, 24, 56, 0.18);
  --ink: #181838;
  --ink-soft: rgba(24, 24, 56, 0.62);
  --ink-muted: rgba(24, 24, 56, 0.45);
  --danger: #b42318;
  --danger-bg: rgba(180, 35, 24, 0.08);
  --warning: #9a6b10;
  --warning-bg: rgba(240, 152, 24, 0.14);
  --success: #0f766e;
  --success-bg: rgba(15, 118, 110, 0.12);
  --info: var(--cyan-deep);
  --info-bg: rgba(0, 160, 248, 0.1);
  --focus: 0 0 0 3px rgba(0, 160, 248, 0.22);
  --sidebar-w: 248px;
  --radius: 0.55rem;
  --radius-lg: 0.8rem;
  --font: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --shadow-sm: 0 1px 2px rgba(12, 14, 34, 0.06);
  --shadow-md: 0 12px 32px rgba(12, 14, 34, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: 0.875rem;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-feature-settings: "cv11", "ss01";
}

img {
  display: block;
  max-width: 100%;
}

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

a.link {
  color: var(--green-glow);
  font-weight: 600;
}

a.link:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Every time input looks like the form fields, wherever it is used. */
input[type="time"] {
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.86rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 100;
  background: var(--green);
  color: var(--cream);
  padding: 0.75rem 1rem;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.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;
}

.muted {
  color: var(--ink-muted);
}

.soft {
  color: var(--ink-soft);
}

.mono {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
}

.nowrap {
  white-space: nowrap;
}

.text-right {
  text-align: right;
}

/* —— App shell —— */
.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, var(--green-deep), var(--green) 40%, var(--green-mid));
  color: var(--cream);
  padding: 1.1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.15rem 0.35rem 0.35rem;
}

.sidebar-brand-logo {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 0.45rem;
  background: #000;
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: 0.55rem;
  background: var(--cyan);
  color: var(--navy-deep);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
  font-family: var(--font-mono);
}

.sidebar-brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sidebar-brand .sidebar-tagline {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  padding: 0 0.15rem;
}

.sidebar-brand div span {
  font-size: 0.72rem;
  color: rgba(238, 242, 255, 0.6);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding-right: 0.15rem;
}

.nav-divider {
  height: 1px;
  margin: 0.65rem 0.55rem 0.35rem;
  background: rgba(243, 241, 233, 0.12);
}

.nav-area-label {
  margin: 0 0 0.15rem;
  padding: 0.25rem 0.75rem 0.15rem;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 241, 233, 0.38);
}

.nav-link,
.nav-section-toggle,
.nav-group-toggle,
.nav-sublink {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.52rem 0.75rem;
  border-radius: 0.55rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: rgba(243, 241, 233, 0.74);
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-section-toggle:hover,
.nav-group-toggle:hover,
.nav-sublink:hover,
.nav-sublink:focus-visible {
  background: rgba(243, 241, 233, 0.08);
  color: var(--cream);
  outline: none;
}

.nav-link.is-active,
.nav-sublink.is-active {
  background: rgba(0, 160, 248, 0.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.nav-section-toggle.is-current,
.nav-group-toggle.is-current {
  color: var(--cream);
  background: rgba(243, 241, 233, 0.06);
}

.sidebar-nav svg {
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-section,
.nav-group {
  border-radius: 0.65rem;
}

.nav-section[open],
.nav-group[open] {
  background: rgba(0, 0, 0, 0.12);
  padding-bottom: 0.2rem;
}

.nav-section-toggle,
.nav-group-toggle {
  list-style: none;
  cursor: pointer;
  justify-content: space-between;
  user-select: none;
}

.nav-section-toggle::-webkit-details-marker,
.nav-group-toggle::-webkit-details-marker {
  display: none;
}

.nav-section-title,
.nav-group-label {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.nav-chevron {
  width: 0.9rem !important;
  height: 0.9rem !important;
  opacity: 0.55;
  transition: transform 0.2s ease;
}

.nav-section[open] > .nav-section-toggle .nav-chevron,
.nav-group[open] > .nav-group-toggle .nav-chevron {
  transform: rotate(180deg);
}

.nav-section-links,
.nav-group-links {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.05rem 0.35rem 0.15rem;
}

.nav-sublink {
  padding: 0.42rem 0.75rem 0.42rem 2.35rem;
  font-size: 0.82rem;
  font-weight: 550;
  color: rgba(243, 241, 233, 0.64);
}

.sidebar-footer {
  padding: 0.75rem;
  border-radius: var(--radius-lg);
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(243, 241, 233, 0.08);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.7rem;
  min-width: 0;
}

.sidebar-user-meta {
  min-width: 0;
}

.sidebar-user strong {
  display: block;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user span {
  display: block;
  font-size: 0.72rem;
  color: rgba(243, 241, 233, 0.6);
}

.sidebar-footer .btn {
  width: 100%;
  color: var(--cream);
  border-color: rgba(243, 241, 233, 0.2);
  background: transparent;
}

.sidebar-footer .btn:hover {
  background: rgba(243, 241, 233, 0.08);
}

.avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: var(--mint);
  color: var(--green-deep);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.avatar-sm {
  width: 1.6rem;
  height: 1.6rem;
  font-size: 0.65rem;
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* —— Top bar —— */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  background: rgba(244, 242, 236, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-title {
  min-width: 0;
}

.topbar h1 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.3;
}

.topbar-subtitle {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.15rem;
}

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

.breadcrumbs .sep {
  opacity: 0.5;
}

.context-switch {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.2rem 0.25rem 0.2rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
}

.context-switch label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}

.context-switch select {
  border: 0;
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.25rem 0.4rem;
  border-radius: 999px;
  cursor: pointer;
}

.context-switch select:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.content {
  padding: 1.25rem 1.5rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.84rem;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.btn svg {
  width: 1rem;
  height: 1rem;
}

.btn-primary {
  background: var(--cyan);
  color: #061018;
  border-color: var(--cyan);
}

.btn-primary:hover {
  background: var(--cyan-deep);
  border-color: var(--cyan-deep);
  color: #fff;
}

.btn-secondary {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: rgba(26, 79, 53, 0.4);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
}

.btn-ghost:hover {
  background: rgba(7, 37, 22, 0.06);
  color: var(--ink);
}

.btn-danger {
  background: var(--surface);
  border-color: rgba(180, 35, 24, 0.3);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger-bg);
}

.btn-sm {
  min-height: 1.85rem;
  padding: 0.3rem 0.65rem;
  font-size: 0.78rem;
  border-radius: 0.5rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* —— Panels —— */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.panel-head h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-head p {
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.panel-head-actions {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.panel-body {
  padding: 1rem 1.1rem 1.15rem;
}

.panel-body.flush {
  padding: 0;
}

.panel-foot {
  padding: 0.65rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* —— Layout grids —— */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
  align-items: start;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1.1rem;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  min-width: 0;
}

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

/* —— KPIs —— */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
}

.kpi span {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 0.35rem;
}

.kpi strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.kpi a {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-glow);
}

.kpi-danger {
  border-color: rgba(217, 45, 32, 0.35);
  background: rgba(217, 45, 32, 0.06);
}

.kpi-danger strong {
  color: #b42318;
}

.kpi span.kpi-flag {
  display: inline-block;
  margin-top: 0.45rem;
  margin-bottom: 0;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: #d92d20;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.runway-warning {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(217, 45, 32, 0.35);
  background: rgba(217, 45, 32, 0.08);
  color: #912018;
  font-size: 0.84rem;
  line-height: 1.4;
}

.runway-warning strong {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.forecast-charts > * {
  min-width: 0;
}

.quarter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.quarter-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0.85rem 1rem 0.75rem;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.quarter-card:hover,
.quarter-card:focus-visible {
  border-color: rgba(0, 160, 248, 0.45);
  box-shadow: 0 8px 22px rgba(24, 24, 56, 0.1);
  transform: translateY(-1px);
  outline: none;
}

.quarter-card-hint {
  display: block;
  margin-top: 0.7rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--cyan);
}

.quarter-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
}

.quarter-card-head strong {
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.quarter-card-head .soft {
  font-size: 0.72rem;
  font-weight: 600;
}

.quarter-card-stats {
  display: grid;
  gap: 0.55rem;
  margin: 0;
}

.quarter-card-stats div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.quarter-card-stats dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quarter-card-stats dd {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.quarter-income {
  color: var(--cyan);
}

.quarter-expenses {
  color: var(--orange);
}

.quarter-people {
  color: var(--navy);
}

.quarter-pl-row {
  margin-top: 0.15rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.quarter-pl-positive {
  color: #0f7a45;
}

.quarter-pl-negative {
  color: #b42318;
}

.quarter-modal {
  width: min(58rem, calc(100vw - 2rem));
}

.quarter-month-card {
  min-width: 0;
}

.quarter-month-card .quarter-card-stats > div {
  flex-wrap: wrap;
  gap: 0.15rem 0.5rem;
}

.quarter-month-card .quarter-card-stats dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.quarter-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.quarter-modal-head p {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.quarter-modal-months {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.quarter-month-card,
.quarter-modal-total {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: rgba(24, 24, 56, 0.03);
}

.quarter-month-card header,
.quarter-modal-total header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.quarter-month-card header strong,
.quarter-modal-total header strong {
  font-size: 0.9rem;
}

.quarter-modal-total {
  margin-top: 0.85rem;
  background: rgba(0, 160, 248, 0.06);
  border-color: rgba(0, 160, 248, 0.22);
}

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

  .quarter-modal-months {
    grid-template-columns: minmax(0, 1fr);
  }
}

.forecast-chart-wrap {
  position: relative;
  width: 100%;
  min-height: 14rem;
}

.forecast-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  margin-bottom: 1rem;
}

.forecast-year-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.forecast-year-form select {
  min-width: 6.5rem;
}

.forecast-year-nav [aria-disabled="true"] {
  opacity: 0.35;
  pointer-events: none;
}

.profit-meter {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profit-meter-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.profit-meter-status {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.profit-meter-progress {
  margin: 0;
  font-size: 0.95rem;
}

.profit-meter-progress strong {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.profit-meter-pcts {
  display: flex;
  align-items: flex-end;
  gap: 1rem;
}

.profit-meter-pct {
  text-align: right;
  line-height: 1.05;
}

.profit-meter-pct strong {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--navy);
}

.profit-meter-pct span {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.profit-meter-pct-secondary strong {
  font-size: 1.15rem;
  color: var(--ink-muted);
}

.profit-meter[data-status="hit"] .profit-meter-pct strong {
  color: var(--cyan);
}

.profit-meter[data-status="profit"] .profit-meter-pct:first-child strong {
  color: var(--orange);
}

.profit-meter-bar {
  position: relative;
  margin-top: 1.75rem;
  margin-bottom: 1.85rem;
  padding-top: 0.15rem;
  overflow: visible;
}

.profit-meter-track {
  position: relative;
  height: 1.35rem;
  border-radius: 999px;
  background: rgba(24, 24, 56, 0.08);
  overflow: visible;
}

.profit-meter-zone {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  pointer-events: none;
}

.profit-meter-zone-costs {
  left: 0;
  background: rgba(240, 152, 24, 0.18);
}

.profit-meter-zone-profit {
  background: rgba(0, 160, 248, 0.12);
}

.profit-meter-fill {
  position: relative;
  z-index: 1;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--orange), #f0b45a 35%, var(--cyan));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.15);
  transition: width 0.45s ease;
  min-width: 0;
  pointer-events: none;
}

.profit-meter-mark {
  position: absolute;
  top: -1.1rem;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 2.5rem;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: help;
  z-index: 5;
  appearance: none;
  -webkit-appearance: none;
}

.profit-meter-mark-pin {
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--navy);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 3px 10px rgba(24, 24, 56, 0.28);
  transition: transform 0.15s ease;
}

.profit-meter-mark-stem {
  width: 3px;
  height: 1.55rem;
  margin-top: -1px;
  border-radius: 999px;
  background: currentColor;
  opacity: 0.85;
}

.profit-meter-mark-costs {
  color: var(--orange);
}

.profit-meter-mark-costs .profit-meter-mark-pin {
  border-color: var(--orange);
}

.profit-meter-mark-you {
  color: var(--cyan);
  z-index: 6;
}

.profit-meter-mark-you .profit-meter-mark-pin {
  border-color: var(--cyan);
  background: var(--cyan);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 3px 12px rgba(0, 160, 248, 0.4);
}

.profit-meter-mark-label {
  margin-top: 0.2rem;
  white-space: nowrap;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.profit-meter-mark-tip {
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  transform: translateX(-50%) translateY(0.25rem);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 13rem;
  max-width: 17rem;
  padding: 0.7rem 0.8rem;
  border-radius: 0.55rem;
  background: var(--navy);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  box-shadow: 0 8px 24px rgba(24, 24, 56, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 7;
}

.profit-meter-mark-tip strong {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.profit-meter-mark-tip span {
  display: block;
  color: #fff;
}

.profit-meter-mark:hover .profit-meter-mark-pin,
.profit-meter-mark:focus-visible .profit-meter-mark-pin {
  transform: scale(1.12);
}

.profit-meter-mark:hover .profit-meter-mark-tip,
.profit-meter-mark:focus-visible .profit-meter-mark-tip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.profit-meter-mark:focus-visible {
  outline: none;
}

.profit-meter-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.profit-meter-stats div {
  padding: 0.65rem 0.75rem;
  border-radius: 0.65rem;
  background: rgba(24, 24, 56, 0.035);
}

.profit-meter-stats dt {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.profit-meter-stats dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.profit-meter-form {
  margin-top: 0.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.input-combo {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.input-combo > input,
.input-combo .field,
.input-combo > :first-child {
  flex: 1 1 10rem;
  min-width: 0;
}

.input-combo-addon {
  display: inline-flex;
  align-items: center;
  padding: 0 0.75rem;
  border-radius: 0.55rem;
  background: rgba(24, 24, 56, 0.06);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

@media (max-width: 900px) {
  .profit-meter-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profit-meter-mark-label {
    font-size: 0.62rem;
  }
}

.stat-list {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.stat-list div {
  display: grid;
  gap: 0.15rem;
}

.stat-list dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.stat-list dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.report-share-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.report-share-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.55rem;
  font-size: 0.82rem;
}

.report-share-list .money {
  margin-left: auto;
  font-weight: 700;
}

/* —— Tables —— */
.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 1.1rem;
}

.data-table th:last-child,
.data-table td:last-child {
  padding-right: 1.1rem;
}

.data-table thead th {
  position: sticky;
  top: 0;
  background: var(--surface-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  font-weight: 700;
  white-space: nowrap;
}

.data-table tbody tr:hover {
  background: var(--surface-muted);
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.cell-main {
  font-weight: 600;
}

a.cell-main:hover {
  color: var(--green-glow);
}

.cell-sub {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.row-actions {
  display: flex;
  gap: 0.3rem;
  justify-content: flex-end;
}

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

/* —— Badges —— */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(7, 37, 22, 0.06);
  color: var(--ink-soft);
}

.badge-success {
  background: var(--success-bg);
  color: var(--success);
}

.badge-warning {
  background: var(--warning-bg);
  color: var(--warning);
}

.badge-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.badge-info {
  background: var(--info-bg);
  color: var(--info);
}

.badge-dark {
  background: var(--green);
  color: var(--cream);
}

.badge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.color-dot {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
}

/* —— Flash messages —— */
.flash {
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.84rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.flash-success {
  background: var(--success-bg);
  color: var(--success);
  border-color: rgba(47, 122, 82, 0.18);
}

.flash-error {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(180, 35, 24, 0.16);
}

.flash ul {
  margin: 0.3rem 0 0 1.1rem;
  font-weight: 500;
}

/* —— Empty state —— */
.empty-state {
  text-align: center;
  padding: 2.25rem 1rem;
  color: var(--ink-soft);
}

.empty-state strong {
  display: block;
  color: var(--ink);
  font-size: 0.92rem;
  margin-bottom: 0.2rem;
}

.empty-state .btn {
  margin-top: 0.85rem;
}

/* —— Filters —— */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.filters .filter {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 9rem;
}

.filters .filter-search {
  flex: 1 1 16rem;
  max-width: 24rem;
}

.filters label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-muted);
}

.filters input,
.filters select {
  min-height: 2.1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  font-size: 0.82rem;
}

.filters input:focus,
.filters select:focus {
  outline: none;
  border-color: var(--green-soft);
  box-shadow: var(--focus);
}

.filters-actions {
  display: flex;
  gap: 0.35rem;
}

/* —— Forms —— */
.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 1.1rem;
  align-items: start;
  max-width: 1100px;
}

.form-narrow {
  max-width: 720px;
}

@media (max-width: 1000px) {
  .form-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-section + .form-section {
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
}

.form-section-title {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.75rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.field + .field,
.field-row + .field,
.field + .field-row,
.field-row + .field-row {
  margin-top: 0.85rem;
}

.field-row > .field {
  margin-top: 0;
}

.field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
}

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

@media (max-width: 700px) {
  .field-row,
  .field-row.three {
    grid-template-columns: minmax(0, 1fr);
  }
}

.field > label,
.field-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.optional {
  font-weight: 500;
  color: var(--ink-muted);
}

.field-hint {
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.field-error {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--danger);
}

.input,
.field input:not([type]),
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="time"],
.field input[type="search"],
.field input[type="tel"],
.field input[type="url"],
.field select,
.field-row > select,
.inline-filter select,
.field textarea {
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.86rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:disabled,
.field input[readonly] {
  background: var(--surface-muted);
  color: var(--ink-soft);
}

.installment-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.installment-toolbar .field {
  margin: 0;
  max-width: 9rem;
}

.installment-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.installment-toolbar-sum {
  margin-left: auto;
  align-self: center;
}

.installment-row {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: grid;
  gap: 0.65rem;
  background: var(--surface);
}

.installment-row-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.installment-amount-preview {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--ink);
  min-height: 2.35rem;
  display: flex;
  align-items: center;
  padding: 0 0.7rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-muted);
}

.field textarea {
  min-height: 5rem;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field-row > select:focus,
.inline-filter select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green-soft);
  box-shadow: var(--focus);
}

[data-percent-total].is-invalid {
  color: var(--danger);
}

.field .is-invalid {
  border-color: var(--danger);
}

.field input[type="color"] {
  width: 3rem;
  height: 2.35rem;
  padding: 0.15rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.check input {
  width: 1rem;
  height: 1rem;
  margin-top: 0.15rem;
  accent-color: var(--green-soft);
  flex-shrink: 0;
}

.check strong {
  display: block;
  font-weight: 600;
}

.check > span > span {
  display: block;
  font-size: 0.75rem;
  color: var(--ink-muted);
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-top: 1px solid var(--line);
  background: var(--surface-muted);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* A form's action bar placed below its panels rather than inside one. */
.form-actions.standalone {
  max-width: 1100px;
  margin-top: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.form-narrow .form-actions.standalone,
.form-narrow + .form-actions.standalone {
  max-width: 720px;
}

/* —— Detail lists —— */
.dl {
  display: grid;
  grid-template-columns: minmax(8rem, 34%) minmax(0, 1fr);
  font-size: 0.84rem;
}

.dl dt,
.dl dd {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.dl dt {
  color: var(--ink-muted);
  font-weight: 600;
  padding-right: 1rem;
}

.dl dd {
  min-width: 0;
  overflow-wrap: anywhere;
}

.dl dt:last-of-type,
.dl dd:last-of-type {
  border-bottom: 0;
}

.prose-text {
  white-space: pre-line;
}

/* —— Tabs —— */
.tabs {
  display: flex;
  gap: 0.15rem;
  border-bottom: 1px solid var(--line);
  padding: 0 1.1rem;
  overflow-x: auto;
}

.tabs a {
  padding: 0.65rem 0.75rem;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-soft);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.tabs a:hover {
  color: var(--ink);
}

.tabs a.is-active {
  color: var(--ink);
  border-bottom-color: var(--green-glow);
}

/* —— Timeline (audit trail) —— */
.timeline {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.timeline li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 0.7rem;
  padding: 0.6rem 1.1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.timeline li:last-child {
  border-bottom: 0;
}

.timeline li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 0.4rem;
  border-radius: 999px;
  background: var(--green-glow);
}

.timeline li.event-deleted::before,
.timeline li.event-auth\.failed::before,
.timeline li.event-role_removed::before {
  background: var(--danger);
}

.timeline time {
  font-size: 0.75rem;
  color: var(--ink-muted);
  white-space: nowrap;
}

.timeline .cell-sub {
  margin-top: 0.1rem;
}

/* —— Diff table —— */
.diff-table td.old {
  color: var(--danger);
  background: rgba(180, 35, 24, 0.04);
}

.diff-table td.new {
  color: var(--success);
  background: rgba(47, 122, 82, 0.05);
}

.diff-table td {
  overflow-wrap: anywhere;
}

/* —— Permission matrix —— */
.perm-group + .perm-group {
  margin-top: 1rem;
}

.perm-group h3 {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
  margin-bottom: 0.45rem;
}

.perm-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.perm-row + .perm-row {
  margin-top: 0.35rem;
}

.perm-row:has(input:checked) {
  border-color: rgba(47, 122, 82, 0.35);
  background: rgba(47, 122, 82, 0.04);
}

/* —— Pagination —— */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.6rem 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--ink-soft);
}

.pagination-links {
  display: flex;
  gap: 0.25rem;
}

.pagination-links a,
.pagination-links span {
  min-width: 1.9rem;
  height: 1.9rem;
  padding: 0 0.5rem;
  display: inline-grid;
  place-items: center;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}

.pagination-links a:hover {
  border-color: rgba(26, 79, 53, 0.4);
}

.pagination-links .is-current {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

.pagination-links .is-disabled {
  opacity: 0.45;
}

/* —— Modal —— */
.modal {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(30rem, calc(100vw - 2rem));
  height: fit-content;
  max-height: calc(100vh - 2rem);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-md);
}

.modal::backdrop {
  background: rgba(7, 37, 22, 0.42);
}

.modal-head {
  padding: 0.9rem 1.1rem 0.4rem;
}

.modal-head h2 {
  font-size: 1rem;
  font-weight: 700;
}

.modal-body {
  padding: 0.4rem 1.1rem 1rem;
  color: var(--ink-soft);
}

.modal .form-actions {
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* —— Login —— */
.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.login-brand {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 15% 15%, rgba(0, 160, 248, 0.28), transparent 55%),
    radial-gradient(ellipse 45% 40% at 90% 85%, rgba(240, 152, 24, 0.18), transparent 50%),
    linear-gradient(160deg, var(--navy-deep), var(--navy) 55%, var(--navy-mid));
  color: var(--cream);
  padding: 2.75rem clamp(2rem, 4vw, 4rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 2rem;
}

.login-brand-mark {
  width: 150px;
  height: auto;
  display: block;
  border-radius: 0.55rem;
}

.login-brand .eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 0.9rem;
}

.login-brand h1 {
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin-bottom: 0.9rem;
  max-width: 16ch;
}

.login-brand .lede {
  color: rgba(243, 241, 233, 0.78);
  font-size: 1rem;
  max-width: 38ch;
}

.login-brand-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.login-brand-list span {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 241, 233, 0.18);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(243, 241, 233, 0.82);
}

.login-brand-list .login-brand-soon {
  border-color: rgba(240, 152, 24, 0.45);
  color: var(--orange);
}

.login-panel {
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-card {
  width: min(25rem, 100%);
}

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.login-card > p {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.login-card form .btn {
  width: 100%;
  min-height: 2.6rem;
  margin-top: 1.1rem;
}

@media (max-width: 860px) {
  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 2rem 1.5rem;
  }
}

/* —— Searchable select (from the reference) —— */
.ss {
  position: relative;
  width: 100%;
}

.ss-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.ss-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  width: 100%;
  min-height: 2.35rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.86rem;
  text-align: left;
  cursor: pointer;
}

.ss.is-open .ss-trigger {
  border-color: var(--green-soft);
  box-shadow: var(--focus);
}

.ss-trigger-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ss-trigger.is-placeholder .ss-trigger-label {
  color: var(--ink-muted);
}

.ss-trigger-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex-shrink: 0;
  opacity: 0.55;
}

.ss-panel {
  position: absolute;
  top: calc(100% + 0.3rem);
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.ss-panel[hidden] {
  display: none !important;
}

.ss-search {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--page);
}

.ss-search:focus {
  outline: none;
  border-color: var(--green-soft);
}

.ss-options {
  list-style: none;
  max-height: 14rem;
  overflow-y: auto;
}

.ss-option {
  padding: 0.45rem 0.6rem;
  border-radius: 0.45rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.ss-option:hover,
.ss-option.is-active {
  background: rgba(7, 37, 22, 0.06);
}

.ss-option.is-selected {
  background: var(--success-bg);
  color: var(--success);
  font-weight: 600;
}

.ss-empty {
  padding: 0.6rem;
  text-align: center;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

/* —— Small screens —— */
@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .topbar {
    position: static;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.85rem 1rem;
  }

  .content {
    padding: 1rem;
  }
}

/* Searchable selects inside a filter bar match the compact filter controls. */
.filters .ss-trigger {
  min-height: 2.1rem;
  padding: 0.35rem 0.6rem;
  border-radius: 0.5rem;
  font-size: 0.82rem;
}

/* Small percentage input inside a brand membership row. */
.alloc-input {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--ink-muted);
  font-size: 0.8rem;
}

.alloc-input input {
  width: 4rem;
  min-height: 1.9rem;
  padding: 0.2rem 0.4rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  text-align: right;
  background: var(--surface);
}

.alloc-input input:disabled {
  background: var(--surface-muted);
}

/* Fields revealed by a choice (e.g. login account options). */
.login-section {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.login-section[hidden] {
  display: none;
}

/* —— Projects —— */
.project-head {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.project-head-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.1rem 0.4rem;
}

.project-head-title strong {
  font-size: 1rem;
}

.project-key {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.45rem;
  border-radius: 0.35rem;
  background: var(--green);
  color: var(--cream);
}

.project-tabs {
  border-bottom: 0;
}

.task-key {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ink-muted);
  white-space: nowrap;
}

.task-key.is-done {
  text-decoration: line-through;
}

.priority {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.priority::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 2px;
  background: currentColor;
}

.priority-critical { color: #b42318; }
.priority-high { color: #c2410c; }
.priority-normal { color: #1d4f91; }
.priority-low { color: rgba(7, 37, 22, 0.45); }

.progress {
  height: 0.4rem;
  border-radius: 999px;
  background: rgba(7, 37, 22, 0.08);
  overflow: hidden;
  min-width: 4rem;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green-glow);
}

.progress.is-over span {
  background: var(--danger);
}

.effort {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 7rem;
}

.effort-text {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.text-danger {
  color: var(--danger);
}

/* —— Board —— */
.board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem;
}

.board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(250px, 1fr);
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  align-items: start;
}

.board-column {
  background: rgba(7, 37, 22, 0.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 12rem;
}

.board-column.is-drop-target {
  border-color: var(--green-glow);
  background: var(--success-bg);
}

.board-column-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
}

.board-cards {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0 0.5rem 0.6rem;
  flex: 1;
}

.board-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.55rem 0.65rem;
  box-shadow: var(--shadow-sm);
  cursor: grab;
}

.board-card:hover {
  border-color: rgba(26, 79, 53, 0.35);
}

.board-card.is-dragging {
  opacity: 0.5;
}

.board-card-title {
  display: block;
  font-weight: 600;
  font-size: 0.83rem;
  line-height: 1.35;
  margin: 0.2rem 0 0.4rem;
}

.board-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
}

/* —— Task page —— */
.task-description {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.88rem;
  line-height: 1.6;
}

.comment {
  padding: 0.75rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.comment:last-child {
  border-bottom: 0;
}

.comment-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  font-size: 0.8rem;
}

.comment-body {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 0.85rem;
}

.inline-form {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.inline-form select {
  min-height: 2rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  background: var(--surface);
  font-size: 0.82rem;
}

/* —— Timesheet —— */
.week-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.day-group + .day-group {
  border-top: 1px solid var(--line);
}

.day-head {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 1.1rem;
  background: var(--surface-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.day-head.is-today {
  color: var(--green-glow);
}

/* —— Attachments —— */
.attachment-thumb {
  width: 2.75rem;
  height: 2.75rem;
  object-fit: cover;
  border-radius: 0.45rem;
  border: 1px solid var(--line);
}

.attachment-icon {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 0.45rem;
  background: rgba(7, 37, 22, 0.06);
  color: var(--ink-soft);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.filters input[type="file"] {
  padding: 0.3rem;
  background: var(--surface);
}

/* —— CRM —— */
.activity-form textarea.input {
  min-height: 2.6rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.5rem;
  width: 100%;
  font-size: 0.82rem;
  resize: vertical;
}

.timeline li.activity {
  grid-template-columns: 10px minmax(0, 1fr) auto;
}

.timeline li.activity.is-open::before {
  background: #b48c28;
}

.timeline li.activity.is-overdue::before {
  background: var(--danger);
}

.timeline .row-actions {
  align-items: center;
}

.duplicate-warning ul {
  margin: 0.4rem 0 0 1.1rem;
  font-weight: 500;
}

.duplicate-warning .check strong {
  font-weight: 600;
}

.money {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.board-column-total {
  display: block;
  padding: 0 0.75rem 0.5rem;
  font-size: 0.72rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.stage-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.stage-steps button {
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink-soft);
}

.stage-steps button.is-passed {
  background: var(--success-bg);
  border-color: rgba(47, 122, 82, 0.25);
  color: var(--success);
}

.stage-steps button.is-current {
  background: var(--green);
  border-color: var(--green);
  color: var(--cream);
}

.stage-steps button:disabled {
  cursor: default;
}

/* —— Quotes —— */
.quote-lines textarea,
.quote-lines input,
.quote-lines select {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.45rem;
  background: var(--surface);
  font-size: 0.82rem;
}

.quote-lines textarea {
  resize: vertical;
  min-width: 14rem;
}

.quote-lines input {
  min-width: 4.5rem;
  text-align: right;
}

.quote-lines select {
  min-width: 9rem;
}

.quote-totals {
  min-width: 18rem;
  grid-template-columns: 1fr auto;
}

.quote-totals dd {
  text-align: right;
}

/* Multi-person assignee picker on the task form. */
.assignee-list {
  max-height: 14rem;
  overflow-y: auto;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
}

/* Per-person time entries, tucked under the person's row. */
.entry-details {
  margin-top: 0.25rem;
  font-size: 0.78rem;
}

.entry-details summary {
  cursor: pointer;
  color: var(--ink-muted);
  font-weight: 600;
}

.entry-details ul {
  list-style: none;
  margin-top: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.entry-details li {
  display: grid;
  grid-template-columns: 5.5rem minmax(0, 1fr) auto auto;
  gap: 0.6rem;
  align-items: baseline;
}

.data-table tfoot th {
  background: var(--surface-muted);
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  border-top: 1px solid var(--line-strong);
}

.avatar-stack {
  display: inline-flex;
}

.avatar-stack .avatar + .avatar {
  margin-left: -0.4rem;
  box-shadow: 0 0 0 2px var(--surface);
}

/* —— Leave —— */
.leave-balance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.leave-balance-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.leave-balance-num {
  margin-left: auto;
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  color: var(--navy);
}

.leave-type-dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.leave-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.leave-decide-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.leave-calendar-wrap {
  overflow-x: auto;
}

.leave-calendar {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  min-width: 48rem;
}

.leave-calendar th,
.leave-calendar td {
  border: 1px solid var(--line);
  text-align: center;
  padding: 0;
  height: 1.6rem;
  min-width: 1.35rem;
}

.leave-calendar-name {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--surface);
  text-align: left !important;
  padding: 0.45rem 0.65rem !important;
  min-width: 9rem;
  font-weight: 600;
}

.leave-calendar thead th {
  font-weight: 600;
  color: var(--ink-muted);
  background: rgba(24, 24, 56, 0.03);
}

.leave-calendar .is-weekend {
  background: rgba(24, 24, 56, 0.04);
}

.leave-calendar .has-leave {
  background: color-mix(in srgb, var(--leave-color, #00a0f8) 55%, white);
}

.leave-calendar .has-leave.is-pending {
  background: repeating-linear-gradient(
    -45deg,
    color-mix(in srgb, var(--leave-color, #f09818) 45%, white),
    color-mix(in srgb, var(--leave-color, #f09818) 45%, white) 4px,
    color-mix(in srgb, var(--leave-color, #f09818) 20%, white) 4px,
    color-mix(in srgb, var(--leave-color, #f09818) 20%, white) 8px
  );
}

@media (max-width: 900px) {
  .leave-balance-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.month-detail-modal {
  width: min(40rem, calc(100vw - 2rem));
}

.month-detail-section {
  margin-bottom: 0.9rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: rgba(24, 24, 56, 0.03);
}

.month-detail-section header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
}

.month-detail-section header strong {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.month-detail-empty {
  margin: 0;
  font-size: 0.82rem;
}

.month-detail-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.month-detail-list li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
}

.month-detail-list li div {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.month-detail-list li .soft {
  font-size: 0.72rem;
}

.month-detail-list .money {
  font-weight: 700;
  white-space: nowrap;
}

/* ==========================================================================
   Design system v2 — presentation only.
   No markup, route or behaviour depends on this layer. It re-skins the
   original rules above: calm neutral canvas, white cards, one strong accent,
   generous spacing, clear type scale, and a mobile drawer navigation.
   ========================================================================== */

:root {
  --brand: #0b78c4;          /* accessible action blue (white text 4.9:1) */
  --brand-hover: #095f9b;
  --brand-tint: rgba(0, 160, 248, 0.1);
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-muted: #f8f9fc;
  --line: #e6e9f1;
  --line-strong: #cdd3e0;
  --ink: #14142e;
  --ink-soft: #4b5068;
  --ink-muted: #6b7088;
  --success: #0b7a5c;
  --success-bg: #e3f6ef;
  --warning: #8a5a00;
  --warning-bg: #fff3d9;
  --danger: #b42318;
  --danger-bg: #fdecea;
  --info: #0b6fb3;
  --info-bg: #e4f3fd;
  --radius: 0.65rem;
  --radius-lg: 1rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow-sm: 0 1px 2px rgba(20, 20, 46, 0.04), 0 1px 3px rgba(20, 20, 46, 0.04);
  --shadow-md: 0 12px 32px rgba(20, 20, 46, 0.14);
  --focus: 0 0 0 3px rgba(0, 160, 248, 0.28);
  --sidebar-w: 264px;
}

html { scroll-behavior: smooth; }

body {
  font-size: 0.9375rem;
  line-height: 1.55;
  background: var(--page);
  font-feature-settings: "cv11", "ss03";
}

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }

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

/* —— Sidebar —— */
.sidebar {
  padding: 1.1rem 0.8rem 0.9rem;
  gap: 0.9rem;
  background: #11112b;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
  padding: 0 0.2rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand-logo {
  width: 150px;
  border-radius: 0.6rem;
}

.sidebar-brand .sidebar-tagline { display: none; }

.sidebar-nav { gap: 0.15rem; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.18) transparent; }

.nav-link,
.nav-section-toggle,
.nav-sublink {
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.74);
  padding: 0.6rem 0.8rem;
  min-height: 2.6rem;
  border-radius: 0.7rem;
}

.sidebar-nav svg { opacity: 0.85; }

.nav-link:hover,
.nav-section-toggle:hover,
.nav-sublink:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

.nav-link.is-active {
  background: var(--cyan);
  color: #04111c;
  font-weight: 650;
  box-shadow: none;
}

.nav-link.is-active svg { opacity: 1; }

.nav-section[open] { background: transparent; padding-bottom: 0.25rem; }

.nav-section-toggle.is-current { color: #fff; font-weight: 650; background: transparent; }
.nav-section-toggle.is-current .nav-section-title svg { color: var(--cyan); opacity: 1; }

/* Sub-links hang off a guide line so the hierarchy reads at a glance. */
.nav-section-links {
  position: relative;
  margin-left: 1.5rem;
  padding: 0.1rem 0 0.15rem 0.5rem;
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  gap: 0.1rem;
}

.nav-sublink {
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  min-height: 2.3rem;
  color: rgba(255, 255, 255, 0.66);
}

.nav-sublink.is-active {
  background: rgba(0, 160, 248, 0.18);
  color: #fff;
  font-weight: 650;
  box-shadow: none;
}

.nav-divider { background: rgba(255, 255, 255, 0.08); }

.nav-area-label {
  font-family: var(--font);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.46);
  padding: 0.35rem 0.8rem 0.2rem;
}

.sidebar-footer {
  padding: 0.7rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.9rem;
}

.sidebar-user span { color: rgba(255, 255, 255, 0.66); }

.sidebar-footer .btn {
  color: rgba(255, 255, 255, 0.88);
  border-color: rgba(255, 255, 255, 0.2);
  background: transparent;
  min-height: 2.2rem;
}

.sidebar-footer .btn:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255,255,255,.35); }

.avatar { background: var(--cyan); color: #04111c; }

/* —— Top bar: sits on the canvas, no heavy band —— */
.topbar {
  padding: 1.25rem 2rem 0.9rem;
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  align-items: flex-end;
}

.topbar h1 {
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.topbar-subtitle { font-size: 0.9rem; margin-top: 0.15rem; color: var(--ink-soft); }

.breadcrumbs { font-size: 0.8rem; font-weight: 500; margin-bottom: 0.3rem; }
.breadcrumbs a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; }
.breadcrumbs a:hover { color: var(--brand); text-decoration-color: currentColor; }

.context-switch {
  background: var(--surface);
  border-color: var(--line-strong);
  padding: 0.2rem 0.3rem 0.2rem 0.8rem;
  box-shadow: var(--shadow-sm);
}

.context-switch label { font-size: 0.7rem; letter-spacing: 0.08em; }
.context-switch select { font-size: 0.875rem; font-weight: 650; }

.content {
  padding: 0.75rem 2rem 3rem;
  gap: 1.25rem;
  max-width: 1680px;
  width: 100%;
}

/* —— Buttons —— */
.btn {
  min-height: 2.55rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 0.65rem;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.btn:active:not(:disabled) { transform: translateY(1px); }

.btn-primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 1px 2px rgba(11, 120, 196, 0.3);
}

.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }

.btn-secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-sm); }
.btn-secondary:hover { border-color: var(--brand); color: var(--brand); background: var(--surface); }

.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover { background: rgba(20, 20, 46, 0.06); color: var(--ink); }

.btn-danger { background: var(--surface); color: var(--danger); border-color: #f1c3be; }
.btn-danger:hover { background: var(--danger-bg); border-color: var(--danger); }

.btn-sm { min-height: 2.15rem; padding: 0.3rem 0.8rem; font-size: 0.84rem; border-radius: 0.55rem; }

/* —— Cards —— */
.panel {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.panel-head { padding: 1rem 1.35rem; border-bottom-color: var(--line); }
.panel-head h2 { font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em; }
.panel-head p { font-size: 0.85rem; color: var(--ink-soft); margin-top: 0.1rem; }
.panel-body { padding: 1.25rem 1.35rem 1.4rem; }
.panel-foot { padding: 0.8rem 1.35rem; background: var(--surface-muted); }

/* —— KPI cards —— */
.kpi {
  position: relative;
  padding: 1.1rem 1.25rem 1.15rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--cyan);
}

.kpi:nth-child(2)::before { background: var(--orange); }
.kpi:nth-child(3)::before { background: var(--navy-soft); }
.kpi:nth-child(4)::before { background: var(--success); }
.kpi-danger::before { background: #d92d20 !important; }

.kpi span { font-size: 0.84rem; font-weight: 500; color: var(--ink-soft); margin-bottom: 0.4rem; }
.kpi strong { font-size: 1.7rem; font-weight: 700; letter-spacing: -0.03em; }

/* —— Tables —— */
.data-table { font-size: 0.9rem; }

.data-table th,
.data-table td { padding: 0.9rem 1rem; border-bottom-color: var(--line); }

.data-table th:first-child,
.data-table td:first-child { padding-left: 1.35rem; }
.data-table th:last-child,
.data-table td:last-child { padding-right: 1.35rem; }

.data-table thead th {
  background: var(--surface-muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-strong);
}

.data-table tbody tr { transition: background 0.12s; }
.data-table tbody tr:hover { background: #f3f8fd; }

.cell-main { font-weight: 600; }
a.cell-main:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }
.cell-sub { font-size: 0.8rem; }

/* —— Badges: tinted pill with a status dot —— */
.badge {
  padding: 0.22rem 0.65rem 0.22rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 600;
  background: #eef0f6;
  color: var(--ink-soft);
}

.badge::before {
  content: "";
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.badge-dark { background: var(--navy); color: #fff; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }

/* —— Flash —— */
.flash { padding: 0.9rem 1.1rem; font-size: 0.9rem; border-left-width: 4px; border-radius: var(--radius); }
.flash-success { border-left-color: var(--success); background: var(--success-bg); }
.flash-error { border-left-color: var(--danger); background: var(--danger-bg); }

/* —— Empty states —— */
.empty-state { padding: 3.25rem 1.5rem; }
.empty-state strong { font-size: 1.05rem; }

/* —— Filters —— */
.filters { padding: 1rem 1.35rem; gap: 0.85rem; align-items: flex-end; }
.filters label { font-size: 0.75rem; letter-spacing: 0.03em; color: var(--ink-soft); font-weight: 650; }
.filters input,
.filters select,
.filters .ss-trigger { min-height: 2.5rem; font-size: 0.9rem; border-radius: 0.6rem; }
.filters-actions { align-self: flex-end; }
.filters-actions .btn { min-height: 2.5rem; }

/* —— Forms —— */
.field > label,
.field-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.1rem 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
  min-height: 1.15rem;
}

.optional { font-size: 0.78rem; }
.field-hint { font-size: 0.82rem; }
.field-error { font-size: 0.84rem; }

.field + .field,
.field-row + .field,
.field + .field-row,
.field-row + .field-row { margin-top: 1.1rem; }

.field-row { gap: 1rem; align-items: start; }
.field-row > .field + .field,
.field-row > .field { margin-top: 0; }

.input,
.field input:not([type]),
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="number"],
.field input[type="date"],
.field input[type="search"],
.field input[type="tel"],
.field select,
.field textarea {
  min-height: 2.65rem;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  border-radius: 0.65rem;
  border-color: var(--line-strong);
}

.field input:hover:not(:disabled):not(:focus),
.field select:hover:not(:disabled):not(:focus),
.field textarea:hover:not(:focus) { border-color: #9aa3bb; }

.field input:focus,
.field select:focus,
.field textarea:focus,
.filters input:focus,
.filters select:focus { border-color: var(--cyan); box-shadow: var(--focus); }

.field input::placeholder,
.field textarea::placeholder { color: var(--ink-muted); opacity: 0.75; }

.form-section-title { font-size: 0.8rem; color: var(--ink-soft); }
.check { font-size: 0.92rem; }
.check input { width: 1.1rem; height: 1.1rem; accent-color: var(--brand); }
.check > span > span { font-size: 0.82rem; }

.form-actions { padding: 0.9rem 1.35rem; }

/* The save bar stays reachable on long forms. */
.form-actions.standalone {
  position: sticky;
  bottom: 0.75rem;
  z-index: 15;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 32px rgba(20, 20, 46, 0.14);
}

/* —— Detail lists, tabs —— */
.dl { font-size: 0.9rem; }
.dl dt { font-weight: 500; color: var(--ink-soft); }

.tabs { padding: 0 1.35rem; gap: 0.25rem; }
.tabs a { padding: 0.85rem 0.95rem; font-size: 0.9rem; font-weight: 500; border-radius: 0.5rem 0.5rem 0 0; }
.tabs a:hover { background: rgba(20, 20, 46, 0.04); color: var(--ink); }
.tabs a.is-active { font-weight: 700; border-bottom: 3px solid var(--cyan); color: var(--ink); }

/* —— Projects, board, pipeline —— */
.project-key { background: var(--navy); color: #fff; border-radius: 0.4rem; }
.priority-low { color: var(--ink-muted); }
.progress { height: 0.45rem; background: #e8ebf3; }
.progress span { background: linear-gradient(90deg, var(--cyan), var(--brand)); }

.board { gap: 1rem; }

.board-column {
  background: #eceff7;
  border-color: transparent;
  border-radius: var(--radius-lg);
}

.board-column.is-drop-target { background: var(--info-bg); border: 1px dashed var(--cyan); }

.board-column-head {
  padding: 0.85rem 0.95rem 0.65rem;
  font-size: 0.78rem;
  color: var(--ink);
}

.board-cards { padding: 0 0.6rem 0.7rem; gap: 0.55rem; }

.board-card {
  padding: 0.75rem 0.85rem;
  border-radius: 0.75rem;
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
}

.board-card:hover { border-color: var(--cyan); box-shadow: 0 6px 18px rgba(20, 20, 46, 0.1); transform: translateY(-1px); }
.board-card-title { font-size: 0.9rem; }
.board-card-meta { font-size: 0.78rem; }
.board-column-total { font-size: 0.78rem; }

.stage-steps button { padding: 0.4rem 0.85rem; font-size: 0.8rem; }
.stage-steps button.is-passed { background: var(--success-bg); color: var(--success); }
.stage-steps button.is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* —— Dialogs —— */
.modal::backdrop { background: rgba(12, 14, 34, 0.55); backdrop-filter: blur(3px); }

/* —— Profit meter labels —— */
.profit-meter-mark-label { font-size: 0.72rem; background: var(--surface); padding: 0 0.25rem; border-radius: 0.25rem; }

/* —— Login —— */
.login-brand {
  background:
    radial-gradient(ellipse 70% 55% at 15% 10%, rgba(0, 160, 248, 0.32), transparent 55%),
    radial-gradient(ellipse 45% 40% at 90% 90%, rgba(240, 152, 24, 0.2), transparent 50%),
    linear-gradient(160deg, #0c0e22, var(--navy) 60%, var(--navy-mid));
}

.login-brand h1 { font-size: clamp(2.1rem, 3.4vw, 3rem); }
.login-brand .lede { color: rgba(255, 255, 255, 0.8); }
.login-brand-list span { color: rgba(255, 255, 255, 0.85); border-color: rgba(255, 255, 255, 0.22); }
.login-panel { background: var(--surface); }
.login-card h2 { font-size: 1.65rem; }
.login-card form .btn { min-height: 2.9rem; font-size: 1rem; }

/* —— Mobile navigation: sidebar becomes a slide-in drawer —— */
.nav-toggle,
.nav-scrim { display: none; }

@media (max-width: 900px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    flex-shrink: 0;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--surface);
    cursor: pointer;
    box-shadow: var(--shadow-sm);
  }

  .nav-toggle svg { width: 1.25rem; height: 1.25rem; }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 19rem);
    height: 100dvh;
    z-index: 60;
    transform: translateX(-102%);
    transition: transform 0.22s ease;
    box-shadow: var(--shadow-md);
  }

  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }

  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(12, 14, 34, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s;
  }

  body.nav-open .nav-scrim { opacity: 1; pointer-events: auto; }

  .topbar {
    position: sticky;
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    border-bottom-color: var(--line);
  }

  .topbar-title { flex: 1 1 0; }
  .topbar h1 { font-size: 1.2rem; }
  .topbar-actions { flex: 1 1 100%; justify-content: flex-start; }
  .content { padding: 1rem 1rem 2.5rem; }
  .form-actions.standalone { bottom: 0; }
  .panel-body.flush { overflow-x: auto; }
}

@media (max-width: 700px) {
  .data-table { min-width: 40rem; }
}

@media print {
  .sidebar, .nav-toggle, .nav-scrim, .form-actions.standalone { display: none !important; }
}

/* Profit meter: stagger the "you" label so it never collides with "expenses". */
.profit-meter-mark-label { background: none; padding: 0; }
.profit-meter-mark-you .profit-meter-mark-label { margin-top: 1.15rem; color: var(--brand); }

/* Bare selects outside .field (year picker, brand switcher) match inputs. */
.forecast-year-form select,
.forecast-year-nav select {
  min-height: 2.4rem;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 0.6rem;
  background: var(--surface);
  font-weight: 600;
}

/* ───────────── Calendar ───────────── */

.cal-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.5rem;
}

.cal-nav,
.cal-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.cal-title {
  margin-left: 0.5rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.cal-views {
  display: inline-flex;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.cal-views a {
  padding: 0.38rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
}

.cal-views a + a {
  border-left: 1px solid var(--line);
}

.cal-views a.is-active {
  background: var(--brand);
  color: #fff;
}

.cal-picker select {
  min-height: 2.1rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.82rem;
  max-width: 16rem;
}

.cal-zone {
  font-size: 0.78rem;
  margin: 0 0 0.75rem;
}

.cal-legend {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.6rem;
  margin-left: 0.75rem;
}

.scope-dot {
  display: inline-block;
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  margin-right: 0.2rem;
  background: var(--cal-color);
}

.scope-personal { --cal-color: #5b5f8a; }
.scope-brand { --cal-color: #0b78c4; }
.scope-team { --cal-color: #7a4fc2; }
.scope-project { --cal-color: #c27a0b; }

.cal-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.cal-dow {
  padding: 0.45rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}

.cal-cell {
  min-height: 7.2rem;
  padding: 0.3rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  min-width: 0;
}

.cal-cell:nth-child(7n + 14) {
  border-right: 0;
}

.cal-cell.is-off {
  background: var(--surface-muted);
}

.cal-cell.is-off .cal-date {
  color: var(--ink-muted);
}

.cal-cell.is-today .cal-date {
  background: var(--brand);
  color: #fff;
}

.cal-date {
  align-self: flex-start;
  min-width: 1.5rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  text-align: center;
  color: var(--ink);
  text-decoration: none;
}

.cal-event {
  display: flex;
  align-items: baseline;
  gap: 0.3rem;
  min-width: 0;
  padding: 0.12rem 0.4rem;
  border-left: 3px solid var(--cal-color);
  border-radius: 4px;
  background: color-mix(in srgb, var(--cal-color) 12%, white);
  color: var(--ink);
  font-size: 0.74rem;
  line-height: 1.25;
  text-decoration: none;
  overflow: hidden;
}

.cal-event:hover {
  background: color-mix(in srgb, var(--cal-color) 22%, white);
}

.cal-event.is-all-day {
  background: var(--cal-color);
  color: #fff;
}

.cal-event.is-declined {
  opacity: 0.5;
  text-decoration: line-through;
}

.cal-event.is-tentative {
  border-left-style: dashed;
}

.cal-event-time {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
}

.cal-event.is-all-day .cal-event-time {
  color: inherit;
}

.cal-event-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.cal-event-flag {
  flex: none;
  margin-left: auto;
  color: var(--ink-muted);
}

.cal-more {
  font-size: 0.7rem;
  color: var(--ink-soft);
  padding: 0 0.4rem;
}

.cal-leave-chip {
  display: block;
  min-width: 0;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: color-mix(in srgb, var(--leave-color, #00a0f8) 22%, white);
  color: var(--ink-soft);
}

.cal-legend .cal-leave-chip {
  display: inline-block;
}

/* Week and day: an hour grid */

.cal-time {
  --hour: 3.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow-x: auto;
}

.cal-time-head,
.cal-time-allday,
.cal-time-body {
  display: grid;
  grid-template-columns: 3.6rem repeat(var(--cols), minmax(7rem, 1fr));
}

.cal-time-head {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--line);
}

.cal-time-day {
  padding: 0.45rem 0.6rem;
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-left: 1px solid var(--line);
}

.cal-time-day strong {
  font-size: 1rem;
  color: var(--ink);
}

.cal-time-day.is-today strong {
  color: var(--brand);
}

.cal-time-allday {
  border-bottom: 1px solid var(--line-strong);
}

.cal-time-allday .cal-gutter {
  font-size: 0.66rem;
  padding: 0.4rem 0.3rem;
  color: var(--ink-muted);
}

.cal-time-allday-cell {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding: 0.25rem;
  min-height: 1.8rem;
  border-left: 1px solid var(--line);
  min-width: 0;
}

.cal-time-body {
  height: calc(24 * var(--hour));
  position: relative;
}

.cal-hours {
  position: relative;
}

.cal-hours span {
  position: absolute;
  right: 0.4rem;
  transform: translateY(-50%);
  font-size: 0.66rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.cal-hours span:first-child {
  display: none;
}

.cal-time-col {
  position: relative;
  border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 100% var(--hour);
}

.cal-time-col.is-weekend {
  background-color: rgba(24, 24, 56, 0.025);
}

.cal-time-col.is-today {
  background-color: var(--brand-tint);
}

.cal-block {
  position: absolute;
  flex-direction: column;
  gap: 0;
  align-items: stretch;
  box-shadow: 0 0 0 1px #fff;
}

.cal-block .cal-event-title {
  white-space: normal;
}

/* Event page and form */

.event-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.event-title {
  font-size: 1.3rem;
  letter-spacing: -0.015em;
  margin: 0 0 0.25rem;
}

.event-title.is-cancelled {
  text-decoration: line-through;
  color: var(--ink-soft);
}

.event-when {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

.event-dl {
  margin-top: 0.9rem;
}

.subhead {
  margin: 1.1rem 0 0.4rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.attendee-status,
.link-list,
.occurrence-list,
.warning-list,
.notification-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.attendee-status li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}

.attendee-status li:last-child {
  border-bottom: 0;
}

.warning-list li {
  padding: 0.4rem 0.6rem;
  margin-bottom: 0.35rem;
  border-radius: 6px;
  background: var(--warning-bg);
  color: var(--warning);
  font-size: 0.84rem;
}

.link-list li {
  padding: 0.3rem 0;
  font-size: 0.85rem;
}

.occurrence-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}

.occurrence-list li.is-current {
  background: var(--brand-tint);
  font-weight: 600;
}

.occurrence-list li.is-past a {
  color: var(--ink-soft);
}

.reply-form .check {
  margin-bottom: 0.3rem;
}

.reply-buttons {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.6rem;
}

.action-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  border-bottom: 1px solid var(--line);
}

.action-item .action-text {
  flex: 1;
  font-size: 0.86rem;
}

.action-item.is-done .action-text {
  text-decoration: line-through;
  color: var(--ink-muted);
}

.action-check {
  width: 1.3rem;
  height: 1.3rem;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--success);
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.action-form {
  margin-top: 1rem;
}

.weekday-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.weekday input {
  position: absolute;
  opacity: 0;
}

.weekday span {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
}

.weekday input:checked + span {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.weekday input:focus-visible + span {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.attendee-filter {
  width: 100%;
  min-height: 2.1rem;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  font-size: 0.84rem;
}

.attendee-list {
  max-height: 16rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.attendee-list [hidden] {
  display: none;
}

.flash-warning {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 30%, white);
}

/* Notifications */

.notif-bell {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  color: var(--ink-soft);
}

.notif-bell:hover {
  background: var(--brand-tint);
}

.notif-bell svg {
  width: 1.2rem;
  height: 1.2rem;
}

.notif-count {
  position: absolute;
  top: -0.1rem;
  right: -0.15rem;
  min-width: 1.05rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.05rem;
  text-align: center;
}

.notification-list li a {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1rem;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.86rem;
}

.notification-list li.is-unread a {
  background: var(--brand-tint);
  font-weight: 600;
}

@media (max-width: 900px) {
  .cal-cell {
    min-height: 5rem;
  }

  .cal-event-time {
    display: none;
  }
}

/* Leave: holidays and half days */

.leave-calendar .is-holiday {
  background: repeating-linear-gradient(135deg, rgba(24, 24, 56, 0.08) 0 3px, transparent 3px 6px);
}

.leave-calendar .has-leave.is-half {
  background: linear-gradient(135deg, color-mix(in srgb, var(--leave-color, #00a0f8) 55%, white) 50%, transparent 50%);
}

.cal-holiday-chip {
  display: block;
  min-width: 0;
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--warning-bg);
  color: var(--warning);
}

.cal-legend .cal-holiday-chip {
  display: inline-block;
}

.nav-badge {
  margin-left: 0.4rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: var(--orange);
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
}

/* Monthly labor report: click a row for the employee's tasks. */
.row-clickable { cursor: pointer; }
.row-clickable:hover td, .row-clickable:focus-visible td { background: var(--surface-muted); }
.employee-detail-modal { width: min(38rem, calc(100vw - 2rem)); overflow-y: auto; }
.employee-detail-project { display: flex; justify-content: space-between; gap: 1rem; margin: 0.9rem 0 0.25rem; font-size: 0.9rem; }

.employee-detail-modal .modal-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.employee-detail-tasks { list-style: none; margin: 0; padding: 0; }
.employee-detail-tasks li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.25rem 0; font-size: 0.875rem; }

.field-label + .weekday-picker { margin-top: 0.4rem; }

.inline-filter select { width: auto; min-width: 10rem; }

.field-row.reminder-row { grid-template-columns: minmax(0, 1fr); gap: 0.35rem; }
.field-row.reminder-row + .field-row.reminder-row { margin-top: 0.85rem !important; }
