﻿/* site.css - Główny plik stylów - DARK FUTURISTIC THEME */
/* Import czcionek */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700;900&family=Exo+2:wght@300;400;500;600;700&display=swap');

/* Import innych plików CSS */
@import url('layout.css');
@import url('components.css');
@import url('auth.css');
@import url('admin.css');
@import url('customer.css');
@import url('animations.css');
@import url('utilities.css');
@import url('mobile.css');

/* ---- GŁÓWNE ZMIENNE - DARK FUTURISTIC ---- */
:root {
    /* Kolory główne - ciemny futurystyczny motyw */
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f093fb 50%, #667eea 75%, #764ba2 100%);
    --secondary-gradient: linear-gradient(45deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    --accent-gradient: linear-gradient(120deg, #e94560 0%, #f093fb 50%, #667eea 100%);
    --aurora-gradient: linear-gradient(180deg, rgba(102,126,234,0.2) 0%, rgba(240,147,251,0.1) 50%, rgba(233,69,96,0.2) 100%);
    /* Kolory bazowe - ciemniejsze */
    --pink-light: #f093fb;
    --pink-medium: #e94560;
    --pink-dark: #c41e3a;
    --purple-light: #9d4edd;
    --purple-medium: #764ba2;
    --purple-dark: #5a189a;
    --blue-accent: #667eea;
    --cyan-accent: #00d9ff;
    /* Tła - bardzo ciemne */
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.08);
    /* Teksty */
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    /* Efekty - bardziej subtelne */
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.3);
    --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
    --blur-amount: 20px;
    /* Wymiary */
    --sidebar-width: 280px;
    --sidebar-collapsed: 80px;
    --border-radius: 16px;
    --border-radius-small: 8px;
    /* Animacje */
    --transition-fast: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- RESET I PODSTAWY ---- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Exo 2', sans-serif;
    background: var(--bg-primary);
    background-image: radial-gradient(ellipse at top left, rgba(102, 126, 234, 0.15) 0%, transparent 40%), radial-gradient(ellipse at bottom right, rgba(233, 69, 96, 0.15) 0%, transparent 40%), linear-gradient(180deg, #0a0a0f 0%, #12121a 50%, #0a0a0f 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    line-height: 1.6;
}

    /* Subtelniejszy animowany background */
    body::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: var(--aurora-gradient);
        opacity: 0.15;
        animation: aurora 20s ease-in-out infinite;
        pointer-events: none;
        z-index: -1;
    }

/* ---- TYPOGRAFIA ---- */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Gradient tylko dla h1 i h2 */
h1, h2 {
    background: linear-gradient(90deg, var(--blue-accent) 0%, var(--pink-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.1rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

a {
    text-decoration: none;
    color: var(--blue-accent);
    transition: var(--transition-fast);
}

    a:hover {
        color: var(--pink-light);
    }

/* ---- SCROLLBAR STYLING ---- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--blue-accent), var(--purple-medium));
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, var(--pink-light), var(--purple-medium));
    }

/* ---- GLASSMORPHISM UPDATES ---- */
.glass {
    background: rgba(255, 255, 255, 0.01);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ---- NEON EFFECTS ---- */
.neon-glow {
    text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
}

.neon-border {
    box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.5), 0 0 20px rgba(102, 126, 234, 0.3);
}

/* ---- INPUTS & FORMS ---- */
input,
textarea,
select {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    color: var(--text-primary) !important;
    transition: all var(--transition-fast);
}

    input:focus,
    textarea:focus,
    select:focus {
        background: rgba(255, 255, 255, 0.05) !important;
        border-color: var(--blue-accent) !important;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.3) !important;
        outline: none !important;
    }

    input::placeholder,
    textarea::placeholder {
        color: var(--text-muted) !important;
    }

/* ---- BUTTONS ---- */
.btn {
    background: linear-gradient(135deg, var(--blue-accent) 0%, var(--purple-medium) 100%);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-fast);
}

    .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;
    }

    .btn:hover::before {
        left: 100%;
    }

    .btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
    }

/* ---- CARDS ---- */
.card,
.content-box {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

    .card:hover,
    .content-box:hover {
        background: rgba(255, 255, 255, 0.04);
        border-color: rgba(102, 126, 234, 0.4);
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.2);
    }

/* ---- TABLES ---- */
table {
    background: transparent;
}

thead {
    background: rgba(102, 126, 234, 0.1);
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

    tbody tr:hover {
        background: rgba(102, 126, 234, 0.05);
    }

/* ---- ALERTS & MESSAGES ---- */
.alert-success,
.success-message {
    background: rgba(0, 217, 255, 0.1) !important;
    border: 1px solid rgba(0, 217, 255, 0.3) !important;
    color: var(--cyan-accent) !important;
}

.alert-danger {
    background: rgba(233, 69, 96, 0.1) !important;
    border: 1px solid rgba(233, 69, 96, 0.3) !important;
    color: var(--pink-medium) !important;
}

/* ---- SIDEBAR ---- */
.sidebar {
    background: rgba(10, 10, 15, 0.95);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(102, 126, 234, 0.2);
}

    .sidebar nav a {
        color: var(--text-secondary);
        transition: all var(--transition-fast);
    }

        .sidebar nav a:hover,
        .sidebar nav a.active {
            background: linear-gradient(90deg, transparent, rgba(102, 126, 234, 0.1));
            color: var(--text-primary);
            border-left: 3px solid var(--blue-accent);
        }

/* ---- ACCESSIBILITY ---- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

*:focus {
    outline: 2px solid var(--blue-accent);
    outline-offset: 2px;
}

/* ---- ANIMATIONS ---- */
@keyframes aurora {
    0%, 100% {
        transform: rotate(0deg) scale(1);
        opacity: 0.15;
    }

    25% {
        transform: rotate(1deg) scale(1.05);
        opacity: 0.2;
    }

    50% {
        transform: rotate(-1deg) scale(1.1);
        opacity: 0.15;
    }

    75% {
        transform: rotate(0.5deg) scale(1.05);
        opacity: 0.18;
    }
}

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    :root {
        --sidebar-width: 0;
        --border-radius: 12px;
        --border-radius-small: 6px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }
}

/* ---- PRINT STYLES ---- */
@media print {
    body {
        background: white;
        color: black;
    }

    .sidebar,
    .hamburger,
    .user-menu {
        display: none !important;
    }
}
/* RESPONSIVE & DROPDOWN FIXES */

/* ---- DROPDOWN/SELECT FIXES ---- */
select,
select.form-control,
select.form-select,
select.filter-input {
    background: rgba(16, 16, 26, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    cursor: pointer;
}

    select option {
        background: #1a1a2e !important;
        color: #ffffff !important;
        padding: 0.5rem;
    }

    select:focus {
        background: rgba(16, 16, 26, 0.95) !important;
        color: #ffffff !important;
        border-color: #667eea !important;
        outline: none !important;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.3) !important;
    }

/* Dla input type="date" i innych specjalnych */
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"] {
    background: rgba(16, 16, 26, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
    color-scheme: dark;
}

    input[type="date"]::-webkit-calendar-picker-indicator,
    input[type="time"]::-webkit-calendar-picker-indicator,
    input[type="datetime-local"]::-webkit-calendar-picker-indicator {
        filter: invert(1);
        cursor: pointer;
    }

/* ---- RESPONSIVE CONTAINER ---- */
.container,
.container-fluid,
.content-wrapper {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
    }

    .content-wrapper {
        padding: 0.75rem;
    }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }

    .content-wrapper {
        padding: 1rem;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .content-wrapper {
        padding: 1.5rem;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .content-wrapper {
        padding: 2rem;
    }
}

/* XXL devices (larger desktops, 1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* ---- RESPONSIVE SIDEBAR ---- */
@media (max-width: 991px) {
    #container {
        grid-template-columns: 1fr !important;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -100%;
        width: 280px;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        background: rgba(10, 10, 15, 0.98) !important;
    }

        .sidebar.active {
            left: 0;
            box-shadow: 5px 0 25px rgba(0, 0, 0, 0.5);
        }

    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        cursor: pointer;
        background: rgba(16, 16, 26, 0.8);
        border: 1px solid rgba(102, 126, 234, 0.3);
        border-radius: 8px;
        color: #667eea;
        font-size: 1.4rem;
        transition: all 0.3s;
    }

        .hamburger:hover {
            background: rgba(102, 126, 234, 0.2);
            transform: scale(1.05);
        }

    .mobile-menu-overlay {
        display: block !important;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s;
    }

        .mobile-menu-overlay.active {
            opacity: 1;
            visibility: visible;
        }
}

/* ---- RESPONSIVE TABLES ---- */
@media (max-width: 767px) {
    .table-container,
    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 600px;
    }

    th, td {
        font-size: 0.875rem;
        padding: 0.75rem 0.5rem;
    }
}

/* ---- RESPONSIVE CARDS/GRID ---- */
.dashboard-grid,
.admin-dashboard-grid,
.cards-grid {
    display: grid;
    gap: 1.5rem;
    padding: 1.5rem;
}

/* Desktop - 4 columns */
@media (min-width: 1400px) {
    .dashboard-grid,
    .admin-dashboard-grid,
    .cards-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large desktop - 3 columns */
@media (min-width: 992px) and (max-width: 1399px) {
    .dashboard-grid,
    .admin-dashboard-grid,
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablet - 2 columns */
@media (min-width: 768px) and (max-width: 991px) {
    .dashboard-grid,
    .admin-dashboard-grid,
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile - 1 column */
@media (max-width: 767px) {
    .dashboard-grid,
    .admin-dashboard-grid,
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
}

/* ---- RESPONSIVE FORMS ---- */
@media (max-width: 767px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }

    .filter-row {
        flex-direction: column;
        gap: 1rem;
    }

    .filter-group {
        width: 100%;
    }

    .form-control,
    .form-select,
    select {
        font-size: 16px !important; /* Prevent iOS zoom */
        min-height: 44px;
    }
}

/* ---- RESPONSIVE HEADER ---- */
@media (max-width: 767px) {
    main header {
        padding: 1rem;
        flex-wrap: wrap;
    }

        main header h2 {
            font-size: 1.25rem;
            flex: 1;
        }

    .user-menu {
        gap: 0.75rem;
    }

    .user-profile .user-role {
        display: none;
    }
}

/* ---- RESPONSIVE BUTTONS ---- */
@media (max-width: 575px) {
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }

    .admin-actions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .admin-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ---- RESPONSIVE TYPOGRAPHY ---- */
@media (max-width: 767px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    h5 {
        font-size: 1rem;
    }

    h6 {
        font-size: 0.9rem;
    }

    .content-header h2 {
        font-size: 1.3rem;
    }
}

/* ---- RESPONSIVE UTILITIES ---- */
@media (max-width: 991px) {
    .hide-md {
        display: none !important;
    }

    .show-md {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }

    .show-desktop {
        display: block !important;
    }
}

/* ---- FIX DLA BIAŁYCH INPUTÓW W CIEMNYM MOTYWIE ---- */
input:not([type="checkbox"]):not([type="radio"]),
textarea {
    background: rgba(16, 16, 26, 0.9) !important;
    color: #ffffff !important;
    border: 1px solid rgba(102, 126, 234, 0.3) !important;
}

    input:not([type="checkbox"]):not([type="radio"]):focus,
    textarea:focus {
        background: rgba(16, 16, 26, 0.95) !important;
        color: #ffffff !important;
        border-color: #667eea !important;
        box-shadow: 0 0 15px rgba(102, 126, 234, 0.3) !important;
    }

    input::placeholder,
    textarea::placeholder {
        color: rgba(255, 255, 255, 0.4) !important;
    }

/* Autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1a1a2e inset !important;
    -webkit-text-fill-color: #ffffff !important;
    box-shadow: 0 0 0 30px #1a1a2e inset !important;
}

/* ---- MODAL RESPONSIVE ---- */
@media (max-width: 575px) {
    .modal {
        margin: 1rem;
        max-width: calc(100% - 2rem);
        padding: 1.5rem;
    }
}

/* ---- TIMELINE RESPONSIVE ---- */
@media (max-width: 767px) {
    .horizontal-timeline {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

        .horizontal-timeline::before,
        .horizontal-timeline::after {
            display: none;
        }

    .timeline-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

@media (max-width: 479px) {
    .horizontal-timeline {
        grid-template-columns: 1fr;
    }
}

/* ---- PREVENT HORIZONTAL SCROLL ---- */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

main {
    overflow-x: hidden;
}

/* ---- CUSTOMER PANEL FULL WIDTH FIX ---- */
@media (min-width: 992px) {
    .customer-panel .content-wrapper {
        max-width: 100% !important;
        width: 100% !important;
    }

    .customer-panel .dashboard-container {
        width: 100% !important;
    }
}