:root {
    --primary: #1a6e8e;
    --secondary: #f9a826;
    --light: #f5f8fa;
    --dark: #1e3a52;
    --accent: #64b5f6;
    --river-light: #b3e0ff;
    --river-dark: #0077be;
    --sidebar-width: 280px; /* Szerokość sidebarʼa */
    --sidebar-collapsed-width: 60px; /* Szerokość zminimalizowanego sidebarʼa */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Quicksand', sans-serif;
    background: linear-gradient(135deg, var(--light) 0%, #e0f7fa 100%);
    color: var(--dark);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
    
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-image {
    max-width: 180px;
    max-height: 180px;
    width: auto;
    height: auto;
    animation: pulse 1.5s ease-in-out infinite alternate;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Overlay */
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><path d="M20,50 Q35,35 50,50 T80,50" fill="none" stroke="%230077be" stroke-width="0.5" stroke-opacity="0.1"/></svg>') repeat;
    opacity: 0.15;
    z-index: -1;
}

/* River Accent */
.river-accent {
    position: absolute;
    width: 100%;
    height: 30px;
    background: linear-gradient(90deg, transparent, var(--river-light), var(--river-dark), var(--river-light), transparent);
    top: 80px;
    left: 0;
    opacity: 0.3;
    z-index: -1;
    transform: skewY(-1deg);
}

.river-accent::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 0;
    width: 100%;
    height: 15px;
    background: linear-gradient(90deg, transparent, var(--river-light), var(--river-dark), var(--river-light), transparent);
    opacity: 0.2;
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(26, 110, 142, 0.95) 0%, rgba(30, 58, 82, 0.95) 100%);
    padding: 15px 0;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-container {
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo a {
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 24px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.logo a:hover {
    color: var(--secondary);
}

.logo-icon {
    margin-right: 10px;
    font-size: 28px;
    color: var(--secondary);
}

/* Hamburger menu */
.hamburger-menu {
    display: none;
    cursor: pointer;
    width: 30px;
    height: 30px;
    position: relative;
    z-index: 102;
}

.hamburger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    margin: 6px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

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

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

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

/* Navigation */
nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

nav ul {
    display: flex;
    list-style: none;
    justify-content: flex-end;
}

nav ul li {
    margin-left: 25px;
    position: relative;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--secondary);
}

nav ul li a:hover::after {
    width: 100%;
}

/* Two-column layout */
.container {
    max-width: 100%;
    margin: 0 0;
    position: relative;
    z-index: 1;
    display: flex;
    min-height: calc(100vh - 100px - 80px); /* Viewport height minus header and footer */
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: rgba(255, 255, 255, 0.9);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: 30px 15px;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    position: relative;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    flex-shrink: 0;
    min-height: 86vh;
}

/* Sidebar toggle button */
.sidebar-toggle {
    position: absolute;
    right: -15px;
    top: 20px;
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: none;
}

.sidebar-toggle::before {
    content: '◀';
    font-size: 14px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-toggle::before {
    transform: rotate(180deg);
}

.sidebar.collapsed .sidebar-content {
    opacity: 0;
    visibility: hidden;
}

.sidebar-content {
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* Main content */
.main-content-wrapper {
    flex: 1;
    padding: 40px 20px;
    overflow-x: hidden;
}

.main-content {
    position: relative;
    background-color: rgba(255, 255, 255, 0.85);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 30px;
    margin-bottom: 40px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, transparent 60%, rgba(100, 181, 246, 0.1) 100%);
    border-radius: 0 0 0 100%;
}

h1, h2, h3 {
    color: var(--primary);
    margin-bottom: 20px;
}

h1 {
    font-size: 32px;
    position: relative;
    display: inline-block;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary), transparent);
}

p {
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 8px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.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.6s ease;
    z-index: -1;
}

.btn:hover {
    background: var(--dark);
    transform: translateY(-2px);
}

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

.btn-secondary {
    background: var(--secondary);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 10px 20px;
    font-size: 16px;
}

/* Footer */
footer {
    font-size: 10px;
    background: #fffffe;
    position: absolute;
  bottom: 0;
  width: 100%;
  z-index: 400;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.footer-wave {
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 30" preserveAspectRatio="none"><path d="M0,0 C300,30 900,30 1200,0 L1200,30 L0,30 Z" fill="%231a6e8e"/></svg>');
    background-size: 100% 100%;
}

footer .company {
    font-weight: bold;
}

footer #support {
    color: var(--bs-secondary-color) !important;
}

footer #support a {
    color: var(--bs-secondary-color) !important;
    text-decoration: none;
    border: solid 1px #eff0f250;
    padding: 0 2px 0 0;
    transition: all 0.3s ease-in-out;
}

footer #support a:hover {
    border: solid 1px #14540450;
}

footer #support a:hover span {
    background-color: #145404;
}

footer #support a span {
    background-color: #46b450;
    transition: all 0.3s ease-in-out;
    color: white;
    font-weight: bold;
    padding: 1px 2px;
}

.pro-user-container {
    display: flex;
    justify-content: space-between;
    gap: 20px; 
    padding: 0 20px;
}

.pro-user-column {
    flex: 1;
    min-width: 0; 
}

/* Responsive */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        padding: 15px;
    }
    
    .sidebar-toggle {
        display: none;
    }
    
    .main-content-wrapper {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .header-container {
        grid-template-columns: auto auto auto;
        padding: 0 15px;
    }
    
    .hamburger-menu {
        display: block;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
        z-index: 101;
        transition: right 0.3s ease;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    
    nav ul li {
        margin: 0 0 15px 0;
        width: 100%;
    }
    
    nav ul li a {
        display: block;
        padding: 10px 0;
        font-size: 18px;
    }
    
    /* Transparentne tło po otwarciu menu */
    .menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 90;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .menu-overlay.active {
        display: block;
        opacity: 1;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 20px 15px;
    }
    
    h1 {
        font-size: 26px;
    }
    
    .pro-user-container {
        flex-direction: column;
        gap: 10px;
    }
}