/* A1 Solar Market Admin Panel - Custom Styles */

:root {
    --solar-primary: #134067;
    --solar-secondary: #ebbd12;
    --solar-accent: #1a5a8a;
    --solar-dark: #0d2a42;
    --solar-light: #F8F9FA;
    --solar-gray: #6C757D;
    --sidebar-width: 280px;
    --header-height: 60px;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--solar-dark) 0%, var(--solar-primary) 100%);
    color: #fff;
    z-index: 1000;
    transition: all 0.3s ease;
    overflow-y: auto;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
}

    .sidebar::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar::-webkit-scrollbar-track {
        background: rgba(255, 255, 255, 0.1);
    }

    .sidebar::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.3);
        border-radius: 3px;
    }

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

    .sidebar-logo i {
        font-size: 2.5rem;
        color: var(--solar-secondary);
    }

    .sidebar-logo h4 {
        font-size: 1.3rem;
        font-weight: 700;
        margin: 0;
        color: #fff;
    }

    .sidebar-logo span {
        color: var(--solar-secondary);
    }

/* Navigation Menu */
.sidebar-nav {
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 10px;
}

.nav-section-title {
    padding: 10px 25px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    gap: 12px;
}

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #fff;
        border-left-color: var(--solar-secondary);
    }

    .nav-link.active {
        background: rgba(235, 189, 18, 0.15);
        color: var(--solar-secondary);
        border-left-color: var(--solar-secondary);
    }

    .nav-link i {
        width: 22px;
        font-size: 1.1rem;
        text-align: center;
    }

    .nav-link span {
        font-size: 0.95rem;
        font-weight: 500;
    }

.nav-badge {
    margin-left: auto;
    padding: 3px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 20px;
    background: var(--solar-secondary);
    color: var(--solar-dark);
}

/* Main Content Area */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: all 0.3s ease;
}

/* Top Header */
.top-header {
    position: sticky;
    top: 0;
    height: var(--header-height);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    z-index: 999;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--solar-primary);
    cursor: pointer;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--solar-gray);
    font-size: 0.9rem;
}

    .breadcrumb-nav a {
        color: var(--solar-primary);
    }

        .breadcrumb-nav a:hover {
            color: var(--solar-secondary);
        }

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--solar-light);
    border: none;
    border-radius: 10px;
    color: var(--solar-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

    .header-icon-btn:hover {
        background: var(--solar-primary);
        color: #fff;
    }

    .header-icon-btn .badge {
        position: absolute;
        top: -5px;
        right: -5px;
        width: 20px;
        height: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #dc3545;
        color: #fff;
        font-size: 0.65rem;
        font-weight: 600;
        border-radius: 50%;
    }

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 15px;
    background: var(--solar-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

    .user-dropdown:hover {
        background: #e9ecef;
    }

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
}

.user-info h6 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--solar-dark);
    margin: 0;
}

.user-info small {
    font-size: 0.75rem;
    color: var(--solar-gray);
}

/* Page Content */
.page-content {
    padding: 30px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.page-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--solar-dark);
    margin: 0;
}

.page-subtitle {
    font-size: 0.9rem;
    color: var(--solar-gray);
    margin-top: 5px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--solar-secondary);
    }

    .stat-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    }

    .stat-card.primary::before {
        background: var(--solar-primary);
    }

    .stat-card.success::before {
        background: #28a745;
    }

    .stat-card.warning::before {
        background: var(--solar-secondary);
    }

    .stat-card.danger::before {
        background: #dc3545;
    }

    .stat-card.info::before {
        background: var(--solar-accent);
    }

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 1.3rem;
}

.stat-card.primary .stat-icon {
    background: rgba(19, 64, 103, 0.1);
    color: var(--solar-primary);
}

.stat-card.success .stat-icon {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.stat-card.warning .stat-icon {
    background: rgba(235, 189, 18, 0.1);
    color: #d4a90a;
}

.stat-card.danger .stat-icon {
    background: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.stat-card.info .stat-icon {
    background: rgba(26, 90, 138, 0.1);
    color: var(--solar-accent);
}

.stat-change {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}

    .stat-change.up {
        background: rgba(40, 167, 69, 0.1);
        color: #28a745;
    }

    .stat-change.down {
        background: rgba(220, 53, 69, 0.1);
        color: #dc3545;
    }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--solar-dark);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--solar-gray);
}

/* Cards */
.card {
    background: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
}

.card-header {
    background: none;
    border-bottom: 1px solid #eee;
    padding: 20px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--solar-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .card-title i {
        color: var(--solar-secondary);
    }

.card-body {
    padding: 25px;
}

/* Tables */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

    .table thead th {
        background: var(--solar-light);
        color: var(--solar-dark);
        font-weight: 600;
        font-size: 0.85rem;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 15px 20px;
        border: none;
        white-space: nowrap;
    }

    .table tbody td {
        padding: 18px 20px;
        vertical-align: middle;
        border-color: #f0f0f0;
        font-size: 0.9rem;
    }

    .table tbody tr {
        transition: all 0.2s ease;
    }

        .table tbody tr:hover {
            background: rgba(19, 64, 103, 0.02);
        }

/* Buttons */
.btn {
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: var(--solar-primary);
    border-color: var(--solar-primary);
}

    .btn-primary:hover {
        background: var(--solar-dark);
        border-color: var(--solar-dark);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(19, 64, 103, 0.3);
    }

.btn-secondary {
    background: var(--solar-secondary);
    border-color: var(--solar-secondary);
    color: var(--solar-dark);
}

    .btn-secondary:hover {
        background: #d4a90a;
        border-color: #d4a90a;
        color: var(--solar-dark);
    }

.btn-outline-primary {
    color: var(--solar-primary);
    border-color: var(--solar-primary);
}

    .btn-outline-primary:hover {
        background: var(--solar-primary);
        border-color: var(--solar-primary);
    }

.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

    .btn-icon.btn-sm {
        width: 32px;
        height: 32px;
    }

/* Action Buttons Group */
.action-buttons {
    display: flex;
    gap: 8px;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.75rem;
    border-radius: 6px;
}

.badge-status {
    padding: 6px 14px;
    border-radius: 20px;
}

.badge-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #d4a90a;
}

.badge-confirmed {
    background: rgba(13, 110, 253, 0.15);
    color: #0d6efd;
}

.badge-processing {
    background: rgba(111, 66, 193, 0.15);
    color: #6f42c1;
}

.badge-shipped {
    background: rgba(23, 162, 184, 0.15);
    color: #17a2b8;
}

.badge-delivered {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.badge-completed {
    background: rgba(40, 167, 69, 0.2);
    color: #1e7e34;
}

.badge-cancelled {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

/* Forms */
.form-control, .form-select {
    padding: 12px 16px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

    .form-control:focus, .form-select:focus {
        border-color: var(--solar-primary);
        box-shadow: 0 0 0 4px rgba(19, 64, 103, 0.1);
    }

.form-label {
    font-weight: 500;
    color: var(--solar-dark);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.input-group-text {
    background: var(--solar-light);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    color: var(--solar-gray);
}

/* Search Box */
.search-box {
    position: relative;
}

    .search-box input {
        padding-left: 45px;
        background: var(--solar-light);
        border: none;
    }

    .search-box i {
        position: absolute;
        left: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--solar-gray);
    }

/* Filter Bar */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.filter-item {
    flex: 1;
    min-width: 200px;
}

/* Pagination */
.pagination {
    gap: 5px;
}

.page-link {
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    color: var(--solar-dark);
    font-weight: 500;
}

    .page-link:hover {
        background: var(--solar-light);
        color: var(--solar-primary);
    }

.page-item.active .page-link {
    background: var(--solar-primary);
    color: #fff;
}

/* Modal Customization */
.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-accent));
    color: #fff;
    border-radius: 16px 16px 0 0;
    padding: 20px 25px;
}

    .modal-header .btn-close {
        filter: brightness(0) invert(1);
    }

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .alert i {
        font-size: 1.2rem;
    }

/* Avatar */
.avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    object-fit: cover;
}

.avatar-sm {
    width: 35px;
    height: 35px;
    border-radius: 8px;
}

.avatar-lg {
    width: 60px;
    height: 60px;
    border-radius: 14px;
}

.avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-accent));
    color: #fff;
    font-weight: 600;
}

/* User Cell */
.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-cell-info h6 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--solar-dark);
}

.user-cell-info small {
    color: var(--solar-gray);
    font-size: 0.8rem;
}

/* Product Cell */
.product-cell {
    display: flex;
    align-items: center;
    gap: 15px;
}

    .product-cell img {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        object-fit: cover;
        background: var(--solar-light);
    }

.product-cell-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--solar-dark);
}

.product-cell-info small {
    color: var(--solar-gray);
}

/* Price */
.price {
    font-weight: 700;
    color: var(--solar-dark);
}

.price-original {
    text-decoration: line-through;
    color: var(--solar-gray);
    font-weight: 400;
    font-size: 0.85rem;
}

/* Rating */
.rating {
    display: flex;
    align-items: center;
    gap: 3px;
}

    .rating i {
        color: var(--solar-secondary);
        font-size: 0.9rem;
    }

        .rating i.empty {
            color: #ddd;
        }

/* Charts Container */
.chart-container {
    position: relative;
    height: 300px;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--solar-dark) 0%, var(--solar-primary) 50%, var(--solar-accent) 100%);
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    width: 100%;
    max-width: 450px;
}

.login-header {
    background: linear-gradient(135deg, var(--solar-primary), var(--solar-accent));
    padding: 40px 30px;
    text-align: center;
    color: #fff;
}

    .login-header i {
        font-size: 3rem;
        color: var(--solar-secondary);
        margin-bottom: 15px;
    }

    .login-header h2 {
        font-size: 1.5rem;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .login-header p {
        opacity: 0.8;
        font-size: 0.9rem;
        margin: 0;
    }

.login-body {
    padding: 40px 30px;
}

    .login-body .form-control {
        padding: 14px 18px;
        font-size: 1rem;
    }

    .login-body .btn {
        padding: 14px;
        font-size: 1rem;
        width: 100%;
    }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

    .empty-state i {
        font-size: 4rem;
        color: #ddd;
        margin-bottom: 20px;
    }

    .empty-state h5 {
        color: var(--solar-dark);
        margin-bottom: 10px;
    }

    .empty-state p {
        color: var(--solar-gray);
    }

/* Responsive */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.show {
            transform: translateX(0);
        }

    .main-content {
        margin-left: 0;
    }

    .sidebar-toggle {
        display: block;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .page-content {
        padding: 20px 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-item {
        width: 100%;
    }

    .top-header {
        padding: 0 15px;
    }

    .user-info {
        display: none;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* Tooltip customization */
.tooltip-inner {
    background: var(--solar-dark);
    border-radius: 6px;
    padding: 8px 12px;
}

/* Switch */
.form-switch .form-check-input {
    width: 50px;
    height: 26px;
    cursor: pointer;
}

    .form-switch .form-check-input:checked {
        background-color: var(--solar-primary);
        border-color: var(--solar-primary);
    }

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 10px;
}

.dropdown-item {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

    .dropdown-item:hover {
        background: var(--solar-light);
    }

    .dropdown-item i {
        width: 18px;
        color: var(--solar-gray);
    }
