:root {
  --black: #080808;
  --ink: #101010;
  --panel: #131312;
  --panel-raised: #1a1918;
  --panel-soft: #252321;
  --line: rgba(255, 245, 235, 0.1);
  --line-strong: rgba(255, 245, 235, 0.18);
  --white: #f6f1eb;
  --muted: #aaa39b;
  --dim: #716b65;
  --orange: #ff6f16;
  --orange-bright: #ffab73;
  --orange-soft: rgba(255, 111, 22, 0.14);
  --red: #ff5c45;
  --green: #a3d977;
  --yellow: #e7c969;
  --radius-lg: 24px;
  --radius-md: 19px;
  --radius-sm: 13px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  --control-height: 40px;
  --control-radius: 12px;
  font-family: Aptos, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--white);
  background: var(--black);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--black);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--white);
  background: radial-gradient(circle at 84% 0%, rgba(255, 111, 22, 0.05), transparent 25rem), var(--black);
}

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

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 2px;
}

.app-shell {
  min-height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  color: var(--white);
  font-size: 0.77rem;
  font-weight: 800;
  letter-spacing: 0.15em;
}

.brand-slash {
  margin: 0 1px;
  color: var(--orange);
}

.brand-mark {
  display: flex;
  align-items: end;
  gap: 2px;
  width: 19px;
  height: 21px;
}

.brand-mark i {
  display: block;
  width: 5px;
  border-radius: 999px;
  background: var(--orange);
}

.brand-mark i:nth-child(1) {
  height: 8px;
}

.brand-mark i:nth-child(2) {
  height: 14px;
}

.brand-mark i:nth-child(3) {
  height: 21px;
}

.main-content {
  min-width: 0;
}

.topbar {
  display: flex;
  position: sticky;
  z-index: 5;
  top: 0;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 88px;
  padding: 16px clamp(22px, 4vw, 62px);
  border-bottom: 1px solid rgba(255, 245, 235, 0.08);
  background: rgba(8, 8, 8, 0.94);
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0;
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.3;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  letter-spacing: -0.045em;
}

h2 {
  letter-spacing: -0.05em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.sync-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.73rem;
  font-weight: 650;
}

.sync-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  content: "";
}

.sync-status.is-cloud::before {
  background: var(--green);
  box-shadow: 0 0 12px rgba(163, 217, 119, 0.75);
}

.sync-status.is-error::before {
  background: var(--red);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--control-height);
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--control-radius);
  color: var(--white);
  background: transparent;
  font-size: 0.79rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  border-color: #ff813c;
  color: #fffaf6;
  background: linear-gradient(145deg, #ed5b05 0%, #d74600 50%, #ad2f00 100%);
  box-shadow: inset 0 1px 0 rgba(255, 138, 72, 0.3), inset 0 -1px 0 rgba(74, 13, 0, 0.42), 0 8px 20px rgba(228, 70, 0, 0.28);
}

.button-primary span {
  font-size: 1.12rem;
  font-weight: 500;
  line-height: 0;
}

.button-quiet {
  border-color: rgba(255, 245, 235, 0.12);
  color: #e2dcd5;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.button-quiet:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
}

.button-danger {
  border-color: rgba(255, 92, 69, 0.4);
  color: #ff9888;
  background: rgba(255, 92, 69, 0.1);
}

.button-small {
  min-height: 33px;
  padding: 0 10px;
  border-radius: 9px;
  font-size: 0.71rem;
}

.button-text {
  min-height: 0;
  padding: 0;
  border: 0;
  color: var(--orange-bright);
  background: transparent;
  font-size: 0.75rem;
  font-weight: 750;
}

.button-text:hover {
  color: #ffc295;
}

.app-content {
  width: 100%;
  min-height: min(670px, calc(100vh - 180px));
  padding: clamp(22px, 3.5vw, 42px);
}

.filing-system {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 24px clamp(22px, 4vw, 62px) 60px;
}

.filing-tabs {
  display: flex;
  position: relative;
  z-index: 2;
  align-items: end;
  gap: 5px;
  overflow-x: auto;
  padding: 0 14px;
  scrollbar-width: none;
}

.filing-tabs::-webkit-scrollbar {
  display: none;
}

.filing-tab {
  display: inline-flex;
  position: relative;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 51px;
  padding: 0 21px;
  border: 1px solid rgba(255, 245, 235, 0.11);
  border-bottom: 0;
  border-radius: 17px 17px 0 0;
  color: var(--muted);
  background: linear-gradient(145deg, #121110, #0d0d0d);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  font-size: 0.76rem;
  font-weight: 760;
  letter-spacing: -0.01em;
  transition: color 160ms ease, background 160ms ease, border-color 160ms ease;
}

.filing-tab:hover {
  color: var(--white);
  border-color: rgba(255, 171, 115, 0.3);
  background: linear-gradient(145deg, #191716, #101010);
}

.filing-tab.is-active {
  z-index: 2;
  min-height: 56px;
  margin-bottom: -1px;
  border-color: rgba(255, 130, 61, 0.46);
  color: var(--white);
  background: #0c0c0c;
  box-shadow: inset 0 2px 0 rgba(255, 129, 56, 0.45), 0 -4px 15px rgba(0, 0, 0, 0.12);
}

.filing-tab.is-active::before {
  width: 6px;
  height: 6px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 10px rgba(255, 103, 14, 0.62);
  content: "";
}

.filing-tab-settings {
  margin-left: auto;
  color: var(--dim);
}

.filing-cabinet {
  position: relative;
  min-height: calc(100vh - 164px);
  border: 1px solid rgba(255, 245, 235, 0.11);
  border-radius: 23px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.028), rgba(255, 255, 255, 0.009)),
    #0b0b0b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), var(--shadow);
}

.home-dashboard,
.route-planner {
  display: grid;
  gap: 16px;
}

.home-followups {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
}

.home-followups .section-heading {
  align-items: start;
  margin-bottom: 15px;
}

.home-followups .section-heading p:not(.eyebrow) {
  margin-bottom: 0;
}

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

.sales-progress {
  background:
    linear-gradient(112deg, rgba(255, 102, 0, 0.07), transparent 45%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.038), rgba(255, 255, 255, 0.015));
}

.sales-progress .section-heading {
  align-items: end;
}

.sales-bar-chart {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: clamp(14px, 4vw, 46px);
  min-height: 246px;
  padding: 5px 7px 0;
}

.sales-bar {
  display: grid;
  grid-template-rows: auto 164px auto auto;
  gap: 7px;
  min-width: 0;
}

.sales-bar > strong {
  overflow: hidden;
  color: var(--white);
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sales-bar-track {
  display: flex;
  align-items: end;
  justify-content: center;
  overflow: hidden;
  height: 164px;
  padding: 0 18%;
  border-bottom: 1px solid rgba(255, 171, 115, 0.33);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent 40px, rgba(255, 255, 255, 0.055) 41px);
}

.sales-bar-track span {
  display: block;
  width: 100%;
  min-height: 0;
  border-radius: 10px 10px 2px 2px;
  background: linear-gradient(180deg, #ff8b32, #d64500);
  box-shadow: 0 0 18px rgba(236, 78, 0, 0.24);
  transition: height 180ms ease;
}

.sales-bar h3 {
  margin: 3px 0 0;
  color: #e0dbd4;
  font-size: 0.75rem;
}

.sales-bar p,
.sales-progress-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.4;
}

.sales-progress-note {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.home-empty,
.route-empty {
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.45;
}

.home-empty .button-text {
  justify-self: start;
  margin-top: 4px;
}

.route-heading {
  margin-bottom: 0;
}

.route-heading .toolbar-copy > .eyebrow {
  margin-bottom: 5px;
}

.route-controls {
  display: grid;
  grid-template-columns: minmax(165px, 0.34fr) minmax(260px, 0.66fr);
  gap: 14px;
  padding: 18px;
}

.route-controls .form-field > span {
  color: #c5c1ba;
  font-size: 0.7rem;
  font-weight: 700;
}

.route-controls > p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.route-planner-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.76fr);
  align-items: start;
  gap: 16px;
}

.route-stops,
.route-candidates {
  min-width: 0;
}

.route-stop-list,
.route-candidate-list {
  display: grid;
  gap: 8px;
}

.route-stop {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.route-stop-order {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 10px;
  color: var(--orange-bright);
  background: rgba(255, 102, 0, 0.12);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.68rem;
  font-weight: 800;
}

.route-stop-details {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.route-stop-details strong,
.route-stop-details span,
.route-stop-details small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-stop-details strong {
  color: var(--white);
  font-size: 0.76rem;
}

.route-stop-details span {
  color: var(--muted);
  font-size: 0.66rem;
}

.route-stop-details small {
  color: var(--orange-bright);
  font-size: 0.6rem;
  font-weight: 700;
}

.route-stop-details:hover strong {
  color: var(--orange-bright);
}

.route-stop-controls {
  display: flex;
  gap: 5px;
}

.route-stop-controls .icon-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  font-size: 0.72rem;
}

.route-stop-controls .icon-button:disabled {
  cursor: default;
  opacity: 0.32;
}

.route-warning {
  margin: 12px 0 0;
  color: #ff9a86;
  font-size: 0.69rem;
  line-height: 1.45;
}

.route-candidate {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.018);
  cursor: pointer;
}

.route-candidate:hover {
  border-color: rgba(255, 145, 67, 0.34);
}

.route-candidate.is-scheduled {
  border-color: rgba(255, 111, 22, 0.25);
}

.route-candidate input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--orange);
}

.route-candidate > span {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.route-candidate strong,
.route-candidate small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.route-candidate strong {
  color: #e2ddd6;
  font-size: 0.72rem;
}

.route-candidate small {
  color: var(--muted);
  font-size: 0.64rem;
}

.route-candidate b {
  color: var(--orange-bright);
  font-size: 0.62rem;
  white-space: nowrap;
}

.hero-panel {
  display: grid;
  position: relative;
  grid-template-columns: minmax(0, 1.15fr) minmax(255px, 0.85fr);
  gap: 32px;
  overflow: hidden;
  min-height: 240px;
  padding: clamp(27px, 4vw, 48px);
  border: 1px solid rgba(255, 126, 35, 0.28);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 85% 24%, rgba(255, 106, 0, 0.38), transparent 10rem),
    radial-gradient(circle at 72% 110%, rgba(255, 106, 0, 0.14), transparent 20rem),
    linear-gradient(115deg, #17110e, #111111 72%);
  box-shadow: var(--shadow);
}

.hero-panel::before,
.hero-panel::after {
  position: absolute;
  border: 1px solid rgba(255, 183, 127, 0.26);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.hero-panel::before {
  top: -118px;
  right: -95px;
  width: 300px;
  height: 300px;
}

.hero-panel::after {
  right: 102px;
  bottom: -168px;
  width: 255px;
  height: 255px;
}

.hero-copy,
.hero-focus {
  position: relative;
  z-index: 1;
}

.hero-title {
  max-width: 600px;
  margin: 10px 0 15px;
  font-size: clamp(2.05rem, 4vw, 3.75rem);
  line-height: 0.98;
}

.hero-copy > p:not(.eyebrow) {
  max-width: 520px;
  margin-bottom: 23px;
  color: #c4c0ba;
  font-size: 0.93rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-focus {
  align-self: end;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  background: rgba(4, 4, 4, 0.38);
  backdrop-filter: blur(8px);
}

.focus-number {
  display: block;
  margin-top: 8px;
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4.2rem);
  font-weight: 760;
  letter-spacing: -0.07em;
  line-height: 0.9;
}

.focus-caption {
  display: block;
  margin-top: 9px;
  color: #b9b5ae;
  font-size: 0.77rem;
  line-height: 1.45;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin: 20px 0;
}

.metric-card {
  min-height: 126px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
}

.metric-card.accent {
  border-color: rgba(255, 102, 0, 0.35);
  background: linear-gradient(145deg, rgba(255, 102, 0, 0.2), rgba(255, 102, 0, 0.035));
}

.metric-label {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 670;
}

.metric-value {
  display: block;
  margin-top: 13px;
  color: var(--white);
  font-size: 2rem;
  font-weight: 760;
  letter-spacing: -0.06em;
  line-height: 1;
}

.metric-note {
  display: block;
  margin-top: 9px;
  color: var(--dim);
  font-size: 0.69rem;
}

.split-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 20px;
}

.surface {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.036), rgba(255, 255, 255, 0.018));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.surface-padding {
  padding: clamp(20px, 2.6vw, 30px);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.section-heading h2,
.section-heading h3 {
  margin-bottom: 0;
  font-size: 1.08rem;
}

.section-heading .eyebrow {
  margin: 0 0 6px;
  color: var(--orange-bright);
}

.section-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.daily-progress { height:6px; margin:0 0 13px; overflow:hidden; border-radius:999px; background:rgba(255,255,255,.07); }
.daily-progress span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--orange),var(--orange-bright)); box-shadow:0 0 14px rgba(255,111,22,.55); transition:width 220ms ease; }
.priority-followup { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:10px; padding:8px; border:1px solid transparent; border-radius:14px; background:rgba(255,255,255,.018); }
.priority-followup:hover { border-color:var(--line); background:rgba(255,255,255,.035); }
.priority-followup-main { display:grid; grid-template-columns:39px minmax(0,1fr); align-items:center; gap:10px; min-width:0; padding:0; border:0; color:inherit; background:transparent; text-align:left; }
.priority-followup-main strong,.priority-followup-main small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }.priority-followup-main strong { color:var(--white); font-size:.76rem; }.priority-followup-main small { margin-top:3px; color:var(--muted); font-size:.65rem; }
.priority-followup-complete { min-height:31px; padding:0 10px; border:1px solid rgba(255,171,115,.3); border-radius:9px; color:var(--orange-bright); background:rgba(255,111,22,.08); font-size:.65rem; font-weight:800; }.priority-followup-complete:hover { background:rgba(255,111,22,.17); }.priority-followup.is-complete { opacity:.55; }.priority-followup.is-complete .priority-followup-complete { border-color:rgba(163,217,119,.3); color:var(--green); background:rgba(163,217,119,.07); }

.action-row {
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 17px;
  color: inherit;
  background: transparent;
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease;
}

.action-row:hover {
  border-color: var(--line);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.02));
}

.action-row.overdue {
  border-color: rgba(255, 92, 69, 0.22);
  background: rgba(255, 92, 69, 0.05);
}

.avatar {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid rgba(255, 153, 78, 0.34);
  border-radius: 16px;
  color: var(--orange-bright);
  background: linear-gradient(145deg, rgba(255, 162, 94, 0.2), rgba(255, 97, 9, 0.08));
  box-shadow: inset 0 1px 0 rgba(255, 230, 210, 0.12);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.action-company,
.relationship-company {
  overflow: hidden;
  color: var(--white);
  font-size: 0.82rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-person,
.relationship-person {
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.71rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-when {
  min-width: 75px;
  color: var(--orange-bright);
  font-size: 0.69rem;
  font-weight: 700;
  text-align: right;
}

.action-row.overdue .action-when {
  color: #ff9180;
}

.rule-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rule-list li {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  color: #c4c0ba;
  font-size: 0.79rem;
  line-height: 1.5;
}

.rule-list li:first-child {
  padding-top: 0;
}

.rule-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rule-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--white);
  font-size: 0.75rem;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 19px;
}

.toolbar-copy h2 {
  margin-bottom: 5px;
  font-size: 1.35rem;
}

.toolbar-copy p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

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

.filter-bar {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) auto auto;
  gap: 9px;
  margin-bottom: 17px;
}

.relationship-filter-bar {
  grid-template-columns: minmax(190px, 1fr) auto auto auto auto;
}

.pipeline-pattern-orders { border-color: rgba(255, 171, 115, .26); background: radial-gradient(circle at 92% 0, rgba(255, 111, 22, .12), transparent 17rem), rgba(255,255,255,.025); }
.pattern-reorder { border-left: 3px solid var(--orange); }

.search-field {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--dim);
  background: rgba(255, 255, 255, 0.025);
}

.search-field::before {
  width: 9px;
  height: 9px;
  margin-right: 9px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  content: "";
}

.search-field::after {
  width: 5px;
  height: 1.5px;
  margin-left: -4px;
  transform: rotate(45deg) translateY(4px);
  transform-origin: left;
  background: currentColor;
  content: "";
}

.search-field input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 0.79rem;
}

.search-field input::placeholder {
  color: var(--dim);
}

.select-field,
.form-field select,
.form-field input,
.form-field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--white);
  background-color: #111;
}

.select-field {
  min-height: var(--control-height);
  padding: 0 29px 0 11px;
  font-size: 0.76rem;
}

.relationship-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.result-count {
  color: var(--muted);
  font-size: 0.72rem;
}

.relationship-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(275px, 1fr));
  gap: 12px;
}

.relationship-card {
  display: flex;
  flex-direction: column;
  min-height: 244px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.relationship-card:hover {
  border-color: rgba(255, 145, 67, 0.38);
  background: linear-gradient(140deg, rgba(255, 102, 0, 0.1), rgba(255, 255, 255, 0.02));
  transform: translateY(-2px);
}

.relationship-card.is-clickable {
  cursor: pointer;
}

.relationship-card.is-clickable:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
}

.relationship-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.relationship-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.relationship-copy {
  display: block;
  min-width: 0;
}

.relationship-identity .avatar {
  flex: 0 0 auto;
}

.relationship-company {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.89rem;
}

.relationship-person {
  max-width: 174px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.015em;
  white-space: nowrap;
}

.pill.confirmed,
.pill.won {
  border-color: rgba(163, 217, 119, 0.35);
  color: var(--green);
  background: rgba(163, 217, 119, 0.09);
}

.pill.likely,
.pill.quoted {
  border-color: rgba(231, 201, 105, 0.34);
  color: var(--yellow);
  background: rgba(231, 201, 105, 0.08);
}

.pill.verify,
.pill.lost {
  border-color: rgba(255, 145, 67, 0.38);
  color: var(--orange-bright);
  background: rgba(255, 102, 0, 0.1);
}

.relationship-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 14px 0 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 7px;
  color: #c6c2bc;
  background: rgba(255, 255, 255, 0.055);
  font-size: 0.66rem;
}

.tag.relationship-status {
  border: 1px solid var(--line);
  font-weight: 750;
}

.tag.relationship-status.is-customer {
  border-color: rgba(163, 217, 119, 0.3);
  color: var(--green);
  background: rgba(163, 217, 119, 0.08);
}

.tag.relationship-status.is-prospect {
  border-color: rgba(255, 145, 67, 0.3);
  color: var(--orange-bright);
  background: rgba(255, 102, 0, 0.08);
}

.tag.customer-code {
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-weight: 700;
}

.relationship-tags .pill {
  min-height: 23px;
}

.relationship-average {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.68rem;
}

.relationship-context {
  overflow: hidden;
  margin: 8px 0 0;
  color: var(--dim);
  font-size: .66rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.relationship-footer { margin-top: auto; }
.card-open { margin-top: 11px; }

.relationship-average strong {
  color: var(--orange-bright);
  font-size: 0.8rem;
}

.relationship-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.contact-timing-label {
  display: block;
  color: var(--dim);
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.contact-timing-value {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #dedad4;
  font-size: 0.69rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contact-timing-value.overdue {
  color: #ff8c7a;
}

.card-open {
  width: 100%;
  margin-top: 12px;
  padding: 0;
  border: 0;
  color: var(--orange-bright);
  background: transparent;
  font-size: 0.71rem;
  font-weight: 750;
  text-align: left;
}

.card-open:hover {
  color: #ffc295;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding: 35px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  text-align: center;
}

.empty-state h3 {
  margin: 12px 0 7px;
  color: var(--white);
  font-size: 1rem;
}

.empty-state p {
  max-width: 360px;
  margin-bottom: 17px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.empty-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 102, 0, 0.35);
  border-radius: 15px;
  color: var(--orange);
  background: var(--orange-soft);
  font-size: 1.5rem;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.3fr);
  gap: 20px;
}

.calendar-surface {
  padding: clamp(16px, 2.5vw, 27px);
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 19px;
}

.calendar-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.calendar-helper {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.67rem;
}

.month-controls {
  display: flex;
  gap: 7px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1rem;
}

.icon-button:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.075);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-weekdays span {
  padding: 4px 7px;
  color: var(--dim);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.calendar-cell {
  min-height: 104px;
  overflow: hidden;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.012);
}

.calendar-cell.is-actionable {
  cursor: pointer;
  transition: background 150ms ease, box-shadow 150ms ease;
}

.calendar-cell.is-actionable:hover {
  background: rgba(255, 102, 0, 0.065);
  box-shadow: inset 0 0 0 1px rgba(255, 145, 67, 0.2);
}

.calendar-cell.is-actionable:focus-visible {
  z-index: 1;
  outline: 2px solid var(--orange-bright);
  outline-offset: -2px;
}

.calendar-cell:nth-child(7n + 1) {
  border-left: 1px solid var(--line);
}

.calendar-cell:nth-child(-n + 7) {
  border-top: 1px solid var(--line);
}

.calendar-cell.is-outside {
  background: rgba(0, 0, 0, 0.18);
}

.calendar-cell.is-today {
  background: rgba(255, 102, 0, 0.08);
}

.calendar-day {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-bottom: 5px;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.calendar-cell.is-today .calendar-day {
  color: #1e0c02;
  background: var(--orange);
}

.calendar-cell.is-outside .calendar-day {
  color: #454440;
}

.calendar-events {
  display: grid;
  gap: 3px;
}

.calendar-event {
  overflow: hidden;
  width: 100%;
  padding: 4px 5px;
  border: 0;
  border-left: 2px solid #48c8c1;
  border-radius: 3px;
  color: #d9d4cb;
  background: rgba(72, 200, 193, 0.12);
  font-size: 0.6rem;
  font-weight: 650;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-add {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 23px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.calendar-add-label {
  opacity: 0;
  color: var(--orange-bright);
  font-size: .58rem;
  font-weight: 800;
  transition: opacity 140ms ease;
}

.calendar-cell:hover .calendar-add-label,
.calendar-add:focus-visible .calendar-add-label { opacity: 1; }

.calendar-event:hover {
  background: rgba(255, 102, 0, 0.24);
}

.calendar-event.is-meeting {
  border-left-color: var(--yellow);
  background: rgba(231, 201, 105, 0.1);
}

.calendar-event.is-meeting:hover {
  background: rgba(163, 217, 119, 0.18);
}

.calendar-event.is-pipeline {
  border-left-color: var(--yellow);
  background: rgba(231, 201, 105, 0.1);
}

.calendar-event.is-visit { border-left-color: var(--green); background: rgba(163, 217, 119, .1); }
.calendar-event.is-admin { border-left-color: #f17ca8; background: rgba(241,124,168,.12); }
.calendar-event.is-other { border-left-color: #aa7cf1; background: rgba(170,124,241,.12); }
.calendar-legend { display:flex; flex-wrap:wrap; gap:7px; margin-top:11px; padding:7px 9px; border:1px solid var(--line); border-radius:999px; background:rgba(0,0,0,.22); width:fit-content; }
.calendar-legend span { display:inline-flex; align-items:center; gap:6px; color:#d5d1cb; font-size:.6rem; font-weight:700; }
.calendar-legend span::before { width:6px; height:6px; border-radius:50%; background:#48c8c1; box-shadow:0 0 9px #48c8c1, 0 0 16px rgba(72,200,193,.55); content:""; }
.calendar-legend .visit::before { background:var(--green); box-shadow:0 0 9px var(--green),0 0 16px rgba(163,217,119,.55); }.calendar-legend .admin::before { background:#f17ca8; box-shadow:0 0 9px #f17ca8,0 0 16px rgba(241,124,168,.55); }.calendar-legend .meeting::before { background:var(--yellow); box-shadow:0 0 9px var(--yellow),0 0 16px rgba(231,201,105,.55); }.calendar-legend .other::before { background:#aa7cf1; box-shadow:0 0 9px #aa7cf1,0 0 16px rgba(170,124,241,.55); }

.calendar-event.is-pipeline:hover {
  background: rgba(231, 201, 105, 0.18);
}

.calendar-schedule-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.5;
}

.field-helper {
  margin: 1px 0 0;
  color: var(--dim);
  font-size: .66rem;
  line-height: 1.45;
}

.customer-search-control { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.customer-search-control .button { align-self:stretch; white-space:nowrap; }

.calendar-day-activity-list {
  display: grid;
  gap: 8px;
}

.calendar-day-activity {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.calendar-day-activity:hover {
  border-color: rgba(255, 145, 67, 0.36);
}

.calendar-day-activity.is-pipeline {
  border-color: rgba(231, 201, 105, 0.25);
}

.calendar-day-activity-time {
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.67rem;
  font-weight: 700;
}

.calendar-day-activity strong,
.calendar-day-activity small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-day-activity strong {
  color: var(--white);
  font-size: 0.75rem;
}

.calendar-day-activity small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.66rem;
}

.calendar-more {
  display: block;
  width: 100%;
  padding: 3px 5px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 0.57rem;
  text-align: left;
}

.calendar-more:hover {
  color: var(--orange-bright);
}

.mobile-more {
  display: none;
}

.upcoming-stack {
  display: grid;
  gap: 8px;
}

.upcoming-card {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: inherit;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.upcoming-card:hover {
  border-color: rgba(255, 145, 67, 0.34);
}

.upcoming-date {
  display: block;
  margin-bottom: 7px;
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.61rem;
  font-weight: 700;
  text-transform: uppercase;
}

.upcoming-card strong,
.upcoming-card span:last-child {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-card strong {
  color: var(--white);
  font-size: 0.74rem;
}

.upcoming-card span:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.pipeline-workspace {
  display: grid;
  gap: 16px;
}

.pipeline-search-bar {
  display: flex;
  align-items: center;
  gap: 13px;
}

.pipeline-search-bar .search-field {
  flex: 1 1 380px;
}

.pipeline-search-bar > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
}

.pipeline-search-view {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.042), rgba(255, 255, 255, 0.015));
}

.pipeline-next-week {
  background:
    linear-gradient(110deg, rgba(231, 201, 105, 0.1), transparent 45%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
}

.pipeline-month-heading {
  align-items: end;
}

.pipeline-month-filter {
  display: grid;
  gap: 6px;
  min-width: 156px;
  color: #c5c1ba;
  font-size: 0.65rem;
  font-weight: 700;
}

.pipeline-month-filter input {
  min-height: 37px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: var(--control-radius);
  color: var(--white);
  background: #111;
  font-size: 0.74rem;
}

.pipeline-order-list {
  display: grid;
  gap: 8px;
}

.pipeline-order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}

.pipeline-order:hover {
  border-color: rgba(231, 201, 105, 0.32);
}

.pipeline-order-copy {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  text-align: left;
}

.pipeline-order-copy strong,
.pipeline-order-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-order-date {
  color: var(--yellow);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.59rem;
  font-weight: 700;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.pipeline-order-copy strong {
  color: var(--white);
  font-size: 0.78rem;
}

.pipeline-order-copy span:last-child {
  color: var(--muted);
  font-size: 0.67rem;
}

.pipeline-order-copy:hover strong {
  color: var(--orange-bright);
}

.pipeline-order-value {
  display: grid;
  justify-items: end;
  gap: 4px;
  text-align: right;
}

.pipeline-order-value b {
  color: var(--orange-bright);
  font-size: 0.82rem;
}

.pipeline-order-value span {
  color: var(--dim);
  font-size: 0.62rem;
  font-weight: 700;
}

.pipeline-empty {
  display: grid;
  gap: 5px;
  padding: 21px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.pipeline-empty strong {
  color: #dcd7d0;
  font-size: 0.78rem;
}

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

.sales-summary .metric-card {
  min-height: 112px;
}

.pipeline-section {
  margin-bottom: 20px;
}

.pipeline-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(165px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 3px;
}

.pipeline-column {
  min-height: 220px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.018);
}

.pipeline-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
}

.pipeline-column-header span:last-child {
  color: var(--orange-bright);
}

.deal-card {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-bottom: 7px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: inherit;
  background: #171717;
  text-align: left;
}

.deal-card:hover {
  border-color: rgba(255, 145, 67, 0.35);
}

.deal-card strong {
  overflow: hidden;
  color: var(--white);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.63rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.deal-card b {
  color: var(--orange-bright);
  font-size: 0.67rem;
}

.table-wrap {
  overflow-x: auto;
}

.sales-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.sales-table th {
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.6rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-align: left;
  text-transform: uppercase;
}

.sales-table td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: #d6d1ca;
}

.sales-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.025);
}

.sales-table .amount {
  color: var(--orange-bright);
  font-weight: 750;
}

.table-link {
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  font-size: inherit;
  font-weight: 700;
}

.table-link:hover {
  color: var(--orange-bright);
}

.inventory-filter-bar {
  grid-template-columns: minmax(190px, 1fr) auto auto auto;
}

.inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.inventory-card {
  min-height: 174px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.015));
  transition: transform 170ms ease, border-color 170ms ease, background 170ms ease;
}

.inventory-card:hover {
  border-color: rgba(255, 145, 67, 0.38);
  background: linear-gradient(140deg, rgba(255, 102, 0, 0.1), rgba(255, 255, 255, 0.02));
  transform: translateY(-2px);
}

.inventory-card.is-clickable {
  cursor: pointer;
}

.inventory-card.is-clickable:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
}

.inventory-card-top,
.inventory-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.inventory-code {
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.71rem;
  font-weight: 800;
}

.inventory-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 800;
}

.inventory-status.in-stock {
  border-color: rgba(163, 217, 119, 0.32);
  color: var(--green);
  background: rgba(163, 217, 119, 0.11);
}

.inventory-status.low-stock {
  border-color: rgba(231, 201, 105, 0.35);
  color: var(--yellow);
  background: rgba(231, 201, 105, 0.1);
}

.inventory-status.out-of-stock {
  border-color: rgba(255, 92, 69, 0.35);
  color: #ff9888;
  background: rgba(255, 92, 69, 0.1);
}

.inventory-status.not-reported {
  border-color: var(--line);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.inventory-card h3 {
  margin: 18px 0 5px;
  color: var(--white);
  font-size: 0.84rem;
  line-height: 1.35;
}

.inventory-card p,
.inventory-french-name {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
}

.inventory-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 18px;
}

.inventory-card-meta span,
.inventory-detail-heading > span:last-child {
  color: var(--dim);
  font-size: 0.66rem;
}

.inventory-card-meta span + span::before {
  margin-right: 6px;
  color: var(--line-strong);
  content: "/";
}

.inventory-detail {
  display: grid;
  gap: 20px;
}

.inventory-detail-heading {
  justify-content: flex-start;
}

.inventory-detail .detail-panel {
  margin: 0;
}

.customer-performance {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--line);
}

.customer-performance > div {
  display: grid;
  gap: 5px;
  padding: 13px;
  background: var(--panel);
}

.customer-performance span { color: var(--dim); font-size: .63rem; font-weight: 700; text-transform: uppercase; }
.customer-performance strong { color: var(--white); font-size: .82rem; }
.customer-performance .is-due { background: rgba(255, 92, 69, .14); }
.customer-performance .is-due strong { color: #ff9888; }

.sales-history-split { display:grid; grid-template-columns:minmax(0,.58fr) minmax(260px,.42fr); gap:16px; align-items:stretch; }
.sales-history-split .table-wrap { max-height:224px; border:1px solid var(--line); border-radius:13px; }
.customer-sales-table { min-width:460px; font-size:.68rem; }
.customer-sales-table td, .customer-sales-table th { padding:9px 10px; }
.sales-trend { display:grid; grid-template-rows:auto 1fr; gap:8px; min-height:224px; padding:15px; border:1px solid rgba(255,171,115,.2); border-radius:13px; background:radial-gradient(circle at 100% 0,rgba(255,111,22,.13),transparent 10rem),rgba(255,255,255,.025); }
.sales-trend-heading { display:flex; align-items:start; justify-content:space-between; gap:8px; }.sales-trend p { margin:4px 0 0; color:var(--muted); font-size:.66rem; }
.sales-chart-legend { display:flex; align-items:center; gap:5px; color:var(--muted); font-size:.61rem; white-space:nowrap; }.sales-chart-legend i { width:16px; height:2px; background:var(--orange-bright); box-shadow:0 0 8px rgba(255,171,115,.8); }
.sales-line-chart { width:100%; height:100%; overflow:visible; }.sales-line-chart line { stroke:rgba(255,255,255,.1); stroke-dasharray:2 3; }.sales-line-chart polyline { fill:none; stroke:var(--orange-bright); stroke-width:2.5; stroke-linecap:round; stroke-linejoin:round; filter:drop-shadow(0 0 5px rgba(255,171,115,.55)); }.sales-line-chart circle { fill:#15110e; stroke:#ffd0af; stroke-width:2; }.sales-line-chart text { fill:var(--dim); font:6px Aptos, sans-serif; }

.prospect-toggle { display:flex; align-items:center; gap:8px; width:fit-content; margin-top:4px; color:var(--muted); font-size:.68rem; cursor:pointer; }
.prospect-toggle input { appearance:none; width:18px; height:18px; margin:0; border:1px solid var(--line-strong); border-radius:50%; background:rgba(255,255,255,.03); transition:background .15s,border-color .15s,box-shadow .15s; }.prospect-toggle input:checked { border-color:var(--orange); background:var(--orange); box-shadow:0 0 12px rgba(255,111,22,.55); }.prospect-toggle input:checked::after { display:block; margin:1px 0 0 4px; color:#1c0b02; font-size:11px; font-weight:900; content:"✓"; }

.modal-backdrop {
  display: grid;
  position: fixed;
  z-index: 20;
  inset: 0;
  place-items: center;
  overflow-y: auto;
  padding: 22px;
  background: rgba(0, 0, 0, 0.73);
  backdrop-filter: blur(7px);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(850px, calc(100vh - 44px));
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 23px;
  background:
    radial-gradient(circle at 97% 0%, rgba(255, 102, 0, 0.12), transparent 16rem),
    #111;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.65);
}

.modal-card.modal-wide {
  width: min(1040px, 100%);
}

/* Keep imported customer labels from changing the geometry of the CRM. */
.modal-card,
.modal-body,
.detail-grid,
.detail-panel,
.data-pairs,
.data-pair,
.section-heading,
.micro-sale,
.micro-deal {
  min-width: 0;
}

.detail-grid { gap: 12px; }
.detail-panel { padding: 17px; border-radius: 15px; }
.detail-panel h4 { margin-bottom: 12px; }
.detail-hero { gap: 14px; padding-bottom: 15px; }
.detail-identity { min-width: 0; }
.detail-identity > span:last-child { min-width: 0; }
.detail-identity h3,
.detail-identity p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.detail-identity p { max-width: 470px; }
.data-pairs { gap: 9px 14px; }
.data-pair { overflow: hidden; }
.data-pair > span,
.data-pair strong,
.data-pair a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-pair strong { display: block; }
.section-heading { margin-bottom: 12px; }
.section-heading h4 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.micro-sale,
.micro-deal { gap: 9px; padding: 9px 0; }
.micro-sale > span:first-child,
.micro-deal > span:first-child { min-width: 0; }
.micro-sale strong,
.micro-sale > span:first-child > span,
.micro-deal strong,
.micro-deal > span:first-child > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.micro-actions { flex: 0 0 auto; }

.customer-performance { margin: 14px 0; }
.customer-performance > div { min-width: 0; padding: 11px 12px; }
.customer-performance strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sales-history-split { gap: 12px; }
.sales-history-split .table-wrap { background: rgba(0,0,0,.14); }
.customer-sales-table td:nth-child(2) { max-width: 135px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.customer-sales-table td:nth-child(3) { max-width: 94px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.modal-header {
  display: flex;
  position: sticky;
  z-index: 2;
  top: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 27px 18px;
  border-bottom: 1px solid var(--line);
  background: rgba(17, 17, 17, 0.93);
  backdrop-filter: blur(12px);
}

.modal-header h2 {
  margin: 7px 0 0;
  font-size: 1.35rem;
}

.modal-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
  font-size: 1.22rem;
  line-height: 1;
}

.modal-close:hover {
  color: var(--white);
  border-color: var(--line-strong);
}

.modal-body {
  padding: 25px 27px 28px;
}

.modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  padding: 18px 27px 24px;
  border-top: 1px solid var(--line);
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: rgba(17, 17, 17, .96);
  backdrop-filter: blur(12px);
}

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

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

.form-field {
  display: grid;
  gap: 7px;
}

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

.form-field label,
.field-label {
  color: #c5c1ba;
  font-size: 0.7rem;
  font-weight: 700;
}

.form-field label small {
  color: var(--dim);
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  min-height: 40px;
  padding: 9px 10px;
  font-size: 0.78rem;
}

.form-field textarea {
  min-height: 86px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: #5e5d59;
}

.form-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.form-section h3 {
  margin: 0 0 5px;
  font-size: 0.91rem;
}

.form-section > p {
  margin-bottom: 15px;
  color: var(--muted);
  font-size: 0.73rem;
  line-height: 1.5;
}

.time-selector {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid rgba(255, 102, 0, 0.2);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 102, 0, 0.1), rgba(255, 255, 255, 0.02));
}

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

.daypart-option {
  position: relative;
}

.daypart-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.daypart-option span {
  display: block;
  min-height: 34px;
  padding: 9px 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 9px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.65rem;
  font-weight: 700;
  text-align: center;
  transition: color 140ms ease, border-color 140ms ease, background 140ms ease;
}

.daypart-option input:checked + span {
  border-color: #ff813c;
  color: #fffaf6;
  background: linear-gradient(145deg, #df4b00, #a92b00);
  box-shadow: inset 0 1px 0 rgba(255, 138, 72, 0.28), 0 4px 14px rgba(205, 58, 0, 0.24);
}

.custom-time-control {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}

.custom-time-control[hidden] {
  display: none;
}

.custom-time-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.custom-time-output {
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.74rem;
}

.glossy-time-range {
  width: 100%;
  height: 17px;
  margin: 0;
  appearance: none;
  border-radius: 999px;
  outline: 0;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange) var(--range-progress, 30%), #33241b var(--range-progress, 30%), #33241b 100%);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(255, 155, 82, 0.16);
}

.glossy-time-range::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  appearance: none;
  border: 2px solid #ffd2ae;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff5ec, #ff8d43 58%, #d74100);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.glossy-time-range::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 2px solid #ffd2ae;
  border-radius: 50%;
  background: linear-gradient(145deg, #fff5ec, #ff8d43 58%, #d74100);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}

.detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.detail-identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 14px;
}

.detail-identity .avatar {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 0.9rem;
}

.detail-identity h3 {
  overflow: hidden;
  margin: 0;
  color: var(--white);
  font-size: 1.2rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-identity p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

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

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(250px, 0.94fr);
  gap: 15px;
}

.detail-panel {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.023);
}

.detail-panel .section-heading { align-items: center; }
.detail-panel .section-heading > div { min-width: 0; }
.detail-panel .section-heading p { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-panel h4 {
  margin: 0 0 13px;
  color: var(--white);
  font-size: 0.78rem;
  letter-spacing: -0.01em;
}

.detail-panel.full-span {
  grid-column: 1 / -1;
}

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

.data-pair span {
  display: block;
  color: var(--dim);
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.data-pair strong,
.data-pair a {
  display: block;
  overflow: hidden;
  margin-top: 4px;
  color: #dcd8d1;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.35;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-pair a:hover {
  color: var(--orange-bright);
}

.next-move {
  padding: 13px;
  border: 1px solid rgba(255, 102, 0, 0.28);
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(255, 102, 0, 0.16), rgba(255, 102, 0, 0.035));
}

.next-move-label {
  display: block;
  color: var(--orange-bright);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-move strong {
  display: block;
  margin-top: 6px;
  color: var(--white);
  font-size: 0.85rem;
}

.next-move p {
  margin: 6px 0 0;
  color: #c8c1b9;
  font-size: 0.7rem;
  line-height: 1.45;
}

.last-contact {
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.45;
}

.last-contact strong {
  color: #ded9d2;
}

.checklist {
  display: grid;
  gap: 8px;
}

.check-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

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

.check-toggle {
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: #101010;
  background: transparent;
  font-size: 0.65rem;
  font-weight: 900;
}

.check-toggle.is-done {
  border-color: var(--green);
  background: var(--green);
}

.check-copy {
  min-width: 0;
}

.check-copy strong,
.check-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.check-copy strong {
  color: #ded9d2;
  font-size: 0.71rem;
}

.check-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.64rem;
}

.check-row.is-done .check-copy strong,
.check-row.is-done .check-copy span {
  color: var(--dim);
  text-decoration: line-through;
}

.check-date {
  color: var(--dim);
  font-size: 0.6rem;
}

.source-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.source-chip {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  gap: 6px;
  min-height: 27px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #c9c4bd;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.65rem;
  text-decoration: none;
}

.source-chip:hover {
  border-color: rgba(255, 145, 67, 0.35);
  color: var(--orange-bright);
}

.research-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 13px;
}

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

.micro-sale,
.micro-deal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.micro-sale:last-child,
.micro-deal:last-child {
  border-bottom: 0;
}

.micro-sale strong,
.micro-deal strong {
  display: block;
  color: #dfdad3;
  font-size: 0.69rem;
}

.micro-sale span,
.micro-deal span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.61rem;
}

.micro-sale b,
.micro-deal b {
  color: var(--orange-bright);
  font-size: 0.68rem;
  white-space: nowrap;
}

.micro-actions {
  flex: 0 0 auto;
  text-align: right;
}

.micro-actions .button-text {
  display: block;
  margin: 5px 0 0 auto;
  font-size: 0.58rem;
}

.mini-select {
  display: block;
  min-height: 25px;
  margin-top: 5px;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #cfc9c1;
  background: #151515;
  font-size: 0.58rem;
}

.detail-empty {
  margin: 0;
  color: var(--dim);
  font-size: 0.69rem;
  line-height: 1.45;
}

.import-dropzone {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 24px;
  border: 1px dashed rgba(255, 145, 67, 0.45);
  border-radius: 17px;
  color: var(--muted);
  background: rgba(255, 102, 0, 0.06);
  text-align: center;
}

.import-dropzone h3 {
  margin: 12px 0 7px;
  color: var(--white);
  font-size: 0.95rem;
}

.import-dropzone p {
  max-width: 450px;
  margin-bottom: 16px;
  font-size: 0.73rem;
  line-height: 1.5;
}

.import-notes {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.import-notes li {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.import-notes li::before {
  margin-right: 8px;
  color: var(--orange);
  content: "+";
}

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

.mapping-row {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.mapping-row span {
  color: #d1ccc5;
  font-size: 0.69rem;
  font-weight: 700;
}

.mapping-row select {
  min-height: 33px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--white);
  background: #101010;
  font-size: 0.67rem;
}

.import-preview {
  overflow-x: auto;
  margin-top: 18px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.import-preview h3 {
  margin: 0 0 9px;
  font-size: 0.8rem;
}

.import-preview-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.65rem;
}

.import-preview-table th,
.import-preview-table td {
  max-width: 170px;
  overflow: hidden;
  padding: 8px;
  border-bottom: 1px solid var(--line);
  color: #cdc8c1;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-preview-table th {
  color: var(--dim);
  font-size: 0.58rem;
  text-transform: uppercase;
}

.callout {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid rgba(255, 145, 67, 0.28);
  border-radius: 12px;
  background: rgba(255, 102, 0, 0.07);
}

.callout strong {
  display: block;
  margin-bottom: 5px;
  color: var(--orange-bright);
  font-size: 0.72rem;
}

.callout p {
  margin: 0;
  color: #c4bdb5;
  font-size: 0.71rem;
  line-height: 1.5;
}

.settings-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
}

.settings-status strong,
.settings-status span {
  display: block;
}

.settings-status strong {
  color: var(--white);
  font-size: 0.75rem;
}

.settings-status span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.67rem;
}

.settings-separator {
  margin: 25px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.settings-footnote {
  margin: 13px 0 0;
  color: var(--dim);
  font-size: 0.67rem;
  line-height: 1.55;
}

.toast-region {
  display: grid;
  position: fixed;
  z-index: 30;
  right: 20px;
  bottom: 20px;
  gap: 8px;
  width: min(350px, calc(100vw - 40px));
}

.toast {
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: #e4dfd8;
  background: #181818;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.38);
  font-size: 0.74rem;
  line-height: 1.4;
  animation: toast-in 180ms ease-out;
}

.toast.success {
  border-color: rgba(163, 217, 119, 0.32);
}

.toast.error {
  border-color: rgba(255, 92, 69, 0.42);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 1120px) {
  .topbar-actions .sync-status {
    display: none;
  }

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

  .hero-panel,
  .split-grid,
  .calendar-layout,
  .route-planner-grid {
    grid-template-columns: 1fr;
  }

  .hero-focus {
    max-width: 360px;
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding-bottom: 24px;
  }

  .topbar {
    min-height: 68px;
    padding: 16px 17px;
  }

  .brand {
    gap: 8px;
    padding: 0;
    font-size: 0.68rem;
  }

  .brand-mark {
    transform: scale(0.86);
    transform-origin: left center;
  }

  .topbar-actions {
    gap: 6px;
  }

  .topbar-actions .button-quiet {
    display: none;
  }

  .topbar-actions .button-primary {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.68rem;
  }

  .app-content {
    padding: 18px 16px 35px;
  }

  .filing-system {
    padding: 16px 12px 28px;
  }

  .filing-tabs {
    gap: 4px;
    padding: 0 8px;
  }

  .filing-tab {
    min-height: 43px;
    padding: 0 15px;
    border-radius: 13px 13px 0 0;
    font-size: 0.68rem;
  }

  .filing-tab.is-active {
    min-height: 47px;
  }

  .filing-tab-settings {
    margin-left: 0;
  }

  .filing-cabinet {
    min-height: calc(100vh - 143px);
    border-radius: 17px;
  }

  .home-followup-actions {
    justify-content: flex-start;
  }

  .pipeline-month-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  .pipeline-search-bar {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
  }

  .pipeline-search-bar > span {
    padding-left: 2px;
  }

  .pipeline-month-filter {
    width: 100%;
  }

  .pipeline-order {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .pipeline-order-value {
    justify-items: start;
    text-align: left;
  }

  .sales-progress .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 11px;
  }

  .sales-bar-chart {
    min-height: 202px;
    gap: 12px;
    padding: 0;
  }

  .sales-bar {
    grid-template-rows: auto 122px auto auto;
    gap: 6px;
  }

  .sales-bar-track {
    height: 122px;
    padding: 0 14%;
    background: repeating-linear-gradient(to bottom, transparent 0, transparent 29px, rgba(255, 255, 255, 0.055) 30px);
  }

  .sales-bar > strong {
    font-size: 0.9rem;
  }

  .sales-bar h3 {
    font-size: 0.68rem;
  }

  .sales-bar p {
    font-size: 0.56rem;
  }

  .route-controls {
    grid-template-columns: 1fr;
    padding: 16px;
  }

  .route-controls > p {
    grid-column: auto;
  }

  .route-heading .toolbar-actions {
    width: 100%;
  }

  .route-heading .toolbar-actions .button {
    flex: 1 1 auto;
  }

  .hero-panel {
    min-height: 0;
    padding: 26px;
    border-radius: 21px;
  }

  .hero-title {
    font-size: 2.2rem;
  }

  .hero-focus {
    display: none;
  }

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

  .customer-performance { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sales-history-split { grid-template-columns: 1fr; }
  .detail-identity p { max-width: 220px; }
  .detail-panel { padding: 14px; }
  .micro-sale,
  .micro-deal { align-items: start; }

  .metric-card {
    min-height: 112px;
    padding: 14px;
  }

  .metric-value {
    font-size: 1.65rem;
  }

  .workspace-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .toolbar-actions {
    justify-content: flex-start;
  }

  .filter-bar {
    grid-template-columns: 1fr 1fr;
  }

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

  .calendar-cell {
    min-height: 69px;
    padding: 4px;
  }

  .calendar-events {
    gap: 2px;
  }

  .calendar-event {
    padding: 3px;
    font-size: 0.5rem;
  }

  .calendar-cell .calendar-event:nth-child(n + 2) {
    display: none;
  }

  .calendar-more {
    font-size: 0.5rem;
  }

  .calendar-cell .desktop-more {
    display: none;
  }

  .calendar-cell .mobile-more {
    display: block;
  }

  .modal-backdrop {
    align-items: end;
    padding: 0;
  }

  .modal-card,
  .modal-card.modal-wide {
    max-height: calc(100vh - 12px);
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding-right: 18px;
    padding-left: 18px;
  }

  .form-grid,
  .form-grid.three,
  .detail-grid,
  .mapping-grid {
    grid-template-columns: 1fr;
  }

  .form-field.span-2 {
    grid-column: auto;
  }

  .detail-panel.full-span {
    grid-column: auto;
  }

  .detail-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-actions {
    justify-content: flex-start;
  }

  .data-pairs {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 420px) {
  .metric-grid,
  .sales-summary {
    grid-template-columns: 1fr;
  }

  .filter-bar {
    grid-template-columns: 1fr;
  }

  .daypart-options {
    grid-template-columns: 1fr;
  }

  .relationship-footer {
    grid-template-columns: 1fr;
  }
}
