/* 
 * COMMON LAYOUT - Star Trek Universal Design
 * Wspólny układ kosmiczny dla wszystkich modułów
 */

/* ========== RESET & BASE - STARFLEET STANDARD ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Federation Color Palette */
    --starfleet-blue: #00b8ff;
    --starfleet-blue-dark: #0066cc;
    --starfleet-blue-light: #66e0ff;
    --starfleet-gold: #ffd700;
    --starfleet-silver: #c0c0c0;
    --starfleet-red: #ff3366;
    --starfleet-green: #00ff9d;
    --starfleet-purple: #9d4edd;
    --starfleet-black: #0a0a1a;
    --starfleet-gray: #1a1a2e;
    --starfleet-white: #f0f8ff;
    
    /* Text Colors */
    --text-command: #ffffff;
    --text-data: #c0c0c0;
    --text-warning: #ffd700;
    --text-alert: #ff3366;
    
    /* Background Colors */
    --bg-deep-space: #0a0a1a;
    --bg-space: #1a1a2e;
    --bg-nebula: #16213e;
    --bg-console: rgba(26, 26, 46, 0.9);
    
    /* Border Colors */
    --border-console: rgba(0, 184, 255, 0.4);
    --border-alert: rgba(255, 51, 102, 0.6);
    --border-warning: rgba(255, 215, 0, 0.6);
    
    /* Glow Effects */
    --glow-blue: 0 0 20px rgba(0, 184, 255, 0.6);
    --glow-gold: 0 0 20px rgba(255, 215, 0, 0.6);
    --glow-red: 0 0 20px rgba(255, 51, 102, 0.6);
    --glow-green: 0 0 20px rgba(0, 255, 157, 0.6);
    
    /* Shadows */
    --shadow-deep: 0 10px 40px rgba(0, 0, 0, 0.8);
    --shadow-console: 0 4px 20px rgba(0, 184, 255, 0.3);
    --shadow-holo: 0 0 40px rgba(0, 184, 255, 0.4);
    
    /* Animations */
    --transition-warp: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Border Radius */
    --radius-console: 16px;
    --radius-panel: 12px;
    --radius-control: 8px;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

body {
    font-family: 'Orbitron', 'Courier New', monospace, sans-serif;
    background: linear-gradient(135deg, 
        var(--bg-deep-space) 0%,
        var(--bg-space) 50%,
        var(--bg-nebula) 100%);
    color: var(--text-data);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Starfield Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(2px 2px at 20px 30px, #eee, transparent),
        radial-gradient(2px 2px at 40px 70px, #fff, transparent),
        radial-gradient(3px 3px at 60px 90px, #ddd, transparent),
        radial-gradient(2px 2px at 80px 40px, #eee, transparent),
        radial-gradient(3px 3px at 30px 80px, #fff, transparent),
        radial-gradient(2px 2px at 90px 60px, #ddd, transparent);
    background-size: 300px 300px;
    animation: stars 100s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes stars {
    from { transform: translateY(0); }
    to { transform: translateY(-1000px); }
}

/* ========== LOADING SCREEN - TRANSPORTER INIT ========== */
.auth-loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(10, 10, 26, 0.98) 0%,
        rgba(26, 26, 46, 0.98) 100%);
    backdrop-filter: blur(20px);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-spinner {
    width: 120px;
    height: 120px;
    border: 4px solid rgba(0, 184, 255, 0.2);
    border-top: 4px solid var(--starfleet-gold);
    border-right: 4px solid var(--starfleet-blue);
    border-bottom: 4px solid var(--starfleet-purple);
    border-left: 4px solid var(--starfleet-green);
    border-radius: 50%;
    animation: spin 2s linear infinite;
    box-shadow: 0 0 60px rgba(0, 184, 255, 0.5);
    position: relative;
}

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

.loading-text {
    margin-top: 40px;
    color: var(--starfleet-blue-light);
    font-size: 24px;
    font-weight: 900;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 0 0 25px var(--starfleet-blue);
    animation: pulse 2s ease-in-out infinite;
}

/* ========== MAIN APP LAYOUT - BRIDGE STRUCTURE ========== */
#mainApp {
    display: none;
    min-height: 100vh;
    background: 
        radial-gradient(circle at 10% 20%, rgba(0, 184, 255, 0.1) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(157, 78, 221, 0.1) 0%, transparent 40%);
    position: relative;
}

.page-container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 100px var(--spacing-lg) var(--spacing-lg);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .page-container {
        padding: 100px var(--spacing-md) var(--spacing-md);
    }
}

/* ========== PAGE HEADER - COMMAND CENTER ========== */
.page-header {
    background: linear-gradient(135deg, 
        rgba(0, 184, 255, 0.3) 0%,
        rgba(157, 78, 221, 0.3) 100%);
    color: var(--text-command);
    padding: var(--spacing-xl);
    border-radius: var(--radius-console);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-deep);
    border: 2px solid var(--border-console);
    position: relative;
    overflow: hidden;
    animation: hologram 4s ease-in-out infinite;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: scan 6s linear infinite;
}

.page-title {
    font-size: 36px;
    font-weight: 900;
    margin: 0 0 var(--spacing-sm) 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: var(--glow-blue);
    font-family: 'Orbitron', sans-serif;
}

.page-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
    color: var(--starfleet-blue-light);
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
}

/* Header Color Variants */
.page-header.green {
    background: linear-gradient(135deg, 
        rgba(0, 255, 157, 0.3) 0%,
        rgba(0, 200, 83, 0.3) 100%);
}

.page-header.orange {
    background: linear-gradient(135deg, 
        rgba(255, 145, 0, 0.3) 0%,
        rgba(255, 107, 0, 0.3) 100%);
}

/* ========== QUICK INFO - STATUS PANEL ========== */
.quick-info {
    background: var(--bg-console);
    border-radius: var(--radius-console);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-deep);
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    border: 2px solid var(--border-console);
    position: relative;
    overflow: hidden;
}

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

.info-icon {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: white;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-panel);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: var(--shadow-console);
    animation: pulse 3s ease-in-out infinite;
}

.current-month-badge {
    background: rgba(0, 255, 157, 0.2);
    color: var(--starfleet-green);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: var(--spacing-md);
    border: 2px solid rgba(0, 255, 157, 0.4);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== STATS GRID - BRIDGE DISPLAYS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.stat-card {
    background: var(--bg-console);
    padding: var(--spacing-lg);
    border-radius: var(--radius-console);
    box-shadow: var(--shadow-deep);
    border: 2px solid var(--border-console);
    border-left: 4px solid var(--starfleet-blue);
    transition: var(--transition-warp);
    position: relative;
    overflow: hidden;
    animation: hologram 5s ease-in-out infinite;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-holo);
    border-color: var(--starfleet-blue);
}

.stat-card.green {
    border-left-color: var(--starfleet-green);
}

.stat-card.orange {
    border-left-color: var(--starfleet-gold);
}

.stat-card.warning {
    border-left-color: var(--starfleet-red);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

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

.stat-icon {
    font-size: 28px;
    color: var(--starfleet-blue);
    text-shadow: var(--glow-blue);
}

.stat-value {
    font-size: 48px;
    font-weight: 900;
    color: var(--text-command);
    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 20px rgba(0, 184, 255, 0.4);
}

.stat-detail {
    font-size: 14px;
    color: var(--text-data);
    margin-top: var(--spacing-sm);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    border-top: 1px solid rgba(0, 184, 255, 0.2);
    padding-top: var(--spacing-sm);
}

/* ========== FILTER TABS - CONSOLE SELECTION ========== */
.filter-tabs {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--bg-console);
    border-radius: var(--radius-console);
    border: 2px solid var(--border-console);
}

.filter-tab {
    padding: var(--spacing-md) var(--spacing-lg);
    border: 2px solid transparent;
    background: rgba(0, 30, 60, 0.6);
    border-radius: var(--radius-control);
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-warp);
    border: 2px solid rgba(0, 184, 255, 0.3);
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-data);
    position: relative;
    overflow: hidden;
}

.filter-tab::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;
}

.filter-tab:hover {
    background: rgba(0, 184, 255, 0.2);
    border-color: var(--starfleet-blue);
    color: var(--starfleet-blue-light);
}

.filter-tab:hover::before {
    left: 100%;
}

.filter-tab.active {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: var(--text-command);
    border-color: var(--starfleet-blue);
    box-shadow: var(--shadow-console);
}

/* ========== COST SPECIFIC STYLES ========== */
.cost-type-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid;
}

.type-monthly {
    background: linear-gradient(135deg, 
        var(--starfleet-green) 0%,
        #00cc66 100%);
    color: white;
    border-color: rgba(0, 255, 157, 0.6);
}

.type-onetime {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: white;
    border-color: rgba(0, 184, 255, 0.6);
}

.status-badge-cost {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid;
}

.cost-active {
    background: rgba(0, 255, 157, 0.2);
    color: var(--starfleet-green);
    border-color: rgba(0, 255, 157, 0.4);
}

.cost-finished {
    background: rgba(192, 192, 192, 0.2);
    color: var(--starfleet-silver);
    border-color: rgba(192, 192, 192, 0.4);
}

.monthly-cost-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 184, 255, 0.1);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: var(--starfleet-green);
    margin-top: var(--spacing-sm);
    border: 1px solid rgba(0, 184, 255, 0.3);
    font-family: 'Courier New', monospace;
}

.monthly-cost-indicator i {
    animation: pulse 2s infinite;
}

.netto-amount {
    color: var(--starfleet-blue);
    font-weight: 900;
    text-shadow: var(--glow-blue);
}

.brutto-amount {
    color: var(--starfleet-green);
    font-weight: 900;
    text-shadow: var(--glow-green);
}

.vat-badge {
    background: rgba(0, 184, 255, 0.2);
    color: var(--starfleet-blue);
    padding: 6px 12px;
    border-radius: var(--radius-control);
    font-size: 12px;
    margin-top: var(--spacing-xs);
    display: inline-block;
    border: 1px solid rgba(0, 184, 255, 0.4);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

/* ========== CATEGORY BADGES - SYSTEM TAGS ========== */
.category-badge {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: 2px solid;
}

.category-sprzet { 
    background: rgba(0, 184, 255, 0.2); 
    color: var(--starfleet-blue); 
    border-color: rgba(0, 184, 255, 0.4);
}

.category-software { 
    background: rgba(157, 78, 221, 0.2); 
    color: var(--starfleet-purple); 
    border-color: rgba(157, 78, 221, 0.4);
}

.category-marketing { 
    background: rgba(255, 215, 0, 0.2); 
    color: var(--starfleet-gold); 
    border-color: rgba(255, 215, 0, 0.4);
}

.category-biuro { 
    background: rgba(0, 255, 157, 0.2); 
    color: var(--starfleet-green); 
    border-color: rgba(0, 255, 157, 0.4);
}

.category-logistyka { 
    background: rgba(255, 107, 0, 0.2); 
    color: #ff6f00; 
    border-color: rgba(255, 107, 0, 0.4);
}

.category-inne { 
    background: rgba(192, 192, 192, 0.2); 
    color: var(--starfleet-silver); 
    border-color: rgba(192, 192, 192, 0.4);
}

/* ========== PROGRESS BAR - SYSTEM METER ========== */
.cost-progress {
    margin-top: var(--spacing-md);
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-data);
    margin-bottom: var(--spacing-sm);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.progress-bar {
    height: 12px;
    background: rgba(0, 30, 60, 0.6);
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid rgba(0, 184, 255, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-green) 100%);
    transition: width 0.5s ease;
    box-shadow: 0 0 10px rgba(0, 184, 255, 0.4);
}

/* ========== CARDS - BRIDGE PANELS ========== */
.card {
    background: var(--bg-console);
    border-radius: var(--radius-console);
    box-shadow: var(--shadow-deep);
    margin-bottom: var(--spacing-xl);
    overflow: hidden;
    border: 2px solid var(--border-console);
    animation: hologram 6s ease-in-out infinite;
}

.card-header {
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--border-console);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(90deg, 
        rgba(0, 184, 255, 0.1) 0%,
        rgba(157, 78, 221, 0.1) 100%);
}

.card-title {
    font-size: 22px;
    font-weight: 900;
    color: var(--text-command);
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    text-shadow: var(--glow-blue);
}

.header-actions {
    display: flex;
    gap: var(--spacing-sm);
}

/* ========== TABLES - DATA STREAMS ========== */
.table-container {
    overflow-x: auto;
    background: rgba(0, 20, 40, 0.6);
}

.table-container table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.table-container thead {
    background: linear-gradient(90deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    color: var(--text-command);
}

.table-container th {
    padding: var(--spacing-lg) var(--spacing-md);
    text-align: left;
    font-weight: 900;
    font-size: 14px;
    white-space: nowrap;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
    border-bottom: 3px solid rgba(255, 255, 255, 0.3);
}

.table-container tbody tr {
    border-bottom: 1px solid rgba(0, 184, 255, 0.2);
    transition: var(--transition-warp);
    background: rgba(26, 26, 46, 0.7);
}

.table-container tbody tr:hover {
    background: rgba(0, 184, 255, 0.15);
    transform: translateX(5px);
    box-shadow: 0 10px 25px rgba(0, 184, 255, 0.2);
}

.table-container td {
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 14px;
    color: var(--text-data);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    vertical-align: top;
}

.cost-actions {
    display: flex;
    gap: var(--spacing-xs);
    opacity: 0;
    transition: opacity var(--transition-warp);
}

.table-container tbody tr:hover .cost-actions {
    opacity: 1;
}

/* ========== CHARTS - VISUAL DISPLAYS ========== */
.chart-container {
    background: var(--bg-console);
    border-radius: var(--radius-console);
    box-shadow: var(--shadow-deep);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    height: 400px;
    border: 2px solid var(--border-console);
    position: relative;
    overflow: hidden;
}

.chart-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(0, 184, 255, 0.1),
        transparent);
    animation: scan 8s linear infinite;
    pointer-events: none;
}

.chart-container h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-lg);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-command);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(600px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* ========== BUTTONS - BRIDGE CONTROLS ========== */
.btn {
    padding: var(--spacing-md) var(--spacing-lg);
    border: none;
    border-radius: var(--radius-control);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition-warp);
    text-decoration: none;
    white-space: nowrap;
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    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:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-blue-dark) 100%);
    color: white;
    border: 2px solid rgba(0, 184, 255, 0.6);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: var(--shadow-holo);
    background: linear-gradient(135deg, 
        var(--starfleet-blue-light) 0%,
        var(--starfleet-blue) 100%);
}

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

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

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

.btn-outline {
    background: transparent;
    color: var(--text-data);
    border: 2px solid var(--border-console);
}

.btn-outline:hover {
    background: rgba(0, 184, 255, 0.1);
    border-color: var(--starfleet-blue);
    color: var(--starfleet-blue-light);
}

.btn-group {
    display: flex;
    gap: var(--spacing-xs);
}

/* ========== MODAL - HOLODECK INTERFACE ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-lg);
    animation: hologram 0.3s ease-out;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(135deg, 
        rgba(10, 10, 26, 0.98) 0%,
        rgba(26, 26, 46, 0.98) 100%);
    border-radius: var(--radius-console);
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-holo);
    border: 3px solid var(--starfleet-blue);
    position: relative;
    overflow: hidden;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent,
        rgba(0, 184, 255, 0.15),
        transparent);
    animation: scan 5s linear infinite;
    pointer-events: none;
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 2px solid var(--border-console);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(0, 184, 255, 0.3) 0%,
        rgba(157, 78, 221, 0.3) 100%);
    color: white;
    border-radius: var(--radius-console) var(--radius-console) 0 0;
}

.modal-title {
    font-size: 22px;
    font-weight: 900;
    margin: 0;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(0, 184, 255, 0.4);
    color: var(--starfleet-blue-light);
    font-size: 24px;
    cursor: pointer;
    opacity: 0.8;
    transition: var(--transition-warp);
    padding: 8px;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    opacity: 1;
    background: rgba(255, 51, 102, 0.3);
    border-color: var(--starfleet-red);
    color: white;
    transform: rotate(90deg);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 2px solid var(--border-console);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-sm);
    background: rgba(10, 10, 26, 0.9);
}

/* ========== FORM GRID - CONTROL PANEL ========== */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.form-grid .form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.form-grid label {
    font-size: 14px;
    font-weight: 800;
    color: var(--starfleet-blue-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-family: 'Orbitron', sans-serif;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(0, 30, 60, 0.8);
    border: 2px solid var(--border-console);
    border-radius: var(--radius-control);
    font-size: 15px;
    font-family: 'Courier New', monospace;
    color: var(--text-data);
    letter-spacing: 1px;
    transition: var(--transition-warp);
}

.form-grid input:focus,
.form-grid select:focus,
.form-grid textarea:focus {
    outline: none;
    border-color: var(--starfleet-blue);
    background: rgba(0, 40, 80, 0.9);
    box-shadow: var(--glow-blue);
    transform: translateY(-2px);
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.amount-highlight {
    font-weight: 900;
    font-size: 18px;
    font-family: 'Orbitron', sans-serif;
    text-shadow: var(--glow-blue);
}

/* ========== PAGINATION - NAVIGATION CONTROLS ========== */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--spacing-lg);
    padding: 0 var(--spacing-md);
    font-size: 14px;
    color: var(--text-data);
    font-family: 'Orbitron', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========== RESPONSIVE - BRIDGE ADAPTATION ========== */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 350px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 100px var(--spacing-sm) var(--spacing-sm);
    }
    
    .quick-info {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-md);
    }
    
    .info-icon {
        width: 70px;
        height: 70px;
        font-size: 28px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-tabs {
        flex-direction: column;
    }
    
    .filter-tab {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-container {
        height: 300px;
        padding: var(--spacing-md);
    }
    
    .table-container {
        overflow-x: scroll;
    }
    
    .table-container table {
        min-width: 1200px;
    }
    
    .cost-actions {
        opacity: 1;
        flex-wrap: wrap;
    }
    
    .modal-content {
        max-width: 100%;
        margin: var(--spacing-sm);
    }
    
    .pagination-container {
        flex-direction: column;
        gap: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 36px;
    }
    
    .btn-sm {
        padding: 6px 12px;
        font-size: 11px;
    }
    
    .cost-type-badge,
    .category-badge,
    .status-badge-cost {
        padding: 6px 12px;
        font-size: 11px;
    }
}

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

::-webkit-scrollbar-track {
    background: rgba(0, 20, 40, 0.6);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, 
        var(--starfleet-blue) 0%,
        var(--starfleet-purple) 100%);
    border-radius: 6px;
    border: 2px solid rgba(0, 184, 255, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, 
        var(--starfleet-blue-light) 0%,
        #9d4edd 100%);
}

/* ========== SELECTION STYLING ========== */
::selection {
    background: rgba(0, 184, 255, 0.5);
    color: white;
}

::-moz-selection {
    background: rgba(0, 184, 255, 0.5);
    color: white;
}

/* ========== FOCUS STYLING ========== */
:focus {
    outline: 2px solid var(--starfleet-blue);
    outline-offset: 2px;
}

/* ========== SPECIAL BRIDGE EFFECTS ========== */
.bridge-alert {
    animation: alert 1s ease-in-out infinite;
}

@keyframes alert {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(255, 51, 102, 0.3);
        border-color: rgba(255, 51, 102, 0.4);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 51, 102, 0.6);
        border-color: var(--starfleet-red);
    }
}

.bridge-status-normal {
    animation: pulse 2s ease-in-out infinite;
}

.bridge-status-critical {
    animation: alert 0.5s ease-in-out infinite;
}

/* Data stream effect */
.data-stream-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent,
        var(--starfleet-blue),
        transparent);
    animation: scan 3s linear infinite;
    pointer-events: none;
}
/* W innych plikach CSS dodaj: */
.container, 
.page-container, 
.orders-container,
.allegro-container {
    padding-top: 90px !important;
}
/* ========== NAPRAWA PRZYCINANIA NAGŁÓWKA ========== */

/* Reset dla całej strony */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* Padding dla body aby nie ukrywało treści pod fixed header */
body {
    padding-top: 130px; /* Wysokość desktop nagłówka */
    background: #0a0a1a; /* Tło pasujące do gradient-bg */
}

/* Główny kontener treści */
main.container {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 20px 25px;
    background: rgba(10, 10, 26, 0.7); /* Półprzezroczyste tło */
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 184, 255, 0.2);
    min-height: calc(100vh - 150px); /* Dopasowanie wysokości */
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* ========== RESPONSYWNOŚĆ ========== */

/* Tablet */
@media (max-width: 1024px) and (min-width: 769px) {
    body {
        padding-top: 120px; /* Wysokość tablet nagłówka */
    }
    
    main.container {
        padding: 15px 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    body {
        padding-top: 70px; /* Wysokość mobile nagłówka */
        padding-bottom: 65px; /* Mobile bottom nav */
    }
    
    main.container {
        padding: 10px 12px;
        min-height: calc(100vh - 145px); /* Dopasowanie z bottom nav */
    }
}

/* Bardzo małe ekrany */
@media (max-width: 480px) {
    body {
        padding-top: 70px;
        padding-bottom: 60px;
    }
    
    main.container {
        padding: 8px 10px;
    }
}

/* Kosmiczne tło */
.gradient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: 
        radial-gradient(circle at 20% 30%, rgba(0, 184, 255, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 80% 70%, rgba(157, 78, 221, 0.08) 0%, transparent 30%),
        linear-gradient(135deg, #0a0a1a 0%, #1a1a2e 25%, #1e3c72 50%, #0066cc 75%, #0a0a1a 100%);
    background-size: 300% 300%;
    animation: warp 30s ease infinite;
    pointer-events: none;
}

/* Animacja dla gradient-bg */
@keyframes warp {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}