@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand-deep-teal: #0e4d4f;
  --brand-teal: #157a7d;
  --brand-mint: #7ee2c6;
  --brand-lime: #b7f15a;
  --brand-lime-hover: #a5e048;
  --brand-dark-ink: #1a1f23;
  --brand-slate-dark: #111619;
  --brand-off-white: #f8fafc;
  --trade-gold: #b45309;
  --trade-amber: #d97706;
  --trade-gold-bg: #fffbeb;
  --trade-gold-border: #fde68a;
  --border-subtle: #e2e8f0;
  --text-main: #1a1f23;
  --text-muted: #475569;
  --emerald: #059669;
  --rose: #dc2626;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Prompt", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background-color: #ffffff;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

.tabular {
  font-variant-numeric: tabular-nums;
  font-family: "Inter", "Prompt", monospace;
}

.hidden {
  display: none !important;
}

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

a {
  color: inherit;
  text-decoration: none;
}

.text-emerald { color: #10b981; }
.text-teal { color: var(--brand-teal); }
.text-amber { color: var(--trade-amber); }
.text-rose { color: var(--rose); }
.pnl-pos { color: var(--emerald); font-weight: 700; }
.pnl-neg { color: var(--rose); font-weight: 700; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(21, 122, 125, 0.12);
  padding-top: env(safe-area-inset-top, 0px);
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(0px, env(safe-area-inset-top, 0px), 18px));
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

/* iOS Installed PWA Standalone: crisp opaque top safe-area behind Dynamic Island / Status Bar (no Liquid Glass double-blur) */
@supports (-webkit-touch-callout: none) {
  @media (display-mode: standalone) {
    .site-header {
      background: #ffffff;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
    }
  }
}

body.is-ios-pwa .site-header {
  background: #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header .container {
  max-width: 1400px;
}

.header-inner {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: var(--brand-deep-teal);
  color: #ffffff;
  font-weight: 800;
  font-size: 1.18rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.18);
}

.brand-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-title {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.03em;
  color: var(--brand-dark-ink);
  white-space: nowrap;
}

.brand-sub-pill {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
  border: 1px solid rgba(21, 122, 125, 0.2);
  white-space: nowrap;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #334155;
}

.desktop-nav a {
  white-space: nowrap;
}

.desktop-nav a:hover {
  color: var(--brand-teal);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-shrink: 0;
}

.lang-btn {
  padding: 0.42rem 0.75rem;
  border-radius: 9px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--brand-dark-ink);
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn:hover {
  border-color: var(--brand-teal);
  background: rgba(21, 122, 125, 0.06);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-header {
  padding: 0.56rem 1.08rem;
  font-size: 0.86rem;
  background: var(--brand-deep-teal);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.18);
  white-space: nowrap;
}

.btn-header:hover {
  background: var(--brand-teal);
}

.btn-primary-lime {
  padding: 0.92rem 1.75rem;
  font-size: 1rem;
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  box-shadow: 0 10px 24px rgba(183, 241, 90, 0.32);
}

.btn-primary-lime:hover {
  background: var(--brand-lime-hover);
  transform: translateY(-1px);
}

.btn-secondary-outline {
  padding: 0.9rem 1.55rem;
  font-size: 0.98rem;
  background: #ffffff;
  color: var(--brand-dark-ink);
  border: 1px solid var(--border-subtle);
}

.btn-secondary-outline:hover {
  border-color: var(--brand-teal);
  background: var(--brand-off-white);
}

.btn-sm-dl {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem;
}

.mobile-menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: 9px;
  padding: 0.45rem 0.65rem;
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-drawer {
  display: none;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  padding: 1rem 1.5rem 1.35rem;
}

.mobile-drawer.open {
  display: block;
}

.mobile-drawer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

/* Hero */
.hero-section {
  padding: 4.25rem 0 3.75rem;
  background: radial-gradient(circle at 85% 20%, rgba(21, 122, 125, 0.09), transparent 45%),
              radial-gradient(circle at 12% 82%, rgba(217, 119, 6, 0.06), transparent 42%),
              #ffffff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.9rem;
  border-radius: 999px;
  background: var(--trade-gold-bg);
  border: 1px solid var(--trade-gold-border);
  color: var(--trade-gold);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
}

.eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--trade-amber);
}

.hero-title {
  font-size: clamp(2rem, 3.6vw, 3.05rem);
  line-height: 1.2;
  font-weight: 800;
  color: var(--brand-dark-ink);
  margin-bottom: 1.15rem;
  letter-spacing: -0.02em;
}

.hero-title span {
  display: block;
}

.hero-title .accent-teal {
  color: var(--brand-teal);
}

.hero-desc {
  font-size: 1.06rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 1.85rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 1.85rem;
}

.hero-trust-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
}

.trust-pill-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.check-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(21, 122, 125, 0.14);
  color: var(--brand-deep-teal);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
}

/* Console Card */
.console-card {
  background: var(--brand-slate-dark);
  color: #f8fafc;
  border-radius: 24px;
  border: 1px solid rgba(126, 226, 198, 0.22);
  box-shadow: 0 24px 50px rgba(14, 77, 79, 0.16);
  overflow: hidden;
}

.console-topbar {
  padding: 1rem 1.35rem;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.console-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.console-mascot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #ffffff;
  padding: 3px;
  object-fit: contain;
}

.console-title {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e2e8f0;
}

.console-sub {
  font-size: 0.73rem;
  color: #94a3b8;
}

.status-armed {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #6ee7b7;
  font-size: 0.73rem;
  font-weight: 700;
}

.pulse-green {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.console-body {
  padding: 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-bot-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.mini-bot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.mini-bot-row:hover {
  border-color: rgba(183, 241, 90, 0.45);
  background: rgba(255, 255, 255, 0.07);
}

.mini-bot-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: #f8fafc;
}

.mini-bot-meta {
  font-size: 0.75rem;
  color: #94a3b8;
}

.mini-bot-stat {
  font-size: 0.85rem;
  font-weight: 700;
  text-align: right;
}

.console-shield-note {
  font-size: 0.8rem;
  color: #cbd5e1;
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  background: rgba(21, 122, 125, 0.22);
  border: 1px solid rgba(126, 226, 198, 0.22);
}

/* Generic Sections */
.section {
  padding: 4.75rem 0;
}

.section-alt {
  background: var(--brand-off-white);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-head {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 2.75rem;
}

.section-tag {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--brand-teal);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: clamp(1.65rem, 2.8vw, 2.3rem);
  font-weight: 800;
  color: var(--brand-dark-ink);
  line-height: 1.28;
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.02rem;
  color: var(--text-muted);
}

/* 3 Steps */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.step-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.85rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.03);
}

.step-num {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.1rem;
}

.step-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.step-text {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* 4 Master EAs Showcase Grid */
.bots-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.bot-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.bot-card:hover {
  transform: translateY(-2px);
  border-color: rgba(21, 122, 125, 0.4);
}

.bot-shot-wrap {
  position: relative;
  height: 235px;
  background: #0b0f12;
  overflow: hidden;
  cursor: zoom-in;
  border-bottom: 1px solid var(--border-subtle);
}

.bot-shot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  transition: transform 0.3s ease;
}

.bot-shot-wrap:hover img {
  transform: scale(1.03);
}

.shot-zoom-hint {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #f8fafc;
  font-size: 0.74rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.bot-card-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.72rem 1.25rem;
  background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 100%);
  border-bottom: 1px solid rgba(183, 241, 90, 0.25);
}

.bot-card-sym-tag {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #d9f99d;
  white-space: nowrap;
}

.bot-live-pill {
  position: static;
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.bot-live-pill.online {
  background: rgba(5, 150, 105, 0.92);
  color: #ffffff;
}

.bot-live-pill.seed {
  background: rgba(15, 23, 42, 0.85);
  color: #fde68a;
  border: 1px solid rgba(253, 230, 138, 0.4);
}

.bot-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 0.9rem;
}

.bot-style-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.22rem 0.68rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
}

.bot-card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
}

.bot-card-summary {
  font-size: 0.93rem;
  color: var(--text-muted);
}

.bot-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  font-size: 0.88rem;
  color: #334155;
}

.bot-highlights li::before {
  content: "✓ ";
  color: var(--brand-teal);
  font-weight: 800;
}

.bot-mini-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  padding: 0.8rem;
  border-radius: 14px;
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  margin-top: auto;
}

.bot-mm-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bot-mm-val {
  font-size: 0.92rem;
  font-weight: 800;
}

.bot-card-actions {
  display: flex;
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.btn-bot-inspect {
  flex: 1;
  padding: 0.68rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--brand-deep-teal);
  color: #ffffff;
  border: none;
  cursor: pointer;
}

.btn-bot-inspect:hover {
  background: var(--brand-teal);
}

.btn-bot-try {
  padding: 0.68rem 1rem;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.88rem;
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  border: none;
  cursor: pointer;
}

/* Live Stats Explorer */
.stats-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
}

.stats-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stats-tab {
  padding: 0.6rem 1.05rem;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
}

.stats-tab:hover {
  border-color: var(--brand-teal);
}

.stats-tab.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-color: var(--brand-deep-teal);
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.2);
}

.stats-status-wrap {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.source-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
}

.source-live {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.source-preview {
  background: var(--trade-gold-bg);
  color: var(--trade-gold);
  border: 1px solid var(--trade-gold-border);
}

.btn-refresh {
  padding: 0.42rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-refresh:hover {
  border-color: var(--brand-teal);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.9rem;
  margin-bottom: 1.35rem;
}

.kpi-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1rem 1.05rem;
}

.kpi-label {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.kpi-val {
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
}

.kpi-val-sm {
  font-size: 0.92rem;
  line-height: 1.35;
}

.kpi-sub {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 0.2rem;
}

.panel-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.45rem;
  margin-bottom: 1.35rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-title {
  font-size: 1.08rem;
  font-weight: 800;
}

.panel-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 0.75rem;
}

.cal-cell {
  border-radius: 14px;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border-subtle);
  background: var(--brand-off-white);
}

.cal-cell.cal-win {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.3);
}

.cal-cell.cal-loss {
  background: rgba(220, 38, 38, 0.07);
  border-color: rgba(220, 38, 38, 0.26);
}

.cal-date {
  font-size: 0.76rem;
  font-weight: 700;
  color: #475569;
  margin-bottom: 0.25rem;
}

.cal-pnl {
  font-size: 1.12rem;
  font-weight: 800;
}

.cal-dd {
  font-size: 0.76rem;
  color: var(--trade-gold);
  font-weight: 600;
  margin-top: 0.2rem;
}

.tables-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.count-pill {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
}

.table-scroll {
  overflow-x: auto;
}

.trade-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.trade-table th {
  text-align: left;
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--border-subtle);
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

.trade-table td {
  padding: 0.62rem 0.55rem;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
}

.side-pill {
  display: inline-block;
  padding: 0.12rem 0.48rem;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 800;
}

.side-buy {
  background: rgba(16, 185, 129, 0.15);
  color: #047857;
}

.side-sell {
  background: rgba(220, 38, 38, 0.13);
  color: #b91c1c;
}

/* Demo Trial Section */
.demo-trial-banner {
  background: linear-gradient(135deg, #0d3f41 0%, #11181c 100%);
  color: #f8fafc;
  border-radius: 28px;
  padding: 2.75rem;
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 2.5rem;
  align-items: center;
  box-shadow: 0 24px 55px rgba(14, 77, 79, 0.2);
}

.demo-title {
  font-size: clamp(1.6rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.demo-desc {
  color: #cbd5e1;
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.demo-check-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: #e2e8f0;
  margin-bottom: 1.5rem;
}

.demo-right-card {
  background: #ffffff;
  color: var(--brand-dark-ink);
  border-radius: 22px;
  padding: 1.75rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.22);
}

.form-card-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.field-label {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 0.35rem;
}

.field-input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.94rem;
  margin-bottom: 0.9rem;
  background: #ffffff;
  color: var(--brand-dark-ink);
}

.field-input:focus {
  outline: none;
  border-color: var(--brand-teal);
  box-shadow: 0 0 0 3px rgba(21, 122, 125, 0.14);
}

.form-error {
  color: var(--rose);
  font-size: 0.85rem;
  margin-top: 0.55rem;
  font-weight: 600;
}

.form-feedback {
  font-size: 0.88rem;
  margin-top: 0.65rem;
  font-weight: 700;
  color: var(--emerald);
}

.result-ok-pill {
  padding: 0.5rem 0.85rem;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 0.84rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.key-display-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: #0f172a;
  color: var(--brand-lime);
}

.issued-key {
  flex: 1;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.btn-copy-key {
  padding: 0.38rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  font-weight: 800;
  font-size: 0.8rem;
  cursor: pointer;
}

.key-meta-line {
  font-size: 0.8rem;
  color: #475569;
  margin-top: 0.45rem;
}

.setup-mini-guide {
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 0.9rem 1rem;
  font-size: 0.82rem;
  color: #334155;
}

.setup-mini-title {
  font-weight: 800;
  margin-bottom: 0.35rem;
}

.setup-mini-guide ol {
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.inline-url {
  background: #e2e8f0;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-family: monospace;
  font-weight: 700;
}

/* Guardrails + Calculator */
.calc-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 1.5rem;
  align-items: start;
}

.guardrails-list-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.55rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.guard-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
}

.guard-icon {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(21, 122, 125, 0.12);
  color: var(--brand-deep-teal);
  font-weight: 800;
  font-size: 0.84rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.guard-item strong {
  display: block;
  font-size: 0.94rem;
}

.guard-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.calc-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.calc-output-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.15rem;
}

.calc-metric {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
}

.calc-m-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.calc-m-val {
  font-size: 1.05rem;
  font-weight: 800;
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
}

.plan-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 1.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.plan-card.featured {
  border: 2px solid var(--brand-teal);
  box-shadow: 0 18px 38px rgba(14, 77, 79, 0.12);
  position: relative;
}

.plan-badge {
  align-self: flex-start;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
}

.plan-card.featured .plan-badge {
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
}

.plan-name {
  font-size: 1.2rem;
  font-weight: 800;
}

.plan-price {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--brand-deep-teal);
}

.plan-summary {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: #334155;
  margin-bottom: 0.5rem;
  flex: 1;
}

.plan-features li::before {
  content: "✓ ";
  color: var(--brand-teal);
  font-weight: 800;
}

/* Waitlist / Paid Upgrade Box */
.waitlist-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 24px;
  padding: 2.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.waitlist-box .demo-desc {
  color: var(--text-muted);
}

/* FAQ & Disclaimer */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.faq-card {
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.4rem;
}

.faq-card h3 {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.faq-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.risk-disclaimer {
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  font-size: 0.83rem;
  color: #78350f;
}

/* Lightbox Modal */
.img-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.5rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
}

.img-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.82);
  backdrop-filter: blur(4px);
}

.img-modal-content {
  position: relative;
  max-width: 1020px;
  width: 100%;
  background: #0f172a;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  z-index: 2;
}

.img-modal-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.1rem;
  color: #f8fafc;
  font-weight: 700;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.img-modal-close {
  background: transparent;
  border: none;
  color: #f8fafc;
  font-size: 1.15rem;
  cursor: pointer;
}

.img-modal-content img {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
  display: block;
}

/* Footer */
.site-footer {
  background: var(--brand-slate-dark);
  color: #cbd5e1;
  padding: 2.75rem 0;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-copy {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-top: 0.5rem;
  max-width: 460px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: var(--brand-lime);
}

/* Responsive */
@media (max-width: 1380px) {
  .site-header:not(.admin-header):not(.client-header) .brand-sub-pill {
    display: none;
  }
}

@media (max-width: 1120px) {
  .desktop-nav {
    display: none;
  }
  .mobile-menu-toggle {
    display: inline-flex;
  }
  .kpi-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .pricing-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-grid,
  .steps-grid,
  .bots-showcase-grid,
  .tables-two-col,
  .demo-trial-banner,
  .calc-grid,
  .waitlist-box,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kpi-grid,
  .pricing-grid,
  .calc-row-2 {
    grid-template-columns: 1fr;
  }
  .demo-trial-banner {
    padding: 1.5rem;
  }
}


/* ==========================================================================
   Zero-Install Cloud Copier Customer Portal & Account Cards
   ========================================================================== */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  background: var(--brand-off-white);
  padding: 0.32rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  margin-bottom: 1.15rem;
}

.trade-sso-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.24rem 0.72rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
  margin-bottom: 0.75rem;
}

.btn-trade-google {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 0.74rem 1rem;
  border-radius: 12px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}

.btn-trade-google:hover {
  background: #f8fafc;
  border-color: var(--brand-deep-teal);
  transform: translateY(-1px);
}

.trade-sso-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.9rem 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
}

.trade-sso-divider::before,
.trade-sso-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.auth-tab {
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.18s ease;
}

.auth-tab.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.2);
}

.manual-ea-note {
  margin-top: 0.5rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.82rem;
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  align-items: center;
}

.manual-ea-link {
  color: var(--brand-lime);
  font-weight: 700;
  text-decoration: underline;
}

.portal-dashboard {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.portal-user-bar {
  background: linear-gradient(135deg, #0e4d4f 0%, #11181c 100%);
  color: #f8fafc;
  border-radius: 22px;
  padding: 1.3rem 1.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  box-shadow: 0 16px 36px rgba(14, 77, 79, 0.16);
}

.portal-user-info {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.portal-avatar {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  font-weight: 800;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.portal-user-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.08rem;
}

.portal-plan-pill {
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(183, 241, 90, 0.2);
  border: 1px solid rgba(183, 241, 90, 0.5);
  color: var(--brand-lime);
}

.portal-user-meta {
  font-size: 0.83rem;
  color: #cbd5e1;
  margin-top: 0.15rem;
}

.portal-user-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.portal-workspace-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1.5rem;
  align-items: start;
}

.portal-bind-card {
  margin-bottom: 0;
}

.vault-security-note {
  font-size: 0.78rem;
  color: #047857;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.28);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  margin-top: -0.4rem;
  margin-bottom: 0.9rem;
  font-weight: 600;
}

.capital-hint-box {
  font-size: 0.8rem;
  color: #78350f;
  background: var(--trade-gold-bg);
  border: 1px solid var(--trade-gold-border);
  padding: 0.65rem 0.85rem;
  border-radius: 11px;
  margin-top: -0.35rem;
  margin-bottom: 0.95rem;
  line-height: 1.5;
}

.bound-accounts-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-ports-box {
  background: var(--brand-off-white);
  border: 2px dashed #cbd5e1;
  border-radius: 20px;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
}

.bound-acc-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.35rem;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.bound-acc-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bound-acc-name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
}

.bound-acc-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.12rem;
}

.wstatus-pill {
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  white-space: nowrap;
}

.wstatus-live {
  background: rgba(16, 185, 129, 0.14);
  color: #047857;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.wstatus-wait {
  background: var(--trade-gold-bg);
  color: var(--trade-gold);
  border: 1px solid var(--trade-gold-border);
}

.wstatus-paused {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.wstatus-blocked {
  background: rgba(220, 38, 38, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.28);
}

.bound-status-msg {
  font-size: 0.84rem;
  padding: 0.62rem 0.85rem;
  border-radius: 12px;
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  color: #334155;
}

.bound-status-msg.msg-blocked {
  background: rgba(220, 38, 38, 0.06);
  border-color: rgba(220, 38, 38, 0.24);
  color: #991b1b;
  font-weight: 600;
}

.bound-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
}

.bound-m-box {
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 0.62rem 0.75rem;
}

.bound-m-label {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.bound-m-val {
  font-size: 0.95rem;
  font-weight: 800;
  margin-top: 0.1rem;
}

.bound-controls-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid #f1f5f9;
}

.bound-bot-switcher {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: 1;
  min-width: 210px;
}

.bound-bot-select {
  flex: 1;
  padding: 0.48rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  background: #ffffff;
}

.bound-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn-port-toggle {
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  border: 1px solid var(--brand-teal);
  background: rgba(21, 122, 125, 0.08);
  color: var(--brand-deep-teal);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-port-toggle:hover {
  background: var(--brand-deep-teal);
  color: #ffffff;
}

.btn-harvest-close {
  grid-column: 1 / -1;
  width: 100%;
  padding: 0.56rem 0.9rem;
  border-radius: 11px;
  border: 1px solid rgba(5, 150, 105, 0.45);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.22);
  transition: transform 0.12s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.btn-harvest-close:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.32);
}

.btn-harvest-close:disabled {
  opacity: 0.65;
  cursor: wait;
}

.btn-panic-close {
  padding: 0.48rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(220, 38, 38, 0.4);
  background: #dc2626;
  color: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-panic-close:hover {
  background: #b91c1c;
}

.btn-port-unlink {
  padding: 0.48rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #64748b;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-port-unlink:hover {
  border-color: #dc2626;
  color: #dc2626;
}

@media (max-width: 960px) {
  .portal-workspace-grid {
    grid-template-columns: 1fr;
  }
  .bound-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================================================== */
/* Top Header Login / Logout Buttons & 3-Mode Payment Hub                     */
/* ========================================================================== */

.btn-header-outline {
  padding: 0.54rem 0.98rem;
  font-size: 0.86rem;
  background: #ffffff;
  color: var(--brand-deep-teal);
  border: 1.5px solid rgba(14, 77, 79, 0.35);
  white-space: nowrap;
}

.btn-header-outline:hover {
  border-color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.08);
}

.btn-header-logout {
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #64748b;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-header-logout:hover {
  border-color: var(--rose);
  color: var(--rose);
}

.mobile-drawer-btns {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.billing-alert-banner {
  padding: 1rem 1.35rem;
  border-radius: 16px;
  margin-bottom: 1.35rem;
  font-weight: 700;
  font-size: 0.96rem;
  border: 1px solid rgba(16, 185, 129, 0.38);
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
}

.billing-alert-banner.warn {
  border-color: var(--trade-gold-border);
  background: var(--trade-gold-bg);
  color: var(--trade-gold);
}

.billing-hub-card {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 2rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 26px;
  padding: 2rem;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.06);
}

.billing-step-label {
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--brand-teal);
  margin-bottom: 0.9rem;
}

.pay-tier-grid {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.pay-tier-option {
  width: 100%;
  text-align: left;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  border: 2px solid var(--border-subtle);
  background: var(--brand-off-white);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pay-tier-option:hover {
  border-color: rgba(21, 122, 125, 0.45);
}

.pay-tier-option.active {
  border-color: var(--brand-deep-teal);
  background: rgba(21, 122, 125, 0.06);
  box-shadow: 0 8px 20px rgba(14, 77, 79, 0.08);
}

.pay-tier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 1.02rem;
  color: var(--brand-dark-ink);
}

.pay-tier-price {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-deep-teal);
}

.pay-tier-sub {
  font-size: 0.84rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.pay-hot-pill {
  display: inline-block;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
  margin-left: 0.35rem;
  vertical-align: middle;
}

.starter-bot-picker {
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: var(--trade-gold-bg);
  border: 1px solid var(--trade-gold-border);
  margin-bottom: 1rem;
}

.billing-account-box {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: var(--brand-slate-dark);
  color: #f8fafc;
  margin-bottom: 1rem;
  font-size: 0.88rem;
}

.billing-guarantee-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #334155;
  font-weight: 600;
}

.pay-method-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.pay-method-tab {
  padding: 0.75rem 0.9rem;
  border-radius: 14px;
  border: 1.5px solid var(--border-subtle);
  background: var(--brand-off-white);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pay-method-tab.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-color: var(--brand-deep-teal);
}

.pp-mode-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #065f46;
  margin-bottom: 1rem;
}

.pp-mode-badge.manual {
  background: var(--trade-gold-bg);
  border-color: var(--trade-gold-border);
  color: var(--trade-gold);
}

.pp-qr-box {
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  text-align: center;
  margin-bottom: 1.1rem;
}

.pp-qr-header {
  background: #113566;
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.55rem 0.85rem;
}

.pp-qr-img-frame {
  padding: 1rem 1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 215px;
}

.pp-qr-img {
  width: 205px;
  height: 205px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}

.pp-qr-placeholder {
  font-size: 0.86rem;
  color: var(--text-muted);
  max-width: 280px;
  padding: 1rem;
}

.pp-qr-meta {
  padding: 0.45rem 1rem 1rem;
}

.pp-amount-line {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-deep-teal);
}

.pp-acc-line {
  font-size: 0.86rem;
  color: #334155;
  font-weight: 600;
  margin-top: 0.15rem;
}

.pp-satang-note {
  display: inline-block;
  margin: 0.35rem auto 0.25rem;
  padding: 0.3rem 0.72rem;
  border-radius: 10px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.4;
}

.pp-reroll-btn {
  margin-top: 0.45rem;
  padding: 0.26rem 0.68rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pp-reroll-btn:hover {
  border-color: var(--brand-teal);
  background: #f0fdfa;
  color: var(--brand-deep-teal);
}

.pp-reroll-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.slip-file-input {
  padding: 0.55rem;
  background: var(--brand-off-white);
}

.slip-preview-box {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  margin-top: -0.35rem;
  margin-bottom: 0.85rem;
}

.slip-preview-box img {
  width: 58px;
  height: 74px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
}

.stripe-summary-box {
  border: 1.5px solid var(--border-subtle);
  border-radius: 20px;
  padding: 1.65rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.stripe-badge-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.stripe-pill {
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #635bff;
  color: #ffffff;
}

.stripe-pill-sub {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.stripe-plan-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
}

.stripe-plan-amount {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--brand-deep-teal);
  margin: 0.35rem 0 0.55rem;
}

.stripe-fee-breakdown {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0e4d4f;
  background: rgba(21, 122, 125, 0.08);
  border: 1px solid rgba(21, 122, 125, 0.22);
  border-radius: 11px;
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.adm-stripe-fee-box {
  margin-top: 0.9rem;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.adm-stripe-fee-toggle {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 800;
  font-size: 0.88rem;
  color: #0e4d4f;
  cursor: pointer;
  margin-bottom: 0.65rem;
  line-height: 1.4;
}

.adm-stripe-fee-toggle input {
  width: 18px;
  height: 18px;
  margin-top: 0.12rem;
  flex-shrink: 0;
}

.adm-fee-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.adm-fee-presets .btn-refresh {
  font-size: 0.76rem;
  padding: 0.36rem 0.65rem;
}

.adm-fee-inputs-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
}

.adm-fee-inputs-3 .field-input {
  margin-bottom: 0.5rem;
}

.adm-fee-preview {
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  border-radius: 11px;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  font-size: 0.8rem;
  line-height: 1.5;
}

.adm-fee-preview-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.2rem 0;
  border-bottom: 1px dashed #f1f5f9;
}

.adm-fee-preview-row:last-child {
  border-bottom: none;
}

.stripe-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.billing-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.billing-order-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--border-subtle);
  background: var(--brand-off-white);
  font-size: 0.88rem;
}

/* Payment Confirmation & Receipt Modal */
@keyframes payModalPopIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes payModalSpin {
  to {
    transform: rotate(360deg);
  }
}

.pay-result-modal-card {
  width: min(490px, 92vw);
  max-width: 490px;
  background: #ffffff;
  color: var(--brand-dark-ink);
  border-radius: 24px;
  padding: 2.15rem 1.85rem 1.8rem;
  position: relative;
  text-align: center;
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.36);
  border: 1px solid #e2e8f0;
  animation: payModalPopIn 0.22s ease-out;
}

.pay-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.16s ease;
}

.pay-modal-close:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.pay-result-badge {
  width: 68px;
  height: 68px;
  margin: 0 auto 0.95rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.95rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 0 0 8px rgba(16, 185, 129, 0.14);
}

.pay-result-badge.is-loading {
  background: linear-gradient(135deg, #157a7d 0%, #0e4d4f 100%);
  box-shadow: 0 0 0 8px rgba(21, 122, 125, 0.14);
  animation: payModalSpin 1.15s linear infinite;
}

.pay-result-badge.is-warn {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  box-shadow: 0 0 0 8px rgba(245, 158, 11, 0.15);
}

.pay-result-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  margin-bottom: 0.55rem;
}

.pay-result-eyebrow.is-loading {
  background: rgba(21, 122, 125, 0.12);
  color: var(--brand-deep-teal);
}

.pay-result-eyebrow.is-warn {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.pay-result-title {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.pay-result-desc {
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 1.15rem;
}

.pay-receipt-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.9rem 1.1rem;
  margin-bottom: 1.25rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pay-receipt-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.87rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed #e2e8f0;
}

.pay-receipt-row:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.pay-receipt-row span {
  color: #64748b;
  font-weight: 600;
}

.pay-receipt-row strong {
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

.pay-receipt-row strong.pay-receipt-exp {
  color: #059669;
}

.pay-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.pay-modal-btn-full {
  width: 100%;
  justify-content: center;
}

/* Admin Console Helpers */
.admin-shell {
  min-height: 100vh;
  background: #f1f5f9;
  padding-bottom: 4rem;
}

.admin-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.admin-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.admin-kpi-row.admin-kpi-row-6 {
  grid-template-columns: repeat(6, 1fr);
  gap: 0.85rem;
}

.adm-kpi-clickable {
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.adm-kpi-clickable:hover {
  transform: translateY(-2px);
  border-color: var(--brand-teal);
  box-shadow: 0 10px 24px rgba(14, 77, 79, 0.09);
}

.adm-slip-alert {
  background: linear-gradient(135deg, #0e4d4f 0%, #11181c 100%);
  color: #f8fafc;
  border: 1px solid rgba(183, 241, 90, 0.45);
  border-radius: 16px;
  padding: 0.9rem 1.25rem;
  margin-bottom: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  box-shadow: 0 12px 28px rgba(14, 77, 79, 0.16);
}

.adm-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 0.42rem;
  margin-left: 0.35rem;
  border-radius: 999px;
  background: #f59e0b;
  color: #11181c;
  font-size: 0.72rem;
  font-weight: 800;
}

.adm-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.adm-search-input {
  flex: 1;
  min-width: 280px;
  margin-bottom: 0;
}

.btn-refresh.active-filter {
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-color: var(--brand-deep-teal);
}

.adm-portfolio-table td {
  vertical-align: top;
}

.adm-port-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.adm-port-mini-item {
  background: var(--brand-off-white);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  padding: 0.5rem 0.7rem;
  font-size: 0.82rem;
}

.adm-port-mini-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.adm-port-mini-msg {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.22rem;
  line-height: 1.35;
}

.adm-port-mini-msg.err {
  color: #b91c1c;
  font-weight: 600;
}

.adm-pnl-stack {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  font-size: 0.84rem;
}

.adm-btn-detail {
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: 1.5px solid var(--brand-deep-teal);
  background: var(--brand-deep-teal);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.adm-btn-detail:hover {
  background: var(--brand-teal);
  border-color: var(--brand-teal);
}

/* Customer Deep-Dive Detail Modal */
.adm-detail-modal-card {
  width: min(1080px, 95vw);
  max-width: 1080px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #f8fafc;
}

.adm-detail-modal-header {
  padding: 1.1rem 1.45rem;
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 0;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.adm-detail-modal-header .btn-refresh {
  white-space: nowrap;
  flex-shrink: 0;
}

.adm-detail-modal-header .img-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 1rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.16s ease;
}

.adm-detail-modal-header .img-modal-close:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #ffffff;
}

.adm-detail-modal-body {
  padding: 1.35rem 1.45rem 1.75rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.adm-cust-profile-bar {
  background: linear-gradient(135deg, #0e4d4f 0%, #11181c 100%);
  color: #f8fafc;
  border-radius: 18px;
  padding: 1.15rem 1.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.adm-detail-port-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.adm-detail-metrics-6 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
}

.adm-cfg-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f1f5f9;
  font-size: 0.79rem;
  color: #334155;
}

.adm-cfg-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.2rem 0.55rem;
  font-weight: 600;
}

.adm-subtable-title {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
  margin-bottom: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.adm-order-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-order-card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-slip-thumb {
  width: 64px;
  height: 84px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  cursor: zoom-in;
}

@media (max-width: 1200px) {
  .admin-kpi-row.admin-kpi-row-6,
  .adm-detail-metrics-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 960px) {
  .billing-hub-card,
  .admin-grid-2 {
    grid-template-columns: 1fr;
  }
  .admin-kpi-row,
  .admin-kpi-row.admin-kpi-row-6,
  .adm-detail-metrics-6 {
    grid-template-columns: repeat(2, 1fr);
  }
  #headerLoginBtn {
    padding: 0.48rem 0.85rem;
    font-size: 0.82rem;
  }
}

@media (max-width: 640px) {
  .brand-sub-pill,
  #headerPortalBtn,
  #headerLogoutBtn {
    display: none;
  }
  .pay-method-tabs {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Sale Page -> Dedicated Client Portal CTA Banner & Client Shell (/client)
   ========================================================================== */
.sale-portal-cta-box {
  margin-top: 2.25rem;
  background: linear-gradient(135deg, #0e4d4f 0%, #11181c 100%);
  color: #f8fafc;
  border-radius: 26px;
  padding: 2.25rem 2.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border: 1px solid rgba(183, 241, 90, 0.32);
  box-shadow: 0 20px 44px rgba(14, 77, 79, 0.18);
}

.sale-portal-cta-text {
  max-width: 680px;
}

.sale-portal-cta-title {
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 0.45rem;
  line-height: 1.3;
}

.sale-portal-cta-desc {
  font-size: 0.94rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.sale-portal-cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.btn-portal-outline-light {
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
}

.btn-portal-outline-light:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--brand-lime);
  color: var(--brand-lime);
}

/* Dedicated Client Workspace Shell (/client) */
.client-shell {
  min-height: 100vh;
  background: #f1f5f9;
  padding-bottom: 4rem;
}

.client-main {
  padding-top: 2rem;
}

.client-guest-wrap {
  max-width: 1060px;
  margin: 0.5rem auto 0;
}

.client-intent-banner {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(14, 77, 79, 0.1) 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.42);
  color: #064e3b;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.15rem;
  font-size: 0.9rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.client-bar-btn {
  background: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.24);
}

.client-bar-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.45);
}

.client-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.client-nav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  background: #ffffff;
  padding: 0.45rem;
  border-radius: 18px;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.client-nav-tab {
  flex: 1;
  min-width: 210px;
  padding: 0.78rem 1.1rem;
  border-radius: 13px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.18s ease;
}

.client-nav-tab:hover {
  background: #f1f5f9;
  color: var(--brand-deep-teal);
}

.client-nav-tab.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.22);
}

.client-tab-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 0.45rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(14, 77, 79, 0.12);
  color: var(--brand-deep-teal);
}

.client-nav-tab.active .client-tab-pill {
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
}

.client-manual-ea-box {
  margin-top: 1.15rem;
  padding-top: 0.95rem;
  border-top: 1px dashed #cbd5e1;
  font-size: 0.8rem;
  color: #64748b;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.client-manual-ea-link {
  color: var(--brand-deep-teal);
  font-weight: 800;
  text-decoration: underline;
}

.bound-perf-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  padding: 0.65rem 0.85rem;
  border-radius: 13px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 0.8rem;
}

.bound-perf-item span {
  display: block;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.bound-perf-item strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.client-history-grid {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: 1.35rem;
  align-items: start;
}

.client-acc-summary-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.client-acc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.95rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.88rem;
}

.client-acc-row span {
  color: #64748b;
  font-weight: 600;
}

.client-acc-row strong {
  color: #0f172a;
  font-weight: 800;
  text-align: right;
}

@media (max-width: 960px) {
  .client-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .client-history-grid,
  .portal-workspace-grid {
    grid-template-columns: 1fr;
  }
  .sale-portal-cta-box {
    padding: 1.65rem;
  }
}

@media (max-width: 600px) {
  .client-kpi-grid,
  .bound-perf-strip {
    grid-template-columns: 1fr;
  }
  .client-header .header-actions {
    gap: 0.4rem;
  }
  #clientBackSaleLink {
    padding: 0.42rem 0.68rem;
    font-size: 0.76rem;
    white-space: nowrap;
  }
}

/* ==========================================================================
   Admin Console: Master EA Visibility & Package Pricing Management
   ========================================================================== */
.adm-nav-tabs {
  flex-wrap: wrap;
}

.adm-tab-badge-teal {
  background: rgba(16, 185, 129, 0.16);
  color: #065f46;
}

.stats-tab.active .adm-tab-badge-teal {
  background: var(--brand-lime);
  color: var(--brand-dark-ink);
}

.adm-manage-header {
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem;
}

.adm-manage-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.adm-inline-pill {
  padding: 0.36rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #065f46;
}

.adm-inline-pill.is-warn {
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.45);
  color: #92400e;
}

.adm-save-banner {
  margin-bottom: 1rem;
  padding: 0.8rem 1.05rem;
  border-radius: 13px;
  font-size: 0.88rem;
  font-weight: 800;
  background: rgba(16, 185, 129, 0.12);
  border: 1.5px solid rgba(16, 185, 129, 0.4);
  color: #065f46;
}

.adm-save-banner.is-err {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.35);
  color: #b91c1c;
}

.adm-masters-grid,
.adm-packages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.15rem;
}

.adm-master-card,
.adm-pkg-card {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 18px;
  padding: 1.25rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: all 0.18s ease;
}

.adm-pkg-card.is-featured {
  border-color: var(--brand-teal);
  box-shadow: 0 12px 28px rgba(14, 77, 79, 0.1);
}

.adm-master-card.is-disabled,
.adm-pkg-card.is-disabled {
  background: #f8fafc;
  border-style: dashed;
  border-color: #cbd5e1;
  opacity: 0.78;
}

.adm-master-top,
.adm-pkg-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.adm-master-meta-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.32rem;
}

.adm-code-pill {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #0f172a;
  color: #e2e8f0;
}

.adm-follower-pill {
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(21, 122, 125, 0.1);
  color: var(--brand-deep-teal);
}

.adm-master-title {
  font-size: 1.06rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.adm-master-sub {
  font-size: 0.79rem;
  color: #64748b;
  margin-top: 0.12rem;
}

/* iOS-Style Switch */
.adm-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  padding: 0.38rem 0.7rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.adm-switch-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.adm-switch-track {
  position: relative;
  width: 40px;
  height: 22px;
  background: #94a3b8;
  border-radius: 999px;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.adm-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  transition: transform 0.18s ease;
}

.adm-switch-input:checked + .adm-switch-track {
  background: #10b981;
}

.adm-switch-input:checked + .adm-switch-track .adm-switch-thumb {
  transform: translateX(18px);
}

.adm-switch-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0f172a;
}

.adm-master-live-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.adm-mini-stat span {
  display: block;
  font-size: 0.71rem;
  color: #64748b;
  font-weight: 600;
}

.adm-mini-stat strong {
  font-size: 0.86rem;
  font-weight: 800;
}

.adm-form-grid-2,
.adm-pkg-price-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem 0.75rem;
}

.adm-form-grid-2 .field-input,
.adm-pkg-price-row .field-input {
  margin-bottom: 0;
}

.adm-currency-mode-box {
  padding: 0.65rem 0.85rem;
  border-radius: 13px;
  background: rgba(21, 122, 125, 0.05);
  border: 1px solid rgba(21, 122, 125, 0.24);
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.adm-currency-select {
  margin-bottom: 0 !important;
  font-weight: 700;
  color: #0e4d4f;
  background: #ffffff;
}

.adm-currency-preview {
  font-size: 0.78rem;
  color: #0f766e;
  font-weight: 600;
}

.adm-stats-since-box {
  padding: 0.68rem 0.85rem;
  border-radius: 13px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.adm-since-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.adm-since-date-input {
  margin-bottom: 0 !important;
  width: auto !important;
  min-width: 165px;
  flex: 0 0 auto;
  font-weight: 700;
  color: #0c4a6e;
  background: #ffffff;
}

.adm-since-preset-btn {
  padding: 0.46rem 0.78rem;
  border-radius: 10px;
  border: 1px solid #7dd3fc;
  background: #ffffff;
  color: #0369a1;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.adm-since-preset-btn:hover {
  background: #e0f2fe;
  border-color: #0284c7;
}

.adm-since-preset-btn.is-active {
  background: #0369a1;
  border-color: #0369a1;
  color: #ffffff;
}

.adm-since-preview {
  font-size: 0.77rem;
  color: #0369a1;
  font-weight: 600;
}

.adm-capital-hint-editor {
  margin-top: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 14px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.adm-capital-hint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.btn-sync-hint {
  border: 1px solid #f59e0b;
  background: #fef3c7;
  color: #92400e;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.12s ease;
}

.btn-sync-hint:hover {
  background: #fde68a;
}

.adm-capital-hint-textarea {
  margin-bottom: 0 !important;
  background: #ffffff !important;
  border-color: #fbbf24 !important;
  color: #78350f !important;
  font-size: 0.84rem !important;
  line-height: 1.5;
  resize: vertical;
  min-height: 68px;
}

.adm-capital-hint-textarea:focus {
  border-color: #d97706 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.18) !important;
}

.adm-price-input {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--brand-deep-teal);
  border-color: rgba(21, 122, 125, 0.45);
}

.adm-input-locked {
  background: #f1f5f9;
  color: #64748b;
  font-weight: 700;
}

.adm-featured-chk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.84rem;
  color: #0e4d4f;
  cursor: pointer;
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  background: rgba(183, 241, 90, 0.16);
  border: 1px solid rgba(132, 204, 22, 0.4);
}

.adm-featured-chk input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
}

.adm-pkg-preview-box {
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.adm-pkg-preview-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

@media (max-width: 980px) {
  .adm-masters-grid,
  .adm-packages-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .admin-header .header-inner {
    height: auto;
    min-height: 64px;
    padding-top: 0.6rem;
    padding-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .admin-header .header-actions {
    flex-wrap: wrap;
    gap: 0.38rem;
  }
  .admin-header .header-actions .btn,
  .admin-header .header-actions .btn-header-logout {
    padding: 0.36rem 0.65rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 640px) {
  .adm-master-live-strip,
  .adm-form-grid-2,
  .adm-pkg-price-row {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   Ultima Markets IB Partner Program UI (Sale Page, Client Portal, Admin)
   ========================================================================== */
.ib-partner-hero-banner {
  background: linear-gradient(135deg, #0b3d3f 0%, #102a2e 55%, #11181c 100%);
  color: #f8fafc;
  border-radius: 26px;
  padding: 2rem 2.2rem;
  margin-bottom: 1.5rem;
  border: 1.5px solid rgba(183, 241, 90, 0.42);
  box-shadow: 0 22px 46px rgba(14, 77, 79, 0.18);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.ib-hero-eyebrow span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.8rem;
  border-radius: 999px;
  background: rgba(183, 241, 90, 0.16);
  border: 1px solid rgba(183, 241, 90, 0.45);
  color: var(--brand-lime);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 0.6rem;
}

.ib-hero-title {
  font-size: clamp(1.25rem, 2vw, 1.58rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.32;
  margin-bottom: 1rem;
}

.ib-hero-tiers {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.ib-hero-tier-item {
  display: flex;
  align-items: flex-start;
  gap: 0.68rem;
  padding: 0.58rem 0.85rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.88rem;
  line-height: 1.5;
  color: #e2e8f0;
}

.ib-hero-tier-item strong {
  color: #ffffff;
  margin-right: 0.35rem;
}

.ib-hero-tier-item.ib-tier-highlight {
  background: rgba(183, 241, 90, 0.14);
  border-color: rgba(183, 241, 90, 0.48);
  color: #f8fafc;
}

.ib-hero-tier-item.ib-tier-highlight strong {
  color: var(--brand-lime);
}

.ib-tier-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: rgba(183, 241, 90, 0.22);
  color: var(--brand-lime);
  font-weight: 800;
  font-size: 0.78rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ib-hero-actions {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  min-width: 270px;
}

.ib-hero-actions .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.pricing-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  background: #ffffff;
  padding: 0.4rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
  margin: 0 auto 1.6rem;
  width: fit-content;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.pricing-mode-btn {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pricing-mode-btn:hover {
  color: var(--brand-deep-teal);
  background: #f1f5f9;
}

.pricing-mode-btn.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.24);
}

.plan-old-price {
  font-size: 0.85rem;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: -0.2rem;
}

.plan-card.plan-card-ib-free {
  border: 2px solid #10b981;
  background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 36%);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.14);
}

.plan-card.plan-card-ib-free .plan-badge {
  background: #059669;
  color: #ffffff;
}

.plan-card.plan-card-ib-free .plan-price {
  color: #047857;
}

/* Client Portal IB Promo Bar & Bind Claim Box */
.client-ib-promo-bar {
  background: linear-gradient(135deg, #0e4d4f 0%, #132c33 100%);
  color: #f8fafc;
  border-radius: 18px;
  padding: 1rem 1.35rem;
  margin-bottom: 1.1rem;
  border: 1.5px solid rgba(183, 241, 90, 0.38);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.client-ib-promo-bar strong {
  display: block;
  color: var(--brand-lime);
  font-size: 0.96rem;
  margin-bottom: 0.18rem;
}

.client-ib-promo-bar span {
  font-size: 0.84rem;
  color: #e2e8f0;
  line-height: 1.5;
}

.client-ib-promo-bar.ib-state-free {
  background: linear-gradient(135deg, #065f46 0%, #064e3b 100%);
  border-color: #34d399;
}

.client-ib-promo-bar.ib-state-pending {
  background: linear-gradient(135deg, #78350f 0%, #451a03 100%);
  border-color: #fbbf24;
}

.bind-ib-claim-box {
  margin: 0.5rem 0 0.85rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1.5px solid rgba(16, 185, 129, 0.42);
}

.bind-ib-chk-label {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 700;
  color: #064e3b;
  line-height: 1.45;
}

.bind-ib-chk-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 0.12rem;
  flex-shrink: 0;
  accent-color: #0e4d4f;
}

.bind-ib-detail-wrap {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed rgba(16, 185, 129, 0.45);
}

.bind-ib-rule-summary {
  font-size: 0.8rem;
  color: #065f46;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.72);
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
}

.bind-ib-open-link-row {
  margin-top: 0.55rem;
  font-size: 0.8rem;
  color: #334155;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.bind-ib-reg-link {
  color: #047857;
  font-weight: 800;
  text-decoration: underline;
}

/* Bound Account Card IB Strip */
.bound-ib-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.48rem 0.78rem;
  border-radius: 10px;
  font-size: 0.79rem;
  margin-bottom: 0.55rem;
}

.bound-ib-strip.ib-strip-free {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.bound-ib-strip.ib-strip-verified {
  background: #f0fdfa;
  border: 1px solid #5eead4;
  color: #0f766e;
}

.bound-ib-strip.ib-strip-pending {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.bound-ib-strip.ib-strip-rejected {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.bound-ib-strip.ib-strip-none {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  color: #475569;
}

.btn-req-ib {
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px solid #0e4d4f;
  background: #ffffff;
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.btn-req-ib:hover {
  background: #0e4d4f;
  color: #ffffff;
}

/* Billing Hub IB Notice & Strike-Through Price */
.billing-ib-notice {
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  color: #14532d;
  border-radius: 16px;
  padding: 0.9rem 1.2rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  font-size: 0.86rem;
}

.billing-ib-notice strong {
  display: block;
  font-size: 0.94rem;
  color: #065f46;
  margin-bottom: 0.15rem;
}

.billing-ib-notice.is-active {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-color: #10b981;
}

.pay-tier-old-px {
  font-size: 0.8rem;
  color: #94a3b8;
  font-weight: 600;
  margin-right: 0.25rem;
}

/* Admin IB Partner Queue & Config Styles */
.adm-ib-alert {
  background: linear-gradient(135deg, #065f46 0%, #0e4d4f 100%);
  border-color: rgba(183, 241, 90, 0.48);
}

.adm-ib-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  align-items: start;
}

.adm-ib-mini-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  margin-left: 0.25rem;
}

.adm-ib-mini-pill.is-free {
  background: #d1fae5;
  color: #065f46;
}

.adm-ib-mini-pill.is-ver {
  background: #ccfbf1;
  color: #0f766e;
}

.adm-ib-mini-pill.is-pend {
  background: #fef3c7;
  color: #92400e;
}

.adm-ib-mini-pill.is-rej {
  background: #fee2e2;
  color: #991b1b;
}

.adm-ib-cap-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.adm-ib-cap-pill.ok {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.adm-ib-cap-pill.low {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

@media (max-width: 960px) {
  .ib-partner-hero-banner,
  .adm-ib-settings-grid {
    grid-template-columns: 1fr;
  }
  .ib-hero-actions {
    min-width: 0;
  }
}

/* Customer Port Open Positions & Closed Trade History Inspector (/client) */
.bound-trade-inspector {
  border-radius: 14px;
  border: 1px solid #dbe4ee;
  background: #f8fafc;
  padding: 0.7rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.bound-inspector-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.bound-sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.24rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.35;
}

.bound-sync-pill.is-match {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #6ee7b7;
}

.bound-sync-pill.is-diff {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fcd34d;
}

.bound-sync-pill.is-neutral {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.bound-inspector-tabs {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bound-insp-tab {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  border-radius: 9px;
  padding: 0.38rem 0.72rem;
  font-size: 0.79rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.bound-insp-tab:hover {
  border-color: #0e4d4f;
  color: #0e4d4f;
}

.bound-insp-tab.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 77, 79, 0.18);
}

.bound-insp-collapse {
  margin-left: auto;
  border: 1px dashed #cbd5e1;
  background: transparent;
  color: #475569;
  border-radius: 8px;
  padding: 0.32rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.bound-insp-collapse:hover {
  background: #ffffff;
  color: #0f172a;
}

.bound-insp-body {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  overflow: hidden;
}

.bound-insp-empty {
  padding: 0.85rem 0.95rem;
  font-size: 0.81rem;
  color: #64748b;
  line-height: 1.5;
}

.bound-insp-scroll {
  overflow-x: auto;
}

.bound-insp-table {
  width: 100%;
  font-size: 0.78rem;
  border-collapse: collapse;
}

.bound-insp-table th,
.bound-insp-table td {
  padding: 0.48rem 0.58rem;
  white-space: nowrap;
}

.insp-sub-time {
  font-size: 0.69rem;
  color: #64748b;
  font-weight: 500;
}

.copy-src-badge {
  display: inline-block;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.copy-src-badge.is-copied {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.copy-src-badge.is-manual {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.trade-pager-host {
  margin-top: 0.75rem;
}

.trade-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  padding: 0.65rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  border-radius: 0 0 12px 12px;
}

.trade-pager-host .trade-pager {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.trade-pager-info {
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.trade-pager-btns {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}

.trade-page-btn {
  min-width: 32px;
  height: 30px;
  padding: 0 0.55rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  font-variant-numeric: tabular-nums;
}

.trade-page-btn:hover:not(:disabled):not(.active) {
  border-color: #0e4d4f;
  color: #0e4d4f;
  background: #f0fdfa;
}

.trade-page-btn.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 77, 79, 0.2);
}

.trade-page-btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.trade-page-dots {
  padding: 0 0.22rem;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 700;
  user-select: none;
}

@media (max-width: 640px) {
  .trade-pager {
    flex-direction: column;
    align-items: stretch;
    padding: 0.6rem 0.7rem;
  }
  .trade-pager-btns {
    justify-content: center;
  }
}

/* ==========================================================================
   Native Mobile Application UX for Private Client Portal (/client)
   ========================================================================== */
.sale-link-mobile,
.mobile-sync-icon-btn,
.btn-mobile-add-port,
.btn-mobile-close-bind,
.client-mobile-bottom-nav,
.bound-insp-mobile-list,
.mobile-summary-logout-btn {
  display: none;
}

.bind-card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

@media (max-width: 960px) {
  .client-shell .portal-workspace-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .client-shell .portal-accounts-col {
    order: 1;
    width: 100%;
  }

  .client-shell .portal-bind-card {
    order: 2;
    width: 100%;
  }

  .client-shell .portal-bind-card.mobile-bind-collapsed {
    display: none !important;
  }

  .client-ports-head {
    align-items: flex-start;
  }

  .btn-mobile-add-port {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: none;
    background: var(--brand-deep-teal);
    color: #ffffff;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(14, 77, 79, 0.2);
    flex-shrink: 0;
  }

  .btn-mobile-close-bind {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
    font-size: 0.95rem;
    font-weight: 800;
    cursor: pointer;
    flex-shrink: 0;
  }
}

@media (max-width: 768px) {
  body.client-shell {
    background: #eef2f6;
    min-height: 100dvh;
    padding-bottom: calc(6.2rem + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  body.client-shell .container {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  /* Compact App Top Bar */
  .client-header .header-inner {
    height: 56px;
    gap: 0.4rem;
  }

  .client-header .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 1rem;
  }

  .client-header .brand-title {
    font-size: 0.96rem;
  }

  .client-header .brand-sub-pill,
  .client-header #headerLogoutBtn,
  .client-header .sale-link-desktop,
  .client-header .hide-xs-inline {
    display: none !important;
  }

  .client-header .sale-link-mobile {
    display: inline;
  }

  .client-header #clientBackSaleLink,
  .client-header #headerAdminLink {
    padding: 0.36rem 0.62rem;
    font-size: 0.74rem;
    border-radius: 999px;
  }

  .client-header .mobile-sync-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 0;
    border-radius: 9px;
    font-size: 0.98rem;
  }

  .client-header .lang-btn {
    padding: 0.36rem 0.58rem;
    font-size: 0.76rem;
    height: 33px;
  }

  .client-main {
    padding-top: 0.85rem;
  }

  /* Guest Login View: Sign-In Card First Above the Fold */
  .client-guest-wrap {
    margin-top: 0;
  }

  .client-auth-banner {
    display: flex;
    flex-direction: column;
    padding: 1.1rem;
    border-radius: 20px;
    gap: 1.15rem;
  }

  .client-auth-banner .demo-right-card {
    order: 1;
    width: 100%;
    padding: 1.2rem 1.05rem;
    border-radius: 18px;
  }

  .client-auth-banner .demo-left {
    order: 2;
    width: 100%;
  }

  .client-auth-banner .demo-title {
    font-size: 1.28rem;
  }

  .client-auth-banner .demo-desc {
    font-size: 0.88rem;
    margin-bottom: 0.85rem;
  }

  .client-auth-banner .demo-check-list {
    font-size: 0.84rem;
    margin-bottom: 1rem;
  }

  /* Prevent iOS Safari Auto-Zoom on Inputs */
  body.client-shell .field-input,
  body.client-shell select.bound-bot-select {
    font-size: 16px;
  }

  /* Compact App Dashboard Layout */
  .client-shell .portal-dashboard {
    gap: 0.85rem;
  }

  .client-shell .portal-user-bar {
    padding: 0.9rem 1rem;
    border-radius: 18px;
    gap: 0.7rem;
  }

  .client-shell .portal-avatar {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    font-size: 1.05rem;
  }

  .client-shell .portal-user-title {
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.96rem;
  }

  .client-shell .portal-plan-pill {
    font-size: 0.68rem;
    padding: 0.12rem 0.5rem;
  }

  .client-shell .portal-user-meta {
    font-size: 0.74rem;
    line-height: 1.4;
    word-break: break-word;
  }

  .client-shell .portal-user-actions {
    width: 100%;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.45rem;
  }

  .client-shell #portalLogoutBtn {
    display: none !important;
  }

  .client-shell #portalRefreshBtn {
    padding: 0.52rem 0.75rem;
    font-size: 0.78rem;
    border-radius: 11px;
    white-space: nowrap;
  }

  .client-shell #clientQuickUpgradeBtn {
    width: 100%;
    padding: 0.54rem 0.85rem;
    font-size: 0.8rem;
    border-radius: 11px;
  }

  /* Crisp 2x2 Portfolio KPI Grid */
  .client-shell .client-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem;
  }

  .client-shell .client-kpi-grid .kpi-card {
    padding: 0.72rem 0.8rem;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
  }

  .client-shell .client-kpi-grid .kpi-label {
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
  }

  .client-shell .client-kpi-grid .kpi-val {
    font-size: 1.02rem;
    line-height: 1.25;
  }

  .client-shell .client-kpi-grid .kpi-sub {
    font-size: 0.69rem;
    margin-top: 0.15rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Replace bulky mid-page tabs with Native Bottom Navigation Bar */
  .client-shell .client-nav-tabs {
    display: none !important;
  }

  .client-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(15, 23, 42, 0.09);
    box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.08);
    padding: 0.35rem max(0.4rem, env(safe-area-inset-right, 0px)) calc(0.4rem + env(safe-area-inset-bottom, 0px)) max(0.4rem, env(safe-area-inset-left, 0px));
  }

  .m-bottom-tab {
    border: none;
    background: transparent;
    border-radius: 12px;
    padding: 0.32rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.14rem;
    color: #64748b;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.16s ease;
  }

  .m-bottom-tab.active {
    color: var(--brand-deep-teal);
    background: rgba(21, 122, 125, 0.1);
  }

  .m-bottom-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 22px;
  }

  .m-bottom-icon {
    font-size: 1.12rem;
    line-height: 1;
  }

  .m-bottom-badge {
    position: absolute;
    top: -4px;
    right: -11px;
    min-width: 16px;
    height: 16px;
    padding: 0 0.26rem;
    border-radius: 999px;
    background: var(--brand-deep-teal);
    color: #ffffff;
    font-size: 0.63rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .m-bottom-tab.active .m-bottom-badge {
    background: var(--brand-lime);
    color: var(--brand-dark-ink);
  }

  .m-bottom-label {
    font-size: 0.69rem;
    font-weight: 800;
    line-height: 1.15;
    white-space: nowrap;
  }

  /* Bound Account Card App Layout */
  .client-ports-head .panel-sub {
    font-size: 0.76rem;
    line-height: 1.4;
  }

  .client-shell .panel-box {
    padding: 1.05rem;
    border-radius: 18px;
  }

  .client-shell .bound-acc-card {
    padding: 0.95rem;
    border-radius: 18px;
    gap: 0.72rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  }

  .client-shell .bound-acc-top {
    gap: 0.5rem;
  }

  .client-shell .bound-acc-name {
    font-size: 1.02rem;
  }

  .client-shell .bound-acc-sub {
    font-size: 0.75rem;
    word-break: break-word;
  }

  .client-shell .wstatus-pill {
    font-size: 0.69rem;
    padding: 0.22rem 0.6rem;
  }

  .client-shell .bound-ib-strip {
    margin-bottom: 0;
    padding: 0.45rem 0.65rem;
    font-size: 0.74rem;
  }

  .client-shell .bound-status-msg {
    font-size: 0.78rem;
    padding: 0.52rem 0.7rem;
  }

  .client-shell .bound-metrics-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.48rem;
  }

  .client-shell .bound-m-box {
    padding: 0.55rem 0.68rem;
    border-radius: 11px;
  }

  .client-shell .bound-m-val {
    font-size: 0.9rem;
  }

  .client-shell .bound-perf-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.38rem;
    padding: 0.52rem 0.58rem;
  }

  .client-shell .bound-perf-item span {
    font-size: 0.65rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .client-shell .bound-perf-item strong {
    font-size: 0.77rem;
    display: block;
    line-height: 1.25;
  }

  /* Segmented Trade Inspector & MT5-App Trade Cards */
  .client-shell .bound-trade-inspector {
    padding: 0.6rem;
    border-radius: 13px;
  }

  .client-shell .bound-sync-pill {
    width: 100%;
    justify-content: center;
    text-align: center;
    font-size: 0.71rem;
    padding: 0.28rem 0.55rem;
    border-radius: 10px;
  }

  .client-shell .bound-inspector-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 0.32rem;
  }

  .client-shell .bound-insp-tab {
    padding: 0.45rem 0.38rem;
    font-size: 0.73rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .client-shell .bound-insp-collapse {
    margin-left: 0;
    padding: 0.44rem 0.52rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  /* Swap Wide Desktop Table for Native MT5 Mobile Trade Cards */
  .client-shell .bound-insp-scroll {
    display: none !important;
  }

  .client-shell .bound-insp-mobile-list {
    display: flex !important;
    flex-direction: column;
  }

  .m-trade-card {
    padding: 0.62rem 0.72rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
  }

  .m-trade-card:last-child {
    border-bottom: none;
  }

  .m-trade-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .m-trade-sym-group {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    min-width: 0;
  }

  .m-trade-sym {
    font-size: 0.86rem;
    font-weight: 800;
    color: var(--brand-dark-ink);
  }

  .m-trade-lot {
    font-size: 0.78rem;
    font-weight: 700;
    color: #334155;
  }

  .m-trade-pnl {
    font-size: 0.9rem;
    font-weight: 800;
    text-align: right;
    white-space: nowrap;
  }

  .m-trade-row-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    flex-wrap: wrap;
  }

  .m-trade-meta-left {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    min-width: 0;
  }

  .m-trade-tkt {
    font-size: 0.69rem;
    color: #64748b;
  }

  .m-trade-meta-right {
    font-size: 0.71rem;
    color: #475569;
    font-weight: 600;
    text-align: right;
    margin-left: auto;
  }

  /* Thumb-Friendly Port Controls */
  .client-shell .bound-controls-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
  }

  .client-shell .bound-bot-switcher {
    width: 100%;
    min-width: 0;
  }

  .client-shell .bound-bot-select {
    width: 100%;
    min-height: 42px;
    border-radius: 11px;
  }

  .client-shell .bound-btn-group {
    display: grid;
    grid-template-columns: 1fr 1.15fr auto;
    gap: 0.42rem;
    width: 100%;
  }

  .client-shell .btn-harvest-close {
    grid-column: 1 / -1;
    min-height: 44px;
    padding: 0.52rem 0.7rem;
    font-size: 0.8rem;
    border-radius: 11px;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  .client-shell .btn-port-toggle,
  .client-shell .btn-panic-close,
  .client-shell .btn-port-unlink {
    min-height: 42px;
    padding: 0.5rem 0.62rem;
    font-size: 0.78rem;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
  }

  /* Billing & Account Tab Mobile Polish */
  .client-shell .billing-hub-card {
    padding: 1.1rem;
    border-radius: 20px;
    gap: 1.25rem;
  }

  .mobile-summary-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 42px;
    margin-top: 0.35rem;
    border-radius: 12px;
    border: 1px solid rgba(220, 38, 38, 0.35);
    color: var(--rose);
    background: #fff5f5;
    font-size: 0.85rem;
    font-weight: 700;
  }

  .pay-result-modal-card {
    width: min(460px, 94vw);
    padding: 1.65rem 1.25rem 1.4rem;
    border-radius: 22px;
  }
}

/* ==========================================================================
   Edit Saved MT5 Port Modal & Mobile Bottom Sheet
   ========================================================================== */
.bound-acc-top-right {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.bound-accounts-list.has-expanded-port {
  padding-bottom: 36vh;
}

.bound-acc-card {
  scroll-margin-top: 76px;
}

.bound-acc-id-block.is-collapsible-head {
  cursor: pointer;
}

.bound-acc-id-block.is-collapsible-head:hover .bound-acc-name {
  color: var(--brand-teal);
}

.btn-port-collapse {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-port-collapse:hover {
  background: #e2e8f0;
  border-color: #94a3b8;
  color: #0f172a;
}

.btn-port-edit {
  padding: 0.28rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: var(--brand-deep-teal);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.btn-port-edit:hover {
  background: var(--brand-deep-teal);
  border-color: var(--brand-deep-teal);
  color: #ffffff;
}

.edit-port-modal-card {
  width: min(560px, 94vw);
  max-width: 560px;
  max-height: 90vh;
  background: #ffffff;
  color: var(--brand-dark-ink);
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 65px rgba(15, 23, 42, 0.34);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: payModalPopIn 0.2s ease-out;
}

.edit-port-modal-head {
  padding: 1.15rem 1.35rem 0.95rem;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
}

.edit-port-title {
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--brand-dark-ink);
}

.edit-port-sub {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.4;
}

.edit-port-close {
  position: static;
  flex-shrink: 0;
}

.edit-port-form-body {
  padding: 1.15rem 1.35rem 1.3rem;
  overflow-y: auto;
}

.edit-port-form-body .field-input {
  margin-bottom: 0.75rem;
}

.edit-port-actions {
  display: grid;
  grid-template-columns: 0.8fr 1.4fr;
  gap: 0.65rem;
  margin-top: 0.45rem;
}

.edit-port-cancel,
.edit-port-save {
  min-height: 44px;
  border-radius: 13px;
  font-size: 0.9rem;
  justify-content: center;
}

@media (max-width: 768px) {
  .edit-port-modal {
    align-items: flex-end;
    padding: 0;
  }

  .edit-port-modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
  }

  .edit-port-modal-head {
    padding: 1rem 1.05rem 0.85rem;
  }

  .edit-port-form-body {
    padding: 1rem 1.05rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   PWA Installable App Buttons & Responsive Guide Modal / Bottom Sheet
   ========================================================================== */
.btn-pwa-install {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.78rem;
  border-radius: 999px;
  border: 1.5px solid rgba(163, 230, 53, 0.55);
  background: linear-gradient(135deg, #ecfccb 0%, #d9f99d 100%);
  color: #062a2d;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(14, 77, 79, 0.12);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.btn-pwa-install:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.18);
}

.is-pwa-standalone [data-install-pwa] {
  display: none !important;
}

.pwa-account-install-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.8rem 0.95rem;
  border-radius: 16px;
  border: 1.5px solid #a7f3d0;
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.pwa-account-install-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.08);
}

.pwa-account-install-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(6, 42, 45, 0.16);
}

.pwa-account-install-cta {
  padding: 0.38rem 0.78rem;
  border-radius: 999px;
  background: #0e4d4f;
  color: #ecfccb;
  font-size: 0.78rem;
  font-weight: 800;
  flex-shrink: 0;
}

.pwa-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1rem + env(safe-area-inset-top, 0px)) 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
}

.pwa-modal.hidden {
  display: none !important;
}

.pwa-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 26, 28, 0.62);
  backdrop-filter: blur(4px);
}

.pwa-modal-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border-radius: 22px;
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow: 0 24px 56px rgba(6, 26, 28, 0.28);
  border: 1px solid #e2e8f0;
}

.pwa-modal-close {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
  font-size: 0.95rem;
  cursor: pointer;
}

.pwa-modal-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-right: 2rem;
  margin-bottom: 1rem;
}

.pwa-modal-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(6, 42, 45, 0.18);
}

.pwa-modal-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #062a2d;
}

.pwa-modal-sub {
  font-size: 0.82rem;
  color: #475569;
  margin-top: 0.12rem;
}

.pwa-modal-steps {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 1.1rem;
}

.pwa-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding: 0.7rem 0.85rem;
  border-radius: 13px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: #1e293b;
}

.pwa-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #0e4d4f;
  color: #ecfccb;
  font-size: 0.76rem;
  font-weight: 800;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.pwa-modal-btn {
  width: 100%;
  justify-content: center;
}

@media (max-width: 640px) {
  .btn-pwa-install {
    padding: 0.36rem 0.58rem;
    font-size: 0.74rem;
  }

  .pwa-modal {
    align-items: flex-end;
    padding: 0;
  }

  .pwa-modal-card {
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 1.25rem 1.15rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}

/* ==========================================================================
   Multi-Port Quick Switcher, Compact Cards & Daily P&L Summary Engine
   ========================================================================== */
.ports-quick-nav {
  background: #ffffff;
  border: 1px solid #dbe4ee;
  border-radius: 18px;
  padding: 0.78rem 0.9rem;
  margin-bottom: 0.85rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

.ports-nav-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ports-filter-pills,
.ports-mode-btns {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.port-filter-pill,
.port-mode-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.port-filter-pill:hover,
.port-mode-btn:hover {
  border-color: var(--brand-deep-teal);
  color: var(--brand-deep-teal);
}

.port-filter-pill.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ecfccb;
}

.port-mode-btn.active {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.ports-search-row {
  width: 100%;
}

.port-search-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  padding: 0.48rem 0.78rem;
  font-family: inherit;
  font-size: 0.84rem;
  background: #f8fafc;
  color: #0f172a;
}

.port-search-input:focus {
  outline: none;
  border-color: var(--brand-deep-teal);
  background: #ffffff;
}

.port-chip-strip {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow-x: auto;
  padding-bottom: 0.15rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.port-chip-strip::-webkit-scrollbar {
  display: none;
}

.port-quick-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.42rem 0.78rem;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  max-width: 240px;
}

.port-quick-chip:hover {
  border-color: #94a3b8;
  background: #ffffff;
}

.port-quick-chip.active {
  background: linear-gradient(135deg, #0e4d4f 0%, #062a2d 100%);
  border-color: #0e4d4f;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.22);
}

.port-quick-chip.active .port-chip-pnl.pnl-pos {
  color: #bef264;
}

.port-quick-chip.active .port-chip-pnl.pnl-neg {
  color: #fda4af;
}

.port-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 125px;
}

.port-chip-pnl {
  font-size: 0.76rem;
  font-weight: 800;
}

.port-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.port-chip-dot.dot-live {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

.port-chip-dot.dot-wait {
  background: #f59e0b;
}

.port-chip-dot.dot-paused {
  background: #64748b;
}

.port-chip-dot.dot-blocked {
  background: #ef4444;
}

/* Compact Overview Port Card */
.bound-acc-card.is-compact {
  padding: 0.78rem 0.95rem;
  gap: 0.36rem;
  cursor: pointer;
  border: 1px solid #dbe4ee;
  background: #ffffff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.12s ease;
}

.bound-acc-card.is-compact:hover {
  border-color: #14b8a6;
  box-shadow: 0 6px 18px rgba(14, 77, 79, 0.08);
  transform: translateY(-1px);
}

.bound-acc-card.is-expanded {
  border: 1.5px solid rgba(14, 77, 79, 0.28);
  box-shadow: 0 12px 28px rgba(14, 77, 79, 0.08);
}

.compact-port-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.compact-port-id-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex-wrap: wrap;
}

.compact-port-name {
  font-size: 0.93rem;
  font-weight: 800;
  color: #0f172a;
}

.compact-port-login {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 700;
}

.compact-port-bot-pill {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #99f6e4;
  white-space: nowrap;
}

.compact-port-pnl-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 0.32rem;
  flex-shrink: 0;
  font-size: 0.88rem;
}

.compact-today-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 600;
}

.compact-port-row-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: #475569;
}

.compact-port-meta {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}

.compact-expand-cta {
  font-size: 0.74rem;
  font-weight: 800;
  color: #0e4d4f;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Unified Sync Bar inside Expanded Port Card */
.port-live-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.46rem 0.75rem;
  border-radius: 11px;
  font-size: 0.78rem;
  font-weight: 700;
}

.port-live-sync-bar.is-match {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.port-live-sync-bar.is-diff {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.port-live-sync-bar.is-neutral {
  background: #f8fafc;
  color: #334155;
  border: 1px solid #e2e8f0;
}

.sync-age-txt {
  font-size: 0.72rem;
  opacity: 0.85;
  font-weight: 600;
}

/* Bot Switcher + Start Date Picker Bar */
.port-bot-since-bar {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 0.65rem;
  padding: 0.68rem 0.78rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8fafc 0%, #f0fdfa 100%);
  border: 1px solid #ccfbf1;
}

.port-bot-col,
.port-since-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 0;
}

.port-bar-mini-label {
  font-size: 0.72rem;
  font-weight: 800;
  color: #0f766e;
}

.port-since-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.port-since-days-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 0.1rem 0.46rem;
  border-radius: 999px;
  background: #0e4d4f;
  color: #ecfccb;
  white-space: nowrap;
}

.port-since-controls {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.port-since-date-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 38px;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
}

.port-since-date-input:focus {
  outline: none;
  border-color: var(--brand-deep-teal);
}

.port-since-chip {
  flex-shrink: 0;
  min-height: 38px;
  padding: 0 0.6rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.port-since-chip.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ecfccb;
}

/* Bento Metrics Sub-label & Highlight */
.bound-m-sub {
  font-size: 0.7rem;
  color: #64748b;
  margin-top: 0.14rem;
  line-height: 1.25;
}

.bound-m-box.highlight-since-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
  border-color: #bbf7d0;
}

/* 3-Tab Inspector & Daily P&L Summary */
.bound-inspector-tabs.has-3-tabs {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.daily-summary-ribbon {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.daily-sum-cell {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 11px;
  padding: 0.52rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  min-width: 0;
}

.daily-sum-cell span {
  font-size: 0.69rem;
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.daily-sum-cell strong {
  font-size: 0.88rem;
  font-weight: 800;
}

.daily-sum-cell small {
  font-size: 0.67rem;
  color: #64748b;
}

.daily-pnl-list {
  display: flex;
  flex-direction: column;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.daily-pnl-row {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(60px, 0.9fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0.62rem 0.78rem;
  border-bottom: 1px solid #f1f5f9;
}

.daily-pnl-row:last-child {
  border-bottom: none;
}

.daily-pnl-row.is-today-row {
  background: #f0fdf4;
}

.daily-row-left {
  min-width: 0;
}

.daily-row-date {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.84rem;
  color: #0f172a;
  flex-wrap: wrap;
}

.daily-today-pill {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
}

.daily-row-meta {
  font-size: 0.72rem;
  color: #64748b;
  margin-top: 0.1rem;
}

.daily-row-bar-wrap {
  height: 7px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.daily-row-bar {
  height: 100%;
  border-radius: 999px;
}

.daily-row-bar.is-pos {
  background: linear-gradient(90deg, #34d399 0%, #059669 100%);
}

.daily-row-bar.is-neg {
  background: linear-gradient(90deg, #fb7185 0%, #e11d48 100%);
}

.daily-row-val {
  text-align: right;
  font-size: 0.9rem;
  white-space: nowrap;
}

.daily-usd-sub {
  font-size: 0.68rem;
  color: #64748b;
  font-weight: 600;
}

.daily-live-holding-pill {
  margin-bottom: 0.55rem;
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  color: #0e7490;
  font-size: 0.76rem;
  font-weight: 700;
}

.daily-older-hint {
  margin-top: 0.5rem;
  padding: 0.42rem 0.65rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.74rem;
  color: #475569;
}

.btn-link-tiny {
  border: none;
  background: transparent;
  color: #0f766e;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  padding: 0.1rem 0.25rem;
  text-decoration: underline;
}

.btn-link-tiny.active {
  background: #0e4d4f;
  color: #ecfccb;
  border-radius: 6px;
  padding: 0.12rem 0.45rem;
  text-decoration: none;
}

.edit-date-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.bind-start-date-row {
  margin-top: -0.15rem;
}

.portfolio-rollup-box {
  border-top: 1px solid #e2e8f0;
  padding-top: 0.6rem;
  margin-top: 0.1rem;
}

.portfolio-rollup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-size: 0.8rem;
  color: #0f172a;
}

.portfolio-rollup-total {
  margin-left: 0.45rem;
  font-weight: 800;
}

.port-ib-subtle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px dashed #e2e8f0;
  font-size: 0.74rem;
  color: #64748b;
}

.bound-controls-row.clean-action-bar {
  justify-content: flex-end;
}

.bound-controls-row.clean-action-bar .bound-btn-group {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.15fr auto;
  gap: 0.45rem;
}

@media (max-width: 768px) {
  .ports-quick-nav {
    padding: 0.65rem 0.72rem;
    border-radius: 16px;
    gap: 0.52rem;
  }

  .port-filter-pill,
  .port-mode-btn {
    padding: 0.3rem 0.58rem;
    font-size: 0.72rem;
  }

  .port-bot-since-bar {
    grid-template-columns: 1fr;
    gap: 0.55rem;
    padding: 0.62rem 0.68rem;
  }

  .port-since-date-input,
  #bindBotStartDate,
  #editBotStartDate,
  .port-search-input {
    font-size: 16px; /* Prevent iOS Safari zoom on tap */
  }

  .client-shell .bound-inspector-tabs.has-3-tabs {
    display: grid;
    grid-template-columns: 1.08fr 0.92fr 0.95fr auto;
    gap: 0.26rem;
  }

  .client-shell .bound-inspector-tabs.has-3-tabs .bound-insp-tab {
    padding: 0.44rem 0.24rem;
    font-size: 0.7rem;
  }

  .daily-summary-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.42rem;
  }

  .daily-pnl-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.45rem;
    padding: 0.58rem 0.65rem;
  }

  .daily-row-bar-wrap {
    display: none;
  }

  .compact-port-row-sub {
    font-size: 0.72rem;
  }
}

/* ==========================================================================
   Clean Unified Master Stats Inspector (#live-stats) & Mobile Sale Page Polish
   ========================================================================== */
.master-inspector-box {
  padding: 1.15rem 1.25rem;
}

.master-insp-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.master-insp-tabs {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.28rem;
  border-radius: 14px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.master-insp-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.48rem 0.9rem;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.16s ease;
}

.master-insp-tab:hover {
  color: #0f172a;
}

.master-insp-tab.active {
  background: #ffffff;
  color: #0e4d4f;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.master-tab-count {
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.1rem 0.46rem;
  border-radius: 999px;
  background: rgba(14, 77, 79, 0.1);
  color: #0e4d4f;
}

.master-insp-tab.active .master-tab-count {
  background: #0e4d4f;
  color: #ecfccb;
}

.master-month-strip {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  overflow-x: auto;
  padding-bottom: 0.45rem;
  margin-bottom: 0.55rem;
  scrollbar-width: none;
}

.master-month-strip::-webkit-scrollbar {
  display: none;
}

.master-month-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.master-month-pill:hover {
  border-color: #0f766e;
  background: #ffffff;
}

.master-month-pill.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ffffff;
}

.master-month-pill small {
  font-size: 0.68rem;
  opacity: 0.85;
  padding: 0.04rem 0.34rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.07);
}

.master-month-pill.active small {
  background: rgba(236, 252, 203, 0.22);
  color: #ecfccb;
}

.master-mobile-card-list {
  display: none;
}

@media (max-width: 768px) {
  /* Clean Single-Row App Header on Sale Page Mobile */
  body[data-page="sale"] #headerLoginBtn,
  body[data-page="sale"] #headerPortalBtn {
    display: none;
  }

  body[data-page="sale"] .header-inner {
    min-height: 58px;
    gap: 0.45rem;
  }

  body[data-page="sale"] .pwa-install-text {
    display: none;
  }

  body[data-page="sale"] .btn-pwa-install {
    padding: 0.38rem 0.56rem;
  }

  /* Sleek Mobile Spacing & Typography across Sale Page */
  body[data-page="sale"] .hero-section {
    padding: 1.5rem 0 1.85rem;
  }

  body[data-page="sale"] .hero-title {
    font-size: 1.58rem;
    line-height: 1.28;
  }

  body[data-page="sale"] .hero-desc {
    font-size: 0.9rem;
    margin-bottom: 1.1rem;
  }

  body[data-page="sale"] .section {
    padding: 2.15rem 0;
  }

  body[data-page="sale"] .section-head {
    margin-bottom: 1.25rem;
  }

  body[data-page="sale"] .section-title {
    font-size: 1.32rem;
  }

  body[data-page="sale"] .section-desc {
    font-size: 0.86rem;
  }

  /* Compact Bot Showcase Cards on Mobile (1 Card Fits Cleanly on Screen) */
  body[data-page="sale"] .bot-shot-wrap {
    height: 176px;
  }

  body[data-page="sale"] .bot-card-body {
    padding: 0.95rem 1rem 1.05rem;
    gap: 0.55rem;
  }

  body[data-page="sale"] .bot-card-title {
    font-size: 1.05rem;
  }

  body[data-page="sale"] .bot-card-summary {
    font-size: 0.82rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body[data-page="sale"] .bot-highlights {
    display: none;
  }

  body[data-page="sale"] .bot-mini-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    padding: 0.65rem 0.72rem;
  }

  body[data-page="sale"] .bot-mini-metrics > div:last-child {
    grid-column: 1 / -1;
    border-top: 1px dashed #e2e8f0;
    padding-top: 0.38rem;
  }

  /* Horizontal Swipeable Bot Tabs & Compact 2-Col KPI Grid in #live-stats */
  .stats-toolbar {
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }

  .stats-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    width: 100%;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }

  .stats-tabs::-webkit-scrollbar {
    display: none;
  }

  .stats-tab {
    flex: 0 0 auto;
    padding: 0.48rem 0.82rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .stats-status-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .source-badge {
    font-size: 0.72rem;
    padding: 0.28rem 0.65rem;
  }

  body[data-page="sale"] .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.52rem;
    margin-bottom: 0.9rem;
  }

  body[data-page="sale"] .kpi-card {
    padding: 0.72rem 0.78rem;
    border-radius: 13px;
  }

  body[data-page="sale"] .kpi-label {
    font-size: 0.7rem;
    margin-bottom: 0.15rem;
  }

  body[data-page="sale"] .kpi-val {
    font-size: 0.96rem;
  }

  body[data-page="sale"] .kpi-val-sm {
    font-size: 0.78rem;
    line-height: 1.28;
  }

  body[data-page="sale"] .kpi-sub {
    font-size: 0.68rem;
  }

  /* Master 3-Tab Inspector Mobile Layout */
  .master-inspector-box {
    padding: 0.82rem 0.78rem;
    border-radius: 16px;
  }

  .master-insp-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 0.24rem;
    padding: 0.24rem;
  }

  .master-insp-tab {
    padding: 0.44rem 0.25rem;
    font-size: 0.72rem;
    gap: 0.24rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .master-tab-count {
    font-size: 0.65rem;
    padding: 0.06rem 0.34rem;
  }

  .master-desktop-table-wrap {
    display: none !important;
  }

  .master-mobile-card-list {
    display: flex !important;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
  }
}

/* ==========================================================================
   Allowed Symbols Filter Chips (Port Card, Bind Form & Settings Modal)
   ========================================================================== */
.sym-filter-form-box {
  background: #f8fafc;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.48rem;
}

.sym-filter-head-row,
.port-sym-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.sym-summary-badge,
.port-sym-active-badge {
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sym-summary-badge.is-filtered,
.port-sym-active-badge.is-filtered {
  background: #ecfccb;
  color: #1a2e05;
  border: 1px solid #bef264;
}

.sym-chip-group,
.port-sym-chip-strip {
  display: flex;
  align-items: center;
  gap: 0.36rem;
  flex-wrap: wrap;
}

.sym-filter-chip {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  min-height: 33px;
  padding: 0.24rem 0.66rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.sym-filter-chip:hover {
  border-color: var(--brand-deep-teal);
  color: var(--brand-deep-teal);
}

.sym-filter-chip.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ecfccb;
  box-shadow: 0 2px 6px rgba(14, 77, 79, 0.18);
}

.sym-filter-chip.sym-chip-custom {
  border-style: dashed;
  color: #0f766e;
  background: #f0fdfa;
}

.sym-filter-chip.sym-chip-custom.active {
  border-style: solid;
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.sym-custom-input-wrap {
  margin-top: 0.15rem;
}

.sym-custom-input {
  margin-bottom: 0 !important;
  font-size: 0.82rem;
  padding: 0.48rem 0.72rem;
}

.port-sym-filter-section {
  grid-column: 1 / -1;
  padding-top: 0.55rem;
  margin-top: 0.08rem;
  border-top: 1px dashed rgba(15, 118, 110, 0.2);
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

.port-sym-custom-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.12rem;
}

.port-sym-custom-input {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  padding: 0.36rem 0.65rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}

.port-sym-custom-input:focus {
  outline: none;
  border-color: var(--brand-deep-teal);
}

.port-sym-custom-save {
  flex-shrink: 0;
  min-height: 36px;
  padding: 0 0.82rem;
  border-radius: 10px;
  border: none;
  background: #0e4d4f;
  color: #ecfccb;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.compact-port-sym-pill {
  font-size: 0.67rem;
  font-weight: 800;
  padding: 0.12rem 0.46rem;
  border-radius: 999px;
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .port-sym-chip-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 0.12rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .port-sym-chip-strip::-webkit-scrollbar {
    display: none;
  }

  .sym-filter-chip {
    min-height: 34px;
    padding: 0.24rem 0.6rem;
    font-size: 0.73rem;
  }
}

/* ==========================================================================
   Self-Accepted Risk Capital Safety Guard Unlock & Modal
   ========================================================================== */
.bound-status-msg.msg-blocked.has-cap-override {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
}

.bound-status-msg.msg-blocked .msg-blocked-text {
  flex: 1 1 280px;
  line-height: 1.45;
}

.btn-cap-override-unlock {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.48rem 0.92rem;
  border-radius: 10px;
  border: 1.5px solid #b45309;
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(180, 83, 9, 0.24);
  transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.btn-cap-override-unlock:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(180, 83, 9, 0.32);
}

.bound-ib-strip.cap-override-strip {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.btn-req-ib.btn-relock-cap {
  border-color: #d97706;
  color: #92400e;
  background: #ffffff;
  font-weight: 800;
}

.btn-req-ib.btn-relock-cap:hover {
  background: #fef3c7;
}

.cap-guard-chk-label {
  display: flex;
  align-items: flex-start;
  gap: 0.52rem;
  padding: 0.58rem 0.72rem;
  margin-bottom: 0.65rem;
  border-radius: 11px;
  background: #fffbeb;
  border: 1px dashed #f59e0b;
  color: #78350f;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.4;
  cursor: pointer;
}

.cap-guard-chk-label input[type="checkbox"] {
  margin-top: 0.15rem;
  width: 17px;
  height: 17px;
  accent-color: #d97706;
  flex-shrink: 0;
  cursor: pointer;
}

.cap-override-modal-card {
  max-width: 520px;
  width: 94%;
  padding: 1.35rem 1.4rem;
  border-radius: 20px;
  background: #ffffff;
  text-align: left;
}

.cap-override-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.55rem;
}

.cap-override-port-meta {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0e4d4f;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 0.42rem 0.68rem;
  border-radius: 10px;
}

.cap-override-reason-box {
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.45;
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 0.62rem 0.78rem;
  border-radius: 11px;
}

.cap-override-bullets {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  line-height: 1.45;
  color: #334155;
}

.cap-override-ack-box {
  display: flex;
  align-items: flex-start;
  gap: 0.58rem;
  padding: 0.68rem 0.8rem;
  border-radius: 12px;
  background: #fffbeb;
  border: 1.5px solid #f59e0b;
  color: #78350f;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.42;
  cursor: pointer;
}

.cap-override-ack-box input[type="checkbox"] {
  margin-top: 0.16rem;
  width: 19px;
  height: 19px;
  accent-color: #d97706;
  flex-shrink: 0;
  cursor: pointer;
}

.btn-cap-confirm {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
  border: none;
  font-weight: 800;
}

.btn-cap-confirm:disabled {
  opacity: 0.48;
  cursor: not-allowed;
  filter: grayscale(0.25);
}

@media (max-width: 768px) {
  .btn-cap-override-unlock {
    width: 100%;
    padding: 0.54rem 0.85rem;
    font-size: 0.79rem;
  }

  .cap-override-modal-card {
    width: 100%;
    max-width: 100%;
    border-radius: 22px 22px 0 0;
    padding: 1.2rem 1.1rem calc(1.25rem + env(safe-area-inset-bottom, 0px));
  }
}

/* Admin Per-Master Minimum Capital Guardrail Box */
.adm-cap-guard-box {
  margin: 0.75rem 0;
  padding: 0.78rem 0.9rem;
  border-radius: 13px;
  background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
  border: 1px solid #fdba74;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.adm-cap-guard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.adm-cap-guard-tip {
  font-size: 0.74rem;
  font-weight: 700;
  color: #9a3412;
  background: rgba(251, 146, 60, 0.16);
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
}

.adm-cap-guard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.6rem;
}

.adm-cap-guard-grid .field-input {
  margin-bottom: 0;
  background: #ffffff;
}

.adm-cap-guard-preview {
  font-size: 0.76rem;
  font-weight: 700;
  color: #7c2d12;
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #fb923c;
  border-radius: 9px;
  padding: 0.42rem 0.65rem;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .adm-cap-guard-grid {
    grid-template-columns: 1fr;
  }
}

/* Yellow Capital Hint Box Dynamic Minimum Requirement Footer (/client) */
.capital-hint-top {
  line-height: 1.48;
}

.capital-hint-min-row {
  margin-top: 0.48rem;
  padding-top: 0.44rem;
  border-top: 1px dashed rgba(180, 83, 9, 0.32);
  font-size: 0.8rem;
  font-weight: 800;
  color: #9a3412;
  line-height: 1.42;
}

/* =========================================================================
   Client Portal UX v3 — High-Contrast Visual Hierarchy & Mobile Zero-Clutter
   ========================================================================= */

.client-shell .client-main {
  padding-top: 1.15rem;
}

.client-shell .portal-dashboard {
  gap: 0.85rem;
}

.client-shell .portal-user-bar {
  padding: 0.72rem 1.05rem;
  border-radius: 16px;
  gap: 0.65rem;
}

.client-shell .portal-avatar {
  width: 34px;
  height: 34px;
  font-size: 0.92rem;
}

.client-shell .portal-user-title {
  gap: 0.45rem;
  font-size: 0.94rem;
}

.client-shell .portal-user-meta {
  font-size: 0.76rem;
  margin-top: 0.08rem;
  opacity: 0.86;
}

.client-shell .portal-user-actions {
  gap: 0.45rem;
}

.client-shell .client-ports-head {
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

/* Bound Port Card — Crisp Spacing & Visual Priority */
.bound-acc-card.is-expanded {
  padding: 1.1rem 1.15rem;
  gap: 0.7rem;
  border-radius: 20px;
  border: 1px solid #dbe4ec;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.bound-acc-id-block {
  min-width: 0;
}

.bound-acc-title-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.bound-acc-top .bound-acc-name {
  font-size: 1.06rem;
  font-weight: 800;
  color: #062a2d;
  line-height: 1.25;
}

.bound-acc-top .bound-acc-sub {
  margin-top: 0.14rem;
  font-size: 0.76rem;
  color: #64748b;
}

/* Live Sync Bar with Direct Inline Skip Reason */
.port-live-sync-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.52rem 0.78rem;
  border-radius: 12px;
  font-size: 0.81rem;
  line-height: 1.42;
}

.port-live-sync-bar .sync-main-txt {
  flex: 1;
  min-width: 0;
}

.port-live-sync-bar.is-diff {
  background: #fffbeb;
  border: 1px solid #f59e0b;
  color: #78350f;
}

.port-live-sync-bar.is-diff .sync-reason-inline {
  font-weight: 700;
  color: #b45309;
}

.port-live-sync-bar.is-match {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.port-live-sync-bar.is-match .sync-reason-inline {
  font-weight: 600;
  color: #047857;
}

.port-live-sync-bar .sync-age-txt {
  flex-shrink: 0;
  font-size: 0.72rem;
  opacity: 0.8;
  white-space: nowrap;
}

/* Zone 2: High-Contrast Hero Financial Scorecard */
.port-hero-scorecard {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.port-hero-dark-row {
  background: linear-gradient(135deg, #072f32 0%, #0e4d4f 58%, #115e59 100%);
  color: #f8fafc;
  border-radius: 16px;
  padding: 0.88rem 1rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  box-shadow: 0 8px 20px rgba(14, 77, 79, 0.18);
  position: relative;
}

.port-hero-primary-cell {
  min-width: 0;
}

.port-hero-primary-cell.is-right {
  text-align: right;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding-left: 0.75rem;
}

.port-hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(226, 232, 240, 0.82);
  letter-spacing: 0.01em;
  margin-bottom: 0.16rem;
}

.port-hero-big-val {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.18;
  color: #ffffff;
  letter-spacing: -0.01em;
}

.port-hero-big-val small {
  font-size: 0.78rem;
  font-weight: 700;
  opacity: 0.85;
}

.port-hero-big-val.hero-pos {
  color: #bef264;
}

.port-hero-big-val.hero-neg {
  color: #fda4af;
}

.port-hero-sub {
  margin-top: 0.22rem;
  font-size: 0.72rem;
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.3;
}

.port-hero-live-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.port-hero-live-row.has-3-tiles {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.port-live-tile {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 0.58rem 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}

.port-live-tile.is-dd-tile.has-dd {
  background: #fffdf5;
  border-color: #fde68a;
}

@media (max-width: 640px) {
  .port-hero-live-row.has-3-tiles {
    grid-template-columns: 1fr 1fr;
  }

  .port-hero-live-row.has-3-tiles .port-live-tile.is-dd-tile {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.18rem 0.55rem;
  }

  .port-hero-live-row.has-3-tiles .port-live-tile.is-dd-tile .port-live-tile-sub {
    width: 100%;
  }
}

.port-live-tile-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.port-live-tile-val {
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.24;
}

.port-live-tile-sub {
  font-size: 0.71rem;
  color: #64748b;
}

/* Zone 3: 1-Row Quick Config Pill Strip + Smooth Inline Drawers */
.port-quick-config-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.port-quick-config-strip {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  flex-wrap: wrap;
}

.port-quick-bot-pill {
  flex: 1 1 180px;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  padding: 0.34rem 0.55rem;
}

.quick-pill-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.bound-bot-select-compact {
  width: 100%;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  outline: none;
  padding: 0.08rem 0;
}

.port-quick-drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.65rem;
  border-radius: 11px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.port-quick-drawer-btn:hover {
  border-color: #0e4d4f;
  background: #f8fafc;
}

.port-quick-drawer-btn.is-filtered {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.port-quick-drawer-btn.is-open {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ffffff;
}

.quick-caret {
  font-size: 0.7rem;
  opacity: 0.8;
}

.port-inline-drawer {
  background: #f8fafc;
  border: 1px solid #dbe4ec;
  border-radius: 13px;
  padding: 0.62rem 0.72rem;
}

.port-date-drawer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.daily-compact-meta-strip {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  font-size: 0.76rem;
  color: #475569;
  padding: 0.1rem 0.15rem 0.45rem;
}

.cap-override-micro-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.38rem 0.62rem;
  border-radius: 9px;
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.cap-override-micro-pill:hover {
  background: #fef3c7;
}

/* Streamlined Bind New Port Form — Collapsible Advanced Drawer */
.portal-bind-card .field-input {
  margin-bottom: 0.65rem;
}

.portal-bind-card .capital-hint-box {
  margin-top: -0.15rem;
  margin-bottom: 0.7rem;
  padding: 0.58rem 0.75rem;
  font-size: 0.77rem;
  border-radius: 11px;
}

.portal-bind-card .vault-security-note {
  margin-top: -0.25rem;
  margin-bottom: 0.68rem;
  padding: 0.42rem 0.65rem;
  font-size: 0.74rem;
}

.bind-adv-toggle-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.58rem 0.78rem;
  margin-bottom: 0.68rem;
  border-radius: 12px;
  border: 1px dashed #94a3b8;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.bind-adv-toggle-btn:hover,
.bind-adv-toggle-btn.is-open {
  border-style: solid;
  border-color: #0e4d4f;
  background: #f0fdfa;
}

.bind-adv-right {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.bind-adv-summary-pill {
  font-size: 0.71rem;
  font-weight: 700;
  color: #0e4d4f;
  background: rgba(14, 77, 79, 0.09);
  padding: 0.16rem 0.48rem;
  border-radius: 999px;
  max-width: 185px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bind-advanced-drawer {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.78rem;
  margin-bottom: 0.72rem;
}

.portal-bind-card .bind-ib-claim-box {
  padding: 0.62rem 0.78rem;
  margin-bottom: 0.65rem;
}

.portal-bind-card .client-manual-ea-box {
  margin-top: 0.65rem;
  padding-top: 0.55rem;
  font-size: 0.75rem;
  text-align: center;
}

@media (max-width: 960px) {
  .client-shell .client-main {
    padding-top: 0.65rem;
  }

  .client-shell .portal-dashboard {
    gap: 0.6rem;
  }

  /* Ultra-compact 1-row mobile user bar — no stacked full-width buttons! */
  .client-shell .portal-user-bar {
    padding: 0.5rem 0.75rem !important;
    border-radius: 14px;
    flex-wrap: nowrap;
    align-items: center;
  }

  .client-shell .portal-user-bar .portal-user-info {
    min-width: 0;
    flex: 1;
  }

  .client-shell .portal-user-bar .portal-user-actions {
    width: auto !important;
    display: flex !important;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .client-shell #portalRefreshBtn {
    display: none !important;
  }

  .client-shell #clientQuickUpgradeBtn {
    width: auto !important;
    padding: 0.38rem 0.68rem !important;
    font-size: 0.74rem !important;
    border-radius: 999px !important;
    white-space: nowrap;
  }

  .client-shell .client-kpi-grid.hidden {
    display: none !important;
  }

  /* Hide redundant section header on mobile when ports are already visible (Bottom Nav has + Add Port!) */
  .client-shell .client-ports-head.mobile-ports-head-compact {
    display: none !important;
  }

  .client-shell .bound-acc-card.is-expanded {
    padding: 0.88rem;
    gap: 0.58rem;
    border-radius: 17px;
  }

  .port-hero-dark-row {
    padding: 0.75rem 0.82rem;
    gap: 0.55rem;
    border-radius: 14px;
  }

  .port-hero-big-val {
    font-size: 1.18rem;
  }

  .port-hero-primary-cell.is-right {
    padding-left: 0.55rem;
  }

  .port-live-tile {
    padding: 0.48rem 0.65rem;
  }

  .port-live-tile-val {
    font-size: 0.98rem;
  }

  .port-quick-bot-pill {
    flex: 1 1 135px;
    padding: 0.3rem 0.48rem;
  }

  .bound-bot-select-compact {
    font-size: 0.76rem;
  }

  .port-quick-drawer-btn {
    padding: 0.35rem 0.52rem;
    font-size: 0.73rem;
  }

  .bind-cred-grid {
    grid-template-columns: 1.15fr 0.85fr !important;
    gap: 0.5rem !important;
  }

  .bind-adv-toggle-btn {
    flex-wrap: wrap;
  }
}

@media (max-width: 960px) {
  /* Hide empty dashed box on mobile when 0 ports bound so Bind Form sits right at top */
  .client-shell .portal-accounts-col.mobile-empty-ports-col {
    display: none !important;
  }
}

@media (max-width: 560px) {
  .client-header .header-inner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.35rem;
  }

  .client-header .brand-title {
    font-size: 0.94rem;
  }

  .client-header #clientInstallAppBtn {
    padding: 0.36rem 0.52rem;
  }

  .client-header #clientInstallAppBtn .pwa-install-text {
    display: none;
  }

  .client-header #clientBackSaleLink {
    padding: 0.36rem 0.58rem;
    font-size: 0.74rem;
  }
}

/* ==========================================================================
   Client Portal 2-Zone Visual Separation, Left Accent Bars & Focus Framing
   ========================================================================== */

/* Zone 1: Tinted Dark-Teal Portfolio Total Container */
.client-shell .client-kpi-grid {
  background: linear-gradient(135deg, #0b3b3d 0%, #135d60 100%);
  border: 1px solid rgba(167, 243, 208, 0.28);
  border-radius: 22px;
  padding: 1rem 1.05rem;
  gap: 0.72rem;
  box-shadow: 0 12px 28px rgba(6, 42, 45, 0.14);
}

.client-shell .client-kpi-grid .portfolio-zone-head {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0 0.15rem 0.15rem;
}

.client-shell .client-kpi-grid .portfolio-zone-eyebrow {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #a7f3d0;
}

.client-shell .client-kpi-grid .portfolio-zone-pill {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ecfdf5;
  white-space: nowrap;
}

.client-shell .client-kpi-grid .kpi-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.client-shell .client-kpi-grid .kpi-label {
  color: #cbd5e1;
}

.client-shell .client-kpi-grid .kpi-val {
  color: #ffffff;
}

.client-shell .client-kpi-grid .kpi-sub {
  color: rgba(241, 245, 249, 0.82);
}

.client-shell .client-kpi-grid .pnl-pos,
.client-shell .client-kpi-grid .text-emerald {
  color: #6ee7b7 !important;
}

.client-shell .client-kpi-grid .pnl-neg {
  color: #fda4af !important;
}

.client-shell .client-kpi-grid .text-amber {
  color: #fcd34d !important;
}

/* Zone 2: Cool-Slate Tray for Individual MT5 Account Cards */
.client-shell .portal-accounts-tray {
  background: #e9eff5;
  border: 1px solid #d5dfe9;
  border-radius: 22px;
  padding: 0.9rem;
}

.ports-zone-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-bottom: 0.38rem;
  border-bottom: 1px solid #e2e8f0;
}

.ports-zone-title-left {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.ports-zone-heading {
  font-size: 0.85rem;
  font-weight: 800;
  color: #0f172a;
}

.ports-zone-live-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
  background: #d1fae5;
  color: #065f46;
}

.ports-zone-tap-hint {
  font-size: 0.73rem;
  font-weight: 700;
  color: #475569;
}

/* Account Mode Pills (DEMO / REAL CENT / REAL USD) */
.port-acct-type-pill {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.12rem 0.44rem;
  border-radius: 6px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.port-acct-type-pill.acct-type-demo {
  background: #f3e8ff;
  color: #6b21a8;
  border-color: #d8b4fe;
}

.port-acct-type-pill.acct-type-real-cent {
  background: #e0f2fe;
  color: #0369a1;
  border-color: #7dd3fc;
}

.port-acct-type-pill.acct-type-real-usd {
  background: #fef3c7;
  color: #92400e;
  border-color: #fcd34d;
}

/* Compact Port Card: 5px Left Status/PnL Accent Bar + Soft Today Capsule */
.bound-acc-card.is-compact {
  border: 1px solid #cbd5e1;
  border-left-width: 5px;
  border-left-color: #10b981;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

.bound-acc-card.is-compact.accent-live-pos {
  border-left-color: #10b981;
}

.bound-acc-card.is-compact.accent-live-neg {
  border-left-color: #f59e0b;
}

.bound-acc-card.is-compact.accent-paused {
  border-left-color: #94a3b8;
}

.bound-acc-card.is-compact.accent-blocked {
  border-left-color: #ef4444;
}

.bound-accounts-list.has-expanded-port .bound-acc-card.is-compact {
  opacity: 0.78;
}

.bound-accounts-list.has-expanded-port .bound-acc-card.is-compact:hover {
  opacity: 1;
}

.compact-today-capsule {
  display: inline-flex;
  align-items: baseline;
  gap: 0.3rem;
  flex-shrink: 0;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #334155;
}

.compact-today-capsule.is-pos {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}

.compact-today-capsule.is-pos .compact-today-label {
  color: #065f46;
}

.compact-today-capsule.is-neg {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.compact-today-capsule.is-neg .compact-today-label {
  color: #b91c1c;
}

/* Expanded Port Card: Crisp 2px Deep-Teal Focus Frame + Tinted Header */
.bound-acc-card.is-expanded {
  border: 2px solid #0e4d4f;
  box-shadow: 0 14px 32px rgba(14, 77, 79, 0.14);
  overflow: hidden;
}

.bound-acc-card.is-expanded .bound-acc-top {
  background: linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
  border-bottom: 1px solid #ccfbf1;
  margin: -1.35rem -1.35rem 0.1rem;
  padding: 0.95rem 1.35rem;
  cursor: pointer;
}

.btn-port-collapse-bottom {
  width: 100%;
  margin-top: 0.1rem;
  padding: 0.48rem 0.8rem;
  border-radius: 10px;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #475569;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-port-collapse-bottom:hover {
  background: #f0fdfa;
  border-color: #14b8a6;
  color: #0e4d4f;
}

@media (max-width: 760px) {
  .client-shell .client-kpi-grid {
    padding: 0.78rem 0.82rem;
    border-radius: 18px;
    gap: 0.5rem;
  }

  .client-shell .portal-accounts-tray {
    padding: 0.68rem;
    border-radius: 18px;
  }

  .client-shell .bound-acc-card.is-expanded .bound-acc-top {
    margin: -0.88rem -0.88rem 0.1rem;
    padding: 0.78rem 0.88rem;
  }

  .compact-today-capsule {
    padding: 0.18rem 0.52rem;
    font-size: 0.76rem;
  }
}

/* ==========================================================================
   Sale Page Sticky IB Partner Bar & Multi-Zone Visual Separation
   ========================================================================== */

.sticky-ib-ribbon {
  background: linear-gradient(90deg, #06282a 0%, #0e4d4f 52%, #0f5e59 100%);
  border-top: 1px solid rgba(183, 241, 90, 0.24);
  border-bottom: 1px solid rgba(6, 40, 42, 0.45);
  color: #f8fafc;
  padding: 0.44rem 0;
  box-shadow: 0 6px 18px rgba(6, 40, 42, 0.14);
}

.sticky-ib-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sticky-ib-copy {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  font-size: 0.82rem;
  color: #ecfdf5;
}

.sticky-ib-copy strong {
  color: #bef264;
  font-weight: 800;
}

.sticky-ib-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 0.15rem 0.52rem;
  border-radius: 999px;
  background: rgba(183, 241, 90, 0.18);
  border: 1px solid rgba(183, 241, 90, 0.45);
  color: #d9f99d;
}

.sticky-ib-txt-mobile,
.sticky-ib-claim-mob {
  display: none;
}

.sticky-ib-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.sticky-ib-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.34rem 0.85rem;
  border-radius: 999px;
  background: var(--brand-lime);
  color: #06282a;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 3px 10px rgba(183, 241, 90, 0.28);
  transition: transform 0.15s ease, background 0.15s ease;
}

.sticky-ib-btn-primary:hover {
  background: var(--brand-lime-hover);
  transform: translateY(-1px);
}

.sticky-ib-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.32rem 0.76rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sticky-ib-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.22);
  border-color: rgba(255, 255, 255, 0.48);
}

/* Zone 1: Sale Hero Tinted Surface & Framed Trust Chips */
body[data-page="sale"] section[id] {
  scroll-margin-top: 118px;
}

body[data-page="sale"] .hero-section {
  background:
    radial-gradient(circle at 86% 18%, rgba(21, 122, 125, 0.15), transparent 44%),
    radial-gradient(circle at 10% 85%, rgba(183, 241, 90, 0.18), transparent 40%),
    linear-gradient(180deg, #e8f3f3 0%, #f5f9fb 100%);
  border-bottom: 1px solid #cfe0e3;
}

body[data-page="sale"] .trust-pill-item {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.04);
}

/* Zone 2: 3 Steps with Top Accent Bars */
body[data-page="sale"] #how-it-works {
  background: #ffffff;
  border-top: none;
  border-bottom: 1px solid #d5dfe9;
}

body[data-page="sale"] .step-card {
  border: 1.5px solid #cbd5e1;
  border-top: 5px solid #0e4d4f;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body[data-page="sale"] .step-num {
  background: linear-gradient(135deg, #0b3b3d 0%, #157a7d 100%);
  color: #d9f99d;
  box-shadow: 0 6px 14px rgba(14, 77, 79, 0.22);
}

/* Zone 3: 5 Master EAs on Cool-Slate Canvas + Dark-Emerald Scorecard */
body[data-page="sale"] #bots {
  background: #e8eff5;
  border-bottom: 1px solid #cfdbe6;
}

body[data-page="sale"] .bot-card {
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

body[data-page="sale"] .bot-card:hover {
  border-color: #0e4d4f;
  box-shadow: 0 18px 38px rgba(14, 77, 79, 0.14);
}

body[data-page="sale"] .bot-mini-metrics {
  background: linear-gradient(135deg, #0b3b3d 0%, #135d60 100%);
  border: 1px solid rgba(167, 243, 208, 0.25);
  padding: 0.9rem 0.95rem;
}

body[data-page="sale"] .bot-mm-label {
  color: #cbd5e1;
}

body[data-page="sale"] .bot-mm-val {
  color: #ffffff;
}

body[data-page="sale"] .bot-mini-metrics .pnl-pos {
  color: #6ee7b7;
}

body[data-page="sale"] .bot-mini-metrics .pnl-neg {
  color: #fda4af;
}

body[data-page="sale"] .bot-mini-metrics .text-amber {
  color: #fcd34d;
}

/* Zone 4: Live Stats Explorer with Dark-Teal KPI Tray + Framed Inspector */
body[data-page="sale"] #live-stats {
  background: #f2f6fa;
  border-top: none;
  border-bottom: 1px solid #d5dfe9;
}

body[data-page="sale"] #live-stats .kpi-grid {
  background: linear-gradient(135deg, #0b3b3d 0%, #135d60 100%);
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid rgba(167, 243, 208, 0.28);
  box-shadow: 0 14px 30px rgba(6, 42, 45, 0.14);
}

body[data-page="sale"] #live-stats .kpi-card {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

body[data-page="sale"] #live-stats .kpi-label {
  color: #cbd5e1;
}

body[data-page="sale"] #live-stats .kpi-val {
  color: #ffffff;
}

body[data-page="sale"] #live-stats .kpi-sub {
  color: rgba(241, 245, 249, 0.84);
}

body[data-page="sale"] #live-stats .kpi-grid .pnl-pos {
  color: #6ee7b7 !important;
}

body[data-page="sale"] #live-stats .kpi-grid .pnl-neg {
  color: #fda4af !important;
}

body[data-page="sale"] #live-stats .kpi-grid .text-amber {
  color: #fcd34d !important;
}

body[data-page="sale"] .master-inspector-box {
  border: 2px solid rgba(14, 77, 79, 0.24);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

/* Zone 5: Deep-Teal 6 Guardrails Card vs Framed White Lot Calculator */
body[data-page="sale"] #calculator {
  background: #ffffff;
  border-bottom: 1px solid #d5dfe9;
}

body[data-page="sale"] .guardrails-list-card {
  background: linear-gradient(155deg, #07292b 0%, #0e4d4f 100%);
  border: 1px solid rgba(167, 243, 208, 0.26);
  color: #f8fafc;
  box-shadow: 0 16px 36px rgba(6, 42, 45, 0.16);
}

body[data-page="sale"] .guardrails-list-card .panel-title {
  color: #ecfccb;
}

body[data-page="sale"] .guardrails-list-card .guard-icon {
  background: rgba(183, 241, 90, 0.18);
  border: 1px solid rgba(183, 241, 90, 0.42);
  color: #d9f99d;
}

body[data-page="sale"] .guardrails-list-card .guard-item {
  padding-bottom: 0.72rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body[data-page="sale"] .guardrails-list-card .guard-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

body[data-page="sale"] .guardrails-list-card .guard-item strong {
  color: #ffffff;
}

body[data-page="sale"] .guardrails-list-card .guard-item p {
  color: #cbd5e1;
}

body[data-page="sale"] #calculator .panel-box {
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

/* Zone 6 & 7: Pricing Slate Canvas + Left-Accented FAQ Cards */
body[data-page="sale"] #pricing {
  background: #e8eff5;
  border-top: none;
  border-bottom: 1px solid #cfdbe6;
}

body[data-page="sale"] .plan-card {
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

body[data-page="sale"] .plan-card.featured,
body[data-page="sale"] .plan-card.plan-card-ib-free {
  border: 2.5px solid #0e4d4f;
  box-shadow: 0 18px 40px rgba(14, 77, 79, 0.16);
}

body[data-page="sale"] #faq {
  background: #ffffff;
}

body[data-page="sale"] .faq-card {
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-left: 5px solid #0d9488;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

@media (max-width: 860px) {
  .sticky-ib-badge,
  .sticky-ib-txt-desktop,
  #stickyIbClaimDesk {
    display: none;
  }

  .sticky-ib-txt-mobile {
    display: inline;
    font-size: 0.74rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .sticky-ib-claim-mob {
    display: inline;
  }

  .sticky-ib-inner {
    gap: 0.4rem;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .sticky-ib-actions {
    gap: 0.32rem;
  }

  .sticky-ib-btn-primary {
    padding: 0.28rem 0.62rem;
    font-size: 0.72rem;
  }

  .sticky-ib-btn-secondary {
    padding: 0.27rem 0.52rem;
    font-size: 0.7rem;
  }
}

/* ==========================================================================
   Per-Port Subscription Billing (7d–12m), Balance-Based IB Free & Admin Grant
   ========================================================================== */

/* Sale Page: 7-Duration Pill Selector + 3-Card Layout */
.pricing-duration-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.72rem;
  margin: 0 auto 1.6rem;
  padding: 0.95rem 1.15rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 20px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.05);
}

.pricing-dur-label {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0e4d4f;
  text-align: center;
}

.pricing-dur-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.45rem;
}

.pricing-dur-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
}

.pricing-dur-btn:hover {
  border-color: #0d9488;
  background: #f0fdfa;
  color: #0e4d4f;
}

.pricing-dur-btn.active {
  background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 100%);
  border-color: #062a2d;
  color: #ffffff;
  box-shadow: 0 6px 16px rgba(6, 42, 45, 0.22);
}

.dur-save-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  background: #dcfce7;
  color: #047857;
}

.pricing-dur-btn.active .dur-save-tag {
  background: #b7f15a;
  color: #062a2d;
}

.dur-hot-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  background: #fef3c7;
  color: #b45309;
}

.pricing-dur-btn.active .dur-hot-tag {
  background: #fde047;
  color: #062a2d;
}

.pricing-grid.pricing-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: stretch;
}

.ib-free-callout-pill {
  margin: 0.2rem 0 0.65rem;
  padding: 0.48rem 0.78rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  color: #065f46;
  font-size: 0.81rem;
  font-weight: 800;
  line-height: 1.38;
  text-align: center;
}

/* Client Portal: Per-Port Expiry Pills & Renew Strip */
.port-exp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  border: 1px solid transparent;
}

.port-exp-pill.is-free {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}

.port-exp-pill.is-active {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}

.port-exp-pill.is-warn {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

.port-exp-pill.is-expired,
.port-exp-pill.is-unpaid {
  background: #fef2f2;
  color: #b91c1c;
  border-color: #fecaca;
}

.port-expiry-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.56rem 0.82rem;
  margin-bottom: 0.68rem;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-size: 0.81rem;
  font-weight: 700;
  color: #1e293b;
}

.port-expiry-strip.is-free {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #065f46;
}

.port-expiry-strip.is-active {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0c4a6e;
}

.port-expiry-strip.is-warn {
  background: #fffbeb;
  border-color: #fde68a;
  color: #92400e;
}

.port-expiry-strip.is-expired,
.port-expiry-strip.is-unpaid {
  background: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}

.btn-port-renew {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.36rem 0.82rem;
  border-radius: 999px;
  border: 1px solid #0e4d4f;
  background: #ffffff;
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.77rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.btn-port-renew:hover {
  background: #0e4d4f;
  color: #ffffff;
}

.btn-port-renew.is-urgent {
  background: #b7f15a;
  border-color: #062a2d;
  color: #062a2d;
  box-shadow: 0 4px 12px rgba(183, 241, 90, 0.35);
}

.btn-port-renew.is-urgent:hover {
  background: #a3e635;
}

/* Client Portal Billing Tab: Target Port Selector + 7-Duration Grid */
.pay-target-port-wrap {
  margin-bottom: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(183, 241, 90, 0.32);
}

.pay-target-port-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 800;
  color: #d9f99d;
  margin-bottom: 0.42rem;
}

.pay-target-port-select {
  width: 100%;
  padding: 0.62rem 0.8rem;
  border-radius: 11px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(6, 26, 28, 0.85);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.pay-target-port-select option {
  background: #062a2d;
  color: #ffffff;
}

.pay-target-port-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  font-size: 0.76rem;
}

.pay-port-rate-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.73rem;
}

.pay-port-rate-pill.is-ib {
  background: rgba(183, 241, 90, 0.22);
  border: 1px solid rgba(183, 241, 90, 0.55);
  color: #d9f99d;
}

.pay-port-rate-pill.is-reg {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #e2e8f0;
}

.pay-port-exp-sub {
  color: #cbd5e1;
  font-weight: 600;
}

.pay-tier-grid.pay-duration-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.pay-tier-grid.pay-duration-grid .pay-tier-option {
  padding: 0.7rem 0.82rem;
}

.pay-tier-grid.pay-duration-grid .pay-tier-option.is-test-opt {
  grid-column: 1 / -1;
  border-style: dashed;
}

/* Admin Panel: Per-Port Expiry Pills & Family/VIP Free Grant Controls */
.adm-port-exp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
  margin-left: 0.28rem;
  vertical-align: middle;
}

.adm-port-exp-pill.is-free {
  background: #dcfce7;
  color: #065f46;
  border: 1px solid #86efac;
}

.adm-port-exp-pill.is-active {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}

.adm-port-exp-pill.is-warn {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.adm-port-exp-pill.is-expired,
.adm-port-exp-pill.is-unpaid {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.adm-port-mini-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.32rem;
  margin-top: 0.4rem;
}

.adm-mini-grant-btn {
  padding: 0.18rem 0.52rem !important;
  font-size: 0.71rem !important;
  border-radius: 8px !important;
}

.adm-mini-grant-btn.is-life {
  background: #ecfccb !important;
  border-color: #84cc16 !important;
  color: #1a2e05 !important;
  font-weight: 800 !important;
}

.adm-port-grant-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfeff 100%);
  border: 1.5px solid #86efac;
  border-radius: 14px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.adm-port-grant-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #065f46;
}

.adm-port-grant-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.79rem;
  color: #334155;
  margin-top: 0.28rem;
}

.adm-grant-memo-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 700;
}

.adm-grant-quick-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.adm-grant-btn {
  padding: 0.32rem 0.68rem !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  background: #ffffff !important;
  border-color: #94a3b8 !important;
  color: #0e4d4f !important;
}

.adm-grant-btn:hover {
  background: #0e4d4f !important;
  border-color: #0e4d4f !important;
  color: #ffffff !important;
}

.adm-grant-custom-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) auto auto;
  gap: 0.5rem;
  align-items: center;
}

.adm-grant-note-in,
.adm-grant-num-in,
.adm-grant-date-in {
  margin-bottom: 0 !important;
  padding: 0.42rem 0.62rem !important;
  font-size: 0.8rem !important;
  min-height: 36px;
}

.adm-grant-inline-grp {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.adm-grant-num-in {
  width: 82px !important;
}

.adm-grant-date-in {
  width: 146px !important;
}

@media (max-width: 1480px) {
  .site-header .brand-sub-pill {
    display: none;
  }

  .site-header .btn-header {
    padding: 0.48rem 0.9rem;
    font-size: 0.82rem;
  }

  .site-header .desktop-nav {
    gap: 0.62rem;
    font-size: 0.83rem;
  }
}

@media (max-width: 980px) {
  .pricing-grid.pricing-grid-3 {
    grid-template-columns: 1fr;
  }

  .adm-grant-custom-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .pay-tier-grid.pay-duration-grid {
    grid-template-columns: 1fr;
  }

  .pricing-duration-bar {
    padding: 0.8rem 0.75rem;
  }

  .pricing-dur-btn {
    padding: 0.42rem 0.72rem;
    font-size: 0.78rem;
  }
}

/* ==========================================================================
   Native Mobile App UX & Login Polish for Owner Admin Console (/admin)
   ========================================================================== */
.adm-main-wrap {
  padding-top: 1.55rem;
}

.adm-mob-lbl,
.adm-mobile-role-pill,
.adm-mobile-sync-btn,
.adm-mobile-section-bar,
.adm-mobile-cards-list,
.adm-mobile-trade-list,
.admin-mobile-bottom-nav {
  display: none;
}

/* Upgraded Admin Login Gate (Desktop & Mobile) */
.adm-login-card {
  max-width: 490px;
  margin: 2.5rem auto;
  background: #ffffff;
  border-radius: 24px;
  border: 1px solid #cbd5e1;
  box-shadow: 0 22px 54px rgba(6, 42, 45, 0.14);
  overflow: hidden;
}

.adm-login-hero {
  background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 65%, #115e59 100%);
  color: #f8fafc;
  padding: 1.55rem 1.65rem 1.4rem;
  border-bottom: 1px solid rgba(183, 241, 90, 0.35);
}

.adm-login-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.24rem 0.7rem;
  border-radius: 999px;
  background: rgba(183, 241, 90, 0.18);
  border: 1px solid rgba(183, 241, 90, 0.48);
  color: #d9f99d;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.65rem;
}

.adm-login-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 0.38rem;
  line-height: 1.28;
}

.adm-login-desc {
  font-size: 0.86rem;
  color: #cbd5e1;
  margin: 0;
  line-height: 1.5;
}

.adm-login-body {
  padding: 1.5rem 1.65rem 1.65rem;
}

.adm-login-divider {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0.2rem 0 0.95rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #64748b;
}

.adm-login-divider::before,
.adm-login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Ecosystem Quick Switcher Bar */
.adm-eco-nav {
  padding: 0.78rem 1.05rem;
  margin-bottom: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  background: linear-gradient(90deg, #f0fdf4 0%, #f8fafc 100%);
  border-color: #a7f3d0;
}

.adm-eco-label {
  font-size: 0.84rem;
  font-weight: 800;
  color: #065f46;
  white-space: nowrap;
}

.adm-eco-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.adm-eco-links a {
  text-decoration: none;
  white-space: nowrap;
}

/* Mobile Bottom Sheet Menu */
.adm-sheet-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.adm-sheet-modal.hidden {
  display: none !important;
}

.adm-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(6, 26, 28, 0.58);
  backdrop-filter: blur(4px);
}

.adm-sheet-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  padding: 0.65rem 1.15rem calc(1.35rem + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -18px 46px rgba(6, 26, 28, 0.28);
  animation: admSheetSlideUp 0.2s ease-out;
}

@keyframes admSheetSlideUp {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.adm-sheet-handle {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 0.75rem;
}

.adm-sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.9rem;
}

.adm-sheet-title {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #062a2d;
}

.adm-sheet-sub {
  font-size: 0.76rem;
  color: #047857;
  font-weight: 700;
  margin-top: 0.12rem;
  word-break: break-word;
}

.adm-sheet-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}

.adm-sheet-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.58rem;
  padding: 0.72rem 0.78rem;
  border-radius: 15px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #0f172a;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: all 0.16s ease;
}

.adm-sheet-item.is-full {
  grid-column: 1 / -1;
}

.adm-sheet-item.active {
  background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 100%);
  border-color: #062a2d;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(6, 42, 45, 0.2);
}

.adm-sheet-ico {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.adm-sheet-txt {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.adm-sheet-txt strong {
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.25;
}

.adm-sheet-txt small {
  font-size: 0.69rem;
  color: #64748b;
  margin-top: 0.1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-sheet-item.active .adm-sheet-txt small {
  color: #d9f99d;
}

.adm-sheet-item .adm-tab-badge {
  margin-left: auto;
  flex-shrink: 0;
}

.adm-sheet-eco {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px dashed #cbd5e1;
}

.adm-sheet-eco-lbl {
  font-size: 0.76rem;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 0.45rem;
}

.adm-sheet-eco-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.42rem;
}

.adm-sheet-eco-row a {
  text-decoration: none;
  text-align: center;
  padding: 0.46rem 0.55rem;
  font-size: 0.78rem;
}

.m-bottom-badge.is-amber {
  background: #f59e0b;
  color: #11181c;
}

/* Native Mobile Admin Layout (<= 768px) — Twins with /client Mobile App */
@media (max-width: 768px) {
  body.admin-shell {
    background: #eef2f6;
    min-height: 100dvh;
    padding-bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
    -webkit-tap-highlight-color: transparent;
  }

  body.admin-shell .container {
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }

  /* Compact Single-Row 56px Mobile App Bar */
  .admin-header .header-inner {
    height: 56px;
    min-height: 56px;
    padding-top: 0;
    padding-bottom: 0;
    flex-wrap: nowrap;
    gap: 0.4rem;
  }

  .admin-header .brand-mark {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 1rem;
  }

  .admin-header .brand-title {
    font-size: 0.94rem;
  }

  .admin-header .brand-sub-pill,
  .admin-header .adm-desk-lbl,
  .admin-header #adminPrincipalBadge,
  .admin-header #adminLogoutBtn {
    display: none !important;
  }

  .admin-header .adm-mobile-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.42rem;
    border-radius: 999px;
    background: #062a2d;
    color: #d9f99d;
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.04em;
  }

  .admin-header .adm-mob-lbl {
    display: inline;
  }

  .admin-header .header-actions {
    flex-wrap: nowrap;
    gap: 0.34rem;
  }

  .admin-header .adm-hdr-link {
    padding: 0.34rem 0.6rem !important;
    font-size: 0.73rem !important;
    border-radius: 999px;
    white-space: nowrap;
  }

  .admin-header .adm-mobile-sync-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 33px;
    height: 33px;
    padding: 0;
    border-radius: 9px;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
  }

  .adm-main-wrap {
    padding-top: 0.85rem;
  }

  /* Login Gate Mobile Fit */
  .adm-login-card {
    margin: 0.35rem auto 1.25rem;
    border-radius: 20px;
  }

  .adm-login-hero {
    padding: 1.25rem 1.15rem 1.15rem;
  }

  .adm-login-title {
    font-size: 1.22rem;
  }

  .adm-login-desc {
    font-size: 0.82rem;
  }

  .adm-login-body {
    padding: 1.15rem;
  }

  /* Prevent iOS Safari Auto-Zoom on Admin Inputs */
  body.admin-shell .field-input,
  body.admin-shell select.field-input,
  body.admin-shell textarea.field-input {
    font-size: 16px;
  }

  /* Mobile Section Context Strip */
  .adm-mobile-section-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.72rem 0.92rem;
    margin-bottom: 0.7rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 100%);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(6, 42, 45, 0.16);
  }

  .adm-mob-sec-left {
    min-width: 0;
    flex: 1;
  }

  .adm-mob-sec-left strong {
    display: block;
    font-size: 0.92rem;
    font-weight: 800;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adm-mob-sec-sub {
    display: block;
    font-size: 0.7rem;
    color: #d9f99d;
    font-weight: 600;
    margin-top: 0.08rem;
  }

  .adm-mob-switch-btn {
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(183, 241, 90, 0.55);
    background: rgba(183, 241, 90, 0.16);
    color: #ecfccb;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 800;
    white-space: nowrap;
    cursor: pointer;
    flex-shrink: 0;
  }

  /* Compact 1-Line Horizontal Swipeable Ecosystem Bar */
  .adm-eco-nav {
    padding: 0.52rem 0.72rem;
    margin-bottom: 0.72rem;
    border-radius: 14px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.45rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .adm-eco-nav::-webkit-scrollbar {
    display: none;
  }

  .adm-eco-label {
    font-size: 0.74rem;
    flex-shrink: 0;
  }

  .adm-eco-links {
    flex-wrap: nowrap;
    gap: 0.35rem;
    flex-shrink: 0;
  }

  .adm-eco-links .btn-refresh {
    padding: 0.28rem 0.6rem;
    font-size: 0.73rem;
    border-radius: 999px;
  }

  /* Alert Banners Mobile Stack */
  .adm-slip-alert {
    padding: 0.85rem 0.95rem;
    border-radius: 16px;
    margin-bottom: 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    font-size: 0.83rem;
  }

  .adm-slip-alert span {
    display: block;
    margin-left: 0 !important;
    margin-top: 0.2rem;
    font-size: 0.78rem !important;
  }

  .adm-slip-alert .btn {
    width: 100%;
    justify-content: center;
    min-height: 40px;
  }

  /* Crisp 2x3 Mobile KPI Grid */
  .admin-shell .admin-kpi-row,
  .admin-shell .admin-kpi-row.admin-kpi-row-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
  }

  .admin-shell .admin-kpi-row .kpi-card {
    padding: 0.68rem 0.76rem;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
  }

  .admin-shell .admin-kpi-row .kpi-label {
    font-size: 0.69rem;
    margin-bottom: 0.14rem;
    line-height: 1.25;
  }

  .admin-shell .admin-kpi-row .kpi-val {
    font-size: 1.02rem;
    line-height: 1.22;
  }

  .admin-shell .admin-kpi-row .kpi-sub {
    font-size: 0.67rem;
    margin-top: 0.14rem;
    line-height: 1.3;
  }

  /* Hide Bulky Desktop Tab Toolbar -> Use Fixed Bottom App Bar */
  .adm-desktop-nav-toolbar {
    display: none !important;
  }

  .admin-mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 85;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.15rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(15, 23, 42, 0.09);
    box-shadow: 0 -8px 26px rgba(15, 23, 42, 0.08);
    padding: 0.34rem max(0.3rem, env(safe-area-inset-right, 0px)) calc(0.4rem + env(safe-area-inset-bottom, 0px)) max(0.3rem, env(safe-area-inset-left, 0px));
  }

  .admin-mobile-bottom-nav.hidden {
    display: none !important;
  }

  /* Panels, Headers & Horizontal Swipeable Filter Chips */
  .admin-shell .panel-box {
    padding: 0.95rem 0.9rem;
    border-radius: 18px;
  }

  .admin-shell .panel-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
  }

  .admin-shell .panel-title {
    font-size: 1.04rem;
    line-height: 1.32;
  }

  .admin-shell .panel-sub {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .adm-manage-actions {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .adm-manage-actions .btn,
  .adm-manage-actions .btn-refresh {
    width: 100%;
    min-height: 42px;
    justify-content: center;
  }

  .adm-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    margin-bottom: 0.85rem;
  }

  .adm-search-input {
    min-width: 0;
    width: 100%;
  }

  .admin-shell .stats-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.38rem;
    padding-bottom: 0.15rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .admin-shell .stats-tabs::-webkit-scrollbar {
    display: none;
  }

  .admin-shell .stats-tabs .btn-refresh {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 0.38rem 0.72rem;
    font-size: 0.77rem;
    border-radius: 999px;
  }

  /* Swap Wide Desktop Tables for Native Mobile Cards */
  .admin-shell .adm-desktop-table-wrap {
    display: none !important;
  }

  .admin-shell .adm-mobile-cards-list {
    display: flex !important;
    flex-direction: column;
    gap: 0.72rem;
  }

  .admin-shell .adm-mobile-trade-list {
    display: flex !important;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    background: #ffffff;
    overflow: hidden;
  }

  /* Native Mobile Customer Card */
  .adm-m-cust-card {
    background: #ffffff;
    border: 1px solid #dbe4ee;
    border-left: 4px solid #94a3b8;
    border-radius: 16px;
    padding: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  }

  .adm-m-cust-card.is-live {
    border-left-color: #10b981;
  }

  .adm-m-cust-card.has-attn {
    border-left-color: #ef4444;
  }

  .adm-m-cust-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
  }

  .adm-m-cust-name {
    font-size: 0.96rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
  }

  .adm-m-cust-email {
    font-size: 0.76rem;
    color: #64748b;
    word-break: break-all;
    margin-top: 0.08rem;
  }

  .adm-m-cust-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.4rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.52rem 0.58rem;
  }

  .adm-m-metric span {
    display: block;
    font-size: 0.65rem;
    font-weight: 700;
    color: #64748b;
  }

  .adm-m-metric strong {
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.08rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adm-m-metric small {
    display: block;
    font-size: 0.65rem;
    color: #64748b;
    margin-top: 0.06rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .adm-m-metric small em {
    font-style: normal;
    font-weight: 700;
  }

  .adm-m-cust-actions {
    display: grid;
    grid-template-columns: 1.35fr 1fr;
    gap: 0.45rem;
  }

  .adm-m-cust-actions .adm-btn-detail,
  .adm-m-cust-actions .btn-refresh {
    width: 100%;
    min-height: 40px;
    padding: 0.45rem 0.55rem;
    font-size: 0.77rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
  }

  .adm-port-mini-item {
    padding: 0.6rem 0.68rem;
    border-radius: 12px;
  }

  .adm-port-mini-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.38rem;
    margin-top: 0.48rem;
  }

  .adm-mini-grant-btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Tab 2 Orders & Tab 6 IB Cards Mobile Polish */
  .admin-order-card,
  .adm-order-card {
    padding: 0.88rem;
    border-radius: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0.72rem;
  }

  .admin-order-card > div:last-child {
    width: 100%;
  }

  .admin-order-card .btn,
  .admin-order-card .btn-panic-close {
    flex: 1;
    min-height: 40px;
    justify-content: center;
  }

  /* Tab 3 Masters & Tab 4 Packages Mobile Polish */
  .adm-master-card,
  .adm-pkg-card {
    padding: 0.95rem 0.9rem;
    border-radius: 16px;
    gap: 0.75rem;
  }

  .adm-master-live-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.48rem;
  }

  .adm-pkg-price-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.55rem;
  }

  .adm-fee-inputs-3 {
    grid-template-columns: 1fr;
  }

  /* Full-Screen Bottom Sheet Customer Detail Modal on Mobile */
  #custDetailModal {
    align-items: flex-end;
    padding: 0;
  }

  #custDetailModal .adm-detail-modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 94vh;
    border-radius: 22px 22px 0 0;
  }

  #custDetailModal .adm-detail-modal-header {
    padding: 0.85rem 0.95rem;
    gap: 0.55rem;
  }

  #custDetailModal #custDetailTitle {
    font-size: 0.98rem !important;
    line-height: 1.3;
  }

  #custDetailModal .adm-detail-modal-body {
    padding: 0.85rem 0.85rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
    gap: 0.9rem;
  }

  .adm-cust-profile-bar {
    padding: 0.95rem;
    border-radius: 16px;
    gap: 0.75rem;
  }

  .adm-cust-profile-bar .btn {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }

  .adm-detail-port-card {
    padding: 0.9rem 0.85rem;
    border-radius: 16px;
    gap: 0.78rem;
  }

  .adm-detail-metrics-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.48rem;
  }

  .adm-port-grant-box {
    padding: 0.8rem 0.78rem;
  }

  .adm-grant-quick-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
  }

  .adm-grant-quick-row .btn,
  .adm-grant-quick-row .btn-panic-close {
    grid-column: 1 / -1;
    margin-left: 0 !important;
    min-height: 40px;
    justify-content: center;
  }

  .adm-grant-btn {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .adm-grant-inline-grp {
    display: grid;
    grid-template-columns: 1fr auto;
    width: 100%;
    gap: 0.4rem;
  }

  .adm-grant-num-in,
  .adm-grant-date-in {
    width: 100% !important;
  }
}


/* ==========================================================================
   INSTITUTIONAL LIVE PERFORMANCE & DAILY PROFIT CALENDAR (/performance)
   ========================================================================== */
.perf-page-body {
  background: #f4f7f8;
  color: #0f172a;
}

.perf-site-header {
  background: rgba(255, 255, 255, 0.94);
}

.perf-nav-active {
  color: var(--brand-deep-teal) !important;
  font-weight: 700 !important;
}

.perf-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #a7f3d0;
}

.perf-live-pill.is-cached {
  background: #f1f5f9;
  color: #475569;
  border-color: #cbd5e1;
}

.perf-live-pill.is-backtest {
  background: #fffbeb;
  color: #b45309;
  border-color: #fcd34d;
}

.perf-live-pill.is-backtest .pulse-green {
  background: #f59e0b;
  box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.55);
}

.perf-hero {
  background: linear-gradient(155deg, #072c2e 0%, #0d4547 58%, #0f5659 100%);
  color: #ffffff;
  padding: 2.35rem 0 2.15rem;
  border-bottom: 1px solid rgba(183, 241, 90, 0.16);
}

.perf-hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.45rem;
}

.perf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.26rem 0.78rem;
  border-radius: 999px;
  background: rgba(183, 241, 90, 0.14);
  border: 1px solid rgba(183, 241, 90, 0.34);
  color: #d9f99d;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 0.7rem;
}

.perf-eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #b7f15a;
  box-shadow: 0 0 10px #b7f15a;
}

.perf-hero-title {
  font-size: clamp(1.55rem, 2.7vw, 2.25rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.perf-hero-sub {
  color: rgba(241, 245, 249, 0.86);
  font-size: 0.96rem;
  max-width: 760px;
  line-height: 1.6;
}

.perf-hero-SyncBox {
  min-width: 225px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  padding: 0.85rem 1rem;
  text-align: right;
  backdrop-filter: blur(8px);
}

.perf-sync-label {
  font-size: 0.74rem;
  color: rgba(226, 232, 240, 0.76);
}

.perf-sync-val {
  font-size: 0.88rem;
  font-weight: 600;
  margin: 0.18rem 0 0.5rem;
}

.perf-refresh-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 0.32rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.18s ease;
}

.perf-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* 5 Master Bot Selector Strip */
.perf-bot-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  margin-bottom: 1.15rem;
}

.perf-bot-tab {
  text-align: left;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  padding: 0.72rem 0.82rem;
  color: #ffffff;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s ease;
}

.perf-bot-tab:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-1px);
}

.perf-bot-tab.active {
  background: #ffffff;
  color: #0f172a;
  border-color: #b7f15a;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.22), 0 0 0 2px rgba(183, 241, 90, 0.45);
}

.perf-bot-tab-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.28rem;
}

.perf-bot-sym {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.7rem;
  font-weight: 700;
  opacity: 0.85;
}

.perf-bot-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.perf-bot-dot.online { background: #10b981; box-shadow: 0 0 6px #10b981; }
.perf-bot-dot.idle { background: #94a3b8; }

.perf-bot-open-tag,
.perf-bot-dd-tag {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
}

.perf-bot-open-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
.perf-bot-tab.active .perf-bot-open-tag {
  background: #ecfdf5;
  color: #047857;
}

.perf-bot-dd-tag {
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
}
.perf-bot-tab.active .perf-bot-dd-tag {
  background: #fffbeb;
  color: #b45309;
}

.perf-bot-name {
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.35rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.perf-bot-metrics {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem;
}

.perf-bot-pnl {
  font-size: 0.9rem;
  font-weight: 800;
}
.perf-bot-pnl.is-pos { color: #6ee7b7; }
.perf-bot-pnl.is-neg { color: #fca5a5; }
.perf-bot-tab.active .perf-bot-pnl.is-pos { color: #059669; }
.perf-bot-tab.active .perf-bot-pnl.is-neg { color: #dc2626; }

.perf-bot-wr {
  font-size: 0.72rem;
  opacity: 0.78;
}

/* Controls Bar */
.perf-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 0.65rem 0.9rem;
}

.perf-ctrl-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.perf-ctrl-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: rgba(241, 245, 249, 0.9);
}

.perf-seg-group {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.1);
  padding: 0.22rem;
  border-radius: 10px;
}

.perf-panel .perf-seg-group {
  background: #f1f5f9;
}

.perf-seg-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.36rem 0.72rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.perf-panel .perf-seg-btn {
  color: #475569;
}

.perf-seg-btn.active {
  background: #b7f15a;
  color: #0f172a;
  font-weight: 700;
}

.perf-panel .perf-seg-btn.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
}

.perf-sim-banner {
  margin-top: 0.8rem;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: rgba(183, 241, 90, 0.14);
  border: 1px solid rgba(183, 241, 90, 0.36);
  font-size: 0.83rem;
  color: #f8fafc;
  line-height: 1.5;
}

.perf-sim-banner code {
  background: rgba(255, 255, 255, 0.16);
  padding: 0.08rem 0.38rem;
  border-radius: 5px;
}

.perf-seg-btn.is-bt-btn.active {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(217, 119, 6, 0.35);
}

.perf-panel .perf-seg-btn.is-bt-btn.active {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  color: #ffffff;
}

.perf-bt-banner {
  margin-top: 0.85rem;
  padding: 0.85rem 1.05rem;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2) 0%, rgba(180, 83, 9, 0.22) 100%);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  font-size: 0.84rem;
  color: #fffbeb;
  line-height: 1.55;
}

.perf-bt-banner-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.perf-bt-banner-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.16rem 0.62rem;
  border-radius: 999px;
  background: rgba(251, 191, 36, 0.22);
  border: 1px solid rgba(252, 211, 77, 0.6);
  color: #fde68a;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.perf-bt-banner-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.perf-bt-spec-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.52rem;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.75rem;
  color: #fef3c7;
}

.perf-bt-switch-link {
  border: 1px solid rgba(254, 243, 199, 0.45);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.24rem 0.68rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.16s ease;
}

.perf-bt-switch-link:hover {
  background: rgba(255, 255, 255, 0.24);
}

.perf-panel.is-backtest-mode {
  border-top: 3px solid #f59e0b;
}

.perf-cal-bt-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.9rem;
  padding: 0.6rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.45;
}

.perf-cal-bt-notice strong {
  color: #78350f;
}

.perf-eng-pill {
  display: inline-block;
  padding: 0.08rem 0.42rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
  margin-left: 0.25rem;
}

.perf-eng-pill.is-abx {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

.perf-eng-pill.is-lbx {
  background: #fef3c7;
  color: #b45309;
  border-color: #fde68a;
}

/* 6-Card Executive Scorecard */
.perf-scorecard-section {
  margin-top: -1.1rem;
  padding-bottom: 1.25rem;
}

.perf-scorecard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.perf-kpi-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.05rem 1.15rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.perf-kpi-card.is-hero {
  background: linear-gradient(145deg, #ffffff 0%, #ecfdf5 100%);
  border-color: #a7f3d0;
}

.perf-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
}

.perf-kpi-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
}

.perf-growth-badge {
  background: #059669;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.16rem 0.55rem;
  border-radius: 999px;
}

.perf-kpi-chip {
  background: #f1f5f9;
  color: #334155;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.14rem 0.52rem;
  border-radius: 999px;
}
.perf-kpi-chip.is-amber { background: #fffbeb; color: #b45309; }
.perf-kpi-chip.is-live { background: #dcfce7; color: #15803d; }

.perf-kpi-big {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 0.25rem;
}
.perf-kpi-big.is-pos { color: #059669; }
.perf-kpi-big.is-neg { color: #dc2626; }

.perf-kpi-val {
  font-size: 1.38rem;
  font-weight: 800;
  line-height: 1.25;
  color: #0f172a;
  margin-bottom: 0.3rem;
}

.perf-kpi-muted,
.perf-kpi-unit {
  font-size: 0.9rem;
  font-weight: 600;
  color: #64748b;
}

.perf-kpi-sub {
  font-size: 0.79rem;
  color: #64748b;
}

.perf-winbar {
  height: 7px;
  background: #fee2e2;
  border-radius: 999px;
  overflow: hidden;
  margin: 0.35rem 0 0.4rem;
}

.perf-winbar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #059669);
  border-radius: 999px;
}

.perf-risk-pill {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.16rem 0.55rem;
  border-radius: 8px;
}
.perf-risk-pill.is-low { background: #ecfdf5; color: #047857; }
.perf-risk-pill.is-bal { background: #eff6ff; color: #1d4ed8; }
.perf-risk-pill.is-med { background: #fffbeb; color: #b45309; }

/* Charts Section */
.perf-charts-section {
  padding: 0.35rem 0 1.35rem;
}

.perf-charts-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1rem;
}

.perf-panel {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 1.3rem 1.35rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.perf-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.perf-panel-kicker {
  display: block;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--brand-teal);
  text-transform: uppercase;
}

.perf-panel-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.perf-chart-CalloutRow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.perf-callout-pill {
  font-size: 0.78rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.22rem 0.68rem;
  color: #334155;
}
.perf-callout-pill.is-emerald { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.perf-callout-pill.is-amber { background: #fffbeb; border-color: #fde68a; color: #92400e; }

.perf-svg-stage {
  position: relative;
  min-height: 250px;
}

.perf-svg {
  width: 100%;
  height: auto;
  display: block;
}

.perf-empty-chart {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  background: #f8fafc;
  border-radius: 14px;
  padding: 1.5rem;
}

.perf-chart-tooltip {
  position: absolute;
  top: 8px;
  z-index: 15;
  min-width: 215px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.76rem;
  pointer-events: none;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.perf-tt-date {
  font-weight: 700;
  color: #b7f15a;
  margin-bottom: 0.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 0.22rem;
}

.perf-tt-row {
  display: flex;
  justify-content: space-between;
  gap: 0.7rem;
  margin-top: 0.18rem;
}

/* Full 7-Column Calendar Section */
.perf-calendar-section {
  padding-bottom: 3rem;
}

.perf-cal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.perf-cal-nav-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.perf-month-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  padding: 0.24rem 0.4rem;
}

.perf-month-arrow {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #ffffff;
  color: #0f172a;
  font-size: 1.15rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.perf-month-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.perf-month-title {
  min-width: 145px;
  text-align: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #0f172a;
}

.perf-month-pills {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
}
.perf-year-tabs,
.perf-month-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.perf-ypill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.32rem 0.78rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
  color: #334155;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}
.perf-ypill.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.perf-ypill .is-pos { color: #059669; }
.perf-ypill .is-neg { color: #dc2626; }
.perf-ypill.active .is-pos { color: #b7f15a; }
.perf-ypill.active .is-neg { color: #fca5a5; }

.perf-mpill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.72rem;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  font-family: inherit;
  font-size: 0.78rem;
  cursor: pointer;
}
.perf-mpill.active {
  background: #0e4d4f;
  color: #ffffff;
  border-color: #0e4d4f;
}
.perf-mpill .is-pos { color: #059669; }
.perf-mpill .is-neg { color: #dc2626; }
.perf-mpill.active .is-pos { color: #b7f15a; }
.perf-mpill.active .is-neg { color: #fca5a5; }

.perf-month-ribbon {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.65rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.85rem;
}

.perf-mstat {
  display: flex;
  flex-direction: column;
}
.perf-mstat-lbl {
  font-size: 0.74rem;
  color: #64748b;
  font-weight: 600;
}
.perf-mstat-val {
  font-size: 1.08rem;
  font-weight: 800;
  margin: 0.1rem 0;
}
.perf-mstat small {
  font-size: 0.72rem;
  color: #64748b;
}

.perf-cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.76rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}
.perf-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.perf-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  display: inline-block;
}
.perf-dot.is-win { background: #10b981; }
.perf-dot.is-loss { background: #ef4444; }
.perf-dot.is-open { background: #0ea5e9; }
.perf-dot.is-dd { background: #f59e0b; }

.perf-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.perf-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.5rem;
}

.perf-cal-cell {
  min-height: 112px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  padding: 0.55rem 0.6rem;
  text-align: left;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.perf-cal-cell:not(:disabled) {
  cursor: pointer;
}
.perf-cal-cell:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  border-color: #0e4d4f;
}

.perf-cal-cell.is-pad {
  background: transparent;
  border-color: transparent;
  min-height: 0;
}

.perf-cal-cell.is-weekend {
  background: #f8fafc;
  border-style: dashed;
  opacity: 0.72;
}

.perf-cal-cell.is-empty {
  background: #fcfdfd;
}

.perf-cal-cell.is-win.is-tier-1 { background: #f0fdf4; border-color: #bbf7d0; }
.perf-cal-cell.is-win.is-tier-2 { background: #dcfce7; border-color: #86efac; }
.perf-cal-cell.is-win.is-tier-3 { background: #d1fae5; border-color: #34d399; }
.perf-cal-cell.is-win.is-tier-4 { background: linear-gradient(145deg, #d1fae5, #a7f3d0); border-color: #10b981; }

.perf-cal-cell.is-loss {
  background: #fef2f2;
  border-color: #fecaca;
}

.perf-cal-cell.is-live-only {
  background: #f0f9ff;
  border-color: #7dd3fc;
}

.perf-cal-cell.is-today {
  box-shadow: inset 0 0 0 2px #0e4d4f;
}

.perf-cell-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem;
}

.perf-cell-day {
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
}

.perf-cell-badge {
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.08rem 0.36rem;
  border-radius: 999px;
}
.perf-cell-badge.is-live { background: #0284c7; color: #ffffff; }
.perf-cell-badge.is-best { background: #059669; color: #ffffff; }

.perf-cell-idle {
  font-size: 0.72rem;
  color: #94a3b8;
  text-align: center;
  margin: auto 0;
}

.perf-cell-pnl {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0.22rem 0;
  line-height: 1.2;
}
.perf-cell-pnl.is-holding {
  color: #64748b;
  font-weight: 700;
  font-size: 0.84rem;
}
.perf-holding-lbl {
  color: #64748b;
  font-weight: 700;
}

.perf-cell-mob-pnl {
  display: none;
}

.perf-cell-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.22rem;
}

.perf-ctag {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.08rem 0.34rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.78);
  color: #334155;
  border: 1px solid rgba(148, 163, 184, 0.28);
}
.perf-ctag.is-dd {
  color: #b45309;
  background: rgba(255, 251, 235, 0.9);
  border-color: rgba(251, 191, 36, 0.4);
}

.perf-weekly-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.perf-week-pill {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  display: flex;
  flex-direction: column;
}
.perf-week-lbl {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}
.perf-week-pill strong {
  font-size: 0.95rem;
}
.perf-week-pill small {
  font-size: 0.7rem;
  color: #64748b;
}

/* List View Rows */
.perf-daily-list-host {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.perf-drow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
}
.perf-drow:hover {
  border-color: #0e4d4f;
  background: #ffffff;
}

.perf-drow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(110px, 1fr));
  gap: 0.75rem;
  flex: 1;
}
.perf-drow-metrics small {
  display: block;
  font-size: 0.7rem;
  color: #64748b;
}

.perf-drow-btn {
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

/* Bottom CTA Card */
.perf-bottom-cta-card {
  margin-top: 1.35rem;
  background: linear-gradient(135deg, #083335 0%, #0e4d4f 100%);
  color: #ffffff;
  border-radius: 22px;
  padding: 1.65rem 1.85rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.perf-cta-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  color: #b7f15a;
  letter-spacing: 0.05em;
  margin-bottom: 0.3rem;
}

.perf-bottom-cta-copy {
  max-width: 650px;
}
.perf-bottom-cta-copy h3 {
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}
.perf-bottom-cta-copy p {
  font-size: 0.9rem;
  color: rgba(241, 245, 249, 0.88);
}

.perf-bottom-cta-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Day X-Ray Modal */
.perf-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.perf-modal-card {
  width: 100%;
  max-width: 740px;
  max-height: 88vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 22px;
  padding: 1.35rem 1.45rem;
  box-shadow: 0 24px 50px rgba(15, 23, 42, 0.3);
}

.perf-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.perf-modal-title {
  font-size: 1.18rem;
  font-weight: 800;
}

.perf-modal-close {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  cursor: pointer;
  font-size: 0.95rem;
}

.perf-modal-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.perf-mkpi {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  display: flex;
  flex-direction: column;
}
.perf-mkpi span { font-size: 0.72rem; color: #64748b; }
.perf-mkpi strong { font-size: 1rem; margin: 0.12rem 0; }
.perf-mkpi small { font-size: 0.7rem; color: #64748b; }

.perf-modal-subhead {
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0.85rem 0 0.45rem;
}

.perf-modal-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.perf-modal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.perf-modal-table th,
.perf-modal-table td {
  padding: 0.55rem 0.7rem;
  text-align: left;
  border-bottom: 1px solid #f1f5f9;
}
.perf-modal-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
}

.perf-side-pill {
  font-size: 0.66rem;
  font-weight: 800;
  padding: 0.08rem 0.38rem;
  border-radius: 5px;
}
.perf-side-pill.is-buy { background: #dcfce7; color: #15803d; }
.perf-side-pill.is-sell { background: #fee2e2; color: #b91c1c; }

.perf-modal-note {
  padding: 1rem;
  background: #f8fafc;
  border-radius: 12px;
  font-size: 0.84rem;
  color: #475569;
  text-align: center;
}

/* Basket Cycle Breakdown Overview & Modal Cards */
.perf-basket-overview-host {
  margin-top: 0.95rem;
}

.perf-basket-overview-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
  border: 1px solid #cbd5e1;
  border-left: 4px solid #0e4d4f;
  border-radius: 18px;
  padding: 1.05rem 1.2rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

.perf-bov-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.perf-bov-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  color: #0e4d4f;
  background: #ccfbf1;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
}

.perf-bov-desc {
  margin: 0.3rem 0 0;
  font-size: 0.81rem;
  color: #475569;
}

.perf-bov-inspect-btn {
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-size: 0.79rem;
  font-weight: 700;
  padding: 0.42rem 0.85rem;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.perf-bov-inspect-btn:hover {
  background: #ccfbf1;
}

.perf-bov-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.perf-bov-box {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 13px;
  padding: 0.7rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.16rem;
}
.perf-bov-box.is-win {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.perf-bov-box.is-loss {
  background: #fff1f2;
  border-color: #fecdd3;
}
.perf-bov-box.is-clean {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.perf-bov-box.is-live {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.perf-bov-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  color: #475569;
}

.perf-bov-val {
  font-size: 1rem;
  font-weight: 800;
  color: #0f172a;
}
.perf-bov-val small {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f766e;
}

.perf-bov-sub {
  font-size: 0.71rem;
  color: #64748b;
}

.perf-bov-live-sides {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.6rem;
  font-size: 0.71rem;
  font-weight: 700;
}
.perf-bov-live-sides .is-buy { color: #15803d; }
.perf-bov-live-sides .is-sell { color: #b91c1c; }

.perf-cell-badge.is-basket-win {
  background: #dcfce7;
  color: #166534;
}
.perf-cell-badge.is-basket-mix {
  background: #e0f2fe;
  color: #0369a1;
}

.perf-day-basket-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.perf-dbs-item {
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
}
.perf-dbs-item.is-win {
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.perf-dbs-item.is-loss {
  background: #fff1f2;
  border-color: #fecdd3;
}
.perf-dbs-item.is-clean {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.perf-dbs-item span {
  font-size: 0.72rem;
  color: #475569;
  font-weight: 700;
}
.perf-dbs-item strong {
  font-size: 0.96rem;
  font-weight: 800;
}

.perf-open-basket-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem 0.8rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.48rem 0.75rem;
  margin-bottom: 0.45rem;
  font-size: 0.77rem;
  font-weight: 700;
}
.perf-open-basket-bar .is-buy { color: #15803d; }
.perf-open-basket-bar .is-sell { color: #b91c1c; }

.perf-modal-viewbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.9rem 0 0.55rem;
}

.perf-basket-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.perf-basket-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}
.perf-basket-card.is-win {
  border-left: 4px solid #10b981;
}
.perf-basket-card.is-loss {
  border-left: 4px solid #f43f5e;
}

.perf-bcard-summary {
  list-style: none;
  cursor: pointer;
  padding: 0.65rem 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: #f8fafc;
}
.perf-bcard-summary::-webkit-details-marker {
  display: none;
}
.perf-basket-card.is-win .perf-bcard-summary {
  background: #f0fdf4;
}
.perf-basket-card.is-loss .perf-bcard-summary {
  background: #fff1f2;
}

.perf-bcard-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.perf-bcard-kind {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
}
.perf-bcard-kind.is-multi {
  background: #0e4d4f;
  color: #ffffff;
}
.perf-bcard-kind.is-single {
  background: #e2e8f0;
  color: #334155;
}

.perf-bcard-time {
  font-size: 0.73rem;
  color: #64748b;
  font-weight: 600;
}

.perf-bcard-meta {
  font-size: 0.75rem;
  color: #475569;
  margin-top: 0.18rem;
}

.perf-bcard-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
  white-space: nowrap;
}

.perf-bcard-pnl {
  font-size: 0.98rem;
  font-weight: 800;
}

.perf-bcard-expand {
  font-size: 0.69rem;
  color: #64748b;
  font-weight: 700;
}

.perf-bcard-body {
  padding: 0.55rem 0.65rem 0.65rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
}

/* Sale Page Clean Links to /performance */
.btn-perf-showcase {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding: 0.48rem 0.95rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #0e4d4f, #157a7d);
  color: #ffffff;
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.2);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.btn-perf-showcase:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.28);
}

.btn-bot-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  width: 100%;
  margin-top: 0.45rem;
  padding: 0.5rem 0.8rem;
  border-radius: 10px;
  background: #f0fdf4;
  border: 1px solid #a7f3d0;
  color: #065f46;
  font-size: 0.81rem;
  font-weight: 700;
  transition: background 0.15s ease;
}
.btn-bot-calendar:hover {
  background: #dcfce7;
}

/* Mobile Responsive Polish for /performance */
@media (max-width: 1024px) {
  .perf-bot-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perf-scorecard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perf-charts-grid {
    grid-template-columns: 1fr;
  }
  .perf-month-ribbon {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .perf-hero {
    padding: 1.5rem 0 1.65rem;
  }
  .perf-hero-top {
    flex-direction: column;
    gap: 0.9rem;
  }
  .perf-hero-SyncBox {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .perf-bot-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 0.35rem;
    scroll-snap-type: x mandatory;
  }
  .perf-bot-tab {
    min-width: 225px;
    scroll-snap-align: start;
  }
  .perf-scorecard-grid {
    grid-template-columns: 1fr;
  }
  .perf-panel {
    padding: 1rem 0.9rem;
  }
  .perf-cal-grid,
  .perf-cal-weekdays {
    gap: 0.25rem;
  }
  .perf-cal-cell {
    min-height: 66px;
    padding: 0.32rem 0.28rem;
    border-radius: 10px;
  }
  .perf-cell-pnl,
  .perf-cell-tags,
  .perf-cell-badge.is-best {
    display: none;
  }
  .perf-cell-mob-pnl {
    display: block;
    font-size: 0.68rem;
    font-weight: 800;
    color: #065f46;
    line-height: 1.15;
    word-break: break-all;
  }
  .perf-cal-cell.is-loss .perf-cell-mob-pnl {
    color: #b91c1c;
  }
  .perf-cal-cell.is-flat-dd .perf-cell-mob-pnl {
    color: #64748b;
    font-weight: 700;
  }
  .perf-cal-cell.is-selected {
    outline: 2.5px solid #0e4d4f;
    outline-offset: 1px;
  }
  .perf-mobile-day-card {
    display: block !important;
    margin-top: 0.75rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    background: #ecfdf5;
    border: 1px solid #6ee7b7;
  }
  .perf-mobile-day-card.hidden {
    display: none !important;
  }
  .perf-mday-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.55rem;
  }
  .perf-mday-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    font-size: 0.82rem;
  }
  .perf-mday-grid span {
    display: block;
    font-size: 0.7rem;
    color: #047857;
  }
  .perf-drow-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perf-modal-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .perf-bov-grid {
    grid-template-columns: 1fr;
  }
  .perf-day-basket-strip {
    grid-template-columns: 1fr;
  }
}

/* Bilingual SEO Knowledge Hub & Crawlable Strategy Directory */
.seo-hub-section {
  border-top: 1px solid #e2e8f0;
}
.seo-pillar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
  margin-top: 1.25rem;
}
.seo-pillar-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  padding: 1.35rem 1.4rem;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.035);
}
.seo-pillar-card h3 {
  font-size: 1.02rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.55rem;
  line-height: 1.38;
}
.seo-pillar-card p {
  font-size: 0.9rem;
  line-height: 1.65;
  color: #475569;
  margin: 0;
}
.seo-strategy-links {
  margin-top: 1.35rem;
  padding-top: 1rem;
  border-top: 1px dashed #cbd5e1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.86rem;
  color: #334155;
}
.seo-chip-link {
  display: inline-flex;
  align-items: center;
  padding: 0.36rem 0.78rem;
  border-radius: 999px;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #0e4d4f;
  font-weight: 600;
  font-size: 0.82rem;
  text-decoration: none;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.seo-chip-link:hover {
  background: #ecfdf5;
  border-color: #34d399;
}
.seo-lang-chip {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ffffff;
}
.seo-lang-chip:hover {
  background: #0a3a3c;
  border-color: #0a3a3c;
  color: #ffffff;
}
.perf-seo-section {
  padding: 0 0 2.5rem;
}
.seo-daily-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  background: #ffffff;
}
@media (max-width: 900px) {
  .seo-pillar-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================================
   Public Floating Live Support Chat Widget (chat-widget.js)
   ============================================================================ */
.kchat-root {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.7rem;
}
.kchat-launcher {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.52rem;
  background: linear-gradient(135deg, #064e3b 0%, #0e4d4f 100%);
  color: #ffffff;
  border: 2px solid #c2f556;
  border-radius: 999px;
  padding: 0.72rem 1.15rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 14px 32px rgba(6, 37, 39, 0.34);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.kchat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(6, 37, 39, 0.42);
}
.kchat-unread-badge {
  background: #ef4444;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.kchat-window {
  width: 372px;
  max-width: calc(100vw - 1.5rem);
  height: 510px;
  max-height: calc(100vh - 6.5rem);
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.kchat-header {
  background: linear-gradient(135deg, #062a2d 0%, #0e4d4f 100%);
  color: #ffffff;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.kchat-head-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.kchat-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: #c2f556;
  color: #062527;
  font-weight: 800;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kchat-online-dot {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #10b981;
  border: 2px solid #062a2d;
}
.kchat-title {
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1.2;
}
.kchat-sub {
  font-size: 0.72rem;
  color: #a7f3d0;
  margin-top: 0.1rem;
}
.kchat-head-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.kchat-fb-pill {
  background: #1877f2;
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
}
.kchat-social-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.85rem;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}
.kchat-social-link {
  flex: 1;
  text-align: center;
  font-size: 0.74rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.3rem 0.45rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.kchat-social-link:hover {
  border-color: #1877f2;
  background: #eff6ff;
}
.kchat-social-link.is-msg {
  color: #1877f2;
  border-color: #bfdbfe;
  background: #eff6ff;
}
.kchat-close-btn {
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.85rem;
}
.kchat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.9rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.kchat-bubble {
  max-width: 86%;
  padding: 0.68rem 0.85rem;
  border-radius: 15px;
  font-size: 0.86rem;
  line-height: 1.5;
  word-break: break-word;
}
.kchat-bubble.is-bot,
.kchat-bubble.is-admin {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
  border-bottom-left-radius: 4px;
}
.kchat-bubble.is-admin {
  background: #ecfdf5;
  border-color: #6ee7b7;
}
.kchat-bubble.is-visitor {
  align-self: flex-end;
  background: #0e4d4f;
  color: #ffffff;
  border-bottom-right-radius: 4px;
}
.kchat-sender {
  font-size: 0.7rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 0.2rem;
}
.kchat-time {
  font-size: 0.66rem;
  opacity: 0.65;
  margin-top: 0.22rem;
  text-align: right;
}
.kchat-chips {
  padding: 0.45rem 0.75rem;
  background: #f8fafc;
  border-top: 1px dashed #e2e8f0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.kchat-chip {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0e4d4f;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
}
.kchat-chip:hover {
  background: #ecfdf5;
  border-color: #34d399;
}
.kchat-form {
  padding: 0.65rem 0.75rem;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.kchat-profile-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}
.kchat-mini-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  padding: 0.38rem 0.55rem;
  font-size: 0.76rem;
}
.kchat-compose-row {
  display: flex;
  gap: 0.45rem;
}
.kchat-msg-input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 11px;
  padding: 0.55rem 0.72rem;
  font-size: 0.86rem;
}
.kchat-send-btn {
  background: #0e4d4f;
  color: #c2f556;
  border: none;
  border-radius: 11px;
  padding: 0 0.95rem;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
}

/* ============================================================================
   Admin Omnichannel Support Inbox & Visitor Analytics Styles
   ============================================================================ */
.adm-support-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 1.15rem;
  align-items: start;
}
.adm-chat-split {
  display: grid;
  grid-template-columns: 265px 1fr;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  min-height: 540px;
  background: #ffffff;
}
.adm-thread-list {
  border-right: 1px solid #e2e8f0;
  overflow-y: auto;
  max-height: 560px;
  background: #f8fafc;
}
.adm-thread-item {
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid #e2e8f0;
  padding: 0.78rem 0.85rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.adm-thread-item:hover {
  background: #f1f5f9;
}
.adm-thread-item.active {
  background: #ecfdf5;
  border-left: 3px solid #059669;
}
.adm-thread-top {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.adm-thread-ch {
  font-size: 0.68rem;
  font-weight: 700;
  background: #e2e8f0;
  color: #334155;
  padding: 0.1rem 0.42rem;
  border-radius: 6px;
}
.adm-thread-name {
  font-size: 0.85rem;
  color: #0f172a;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-thread-preview {
  font-size: 0.78rem;
  color: #475569;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.adm-thread-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: #94a3b8;
}
.adm-chat-stage {
  display: flex;
  flex-direction: column;
  height: 560px;
}
.adm-chat-stage-head {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.adm-chat-stage-msgs {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.adm-msg-bubble {
  max-width: 82%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.86rem;
  line-height: 1.5;
}
.adm-msg-bubble.is-vis {
  align-self: flex-start;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}
.adm-msg-bubble.is-bot {
  align-self: flex-end;
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  color: #334155;
}
.adm-msg-bubble.is-adm {
  align-self: flex-end;
  background: #0e4d4f;
  color: #ffffff;
}
.adm-msg-who {
  font-size: 0.69rem;
  font-weight: 700;
  opacity: 0.78;
  margin-bottom: 0.2rem;
}
.adm-chat-reply-bar {
  padding: 0.7rem 0.85rem;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  gap: 0.5rem;
}
.adm-sup-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.adm-sup-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.95rem 1rem;
}
.adm-chk-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: #1e293b;
  margin-top: 0.45rem;
  cursor: pointer;
}
.adm-ana-chart-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem 1.1rem;
}
.adm-traffic-bars {
  display: flex;
  align-items: flex-end;
  gap: 0.4rem;
  height: 145px;
  padding-top: 1.1rem;
}
.adm-tbar-col {
  flex: 1;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.adm-tbar-val {
  font-size: 0.68rem;
  font-weight: 700;
  color: #047857;
  margin-bottom: 0.15rem;
}
.adm-tbar-wrap {
  width: 100%;
  max-width: 28px;
  height: 96px;
  background: #e2e8f0;
  border-radius: 6px 6px 2px 2px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.adm-tbar-fill {
  width: 100%;
  background: linear-gradient(180deg, #10b981 0%, #0e4d4f 100%);
  border-radius: 6px 6px 0 0;
}
.adm-tbar-lbl {
  font-size: 0.66rem;
  color: #64748b;
  margin-top: 0.28rem;
  white-space: nowrap;
}
.adm-ana-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.adm-ana-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}
.adm-ana-bars-list {
  margin-top: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.adm-bdown-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #334155;
  margin-bottom: 0.2rem;
}
.adm-bdown-track {
  height: 7px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.adm-bdown-fill {
  height: 100%;
  background: #0d9488;
  border-radius: 999px;
}

@media (max-width: 980px) {
  .adm-support-grid,
  .adm-ana-grid-3,
  .adm-ana-grid-2 {
    grid-template-columns: 1fr;
  }
  .adm-chat-split {
    grid-template-columns: 1fr;
  }
  .adm-thread-list {
    max-height: 210px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
  }
}
@media (max-width: 768px) {
  .kchat-root {
    right: max(0.85rem, env(safe-area-inset-right, 0px));
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  }
  .client-shell .kchat-root {
    bottom: calc(5.2rem + env(safe-area-inset-bottom, 0px));
  }
  .kchat-window {
    max-height: calc(100dvh - 8.5rem - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  }
  .kchat-msg-input,
  .kchat-mini-input {
    font-size: 16px;
  }
  .kchat-launcher-lbl {
    display: none;
  }
  .kchat-launcher {
    padding: 0.78rem;
  }
}

/* ==========================================================================
   Streamlined Client-Portal-Style Admin Console UX
   ========================================================================== */
.adm-user-bar {
  margin-bottom: 1rem;
}

.adm-avatar-shield {
  font-size: 1.15rem;
  background: linear-gradient(135deg, #0e4d4f 0%, #062a2d 100%);
  color: #b7f15a;
}

.adm-bar-actions {
  position: relative;
}

.adm-eco-dropdown {
  position: relative;
}

.adm-eco-dropdown > summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
}

.adm-eco-dropdown > summary::-webkit-details-marker {
  display: none;
}

.adm-eco-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 95;
  min-width: 220px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  padding: 0.4rem;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.adm-eco-popover a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #1e293b;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.adm-eco-popover a:hover {
  background: #f1f5f9;
  color: #0e4d4f;
}

.adm-eco-popover a.is-current {
  background: #ecfdf5;
  color: #065f46;
}

.adm-mob-only-btn {
  display: none;
}

.adm-primary-tabs {
  margin-bottom: 0.95rem;
}

.adm-primary-tabs .client-nav-tab {
  min-width: 155px;
  gap: 0.4rem;
  padding: 0.76rem 0.9rem;
  font-size: 0.9rem;
}

.adm-subnav-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  padding: 0.4rem 0.5rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
}

.adm-subnav-bar.hidden {
  display: none !important;
}

.adm-subnav-pill {
  border: 1px solid transparent;
  background: transparent;
  color: #475569;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  padding: 0.52rem 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.adm-subnav-pill:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.adm-subnav-pill.active {
  background: var(--brand-deep-teal);
  color: #ffffff;
  border-color: var(--brand-deep-teal);
  box-shadow: 0 4px 12px rgba(6, 42, 45, 0.14);
}

.adm-grid-studio {
  display: grid;
  grid-template-columns: 1.38fr 1fr;
  gap: 1.15rem;
  align-items: start;
}

.adm-grid-studio.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .adm-grid-studio {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .adm-mob-only-btn {
    display: inline-flex;
  }
  .adm-eco-dropdown {
    display: none;
  }
  .adm-subnav-bar {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0.35rem;
    margin-bottom: 0.8rem;
  }
  .adm-subnav-bar::-webkit-scrollbar {
    display: none;
  }
  .adm-subnav-pill {
    font-size: 0.78rem;
    padding: 0.45rem 0.78rem;
    flex-shrink: 0;
  }
}

/* ==========================================================================
   Sale Page: Live Client Portfolio Top 10 Leaderboard (Podium #1-#3 + #4-#10)
   ========================================================================== */
.clb-section {
  background: radial-gradient(circle at 50% 0%, rgba(16, 185, 129, 0.08) 0%, rgba(248, 250, 252, 0.92) 55%, #ffffff 100%);
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
}

.clb-summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.75rem;
}

.clb-sum-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.95rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.03);
}

.clb-sum-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
}

.clb-sum-val {
  font-size: 1.38rem;
  font-weight: 800;
  color: #0f172a;
}

.clb-podium-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr 1fr;
  gap: 1.15rem;
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.clb-podium-grid.has-single {
  grid-template-columns: minmax(0, 440px);
  justify-content: center;
}

.clb-podium-grid.has-two {
  grid-template-columns: repeat(2, minmax(0, 420px));
  justify-content: center;
}

.clb-podium-card {
  position: relative;
  border-radius: 22px;
  padding: 1.35rem 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.clb-podium-card:hover {
  transform: translateY(-4px);
}

/* Desktop Olympic Podium Order: #2 Left, #1 Center Elevated, #3 Right */
@media (min-width: 941px) {
  .clb-podium-grid:not(.has-single):not(.has-two) .clb-podium-card.is-rank-2 {
    order: 1;
    margin-top: 0.85rem;
  }
  .clb-podium-grid:not(.has-single):not(.has-two) .clb-podium-card.is-rank-1 {
    order: 2;
    transform: translateY(-6px);
  }
  .clb-podium-grid:not(.has-single):not(.has-two) .clb-podium-card.is-rank-1:hover {
    transform: translateY(-10px);
  }
  .clb-podium-grid:not(.has-single):not(.has-two) .clb-podium-card.is-rank-3 {
    order: 3;
    margin-top: 1.25rem;
  }
}

/* Rank #1 Champion Luxury Dark-Teal & Gold Accent */
.clb-podium-card.is-rank-1 {
  background: linear-gradient(160deg, #062a2d 0%, #0e4d4f 58%, #0f3d3e 100%);
  color: #f8fafc;
  border: 2px solid #eab308;
  box-shadow: 0 22px 48px rgba(6, 42, 45, 0.24), 0 0 0 4px rgba(234, 179, 8, 0.14);
}

.clb-podium-card.is-rank-2 {
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #94a3b8;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.clb-podium-card.is-rank-3 {
  background: linear-gradient(180deg, #ffffff 0%, #fffbeb 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 16px 36px rgba(180, 83, 9, 0.08);
}

.clb-podium-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.clb-rank-ribbon {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 800;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.is-rank-1 .clb-rank-ribbon {
  background: linear-gradient(135deg, #fde047 0%, #f59e0b 100%);
  color: #11181c;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.35);
}

.is-rank-2 .clb-rank-ribbon {
  background: #e2e8f0;
  color: #1e293b;
}

.is-rank-3 .clb-rank-ribbon {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
}

.clb-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.16);
  color: #059669;
}

.is-rank-1 .clb-live-pill {
  background: rgba(183, 241, 90, 0.18);
  color: #b7f15a;
}

.clb-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

.clb-mode-pill {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.18);
  color: #64748b;
}

.is-rank-1 .clb-mode-pill {
  color: #cbd5e1;
}

.clb-port-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.clb-medal-orb {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.65rem;
  background: #f1f5f9;
  flex-shrink: 0;
}

.is-rank-1 .clb-medal-orb {
  background: rgba(253, 224, 71, 0.16);
  border: 1px solid rgba(253, 224, 71, 0.4);
}

.clb-masked-port {
  font-size: 1.22rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.is-rank-1 .clb-masked-port {
  color: #ffffff;
}

.clb-broker-line {
  font-size: 0.84rem;
  color: #475569;
  margin-top: 0.1rem;
}

.is-rank-1 .clb-broker-line {
  color: #cbd5e1;
}

.clb-tags-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.clb-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  white-space: nowrap;
}

.clb-type-pill.is-cent {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.clb-type-pill.is-usd {
  background: #dbeafe;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.clb-bot-chip {
  display: inline-block;
  max-width: 195px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
}

.is-rank-1 .clb-bot-chip {
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.clb-roi-hero {
  border-radius: 16px;
  padding: 0.9rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: auto;
}

.is-rank-1 .clb-roi-hero {
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(183, 241, 90, 0.32);
}

.clb-roi-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: #64748b;
}

.is-rank-1 .clb-roi-label {
  color: #cbd5e1;
}

.clb-roi-value {
  font-size: 2.05rem;
  font-weight: 900;
  line-height: 1.15;
  margin-top: 0.15rem;
  color: #0f172a;
}

.clb-roi-hero.is-pos .clb-roi-value {
  color: #059669;
}

.is-rank-1 .clb-roi-hero.is-pos .clb-roi-value {
  color: #b7f15a;
}

.clb-roi-hero.is-neg .clb-roi-value {
  color: #e11d48;
}

.clb-podium-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px dashed #e2e8f0;
}

.is-rank-1 .clb-podium-foot {
  border-top-color: rgba(255, 255, 255, 0.16);
}

.clb-foot-stat {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.clb-foot-stat.is-right {
  text-align: right;
}

.clb-foot-lbl {
  font-size: 0.73rem;
  color: #64748b;
  font-weight: 600;
}

.is-rank-1 .clb-foot-lbl {
  color: #94a3b8;
}

.clb-foot-val {
  font-size: 0.92rem;
  font-weight: 800;
  color: #0f172a;
}

.is-rank-1 .clb-foot-val {
  color: #f8fafc;
}

.clb-dd-val {
  color: #d97706;
}

.is-rank-1 .clb-dd-val {
  color: #fde047;
}

/* Ranks #4 - #10 List */
.clb-rest-box {
  padding: 1.15rem 1.25rem;
}

.clb-rest-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
  font-size: 0.96rem;
  color: #0f172a;
}

.clb-updated-note {
  font-size: 0.76rem;
  color: #64748b;
  font-weight: 600;
}

.clb-rank-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 0.45rem;
  border-radius: 8px;
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.82rem;
}

.clb-port-code {
  font-size: 0.92rem;
  color: #0f172a;
}

.clb-mini-live {
  margin-left: 0.35rem;
  font-size: 0.68rem;
  font-weight: 800;
  color: #059669;
}

.clb-tbl-roi {
  font-size: 1rem;
  font-weight: 800;
}

.clb-tbl-dd {
  display: inline-block;
  padding: 0.18rem 0.52rem;
  border-radius: 8px;
  background: #fffbeb;
  color: #b45309;
  font-weight: 700;
  font-size: 0.82rem;
}

.clb-mobile-list {
  display: none;
}

.clb-privacy-note {
  text-align: center;
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 1rem;
}

@media (max-width: 940px) {
  .clb-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .clb-podium-grid,
  .clb-podium-grid.has-two {
    grid-template-columns: 1fr;
    gap: 0.95rem;
  }
}

@media (max-width: 768px) {
  .clb-rest-box .master-desktop-table-wrap {
    display: none;
  }
  .clb-mobile-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }
  .clb-mob-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 0.7rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.42rem;
  }
  .clb-mob-top,
  .clb-mob-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
  }
  .clb-mob-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
  }
  .clb-mob-broker {
    font-size: 0.8rem;
    color: #334155;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Admin 2-Click Inline Confirmation & Floating Action Toast */
.btn-refresh.is-armed,
.adm-mini-grant-btn.is-armed,
.adm-grant-btn.is-armed,
.btn-primary-lime.is-armed,
.btn-panic-close.is-armed {
  background: #f59e0b !important;
  border-color: #d97706 !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.28) !important;
}

.adm-action-toast {
  position: fixed;
  top: calc(1rem + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 10050;
  max-width: min(92vw, 540px);
  padding: 0.72rem 1.15rem;
  border-radius: 14px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.25);
  pointer-events: none;
}

.adm-action-toast.is-ok {
  background: #064e3b;
  color: #ecfdf5;
  border: 1.5px solid #34d399;
}

.adm-action-toast.is-err {
  background: #7f1d1d;
  color: #fef2f2;
  border: 1.5px solid #f87171;
}

/* ==========================================================================
   ADMIN CLIENT-STYLE PORT VIEWER & FLEXIBLE EXPIRY EDITOR
   ========================================================================== */
.adm-port-mini-item.is-clickable {
  cursor: pointer;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.adm-port-mini-item.is-clickable:hover {
  border-color: #0e7490;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(14, 77, 79, 0.1);
}

.adm-port-mini-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}

.adm-port-mini-alias {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}

.adm-port-mini-badges-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.32rem;
  margin-top: 0.32rem;
}

.adm-port-mini-quick-stat {
  font-size: 0.73rem;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.08rem 0.48rem;
}

.adm-mini-grant-btn.is-view {
  background: #0e4d4f !important;
  border-color: #0e4d4f !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

.adm-mini-grant-btn.is-view:hover {
  background: #093739 !important;
}

.adm-mini-grant-btn.is-edit-exp {
  background: #eff6ff !important;
  border-color: #93c5fd !important;
  color: #1d4ed8 !important;
  font-weight: 800 !important;
}

.adm-mini-grant-btn.is-edit-exp:hover {
  background: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
  color: #ffffff !important;
}

/* Multi-Port Switcher Strip inside Customer Detail Modal */
.adm-port-switcher {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  padding: 0.15rem 0.05rem 0.4rem;
  -webkit-overflow-scrolling: touch;
}

.adm-port-switch-pill {
  flex: 0 0 auto;
  min-width: 195px;
  text-align: left;
  padding: 0.6rem 0.78rem;
  border-radius: 14px;
  border: 1.5px solid #cbd5e1;
  background: #f8fafc;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.adm-port-switch-pill:hover {
  border-color: #0e4d4f;
  background: #ffffff;
}

.adm-port-switch-pill.active {
  border-color: #0e4d4f;
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdfa 100%);
  box-shadow: 0 6px 16px rgba(14, 77, 79, 0.14);
}

.adm-ps-top {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.84rem;
  color: #0f172a;
}

.adm-ps-name {
  font-size: 0.75rem;
  color: #475569;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 110px;
}

.adm-ps-sub {
  font-size: 0.74rem;
  color: #475569;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.adm-ps-exp {
  margin-top: 0.1rem;
}

/* Client-Mirror Port Card inside Admin Modal */
#custDetailModal .adm-detail-modal-header {
  flex-shrink: 0;
}

#custDetailModal .adm-detail-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

#custDetailModal .adm-detail-modal-body > * {
  flex-shrink: 0;
}

.adm-client-mirror-card {
  flex: 0 0 auto;
  overflow: visible !important;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.05rem 1.15rem;
  border-radius: 18px;
  border: 1.5px solid #cbd5e1;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.adm-client-mirror-card.bound-acc-card.is-expanded .bound-acc-top {
  margin: -1.05rem -1.15rem 0.1rem;
  padding: 0.9rem 1.15rem;
  border-radius: 16px 16px 0 0;
  cursor: default;
}

.adm-insp-tabs-3 {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
}

.adm-insp-tabs-3 .bound-insp-tab {
  justify-content: center;
  text-align: center;
}

/* Upgraded Flexible Expiry & License Control Panel */
.adm-port-grant-box.is-highlighted {
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.35);
  border-color: #059669;
}

.adm-grant-section {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #d1fae5;
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.adm-grant-section.is-reset {
  background: #ffffff;
  border: 1.5px solid #34d399;
}

.adm-grant-sec-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: #0f172a;
}

.adm-grant-sec-label span {
  font-weight: 600;
  color: #64748b;
  font-size: 0.74rem;
}

.adm-grant-btn.is-set {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
}

.adm-grant-btn.is-set:hover {
  background: #059669 !important;
  border-color: #059669 !important;
  color: #ffffff !important;
}

.adm-grant-inline-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.adm-grant-preview {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0e4d4f;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  padding: 0.24rem 0.6rem;
  border-radius: 999px;
}

.adm-grant-bottom-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

/* Collapsible Payment History Card */
.adm-orders-collapse {
  padding: 0.85rem 1.05rem !important;
}

.adm-orders-collapse-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
}

.adm-orders-collapse-head::-webkit-details-marker {
  display: none;
}

.adm-orders-caret {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0e4d4f;
}

@media (max-width: 768px) {
  .adm-client-mirror-card {
    padding: 0.82rem 0.78rem;
    gap: 0.75rem;
  }

  .adm-client-mirror-card.bound-acc-card.is-expanded .bound-acc-top {
    margin: -0.82rem -0.78rem 0.1rem;
    padding: 0.72rem 0.78rem;
  }

  .adm-port-switch-pill {
    min-width: 170px;
    padding: 0.52rem 0.65rem;
  }

  .adm-grant-inline-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .adm-grant-preview {
    text-align: center;
  }

  .adm-grant-bottom-row {
    grid-template-columns: 1fr;
  }

  .adm-grant-bottom-row .btn,
  .adm-grant-bottom-row .btn-panic-close {
    width: 100%;
    min-height: 40px;
    justify-content: center;
  }

  .adm-grant-quick-row .adm-grant-inline-grp {
    grid-column: 1 / -1;
  }

  .adm-insp-tabs-3 .bound-insp-tab {
    padding: 0.45rem 0.25rem;
    font-size: 0.74rem;
  }

  .adm-m-cust-actions .adm-btn-del-cust {
    grid-column: 1 / -1;
    min-height: 38px;
    justify-content: center;
  }
}

.adm-expired-sso-note {
  margin-bottom: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 12px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.45;
}

.adm-btn-del-cust {
  padding: 0.28rem 0.6rem !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  color: #b91c1c !important;
  border-color: #fca5a5 !important;
  background: #fef2f2 !important;
}

.adm-btn-del-cust:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}

/* ==========================================================================
   ADMIN PORT EXPIRY EMAIL REMINDERS (15 / 7 / 3 DAYS — AUTO & MANUAL)
   ========================================================================== */
.adm-email-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.adm-email-days-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.adm-email-day-chk {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
}

.adm-email-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 0.45rem;
  align-items: center;
}

.adm-email-cand-list,
.adm-email-logs-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 520px;
  overflow-y: auto;
}

.adm-email-cand-card {
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 0.78rem 0.9rem;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.adm-email-cand-card.is-due-card {
  background: #ffffff;
  border: 1.5px solid #f59e0b;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.1);
}

.adm-email-cand-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.adm-email-cand-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding-top: 0.45rem;
  border-top: 1px solid #e2e8f0;
}

.adm-email-ms-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.14rem 0.48rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 700;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #cbd5e1;
}

.adm-email-ms-pill.is-sent {
  background: #ecfdf5;
  color: #065f46;
  border-color: #6ee7b7;
}

.adm-email-ms-pill.is-due {
  background: #fffbeb;
  color: #92400e;
  border-color: #fcd34d;
}

.adm-email-due-tag {
  font-size: 0.71rem;
  font-weight: 800;
  color: #b45309;
  background: #fef3c7;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
}

.adm-email-log-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

@media (max-width: 980px) {
  .adm-email-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .adm-email-test-row {
    grid-template-columns: 1fr;
  }
}

/* =====================================================================
 * Client Port Details: Live MT4/MT5 Candlestick Chart & EA Runtime Pills
 * ===================================================================== */
.port-ea-runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.18rem 0.56rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  border: 1px solid transparent;
}

.port-ea-runtime-pill.is-compact,
.port-ea-runtime-pill.is-header {
  padding: 0.14rem 0.48rem;
  font-size: 0.69rem;
}

.port-ea-runtime-pill.is-ea-active {
  background: #dcfce7;
  color: #065f46;
  border-color: #4ade80;
}

.port-ea-runtime-pill.is-ea-cutover {
  background: #fef3c7;
  color: #92400e;
  border-color: #fbbf24;
}

.port-ea-runtime-pill.is-ea-detached {
  background: #fee2e2;
  color: #991b1b;
  border-color: #fca5a5;
}

.port-ea-runtime-pill.is-ea-copy {
  background: #e0f2fe;
  color: #075985;
  border-color: #7dd3fc;
}

.port-live-sync-bar.is-direct-ea-bar {
  background: linear-gradient(90deg, #ecfdf5 0%, #f0fdf4 100%);
  border-color: #86efac;
  color: #065f46;
}

.port-live-sync-bar.is-warn {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.port-mt5-terminal-card {
  margin: 0.75rem 0 0.85rem;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e293b;
  background: #090e14;
  box-shadow: 0 8px 22px rgba(9, 14, 20, 0.22);
}

.mt5-term-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.78rem;
  background: #0f172a;
  border-bottom: 1px solid #1e293b;
}

.mt5-term-left,
.mt5-term-right {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.42rem;
}

.mt5-term-sym {
  font-size: 0.84rem;
  font-weight: 900;
  color: #f8fafc;
  letter-spacing: 0.02em;
}

.mt5-tf-group {
  display: inline-flex;
  align-items: center;
  background: #090e14;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 2px;
  gap: 2px;
}

.mt5-tf-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.71rem;
  font-weight: 800;
  padding: 0.18rem 0.44rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.mt5-tf-btn:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.14);
}

.mt5-tf-btn.active {
  background: #0284c7;
  color: #ffffff;
}

.mt5-quote-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 0.73rem;
  color: #cbd5e1;
  background: rgba(15, 23, 42, 0.75);
  padding: 0.16rem 0.48rem;
  border-radius: 7px;
  border: 1px solid #1e293b;
}

.mt5-q-bid strong {
  color: #38bdf8;
  transition: color 0.15s ease;
}

.mt5-q-bid.is-tick-up strong {
  color: #4ade80;
}

.mt5-q-bid.is-tick-down strong {
  color: #f87171;
}

.mt5-live-pulse-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  margin-right: 0.34rem;
  vertical-align: middle;
  animation: mt5LivePulse 1.4s ease-in-out infinite;
}

.mt5-live-pulse-dot.is-sync {
  background: #38bdf8;
  box-shadow: 0 0 6px #38bdf8;
}

@keyframes mt5LivePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.mt5-q-ask {
  color: #fca5a5;
}

.mt5-q-spr {
  color: #94a3b8;
  font-size: 0.69rem;
}

.mt5-mini-btn {
  appearance: none;
  border: 1px solid #334155;
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.52rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.mt5-mini-btn:hover {
  background: #334155;
  color: #ffffff;
}

.mt5-mini-btn.active {
  background: rgba(16, 185, 129, 0.18);
  border-color: #34d399;
  color: #6ee7b7;
}

.mt5-term-toolbar .port-ea-runtime-pill.is-ea-active {
  background: rgba(22, 163, 74, 0.2);
  color: #86efac;
  border-color: rgba(74, 222, 128, 0.55);
}

.mt5-term-toolbar .port-ea-runtime-pill.is-ea-cutover {
  background: rgba(217, 119, 6, 0.22);
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.55);
}

.mt5-term-toolbar .port-ea-runtime-pill.is-ea-detached {
  background: rgba(220, 38, 38, 0.2);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.5);
}

.mt5-term-toolbar .port-ea-runtime-pill.is-ea-copy {
  background: rgba(2, 132, 199, 0.22);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.45);
}

.mt5-chart-stage {
  position: relative;
  width: 100%;
  background: #090e14;
}

.mt5-chart-hud-top {
  position: absolute;
  top: 6px;
  left: 10px;
  right: 72px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  pointer-events: none;
  z-index: 2;
}

.mt5-ohlc-hud {
  font-size: 0.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #cbd5e1;
  background: rgba(9, 14, 20, 0.76);
  padding: 0.14rem 0.42rem;
  border-radius: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.mt5-ohlc-hud strong {
  color: #f8fafc;
}

.mt5-corner-ea-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.69rem;
  font-weight: 800;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

.mt5-corner-ea-tag.is-ea-active {
  border-color: rgba(74, 222, 128, 0.65);
  color: #86efac;
}

.mt5-corner-ea-tag.is-ea-active .mt5-corner-dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.mt5-corner-ea-tag.is-ea-cutover {
  border-color: rgba(251, 191, 36, 0.65);
  color: #fde68a;
}

.mt5-corner-ea-tag.is-ea-cutover .mt5-corner-dot {
  background: #f59e0b;
}

.mt5-corner-ea-tag.is-ea-detached {
  border-color: rgba(248, 113, 113, 0.55);
  color: #fca5a5;
}

.mt5-corner-ea-tag.is-ea-detached .mt5-corner-dot {
  background: #ef4444;
}

.mt5-corner-ea-tag.is-ea-copy {
  border-color: rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
}

.mt5-corner-ea-tag.is-ea-copy .mt5-corner-dot {
  background: #38bdf8;
}

.mt5-corner-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.mt5-corner-smile {
  font-size: 0.82rem;
  line-height: 1;
}

.mt5-chart-canvas {
  display: block;
  width: 100%;
  height: 292px;
  cursor: crosshair;
  touch-action: pan-y;
}

.mt5-term-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  padding: 0.42rem 0.78rem;
  background: #0f172a;
  border-top: 1px solid #1e293b;
  font-size: 0.71rem;
  color: #94a3b8;
}

.mt5-legend-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.mt5-leg-item {
  display: inline-flex;
  align-items: center;
  gap: 0.24rem;
}

.mt5-leg-sw {
  display: inline-block;
  width: 12px;
  height: 2px;
  border-radius: 2px;
}

.mt5-leg-sw.is-buy {
  background: #22c55e;
}

.mt5-leg-sw.is-sell {
  background: #fb923c;
}

.mt5-leg-sw.is-bid {
  background: #38bdf8;
}

.mt5-leg-sw.is-ask {
  background: #f87171;
}

.mt5-leg-pnl {
  color: #cbd5e1;
}

.mt5-term-upd {
  color: #64748b;
  font-size: 0.68rem;
}

@media (max-width: 640px) {
  .mt5-chart-canvas {
    height: 244px;
  }
  .mt5-chart-hud-top {
    right: 68px;
  }
  .mt5-corner-ea-tag {
    display: none;
  }
}


/* ==========================================================================
   Friendly Client UX v4 — 3-Step MT5 Bind, 1-Tap Copy Presets & IB Modal
   ========================================================================== */
.btn-ib-guide-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  min-height: 36px;
  padding: 0.35rem 0.78rem;
  border-radius: 999px;
  border: 1.5px solid #0f766e;
  background: linear-gradient(135deg, #f0fdfa 0%, #ecfccb 100%);
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.btn-ib-guide-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(14, 77, 79, 0.16);
}

.btn-ib-guide-pill.is-ib-active {
  background: linear-gradient(135deg, #0e4d4f 0%, #0f766e 100%);
  border-color: #0e4d4f;
  color: #ecfccb;
}

.ux-step-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.88rem 0.92rem;
  margin-bottom: 0.85rem;
}

.ux-step-card-compact {
  padding: 0.78rem 0.85rem;
  margin-bottom: 0.75rem;
}

.ux-step-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.62rem;
}

.ux-step-head-split {
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ux-step-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.ux-step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #0e4d4f;
  color: #ecfccb;
  font-size: 0.76rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(14, 77, 79, 0.22);
}

.ux-step-title {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.3;
  margin: 0;
}

.ux-help-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.24rem 0.64rem;
  border-radius: 999px;
  border: 1px solid #99f6e4;
  background: #f0fdfa;
  color: #0f766e;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ux-help-chip-btn:hover,
.ux-help-chip-btn.is-open {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ecfccb;
}

.ux-mt5-guide-box {
  background: #ffffff;
  border: 1px solid #99f6e4;
  border-left: 4px solid #0f766e;
  border-radius: 12px;
  padding: 0.68rem 0.8rem;
  margin-bottom: 0.72rem;
}

.ux-mt5-guide-title {
  font-size: 0.79rem;
  font-weight: 800;
  color: #0e4d4f;
  margin-bottom: 0.35rem;
}

.ux-mt5-guide-list {
  margin: 0;
  padding-left: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.76rem;
  line-height: 1.48;
  color: #334155;
}

.ux-mt5-guide-list code {
  background: #f1f5f9;
  color: #0f172a;
  padding: 0.05rem 0.34rem;
  border-radius: 5px;
  font-weight: 700;
  font-size: 0.74rem;
}

/* 1-Tap Broker Server Quick-Pick Chips */
.ux-server-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-bottom: 0.5rem;
}

.ux-srv-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  font-family: inherit;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ux-srv-chip:hover {
  border-color: #0f766e;
  color: #0e4d4f;
  background: #f0fdfa;
}

.ux-srv-chip.active {
  background: #0e4d4f;
  border-color: #0e4d4f;
  color: #ecfccb;
  box-shadow: 0 2px 7px rgba(14, 77, 79, 0.2);
}

/* Password Field with Show/Hide Eye */
.ux-pass-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 0.9rem;
}

.ux-pass-wrap .ux-pass-input {
  padding-right: 2.55rem;
  width: 100%;
  margin-bottom: 0;
}

.ux-pass-eye {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 1rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease;
}

.ux-pass-eye:hover,
.ux-pass-eye.is-visible {
  background: #e2e8f0;
  color: #0f172a;
}

.ux-opt-name-input {
  margin-top: 0.5rem;
  margin-bottom: 0 !important;
  font-size: 0.82rem;
  background: #ffffff;
}

/* 1-Tap Smart Copy Preset Cards */
.ux-preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.58rem;
}

.ux-preset-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.18rem;
  text-align: left;
  padding: 0.64rem 0.72rem;
  border-radius: 13px;
  border: 1.5px solid #dbe4ee;
  background: #ffffff;
  color: #0f172a;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ux-preset-card:hover {
  border-color: #0f766e;
  background: #f0fdfa;
  transform: translateY(-1px);
}

.ux-preset-card.active {
  border-color: #0e4d4f;
  background: linear-gradient(135deg, #f0fdfa 0%, #f7fee7 100%);
  box-shadow: 0 0 0 2px rgba(14, 77, 79, 0.14), 0 4px 12px rgba(14, 77, 79, 0.1);
}

.ux-preset-top {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.3rem;
  margin-bottom: 0.08rem;
}

.ux-preset-icon {
  font-size: 1rem;
  line-height: 1;
}

.ux-preset-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 0.1rem 0.44rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
}

.ux-preset-badge.is-rec {
  background: #0e4d4f;
  color: #ecfccb;
}

.ux-preset-badge.is-turbo {
  background: #fef3c7;
  color: #92400e;
}

.ux-preset-name {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.25;
}

.ux-preset-desc {
  font-size: 0.71rem;
  font-weight: 600;
  color: #475569;
  line-height: 1.35;
}

.ux-preset-explain-box {
  font-size: 0.76rem;
  font-weight: 700;
  color: #0e4d4f;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.48rem 0.68rem;
  margin-bottom: 0.58rem;
  line-height: 1.45;
}

.ux-preset-explain-box.is-custom {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}

/* Friendly IB Partner Box & 3-Step Modal */
.ux-ib-friendly-box {
  border-radius: 16px;
}

.ux-ib-benefit-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-top: 0.42rem;
}

.ux-ib-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.71rem;
  font-weight: 800;
}

.ux-ib-pill.is-free {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}

.ux-ib-pill.is-disc {
  background: #fef9c3;
  color: #854d0e;
  border: 1px solid #fde047;
}

.ux-ib-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.ux-ib-mini-btns,
.ux-ib-promo-btns {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.ux-ib-guide-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.28rem 0.64rem;
  border-radius: 999px;
  border: 1px solid #0f766e;
  background: #ffffff;
  color: #0e4d4f;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}

.ux-ib-guide-link-btn:hover {
  background: #0e4d4f;
  color: #ecfccb;
}

.ux-ib-modal-card {
  max-width: 560px;
  width: 94%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.35rem 1.4rem;
  border-radius: 22px;
  background: #ffffff;
  text-align: left;
}

.ux-ib-modal-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
}

.ux-ib-stepper {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 15px;
  padding: 0.85rem 0.92rem;
}

.ux-ib-step-item {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.ux-ib-step-dot {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #0e4d4f;
  color: #ecfccb;
  font-size: 0.78rem;
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.06rem;
}

.ux-ib-step-item strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.1rem;
}

.ux-ib-step-item p {
  margin: 0;
  font-size: 0.76rem;
  line-height: 1.46;
  color: #475569;
}

.ux-ib-link-panel {
  background: linear-gradient(135deg, #f0fdfa 0%, #f7fee7 100%);
  border: 1.5px solid #99f6e4;
  border-radius: 15px;
  padding: 0.85rem 0.92rem;
  display: flex;
  flex-direction: column;
  gap: 0.58rem;
}

.ux-ib-link-panel-title {
  font-size: 0.82rem;
  font-weight: 800;
  color: #0e4d4f;
}

.ux-ib-link-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ux-ib-open-btn {
  flex: 1 1 210px;
  text-align: center;
  justify-content: center;
  min-height: 42px;
  font-size: 0.84rem;
}

.ux-ib-copy-btn {
  flex: 0 1 auto;
  min-height: 42px;
  padding: 0.45rem 0.88rem;
  font-size: 0.8rem;
  white-space: nowrap;
}

.ux-ib-transfer-tip {
  font-size: 0.74rem;
  line-height: 1.45;
  color: #334155;
  background: rgba(255, 255, 255, 0.78);
  border: 1px dashed #5eead4;
  border-radius: 10px;
  padding: 0.48rem 0.68rem;
}

.ux-ib-submit-panel {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 15px;
  padding: 0.85rem 0.92rem;
}

.ux-ib-port-chip {
  font-size: 0.78rem;
  font-weight: 800;
  color: #0e4d4f;
  background: #f0fdfa;
  border: 1px solid #99f6e4;
  border-radius: 10px;
  padding: 0.42rem 0.68rem;
  margin-bottom: 0.65rem;
}

@media (max-width: 768px) {
  .btn-ib-guide-pill {
    font-size: 0.73rem;
    padding: 0.3rem 0.64rem;
    min-height: 34px;
  }

  .ux-step-card {
    padding: 0.78rem 0.76rem;
    border-radius: 14px;
  }

  .ux-preset-grid {
    gap: 0.42rem;
  }

  .ux-preset-card {
    padding: 0.56rem 0.6rem;
  }

  .ux-preset-name {
    font-size: 0.78rem;
  }

  .ux-preset-desc {
    font-size: 0.68rem;
  }

  .ux-srv-chip {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .ux-ib-modal-card {
    width: 100%;
    max-width: 100%;
    max-height: 92vh;
    border-radius: 22px 22px 0 0;
    padding: 1.15rem 1.05rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  }

  .ux-ib-link-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .ux-ib-open-btn,
  .ux-ib-copy-btn {
    width: 100%;
    flex: none;
  }
}


/* ==========================================================================
   Sale Page Clean Header — Hide In-Page Jump Navigation (Keep HTML Intact)
   ========================================================================== */
body[data-page="sale"] .site-header .desktop-nav {
  display: none !important;
}

body[data-page="sale"] .mobile-drawer-links a[href^="#"] {
  display: none !important;
}

@media (min-width: 769px) {
  body[data-page="sale"] .mobile-menu-toggle {
    display: none !important;
  }
}


/* ==========================================================================
   Hero Console & Bot Card — Live Online/Offline LED + Percentage Profit UI
   ========================================================================== */
.status-armed.is-offline {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.34);
  color: #fda4af;
}

.status-armed.is-offline .pulse-green {
  background: #f43f5e;
  box-shadow: 0 0 0 4px rgba(244, 63, 94, 0.22);
}

.mini-bot-left {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.mini-bot-name-row {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.mini-bot-led,
.bot-status-led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}

.mini-bot-led.is-online,
.bot-status-led.is-online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.24), 0 0 10px rgba(16, 185, 129, 0.72);
  animation: kumiLedPulse 2.1s ease-in-out infinite;
}

.mini-bot-led.is-offline,
.bot-status-led.is-offline {
  background: #f43f5e;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.2);
}

@keyframes kumiLedPulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.25), 0 0 8px rgba(16, 185, 129, 0.65);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.12), 0 0 12px rgba(16, 185, 129, 0.9);
  }
}

.mini-bot-status-tag {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  padding: 0.1rem 0.48rem;
  border-radius: 999px;
  line-height: 1.35;
  white-space: nowrap;
}

.mini-bot-status-tag.is-online {
  background: rgba(16, 185, 129, 0.16);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.34);
}

.mini-bot-status-tag.is-offline {
  background: rgba(244, 63, 94, 0.14);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.32);
}

.mini-bot-row.is-offline {
  opacity: 0.86;
}

.mini-bot-stat-wrap {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.08rem;
}

.mini-bot-stat-wrap .mini-bot-stat {
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.15;
}

.mini-bot-stat-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
}

.bot-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
}

.bot-live-pill.offline {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.perf-kpi-chip.is-offline {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

/* ============================================================================
   Admin Master EA Friendly Split Workspace (Sidebar Selector + Focused Editor)
   ============================================================================ */
.adm-masters-grid.adm-masters-workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 1.1rem;
  align-items: start;
}

.adm-master-sidebar {
  position: sticky;
  top: 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.adm-ms-filters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.38rem;
}

.adm-ms-filter-btn {
  appearance: none;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.36rem 0.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

.adm-ms-filter-btn:hover {
  border-color: var(--brand-teal);
  color: #0f172a;
}

.adm-ms-filter-btn.is-active {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}

.adm-ms-list {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 2px;
}

.adm-ms-item {
  appearance: none;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 13px;
  padding: 0.62rem 0.72rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
  transition: all 0.15s ease;
}

.adm-ms-item:hover {
  border-color: #94a3b8;
  transform: translateY(-1px);
}

.adm-ms-item.is-selected {
  border-color: var(--brand-teal);
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 100%);
  box-shadow: 0 6px 18px rgba(14, 77, 79, 0.12);
}

.adm-ms-item.is-off:not(.is-selected) {
  opacity: 0.72;
  background: #f8fafc;
}

.adm-ms-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.adm-ms-item-name-wrap {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  min-width: 0;
}

.adm-ms-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.adm-ms-dot.is-online {
  background: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.adm-ms-dot.is-offline {
  background: #cbd5e1;
}

.adm-ms-order {
  font-size: 0.7rem;
  font-weight: 800;
  color: #64748b;
  flex-shrink: 0;
}

.adm-ms-name {
  font-size: 0.86rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.adm-ms-item-badges {
  display: flex;
  align-items: center;
  gap: 0.28rem;
  flex-shrink: 0;
}

.adm-ms-dirty-dot {
  color: #f59e0b;
  font-size: 0.75rem;
  line-height: 1;
}

.adm-ms-vis-pill {
  font-size: 0.67rem;
  font-weight: 800;
  padding: 0.12rem 0.42rem;
  border-radius: 999px;
}

.adm-ms-vis-pill.is-vis {
  background: #dcfce7;
  color: #166534;
}

.adm-ms-vis-pill.is-hid {
  background: #e2e8f0;
  color: #475569;
}

.adm-ms-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: #64748b;
}

.adm-ms-exec.is-ea {
  color: #047857;
  font-weight: 800;
}

.adm-ms-empty {
  text-align: center;
  padding: 1.5rem 0.5rem;
  color: #64748b;
  font-size: 0.84rem;
}

.adm-master-editor-pane {
  min-width: 0;
}

.adm-master-card.is-hidden-card {
  display: none !important;
}

.adm-master-card.is-active-card {
  border-color: rgba(21, 122, 125, 0.35);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.adm-master-subtabs {
  display: inline-flex;
  gap: 0.4rem;
  padding: 0.28rem;
  border-radius: 12px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  align-self: flex-start;
}

.adm-msub-btn {
  appearance: none;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.45rem 0.9rem;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.adm-msub-btn:hover {
  color: #0f172a;
}

.adm-msub-btn.is-active {
  background: #ffffff;
  color: #0e4d4f;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}

.adm-master-subpane {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.adm-master-subpane.is-subtab-hidden {
  display: none !important;
}

.adm-engine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.adm-engine-autosave-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: #047857;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 10px;
  padding: 0.48rem 0.75rem;
}

.adm-cap-preset-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.38rem;
  margin-bottom: 0.55rem;
}

.adm-cap-preset-lbl {
  font-size: 0.74rem;
  font-weight: 800;
  color: #9a3412;
  margin-right: 0.15rem;
}

.adm-cap-preset-chip {
  appearance: none;
  border: 1px solid #fdba74;
  background: #ffffff;
  color: #9a3412;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.24rem 0.58rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.adm-cap-preset-chip:hover {
  background: #ffedd5;
  border-color: #ea580c;
  color: #7c2d12;
}

.adm-master-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  padding-top: 0.8rem;
  margin-top: 0.2rem;
  border-top: 1px solid #e2e8f0;
}

.adm-master-nav-btns,
.adm-master-save-inline {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.btn-sm-nav {
  padding: 0.42rem 0.78rem;
  font-size: 0.8rem;
}

.btn-sm-nav:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.adm-dirty-indicator {
  font-size: 0.78rem;
  font-weight: 700;
  color: #059669;
}

.adm-dirty-indicator.is-dirty {
  color: #d97706;
  background: #fef3c7;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

@media (max-width: 1024px) {
  .adm-masters-grid.adm-masters-workspace {
    grid-template-columns: 1fr;
  }
  .adm-master-sidebar {
    position: static;
  }
  .adm-ms-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    max-height: none;
  }
  .adm-engine-grid {
    grid-template-columns: 1fr;
  }
}

/* Facebook 30-Day Studio HD Graphic Preview */
.fb-studio-img-card {
  margin-top: 0.75rem;
  padding: 0.75rem;
  border-radius: 14px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
}

.fb-studio-img-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.55rem;
}

.fb-studio-design-pill {
  font-size: 0.76rem;
  font-weight: 800;
  color: #0f172a;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}

.fb-studio-img-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-xs-studio {
  padding: 0.24rem 0.58rem !important;
  font-size: 0.74rem !important;
  text-decoration: none;
}

.fb-studio-preview-stage {
  border-radius: 12px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 210px;
  max-height: 390px;
}

.fb-studio-preview-img {
  width: 100%;
  max-width: 390px;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
}

.fb-studio-preview-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.82rem;
  color: #cbd5e1;
  line-height: 1.55;
}


/* =========================================================================
   KUMI MT5 LIVE WEB TERMINAL (CLIENT TAB 4 • DARK & LIGHT THEMES)
   ========================================================================= */
.client-nav-tab-mt5 {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
}

.mt5-nav-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: mt5wPulse 1.8s infinite;
  flex-shrink: 0;
}

@keyframes mt5wPulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
  70% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.mt5w-empty-card {
  text-align: center;
  padding: 2.4rem 1.4rem;
}

.mt5w-empty-ico {
  font-size: 2.6rem;
  margin-bottom: 0.5rem;
}

.mt5w-shell {
  --mt5-bg: #0b1017;
  --mt5-surface: #111923;
  --mt5-surface-2: #162130;
  --mt5-surface-hover: #1d2b3e;
  --mt5-border: #243245;
  --mt5-text: #e2e8f0;
  --mt5-text-strong: #f8fafc;
  --mt5-muted: #94a3b8;
  --mt5-accent: #38bdf8;
  --mt5-accent-soft: rgba(56, 189, 248, 0.14);
  --mt5-buy: #22c55e;
  --mt5-sell: #f87171;
  --mt5-warn: #f59e0b;
  --mt5-pend: #a78bfa;
  --mt5-summary-bg: #151e2b;
  --mt5-input-bg: #0c131c;
  --mt5-row-active: rgba(56, 189, 248, 0.15);
  --mt5-shadow: 0 18px 44px rgba(2, 6, 23, 0.45);

  background: var(--mt5-bg);
  color: var(--mt5-text);
  border: 1px solid var(--mt5-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--mt5-shadow);
  display: flex;
  flex-direction: column;
  font-size: 0.82rem;
}

.mt5w-shell[data-mt5-theme="light"] {
  --mt5-bg: #f1f5f9;
  --mt5-surface: #ffffff;
  --mt5-surface-2: #f8fafc;
  --mt5-surface-hover: #eef2f7;
  --mt5-border: #cbd5e1;
  --mt5-text: #1e293b;
  --mt5-text-strong: #0f172a;
  --mt5-muted: #64748b;
  --mt5-accent: #0284c7;
  --mt5-accent-soft: rgba(2, 132, 199, 0.12);
  --mt5-buy: #16a34a;
  --mt5-sell: #dc2626;
  --mt5-warn: #d97706;
  --mt5-pend: #7c3aed;
  --mt5-summary-bg: #e2e8f0;
  --mt5-input-bg: #ffffff;
  --mt5-row-active: rgba(2, 132, 199, 0.12);
  --mt5-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.mt5w-shell.is-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  border-radius: 0;
  border: none;
  height: 100vh;
  height: 100dvh;
  width: 100vw;
  max-width: none;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

.mt5w-shell.is-fullscreen .mt5w-topbar {
  position: sticky;
  top: 0;
  z-index: 25;
}

.mt5w-shell.is-fullscreen .mt5w-workspace {
  flex: 1 0 auto;
  min-height: 320px;
}

.mt5w-shell.is-fullscreen .mt5w-chart-pane {
  min-height: 320px;
}

.mt5w-shell.is-fullscreen .mt5w-canvas-wrap {
  min-height: 250px;
}

.mt5w-shell.is-fullscreen .mt5w-toolbox {
  flex: 0 0 auto;
}

/* 1. TOP TOOLBAR */
.mt5w-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem 0.65rem;
  padding: 0.45rem 0.65rem;
  background: var(--mt5-surface);
  border-bottom: 1px solid var(--mt5-border);
}

.mt5w-top-left,
.mt5w-top-mid,
.mt5w-top-right {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.mt5w-brand-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--mt5-surface-2);
  border: 1px solid var(--mt5-border);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--mt5-text-strong);
}

.mt5w-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
}

.mt5w-live-dot.is-offline {
  background: #f59e0b;
  box-shadow: none;
}

.mt5w-acc-picker-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 240px;
  max-width: 420px;
}

.mt5w-acc-picker-lbl {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--mt5-accent);
  white-space: nowrap;
}

.mt5w-acc-select {
  width: 100%;
  padding: 0.3rem 0.55rem;
  border-radius: 7px;
  border: 1px solid var(--mt5-border);
  background: var(--mt5-input-bg);
  color: var(--mt5-text-strong);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.mt5w-tf-group {
  display: inline-flex;
  align-items: center;
  background: var(--mt5-input-bg);
  border: 1px solid var(--mt5-border);
  border-radius: 7px;
  padding: 2px;
  gap: 2px;
}

.mt5w-tf-btn {
  border: none;
  background: transparent;
  color: var(--mt5-muted);
  font-weight: 700;
  font-size: 0.72rem;
  padding: 0.22rem 0.48rem;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.14s, color 0.14s;
}

.mt5w-tf-btn:hover {
  color: var(--mt5-text-strong);
  background: var(--mt5-surface-hover);
}

.mt5w-tf-btn.active {
  background: var(--mt5-accent);
  color: #ffffff;
}

.mt5w-chart-tools,
.mt5w-bot-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.mt5w-icon-btn,
.mt5w-tool-btn,
.mt5w-ctrl-btn {
  border: 1px solid var(--mt5-border);
  background: var(--mt5-surface-2);
  color: var(--mt5-text);
  border-radius: 7px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.26rem 0.52rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  line-height: 1.2;
  transition: background 0.14s, border-color 0.14s, color 0.14s;
  white-space: nowrap;
}

.mt5w-icon-btn {
  padding: 0.26rem 0.48rem;
  min-width: 28px;
  justify-content: center;
}

.mt5w-icon-btn:hover,
.mt5w-tool-btn:hover {
  background: var(--mt5-surface-hover);
  color: var(--mt5-text-strong);
}

.mt5w-tool-btn.active {
  background: var(--mt5-accent-soft);
  border-color: var(--mt5-accent);
  color: var(--mt5-accent);
}

.mt5w-ctrl-btn.is-pause {
  border-color: rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-ctrl-btn.is-pause {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
}

.mt5w-ctrl-btn.is-resume {
  border-color: rgba(34, 197, 94, 0.5);
  color: #4ade80;
  background: rgba(34, 197, 94, 0.14);
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-ctrl-btn.is-resume {
  color: #15803d;
  background: rgba(22, 163, 74, 0.12);
}

.mt5w-ctrl-btn.is-harvest {
  border-color: rgba(16, 185, 129, 0.45);
  color: #34d399;
  background: rgba(16, 185, 129, 0.1);
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-ctrl-btn.is-harvest {
  color: #047857;
}

.mt5w-ctrl-btn.is-panic {
  border-color: rgba(239, 68, 68, 0.5);
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-ctrl-btn.is-panic {
  color: #b91c1c;
}

.mt5w-ctrl-btn:disabled {
  opacity: 0.5;
  cursor: wait;
}

.mt5w-clock {
  font-size: 0.72rem;
  color: var(--mt5-muted);
  padding-left: 0.2rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* 2. BINDING STATUS STRIP */
.mt5w-binding-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.8rem;
  padding: 0.4rem 0.75rem;
  background: var(--mt5-surface-2);
  border-bottom: 1px solid var(--mt5-border);
  font-size: 0.75rem;
}

.mt5w-bind-left,
.mt5w-bind-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.mt5w-bind-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.16rem 0.52rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.72rem;
  border: 1px solid var(--mt5-border);
  background: var(--mt5-surface);
  color: var(--mt5-text-strong);
}

.mt5w-bind-chip.is-ea {
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-bind-chip.is-ea {
  color: #15803d;
}

.mt5w-bind-chip.is-master {
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-bind-chip.is-master {
  color: #0369a1;
}

.mt5w-bind-chip.is-paused {
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-bind-chip.is-paused {
  color: #b45309;
}

.mt5w-bind-meta {
  color: var(--mt5-muted);
  font-size: 0.73rem;
}

.mt5w-bind-meta strong {
  color: var(--mt5-text-strong);
}

/* 3. MOBILE SUB-NAV */
.mt5w-mobile-nav {
  display: none;
  grid-template-columns: repeat(5, 1fr);
  background: var(--mt5-surface);
  border-bottom: 1px solid var(--mt5-border);
}

.mt5w-mnav-btn {
  border: none;
  background: transparent;
  color: var(--mt5-muted);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.55rem 0.2rem;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.mt5w-mnav-btn.active {
  color: var(--mt5-accent);
  border-bottom-color: var(--mt5-accent);
  background: var(--mt5-accent-soft);
}

.mt5w-mnav-badge {
  background: var(--mt5-accent);
  color: #ffffff;
  border-radius: 999px;
  padding: 0 5px;
  font-size: 0.65rem;
  line-height: 1.4;
}

/* 4. MAIN WORKBENCH SPLIT */
.mt5w-workspace {
  display: grid;
  grid-template-columns: 282px minmax(0, 1fr);
  min-height: 350px;
  border-bottom: 1px solid var(--mt5-border);
  flex: 1 1 auto;
}

.mt5w-shell.is-sidebar-collapsed .mt5w-workspace {
  grid-template-columns: 0 minmax(0, 1fr);
}

.mt5w-shell.is-sidebar-collapsed .mt5w-sidebar {
  display: none;
}

.mt5w-sidebar {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--mt5-border);
  background: var(--mt5-surface);
  min-height: 0;
  overflow: hidden;
}

.mt5w-pane-box {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.mt5w-nav-box {
  flex: 0 0 auto;
  max-height: 245px;
  border-bottom: 1px solid var(--mt5-border);
}

.mt5w-shell.is-fullscreen .mt5w-nav-box {
  max-height: 36vh;
}

.mt5w-mw-box {
  flex: 1 1 auto;
}

.mt5w-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.36rem 0.55rem;
  background: var(--mt5-surface-2);
  border-bottom: 1px solid var(--mt5-border);
}

.mt5w-pane-title {
  font-size: 0.73rem;
  font-weight: 800;
  color: var(--mt5-text-strong);
  white-space: nowrap;
}

.mt5w-mw-search {
  width: 112px;
  padding: 0.16rem 0.42rem;
  border-radius: 5px;
  border: 1px solid var(--mt5-border);
  background: var(--mt5-input-bg);
  color: var(--mt5-text-strong);
  font-size: 0.71rem;
}

.mt5w-pill-cnt {
  padding: 0.08rem 0.42rem;
  border-radius: 999px;
  background: var(--mt5-accent-soft);
  color: var(--mt5-accent);
  font-size: 0.69rem;
  font-weight: 800;
}

.mt5w-mw-table-wrap,
.mt5w-nav-list {
  flex: 1 1 auto;
  overflow-y: auto;
  max-height: 255px;
}

.mt5w-shell.is-fullscreen .mt5w-mw-table-wrap,
.mt5w-shell.is-fullscreen .mt5w-nav-list {
  max-height: none;
}

/* TABLES */
.mt5w-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.mt5w-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--mt5-surface-2);
  color: var(--mt5-muted);
  font-weight: 700;
  font-size: 0.69rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-align: left;
  padding: 0.34rem 0.48rem;
  border-bottom: 1px solid var(--mt5-border);
  white-space: nowrap;
}

.mt5w-table th.num,
.mt5w-table td.num {
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mt5w-table th.act,
.mt5w-table td.act {
  text-align: center;
  width: 56px;
}

.mt5w-table td {
  padding: 0.34rem 0.48rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  color: var(--mt5-text);
  white-space: nowrap;
}

.mt5w-td-empty {
  text-align: center !important;
  color: var(--mt5-muted) !important;
  padding: 1.2rem 0.6rem !important;
}

.mt5w-mw-row {
  cursor: pointer;
  transition: background 0.12s;
}

.mt5w-mw-row:hover {
  background: var(--mt5-surface-hover);
}

.mt5w-mw-row.is-active {
  background: var(--mt5-row-active);
}

.mt5w-mw-sym-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.26rem;
  font-weight: 700;
  color: var(--mt5-text-strong);
}

.mt5w-mw-badge {
  font-size: 0.62rem;
  padding: 0.04rem 0.28rem;
  border-radius: 4px;
  font-weight: 800;
}

.mt5w-mw-badge.is-primary {
  background: rgba(34, 197, 94, 0.18);
  color: var(--mt5-buy);
}

.mt5w-mw-badge.is-pos {
  background: rgba(56, 189, 248, 0.2);
  color: var(--mt5-accent);
}

.mt5w-tick-up {
  color: var(--mt5-buy) !important;
  font-weight: 700;
}

.mt5w-tick-down {
  color: var(--mt5-sell) !important;
  font-weight: 700;
}

/* NAVIGATOR ACCOUNT CARDS */
.mt5w-nav-item {
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  background: transparent;
  color: var(--mt5-text);
  padding: 0.34rem 0.52rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.14rem;
  transition: background 0.12s;
}

.mt5w-nav-item:hover {
  background: var(--mt5-surface-hover);
}

.mt5w-nav-item.is-active {
  background: var(--mt5-row-active);
  border-left: 3px solid var(--mt5-accent);
  padding-left: calc(0.58rem - 3px);
}

.mt5w-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
}

.mt5w-nav-name {
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--mt5-text-strong);
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt5w-nav-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #22c55e;
}

.mt5w-nav-dot.is-paused { background: #f59e0b; }
.mt5w-nav-dot.is-off { background: #ef4444; }

.mt5w-nav-sub {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.69rem;
  color: var(--mt5-muted);
  gap: 0.35rem;
}

.mt5w-nav-bot {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  background: var(--mt5-surface-2);
  border: 1px solid var(--mt5-border);
  color: var(--mt5-text);
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* CENTER CHART PANE */
.mt5w-chart-pane {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 350px;
  background: var(--mt5-bg);
}

.mt5w-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  padding: 0.34rem 0.65rem;
  background: var(--mt5-surface);
  border-bottom: 1px solid var(--mt5-border);
  font-size: 0.73rem;
}

.mt5w-chart-ohlc {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--mt5-text);
  font-size: 0.72rem;
}

.mt5w-chart-ohlc strong {
  color: var(--mt5-text-strong);
  margin-right: 0.35rem;
}

.mt5w-chart-quote {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.73rem;
}

.mt5w-q-bid { color: var(--mt5-accent); }
.mt5w-q-ask { color: var(--mt5-sell); }
.mt5w-q-spr { color: var(--mt5-muted); font-size: 0.7rem; }

.mt5w-corner-ea {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.14rem 0.5rem;
  border-radius: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  border: 1px solid var(--mt5-border);
  background: var(--mt5-surface-2);
  color: var(--mt5-text-strong);
}

.mt5w-corner-ea.is-ea-active {
  border-color: rgba(34, 197, 94, 0.5);
  color: var(--mt5-buy);
  background: rgba(34, 197, 94, 0.12);
}

.mt5w-corner-ea.is-ea-copy {
  border-color: rgba(56, 189, 248, 0.5);
  color: var(--mt5-accent);
  background: rgba(56, 189, 248, 0.12);
}

.mt5w-corner-ea.is-ea-cutover,
.mt5w-corner-ea.is-ea-detached {
  border-color: rgba(245, 158, 11, 0.5);
  color: var(--mt5-warn);
  background: rgba(245, 158, 11, 0.12);
}

.mt5w-corner-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.mt5w-canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-height: 295px;
  cursor: crosshair;
  overflow: hidden;
  user-select: none;
}

.mt5w-canvas-wrap.is-panning {
  cursor: grabbing;
}

.mt5w-pan-latest-btn {
  position: absolute;
  right: 78px;
  bottom: 32px;
  z-index: 6;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  border: 1px solid var(--mt5-accent);
  background: rgba(15, 23, 42, 0.9);
  color: #e0f2fe;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(2, 6, 23, 0.35);
}

.mt5w-shell[data-mt5-theme="light"] .mt5w-pan-latest-btn {
  background: rgba(255, 255, 255, 0.95);
  color: #0369a1;
}

.mt5w-chart-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.mt5w-sym-switch-toast {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  padding: 0.32rem 0.75rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid var(--mt5-accent);
  color: #e0f2fe;
  font-size: 0.74rem;
  font-weight: 700;
  pointer-events: none;
}

.mt5w-chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.3rem 0.6rem;
  padding: 0.3rem 0.65rem;
  background: var(--mt5-surface);
  border-top: 1px solid var(--mt5-border);
  font-size: 0.71rem;
  color: var(--mt5-muted);
}

.mt5w-legend-group,
.mt5w-chart-status-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.mt5w-leg {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.mt5w-sw {
  width: 10px;
  height: 3px;
  border-radius: 2px;
  display: inline-block;
}

.mt5w-sw.is-buy { background: #22c55e; }
.mt5w-sw.is-sell { background: #fb923c; }
.mt5w-sw.is-pend { background: #a78bfa; }
.mt5w-sw.is-bid { background: #38bdf8; }
.mt5w-sw.is-ask { background: #ef4444; }

.mt5w-ro-pill {
  font-size: 0.68rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: var(--mt5-surface-2);
  border: 1px solid var(--mt5-border);
  color: var(--mt5-muted);
}

.mt5w-upd-txt {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: var(--mt5-text);
  font-weight: 700;
}

/* 5. BOTTOM MT5 TOOLBOX */
.mt5w-toolbox {
  display: flex;
  flex-direction: column;
  background: var(--mt5-surface);
  min-height: 190px;
}

.mt5w-tb-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 0 0.45rem;
  background: var(--mt5-surface-2);
  border-bottom: 1px solid var(--mt5-border);
  overflow-x: auto;
}

.mt5w-tb-tab {
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--mt5-muted);
  font-weight: 700;
  font-size: 0.74rem;
  padding: 0.45rem 0.72rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

.mt5w-tb-tab:hover {
  color: var(--mt5-text-strong);
}

.mt5w-tb-tab.active {
  color: var(--mt5-accent);
  border-bottom-color: var(--mt5-accent);
  background: var(--mt5-surface);
}

.mt5w-tb-badge {
  font-size: 0.67rem;
  padding: 0.05rem 0.38rem;
  border-radius: 999px;
  background: var(--mt5-accent-soft);
  color: var(--mt5-accent);
  font-weight: 800;
}

.mt5w-tb-spacer {
  flex: 1 1 auto;
}

.mt5w-tb-quick-status {
  font-size: 0.71rem;
  color: var(--mt5-muted);
  max-width: 380px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 0.4rem;
}

.mt5w-tb-pane {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}

.mt5w-table-scroll {
  overflow: auto;
  max-height: 185px;
  flex: 1 1 auto;
}

.mt5w-shell.is-fullscreen .mt5w-table-scroll {
  max-height: 24vh;
}

.mt5w-side-pill {
  display: inline-block;
  padding: 0.08rem 0.38rem;
  border-radius: 4px;
  font-weight: 800;
  font-size: 0.68rem;
}

.mt5w-side-pill.is-buy {
  background: rgba(34, 197, 94, 0.16);
  color: var(--mt5-buy);
}

.mt5w-side-pill.is-sell {
  background: rgba(239, 68, 68, 0.16);
  color: var(--mt5-sell);
}

.mt5w-side-pill.is-pend {
  background: rgba(167, 139, 250, 0.18);
  color: var(--mt5-pend);
}

.mt5w-pending-divider td {
  background: var(--mt5-surface-2);
  color: var(--mt5-pend) !important;
  font-weight: 700;
  font-size: 0.7rem;
  padding: 0.24rem 0.55rem !important;
}

.mt5w-close-tkt-btn {
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: var(--mt5-sell);
  border-radius: 5px;
  font-size: 0.75rem;
  font-weight: 800;
  width: 24px;
  height: 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.14s, color 0.14s;
}

.mt5w-close-tkt-btn:hover {
  background: #ef4444;
  color: #ffffff;
}

.mt5w-close-tkt-btn:disabled {
  opacity: 0.45;
  cursor: wait;
}

/* CLASSIC MT5 BOTTOM SUMMARY BAR */
.mt5w-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.45rem 1.05rem;
  padding: 0.45rem 0.75rem;
  background: var(--mt5-summary-bg);
  border-top: 1px solid var(--mt5-border);
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.mt5w-sum-metrics {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem 1.05rem;
}

.mt5w-sum-item {
  color: var(--mt5-muted);
}

.mt5w-sum-item strong {
  color: var(--mt5-text-strong);
  margin-left: 0.25rem;
}

.mt5w-sum-profit {
  font-size: 0.84rem;
  font-weight: 800;
}

.mt5w-pnl-pos { color: var(--mt5-buy) !important; font-weight: 700; }
.mt5w-pnl-neg { color: var(--mt5-sell) !important; font-weight: 700; }

/* HISTORY TOOLBAR */
.mt5w-hist-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  padding: 0.38rem 0.65rem;
  background: var(--mt5-surface-2);
  border-bottom: 1px solid var(--mt5-border);
}

.mt5w-hist-filters {
  display: inline-flex;
  gap: 0.25rem;
}

.mt5w-hfilt-btn {
  border: 1px solid var(--mt5-border);
  background: var(--mt5-surface);
  color: var(--mt5-muted);
  border-radius: 6px;
  font-size: 0.71rem;
  font-weight: 700;
  padding: 0.18rem 0.52rem;
  cursor: pointer;
}

.mt5w-hfilt-btn.active {
  background: var(--mt5-accent);
  border-color: var(--mt5-accent);
  color: #ffffff;
}

.mt5w-hist-summary {
  font-size: 0.73rem;
  color: var(--mt5-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

/* MASTER / EA DETAIL PANE */
.mt5w-binding-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.75rem;
  padding: 0.75rem;
  overflow-y: auto;
  max-height: 280px;
}

.mt5w-shell.is-fullscreen .mt5w-binding-detail-grid {
  max-height: 36vh;
}

.mt5w-bcard {
  background: var(--mt5-surface-2);
  border: 1px solid var(--mt5-border);
  border-radius: 10px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
}

.mt5w-bcard-eyebrow {
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mt5-accent);
}

.mt5w-bcard-title {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--mt5-text-strong);
}

.mt5w-bcard-row {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.74rem;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.15);
  padding-bottom: 0.22rem;
}

.mt5w-bcard-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.mt5w-bcard-row span { color: var(--mt5-muted); }
.mt5w-bcard-row strong { color: var(--mt5-text-strong); text-align: right; }

/* QUICK OPEN MT5 BUTTON ON PORT CARD */
.btn-open-mt5-terminal {
  border: 1px solid rgba(14, 77, 79, 0.35);
  background: linear-gradient(135deg, #0b1320 0%, #102a43 100%);
  color: #e0f2fe;
  border-radius: 8px;
  padding: 0.36rem 0.72rem;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: transform 0.14s, box-shadow 0.14s;
}

.btn-open-mt5-terminal:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.25);
}

/* RESPONSIVE MOBILE APP MODE (<= 900px) */
@media (max-width: 900px) {
  .mt5w-mobile-nav {
    display: grid;
  }

  .mt5w-top-left {
    width: 100%;
    justify-content: space-between;
  }

  .mt5w-acc-picker-wrap {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
  }

  .mt5w-clock,
  #mt5wToggleSidebarBtn,
  .mt5w-tb-quick-status {
    display: none;
  }

  .mt5w-workspace {
    display: block;
    min-height: 340px;
  }

  .mt5w-sidebar {
    border-right: none;
    overflow: visible;
  }

  .mt5w-nav-box {
    max-height: none !important;
    flex: 1 1 auto;
    border-bottom: none;
  }

  .mt5w-nav-item {
    padding: 0.62rem 0.78rem;
    gap: 0.28rem;
  }

  .mt5w-canvas-wrap {
    min-height: 320px;
  }

  .mt5w-mw-table-wrap,
  .mt5w-nav-list {
    max-height: none;
    overflow-y: visible;
    padding-bottom: 1rem;
  }

  .mt5w-shell.is-fullscreen .mt5w-mw-table-wrap,
  .mt5w-shell.is-fullscreen .mt5w-nav-list {
    max-height: none;
    padding-bottom: 4.5rem;
  }

  /* Switch visible panes cleanly like native MT5 Mobile app */
  .mt5w-shell[data-mobile-view="chart"] .mt5w-sidebar,
  .mt5w-shell[data-mobile-view="chart"] .mt5w-toolbox {
    display: none;
  }

  .mt5w-shell[data-mobile-view="quotes"] .mt5w-chart-pane,
  .mt5w-shell[data-mobile-view="quotes"] .mt5w-nav-box,
  .mt5w-shell[data-mobile-view="quotes"] .mt5w-toolbox {
    display: none;
  }

  .mt5w-shell[data-mobile-view="accounts"] .mt5w-workspace,
  .mt5w-shell[data-mobile-view="quotes"] .mt5w-workspace {
    min-height: auto;
    border-bottom: none;
  }

  .mt5w-shell[data-mobile-view="accounts"] .mt5w-chart-pane,
  .mt5w-shell[data-mobile-view="accounts"] .mt5w-mw-box,
  .mt5w-shell[data-mobile-view="accounts"] .mt5w-toolbox {
    display: none;
  }

  .mt5w-shell[data-mobile-view="trade"] .mt5w-workspace,
  .mt5w-shell[data-mobile-view="history"] .mt5w-workspace {
    display: none;
  }

  .mt5w-shell[data-mobile-view="trade"] .mt5w-table-scroll,
  .mt5w-shell[data-mobile-view="history"] .mt5w-table-scroll {
    max-height: 54vh;
  }
}
