:root {
  color-scheme: light;
  --primary: #155eef;
  --primary-soft: #eaf1ff;
  --ink: #172033;
  --muted: #7a8190;
  --line: #e9edf3;
  --surface: #fff;
  --background: #f6f7f9;
  --danger: #d64f20;
  --success: #16835d;
  --shadow: 0 10px 32px rgba(23, 32, 51, .06);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; background: var(--background); color: var(--ink); }
html, body { max-width: 100%; overflow-x: hidden; }
body { overscroll-behavior-y: none; }
body.sheet-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button { border: 0; cursor: pointer; }

.launch-screen {
  min-height: 100dvh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  color: var(--muted);
}
.launch-screen strong { color: var(--ink); font-size: 22px; }
.brand-mark {
  display: grid; place-items: center; width: 72px; height: 72px;
  border-radius: 22px; color: #111; font-size: 17px; font-weight: 900;
  letter-spacing: -.4px;
  background: #eeeeee;
  box-shadow: none;
}

.app-shell { min-height: 100dvh; max-width: 720px; margin: 0 auto; padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.view { padding: calc(18px + env(safe-area-inset-top)) 18px 34px; }
.bottom-nav {
  position: fixed; z-index: 20; left: 50%; bottom: 0; transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(2, 1fr); width: min(100%, 720px);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
  backdrop-filter: blur(18px);
}
.nav-item { display: grid; justify-items: center; gap: 2px; padding: 6px; color: #8a92a3; background: transparent; font-size: 12px; }
.nav-icon { font-size: 23px; line-height: 1; }
.nav-item.active { color: var(--primary); font-weight: 700; }

.hero { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 22px; }
.eyebrow { color: #8a92a3; font-size: 13px; font-weight: 650; }
.hero h1 { margin: 6px 0 4px; font-size: clamp(29px, 8vw, 38px); letter-spacing: -.8px; }
.hero p { margin: 0; color: var(--muted); font-size: 14px; }
.avatar {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 17px;
  color: white; font-size: 18px; font-weight: 800;
  background: linear-gradient(145deg, var(--primary), #6b5cff);
  box-shadow: 0 10px 24px rgba(21,94,239,.2);
}
.add-customer-button {
  flex: 0 0 auto; height: 42px; padding: 0 15px; border-radius: 14px;
  color: white; background: var(--primary); font-size: 14px; font-weight: 750;
  box-shadow: 0 8px 18px rgba(21,94,239,.18);
}

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { min-height: 92px; padding: 16px; border-radius: 20px; display: flex; flex-direction: column; justify-content: center; }
.stat strong { font-size: 28px; }
.stat span { margin-top: 2px; font-size: 13px; font-weight: 650; }
.stat.blue { color: var(--primary); background: #eaf1ff; }
.stat.orange { color: #ce4d20; background: #fff0e9; }
.stat.green { color: #137b58; background: #e8f7f1; }
.stat.purple { color: #6846cc; background: #f0edff; }

.section-head { display: flex; align-items: center; justify-content: space-between; margin: 27px 2px 13px; }
.section-head h2 { margin: 0; font-size: 18px; }
.text-action { color: var(--primary); background: transparent; font-size: 13px; font-weight: 700; }
.card { background: var(--surface); border: 1px solid #edf0f5; border-radius: 22px; box-shadow: var(--shadow); }
.empty { padding: 34px 18px; text-align: center; color: #8a92a3; font-size: 14px; }

.task-row { display: flex; align-items: center; padding: 16px; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-main { flex: 1; min-width: 0; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; }
.task-line { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.task-title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; font-weight: 750; }
.task-meta { margin-top: 5px; color: #8a92a3; font-size: 12px; }
.round-check {
  flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px; margin-left: 12px;
  border: 1.5px solid #dce4f4; border-radius: 50%; color: var(--primary); background: white; font-weight: 800;
}
.pill { display: inline-flex; align-items: center; min-height: 25px; padding: 0 10px; border-radius: 99px; color: var(--primary); background: var(--primary-soft); font-size: 11px; font-weight: 700; }
.pill.warn { color: var(--danger); background: #fff1eb; }
.pill.success { color: var(--success); background: #eaf8f2; }

.scroll-row { display: flex; gap: 12px; overflow-x: auto; padding: 1px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.scroll-row::-webkit-scrollbar { display: none; }
.waiting-card { flex: 0 0 min(84vw, 420px); padding: 17px; scroll-snap-align: start; }
.waiting-top { display: flex; justify-content: space-between; align-items: center; }
.mini-avatar { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.waiting-card h3 { margin: 14px 0 7px; font-size: 18px; }
.summary { color: #61697a; font-size: 13px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.waiting-foot { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: #8a92a3; font-size: 12px; }

.search {
  display: flex; align-items: center; gap: 10px; height: 50px; padding: 0 15px;
  border: 1px solid #e7eaf0; border-radius: 17px; background: white;
}
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 15px; }
.filters { display: flex; gap: 8px; overflow-x: auto; margin: 14px -18px 0; padding: 0 18px 6px; scrollbar-width: none; }
.type-filters { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; padding: 4px; border-radius: 14px; background: #e9edf3; }
.type-filter { min-height: 40px; border-radius: 10px; color: #596174; background: transparent; font-size: 13px; font-weight: 700; }
.type-filter.active { color: var(--ink); background: white; box-shadow: 0 1px 4px rgba(23,32,51,.08); }
.filter { flex: 0 0 auto; padding: 9px 16px; border: 1px solid #e1e5ec; border-radius: 99px; color: #667084; background: white; font-size: 13px; font-weight: 650; }
.filter.active { color: white; border-color: var(--primary); background: var(--primary); }
.customer-card { margin-bottom: 12px; padding: 16px; }
.customer-head { display: flex; align-items: center; }
.customer-avatar { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 16px; color: var(--primary); background: var(--primary-soft); font-weight: 800; }
.customer-id { flex: 1; min-width: 0; margin-left: 12px; }
.name-line { display: flex; align-items: center; gap: 7px; }
.name-line strong { font-size: 17px; }
.priority { padding: 2px 6px; border-radius: 6px; color: #c84225; background: #ffede8; font-size: 10px; font-weight: 800; }
.customer-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; color: #697184; font-size: 12px; }
.customer-type { display: inline-flex; align-items: center; min-height: 22px; padding: 0 7px; border-radius: 7px; font-size: 11px; font-weight: 750; white-space: nowrap; }
.customer-type.company { color: #155eef; background: #eaf1ff; }
.customer-type.prospect { color: #6b4cb8; background: #f1edff; }
.chevron { color: #afb5c0; font-size: 27px; }
.stage-row, .tag-row { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; gap: 10px; }
.follow-up { color: #596174; font-size: 12px; font-weight: 650; }
.follow-up.overdue { color: var(--danger); }
.customer-summary { margin-top: 13px; display: -webkit-box; overflow: hidden; color: #596174; font-size: 13px; line-height: 1.55; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { padding: 4px 8px; border-radius: 7px; color: #697184; background: #f1f3f7; font-size: 10px; }
.profile-tags { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.tag-empty { color: #697184; font-size: 12px; }
.contact-age { margin-left: auto; color: #9aa1ae; font-size: 11px; white-space: nowrap; }

.back { min-height: 44px; margin: 0 0 13px; padding: 8px 0; color: var(--primary); background: transparent; font-weight: 700; }
.profile { padding: 18px; }
.profile-top { display: flex; align-items: center; }
.profile .customer-avatar { width: 55px; height: 55px; color: white; background: linear-gradient(145deg, var(--primary), #6b5cff); font-size: 20px; }
.profile-name { margin-left: 13px; }
.profile-name h1 { margin: 0; font-size: 23px; }
.profile-name p { margin: 5px 0 0; color: #858d9d; font-size: 13px; }
.progress-head { display: flex; justify-content: space-between; margin-top: 18px; color: #8a92a3; font-size: 12px; font-weight: 650; }
.progress { height: 7px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #e8edf5; }
.progress > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), #6b5cff); }
.edit-row { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 17px 0 2px; background: transparent; text-align: left; }
.edit-row small { display: block; color: #8a92a3; font-size: 11px; font-weight: 650; }
.edit-row strong { display: block; margin-top: 3px; font-size: 15px; }
.edit-row > span { color: var(--primary); font-size: 13px; font-weight: 700; }
.action-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; margin-top: 12px; }
.action { height: 50px; border-radius: 16px; color: var(--primary); background: #edf3ff; font-weight: 750; }
.action.primary { color: white; background: var(--primary); }
.summary-card { padding: 17px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px 12px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.info-cell small { display: block; color: #939aa7; font-size: 11px; }
.info-cell strong { display: block; margin-top: 4px; font-size: 13px; }
.details-list { overflow: hidden; }
.detail-row { display: flex; align-items: center; justify-content: space-between; min-height: 52px; padding: 10px 16px; border-bottom: 1px solid var(--line); gap: 16px; }
.detail-row:last-child { border-bottom: 0; }
.detail-row > span { color: #596174; font-size: 13px; }
.detail-row strong, .detail-row a { color: var(--ink); font-size: 14px; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.detail-row a { color: var(--primary); text-decoration: none; }
.detail-row .missing { color: #697184; font-weight: 500; }
.touch-action { min-width: 72px; min-height: 44px; }
.complete { padding: 8px 12px; border-radius: 10px; color: var(--primary); background: #edf3ff; font-size: 12px; font-weight: 700; }
.task-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.danger-text { color: var(--danger) !important; }
.delete-mini { padding: 8px 10px; border-radius: 10px; color: var(--danger); background: #2a1f1f; font-size: 12px; font-weight: 700; }
.danger-link {
  width: 100%;
  min-height: 44px;
  margin-top: 12px;
  border-radius: 8px;
  color: var(--danger);
  background: #2a1f1f;
  font-size: 13px;
  font-weight: 700;
}
.timeline { padding: 17px; }
.event { position: relative; padding: 0 0 22px 22px; border-left: 2px solid #e3e8f0; }
.event:last-child { padding-bottom: 0; border-left-color: transparent; }
.event::before { content: ""; position: absolute; left: -7px; top: 2px; width: 10px; height: 10px; border: 3px solid #dce7ff; border-radius: 50%; background: var(--primary); }
.event-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 750; }
.event-head time { color: #9aa1ae; font-size: 11px; font-weight: 500; }
.event p { margin: 8px 0 10px; color: #596174; font-size: 13px; line-height: 1.5; }

.sheet-backdrop { position: fixed; z-index: 40; inset: 0; display: flex; align-items: flex-end; justify-content: center; max-width: 100vw; overflow: hidden; background: rgba(16,22,34,.42); }
.sheet { width: min(100%, 720px); max-width: 100vw; min-width: 0; max-height: 90dvh; overflow-x: hidden; overflow-y: auto; padding: 10px 18px calc(22px + env(safe-area-inset-bottom)); border-radius: 26px 26px 0 0; background: white; animation: rise .2s ease-out; }
.sheet form, .field { min-width: 0; }
@keyframes rise { from { transform: translateY(25px); opacity: .5; } }
.grabber { width: 42px; height: 5px; margin: 0 auto 17px; border-radius: 99px; background: #d7dbe3; }
.sheet h2 { margin: 0 0 4px; font-size: 21px; }
.sheet-note { margin: 0 0 17px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.field { display: grid; gap: 7px; margin: 15px 0; }
.form-section-title { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 800; }
.field label { color: #596174; font-size: 12px; font-weight: 700; }
.field input, .field textarea, .field select {
  width: 100%; min-width: 0; max-width: 100%; border: 1px solid #dfe4ec; border-radius: 13px; outline: 0; background: #fff; color: var(--ink); font-size: 15px;
}
.field input, .field select { height: 47px; padding: 0 13px; }
.field textarea { min-height: 120px; padding: 12px 13px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(21,94,239,.1); }
.field-hint { color: #596174; font-size: 12px; line-height: 1.45; }
.sheet-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 20px; }
.secondary, .primary-button { height: 49px; border-radius: 15px; font-weight: 750; }
.secondary { color: #596174; background: #f0f2f5; }
.primary-button { color: white; background: var(--primary); }
.danger-button { height: 49px; border-radius: 15px; color: white; background: var(--danger); font-weight: 750; }
.delete-customer {
  width: 100%; margin-top: 24px; padding: 14px; border-radius: 15px;
  color: var(--danger); background: #fff0eb; font-weight: 750;
}
.primary-button:disabled, .danger-button:disabled { opacity: .55; cursor: wait; }
.option-list { display: grid; gap: 8px; margin-top: 15px; }
.option { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-radius: 13px; color: var(--ink); background: #f6f7f9; text-align: left; }
.option.selected { color: var(--primary); background: var(--primary-soft); font-weight: 750; }
.priority-options { display: grid; gap: 10px; margin-top: 18px; }
.priority-option {
  display: grid; grid-template-columns: 48px 1fr 24px; align-items: center; gap: 12px;
  width: 100%; min-height: 70px; padding: 12px; border: 1px solid var(--line);
  border-radius: 17px; color: var(--ink); background: white; text-align: left;
}
.priority-option.selected { border-color: var(--primary); background: var(--primary-soft); }
.priority-code {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  color: #596174; background: #f0f2f5; font-size: 13px; font-weight: 850;
}
.priority-code.p1 { color: #bd3f22; background: #ffebe5; }
.priority-code.p2 { color: var(--primary); background: #e7efff; }
.priority-code.p3 { color: #657083; background: #eef1f5; }
.priority-copy { display: grid; gap: 4px; }
.priority-copy strong { font-size: 15px; }
.priority-copy small { color: var(--muted); font-size: 12px; }
.priority-check { color: var(--primary); font-weight: 850; text-align: center; }
.sheet-cancel { width: 100%; margin-top: 14px; }
.toast { position: fixed; z-index: 80; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%); padding: 11px 16px; border-radius: 12px; color: white; background: rgba(23,32,51,.92); font-size: 13px; box-shadow: var(--shadow); animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }
.error-panel { min-height: 70dvh; display: grid; place-content: center; gap: 12px; text-align: center; }
.error-panel button { padding: 12px 18px; border-radius: 13px; color: white; background: var(--primary); font-weight: 700; }
.login-page { min-height: 100dvh; display: grid; align-content: center; max-width: 430px; margin: 0 auto; padding: 28px; }
.login-page .brand-mark { margin-bottom: 22px; }
.login-page h1 { margin: 0; font-size: 32px; }
.login-page > p { margin: 9px 0 25px; color: var(--muted); line-height: 1.55; }
.login-card { padding: 20px; }
.login-card .primary-button { width: 100%; margin-top: 8px; }
.login-error { min-height: 22px; margin: 8px 0 0; color: var(--danger); font-size: 12px; }

/* Contact, opportunity, communication and service management */
.dashboard-opportunity,
.compact-contact {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; min-height: 58px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  color: var(--ink); background: transparent; text-align: left;
}
.dashboard-opportunity:last-child, .compact-contact:last-child { border-bottom: 0; }
.dashboard-opportunity > span, .compact-contact > span { display: grid; gap: 4px; }
.dashboard-opportunity > span:last-child { justify-items: end; text-align: right; }
.dashboard-opportunity small, .compact-contact small { color: #596174; font-size: 12px; }
.dashboard-opportunity b { color: var(--primary); font-size: 12px; }
.compact-contact-list { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; }
.compact-contact {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  justify-content: initial;
  column-gap: 12px;
}
.compact-contact > span:nth-child(2) { min-width: 0; }
.compact-contact > span:last-child { justify-self: end; }
.compact-contact .mini-avatar { margin: 0; }
.incomplete-alert {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 18px; padding: 14px 16px; border: 1px solid #f1c9b8; border-radius: 14px;
  color: #8b351d; background: #fff4ef; font-size: 13px;
}
.incomplete-alert button { min-height: 40px; color: #a33b1d; background: transparent; font-weight: 750; white-space: nowrap; }
.filter-panel { margin-top: 14px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.filter-panel summary { min-height: 48px; padding: 14px 16px; cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 750; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 4px 14px 14px; }
.filter-grid label { display: grid; gap: 6px; min-width: 0; color: #596174; font-size: 11px; font-weight: 700; }
.filter-grid select { width: 100%; min-width: 0; height: 42px; padding: 0 9px; border: 1px solid #dfe4ec; border-radius: 10px; color: var(--ink); background: white; }
.clear-filters { width: calc(100% - 28px); margin: 0 14px 14px; }
.contact-card { margin-bottom: 12px; padding: 16px; cursor: pointer; }
.contact-card-head { display: flex; align-items: center; }
.contact-card-name { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 6px; flex: 1; min-width: 0; margin-left: 12px; }
.contact-card-name strong { font-size: 17px; }
.contact-card-name small { grid-column: 1 / -1; color: #596174; font-size: 12px; }
.contact-status-line { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.contact-status-line span { padding: 5px 8px; border-radius: 7px; color: #4f596d; background: #f0f2f6; font-size: 11px; }
.contact-opportunity, .contact-card-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 13px; font-size: 12px; }
.contact-opportunity span, .contact-card-foot { color: #667084; }
.contact-opportunity strong { color: var(--ink); }
.contact-card-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.missing-next { color: var(--danger); font-weight: 700; }
.contact-identity { padding: 6px 2px 8px; }
.status-board { display: grid; grid-template-columns: 1fr 1fr; gap: 0; overflow: hidden; margin-top: 14px; }
.status-cell { min-width: 0; min-height: 70px; padding: 13px 15px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.status-cell:nth-child(even) { border-right: 0; }
.status-cell small { display: block; color: #596174; font-size: 11px; }
.status-cell strong { display: block; margin-top: 5px; overflow-wrap: anywhere; font-size: 13px; line-height: 1.4; }
.status-board > button { grid-column: 1 / -1; min-height: 48px; color: var(--primary); background: #f1f5ff; font-weight: 750; }
.opportunity-list, .service-list { display: grid; gap: 12px; }
.opportunity-card { padding: 16px; }
.opportunity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.opportunity-actions { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.opportunity-head h3 { margin: 7px 0 0; font-size: 17px; }
.opportunity-topic { color: var(--primary); font-size: 12px; font-weight: 750; }
.opportunity-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line); }
.opportunity-grid span { display: grid; gap: 4px; }
.opportunity-grid small { color: #596174; font-size: 11px; }
.opportunity-grid strong { font-size: 13px; }
.opportunity-card p { margin: 12px 0 0; color: #596174; font-size: 13px; line-height: 1.5; }
.opportunity-result { margin-top: 12px; padding: 10px; border-radius: 10px; color: #245f49; background: #edf8f3; font-size: 12px; }
.task-content { margin-top: 7px; color: #596174; font-size: 12px; line-height: 1.45; }
.event-opportunity { display: inline-flex; margin-top: 7px; padding: 4px 7px; border-radius: 6px; color: var(--primary); background: var(--primary-soft); font-size: 10px; font-weight: 700; }
.next-action { margin-top: 10px; color: var(--ink); font-size: 12px; font-weight: 650; }
.service-card { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; }
.service-card > div { display: grid; gap: 5px; }
.service-card small { color: #596174; }
.official-source-note { margin-top: 26px; padding: 14px 16px; border-radius: 12px; color: #596174; background: #edf0f5; font-size: 12px; line-height: 1.55; }
.check-field { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 10px 0; color: #465066; font-size: 13px; font-weight: 650; }
.check-field input { width: 20px; height: 20px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

@media (min-width: 720px) {
  .view { padding-left: 28px; padding-right: 28px; }
  .filters { margin-left: -28px; margin-right: -28px; padding-left: 28px; }
}

@media (max-width: 380px) {
  .filter-grid { grid-template-columns: 1fr; }
}

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

/* iPhone-inspired CRM refresh */
@font-face {
  font-family: "Material Symbols Rounded";
  src: url("/icons/material-symbols-rounded.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 700;
  font-display: block;
}

:root {
  --primary: #0a66f5;
  --primary-soft: #eaf2ff;
  --ink: #101828;
  --muted: #667085;
  --line: #e5e7eb;
  --surface: #fff;
  --background: #f2f2f7;
  --danger: #f04438;
  --success: #039855;
  --shadow: 0 4px 18px rgba(16, 24, 40, .055);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body { background: var(--background); }
.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 24;
}
.app-shell { max-width: 720px; padding-bottom: calc(82px + env(safe-area-inset-bottom)); }
.view { padding: calc(22px + env(safe-area-inset-top)) 16px 38px; }
.bottom-nav {
  width: min(100%, 720px);
  padding: 8px 18px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(60, 60, 67, .18);
  background: rgba(250, 250, 252, .88);
  box-shadow: 0 -8px 24px rgba(16, 24, 40, .03);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  backdrop-filter: saturate(180%) blur(22px);
}
.nav-item { min-height: 48px; gap: 3px; color: #707785; font-size: 11px; font-weight: 600; }
.nav-icon { font-size: 25px; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon { font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }

.activity-header { padding: 0 10px 4px; }
.activity-date { color: #667085; font-size: 14px; font-weight: 600; }
.activity-title-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; }
.activity-title-row h1 { margin: 0; color: #0b162b; font-size: clamp(38px, 11vw, 48px); line-height: 1.05; letter-spacing: -1.8px; }
.activity-search-trigger {
  flex: 0 0 auto; display: flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 14px;
  border: 1px solid #d7dae0; border-radius: 22px; color: #667085; background: rgba(255,255,255,.72);
  font-size: 13px; font-weight: 600;
}
.activity-search-trigger .material-symbols-rounded { font-size: 21px; }
.activity-header h2 { margin: 28px 0 5px; font-size: 25px; line-height: 1.2; letter-spacing: -.45px; }
.activity-header p { margin: 0; color: #667085; font-size: 15px; }

.activity-filters {
  display: flex; gap: 6px; margin: 23px -16px 20px; padding: 0 16px 8px;
  overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
}
.activity-filters::-webkit-scrollbar { display: none; }
.activity-filter {
  flex: 0 0 66px; display: grid; place-items: center; gap: 6px; min-width: 66px; min-height: 84px;
  padding: 10px 5px; border: 1px solid transparent; border-radius: 19px; color: #202939;
  background: rgba(255,255,255,.94); box-shadow: var(--shadow); scroll-snap-align: start; font-size: 11px; font-weight: 650;
}
.activity-filter .material-symbols-rounded { color: #667085; font-size: 27px; }
.activity-filter b { color: inherit; font-size: inherit; }
.activity-filter.active { border-color: #b8d3ff; color: #075bd8; background: #f8fbff; box-shadow: 0 3px 14px rgba(10,102,245,.09); }
.activity-filter.active .material-symbols-rounded { color: var(--primary); font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }

.suggested-action, .activity-list {
  overflow: hidden; border: 1px solid rgba(16,24,40,.06); border-radius: 22px; background: white; box-shadow: var(--shadow);
}
.suggested-action { margin: 0 0 28px; }
.suggested-heading { display: flex; align-items: center; gap: 9px; min-height: 54px; margin: 0 16px; border-bottom: 1px solid var(--line); font-size: 17px; }
.suggested-heading .material-symbols-rounded { color: var(--primary); font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24; }
.suggested-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto 22px; align-items: center; gap: 12px; width: 100%; min-height: 106px; padding: 15px 16px; color: inherit; background: transparent; text-align: left; }
.suggested-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #4a92ff; background: #e5efff; font-size: 29px; font-variation-settings: "FILL" 1, "wght" 450, "GRAD" 0, "opsz" 24; }
.suggested-copy, .activity-copy { display: grid; min-width: 0; gap: 5px; }
.suggested-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.suggested-copy small { color: #667085; font-size: 13px; }
.activity-due { padding: 7px 10px; border-radius: 99px; color: #075bd8; background: #edf4ff; font-size: 12px; font-weight: 750; white-space: nowrap; }
.activity-due.overdue { color: #d92d20; background: #fff0ed; }
.activity-chevron { color: #667085; font-size: 24px; }

.activity-group { margin: 0 0 24px; }
.activity-group[hidden] { display: none; }
.activity-group > h3 { margin: 0 8px 10px; color: #667085; font-size: 15px; font-weight: 650; }
.activity-row { position: relative; display: flex; align-items: stretch; min-height: 112px; margin: 0 14px; border-bottom: 1px solid var(--line); }
.activity-row:last-child { border-bottom: 0; }
.activity-row-main {
  display: grid; grid-template-columns: 48px minmax(0,1fr) auto 19px; align-items: center; gap: 12px;
  width: 100%; padding: 15px 0; color: inherit; background: transparent; text-align: left;
}
article.activity-row .activity-row-main { padding-right: 38px; }
.activity-avatar { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; font-size: 21px; font-weight: 700; }
.activity-avatar.blue { color: #075bd8; background: #e2edff; }
.activity-avatar.green { color: #027a48; background: #dff4ea; }
.activity-avatar.purple { color: #6938ef; background: #ede7ff; }
.activity-avatar.sand { color: #854a0e; background: #f4eadf; }
.activity-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #101828; font-size: 16px; }
.activity-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #667085; font-size: 13px; }
.activity-context { display: flex; align-items: center; gap: 5px; margin-top: 3px; overflow: hidden; color: #7b8494; font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.activity-context .material-symbols-rounded { flex: 0 0 auto; font-size: 15px; }
.activity-status { display: grid; justify-items: end; gap: 5px; min-width: 72px; text-align: right; }
.activity-status b { padding: 5px 8px; border-radius: 99px; color: #075bd8; background: #edf4ff; font-size: 11px; white-space: nowrap; }
.activity-status b.overdue { color: #d92d20; background: #fff0ed; }
.activity-status b.waiting { color: #027a48; background: #e7f6ee; }
.activity-status b.active-opportunity { color: #6938ef; background: #f0ebff; }
.activity-status small { color: #075bd8; font-size: 11px; font-weight: 700; }
.activity-status small.overdue-text { color: #d92d20; }
.activity-complete { position: absolute; right: 27px; bottom: 10px; z-index: 2; display: grid; place-items: center; width: 32px; height: 32px; color: #98a2b3; background: transparent; }
.activity-complete .material-symbols-rounded { font-size: 21px; }

.card, .compact-contact-list, .filter-panel, .login-card { border-color: rgba(16,24,40,.06); border-radius: 20px; box-shadow: var(--shadow); }
.hero h1 { font-size: clamp(34px, 9vw, 43px); letter-spacing: -1.2px; }
.search { border-color: transparent; border-radius: 13px; background: #e3e4e9; }
.type-filters { background: #e3e4e9; }
.add-customer-button, .primary-button, .action.primary { border-radius: 14px; background: var(--primary); box-shadow: none; }
.icon-button-label { display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.icon-button-label .material-symbols-rounded { font-size: 19px; }
.icon-button-label .stable-icon { font-size: 16px; }
.customer-card, .contact-card { border-radius: 20px; }
.sheet { border-radius: 24px 24px 0 0; }
.field input, .field textarea, .field select { border-radius: 12px; background: #fafafa; }
.field input:focus, .field textarea:focus, .field select:focus { box-shadow: 0 0 0 3px rgba(10,102,245,.12); }

@media (max-width: 430px) {
  .activity-title-row h1 { font-size: 41px; }
  .activity-search-trigger { padding: 0 12px; justify-content: center; }
  .suggested-row { grid-template-columns: 48px minmax(0, 1fr) auto 20px; gap: 10px; }
  .suggested-icon { width: 48px; height: 48px; }
  .activity-row-main { grid-template-columns: 44px minmax(0,1fr) auto 19px; gap: 10px; }
  .activity-avatar { width: 44px; height: 44px; font-size: 19px; }
  .activity-status { min-width: 66px; }
  .activity-row { min-height: 108px; }
  article.activity-row .activity-row-main { padding-right: 32px; }
  .activity-complete { right: 20px; bottom: 9px; }
}

/* Minimal dark relationship CRM */
:root {
  color-scheme: dark;
  --primary: #eeeeee;
  --primary-soft: #242424;
  --ink: #f1f1f1;
  --muted: #8d8d8d;
  --line: #2c2c2c;
  --surface: #1f1f1f;
  --background: #141414;
  --danger: #f97066;
  --success: #32d583;
  --blue: #2e90fa;
  --purple: #b692f6;
  --amber: #fdb022;
  --shadow: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html, body { background: var(--background); color: var(--ink); }
body { background: var(--background); }
.launch-screen, .error-panel { color: var(--muted); background: var(--background); }
.launch-screen strong, .error-panel strong { color: var(--ink); }
.app-shell { max-width: 1180px; padding-bottom: calc(76px + env(safe-area-inset-bottom)); background: #1a1a1a; }
.view { padding: calc(28px + env(safe-area-inset-top)) 22px 44px; }
.bottom-nav {
  width: min(100%, 1180px);
  border-top: 1px solid var(--line);
  background: rgba(26, 26, 26, .92);
  box-shadow: none;
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.nav-item { color: var(--muted); }
.nav-item.active { color: var(--ink); }
.nav-item.active .nav-icon { font-variation-settings: "FILL" 0, "wght" 520, "GRAD" 0, "opsz" 24; }

.workbench-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  max-width: 980px;
  margin: 0 auto 28px;
}
.workbench-kicker { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.workbench-header h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 4vw, 34px);
  line-height: 1.12;
  letter-spacing: -.04em;
}
.workbench-header p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.workbench-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 15px;
  border-radius: 8px;
  color: #111;
  background: var(--primary);
  font-size: 13px;
  font-weight: 680;
  white-space: nowrap;
}
.workbench-primary .material-symbols-rounded { color: inherit; font-size: 18px; }

.workbench-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 980px;
  margin: 0 auto 30px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.workbench-stat {
  min-height: 94px;
  padding: 18px;
  border-right: 1px solid #242424;
}
.workbench-stat:last-child { border-right: 0; }
.workbench-stat small { display: block; color: var(--muted); font-size: 12px; }
.workbench-stat strong {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 10px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -.04em;
}
.workbench-stat i { width: 6px; height: 23px; border-radius: 999px; background: var(--success); }
.workbench-stat i.red { background: var(--danger); }
.workbench-stat i.blue { background: var(--blue); }
.workbench-stat i.purple { background: var(--purple); }
.workbench-stat span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }

.relationship-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  max-width: 1120px;
  margin: 0 auto 24px;
}
.board-lane {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}
.board-lane-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.board-lane-head strong { color: var(--ink); font-size: 13px; }
.board-lane-head small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.35; }
.board-lane-list { display: grid; }
.board-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 13px 0;
  border-top: 1px solid #242424;
  color: inherit;
  background: transparent;
  text-align: left;
}
.board-card-main { display: block; width: 100%; color: inherit; background: transparent; text-align: left; }
.board-card strong { display: block; color: #c9c9c9; font-size: 13px; line-height: 1.35; }
.local-name { margin-left: 6px; color: var(--muted); font-weight: 450; }
.board-card p { margin: 6px 0 0; color: var(--muted); font-size: 12px; line-height: 1.45; }
.board-card .board-reason { color: #c9c9c9; }
.board-card footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; }
.board-card footer span:first-child {
  overflow: hidden;
  color: #5f5f5f;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.board-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--muted);
  background: #232323;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.board-badge.red { color: var(--danger); }
.board-badge.blue { color: var(--blue); }
.board-badge.purple { color: var(--purple); }
.board-badge.green { color: var(--success); }
.board-badge.amber { color: var(--amber); }
.board-empty { padding: 16px 0 4px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.board-complete {
  position: absolute;
  right: 0;
  top: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--muted);
  background: transparent;
}
.board-complete .material-symbols-rounded { font-size: 18px; }

.incomplete-alert {
  max-width: 980px;
  margin: 24px auto 0;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}
.incomplete-alert button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid #f6f6f6;
  border-radius: 999px;
  color: #111;
  background: #eeeeee;
  font-size: 13px;
  font-weight: 760;
  box-shadow: none;
}

.card, .filter-panel, .login-card, .compact-contact-list {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}
.hero, .section-head { color: var(--ink); }
.eyebrow, .hero p, .section-head .eyebrow { color: var(--muted); }
.hero h1, .section-head h2 { color: var(--ink); }
.search, .type-filters {
  border: 1px solid var(--line);
  background: #171717;
  color: var(--muted);
}
.search input { color: var(--ink); }
.filter, .type-filter, .option, .secondary {
  border-color: var(--line);
  color: var(--muted);
  background: #1b1b1b;
}
.filter.active, .type-filter.active, .option.selected {
  color: var(--ink);
  border-color: #3a3a3a;
  background: #242424;
  box-shadow: none;
}
.add-customer-button, .primary-button, .action.primary {
  color: #111;
  background: var(--primary);
  box-shadow: none;
}
.action { color: var(--ink); background: #242424; }
.text-action, .back, .detail-row a { color: var(--primary); }
.customer-avatar, .activity-avatar {
  color: #111 !important;
  background: #cfcfcf !important;
}
.priority, .tag, .customer-type, .pill {
  color: var(--muted);
  background: #242424;
}
.contact-card-name strong, .name-line strong, .profile-name h1, .detail-row strong, .detail-row a,
.info-cell strong, .edit-row strong, .customer-summary, .summary {
  color: var(--ink);
}
.customer-meta, .contact-status-line, .contact-card-foot, .follow-up, .detail-row > span,
.summary-card .summary, .event p, .profile-name p, .field label, .field-hint, .sheet-note {
  color: var(--muted);
}
.contact-card, .customer-card, .summary-card, .details-list, .status-board, .opportunity-card {
  background: var(--surface);
  border-color: var(--line);
}
.status-board > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  color: #111;
  background: #eeeeee;
  font-size: 14px;
  font-weight: 800;
}
#edit-contact-status,
#add-task {
  color: #bfcfff;
  background: linear-gradient(135deg, #002db3, #0040ff);
  border: 1px solid #809fff;
  box-shadow: 0 10px 22px rgba(0, 0, 255, .12);
}
#edit-contact-status {
  border-radius: 0 0 18px 18px;
}
#add-task .stable-icon {
  color: #bfcfff;
}

.contact-card-name,
.profile-name {
  margin-left: 0;
}
.contact-status-line span, .contact-opportunity, .contact-card-foot {
  border-color: #242424;
}
.chevron, .activity-chevron { color: var(--muted); }

.sheet-backdrop { background: rgba(0, 0, 0, .62); }
.sheet {
  color: var(--ink);
  background: #1a1a1a;
  border: 1px solid var(--line);
  box-shadow: none;
}
.grabber { background: #3a3a3a; }
.field input, .field textarea, .field select {
  border-color: var(--line);
  background: #171717;
  color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #5f5f5f;
  box-shadow: 0 0 0 3px rgba(255,255,255,.08);
}
.delete-customer { color: var(--danger); background: #2a1f1f; }
.toast { background: rgba(238,238,238,.94); color: #111; box-shadow: none; }

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

@media (max-width: 640px) {
  .view { padding-left: 18px; padding-right: 18px; }
  .workbench-header { display: block; }
  .workbench-primary { width: 100%; margin-top: 18px; }
  .workbench-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workbench-stat:nth-child(2n) { border-right: 0; }
  .workbench-stat:nth-child(-n + 2) { border-bottom: 1px solid #242424; }
  .relationship-board { display: block; }
  .board-lane { margin-bottom: 16px; }
}

/* Selected option D: dark premium interaction typography */
button,
.add-customer-button,
.primary-button,
.secondary,
.danger-button,
.action,
.text-action,
.filter,
.type-filter,
.option,
.workbench-primary,
.activity-filter,
.complete,
.delete-customer,
.incomplete-alert button {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.add-customer-button,
.primary-button,
.action.primary,
.workbench-primary,
.incomplete-alert button {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.secondary,
.action,
.danger-button,
.complete,
.delete-customer {
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.text-action,
.filter,
.type-filter,
.option,
.activity-filter {
  font-weight: 680;
  letter-spacing: -.01em;
}

.chevron,
.activity-chevron {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  min-width: 22px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
}

.contact-card .chevron {
  margin-left: 8px;
}

.stable-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.15em;
  min-width: 1.15em;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  font-size: 1em;
  font-weight: 700;
  line-height: 1;
}

.nav-icon.stable-icon {
  width: auto;
  min-width: 0;
  font-size: 21px;
  font-weight: 760;
}

.activity-filter .stable-icon {
  color: #8d8d8d;
  font-size: 24px;
}

.activity-filter.active .stable-icon {
  color: var(--ink);
}

.suggested-heading .stable-icon {
  color: var(--primary);
  font-size: 18px;
}

.suggested-icon.stable-icon {
  width: 52px;
  min-width: 52px;
  height: 52px;
  border-radius: 50%;
  color: #111;
  background: #d7d7d7;
  font-size: 24px;
}

.activity-context .stable-icon {
  flex: 0 0 auto;
  width: 15px;
  min-width: 15px;
  color: inherit;
  font-size: 12px;
}

.activity-complete .stable-icon,
.board-complete .stable-icon {
  color: inherit;
  font-size: 16px;
}

/* Practical light CRM default: clearer reading and safer touch targets */
:root {
  color-scheme: light;
  --primary: #155eef;
  --primary-soft: #eaf1ff;
  --ink: #172033;
  --muted: #596174;
  --line: #e1e7f0;
  --surface: #ffffff;
  --background: #f6f7f9;
  --danger: #d64f20;
  --success: #16835d;
  --blue: #155eef;
  --purple: #6741d9;
  --amber: #b54708;
  --shadow: 0 10px 32px rgba(23, 32, 51, .07);
}

html, body,
body,
.app-shell {
  background: var(--background);
  color: var(--ink);
}

.app-shell {
  max-width: 720px;
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

.view {
  padding: calc(22px + env(safe-area-inset-top)) 18px 76px;
}

.bottom-nav {
  width: min(100%, 720px);
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -10px 24px rgba(16, 24, 40, .05);
}

.nav-item { color: #667085; }
.nav-item.active { color: var(--primary); }

.workbench-header,
.workbench-stats,
.relationship-board,
.incomplete-alert {
  max-width: 720px;
}

.workbench-header h1,
.hero h1,
.section-head h2,
.profile-name h1,
.contact-card-name strong,
.name-line strong,
.detail-row strong,
.detail-row a,
.info-cell strong,
.edit-row strong,
.summary,
.customer-summary {
  color: var(--ink);
}

.workbench-kicker,
.workbench-header p:last-child,
.board-lane-head small,
.board-card p,
.board-card footer span:first-child,
.customer-meta,
.contact-status-line,
.contact-card-foot,
.follow-up,
.detail-row > span,
.event p,
.profile-name p,
.field label,
.field-hint,
.sheet-note,
.empty {
  color: var(--muted);
}

.card,
.board-lane,
.workbench-stats,
.compact-contact-list,
.filter-panel,
.login-card,
.contact-card,
.customer-card,
.summary-card,
.details-list,
.status-board,
.opportunity-card,
.service-card,
.timeline,
.suggested-action,
.activity-list {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.workbench-stats {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workbench-stat {
  border-right: 1px solid var(--line);
}

.workbench-stat:nth-child(4n) { border-right: 1px solid var(--line); }
.workbench-stat:last-child { border-right: 0; }
.workbench-stat i.amber { background: var(--amber); }

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

.board-card {
  border-top-color: var(--line);
}

.board-card strong,
.board-card .board-reason {
  color: #344054;
}

.board-badge {
  background: #f2f4f7;
  color: #475467;
}

.board-badge.red { color: #b42318; background: #fff1f0; }
.board-badge.blue { color: #155eef; background: #eaf1ff; }
.board-badge.purple { color: #5f3dc4; background: #f1edff; }
.board-badge.green { color: #027a48; background: #e7f6ee; }
.board-badge.amber { color: #b54708; background: #fff4e5; }

.workbench-primary,
.add-customer-button,
.primary-button,
.action.primary,
.incomplete-alert button {
  min-height: 44px;
  color: white;
  background: var(--primary);
}

.action,
.secondary,
.filter,
.type-filter,
.option {
  color: #344054;
  background: #f2f4f7;
}

.text-action,
.back,
.detail-row a {
  color: var(--primary);
}

.customer-avatar,
.activity-avatar {
  color: #075bd8 !important;
  background: #e2edff !important;
}

.tag,
.priority,
.customer-type,
.pill {
  color: #344054;
  background: #eef2f7;
}

.priority {
  color: #b42318;
  background: #fff1f0;
}

.search,
.type-filters,
.field input,
.field textarea,
.field select {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}

.sheet-backdrop {
  background: rgba(16, 24, 40, .42);
}

.sheet {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  box-shadow: 0 -18px 44px rgba(16, 24, 40, .12);
}

.delete-mini,
.danger-link {
  min-height: 44px;
  color: var(--danger);
  background: #fff0eb;
}

.complete,
.edit-opportunity,
.edit-service,
.board-complete,
.activity-complete,
.touch-action {
  min-width: 44px;
  min-height: 44px;
  padding: 10px 12px;
}

.opportunity-head .text-action {
  min-width: 56px;
  border-radius: 10px;
  background: #eef4ff;
}

.delete-customer {
  margin-bottom: 18px;
  color: var(--danger);
  background: #fff0eb;
}

.toast {
  color: white;
  background: rgba(23, 32, 51, .94);
}

@media (max-width: 760px) {
  .workbench-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .workbench-stat:nth-child(2n) { border-right: 0; }
  .workbench-stat:nth-child(-n + 4) { border-bottom: 1px solid var(--line); }
  .relationship-board { display: block; }
}
