/* Sales › Target Accounts (HUB-711, 13 Nov design target-accounts.php), on the CRM's tokens.
   The Analyze charts draw bars (.sa-bars, at the end of this file). */
.ta-page {
  max-width: 1480px;
  margin: 0 auto;
  padding: 24px 32px 40px;
  min-width: 0;
}
.ta-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ta-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.ta-tabs {
  margin: 12px 0 16px;
}
.ta-views {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.ta-view {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.ta-view.is-active {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 600;
}
.ta-views__toggle {
  margin-left: auto;
}
.ta-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.ta-metrics--flat {
  padding: 0;
  margin: 0;
  border: 0;
}
.ta-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}
.ta-metric__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.ta-metric__value {
  font-size: 24px;
  font-weight: 700;
  color: var(--brand);
}
.ta-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.ta-search {
  width: 240px;
  max-width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.ta-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow-x: auto;
}
.ta-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 14px;
}
.ta-table th {
  height: 44px;
  padding: 0 14px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ta-table td {
  height: 44px;
  padding: 0 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ta-num {
  text-align: center !important;
}
.ta-name {
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
}
.ta-tier {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 600;
}
.ta-empty {
  padding: 28px 16px !important;
  height: auto !important;
  text-align: center;
  color: var(--text-muted) !important;
  white-space: normal !important;
}
.ta-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.ta-count,
.ta-muted {
  color: var(--text-muted);
  font-size: 13px;
}
.ta-pager {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.ta-pager button {
  border: 0;
  background: none;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}
.ta-pager button:disabled {
  color: var(--text-muted);
  cursor: default;
}
.ta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 16px;
}
.ta-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  min-width: 0;
}
.ta-card--wide {
  grid-column: 1 / -1;
}
.ta-card h2 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.ta-figure {
  margin: 8px 0 4px;
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}
@media (max-width: 700px) {
  .ta-page {
    padding: 16px;
  }
  .ta-views__toggle {
    margin-left: 0;
  }
}

/* HUB-711 Day 3: selection, Edit columns, Choose target accounts. */
.ta-toolbar__spacer{flex:1}
.ta-check{width:40px}
.ta-table tr.is-selected td{background:var(--surface-2)}
.ta-cols{position:relative}
.ta-cols__menu{position:absolute;right:0;top:calc(100% + 6px);z-index:20;display:flex;flex-direction:column;gap:6px;min-width:240px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:var(--shadow-lg)}
.ta-cols__menu label{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--text);cursor:pointer}
.ta-pick{list-style:none;margin:12px 0 0;padding:0;max-height:360px;overflow-y:auto;display:flex;flex-direction:column;gap:2px}
.ta-pick__row{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;text-align:left;padding:8px 10px;border-radius:8px;cursor:pointer}
.ta-pick__row:hover{background:var(--surface-2)}
.ta-pick__row.is-disabled{cursor:default;opacity:.7}
.ta-pick__name{font-weight:500;color:var(--text)}
.ta-error{margin:10px 0 0;color:var(--danger);font-size:13px}

/* Period select and bar chart rows, from the earlier Sales Analytics page (HUB-713) that
   Target Accounts reused; kept here now that Sales Analytics follows the design. */
.sa-period {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-muted);
}
.sa-period select {
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.sa-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.sa-bar {
  display: grid;
  grid-template-columns: minmax(80px, 200px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.sa-bar__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.sa-bar__track {
  height: 14px;
  border-radius: 4px;
  background: var(--surface-2);
  overflow: hidden;
}
.sa-bar__fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  background: var(--brand);
}
.sa-bar__value {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
