/* ==========================================================================
   TRUPOWER™ & HIMITRACE™ DPP WEBAPP DEMO — DESIGN SYSTEM
   ========================================================================== */

:root {
    /* Color Palette */
    --bg-dark: #0A0F1D;
    --bg-surface: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-card-hover: rgba(30, 41, 59, 0.95);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-bright: rgba(255, 255, 255, 0.16);
    
    /* Brand Accents */
    --navy-deep: #1A365D;
    --navy-bright: #2563EB;
    --ivory-base: #F5F3EF;
    --ivory-tint: #E8E3D9;
    --emerald: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --cyan: #06B6D4;
    --cyan-glow: rgba(6, 182, 212, 0.25);
    --gold: #F59E0B;
    --gold-glow: rgba(245, 158, 11, 0.25);
    --text-main: #F9FAFB;
    --text-muted: #9CA3AF;
    --text-dim: #6B7280;

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Plus Jakarta Sans', var(--font-main);
    --font-mono: 'JetBrains Mono', monospace;
    --font-serif: 'Georgia', serif;

    /* Transitions */
    --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   TOP NAVIGATION
   -------------------------------------------------------------------------- */
.top-nav {
    background: rgba(10, 15, 29, 0.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 10px 24px;
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    letter-spacing: -0.5px;
    color: #FFF;
}

.bolt-icon {
    font-size: 1.3rem;
    filter: drop-shadow(0 0 8px #F59E0B);
}

.brand-name .tld {
    color: var(--cyan);
    font-weight: 600;
    font-size: 1.05rem;
}

.divider-vertical {
    width: 1px;
    height: 24px;
    background: var(--border-bright);
}

.powered-by {
    display: flex;
    flex-direction: column;
}

.badge-dpp {
    font-size: 0.72rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--emerald), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.powered-text {
    font-size: 0.68rem;
    color: var(--text-dim);
}

/* Status Pills */
.status-pills-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-subtle);
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
}

.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.pulse-emerald {
    background-color: var(--emerald);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 1.8s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.pill-label {
    color: var(--text-muted);
}

.pill-val {
    color: #FFF;
    font-weight: 600;
}

/* Device Switcher & Lang */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.device-switcher {
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 3px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
}

.switcher-label {
    font-size: 0.7rem;
    color: var(--text-dim);
    margin: 0 6px 0 8px;
    font-weight: 600;
}

.dev-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.74rem;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dev-btn:hover {
    color: #FFF;
}

.dev-btn.active {
    background: var(--navy-bright);
    color: #FFF;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
}

.lang-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    padding: 2px;
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
}

.lang-btn.active {
    background: var(--border-bright);
    color: #FFF;
}

/* --------------------------------------------------------------------------
   MAIN TABS NAVIGATION
   -------------------------------------------------------------------------- */
.main-tabs-nav {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-subtle);
    padding: 6px 24px;
}

.tabs-container {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    transition: var(--transition-fast);
}

.tab-btn:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #FFF;
}

.tab-btn.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.4);
    color: #FFF;
}

.tab-tag {
    font-size: 0.68rem;
    padding: 2px 7px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.08);
    color: var(--ivory-base);
    font-weight: 700;
}

.tag-success {
    background: rgba(16, 185, 129, 0.18);
    color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tag-info {
    background: rgba(6, 182, 212, 0.18);
    color: var(--cyan);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.tag-gold {
    background: rgba(245, 158, 11, 0.18);
    color: var(--gold);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --------------------------------------------------------------------------
   VIEWPORT WRAPPER & DEVICE FRAMES
   -------------------------------------------------------------------------- */
.viewport-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 24px;
    transition: var(--transition-smooth);
}

.device-frame {
    width: 100%;
    max-width: 1440px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transition: var(--transition-smooth);
}

/* iPad Simulator Frame */
.device-frame.frame-ipad {
    max-width: 820px;
    border: 12px solid #222;
    border-radius: 36px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7);
}

/* iPhone Simulator Frame */
.device-frame.frame-iphone {
    max-width: 420px;
    border: 12px solid #1c1c1e;
    border-radius: 48px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
}

/* Apple Watch Simulator Frame */
.device-frame.frame-watch {
    max-width: 320px;
    border: 16px solid #2a2a2c;
    border-radius: 56px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.9);
    font-size: 0.85rem;
}

.tab-pane {
    display: none;
    padding: 28px;
    animation: fadeIn 0.3s ease-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   TAB 1: PRODUCT SHOWCASE & CATALOG
   -------------------------------------------------------------------------- */
.catalog-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

@media (max-width: 992px) {
    .catalog-grid { grid-template-columns: 1fr; }
}

.product-visual-card {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge-design, .badge-origin, .badge-gan {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-subtle);
}

.badge-design { color: #E5E7EB; border-color: rgba(255, 255, 255, 0.15); }
.badge-origin { color: var(--emerald); border-color: rgba(16, 185, 129, 0.3); }
.badge-gan { color: var(--gold); border-color: rgba(245, 158, 11, 0.3); }

/* 3D-Like Adapter Render Stage */
.product-preview-stage {
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    border-radius: var(--radius-md);
    padding: 24px 12px;
    position: relative;
}

.adapter-3d-mockup {
    position: relative;
    padding: 10px;
    perspective: 800px;
}

.adapter-body {
    width: 140px;
    height: 175px;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), inset 0 2px 4px rgba(255, 255, 255, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 16px 12px;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* CMF Color Modes */
.adapter-body.ivory {
    background: linear-gradient(145deg, #FAF8F5, #E5DFC8);
    color: #4A453A;
}

.adapter-body.obsidian {
    background: linear-gradient(145deg, #2D3748, #1A202C);
    color: #E2E8F0;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8), inset 0 1px 2px rgba(255, 255, 255, 0.2);
}

.adapter-body.titanium {
    background: linear-gradient(145deg, #718096, #4A5568);
    color: #F7FAFC;
}

/* EU Plug Pins */
.adapter-pins {
    position: absolute;
    top: -24px;
    display: flex;
    gap: 32px;
}

.pin {
    width: 10px;
    height: 24px;
    background: linear-gradient(to bottom, #CBD5E1, #94A3B8);
    border-radius: 4px 4px 0 0;
    border-top: 2px solid #E2E8F0;
}

.brand-emboss {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 2px;
    opacity: 0.85;
    margin-top: 6px;
}

.port-bezel {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 12px;
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.adapter-body.obsidian .port-bezel {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.1);
}

.usb-port {
    background: #111;
    border-radius: 5px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

.port-tongue {
    width: 26px;
    height: 3px;
    background: #F59E0B; /* Signature Orange GaN accent */
    border-radius: 1px;
}

.port-label {
    position: absolute;
    right: -75px;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    white-space: nowrap;
}

.specs-print {
    font-size: 0.52rem;
    opacity: 0.6;
    text-align: center;
    font-family: var(--font-mono);
}

/* CMF Swatches */
.cmf-swatch-bar {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cmf-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.swatches {
    display: flex;
    gap: 8px;
}

.swatch-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    padding: 5px 10px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 0.72rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.swatch-btn:hover, .swatch-btn.active {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #FFF;
}

.swatch-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.2);
}

.ivory-color { background: #E8E3D9; }
.obsidian-color { background: #1A202C; }
.titanium-color { background: #718096; }

/* Packaging Card */
.packaging-spec-card {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.spec-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.spec-card-header h4 {
    font-size: 0.85rem;
    color: #E2E8F0;
}

.pkg-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.pkg-item {
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
}

.pkg-label { color: var(--text-dim); }
.pkg-value { color: var(--text-main); font-weight: 600; margin-top: 2px; }

/* Info Column */
.product-info-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.power-rating {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: var(--cyan);
}

.product-title {
    font-family: var(--font-heading);
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 4px 0 8px;
    background: linear-gradient(135deg, #FFF 60%, var(--ivory-base));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.product-subtitle {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Model Select Cards */
.model-selection-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.model-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.model-card:hover {
    border-color: var(--border-bright);
}

.model-card.active {
    background: rgba(37, 99, 235, 0.12);
    border-color: var(--navy-bright);
}

.model-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.model-name {
    font-weight: 700;
    font-size: 0.88rem;
    color: #FFF;
}

.model-tag {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 4px;
    background: var(--navy-bright);
    color: #FFF;
}

.tag-compact {
    background: var(--emerald);
}

.model-desc {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.model-price {
    font-size: 0.76rem;
    color: var(--text-main);
}

.model-price strong {
    color: var(--gold);
}

/* Features */
.feature-matrix {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feat-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px;
}

.feat-icon {
    font-size: 1.2rem;
    padding: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.feat-content {
    display: flex;
    flex-direction: column;
    font-size: 0.8rem;
}

.feat-content strong {
    color: #FFF;
    margin-bottom: 2px;
}

.feat-content span {
    color: var(--text-muted);
    line-height: 1.4;
}

/* Action CTA Bar */
.action-cta-bar {
    display: flex;
    gap: 12px;
    margin-top: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    border: none;
    transition: var(--transition-fast);
}

.btn-primary {
    background: linear-gradient(135deg, #2563EB, #1D4ED8);
    color: #FFF;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-bright);
    color: #FFF;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
}

.btn-emerald {
    background: linear-gradient(135deg, var(--emerald), #059669);
    color: #FFF;
    box-shadow: 0 4px 14px var(--emerald-glow);
}

.btn-block {
    width: 100%;
}

/* --------------------------------------------------------------------------
   TAB 2: DIGITAL PRODUCT PASSPORT (DPP)
   -------------------------------------------------------------------------- */
.dpp-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dpp-hero-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.dpp-verified-badge {
    display: flex;
    align-items: center;
    gap: 12px;
}

.shield-check {
    font-size: 2rem;
}

.b-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem;
    color: #FFF;
    letter-spacing: 0.5px;
}

.b-sub {
    font-size: 0.78rem;
    color: var(--emerald);
}

.qr-interactive-trigger {
    display: flex;
    align-items: center;
    gap: 24px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.qr-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.qr-canvas-sim {
    width: 148px;
    height: 148px;
    padding: 12px;
    background: #FFF;
    border-radius: 8px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.qr-matrix-sim {
    width: 76px;
    height: 76px;
    background-image: radial-gradient(#111 35%, transparent 35%), radial-gradient(#111 35%, transparent 35%);
    background-position: 0 0, 4px 4px;
    background-size: 8px 8px;
}

.scan-laser-line {
    position: absolute;
    width: 100%;
    height: 2px;
    background: #EF4444;
    box-shadow: 0 0 8px #EF4444;
    animation: scanMove 2s infinite ease-in-out;
}

@keyframes scanMove {
    0% { top: 0%; opacity: 0.2; }
    50% { top: 90%; opacity: 1; }
    100% { top: 0%; opacity: 0.2; }
}

.qr-tap-hint {
    font-size: 0.65rem;
    color: var(--text-dim);
    margin-top: 6px;
}

.gtin-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
}

.d-label {
    color: var(--text-dim);
    margin-right: 6px;
}

.d-val {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #E2E8F0;
}

.text-emerald { color: var(--emerald) !important; }
.text-cyan { color: var(--cyan) !important; }
.text-gold { color: var(--gold) !important; }
.text-bold { font-weight: 700; }

.dpp-pillars-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.pillar-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pillar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

.p-num {
    font-family: var(--font-mono);
    font-weight: 800;
    font-size: 1rem;
    color: var(--cyan);
}

.pillar-header h4 {
    font-size: 0.92rem;
    color: #FFF;
}

/* Timeline */
.timeline-trail {
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: relative;
    padding-left: 12px;
}

.trail-step {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
}

.step-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--emerald);
    margin-top: 4px;
    box-shadow: 0 0 6px var(--emerald);
}

.step-info {
    display: flex;
    flex-direction: column;
    font-size: 0.78rem;
}

.step-info strong { color: #FFF; }
.step-info span { color: var(--text-muted); }

/* Meters */
.metric-meter-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.meter-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.76rem;
}

.m-top {
    display: flex;
    justify-content: space-between;
}

.m-top span { color: var(--text-muted); }
.m-top strong { color: #FFF; font-family: var(--font-mono); }

.progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--navy-bright);
    border-radius: var(--radius-full);
}

.fill-cyan { background: var(--cyan); }
.fill-emerald { background: var(--emerald); }

/* Carbon Stat Box */
.carbon-stat-box {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.carbon-number {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
}

.big-val {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--emerald);
}

.unit {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.carbon-badge {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--emerald);
    margin-top: 4px;
}

.footprint-breakdown {
    font-size: 0.72rem;
    color: var(--text-dim);
    text-align: center;
}

/* Cert List */
.cert-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.78rem;
}

.cert-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.cert-list strong {
    color: #FFF;
}

/* --------------------------------------------------------------------------
   TAB 3: WMS & LOGISTICS
   -------------------------------------------------------------------------- */
.wms-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.wms-stats-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.wms-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
}

.wms-stat-card.card-emerald {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.06);
}

.wms-stat-card.card-cyan {
    border-color: rgba(6, 182, 212, 0.3);
    background: rgba(6, 182, 212, 0.06);
}

.s-title {
    font-size: 0.75rem;
    color: var(--text-dim);
    font-weight: 600;
}

.s-number {
    font-family: var(--font-heading);
    font-size: 1.7rem;
    font-weight: 800;
    color: #FFF;
    margin: 4px 0 2px;
}

.s-number .unit {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.s-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.wms-main-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .wms-main-grid { grid-template-columns: 1fr; }
}

.routing-matrix-card, .dispatch-simulator-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-head h3 {
    font-size: 0.98rem;
    color: #FFF;
}

.tag-live, .tag-interactive {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: var(--radius-full);
}

.tag-live { background: rgba(16, 185, 129, 0.15); color: var(--emerald); border: 1px solid rgba(16, 185, 129, 0.3); }
.tag-interactive { background: rgba(37, 99, 235, 0.15); color: var(--cyan); border: 1px solid rgba(37, 99, 235, 0.3); }

.dest-country-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dest-row {
    display: grid;
    grid-template-columns: auto 1.5fr 1fr 1fr;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.78rem;
}

.dest-row.fast {
    border-color: rgba(16, 185, 129, 0.2);
}

.c-flag { font-size: 1.1rem; }
.c-name { font-weight: 600; color: #FFF; }
.c-sla { font-weight: 700; color: var(--emerald); }
.c-carrier { color: var(--text-dim); font-size: 0.72rem; }

.sim-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sim-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.sim-select {
    background: #0D1322;
    border: 1px solid var(--border-bright);
    color: #FFF;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    outline: none;
}

.telemetry-terminal {
    background: #050811;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    min-height: 110px;
    max-height: 150px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.term-line {
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   TAB 4: BUYER ECONOMICS & CALCULATOR
   -------------------------------------------------------------------------- */
.econ-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.econ-hero h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #FFF;
}

.econ-hero p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.econ-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 28px;
}

@media (max-width: 992px) {
    .econ-grid { grid-template-columns: 1fr; }
}

.calc-controls-card, .calc-results-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.calc-controls-card h3 {
    font-size: 1rem;
    color: #FFF;
}

.slider-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.slider-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
}

.slider-header label { color: var(--text-muted); }
.slider-val { font-family: var(--font-mono); font-weight: 700; color: var(--cyan); }

input[type="range"] {
    width: 100%;
    accent-color: var(--navy-bright);
    cursor: pointer;
}

.info-callout {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.76rem;
    color: #E2E8F0;
    line-height: 1.45;
}

.margin-highlight-box {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 18px 12px;
}

.m-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.m-lbl { font-size: 0.72rem; color: var(--text-dim); }
.m-val { font-family: var(--font-heading); font-size: 1.8rem; font-weight: 800; }
.divider-v { width: 1px; height: 40px; background: var(--border-subtle); }

.unit-breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.8rem;
}

.u-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 6px;
}

.u-row strong { font-family: var(--font-mono); }

.total-cost-row {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.msrp-row {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* --------------------------------------------------------------------------
   APP FOOTER
   -------------------------------------------------------------------------- */
.app-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-dark);
    padding: 16px 24px;
    font-size: 0.75rem;
    color: var(--text-dim);
}

.footer-inner {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}


/* ==========================================================================
   KAIZEN LAYER v2 — scan result, watch glance, frame fidelity, real-mobile
   ========================================================================== */

/* In-page DPP scan result (replaces alert) */
.scan-result {
    display: none;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: var(--emerald);
    font-size: 0.82rem;
    font-weight: 600;
}
.scan-result.show { display: block; animation: scanPop 0.35s ease-out; }
@keyframes scanPop {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.text-red { color: #EF4444; }

.vat-note { margin-top: 10px; font-size: 0.72rem; color: var(--text-muted); }

/* Watch glance — a real complication card, not a clipped desktop page */
.watch-glance { display: none; }
.device-frame.frame-watch .tab-pane { display: none !important; }
.device-frame.frame-watch { height: 420px; max-height: 420px; }
.device-frame.frame-watch .watch-glance {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 44px 18px;
    text-align: center;
}
.wg-time  { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); }
.wg-stock { font-family: var(--font-mono); font-size: 2.6rem; font-weight: 800; color: var(--emerald); line-height: 1.1; }
.wg-lbl   { font-size: 0.78rem; color: var(--text-muted); }
.wg-badge {
    margin-top: 10px;
    font-size: 0.72rem; font-weight: 700;
    background: rgba(16, 185, 129, 0.15); color: var(--emerald);
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 4px 12px; border-radius: var(--radius-full);
}
.wg-sla { font-size: 0.7rem; color: var(--text-muted); }

/* Simulator frames are narrow DIVs — viewport media queries never fire inside
   them, so mirror the stacked layouts per frame class. */
.frame-iphone .catalog-grid,
.frame-iphone .econ-grid,
.frame-iphone .wms-main-grid,
.frame-iphone .dpp-pillars-grid { grid-template-columns: 1fr !important; }
.frame-iphone .wms-stats-banner { grid-template-columns: 1fr 1fr !important; }
.frame-iphone .tab-pane { padding: 16px; }
.frame-iphone .qr-interactive-trigger { flex-direction: column; align-items: stretch; }
.frame-iphone .d-val { word-break: break-all; white-space: normal; }
.frame-iphone .dest-row { grid-template-columns: auto 1fr; gap: 4px 10px; }
.frame-iphone .model-selection-group { grid-template-columns: 1fr !important; }

.frame-ipad .catalog-grid { grid-template-columns: 1fr !important; }
.frame-ipad .dpp-pillars-grid { grid-template-columns: 1fr 1fr !important; }
.frame-ipad .wms-main-grid { grid-template-columns: 1fr !important; }

/* Real small screens (anh Tru opening the file on an actual phone) */
@media (max-width: 640px) {
    .device-switcher { display: none; }   /* the simulator is a desktop toy */
    .nav-container { flex-wrap: wrap; gap: 10px; }
    .status-pills-bar { order: 3; width: 100%; overflow-x: auto; }
    .tabs-container { overflow-x: auto; padding: 8px 10px; }
    .tab-btn { white-space: nowrap; flex-shrink: 0; }
    .tab-pane { padding: 14px; }
    .viewport-wrapper { padding: 10px; }
    .catalog-grid, .econ-grid, .wms-main-grid, .dpp-pillars-grid,
    .model-selection-group { grid-template-columns: 1fr !important; }
    .wms-stats-banner { grid-template-columns: 1fr 1fr !important; }
    .qr-interactive-trigger { flex-direction: column; align-items: stretch; }
    .d-val { word-break: break-all; white-space: normal; }
    code.d-val { font-size: 0.72rem; }
    .dest-row { grid-template-columns: auto 1fr; gap: 4px 10px; }
    .app-footer .footer-inner { flex-direction: column; gap: 6px; text-align: center; }
}

/* Real scannable QR (SVG) */
.qr-real { width: 100%; height: 100%; display: block; }
