/* NOVE DE JULHO MARKETPLACE - CSS PAINEL LOJISTA */
/* Arquivo: assets/css/painel.css */
/* Descrição: Estilos específicos para o painel administrativo do lojista */
/* Data: 2024 */

/* Layout */
.main-content {
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
    margin-left: 0;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    z-index: 1050;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.sidebar.show {
    left: 0;
}

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

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.user-info h6 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.user-info small {
    opacity: 0.8;
    font-size: 0.8rem;
}

.btn-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.9);
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background: rgba(255,255,255,0.1);
    border-left-color: rgba(255,255,255,0.3);
}

.sidebar-nav .nav-link.active {
    color: white;
    background: rgba(255,255,255,0.15);
    border-left-color: white;
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: auto;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main Header */
.main-header {
    background: white;
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.notification-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-small {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

/* Page Content */
.page-content {
    padding: 2rem 0;
}

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Stats Cards */
.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.stat-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.stat-content p {
    color: #6c757d;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.stat-content small {
    font-size: 0.8rem;
}

/* Chart Cards */
.chart-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

/* Orders List */
.orders-list {
    max-height: 400px;
    overflow-y: auto;
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #f8f9fa;
    transition: background 0.3s ease;
}

.order-item:hover {
    background: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

.order-info h6 {
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.order-info small {
    color: #6c757d;
}

.order-status .badge {
    font-size: 0.8rem;
    padding: 0.5rem 0.75rem;
}

.order-total {
    font-weight: 600;
    color: #28a745;
}

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

.table thead th {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    color: #2c3e50;
    font-weight: 600;
    padding: 1rem 0.75rem;
}

.table tbody td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid #f8f9fa;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* Product Thumbnail */
.product-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    margin-right: 1rem;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons */
.btn-group-sm .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.9rem;
}

/* Dropdown Menus */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background: #f8f9fa;
    color: #667eea;
}

/* Animations */
.sidebar {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

.stat-card {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .main-content {
        margin-left: 0;
    }

    .sidebar {
        left: -280px;
    }

    .sidebar.show {
        left: 0;
    }

    .sidebar-overlay.show {
        opacity: 1;
        visibility: visible;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 0.75rem 0;
    }

    .header-actions {
        gap: 0.5rem;
    }

    .page-content {
        padding: 1rem 0;
    }

    .welcome-card {
        padding: 1.5rem;
        text-align: center;
    }

    .stat-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .stat-content h3 {
        font-size: 1.5rem;
    }

    .table-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    .table-responsive {
        font-size: 0.9rem;
    }

    .order-item {
        padding: 0.75rem 1rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .order-item > div {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        left: -100%;
    }

    .welcome-card h2 {
        font-size: 1.5rem;
    }

    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .stat-content h3 {
        font-size: 1.3rem;
    }

    .table {
        font-size: 0.8rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.5rem;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .main-header {
        background: #2c3e50;
        border-bottom-color: #34495e;
    }

    .main-header .btn {
        color: #ecf0f1;
    }

    .welcome-card {
        background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    }

    .stat-card {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .stat-content h3 {
        color: #ecf0f1;
    }

    .stat-content p {
        color: #bdc3c7;
    }

    .chart-card {
        background: #34495e;
        border-color: #4a5f7a;
    }

    .table-header {
        border-bottom-color: #4a5f7a;
    }

    .table-header h5 {
        color: #ecf0f1;
    }

    .table thead th {
        background: #2c3e50;
        border-bottom-color: #4a5f7a;
        color: #ecf0f1;
    }

    .table tbody td {
        border-top-color: #4a5f7a;
    }

    .table tbody tr:hover {
        background: #2c3e50;
    }

    .order-item {
        border-bottom-color: #4a5f7a;
    }

    .order-item:hover {
        background: #2c3e50;
    }

    .order-info h6 {
        color: #ecf0f1;
    }

    .order-info small {
        color: #95a5a6;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .main-header,
    .btn-group {
        display: none !important;
    }

    .main-content {
        margin-left: 0;
    }

    .stat-card,
    .chart-card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }

    .table {
        font-size: 0.8rem;
    }
}

/* Accessibility */
.sidebar-nav .nav-link:focus,
.btn:focus,
.dropdown-toggle:focus {
    outline: 2px solid rgba(255,255,255,0.5);
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .sidebar {
        border-right: 2px solid #000;
    }

    .stat-card {
        border: 2px solid #000;
    }

    .chart-card {
        border: 2px solid #000;
    }
}

/* Loading States */
.stat-card.loading,
.chart-card.loading {
    position: relative;
    overflow: hidden;
}

.stat-card.loading::before,
.chart-card.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}
