/**
 * LCARS Theme V2 - Enhanced Star Trek LCARS Interface
 * Mobile-first responsive design with modal support
 */

/* ==================== BASE VARIABLES ==================== */
:root {
    /* Primary colors */
    --lcars-orange: #FF9966;
    --lcars-purple: #CC99FF;
    --lcars-blue: #99CCFF;
    --lcars-green: #99FF99;
    --lcars-yellow: #FFCC66;
    --lcars-red: #FF6666;
    --lcars-pink: #FF66B2;

    /* Hover variants */
    --lcars-orange-light: #FFCC99;
    --lcars-purple-light: #DDBBFF;
    --lcars-blue-light: #BBDDFF;
    --lcars-green-light: #BBFFBB;
    --lcars-yellow-light: #FFDD88;

    /* Background colors */
    --lcars-bg: #000000;
    --lcars-bg-darker: #000000;
    --lcars-bg-surface: #0a0a12;
    --lcars-bg-elevated: #12121f;
    --lcars-bg-card: rgba(20, 20, 35, 0.95);
    --lcars-bg-panel: linear-gradient(135deg, rgba(153, 102, 255, 0.15), rgba(102, 153, 255, 0.15));

    /* Legacy variable mappings - for pages using old naming convention */
    --color-bg: #000000;
    --color-bg-secondary: #12121f;
    --color-bg-tertiary: #1a1a2e;
    --color-border: rgba(204, 153, 255, 0.5);
    --color-border-accent: var(--lcars-purple);
    --color-text: #FFFFFF;
    --color-text-secondary: #CCCCCC;
    --color-text-muted: #888888;
    --color-primary: var(--lcars-purple);
    --color-accent: var(--lcars-orange);

    /* Card styling variables */
    --card-bg: rgba(20, 20, 35, 0.95);
    --card-border: 2px solid rgba(204, 153, 255, 0.4);
    --card-border-left: 4px solid var(--lcars-purple);
    --card-radius: 12px;

    /* Base.css compatibility variables */
    --font-primary: 'Antonio', 'Arial Narrow', sans-serif;
    --color-background: #000000;
    --color-link: var(--lcars-blue);
    --color-link-hover: var(--lcars-blue-light);
    --spacing-unit: 8px;
    --sidebar-width: 280px;
    --header-height: 120px;
    --layout-gap: 20px;
    --transition-speed: 0.2s;

    /* Text colors */
    --lcars-text: #FFFFFF;
    --lcars-text-secondary: #CCCCCC;
    --lcars-text-muted: #999999;
    --lcars-text-dark: #000000;

    /* Borders */
    --lcars-border: rgba(204, 153, 255, 0.4);
    --lcars-border-strong: rgba(204, 153, 255, 0.6);

    /* Spacing */
    --lcars-gap: 20px;
    --lcars-sidebar-width: 280px;
    --lcars-header-height: 120px;

    /* Border radius */
    --lcars-radius-sm: 8px;
    --lcars-radius-md: 20px;
    --lcars-radius-lg: 40px;
    --lcars-radius-pill: 9999px;

    /* Transitions */
    --lcars-transition: 0.2s ease;

    /* Z-index layers */
    --z-sidebar: 100;
    --z-header: 50;
    --z-modal-backdrop: 200;
    --z-modal: 210;
    --z-scanline: 999;
}

/* ==================== ANIMATIONS ==================== */
@keyframes lcars-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

@keyframes lcars-pulse {
    0%, 100% { box-shadow: inset 0 0 20px rgba(255, 153, 102, 0.3); }
    50% { box-shadow: inset 0 0 40px rgba(255, 153, 102, 0.5); }
}

@keyframes lcars-scan {
    0% { transform: translateY(-100vh); }
    100% { transform: translateY(100vh); }
}

@keyframes lcars-glow {
    0%, 100% { box-shadow: 0 0 10px currentColor; }
    50% { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

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

@keyframes lcars-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes lcars-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== BASE STYLES ==================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Antonio', 'Arial Narrow', sans-serif;
    background: var(--lcars-bg);
    color: var(--lcars-text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Background gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at top left, rgba(153, 102, 255, 0.1), transparent),
        radial-gradient(ellipse at bottom right, rgba(255, 153, 102, 0.1), transparent);
    pointer-events: none;
    z-index: -1;
}

/* Scan line effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(153, 204, 255, 0.5), transparent);
    animation: lcars-scan 30s linear infinite;
    pointer-events: none;
    z-index: var(--z-scanline);
}

/* ==================== SCROLLBAR ==================== */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(153, 153, 153, 0.2);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--lcars-orange);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--lcars-orange-light);
}

/* ==================== LAYOUT ==================== */
.lcars-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Mobile: Stack layout */
@media (max-width: 1023px) {
    .lcars-container {
        padding-top: 60px; /* Space for mobile header */
    }
}

/* Desktop: Grid layout */
@media (min-width: 1024px) {
    .lcars-container {
        display: grid;
        grid-template-columns: var(--lcars-sidebar-width) 1fr;
        grid-template-rows: var(--lcars-header-height) 1fr;
        grid-template-areas:
            "corner header"
            "sidebar main";
        column-gap: var(--lcars-gap);
        row-gap: 0;
        padding: var(--lcars-gap);
        height: 100vh;
        overflow: visible;
    }
}


/* ==================== HEADER ==================== */
.lcars-header {
    display: none;
}

@media (min-width: 1024px) {
    .lcars-header {
        display: flex;
        grid-area: header;
        align-items: stretch;
        gap: var(--lcars-gap);
        position: relative;
        z-index: 1;
    }
}

.lcars-header-corner {
    display: none;
}

@media (min-width: 1024px) {
    .lcars-header-corner {
        display: flex;
        grid-area: corner;
        background: linear-gradient(135deg, var(--lcars-purple), #AA77DD);
        border-radius: 0 0 40px 0;
        align-items: center;
        justify-content: center;
        font-size: 36px;
        font-weight: 900;
        color: var(--lcars-text-dark);
        border: 3px solid #9966CC;
        border-top: none;
        border-left: none;
        box-shadow:
            inset 0 -3px 0 rgba(229, 204, 255, 0.8),
            inset -3px 0 0 rgba(229, 204, 255, 0.6),
            3px 3px 10px rgba(0, 0, 0, 0.3);
    }
}

.lcars-header-bar {
    flex: 1;
    background: var(--lcars-orange);
    border-radius: var(--lcars-radius-lg);
    display: flex;
    align-items: center;
    padding: 0 40px;
    animation: lcars-pulse 4s infinite;
}

.lcars-header-title {
    font-size: 48px;
    font-weight: 900;
    font-style: italic;
    color: var(--lcars-text-dark);
    letter-spacing: 4px;
    text-transform: uppercase;
}

.lcars-header-status {
    display: flex;
    gap: 10px;
}

.lcars-status-bar {
    flex: 1;
    background: var(--lcars-blue);
    border-radius: var(--lcars-radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.lcars-status-num {
    font-size: 32px;
    font-weight: 900;
    color: var(--lcars-text-dark);
    line-height: 1;
}

.lcars-status-label {
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--lcars-text-dark);
    margin-top: 4px;
}

/* ==================== MOBILE HEADER ==================== */
.lcars-mobile-header {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--lcars-bg);
    border-bottom: 3px solid var(--lcars-purple);
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: var(--z-header);
}

@media (min-width: 1024px) {
    .lcars-mobile-header {
        display: none;
    }
}

.lcars-mobile-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--lcars-orange);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.lcars-menu-toggle {
    width: 44px;
    height: 44px;
    background: var(--lcars-orange);
    border: none;
    border-radius: var(--lcars-radius-sm);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: var(--lcars-transition);
}

.lcars-menu-toggle span {
    width: 24px;
    height: 3px;
    background: var(--lcars-text-dark);
    border-radius: 2px;
    transition: var(--lcars-transition);
}

.lcars-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.lcars-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.lcars-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== SIDEBAR ==================== */
.lcars-sidebar {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    max-width: 320px;
    height: calc(100vh - 60px);
    background: var(--lcars-bg);
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: var(--z-sidebar);
    overflow-y: auto;
    padding: 20px 0;
}

.lcars-sidebar.open {
    transform: translateX(0);
}

@media (min-width: 1024px) {
    .lcars-sidebar {
        position: relative;
        transform: none;
        width: auto;
        max-width: none;
        height: 100%;
        max-height: calc(100vh - var(--lcars-header-height) - var(--lcars-gap) * 3);
        padding: 0;
        padding-bottom: 20px;
        display: flex;
        flex-direction: column;
        gap: 12px;
        z-index: 10;
        grid-area: sidebar;
        overflow: hidden;
        margin-top: -40px;
    }
}

/* Sidebar backdrop */
.lcars-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: calc(var(--z-sidebar) - 1);
}

.lcars-sidebar-backdrop.visible {
    display: block;
}

@media (min-width: 1024px) {
    .lcars-sidebar-backdrop {
        display: none !important;
    }
}

/* ==================== NAV ITEMS ==================== */
.lcars-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
}

@media (min-width: 1024px) {
    .lcars-nav {
        padding: 0;
        gap: 12px;
        overflow: visible;
    }
}

.lcars-nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 28px;
    background: var(--lcars-orange);
    color: var(--lcars-text-dark);
    text-decoration: none;
    font-size: 18px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--lcars-radius-sm);
    border: 3px solid #CC7744;
    transition: var(--lcars-transition);
    cursor: pointer;
    position: relative;
    z-index: 5;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
    .lcars-nav-item {
        padding: 20px 30px 20px 40px;
        border-radius: 0 var(--lcars-radius-lg) var(--lcars-radius-lg) 0;
        border-left: none;
    }
}

.lcars-nav-item:hover,
.lcars-nav-item.active {
    transform: translateX(10px) scale(1.02);
    z-index: 20;
    color: var(--lcars-text-dark);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.lcars-nav-item:hover .lcars-nav-item-icon,
.lcars-nav-item.active .lcars-nav-item-icon {
    transform: scale(1.15);
}

.lcars-nav-item-icon {
    font-size: 24px;
    display: flex;
    transition: transform 0.2s ease;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.lcars-nav-item-icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    flex-shrink: 0;
}

/* Nav item color variations */
.lcars-nav-item:nth-child(2) {
    background: var(--lcars-purple);
    border-color: #9966CC;
}

.lcars-nav-item:nth-child(2):hover,
.lcars-nav-item:nth-child(2).active {
}

.lcars-nav-item:nth-child(3) {
    background: var(--lcars-blue);
    border-color: #6699CC;
}

.lcars-nav-item:nth-child(3):hover,
.lcars-nav-item:nth-child(3).active {
}

.lcars-nav-item:nth-child(4) {
    background: var(--lcars-green);
    border-color: #66CC66;
}

.lcars-nav-item:nth-child(4):hover,
.lcars-nav-item:nth-child(4).active {
}

/* Nav divider */
.lcars-nav-divider {
    height: 20px;
    background: linear-gradient(90deg, #666666, #888888);
    border-radius: 0 10px 10px 0;
    margin: 8px 16px 8px 0;
}

@media (min-width: 1024px) {
    .lcars-nav-divider {
        margin: 0;
    }
}

/* ==================== MAIN CONTENT ==================== */
.lcars-main {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background: var(--lcars-bg-surface);
}

@media (min-width: 1024px) {
    .lcars-main {
        grid-area: main;
        position: relative;
        z-index: 1;
        margin-top: 20px;
        background: var(--lcars-bg-elevated);
        border: 3px solid var(--lcars-blue);
        border-radius: var(--lcars-radius-md);
        padding: 30px;
        box-shadow: inset 0 0 60px rgba(153, 204, 255, 0.05);
    }
}

.lcars-section-header {
    font-size: 20px;
    font-weight: 700;
    color: var(--lcars-blue);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 3px solid var(--lcars-blue);
}

@media (min-width: 768px) {
    .lcars-section-header {
        font-size: 24px;
    }
}

/* ==================== CARDS ==================== */
.lcars-card {
    background: var(--lcars-bg-card);
    border: 3px solid var(--lcars-purple);
    border-radius: 30px 30px 30px 0;
    padding: 20px;
    margin-bottom: 20px;
    transition: var(--lcars-transition);
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lcars-card:hover {
    transform: translateX(5px);
    border-color: var(--lcars-orange);
    background: linear-gradient(135deg, rgba(255, 153, 102, 0.15), rgba(153, 102, 255, 0.15));
    box-shadow: 0 6px 30px rgba(255, 153, 102, 0.15);
}

@media (min-width: 768px) {
    .lcars-card {
        display: grid;
        grid-template-columns: 100px 1fr 180px;
        gap: 20px;
        padding: 24px;
    }
}

/* ==================== BUTTONS ==================== */
.lcars-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--lcars-orange);
    color: var(--lcars-text-dark);
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid #CC7744;
    border-radius: var(--lcars-radius-md);
    cursor: pointer;
    transition: var(--lcars-transition);
    text-decoration: none;
}

.lcars-btn:hover {
    background: var(--lcars-orange-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lcars-btn:active {
    transform: translateY(0);
}

.lcars-btn-primary {
    background: var(--lcars-purple);
    border-color: #9966CC;
}

.lcars-btn-primary:hover {
    background: var(--lcars-purple-light);
}

.lcars-btn-secondary {
    background: var(--lcars-blue);
    border-color: #6699CC;
}

.lcars-btn-secondary:hover {
    background: var(--lcars-blue-light);
}

.lcars-btn-danger {
    background: var(--lcars-red);
    border-color: #CC4444;
}

.lcars-btn-danger:hover {
    background: #FF8888;
}

.lcars-btn-ghost {
    background: transparent;
    border-color: var(--lcars-border);
    color: var(--lcars-text);
}

.lcars-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--lcars-purple);
}

/* ==================== FORMS ==================== */
.lcars-form-group {
    margin-bottom: 20px;
}

.lcars-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--lcars-blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.lcars-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--lcars-bg-darker);
    border: 2px solid var(--lcars-border-strong);
    border-radius: var(--lcars-radius-sm);
    color: var(--lcars-text);
    font-size: 16px;
    transition: var(--lcars-transition);
}

.lcars-input:focus {
    outline: none;
    border-color: var(--lcars-purple);
    box-shadow: 0 0 0 3px rgba(204, 153, 255, 0.3);
    background: rgba(0, 0, 0, 0.8);
}

.lcars-input::placeholder {
    color: var(--lcars-text-muted);
}

.lcars-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2399CCFF' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* ==================== MODAL ==================== */
.lcars-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.2s ease;
}

.lcars-modal-backdrop.active,
.lcars-modal-backdrop.visible {
    display: flex;
}

/* Mobile: Full screen modal */
.lcars-modal {
    width: 100%;
    height: 100%;
    background: var(--lcars-bg-surface);
    border: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    animation: slideInUp 0.3s ease;
    max-height: 100vh;
}

/* Desktop: Centered modal */
@media (min-width: 768px) {
    .lcars-modal-backdrop {
        padding: 40px;
    }

    .lcars-modal {
        width: 100%;
        max-width: 800px;
        height: auto;
        max-height: calc(100vh - 80px);
        background: var(--lcars-bg-elevated);
        border: 3px solid var(--lcars-purple);
        border-radius: var(--lcars-radius-md);
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(204, 153, 255, 0.2);
    }
}

.lcars-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 3px solid var(--lcars-purple);
    background: var(--lcars-orange);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .lcars-modal-header {
        border-radius: calc(var(--lcars-radius-md) - 3px) calc(var(--lcars-radius-md) - 3px) 0 0;
    }
}

.lcars-modal-title {
    font-size: 24px;
    font-weight: 900;
    color: var(--lcars-text-dark);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin: 0;
}

.lcars-modal-close {
    width: 44px;
    height: 44px;
    background: var(--lcars-text-dark);
    border: none;
    border-radius: 50%;
    color: var(--lcars-orange);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--lcars-transition);
}

.lcars-modal-close:hover {
    background: var(--lcars-text);
    transform: scale(1.1);
}

.lcars-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.lcars-modal-footer {
    padding: 20px;
    border-top: 3px solid var(--lcars-border);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* ==================== TABS ==================== */
.lcars-tabs {
    display: flex;
    gap: 8px;
    padding: 0 20px;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 3px solid var(--lcars-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
}

.lcars-tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    color: var(--lcars-text-muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--lcars-transition);
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
}

.lcars-tab:hover {
    color: var(--lcars-text);
}

.lcars-tab.active {
    color: var(--lcars-purple);
    border-bottom-color: var(--lcars-purple);
}

.lcars-tab-content {
    display: none;
}

.lcars-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* ==================== STAT PANELS ==================== */
.lcars-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

@media (min-width: 640px) {
    .lcars-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.lcars-stat-panel {
    background: var(--lcars-blue);
    border-radius: var(--lcars-radius-md);
    padding: 16px;
    text-align: center;
    border: 3px solid #6699CC;
    box-shadow:
        inset 0 3px 0 rgba(204, 229, 255, 0.8),
        inset 0 -3px 0 rgba(102, 153, 204, 0.6),
        0 4px 8px rgba(0, 0, 0, 0.3);
}

.lcars-stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--lcars-text-dark);
    line-height: 1;
}

@media (min-width: 768px) {
    .lcars-stat-value {
        font-size: 36px;
    }
}

.lcars-stat-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--lcars-text-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 8px;
}

/* Stat color variations */
.lcars-stat-panel.orange {
    background: var(--lcars-orange);
    border-color: #CC7744;
}

.lcars-stat-panel.purple {
    background: var(--lcars-purple);
    border-color: #9966CC;
}

.lcars-stat-panel.green {
    background: var(--lcars-green);
    border-color: #66CC66;
}

.lcars-stat-panel.yellow {
    background: var(--lcars-yellow);
    border-color: #CC9933;
}

.lcars-stat-panel.red {
    background: var(--lcars-red);
    border-color: #CC4444;
}

/* ==================== BADGES ==================== */
.lcars-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    background: var(--lcars-blue);
    color: var(--lcars-text-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: var(--lcars-radius-md);
    border: 2px solid #6699CC;
}

.lcars-badge-success {
    background: var(--lcars-green);
    border-color: #66CC66;
}

.lcars-badge-warning {
    background: var(--lcars-yellow);
    border-color: #CC9933;
}

.lcars-badge-danger {
    background: var(--lcars-red);
    border-color: #CC4444;
}

.lcars-badge-purple {
    background: var(--lcars-purple);
    border-color: #9966CC;
}

/* ==================== ALERTS ==================== */
.lcars-alert {
    padding: 16px 20px;
    border-radius: var(--lcars-radius-sm);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lcars-alert-info {
    background: rgba(153, 204, 255, 0.2);
    border-left: 4px solid var(--lcars-blue);
    color: var(--lcars-blue);
}

.lcars-alert-success {
    background: rgba(153, 255, 153, 0.2);
    border-left: 4px solid var(--lcars-green);
    color: var(--lcars-green);
}

.lcars-alert-warning {
    background: rgba(255, 204, 102, 0.2);
    border-left: 4px solid var(--lcars-yellow);
    color: var(--lcars-yellow);
}

.lcars-alert-danger {
    background: rgba(255, 102, 102, 0.2);
    border-left: 4px solid var(--lcars-red);
    color: var(--lcars-red);
}

/* ==================== PROGRESS BAR ==================== */
.lcars-progress {
    height: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--lcars-radius-pill);
    overflow: hidden;
}

.lcars-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--lcars-blue), var(--lcars-purple));
    border-radius: var(--lcars-radius-pill);
    transition: width 0.3s ease;
    position: relative;
}

.lcars-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ==================== LISTS ==================== */
.lcars-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.lcars-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--lcars-border);
    gap: 12px;
}

.lcars-list-item:last-child {
    border-bottom: none;
}

.lcars-list-item:hover {
    background: rgba(204, 153, 255, 0.05);
}

/* ==================== DANGER ZONE ==================== */
.lcars-danger-zone {
    margin-top: 40px;
    padding: 20px;
    border: 3px solid var(--lcars-red);
    border-radius: var(--lcars-radius-md);
    background: rgba(255, 102, 102, 0.1);
}

.lcars-danger-zone-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--lcars-red);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

/* ==================== LOADING ==================== */
.lcars-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.lcars-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--lcars-border);
    border-top-color: var(--lcars-purple);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==================== UTILITIES ==================== */
.lcars-text-center { text-align: center; }
.lcars-text-right { text-align: right; }
.lcars-text-muted { color: var(--lcars-text-muted); }
.lcars-text-small { font-size: 12px; }
.lcars-mb-0 { margin-bottom: 0; }
.lcars-mb-1 { margin-bottom: 8px; }
.lcars-mb-2 { margin-bottom: 16px; }
.lcars-mb-3 { margin-bottom: 24px; }
.lcars-mt-auto { margin-top: auto; }
.lcars-flex { display: flex; }
.lcars-flex-col { flex-direction: column; }
.lcars-gap-1 { gap: 8px; }
.lcars-gap-2 { gap: 16px; }
.lcars-hidden { display: none; }

@media (min-width: 768px) {
    .lcars-md-flex { display: flex; }
    .lcars-md-hidden { display: none; }
}

/* ==================== GENERIC COMPONENT STYLES ==================== */
/* These ensure common UI elements have visible LCARS styling */

/* Generic Card */
.card {
    background: var(--card-bg);
    border: 2px solid rgba(204, 153, 255, 0.4);
    border-left: 4px solid var(--lcars-purple);
    border-radius: 12px;
    margin-bottom: 20px;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 2px solid rgba(204, 153, 255, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--lcars-blue);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.card-body {
    padding: 20px;
}

/* Generic Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(30, 30, 50, 0.9);
    color: var(--lcars-text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid rgba(204, 153, 255, 0.5);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn:hover {
    background: rgba(204, 153, 255, 0.2);
    border-color: var(--lcars-purple);
}

.btn-primary {
    background: var(--lcars-purple);
    border-color: #9966CC;
    color: var(--lcars-text-dark);
}

.btn-primary:hover {
    background: var(--lcars-purple-light);
}

.btn-secondary {
    background: rgba(153, 204, 255, 0.15);
    border-color: rgba(153, 204, 255, 0.5);
    color: var(--lcars-blue);
}

.btn-secondary:hover {
    background: rgba(153, 204, 255, 0.3);
    border-color: var(--lcars-blue);
}

/* Generic Badge */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: rgba(153, 204, 255, 0.2);
    color: var(--lcars-blue);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(153, 204, 255, 0.4);
    border-radius: 12px;
}

.badge-info {
    background: rgba(153, 204, 255, 0.2);
    border-color: rgba(153, 204, 255, 0.4);
    color: var(--lcars-blue);
}

.badge-success {
    background: rgba(153, 255, 153, 0.2);
    border-color: rgba(153, 255, 153, 0.4);
    color: var(--lcars-green);
}

.badge-warning {
    background: rgba(255, 204, 102, 0.2);
    border-color: rgba(255, 204, 102, 0.4);
    color: var(--lcars-yellow);
}

.badge-danger {
    background: rgba(255, 102, 102, 0.2);
    border-color: rgba(255, 102, 102, 0.4);
    color: var(--lcars-red);
}

/* Generic Form Input */
.form-input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(204, 153, 255, 0.4);
    border-radius: 8px;
    color: var(--lcars-text);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--lcars-purple);
    box-shadow: 0 0 0 3px rgba(204, 153, 255, 0.2);
}

.form-input::placeholder {
    color: var(--lcars-text-muted);
}

/* Filter Chips - explicit LCARS styling */
.filter-chip {
    padding: 8px 16px;
    background: rgba(20, 20, 40, 0.9);
    border: 2px solid rgba(204, 153, 255, 0.4);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--lcars-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--lcars-purple);
    color: var(--lcars-text);
    background: rgba(204, 153, 255, 0.15);
}

.filter-chip.active {
    background: var(--lcars-purple);
    border-color: var(--lcars-purple);
    color: var(--lcars-text-dark);
}

/* Stat Panel with borders */
.stat-panel {
    background: var(--card-bg);
    border: 2px solid rgba(204, 153, 255, 0.3);
    border-radius: 12px;
    padding: 20px;
}

/* Mode toggle styling */
.mode-toggle {
    display: flex;
    gap: 5px;
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid rgba(204, 153, 255, 0.3);
    border-radius: 25px;
    padding: 4px;
}

.mode-btn {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: transparent;
    border: 2px solid transparent;
    color: var(--lcars-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mode-btn:hover {
    color: var(--lcars-text);
}

.mode-btn.active {
    background: var(--lcars-purple);
    border-color: var(--lcars-purple);
    color: var(--lcars-text-dark);
}

/* Inventory card styling */
.inventory-card {
    background: var(--card-bg);
    border: 2px solid rgba(204, 153, 255, 0.35);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.2s ease;
}

.inventory-card:hover {
    border-color: var(--lcars-purple);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* View controls */
.view-controls {
    display: flex;
    gap: 5px;
    background: rgba(20, 20, 40, 0.8);
    border: 2px solid rgba(204, 153, 255, 0.3);
    border-radius: 8px;
    padding: 4px;
}

.view-btn {
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    color: var(--lcars-text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.view-btn:hover {
    color: var(--lcars-text);
}

.view-btn.active {
    background: var(--lcars-blue);
    color: var(--lcars-text-dark);
}

/* ==================== ENHANCED DEPTH & EFFECTS ==================== */

/* Corner piece gradient and glow */
@media (min-width: 1024px) {
    .lcars-header-corner {
        background: linear-gradient(145deg, #DD99FF 0%, var(--lcars-purple) 50%, #9966CC 100%);
        box-shadow:
            inset 0 2px 4px rgba(255, 255, 255, 0.3),
            inset 0 -2px 4px rgba(0, 0, 0, 0.2),
            0 4px 20px rgba(204, 153, 255, 0.3);
    }
}

/* Header bar enhanced */
.lcars-header-bar {
    background: linear-gradient(145deg, #FFBB88 0%, var(--lcars-orange) 50%, #DD7744 100%);
    box-shadow:
        inset 0 3px 6px rgba(255, 255, 255, 0.4),
        inset 0 -3px 6px rgba(0, 0, 0, 0.15),
        0 4px 20px rgba(255, 153, 102, 0.3);
    justify-content: space-between;
}

/* Header indicators */
.lcars-header-indicators {
    display: none;
}

@media (min-width: 1024px) {
    .lcars-header-indicators {
        display: flex;
        align-items: center;
        gap: 24px;
        margin-right: 20px;
    }
}

.lcars-indicator-group {
    display: flex;
    gap: 8px;
}

.lcars-indicator-light {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(0, 0, 0, 0.4);
}

.lcars-indicator-light.active {
    background: #00FF88;
    box-shadow: 0 0 8px #00FF88, inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

.lcars-indicator-light.blink {
    background: #FFCC00;
    box-shadow: 0 0 8px #FFCC00;
    animation: indicator-blink 1s ease-in-out infinite;
}

@keyframes indicator-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.lcars-header-readout {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    background: rgba(0, 0, 0, 0.25);
    padding: 6px 14px;
    border-radius: 8px;
}

.lcars-readout-label {
    font-size: 9px;
    letter-spacing: 2px;
    color: rgba(0, 0, 0, 0.6);
    font-weight: 700;
}

.lcars-readout-value {
    font-size: 18px;
    font-weight: 700;
    color: #000;
    letter-spacing: 1px;
}

.lcars-header-blocks {
    display: flex;
    gap: 4px;
}

.lcars-block {
    width: 20px;
    height: 35px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.lcars-block:nth-child(1) { height: 25px; }
.lcars-block:nth-child(2) { height: 35px; }
.lcars-block:nth-child(3) { height: 20px; }

/* ==================== SIDEBAR DECORATIVE ELEMENTS ==================== */

.lcars-sidebar-decor {
    display: none;
}

@media (min-width: 1024px) {
    .lcars-sidebar-decor {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: auto;
        padding-top: 30px;
    }
}

.lcars-decor-bar {
    height: 18px;
    border-radius: 0 20px 20px 0;
    box-shadow:
        inset 0 2px 3px rgba(255, 255, 255, 0.3),
        inset 0 -2px 3px rgba(0, 0, 0, 0.2);
}

.lcars-decor-bar-1 {
    background: linear-gradient(90deg, var(--lcars-blue), #77BBEE);
    width: 70%;
}

.lcars-decor-bar-2 {
    background: linear-gradient(90deg, var(--lcars-yellow), #FFDD88);
    width: 85%;
}

.lcars-decor-bar-3 {
    background: linear-gradient(90deg, var(--lcars-purple), #BB88DD);
    width: 60%;
}

.lcars-decor-bar-4 {
    background: linear-gradient(90deg, #888899, #AAAAAA);
    width: 90%;
    height: 12px;
}

/* Status panel */
.lcars-status-panel {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(20, 20, 35, 0.9);
    border: 2px solid rgba(153, 204, 255, 0.3);
    border-radius: 0 12px 12px 0;
    border-left: none;
}

.lcars-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.lcars-status-light {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(100, 100, 100, 0.5);
}

.lcars-status-light.active {
    background: #00FF88;
    box-shadow: 0 0 8px #00FF88;
}

.lcars-status-light.blink-slow {
    background: #FFCC00;
    box-shadow: 0 0 8px #FFCC00;
    animation: indicator-blink 2s ease-in-out infinite;
}

.lcars-status-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--lcars-blue);
}

/* Segmented decorative element */
.lcars-decor-segment {
    display: flex;
    gap: 4px;
    padding-right: 20px;
}

.lcars-decor-segment span {
    flex: 1;
    height: 8px;
    background: linear-gradient(180deg, #666677, #444455);
    border-radius: 4px;
}

.lcars-decor-segment span:nth-child(odd) {
    background: linear-gradient(180deg, #555566, #333344);
}

/* ==================== ENHANCED MAIN CONTENT ==================== */

@media (min-width: 1024px) {
    .lcars-main {
        background: linear-gradient(180deg, rgba(18, 18, 31, 1) 0%, rgba(10, 10, 18, 1) 100%);
        box-shadow:
            inset 0 0 60px rgba(153, 204, 255, 0.03),
            inset 0 1px 0 rgba(153, 204, 255, 0.1),
            0 0 40px rgba(0, 0, 0, 0.5);
    }
}


/* Enhanced cards with depth */
.lcars-card,
.card {
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(204, 153, 255, 0.1);
}

.lcars-card:hover,
.card:hover {
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(204, 153, 255, 0.1),
        inset 0 1px 0 rgba(204, 153, 255, 0.2);
}

/* Button glow effects */
.btn:hover,
.lcars-btn:hover {
    box-shadow: 0 4px 15px rgba(204, 153, 255, 0.3);
}

.btn-primary:hover,
.lcars-btn-primary:hover {
    box-shadow: 0 4px 20px rgba(204, 153, 255, 0.5);
}

/* Enhanced stat panels */
.lcars-stat-panel,
.stat-panel {
    box-shadow:
        inset 0 3px 0 rgba(255, 255, 255, 0.3),
        inset 0 -3px 0 rgba(0, 0, 0, 0.2),
        0 4px 15px rgba(0, 0, 0, 0.3);
}

/* ==================== LCARS SECTION HEADERS ==================== */

.lcars-section {
    position: relative;
    margin-bottom: 24px;
}

.lcars-section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.lcars-section-bar {
    width: 8px;
    height: 40px;
    background: var(--lcars-purple);
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(204, 153, 255, 0.4);
}

.lcars-section-title {
    font-size: 14px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: var(--lcars-purple);
    margin: 0;
}

.lcars-section-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--lcars-purple), transparent);
    border-radius: 1px;
}

/* Section header color variants */
.lcars-section-header.orange .lcars-section-bar {
    background: var(--lcars-orange);
    box-shadow: 0 0 10px rgba(255, 153, 102, 0.4);
}
.lcars-section-header.orange .lcars-section-title {
    color: var(--lcars-orange);
}
.lcars-section-header.orange .lcars-section-line {
    background: linear-gradient(90deg, var(--lcars-orange), transparent);
}

.lcars-section-header.blue .lcars-section-bar {
    background: var(--lcars-blue);
    box-shadow: 0 0 10px rgba(153, 204, 255, 0.4);
}
.lcars-section-header.blue .lcars-section-title {
    color: var(--lcars-blue);
}
.lcars-section-header.blue .lcars-section-line {
    background: linear-gradient(90deg, var(--lcars-blue), transparent);
}

.lcars-section-header.yellow .lcars-section-bar {
    background: var(--lcars-yellow);
    box-shadow: 0 0 10px rgba(255, 204, 102, 0.4);
}
.lcars-section-header.yellow .lcars-section-title {
    color: var(--lcars-yellow);
}
.lcars-section-header.yellow .lcars-section-line {
    background: linear-gradient(90deg, var(--lcars-yellow), transparent);
}

/* ==================== LCARS CORNER BRACKETS ==================== */

.lcars-bracket {
    position: relative;
}

.lcars-bracket::before,
.lcars-bracket::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid var(--lcars-purple);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.lcars-bracket::before {
    top: -2px;
    left: -2px;
    border-right: none;
    border-bottom: none;
    border-radius: 8px 0 0 0;
}

.lcars-bracket::after {
    bottom: -2px;
    right: -2px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 8px 0;
}

.lcars-bracket:hover::before,
.lcars-bracket:hover::after {
    opacity: 1;
}

/* Corner bracket color variants */
.lcars-bracket.orange::before,
.lcars-bracket.orange::after {
    border-color: var(--lcars-orange);
}

.lcars-bracket.blue::before,
.lcars-bracket.blue::after {
    border-color: var(--lcars-blue);
}

.lcars-bracket.yellow::before,
.lcars-bracket.yellow::after {
    border-color: var(--lcars-yellow);
}

/* Apply brackets to cards */
.lcars-card,
.card {
    position: relative;
}

.lcars-card::before,
.lcars-card::after,
.card::before,
.card::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    border: 2px solid var(--lcars-purple);
    opacity: 0.4;
    transition: opacity 0.3s ease, border-color 0.3s ease;
    pointer-events: none;
}

.lcars-card::before,
.card::before {
    top: 8px;
    left: 8px;
    border-right: none;
    border-bottom: none;
    border-radius: 6px 0 0 0;
}

.lcars-card::after,
.card::after {
    bottom: 8px;
    right: 8px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 6px 0;
}

.lcars-card:hover::before,
.lcars-card:hover::after,
.card:hover::before,
.card:hover::after {
    opacity: 0.8;
    border-color: var(--lcars-orange);
}

/* ==================== ENHANCED PROGRESS BARS ==================== */

.progress-bar,
.lcars-progress {
    position: relative;
    background: rgba(30, 30, 50, 0.8);
    border: 1px solid rgba(153, 204, 255, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill,
.lcars-progress-fill {
    position: relative;
    border-radius: 10px;
    box-shadow:
        0 0 10px currentColor,
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Progress bar glow animation */
.progress-fill::after,
.lcars-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: progress-shine 2s ease-in-out infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Progress color variants with glow */
.progress-fill.green,
.lcars-progress-fill.green {
    background: linear-gradient(90deg, #22CC66, #44EE88);
    box-shadow: 0 0 15px rgba(68, 238, 136, 0.5);
}

.progress-fill.yellow,
.lcars-progress-fill.yellow {
    background: linear-gradient(90deg, #DDAA00, #FFCC44);
    box-shadow: 0 0 15px rgba(255, 204, 68, 0.5);
}

.progress-fill.orange,
.lcars-progress-fill.orange {
    background: linear-gradient(90deg, #DD6600, #FF8844);
    box-shadow: 0 0 15px rgba(255, 136, 68, 0.5);
}

.progress-fill.red,
.lcars-progress-fill.red {
    background: linear-gradient(90deg, #CC2244, #EE4466);
    box-shadow: 0 0 15px rgba(238, 68, 102, 0.5);
}

.progress-fill.blue,
.lcars-progress-fill.blue {
    background: linear-gradient(90deg, #4488DD, #66AAFF);
    box-shadow: 0 0 15px rgba(102, 170, 255, 0.5);
}

.progress-fill.purple,
.lcars-progress-fill.purple {
    background: linear-gradient(90deg, #9966CC, #BB88EE);
    box-shadow: 0 0 15px rgba(187, 136, 238, 0.5);
}

/* ==================== ENHANCED BUTTONS & CHIPS ==================== */

/* LCARS pill-style buttons */
.lcars-btn,
.btn {
    border-radius: 20px;
    padding: 10px 24px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.lcars-btn::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.lcars-btn:hover::before,
.btn:hover::before {
    left: 100%;
}

/* Enhanced filter chips */
.filter-chip {
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: 600;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 12px;
    border: 2px solid rgba(204, 153, 255, 0.4);
    background: rgba(20, 20, 40, 0.9);
    color: var(--lcars-text-light);
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-chip:hover {
    border-color: var(--lcars-purple);
    background: rgba(204, 153, 255, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.filter-chip.active {
    background: var(--lcars-purple);
    color: var(--lcars-text-dark);
    border-color: var(--lcars-purple);
    box-shadow: 0 0 15px rgba(204, 153, 255, 0.4);
}

/* Retailer chip variants */
.filter-chip[data-retailer="target"],
.filter-chip.target {
    border-color: rgba(255, 102, 102, 0.4);
}
.filter-chip[data-retailer="target"].active,
.filter-chip.target.active {
    background: #CC3333;
    border-color: #CC3333;
    box-shadow: 0 0 15px rgba(204, 51, 51, 0.4);
}

.filter-chip[data-retailer="walmart"],
.filter-chip.walmart {
    border-color: rgba(102, 153, 255, 0.4);
}
.filter-chip[data-retailer="walmart"].active,
.filter-chip.walmart.active {
    background: #0066CC;
    border-color: #0066CC;
    box-shadow: 0 0 15px rgba(0, 102, 204, 0.4);
}

.filter-chip[data-retailer="amazon"],
.filter-chip.amazon {
    border-color: rgba(255, 153, 51, 0.4);
}
.filter-chip[data-retailer="amazon"].active,
.filter-chip.amazon.active {
    background: #FF9900;
    border-color: #FF9900;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 153, 0, 0.4);
}

.filter-chip[data-retailer="bestbuy"],
.filter-chip.bestbuy {
    border-color: rgba(255, 255, 102, 0.4);
}
.filter-chip[data-retailer="bestbuy"].active,
.filter-chip.bestbuy.active {
    background: #FFE600;
    border-color: #FFE600;
    color: #000;
    box-shadow: 0 0 15px rgba(255, 230, 0, 0.4);
}

/* Tab-style buttons (INVENTORY, PRODUCTS, ORDERS) */
.lcars-tab-group {
    display: flex;
    gap: 8px;
    padding: 4px;
    background: rgba(20, 20, 40, 0.6);
    border-radius: 24px;
    border: 1px solid rgba(153, 204, 255, 0.2);
}

.lcars-tab {
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 700;
    font-style: italic;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    background: transparent;
    color: var(--lcars-text-light);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lcars-tab:hover {
    background: rgba(204, 153, 255, 0.1);
}

.lcars-tab.active {
    background: var(--lcars-purple);
    color: var(--lcars-text-dark);
    box-shadow: 0 0 12px rgba(204, 153, 255, 0.4);
}

/* ==================== SKELETON LOADERS ==================== */
.lcars-skeleton {
    position: relative;
    overflow: hidden;
    background: linear-gradient(
        90deg,
        rgba(204, 153, 255, 0.1) 0%,
        rgba(153, 204, 255, 0.2) 50%,
        rgba(204, 153, 255, 0.1) 100%
    );
    background-size: 200% 100%;
    animation: lcars-shimmer 1.5s ease-in-out infinite;
    border-radius: 4px;
    color: transparent !important;
}

.lcars-skeleton::before {
    content: '\00a0'; /* Non-breaking space to maintain height */
}

.lcars-skeleton-value {
    display: inline-block;
    position: relative;
}

.lcars-skeleton-value.loaded .lcars-skeleton {
    display: none;
}

.lcars-skeleton-value.loaded::after {
    content: attr(data-value);
}

/* ==================== SPINNERS ==================== */
.lcars-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.lcars-spinner-svg {
    animation: lcars-spin 1s linear infinite;
}

/* Spinner sizes */
.lcars-spinner-sm {
    width: 16px;
    height: 16px;
}

.lcars-spinner-md {
    width: 32px;
    height: 32px;
}

.lcars-spinner-lg {
    width: 48px;
    height: 48px;
}

/* Spinner colors */
.lcars-spinner-purple { color: var(--lcars-purple); }
.lcars-spinner-orange { color: var(--lcars-orange); }
.lcars-spinner-blue { color: var(--lcars-blue); }
.lcars-spinner-green { color: var(--lcars-green); }

/* ==================== LOADING OVERLAY ==================== */
.lcars-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10;
}

.lcars-loading-overlay-text {
    color: var(--lcars-text-secondary);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ==================== LOADING TEXT ==================== */
.lcars-loading-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--lcars-text-secondary);
}

.lcars-loading-text.loaded .lcars-spinner {
    display: none;
}
