/* ==========================================================================
   A.T.C. Africa Trade Center — 3D Container & Truck Load Calculator
   Mobile-First, Zero-Overflow Responsive Design System (Dark/Light + Print)
   ========================================================================== */

:root {
    --lc-bg-1: #0a0e27;
    --lc-bg-2: #141a38;
    --lc-bg-3: #070b1e;
    --lc-card-bg: rgba(16, 23, 50, 0.82);
    --lc-card-border: rgba(148, 163, 184, 0.15);
    --lc-card-shadow: 0 16px 40px rgba(2, 6, 23, 0.42);
    --lc-inset-bg: rgba(8, 12, 30, 0.68);
    --lc-row-bg: rgba(12, 18, 42, 0.76);
    --lc-row-hover: rgba(20, 29, 64, 0.88);
    --lc-field-bg: rgba(6, 10, 25, 0.86);
    --lc-field-border: rgba(148, 163, 184, 0.24);
    --lc-field-focus: #38bdf8;
    --lc-ink: #f8fafc;
    --lc-ink-2: #cbd5e1;
    --lc-ink-3: #94a3b8;
    --lc-ink-4: #64748b;
    --lc-accent: #ff6b35;
    --lc-accent-hover: #ff8255;
    --lc-cyan: #38bdf8;
    --lc-emerald: #10b981;
    --lc-amber: #f59e0b;
    --lc-rose: #f43f5e;
    --lc-art-top: rgba(56, 189, 248, 0.18);
    --lc-art-side: rgba(30, 58, 138, 0.36);
    --lc-art-end: rgba(56, 189, 248, 0.28);
    --lc-art-line: #7dd3fc;
    --lc-canvas-bg: #080d21;
    --lc-canvas-h: 350px;
}

@media (min-width: 768px) {
    :root {
        --lc-canvas-h: 470px;
    }
}

[data-theme="light"] {
    --lc-bg-1: #f1f5f9;
    --lc-bg-2: #e2e8f0;
    --lc-bg-3: #f8fafc;
    --lc-card-bg: rgba(255, 255, 255, 0.96);
    --lc-card-border: rgba(15, 23, 42, 0.11);
    --lc-card-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    --lc-inset-bg: #f8fafc;
    --lc-row-bg: #f8fafc;
    --lc-row-hover: #f1f5f9;
    --lc-field-bg: #ffffff;
    --lc-field-border: #cbd5e1;
    --lc-field-focus: #0284c7;
    --lc-ink: #0f172a;
    --lc-ink-2: #334155;
    --lc-ink-3: #475569;
    --lc-ink-4: #64748b;
    --lc-accent: #ea580c;
    --lc-accent-hover: #d9460f;
    --lc-cyan: #0284c7;
    --lc-emerald: #059669;
    --lc-amber: #b45309;
    --lc-rose: #e11d48;
    --lc-art-top: rgba(2, 132, 199, 0.15);
    --lc-art-side: rgba(2, 132, 199, 0.08);
    --lc-art-end: rgba(2, 132, 199, 0.22);
    --lc-art-line: #0369a1;
    --lc-canvas-bg: #e2e8f0;
}

*, *::before, *::after {
    box-sizing: border-box;
    min-width: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    scroll-behavior: smooth;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background: linear-gradient(135deg, var(--lc-bg-1) 0%, var(--lc-bg-2) 50%, var(--lc-bg-3) 100%);
    color: var(--lc-ink);
    min-height: 100vh;
    transition: background 0.25s ease, color 0.25s ease;
}

/* 1. Top Announcement Banner (Mobile-First) */
.lc-top-banner {
    background: rgba(5, 9, 24, 0.9);
    border-bottom: 1px solid var(--lc-card-border);
    padding: 0.4rem 0.85rem;
    font-size: 0.74rem;
    width: 100%;
}

[data-theme="light"] .lc-top-banner {
    background: #0f172a;
    color: #f8fafc;
}

.lc-top-banner-inner {
    max-width: 1340px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.lc-banner-left {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    flex: 1;
}

.lc-banner-badge {
    background: rgba(255, 107, 53, 0.2);
    color: #ff8559;
    border: 1px solid rgba(255, 107, 53, 0.4);
    padding: 0.12rem 0.5rem;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.lc-banner-text {
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: none;
}

@media (min-width: 768px) {
    .lc-banner-text {
        display: inline;
    }
}

.lc-banner-contacts {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    font-size: 0.73rem;
}

.lc-banner-contacts a {
    color: #cbd5e1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 600;
    white-space: nowrap;
}

.lc-banner-contacts a:hover {
    color: #ffffff;
}

/* 2. Sticky Header (Mobile-First) */
.lc-header {
    position: sticky;
    top: 0;
    z-index: 80;
    background: rgba(10, 14, 39, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--lc-card-border);
    box-shadow: 0 4px 20px rgba(2, 6, 23, 0.25);
    width: 100%;
}

[data-theme="light"] .lc-header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
}

.lc-header-inner {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0.55rem 0.85rem;
    min-height: 60px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
}

@media (min-width: 768px) {
    .lc-header-inner {
        padding: 0.55rem 1.25rem;
        min-height: 68px;
        flex-wrap: nowrap;
    }
}

.lc-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    color: var(--lc-ink);
    min-width: 0;
}

.lc-brand img {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .lc-brand img {
        width: 42px;
        height: 42px;
    }
}

.lc-brand-title {
    font-weight: 800;
    font-size: 0.88rem;
    letter-spacing: -0.01em;
    display: block;
    line-height: 1.15;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .lc-brand-title {
        font-size: 1rem;
    }
}

.lc-brand-sub {
    font-size: 0.66rem;
    color: var(--lc-ink-3);
    display: none;
}

@media (min-width: 480px) {
    .lc-brand-sub {
        display: block;
    }
}

.lc-nav {
    display: none;
    align-items: center;
    gap: 1.15rem;
}

@media (min-width: 1024px) {
    .lc-nav {
        display: flex;
    }
}

.lc-nav-link {
    color: var(--lc-ink-2);
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    transition: color 0.15s;
    white-space: nowrap;
}

.lc-nav-link:hover {
    color: var(--lc-accent);
}

.lc-header-actions {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.lc-hide-mobile {
    display: none !important;
}

@media (min-width: 640px) {
    .lc-hide-mobile {
        display: inline-flex !important;
    }
}

/* 3. Main Container & Hero (Mobile-First) */
.lc-container {
    width: 100%;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 0.75rem;
}

@media (min-width: 640px) {
    .lc-container {
        padding: 0 1.25rem;
    }
}

.lc-hero {
    padding: 1.25rem 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

@media (min-width: 768px) {
    .lc-hero {
        padding: 2rem 0 1.25rem;
    }
}

.lc-eyebrow {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lc-cyan);
    margin: 0;
}

.lc-h1 {
    font-size: clamp(1.4rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 0.3rem 0 0.5rem;
    line-height: 1.18;
    color: var(--lc-ink);
}

.lc-subtitle {
    color: var(--lc-ink-2);
    font-size: 0.88rem;
    line-height: 1.55;
    max-width: 680px;
    margin: 0;
}

@media (min-width: 640px) {
    .lc-subtitle {
        font-size: 0.96rem;
    }
}

.lc-hero-btns {
    margin-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 4. Cards & Panels (Mobile-First) */
.lc-card {
    background: var(--lc-card-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 14px;
    box-shadow: var(--lc-card-shadow);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0.9rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

@media (min-width: 640px) {
    .lc-card {
        border-radius: 16px;
        padding: 1.25rem;
    }
}

.lc-inset {
    background: var(--lc-inset-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 11px;
    padding: 0.75rem;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 640px) {
    .lc-inset {
        padding: 0.9rem 1.1rem;
    }
}

/* 5. Segmented Controls */
.lc-seg {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    background: var(--lc-inset-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 8px;
    padding: 2px;
    gap: 2px;
    max-width: 100%;
}

.lc-seg button {
    background: transparent;
    border: none;
    color: var(--lc-ink-3);
    font-size: 0.71rem;
    font-weight: 600;
    padding: 0.3rem 0.52rem;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
}

@media (min-width: 640px) {
    .lc-seg button {
        font-size: 0.74rem;
        padding: 0.34rem 0.62rem;
    }
}

.lc-seg button:hover {
    color: var(--lc-ink);
}

.lc-seg button[aria-pressed="true"],
.lc-seg button.active {
    background: var(--lc-accent);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.35);
}

/* 6. Equipment Preset Grid (Mobile-First: 2 cols -> 3 cols -> 6 cols) */
.lc-equip-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 640px) {
    .lc-equip-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

@media (min-width: 1180px) {
    .lc-equip-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.lc-equip {
    position: relative;
    background: var(--lc-row-bg);
    border: 1.5px solid var(--lc-card-border);
    border-radius: 11px;
    padding: 0.5rem 0.6rem 0.65rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.18s ease;
    color: var(--lc-ink);
    font-family: inherit;
    width: 100%;
    overflow: hidden;
}

.lc-equip:hover {
    border-color: var(--lc-cyan);
    background: var(--lc-row-hover);
}

.lc-equip[aria-pressed="true"] {
    border-color: var(--lc-accent);
    background: rgba(255, 107, 53, 0.1);
    box-shadow: 0 0 0 1px var(--lc-accent);
}

.lc-equip-check {
    position: absolute;
    top: 0.4rem;
    right: 0.4rem;
    width: 17px;
    height: 17px;
    border-radius: 999px;
    background: var(--lc-accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.15s ease;
}

.lc-equip[aria-pressed="true"] .lc-equip-check {
    opacity: 1;
    transform: scale(1);
}

.lc-equip svg.lc-equip-art {
    width: 100%;
    height: 44px;
    display: block;
}

@media (min-width: 640px) {
    .lc-equip svg.lc-equip-art {
        height: 52px;
    }
}

.lc-equip-title {
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-equip-dims {
    display: block;
    font-size: 0.68rem;
    color: var(--lc-ink-3);
    margin-top: 0.12rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-equip-cap {
    display: block;
    font-size: 0.68rem;
    color: var(--lc-cyan);
    font-weight: 600;
    margin-top: 0.08rem;
    font-variant-numeric: tabular-nums;
}

/* 7. Inner Dimensions Bar (Mobile-First) */
.lc-dims-bar {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 860px) {
    .lc-dims-bar {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.lc-dims-inputs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
}

@media (min-width: 560px) {
    .lc-dims-inputs {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: 580px;
    }
}

.lc-label {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--lc-ink-3);
    margin-bottom: 0.22rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-field-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.lc-field {
    width: 100%;
    max-width: 100%;
    background: var(--lc-field-bg);
    border: 1px solid var(--lc-field-border);
    border-radius: 8px;
    color: var(--lc-ink);
    font-size: 0.81rem;
    font-family: inherit;
    font-variant-numeric: tabular-nums;
    padding: 0.42rem 0.55rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.lc-field.has-suffix {
    padding-right: 1.95rem;
}

.lc-field:focus {
    outline: none;
    border-color: var(--lc-field-focus);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.lc-suffix {
    position: absolute;
    right: 0.45rem;
    font-size: 0.67rem;
    color: var(--lc-ink-4);
    pointer-events: none;
    font-weight: 600;
}

/* 8. Main Workspace (Mobile-First: 1 col -> Desktop 1080px+: 2 cols) */
.lc-workspace {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
    width: 100%;
}

@media (min-width: 1080px) {
    .lc-workspace {
        grid-template-columns: minmax(0, 41fr) minmax(0, 59fr);
        gap: 1.25rem;
    }
}

/* 9. Cargo Rows (Mobile-First) */
.lc-cargo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.lc-row {
    background: var(--lc-row-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 11px;
    padding: 0.65rem;
    width: 100%;
    transition: border-color 0.15s, background 0.15s;
}

.lc-row[data-active="true"] {
    border-color: var(--lc-cyan);
    box-shadow: 0 0 0 1px var(--lc-cyan);
}

.lc-row-top {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) minmax(78px, 96px) auto;
    align-items: end;
    gap: 0.4rem;
    width: 100%;
}

@media (max-width: 440px) {
    .lc-row-top {
        grid-template-columns: 28px minmax(0, 1fr) auto;
    }
    .lc-row-top > label:nth-child(3) {
        grid-column: 1 / -1;
        width: 100% !important;
    }
}

.lc-color-swatch {
    width: 28px;
    height: 32px;
    border-radius: 7px;
    border: 2px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    padding: 0;
}

.lc-color-swatch input[type="color"] {
    position: absolute;
    inset: -4px;
    width: 40px;
    height: 40px;
    opacity: 0;
    cursor: pointer;
}

.lc-row-dims {
    margin-top: 0.5rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem;
    width: 100%;
}

.lc-row-dims > label:last-child {
    grid-column: span 2;
}

@media (min-width: 480px) {
    .lc-row-dims {
        grid-template-columns: 0.8fr 1fr 1fr 1fr 1.15fr;
    }
    .lc-row-dims > label:last-child {
        grid-column: auto;
    }
}

.lc-row-bottom {
    margin-top: 0.55rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    width: 100%;
}

.lc-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.lc-chip {
    background: var(--lc-field-bg);
    border: 1px solid var(--lc-field-border);
    color: var(--lc-ink-3);
    border-radius: 10px;
    padding: 0.25rem 0.55rem;
    font-size: 0.7rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-family: inherit;
    transition: all 0.15s;
    max-width: 100%;
    white-space: normal;
    text-align: left;
    line-height: 1.3;
}

.lc-chip svg.lc-tick {
    flex-shrink: 0;
}

.lc-chip:hover {
    border-color: var(--lc-ink-3);
    color: var(--lc-ink);
}

.lc-chip[aria-checked="true"] {
    background: rgba(56, 189, 248, 0.16);
    border-color: var(--lc-cyan);
    color: var(--lc-ink);
}

.lc-chip[aria-checked="true"] .lc-tick {
    color: var(--lc-cyan);
}

.lc-chip[aria-checked="false"] .lc-tick {
    opacity: 0.25;
}

/* 10. Buttons */
.lc-btn {
    border-radius: 9px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.52rem 0.85rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: inherit;
    transition: all 0.16s ease;
    text-decoration: none;
    border: 1px solid transparent;
    max-width: 100%;
}

.lc-btn-primary {
    background: linear-gradient(135deg, #ff6b35 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(255, 107, 53, 0.3);
}

.lc-btn-primary:hover {
    background: linear-gradient(135deg, #ff8255 0%, #fb923c 100%);
}

.lc-btn-cyan {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4);
    color: var(--lc-cyan);
}

.lc-btn-cyan:hover {
    background: rgba(56, 189, 248, 0.25);
}

.lc-btn-emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #ffffff;
}

.lc-btn-ghost {
    background: var(--lc-inset-bg);
    border-color: var(--lc-field-border);
    color: var(--lc-ink-2);
}

.lc-btn-ghost:hover {
    border-color: var(--lc-ink-3);
    color: var(--lc-ink);
}

.lc-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 7px;
    border: 1px solid var(--lc-field-border);
    background: var(--lc-field-bg);
    color: var(--lc-ink-3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s;
}

.lc-icon-btn:hover:not(:disabled) {
    color: var(--lc-ink);
    border-color: var(--lc-ink-3);
}

.lc-icon-btn--danger:hover:not(:disabled) {
    color: var(--lc-rose);
    border-color: var(--lc-rose);
    background: rgba(244, 63, 94, 0.1);
}

.lc-icon-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

/* 11. Right Stage & KPIs (Mobile-First) */
.lc-stage {
    position: static;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1080px) {
    .lc-stage {
        position: sticky;
        top: 80px;
    }
}

.lc-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    width: 100%;
}

@media (min-width: 640px) {
    .lc-kpi-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 0.65rem;
    }
}

.lc-kpi-card {
    background: var(--lc-inset-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 10px;
    padding: 0.55rem 0.65rem;
    overflow: hidden;
}

.lc-kpi-label {
    font-size: 0.66rem;
    color: var(--lc-ink-3);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-kpi-val {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--lc-ink);
    margin-top: 0.12rem;
    font-variant-numeric: tabular-nums;
}

@media (min-width: 640px) {
    .lc-kpi-val {
        font-size: 1.2rem;
    }
}

.lc-kpi-sub {
    font-size: 0.68rem;
    color: var(--lc-ink-3);
    margin-top: 0.08rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.lc-progress {
    margin-top: 0.35rem;
    height: 5px;
    background: rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    overflow: hidden;
}

.lc-progress-bar {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--lc-cyan), var(--lc-emerald));
    transition: width 0.35s ease;
}

/* 12. 3D Viewer Canvas Wrapper (Zero Horizontal Overflow) */
.lc-canvas-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    height: var(--lc-canvas-h);
    background: var(--lc-canvas-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 12px;
    overflow: hidden;
}

#lcCanvas3D {
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    display: block;
    cursor: grab;
    touch-action: none;
}

#lcCanvas3D:active {
    cursor: grabbing;
}

.lc-canvas-hud-top {
    position: absolute;
    top: 0.45rem;
    left: 0.45rem;
    right: 0.45rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    pointer-events: none;
    z-index: 10;
}

.lc-canvas-hud-top > * {
    pointer-events: auto;
}

.lc-canvas-hud-top .lc-seg {
    background: rgba(10, 14, 39, 0.86);
    border-color: rgba(255, 255, 255, 0.14);
}

[data-theme="light"] .lc-canvas-hud-top .lc-seg {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.15);
}

.lc-canvas-hud-bottom {
    position: absolute;
    bottom: 0.45rem;
    left: 0.45rem;
    right: 0.45rem;
    display: flex;
    align-items: center;
    pointer-events: none;
    z-index: 10;
}

.lc-canvas-hud-bottom > * {
    pointer-events: auto;
}

.lc-hud-pill {
    background: rgba(10, 14, 39, 0.86);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 9px;
    padding: 0.3rem 0.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    color: #f8fafc;
    font-size: 0.72rem;
    width: 100%;
    max-width: 100%;
}

[data-theme="light"] .lc-hud-pill {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(15, 23, 42, 0.15);
    color: #0f172a;
}

#seqSlider {
    flex: 1 1 70px;
    min-width: 50px;
    max-width: 100%;
    accent-color: var(--lc-accent);
    cursor: pointer;
}

/* 3D Hover Tooltip */
.lc-tooltip-3d {
    position: absolute;
    pointer-events: none;
    background: rgba(10, 14, 39, 0.94);
    border: 1px solid rgba(56, 189, 248, 0.45);
    color: #f8fafc;
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    font-size: 0.72rem;
    line-height: 1.35;
    z-index: 30;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    display: none;
    max-width: 220px;
}

/* Container Switcher Tabs */
.lc-cont-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 0.65rem;
}

.lc-cont-tab {
    background: var(--lc-inset-bg);
    border: 1px solid var(--lc-card-border);
    color: var(--lc-ink-2);
    padding: 0.35rem 0.65rem;
    border-radius: 8px;
    font-size: 0.73rem;
    font-weight: 600;
    cursor: pointer;
}

.lc-cont-tab.active {
    background: rgba(56, 189, 248, 0.16);
    border-color: var(--lc-cyan);
    color: var(--lc-ink);
}

/* 13. Details Section & Tables (Mobile-First, Contained Scroll) */
.lc-details-grid {
    margin-top: 1.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .lc-details-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

.lc-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid var(--lc-card-border);
    border-radius: 10px;
}

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

.lc-table th {
    background: var(--lc-inset-bg);
    color: var(--lc-ink-3);
    font-weight: 600;
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--lc-card-border);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.lc-table td {
    padding: 0.48rem 0.6rem;
    border-bottom: 1px solid var(--lc-card-border);
    color: var(--lc-ink-2);
    font-variant-numeric: tabular-nums;
}

.lc-table tr:last-child td {
    border-bottom: none;
}

/* 14. Weight Balance Bars & CTU Assessment */
.lc-balance-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.6rem;
    margin-bottom: 0.85rem;
}

@media (min-width: 640px) {
    .lc-balance-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.lc-check-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .lc-check-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.lc-check-item {
    background: var(--lc-inset-bg);
    border: 1px solid var(--lc-card-border);
    border-radius: 9px;
    padding: 0.5rem 0.65rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    font-size: 0.75rem;
}

.lc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    flex-shrink: 0;
}

.lc-status-ok {
    background: rgba(16, 185, 129, 0.16);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

[data-theme="light"] .lc-status-ok {
    background: rgba(16, 185, 129, 0.14);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.4);
}

.lc-status-warn {
    background: rgba(245, 158, 11, 0.16);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

[data-theme="light"] .lc-status-warn {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
    border-color: rgba(245, 158, 11, 0.45);
}

.lc-status-fail {
    background: rgba(244, 63, 94, 0.16);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.35);
}

[data-theme="light"] .lc-status-fail {
    background: rgba(244, 63, 94, 0.14);
    color: #be123c;
    border-color: rgba(244, 63, 94, 0.4);
}

/* 15. Modals (Cargo Labels, Share Link) */
.lc-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(6px);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
}

.lc-modal-backdrop.open {
    display: flex;
}

.lc-modal {
    background: var(--lc-bg-1);
    border: 1px solid var(--lc-card-border);
    border-radius: 16px;
    max-width: 900px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.lc-modal-header {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--lc-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.lc-modal-body {
    padding: 1rem;
    overflow-y: auto;
}

.lc-shipping-label {
    background: #ffffff;
    color: #0f172a;
    border: 2px solid #0f172a;
    border-radius: 8px;
    padding: 12px;
    width: 100%;
    max-width: 320px;
    font-family: 'Inter', Arial, sans-serif;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* 16. How It Works & FAQ */
.lc-steps-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .lc-steps-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.lc-faq-item {
    border-bottom: 1px solid var(--lc-card-border);
    padding: 0.9rem 0;
}

.lc-faq-item summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--lc-ink);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    list-style: none;
}

.lc-faq-item summary::-webkit-details-marker {
    display: none;
}

.lc-faq-item p {
    margin: 0.55rem 0 0;
    color: var(--lc-ink-2);
    font-size: 0.85rem;
    line-height: 1.55;
}

/* 17. Footer (Always Crisp Corporate Navy in both Dark & Light Themes) */
.lc-footer {
    margin-top: 3rem;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    background: #0b1120;
    padding: 2rem 0;
    font-size: 0.82rem;
    color: #cbd5e1;
}

.lc-footer strong {
    color: #ffffff !important;
}

.lc-footer-divider {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 0.85rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.79rem;
    color: #94a3b8;
}

/* Print Layout */
@media print {
    body {
        background: #ffffff !important;
        color: #0f172a !important;
    }
    .lc-no-print {
        display: none !important;
    }
    .lc-workspace {
        display: block !important;
    }
    .lc-stage {
        position: static !important;
    }
    .lc-card, .lc-inset, .lc-kpi-card, .lc-check-item {
        background: #ffffff !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
    .lc-canvas-wrap {
        height: 360px !important;
        border: 1px solid #94a3b8 !important;
    }
}
