/* ================================================================
   Phase 6: global readability calibration
   ================================================================ */

body {
  font-size: 15px;
  line-height: 1.58;
}

.btn { font-size: 14px; }
.btn.sm { font-size: 13px; }
.brand { font-size: 16px; letter-spacing: 0; }
.brand-caption { font-size: 11px; letter-spacing: 0; }
.topbar-context span,
.user-info { font-size: 13px; }
.topbar-context strong { font-size: 15px; }
.menu-item { font-size: 14px; }
.profile-menu-head strong { font-size: 15px; }
.profile-menu-head span:last-child { font-size: 12px; }
.role-badge { min-height: 22px; font-size: 11px; }
.toast { font-size: 14px; }

/* ---------- dashboard overview ---------- */
.page-eyebrow { font-size: 12px; letter-spacing: 0; }
.page-heading h1 { letter-spacing: 0; }
.page-heading p { font-size: 14px; line-height: 1.6; }
.refresh-state { font-size: 12px; }

.metric-card > span { font-size: 12px; }
.metric-card > strong { font-size: 27px; letter-spacing: 0; }
.metric-card > small { font-size: 11px; }
.task-alert small { font-size: 11px; }
.task-alert strong { font-size: 13px; }
.archive-view-banner strong { font-size: 14px; }
.archive-view-banner small { font-size: 12px; }

.search-field { height: 44px; }
.search-field input { font-size: 15px; }
.filter-field > span { font-size: 12px; }
.filter-field .filter { height: 42px; font-size: 14px; }
.filter-actions > span { font-size: 12px; }
.filter-actions .btn { min-height: 36px; font-size: 13px; }
.active-filter { font-size: 12px; }
.clear-all-filters { font-size: 12px; }

.results-head h2 { font-size: 16px; }
.results-head #resultsCount,
.results-help { font-size: 12px; }
#grid { min-width: 1360px; }
#grid thead th {
  height: 48px;
  padding: 0 12px;
  font-size: 12px;
  letter-spacing: 0;
}
#grid tbody td {
  height: 68px;
  padding: 10px 12px;
  font-size: 13px;
}
.group-label { font-size: 12px; }
.table-person { gap: 8px; }
.mini-avatar {
  width: 27px;
  height: 27px;
  border-radius: 9px;
  font-size: 12px;
}
#grid .cust-name strong { font-size: 15px; }
#grid .cust-name small { max-width: 136px; font-size: 11px; }
#grid .ellip { max-width: 132px; }
#grid .ellip-phone { max-width: 112px; }
#grid .ellip-amount { max-width: 150px; }
.badge { min-height: 24px; padding-inline: 9px; font-size: 12px; }
.follow-state { gap: 6px; font-size: 12px; }
.cell-count { min-width: 26px; font-size: 12px; }
.comment-reviewed { font-size: 11px; }
.created-date { font-size: 12px; }
.created-age { font-size: 11px; }
.empty-state strong,
.mobile-empty strong { font-size: 15px; }
.empty-state p,
.mobile-empty p { font-size: 13px; }

/* ---------- customer workspace ---------- */
.workspace-heading strong { font-size: 18px; letter-spacing: 0; }
.workspace-heading small { font-size: 12px; }
.activity-summary > div { min-height: 64px; }
.activity-summary small { font-size: 11px; }
.activity-summary strong { font-size: 20px; }
.activity-summary strong span { font-size: 11px; }

.profile-section-head strong { font-size: 14px; }
.profile-section-head small { font-size: 11px; }
#detailModal .profile-field { font-size: 12px; }
.profile-field > span small { font-size: 10px; }
.profile-field em { font-size: 10px; }
#detailModal .profile-field input,
#detailModal .profile-field select,
#detailModal .profile-field textarea {
  font-size: 14px;
}
#detailModal .profile-field input,
#detailModal .profile-field select { height: 43px; }
#detailModal .profile-field textarea { line-height: 1.65; }
.status-static small { font-size: 11px; }
.dup-warn { font-size: 12px; line-height: 1.6; }
.profile-actions > span { font-size: 11px; }
.profile-actions .btn { font-size: 13px; }
.readonly-banner strong,
.status-management-head strong { font-size: 13px; }
.readonly-banner small,
.status-management-head small { font-size: 11px; }
.readonly-item > span { font-size: 10px; }
.readonly-item > strong { font-size: 13px; line-height: 1.55; }
.status-management-actions > small { font-size: 10px; }
.status-management .btn { font-size: 12px; }
.status-management-reason { font-size: 12px; line-height: 1.65; }

/* ---------- follow-up composer and timeline ---------- */
.composer-head h3,
.timeline-head h3 { font-size: 15px; letter-spacing: 0; }
.composer-head p { font-size: 12px; line-height: 1.55; }
#detailModal .composer-date,
#detailModal .composer-field { font-size: 12px; }
#detailModal .composer-date input,
#detailModal .composer-field input,
#detailModal .composer-field textarea { font-size: 14px; }
.upload-panel-head span { font-size: 13px; }
.upload-panel-head small { font-size: 11px; }
.dropzone-copy strong { font-size: 14px; }
.dropzone-copy small,
.dropzone .link-btn,
.upbar-text { font-size: 12px; }
.followup-composer-actions > span { font-size: 11px; }

.timeline-head span { font-size: 11px; letter-spacing: 0; }
.timeline-head strong { font-size: 14px; }
.timeline-marker span {
  width: 32px;
  height: 32px;
  font-size: 9px;
}
.tl-item { padding: 16px 16px 16px 46px; }
.tl-meta { font-size: 13px; }
.timeline-date { font-size: 14px; }
.fu-counts { min-height: 24px; font-size: 12px; }
.icon-link,
.tl-del,
.tl-edit {
  min-height: 30px;
  font-size: 12px;
}
.tl-content {
  padding: 12px 13px;
  font-size: 15px;
  line-height: 1.75;
}
.tl-edit-text { font-size: 15px; line-height: 1.7; }
.fu-thumb-label { font-size: 11px; }
.fu-shot-caption { font-size: 11px; }
.cm-nest-head span { font-size: 12px; }
.cm-nest-head strong { font-size: 12px; }
.cm-avatar { font-size: 12px; }
.cm-head { font-size: 12px; }
.cm-author { font-size: 13px; }
.cm-item > .tl-content {
  font-size: 14px;
  line-height: 1.72;
}
.link-btn.comment-action { font-size: 13px; }
.cm-reply-box .cm-text { font-size: 14px; line-height: 1.65; }
.empty-activity strong { font-size: 15px; }
.empty-activity p { font-size: 12px; }

/* ---------- admin and security surfaces ---------- */
.security-field { font-size: 13px; }
.security-field small { font-size: 11px; }
.password-card .error { font-size: 13px; }
.admin-summary small { font-size: 12px; }
.admin-summary strong { font-size: 24px; }
.admin-form-head strong,
.admin-panel-head strong { font-size: 15px; }
.admin-form-head small,
.admin-panel-head small { font-size: 12px; }
.admin-field,
.admin-check-section > span { font-size: 12px; }
.admin-field small { font-size: 10px; }
#adminModal .admin-field input,
#adminModal .admin-field select { font-size: 14px; }
.admin-scope-note strong { font-size: 13px; }
.admin-scope-note small { font-size: 11px; }
.admin-check { font-size: 13px; }
.admin-panel-head span { font-size: 11px; letter-spacing: 0; }
.admin-table th { font-size: 12px; }
.admin-table td { font-size: 13px; }
.admin-user-cell strong { font-size: 14px; }
.admin-user-cell small { font-size: 12px; }
.admin-state { font-size: 12px; }
.admin-group-chip { font-size: 13px; }
.input-prompt h2 { font-size: 18px; }
.input-prompt p { font-size: 13px; }

/* ---------- requested refinements ---------- */
.profile-trigger {
  min-width: 66px;
}
.profile-trigger .avatar {
  width: auto;
  min-width: 34px;
  padding: 0 8px;
  white-space: nowrap;
}
.profile-menu-head .avatar {
  width: auto;
  min-width: 38px;
  padding: 0 9px;
}
.owner-chip {
  min-width: 34px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border-radius: 9px;
  color: #4338ca;
  background: #eef2ff;
  font-size: 13px;
  font-weight: 740;
  line-height: 1;
  white-space: nowrap;
}

.follow-state {
  gap: 7px;
  font-size: 14px;
  font-weight: 760;
}
.follow-state i {
  width: 8px;
  height: 8px;
}
.follow-state.done { color: #078c4a; }
.follow-state.done i {
  background: #18b66b;
  box-shadow: 0 0 0 4px #e8f8ef;
}
.follow-state.due { color: #dc2626; }
.follow-state.due i {
  background: #ef4444;
  box-shadow: 0 0 0 4px #feeceb;
}

.timeline::before {
  left: 28px;
}
.timeline-marker {
  width: 58px;
}
.timeline-marker span {
  width: auto;
  min-width: 54px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 820;
  line-height: 1.08;
  white-space: nowrap;
}
.tl-item {
  padding-left: 76px;
}
.tl-content,
.cm-item > .tl-content {
  color: #000;
  font-weight: 600;
}
.cm-item > .tl-content {
  font-size: 13px;
  line-height: 1.65;
  font-weight: 560;
}

.edit-profile-actions {
  justify-content: space-between;
  gap: 18px;
}
.edit-profile-actions > span {
  flex: 1;
  min-width: 0;
}
.edit-profile-actions .btn {
  flex: 0 0 auto;
}
.edit-profile-actions #delCustBtn { min-width: 98px; }
.edit-profile-actions #saveCustBtn { min-width: 132px; }

@media (min-width: 721px) {
  .dashboard-page {
    padding-top: 22px;
  }
  .page-heading {
    margin-bottom: 16px;
  }
  .page-heading h1 {
    font-size: clamp(26px, 2vw, 32px);
    line-height: 1.12;
  }
  .page-heading p {
    margin-top: 6px;
  }
  .dashboard-stats {
    margin-bottom: 14px;
  }
  .metrics-grid {
    gap: 8px;
  }
  .metric-card {
    min-height: 92px;
    padding: 12px 14px;
  }
  .metric-card::after {
    width: 48px;
    height: 48px;
    right: -22px;
    top: -24px;
  }
  .metric-card > strong {
    margin-top: 4px;
    font-size: 25px;
  }
  .metric-card > small {
    margin-top: 5px;
  }
  .customer-controls {
    margin-bottom: 14px;
    padding: 12px 14px;
  }
  .search-field {
    height: 42px;
  }
  .filter-panel {
    margin-top: 10px;
  }
  .filter-fields {
    gap: 8px;
  }
  .filter-field .filter {
    height: 40px;
  }
  .filter-actions {
    margin-top: 8px;
  }
  .composer-grid {
    grid-template-columns: minmax(0, 1fr) clamp(96px, 7vw, 124px);
  }
  #detailModal .composer-field textarea.fu-big {
    min-height: 136px;
  }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .brand { font-size: 15px; }
  .profile-trigger {
    width: auto;
    min-width: 48px;
  }
  .profile-trigger .avatar {
    min-width: 34px;
    padding-inline: 7px;
  }
  .page-eyebrow { font-size: 11px; }
  .page-heading h1 { font-size: 26px; }
  .page-heading p { font-size: 13px; }
  .metric-card > span { font-size: 12px; }
  .metric-card > strong { font-size: 25px; }
  .metric-card > small { font-size: 11px; }
  .task-alert small { font-size: 11px; }
  .task-alert strong { font-size: 12px; }
  .filter-field > span { font-size: 12px; }
  .filter-field .filter { font-size: 16px; }
  .filter-actions .btn { font-size: 13px; }
  .page-new-btn,
  .search-submit,
  .mobile-filter-btn {
    gap: 0;
    font-size: 0;
    line-height: 0;
  }
  .results-head h2 { font-size: 16px; }
  .customer-card-name small { font-size: 11px; }
  .customer-card-name strong { font-size: 17px; letter-spacing: 0; }
  .customer-card-owner { font-size: 13px; }
  .customer-card-facts small { font-size: 11px; }
  .customer-card-facts b { font-size: 13px; }
  .customer-card-contact { font-size: 12px; }
  .card-metric { font-size: 11px; }
  .card-metric b { font-size: 12px; }
  .card-age { font-size: 11px; }
  .owner-chip {
    min-width: 30px;
    height: 26px;
    padding-inline: 9px;
    font-size: 12px;
  }
  .follow-state {
    font-size: 13px;
  }

  .workspace-heading strong { font-size: 16px; }
  .workspace-heading small { font-size: 11px; }
  .mobile-workspace-tabs button { font-size: 13px; }
  .mobile-workspace-tabs button span { font-size: 10px; }
  .activity-summary > div {
    min-height: 58px;
  }
  .activity-summary small { font-size: 11px; }
  .activity-summary strong { font-size: 19px; }
  #detailModal .profile-field { font-size: 13px; }
  .profile-field > span small,
  .profile-field em { font-size: 11px; }
  .readonly-item > span { font-size: 11px; }
  .readonly-item > strong { font-size: 14px; }

  #detailModal .composer-date,
  #detailModal .composer-field { font-size: 13px; }
  #detailModal .composer-date input { font-size: 15px; }
  .tl-content { font-size: 15px; }
  .cm-item > .tl-content {
    font-size: 13px;
    line-height: 1.65;
    font-weight: 560;
  }
  .timeline::before { display: none; }
  .timeline-marker {
    top: 13px;
    left: 12px;
    width: auto;
  }
  .timeline-marker span {
    min-width: 56px;
    height: 34px;
    padding-inline: 10px;
    font-size: 11px;
  }
  .tl-item {
    padding: 13px 12px;
  }
  .tl-meta {
    min-height: 34px;
    padding-left: 70px;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    gap: 10px;
  }
  .tl-meta-main {
    flex: 1 1 auto;
    padding-right: 6px;
  }
  .tl-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    margin-left: auto;
  }
  .cm-head { font-size: 12px; }
  .cm-author { font-size: 13px; }
  .link-btn.comment-action { font-size: 13px; }
  .edit-profile-actions {
    gap: 12px;
  }
  .edit-profile-actions .btn {
    min-width: 0;
  }

  .admin-summary small { font-size: 11px; }
  .admin-field,
  .admin-check-section > span { font-size: 13px; }
  .admin-user-card-head strong { font-size: 15px; }
  .admin-user-card-head small { font-size: 12px; }
  .admin-user-card-grid small { font-size: 11px; }
  .admin-user-card-grid b { font-size: 13px; }
}
