/* ===================================================================
   THORWallet Card Ops — internal dashboard styles
   Built on the THORWallet design system tokens (colors_and_type.css).
   Dark default + light theme via [data-theme="light"].
   =================================================================== */

:root {
  /* semantic app surfaces (dark) — DS app scale */
  --co-bg:          #101A2B;
  --co-bg-2:        #0C1525;
  --co-surface:     #18293D;
  --co-surface-2:   #1C3046;
  --co-surface-3:   #243A54;
  --co-hover:       rgba(255,255,255,0.04);
  --co-hover-2:     rgba(255,255,255,0.07);
  --co-border:      rgba(255,255,255,0.08);
  --co-border-2:    rgba(255,255,255,0.14);

  --co-text:        #FFFFFF;
  --co-text-2:      #AEBED2;
  --co-text-3:      #7E91AA;

  --co-primary:     #2A7AF7;
  --co-primary-2:   #2867EA;
  --co-primary-ink: #FFFFFF;
  --co-primary-tint: rgba(42,122,247,0.14);
  --co-focus:       rgba(42,122,247,0.45);

  /* status palette */
  --co-grey:    #7E91AA;  --co-grey-bg:   rgba(126,145,170,0.14);
  --co-blue:    #57A4FF;  --co-blue-bg:   rgba(87,164,255,0.14);
  --co-green:   #31FD9D;  --co-green-bg:  rgba(49,253,157,0.13);
  --co-amber:   #FBC538;  --co-amber-bg:  rgba(251,197,56,0.14);
  --co-red:     #FF5B5B;  --co-red-bg:    rgba(237,54,54,0.15);

  /* product tags */
  --co-thor:      #6E8BFF; --co-thor-bg:  rgba(110,139,255,0.16);
  --co-mine-bg:   #EFE7D2; --co-mine-ink: #2A2418;

  --co-shadow:    0 1px 0 rgba(255,255,255,0.04) inset, 0 14px 40px rgba(0,0,0,0.45);
  --co-shadow-pop:0 28px 80px rgba(0,0,0,0.6);
  --co-radius:    14px;
  --co-radius-sm: 10px;
  --co-radius-lg: 20px;

  --co-sidebar-w: 248px;
  --co-topbar-h:  64px;
  --co-font: "Montserrat", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --co-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

[data-theme="light"] {
  --co-bg:          #EEF1F6;
  --co-bg-2:        #E4E9F1;
  --co-surface:     #FFFFFF;
  --co-surface-2:   #FFFFFF;
  --co-surface-3:   #F1F4F9;
  --co-hover:       rgba(14,26,43,0.035);
  --co-hover-2:     rgba(14,26,43,0.06);
  --co-border:      rgba(20,38,66,0.10);
  --co-border-2:    rgba(20,38,66,0.18);

  --co-text:        #0E1A2B;
  --co-text-2:      #4D5C72;
  --co-text-3:      #8593A8;

  --co-primary:     #2A6FE8;
  --co-primary-2:   #1E5FD6;
  --co-primary-tint: rgba(42,111,232,0.10);

  --co-grey:    #6B7A91;  --co-grey-bg:   rgba(107,122,145,0.12);
  --co-blue:    #2A7AF7;  --co-blue-bg:   rgba(42,122,247,0.12);
  --co-green:   #16A06A;  --co-green-bg:  rgba(22,160,106,0.12);
  --co-amber:   #B5820B;  --co-amber-bg:  rgba(214,154,18,0.15);
  --co-red:     #D63A3A;  --co-red-bg:    rgba(214,58,58,0.12);

  --co-thor:      #3D5CE0; --co-thor-bg:  rgba(61,92,224,0.12);
  --co-mine-bg:   #E7DCC0; --co-mine-ink: #3A3220;

  --co-shadow:    0 1px 2px rgba(20,38,66,0.06), 0 12px 32px rgba(20,38,66,0.10);
  --co-shadow-pop:0 28px 80px rgba(20,38,66,0.22);
  --co-focus:     rgba(42,111,232,0.35);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--co-bg);
  color: var(--co-text);
  font-family: var(--co-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
#root { height: 100vh; }
button { font-family: inherit; }
::selection { background: var(--co-focus); color: #fff; }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--co-border-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background: var(--co-text-3); background-clip: padding-box; }

/* ── App layout ─────────────────────────────────────────────── */
.co-app { display: flex; height: 100vh; overflow: hidden; }
.co-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.co-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; }
.co-page { max-width: 1320px; margin: 0 auto; padding: 28px 32px 64px; }
.co-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.co-page-title { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.co-page-sub { color: var(--co-text-2); font-size: 13px; margin: 4px 0 0; }

/* ── Sidebar ────────────────────────────────────────────────── */
.co-sidebar {
  width: var(--co-sidebar-w); flex-shrink: 0;
  background: var(--co-surface); border-right: 1px solid var(--co-border);
  display: flex; flex-direction: column; padding: 18px 14px; gap: 6px;
}
.co-brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 18px; }
.co-brand-marks { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.co-mark { width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0; overflow: hidden; display: block; box-shadow: 0 2px 10px rgba(0,0,0,0.35); }
.co-mark img { width: 100%; height: 100%; display: block; object-fit: cover; }
.co-brand-name { font-weight: 800; font-size: 15px; letter-spacing: -0.01em; line-height: 1.1; }
.co-brand-name span { display: block; font-size: 10.5px; font-weight: 600; letter-spacing: 0.16em; color: var(--co-text-3); text-transform: uppercase; }
.co-nav { display: flex; flex-direction: column; gap: 3px; }
.co-nav-label { font-size: 10px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--co-text-3); padding: 14px 10px 6px; }
.co-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 11px; border-radius: var(--co-radius-sm);
  color: var(--co-text-2); font-size: 13.5px; font-weight: 500; cursor: pointer; border: none; background: none;
  width: 100%; text-align: left; min-height: 44px; transition: background .15s, color .15s;
}
.co-nav-item:hover { background: var(--co-hover); color: var(--co-text); }
.co-nav-item.active { background: var(--co-primary-tint); color: var(--co-text); }
.co-nav-item.active svg { color: var(--co-primary); }
.co-nav-item svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--co-text-3); }
.co-nav-count { margin-left: auto; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; display: grid; place-items: center; background: var(--co-surface-3); color: var(--co-text-2); }
.co-nav-count.alert { background: var(--co-red-bg); color: var(--co-red); }
.co-sidebar-foot { margin-top: auto; padding: 10px; border-top: 1px solid var(--co-border); }

/* ── Topbar ─────────────────────────────────────────────────── */
.co-topbar {
  height: var(--co-topbar-h); flex-shrink: 0; display: flex; align-items: center; gap: 14px;
  padding: 0 24px; background: color-mix(in srgb, var(--co-bg) 86%, transparent);
  border-bottom: 1px solid var(--co-border); backdrop-filter: blur(12px); position: relative; z-index: 30;
}
.co-search { flex: 1; max-width: 460px; position: relative; }
.co-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--co-text-3); }
.co-search input {
  width: 100%; height: 42px; padding: 0 14px 0 40px; border-radius: var(--co-radius-sm);
  background: var(--co-surface-2); border: 1px solid var(--co-border); color: var(--co-text); font-size: 13.5px; outline: none;
}
.co-search input::placeholder { color: var(--co-text-3); }
.co-search input:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-focus); }
.co-topbar-spacer { flex: 1; }
.co-icon-btn { width: 42px; height: 42px; border-radius: var(--co-radius-sm); display: grid; place-items: center;
  background: var(--co-surface-2); border: 1px solid var(--co-border); color: var(--co-text-2); cursor: pointer; transition: .15s; }
.co-icon-btn:hover { background: var(--co-hover-2); color: var(--co-text); }
.co-icon-btn svg { width: 19px; height: 19px; }
.co-menu-trigger { display: flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 999px;
  background: var(--co-surface-2); border: 1px solid var(--co-border); cursor: pointer; min-height: 44px; }
.co-menu-trigger:hover { background: var(--co-hover-2); }
.co-avatar { width: 32px; height: 32px; border-radius: 999px; display: grid; place-items: center; font-weight: 700;
  font-size: 12px; color: #fff; flex-shrink: 0; }
.co-menu-name { font-size: 12.5px; font-weight: 600; line-height: 1.1; text-align: left; }
.co-menu-role { font-size: 10.5px; color: var(--co-text-3); }

/* search results dropdown */
.co-search-results { position: absolute; top: 48px; left: 0; right: 0; background: var(--co-surface); border: 1px solid var(--co-border-2);
  border-radius: var(--co-radius); box-shadow: var(--co-shadow-pop); padding: 6px; z-index: 60; max-height: 360px; overflow-y: auto; }
.co-search-row { display: flex; align-items: center; gap: 12px; padding: 9px 11px; border-radius: 9px; cursor: pointer; }
.co-search-row:hover { background: var(--co-hover); }
.co-search-empty { padding: 20px; text-align: center; color: var(--co-text-3); font-size: 13px; }

/* ── Filter / segmented controls in topbar ─────────────────── */
.co-seg { display: flex; background: var(--co-surface-2); border: 1px solid var(--co-border); border-radius: var(--co-radius-sm); padding: 3px; gap: 2px; }
.co-seg button { border: none; background: none; color: var(--co-text-2); font-size: 12.5px; font-weight: 600; padding: 7px 13px;
  border-radius: 7px; cursor: pointer; white-space: nowrap; min-height: 36px; }
.co-seg button.active { background: var(--co-surface-3); color: var(--co-text); }
[data-theme="light"] .co-seg button.active { background: #fff; box-shadow: 0 1px 3px rgba(20,38,66,0.10); }

/* ── Popover menu ──────────────────────────────────────────── */
.co-pop { position: absolute; background: var(--co-surface); border: 1px solid var(--co-border-2); border-radius: var(--co-radius);
  box-shadow: var(--co-shadow-pop); padding: 7px; z-index: 70; min-width: 230px; }
.co-pop-head { padding: 9px 11px 11px; border-bottom: 1px solid var(--co-border); margin-bottom: 6px; }
.co-pop-item { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px; cursor: pointer; font-size: 13px;
  color: var(--co-text-2); border: none; background: none; width: 100%; text-align: left; min-height: 40px; }
.co-pop-item:hover { background: var(--co-hover); color: var(--co-text); }
.co-pop-item svg { width: 17px; height: 17px; }
.co-pop-item.danger { color: var(--co-red); }
.co-pop-sep { height: 1px; background: var(--co-border); margin: 6px 4px; }
.co-pop-check { margin-left: auto; color: var(--co-primary); }

/* ── Cards ─────────────────────────────────────────────────── */
.co-card { background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--co-radius); }
.co-card-pad { padding: 20px; }
.co-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--co-border); }
.co-card-title { font-size: 14px; font-weight: 700; letter-spacing: -0.01em; }

/* ── KPI cards ─────────────────────────────────────────────── */
.co-kpi-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.co-kpi { background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--co-radius); padding: 16px 16px 15px;
  display: flex; flex-direction: column; gap: 9px; min-height: 116px; cursor: pointer; transition: border-color .15s, transform .15s; }
.co-kpi:hover { border-color: var(--co-border-2); transform: translateY(-2px); }
.co-kpi-top { display: flex; align-items: center; justify-content: space-between; }
.co-kpi-label { font-size: 11px; font-weight: 600; color: var(--co-text-2); letter-spacing: 0.01em; line-height: 1.3; }
.co-kpi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.co-kpi-icon svg { width: 16px; height: 16px; }
.co-kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.co-kpi-delta { font-size: 11.5px; font-weight: 600; display: flex; align-items: center; gap: 4px; }

/* ── Main task pipeline (standout) ─────────────────────────── */
.co-todo { border-radius: var(--co-radius); padding: 18px; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(0,204,255,0.13), rgba(49,253,157,0.13));
  border: 1px solid rgba(49,253,157,0.40); box-shadow: 0 0 30px rgba(49,253,157,0.13); }
.co-todo-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--co-green); margin-bottom: 12px; }
.co-todo-grid { display: flex; align-items: stretch; gap: 14px; }
.co-todo-tile { flex: 1; background: var(--co-surface); border: 1px solid var(--co-border); border-radius: var(--co-radius-sm);
  padding: 18px 20px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; min-height: 124px; transition: transform .15s, box-shadow .15s; }
.co-todo-tile:hover { transform: translateY(-2px); box-shadow: var(--co-shadow); }
.co-todo-top { display: flex; align-items: center; justify-content: space-between; }
.co-todo-label { font-size: 13.5px; font-weight: 700; }
.co-todo-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.co-todo-num { font-size: 42px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.co-todo-cta { margin-top: auto; font-size: 12.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.co-todo-arrow { display: grid; place-items: center; color: var(--co-green); flex-shrink: 0; }
@media (max-width: 720px) { .co-todo-grid { flex-direction: column; } .co-todo-arrow { transform: rotate(90deg); } }

/* ── Funnel ────────────────────────────────────────────────── */.co-funnel { display: flex; align-items: stretch; gap: 10px; }
.co-funnel-step { flex: 1; position: relative; background: var(--co-surface-2); border: 1px solid var(--co-border); border-radius: var(--co-radius-sm);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; }
.co-funnel-step .num { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.co-funnel-step .lbl { font-size: 11.5px; font-weight: 600; color: var(--co-text-2); }
.co-funnel-step .drop { font-size: 11px; color: var(--co-text-3); margin-top: 2px; }
.co-funnel-arrow { display: grid; place-items: center; color: var(--co-text-3); flex-shrink: 0; }

/* ── Pills / tags ──────────────────────────────────────────── */
.co-pill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap; letter-spacing: 0.005em; }
.co-pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.co-pill.grey  { color: var(--co-grey);  background: var(--co-grey-bg); }
.co-pill.blue  { color: var(--co-blue);  background: var(--co-blue-bg); }
.co-pill.green { color: var(--co-green); background: var(--co-green-bg); }
.co-pill.amber { color: var(--co-amber); background: var(--co-amber-bg); }
.co-pill.red   { color: var(--co-red);   background: var(--co-red-bg); }
[data-theme="light"] .co-pill.green { color: var(--co-green); }

.co-tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 7px; font-size: 11px; font-weight: 700; letter-spacing: 0.02em; }
.co-tag.thor { color: var(--co-thor); background: var(--co-thor-bg); }
.co-tag.mine { color: var(--co-mine-ink); background: var(--co-mine-bg); }

/* ── Buttons ───────────────────────────────────────────────── */
.co-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px;
  border-radius: var(--co-radius-sm); font-size: 13.5px; font-weight: 600; cursor: pointer; border: 1px solid transparent;
  white-space: nowrap; transition: .14s; }
.co-btn svg { width: 17px; height: 17px; }
.co-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.co-btn-primary { background: var(--co-primary); color: var(--co-primary-ink); border-color: rgba(255,255,255,0.12); }
.co-btn-primary:not(:disabled):hover { background: var(--co-primary-2); }
.co-btn-secondary { background: var(--co-surface-2); color: var(--co-text); border-color: var(--co-border-2); }
.co-btn-secondary:not(:disabled):hover { background: var(--co-hover-2); }
.co-btn-ghost { background: transparent; color: var(--co-text-2); border-color: var(--co-border); }
.co-btn-ghost:not(:disabled):hover { background: var(--co-hover); color: var(--co-text); }
.co-btn-danger { background: var(--co-red-bg); color: var(--co-red); border-color: color-mix(in srgb, var(--co-red) 35%, transparent); }
.co-btn-danger:not(:disabled):hover { background: color-mix(in srgb, var(--co-red) 22%, transparent); }
.co-btn-sm { height: 36px; padding: 0 12px; font-size: 12.5px; }
.co-btn-block { width: 100%; }

/* ── Table ─────────────────────────────────────────────────── */
.co-table-wrap { overflow-x: auto; border-radius: var(--co-radius); border: 1px solid var(--co-border); background: var(--co-surface); }
table.co-table { width: 100%; border-collapse: collapse; min-width: 920px; }
.co-table thead th { position: sticky; top: 0; background: var(--co-surface); z-index: 2; text-align: left; font-size: 11px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase; color: var(--co-text-3); padding: 13px 16px; border-bottom: 1px solid var(--co-border); white-space: nowrap; cursor: pointer; user-select: none; }
.co-table thead th.no-sort { cursor: default; }
.co-table thead th .sort-ar { display: inline-block; margin-left: 5px; opacity: 0.4; }
.co-table thead th.sorted .sort-ar { opacity: 1; color: var(--co-primary); }
.co-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--co-border); font-size: 13px; white-space: nowrap; vertical-align: middle; }
.co-table tbody tr { cursor: pointer; transition: background .12s; }
.co-table tbody tr:hover { background: var(--co-hover); }
.co-table tbody tr.selected { background: var(--co-primary-tint); }
.co-table tbody tr:last-child td { border-bottom: none; }
.co-cell-mono { font-family: var(--co-mono); font-size: 12.5px; }
.co-cell-strong { font-weight: 600; }
.co-cell-muted { color: var(--co-text-2); }
.co-days { font-variant-numeric: tabular-nums; }
.co-days.warn { color: var(--co-amber); font-weight: 600; }
.co-days.bad { color: var(--co-red); font-weight: 600; }

/* fee dots */
.co-fee { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; }
.co-fee .d { width: 7px; height: 7px; border-radius: 999px; }
.co-fee.paid { color: var(--co-green); } .co-fee.paid .d { background: var(--co-green); }
.co-fee.unpaid { color: var(--co-amber); } .co-fee.unpaid .d { background: var(--co-amber); }
.co-fee.na { color: var(--co-text-3); } .co-fee.na .d { background: var(--co-text-3); }

/* ── Filter bar ────────────────────────────────────────────── */
.co-filterbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 16px; }
.co-filter { position: relative; }
.co-filter-btn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: var(--co-radius-sm);
  background: var(--co-surface); border: 1px solid var(--co-border); color: var(--co-text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.co-filter-btn:hover { background: var(--co-hover); color: var(--co-text); }
.co-filter-btn.set { color: var(--co-text); border-color: var(--co-primary); background: var(--co-primary-tint); }
.co-filter-btn svg { width: 15px; height: 15px; }
.co-toggle-chip { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 13px; border-radius: var(--co-radius-sm);
  background: var(--co-surface); border: 1px solid var(--co-border); color: var(--co-text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.co-toggle-chip.on { color: var(--co-amber); border-color: color-mix(in srgb, var(--co-amber) 45%, transparent); background: var(--co-amber-bg); }

/* switch */
.co-switch { width: 38px; height: 22px; border-radius: 999px; background: var(--co-surface-3); border: 1px solid var(--co-border); position: relative; transition: .15s; flex-shrink: 0; }
.co-switch::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 999px; background: var(--co-text-2); top: 2px; left: 2px; transition: .18s; }
.co-switch.on { background: var(--co-primary); border-color: transparent; }
.co-switch.on::after { background: #fff; transform: translateX(16px); }

/* ── Drawer ────────────────────────────────────────────────── */
.co-overlay { position: fixed; inset: 0; background: rgba(6,12,22,0.55); backdrop-filter: blur(3px); z-index: 100; animation: coFade .18s ease; }
[data-theme="light"] .co-overlay { background: rgba(20,38,66,0.32); }
@keyframes coFade { from { opacity: 0; } }
.co-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 480px; max-width: 94vw; background: var(--co-surface); border-left: 1px solid var(--co-border-2);
  z-index: 101; display: flex; flex-direction: column; box-shadow: var(--co-shadow-pop); animation: coSlide .24s var(--tw-ease); }
@keyframes coSlide { from { transform: translateX(40px); opacity: 0.4; } }
.co-drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--co-border); display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.co-drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.co-drawer-foot { padding: 14px 22px; border-top: 1px solid var(--co-border); display: flex; gap: 9px; flex-wrap: wrap; background: var(--co-surface); }

/* ── Modal ─────────────────────────────────────────────────── */
.co-modal { position: fixed; inset: 0; z-index: 110; display: grid; place-items: center; padding: 24px; }
.co-modal-card { position: relative; z-index: 111; background: var(--co-surface); border: 1px solid var(--co-border-2); border-radius: var(--co-radius-lg);
  box-shadow: var(--co-shadow-pop); width: 720px; max-width: 100%; max-height: 92vh; display: flex; flex-direction: column; animation: coPop .24s var(--tw-ease); }
@keyframes coPop { from { transform: scale(0.97) translateY(8px); opacity: 0; } }

/* ── Definition rows ───────────────────────────────────────── */
.co-dl { display: flex; flex-direction: column; gap: 0; }
.co-dl-row { display: flex; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--co-border); font-size: 13px; }
.co-dl-row:last-child { border-bottom: none; }
.co-dl-row dt { color: var(--co-text-3); }
.co-dl-row dd { margin: 0; text-align: right; font-weight: 500; }

/* ── Timeline ──────────────────────────────────────────────── */
.co-timeline { position: relative; padding-left: 26px; }
.co-timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 6px; width: 2px; background: var(--co-border); }
.co-tl-item { position: relative; padding-bottom: 18px; }
.co-tl-item:last-child { padding-bottom: 0; }
.co-tl-dot { position: absolute; left: -26px; top: 2px; width: 16px; height: 16px; border-radius: 999px; border: 3px solid var(--co-surface);
  background: var(--co-text-3); }
.co-tl-dot.green { background: var(--co-green); } .co-tl-dot.blue { background: var(--co-blue); }
.co-tl-dot.red { background: var(--co-red); } .co-tl-dot.amber { background: var(--co-amber); }
.co-tl-title { font-size: 13px; font-weight: 600; }
.co-tl-meta { font-size: 11.5px; color: var(--co-text-3); margin-top: 2px; }
.co-tl-meta b { color: var(--co-text-2); font-weight: 600; }

/* ── Section / KPI sub ─────────────────────────────────────── */
.co-grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.co-section-title { font-size: 13px; font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; color: var(--co-text-3); margin: 0 0 12px; }

/* attention list */
.co-att-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--co-border); cursor: pointer; }
.co-att-row:hover { background: var(--co-hover); }
.co-att-row:last-child { border-bottom: none; }
.co-att-sev { width: 4px; align-self: stretch; border-radius: 4px; }
.co-att-sev.red { background: var(--co-red); } .co-att-sev.amber { background: var(--co-amber); } .co-att-sev.blue { background: var(--co-blue); }
.co-att-main { flex: 1; min-width: 0; }
.co-att-title { font-size: 13px; font-weight: 600; }
.co-att-meta { font-size: 11.5px; color: var(--co-text-3); margin-top: 2px; }

/* ── Banner ────────────────────────────────────────────────── */
.co-banner { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: var(--co-radius); font-size: 13px; font-weight: 500; margin-bottom: 18px; }
.co-banner.amber { background: var(--co-amber-bg); color: var(--co-amber); border: 1px solid color-mix(in srgb, var(--co-amber) 35%, transparent); }
.co-banner.red { background: var(--co-red-bg); color: var(--co-red); border: 1px solid color-mix(in srgb, var(--co-red) 35%, transparent); }
.co-banner svg { width: 18px; height: 18px; flex-shrink: 0; }
.co-banner b { color: var(--co-text); }
[data-theme="light"] .co-banner b { color: inherit; }

/* ── Toast / popup ─────────────────────────────────────────── */
.co-toast { position: fixed; bottom: 24px; right: 24px; z-index: 200; background: var(--co-surface); border: 1px solid var(--co-border-2);
  border-radius: var(--co-radius); box-shadow: var(--co-shadow-pop); padding: 16px 18px; width: 340px; animation: coToast .3s var(--tw-ease); display: flex; gap: 13px; }
@keyframes coToast { from { transform: translateY(20px); opacity: 0; } }
.co-toast-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; background: var(--co-primary-tint); color: var(--co-primary); }
.co-toast-icon svg { width: 20px; height: 20px; }

/* ── Tooltip ───────────────────────────────────────────────── */
.co-tip { position: relative; display: inline-flex; }
.co-tip-bubble { position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #0a131f; color: #fff;
  font-size: 11.5px; font-weight: 500; padding: 7px 10px; border-radius: 8px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .14s;
  z-index: 300; box-shadow: 0 8px 24px rgba(0,0,0,0.4); border: 1px solid var(--co-border-2); max-width: 240px; white-space: normal; text-align: center; }
.co-tip:hover .co-tip-bubble { opacity: 1; }

/* ── Skeleton ──────────────────────────────────────────────── */
.co-skel { background: linear-gradient(90deg, var(--co-surface-2) 25%, var(--co-surface-3) 50%, var(--co-surface-2) 75%);
  background-size: 200% 100%; animation: coShimmer 1.3s infinite; border-radius: 8px; }
@keyframes coShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ── Empty / error state ───────────────────────────────────── */
.co-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 56px 24px; text-align: center; }
.co-empty-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--co-surface-2); color: var(--co-text-3); }
.co-empty-icon svg { width: 26px; height: 26px; }
.co-empty-title { font-size: 15px; font-weight: 700; }
.co-empty-sub { font-size: 13px; color: var(--co-text-3); max-width: 320px; }

/* ── Stepper (wizard) ──────────────────────────────────────── */
.co-steps { display: flex; align-items: center; gap: 0; padding: 4px 0 6px; overflow-x: auto; }
.co-step { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.co-step-dot { width: 26px; height: 26px; border-radius: 999px; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--co-surface-3); color: var(--co-text-3); border: 1px solid var(--co-border); flex-shrink: 0; }
.co-step.active .co-step-dot { background: var(--co-primary); color: #fff; border-color: transparent; box-shadow: 0 0 0 4px var(--co-primary-tint); }
.co-step.done .co-step-dot { background: var(--co-green-bg); color: var(--co-green); border-color: transparent; }
.co-step-label { font-size: 12px; font-weight: 600; color: var(--co-text-3); white-space: nowrap; }
.co-step.active .co-step-label, .co-step.done .co-step-label { color: var(--co-text); }
.co-step-line { width: 22px; height: 2px; background: var(--co-border); margin: 0 8px; flex-shrink: 0; }
.co-step.done + .co-step-line, .co-step-line.done { background: var(--co-green); }

/* ── Inputs ────────────────────────────────────────────────── */
.co-field { display: flex; flex-direction: column; gap: 7px; }
.co-field label { font-size: 12.5px; font-weight: 600; color: var(--co-text-2); }
.co-input { height: 46px; padding: 0 14px; border-radius: var(--co-radius-sm); background: var(--co-surface-2); border: 1px solid var(--co-border);
  color: var(--co-text); font-size: 14px; outline: none; width: 100%; font-family: inherit; }
.co-input::placeholder { color: var(--co-text-3); }
.co-input:focus { border-color: var(--co-primary); box-shadow: 0 0 0 3px var(--co-focus); }
.co-input.mono { font-family: var(--co-mono); letter-spacing: 0.06em; }
.co-input.big { height: 58px; font-size: 22px; font-weight: 700; }
.co-help { font-size: 11.5px; color: var(--co-text-3); }
.co-field-err { color: var(--co-red); }
.co-input.err { border-color: var(--co-red); box-shadow: 0 0 0 3px var(--co-red-bg); }

/* ── Login ─────────────────────────────────────────────────── */
.co-login { height: 100vh; display: grid; grid-template-columns: 1.15fr 1fr; }
.co-login-art { position: relative; overflow: hidden; background: radial-gradient(120% 90% at 18% 8%, #E2ECF6 0%, #EEF1F6 55%); display: flex; flex-direction: column; justify-content: space-between; padding: 52px;
  color: var(--co-text); border-right: 1px solid var(--co-border); }
.co-login-art .glow { position: absolute; border-radius: 999px; filter: blur(70px); opacity: 0.5; }
.co-login-form { display: grid; place-items: center; padding: 40px; background: var(--co-bg); }
.co-login-box { width: 360px; max-width: 100%; display: flex; flex-direction: column; gap: 18px; }
.co-demo-login { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--co-radius-sm);
  background: var(--co-surface-2); border: 1px solid var(--co-border-2); cursor: pointer; min-height: 56px; transition: .14s; }
.co-demo-login:hover { border-color: var(--co-primary); background: var(--co-primary-tint); }
.co-demo-login:disabled { opacity: 0.55; cursor: default; }

/* responsive — tablet / iPad */
@media (max-width: 1180px) {
  .co-kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .co-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 1024px) {
  .co-sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 120; transform: translateX(-100%); transition: transform .22s var(--tw-ease); }
  .co-sidebar.open { transform: translateX(0); box-shadow: var(--co-shadow-pop); }
  .co-sidebar-backdrop { position: fixed; inset: 0; background: rgba(6,12,22,0.5); z-index: 115; }
  .co-burger { display: grid !important; }
  .co-page { padding: 22px 22px 56px; }
}
@media (max-width: 1200px), (max-width: 1366px) and (pointer: coarse) {
  .co-modal-card.fs { position: fixed; inset: 0; width: 100% !important; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
}
@media (min-width: 1025px) { .co-burger { display: none; } }
@media (max-width: 720px) {
  .co-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .co-funnel { flex-direction: column; }
  .co-funnel-arrow { transform: rotate(90deg); }
  .co-login { grid-template-columns: 1fr; }
  .co-login-art { display: none; }
  .co-search { max-width: none; }
  .co-menu-name, .co-menu-role { display: none; }
}
.co-burger { width: 42px; height: 42px; border-radius: var(--co-radius-sm); place-items: center; background: var(--co-surface-2); border: 1px solid var(--co-border); color: var(--co-text); cursor: pointer; }
.co-burger svg { width: 20px; height: 20px; }

/* ── Activation wizard ─────────────────────────────────────── */
.co-wiz-head { padding: 18px 24px; border-bottom: 1px solid var(--co-border); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.co-wiz-body { padding: 24px; overflow-y: auto; flex: 1; }
.co-wiz-foot { padding: 16px 24px; border-top: 1px solid var(--co-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.co-wiz-title { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; }
.co-wiz-step-title { font-size: 16px; font-weight: 700; margin: 0 0 4px; }
.co-wiz-step-sub { font-size: 13px; color: var(--co-text-3); margin: 0 0 18px; }

.co-pick { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--co-border); border-radius: var(--co-radius-sm); cursor: pointer; margin-bottom: 8px; background: var(--co-surface-2); transition: .14s; }
.co-pick:hover { border-color: var(--co-border-2); }
.co-pick.sel { border-color: var(--co-primary); background: var(--co-primary-tint); }
.co-pick-radio { width: 18px; height: 18px; border-radius: 999px; border: 2px solid var(--co-border-2); flex-shrink: 0; display: grid; place-items: center; }
.co-pick.sel .co-pick-radio { border-color: var(--co-primary); }
.co-pick.sel .co-pick-radio::after { content: ""; width: 9px; height: 9px; border-radius: 999px; background: var(--co-primary); }

/* mock physical card */
.co-cardart { aspect-ratio: 1.585; border-radius: 14px; padding: 18px 20px; position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #15314a, #0c1b2c); border: 1px solid rgba(255,255,255,0.12); box-shadow: var(--co-shadow); display: flex; flex-direction: column; justify-content: space-between; }
.co-cardart.mine { background: linear-gradient(135deg, #efe7d2, #d8caa6); color: #2a2418; border-color: rgba(0,0,0,0.1); }
.co-cardart .chip { width: 38px; height: 28px; border-radius: 6px; background: linear-gradient(135deg, #d9c87a, #b89a3e); }
.co-cardart .brand { font-weight: 800; letter-spacing: -0.01em; font-size: 14px; }
.co-cardart .num { font-family: var(--co-mono); font-size: 17px; letter-spacing: 0.08em; }
.co-cardart .grad { position: absolute; width: 220px; height: 220px; border-radius: 999px; filter: blur(50px); background: var(--tw-grad); opacity: 0.25; top: -80px; right: -60px; }

/* capture frame */
.co-capture { border: 2px dashed var(--co-border-2); border-radius: var(--co-radius); aspect-ratio: 1.4; display: grid; place-items: center; background: var(--co-surface-2); position: relative; overflow: hidden; }
.co-capture .scan-line { position: absolute; left: 8%; right: 8%; height: 2px; background: var(--co-green); box-shadow: 0 0 12px var(--co-green); animation: coScan 1.6s var(--tw-ease) infinite; }
@keyframes coScan { 0% { top: 18%; } 50% { top: 82%; } 100% { top: 18%; } }
.co-sheet { background: repeating-linear-gradient(0deg, transparent, transparent 22px, rgba(255,255,255,0.05) 22px, rgba(255,255,255,0.05) 23px), var(--co-surface-3); border-radius: var(--co-radius); padding: 26px; position: relative; }
.co-sheet-pin { position: absolute; width: 12px; height: 12px; border-radius: 999px; background: var(--co-red); top: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }

/* AI result */
.co-ai { border-radius: var(--co-radius); padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid; }
.co-ai.pass { background: var(--co-green-bg); border-color: color-mix(in srgb, var(--co-green) 40%, transparent); }
.co-ai.fail { background: var(--co-red-bg); border-color: color-mix(in srgb, var(--co-red) 45%, transparent); }
.co-ai-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.co-ai.pass .co-ai-icon { background: color-mix(in srgb, var(--co-green) 22%, transparent); color: var(--co-green); }
.co-ai.fail .co-ai-icon { background: color-mix(in srgb, var(--co-red) 22%, transparent); color: var(--co-red); }
.co-ai-title { font-weight: 700; font-size: 14px; }
.co-ai.pass .co-ai-title { color: var(--co-green); } .co-ai.fail .co-ai-title { color: var(--co-red); }
.co-conf { height: 6px; border-radius: 6px; background: var(--co-surface-3); overflow: hidden; margin-top: 8px; }
.co-conf-fill { height: 100%; border-radius: 6px; }

.co-success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px; padding: 26px 20px; }
.co-success-badge { width: 84px; height: 84px; border-radius: 999px; display: grid; place-items: center; background: var(--co-green-bg); color: var(--co-green); box-shadow: 0 0 0 10px color-mix(in srgb, var(--co-green) 8%, transparent); }
.co-success-badge svg { width: 42px; height: 42px; }

.co-dispo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.co-dispo-opt { border: 1px solid var(--co-border); border-radius: var(--co-radius); padding: 18px; cursor: pointer; display: flex; flex-direction: column; gap: 8px; background: var(--co-surface-2); transition: .14s; }
.co-dispo-opt:hover { border-color: var(--co-border-2); }
.co-dispo-opt.sel { border-color: var(--co-primary); background: var(--co-primary-tint); }
.co-dispo-opt .ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--co-surface-3); color: var(--co-text-2); }
.co-dispo-opt.sel .ico { background: var(--co-primary); color: #fff; }

.co-demo-toggle { display: flex; align-items: center; gap: 8px; }
.co-demo-toggle .co-seg button { padding: 6px 11px; font-size: 11.5px; min-height: 30px; }

/* Etherscan / USDC tx link */
.co-etherscan { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: var(--co-blue); text-decoration: none;
  padding: 2px 7px 2px 6px; border-radius: 6px; background: var(--co-blue-bg); white-space: nowrap; }
.co-etherscan:hover { filter: brightness(1.12); }
.co-etherscan svg { width: 12px; height: 12px; }
