/* Offline Workbench demo · base layout and shared components */
:root {
  --green: #00a651;
  --green-600: #009247;
  --green-700: #007a3c;
  --green-soft: #e9f8f0;
  --green-tint: #f2fbf6;
  --ink: #1d2733;
  --ink-2: #394552;
  --muted: #7c8895;
  --muted-2: #98a2ad;
  --line: #e7ebef;
  --line-soft: #f0f2f5;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --amber: #b7791f;
  --red: #b42318;
  --blue: #2563eb;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px rgba(16, 24, 40, .04);
  --radius: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Liberation Mono', monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--green-700); }
h1, h2, h3, h4, h5, p { margin: 0; }
svg.icon { flex: 0 0 auto; display: block; }
.mono { font-family: var(--mono); font-size: .94em; }
.muted { color: var(--muted-2) !important; }
.text-green { color: #08783c !important; }
.text-danger { color: var(--red) !important; }
.text-warn { color: #9a6700 !important; }
.num { font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d5dbe1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #c1c9d1; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 58px;
  padding: 0 20px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(16, 24, 40, .02);
}
.brand { display: flex; align-items: center; gap: 10px; min-width: 226px; }
.brand-logo { width: 32px; height: 32px; flex: 0 0 32px; }
.brand-copy { display: flex; flex-direction: column; }
.brand-name { font-size: 14.5px; font-weight: 800; letter-spacing: -.2px; line-height: 1.2; }
.brand-sub {
  font-size: 9px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
}
.presence-switch { display: flex; align-items: center; gap: 18px; height: 100%; }
.presence-tab {
  position: relative;
  height: 100%;
  padding: 0 2px;
  border: 0;
  background: none;
  color: #6a7581;
  font-size: 13px;
  font-weight: 650;
}
.presence-tab:hover { color: #28333e; }
.presence-tab.is-active { color: var(--green-700); }
.presence-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: var(--green);
}
.served-block { display: flex; align-items: center; gap: 9px; margin-left: 2px; }
.served-chip {
  padding: 6px 10px;
  border-radius: 4px;
  background: #0a8f46;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .02em;
  white-space: nowrap;
}
.served-chip strong { font-weight: 800; letter-spacing: .05em; }
.checkout-btn {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dfe4ea;
  border-radius: 5px;
  background: #fff;
  color: #4a5562;
  font-size: 11px;
  font-weight: 650;
}
.checkout-btn:hover { border-color: var(--green); color: var(--green-700); }
.topbar-right { display: flex; align-items: center; gap: 9px; margin-left: auto; }
.today-label { font-size: 11.5px; color: #6f7a86; }
.today-count {
  padding: 3px 8px;
  border-radius: 5px;
  background: #eef7f1;
  color: var(--green-700);
  font-size: 11.5px;
  font-weight: 750;
}
.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  font-size: 11px;
  font-weight: 750;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e4eeea;
}

/* --------------------------------------------------------------- workspace */
.workspace { display: flex; height: calc(100vh - 58px); overflow: hidden; }
.sidebar {
  display: flex;
  flex-direction: column;
  width: 274px;
  flex: 0 0 274px;
  min-height: 0;
  padding: 14px 12px 10px;
  background: #fff;
  border-right: 1px solid var(--line);
}
.search-wrap { position: relative; }
.customer-search {
  width: 100%;
  height: 38px;
  padding: 0 34px 0 36px;
  border: 1px solid #e3e8ed;
  border-radius: 7px;
  background: #f7f9fa;
  font-size: 12.5px;
  outline: none;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.customer-search::placeholder { color: #9aa4af; }
.customer-search:focus {
  border-color: var(--green);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0, 166, 81, .11);
}
.search-icon {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 16px;
  height: 16px;
  color: #8a95a2;
  pointer-events: none;
}
.search-kbd {
  position: absolute;
  right: 9px;
  top: 10px;
  padding: 1px 5px;
  border: 1px solid #e1e5ea;
  border-radius: 4px;
  background: #fff;
  color: #9aa4af;
  font-family: var(--mono);
  font-size: 9px;
  line-height: 1.4;
}
.list-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 4px 8px;
  color: #59636f;
  font-size: 12px;
  font-weight: 750;
}
.list-hint {
  font-size: 9px;
  font-weight: 700;
  color: #a2abb5;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.customer-list {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  padding: 0 2px 8px;
  overflow-y: auto;
}
.customer-item {
  position: relative;
  display: flex;
  gap: 10px;
  width: 100%;
  padding: 9px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  transition: background .12s, border-color .12s;
}
.customer-item:hover { background: #f7f9fa; }
.customer-item.is-selected {
  border-color: #ccecdb;
  background: linear-gradient(90deg, #e9f8f0, #f4fbf7);
}
.customer-item.is-selected::after {
  content: '';
  position: absolute;
  top: 8px;
  right: 0;
  bottom: 8px;
  width: 3px;
  border-radius: 3px;
  background: var(--green);
}
.customer-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .02em;
}
.avatar-1 { background: linear-gradient(135deg, #0ea5a3, #0f766e); }
.avatar-2 { background: linear-gradient(135deg, #7c9c2f, #4d7c0f); }
.avatar-3 { background: linear-gradient(135deg, #e08b3e, #b45309); }
.avatar-4 { background: linear-gradient(135deg, #7c73e6, #4f46e5); }
.avatar-5 { background: linear-gradient(135deg, #dc6a8d, #be185d); }
.presence-pip {
  position: absolute;
  right: -1px;
  bottom: -1px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #c5ccd4;
}
.presence-pip.is-online { background: #12b76a; }
.customer-copy { display: flex; flex-direction: column; min-width: 0; gap: 1px; }
.customer-name-row { display: flex; align-items: center; gap: 5px; min-width: 0; }
.customer-name {
  overflow: hidden;
  color: #26313d;
  font-size: 12px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.customer-id { color: #8a95a2; font-size: 10px; }
.customer-phone {
  width: max-content;
  margin-top: 2px;
  padding: 0 5px;
  border: 1px solid #d3efdf;
  border-radius: 3px;
  background: #eaf8f0;
  color: var(--green-700);
  font-size: 9.5px;
}
.sidebar-empty { padding: 30px 10px; text-align: center; color: var(--muted); }
.sidebar-empty .icon { margin: 0 auto 8px; color: #b3bcc5; }
.sidebar-empty strong { display: block; color: #5d6876; font-size: 12px; }
.sidebar-empty p { margin-top: 4px; font-size: 11px; }
.sidebar-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 5px 2px;
  border-top: 1px solid var(--line-soft);
  color: #98a2ad;
  font-size: 9.5px;
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #12b76a;
}

/* --------------------------------------------------------------- main area */
.main-scroll { flex: 1; min-width: 0; overflow-y: auto; background: var(--bg); }
.customer-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 24px 15px;
  border-bottom: 1px solid #e9eef0;
  background: linear-gradient(110deg, #fff 55%, #f1faf5);
}
.hero-left { display: flex; gap: 14px; min-width: 0; }
.hero-avatar {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .02em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18), 0 4px 12px rgba(15, 118, 110, .16);
}
.hero-copy { min-width: 0; }
.hero-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.hero-title h1 { font-size: 20px; line-height: 1.25; letter-spacing: -.35px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid #e6eaee;
  border-radius: 999px;
  background: #f5f7f9;
  color: #5d6875;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.online-badge { border-color: #d3efdf; background: #eaf8f0; color: var(--green-700); }
.hero-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  color: #7d8894;
  font-size: 11px;
}
.hero-meta strong { color: #4f5b68; font-weight: 700; }
.meta-sep { color: #c1c8d0; }
.inline-copy {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  margin-left: 3px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #98a2ad;
}
.inline-copy:hover { background: #eef2f4; color: var(--green-700); }
.hero-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.hero-right { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 9px; }
.hero-balance { text-align: right; }
.hero-balance span {
  display: block;
  color: #8a95a2;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-balance strong { font-size: 19px; letter-spacing: -.3px; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; gap: 6px; }

.main-tabs {
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 0 20px;
  overflow-x: auto;
  border-bottom: 1px solid #dcecdf;
  background: linear-gradient(180deg, #f0f9f3, #eaf6ef);
  scrollbar-width: none;
}
.main-tabs::-webkit-scrollbar { display: none; }
.main-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 9px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #5f6b77;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
  transition: color .12s, background .12s;
}
.main-tab .icon { display: none; }
.main-tab:hover { color: #28333e; }
.main-tab.is-disabled,
.main-tab.is-disabled:hover {
  color: #b3bcc5;
  cursor: not-allowed;
}
.main-tab.is-active {
  border-bottom-color: var(--green);
  border-radius: 8px 8px 0 0;
  background: #fff;
  color: var(--green-700);
  box-shadow: 0 -1px 4px rgba(15, 60, 40, .06);
}
.main-tab.is-active .icon { opacity: 1; }
.content { max-width: 1620px; margin: 0 auto; padding: 18px 22px 42px; }
.tab-page { display: flex; flex-direction: column; gap: 14px; animation: rise .18s ease-out; }
@keyframes rise {
  from { opacity: .55; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------- controls */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 35px;
  padding: 0 12px;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  background: #fff;
  color: #3f4a56;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.btn:hover { border-color: #c7d0d9; background: #fbfcfd; }
.btn:active { transform: translateY(1px); }
.btn-primary { border-color: var(--green); background: var(--green); color: #fff; }
.btn-primary:hover { border-color: var(--green-600); background: var(--green-600); }
.btn-sm { height: 29px; padding: 0 9px; font-size: 11px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.field > span {
  color: #8b96a2;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.field input, .field select {
  width: 100%;
  height: 35px;
  padding: 0 10px;
  border: 1px solid #dfe4ea;
  border-radius: 6px;
  background: #fff;
  color: #2d3742;
  font-size: 12px;
  outline: none;
  transition: border-color .12s, box-shadow .12s;
}
.field input:focus, .field select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0, 166, 81, .1);
}
.field-grow { flex: 1 1 230px; }
.input-with-icon { position: relative; display: block; }
.input-with-icon .icon {
  position: absolute;
  top: 10px;
  left: 10px;
  color: #8b96a2;
  pointer-events: none;
}
.input-with-icon input { padding-left: 32px; }
.filter-card {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.filter-grid { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px; }
.filter-actions { display: flex; gap: 6px; }

/* --------------------------------------------------------------- surfaces */
.panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.panel-head { padding: 13px 16px 0; }
.panel-head h3 { font-size: 12.5px; font-weight: 750; letter-spacing: -.1px; }
.panel-head p { margin-top: 3px; color: #8a95a2; font-size: 10.5px; }
.panel-body { padding: 13px 16px 15px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; }
.two-col-narrow { grid-template-columns: minmax(280px, .9fr) minmax(320px, 1.1fr); }
.stat-grid { display: grid; gap: 10px; }
.stat-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.stat-top { display: flex; align-items: center; gap: 8px; }
.stat-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.tone-green { background: #e9f8f0; color: #0a8f46; }
.tone-blue { background: #eaf1ff; color: #2563eb; }
.tone-purple { background: #f1ecff; color: #7c3aed; }
.tone-amber { background: #fff5e3; color: #b7791f; }
.tone-teal { background: #e6f7f6; color: #0f766e; }
.tone-pink { background: #fdeef4; color: #be185d; }
.stat-label {
  color: #8a95a2;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.stat-value {
  display: block;
  margin-top: 9px;
  font-size: 19px;
  font-weight: 780;
  letter-spacing: -.35px;
  line-height: 1.12;
  font-variant-numeric: tabular-nums;
}
.stat-value .status-pill { font-size: 10.5px; letter-spacing: 0; }
.stat-foot { display: block; margin-top: 5px; color: #8a95a2; font-size: 10.5px; }

/* ----------------------------------------------------------------- tables */
.table-wrap { overflow: auto; border: 1px solid #edf0f3; border-radius: 8px; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; font-size: 11.5px; }
.data-table th {
  padding: 8px 11px;
  border-bottom: 1px solid #edf0f3;
  background: #f7f9fa;
  color: #7b8794;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .05em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}
.data-table td { padding: 9px 11px; border-bottom: 1px solid #f0f2f5; color: #3f4a56; vertical-align: top; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fbfcfd; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .muted { font-size: 10.5px; }
.table-icon {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 6px;
  background: #f1f5f3;
  color: #3d7a58;
  vertical-align: middle;
}

/* ------------------------------------------------------------------ pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-success { border-color: #ccecdb; background: #e9f8f0; color: #08783c; }
.status-warning { border-color: #f3e0b5; background: #fff6e5; color: #9a6700; }
.status-danger { border-color: #f6d4d4; background: #fdecec; color: #b42318; }
.status-info { border-color: #d5e2ff; background: #eaf1ff; color: #1d4ed8; }
.status-neutral { border-color: #e4e8ec; background: #f3f5f7; color: #667085; }
.mini-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border: 1px solid #e6eaee;
  border-radius: 4px;
  background: #f4f6f8;
  color: #5e6a77;
  font-size: 9px;
  font-weight: 650;
  white-space: nowrap;
}
.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.flag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.flag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border: 1px solid #dcefe4;
  border-radius: 999px;
  background: #f4fbf7;
  color: #356a4e;
  font-size: 10px;
  font-weight: 650;
}
.note-copy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: #5d6875;
  font-size: 12px;
  line-height: 1.6;
}
.note-copy .icon { margin-top: 2px; color: #8b96a2; }

/* ------------------------------------------------------------- key/value */
.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; }
.kv-grid-1 { grid-template-columns: 1fr; }
.kv-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kv-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kv-item { min-width: 0; }
.kv-item > span {
  display: block;
  margin-bottom: 3px;
  color: #8a95a2;
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.kv-item > strong { display: block; color: #303b47; font-size: 11.5px; font-weight: 650; line-height: 1.45; }
.compact-grid { margin-top: 8px; }
.settings-grid { display: flex; flex-direction: column; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11.5px;
}
.settings-row:last-child { border-bottom: 0; }
.settings-row > span { color: #7c8895; }
.settings-row > strong { color: #303b47; font-size: 11.5px; font-weight: 650; text-align: right; }
.big-balance {
  margin: 2px 0 6px;
  font-size: 27px;
  font-weight: 780;
  letter-spacing: -.7px;
  font-variant-numeric: tabular-nums;
}
.balance-foot { display: flex; align-items: center; gap: 6px; color: #7c8895; font-size: 10.5px; }
.tier-list { display: flex; flex-direction: column; gap: 6px; }
.tier-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 11px;
  border: 1px solid #eef1f4;
  border-radius: 7px;
  background: #fbfcfd;
  font-size: 11.5px;
}
.tier-row strong { color: var(--green-700); }
.section-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  color: #8a95a2;
  font-size: 10.5px;
  line-height: 1.55;
}
.section-note .icon { margin-top: 1px; }

/* --------------------------------------------------------------- targets */
.target-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.target-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.target-head { display: flex; align-items: center; gap: 9px; }
.target-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border-radius: 9px;
  background: #eef7f1;
  color: #0a8f46;
}
.target-name { min-width: 0; flex: 1; }
.target-name h4 { overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.target-name span { color: #8a95a2; font-size: 9.5px; }
.target-amounts { display: flex; align-items: baseline; gap: 5px; margin-top: 12px; }
.target-amounts strong { font-size: 16px; letter-spacing: -.25px; }
.target-amounts span { color: #8a95a2; font-size: 10px; }
.progress { height: 7px; margin-top: 9px; overflow: hidden; border-radius: 99px; background: #eef1f4; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #17b26a, #00a651); }
.target-meta { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 9px; color: #7c8895; font-size: 9.5px; }
.target-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ------------------------------------------------------------ asset alloc */
.alloc-bar {
  display: flex;
  width: 100%;
  height: 12px;
  overflow: hidden;
  border-radius: 99px;
  background: #eef1f4;
}
.alloc-seg { display: block; height: 100%; min-width: 2px; }
.alloc-green { background: #00a651; }
.alloc-blue { background: #3b82f6; }
.alloc-purple { background: #8b5cf6; }
.alloc-amber { background: #f59e0b; }
.alloc-teal { background: #14b8a6; }
.alloc-pink { background: #ec4899; }
.alloc-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 12px;
  color: #6f7a86;
  font-size: 10.5px;
}
.alloc-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.alloc-legend strong { margin-left: 2px; color: #303b47; font-weight: 700; }
.alloc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }

/* ------------------------------------------------------------ service tiles */
.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.service-tile {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.service-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; }
.service-icon.is-on { background: #e9f8f0; color: #0a8f46; }
.service-icon.is-off { background: #f4f6f8; color: #98a2ad; }
.service-copy { min-width: 0; flex: 1; }
.service-copy h4 { font-size: 12px; font-weight: 750; }
.service-copy p { margin-top: 2px; color: #8a95a2; font-size: 10.5px; }

/* ------------------------------------------------------------------ cards */
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.bank-card {
  position: relative;
  overflow: hidden;
  padding: 17px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0a5c3a, #0d7a4b 58%, #129c5d);
  color: #fff;
  box-shadow: 0 10px 24px rgba(5, 92, 58, .2);
}
.bank-card::after {
  content: '';
  position: absolute;
  top: -60px;
  right: -40px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
}
.bank-card-top { display: flex; align-items: center; justify-content: space-between; }
.bank-card-brand { font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.bank-card-type { color: rgba(255, 255, 255, .72); font-size: 9.5px; font-weight: 650; letter-spacing: .03em; }
.bank-card-number { margin: 24px 0 19px; font-family: var(--mono); font-size: 16px; letter-spacing: .12em; }
.bank-card-bottom { position: relative; z-index: 1; display: flex; gap: 26px; }
.bank-card-bottom span {
  display: block;
  color: rgba(255, 255, 255, .58);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.bank-card-bottom strong { display: block; margin-top: 2px; font-size: 10.5px; font-weight: 650; }

/* -------------------------------------------------------------- promotions */
.promo-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.promo-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}
.promo-card.is-used { opacity: .7; }
.promo-top { display: flex; align-items: center; justify-content: space-between; }
.promo-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #fff5e3; color: #b7791f; }
.promo-card h4 { margin-top: 10px; font-size: 12px; font-weight: 750; }
.promo-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 6px; color: #8a95a2; font-size: 9.5px; }
.promo-code {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 11px;
  padding: 7px 9px;
  border: 1px dashed #d8e1e7;
  border-radius: 6px;
  background: #f9fbfc;
  color: #4d5a66;
  font-size: 10.5px;
}

/* ------------------------------------------------------------------ tools */
.tool-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tool-tile {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow);
  transition: border-color .12s, transform .12s;
}
.tool-tile:hover { border-color: #ccecdb; transform: translateY(-1px); }
.tool-icon { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; }
.tool-tile > div { min-width: 0; flex: 1; }
.tool-tile strong { display: block; font-size: 11.5px; font-weight: 750; }
.tool-tile p { margin-top: 2px; color: #8a95a2; font-size: 10px; }
.tool-arrow { color: #b3bcc5; }
.compliance-actions { display: flex; align-items: center; gap: 12px; padding: 2px 2px 0; }

/* --------------------------------------------------------------- empties */
.empty-state {
  padding: 40px 20px;
  border: 1px dashed #d9e0e6;
  border-radius: var(--radius);
  background: #fff;
  color: #7b8794;
  text-align: center;
}
.empty-state .icon { margin: 0 auto 9px; color: #b3bcc5; }
.empty-state h4 { color: #4d5a66; font-size: 13px; }
.empty-state p { margin: 5px auto 13px; max-width: 380px; font-size: 11.5px; }
.empty-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px;
  border-radius: 7px;
  background: #f7f9fa;
  color: #8a95a2;
  font-size: 11px;
}

/* ------------------------------------------------------------------ toast */
.toast-root {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #1f2937;
  color: #fff;
  font-size: 11.5px;
  font-weight: 600;
  box-shadow: 0 8px 22px rgba(16, 24, 40, .22);
  opacity: 0;
  transform: translateY(7px);
  transition: opacity .2s ease, transform .2s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast-success { background: #0b7a3d; }
.toast-error { background: #7a271a; }
.toast-icon { display: grid; place-items: center; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 1400px) {
  .main-tab { padding: 12px 7px; font-size: 11px; }
  .main-tab .icon { display: none; }
  .hero-meta span:nth-last-child(2) { display: none; }
}
@media (max-width: 1200px) {
  .sidebar { width: 250px; flex-basis: 250px; }
  .stat-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-grid, .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two-col { grid-template-columns: 1fr; }
  .two-col-narrow { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .brand { min-width: 0; }
  .brand-sub { display: none; }
  .served-block { display: none; }
  .sidebar { width: 232px; flex-basis: 232px; }
  .content { padding: 14px; }
  .customer-hero { flex-direction: column; padding: 16px; }
  .hero-right { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .kv-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-grid, .promo-grid, .tile-grid { grid-template-columns: 1fr; }
  .main-tab { padding: 11px 8px; }
  .hero-meta span:nth-last-child(2) { display: inline; }
  .hero-meta span:nth-last-child(3) { display: none; }
}
@media (max-width: 760px) {
  body { overflow: auto; }
  .topbar { height: auto; flex-wrap: wrap; gap: 8px 14px; padding: 10px 14px; }
  .presence-switch { order: 3; width: 100%; height: 30px; border-top: 1px solid var(--line-soft); }
  .presence-tab { height: 30px; }
  .presence-tab.is-active::after { bottom: -1px; }
  .topbar-right { margin-left: auto; }
  .workspace { height: auto; flex-direction: column; overflow: visible; }
  .sidebar { width: 100%; flex-basis: auto; max-height: 280px; border-right: 0; border-bottom: 1px solid var(--line); }
  .main-scroll { overflow: visible; }
  .stat-grid-4, .stat-grid-3 { grid-template-columns: 1fr; }
  .target-grid, .tool-grid { grid-template-columns: 1fr; }
  .hero-title h1 { font-size: 17px; }
  .hero-avatar { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; }
  .hero-right { flex-direction: column; align-items: flex-start; }
  .main-tab .icon { display: block; }
}
