/* ═══ Agent Chain — Shared Styles for Product Pages ═══ */

:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    --sidebar-width: 52px;
    --sidebar-expanded: 200px;
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    --bg-primary: #000000;
    --bg-secondary: #080808;
    --bg-card: #0d1117;
    --bg-card-hover: #161b22;
    --bg-code: #0d1117;
    --border: #21262d;
    --border-active: #388bfd;
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #7d8590;
    --accent-cyan: #39d2c0;
    --accent-blue: #58a6ff;
    --accent-purple: #bc8cff;
    --accent-green: #3fb950;
    --accent-amber: #d29922;
    --accent-rose: #f85149;
    --accent-yellow: #e3b341;
    --shadow: 0 1px 3px rgba(0,0,0,0.5);
    --code-keyword: #ff7b72;
    --code-string: #a5d6ff;
    --code-comment: #8b949e;
}

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f6f8fa;
    --bg-code: #f6f8fa;
    --border: #d0d7de;
    --border-active: #0969da;
    --text-primary: #1f2328;
    --text-secondary: #656d76;
    --text-muted: #8b949e;
    --accent-cyan: #1b9e8c;
    --accent-blue: #0969da;
    --accent-purple: #8250df;
    --accent-green: #1a7f37;
    --accent-amber: #9a6700;
    --accent-rose: #cf222e;
    --accent-yellow: #9a6700;
    --shadow: 0 1px 3px rgba(0,0,0,0.1);
    --code-keyword: #cf222e;
    --code-string: #0a3069;
    --code-comment: #656d76;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-sans);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    max-width: 100%;
    overflow-x: hidden;
}

html {
    max-width: 100%;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img, svg, canvas, video, iframe {
    max-width: 100%;
}

.mobile-sidebar-topbar,
.mobile-sidebar-overlay {
    display: none;
}

/* ═══ SIDEBAR ═══ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 0;
    gap: 4px;
    z-index: 1000;
    transition: width var(--transition);
    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar { display: none; }

.sidebar:hover { width: var(--sidebar-expanded); }

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: contain;
    margin-bottom: 16px;
    flex-shrink: 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    transition: background var(--transition), color var(--transition);
}

.sidebar-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.sidebar-item.active {
    background: var(--bg-card-hover);
    color: var(--accent-cyan);
    border-left: 2px solid var(--accent-cyan);
}

.sidebar-item .icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.sidebar-item .label {
    opacity: 0;
    transition: opacity var(--transition);
}

.sidebar:hover .sidebar-item .label { opacity: 1; }
.sidebar-spacer { flex: 1; }

.sidebar-divider {
    width: 24px;
    height: 1px;
    background: var(--border);
    margin: 4px auto;
    flex-shrink: 0;
}

.sidebar-item.product-item {
    padding: 7px 14px;
    font-size: 12px;
}

.sidebar-item.product-item .icon { font-size: 14px; }

/* ═══ THEME TOGGLE ═══ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0;
    cursor: pointer;
    margin-bottom: 8px;
    width: 100%;
}

.theme-toggle .theme-sun,
.theme-toggle .theme-moon {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: color var(--transition), opacity var(--transition);
    opacity: 0;
}

.sidebar:hover .theme-toggle .theme-sun,
.sidebar:hover .theme-toggle .theme-moon { opacity: 0.6; }

[data-theme="light"] .theme-toggle .theme-sun { opacity: 1 !important; color: var(--accent-yellow); }
[data-theme="dark"] .theme-toggle .theme-moon { opacity: 1 !important; color: var(--accent-cyan); }

.theme-switch {
    width: 36px;
    height: 20px;
    border-radius: 10px;
    background: var(--border);
    position: relative;
    flex-shrink: 0;
    transition: background var(--transition);
}

[data-theme="dark"] .theme-switch { background: var(--accent-cyan); }
[data-theme="light"] .theme-switch { background: var(--accent-yellow); }

.theme-switch .knob {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: left var(--transition);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .theme-switch .knob { left: 18px; }
[data-theme="light"] .theme-switch .knob { left: 2px; }

/* ═══ MAIN CONTENT ═══ */
.main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
}

/* ═══ PRODUCT PAGE LAYOUT ═══ */
.product-hero {
    padding: 60px 28px 40px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.product-hero .product-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(57,210,192,0.1);
    border: 1px solid rgba(57,210,192,0.2);
    border-radius: 20px;
    padding: 4px 14px;
    margin-bottom: 16px;
}

.product-hero h1 {
    font-size: clamp(28px, 4vw, 40px);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
}

.product-hero .product-tagline {
    font-size: 16px;
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 24px;
}

.product-hero .product-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 24px;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--accent-cyan);
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product content area */
.product-content {
    padding: 40px 28px;
    max-width: 100%;
    overflow-x: hidden;
}

/* Agent ID tab — legacy breakout no longer needed since max-width removed */
#dv9 {
    max-width: none;
    width: calc(100vw - var(--sidebar-width));
    margin-left: -28px;
    padding-left: 28px;
    padding-right: 28px;
    box-sizing: border-box;
}

.product-content h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 16px;
    margin-top: 40px;
}

.product-content h2:first-child { margin-top: 0; }

.product-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.7;
}

/* Feature list */
.feature-list {
    list-style: none;
    margin-bottom: 24px;
}

.feature-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-list li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: 700;
}

/* Data tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 24px;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.data-table tr:hover td {
    background: var(--bg-card-hover);
}

/* Code blocks */
.code-block {
    background: var(--bg-code);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    overflow-x: auto;
    position: relative;
    margin-bottom: 16px;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    white-space: pre;
    display: block;
}

.code-label {
    position: absolute;
    top: 8px;
    right: 10px;
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.copy-btn {
    position: absolute;
    top: 8px;
    right: 10px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-family: var(--font-sans);
}

.copy-btn:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
}

.ck { color: var(--code-keyword); }
.cs { color: var(--code-string); }
.cc { color: var(--code-comment); }

/* Alert boxes */
.alert {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
    border-left: 3px solid;
}

.alert-info {
    background: rgba(88,166,255,0.08);
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.alert-warning {
    background: rgba(210,153,34,0.08);
    border-color: var(--accent-amber);
    color: var(--accent-amber);
}

.alert-success {
    background: rgba(63,185,80,0.08);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.alert-danger {
    background: rgba(248,81,73,0.08);
    border-color: var(--accent-rose);
    color: var(--accent-rose);
}

/* Cards grid for product features */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    transition: border-color var(--transition), background var(--transition);
}

.card:hover {
    border-color: var(--border-active);
    background: var(--bg-card-hover);
}

.card-icon { font-size: 22px; margin-bottom: 8px; }
.card-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.card-desc { font-size: 11px; color: var(--text-muted); line-height: 1.6; }

/* Status badges */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.badge-green { background: rgba(63,185,80,0.15); color: var(--accent-green); }
.badge-amber { background: rgba(210,153,34,0.15); color: var(--accent-amber); }
.badge-red { background: rgba(248,81,73,0.15); color: var(--accent-rose); }
.badge-blue { background: rgba(88,166,255,0.15); color: var(--accent-blue); }
.badge-purple { background: rgba(188,140,255,0.15); color: var(--accent-purple); }

/* CTA section */
.product-cta {
    margin-top: 40px;
    padding: 32px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-align: center;
}

.product-cta h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.product-cta p {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
    font-weight: 700;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(57,210,192,0.3);
}

.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-weight: 600;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--transition);
    text-decoration: none;
}

.btn-secondary:hover { background: rgba(255,255,255,0.1); }

/* ═══ AGENT ID REGISTRY ═══ */
.registry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.agent-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    transition: border-color var(--transition);
}

.agent-card:hover { border-color: var(--border-active); }

.agent-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.agent-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.agent-card-header .info { flex: 1; }
.agent-card-header .info .name { font-weight: 600; font-size: 14px; }
.agent-card-header .info .org { font-size: 11px; color: var(--text-muted); }

.agent-did {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--accent-cyan);
    background: rgba(57,210,192,0.06);
    padding: 6px 10px;
    border-radius: 6px;
    margin-bottom: 10px;
    word-break: break-all;
}

.agent-did.revoked {
    color: var(--accent-rose);
    background: rgba(248,81,73,0.06);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.detail-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value { font-size: 12px; }

.gauge-track {
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 6px;
}

.gauge-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.5s ease;
}

.gauge-high { background: var(--accent-green); }
.gauge-med { background: var(--accent-amber); }
.gauge-low { background: var(--accent-rose); }

/* Tier pricing cards */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.tier-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    border-top: 3px solid var(--text-muted);
    transition: border-color var(--transition), transform var(--transition);
}

.tier-card:hover { transform: translateY(-2px); }
.tier-card .tier-name {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.tier-card .tier-price {
    font-size: 28px;
    font-weight: 700;
    margin: 8px 0;
}

.tier-card .tier-desc {
    font-size: 11px;
    color: var(--text-muted);
}

/* Tier preview sections */
.tier-preview {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.tier-preview .edit-side,
.tier-preview .preview-side {
    flex: 1;
    min-width: 220px;
}

.tier-preview .edit-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.mock-input {
    padding: 8px 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.mock-btn {
    display: inline-block;
    padding: 6px 16px;
    font-weight: 600;
    border-radius: 6px;
    font-size: 12px;
    color: #000;
}

.mock-btn-secondary {
    display: inline-block;
    padding: 6px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    border-radius: 6px;
    font-size: 12px;
}

/* Section title used in Agent ID */
.sec-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    margin-top: 28px;
}
.sec-title.collapsible {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.sec-title.collapsible::after {
    content: '▼';
    font-size: 10px;
    color: var(--text-muted);
    transition: transform 0.2s;
}
.sec-title.collapsible.collapsed::after {
    transform: rotate(-90deg);
}
.sec-collapsed {
    display: none !important;
}

/* Footer */
.footer {
    padding: 28px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 32px;
    width: auto;
    border-radius: 8px;
}

.footer-info .footer-name { font-weight: 700; font-size: 14px; }
.footer-info .footer-tagline { font-size: 11px; color: var(--text-primary); }

.footer-links {
    display: flex;
    gap: 20px;
    font-size: 12px;
}

.footer-links a {
    color: var(--text-primary);
    transition: color var(--transition);
}

.footer-links a:hover { color: var(--accent-cyan); }

/* Chatbot */
.chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(57,210,192,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform var(--transition);
}

.chat-button:hover { transform: scale(1.1); }
.chat-button svg { width: 26px; height: 26px; fill: #000; }

.chat-window {
    position: fixed;
    bottom: 92px;
    right: 24px;
    width: 360px;
    height: 420px;
    background: var(--bg-card);
    border-radius: 14px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.5);
    display: none;
    flex-direction: column;
    z-index: 1001;
    border: 1px solid var(--border);
}

.chat-window.open { display: flex; }

.chat-header {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
    padding: 14px 18px;
    border-radius: 14px 14px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 14px;
}

.chat-header-close {
    background: none;
    border: none;
    color: #000;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.7;
}

.chat-header-close:hover { opacity: 1; }

.chat-messages {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 85%;
    word-wrap: break-word;
    font-size: 13px;
    line-height: 1.5;
}

.chat-msg.bot {
    background: var(--bg-secondary);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-msg.user {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-quick-actions {
    padding: 10px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.chat-quick-btn {
    background: var(--bg-secondary);
    color: var(--accent-cyan);
    border: 1px solid var(--border);
    padding: 5px 12px;
    border-radius: 16px;
    font-size: 12px;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
    font-family: var(--font-sans);
}

.chat-quick-btn:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-cyan);
}

.chat-input-bar {
    display: flex;
    padding: 12px 14px;
    border-top: 1px solid var(--border);
    border-radius: 0 0 14px 14px;
    gap: 8px;
}

.chat-input-bar input {
    flex: 1;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: 20px;
    outline: none;
    font-size: 13px;
    font-family: var(--font-sans);
}

.chat-input-bar input:focus { border-color: var(--accent-cyan); }

.chat-send-btn {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    border: none;
    color: #000;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform var(--transition);
}

.chat-send-btn:hover { transform: scale(1.05); }
.chat-send-btn svg { width: 16px; height: 16px; fill: #000; }

.chat-typing {
    padding: 8px 14px;
    font-size: 12px;
    color: var(--text-muted);
    font-style: italic;
    display: none;
}

.chat-typing.show { display: block; }

/* Search overlay */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20vh;
    backdrop-filter: blur(4px);
}

.search-overlay.active { display: flex; }

.search-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    width: 90%;
    max-width: 560px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
}

.search-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 16px;
    font-family: var(--font-sans);
    outline: none;
}

.search-input:focus { border-color: var(--accent-cyan); }

.search-hint {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-sidebar-topbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: calc(60px + env(safe-area-inset-top, 0px));
        padding: env(safe-area-inset-top, 0px) 16px 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        background: rgba(0, 0, 0, 0.92);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-bottom: 1px solid var(--border);
        z-index: 1100;
    }

    .mobile-sidebar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-width: 0;
    }

    .mobile-sidebar-logo {
        width: 34px;
        height: 34px;
        border-radius: 9px;
        object-fit: contain;
        flex-shrink: 0;
    }

    .mobile-sidebar-name {
        font-size: 17px;
        font-weight: 700;
        color: var(--text-primary);
        letter-spacing: -0.02em;
    }

    .mobile-menu-button {
        width: 44px;
        height: 44px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 10px;
        border: none;
        border-radius: 10px;
        background: transparent;
        cursor: pointer;
    }

    .mobile-menu-button span {
        display: block;
        width: 20px;
        height: 2px;
        border-radius: 999px;
        background: var(--text-primary);
    }

    .mobile-sidebar-overlay {
        position: fixed;
        inset: 0;
        display: block;
        background: rgba(0, 0, 0, 0.78);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--transition);
        z-index: 1090;
    }

    .mobile-sidebar-overlay.open {
        opacity: 1;
        pointer-events: auto;
    }

    body.mobile-sidebar-open {
        overflow: hidden;
    }

    .sidebar {
        display: flex;
        width: min(86vw, 304px);
        max-width: 304px;
        transform: translateX(-105%);
        transition: transform var(--transition);
        box-shadow: 0 22px 60px rgba(0, 0, 0, 0.45);
        z-index: 1200;
    }

    .sidebar:hover {
        width: min(86vw, 304px);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .sidebar .sidebar-item .label,
    .sidebar:hover .sidebar-item .label {
        opacity: 1;
    }

    .main {
        margin-left: 0;
        padding-top: calc(60px + env(safe-area-inset-top, 0px));
    }

    .product-hero { padding: 28px 20px 24px; }
    .product-content { padding: 22px 16px 24px; }
    #dv9 { width: 100%; margin-left: 0; padding-left: 16px; padding-right: 16px; }
    .stats-bar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
    .stat-item {
        min-width: 0;
    }
    .card-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .data-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .data-table thead,
    .data-table tbody {
        white-space: nowrap;
    }
    .tier-preview .edit-side,
    .tier-preview .preview-side {
        min-width: 0 !important;
    }
    .code-block code {
        white-space: pre-wrap;
        word-break: break-word;
    }
    .footer {
        padding: 20px 16px 108px;
        flex-direction: column;
        align-items: flex-start;
    }
    .footer-links {
        gap: 10px 14px;
        flex-wrap: wrap;
    }
    .chat-window {
        width: calc(100vw - 24px);
        height: min(70vh, 520px);
        right: 12px;
        bottom: 82px;
    }
    .chat-button {
        right: 16px;
        bottom: 16px;
    }
}

/* ═══ MOCKUP-STYLE COMPONENTS ═══ */

/* Stats Grid (4 colored metric cards) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.stat-card .sc-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-card .sc-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .sc-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Alert Cards (scan results, attack feed) */
.alert-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-left: 3px solid var(--border);
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.alert-card.alert-critical { border-left-color: var(--accent-rose); }
.alert-card.alert-warn { border-left-color: var(--accent-amber); }
.alert-card.alert-safe { border-left-color: var(--accent-green); }
.alert-card.alert-info-card { border-left-color: var(--accent-blue); }

.alert-card .ac-title {
    font-weight: 600;
    font-size: 13px;
}

.alert-card .ac-desc {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.alert-card .ac-right {
    text-align: right;
    flex-shrink: 0;
}

/* Honeypot Cards */
.hp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.hp-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
}

.hp-card .hp-name {
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 4px;
}

.hp-card .hp-type {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.hp-card .hp-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

/* Trust Flow */
.trust-flow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.trust-node {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    text-align: center;
    min-width: 120px;
}

.trust-node .tn-name { font-weight: 600; font-size: 13px; }
.trust-node .tn-score { font-size: 18px; font-weight: 700; margin: 4px 0; }
.trust-node .tn-role { font-size: 10px; color: var(--text-muted); }

.trust-arrow {
    font-size: 20px;
    color: var(--text-muted);
}

/* Compliance Framework Cards */
.framework-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.fw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
}

.fw-card .fw-name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.fw-card .fw-score { font-size: 28px; font-weight: 700; margin: 8px 0 4px; }
.fw-card .fw-status { font-size: 11px; }

/* Trend bar chart */
.trend-chart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 100px;
    padding: 12px 0;
    margin-bottom: 24px;
}

.trend-bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-cyan), var(--accent-blue));
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 8px;
    transition: height 0.4s ease;
}

.trend-bar .tb-label {
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 9px;
    color: var(--text-muted);
    white-space: nowrap;
}

/* Small CTA button (no container) */
.cta-btn-small {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #000;
    font-weight: 700;
    border-radius: 6px;
    font-size: 12px;
    text-decoration: none;
    transition: transform var(--transition), box-shadow var(--transition);
}

.cta-btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(57,210,192,0.3);
}

/* Deploy mode cards */
.deploy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}

.deploy-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 14px;
    text-align: center;
}

.deploy-card .dc-icon { font-size: 22px; margin-bottom: 6px; }
.deploy-card .dc-name { font-weight: 600; font-size: 12px; }
.deploy-card .dc-desc { font-size: 10px; color: var(--text-muted); margin-top: 4px; }

/* Wallet grid for Marketplace */
.wallet-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.wallet-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

/* NFT preview card */
.nft-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    max-width: 280px;
}

.nft-card .nft-img {
    height: 140px;
    background: linear-gradient(135deg, rgba(188,140,255,0.15), rgba(57,210,192,0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.nft-card .nft-body {
    padding: 14px;
}

.nft-card .nft-name { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.nft-card .nft-did { font-family: var(--font-mono); font-size: 10px; color: var(--accent-cyan); }

/* Two-column layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 768px) {
    .two-col { grid-template-columns: 1fr; }
    .hp-grid { grid-template-columns: 1fr; }
    .framework-grid { grid-template-columns: 1fr; }
    .deploy-grid { grid-template-columns: 1fr; }
    .trust-flow { flex-direction: column; }
}
