/* ==========================================================================
   Components: buttons, cards, KPIs, badges, tables, forms, tabs, modal,
   drawer, toast, avatars, progress, timeline, stepper, kanban, phone frame
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-strong); background: #fff; color: var(--text);
  font-size: 13.5px; font-weight: 550; white-space: nowrap;
  transition: background .15s, border-color .15s, box-shadow .15s, color .15s, transform .05s;
  text-decoration: none !important;
}
.btn:hover { background: var(--surface-2); border-color: #c2cad6; }
.btn:active { transform: translateY(1px); }
.btn svg { color: currentColor; }
.btn-primary { background: var(--brand-900); border-color: var(--brand-900); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.btn-primary:hover { background: #26282e; border-color: #26282e; }
.btn-dark { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.btn-dark:hover { background: var(--brand-800); border-color: var(--brand-800); }
.btn-gold { background: var(--gold-500); border-color: var(--gold-500); color: #fff; }
.btn-gold:hover { background: var(--gold-600); border-color: var(--gold-600); }
.btn-success { background: var(--success); border-color: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(.95); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-whatsapp { background: var(--whatsapp); border-color: var(--whatsapp); color: #fff; }
.btn-whatsapp:hover { filter: brightness(.95); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); border-color: transparent; }
.btn-soft { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-700); }
.btn-soft:hover { background: var(--brand-100); border-color: var(--brand-100); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

.icon-btn {
  width: 38px; height: 38px; display: inline-grid; place-items: center;
  border-radius: 10px; border: 1px solid transparent; background: transparent; color: var(--text-2);
  position: relative; transition: background .15s;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.bordered { border-color: var(--line); background: #fff; }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); box-shadow: 0 0 0 2px #fff;
}
.icon-btn-sm { width: 30px; height: 30px; border-radius: 8px; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-xs); min-width: 0;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 18px 12px; flex-wrap: wrap;
}
.card-head h3 { display: flex; align-items: center; gap: 8px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.card-body { padding: 4px 18px 18px; }
.card-body.flush { padding: 0; }
.card-foot { border-top: 1px solid var(--line); padding: 12px 18px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-pad { padding: 18px; }
.card.hoverable { transition: box-shadow .2s, border-color .2s, transform .2s; cursor: pointer; }
.card.hoverable:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }

/* ---------- KPI tiles ---------- */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__label { color: var(--muted); font-size: 12.5px; font-weight: 550; }
.kpi__icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; }
.kpi__value { font-family: var(--head); font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--text); }
.kpi__value small { font-size: 13px; font-weight: 600; color: var(--muted); margin-left: 2px; }
.kpi__meta { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 600; font-size: 12px; }
.trend.up { color: var(--success); }
.trend.down { color: var(--danger); }

.tone-brand { background: var(--brand-50); color: var(--brand-600); }
.tone-gold { background: var(--gold-50); color: var(--gold-600); }
.tone-success { background: var(--success-bg); color: var(--success); }
.tone-warning { background: var(--warning-bg); color: var(--warning); }
.tone-danger { background: var(--danger-bg); color: var(--danger); }
.tone-info { background: var(--info-bg); color: var(--info); }
.tone-violet { background: var(--violet-bg); color: var(--violet); }
.tone-whatsapp { background: var(--whatsapp-bg); color: var(--whatsapp); }
.tone-neutral { background: #eef1f5; color: var(--text-2); }

/* ---------- Badges / chips ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 600; line-height: 1;
  padding: 5px 8px; border-radius: 999px; white-space: nowrap;
  background: #eef1f5; color: var(--text-2);
}
.badge .bdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.brand { background: var(--brand-50); color: var(--brand-700); }
.badge.gold { background: var(--gold-100); color: var(--gold-600); }
.badge.success { background: var(--success-bg); color: var(--success); }
.badge.warning { background: var(--warning-bg); color: var(--warning); }
.badge.danger { background: var(--danger-bg); color: var(--danger); }
.badge.info { background: var(--info-bg); color: var(--info); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }
.badge.whatsapp { background: var(--whatsapp-bg); color: var(--whatsapp); }
.badge.outline { background: #fff; border: 1px solid var(--line); color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 12.5px; font-weight: 550;
  color: var(--text-2); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.chip:hover { border-color: var(--line-strong); }
.chip.active { background: var(--brand-900); border-color: var(--brand-900); color: #fff; }
.chip .count { font-size: 11px; opacity: .7; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Avatars ---------- */
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 12px; font-weight: 650; color: #fff;
  background: var(--brand-600); letter-spacing: .02em;
}
.avatar.sm { width: 26px; height: 26px; font-size: 10.5px; }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.avatar.xl { width: 60px; height: 60px; font-size: 20px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px #fff; margin-left: -8px; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person__name { font-weight: 600; font-size: 13.5px; color: var(--text); line-height: 1.25; }
.person__meta { font-size: 12px; color: var(--muted); line-height: 1.3; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  text-align: left; font-weight: 600; font-size: 11.5px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .05em;
  background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; z-index: 1;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover td { background: #fafbfd; }
.table tbody tr.clickable { cursor: pointer; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.strong { color: var(--text); }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 38px; border: 1px solid var(--line-strong); border-radius: 9px;
  background: #fff; padding: 0 12px; font-size: 13.5px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px var(--brand-100); }
.input-sm { height: 32px; font-size: 13px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .input { padding-left: 36px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand-600); }

.switch { position: relative; width: 38px; height: 22px; flex-shrink: 0; display: inline-block; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; background: #cbd3de; border-radius: 999px; transition: .2s; cursor: pointer; }
.switch span::before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--success); }
.switch input:checked + span::before { transform: translateX(16px); }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.toolbar .input-icon { flex: 1; min-width: 180px; max-width: 320px; }

/* ---------- Segmented / tabs ---------- */
.segmented { display: inline-flex; background: #eef1f5; border-radius: 10px; padding: 3px; gap: 2px; }
.segmented button {
  border: 0; background: transparent; height: 30px; padding: 0 12px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: var(--muted); display: inline-flex; align-items: center; gap: 6px;
}
.segmented button.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  border: 0; background: none; padding: 11px 14px; font-size: 13.5px; font-weight: 600; color: var(--muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand-700); border-bottom-color: var(--brand-600); }
.tab .count { background: #eef1f5; color: var(--text-2); border-radius: 999px; font-size: 11px; padding: 1px 7px; }
.tab.active .count { background: var(--brand-50); color: var(--brand-700); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .2s ease; }

/* ---------- Progress ---------- */
.progress { height: 6px; background: #edf0f4; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand-600); transition: width .5s ease; }
.progress.gold > span { background: var(--gold-500); }
.progress.success > span { background: var(--success); }
.progress.warning > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }
.progress.lg { height: 8px; }

/* ---------- Lists ---------- */
.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item.clickable { cursor: pointer; }
.list-item.clickable:hover { background: var(--surface-2); }
.list-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -26px; top: 0; width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center; background: #fff; border: 2px solid var(--line);
}
.tl-dot svg { width: 12px; height: 12px; }
.tl-title { font-weight: 600; font-size: 13px; color: var(--text); }
.tl-meta { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tl-body { font-size: 12.5px; color: var(--text-2); margin-top: 5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: flex-start; overflow-x: auto; padding-bottom: 4px; }
.step { flex: 1; min-width: 92px; display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; gap: 6px; }
.step::after { content: ""; position: absolute; top: 13px; left: calc(50% + 16px); right: calc(-50% + 16px); height: 2px; background: var(--line); }
.step:last-child::after { display: none; }
.step__dot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--line-strong); color: var(--muted); font-size: 12px; font-weight: 700; z-index: 1; }
.step__label { font-size: 11.5px; font-weight: 600; color: var(--muted); line-height: 1.25; padding: 0 4px; }
.step.done .step__dot { background: var(--success); border-color: var(--success); color: #fff; }
.step.done::after { background: var(--success); }
.step.current .step__dot { background: var(--brand-600); border-color: var(--brand-600); color: #fff; box-shadow: 0 0 0 4px var(--brand-100); }
.step.current .step__label, .step.done .step__label { color: var(--text); }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { flex: 0 0 272px; background: #f1f4f8; border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 250px); }
.kanban-col__head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px; font-weight: 650; font-size: 13px; }
.kanban-col__head .count { background: #fff; border-radius: 999px; font-size: 11px; padding: 1px 8px; color: var(--muted); }
.kanban-col__head .sum { margin-left: auto; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.kanban-col__body { padding: 4px 8px 10px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.kanban-col__body.drag-over { background: var(--brand-50); border-radius: 10px; }
.kcard { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; box-shadow: var(--shadow-xs); cursor: grab; transition: box-shadow .15s, border-color .15s; }
.kcard:hover { box-shadow: var(--shadow); border-color: var(--line-strong); }
.kcard.dragging { opacity: .5; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 16px;
  opacity: 0; pointer-events: none; transition: opacity .18s;
}
.modal-backdrop.open { opacity: 1; pointer-events: auto; }
.modal {
  background: #fff; border-radius: 16px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px;
  max-height: calc(100vh - 32px); display: flex; flex-direction: column;
  transform: translateY(8px) scale(.98); transition: transform .2s;
}
.modal.lg { max-width: 820px; }
.modal.xl { max-width: 1080px; }
.modal-backdrop.open .modal { transform: none; }
.modal__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal__body { padding: 20px; overflow-y: auto; }
.modal__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .2s; }
.drawer-backdrop.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: #fff; z-index: 95;
  box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .25s ease;
  display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer.wide { width: min(760px, 100vw); }
.drawer__head { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.drawer__body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer__foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: flex-start; gap: 10px; background: var(--brand-900); color: #fff;
  padding: 12px 14px; border-radius: 12px; box-shadow: var(--shadow-lg); width: 360px; max-width: 100%;
  animation: toastIn .25s ease; font-size: 13px;
}
.toast .t-title { font-weight: 650; }
.toast .t-msg { color: rgba(255,255,255,.75); font-size: 12.5px; margin-top: 1px; }
.toast .t-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0; background: rgba(255,255,255,.12); }
.toast.success .t-icon { background: var(--success); }
.toast.whatsapp .t-icon { background: var(--whatsapp); }
.toast.warning .t-icon { background: var(--warning); }
.toast.leaving { animation: toastOut .2s ease forwards; }

/* ---------- Dropdown ---------- */
.dropdown { position: relative; }
.menu {
  position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; background: #fff;
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 70;
  display: none;
}
.menu.open { display: block; animation: fadeIn .15s ease; }
.menu-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; font-size: 13px; color: var(--text); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.menu-item:hover { background: var(--surface-2); }
.menu-item.active { background: var(--brand-50); color: var(--brand-700); }
.menu-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 650; padding: 8px 10px 4px; }
.menu-sep { height: 1px; background: var(--line); margin: 6px 0; }

/* ---------- Notifications ---------- */
.notif { display: flex; gap: 10px; padding: 10px; border-radius: 10px; }
.notif:hover { background: var(--surface-2); }
.notif .n-title { font-size: 13px; font-weight: 600; }
.notif .n-meta { font-size: 11.5px; color: var(--muted); }

/* ---------- Empty / callouts ---------- */
.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty .list-icon { margin: 0 auto 10px; }
.callout { display: flex; gap: 12px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2); font-size: 13px; }
.callout.info { background: var(--info-bg); border-color: #bfe7f0; color: #0b5566; }
.callout.gold { background: var(--gold-50); border-color: #f4dfa3; color: #7a5708; }
.callout.success { background: var(--success-bg); border-color: #bfe6cc; color: #0f5b2c; }
.callout.danger { background: var(--danger-bg); border-color: #f5c7c3; color: #8f1c15; }
.callout.brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-800); }

/* ---------- Stat mini ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); border-top: 1px solid var(--line); }
.stat-row > div { padding: 12px 18px; border-right: 1px solid var(--line); }
.stat-row > div:last-child { border-right: 0; }
.stat-row .v { font-weight: 700; font-size: 17px; }
.stat-row .l { font-size: 11.5px; color: var(--muted); font-weight: 550; }

.kv { display: grid; grid-template-columns: 140px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--text); font-weight: 550; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* ---------- Phone mockup (Calling app, Field app, WhatsApp) ---------- */
.phone {
  width: 340px; max-width: 100%; margin: 0 auto;
  background: #0b0f17; border-radius: 42px; padding: 12px;
  box-shadow: 0 30px 60px rgba(15,23,42,.25), inset 0 0 0 2px #2a3140;
  position: relative;
}
.phone__screen {
  background: #fff; border-radius: 32px; overflow: hidden; height: 680px;
  display: flex; flex-direction: column; position: relative;
}
.phone__status {
  height: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 22px;
  font-size: 12px; font-weight: 650; flex-shrink: 0;
}
.phone__notch { position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 18px; height: 18px; border-radius: 50%; background: #0b0f17; z-index: 5; }
.phone__body { flex: 1; overflow-y: auto; position: relative; }
.phone__nav { height: 22px; display: flex; justify-content: center; align-items: center; flex-shrink: 0; }
.phone__nav span { width: 110px; height: 4px; border-radius: 4px; background: #c8ced8; }
@media (max-width: 400px) {
  .phone { border-radius: 34px; padding: 8px; }
  .phone__screen { border-radius: 28px; height: 620px; }
}

/* ---------- Charts ---------- */
.chart { width: 100%; }
.chart text { font-family: var(--font); fill: var(--muted); font-size: 11px; }
.chart .grid-line { stroke: #edf0f4; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart-tip {
  position: fixed; pointer-events: none; z-index: 300; background: var(--brand-900); color: #fff;
  font-size: 12px; padding: 7px 10px; border-radius: 8px; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity .1s;
  white-space: nowrap;
}
.chart-tip.show { opacity: 1; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(21,128,61,.45); } 70% { box-shadow: 0 0 0 10px rgba(21,128,61,0); } }
@keyframes spin { to { transform: rotate(360deg); } }
.fade-in { animation: fadeIn .25s ease; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); animation: pulse 1.8s infinite; display: inline-block; }
.spin { animation: spin 1s linear infinite; }

/* ---------- Brand accents ---------- */
.spectrum-bar { height: 3px; background: var(--spectrum); }
.portfolio-img { background: #0b0b0c; border-radius: 10px; overflow: hidden; display: grid; place-items: center; }
.portfolio-img img { width: 100%; height: 100%; object-fit: contain; }
.svc-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.svc-chip { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-700); border: 1px solid var(--brand-100); white-space: nowrap; }
