/* ============================================================
   x12port — Main Stylesheet
   ============================================================ */

:root {
    --bg: #070d1a;
    --bg-card: #0f1a2e;
    --bg-elevated: #162033;
    --bg-input: #0c1525;
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-glow: rgba(59, 130, 246, 0.18);
    --accent: #10b981;
    --accent-dark: #059669;
    --accent-glow: rgba(16, 185, 129, 0.15);
    --yellow: #f59e0b;
    --text: #e8f0fe;
    --text-muted: #8fa3c0;
    --text-faint: #4a6080;
    --border: #1a2d45;
    --border-light: #253d5c;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 20px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
    --nav-h: 68px;
    --transition: 0.2s ease;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    /* footer-stick: makes margin-top:auto on .legal-footer work */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* Clips horizontal overflow on a non-fixed wrapper (works on iOS 15+) */
.page-wrap {
    overflow-x: hidden;
    min-width: 0;
    width: 100%;
}

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Navbar ── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    height: var(--nav-h);
    background: transparent;
    transition: background var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
    background: rgba(7, 13, 26, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 var(--border);
}
.nav-container {
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    flex-shrink: 0;
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex: 1;
}
.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 0.45rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.nav-links a:hover { color: var(--text); background: var(--bg-elevated); }
.badge-soon {
    font-size: 0.65rem;
    font-weight: 700;
    background: var(--bg-elevated);
    color: var(--text-faint);
    border: 1px solid var(--border-light);
    padding: 1px 5px;
    border-radius: 20px;
    letter-spacing: 0.03em;
}
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;   /* push to right edge whether or not nav-links is present */
}
.nav-login {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: color var(--transition);
}
.nav-login:hover { color: var(--text); }

/* User avatar dropdown menu */
.user-menu { position: relative; }
.user-menu-btn {
    display: flex; align-items: center; gap: 0.4rem;
    padding: 0.35rem 0.65rem 0.35rem 0.45rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer;
    color: var(--text-secondary); font-size: 0.82rem; font-weight: 600;
    transition: background var(--transition), color var(--transition);
    text-decoration: none; user-select: none;
}
.user-menu-btn:hover { background: rgba(255,255,255,0.11); color: var(--text-primary); }
.user-menu-avatar {
    width: 24px; height: 24px; background: var(--primary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.68rem; font-weight: 800; color: #fff; flex-shrink: 0;
}
.user-menu-chevron { font-size: 0.62rem; opacity: 0.6; }
.user-menu-dropdown {
    display: none; position: absolute; right: 0; top: 100%;
    padding-top: 6px;
    background: transparent;
    min-width: 190px; z-index: 300;
}
.user-menu-dropdown::before {
    content: '';
    display: block;
    height: 6px;
}
.user-menu-dropdown-inner {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: 0 8px 32px rgba(0,0,0,0.45);
    overflow: hidden;
}
.user-menu:hover .user-menu-dropdown { display: block; }
.user-menu-email {
    padding: 0.65rem 1rem 0.55rem; font-size: 0.72rem; color: var(--text-muted);
    border-bottom: 1px solid var(--border); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.user-menu-item {
    display: flex; align-items: center; gap: 0.55rem;
    padding: 0.6rem 1rem; font-size: 0.85rem; color: var(--text-secondary);
    text-decoration: none; transition: background var(--transition), color var(--transition);
}
.user-menu-item:hover { background: var(--bg-elevated); color: var(--text-primary); }
.user-menu-item.signout { color: #f87171; }
.user-menu-item.signout:hover { background: rgba(248,113,113,0.08); color: #fca5a5; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), box-shadow var(--transition), transform var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 0 0 4px var(--primary-glow); }
.btn-outline-sm {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    font-size: 0.875rem;
    padding: 0.45rem 1rem;
}
.btn-outline-sm:hover { color: var(--text); border-color: var(--text-muted); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: var(--bg-elevated); }
.btn-lg { font-size: 1rem; padding: 0.8rem 1.75rem; border-radius: var(--radius); }
.btn-outline-lg {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-light);
    font-size: 1rem;
    padding: 0.8rem 1.75rem;
    border-radius: var(--radius);
}
.btn-outline-lg:hover { color: var(--text); border-color: var(--primary); background: var(--primary-glow); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 0 0 4px var(--accent-glow); }

/* Dropdown */
.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 240px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    overflow: hidden;
    display: none;
    z-index: 200;
}
.dropdown-menu.open { display: block; }
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1rem;
    transition: background var(--transition);
}
.dropdown-item:hover { background: var(--bg-elevated); }
.di-icon { font-size: 1.4rem; flex-shrink: 0; }
.di-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.di-desc { font-size: 0.78rem; color: var(--text-muted); margin-top: 1px; }

/* Mobile-only nav elements — hidden by default, shown inside @media (max-width:700px) */
.mobile-nav-header,
.mobile-nav-section-label,
.mobile-nav-divider,
.mobile-nav-cta-link,
.mobile-nav-login-link { display: none !important; }
#mob-backdrop { display: none; }

/* Mobile nav toggle */
.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
}
.nav-mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-muted);
    border-radius: 2px;
    transition: var(--transition);
}

/* Flash messages */
.flash-container {
    position: fixed;
    top: calc(var(--nav-h) + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 340px;
    max-width: 90vw;
}
.flash {
    padding: 0.85rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}
.flash-success { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.35); color: #34d399; }
.flash-error { background: rgba(239,68,68,0.15); border: 1px solid rgba(239,68,68,0.35); color: #f87171; }
.flash-info { background: var(--primary-glow); border: 1px solid rgba(59,130,246,0.3); color: #93c5fd; }
.flash-close { background: none; border: none; cursor: pointer; color: inherit; font-size: 1.1rem; opacity: 0.6; line-height: 1; }
.flash-close:hover { opacity: 1; }

/* ============================================================
   HOMEPAGE
   ============================================================ */

/* Hero */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 600px;
    background: radial-gradient(ellipse, rgba(37, 99, 235, 0.18) 0%, transparent 70%);
    pointer-events: none;
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-glow);
    border: 1px solid rgba(59,130,246,0.3);
    color: #93c5fd;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.2rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
    margin-bottom: 1.25rem;
    max-width: 780px;
}
.hero h1 span { color: var(--primary); }
.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-muted);
    max-width: 580px;
    margin-bottom: 2.5rem;
    line-height: 1.7;
}
.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.hero-footnote {
    font-size: 0.82rem;
    color: var(--text-faint);
}

/* EDI preview visual */
.hero-visual {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    align-items: center;
    max-width: 880px;
    width: 100%;
}
.edi-box, .json-box {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    font-family: var(--mono);
    font-size: 0.72rem;
    line-height: 1.7;
    text-align: left;
    overflow: hidden;
}
.edi-box { border-right: none; border-radius: var(--radius) 0 0 var(--radius); }
.json-box { border-left: none; border-radius: 0 var(--radius) var(--radius) 0; }
.edi-seg { color: var(--primary); font-weight: 700; }
.edi-delim { color: var(--text-faint); }
.edi-val { color: var(--text-muted); }
.edi-hl { color: var(--text); }
.json-key { color: #93c5fd; }
.json-str { color: #86efac; }
.json-num { color: #fcd34d; }
.json-punc { color: var(--text-faint); }
.vis-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
    align-self: stretch;
}
.arrow-label { font-size: 0.65rem; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.3rem; }
.arrow-icon { font-size: 1.5rem; color: var(--accent); }
.vis-tag {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}
.tag-edi { color: var(--primary); }
.tag-json { color: var(--accent); }

/* Stats bar */
.stats-bar {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    background: var(--bg-card);
    padding: 1.5rem;
}
.stats-inner {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    text-align: center;
}
.stat-item { padding: 0.5rem; }
.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1.1;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.2rem; }

/* Section layout */
.section {
    padding: 5rem 1.5rem;
}
.section-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 3rem;
}
.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}
.section-header h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 0.75rem;
}
.section-header p {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 540px;
    margin: 0 auto;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 1.25rem;
}
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 40px rgba(37,99,235,0.12);
}
.feature-card.accent:hover {
    border-color: var(--accent);
    box-shadow: 0 10px 40px rgba(16,185,129,0.12);
}
.fc-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    background: var(--primary-glow);
}
.fc-icon.green { background: var(--accent-glow); }
.fc-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 0.4rem;
}
.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Industries */
.industries-section { background: var(--bg-card); }
.industries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}
.industry-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color var(--transition), transform var(--transition);
    position: relative;
}
.industry-card:hover { border-color: var(--border-light); transform: translateY(-2px); }
.industry-card.coming-soon { opacity: 0.5; cursor: default; }
.industry-card.coming-soon:hover { transform: none; border-color: var(--border); }
/* Clickable card links */
a.feature-card-link, a.industry-card-link {
    display: flex;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}
a.feature-card-link { flex-direction: column; }
a.industry-card-link { align-items: center; }
a.feature-card-link:hover h3 { color: var(--primary); }
a.industry-card-link:hover .ind-name { color: var(--primary); }
a.industry-card-link:hover { border-color: var(--primary) !important; }
.fc-learn-link {
    display: inline-block;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s;
}
a.feature-card-link:hover .fc-learn-link { opacity: 1; }
.ind-arrow {
    margin-left: auto;
    font-size: 1.1rem;
    color: var(--primary);
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    flex-shrink: 0;
}
a.industry-card-link:hover .ind-arrow { opacity: 1; transform: translateX(3px); }
.ind-icon { font-size: 1.75rem; flex-shrink: 0; }
.ind-name { font-size: 0.95rem; font-weight: 600; }
.ind-sub { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }
.ind-badge {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--bg-elevated);
    color: var(--text-faint);
    border: 1px solid var(--border-light);
    padding: 2px 6px;
    border-radius: 20px;
}

/* How it works */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
}
.steps-grid::before {
    content: '';
    position: absolute;
    top: 28px;
    left: calc(16.66% + 20px);
    right: calc(16.66% + 20px);
    height: 1px;
    background: linear-gradient(to right, var(--primary), var(--accent));
    opacity: 0.4;
}
.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    text-align: center;
}
.step-num {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 1px solid rgba(59,130,246,0.3);
    color: var(--primary);
    font-size: 1.2rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}
.step-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.step-card p { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* Pricing section */
.pricing-section { background: var(--bg-card); }
.pricing-toggle-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 2.5rem;
}
.pricing-toggle {
    display: inline-flex;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 4px;
}
.pt-btn {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.55rem 1.4rem;
    border-radius: 8px;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
}
.pt-btn.active { background: var(--primary); color: #fff; }
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
}
.pricing-grid.hidden { display: none; }
.plan-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    position: relative;
    transition: border-color var(--transition), transform var(--transition);
}
.plan-card:hover { transform: translateY(-3px); }
.plan-card.popular {
    border-color: var(--primary);
    background: linear-gradient(160deg, rgba(37,99,235,0.08) 0%, var(--bg) 60%);
}
.plan-card.dev-popular {
    border-color: var(--accent);
    background: linear-gradient(160deg, rgba(16,185,129,0.08) 0%, var(--bg) 60%);
}
.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
}
.popular-badge.green { background: var(--accent); }
.plan-name { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem; }
.plan-price {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    margin-bottom: 0.25rem;
    color: var(--text);
}
.plan-price sup { font-size: 1.1rem; font-weight: 700; vertical-align: super; letter-spacing: 0; }
.plan-price span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.plan-price-custom { font-size: 1.6rem; font-weight: 800; color: var(--text); line-height: 1; margin-bottom: 0.25rem; }
.plan-annual { font-size: 0.78rem; color: var(--text-faint); margin-bottom: 0.5rem; }
.plan-trial-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(16,185,129,0.08);
    border: 1px solid rgba(16,185,129,0.2);
    border-radius: 99px;
    padding: 0.2rem 0.65rem;
    margin-bottom: 0.85rem;
    letter-spacing: 0.01em;
}
.plan-desc { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 1.5rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); line-height: 1.5; }
.plan-features { list-style: none; margin-bottom: 1.75rem; display: flex; flex-direction: column; gap: 0.6rem; }
.plan-features li {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
}
.plan-features li::before {
    content: '✓';
    color: var(--accent);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.plan-cta { display: block; width: 100%; text-align: center; }

/* Setup fee row */
.setup-fee-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.75rem;
    margin-bottom: 0.75rem;
}
.setup-fee-icon { font-size: 0.85rem; flex-shrink: 0; margin-top: 1px; }
.setup-fee-text { flex: 1; }
.setup-fee-amount {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--yellow);
}
.setup-fee-desc {
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 1px;
    line-height: 1.4;
}
.setup-fee-free {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.75rem;
}
.setup-fee-custom {
    font-size: 0.78rem;
    color: var(--text-faint);
    margin-bottom: 0.75rem;
    font-style: italic;
}

/* Add-on packs */
.plan-addons {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-bottom: 1.25rem;
}
.addons-header {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 0.6rem;
}
.addon-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
    gap: 0.5rem;
}
.addon-row:hover { background: var(--bg-elevated); }
.addon-label { font-size: 0.82rem; color: var(--text-muted); }
.addon-right { display: flex; align-items: center; gap: 0.5rem; flex-shrink: 0; }
.addon-price {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
}
.addon-note {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-glow);
    border-radius: 20px;
    padding: 1px 6px;
    white-space: nowrap;
}

/* ── One-stop-shop section ─────────────────────────────────────────────── */
.onestop-section { background: var(--bg-card); }
.onestop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.onestop-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.1rem 1.25rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.15s, background 0.15s;
}
.onestop-item:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.03); }
.onestop-icon { font-size: 1.5rem; flex-shrink: 0; line-height: 1; margin-top: 0.1rem; }
.onestop-title { font-size: 0.93rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.onestop-desc  { font-size: 0.81rem; color: var(--text-muted); line-height: 1.5; }

/* CTA banner */
.cta-section {
    padding: 5rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(37,99,235,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.cta-inner { max-width: 640px; margin: 0 auto; position: relative; }
.cta-section h2 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); font-weight: 800; letter-spacing: -1px; margin-bottom: 1rem; }
.cta-section p { font-size: 1rem; color: var(--text-muted); margin-bottom: 2rem; }
.cta-buttons { display: flex; gap: 0.75rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 3rem 1.5rem 2rem;
    background: var(--bg-card);
}
.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 3rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border);
}
.footer-brand .logo { display: inline-block; margin-bottom: 0.75rem; font-size: 1.25rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; max-width: 220px; }
.footer-col h4 { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 1rem; }
.footer-col a {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
    transition: color var(--transition);
}
.footer-col a:hover { color: var(--text); }
.footer-col .coming { color: var(--text-faint); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-faint);
}
.footer-legal-links { display: flex; gap: 1.25rem; }
.footer-legal-links a { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.footer-legal-links a:hover { color: var(--text); }
.footer-ownership {
    text-align: center;
    font-size: 0.72rem;
    color: var(--text-faint);
    opacity: 0.7;
    margin-top: 0.6rem;
}
.footer-ownership strong { font-weight: 600; color: var(--text-muted); }

/* ── Slim legal footer (appears on all inner app pages) ── */
.legal-footer {
    border-top: 1px solid var(--border);
    padding: 1.1rem 1.5rem;
    background: var(--bg-card);
    margin-top: auto;
}
.legal-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-faint);
}
.legal-footer-links { display: flex; gap: 1.5rem; }
.legal-footer-links a { color: var(--text-muted); text-decoration: none; transition: color var(--transition); }
.legal-footer-links a:hover { color: var(--text); }
.legal-footer-ownership {
    max-width: 1100px;
    margin: 0.55rem auto 0;
    font-size: 0.72rem;
    color: var(--text-faint);
    opacity: 0.7;
    text-align: center;
}
.legal-footer-ownership strong { font-weight: 600; color: var(--text-muted); }

/* ============================================================
   LEGAL PAGES (TOS / AUP / Privacy)
   ============================================================ */
.legal-bg { background: var(--bg); }
.legal-page {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 2.5rem) 1.5rem 4rem;
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
}
.legal-header {
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}
.legal-header .logo { font-size: 1.1rem; margin-bottom: 1rem; display: inline-block; }
.legal-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text);
    margin: 0.5rem 0 0.4rem;
}
.legal-effective {
    font-size: 0.85rem;
    color: var(--text-muted);
}
.legal-body { line-height: 1.75; color: var(--text-muted); }
.legal-body p { margin-bottom: 1rem; }
.legal-body h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin: 2rem 0 0.6rem;
}
.legal-body h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    margin: 1.25rem 0 0.5rem;
}
.legal-body ul {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}
.legal-body li { margin-bottom: 0.4rem; }
.legal-body a { color: var(--primary); text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--text); font-weight: 600; }
.legal-nav {
    display: flex;
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}
.legal-nav a { color: var(--primary); text-decoration: none; font-weight: 500; }
.legal-nav a:hover { text-decoration: underline; }

/* ── Contact Page ── */
.contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-bottom: 2.25rem;
}
.contact-card {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem 1.75rem;
}
.contact-card-icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0.15rem;
}
.contact-card-body h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 0.4rem;
}
.contact-card-body p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 0.75rem;
    line-height: 1.6;
}
.contact-email {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: 0.01em;
}
.contact-email:hover { text-decoration: underline; }
.contact-note {
    background: var(--bg-subtle, rgba(255,255,255,0.03));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.contact-note p { margin: 0; }

/* ── About Page ── */
.about-body p { font-size: 0.95rem; color: var(--text-muted); line-height: 1.75; margin-bottom: 1.1rem; }
.about-lead { font-size: 1.1rem !important; color: var(--text) !important; font-weight: 500; }
.about-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.75rem 0;
    font-size: 0.95rem;
    color: var(--text-muted);
}
.about-location-icon { font-size: 1.1rem; }
.about-location strong { color: var(--text); font-weight: 600; }
.about-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 2rem; }

/* ── TOS checkbox on signup ── */
.tos-check-group { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.tos-check-label {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.tos-check-label input[type="checkbox"] {
    margin-top: 0.15rem;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
    accent-color: var(--primary);
    cursor: pointer;
}
.tos-check-label a { color: var(--primary); text-decoration: none; font-weight: 500; }
.tos-check-label a:hover { text-decoration: underline; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
    position: relative;
}
.auth-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 50%;
    background: radial-gradient(ellipse at top, rgba(37,99,235,0.08) 0%, transparent 60%);
    pointer-events: none;
}
.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 460px;
    position: relative;
    z-index: 1;
}
.auth-logo { text-align: center; margin-bottom: 1.75rem; }
.auth-logo .logo { display: inline-block; font-size: 1.4rem; }

/* Account type tabs */
.account-tabs {
    display: flex;
    gap: 0;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 3px;
    margin-bottom: 2rem;
}
.at-btn {
    flex: 1;
    font-family: var(--font);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.6rem 1rem;
    border-radius: calc(var(--radius-sm) - 2px);
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.at-btn.active { background: var(--primary); color: #fff; }
.at-btn.active.dev { background: var(--accent); }

.auth-title { font-size: 1.4rem; font-weight: 800; text-align: center; margin-bottom: 0.4rem; }
.auth-sub { font-size: 0.875rem; color: var(--text-muted); text-align: center; margin-bottom: 2rem; }
.auth-sub a { color: var(--primary); }
.auth-sub a:hover { text-decoration: underline; }

.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); margin-bottom: 0.4rem; }
label span { color: #f87171; }
.form-input {
    display: block;
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.7rem 0.9rem;
    font-family: var(--font);
    font-size: 0.9rem;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}
.form-input::placeholder { color: var(--text-faint); }
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.form-input.dev:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.form-hint { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.3rem; }

.auth-submit {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.8rem;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
}
.auth-divider {
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-faint);
    margin: 1.25rem 0;
    position: relative;
}
.auth-divider::before, .auth-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background: var(--border-light);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-switch {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 1.25rem;
}
.auth-switch a { color: var(--primary); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

/* ============================================================
   VERIFY EMAIL / DEVICE PAGE
   ============================================================ */
.verify-card { text-align: center; }
.verify-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-glow);
    border: 1px solid rgba(59,130,246,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 1.5rem;
}
.verify-icon.device {
    background: var(--accent-glow);
    border-color: rgba(16,185,129,0.3);
}

.code-input {
    font-family: var(--mono) !important;
    font-size: 1.8rem !important;
    letter-spacing: 0.3em;
    text-align: center;
    padding: 0.85rem 1rem !important;
}

.verify-resend {
    margin-top: 1.25rem;
    font-size: 0.85rem;
    color: var(--text-faint);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.resend-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.resend-btn:hover { text-decoration: underline; }

.btn.ready {
    box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============================================================
   DASHBOARD PAGE
   ============================================================ */
.dashboard-page {
    padding: calc(var(--nav-h) + 2rem) 1.5rem 3rem;
    max-width: 1100px;
    margin: 0 auto;
}
.dashboard-header { margin-bottom: 2rem; }
.dashboard-header h1 { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.3rem; }
.dashboard-header p { color: var(--text-muted); font-size: 0.9rem; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.dash-card-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.5rem; }
.dash-card-value { font-size: 1.8rem; font-weight: 800; letter-spacing: -1px; color: var(--text); }
.dash-card-sub { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.dash-empty {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    color: var(--text-muted);
}
.dash-empty h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text); }
.dash-empty p { font-size: 0.875rem; margin-bottom: 1.5rem; }

/* ============================================================
   DEVELOPER WORKSPACE
   ============================================================ */
.dev-workspace {
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}
.ws-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.ws-breadcrumb {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}
.ws-header h1 { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.ws-meta { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.ws-badge {
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    border: 1px solid;
}
.ws-badge.dev   { color: var(--accent); border-color: rgba(16,185,129,0.35); background: var(--accent-glow); }
.ws-badge.client { color: var(--primary); border-color: rgba(59,130,246,0.35); background: var(--primary-glow); }
.ws-badge-plan   { color: #34d399; border-color: rgba(52,211,153,0.35); background: rgba(52,211,153,0.08); }
.ws-badge-trial  { color: #fbbf24; border-color: rgba(251,191,36,0.35); background: rgba(251,191,36,0.08); }
.ws-badge-danger { color: #f87171; border-color: rgba(248,113,113,0.35); background: rgba(248,113,113,0.08); }
.ws-sep   { color: var(--text-faint); }
.ws-email, .ws-company { font-size: 0.85rem; color: var(--text-muted); }

.ws-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.ws-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.ws-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.35rem; }
.ws-stat-value { font-size: 2rem; font-weight: 800; letter-spacing: -1px; color: var(--text); margin-bottom: 0.2rem; }
.ws-stat-sub   { font-size: 0.78rem; color: var(--text-muted); }

.ws-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}
.ws-main { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }

.ws-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.ws-section-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 1.25rem; gap: 1rem; }
.ws-section-title  { font-size: 1rem; font-weight: 700; margin-bottom: 0.2rem; }
.ws-section-sub    { font-size: 0.82rem; color: var(--text-muted); }

/* Key reveal */
.key-reveal-box {
    background: rgba(16,185,129,0.06);
    border: 1px solid rgba(16,185,129,0.25);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
}
.key-reveal-header { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 1rem; }
.key-reveal-icon   { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.key-reveal-title  { font-size: 0.9rem; font-weight: 700; color: var(--accent); }
.key-reveal-sub    { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.2rem; }
.key-reveal-row    { display: flex; align-items: center; gap: 0.75rem; }
.key-reveal-value  {
    flex: 1;
    font-family: var(--mono);
    font-size: 0.82rem;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.55rem 0.85rem;
    color: var(--accent);
    word-break: break-all;
}

/* API key list */
.key-list { margin-bottom: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.key-list-head {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr auto;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--bg);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}
.key-row {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr auto;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--border);
    align-items: center;
    transition: background var(--transition);
}
.key-row:hover { background: var(--bg-elevated); }
.key-name   { font-size: 0.88rem; font-weight: 600; }
.key-prefix code {
    font-family: var(--mono);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg);
    padding: 2px 6px;
    border-radius: 4px;
}
.key-date   { font-size: 0.8rem; color: var(--text-muted); }
.env-badge  {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16,185,129,0.1);
    color: var(--accent);
    border: 1px solid rgba(16,185,129,0.25);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.env-badge.prod {
    background: rgba(59,130,246,0.1);
    color: var(--primary);
    border-color: rgba(59,130,246,0.25);
}
.revoke-btn {
    font-size: 0.78rem;
    font-weight: 600;
    background: none;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.revoke-btn:hover { border-color: #f87171; color: #f87171; }

.key-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}
.key-empty-icon { font-size: 2rem; margin-bottom: 0.5rem; }
.key-empty-text { font-weight: 700; font-size: 0.95rem; color: var(--text); margin-bottom: 0.3rem; }
.key-empty-sub  { font-size: 0.82rem; }

.key-create-form { border-top: 1px solid var(--border); padding-top: 1.25rem; }
.key-create-title { font-size: 0.82rem; font-weight: 700; color: var(--text-muted); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }
.key-form-row { display: flex; gap: 0.75rem; align-items: flex-start; }
.key-form-row .form-input { flex: 1; }
.form-select { appearance: none; cursor: pointer; }

/* Copy button */
.copy-btn {
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 6px 14px;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--transition);
    flex-shrink: 0;
}
.copy-btn:hover, .copy-btn.copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Quick start snippets */
.qs-tabs { display: flex; gap: 0; margin-bottom: 0; }
.qs-tab {
    font-family: var(--font);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-bottom: none;
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    transition: all var(--transition);
    margin-right: 3px;
}
.qs-tab.active { background: var(--bg-elevated); color: var(--text); border-color: var(--border-light); }
.qs-snippet {
    display: none;
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border-light);
    border-radius: 0 var(--radius-sm) var(--radius-sm) var(--radius-sm);
    padding: 1.25rem 1rem;
}
.qs-snippet.active { display: block; }
.qs-snippet pre { overflow-x: auto; }
.qs-snippet code {
    font-family: var(--mono);
    font-size: 0.82rem;
    color: #a5d6a7;
    line-height: 1.7;
}
.snippet-copy {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 4px 10px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}
.snippet-copy:hover, .snippet-copy.copied { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Sidebar */
.ws-sidebar { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.ws-side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.ws-side-title {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
    margin-bottom: 0.9rem;
}
.ws-side-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.25rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color var(--transition);
    cursor: pointer;
}
.ws-side-link:hover { color: var(--text); }
.wsl-icon { font-size: 1rem; width: 1.4rem; text-align: center; }

/* Environments side */
.env-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.4rem;
    transition: background var(--transition);
}
.env-row.locked { opacity: 0.55; }
.env-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.env-dot.sandbox { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.env-dot.prod    { background: var(--text-faint); }
.env-row > div { flex: 1; }
.env-name  { font-size: 0.85rem; font-weight: 600; }
.env-url   { font-size: 0.72rem; color: var(--text-faint); font-family: var(--mono); }
.env-status-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    background: rgba(16,185,129,0.12);
    color: var(--accent);
    border: 1px solid rgba(16,185,129,0.25);
    white-space: nowrap;
}
.env-status-badge.locked {
    background: rgba(74,96,128,0.2);
    color: var(--text-faint);
    border-color: var(--border);
}

/* ============================================================
   CLIENT DASHBOARD
   ============================================================ */
.client-dash {
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
    max-width: 1200px;
    margin: 0 auto;
}
.cd-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2rem;
}
.cd-header-left .cd-breadcrumb { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 0.4rem; }
.cd-header h1  { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.cd-meta       { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.cd-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.cd-stat { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.cd-stat-label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.35rem; }
.cd-stat-value { font-size: 2rem; font-weight: 800; letter-spacing: -1px; color: var(--text); margin-bottom: 0.2rem; }
.cd-stat-value.cd-stat-ok { color: var(--accent); }
.cd-stat-sub   { font-size: 0.78rem; color: var(--text-muted); }

.cd-body {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 1.5rem;
    align-items: start;
}
/* min-width:0 lets grid children shrink below their content size (prevents horizontal overflow) */
.cd-main    { display: flex; flex-direction: column; gap: 1.5rem; min-width: 0; }
.cd-sidebar { display: flex; flex-direction: column; gap: 1rem;   min-width: 0; }

/* Transaction section */
.cd-section-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.cd-section-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.2rem;
}
.cd-section-sub { font-size: 0.82rem; color: var(--text-muted); }
.cd-feed-filters { display: flex; gap: 0.5rem; flex-shrink: 0; }
.feed-filter { font-size: 0.8rem; padding: 0.45rem 0.7rem; }

/* Live indicator */
.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
    animation: pulse-live 2s infinite;
}
@keyframes pulse-live {
    0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
    70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
    100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

/* Transaction table */
.txn-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    max-width: 100%;
}
.txn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}
.txn-table thead tr {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}
.txn-table th {
    padding: 0.7rem 1rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
    text-align: left;
    white-space: nowrap;
}
.txn-table td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.txn-table tbody tr:last-child td { border-bottom: none; }
.txn-table tbody tr:hover td { background: var(--bg-elevated); }

.txn-empty { text-align: center; padding: 3.5rem 2rem; }
.txn-empty-icon  { font-size: 2.5rem; margin-bottom: 0.75rem; }
.txn-empty-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.4rem; }
.txn-empty-sub   { font-size: 0.85rem; color: var(--text-muted); max-width: 360px; margin: 0 auto; }

/* Status badges for transactions */
.txn-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.txn-status.received { background: rgba(16,185,129,0.1);  color: var(--accent);  border: 1px solid rgba(16,185,129,0.25); }
.txn-status.sent     { background: rgba(59,130,246,0.1);  color: var(--primary); border: 1px solid rgba(59,130,246,0.25); }
.txn-status.pending  { background: rgba(245,158,11,0.1);  color: var(--yellow);  border: 1px solid rgba(245,158,11,0.25); }
.txn-status.error    { background: rgba(248,113,113,0.1); color: #f87171;        border: 1px solid rgba(248,113,113,0.25); }

.txn-actions { display: flex; gap: 0.4rem; }
.txn-action-btn {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 3px 9px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}
.txn-action-btn:hover { background: var(--bg-elevated); color: var(--text); }
.txn-action-btn.danger:hover { border-color: #f87171; color: #f87171; }

/* Client sidebar */
.cd-sidebar { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.cd-side-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
}
.cd-side-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.9rem; }
.cd-side-title  {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-faint);
}
.cd-side-action {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}
.cd-side-action:hover { text-decoration: underline; }

/* Partner empty */
.partner-empty { text-align: center; padding: 1.5rem 0.5rem; }
.partner-empty-icon { font-size: 1.8rem; margin-bottom: 0.4rem; }
.partner-empty-text { font-size: 0.88rem; font-weight: 700; color: var(--text); margin-bottom: 0.25rem; }
.partner-empty-sub  { font-size: 0.78rem; color: var(--text-muted); }

/* Quick Actions */
.quick-actions { display: flex; flex-direction: column; gap: 0.3rem; }
.qa-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.5rem;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: background var(--transition);
}
.qa-btn:hover { background: var(--bg-elevated); }
.qa-icon  { font-size: 1.1rem; width: 1.5rem; text-align: center; flex-shrink: 0; }
.qa-label { font-size: 0.85rem; font-weight: 600; color: var(--text); }
.qa-sub   { font-size: 0.75rem; color: var(--text-muted); }

/* Plan meter */
.plan-info-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.plan-info-name { font-size: 0.95rem; font-weight: 700; }
.plan-upgrade-link { font-size: 0.78rem; font-weight: 600; color: var(--primary); }
.plan-upgrade-link:hover { text-decoration: underline; }
.plan-meter { margin-bottom: 0.75rem; }
.plan-meter-label { display: flex; justify-content: space-between; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.plan-meter-bar { height: 5px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.plan-meter-fill { height: 100%; background: var(--primary); border-radius: 99px; transition: width 0.4s ease; }

/* ── Add Partner Modal ── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(7,13,26,0.75);
    backdrop-filter: blur(4px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.modal-overlay.open,
.modal-overlay.active { display: flex; }
.modal-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 60px rgba(0,0,0,0.6);
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}
.modal-title { font-size: 1rem; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0 0.25rem;
}
.modal-close:hover { color: var(--text); }
.modal-body   { padding: 1.5rem; overflow-y: auto; flex: 1; min-height: 0; }
/* When a <form> wraps modal-body+footer, it must also be a flex column */
.modal-card > form {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.btn-sm { font-size: 0.82rem; padding: 0.5rem 1rem; }

/* ── AI Result Glow ── */
.ai-result-glow {
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    background: rgba(124, 58, 237, 0.08);
    border: 1px solid rgba(139, 92, 246, 0.4);
    border-radius: 10px;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.28), 0 0 4px rgba(139, 92, 246, 0.15) inset;
    animation: aiGlowPulse 3s ease-in-out infinite;
}
@keyframes aiGlowPulse {
    0%, 100% { box-shadow: 0 0 14px rgba(139, 92, 246, 0.22), 0 0 4px rgba(139, 92, 246, 0.1) inset; border-color: rgba(139, 92, 246, 0.35); }
    50%       { box-shadow: 0 0 32px rgba(139, 92, 246, 0.48), 0 0 10px rgba(139, 92, 246, 0.18) inset; border-color: rgba(167, 139, 250, 0.65); }
}

/* ============================================================
   PRICING PAGE
   ============================================================ */
.pricing-page {
    padding: calc(var(--nav-h) + 3rem) 1.5rem 5rem;
}
.pricing-page-inner { max-width: 1100px; margin: 0 auto; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1050px) {
    .ws-body, .cd-body { grid-template-columns: 1fr; }
    .ws-sidebar, .cd-sidebar { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (max-width: 900px) {
    .hero-visual { display: none; }
    .stats-inner { grid-template-columns: repeat(2, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; gap: 2rem; }
    .steps-grid { grid-template-columns: 1fr; }
    .steps-grid::before { display: none; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .ws-stats, .cd-stats { grid-template-columns: repeat(2, 1fr); }
    .key-list-head, .key-row { grid-template-columns: 1fr 1fr auto auto auto; }
    .key-form-row { flex-direction: column; }
}
@media (max-width: 700px) {
    /* ── Mobile full-screen nav drawer ── */
    .nav-links {
        display: none;
        flex-direction: column;
        position: fixed;
        top: var(--nav-h); left: 0; right: 0; bottom: 0;
        background: #080f1e;
        border-top: 1px solid rgba(255,255,255,0.07);
        padding: 0 0 2rem;
        gap: 0;
        z-index: 99;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .nav-links.mobile-open { display: flex; }
    .nav-links > a {
        font-size: 1.05rem;
        padding: 0.9rem 1.5rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        color: var(--text-muted);
    }
    .nav-links > a:hover { background: rgba(255,255,255,0.04); color: var(--text); }
    .nav-mobile-toggle { display: flex; }

    /* Header row inside drawer */
    .mobile-nav-header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding: 1.1rem 1.5rem 0.9rem;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        margin-bottom: 0.5rem;
    }
    .mobile-nav-brand {
        font-size: 1.1rem;
        font-weight: 800;
        color: var(--primary);
        letter-spacing: -0.02em;
    }
    .mobile-nav-close {
        background: rgba(255,255,255,0.06);
        border: 1px solid rgba(255,255,255,0.1);
        border-radius: 50%;
        color: var(--text-muted);
        width: 34px; height: 34px;
        display: flex; align-items: center; justify-content: center;
        font-size: 1.2rem;
        cursor: pointer;
        line-height: 1;
        transition: background 0.15s, color 0.15s;
    }
    .mobile-nav-close:hover { background: rgba(255,255,255,0.12); color: var(--text); }

    /* Section labels */
    .mobile-nav-section-label {
        display: block !important;
        font-size: 0.67rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--text-faint);
        padding: 0.75rem 1.5rem 0.3rem;
    }

    /* Divider between sections */
    .mobile-nav-divider { display: block !important; height: 1px; background: rgba(255,255,255,0.06); margin: 0.75rem 0; }

    /* Sign-up CTA rows */
    .mobile-nav-cta-link {
        display: flex !important;
        align-items: center;
        gap: 0.85rem;
        padding: 0.85rem 1.5rem !important;
        border-bottom: 1px solid rgba(255,255,255,0.05);
        font-size: 0.9rem !important;
        color: var(--text-muted) !important;
    }
    .mobile-nav-cta-link:hover { background: rgba(255,255,255,0.04) !important; }
    .mobile-nav-cta-icon { font-size: 1.3rem; flex-shrink: 0; }
    .mobile-nav-cta-title { font-weight: 600; color: var(--text); font-size: 0.9rem; }
    .mobile-nav-cta-desc { font-size: 0.77rem; color: var(--text-faint); margin-top: 1px; }

    /* Log In link at bottom */
    .mobile-nav-login-link {
        display: block !important;
        font-size: 0.85rem !important;
        color: var(--primary) !important;
        text-align: center;
        padding: 1.25rem 1.5rem !important;
        border-top: 1px solid rgba(255,255,255,0.06);
        margin-top: auto;
        border-bottom: none !important;
    }

    /* Backdrop */
    #mob-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.55);
        z-index: 98;
    }
    #mob-backdrop.active { display: block; }

    /* Scroll lock */
    body.mob-nav-open { overflow: hidden; }

    /* Hamburger → X animation */
    .nav-mobile-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-mobile-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
    .nav-mobile-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }
    .nav-mobile-toggle span { transition: transform 0.2s ease, opacity 0.2s ease; }
    .footer-top { grid-template-columns: 1fr; gap: 1.5rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .form-row { grid-template-columns: 1fr; }
    .auth-card { padding: 1.75rem 1.25rem; }
}
@media (max-width: 500px) {
    .stats-inner { grid-template-columns: 1fr 1fr; }
    .hero-cta { flex-direction: column; width: 100%; }
    .hero-cta .btn { width: 100%; }
}

/* ============================================================
   Document Vault
   ============================================================ */
.vault-page { padding: calc(var(--nav-h) + 2rem) 2rem 3rem; max-width: 1400px; margin: 0 auto; }
.vault-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1.5rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
.vault-header-left { flex: 1; }
.vault-title-row { display: flex; align-items: center; gap: 0.75rem; }
.vault-title-row h1 { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.vault-sub { color: var(--text-muted); font-size: 0.88rem; margin-top: 0.25rem; }
.vault-header-right { display: flex; gap: 0.75rem; align-items: center; }
.vault-filters { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.vault-filter { padding: 0.45rem 0.75rem; font-size: 0.82rem; min-width: 130px; }
.vault-search { padding: 0.45rem 0.85rem; font-size: 0.82rem; width: 220px; }
.vault-count { color: var(--text-faint); font-size: 0.82rem; margin-left: auto; }
.vault-table-wrap { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.vault-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.vault-table thead { background: var(--bg-elevated); }
.vault-table th { padding: 0.7rem 1rem; text-align: left; font-size: 0.75rem; font-weight: 600; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.vault-table td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(26,45,69,0.5); vertical-align: middle; }
.vault-row:last-child td { border-bottom: none; }
.vault-row:hover td { background: rgba(59,130,246,0.04); }
.vault-filename { display: flex; align-items: center; gap: 0.6rem; color: var(--text); font-weight: 500; }
.doc-icon { font-size: 1rem; }
.vault-txset, .vault-size, .vault-date { color: var(--text-muted); font-family: var(--mono); font-size: 0.8rem; }
.vault-actions { display: flex; gap: 0.4rem; }
.vault-empty { text-align: center; padding: 5rem 2rem; }
.vault-empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.vault-empty-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.vault-empty-sub { color: var(--text-muted); font-size: 0.88rem; max-width: 400px; margin: 0 auto; }
.fmt-badge { display: inline-block; padding: 0.2rem 0.5rem; border-radius: 4px; font-size: 0.72rem; font-weight: 700; font-family: var(--mono); }
.fmt-x12 { background: rgba(59,130,246,0.15); color: #60a5fa; border: 1px solid rgba(59,130,246,0.25); }
.fmt-json { background: rgba(245,158,11,0.15); color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.fmt-xml  { background: rgba(139,92,246,0.15); color: #a78bfa; border: 1px solid rgba(139,92,246,0.25); }
.fmt-csv  { background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.25); }
.dir-badge { font-size: 0.78rem; font-weight: 600; }
.dir-badge.inbound  { color: #60a5fa; }
.dir-badge.outbound { color: #34d399; }
.vault-status-badge { display: inline-block; padding: 0.18rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 600; }
.vault-status-badge.stored    { background: rgba(59,130,246,0.12); color: #93c5fd; }
.vault-status-badge.processed { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.vault-status-badge.error     { background: rgba(239,68,68,0.12);  color: #fca5a5; }
.txset-chip { display: inline-block; padding: 0.15rem 0.45rem; background: var(--bg-elevated); border: 1px solid var(--border-light); border-radius: 4px; font-size: 0.72rem; font-family: var(--mono); color: var(--text-muted); margin-left: 0.3rem; }

/* upload modal */
.upload-tabs { display: flex; gap: 0; margin-bottom: 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.upload-tab { flex: 1; padding: 0.5rem; background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size: 0.82rem; font-weight: 600; transition: var(--transition); }
.upload-tab.active { background: var(--primary); color: #fff; }
.upload-drop-zone { position: relative; border: 2px dashed var(--border-light); border-radius: var(--radius-sm); padding: 2.5rem 1.5rem; text-align: center; cursor: pointer; transition: var(--transition); }
.upload-drop-zone:hover { border-color: var(--primary); background: var(--primary-glow); }
.udz-icon { font-size: 2rem; margin-bottom: 0.75rem; }
.udz-text { color: var(--text); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.35rem; }
.udz-sub  { color: var(--text-faint); font-size: 0.78rem; }
.upload-file-name { padding: 0.5rem 0.75rem; background: rgba(16,185,129,0.08); border: 1px solid rgba(16,185,129,0.2); border-radius: var(--radius-sm); color: #34d399; font-size: 0.82rem; font-weight: 600; margin-top: 0.75rem; }
.upload-paste-area { min-height: 150px; font-family: var(--mono); font-size: 0.8rem; resize: vertical; }
.upload-meta { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.src-upload-zone { position: relative; border: 2px dashed var(--border-light); border-radius: var(--radius-sm); padding: 1.75rem 1rem; text-align: center; cursor: pointer; transition: var(--transition); }
.src-upload-zone:hover { border-color: var(--primary); background: var(--primary-glow); }

/* preview modal */
.modal-card-wide { max-width: 820px; width: 95vw; }
.preview-pre { background: var(--bg); margin: 0; padding: 1.5rem; overflow: auto; max-height: 60vh; font-family: var(--mono); font-size: 0.78rem; line-height: 1.65; color: #93c5fd; white-space: pre-wrap; word-break: break-word; }

/* live dot */
.live-dot { display: inline-block; width: 9px; height: 9px; background: var(--accent); border-radius: 50%; animation: pulseDot 2s infinite; }
@keyframes pulseDot { 0%,100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); } 50% { box-shadow: 0 0 0 5px rgba(16,185,129,0); } }

.vault-link-btn { color: var(--primary); font-size: 0.82rem; font-weight: 600; text-decoration: underline; }

/* ============================================================
   Visual Mapping GUI
   ============================================================ */
.mapper-page { display: flex; flex-direction: column; height: 100vh; overflow: hidden; padding-top: var(--nav-h); }

/* Toolbar */
.mapper-toolbar { display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 1.25rem; background: var(--bg-card); border-bottom: 1px solid var(--border); flex-shrink: 0; flex-wrap: wrap; }
.toolbar-back { color: var(--text-muted); font-size: 0.82rem; font-weight: 600; white-space: nowrap; transition: color 0.15s; }
.toolbar-back:hover { color: var(--text); }
.toolbar-spacer { flex: 1; }
.toolbar-field-group { display: flex; flex-direction: column; gap: 0.15rem; }
.toolbar-label { font-size: 0.65rem; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.toolbar-select { background: var(--bg-input); border: 1px solid var(--border-light); color: var(--text); padding: 0.3rem 0.6rem; border-radius: 6px; font-size: 0.82rem; font-family: var(--font); cursor: pointer; }
.toolbar-arrow { color: var(--primary); font-size: 1.1rem; font-weight: 700; padding: 0 0.25rem; margin-top: 1rem; }
.toolbar-actions { display: flex; gap: 0.5rem; align-items: center; }

/* Name bar */
.mapper-namebar { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 1.25rem; background: var(--bg); border-bottom: 1px solid rgba(26,45,69,0.6); flex-shrink: 0; }
.map-name-input { flex: 1; background: transparent; border: none; outline: none; font-size: 0.9rem; font-weight: 600; color: var(--text-muted); font-family: var(--font); padding: 0.2rem 0; cursor: text; transition: color 0.15s; }
.map-name-input:focus { color: var(--text); }
.map-name-input::placeholder { color: var(--text-faint); font-style: italic; }
.map-status { font-size: 0.78rem; font-weight: 600; }
.map-status.ok  { color: var(--accent); }
.map-status.err { color: #f87171; }
.map-id-badge { font-size: 0.72rem; padding: 0.15rem 0.5rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 999px; color: var(--text-faint); font-family: var(--mono); }

/* 3-panel body */
.mapper-body { display: grid; grid-template-columns: 320px 1fr 380px; flex: 1; overflow: hidden; min-height: 0; }
.mapper-panel { display: flex; flex-direction: column; border-right: 1px solid var(--border); overflow: hidden; background: var(--bg-card); }
.mapper-panel:last-child { border-right: none; }
.mapper-panel-center { background: var(--bg); }

/* Panel header */
.panel-hdr { display: flex; align-items: center; justify-content: space-between; padding: 0.7rem 1rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.panel-title { font-size: 0.78rem; font-weight: 700; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.08em; }
.panel-hdr-right { display: flex; align-items: center; gap: 0.5rem; }
.panel-select { background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); padding: 0.25rem 0.5rem; border-radius: 5px; font-size: 0.75rem; cursor: pointer; max-width: 160px; }

/* Source panel */
.source-input-area { padding: 0.85rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.source-tabs { display: flex; gap: 0; margin-bottom: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.source-tab { flex: 1; padding: 0.35rem; background: transparent; color: var(--text-muted); border: none; cursor: pointer; font-size: 0.75rem; font-weight: 600; transition: var(--transition); }
.source-tab.active { background: var(--primary); color: #fff; }
.src-textarea { width: 100%; min-height: 130px; max-height: 200px; resize: vertical; font-family: var(--mono); font-size: 0.75rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); padding: 0.65rem; border-radius: var(--radius-sm); outline: none; line-height: 1.55; transition: border-color 0.15s; margin-bottom: 0.65rem; }
.src-textarea:focus { border-color: var(--primary); }
.btn-full { width: 100%; }

/* Source field list */
.source-fields-wrap { flex: 1; overflow-y: auto; display: flex; flex-direction: column; }
.source-fields-hdr { display: flex; align-items: center; justify-content: space-between; padding: 0.5rem 0.85rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.source-fields-hdr span { font-size: 0.72rem; color: var(--text-faint); font-weight: 600; }
.src-search { background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 0.25rem 0.6rem; border-radius: 5px; font-size: 0.72rem; outline: none; width: 120px; }
.source-field-list { flex: 1; overflow-y: auto; padding: 0.5rem 0; }
.source-empty { color: var(--text-faint); font-size: 0.8rem; text-align: center; padding: 2rem 1rem; font-style: italic; }
.seg-hdr { padding: 0.3rem 0.85rem 0.15rem; font-size: 0.65rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.5rem; }
.src-field-item { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.35rem 0.85rem; cursor: pointer; transition: background 0.1s; border-radius: 0; }
.src-field-item:hover { background: rgba(59,130,246,0.06); }
.src-field-item.selected { background: rgba(59,130,246,0.15); border-left: 2px solid var(--primary); }
.src-field-key { font-family: var(--mono); font-size: 0.72rem; color: #60a5fa; font-weight: 500; white-space: nowrap; }
.src-field-val { font-size: 0.72rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; max-width: 110px; }

/* Mapping center panel */
.mapping-hint { padding: 1rem; background: rgba(59,130,246,0.05); border-bottom: 1px solid var(--border); font-size: 0.8rem; color: var(--text-muted); line-height: 1.6; flex-shrink: 0; }
.mapping-table-wrap { flex: 1; overflow-y: auto; padding: 0.5rem; }
.mapping-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.mapping-table thead th { padding: 0.5rem 0.5rem; font-size: 0.7rem; color: var(--text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); text-align: left; }
.mapping-row td { padding: 0.35rem 0.5rem; border-bottom: 1px solid rgba(26,45,69,0.4); vertical-align: middle; }
.map-cell-input { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text); padding: 0.3rem 0.5rem; border-radius: 5px; font-size: 0.78rem; font-family: var(--mono); outline: none; transition: border-color 0.15s; }
.map-cell-input:focus { border-color: var(--primary); }
.map-cell-select { width: 100%; background: var(--bg-input); border: 1px solid var(--border); color: var(--text-muted); padding: 0.3rem 0.4rem; border-radius: 5px; font-size: 0.75rem; cursor: pointer; }
.del-row-btn { background: transparent; border: 1px solid rgba(239,68,68,0.2); color: #f87171; width: 22px; height: 22px; border-radius: 4px; cursor: pointer; font-size: 0.9rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.del-row-btn:hover { background: rgba(239,68,68,0.15); }
.mapping-count { font-size: 0.72rem; color: var(--text-faint); font-weight: 600; }
.mapping-templates { padding: 0.65rem 1rem; border-top: 1px solid var(--border); flex-shrink: 0; display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.mapping-template-label { font-size: 0.72rem; color: var(--text-faint); white-space: nowrap; }
.tmpl-btn { padding: 0.25rem 0.65rem; background: var(--bg-elevated); border: 1px solid var(--border-light); color: var(--text-muted); border-radius: 999px; font-size: 0.72rem; cursor: pointer; font-weight: 600; transition: var(--transition); white-space: nowrap; }
.tmpl-btn:hover { border-color: var(--primary); color: var(--primary); }

/* Output panel */
.output-actions { padding: 0.85rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.output-meta { padding: 0.45rem 1rem; font-size: 0.75rem; color: var(--text-muted); background: var(--bg-elevated); border-bottom: 1px solid var(--border); font-family: var(--mono); flex-shrink: 0; }
.output-pre { flex: 1; overflow: auto; margin: 0; padding: 1rem; font-family: var(--mono); font-size: 0.75rem; line-height: 1.65; color: #93c5fd; white-space: pre-wrap; word-break: break-word; background: var(--bg); }
.output-save-row { display: flex; align-items: center; justify-content: space-between; padding: 0.6rem 1rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.checkbox-label { display: flex; align-items: center; gap: 0.5rem; font-size: 0.78rem; color: var(--text-muted); cursor: pointer; }
.checkbox-label input { accent-color: var(--accent); }

/* Save/maps modals use existing modal styles */
.save-map-summary { padding: 0.75rem; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: 0.82rem; color: var(--text-muted); margin-top: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }

/* shared util */
.toolbar-back { display: inline-flex; align-items: center; gap: 0.35rem; }
.nav-vault-link { font-size: 0.82rem !important; padding: 0.4rem 0.75rem !important; }

/* ── Nav: Apps dropdown ─────────────────────────────────────────────────── */
.nav-apps-dd { position: relative; }
.nav-apps-btn {
    font-size: 0.82rem !important; padding: 0.4rem 0.8rem !important;
    display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer;
}
.nav-apps-menu {
    display: none;
    position: absolute; top: calc(100% + 10px); left: 0;
    min-width: 210px;
    background: #0d1726;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px; padding: 6px;
    z-index: 9999;
    box-shadow: 0 16px 48px rgba(0,0,0,0.55);
}
.nav-apps-dd:hover .nav-apps-menu,
.nav-apps-dd.open .nav-apps-menu { display: block; }
.nav-apps-menu a {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 13px; font-size: 13px; color: #cbd5e1;
    text-decoration: none; border-radius: 8px; font-weight: 500;
    transition: background 0.13s, color 0.13s;
}
.nav-apps-menu a:hover { background: rgba(255,255,255,0.07); color: #e8f0fe; }
.nav-apps-menu .apps-divider {
    height: 1px; background: rgba(255,255,255,0.07); margin: 5px 8px;
}
/* ── Messages page ──────────────────────────────────────────────────────── */
.thread-link {
    display: block; text-decoration: none;
    border-bottom: 1px solid rgba(255,255,255,.05);
    padding: 14px 16px; transition: background .13s;
    background: transparent;
}
.thread-link:hover { background: rgba(255,255,255,.05) !important; }
.thread-link.is-active { background: rgba(59,130,246,.12) !important; }
.thread-link.is-active:hover { background: rgba(59,130,246,.18) !important; }
.msgs-empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    text-align: center; padding: 60px 24px;
    color: #64748b; min-height: 280px;
}

/* ── Nav: Messages pill ─────────────────────────────────────────────────── */
.nav-msgs-link {
    font-size: 0.82rem !important; padding: 0.4rem 0.75rem !important;
    display: inline-flex !important; align-items: center; gap: 5px;
}
.nav-unread-pill {
    background: #ef4444; color: #fff;
    font-size: 11px; font-weight: 700;
    padding: 1px 6px; border-radius: 10px;
    min-width: 18px; text-align: center; line-height: 1.4;
}

/* Owner / Admin nav badges */
.nav-role-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.28rem 0.7rem; border-radius: 999px;
    font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
    text-decoration: none; transition: opacity 0.15s;
    border: 1px solid;
}
.nav-role-badge:hover { opacity: 0.8; }
.nav-role-owner {
    color: #f59e0b;
    background: rgba(245,158,11,0.12);
    border-color: rgba(245,158,11,0.35);
}
.nav-role-admin {
    color: #f87171;
    background: rgba(248,113,113,0.10);
    border-color: rgba(248,113,113,0.3);
}
.nav-role-enterprise {
    color: #a78bfa;
    background: rgba(167,139,250,0.12);
    border-color: rgba(167,139,250,0.3);
    cursor: default;
}

/* badge-new */
.badge-new { display: inline-block; padding: 0.1rem 0.4rem; background: rgba(16,185,129,0.15); color: #34d399; border: 1px solid rgba(16,185,129,0.3); border-radius: 999px; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; vertical-align: middle; }

/* highlighted sidebar link */
.ws-side-link-cta { border: 1px solid rgba(59,130,246,0.2) !important; background: rgba(59,130,246,0.05); }
.ws-side-link-cta:hover { background: rgba(59,130,246,0.12) !important; border-color: var(--primary) !important; }
.wsl-resource-row { display:flex; align-items:center; gap:0.4rem; margin-bottom:0.35rem; }
.wsl-guide-link { font-size:0.72rem; color:var(--primary); white-space:nowrap; text-decoration:none; opacity:0.8; flex-shrink:0; }
.wsl-guide-link:hover { opacity:1; text-decoration:underline; }

/* src-add-btn — quick + button on source field rows */
.src-field-item { position: relative; }
.src-add-btn {
    display: none;
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    width: 20px; height: 20px;
    background: var(--primary); color: #fff;
    border: none; border-radius: 4px;
    font-size: 0.9rem; font-weight: 700;
    cursor: pointer; line-height: 1;
    align-items: center; justify-content: center;
    transition: background 0.15s;
    z-index: 2;
}
.src-field-item:hover .src-add-btn { display: flex; }
.src-add-btn:hover { background: var(--primary-dark); }

/* industry/txset toolbar cascade */
#tb-txset { min-width: 200px; }
#tb-industry { min-width: 180px; }

/* ── Conditional Logic UI ────────────────────────────────────────────────── */

/* Actions cell — holds IF button + delete button side by side */
.rule-actions-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.35rem 0.4rem;
    white-space: nowrap;
}

/* ⚡ IF toggle button */
.cond-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    padding: 0.2rem 0.45rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-faint);
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.cond-toggle-btn:hover {
    border-color: var(--yellow);
    color: var(--yellow);
    background: rgba(245,158,11,0.08);
}
.cond-toggle-btn.active {
    background: rgba(245,158,11,0.15);
    border-color: var(--yellow);
    color: var(--yellow);
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}

/* Condition expansion row — hidden by default */
.mapping-cond-row { display: none; }
.mapping-cond-row.open { display: table-row; }
.mapping-cond-row > td {
    padding: 0 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(245,158,11,0.18);
    background: rgba(245,158,11,0.03);
}

/* Outer container — vertical stack: IF/AND block, then ELSE block */
.cond-editor {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0.55rem 0.75rem 0.55rem;
    background: rgba(7,13,26,0.6);
    border: 1px solid rgba(245,158,11,0.22);
    border-radius: var(--radius-sm);
}

/* ── IF / AND block ── */
.cond-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding-bottom: 0.45rem;
}

/* One IF or AND condition row */
.cond-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

/* IF / AND labels */
.cond-prefix-label {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    width: 2.5rem;
    text-align: center;
    flex-shrink: 0;
    border-radius: 4px;
    padding: 0.18rem 0.3rem;
    white-space: nowrap;
}
.if-lbl {
    background: rgba(245,158,11,0.18);
    color: var(--yellow);
    border: 1px solid rgba(245,158,11,0.35);
}
.and-lbl {
    background: rgba(99,179,237,0.13);
    color: #63b3ed;
    border: 1px solid rgba(99,179,237,0.3);
}

/* Field / value inputs in condition items */
.cond-item .cond-field-inp { width: 140px; font-size: 0.74rem; }
.cond-item .cond-op-sel   { width: 118px !important; font-size: 0.74rem; }
.cond-item .cond-val-inp  { width: 120px; font-size: 0.74rem; }

/* × remove button for AND rows */
.cond-remove-btn {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-faint);
    border-radius: 4px;
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.85rem;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    flex-shrink: 0;
}
.cond-remove-btn:hover {
    border-color: var(--danger);
    color: var(--danger);
    background: rgba(239,68,68,0.08);
}

/* + AND button */
.add-and-btn {
    align-self: flex-start;
    padding: 0.2rem 0.6rem;
    background: rgba(99,179,237,0.08);
    border: 1px solid rgba(99,179,237,0.28);
    color: #63b3ed;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}
.add-and-btn:hover {
    background: rgba(99,179,237,0.18);
    border-color: #63b3ed;
}

/* comma hint text */
.cond-comma-hint {
    font-size: 0.62rem;
    color: var(--text-faint);
    font-style: italic;
    margin-left: 0.5rem;
    align-self: center;
}

/* ── ELSE block ── */
.cond-else-block {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding-top: 0.45rem;
    border-top: 1px solid rgba(245,158,11,0.12);
    margin-top: 0.1rem;
    flex-wrap: wrap;
}

.else-divider-label {
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    background: rgba(139,92,246,0.16);
    border: 1px solid rgba(139,92,246,0.32);
    color: #a78bfa;
    border-radius: 4px;
    padding: 0.18rem 0.35rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin-top: 0.05rem;
}

.else-opts {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.else-opt {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.73rem;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
}
.else-opt input[type="radio"] {
    accent-color: var(--yellow);
    cursor: pointer;
    width: 0.8rem;
    height: 0.8rem;
}
.else-opt span {
    color: var(--text-muted);
}
.else-opt .else-val-inp { width: 110px; font-size: 0.73rem; }
.else-opt .else-src-inp { width: 110px; font-size: 0.73rem; }
.else-opt .else-tf-sel  { width: 90px !important; font-size: 0.73rem; }

/* ══════════════════════════════════════════════════════════════════
   MAPPER SHOWCASE SECTION
══════════════════════════════════════════════════════════════════ */

.mapper-showcase-section {
    background: linear-gradient(180deg, rgba(99,102,241,0.04) 0%, transparent 100%);
    border-top: 1px solid rgba(99,102,241,0.1);
}

.showcase-sub {
    max-width: 680px;
    margin: 0 auto 3rem;
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Two-column layout: features left, mock right */
.mapper-showcase-wrap {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3.5rem;
    align-items: start;
}
@media (max-width: 900px) {
    .mapper-showcase-wrap { grid-template-columns: 1fr; gap: 2rem; }
}

/* Feature bullet list */
.mapper-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

.mfl-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mfl-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 2.2rem;
    text-align: center;
    margin-top: 0.05rem;
    filter: drop-shadow(0 0 6px rgba(99,102,241,0.3));
}

.mfl-title {
    font-size: 0.975rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
    letter-spacing: -0.01em;
}

.mfl-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.mapper-cta-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.btn-ghost-sm {
    color: var(--text-muted);
    font-size: 0.875rem;
    text-decoration: none;
    transition: var(--transition);
}
.btn-ghost-sm:hover { color: var(--text-primary); }

/* ── Mapper Mock-up Window ── */
.mapper-mock-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.mm-window {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.04) inset,
                0 0 60px rgba(99,102,241,0.08);
    font-size: 0.78rem;
    font-family: var(--font-mono);
}

/* Title bar */
.mm-titlebar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
}

.mm-dots {
    display: flex;
    gap: 0.35rem;
}
.mm-dots span {
    width: 9px; height: 9px;
    border-radius: 50%;
    display: block;
}
.mm-dots span:nth-child(1) { background: #ff5f57; }
.mm-dots span:nth-child(2) { background: #febc2e; }
.mm-dots span:nth-child(3) { background: #28c840; }

.mm-title {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-family: var(--font-sans);
    font-weight: 500;
}

/* Toolbar row */
.mm-toolbar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    background: rgba(15,20,40,0.6);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}

.mm-chip {
    display: inline-block;
    padding: 0.18rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.68rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    white-space: nowrap;
}
.mm-chip-accent {
    background: rgba(99,102,241,0.12);
    border-color: rgba(99,102,241,0.3);
    color: var(--primary-light);
}

.mm-spacer { flex: 1; }

.mm-action-btn {
    padding: 0.2rem 0.55rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 0.68rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    cursor: default;
    white-space: nowrap;
}
.mm-btn-convert {
    background: rgba(99,102,241,0.15);
    border-color: var(--primary);
    color: var(--primary-light);
    font-weight: 700;
}

/* Table */
.mm-table { padding: 0; }

.mm-thead {
    display: grid;
    grid-template-columns: 28% 30% 22% 20%;
    padding: 0.35rem 0.75rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.65rem;
    font-family: var(--font-sans);
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.mm-row {
    display: grid;
    grid-template-columns: 28% 30% 22% 20%;
    padding: 0.42rem 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    align-items: center;
    transition: background 0.15s;
}
.mm-row:hover { background: rgba(255,255,255,0.02); }
.mm-row-hl {
    background: rgba(245,158,11,0.06) !important;
    border-bottom: none !important;
}

.mm-src  { color: #7dd3fc; font-weight: 600; }
.mm-tgt  { color: #86efac; }
.mm-tf   { color: var(--text-faint); font-size: 0.7rem; }

.mm-if-pill {
    display: inline-block;
    padding: 0.12rem 0.4rem;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 4px;
    color: var(--yellow);
    font-size: 0.65rem;
    font-weight: 800;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

/* Condition expand */
.mm-cond-expand {
    background: rgba(245,158,11,0.04);
    border-bottom: 1px solid rgba(245,158,11,0.15);
    padding: 0.35rem 0.75rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mm-cond-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mm-cond-if {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 3px;
    color: var(--yellow);
    font-size: 0.62rem;
    font-weight: 900;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
}
.mm-cond-else {
    display: inline-block;
    padding: 0.1rem 0.35rem;
    background: rgba(139,92,246,0.16);
    border: 1px solid rgba(139,92,246,0.32);
    border-radius: 3px;
    color: #a78bfa;
    font-size: 0.62rem;
    font-weight: 900;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
}
.mm-cond-field { color: #7dd3fc; font-weight: 600; }
.mm-cond-op    { color: var(--text-faint); font-size: 0.7rem; font-family: var(--font-sans); }
.mm-cond-val   { color: var(--yellow); }
.mm-cond-then  { color: var(--text-faint); font-size: 0.7rem; font-style: italic; font-family: var(--font-sans); }

.mm-else-line  { padding-left: 0.2rem; }
.mm-else-opt   { font-family: var(--font-sans); font-size: 0.68rem; color: var(--text-faint); }
.mm-else-opt-active { font-family: var(--font-sans); font-size: 0.68rem; color: #86efac; font-weight: 600; }

/* Status bar */
.mm-statusbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.75rem;
    background: rgba(15,20,40,0.6);
    border-top: 1px solid var(--border-light);
}

.mm-status-ok    { color: #86efac; font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600; }
.mm-status-sep   { color: var(--text-faint); }
.mm-status-ready { color: var(--text-faint); font-family: var(--font-sans); font-size: 0.68rem; }

.mm-save-btn {
    margin-left: auto;
    padding: 0.18rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    cursor: default;
}

.mm-caption {
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-faint);
    font-style: italic;
}

/* ── Feature card enhancement ── */
.fc-mapper-card {
    border-color: rgba(99,102,241,0.35) !important;
    background: linear-gradient(135deg, rgba(99,102,241,0.08), rgba(16,185,129,0.04)) !important;
}
.fc-try-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.82rem;
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.fc-try-link:hover { color: #fff; }


/* ══════════════════════════════════════════════════════════════════
   COMPARISON SECTION
══════════════════════════════════════════════════════════════════ */

.compare-section {
    background: linear-gradient(180deg, transparent, rgba(239,68,68,0.03) 40%, rgba(16,185,129,0.03) 60%, transparent);
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 860px;
    margin: 0 auto;
}
@media (max-width: 680px) {
    .compare-grid { grid-template-columns: 1fr; }
}

.compare-col {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.compare-col-head {
    padding: 0.85rem 1.25rem;
    font-weight: 700;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
}

.compare-old .compare-col-head {
    background: rgba(239,68,68,0.1);
    border-bottom: 1px solid rgba(239,68,68,0.2);
}
.compare-new .compare-col-head {
    background: rgba(16,185,129,0.1);
    border-bottom: 1px solid rgba(16,185,129,0.2);
}

.compare-badge-old {
    color: #f87171;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}
.compare-badge-new {
    color: #34d399;
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
}

.compare-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.8rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 0.855rem;
    line-height: 1.5;
}
.compare-item:last-child { border-bottom: none; }

.compare-item.pain {
    color: var(--text-muted);
    background: rgba(239,68,68,0.02);
}
.compare-item.win {
    color: var(--text-primary);
    background: rgba(16,185,129,0.02);
}

.compare-icon { font-size: 1rem; flex-shrink: 0; margin-top: 0.05rem; }

/* ══════════════════════════════════════════════════════════════════
   MAPPER LANDING PAGE  (/mapper)
══════════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.mlp-hero {
    padding: 5rem 1.5rem 3.5rem;
    text-align: center;
    background: radial-gradient(ellipse 90% 60% at 50% -10%,
                rgba(99,102,241,0.18) 0%, transparent 70%);
    position: relative;
}
.mlp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%236366f1' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}
.mlp-hero-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }

.mlp-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 1.5rem;
    font-size: 0.85rem;
    color: var(--text-faint);
}
.mlp-eyebrow-chip {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    border-radius: 99px;
    color: var(--primary-light);
    font-size: 0.78rem;
    font-weight: 700;
}
.mlp-eyebrow-sep  { color: var(--border-light); }
.mlp-eyebrow-txt  { color: var(--text-faint); }

.mlp-h1 {
    font-size: clamp(2.4rem, 6vw, 3.6rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    background: linear-gradient(135deg, #fff 30%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mlp-hero-sub {
    font-size: 1.1rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 620px;
    margin: 0 auto 2rem;
}

.mlp-hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
}

.mlp-hero-footnote {
    font-size: 0.8rem;
    color: var(--text-faint);
    margin: 0;
}

/* ── Full GUI Mock Section ── */
.mlp-mock-section {
    padding: 1rem 1rem 3.5rem;
}
.mlp-mock-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.mlp-mock-label {
    font-size: 0.78rem;
    color: var(--text-faint);
    font-style: italic;
    letter-spacing: 0.03em;
}

/* The big window */
.mlp-mm-window {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,0.55),
                0 0 0 1px rgba(255,255,255,0.04) inset,
                0 0 100px rgba(99,102,241,0.1);
    font-size: 0.775rem;
    font-family: var(--font-mono);
}

.mlp-mm-titlebar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-light);
}
.mlp-mm-dots { display: flex; gap: 0.35rem; }
.mlp-mm-dots span {
    width: 10px; height: 10px; border-radius: 50%; display: block;
}
.mlp-mm-dots span:nth-child(1) { background: #ff5f57; }
.mlp-mm-dots span:nth-child(2) { background: #febc2e; }
.mlp-mm-dots span:nth-child(3) { background: #28c840; }

.mlp-mm-wintitle {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-family: var(--font-sans);
    font-weight: 500;
    flex: 1;
}

.mlp-mm-nav {
    display: flex;
    gap: 1.25rem;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    color: var(--text-faint);
}
.mlp-mm-nav .active {
    color: var(--primary-light);
    font-weight: 600;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 0.15rem;
}

/* Toolbar */
.mlp-mm-toolbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(10,14,30,0.7);
    border-bottom: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.mlp-mm-tb-group {
    display: flex;
    flex-direction: column;
    gap: 0.05rem;
}
.mlp-mm-tblabel {
    font-size: 0.58rem;
    color: var(--text-faint);
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.mlp-mm-tbsel {
    padding: 0.22rem 0.55rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 0.72rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    white-space: nowrap;
}
.mlp-chip-accent {
    background: rgba(99,102,241,0.15) !important;
    border-color: rgba(99,102,241,0.35) !important;
    color: var(--primary-light) !important;
    font-weight: 700;
}
.mlp-mm-spacer { flex: 1; }
.mlp-mm-tbname {
    font-size: 0.7rem;
    font-family: var(--font-sans);
    color: var(--text-faint);
    font-style: italic;
}
.mlp-mm-tbaction {
    padding: 0.25rem 0.65rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 5px;
    font-size: 0.7rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    white-space: nowrap;
}
.mlp-btn-run {
    background: rgba(99,102,241,0.18) !important;
    border-color: var(--primary) !important;
    color: var(--primary-light) !important;
    font-weight: 700;
}

/* Three panels */
.mlp-mm-panels {
    display: grid;
    grid-template-columns: 200px 1fr 200px;
    min-height: 340px;
    border-bottom: 1px solid var(--border-light);
}
@media (max-width: 760px) {
    .mlp-mm-panels { grid-template-columns: 1fr; }
}

.mlp-mm-panel {
    border-right: 1px solid var(--border-light);
}
.mlp-mm-panel:last-child { border-right: none; }

.mlp-panel-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.7rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.68rem;
    font-family: var(--font-sans);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.mlp-panel-count {
    font-weight: 400;
    color: var(--text-faint);
    font-size: 0.63rem;
    text-transform: none;
    letter-spacing: 0;
}

/* Source tree */
.mlp-src-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.12s;
}
.mlp-src-seg {
    font-size: 0.65rem;
    color: var(--text-faint);
    font-family: var(--font-sans);
    background: rgba(255,255,255,0.03);
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}
.mlp-src-field {
    cursor: default;
}
.mlp-src-field:hover { background: rgba(99,102,241,0.06); }
.mlp-src-selected { background: rgba(99,102,241,0.1) !important; }

.mlp-src-key  { color: #7dd3fc; font-weight: 600; font-size: 0.72rem; flex: 0 0 auto; }
.mlp-src-val  { color: var(--yellow); font-size: 0.7rem; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mlp-src-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px; height: 16px;
    border-radius: 3px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    color: var(--text-faint);
    font-size: 0.7rem;
    flex-shrink: 0;
    cursor: default;
}
.mlp-src-plus.active {
    background: rgba(99,102,241,0.2);
    border-color: var(--primary);
    color: var(--primary-light);
}

/* Rules panel */
.mlp-panel-rules { overflow-x: auto; }
.mlp-add-rule-btn {
    margin-left: auto;
    padding: 0.12rem 0.4rem;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 4px;
    color: var(--primary-light);
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    cursor: default;
}
.mlp-rule-thead {
    display: grid;
    grid-template-columns: 22% 27% 20% 31%;
    padding: 0.35rem 0.7rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-light);
    font-size: 0.63rem;
    font-family: var(--font-sans);
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}
.mlp-rule-row {
    display: grid;
    grid-template-columns: 22% 27% 20% 31%;
    align-items: center;
    padding: 0.4rem 0.7rem;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    transition: background 0.12s;
}
.mlp-rule-row:hover { background: rgba(255,255,255,0.02); }
.mlp-rule-hl {
    background: rgba(245,158,11,0.06) !important;
    border-bottom: none !important;
}
.mlp-r-src { color: #7dd3fc; font-weight: 600; font-size: 0.73rem; }
.mlp-r-tgt { color: #86efac; font-size: 0.73rem; }
.mlp-r-tf  { color: var(--text-faint); font-size: 0.68rem; }
.mlp-if-pill {
    display: inline-block;
    padding: 0.1rem 0.38rem;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.4);
    border-radius: 4px;
    color: var(--yellow);
    font-size: 0.63rem;
    font-weight: 800;
    font-family: var(--font-sans);
    letter-spacing: 0.05em;
}

/* Condition expand row */
.mlp-cond-expand {
    background: rgba(245,158,11,0.04);
    border-bottom: 1px solid rgba(245,158,11,0.14);
    padding: 0.35rem 0.7rem 0.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}
.mlp-cond-line {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}
.mlp-cond-if {
    display: inline-block;
    padding: 0.08rem 0.32rem;
    background: rgba(245,158,11,0.18);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 3px;
    color: var(--yellow);
    font-size: 0.6rem;
    font-weight: 900;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
}
.mlp-cond-else {
    display: inline-block;
    padding: 0.08rem 0.32rem;
    background: rgba(139,92,246,0.16);
    border: 1px solid rgba(139,92,246,0.32);
    border-radius: 3px;
    color: #a78bfa;
    font-size: 0.6rem;
    font-weight: 900;
    font-family: var(--font-sans);
    letter-spacing: 0.1em;
}
.mlp-cond-field { color: #7dd3fc; font-weight: 600; font-size: 0.71rem; }
.mlp-cond-op    { color: var(--text-faint); font-size: 0.68rem; font-family: var(--font-sans); }
.mlp-cond-val   { color: var(--yellow); font-size: 0.71rem; }
.mlp-cond-then  { color: var(--text-faint); font-size: 0.68rem; font-style: italic; font-family: var(--font-sans); }
.mlp-else-line  { padding-left: 0.2rem; }
.mlp-else-active { color: #86efac; font-family: var(--font-sans); font-size: 0.68rem; font-weight: 600; }
.mlp-else-off   { color: var(--text-faint); font-family: var(--font-sans); font-size: 0.68rem; }

/* Output panel */
.mlp-out-code {
    padding: 0.6rem 0.75rem;
    line-height: 1.7;
    font-size: 0.72rem;
}
.oc-punc { color: var(--text-faint); }
.oc-key  { color: #7dd3fc; }
.oc-str  { color: #86efac; }
.oc-num  { color: var(--yellow); }
.mlp-chip-green {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    background: rgba(16,185,129,0.15);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 4px;
    color: #34d399;
    font-size: 0.6rem;
    font-weight: 700;
    font-family: var(--font-sans);
    letter-spacing: 0.06em;
}
.mlp-out-actions {
    display: flex;
    gap: 0.4rem;
    padding: 0.4rem 0.7rem;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.mlp-out-btn {
    padding: 0.18rem 0.5rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border-light);
    border-radius: 4px;
    font-size: 0.65rem;
    font-family: var(--font-sans);
    color: var(--text-faint);
    cursor: default;
    white-space: nowrap;
}

/* Status bar */
.mlp-mm-statusbar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.42rem 1rem;
    background: rgba(10,14,30,0.7);
    font-size: 0.7rem;
}
.mlp-status-ok    { color: #86efac; font-family: var(--font-sans); font-weight: 700; }
.mlp-status-dot   { color: var(--text-faint); }
.mlp-status-txt   { color: var(--text-faint); font-family: var(--font-sans); }
.mlp-mm-spacer    { flex: 1; }
.mlp-status-vault {
    color: var(--text-faint);
    font-family: var(--font-sans);
    font-size: 0.65rem;
    font-style: italic;
}

/* ── Feature deep-dive ── */
.mlp-features-section {
    background: linear-gradient(180deg, rgba(99,102,241,0.03) 0%, transparent 100%);
    border-top: 1px solid rgba(99,102,241,0.08);
}
.mlp-feat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}
.mlp-feat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.mlp-feat-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.2);
}
.mlp-feat-icon { font-size: 1.75rem; }
.mlp-feat-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.mlp-feat-card p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
    flex: 1;
}
.mlp-feat-tag {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.2);
    border-radius: 4px;
    font-size: 0.7rem;
    color: var(--primary-light);
    font-weight: 600;
    width: fit-content;
}

/* ── How it works ── */
.mlp-hiw-section {
    border-top: 1px solid var(--border-light);
}
.mlp-hiw-steps {
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: wrap;
    justify-content: center;
}
.mlp-step {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    flex: 1;
    min-width: 220px;
}
.mlp-step-num {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(99,102,241,0.5);
}
.mlp-step-content h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
}
.mlp-step-content p {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}
.mlp-step-arrow {
    font-size: 1.5rem;
    color: var(--primary);
    flex-shrink: 0;
    align-self: center;
}
@media (max-width: 700px) { .mlp-step-arrow { display: none; } }

/* ── Sign-up CTA section ── */
.mlp-cta-section {
    padding: 5rem 1.5rem;
    background: radial-gradient(ellipse 80% 60% at 50% 50%,
                rgba(99,102,241,0.12) 0%, transparent 70%);
    border-top: 1px solid rgba(99,102,241,0.12);
    text-align: center;
}
.mlp-cta-inner { max-width: 900px; margin: 0 auto; }
.mlp-cta-badge {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 99px;
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.25rem;
}
.mlp-cta-section h2 {
    font-size: clamp(1.75rem, 4vw, 2.4rem);
    font-weight: 800;
    margin-bottom: 0.85rem;
}
.mlp-cta-section > .mlp-cta-inner > p {
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}
.mlp-cta-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: left;
    margin-bottom: 1.5rem;
}
@media (max-width: 640px) { .mlp-cta-cards { grid-template-columns: 1fr; } }

.mlp-cta-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mlp-cta-card-dev {
    border-color: rgba(99,102,241,0.3);
    background: linear-gradient(135deg, rgba(99,102,241,0.07), rgba(16,185,129,0.04));
}
.mlp-cta-card-icon { font-size: 2rem; }
.mlp-cta-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}
.mlp-cta-card-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.6;
}
.mlp-cta-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.mlp-cta-card-list li {
    font-size: 0.875rem;
    color: var(--text-primary);
}
.mlp-cta-btn { margin-top: auto; width: 100%; justify-content: center; }

.mlp-cta-footnote {
    font-size: 0.8rem;
    color: var(--text-faint);
    margin: 0;
}
.mlp-cta-footnote a { color: var(--primary-light); text-decoration: none; }

/* btn-accent for developer CTA */
.btn-accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    border: none;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    transition: var(--transition);
    text-decoration: none;
}
.btn-accent:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(99,102,241,0.4);
}

/* ── FAQ ── */
.mlp-faq-section {
    background: rgba(255,255,255,0.01);
    border-top: 1px solid var(--border-light);
}
.mlp-faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}
@media (max-width: 640px) { .mlp-faq-grid { grid-template-columns: 1fr; } }

.mlp-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.4rem;
}
.mlp-faq-q {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}
.mlp-faq-a {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── Footer CTA strip ── */
.mlp-strip {
    background: var(--primary);
    padding: 2.5rem 1.5rem;
}
.mlp-strip-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}
.mlp-strip-head {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.2rem;
}
.mlp-strip-sub {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}
.mlp-strip .btn-primary {
    background: #fff;
    color: var(--primary);
    border-color: transparent;
    font-weight: 800;
    white-space: nowrap;
}
.mlp-strip .btn-primary:hover {
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

/* ── Trading Partner Cards (Client Dashboard) ────────────────────────────── */

.partner-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin: 0.5rem 0;
    transition: var(--transition);
    background: var(--bg-card);
}
.partner-card:first-child { margin-top: 0; }

.partner-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}

.partner-card-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
}

.partner-status-badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.67rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.03em;
}
.ps-pending {
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.3);
    color: var(--yellow);
}
.ps-ready {
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}
.ps-active {
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.3);
    color: var(--primary-light);
}
.ps-paused {
    background: rgba(100,116,139,0.12);
    border: 1px solid rgba(100,116,139,0.3);
    color: var(--text-faint);
}

.partner-card-meta {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-bottom: 0.45rem;
}
.partner-meta-dot { color: var(--border-light); }

.partner-activate-btn {
    width: 100%;
    padding: 0.4rem;
    background: rgba(16,185,129,0.12);
    border: 1px solid rgba(16,185,129,0.35);
    border-radius: 5px;
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}
.partner-activate-btn:hover {
    background: rgba(16,185,129,0.25);
}

.partner-pending-note {
    font-size: 0.7rem;
    color: var(--text-faint);
    line-height: 1.5;
    padding: 0.35rem 0.45rem;
    background: rgba(245,158,11,0.05);
    border: 1px solid rgba(245,158,11,0.12);
    border-radius: 4px;
    font-style: italic;
}

/* ── Developer: Client Mapping Requests Panel ────────────────────────────── */

.cmp-loading {
    text-align: center;
    color: var(--text-faint);
    padding: 2rem;
    font-size: 0.85rem;
}

.cmp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
}
.cmp-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.cmp-empty-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.35rem; }
.cmp-empty-sub { font-size: 0.82rem; color: var(--text-faint); }

.cmp-card {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: var(--bg-card);
    transition: var(--transition);
}
.cmp-card:last-child { margin-bottom: 0; }
.cmp-card:hover { border-color: var(--border); }

.cmp-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem 1rem 0.6rem;
    flex-wrap: wrap;
}

.cmp-partner-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.cmp-client-line {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cmp-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
}
.cmp-meta {
    font-size: 0.7rem;
    color: var(--text-faint);
}

.cmp-card-body {
    border-top: 1px solid var(--border-light);
    padding: 0.7rem 1rem 0.8rem;
}

.cmp-isa-row {
    font-size: 0.75rem;
    color: var(--text-faint);
    margin-bottom: 0.65rem;
}
.cmp-isa-row code {
    background: rgba(255,255,255,0.06);
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.cmp-contact-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.65rem;
    padding: 0.4rem 0.65rem;
    background: rgba(45,212,191,0.06);
    border-radius: 6px;
    border: 1px solid rgba(45,212,191,0.2);
}
.cmp-contact-icon { font-size: 0.85rem; margin-right: 0.1rem; }
.cmp-contact-link { color: #0d9488; text-decoration: none; }
.cmp-contact-link:hover { text-decoration: underline; }
.cmp-contact-phone { color: var(--text-muted); }

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

.cmp-note-input {
    width: 100%;
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.8rem;
    padding: 0.5rem 0.7rem;
    resize: vertical;
    min-height: 52px;
    font-family: inherit;
    box-sizing: border-box;
}
.cmp-note-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(99,102,241,0.18);
}

.cmp-action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.cmp-btn {
    border: 1px solid;
    border-radius: 5px;
    padding: 0.35rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    background: transparent;
}
.cmp-btn-ready {
    color: #34d399;
    border-color: rgba(52,211,153,0.35);
    background: rgba(52,211,153,0.08);
}
.cmp-btn-ready:hover { background: rgba(52,211,153,0.2); }

.cmp-btn-live {
    color: var(--primary-light);
    border-color: rgba(99,102,241,0.35);
    background: rgba(99,102,241,0.08);
}
.cmp-btn-live:hover { background: rgba(99,102,241,0.2); }

.cmp-btn-revert {
    color: var(--yellow);
    border-color: rgba(245,158,11,0.3);
    background: rgba(245,158,11,0.06);
}
.cmp-btn-revert:hover { background: rgba(245,158,11,0.15); }

.cmp-btn-note {
    color: var(--text-muted);
    border-color: var(--border-light);
    background: rgba(255,255,255,0.03);
}
.cmp-btn-note:hover { background: rgba(255,255,255,0.08); }
.cmp-btn:disabled { opacity: 0.5; cursor: default; }

/* Highlight pending-mappings stat */
.pending-stat .ws-stat-value { color: var(--yellow); }

/* ── Developer Link Code (dev sidebar) ───────────────────────────────────── */

.dev-link-card { border: 1px solid rgba(99,102,241,0.25) !important; background: rgba(99,102,241,0.04) !important; }

.dev-link-code-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-deep);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.6rem;
}
.dev-link-code {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--primary-light);
    background: none;
    border: none;
}
.dev-link-copy {
    flex-shrink: 0;
    padding: 0.25rem 0.65rem !important;
    font-size: 0.75rem !important;
}

/* ── Client: developer link on partner cards ─────────────────────────────── */

.partner-dev-line {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 0.35rem;
    padding: 0.2rem 0;
}
.partner-dev-line.unlinked {
    color: var(--text-faint);
    font-style: italic;
}
.partner-pending-note.unlinked-note {
    border-color: rgba(100,116,139,0.2);
    background: rgba(100,116,139,0.05);
    color: var(--text-faint);
}

/* ── Client: Add Partner modal — dev code input ──────────────────────────── */

.dev-link-group {
    border-top: 1px solid var(--border-light);
    padding-top: 0.85rem;
    margin-top: 0.25rem;
}
.form-optional {
    font-size: 0.72rem;
    color: var(--text-faint);
    font-weight: 400;
    margin-left: 0.25rem;
}
.dev-code-input-row {
    display: flex;
    gap: 0.4rem;
}
.dev-code-input {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}
.dev-verify-btn {
    flex-shrink: 0;
    padding: 0.45rem 0.8rem;
    font-size: 0.78rem;
    white-space: nowrap;
}
.dev-lookup-result {
    margin-top: 0.4rem;
    padding: 0.35rem 0.6rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
}
.dev-lookup-result.loading { color: var(--text-faint); background: transparent; }
.dev-lookup-result.found {
    background: rgba(16,185,129,0.1);
    border: 1px solid rgba(16,185,129,0.3);
    color: #34d399;
}
.dev-lookup-result.notfound {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
    color: #f87171;
}

/* ── Transaction set checkbox grid ─────────────────────────────────────── */
.tx-set-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
    gap: 0.45rem;
    margin-top: 0.5rem;
}
.tx-set-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--bg);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    user-select: none;
}
.tx-set-item:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.04); }
.tx-set-item.tx-set-suggested { border-color: rgba(99,102,241,0.55); background: rgba(99,102,241,0.09); }
.tx-set-item input[type="checkbox"] {
    width: 15px; height: 15px; flex-shrink: 0;
    accent-color: var(--primary); cursor: pointer;
}
.tx-num {
    font-family: var(--mono);
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--primary);
    flex-shrink: 0;
    min-width: 30px;
}
.tx-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
    line-height: 1.3;
}
.tx-set-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.6rem;
}
.tx-set-toggle {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: none;
    border: 1px solid var(--border);
    border-radius: 5px;
    padding: 0.25rem 0.65rem;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}
.tx-set-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }

/* ── Developer: Mapping Projects grid ───────────────────────────────────── */

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

.mp-card {
    display: block;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    transition: var(--transition);
    overflow: hidden;
}
.mp-card:hover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.06);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.mp-card-link {
    display: block;
    text-decoration: none;
    padding: 0.85rem 0.95rem;
    cursor: pointer;
}
.mp-delete-form {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    margin: 0;
}
.mp-delete-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 900;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    cursor: pointer;
    line-height: 1;
    transition: background 0.15s, color 0.15s;
}
.mp-delete-btn:hover {
    background: rgba(239,68,68,0.15);
    color: #ef4444;
}

.mp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
    flex-wrap: wrap;
}
.mp-card-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    flex: 1;
}
.mp-card-format {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
}
.mp-fmt {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 3px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.2);
    color: var(--primary-light);
    letter-spacing: 0.04em;
}
.mp-arrow {
    font-size: 0.7rem;
    color: var(--text-faint);
}

.mp-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.mp-tx-badge {
    font-size: 0.67rem;
    font-weight: 700;
    padding: 0.1rem 0.4rem;
    background: rgba(245,158,11,0.1);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 3px;
    color: var(--yellow);
    letter-spacing: 0.03em;
}
.mp-rule-count {
    font-size: 0.72rem;
    color: var(--text-muted);
}
.mp-date {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-left: auto;
}

.mp-empty {
    text-align: center;
    padding: 2.5rem 1rem;
}
.mp-empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.mp-empty-title { font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.35rem; }
.mp-empty-sub { font-size: 0.82rem; color: var(--text-faint); max-width: 340px; margin: 0 auto; }

/* ── Header right: multiple buttons ─────────────────────────────────────── */
.ws-header-right { display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: flex-end; align-items: center; }

/* ============================================================
   Trial banner — shown on dev and client dashboards
   ============================================================ */
.trial-banner {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.trial-banner-active {
    background: rgba(99,102,241,0.1);
    border: 1px solid rgba(99,102,241,0.25);
}
.trial-banner-expired {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.25);
}
.trial-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}
.trial-banner-text {
    flex: 1;
    font-size: 0.855rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.trial-banner-active  .trial-banner-text strong { color: var(--primary-light); }
.trial-banner-expired .trial-banner-text strong { color: #f87171; }
.trial-banner-btn {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: none;
    transition: var(--transition);
}
.trial-banner-active  .trial-banner-btn {
    background: var(--primary);
    color: #fff;
}
.trial-banner-active  .trial-banner-btn:hover { background: var(--primary-hover); }
.trial-banner-expired .trial-banner-btn {
    background: #ef4444;
    color: #fff;
}
.trial-banner-expired .trial-banner-btn:hover { background: #dc2626; }
@media (max-width: 640px) {
    .trial-banner { flex-direction: column; align-items: flex-start; }
    .trial-banner-btn { width: 100%; text-align: center; }
}

/* ============================================================
   Upgrade page
   ============================================================ */
.upgrade-page { padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem; max-width: 680px; margin: 0 auto; }
.upgrade-hero { text-align: center; margin-bottom: 2.5rem; }
.upgrade-badge {
    display: inline-block;
    padding: 0.3rem 0.85rem;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--primary-light);
    letter-spacing: 0.04em;
    margin-bottom: 1rem;
}
.upgrade-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.75rem; }
.upgrade-sub { font-size: 0.95rem; color: var(--text-muted); max-width: 480px; margin: 0 auto; line-height: 1.6; }

.upgrade-trial-note {
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.855rem;
    margin-bottom: 1.25rem;
}
.upgrade-trial-active  { background: rgba(99,102,241,0.08); border: 1px solid rgba(99,102,241,0.2); color: var(--text-muted); }
.upgrade-trial-expired { background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2); color: #f87171; }

.upgrade-plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 1.25rem;
}
.upgrade-plan-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.5rem 1.75rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.upgrade-plan-name    { font-size: 1.1rem; font-weight: 800; color: var(--text); margin-bottom: 0.3rem; }
.upgrade-plan-tagline { font-size: 0.83rem; color: var(--text-muted); }
.upgrade-plan-price   { text-align: right; flex-shrink: 0; }
.upgrade-plan-amount  { font-size: 2rem; font-weight: 800; color: var(--text); letter-spacing: -1px; }
.upgrade-plan-period  { font-size: 0.9rem; color: var(--text-muted); }
.upgrade-plan-annual  { font-size: 0.75rem; color: var(--text-faint); margin-top: 0.2rem; }

.upgrade-feature-list {
    list-style: none;
    padding: 1.25rem 1.75rem;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    border-bottom: 1px solid var(--border);
}
.upgrade-feature-list li {
    font-size: 0.855rem;
    color: var(--text-muted);
}
.upgrade-feature-list li::first-letter { color: var(--accent); }

.upgrade-cta-wrap { padding: 1.5rem 1.75rem; }
.upgrade-coming-soon { text-align: center; }
.upgrade-cs-icon  { font-size: 2rem; margin-bottom: 0.75rem; }
.upgrade-cs-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.upgrade-cs-body  { font-size: 0.855rem; color: var(--text-muted); max-width: 420px; margin: 0 auto 1.25rem; line-height: 1.6; }
.upgrade-email-btn { padding: 0.7rem 1.75rem; font-size: 0.9rem; }
.upgrade-cs-note  { font-size: 0.78rem; color: var(--text-faint); margin-top: 0.75rem; }

.upgrade-back-row { text-align: center; }
.upgrade-back-link { font-size: 0.85rem; color: var(--text-faint); text-decoration: none; }
.upgrade-back-link:hover { color: var(--text-muted); }

@media (max-width: 640px) {
    .upgrade-plan-header { flex-direction: column; }
    .upgrade-plan-price  { text-align: left; }
    .upgrade-feature-list { grid-template-columns: 1fr; }
}

/* ============================================================
   Developer phone warning
   Shown only on screens narrower than 640 px (phone-size).
   Tablets (≥ 640px) and larger are fine.
   ============================================================ */
.dev-phone-warning {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(7,13,26,0.97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
}
.dev-phone-warning-icon  { font-size: 3rem; margin-bottom: 1rem; }
.dev-phone-warning-title { font-size: 1.25rem; font-weight: 800; color: var(--text); margin-bottom: 0.75rem; line-height: 1.3; }
.dev-phone-warning-body  { font-size: 0.88rem; color: var(--text-muted); max-width: 300px; line-height: 1.65; margin: 0 auto 1.5rem; }
.dev-phone-warning-btn   {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-faint);
    font-size: 0.8rem;
    padding: 0.45rem 1.1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    margin-top: 0.5rem;
}
@media (max-width: 639px) {
    .dev-phone-warning { display: flex; }
}

/* ============================================================
   Client dashboard — phone responsive (≤ 640 px)
   ============================================================ */
@media (max-width: 640px) {
    .client-dash { padding: calc(var(--nav-h) + 1rem) 1rem 2rem; }

    /* Header: stack button below name */
    .cd-header { flex-direction: column; align-items: flex-start; gap: 0.75rem; margin-bottom: 1.25rem; }
    .cd-header h1 { font-size: 1.3rem; }
    .cd-header-right { width: 100%; }
    .cd-header-right .btn { width: 100%; text-align: center; }

    /* Stats: 2 × 2 grid */
    .cd-stats { grid-template-columns: repeat(2, 1fr); gap: 0.65rem; margin-bottom: 1.25rem; }
    .cd-stat  { padding: 0.85rem 0.9rem; }
    .cd-stat-value { font-size: 1.6rem; }

    /* Transaction table: horizontal scroll instead of cutoff */
    .txn-table-wrap { overflow-x: auto; border-radius: var(--radius); }

    /* Feed filters: stack vertically */
    .cd-section-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .cd-feed-filters { width: 100%; flex-wrap: wrap; }
    .feed-filter { flex: 1; min-width: 120px; }

    /* Modal: full-width, scrollable */
    .modal-card {
        width: calc(100vw - 1.5rem);
        max-height: 90dvh;
        overflow-y: auto;
    }
    .modal-body   { padding: 1rem; }
    .modal-footer { padding: 0.75rem 1rem; flex-direction: column-reverse; gap: 0.5rem; }
    .modal-footer .btn { width: 100%; text-align: center; justify-content: center; }

    /* Dev-code row: stack input + verify button */
    .dev-code-input-row  { flex-direction: column; }
    .dev-verify-btn      { width: 100%; }

    /* Sidebar cards flow naturally below main content (grid already stacks at 1050px) */
    .cd-sidebar { grid-template-columns: 1fr; }

    /* Transaction table: hide Direction, Date, Actions — keep TX Set, Partner, Status */
    .txn-col-dir,
    .txn-col-dt,
    .txn-col-act { display: none; }
    /* Target the matching td cells by position (dir=3rd, date=5th, actions=6th) */
    .txn-table tbody tr:not(.txn-empty-row) td:nth-child(3),
    .txn-table tbody tr:not(.txn-empty-row) td:nth-child(5),
    .txn-table tbody tr:not(.txn-empty-row) td:nth-child(6) { display: none; }
    /* Tighten padding on remaining cells */
    .txn-table th,
    .txn-table td { padding: 0.6rem 0.75rem; }
}


/* ═══════════════════════════════════════════════════════════════════════════
   TRADING PARTNERS PAGE
═══════════════════════════════════════════════════════════════════════════ */

/* ── Page shell ── */
.tp-page {
    max-width: 960px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
}

/* ── Flash message ── */
.tp-flash {
    padding: 0.9rem 1.25rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: opacity 0.4s ease;
}
.tp-flash-ok   { background: rgba(22,199,132,0.12); color: #0e9067; border: 1px solid rgba(22,199,132,0.3); }
.tp-flash-warn { background: rgba(239,68,68,0.1);   color: #b91c1c;  border: 1px solid rgba(239,68,68,0.25); }

/* ── Header ── */
.tp-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.75rem;
}
.tp-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    margin-bottom: 0.5rem;
    padding: 0.3rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: rgba(255,255,255,0.03);
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tp-breadcrumb:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.07);
    border-color: rgba(255,255,255,0.2);
}
.tp-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin: 0 0 0.3rem;
}
.tp-subtitle { color: var(--text-muted); font-size: 0.92rem; margin: 0; }

/* ── Stats bar ── */
.tp-stats-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.tp-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.6rem 1rem;
    border-radius: 10px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-width: 80px;
}
.tp-stat:hover { border-color: var(--primary); }
.tp-stat-active-filter { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(108,99,255,0.15); }
.tp-stat-count { font-size: 1.4rem; font-weight: 700; color: var(--text); line-height: 1; }
.tp-stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.tp-stat-active   .tp-stat-count { color: #16c784; }
.tp-stat-testing  .tp-stat-count { color: #6c8ebf; }
.tp-stat-inactive .tp-stat-count { color: #f59e0b; }
.tp-stat-closed   .tp-stat-count { color: #9ca3af; }

/* ── Filter bar ── */
.tp-filter-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.tp-search {
    flex: 1;
    padding: 0.65rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.tp-search:focus { outline: none; border-color: var(--primary); }

/* ── Partner list ── */
.tp-list { display: flex; flex-direction: column; gap: 1rem; }

/* ── Partner card ── */
.tp-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tp-card:hover { border-color: var(--primary-dim, #6c63ff44); box-shadow: 0 4px 20px rgba(0,0,0,0.08); }

.tp-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.1rem 1.25rem 0.75rem;
}
.tp-card-name-wrap { flex: 1; min-width: 0; }
.tp-card-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.4rem;
}
.tp-card-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ── Lifecycle badges ── */
.tp-lc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.25em 0.65em;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}
.tp-lc-testing  { background: rgba(108,142,191,0.15); color: #4a7ab5; border: 1px solid rgba(108,142,191,0.3); }
.tp-lc-active   { background: rgba(22,199,132,0.12);  color: #0e9067; border: 1px solid rgba(22,199,132,0.3); }
.tp-lc-inactive { background: rgba(245,158,11,0.12);  color: #b45309; border: 1px solid rgba(245,158,11,0.3); }
.tp-lc-closed   { background: rgba(156,163,175,0.15); color: #6b7280; border: 1px solid rgba(156,163,175,0.3); }

/* ── Mapping (EDI pipeline) badges ── */
.tp-map-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.25em 0.65em;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 500;
    white-space: nowrap;
}
.tp-map-pending_mapping { background: rgba(108,99,255,0.08); color: var(--primary); border: 1px solid rgba(108,99,255,0.2); }
.tp-map-mapping_ready   { background: rgba(59,130,246,0.1);  color: #2563eb;        border: 1px solid rgba(59,130,246,0.25); }
.tp-map-active          { background: rgba(22,199,132,0.08); color: #0e9067;        border: 1px solid rgba(22,199,132,0.2); }
.tp-map-paused          { background: rgba(245,158,11,0.08); color: #b45309;        border: 1px solid rgba(245,158,11,0.2); }

/* ── Card action buttons ── */
.tp-card-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.tp-btn-edit, .tp-btn-status, .tp-btn-contact, .tp-btn-history, .tp-btn-delete {
    padding: 0.35em 0.85em;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}
.tp-btn-edit    { background: var(--surface); border-color: var(--border); color: var(--text); }
.tp-btn-edit:hover { border-color: var(--primary); color: var(--primary); }
.tp-btn-status  { background: var(--surface); border-color: var(--border); color: var(--text); }
.tp-btn-status:hover { border-color: #6c8ebf; color: #4a7ab5; }
.tp-btn-history { background: var(--surface); border-color: var(--border); color: var(--text-muted); }
.tp-btn-history:hover { color: var(--text); border-color: var(--text-muted); }
.tp-btn-delete  { background: var(--surface); border-color: var(--border); color: var(--text-muted); }
.tp-btn-delete:hover { border-color: #ef4444; color: #ef4444; }
.tp-btn-delete-armed { background: rgba(239,68,68,0.08) !important; border-color: #ef4444 !important; color: #ef4444 !important; }
.tp-btn-contact { background: var(--surface); border-color: var(--border); color: var(--text); }
.tp-btn-contact:hover { border-color: #2dd4bf; color: #0d9488; }

/* ── Card metadata row ── */
.tp-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1.25rem 1rem;
}
.tp-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: 0.2em 0.6em;
    border-radius: 5px;
    font-size: 0.79rem;
    font-weight: 500;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}
.tp-meta-muted   { color: var(--text-muted); }
.tp-meta-dev     { color: #4a7ab5; border-color: rgba(108,142,191,0.35); background: rgba(108,142,191,0.07); }
.tp-meta-nodev   { color: var(--text-muted); font-style: italic; }
.tp-meta-contact { color: #0d9488; border-color: rgba(45,212,191,0.35); background: rgba(45,212,191,0.06); font-style: normal; }

/* ── Contact modal section labels ── */
.tp-contact-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 1rem 0 0.35rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}

/* ── History panel ── */
.tp-history-panel {
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.tp-history-inner { padding: 1rem 1.25rem; }
.tp-history-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 0.85rem;
}
.tp-history-loading, .tp-history-empty, .tp-history-error {
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
}
.tp-history-entry {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--border);
}
.tp-history-entry:last-child { border-bottom: none; }
.tp-hist-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}
.tp-hist-arrow { color: var(--text-muted); font-size: 0.9rem; }
.tp-hist-right { flex: 1; min-width: 0; }
.tp-hist-note {
    font-size: 0.875rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 0.2rem;
}
.tp-hist-meta { font-size: 0.78rem; color: var(--text-muted); }

/* ── Empty state ── */
.tp-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}
.tp-empty-icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.tp-empty-text { font-size: 1.1rem; font-weight: 600; color: var(--text); margin-bottom: 0.4rem; }
.tp-empty-sub  { font-size: 0.9rem; }

/* ── Status change modal: radio options ── */
.tp-status-options { display: flex; flex-direction: column; gap: 0.5rem; }
.tp-status-opt { display: flex; align-items: flex-start; gap: 0.75rem; cursor: pointer; }
.tp-status-opt input[type="radio"] { display: none; }
.tp-status-opt-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
}
.tp-status-opt-inner:hover { border-color: var(--primary); }
.tp-status-opt-selected .tp-status-opt-inner {
    border-color: var(--primary);
    background: rgba(108,99,255,0.04);
}
.tp-status-opt-desc { font-size: 0.8rem; color: var(--text-muted); }

/* ── Dashboard sidebar: "Manage All" link ── */
.cd-side-header-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.cd-side-manage {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    opacity: 0.85;
    transition: opacity 0.15s;
}
.cd-side-manage:hover { opacity: 1; text-decoration: underline; }

/* ── Required field marker ── */
.req { color: #ef4444; margin-left: 0.1em; }

/* ── Responsive: trading partners page ── */
@media (max-width: 680px) {
    .tp-page { padding: calc(var(--nav-h) + 1rem) 1rem 3rem; }
    .tp-header { flex-direction: column; gap: 0.75rem; }
    .tp-title { font-size: 1.5rem; }
    .tp-stats-bar { gap: 0.5rem; }
    .tp-stat { min-width: 60px; padding: 0.5rem 0.6rem; }
    .tp-stat-count { font-size: 1.2rem; }
    .tp-card-top { flex-direction: column; gap: 0.75rem; }
    .tp-card-actions { justify-content: flex-start; width: 100%; }
    .tp-hist-left { flex-wrap: wrap; }
}

/* ── Settings page ── */
.settings-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
.settings-card-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}
.settings-card-icon {
    font-size: 1.3rem;
    line-height: 1;
    margin-top: 0.1rem;
}
.settings-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.15rem;
}
.settings-card-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.settings-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}
.settings-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--text-muted);
    opacity: 0.7;
}
.settings-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin: 0.35rem 0 0;
}
.settings-field { flex: 1; }
.settings-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 520px) {
    .settings-field-row { grid-template-columns: 1fr; }
}

/* ── Developer approval flow ── */
.tp-pending-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.35);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}
.tp-pending-icon { font-size: 1.3rem; flex-shrink: 0; }
.tp-pending-text { font-size: 0.88rem; color: var(--text); line-height: 1.55; }
.tp-pending-text strong { color: #f59e0b; }

.tp-meta-pending {
    color: #d97706;
    border-color: rgba(245,158,11,0.35);
    background: rgba(245,158,11,0.08);
    font-style: italic;
}

.tp-dev-approval-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    background: rgba(245,158,11,0.06);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
}
.tp-dev-approval-msg { font-size: 0.84rem; color: var(--text); flex: 1; line-height: 1.5; }
.tp-dev-approval-msg strong { color: var(--text-primary); }
.tp-dev-approval-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }

.tp-dev-revoke-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: rgba(16,185,129,0.04);
    border: 1px solid rgba(16,185,129,0.18);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    margin-top: 0.6rem;
}
.tp-dev-revoke-label { font-size: 0.82rem; color: #6ee7b7; }
.tp-dev-revoke-btn {
    font-size: 0.78rem;
    padding: 0.35rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(248,113,113,0.4);
    color: #f87171;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s;
}
.tp-dev-revoke-btn:hover { background: rgba(248,113,113,0.1); }

/* Dashboard pending dev line */
.partner-dev-line.pending { color: #d97706; font-style: italic; }
.partner-dev-approve-link { color: var(--primary); text-decoration: underline; font-style: normal; font-weight: 600; }

/* ── Inbound EDI URL panel ──────────────────────────────────────────────── */
.tp-inbound-panel {
    margin: 8px 0 4px 0;
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(99,102,241,0.04);
}
.tp-inbound-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #a5b4fc;
    cursor: pointer;
    user-select: none;
    gap: 8px;
}
.tp-inbound-header:hover { background: rgba(99,102,241,0.08); }
.tp-inbound-toggle { font-size: 0.7rem; transition: transform 0.2s; }
.tp-inbound-toggle.open { transform: rotate(180deg); }
.tp-inbound-body { padding: 10px 14px 12px; }
.tp-inbound-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}
.tp-inbound-env-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 4px;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}
.tp-inbound-test { background: rgba(251,191,36,0.12); color: #fbbf24; border: 1px solid rgba(251,191,36,0.25); }
.tp-inbound-prod { background: rgba(52,211,153,0.12); color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.tp-inbound-url {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: #c4b5fd;
    background: rgba(0,0,0,0.25);
    padding: 4px 8px;
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}
.tp-inbound-copy {
    font-size: 0.72rem;
    padding: 4px 10px;
    background: rgba(99,102,241,0.15);
    border: 1px solid rgba(99,102,241,0.3);
    color: #a5b4fc;
    border-radius: 5px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.15s;
}
.tp-inbound-copy:hover { background: rgba(99,102,241,0.28); }
.tp-inbound-hint {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

/* btn-danger */
.btn-danger {
    background: rgba(239,68,68,0.12);
    color: #f87171;
    border: 1px solid rgba(239,68,68,0.3);
}
.btn-danger:hover { background: rgba(239,68,68,0.22); }

/* ── Transaction Feed ── */
.txn-filter-bar {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    align-items: center;
}
.txn-stats-bar {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    padding: 0 0.25rem;
}
.txn-stat       { color: var(--text-muted); }
.txn-stat-in    { color: #6ee7b7; }
.txn-stat-out   { color: #93c5fd; }
.txn-stat-fail  { color: #f87171; }

.txn-table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); }
.txn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.84rem;
}
.txn-table thead th {
    text-align: left;
    padding: 0.6rem 0.85rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.txn-table tbody tr { border-bottom: 1px solid rgba(255,255,255,0.04); }
.txn-table tbody tr:last-child { border-bottom: none; }
.txn-row:hover { background: rgba(255,255,255,0.02); }
.txn-row-fail  { background: rgba(239,68,68,0.04); }
.txn-table td  { padding: 0.65rem 0.85rem; color: var(--text); vertical-align: middle; }
.txn-loading   { text-align: center; padding: 2rem; color: var(--text-muted); font-style: italic; }
.txn-empty     { text-align: center; padding: 3rem 2rem; color: var(--text-muted); }

.txn-dir {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 5px;
}
.txn-dir-in  { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.txn-dir-out { background: rgba(59,130,246,0.12); color: #93c5fd; }

.txn-txset   { font-size: 0.78rem; color: var(--text-muted); }
.txn-partner { font-weight: 500; color: var(--text-primary); }
.txn-ref     { font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; color: var(--text-muted); }
.txn-status  {
    display: inline-block;
    font-size: 0.73rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 5px;
}
.txn-note-icon { cursor: help; font-size: 0.9rem; }

/* ── EDI Validator ── */
.validator-result-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #fff;
}
.validator-valid   { background: rgba(16,185,129,0.15); border: 1px solid rgba(16,185,129,0.35); color: #6ee7b7; }
.validator-invalid { background: rgba(239,68,68,0.12);  border: 1px solid rgba(239,68,68,0.35);  color: #f87171; }
.validator-banner-icon { font-size: 1.4rem; line-height:1; flex-shrink:0; margin-top:0.1rem; }

.validator-stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    text-align: center;
}
.validator-stat-val { font-size: 1.2rem; font-weight: 700; color: var(--text-primary); }
.validator-stat-lbl { font-size: 0.72rem; color: var(--text-muted); margin-top: 0.2rem; }

.validator-section { margin-bottom: 1rem; }
.validator-section-head {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--border);
}
.validator-item {
    font-size: 0.82rem;
    color: var(--text);
    padding: 0.35rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-family: 'JetBrains Mono', monospace;
}
.validator-item-error { color: #f87171; }
.validator-item-warn  { color: #fcd34d; }

@media (max-width: 768px) {
    .txn-filter-bar { flex-direction: column; }
    .txn-filter-bar select { width: 100%; }
    div[style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* ── Endpoint Cards ── */
.ep-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: border-color 0.2s;
}
.ep-card:hover { border-color: rgba(99,102,241,0.35); }
.ep-card-inactive { opacity: 0.55; }

.ep-card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem 0.75rem;
    border-bottom: 1px solid var(--border);
}
.ep-type-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.ep-name         { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.ep-type-label   { font-size: 0.72rem; font-weight: 600; margin-top: 0.1rem; }

.ep-status {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 20px;
}
.ep-status-active  { background: rgba(16,185,129,0.12); color: #6ee7b7; border: 1px solid rgba(16,185,129,0.3); }
.ep-status-inactive{ background: rgba(107,114,128,0.12);color: #6b7280; border: 1px solid rgba(107,114,128,0.3);}

.ep-details {
    padding: 0.75rem 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.ep-detail { display: flex; gap: 0.5rem; align-items: baseline; font-size: 0.8rem; }
.ep-detail-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 90px;
}
.ep-detail-val  { color: var(--text); font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; word-break: break-all; }
.ep-url         { color: var(--primary); }
.ep-notes .ep-detail-val { font-family: inherit; font-size: 0.8rem; color: var(--text-muted); }

.ep-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.015);
}

/* ── Pricing: Enterprise card glow ── */
.plan-card .plan-features li:not(:last-child) { border-bottom: 1px solid rgba(255,255,255,0.05); }
.plan-card .plan-features li:first-child      { color: var(--text-primary); font-weight:600; }

/* ── Enterprise pricing card ── */
.enterprise-card {
    border: 1px solid rgba(167,139,250,0.4) !important;
    background: linear-gradient(160deg, rgba(99,102,241,0.06) 0%, var(--surface) 60%) !important;
    position: relative;
}
.enterprise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: 0 0 40px rgba(139,92,246,0.08);
    pointer-events: none;
}
.enterprise-card .plan-name { color: #c4b5fd !important; }

/* ── TX Set Library ── */
.txset-tab-bar {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
    margin-bottom: 0;
}
.txset-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.txset-tab:hover  { background: rgba(255,255,255,0.05); color: var(--text); }
.txset-tab.active { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3); color: var(--primary); }
.txset-tab-count  { font-size: 0.65rem; background: rgba(255,255,255,0.08); padding: 0.1rem 0.4rem; border-radius: 20px; color: var(--text-muted); }
.txset-tab.active .txset-tab-count { background: rgba(99,102,241,0.2); color: var(--primary); }

.txset-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.15s;
}
.txset-card:hover { border-color: rgba(99,102,241,0.3); }

.txset-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.25rem;
}
.txset-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 36px;
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
}
.txset-name    { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.txset-chevron { color: var(--text-muted); font-size: 1rem; transition: transform 0.2s; flex-shrink: 0; }

.txset-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--border); }
.txset-purpose {
    color: var(--text);
    font-size: 0.88rem;
    line-height: 1.7;
    padding: 0.85rem 0 0.75rem;
}
.txset-seg-head {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid var(--border);
}
.txset-seg-grid { display: flex; flex-direction: column; gap: 0.3rem; }
.txset-seg-row  { display: flex; gap: 0.75rem; align-items: baseline; font-size: 0.81rem; }
.txset-seg-id   {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    min-width: 70px;
    flex-shrink: 0;
}
.txset-seg-desc { color: var(--text-muted); }

/* ── Transport Engine — Admin Dashboard Quick Bar ── */
.eng-quick-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.85rem 1.25rem;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.eng-quick-left  { display: flex; align-items: center; gap: 0.6rem; }
.eng-quick-right { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.eng-quick-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 0 3px rgba(107,114,128,0.2);
    flex-shrink: 0;
    transition: background 0.4s, box-shadow 0.4s;
}
.eng-quick-label { font-weight: 700; color: var(--text-primary); font-size: 0.875rem; }
.eng-quick-status { font-size: 0.8rem; color: var(--text-muted); padding: 0.15rem 0.5rem; background: rgba(255,255,255,0.05); border-radius: 6px; }
.eng-quick-stat   { font-size: 0.8rem; color: var(--text-muted); }
.eng-quick-stat strong, .eng-quick-stat span { color: var(--text); font-weight: 600; }
.eng-quick-hb  { font-size: 0.75rem; color: var(--text-muted); }
.eng-quick-btn {
    padding: 0.35rem 0.85rem; border-radius: 8px; font-size: 0.78rem; font-weight: 600;
    background: rgba(99,102,241,0.1); border: 1px solid rgba(99,102,241,0.25);
    color: var(--primary); text-decoration: none; white-space: nowrap;
    transition: all 0.15s;
}
.eng-quick-btn:hover { background: rgba(99,102,241,0.2); }

/* ── Transport Engine — Engine Page ── */
.eng-status-banner {
    display: flex; align-items: center; justify-content: space-between;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    gap: 1rem; flex-wrap: wrap;
}
.eng-banner-left  { display: flex; align-items: center; gap: 1rem; }
.eng-banner-stats { display: flex; gap: 2rem; flex-wrap: wrap; }
.eng-status-dot-lg {
    width: 16px; height: 16px; border-radius: 50%;
    background: #6b7280;
    box-shadow: 0 0 0 5px rgba(107,114,128,0.15);
    flex-shrink: 0;
    transition: background 0.4s, box-shadow 0.4s;
}
.eng-banner-title { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.eng-banner-sub   { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.15rem; }
.eng-banner-stat-val { font-size: 1.4rem; font-weight: 800; color: var(--text-primary); text-align: center; }
.eng-banner-stat-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; text-align: center; }
.eng-err-val { color: #f87171 !important; }

.eng-btn {
    padding: 0.5rem 1rem; border-radius: 8px; font-size: 0.82rem; font-weight: 700;
    border: none; cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.eng-btn-restart { background: rgba(99,102,241,0.15); color: var(--primary); border: 1px solid rgba(99,102,241,0.3); }
.eng-btn-restart:hover { background: rgba(99,102,241,0.25); }
.eng-btn-stop { background: rgba(239,68,68,0.1); color: #f87171; border: 1px solid rgba(239,68,68,0.25); }
.eng-btn-stop:hover { background: rgba(239,68,68,0.2); }

/* Per-protocol grid */
.eng-proto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.eng-proto-card {
    display: flex; align-items: center; gap: 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    transition: border-color 0.15s;
}
.eng-proto-card.epc-has-errors { border-color: rgba(239,68,68,0.3); }
.eng-proto-card.epc-active     { border-color: rgba(74,222,128,0.2); }
.eng-proto-icon { font-size: 1.5rem; flex-shrink: 0; }
.eng-proto-info { flex: 1; min-width: 0; }
.eng-proto-name      { font-weight: 700; font-size: 0.85rem; color: var(--text-primary); }
.eng-proto-endpoints { font-size: 0.72rem; color: var(--text-muted); }
.eng-proto-right { text-align: right; flex-shrink: 0; }
.eng-proto-stats { display: flex; align-items: center; gap: 0.2rem; font-size: 0.8rem; justify-content: flex-end; }
.eng-ps-ok  { font-weight: 700; color: #4ade80; }
.eng-ps-sep { color: var(--text-muted); }
.eng-ps-err { font-weight: 700; color: #f87171; }
.eng-proto-poll { font-size: 0.68rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ============================================================
   Endpoint modal form grids — responsive two-column rows
   ============================================================ */
.ep-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}
.ep-form-row-wide {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.75rem;
}
@media (max-width: 560px) {
    .ep-form-row,
    .ep-form-row-wide { grid-template-columns: 1fr; }
}

/* ============================================================
   Nav user-menu — hide text label on very small screens
   ============================================================ */
@media (max-width: 520px) {
    .user-menu-btn > span:not(.user-menu-chevron) { display: none; }
    .user-menu-btn { padding: 0.35rem 0.5rem; }
}

/* ============================================================
   Nav app links — collapse into user-menu dropdown on phones
   ============================================================ */

/* Desktop: show nav-vault-link buttons, hide the mobile-only dropdown items */
.user-menu-mobile-only { display: none !important; }

/* Mobile (≤ 700px): collapse all nav action buttons — only the avatar menu remains.
   Everything is already duplicated inside the user-menu dropdown. */
@media (max-width: 700px) {
    .nav-vault-link   { display: none !important; }
    .nav-apps-dd      { display: none !important; }
    .nav-msgs-link    { display: none !important; }
    .nav-dash-link    { display: none !important; }
    .nav-role-badge   { display: none !important; }
    .user-menu-mobile-only { display: flex !important; }
}

/* User-menu also opens on click (needed for touch devices) */
.user-menu.open .user-menu-dropdown { display: block; }

/* ============================================================
   Billing plan grid — single column on phones
   ============================================================ */
@media (max-width: 480px) {
    .billing-plan-grid { grid-template-columns: 1fr !important; }
}

/* ============================================================
   Settings page inline grids — collapse on mobile
   ============================================================ */
@media (max-width: 560px) {
    .settings-form-row { grid-template-columns: 1fr !important; }
}

/* ============================================================
   AI Credit Badge & Spinner
   ============================================================ */
.ai-suggest-btn {
    border-color: rgba(139,92,246,0.4);
    color: #a78bfa;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.ai-suggest-btn:hover {
    background: rgba(139,92,246,0.1);
    border-color: rgba(139,92,246,0.6);
    color: #c4b5fd;
}
.ai-credit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(139,92,246,0.2);
    border: 1px solid rgba(139,92,246,0.35);
    color: #c4b5fd;
    font-size: 0.7rem;
    font-weight: 800;
    min-width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    padding: 0 0.2rem;
    line-height: 1;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============================================================
   AI Setup Hint Link (trading partners)
   ============================================================ */
.ai-hint-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #a78bfa;
    font-size: 0.78rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: underline dotted rgba(167,139,250,0.4);
    transition: color 0.15s;
}
.ai-hint-link:hover { color: #c4b5fd; }
.ai-credit-badge-sm {
    background: rgba(139,92,246,0.15);
    border: 1px solid rgba(139,92,246,0.3);
    border-radius: 999px;
    color: #c4b5fd;
    font-size: 0.67rem;
    font-weight: 800;
    padding: 0.1rem 0.45rem;
    text-decoration: none;
}

/* ── AI Hub Section (index.html) ──────────────────────────────────────── */
.ai-hub-section {
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(109,40,217,0.13) 0%, transparent 70%),
                linear-gradient(180deg, rgba(139,92,246,0.04) 0%, transparent 60%);
    border-top: 1px solid rgba(139,92,246,0.12);
    border-bottom: 1px solid rgba(139,92,246,0.12);
    padding: 5rem 0;
}
.ai-hub-chip {
    display: inline-block;
    background: linear-gradient(135deg,rgba(139,92,246,0.2),rgba(99,102,241,0.12));
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 999px;
    padding: 0.3rem 1rem;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.09em;
    color: #a78bfa;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}
.ai-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 3rem;
}
@media (max-width: 768px) {
    .ai-split-grid { grid-template-columns: 1fr; }
}
.ai-panel {
    border-radius: 18px;
    padding: 2rem 2rem 2rem;
    border: 1px solid;
    display: flex;
    flex-direction: column;
    gap: 0;
}
.ai-panel-client {
    background: linear-gradient(145deg, rgba(139,92,246,0.08), rgba(99,102,241,0.04));
    border-color: rgba(139,92,246,0.25);
}
.ai-panel-dev {
    background: linear-gradient(145deg, rgba(16,185,129,0.07), rgba(6,182,212,0.04));
    border-color: rgba(16,185,129,0.2);
}
.ai-panel-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 1rem;
}
.ai-panel-client .ai-panel-badge { color: #a78bfa; }
.ai-panel-dev .ai-panel-badge { color: #34d399; }
.ai-panel-headline {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 0.45rem;
}
.ai-panel-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.55;
}
.ai-feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}
.ai-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}
.ai-feature-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    width: 2rem;
    text-align: center;
}
.ai-feature-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}
.ai-feature-desc {
    font-size: 0.81rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Credit strip (index) */
.ai-credit-strip {
    margin-top: 3rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(139,92,246,0.2);
    border-radius: 18px;
    padding: 2rem 2.5rem;
}
.ai-credit-strip-left {
    text-align: center;
    margin-bottom: 1.5rem;
}
.ai-credit-strip-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.ai-credit-strip-sub {
    font-size: 0.84rem;
    color: var(--text-muted);
}
.ai-credit-strip-packs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 0;
}
@media (max-width: 640px) {
    .ai-credit-strip-packs { grid-template-columns: 1fr; }
    .ai-credit-strip { padding: 1.5rem; }
}
.ai-credit-pack {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.25rem 1.25rem 1rem;
    text-align: center;
    background: rgba(255,255,255,0.025);
    position: relative;
}
.ai-credit-pack-featured {
    border-color: rgba(139,92,246,0.4);
    background: rgba(139,92,246,0.07);
}
.ai-credit-pack-badge {
    position: absolute;
    top: 0; right: 0;
    background: #7c3aed;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    padding: 0.18rem 0.55rem;
    border-radius: 0 11px 0 8px;
    text-transform: uppercase;
}
.ai-credit-pack-name {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin-bottom: 0.35rem;
}
.ai-credit-pack-price {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.ai-credit-pack-featured .ai-credit-pack-price { color: #c4b5fd; }
.ai-credit-pack-price span { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }
.ai-credit-pack-note {
    font-size: 0.76rem;
    color: var(--text-faint);
}

/* ── Pricing AI Section ───────────────────────────────────────────────── */
.pricing-ai-section {
    max-width: 900px;
    margin: 5rem auto 0;
    padding: 2.5rem 2rem;
    background: radial-gradient(ellipse 80% 100% at 50% 0%, rgba(109,40,217,0.1) 0%, transparent 65%);
    border: 1px solid rgba(139,92,246,0.18);
    border-radius: 24px;
}
.pricing-ai-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Who gets what */
.pricing-ai-who-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 0;
    margin-bottom: 2.5rem;
    align-items: start;
}
@media (max-width: 700px) {
    .pricing-ai-who-grid { grid-template-columns: 1fr; }
    .pricing-ai-who-divider { display: none; }
}
.pricing-ai-who-divider {
    width: 1px;
    background: rgba(139,92,246,0.18);
    align-self: stretch;
    margin: 0 1.5rem;
}
.pricing-ai-who-panel { padding: 0 0.5rem; }
.pricing-ai-who-badge {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #a78bfa;
    margin-bottom: 1rem;
}
.pricing-ai-who-list {
    list-style: none;
    padding: 0; margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.pricing-ai-who-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
}
.pricing-ai-who-list li strong { color: var(--text-primary); }
.paiwl-check {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    background: rgba(139,92,246,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 900;
    color: #a78bfa;
    margin-top: 0.05rem;
}
.paiwl-check-dev { background: rgba(16,185,129,0.15); color: #34d399; }

/* How credits work */
.pricing-ai-credits-how {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 2.5rem;
}
.pricing-ai-credits-how-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    text-align: center;
}
.pricing-ai-credits-how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}
@media (max-width: 700px) {
    .pricing-ai-credits-how-grid { grid-template-columns: 1fr 1fr; }
}
.paicredits-item { text-align: center; }
.paicredits-num {
    font-size: 1.6rem;
    font-weight: 900;
    color: #a78bfa;
    line-height: 1;
    margin-bottom: 0.3rem;
}
.paicredits-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.3rem;
}
.paicredits-desc {
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Pricing AI packs */
.pricing-ai-pack-header {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 1rem;
}
.pricing-ai-packs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
@media (max-width: 640px) {
    .pricing-ai-packs { grid-template-columns: 1fr; }
}
.pricing-ai-pack {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(255,255,255,0.025);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}
.pricing-ai-pack-featured {
    border-color: rgba(139,92,246,0.35);
    background: rgba(139,92,246,0.07);
    box-shadow: 0 0 0 1px rgba(139,92,246,0.12) inset, 0 8px 32px rgba(109,40,217,0.12);
}
.pricing-ai-pack-best {
    position: absolute;
    top: 0; right: 0;
    background: #7c3aed;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 0.2rem 0.65rem;
    border-radius: 0 15px 0 10px;
}
.pricing-ai-pack-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}
.pricing-ai-pack-price {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.2rem;
}
.pricing-ai-pack-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}
.pricing-ai-pack-credits {
    font-size: 0.82rem;
    font-weight: 700;
    color: #a78bfa;
    margin-bottom: 0.5rem;
}
.pricing-ai-pack-note {
    font-size: 0.79rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}
.pricing-ai-pack-perks {
    list-style: none;
    padding: 0; margin: 0 0 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.79rem;
    color: var(--text-muted);
}
.pricing-ai-pack-perks li { padding-left: 0; }

/* ── Setup Fee Section + CJC Technologies ────────────────────────────────── */
.setup-fee-section {
    max-width: 900px;
    margin: 4rem auto 3rem;
    padding: 2.5rem 2rem;
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: 24px;
    background: radial-gradient(ellipse 70% 80% at 50% 0%, rgba(37,99,235,0.07) 0%, transparent 65%);
}
.setup-fee-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}
@media (max-width: 640px) {
    .setup-fee-grid { grid-template-columns: 1fr; }
}
.setup-fee-item {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
    padding: 1.4rem 1.5rem;
}
.setup-fee-icon {
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}
.setup-fee-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}
.setup-fee-desc {
    font-size: 0.81rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* CJC Technologies callout */
.cjc-callout {
    border-radius: 18px;
    border: 1px solid rgba(99,102,241,0.3);
    background: linear-gradient(135deg, rgba(67,56,202,0.1) 0%, rgba(139,92,246,0.06) 50%, rgba(16,185,129,0.05) 100%);
    overflow: hidden;
    position: relative;
}
.cjc-callout::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 80% at 0% 50%, rgba(99,102,241,0.08) 0%, transparent 70%);
    pointer-events: none;
}
.cjc-callout-inner {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2rem;
    padding: 2rem 2.25rem;
    position: relative;
    align-items: start;
}
@media (max-width: 680px) {
    .cjc-callout-inner { grid-template-columns: 1fr; }
}
.cjc-badge {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    color: #818cf8;
    margin-bottom: 0.5rem;
}
.cjc-headline {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    letter-spacing: -0.01em;
}
.cjc-desc {
    font-size: 0.87rem;
    color: var(--text-muted);
    line-height: 1.65;
    margin-bottom: 1.1rem;
}
.cjc-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.cjc-tag {
    background: rgba(99,102,241,0.12);
    border: 1px solid rgba(99,102,241,0.22);
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.71rem;
    font-weight: 600;
    color: #a5b4fc;
}
.cjc-right {
    min-width: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cjc-logo-block {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 14px;
    padding: 1.25rem 1.5rem;
    width: 100%;
}
.cjc-logo-text {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.cjc-logo-text span {
    font-size: 0.68rem;
    font-weight: 700;
    color: #818cf8;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.cjc-logo-sub {
    font-size: 0.68rem;
    color: var(--text-faint);
    margin-top: 0.5rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Admin: Onboarding List Page ─────────────────────────────────────────── */
.onb-mini-bar {
    width: 60px;
    height: 5px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto 2px;
}
.onb-mini-fill { height: 100%; border-radius: 999px; transition: width 0.4s; }
.onb-fill-done { background: #4ade80; }
.onb-fill-prog { background: #fbbf24; }
.onb-fill-none { background: transparent; }
.onb-mini-pct { font-size: 0.68rem; color: var(--text-faint); }
.onb-overall-ring { position: relative; width: 40px; height: 40px; margin: 0 auto; }
.onb-ring-label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem; font-weight: 800; color: var(--text-primary);
}
/* ── Admin: Onboarding Detail Page ─────────────────────────────────────────  */
.onb-big-ring { position: relative; width: 72px; height: 72px; margin: 0 auto; }
.onb-big-ring-label {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 900; color: var(--text-primary);
}
.onb-step-bar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}
.onb-step-pill {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid;
    cursor: pointer;
    transition: opacity 0.15s;
}
.onb-step-pill:hover { opacity: 0.85; }
.onb-step-done    { background: rgba(74,222,128,0.08);  border-color: rgba(74,222,128,0.3); }
.onb-step-prog    { background: rgba(251,191,36,0.08);  border-color: rgba(251,191,36,0.3); }
.onb-step-pending { background: rgba(255,255,255,0.02); border-color: rgba(255,255,255,0.07); }
.onb-step-num {
    width: 24px; height: 24px; flex-shrink: 0;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.7rem; font-weight: 900;
}
.onb-step-done    .onb-step-num { background: rgba(74,222,128,0.2);  color: #4ade80; }
.onb-step-prog    .onb-step-num { background: rgba(251,191,36,0.2);  color: #fbbf24; }
.onb-step-pending .onb-step-num { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.onb-step-label { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); }
.onb-step-sub   { font-size: 0.7rem;  color: var(--text-faint); }
.onb-section {
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.25rem;
}
.onb-section-signoff {
    border-color: rgba(74,222,128,0.2);
    background: rgba(74,222,128,0.04);
}
.onb-section-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.onb-section-icon {
    width: 36px; height: 36px; flex-shrink: 0;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.onb-section-title { font-size: 1rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.2rem; }
.onb-section-sub   { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.onb-section-badge {
    margin-left: auto;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    white-space: nowrap;
}
.onb-badge-done    { background: rgba(74,222,128,0.15);  color: #4ade80; }
.onb-badge-prog    { background: rgba(251,191,36,0.15);  color: #fbbf24; }
.onb-badge-pending { background: rgba(107,114,128,0.12); color: #6b7280; }
.onb-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.onb-check-row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}
.onb-check-row:hover { background: rgba(255,255,255,0.04); }
.onb-check-row input[type="checkbox"] {
    width: 17px; height: 17px; flex-shrink: 0;
    accent-color: #3b82f6;
    margin-top: 0.1rem;
    cursor: pointer;
}
.onb-check-title { font-size: 0.88rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.2rem; }
.onb-check-desc  { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5; }
.onb-notes-row { margin-bottom: 0.75rem; }
.onb-notes-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-faint);
    margin-bottom: 0.4rem;
}
.onb-notes-input {
    width: 100%;
    box-sizing: border-box;
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.83rem;
    padding: 0.65rem 0.85rem;
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
    min-height: 70px;
}
.onb-ts-line {
    font-size: 0.78rem;
    color: #4ade80;
    margin-bottom: 0.75rem;
}
.onb-action-row { display: flex; justify-content: flex-end; }
.onb-signoff-row {
    border-color: rgba(74,222,128,0.2);
    background: rgba(74,222,128,0.04);
}

/* ── Client Dashboard: Onboarding Widget ─────────────────────────────────── */
.cd-onb-widget {
    margin: 0 0 1.5rem;
    background: rgba(59,130,246,0.06);
    border: 1px solid rgba(59,130,246,0.2);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
}
.cd-onb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.cd-onb-title { font-size: 0.92rem; font-weight: 800; color: var(--text-primary); margin-bottom: 0.15rem; }
.cd-onb-sub   { font-size: 0.78rem; color: var(--text-muted); }
.cd-onb-overall {
    font-size: 0.8rem;
    font-weight: 800;
    color: #60a5fa;
    background: rgba(59,130,246,0.12);
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
}
.cd-onb-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}
@media (max-width: 640px) {
    .cd-onb-steps { grid-template-columns: 1fr 1fr; }
}
.cd-onb-step {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.cd-onb-step-icon { font-size: 1rem; flex-shrink: 0; }
.cd-onb-step-name { font-size: 0.75rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.25rem; }
.cd-onb-step-bar {
    height: 4px;
    background: rgba(255,255,255,0.07);
    border-radius: 999px;
    overflow: hidden;
    width: 100%;
}
.cd-onb-step-fill { height: 100%; border-radius: 999px; transition: width 0.5s; background: #60a5fa; }
.cd-onb-step-tag { font-size: 0.65rem; font-weight: 700; white-space: nowrap; color: #6b7280; }
.cd-onb-signed {
    margin-top: 0.85rem;
    font-size: 0.83rem;
    color: #4ade80;
    background: rgba(74,222,128,0.08);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
}

/* Onboarding fee section */
.onb-section-fee {
    border-color: rgba(251,191,36,0.2);
    background: rgba(251,191,36,0.03);
}
.onb-signoff-locked {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}
.onb-signoff-locked input[type="checkbox"] { cursor: not-allowed; }

/* ── Engagement Disclaimer — client modal inline ── */
.engagement-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding: 0.7rem 0.9rem;
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.18);
    border-radius: 8px;
    font-size: 0.76rem;
    color: var(--text-muted);
    line-height: 1.55;
}
.engagement-disclaimer-icon {
    font-style: normal;
    font-size: 0.9rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 1px;
}
.engagement-disclaimer strong { color: var(--text-secondary); }

/* ── Engagement Disclaimer — dev sidebar card ── */
.engagement-disclaimer-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: rgba(99,102,241,0.05) !important;
    border: 1px solid rgba(99,102,241,0.15) !important;
}
.engagement-disclaimer-card-icon {
    font-size: 1.1rem;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}
.engagement-disclaimer-card-body { flex: 1; }
.engagement-disclaimer-card-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
    letter-spacing: 0.01em;
}
.engagement-disclaimer-card-text {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ── AI Support Chat Widget ── */
#ai-support-bubble {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}
#ai-support-btn {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    box-shadow: 0 0 18px rgba(124,58,237,0.55), 0 4px 12px rgba(0,0,0,0.4);
    animation: aiGlowPulse 3s ease-in-out infinite;
    transition: transform 0.15s ease;
    flex-shrink: 0;
}
#ai-support-btn:hover { transform: scale(1.08); }
#ai-support-panel {
    display: none;
    flex-direction: column;
    width: 340px;
    max-height: 520px;
    background: var(--bg-card);
    border: 1px solid rgba(139,92,246,0.35);
    border-radius: 16px;
    box-shadow: 0 0 32px rgba(124,58,237,0.25), 0 16px 48px rgba(0,0,0,0.5);
    overflow: hidden;
}
#ai-support-panel.open { display: flex; }
.ai-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: linear-gradient(135deg, rgba(124,58,237,0.18), rgba(79,70,229,0.12));
    border-bottom: 1px solid rgba(139,92,246,0.2);
    flex-shrink: 0;
}
.ai-chat-header-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.ai-chat-header-sub {
    font-size: 0.68rem;
    color: #a78bfa;
    font-weight: 400;
}
.ai-chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0.2rem;
    line-height: 1;
}
.ai-chat-close:hover { color: var(--text-primary); }
.ai-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 0;
}
.ai-chat-msg {
    max-width: 88%;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    font-size: 0.84rem;
    line-height: 1.5;
    word-break: break-word;
}
.ai-chat-msg.user {
    align-self: flex-end;
    background: rgba(124,58,237,0.22);
    border: 1px solid rgba(139,92,246,0.3);
    color: var(--text-primary);
    border-bottom-right-radius: 4px;
}
.ai-chat-msg.assistant {
    align-self: flex-start;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}
.ai-chat-msg.error {
    align-self: flex-start;
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
    font-size: 0.81rem;
}
.ai-chat-typing {
    align-self: flex-start;
    padding: 0.55rem 0.9rem;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    border-bottom-left-radius: 4px;
    display: flex;
    gap: 4px;
    align-items: center;
}
.ai-chat-typing span {
    width: 6px; height: 6px;
    background: #a78bfa;
    border-radius: 50%;
    animation: chatBounce 1.2s infinite;
    display: inline-block;
}
.ai-chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.ai-chat-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes chatBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
    30%            { transform: translateY(-5px); opacity: 1; }
}
.ai-chat-faqs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0 1rem 0.65rem;
    flex-shrink: 0;
}
.ai-chat-faq-chip {
    background: rgba(124,58,237,0.1);
    border: 1px solid rgba(139,92,246,0.25);
    border-radius: 20px;
    padding: 0.3rem 0.7rem;
    font-size: 0.75rem;
    color: #c4b5fd;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}
.ai-chat-faq-chip:hover { background: rgba(124,58,237,0.22); color: #ede9fe; }
.ai-chat-input-row {
    display: flex;
    gap: 0.4rem;
    padding: 0.65rem 0.85rem 0.85rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    flex-shrink: 0;
}
.ai-chat-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.84rem;
    padding: 0.5rem 0.75rem;
    font-family: inherit;
    resize: none;
    outline: none;
    min-height: 38px;
    max-height: 90px;
    line-height: 1.4;
}
.ai-chat-input:focus { border-color: rgba(139,92,246,0.5); }
.ai-chat-send {
    width: 36px;
    height: 36px;
    align-self: flex-end;
    border-radius: 10px;
    background: linear-gradient(135deg, #7c3aed, #4f46e5);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.15s;
    flex-shrink: 0;
}
.ai-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
.ai-chat-send:not(:disabled):hover { opacity: 0.85; }
.ai-chat-footer-note {
    font-size: 0.67rem;
    color: var(--text-faint);
    text-align: center;
    padding: 0 1rem 0.5rem;
    flex-shrink: 0;
}
@media (max-width: 480px) {
    #ai-support-panel { width: calc(100vw - 2rem); }
    #ai-support-bubble { right: 1rem; bottom: 1rem; }
}

/* ============================================================
   Messages page — two-column grids with mobile collapse
   ============================================================ */

/* Compose view: contacts list | compose form */
.msgs-grid-compose {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
    align-items: flex-start;
}
/* Inbox view: thread list | active thread */
.msgs-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
    align-items: flex-start;
}

@media (max-width: 680px) {
    .msgs-grid-compose,
    .msgs-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Messages page-header — stack on narrow screens
   ============================================================ */
.msgs-page-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.msgs-page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.02em;
}
.msgs-page-header .msgs-new-btn {
    margin-left: auto;
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.msgs-page-header .msgs-new-btn:hover { background: var(--primary-dark); }
@media (max-width: 480px) {
    .msgs-page-header { flex-direction: column; align-items: flex-start; }
    .msgs-page-header .msgs-new-btn { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============================================================
   User-menu dropdown — full-width on phone
   ============================================================ */
@media (max-width: 700px) {
    .user-menu-dropdown {
        position: fixed;
        top: var(--nav-h);
        right: 0;
        left: 0;
        padding-top: 0;
        width: 100%;
        min-width: 100%;
        z-index: 400;
    }
    .user-menu-dropdown-inner {
        border-radius: 0 0 16px 16px;
        max-height: calc(100dvh - var(--nav-h));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .user-menu-email { font-size: 0.8rem; padding: 0.85rem 1.25rem 0.65rem; }
    .user-menu-item  { padding: 0.75rem 1.25rem; font-size: 0.92rem; }
}

/* ============================================================
   SALES / PM AGENT PORTAL
   ============================================================ */

/* ── Apply page ── */
.sales-apply-card {
    max-width: 640px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
}
.sales-apply-badge {
    display: inline-block;
    background: rgba(16,185,129,0.1);
    color: #10b981;
    border: 1px solid rgba(16,185,129,0.3);
    border-radius: 999px;
    padding: 0.25rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}
.sales-apply-form { display: flex; flex-direction: column; gap: 0.9rem; }
.sales-form-row   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.sales-form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.sales-apply-perks {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.85rem 1rem;
    background: rgba(99,102,241,0.05);
    border: 1px solid rgba(99,102,241,0.15);
    border-radius: 10px;
}
.sales-perk-item { font-size: 0.8rem; color: var(--text-muted); }
@media (max-width: 600px) {
    .sales-apply-card  { padding: 1.5rem 1rem; }
    .sales-form-row    { grid-template-columns: 1fr; }
    .sales-apply-perks { grid-template-columns: 1fr; }
}

/* ── Dashboard shell ── */
.sales-dash {
    max-width: 1280px;
    margin: 0 auto;
    padding: calc(var(--nav-h) + 2rem) 1.5rem 4rem;
}
.sales-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
}
.sales-breadcrumb { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-faint); margin-bottom: 0.3rem; }
.sales-title      { font-size: 1.65rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 0.4rem; }
.sales-meta       { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* ── KPI strip ── */
.sales-kpi-strip {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.sales-kpi {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}
.sales-kpi-label { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-faint); margin-bottom: 0.3rem; }
.sales-kpi-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -1px; color: var(--text); }
@media (max-width: 900px)  { .sales-kpi-strip { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px)  { .sales-kpi-strip { grid-template-columns: repeat(2, 1fr); } }

/* ── Section label ── */
.sales-section-title {
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-faint);
    margin-bottom: 0.9rem;
}

/* ── Pipeline board (kanban) ── */
.sales-pipeline {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.5rem;
    align-items: flex-start;
}
.sales-col {
    min-width: 180px;
    flex: 0 0 180px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.sales-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-bottom: 1px solid var(--border);
}
.sales-col-label  { font-size: 0.73rem; font-weight: 700; color: var(--text-muted); }
.sales-col-label.won  { color: #4ade80; }
.sales-col-label.lost { color: #f87171; }
.sales-col-label.proposal { color: #a78bfa; }
.sales-col-label.negotiation { color: #f59e0b; }
.sales-col-count  { font-size: 0.68rem; font-weight: 700; background: rgba(255,255,255,0.06); border-radius: 99px; padding: 1px 7px; color: var(--text-faint); }
.sales-col-body   { padding: 0.5rem; display: flex; flex-direction: column; gap: 0.4rem; min-height: 60px; }
.sales-col-empty  { font-size: 0.75rem; color: var(--text-faint); text-align: center; padding: 0.75rem 0.5rem; }

/* ── Lead card (kanban) ── */
.sales-lead-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.75rem;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.sales-lead-card:hover { border-color: rgba(99,102,241,0.4); background: rgba(99,102,241,0.04); }
.slc-company  { font-size: 0.8rem; font-weight: 700; color: var(--text-primary); margin-bottom: 0.15rem; }
.slc-contact  { font-size: 0.72rem; color: var(--text-muted); }
.slc-value    { font-size: 0.72rem; color: #4ade80; font-weight: 700; margin-top: 0.2rem; }
.slc-next     { font-size: 0.68rem; color: var(--text-faint); margin-top: 0.15rem; }
.slc-industry { font-size: 0.65rem; color: var(--text-faint); margin-top: 0.1rem; }

/* ── All leads table ── */
.sales-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.sales-table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
.sales-table th {
    padding: 0.65rem 1rem;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--text-faint); text-align: left; white-space: nowrap;
    border-bottom: 1px solid var(--border);
}
.sales-table td { padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.sales-table tbody tr:last-child td { border-bottom: none; }
.sales-tr { cursor: pointer; }
.sales-tr:hover td { background: var(--bg-elevated); }
@media (max-width: 700px) { .sales-col-hide { display: none; } }

/* ── Stage badge ── */
.sales-stage-badge {
    display: inline-block;
    font-size: 0.7rem; font-weight: 700;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(255,255,255,0.07); color: var(--text-muted); border: 1px solid var(--border);
    white-space: nowrap;
}
.sales-stage-badge.prospect       { background: rgba(99,102,241,0.1);  color: #818cf8; border-color: rgba(99,102,241,0.3); }
.sales-stage-badge.contacted      { background: rgba(59,130,246,0.1);  color: #60a5fa; border-color: rgba(59,130,246,0.3); }
.sales-stage-badge.demo_scheduled { background: rgba(245,158,11,0.1);  color: #fbbf24; border-color: rgba(245,158,11,0.3); }
.sales-stage-badge.proposal       { background: rgba(139,92,246,0.1);  color: #a78bfa; border-color: rgba(139,92,246,0.3); }
.sales-stage-badge.negotiation    { background: rgba(251,146,60,0.1);  color: #fb923c; border-color: rgba(251,146,60,0.3); }
.sales-stage-badge.won            { background: rgba(74,222,128,0.1);  color: #4ade80; border-color: rgba(74,222,128,0.3); }
.sales-stage-badge.lost           { background: rgba(248,113,113,0.1); color: #f87171; border-color: rgba(248,113,113,0.3); }

/* ── Activity log ── */
.sales-activity-list { display: flex; flex-direction: column; gap: 0.5rem; }
.sales-act-row {
    display: flex; align-items: flex-start; gap: 0.75rem;
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 10px; padding: 0.75rem 1rem;
}
.sales-act-type    { font-size: 1.1rem; flex-shrink: 0; margin-top: 0.05rem; }
.sales-act-summary { font-size: 0.85rem; color: var(--text); }
.sales-act-meta    { font-size: 0.75rem; color: var(--text-muted); margin-top: 0.2rem; }

/* ── Modal tabs ── */
.modal-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    padding: 0 1.25rem;
    gap: 0.25rem;
}
.modal-tab {
    padding: 0.5rem 1rem;
    font-size: 0.83rem; font-weight: 600;
    color: var(--text-muted); background: none; border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer; transition: all 0.15s; margin-bottom: -1px;
}
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.modal-tab:hover  { color: var(--text); }

/* ── Apply link in footer ── */
.footer-sales-link {
    display: inline-block;
    margin-top: 0.9rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition);
    font-size: 0.78rem;
}
.footer-sales-link:hover { color: #10b981; }

/* ── Client dashboard: Account Manager card ── */
.cd-pm-card { border: 1px solid rgba(37,99,235,0.25) !important; background: rgba(37,99,235,0.04) !important; }
.cd-pm-contact-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: background 0.15s, color 0.15s;
}
.cd-pm-contact-row:hover { background: rgba(37,99,235,0.1); color: var(--primary); }
