/* 
 * INVENTORY MODULE STYLES - Star Trek Futuristic Theme
 * Magazyn kosmiczny z efektami holograficznymi
 */

/* ========== KOSMICZNE ANIMACJE ========== */
@keyframes beam {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(100%); opacity: 0; }
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* ========== AUTH & LOADING SCREENS - TRANSPORTER ========== */
.login-screen-backup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(10, 10, 26, 0.95) 0%,
        rgba(26, 26, 46, 0.95) 100%);
    backdrop-filter: blur(15px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-container-backup {
    background: rgba(26, 26, 46, 0.9);
    border-radius: var(--border-radius);
    box-shadow: 
        0 0 50px rgba(0, 184, 255, 0.3),
        inset 0 0 30px rgba(0, 184, 255, 0.1);
    padding: 50px;
    max-width: 450px;
    width: 100%;
    text-align: center;
    border: 2px solid rgba(0, 184, 255, 0.3);
    position: relative;
    overflow: hidden;
    animation: hologram 3s ease-in-out infinite;
}

.login-container-backup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent,
        var(--starfleet-blue),
        transparent);
}

.login-logo-backup i {
    font-size: 70px;
    color: var(--starfleet-gold);
    margin-bottom: 25px;
    text-shadow: 0 0 30px var(--starfleet-gold);
    animation: pulse 2s ease-in-out infinite;
}

.login-btn-backup {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: white;
    border: none;
    padding: 18px 35px;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
    margin-top: 25px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    overflow: hidden;
}

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

.login-btn-backup:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 184, 255, 0.4);
}

.login-btn-backup:hover::before {
    left: 100%;
}

.backup-login-info {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: rgba(26, 26, 46, 0.9);
    padding: 20px;
    border-radius: var(--border-radius-sm);
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.5),
        inset 0 0 20px rgba(0, 184, 255, 0.1);
    z-index: 9999;
    max-width: 320px;
    border-left: 4px solid var(--starfleet-blue);
    border: 1px solid rgba(0, 184, 255, 0.3);
    animation: hologram 4s ease-in-out infinite;
}

.auth-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 10, 26, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 3px solid rgba(0, 184, 255, 0.2);
    border-top: 3px solid var(--starfleet-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
    position: relative;
}

.loading-spinner::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    right: -8px;
    bottom: -8px;
    border: 2px solid rgba(157, 78, 221, 0.3);
    border-radius: 50%;
    animation: spin 2s linear infinite reverse;
}

.loading-text {
    margin-top: 30px;
    color: var(--starfleet-blue-light);
    font-size: 18px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 0 10px var(--starfleet-blue);
}

/* ========== STAT CARDS - HOLOGRAMY MAGAZYNOWE ========== */
.stat-card {
    background: rgba(26, 26, 46, 0.7);
    border-radius: var(--border-radius);
    box-shadow: 
        inset 0 0 20px rgba(0, 184, 255, 0.1),
        0 10px 30px rgba(0, 0, 0, 0.4);
    padding: 25px;
    text-align: center;
    border-top: 4px solid var(--starfleet-blue);
    border: 1px solid rgba(0, 184, 255, 0.2);
    transition: all 0.3s ease;
    animation: hologram 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 
        inset 0 0 30px rgba(0, 184, 255, 0.2),
        0 15px 40px rgba(0, 184, 255, 0.3);
    border-color: var(--starfleet-blue);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--starfleet-blue),
        transparent);
}

.stat-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--starfleet-white);
    margin: 15px 0;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(90deg, 
        var(--starfleet-blue-light) 0%,
        var(--starfleet-white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 15px rgba(0, 184, 255, 0.3);
}

.stat-label {
    color: var(--starfleet-silver);
    font-size: 14px;
    font-weight: 600;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Stock status colors - KOSMICZNE */
.stock-low { 
    background: rgba(255, 145, 0, 0.15);
    color: var(--starfleet-gold);
    border: 1px solid rgba(255, 215, 0, 0.3);
    animation: glitch 0.5s ease-in-out infinite;
}

.stock-good { 
    background: rgba(0, 184, 255, 0.15);
    color: var(--starfleet-blue);
    border: 1px solid rgba(0, 184, 255, 0.3);
}

.stock-empty { 
    background: rgba(255, 51, 102, 0.15);
    color: var(--starfleet-red);
    border: 1px solid rgba(255, 51, 102, 0.3);
    animation: pulse 1s ease-in-out infinite;
}

/* ========== BUTTONS - KONTROLKI MAGAZYNU ========== */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.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.7s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-blue-dark) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 184, 255, 0.3);
    border: 1px solid rgba(0, 184, 255, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 184, 255, 0.5);
    background: linear-gradient(135deg, 
        var(--starfleet-blue-light) 0%,
        var(--starfleet-blue) 100%);
}

.btn-stock {
    padding: 8px 16px;
    font-size: 12px;
    margin: 0 4px;
    border-radius: 20px;
}

.btn-success {
    background: linear-gradient(135deg, 
        var(--starfleet-green) 0%,
        #00cc66 100%);
    color: white;
    border: 1px solid rgba(0, 255, 157, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 25px rgba(0, 255, 157, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, 
        var(--starfleet-gold) 0%,
        #ffcc00 100%);
    color: var(--starfleet-black);
    border: 1px solid rgba(255, 215, 0, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, 
        var(--starfleet-red) 0%,
        #cc0033 100%);
    color: white;
    border: 1px solid rgba(255, 51, 102, 0.4);
}

.btn-secondary {
    background: rgba(26, 26, 46, 0.8);
    color: var(--starfleet-blue-light);
    border: 2px solid rgba(0, 184, 255, 0.4);
}

.btn-secondary:hover {
    background: rgba(0, 184, 255, 0.2);
    border-color: var(--starfleet-blue);
    color: white;
}

/* ========== TABS - PANELE MAGAZYNU ========== */
.tab-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(0, 184, 255, 0.3);
    padding-bottom: 10px;
    flex-wrap: wrap;
}

.tab-button {
    padding: 12px 24px;
    background: rgba(26, 26, 46, 0.7);
    border: 1px solid rgba(0, 184, 255, 0.3);
    border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
    font-weight: 700;
    cursor: pointer;
    color: var(--starfleet-silver);
    transition: all 0.3s ease;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

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

.tab-button:hover:not(.active) {
    background: rgba(0, 184, 255, 0.1);
    color: var(--starfleet-blue-light);
    transform: translateY(-2px);
}

.tab-button:hover:not(.active)::before {
    left: 100%;
}

.tab-button.active {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: white;
    box-shadow: 0 -4px 15px rgba(0, 184, 255, 0.3);
    border-color: rgba(0, 184, 255, 0.5);
    position: relative;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--starfleet-blue);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.tab-content.active {
    display: block;
    animation: hologram 0.5s ease-out;
}

/* ========== ORDER PRODUCTS - TRANSPORTER ========== */
.order-product {
    background: rgba(26, 26, 46, 0.7);
    border: 2px solid rgba(0, 184, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.order-product:hover {
    background: rgba(0, 184, 255, 0.1);
    border-color: var(--starfleet-blue);
    transform: translateX(8px);
    box-shadow: 0 10px 30px rgba(0, 184, 255, 0.2);
}

.order-product.selected {
    background: rgba(0, 184, 255, 0.2);
    border-color: var(--starfleet-blue);
    box-shadow: 
        0 10px 30px rgba(0, 184, 255, 0.3),
        inset 0 0 20px rgba(0, 184, 255, 0.1);
    animation: hologram 2s ease-in-out infinite;
}

.order-product.selected::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--starfleet-blue),
        transparent);
    animation: scan 3s linear infinite;
}

/* ========== READONLY FIELDS - TERMINAL ========== */
.readonly-field {
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid rgba(0, 184, 255, 0.3);
    color: var(--starfleet-silver);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    padding: 12px;
    border-radius: var(--border-radius-sm);
}

/* ========== STATUS BADGES - SYSTEM STATUS ========== */
.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    margin: 3px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid;
    animation: hologram 3s ease-in-out infinite;
}

.status-success {
    background: rgba(0, 255, 157, 0.15);
    color: var(--starfleet-green);
    border-color: rgba(0, 255, 157, 0.3);
}

.status-warning {
    background: rgba(255, 215, 0, 0.15);
    color: var(--starfleet-gold);
    border-color: rgba(255, 215, 0, 0.3);
    animation: glitch 1s ease-in-out infinite;
}

.status-danger {
    background: rgba(255, 51, 102, 0.15);
    color: var(--starfleet-red);
    border-color: rgba(255, 51, 102, 0.3);
    animation: pulse 0.8s ease-in-out infinite;
}

.status-default {
    background: rgba(192, 192, 192, 0.15);
    color: var(--starfleet-silver);
    border-color: rgba(192, 192, 192, 0.3);
}

/* ========== PRODUCT CODE - KOD KRESKOWY ========== */
.product-code {
    font-family: 'Courier New', monospace;
    background: rgba(0, 20, 40, 0.8);
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    color: var(--starfleet-green);
    letter-spacing: 3px;
    border: 1px solid rgba(0, 255, 157, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
    position: relative;
    overflow: hidden;
}

.product-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(0, 255, 157, 0.2),
        transparent);
    animation: scan 2s linear infinite;
}

/* ========== PRICE DETAILS - ANALIZA HOLOGRAMU ========== */
.price-details {
    background: rgba(26, 26, 46, 0.8);
    border: 1px solid rgba(0, 184, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin-top: 8px;
    font-size: 13px;
    border-left: 3px solid var(--starfleet-blue);
}

.price-detail-item {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding: 4px 0;
    border-bottom: 1px solid rgba(0, 184, 255, 0.1);
}

.price-detail-item:last-child {
    border-bottom: none;
}

.price-detail-value {
    font-weight: 700;
    color: var(--starfleet-gold);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.3);
}

.price-total {
    border-top: 2px solid rgba(0, 184, 255, 0.3);
    margin-top: 10px;
    padding-top: 10px;
    font-weight: bold;
    color: var(--starfleet-white);
    font-size: 16px;
}

/* ========== STOCK ACTIONS - KONTROLKI ========== */
.stock-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ========== NET COST INFO - ANALIZA SYSTEMU ========== */
.net-cost-info {
    background: rgba(0, 184, 255, 0.1);
    border: 2px solid rgba(0, 184, 255, 0.3);
    border-radius: var(--border-radius-sm);
    padding: 15px;
    margin: 15px 0;
    font-size: 13px;
    animation: hologram 3s ease-in-out infinite;
}

.net-cost-breakdown {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .tab-buttons {
        flex-wrap: wrap;
    }
    
    .tab-button {
        padding: 10px 16px;
        font-size: 12px;
    }
    
    .btn {
        font-size: 13px;
        padding: 10px 18px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 32px;
    }
}

/* ========== UTILITY CLASSES ========== */
.text-success {
    color: var(--starfleet-green) !important;
    text-shadow: 0 0 10px rgba(0, 255, 157, 0.3);
}

.text-warning {
    color: var(--starfleet-gold) !important;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.text-danger {
    color: var(--starfleet-red) !important;
    text-shadow: 0 0 10px rgba(255, 51, 102, 0.3);
}

.text-muted {
    color: var(--starfleet-silver) !important;
}

.mt-2 { margin-top: 1rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }

/* ========== SPECIAL EFFECTS ========== */
.scanner-line {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent,
        var(--starfleet-blue),
        transparent);
    pointer-events: none;
    z-index: 999;
    animation: scan 3s linear infinite;
}

.data-grid {
    display: grid;
    gap: 20px;
    background: rgba(26, 26, 46, 0.5);
    padding: 20px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 184, 255, 0.2);
    animation: hologram 5s ease-in-out infinite;
}

.grid-header {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
    background: rgba(0, 20, 40, 0.6);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 184, 255, 0.3);
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--starfleet-blue-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    padding: 15px;
    background: rgba(26, 26, 46, 0.7);
    border-radius: var(--border-radius-sm);
    border: 1px solid rgba(0, 184, 255, 0.2);
    transition: all 0.3s ease;
}

.grid-row:hover {
    background: rgba(0, 184, 255, 0.1);
    transform: translateX(5px);
    box-shadow: 0 10px 20px rgba(0, 184, 255, 0.2);
}
