/* enterprise.css - Sprint 7-4 frontend foundation styling.
 * Scoped to the new enterprise shell (.eb-* classes). Loaded ONLY by new pages,
 * so existing pages (which use style.css) are unaffected.
 * Visual direction: professional SaaS, blue navigation, white content area. */

:root {
  --eb-blue: #1f4ed8;
  --eb-blue-dark: #1736a8;
  --eb-bg: #f4f6fb;
  --eb-border: #e3e8f0;
  --eb-text: #1f2933;
  --eb-muted: #6b7280;
  --eb-drawer-width: 420px;
  --eb-drawer-wide: 560px;
  --eb-drawer-radius: 18px;
  --eb-drawer-shadow: -24px 0 60px rgba(15, 23, 42, 0.22);
  --eb-drawer-transition: 0.27s ease-out;
}

* { box-sizing: border-box; }

body.eb-body {
  margin: 0;
  font-family: -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--eb-text);
  background: var(--eb-bg);
}

.eb-shell { display: flex; min-height: 100vh; }

/* Sidebar (blue navigation) */
.eb-sidebar {
  width: 220px;
  background: var(--eb-blue);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.eb-brand {
  font-size: 20px;
  font-weight: 700;
  padding: 20px 18px;
  letter-spacing: 0.3px;
}
.eb-nav { display: flex; flex-direction: column; }
.eb-nav-link {
  color: #dbe4ff;
  text-decoration: none;
  padding: 12px 18px;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.eb-nav-link:hover { background: var(--eb-blue-dark); color: #fff; }
.eb-nav-link.is-active {
  background: var(--eb-blue-dark);
  color: #fff;
  border-left-color: #fff;
  font-weight: 600;
}

/* Main + topbar (white content area) */
.eb-main { flex: 1; display: flex; flex-direction: column; }
.eb-topbar {
  height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--eb-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}
.eb-topbar-title { font-size: 16px; font-weight: 600; }
.eb-topbar-right { display: flex; align-items: center; gap: 14px; }
.eb-topbar-user { color: var(--eb-muted); font-size: 13px; }

.eb-content { padding: 22px; }
.eb-section-title { font-size: 15px; font-weight: 600; margin: 4px 0 12px; }

/* Buttons */
.eb-btn {
  border: 1px solid var(--eb-border);
  background: #fff;
  color: var(--eb-text);
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
}
.eb-btn-ghost { background: transparent; }
.eb-btn:hover { background: var(--eb-bg); }

/* Cards + grid */
.eb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.eb-card {
  background: #fff;
  border: 1px solid var(--eb-border);
  border-radius: 8px;
  padding: 16px;
}
.eb-metric-label { color: var(--eb-muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.4px; }
.eb-metric-value { font-size: 24px; font-weight: 700; margin-top: 6px; }
.eb-panel-title { margin: 0 0 12px; font-size: 14px; font-weight: 600; }

/* Table */
.eb-table { width: 100%; border-collapse: collapse; background: #fff; }
.eb-table th, .eb-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--eb-border);
  font-size: 13px;
}
.eb-table th { color: var(--eb-muted); font-weight: 600; background: #fafbfe; }
.eb-table-empty { color: var(--eb-muted); text-align: center; }
.eb-empty-state { padding: 40px 20px; text-align: center; color: var(--eb-muted); font-size: 14px; }

/* Status badges */
.eb-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1f7;
  color: #46506a;
}
.eb-badge-active, .eb-badge-running { background: #e3f0ff; color: #1f4ed8; }
.eb-badge-completed, .eb-badge-settled { background: #e6f6ec; color: #15803d; }
.eb-badge-sold_out { background: #fdeaea; color: #b42318; }

.eb-error { color: #b42318; font-size: 13px; }
.eb-muted-note { color: var(--eb-muted); font-size: 13px; }

/* Product card (AI Market) - Sprint 7-5 */
.eb-product-card { display: flex; flex-direction: column; }
.eb-card-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.eb-card-title { font-size: 15px; font-weight: 600; }
.eb-field { font-size: 13px; margin: 4px 0; color: var(--eb-text); }

/* Multi-model checkbox grid for product creation */
.eb-model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 6px;
  margin-top: 6px;
}
.eb-check-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid var(--eb-border, #e3e8f0);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease;
  user-select: none;
}
.eb-check-row:hover { background: #f8f9fc; }
.eb-check-row input[type="checkbox"] { margin: 0; accent-color: #7c3aed; }
.eb-label { color: var(--eb-muted); }
.eb-required { color: #dc2626; }
.eb-readonly-note { margin-top: 10px; font-size: 11px; color: var(--eb-muted); text-transform: uppercase; letter-spacing: 0.4px; }

/* =====================================================================
 * Agent Dashboard v1.0 - premium visual finalization (UI only, no data).
 * Dark navy sidebar, blue/purple accent system, white content.
 * ===================================================================== */

:root {
  --eb-purple: #7c3aed;
  --eb-navy-1: #0b1220;
  --eb-navy-2: #16203a;
  --eb-side-text: #c4cde2;
  --eb-side-muted: #7a87a6;
  --eb-grad: linear-gradient(135deg, #2563eb, #7c3aed);
  --eb-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.eb-dash { background: var(--eb-bg); }
.eb-dash-grid { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }

/* ---- Left sidebar (dark premium) ---- */
.eb-dash-sidebar {
  background: linear-gradient(180deg, var(--eb-navy-1), var(--eb-navy-2));
  color: var(--eb-side-text);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.eb-dash-logo { display: flex; align-items: center; gap: 11px; padding: 20px 18px 10px; }
.eb-dash-logo-img { width: 100%; height: auto; display: block; }
.eb-logo-mark {
  width: 36px; height: 36px; border-radius: 10px; background: var(--eb-grad);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 16px;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.4);
}
.eb-logo-text { display: flex; flex-direction: column; line-height: 1.25; }
.eb-logo-name { font-weight: 700; font-size: 17px; color: #fff; }
.eb-logo-sub { font-size: 11px; color: var(--eb-side-muted); }

.eb-dash-nav { display: flex; flex-direction: column; padding: 6px 12px 14px; flex: 1; }
.eb-dash-group-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.8px; color: var(--eb-side-muted); padding: 16px 10px 6px; }
.eb-dash-link {
  display: flex; align-items: center; gap: 11px; color: var(--eb-side-text);
  text-decoration: none; padding: 9px 12px; font-size: 13.5px; border-radius: 9px; margin: 1px 0;
}
.eb-ico { display: inline-flex; align-items: center; justify-content: center; vertical-align: middle; pointer-events: none; }
.eb-ico svg { width: 18px; height: 18px; display: block; }
.eb-dash-link .eb-ico { width: 18px; opacity: 0.85; }
.eb-dash-link:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.eb-dash-link.is-active { background: var(--eb-grad); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35); font-weight: 600; }
.eb-dash-link.is-active .eb-ico { opacity: 1; }
.eb-side-badge { margin-left: auto; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 10px; padding: 1px 7px; border-radius: 999px; }

.eb-dash-userbox { margin: auto 12px 14px; padding: 12px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 12px; }
.eb-userrow { display: flex; align-items: center; gap: 10px; }
.eb-dash-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--eb-grad); color: #fff; display: grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.u-name { font-size: 13px; font-weight: 600; color: #fff; display: flex; align-items: center; gap: 6px; }
.u-verified { background: rgba(34, 197, 94, 0.18); color: #4ade80; font-size: 10px; padding: 1px 6px; border-radius: 999px; }
.u-sub { font-size: 11px; color: var(--eb-side-muted); margin-top: 2px; }
.eb-logout { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); color: var(--eb-side-muted); font-size: 12.5px; cursor: pointer; }
.eb-logout:hover { color: #fff; }

/* ---- Bottom user card account menu ---- */
.eb-user-menu-toggle { width: 100%; background: none; border: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.eb-user-menu-toggle .eb-caret { margin-left: auto; transition: transform 0.15s ease; }
.eb-dash-userbox.is-open .eb-user-menu-toggle .eb-caret { transform: rotate(180deg); }
.eb-user-menu { display: flex; flex-direction: column; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(255, 255, 255, 0.08); gap: 2px; }
.eb-user-menu[hidden] { display: none; }
.eb-user-menu-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 6px; border-radius: 8px;
  color: var(--eb-side-muted); font-size: 12.5px; text-decoration: none; cursor: pointer;
  background: none; border: none; width: 100%; text-align: left; font: inherit;
}
.eb-user-menu-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.eb-user-menu-item.is-active { color: #fff; background: rgba(255, 255, 255, 0.08); font-weight: 600; }
.eb-user-menu-item .eb-ico { width: 16px; text-align: center; opacity: 0.85; }

/* ---- Main + top navigation ---- */
.eb-dash-main { display: flex; flex-direction: column; min-width: 0; background: var(--eb-bg); }
.eb-dash-topnav { height: 64px; background: #fff; border-bottom: 1px solid var(--eb-border); display: flex; align-items: center; gap: 18px; padding: 0 26px; position: sticky; top: 0; z-index: 5; }
.eb-dash-search { flex: 1; max-width: 540px; display: flex; align-items: center; gap: 9px; background: var(--eb-bg); border: 1px solid var(--eb-border); border-radius: 10px; padding: 9px 14px; color: var(--eb-muted); font-size: 13px; }
.eb-dash-topnav-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.eb-top-item { color: var(--eb-muted); font-size: 13px; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.eb-top-icon { position: relative; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--eb-border); background: #fff; display: grid; place-items: center; cursor: pointer; }
.eb-top-dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; border: 2px solid #fff; }
.eb-top-avatar { display: flex; align-items: center; gap: 9px; cursor: pointer; }
.eb-top-avatar .a-img { width: 34px; height: 34px; border-radius: 50%; background: var(--eb-grad); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.eb-top-avatar .a-name { font-size: 13px; font-weight: 600; }
.eb-caret { color: var(--eb-muted); font-size: 11px; display: inline-flex; align-items: center; }
.eb-caret[data-icon] { font-size: inherit; }
.eb-caret svg { width: 14px; height: 14px; }

/* ---- Body grid ---- */
.eb-dash-body { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 22px; padding: 24px 26px; align-items: start; }
.eb-dash-content { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.eb-dash-right { display: flex; flex-direction: column; gap: 18px; }

/* ---- Premium hero ---- */
.eb-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, #eaefff 0%, #f1ecfe 55%, #ffffff 100%);
  border: 1px solid var(--eb-border); border-radius: 20px; padding: 44px 40px;
  min-height: 268px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  box-shadow: 0 18px 46px rgba(31, 78, 216, 0.12);
}
.eb-hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: linear-gradient(rgba(124, 58, 237, 0.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(circle at 72% 45%, #000, transparent 72%);
  mask-image: radial-gradient(circle at 72% 45%, #000, transparent 72%);
}
.eb-hero-text { position: relative; z-index: 1; }
.eb-hero h1 { margin: 0 0 10px; font-size: 30px; background: var(--eb-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.eb-hero p { margin: 0 0 20px; color: #4b5563; font-size: 14.5px; max-width: 470px; line-height: 1.5; }
.eb-hero-btn { background: var(--eb-grad); color: #fff; border: none; border-radius: 10px; padding: 12px 22px; font-weight: 600; font-size: 14px; cursor: pointer; box-shadow: 0 8px 22px rgba(124, 58, 237, 0.3); }
.eb-hero-art { position: relative; z-index: 1; flex-shrink: 0; }
.eb-chip {
  position: relative; width: 196px; height: 196px; border-radius: 30px;
  background: linear-gradient(135deg, #1e293b, #312e81); display: grid; place-items: center;
  box-shadow: 0 24px 56px rgba(49, 46, 129, 0.45);
  animation: ebFloat 5s ease-in-out infinite;
}
.eb-chip::after {
  content: ""; position: absolute; inset: -2px; border-radius: 30px;
  background: radial-gradient(circle at 50% 45%, rgba(124, 58, 237, 0.45), transparent 65%);
  filter: blur(8px); z-index: -1; animation: ebGlow 4s ease-in-out infinite;
}
.eb-chip-core {
  width: 96px; height: 96px; border-radius: 20px; background: var(--eb-grad);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 26px; letter-spacing: 1.5px;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06), 0 0 36px rgba(124, 58, 237, 0.7);
}
.eb-node { position: absolute; width: 11px; height: 11px; border-radius: 50%; background: #93c5fd; box-shadow: 0 0 12px rgba(147, 197, 253, 0.95); animation: ebPulse 3s ease-in-out infinite; }
.eb-node.n1 { top: 20px; left: 20px; animation-delay: 0s; }
.eb-node.n2 { top: 20px; right: 20px; animation-delay: 0.5s; }
.eb-node.n3 { bottom: 20px; left: 20px; animation-delay: 1s; }
.eb-node.n4 { bottom: 20px; right: 20px; animation-delay: 1.5s; }

@keyframes ebFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes ebGlow { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
@keyframes ebPulse { 0%, 100% { transform: scale(1); opacity: 0.85; } 50% { transform: scale(1.45); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .eb-chip, .eb-chip::after, .eb-node { animation: none; }
  .eb-dash-sidebar, .eb-drawer-overlay, .eb-detail-drawer, .eb-detail-overlay { transition: none; }
}

/* ---- Section heads ---- */
.eb-sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.eb-sec-title { font-size: 17px; font-weight: 600; }
.eb-sec-link { font-size: 13px; color: var(--eb-blue); text-decoration: none; }

/* ---- Pool cards (rich) ---- */
.eb-pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.eb-pool-card { background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; overflow: hidden; box-shadow: var(--eb-shadow); display: flex; flex-direction: column; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.eb-pool-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12); }
.eb-pool-desc { font-size: 12.5px; color: var(--eb-muted); line-height: 1.45; min-height: 34px; }
.eb-pool-head { background: linear-gradient(135deg, #0f172a, #243049); color: #fff; padding: 16px; display: flex; align-items: center; justify-content: space-between; }
.eb-pool-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--eb-grad); display: grid; place-items: center; font-size: 18px; }
.eb-pool-hot { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.badge-hot { background: #fee2e2; color: #b91c1c; }
.badge-popular { background: #dbeafe; color: #1d4ed8; }
.badge-new { background: #dcfce7; color: #15803d; }
.badge-limited { background: #fef3c7; color: #92660a; }
.eb-pool-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eb-pool-name { font-weight: 600; font-size: 15px; }
.eb-chip-type { display: inline-block; align-self: flex-start; font-size: 11px; padding: 2px 9px; border-radius: 6px; background: #eef2ff; color: #4338ca; font-weight: 600; }
.eb-pool-yield { display: flex; align-items: baseline; gap: 6px; }
.eb-pool-yield .y-val { font-size: 20px; font-weight: 700; color: var(--eb-purple); }
.eb-pool-yield .y-lab { font-size: 12px; color: var(--eb-muted); }
.eb-progress { height: 8px; border-radius: 999px; background: #eef1f7; overflow: hidden; }
.eb-progress > i { display: block; height: 100%; background: var(--eb-grad); border-radius: 999px; }
.eb-pool-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--eb-muted); }
.eb-pool-btn { margin-top: 4px; background: var(--eb-grad); color: #fff; border: none; border-radius: 9px; padding: 10px; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: 0 6px 16px rgba(124, 58, 237, 0.22); transition: filter 0.16s ease, transform 0.16s ease; }
.eb-pool-btn:hover { filter: brightness(1.07); transform: translateY(-1px); }

/* ---- Market overview stats ---- */
.eb-stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); gap: 18px; }
.eb-stat { background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; padding: 18px; box-shadow: var(--eb-shadow); }
.eb-stat .s-label { font-size: 12px; color: var(--eb-muted); }
.eb-stat .s-value { font-size: 23px; font-weight: 700; margin-top: 6px; }
.eb-stat .s-delta { font-size: 12px; color: #15803d; margin-top: 4px; font-weight: 600; }

/* ---- Analytics stat cards ---- */
.eb-stat-card { display: flex; align-items: center; gap: 16px; background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; padding: 20px; box-shadow: var(--eb-shadow); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.eb-stat-card:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(15,23,42,0.1); }
.eb-stat-card .eb-stat-icon { font-size: 32px; width: 52px; height: 52px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--eb-bg); flex-shrink: 0; }
.eb-stat-card .eb-stat-body { display: flex; flex-direction: column; }
.eb-stat-card .eb-stat-num { font-size: 23px; font-weight: 700; line-height: 1.2; }
.eb-stat-card .eb-stat-label { font-size: 12px; color: var(--eb-muted); margin-top: 2px; }

/* ---- Bar chart (analytics) ---- */
.eb-chart-bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 0 4px; }
.eb-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.eb-chart-bar-wrap { width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.eb-chart-bar { width: 70%; max-width: 28px; min-height: 2px; background: linear-gradient(135deg, var(--eb-blue), #7c3aed); border-radius: 4px 4px 0 0; transition: height 0.3s ease; }
.eb-chart-label { font-size: 10px; color: var(--eb-muted); margin-top: 6px; text-align: center; white-space: nowrap; }

/* ---- Right panel widgets ---- */
.eb-widget { background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; padding: 18px; box-shadow: var(--eb-shadow); }
.eb-widget h4 { margin: 0 0 14px; font-size: 14px; }
.eb-asset-total { font-size: 26px; font-weight: 700; }
.eb-asset-sub { font-size: 12px; color: var(--eb-muted); margin-top: 2px; margin-bottom: 6px; }
.eb-asset-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--eb-border); font-size: 13px; }
.eb-asset-row .a-k { color: var(--eb-muted); }
.eb-asset-row .a-v { font-weight: 600; }
.eb-asset-earn { color: #15803d; }
.eb-insight-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 0; border-top: 1px solid var(--eb-border); }
.eb-insight-row:first-of-type { border-top: none; }
.eb-insight-name { font-size: 13px; }
.eb-spark { display: flex; align-items: flex-end; gap: 2px; height: 26px; }
.eb-spark > i { width: 4px; background: var(--eb-grad); border-radius: 2px; opacity: 0.85; }
.eb-insight-val { font-size: 12px; font-weight: 600; color: #15803d; min-width: 48px; text-align: right; }

/* ---- Running deployments table ---- */
.eb-table-progress { display: flex; align-items: center; gap: 8px; }
.eb-table-progress .eb-progress { width: 90px; }
.eb-table-action { color: var(--eb-blue); cursor: pointer; font-weight: 600; font-size: 12.5px; }

/* ---- Announcements ---- */
.eb-ann-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--eb-border); }
.eb-ann-row:first-child { border-top: none; }
.eb-ann-dot { width: 38px; height: 38px; border-radius: 10px; background: var(--eb-bg); display: grid; place-items: center; flex-shrink: 0; }
.eb-ann-body { flex: 1; }
.eb-ann-title { font-weight: 600; font-size: 13.5px; }
.eb-ann-sub { font-size: 12px; color: var(--eb-muted); margin-top: 2px; }
.eb-ann-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.eb-ann-time { font-size: 11px; color: var(--eb-muted); }
.eb-tag { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.tag-new { background: #dcfce7; color: #15803d; }
.tag-update { background: #dbeafe; color: #1d4ed8; }
.tag-notice { background: #fef3c7; color: #92660a; }

/* ---- Step 1D polish: dense table, asset highlight, section arrow ---- */
.eb-table.is-dense th, .eb-table.is-dense td { padding: 9px 14px; }
.eb-table.is-dense tbody tr { transition: background 0.12s ease; }
.eb-table.is-dense tbody tr:hover { background: #f7f9ff; }
.eb-asset-row.is-today { border-top: 1px solid var(--eb-border); margin-top: 2px; }
.eb-asset-row.is-today .a-k { color: var(--eb-text); font-weight: 600; }
.eb-sec-link .arrow { margin-left: 4px; }

/* ---- Footer trust bar ---- */
.eb-dash-footer { border-top: 1px solid var(--eb-border); background: #fff; padding: 20px 26px; }
.eb-trustbar { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.eb-trust { display: flex; align-items: center; gap: 12px; color: var(--eb-text); font-size: 13px; font-weight: 500; }
.eb-trust .t-ico { width: 36px; height: 36px; border-radius: 10px; background: #eef2ff; color: var(--eb-blue); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.eb-trust .t-ico svg { width: 20px; height: 20px; }
.eb-stat-card .eb-stat-icon svg { width: 28px; height: 28px; }
.eb-foot-copy { margin-top: 14px; color: var(--eb-muted); font-size: 12px; text-align: center; }

/* =====================================================================
 * Step 1G - pixel-perfect UI polish (visual only; no data/logic/API).
 * Unifies the card radius / shadow / hover-transition system and deepens
 * each section. All numbers below remain illustrative placeholders.
 * ===================================================================== */

/* Global: unify dashboard card radius (14px system) */
.eb-dash .eb-card { border-radius: 14px; }

/* --- Hero: connection lines, deeper chip, button hover --- */
.eb-link {
  position: absolute; top: 50%; left: 50%; height: 2px; width: 58px;
  transform-origin: 0 50%; border-radius: 2px; pointer-events: none;
  background: linear-gradient(90deg, rgba(147, 197, 253, 0.75), rgba(147, 197, 253, 0));
}
.eb-link.k1 { transform: rotate(225deg) translateX(48px); }
.eb-link.k2 { transform: rotate(315deg) translateX(48px); }
.eb-link.k3 { transform: rotate(135deg) translateX(48px); }
.eb-link.k4 { transform: rotate(45deg)  translateX(48px); }
.eb-chip { box-shadow: 0 24px 56px rgba(49, 46, 129, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.10); }
.eb-chip-core { position: relative; z-index: 1; }
.eb-hero-btn { transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease; }
.eb-hero-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(124, 58, 237, 0.42); filter: brightness(1.05); }
.eb-hero-btn:active { transform: translateY(0); box-shadow: 0 6px 16px rgba(124, 58, 237, 0.3); }

/* --- Pool cards: header depth, icon lighting, progress sheen --- */
.eb-pool-head { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.eb-pool-icon { box-shadow: 0 8px 18px rgba(124, 58, 237, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25); }
.eb-pool-card { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.eb-pool-card:hover { border-color: #d6def0; }
.eb-pool-meta span:last-child { color: var(--eb-text); font-weight: 600; }
.eb-progress { box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08); }
.eb-progress > i { box-shadow: 0 0 8px rgba(124, 58, 237, 0.4); }

/* --- My Assets: hierarchy + positive-trend styling --- */
.eb-asset-total { letter-spacing: -0.5px; line-height: 1.1; }
.eb-asset-row { padding: 10px 0; }
.eb-asset-earn::before { content: "\25B2"; font-size: 8px; margin-right: 4px; vertical-align: middle; }
.eb-asset-row.is-today { background: linear-gradient(90deg, rgba(34, 197, 94, 0.07), transparent); margin: 2px -6px 0; padding: 10px 6px; border-radius: 0 0 10px 10px; }

/* --- Market Insights: sparkline + trend polish --- */
.eb-spark > i { transition: opacity 0.18s ease; }
.eb-widget:hover .eb-spark > i { opacity: 1; }
.eb-insight-val::before { content: "\25B2"; font-size: 8px; margin-right: 3px; vertical-align: middle; }

/* --- Deployments table: header treatment, progress, links --- */
.eb-table.is-dense thead th { text-transform: uppercase; letter-spacing: 0.4px; font-size: 11px; }
.eb-table.is-dense tbody td { vertical-align: middle; }
.eb-table-progress span { font-size: 12px; font-weight: 600; color: var(--eb-text); min-width: 34px; }
.eb-table-action { transition: color 0.14s ease; }
.eb-table-action:hover { color: var(--eb-blue-dark); text-decoration: underline; }
.eb-sec-link { display: inline-flex; align-items: center; transition: color 0.14s ease; }
.eb-sec-link:hover { color: var(--eb-blue-dark); }
.eb-sec-link .arrow { transition: transform 0.16s ease; }
.eb-sec-link:hover .arrow { transform: translateX(3px); }

/* --- Stats: hover lift + delta arrow --- */
.eb-stat { transition: transform 0.16s ease, box-shadow 0.16s ease; }
.eb-stat:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08); }
.eb-stat .s-delta::before { content: "\25B2"; font-size: 8px; margin-right: 4px; vertical-align: middle; }

/* --- Announcements: row hover + dot tint --- */
.eb-ann-row { margin: 0 -8px; padding: 12px 8px; border-radius: 10px; transition: background 0.14s ease; }
.eb-ann-row:hover { background: #f7f9ff; }
.eb-ann-dot { background: #eef2ff; color: var(--eb-blue); font-size: 16px; }

/* --- Footer trust bar: card polish --- */
.eb-trust { padding: 12px 14px; border: 1px solid var(--eb-border); border-radius: 12px; background: #fff; transition: transform 0.16s ease, box-shadow 0.16s ease; }
.eb-trust:hover { transform: translateY(-1px); box-shadow: var(--eb-shadow); }
.eb-trust .t-ico { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6); }

/* =====================================================================
 * Step 2A - wallet integration: loading skeleton + error message.
 * Visual only; the data itself comes from GET /api/v1/wallet.
 * ===================================================================== */
.eb-skel {
  display: inline-block; width: 72px; height: 12px; border-radius: 6px;
  vertical-align: middle;
  background: linear-gradient(90deg, #eef1f7 25%, #e2e8f3 37%, #eef1f7 63%);
  background-size: 400% 100%; animation: ebSkel 1.2s ease infinite;
}
.eb-asset-total .eb-skel { width: 124px; height: 22px; border-radius: 7px; }
@keyframes ebSkel { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.eb-asset-err { margin-top: 10px; font-size: 12px; color: #b42318; }
@media (prefers-reduced-motion: reduce) { .eb-skel { animation: none; } }

/* =====================================================================
 * Step 2B - running deployments: table empty / CTA / error states.
 * Visual only; rows are populated from /api/v1/orders/me + runtime/settlement.
 * ===================================================================== */
.eb-table-state { text-align: center; padding: 28px 14px; }
.eb-empty { display: inline-flex; flex-direction: column; align-items: center; gap: 8px; }
.eb-empty-title { color: var(--eb-muted); font-size: 13.5px; }
.eb-cta-link { color: var(--eb-blue); font-weight: 600; font-size: 13px; }
.eb-deploy-err { color: #b42318; font-size: 13px; }

/* =====================================================================
 * Step 2C - deployment detail drawer (read-only). Separate state from the
 * mobile navigation drawer (uses .eb-detail-* + body.eb-detail-open).
 * ===================================================================== */
.eb-detail-overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, 0.42);
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden;
  transition: opacity 0.27s ease-out, visibility 0.27s ease-out;
}
body.eb-detail-open .eb-detail-overlay { opacity: 1; visibility: visible; }
.eb-detail-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; height: 100dvh;
  width: var(--eb-drawer-width); max-width: 92vw; z-index: 61;
  background: var(--eb-bg);
  box-shadow: var(--eb-drawer-shadow);
  border-top-left-radius: var(--eb-drawer-radius); border-bottom-left-radius: var(--eb-drawer-radius);
  transform: translateX(100%); transition: transform var(--eb-drawer-transition); will-change: transform;
  overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain;
}
body.eb-detail-open .eb-detail-drawer { transform: translateX(0); }
body.eb-detail-open { overflow: hidden; }

.eb-detail-head {
  position: relative; color: #fff; padding: 22px 22px 18px;
  background: var(--eb-grad, linear-gradient(135deg, #2563eb, #7c3aed));
  border-top-left-radius: var(--eb-drawer-radius);
}
.eb-detail-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  border-radius: 8px; border: none; background: rgba(255, 255, 255, 0.12);
  color: #fff; font-size: 14px; cursor: pointer; display: grid; place-items: center;
}
.eb-detail-close:hover { background: rgba(255, 255, 255, 0.22); }
.eb-detail-eyebrow { font-size: 11px; letter-spacing: 0.6px; text-transform: uppercase; color: rgba(255, 255, 255, 0.7); }
.eb-detail-title { font-size: 18px; font-weight: 700; margin: 4px 0 10px; padding-right: 36px; }

.eb-detail-body { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.eb-detail-card { background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; padding: 14px 16px; box-shadow: var(--eb-shadow); }
.eb-detail-sec-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--eb-muted); margin-bottom: 8px; }
.eb-d-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--eb-border); font-size: 13px; }
.eb-d-row:first-of-type { border-top: none; }
.eb-d-k { color: var(--eb-muted); }
.eb-d-v { font-weight: 600; text-align: right; }
.eb-d-v .eb-table-progress { justify-content: flex-end; }

/* Deposit Amount Preview Calculator: small, secondary text below the amount
   input - never competes visually with the input itself. */
.eb-estimate-preview { margin: 2px 0 8px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; }
.eb-estimate-line { font-size: 12px; color: var(--eb-muted); line-height: 1.5; }
.eb-estimate-warning { color: #b45309; font-weight: 600; }
.eb-estimate-disclaimer { font-size: 10.5px; color: #94a3b8; font-style: italic; margin-top: 4px; }
.eb-estimate-preview.is-out-of-range { background: #fffbeb; border: 1px solid #fde68a; }
.eb-detail-empty { font-size: 13px; color: var(--eb-muted); }

@media (max-width: 560px) {
  .eb-detail-drawer { width: 100%; max-width: 100%; border-radius: 0; }
  .eb-detail-head { border-top-left-radius: 0; }
}
@media (max-width: 600px) { .eb-detail-drawer--wide { width: 100%; max-width: 100%; border-radius: 0; } }
.eb-detail-text { font-size: 13px; color: var(--eb-text); line-height: 1.5; }

/* =====================================================================
 * Sprint 7-5 Part 3 - AI Marketplace (enterprise product discovery).
 * Dashboard v1.0 language: filter chips + SaaS product card grid.
 * ===================================================================== */
.eb-mkt-wrap { display: flex; flex-direction: column; gap: 24px; padding: 24px 26px; }

/* Filter / category bar */
.eb-filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.eb-filter-chip {
  border: 1px solid var(--eb-border); background: #fff; color: var(--eb-text);
  border-radius: 999px; padding: 7px 16px; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.eb-filter-chip:hover { border-color: #c7d2fe; }
.eb-filter-chip.is-active {
  background: var(--eb-grad); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.28);
}

/* Product card grid */
.eb-mkt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.eb-mkt-card {
  background: #fff; border: 1px solid var(--eb-border); border-radius: 14px; overflow: hidden;
  box-shadow: var(--eb-shadow); display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.eb-mkt-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12); border-color: #d6def0; }
.eb-mkt-head {
  background: linear-gradient(135deg, #0f172a, #243049); padding: 16px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.eb-mkt-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eb-mkt-stats { display: flex; flex-direction: column; gap: 8px; margin-top: 2px; }
.eb-mkt-stats > div { display: flex; align-items: center; justify-content: space-between; font-size: 13px; }
.eb-mkt-stats .k { color: var(--eb-muted); }
.eb-mkt-stats .v { font-weight: 600; }
.eb-pool-btn.is-disabled, .eb-pool-btn:disabled {
  background: #e5e9f2; color: #9aa4b8; box-shadow: none; cursor: not-allowed;
}
.eb-pool-btn:disabled:hover { filter: none; transform: none; }

/* Marketplace states (loading / empty / error / no-match) */
.eb-mkt-state { grid-column: 1 / -1; text-align: center; padding: 40px 16px; }
.eb-mkt-sub { color: var(--eb-muted); font-size: 13px; margin-top: 6px; }

/* Phase 2 (Live Deploy Product Cards): provider logo - skeleton -> fade-in ->
   fallback initial letter. Enlarged (Product Card Redesign task) from the
   original 42px (matching .eb-pool-icon) to 56px for a more prominent, card-
   defining presence per the redesign's "larger, prominent provider logo". */
.eb-model-logo {
  width: 56px; height: 56px; border-radius: 13px; overflow: hidden;
  display: grid; place-items: center; background: var(--eb-grad);
  color: #fff; font-weight: 700; font-size: 20px;
  box-shadow: 0 8px 18px rgba(124, 58, 237, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.eb-model-logo.eb-skel {
  background: linear-gradient(90deg, #3a4459 25%, #4a5570 37%, #3a4459 63%);
  background-size: 400% 100%; animation: ebSkel 1.2s ease infinite;
}
.eb-model-logo-img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease; }
.eb-model-logo.is-loaded .eb-model-logo-img { opacity: 1; }

/* Product Card Redesign: three side-by-side stat panels (Context Length / Avg
   Latency / Throughput). Colors reuse the EXACT same good/warn/bad palette as
   the color-coded status dots (#16a34a/#d97706/#dc2626) - one shared status
   vocabulary across the whole card, no second color scheme. */
.eb-stat-panels { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.eb-stat-panel {
  background: #f8fafc; border: 1px solid var(--eb-border); border-radius: 10px;
  padding: 10px 6px 8px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center;
}
.eb-stat-icon { color: #64748b; }
.eb-stat-value { font-size: 16px; font-weight: 700; color: #1e293b; line-height: 1.15; white-space: nowrap; }
.eb-stat-unit { font-size: 9.5px; font-weight: 600; color: var(--eb-muted); margin-left: 2px; }
.eb-stat-bar-track { width: 100%; height: 4px; border-radius: 2px; background: #e2e8f0; overflow: hidden; margin-top: 2px; }
.eb-stat-bar-fill { height: 100%; border-radius: 2px; background: var(--eb-grad); transition: width 0.3s ease; }
.eb-stat-label { font-size: 9.5px; font-weight: 600; color: var(--eb-muted); }
.eb-stat-panel.eb-stat-good .eb-stat-bar-fill { background: #16a34a; }
.eb-stat-panel.eb-stat-good .eb-stat-label { color: #16a34a; }
.eb-stat-panel.eb-stat-warn .eb-stat-bar-fill { background: #d97706; }
.eb-stat-panel.eb-stat-warn .eb-stat-label { color: #d97706; }
.eb-stat-panel.eb-stat-bad .eb-stat-bar-fill { background: #dc2626; }
.eb-stat-panel.eb-stat-bad .eb-stat-label { color: #dc2626; }

/* Product Card Redesign: capability badge row - same visual family as the
   Phase 3 rank badge (.eb-rank-badge) for a cohesive "informational tag" look. */
.eb-capability-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.eb-capability-badge {
  font-size: 10px; font-weight: 600; padding: 3px 9px; border-radius: 999px;
  background: #eef2ff; color: #4338ca; white-space: nowrap;
}

/* Model chip - distinct from the existing type chip (.eb-chip-type) so
   "Deploy" and "Anthropic · Claude Sonnet 5" read as separate facts. */
.eb-model-chip {
  display: inline-block; align-self: flex-start; font-size: 11px; padding: 2px 9px;
  border-radius: 6px; background: #f1f5f9; color: #475569; font-weight: 600;
}

/* AI Catalog Display Enrichment: reference/display-only model metadata block. */
.eb-model-enrichment { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; border-top: 1px dashed var(--eb-border); border-bottom: 1px dashed var(--eb-border); }
.eb-modality-row { display: flex; align-items: center; gap: 6px; color: var(--eb-muted); }
.eb-modality-group { display: inline-flex; gap: 3px; }
.eb-modality-icon { display: inline-flex; color: #64748b; }
.eb-modality-arrow { font-size: 11px; color: #94a3b8; }
.eb-context-gauge { display: flex; flex-direction: column; gap: 3px; }
.eb-context-gauge-label { font-size: 11px; color: var(--eb-muted); }
.eb-context-gauge-track { height: 5px; border-radius: 3px; background: #eef1f7; overflow: hidden; }
.eb-context-gauge-fill { height: 100%; border-radius: 3px; background: var(--eb-grad); }
.eb-knowledge-cutoff { font-size: 11px; color: var(--eb-muted); }
.eb-pricing-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.eb-pricing-chip {
  font-size: 10.5px; padding: 2px 7px; border-radius: 5px;
  background: #fef9ee; color: #926a1a; font-weight: 600; white-space: nowrap;
}
.eb-pricing-note { flex-basis: 100%; font-size: 10px; color: #b0834a; font-style: italic; }
.eb-model-desc {
  font-size: 12px; color: var(--eb-muted); line-height: 1.4; cursor: pointer;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.eb-model-desc.is-expanded { -webkit-line-clamp: unset; overflow: visible; }

/* Phase 3 (OpenRouter Popularity + Live Health Data): subtle, secondary to
   price/rate - never competing visually with the card's primary stats. */
.eb-or-metrics { display: flex; flex-direction: column; gap: 5px; padding: 6px 0; border-top: 1px dashed var(--eb-border); }
.eb-metrics-row { display: flex; align-items: center; gap: 8px; }
.eb-sparkline-svg { display: block; flex-shrink: 0; }
.eb-sparkline-line { fill: none; stroke: var(--eb-purple, #7c3aed); stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.eb-rank-badge {
  font-size: 10.5px; padding: 2px 7px; border-radius: 5px; font-weight: 700;
  background: #eef2ff; color: #4338ca; white-space: nowrap;
}
.eb-live-health { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* Color-Coded Status Indicators: reuses .eb-mkt-live-dot as-is (currentColor +
   pulse animation, same component as the "Active" badge dot) - only the
   placement (before the number, not after) and color source differ. Kept the
   same font-size/weight as the rest of the card's secondary text so this
   reads as a refined status line, not louder than price/rate. */
.eb-status-metric { display: inline-flex; align-items: center; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.eb-status-metric .eb-mkt-live-dot { margin-left: 0; margin-right: 5px; }
.eb-status-metric-value { color: inherit; }
.eb-status-good { color: #16a34a; }
.eb-status-warn { color: #d97706; }
.eb-status-bad { color: #dc2626; }

.eb-metrics-citation { font-size: 9.5px; color: #9ca3af; font-style: italic; }

/* AI Market Highlights (Artificial Analysis leaderboard) - standalone section,
   general industry data, not cross-referenced against the local catalog. */
.eb-highlights { margin-bottom: 20px; position: relative; }
.eb-hl-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.eb-hl-attribution {
  font-size: 12px; color: var(--eb-muted); text-decoration: none; font-weight: 600;
  border-bottom: 1px dashed var(--eb-border);
}
.eb-hl-attribution:hover { color: #475569; }
.eb-hl-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .eb-hl-grid { grid-template-columns: 1fr; } }
.eb-hl-panel { background: var(--eb-card-bg, #fff); border: 1px solid var(--eb-border); border-radius: 12px; padding: 14px 16px 10px; }
.eb-hl-panel-title { font-size: 13px; font-weight: 700; color: #1e293b; margin-bottom: 14px; }

/* Vertical bar chart: value label on top, bar standing upright, rotated
   model/provider label underneath (reads bottom-to-top, standard chart
   x-axis label convention - keeps 10 categories legible in a narrow panel). */
.eb-hl-chart { display: flex; align-items: flex-end; gap: 5px; }
.eb-hl-bar-item { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.eb-hl-bar-value { font-size: 9px; font-weight: 700; color: #475569; margin-bottom: 4px; white-space: nowrap; }
.eb-hl-bar-track { width: 100%; max-width: 22px; height: 96px; display: flex; align-items: flex-end; }
.eb-hl-bar-fill { width: 100%; min-height: 3px; border-radius: 4px 4px 0 0; background: var(--eb-grad); transition: height 0.3s ease, filter 0.15s ease, transform 0.15s ease; }
.eb-hl-bar-label {
  margin-top: 7px; font-size: 9px; color: var(--eb-muted); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; max-height: 92px; writing-mode: vertical-rl; transform: rotate(180deg);
}

/* Interactive, Colorful Leaderboard Bars task: hover/click feedback, all
   inline within the section (no navigation/modal). Bar color itself is set
   per-bar via inline style (gradient-by-rank, computed in aiMarket.js) -
   these rules only add the interaction states on top of that base color. */
.eb-hl-bar-item { cursor: pointer; outline: none; border-radius: 4px; }
.eb-hl-bar-item:focus-visible { outline: 2px solid var(--eb-blue); outline-offset: 2px; }
.eb-hl-bar-item:hover .eb-hl-bar-fill,
.eb-hl-bar-item.is-pinned .eb-hl-bar-fill {
  filter: brightness(1.18);
  transform: scaleX(1.18);
  transform-origin: bottom center;
}
.eb-hl-bar-item.is-pinned .eb-hl-bar-label,
.eb-hl-bar-item:hover .eb-hl-bar-label { color: #334155; }
@keyframes ebHlBarPulse {
  0% { filter: brightness(2); }
  100% { filter: brightness(1.18); }
}
.eb-hl-bar-item.eb-hl-bar-pulse .eb-hl-bar-fill { animation: ebHlBarPulse 0.5s ease-out; }

.eb-hl-tooltip {
  position: absolute; transform: translate(-50%, calc(-100% - 10px)); pointer-events: none; z-index: 30;
  background: #1e293b; color: #fff; padding: 8px 11px; border-radius: 8px;
  font-size: 11px; line-height: 1.45; white-space: nowrap; box-shadow: 0 10px 24px rgba(15, 23, 42, 0.28);
}
.eb-hl-tooltip::after {
  content: ''; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: #1e293b;
}
.eb-hl-tooltip-rank { font-size: 9.5px; color: #94a3b8; font-weight: 700; letter-spacing: 0.3px; }
.eb-hl-tooltip-model { font-weight: 700; }
.eb-hl-tooltip-provider { color: #cbd5e1; font-size: 10px; }
.eb-hl-tooltip-value { margin-top: 3px; font-weight: 700; color: #93c5fd; }
@media (prefers-reduced-motion: reduce) {
  .eb-hl-bar-item.eb-hl-bar-pulse .eb-hl-bar-fill { animation: none; }
}

/* Active-status pulsing/breathing dot inside the status badge. */
.eb-mkt-live-dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; margin-left: 5px; vertical-align: middle;
  animation: ebPulse 1.6s ease-in-out infinite;
}

/* Card enter/exit (poll-driven appear/disappear) + status-badge transition. */
.eb-mkt-card.eb-card-enter { opacity: 0; transform: translateY(8px) scale(0.98); }
.eb-mkt-card.eb-card-enter-active { opacity: 1; transform: none; transition: opacity 0.35s ease, transform 0.35s ease; }
.eb-mkt-card.eb-card-exit-active { opacity: 0; transform: translateY(-6px) scale(0.98); transition: opacity 0.3s ease, transform 0.3s ease; }
.eb-badge-transition { opacity: 0.35; transition: opacity 0.15s ease; }

@media (prefers-reduced-motion: reduce) {
  .eb-mkt-live-dot, .eb-model-logo.eb-skel { animation: none; }
  .eb-mkt-card.eb-card-enter,
  .eb-mkt-card.eb-card-enter-active,
  .eb-mkt-card.eb-card-exit-active,
  .eb-badge-transition,
  .eb-model-logo-img { transition: none; }
}

/* Responsive: tablet 2-up, mobile 1-up */
@media (max-width: 1024px) { .eb-mkt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .eb-mkt-wrap { padding: 16px 14px; } }
@media (max-width: 640px) { .eb-mkt-grid { grid-template-columns: 1fr; } }

/* =====================================================================
 * Review Center (admin workspace) - Sprint 8-3.2. Tabs, toolbar, pager,
 * wide review drawer, reject modal, runtime preview. Additive (admin only).
 * ===================================================================== */
.eb-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--eb-border); flex-wrap: wrap; }
.eb-tab {
  padding: 10px 16px; font-size: 13.5px; font-weight: 600; color: var(--eb-muted);
  cursor: pointer; background: none; border: none; border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.eb-tab:hover:not(:disabled) { color: var(--eb-text); }
.eb-tab.is-active { color: var(--eb-blue); border-bottom-color: var(--eb-blue); }
.eb-tab.is-placeholder, .eb-tab:disabled { opacity: 0.55; cursor: not-allowed; }
.eb-tab-soon { font-size: 9px; text-transform: uppercase; letter-spacing: 0.4px; background: var(--eb-bg); color: var(--eb-muted); border-radius: 999px; padding: 1px 6px; margin-left: 4px; vertical-align: middle; }

.eb-toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.eb-toolbar input, .eb-toolbar select { border: 1px solid var(--eb-border); border-radius: 9px; padding: 8px 12px; font-size: 13px; background: #fff; color: var(--eb-text); }
.eb-toolbar .eb-search-input { flex: 1; min-width: 220px; }

.eb-pager { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 14px; font-size: 13px; color: var(--eb-muted); }
.eb-pager button[disabled] { opacity: 0.5; cursor: not-allowed; }

/* Wide review drawer + runtime preview chain */
.eb-detail-drawer--wide { width: var(--eb-drawer-wide); }
.eb-rt-note { font-size: 10px; font-weight: 600; color: var(--eb-muted); text-transform: none; letter-spacing: 0; }
.eb-rt-chain { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.eb-rt-step { background: var(--eb-bg); border: 1px solid var(--eb-border); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 600; }
.eb-rt-arrow { color: var(--eb-muted); font-size: 12px; padding-left: 12px; }
.eb-drawer-note { width: 100%; border: 1px solid var(--eb-border); border-radius: 10px; padding: 10px; font-size: 13px; resize: vertical; min-height: 56px; box-sizing: border-box; }
.eb-detail-actions { display: flex; gap: 10px; padding: 0 18px 18px; }

/* Buttons */
.eb-btn-primary { background: var(--eb-grad); color: #fff; border: none; border-radius: 9px; padding: 9px 18px; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: 0 6px 16px rgba(124, 58, 237, 0.22); }
.eb-btn-primary:hover { filter: brightness(1.06); }
.eb-btn-secondary { background: #fff; border: 1px solid var(--eb-border); border-radius: 9px; padding: 9px 18px; font-weight: 600; font-size: 13px; cursor: pointer; color: var(--eb-text); }
.eb-btn-secondary:hover:not([disabled]) { background: var(--eb-bg); }
.eb-btn-danger { background: #dc2626; color: #fff; border: none; border-radius: 9px; padding: 9px 18px; font-weight: 600; font-size: 13px; cursor: pointer; }
.eb-btn-danger:hover { background: #b91c1c; }
.eb-btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 5px; }

/* Reject modal */
.eb-modal-overlay { position: fixed; inset: 0; z-index: 70; background: rgba(2, 6, 23, 0.5); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); display: grid; place-items: center; opacity: 0; visibility: hidden; transition: opacity 0.2s ease, visibility 0.2s ease; }
body.eb-modal-open { overflow: hidden; }
body.eb-modal-open .eb-modal-overlay { opacity: 1; visibility: visible; }
.eb-modal { background: #fff; border-radius: 16px; width: 460px; max-width: 92vw; box-shadow: 0 24px 60px rgba(15, 23, 42, 0.3); padding: 22px; }
.eb-modal h3 { margin: 0 0 14px; font-size: 16px; }
.eb-modal-label { display: block; font-size: 12px; font-weight: 600; color: var(--eb-muted); margin-bottom: 6px; }
.eb-modal textarea { width: 100%; border: 1px solid var(--eb-border); border-radius: 10px; padding: 10px; font-size: 13px; resize: vertical; min-height: 64px; box-sizing: border-box; }
.eb-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.eb-field-err { color: #b42318; font-size: 12px; margin-top: 6px; }
.eb-modal-input { width: 100%; border: 1px solid var(--eb-border); border-radius: 10px; padding: 10px; font-size: 13px; box-sizing: border-box; }

/* Modal form controls — input/select consistency with textarea */
.eb-modal input[type="text"],
.eb-modal input[type="number"],
.eb-modal select {
  width: 100%;
  border: 1px solid var(--eb-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  box-sizing: border-box;
  background: #fff;
  color: var(--eb-text);
  font-family: inherit;
}
.eb-modal select { height: 40px; }
.eb-modal .eb-field { margin-bottom: 10px; }

/* Wider modal variant for edit-grid (create/edit product) */
.eb-modal:has(.eb-edit-grid) { width: 620px; max-height: 80vh; overflow-y: auto; }
.eb-edit-grid .eb-detail-card { padding: 16px; }

/* User Management actions popover (Sprint 8-3.3) */
.eb-actions-btn { padding: 6px 12px; font-size: 12.5px; }
.eb-menu {
  position: absolute; z-index: 80; min-width: 210px; background: #fff;
  border: 1px solid var(--eb-border); border-radius: 12px; box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
  padding: 6px;
}
.eb-menu-item {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 8px 10px; font-size: 13px; color: var(--eb-text); border-radius: 8px; cursor: pointer;
}
.eb-menu-item:hover:not(.is-disabled) { background: var(--eb-bg); }
.eb-menu-item.is-disabled { color: var(--eb-muted); cursor: not-allowed; }
.eb-menu-sep { height: 1px; background: var(--eb-border); margin: 5px 4px; }

/* ---- Mobile drawer controls (hidden on desktop / tablet) ---- */
.eb-menu-btn { display: none; }
.eb-drawer-overlay { display: none; }
.eb-drawer-close { display: none; }

/* ================= Responsive (Step 1E / 1F) ================= */
.eb-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Tablet (<=1024): stack right panel; 2-up grids */
@media (max-width: 1024px) {
  .eb-dash-body { grid-template-columns: 1fr; }
  .eb-pool-grid { grid-template-columns: repeat(2, 1fr); }
  .eb-stat-row { grid-template-columns: repeat(2, 1fr); }
}

/* Narrow tablet (<=980): shrink sidebar a touch, keep labels usable */
@media (max-width: 980px) {
  .eb-dash-grid { grid-template-columns: 212px 1fr; }
  .eb-dash-link { padding: 9px 10px; gap: 9px; }
}

/* Mobile (<=720): sidebar -> horizontal top nav; single column */
@media (max-width: 720px) {
  /* Sidebar becomes an off-canvas left drawer (keeps the dark vertical style) */
  .eb-dash-grid { grid-template-columns: 1fr; }
  .eb-dash-sidebar {
    position: fixed; top: 0; left: 0; height: 100vh; height: 100dvh;
    width: min(300px, 86vw); z-index: 50;
    flex-direction: column; align-items: stretch; overflow-y: auto; overflow-x: hidden;
    transform: translateX(-100%); transition: transform 0.27s ease-out; will-change: transform;
  }
  body.eb-drawer-open .eb-dash-sidebar { transform: translateX(0); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45); }

  .eb-drawer-overlay {
    display: block; position: fixed; inset: 0; z-index: 40;
    background: rgba(0, 0, 0, 0.42);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    opacity: 0; visibility: hidden; transition: opacity 0.27s ease-out;
  }
  body.eb-drawer-open .eb-drawer-overlay { opacity: 1; visibility: visible; }
  body.eb-drawer-open { overflow: hidden; }

  .eb-menu-btn {
    display: grid; place-items: center; order: 0;
    width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--eb-border);
    background: #fff; color: var(--eb-text); font-size: 17px; cursor: pointer; flex-shrink: 0;
    touch-action: manipulation;
  }
  .eb-drawer-close {
    display: grid; place-items: center; position: absolute; top: 12px; right: 12px;
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: rgba(255, 255, 255, 0.1); color: #fff; font-size: 14px; cursor: pointer;
  }

  .eb-dash-topnav { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .eb-dash-search { order: 2; flex-basis: 100%; max-width: none; }
  .eb-dash-topnav-right { order: 1; margin-left: auto; gap: 12px; }
  .eb-top-item:not([data-switch-lang]) { display: none; }
  .eb-top-avatar .a-name, .eb-top-avatar .eb-caret { display: none; }

  .eb-dash-body { padding: 16px 14px; gap: 16px; }
  .eb-hero { flex-direction: column; align-items: flex-start; padding: 26px 22px; min-height: 0; }
  .eb-hero h1 { font-size: 24px; }
  .eb-hero p { font-size: 13.5px; }
  .eb-hero-art { align-self: center; }
  .eb-chip { width: 150px; height: 150px; border-radius: 24px; }
  .eb-chip-core { width: 76px; height: 76px; font-size: 22px; }

  .eb-pool-grid { grid-template-columns: 1fr; }
  .eb-stat-row { grid-template-columns: 1fr; }

  .eb-table.is-dense { min-width: 600px; }   /* scrolls within .eb-table-wrap */

  .eb-dash-footer { padding: 16px 14px; }
  .eb-trustbar { grid-template-columns: 1fr 1fr; gap: 14px; }
}

/* Small phones (<=400): tighten type/spacing */
@media (max-width: 400px) {
  .eb-hero h1 { font-size: 22px; }
  .eb-hero { padding: 22px 18px; }
  .eb-trustbar { grid-template-columns: 1fr; }
  .eb-dash-search { font-size: 12.5px; }
}

/* =====================================================================
 * Legacy order-list styles — used by orders.js (My Deployments page).
 * Minimal styling so order cards render properly within enterprise shell.
 * ===================================================================== */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #eef1f7;
  color: #46506a;
}

.field {
  margin: 5px 0;
  font-size: 13px;
}

.label {
  color: #6b7280;
  font-weight: 600;
}

.product-card {
  background: #fff;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.product-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
/* =====================================================================
 * Auth pages (login / register / change-password) — Phase 1 visual
 * upgrade. Centered card layout, same brand feel as the dashboard.
 * ===================================================================== */

body.eb-body.eb-auth {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f4f6fb 0%, #eef2ff 100%);
  padding: 20px;
}

.eb-auth-wrap {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.eb-auth-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.eb-auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}

.eb-auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, #f4f6fb, #eef2ff);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 20px;
}

.eb-auth-brand-name {
  font-size: 22px;
  font-weight: 700;
  color: #0f172a;
  margin-top: 4px;
}

.eb-auth-brand-sub {
  font-size: 13px;
  color: #6b7280;
}

.eb-auth-card {
  width: 100%;
  background: #fff;
  border: none;
  border-radius: 16px;
  padding: 32px 28px 28px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

.eb-auth-lang-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-content: flex-end;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: none;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
}
.eb-auth-lang-bar:hover { color: #334155; }

.eb-auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.eb-auth-input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1px solid #e3e8f0;
  border-radius: 10px;
  color: #1f2933;
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.eb-auth-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.eb-auth-input::placeholder {
  color: #9aa4b8;
}

.eb-auth-btn {
  width: 100%;
  padding: 12px;
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.28);
  transition: filter 0.16s ease, transform 0.16s ease;
}

.eb-auth-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.eb-auth-btn:active {
  transform: translateY(0);
}

.eb-auth-error {
  color: #b42318;
  font-size: 13px;
  min-height: 1.2em;
  text-align: center;
}

.eb-auth-success {
  color: #15803d;
  font-size: 13px;
  min-height: 1.2em;
  text-align: center;
}

.eb-auth-footer {
  text-align: center;
  font-size: 13px;
  color: #6b7280;
  margin-top: 6px;
}

.eb-auth-footer a {
  color: #1f4ed8;
  font-weight: 600;
  text-decoration: none;
}

.eb-auth-footer a:hover {
  text-decoration: underline;
}

.eb-auth-desc {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 4px;
  line-height: 1.45;
}

@media (max-width: 480px) {
  body.eb-body.eb-auth {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .eb-auth-card {
    padding: 24px 20px 22px;
  }
}

/* =====================================================================
 * Token Consumption Display (Phase 8-4.2X) — AI task token tracking UI.
 * Used by orders.js for running/completed deploy orders.
 * ===================================================================== */

/* Compact token strip (shown on order card) */
.eb-token-area { margin-top: 12px; border-top: 1px solid var(--eb-border); padding-top: 10px; }
.eb-token-strip-container { min-height: 18px; }

.eb-token-strip {
  display: flex; flex-direction: column; gap: 6px;
}

.eb-token-progress-wrap {
  display: flex; align-items: center; gap: 10px;
}

.eb-token-bar-bg {
  flex: 1; height: 8px; border-radius: 999px;
  background: #eef1f7; overflow: hidden;
}

.eb-token-bar-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b, #ef4444);
  transition: width 0.3s ease;
}

.eb-token-pct {
  font-size: 12px; font-weight: 700; color: var(--eb-muted);
  min-width: 32px; text-align: right;
}

.eb-token-metrics {
  display: flex; align-items: center; gap: 14px;
  font-size: 12.5px;
}

.eb-token-total { font-weight: 600; color: var(--eb-text); }

.eb-token-chips {
  display: flex; flex-wrap: wrap; gap: 5px;
}

.eb-token-chip {
  font-size: 10.5px; padding: 2px 8px; border-radius: 6px;
  background: #f3f4f6; color: var(--eb-muted); white-space: nowrap;
}

/* Toggle button */
.eb-token-toggle {
  background: none; border: 1px solid var(--eb-border);
  border-radius: 8px; padding: 6px 12px; font-size: 12px;
  color: var(--eb-blue); cursor: pointer; margin-top: 6px;
  font-weight: 600;
}

.eb-token-toggle:hover { background: #eef2ff; }

/* Detail panel (collapsible) */
.eb-token-detail-container { margin-top: 8px; }

/* Summary stat cards row */
.eb-token-detail-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  margin-bottom: 16px;
}

.eb-token-stat-card {
  background: var(--eb-bg); border: 1px solid var(--eb-border);
  border-radius: 10px; padding: 12px; text-align: center;
}

.eb-token-stat-value {
  font-size: 20px; font-weight: 700; color: var(--eb-text);
}

.eb-token-stat-label {
  font-size: 11px; color: var(--eb-muted); margin-top: 4px;
}

/* Breakdown by type */
.eb-token-breakdown-title {
  font-size: 13px; font-weight: 600; color: var(--eb-text);
  margin: 12px 0 8px;
}

.eb-token-breakdown { display: flex; flex-direction: column; gap: 8px; }

.eb-token-breakdown-row {
  display: grid; grid-template-columns: 1fr 120px 140px;
  align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--eb-border); font-size: 12.5px;
}

.eb-token-row-label {
  display: flex; align-items: center; gap: 6px; font-weight: 600;
}

.eb-token-type-icon { color: var(--eb-purple); }

.eb-token-bar-sm-bg {
  height: 6px; border-radius: 999px; background: #eef1f7; overflow: hidden;
}

.eb-token-bar-sm-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--eb-blue), var(--eb-purple));
  transition: width 0.3s ease;
}

.eb-token-row-stats {
  display: flex; justify-content: space-between; font-size: 12px;
}

.eb-token-amount { font-weight: 600; color: var(--eb-muted); }

/* Task list */
.eb-task-list {
  display: flex; flex-direction: column; gap: 4px;
  max-height: 360px; overflow-y: auto;
}

.eb-task-row {
  display: grid; grid-template-columns: 20px 1fr 100px 80px;
  align-items: center; gap: 8px; padding: 5px 8px;
  border-radius: 6px; font-size: 12px;
}

.eb-task-row:nth-child(odd) { background: #fafbfe; }

.eb-task-status { font-size: 14px; text-align: center; }
.eb-task-done { color: #15803d; }
.eb-task-run { color: #2563eb; animation: ebPulse 1.5s ease-in-out infinite; }
.eb-task-wait { color: #d1d5db; }

.eb-task-label { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.eb-task-tokens { text-align: right; font-weight: 600; color: var(--eb-muted); }
.eb-task-status-label { text-align: right; font-size: 11px; color: var(--eb-muted); }

/* Responsive */
@media (max-width: 720px) {
  .eb-token-detail-summary { grid-template-columns: 1fr; }
  .eb-token-breakdown-row { grid-template-columns: 1fr 80px 100px; }
  .eb-task-row { grid-template-columns: 18px 1fr 70px 60px; }
}

/* =====================================================================
 * Utility classes — spacing, typography, form elements.
 * Used to reduce inline styles across enterprise pages.
 * ===================================================================== */

/* Spacing */
.eb-mt-sm { margin-top: 8px !important; }
.eb-mt-md { margin-top: 16px !important; }
.eb-mt-lg { margin-top: 24px !important; }
.eb-mt-0 { margin-top: 0 !important; }
.eb-mb-sm { margin-bottom: 8px !important; }
.eb-mb-md { margin-bottom: 16px !important; }
.eb-mb-lg { margin-bottom: 24px !important; }
.eb-mb-0 { margin-bottom: 0 !important; }

/* Typography */
.eb-text-center { text-align: center !important; }
.eb-text-left { text-align: left !important; }
.eb-text-right { text-align: right !important; }
.eb-text-muted { color: var(--eb-muted) !important; }
.eb-font-semibold { font-weight: 600 !important; }

/* Consistent form input (replaces raw <input> in wallet forms) */
.eb-input {
  display: block;
  width: 100%;
  padding: 10px 12px;
  font-size: 14px;
  border: 1px solid var(--eb-border);
  border-radius: 10px;
  color: var(--eb-text);
  background: #fff;
  box-sizing: border-box;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.eb-input:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}
.eb-input::placeholder { color: #9aa4b8; }
.eb-input[readonly] { background: #f5f5f5; cursor: default; }
select.eb-input { cursor: pointer; }

/* Form actions row */
.eb-form-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

/* Form layout inside drawers (admin-tiers etc.) */
.eb-form { padding: 24px; }
.eb-form h3 { margin: 0 0 16px; font-size: 16px; }
.eb-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--eb-muted);
  margin-bottom: 6px;
}
.eb-form input + label { margin-top: 12px; }
.eb-form input[type="text"],
.eb-form input[type="number"],
.eb-form textarea {
  width: 100%;
  border: 1px solid var(--eb-border);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
  box-sizing: border-box;
  color: var(--eb-text);
  font-family: inherit;
}
.eb-form input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

/* AI Catalog: OpenRouter import search/results (admin-ai-catalog.html) */
.eb-or-results-wrap { margin-top: 10px; }
.eb-or-results { max-height: 260px; overflow-y: auto; border: 1px solid var(--eb-border); border-radius: 10px; }
.eb-or-result-row {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--eb-border);
  transition: background-color 0.12s ease;
}
.eb-or-result-row:last-child { border-bottom: none; }
.eb-or-result-row:hover { background: #f8fafc; }
.eb-or-result-row.is-selected { background: #ede9fe; }
.eb-or-result-name { font-size: 13px; font-weight: 600; }
.eb-or-result-sub { font-size: 11.5px; color: var(--eb-muted); margin-top: 2px; }

/* Empty table state */
.eb-table-empty td {
  padding: 32px 16px;
  text-align: center;
  color: var(--eb-muted);
  font-size: 13px;
}

/* Common variant: left-aligned section subtitle (replaces style="text-align:left;margin-top:4px") */
.eb-mkt-sub-left { text-align: left; margin-top: 4px; }

/* Inline form labels within cards */
.eb-card label.eb-label,
.eb-card .eb-label { font-size: 12px; color: var(--eb-muted); margin-bottom: 4px; }

/* =====================================================================
 * Extended utility classes — fills common gap values between sm(8)/md(16)/lg(24).
 * Target: eliminate inline style="" for margin/padding across all pages.
 * ===================================================================== */

/* Margin-top extended */
.eb-mt-12 { margin-top: 12px !important; }
.eb-mt-18 { margin-top: 18px !important; }
.eb-mt-22 { margin-top: 22px !important; }
.eb-mt-10 { margin-top: 10px !important; }

/* Margin-bottom extended */
.eb-mb-12 { margin-bottom: 12px !important; }
.eb-mb-20 { margin-bottom: 20px !important; }
.eb-mb-10 { margin-bottom: 10px !important; }

/* Margin top+bottom (shorthand) */
.eb-my-12 { margin-top: 12px !important; margin-bottom: 12px !important; }

/* Padding reset */
.eb-p-0 { padding: 0 !important; }
.eb-p-0-i { padding: 0 !important; }
.eb-p-20 { padding: 20px !important; }

/* Flex row helpers — replaces common display:flex;gap:...;margin-bottom:... patterns */
.eb-flex-row { display: flex !important; align-items: center; gap: 8px; }
.eb-flex-row-gap6 { display: flex !important; align-items: center; gap: 6px; }
.eb-flex-row-gap10 { display: flex !important; align-items: center; gap: 10px; }
.eb-flex-1 { flex: 1 !important; }

/* Loading skeleton state — replaces style="padding:20px;text-align:center;color:var(--eb-muted)" */
.eb-loading-state {
  padding: 20px;
  text-align: center;
  color: var(--eb-muted);
}

/* List reset — replaces style="list-style:none;padding:0;margin:0" */
.eb-list-reset { list-style: none; padding: 0; margin: 0; }

/* Card with top margin — common pattern eb-card + mt */
.eb-card.eb-mt-12 { margin-top: 12px; }
.eb-card.eb-mt-16,
.eb-card.eb-mt-md { margin-top: 16px; }

/* Dashboard two-column layout — replaces inline grid on admin-dashboard */
.eb-dash-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }

/* Dashboard inner 2-col grid for financial / pending items */
.eb-dash-inner-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

/* Mini info card used inside dashboard cards */
.eb-info-card { background: #f9fafb; border-radius: 8px; padding: 12px; }
.eb-info-card .eb-info-label { font-size: 12px; color: #6b7280; }
.eb-info-card .eb-info-value { font-size: 18px; font-weight: 600; margin-top: 4px; }

/* =====================================================================
 * Toast notification system — positioned top-right, auto-dismiss.
 * ===================================================================== */
#eb-toast-container {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

/* =====================================================================
 * Loading overlay — fullscreen spinner with backdrop.
 * ===================================================================== */
#eb-loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99998;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(2px);
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.eb-loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 24px 32px;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.eb-spinner-ring {
  width: 36px;
  height: 36px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--eb-blue);
  border-radius: 50%;
  animation: eb-spin 0.7s linear infinite;
}

.eb-spinner-text {
  font-size: 14px;
  color: var(--eb-muted);
}

@keyframes eb-spin {
  to { transform: rotate(360deg); }
}

/* =====================================================================
 * Responsive — mobile/tablet overrides for old agent/product pages.
 * ===================================================================== */
@media (max-width: 768px) {
  /* Sidebar collapses */
  .eb-sidebar { width: 100%; flex-direction: row; overflow-x: auto; }
  .eb-nav { flex-direction: row; }
  .eb-nav-link { white-space: nowrap; border-left: none; border-bottom: 3px solid transparent; }
  .eb-nav-link.is-active { border-bottom-color: #fff; }
  .eb-main { width: 100%; }
  .eb-grid { grid-template-columns: 1fr; }
  .eb-content { padding: 12px; }
  .eb-dash-grid { grid-template-columns: 1fr; }
  .eb-dash-main { margin-left: 0; width: 100%; }
  .eb-dash-cols { grid-template-columns: 1fr; }
  .eb-edit-grid { grid-template-columns: 1fr; }
  .eb-stat-row { flex-direction: column; gap: 8px; }
  .eb-toolbar { flex-direction: column; }
  .eb-table-wrap { overflow-x: auto; }
  .eb-table { font-size: 12px; }
  .eb-dash-topnav-right .eb-top-avatar .a-name { display: none; }
  .eb-modal { width: 95vw !important; max-height: 85vh !important; margin: 0 auto; }
  .eb-detail-drawer { width: 100vw !important; }
  .eb-sec-head { flex-direction: column; align-items: flex-start; gap: 8px; }

  /* Override inline max-width on old shell pages so cards/grids fill the screen */
  .eb-shell .eb-grid,
  .eb-shell .eb-card {
    max-width: none !important;
  }

  /* Admin review list items — stack label + buttons cleanly */
  .eb-card li {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 10px 0;
    border-bottom: 1px solid var(--eb-border);
    align-items: center;
  }
  .eb-card li:last-child { border-bottom: none; }
  .eb-card li > span { flex: 1 1 100%; }

  /* KYC form / old shell inputs full width */
  .eb-shell input[type="text"],
  .eb-shell input[type="number"],
  .eb-shell input[type="tel"] {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .eb-auth-card { width: 92vw; padding: 20px; }
  .eb-auth-brand { margin-bottom: 20px; }
  .eb-auth-brand-name { font-size: 22px; }
  .eb-dash-grid { grid-template-columns: 1fr; }
  .eb-table { font-size: 11px; }
  .eb-table th, .eb-table td { padding: 6px 4px; }

  /* Tighter spacing on old shell pages */
  .eb-shell .eb-topbar {
    padding: 0 12px;
  }
  .eb-shell .eb-topbar-title {
    font-size: 14px;
  }
  .eb-shell .eb-content {
    padding: 10px;
  }
  .product-card {
    padding: 12px;
  }
}

/* ── Form field validation states ── */
.eb-auth-input.is-error {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
}
.eb-auth-input.is-valid {
  border-color: #10b981 !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12) !important;
}
.eb-field-error {
  display: block;
  color: #ef4444;
  font-size: 12px;
  line-height: 1.35;
  min-height: 1.35em;
  margin-top: 2px;
}

/* ── Breadcrumb navigation ── */
#eb-breadcrumb {
  margin-bottom: 8px;
}
.eb-breadcrumb {
  display: flex;
  align-items: center;
}
.eb-breadcrumb ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}
.eb-breadcrumb li {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #6b7280;
}
.eb-breadcrumb li + li::before {
  content: "›";
  margin-right: 4px;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 600;
}
.eb-breadcrumb-link {
  color: #1f4ed8;
  text-decoration: none;
}
.eb-breadcrumb-link:hover {
  text-decoration: underline;
}
.eb-breadcrumb-current {
  color: #374151;
  font-weight: 500;
}
