﻿:root {
    --primary-color: #4a6cfa;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --sidebar-width: 250px;
    --sidebar-collapsed-width: 70px;
    --header-height: 60px;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    
    /* Category colors */
    --category-blue: #3498db;
    --category-green: #2ecc71;
    --category-orange: #f39c12;
    --category-purple: #9b59b6;
    --category-red: #e74c3c;
    --category-teal: #1abc9c;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    background-color: #f5f7fb;
    color: #495057;
}

.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: var(--sidebar-width);
    background: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    transition: width 0.3s;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
}

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

.sidebar-header {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    height: 80px;
}

.app-logo {
    max-width: 130px;
    max-height: 40px;
    object-fit: contain;
    display: block;
}

.sidebar-nav {
    padding: 1rem 0;
    flex-grow: 1;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav ul li {
    margin-bottom: 5px;
}

.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav ul li a:hover {
    background-color: rgba(74, 108, 250, 0.05);
    color: var(--primary-color);
}

.sidebar-nav ul li.active a {
    color: var(--primary-color);
    background-color: rgba(74, 108, 250, 0.1);
    border-left: 3px solid var(--primary-color);
}

.sidebar-nav ul li a i {
    min-width: 22px;
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar.collapsed .logo-container span,
.sidebar.collapsed .sidebar-nav ul li a span,
.sidebar.collapsed .sidebar-footer span {
    display: none;
}

.sidebar.collapsed .sidebar-nav ul li a {
    justify-content: center;
    padding: 0.75rem;
}

.sidebar.collapsed .sidebar-nav ul li a i {
    margin-right: 0;
    font-size: 1.2rem;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
    margin-left: 0;
    padding: 0;
}

.sidebar.collapsed .logo-large {
    display: none;
}

.sidebar.collapsed .logo-small {
    display: block;
    padding: 0;
    margin: 5px auto;
}

/* Main Content Styles */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left 0.3s;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

.top-nav {
    height: var(--header-height);
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 900;
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
    margin-left: 1rem;
    color: var(--dark-color);
}

.btn-toggle-menu {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.btn-toggle-menu:hover {
    color: var(--primary-color);
}

.content-wrapper {
    padding: 1.5rem;
}

/* Card Styles */
.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    border: none;
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.5rem;
    background-color: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

/* Dashboard Cards */
.stats-card {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    border-radius: 10px;
}

.stats-card .icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 1rem;
    font-size: 1.5rem;
}

.stats-card .content .number {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.stats-card .content .label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Colors for stat cards */
.stats-card.primary {
    background-color: rgba(74, 108, 250, 0.1);
    color: var(--primary-color);
}

.stats-card.primary .icon {
    background-color: var(--primary-color);
    color: white;
}

.stats-card.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
}

.stats-card.success .icon {
    background-color: var(--success-color);
    color: white;
}

.stats-card.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
}

.stats-card.warning .icon {
    background-color: var(--warning-color);
    color: white;
}

.stats-card.danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
}

.stats-card.danger .icon {
    background-color: var(--danger-color);
    color: white;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 500;
    color: var(--secondary-color);
    border-top: none;
}

.table tbody tr {
    transition: background-color 0.3s;
}

.table tbody tr:hover {
    background-color: rgba(74, 108, 250, 0.02);
}

/* Category Cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.5rem;
}

.category-card {
    display: flex;
    align-items: center;
    padding: 1.25rem;
    border-radius: 10px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    z-index: 1;
}

.category-card .icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    z-index: 2;
}

.category-card .content {
    z-index: 2;
}

.category-card .content h3 {
    font-size: 1.25rem;
    margin: 0;
    margin-bottom: 0.25rem;
}

.category-card .content p {
    margin: 0;
    opacity: 0.9;
}

.category-card .count {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 0.9rem;
    opacity: 0.8;
    z-index: 2;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #3a5bd9;
    border-color: #3a5bd9;
}

/* Form Controls */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(74, 108, 250, 0.25);
}

/* Product Detail */
.product-image {
    max-width: 100%;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.product-info {
    margin-bottom: 2rem;
}

.product-info h1 {
    margin-bottom: 0.5rem;
}

.product-info .category {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.product-info .description {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.product-meta {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.product-meta .item {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.product-meta .item .label {
    font-size: 0.85rem;
    color: var(--secondary-color);
    margin-bottom: 0.25rem;
}

.product-meta .item .value {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f7fb;
}

.login-card {
    max-width: 400px;
    width: 100%;
    padding: 2rem;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.login-card .login-logo {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.login-card .login-logo i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.login-card .login-logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form .form-control {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}

.login-form .btn-primary {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    margin-top: 1rem;
}

/* Notification Styles */
.notification-dropdown .dropdown-menu {
    width: 320px;
}

.notification-header {
    background-color: #f8f9fa;
}

.notification-item {
    transition: all 0.2s;
}

.notification-item:hover {
    background-color: rgba(74, 108, 250, 0.05);
}

.notification-list .notification-item {
    border-left: 4px solid transparent;
    padding: 15px;
}

.notification-list .notification-item.unread {
    border-left-color: var(--primary-color);
    background-color: rgba(74, 108, 250, 0.05);
}

.notification-title {
    font-weight: 600;
}

.notification-message {
    color: #6c757d;
}

/* Badge for notifications */
#notification-counter {
    font-size: 0.6rem;
}

.btn-toggle-menu {
    background: none;
    border: none;
    color: var(--secondary-color);
    cursor: pointer;
    font-size: 1.25rem;
}

/* Responsive */
@media (max-width: 991.98px) {
    .sidebar {
        width: var(--sidebar-width);
        transform: translateX(-100%);
    }
    
    .sidebar.collapsed {
        transform: translateX(0);
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .main-content.expanded {
        margin-left: 0;
    }
    
    .sidebar.collapsed .logo-container span,
    .sidebar.collapsed .sidebar-nav ul li a span,
    .sidebar.collapsed .sidebar-footer span {
        display: inline;
    }
    
    .sidebar.collapsed .sidebar-nav ul li a {
        justify-content: flex-start;
        padding: 0.75rem 1.5rem;
    }
    
    .sidebar.collapsed .sidebar-nav ul li a i {
        margin-right: 10px;
    }
}

@media (max-width: 767.98px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* Carousel Overlay */
#carouselOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1050;
    display: flex;
    justify-content: center;
    align-items: center;
}

#carouselContainer {
    width: 90%;
    max-width: 1200px;
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Product Carousel */
.product-carousel-container {
    position: relative;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.swiper-container {
    width: 100%;
    height: 400px;
}

.carousel-product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
    cursor: pointer;
}

.carousel-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.carousel-product-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.no-image-placeholder {
    width: 100%;
    height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #f5f5f5;
}

.carousel-product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.carousel-product-info h4 {
    margin-top: 0;
    font-size: 1.2rem;
}

.no-products-message {
    width: 100%;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    color: #6c757d;
}
