/**
 * Varnetix Platform - Anime.js Inspired Design System
 * Aesthetic: Precision Creative Engineering, Warm Graphite Canvas, Acid Accent Highlights
 * Reference: https://animejs.com/
 */

:root {
    color-scheme: dark;
    /* Anime.js Graphite Palette */
    --hex-bg-1: #252423;
    --hex-bg-2: #2a2928;
    --hex-bg-3: #302e2d;
    --hex-bg-4: #353432;
    --hex-bg-5: #3a3938;
    --hex-bg-6: #3f3e3d;
    --hex-bg-7: #454342;
    
    /* Anime.js Warm Off-White Typography */
    --hex-fg-1: #f6f4f2;
    --hex-fg-2: #d5d3d1;
    --hex-fg-3: #b4b1af;
    --hex-fg-4: #93908d;
    --hex-fg-5: #615e5b;
    --hex-fg-6: #484543;

    /* Anime.js Vivid Accent Tokens */
    --hex-red-1: #ff4b4b;
    --hex-red-2: #d44343;
    --hex-corail-1: #ff7d36;
    --hex-orange-1: #ffa828;
    --hex-yellow-1: #ffcc2a;
    --hex-lime-1: #b7ff54;
    --hex-green-1: #8dff55;
    --hex-turquoise-1: #00ffaa;
    --hex-cyan-1: #26f2d5;
    --hex-sky-1: #05dbe9;
    --hex-indigo-1: #7c85ff;
    --hex-lavender-1: #a369ff;
    --hex-pink-1: #ff718b;

    /* Semantic Mappings */
    --bg-main: var(--hex-bg-1);
    --bg-card: var(--hex-bg-2);
    --bg-surface: var(--hex-bg-3);
    --bg-input: #1c1b1a;
    --border-subtle: #353432;
    --border-strong: #454342;
    --border-focus: var(--hex-red-1);

    --text-primary: var(--hex-fg-1);
    --text-secondary: var(--hex-fg-2);
    --text-muted: var(--hex-fg-4);
    --text-dim: var(--hex-fg-5);

    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', SFMono-Regular, Menlo, monospace;

    --radius-xs: 3px;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

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

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header & Navigation (Clean High-Contrast Light Top Bar) */
.anime-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: #FFFFFF;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid #E2E8F0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* High-Contrast Logo Link */
.brand-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}

.brand-link:hover {
    transform: translateY(-1px);
    opacity: 0.92;
}

.brand-logo-img {
    height: 38px;
    width: auto;
    display: block;
}

.version-badge-wrap {
    display: flex;
    align-items: center;
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: #DC2626;
    background: #FEF2F2;
    border: 1px solid #FECACA;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Anime.js Style Center Nav Links */
.header-quick-nav {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--hex-bg-2);
    padding: 0.25rem 0.4rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.quick-nav-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.15s ease;
}

.quick-nav-btn:hover {
    color: var(--text-primary);
    background: var(--hex-bg-3);
}

.quick-nav-btn.active {
    color: var(--text-primary);
    background: var(--hex-bg-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

@media (max-width: 992px) {
    .header-quick-nav {
        display: none;
    }
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Tactile Pill Badges */
.telemetry-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--hex-bg-3);
    border: 1px solid var(--border-subtle);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 600;
}

.anime-header .telemetry-pill {
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
}

.anime-header .telemetry-pill .pill-label {
    color: #4B5563;
}

.anime-header .telemetry-pill .pill-value {
    color: #15803D;
    font-weight: 700;
}

.anime-header .header-link-btn {
    border: 1px solid #FECACA;
    background: #FEF2F2;
    color: #DC2626;
    font-weight: 600;
    transition: all 0.2s ease;
}

.anime-header .header-link-btn:hover {
    background: #FEE2E2;
    border-color: #F87171;
    color: #B91C1C;
    transform: translateY(-1px);
}

.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.dot-green {
    background: var(--hex-lime-1);
    box-shadow: 0 0 8px var(--hex-lime-1);
}

.dot-red {
    background: var(--hex-red-1);
    box-shadow: 0 0 8px var(--hex-red-1);
}

.pill-label {
    color: var(--text-muted);
}

.pill-value {
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

.header-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.45rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.header-link-btn:hover {
    border-color: var(--hex-fg-3);
    background: var(--hex-bg-3);
}

.header-link-btn.accent-glam {
    border-color: rgba(212, 175, 55, 0.5);
    color: #e5c158;
}

.header-link-btn.accent-glam:hover {
    background: rgba(212, 175, 55, 0.15);
}

/* Page Body */
.main-layout {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1.75rem 6rem;
    flex: 1;
}

/* Hero Section (Anime.js Oversized Typography) */
.hero-stage {
    margin-bottom: 3.5rem;
}

.hero-super {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--hex-red-1);
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hero-super::before {
    content: '';
    display: inline-block;
    width: 12px;
    height: 2px;
    background: var(--hex-red-1);
}

.hero-headline {
    font-size: clamp(2.5rem, 6vw, 4.25rem);
    font-weight: 800;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    max-width: 960px;
    margin-bottom: 1.25rem;
}

.red-dot {
    color: var(--hex-red-1);
}

.lime-dot {
    color: var(--hex-lime-1);
}

.cyan-dot {
    color: var(--hex-cyan-1);
}

.hero-lead {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 760px;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Tactile Command Bar (Like `npm i animejs`) */
.hero-action-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.command-bar {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.45rem 0.85rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--hex-cyan-1);
    gap: 0.85rem;
}

.command-prompt {
    color: var(--hex-fg-5);
    user-select: none;
}

.copy-button {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.2rem 0.4rem;
    border-radius: var(--radius-xs);
    transition: all 0.2s;
}

.copy-button:hover {
    color: var(--text-primary);
    background: var(--hex-bg-4);
}

.btn-tactile {
    background: var(--hex-red-1);
    color: #ffffff;
    border: none;
    padding: 0.55rem 1.35rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-tactile:hover {
    background: #ff3333;
    transform: translateY(-1px);
}

.btn-tactile-secondary {
    background: var(--hex-bg-3);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    padding: 0.55rem 1.25rem;
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-tactile-secondary:hover {
    background: var(--hex-bg-4);
    border-color: var(--border-strong);
}

/* Interactive Pipeline Simulator (Anime.js interactive spirit) */
.pipeline-sandbox {
    margin: 3rem 0;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.sandbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.5rem;
    background: var(--hex-bg-3);
    border-bottom: 1px solid var(--border-subtle);
}

.sandbox-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.sandbox-badge {
    background: rgba(183, 255, 84, 0.15);
    color: var(--hex-lime-1);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.pipeline-diagram {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
    padding: 1px;
}

.pipeline-node {
    background: var(--bg-card);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: relative;
    transition: background 0.25s ease;
}

.pipeline-node:hover, .pipeline-node.active-flow {
    background: var(--hex-bg-3);
}

.node-step {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--hex-fg-5);
    font-weight: 700;
}

.node-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.node-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.pipeline-node.node-accent .node-name {
    color: var(--hex-lime-1);
}

.pipeline-node.node-red .node-name {
    color: var(--hex-red-1);
}

.pipeline-node.node-cyan .node-name {
    color: var(--hex-cyan-1);
}

.pipeline-node.node-yellow .node-name {
    color: var(--hex-yellow-1);
}

/* Interactive Pipeline Inspector */
.pipeline-inspector {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1.5rem;
    background: var(--hex-bg-2);
    border-top: 1px solid var(--border-subtle);
    padding: 1.25rem 1.5rem;
    transition: all 0.2s ease;
}

@media (max-width: 900px) {
    .pipeline-inspector {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

.inspector-badge {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--hex-red-1);
    background: rgba(255, 75, 75, 0.12);
    border: 1px solid rgba(255, 75, 75, 0.3);
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

.inspector-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.inspector-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.inspector-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    background: var(--hex-bg-3);
    padding: 0.6rem 0.9rem;
    border-radius: var(--radius-xs);
    border: 1px solid var(--border-subtle);
    white-space: nowrap;
}

.inspector-metrics strong {
    color: var(--hex-cyan-1);
}

.pipeline-node {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pipeline-node.active-flow {
    background: var(--hex-bg-3);
    border-left: 2px solid var(--hex-lime-1);
    box-shadow: inset 0 0 16px rgba(183, 255, 84, 0.08);
}

/* Bento Metrics Grid */
.bento-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 3.5rem;
}

@media (max-width: 1024px) {
    .bento-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .bento-stats-grid { grid-template-columns: 1fr; }
}

.bento-stat {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.bento-stat:hover {
    border-color: var(--border-strong);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.stat-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.stat-pill {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.stat-big-val {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text-primary);
    margin: 0.5rem 0 0.25rem;
    letter-spacing: -0.03em;
}

.stat-desc {
    font-size: 0.8rem;
    color: var(--text-dim);
}

/* Minimalist Anime.js Tabs Bar */
.control-tabs-bar {
    display: flex;
    justify-content: safe center;
    align-items: center;
    gap: 0.35rem;
    background: var(--hex-bg-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.35rem;
    margin-bottom: 2rem;
    overflow-x: auto;
}

.control-tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-xs);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.5rem;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.control-tab-btn:hover {
    color: var(--text-primary);
    background: var(--hex-bg-3);
}

.control-tab-btn.active {
    background: var(--hex-bg-4);
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.tab-num {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--hex-red-1);
    font-weight: 700;
}

.control-tab-btn.active .tab-num {
    color: var(--hex-lime-1);
}

/* Panes */
.tab-content-pane {
    display: none;
    animation: animeFade 0.25s ease;
}

.tab-content-pane.active {
    display: block;
}

@keyframes animeFade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.pane-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 1rem;
}

.pane-heading {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.pane-sub {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Data Table (Tactile Minimalist) */
.anime-table-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow-x: auto;
}

.anime-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    text-align: left;
}

.anime-table th {
    background: var(--hex-bg-3);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
}

.anime-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.anime-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

/* Alignment utilities for table headers and cells */
.text-right {
    text-align: right !important;
}

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.anime-table th.text-right,
.anime-table td.text-right {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.anime-table th.text-center,
.anime-table td.text-center {
    text-align: center;
}

.id-badge {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--hex-cyan-1);
    background: rgba(38, 242, 213, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    border: 1px solid rgba(38, 242, 213, 0.2);
}

.blueprint-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--hex-lavender-1);
    background: rgba(163, 105, 255, 0.1);
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
}

.env-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
}

.env-prod {
    background: rgba(183, 255, 84, 0.12);
    color: var(--hex-lime-1);
}

.status-badge-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge-green { color: var(--hex-lime-1); }
.badge-red { color: var(--hex-red-1); }

.table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.table-action-btn:hover {
    border-color: var(--hex-fg-2);
    background: var(--hex-bg-4);
}

/* Bento Modules Grid */
.bento-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 1.75rem;
}

@media (max-width: 520px) {
    .bento-cards-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* ==========================================================================
   Varnetix Platform - Governed Business Organization Card
   Design Statement: Precision Creative Engineering, Warm Graphite Canvas, Acid Accents
   ========================================================================== */

.bento-card {
    background: linear-gradient(180deg, #2a2928 0%, #222120 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), 
                border-color 0.2s ease, 
                box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.bento-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(183, 255, 84, 0.5) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bento-card:hover {
    transform: translateY(-2px);
    border-color: rgba(183, 255, 84, 0.35);
    box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.7), 0 0 25px rgba(183, 255, 84, 0.06);
}

.bento-card:hover::before {
    opacity: 1;
}

/* Card Header */
.card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
}

.code-ref {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--hex-cyan-1);
    background: rgba(38, 242, 213, 0.08);
    border: 1px solid rgba(38, 242, 213, 0.25);
    padding: 3px 8px;
    border-radius: var(--radius-xs);
    letter-spacing: 0.06em;
}

.card-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: #FFFFFF;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin-bottom: 3px;
}

.card-sub {
    font-size: 0.84rem;
    color: var(--hex-fg-3);
    line-height: 1.4;
    margin-bottom: 0.85rem;
}

/* Quick Client Info Strip */
.vtx-client-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xs);
    padding: 8px 12px;
    margin-bottom: 1rem;
}

.vtx-strip-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.vtx-strip-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--hex-fg-4);
}

.vtx-strip-val-phone {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--hex-lime-1);
}

.vtx-strip-val-email {
    font-family: var(--font-mono);
    font-size: 0.74rem;
    color: var(--hex-fg-2);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Technical Licensing & Engine Contract Module */
.card-engine-contract {
    background: #171615;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
}

.contract-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--hex-fg-4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.contract-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.78rem;
    gap: 12px;
    min-height: 26px;
}

.contract-label {
    color: var(--hex-fg-4);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.contract-val-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    overflow: hidden;
}

.vtx-token-pill {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--hex-fg-2);
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-xs);
    padding: 2px 7px;
    letter-spacing: 0.05em;
}

.vtx-url-text {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-dim);
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vtx-badge-active-outlets {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--hex-lime-1);
    background: rgba(183, 255, 84, 0.08);
    border: 1px solid rgba(183, 255, 84, 0.25);
    border-radius: var(--radius-xs);
    padding: 2px 8px;
}

.vtx-dot-green {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--hex-lime-1);
    box-shadow: 0 0 6px var(--hex-lime-1);
    display: inline-block;
}

.copy-btn-mini {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--hex-fg-2);
    border-radius: var(--radius-xs);
    padding: 2px 7px;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    line-height: 1.4;
}

.copy-btn-mini:hover {
    background: rgba(183, 255, 84, 0.15);
    border-color: var(--hex-lime-1);
    color: var(--hex-lime-1);
}

.copy-btn-mini.copied {
    background: rgba(183, 255, 84, 0.3);
    border-color: var(--hex-lime-1);
    color: var(--hex-lime-1);
}

/* Real-Time Live Telemetry Module */
.card-health-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    margin-bottom: 1.15rem;
}

.health-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.health-indicator-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.76rem;
    font-family: var(--font-mono);
    font-weight: 600;
}

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

.health-dot-live {
    background: var(--hex-lime-1);
    box-shadow: 0 0 10px var(--hex-lime-1);
}

.health-dot-offline {
    background: #FF5252;
    box-shadow: 0 0 10px #FF5252;
}

.health-dot-pending {
    background: #FFD54F;
    box-shadow: 0 0 10px #FFD54F;
    animation: pulse 1.5s infinite;
}

.btn-ping-live {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--hex-fg-1);
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-ping-live:hover {
    background: rgba(183, 255, 84, 0.15);
    border-color: var(--hex-lime-1);
    color: var(--hex-lime-1);
    transform: translateY(-1px);
}

/* Card Control Actions */
.card-actions-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.vtx-btn-launch {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(183, 255, 84, 0.12);
    border: 1px solid rgba(183, 255, 84, 0.35);
    color: var(--hex-lime-1);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 9px 14px;
    border-radius: var(--radius-xs);
    text-decoration: none;
    transition: all 0.2s ease;
}

.vtx-btn-launch:hover {
    background: var(--hex-lime-1);
    color: #0D0E10;
    border-color: var(--hex-lime-1);
    box-shadow: 0 4px 16px rgba(183, 255, 84, 0.3);
    transform: translateY(-1px);
}

.vtx-btn-manage {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--hex-fg-1);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 14px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.vtx-btn-manage:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--hex-fg-2);
    transform: translateY(-1px);
}

.vtx-btn-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--hex-fg-1);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 9px 13px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.vtx-btn-edit:hover {
    background: rgba(183, 255, 84, 0.09);
    border-color: rgba(183, 255, 84, 0.45);
    color: var(--hex-lime-1);
    transform: translateY(-1px);
}


/* Subscriptions & Pricing */
.price-tag-big {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--hex-yellow-1);
    margin: 0.5rem 0;
}

.price-cycle {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* API Console (Anime.js code aesthetics) */
.api-terminal-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.5rem;
}

@media (max-width: 860px) {
    .api-terminal-layout { grid-template-columns: 1fr; }
}

.api-route-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.api-route-btn {
    text-align: left;
    background: var(--hex-bg-3);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.65rem 0.95rem;
    border-radius: var(--radius-xs);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.api-route-btn:hover {
    border-color: var(--border-strong);
    color: var(--text-primary);
}

.api-route-btn.active {
    background: var(--hex-bg-4);
    border-color: var(--hex-cyan-1);
    color: var(--hex-cyan-1);
    font-weight: 600;
}

.api-screen-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.api-screen-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #181716;
    border: 1px solid var(--border-subtle);
    padding: 0.6rem 1rem;
    border-radius: var(--radius-xs);
}

.http-tag {
    background: var(--hex-lime-1);
    color: #111;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 800;
    padding: 0.15rem 0.45rem;
    border-radius: var(--radius-xs);
}

.endpoint-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-primary);
    flex: 1;
}

.terminal-code-view {
    background: #141312;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xs);
    padding: 1.25rem;
    color: var(--hex-cyan-1);
    font-family: var(--font-mono);
    font-size: 0.82rem;
    min-height: 280px;
    max-height: 480px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-break: break-all;
    line-height: 1.6;
}

/* Spec & Architectural Principles */
.spec-bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.spec-bento-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
}

.spec-bento-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--hex-fg-5);
    transition: background 0.2s ease;
}

.spec-bento-item:hover::before {
    background: var(--hex-red-1);
}

.spec-num {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--hex-fg-5);
    font-weight: 700;
    margin-bottom: 0.5rem;
    display: block;
}

.spec-bento-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.65rem;
}

.spec-bento-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Footer (Anime.js Minimalist Line) */
.anime-footer {
    border-top: 1px solid var(--border-subtle);
    background: var(--hex-bg-2);
    padding: 2rem 1.75rem;
    font-size: 0.82rem;
    color: var(--text-dim);
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.footer-meta strong {
    color: var(--hex-fg-2);
}

/* Operational Hero Buttons */
.btn-tactile.accent-hero {
    background: #e5c158;
    color: #121212;
    box-shadow: 0 4px 16px rgba(229, 193, 88, 0.25);
    font-weight: 800;
}

.btn-tactile.accent-hero:hover {
    background: #f0cf6d;
    transform: translateY(-1px);
}

.btn-tactile-ghost {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-subtle);
    padding: 0.55rem 1.15rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-tactile-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
    background: var(--hex-bg-3);
}

/* Entitlements Matrix Box */
.entitlements-matrix-box {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    margin: 2.5rem 0;
}

.matrix-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.matrix-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

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

.entitlements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
}

.entitlement-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--hex-bg-3);
    border: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.entitlement-pill:hover {
    border-color: var(--border-strong);
    background: var(--hex-bg-4);
}

.ent-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--hex-lime-1);
    box-shadow: 0 0 8px var(--hex-lime-1);
    flex-shrink: 0;
}

.ent-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.ent-key {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-primary);
}

.ent-val {
    font-size: 0.72rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.ent-val strong {
    color: var(--hex-lime-1);
}

.action-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
    background: rgba(183, 255, 84, 0.1);
    color: var(--hex-lime-1);
    border: 1px solid rgba(183, 255, 84, 0.25);
}

/* Modal Drawer for Provisioning Engines & Platform Admin */
.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 500;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    padding: 1rem;
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
}

/* On tight screen heights, align to top so top of modal is never clipped off-screen */
@media (max-height: 750px) {
    .modal-backdrop {
        align-items: flex-start;
    }
}

.modal-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--hex-bg-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-md);
    width: 100%;
    max-width: 580px;
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.75);
    overflow: hidden;
    transform: scale(0.96);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    margin: auto;
    position: relative;
}

.modal-backdrop.is-open .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.1rem 1.35rem;
    background: var(--hex-bg-3);
    border-bottom: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

.modal-super {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--hex-red-1);
    font-weight: 700;
    letter-spacing: 0.08em;
}

.modal-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 0.2rem;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: color 0.15s;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 1.15rem 1.35rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    flex: 1 1 auto;
    min-height: 0; /* Critical for flex child shrink */
}

/* Custom sleek scrollbar for modal body */
.modal-body::-webkit-scrollbar {
    width: 6px;
}
.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15);
}
.modal-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.form-row {
    display: flex;
    gap: 14px;
    width: 100%;
    align-items: flex-start;
}

@media (max-width: 640px) {
    .form-row {
        flex-direction: column;
        gap: 12px;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    width: 100%;
}

.form-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--hex-fg-2);
    letter-spacing: 0.02em;
    margin-bottom: 0.15rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.form-input,
.form-select,
.form-textarea,
select.form-input,
input.form-input,
textarea.form-input,
.modal-body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.modal-body select,
.modal-body textarea {
    width: 100%;
    box-sizing: border-box;
    background-color: #1c1b1a;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    padding: 0.72rem 0.95rem;
    color: #ffffff;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 500;
    line-height: 1.45;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.45);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    color-scheme: dark;
}

.form-input:hover,
.form-select:hover,
.form-textarea:hover,
.modal-body input:hover:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not(:disabled),
.modal-body select:hover:not(:disabled),
.modal-body textarea:hover:not(:disabled) {
    border-color: rgba(255, 255, 255, 0.28);
    background-color: #222120;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
.modal-body input:focus:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: var(--hex-lime-1);
    box-shadow: 0 0 0 3px rgba(183, 255, 84, 0.2), inset 0 1px 2px rgba(0, 0, 0, 0.4);
    background-color: #181716;
}

/* Custom styled dropdown select with neon lime chevron */
.form-select,
select.form-input,
.modal-body select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23b7ff54' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.95rem center;
    background-size: 14px 14px;
    padding-right: 2.75rem;
    cursor: pointer;
}

.form-select option,
select.form-input option,
.modal-body select option {
    background-color: #222120;
    color: #f6f4f2;
    padding: 10px 14px;
    font-size: 0.88rem;
}

.form-select optgroup,
select.form-input optgroup,
.modal-body select optgroup {
    background-color: #1a1918;
    color: var(--hex-cyan-1);
    font-weight: 700;
}

.form-input::placeholder,
.form-textarea::placeholder,
.modal-body input::placeholder,
.modal-body textarea::placeholder {
    color: var(--hex-fg-5);
    opacity: 0.7;
}

.form-input:disabled,
.form-select:disabled,
.modal-body input:disabled,
.modal-body select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: none;
}

.form-textarea,
textarea.form-input,
.modal-body textarea {
    min-height: 72px;
    resize: vertical;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.85rem 1.35rem;
    background: var(--hex-bg-3);
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
}

/* Support for modals where form is .modal-body */
form.modal-body > .modal-footer {
    margin: auto -1.35rem 0 -1.35rem;
    position: sticky;
    bottom: 0;
    z-index: 10;
}

/* ==========================================================================
   Varnetix Responsive Mobile Layout & Top Navigation
   ========================================================================== */

@media (max-width: 768px) {
    .main-layout {
        padding: 1rem 0.85rem calc(2rem + env(safe-area-inset-bottom, 0px));
        max-width: 100vw;
        overflow-x: hidden;
    }

    /* Compact Mobile Sticky Header */
    .anime-header {
        position: sticky;
        top: 0;
        z-index: 200;
        background: #FFFFFF;
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-bottom: 1px solid #E2E8F0;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    }

    .header-container {
        padding: 0.55rem 0.85rem;
        gap: 0.5rem;
        justify-content: space-between;
    }

    .brand-logo-img {
        height: 28px;
        width: auto;
    }

    .version-badge-wrap {
        display: none;
    }

    .nav-actions {
        gap: 0.4rem;
    }

    .telemetry-pill {
        padding: 0.25rem 0.55rem;
        font-size: 0.72rem;
    }

    .telemetry-pill .pill-label {
        display: none;
    }

    .header-link-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.74rem;
    }

    /* Bento Stats Grid - 2x2 on Mobile */
    .bento-stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.65rem;
        margin-bottom: 1.5rem;
    }

    .bento-stat {
        padding: 0.85rem;
        border-radius: var(--radius-sm);
    }

    .stat-header {
        margin-bottom: 0.25rem;
    }

    .stat-tag {
        font-size: 0.62rem;
    }

    .stat-big-val {
        font-size: 1.55rem;
        margin: 0.2rem 0 0.15rem;
    }

    .stat-desc {
        font-size: 0.7rem;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    /* Top Control Tabs Bar on Mobile */
    .control-tabs-bar {
        display: flex;
        justify-content: flex-start;
        gap: 0.25rem;
        background: var(--hex-bg-2);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-sm);
        padding: 0.25rem;
        margin-bottom: 1.25rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
    }

    .control-tabs-bar::-webkit-scrollbar {
        display: none;
    }

    .control-tab-btn {
        padding: 0.55rem 0.95rem;
        font-size: 0.8rem;
        flex-shrink: 0;
    }

    /* Pane Meta Headers & Action Buttons */
    .pane-meta-header {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
        margin-bottom: 1.25rem;
        padding-bottom: 0.85rem;
    }

    .pane-heading {
        font-size: 1.35rem;
    }

    .pane-sub {
        font-size: 0.82rem;
    }

    .pane-meta-header .btn-tactile,
    .pane-meta-header .btn-tactile-secondary {
        width: 100%;
        justify-content: center;
        min-height: 44px;
        font-size: 0.88rem;
    }

    /* Bento Modules Grid */
    .bento-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Data Tables Container */
    .anime-table-box {
        border-radius: var(--radius-sm);
        margin-bottom: 1.5rem;
        -webkit-overflow-scrolling: touch;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    }

    .anime-table {
        min-width: 600px;
    }

    .anime-table th,
    .anime-table td {
        padding: 0.75rem 0.85rem;
        font-size: 0.8rem;
    }

    .table-action-btn {
        padding: 0.45rem 0.75rem;
        min-height: 38px;
        font-size: 0.8rem;
    }

    /* Native Slide-Up Bottom Sheets for Modals */
    .modal-backdrop {
        align-items: flex-end !important;
        justify-content: center !important;
        padding: 0 !important;
    }

    .modal-card {
        border-radius: 24px 24px 0 0 !important;
        max-height: 90dvh !important;
        max-width: 100% !important;
        width: 100% !important;
        border-left: none !important;
        border-right: none !important;
        border-bottom: none !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        transform: translateY(100%) !important;
        transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
        box-shadow: 0 -10px 45px rgba(0, 0, 0, 0.8) !important;
    }

    /* Native Pull-Down Drag Indicator */
    .modal-card::before {
        content: '';
        display: block;
        width: 44px;
        height: 5px;
        border-radius: 3px;
        background: rgba(255, 255, 255, 0.22);
        margin: 10px auto 4px auto;
    }

    .modal-backdrop.active .modal-card {
        transform: translateY(0) !important;
    }

    .modal-header {
        padding: 0.85rem 1.25rem 0.75rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }

    .modal-body {
        padding: 1.25rem;
        gap: 1rem;
    }

    .modal-footer {
        padding: 0.75rem 1.25rem calc(1.25rem + env(safe-area-inset-bottom, 12px));
        flex-direction: column-reverse;
        gap: 0.65rem;
    }

    .modal-footer button {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        font-size: 0.9rem;
    }

    /* Prevent iOS Safari 16px Auto-Zoom */
    input, select, textarea, .form-input, .login-input {
        font-size: 16px !important;
    }

    /* Footer Mobile Adjustments */
    .anime-footer {
        padding: 2rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
        text-align: center;
    }

    .footer-content {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-meta {
        text-align: center;
    }
}

/* ==========================================================================
   In-Portal Notification Window & Toast System
   ========================================================================== */
.portal-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 440px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

@media (max-width: 640px) {
    .portal-toast-container {
        top: 14px;
        right: 14px;
        left: 14px;
        width: auto;
        max-width: none;
    }
}

.portal-toast {
    pointer-events: auto;
    background: rgba(30, 29, 28, 0.94);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 1px rgba(255, 255, 255, 0.15);
    padding: 14px 18px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    animation: toastEntrance 0.32s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.portal-toast.is-leaving {
    animation: toastExit 0.25s ease forwards;
}

@keyframes toastEntrance {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.95);
    }
}

.portal-toast-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
    font-weight: 700;
}

.portal-toast-body {
    flex: 1;
    min-width: 0;
}

.portal-toast-title {
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 3px;
    font-family: var(--font-mono);
}

.portal-toast-msg {
    font-size: 0.88rem;
    color: var(--hex-fg-2);
    line-height: 1.45;
    word-break: break-word;
}

.portal-toast-close {
    background: transparent;
    border: none;
    color: var(--hex-fg-4);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 2px 4px;
    margin-top: -2px;
    margin-right: -4px;
    transition: color 0.15s ease;
}

.portal-toast-close:hover {
    color: #FFFFFF;
}

.portal-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform-origin: left;
    background: rgba(255, 255, 255, 0.08);
}

.portal-toast-progress-bar {
    height: 100%;
    width: 100%;
}

/* Toast Color Variants */
.portal-toast-success {
    border-left: 4px solid var(--hex-lime-1);
}
.portal-toast-success .portal-toast-icon {
    background: rgba(183, 255, 84, 0.15);
    color: var(--hex-lime-1);
    box-shadow: 0 0 10px rgba(183, 255, 84, 0.3);
}
.portal-toast-success .portal-toast-title {
    color: var(--hex-lime-1);
}
.portal-toast-success .portal-toast-progress-bar {
    background: var(--hex-lime-1);
}

.portal-toast-error {
    border-left: 4px solid var(--hex-red-1);
}
.portal-toast-error .portal-toast-icon {
    background: rgba(255, 75, 75, 0.15);
    color: var(--hex-red-1);
    box-shadow: 0 0 10px rgba(255, 75, 75, 0.3);
}
.portal-toast-error .portal-toast-title {
    color: var(--hex-red-1);
}
.portal-toast-error .portal-toast-progress-bar {
    background: var(--hex-red-1);
}

.portal-toast-warning {
    border-left: 4px solid var(--hex-yellow-1);
}
.portal-toast-warning .portal-toast-icon {
    background: rgba(255, 204, 42, 0.15);
    color: var(--hex-yellow-1);
    box-shadow: 0 0 10px rgba(255, 204, 42, 0.3);
}
.portal-toast-warning .portal-toast-title {
    color: var(--hex-yellow-1);
}
.portal-toast-warning .portal-toast-progress-bar {
    background: var(--hex-yellow-1);
}

.portal-toast-info {
    border-left: 4px solid var(--hex-cyan-1);
}
.portal-toast-info .portal-toast-icon {
    background: rgba(38, 242, 213, 0.15);
    color: var(--hex-cyan-1);
    box-shadow: 0 0 10px rgba(38, 242, 213, 0.3);
}
.portal-toast-info .portal-toast-title {
    color: var(--hex-cyan-1);
}
.portal-toast-info .portal-toast-progress-bar {
    background: var(--hex-cyan-1);
}

/* ==========================================================================
   Varnetix Platform - Duration-Based Entitlement Tiers & Per-Branch Tagging
   ========================================================================== */
.tier-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.tier-card {
    background: linear-gradient(180deg, #252423 0%, #1c1b1a 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.6);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tier-card:hover {
    transform: translateY(-3px);
    border-color: rgba(183, 255, 84, 0.4);
    box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.75), 0 0 20px rgba(183, 255, 84, 0.08);
}

.tier-card.tier-retired {
    opacity: 0.75;
    border-color: rgba(255, 255, 255, 0.05);
    background: linear-gradient(180deg, #1e1e1e 0%, #161616 100%);
}

.tier-card.tier-retired:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.6);
}

.duration-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--hex-lime-1);
    background: rgba(183, 255, 84, 0.1);
    border: 1px solid rgba(183, 255, 84, 0.25);
    padding: 0.25rem 0.65rem;
    border-radius: var(--radius-xs);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.duration-badge.retired {
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.tier-price-row {
    display: flex;
    align-items: baseline;
    gap: 0.4rem;
    margin: 1rem 0 0.5rem;
}

.tier-price-currency {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--hex-lime-1);
}

.tier-price-val {
    font-size: 2.25rem;
    font-weight: 800;
    color: #FFFFFF;
    line-height: 1;
    letter-spacing: -0.02em;
}

.tier-price-period {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tier-tagged-metric {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-xs);
    padding: 0.65rem 0.85rem;
    margin: 1rem 0;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.tier-tagged-count {
    font-family: var(--font-mono);
    font-weight: 700;
    color: var(--hex-cyan-1);
}

.tier-features-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1rem;
}

.tier-feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tier-feature-item .check-icon {
    color: var(--hex-lime-1);
    font-weight: 800;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tier-card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.zero-limits-guarantee-box {
    background: linear-gradient(135deg, rgba(38, 242, 213, 0.06) 0%, rgba(183, 255, 84, 0.04) 100%);
    border: 1px solid rgba(38, 242, 213, 0.25);
    border-radius: var(--radius-md);
    padding: 1.5rem 1.75rem;
    margin-top: 2.5rem;
    position: relative;
    overflow: hidden;
}

.zero-limits-guarantee-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--hex-cyan-1), var(--hex-lime-1));
}

.zero-limits-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.zero-limits-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

.branch-tier-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 600;
    background: rgba(183, 255, 84, 0.1);
    border: 1px solid rgba(183, 255, 84, 0.25);
    color: var(--hex-lime-1);
}

.branch-tier-tag-pill.unassigned {
    background: rgba(255, 82, 82, 0.1);
    border-color: rgba(255, 82, 82, 0.25);
    color: #FF8A80;
}


