:root {
    --sidebar-width: 250px;
    --sidebar-bg: linear-gradient(180deg, #0c4a6e 0%, #0f766e 50%, #0d3b66 100%);
    --primary: #0d6efd;
    --success: #198754;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    overflow-x: hidden;
}

#wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow: hidden;
}

.sidebar .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 12px 20px;
    border-radius: 0;
    transition: all 0.2s;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-icon-dash { color: #4fc3f7; }
.nav-icon-pos { color: #81c784; }
.nav-icon-orders { color: #ffb74d; }
.nav-icon-products { color: #ce93d8; }
.nav-icon-customers { color: #4db6ac; }
.nav-icon-reports { color: #ef9a9a; }
.nav-icon-expenses { color: #f06292; }
.nav-icon-settings { color: #90a4ae; }
.nav-icon-users { color: #ff8a65; }
.nav-icon-branches { color: #aed581; }

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    border-left: 3px solid #fff;
}

.sidebar-header {
    padding: 15px;
    position: relative;
    z-index: 2;
}

.sidebar-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../sidbar.gif') center center / cover no-repeat;
    background-blend-mode: multiply;
}

.sidebar-bg i {
    position: absolute;
    opacity: 0.5;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
    filter: drop-shadow(0 0 4px rgba(255,255,255,0.2));
}

.sidebar-bg .creature-1 {
    font-size: 28px;
    color: #b3e5fc;
    top: 10%;
    animation: swimRight 12s infinite;
}

.sidebar-bg .creature-2 {
    font-size: 20px;
    color: #ffab91;
    top: 30%;
    animation: swimLeft 10s infinite;
    transform: scaleX(-1);
}

.sidebar-bg .creature-3 {
    font-size: 16px;
    color: #fff59d;
    top: 55%;
    animation: floatUp 8s infinite;
}

.sidebar-bg .creature-4 {
    font-size: 24px;
    color: #a5d6a7;
    top: 75%;
    animation: swimRight 14s infinite;
}

.sidebar-bg .creature-5 {
    font-size: 18px;
    color: #e0bbe4;
    top: 90%;
    animation: swimLeft 11s infinite;
    transform: scaleX(-1);
}

.sidebar-bg .creature-6 {
    font-size: 22px;
    color: #80deea;
    top: 45%;
    animation: floatUp 13s infinite 3s;
}

.sidebar-bg .bubble {
    position: absolute;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    animation: floatUp 6s infinite ease-in;
}

.sidebar-bg .b1 { left: 20%; width: 4px; height: 4px; animation-delay: 0s; }
.sidebar-bg .b2 { left: 50%; width: 8px; height: 8px; animation-delay: 2s; }
.sidebar-bg .b3 { left: 75%; width: 5px; height: 5px; animation-delay: 4s; }

@keyframes swimRight {
    0% { left: -40px; }
    100% { left: 110%; }
}

@keyframes swimLeft {
    0% { left: 110%; }
    100% { left: -40px; }
}

@keyframes floatUp {
    0% { bottom: -30px; opacity: 0; }
    10% { opacity: 0.15; }
    90% { opacity: 0.15; }
    100% { bottom: 110%; opacity: 0; }
}


#page-content-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
}

#menuToggle {
    display: none;
}

.card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.btn {
    border-radius: 8px;
    padding: 8px 16px;
}

.btn-lg {
    padding: 12px 24px;
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

.table {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.badge {
    padding: 6px 12px;
    font-weight: 500;
}

.stat-card {
    padding: 20px;
    border-radius: 10px;
    color: #fff;
}

.stat-card .stat-icon {
    font-size: 2.5rem;
    opacity: 0.3;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    #page-content-wrapper {
        margin-left: 0;
    }
    #menuToggle {
        display: inline-block;
    }
}

@media (max-width: 575.98px) {
    .stat-card .stat-number {
        font-size: 1.5rem;
    }
    .container-fluid {
        padding: 10px !important;
    }
}
