.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: var(--gray-100);
}

.sidebar {
    width: 280px;
    background: var(--gray-900);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-800);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-1);
    border-radius: var(--radius-md);
    color: var(--white);
    font-size: 1.1rem;
}

.sidebar .logo-text {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--white);
}

.sidebar .logo .accent {
    color: var(--primary-light);
}

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

.sidebar-toggle {
    color: var(--gray-400);
    font-size: 1.25rem;
    padding: 0.5rem;
}

.sidebar-toggle:hover {
    color: var(--white);
}

.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-section {
    padding: 0 1rem;
    margin-bottom: 1.5rem;
}

.nav-section-title {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
    padding-left: 0.75rem;
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    color: var(--gray-400);
    font-weight: 500;
    margin-bottom: 0.25rem;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background: var(--gray-800);
    color: var(--white);
}

.nav-item.active {
    background: var(--primary);
    color: var(--white);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar.collapsed .nav-item span:not(.nav-badge) {
    display: none;
}

.nav-badge {
    margin-left: auto;
    padding: 0.2rem 0.5rem;
    background: var(--primary);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.nav-badge.warning {
    background: var(--warning);
}

.sidebar.collapsed .nav-badge {
    display: none;
}

.sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-800);
}

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

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    color: var(--white);
    font-size: 0.9rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.sidebar.collapsed .user-details {
    display: none;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--gray-600);
}

.page-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

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

.header-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius-full);
}

.header-search i {
    color: var(--gray-400);
}

.header-search input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 200px;
}

.header-search input:focus {
    outline: none;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    color: var(--gray-600);
    position: relative;
    transition: all 0.2s ease;
}

.header-icon-btn:hover {
    background: var(--gray-200);
    color: var(--gray-800);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.25rem;
    padding-right: 0.75rem;
    border-radius: var(--radius-full);
    transition: all 0.2s ease;
}

.user-dropdown:hover {
    background: var(--gray-100);
}

.user-dropdown img {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
}

.user-dropdown i {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.dashboard-content {
    padding: 2rem;
}

.dashboard-content.hidden {
    display: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease;
}

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

.stat-card.gradient-1 { background: var(--gradient-1); }
.stat-card.gradient-2 { background: var(--gradient-2); }
.stat-card.gradient-3 { background: var(--gradient-3); }
.stat-card.gradient-4 { background: var(--gradient-4); }

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-lg);
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.stat-info p {
    opacity: 0.9;
    font-size: 0.9rem;
}

.stat-change {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius);
}

.stat-change.positive {
    color: #dcfce7;
}

.stat-change.negative {
    color: #fee2e2;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-header.mt-2 {
    margin-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.view-all {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
}

.view-all:hover {
    color: var(--primary-dark);
}

.orders-table {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem 1.5rem;
    text-align: left;
}

th {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    background: var(--gray-50);
}

td {
    font-size: 0.9rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--gray-100);
}

.customer-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.customer-cell img {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.processing {
    background: #dbeafe;
    color: #1e40af;
}

.status-badge.shipped {
    background: #e0e7ff;
    color: #3730a3;
}

.status-badge.delivered {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #991b1b;
}

.status-badge.active {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.draft {
    background: var(--gray-200);
    color: var(--gray-600);
}

.action-btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--gray-100);
    color: var(--gray-700);
    border-radius: var(--radius);
    transition: all 0.2s ease;
}

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

.quick-actions {
    padding: 1rem 1.5rem;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    color: var(--gray-700);
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-action-btn i {
    font-size: 1.25rem;
    color: var(--primary);
}

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

.quick-action-btn:hover i {
    color: var(--white);
}

.performance-stats {
    padding: 0 1.5rem 1.5rem;
}

.perf-item {
    margin-bottom: 1rem;
}

.perf-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.perf-value {
    font-weight: 600;
    color: var(--gray-800);
}

.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--gradient-1);
    border-radius: var(--radius-full);
    transition: width 0.5s ease;
}

.products-list {
    padding: 0.5rem;
}

.product-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius);
    transition: background 0.2s ease;
}

.product-item:hover {
    background: var(--gray-50);
}

.product-item img {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
}

.product-details {
    flex: 1;
    min-width: 0;
}

.product-details h4 {
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-category {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.product-stats {
    text-align: right;
}

.product-price {
    display: block;
    font-weight: 700;
    color: var(--primary);
}

.product-sold {
    display: block;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.icon-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s ease;
}

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

.icon-btn:last-child:hover {
    background: var(--error);
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
}

.filters-bar {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.search-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    flex: 1;
    max-width: 300px;
}

.search-box i {
    color: var(--gray-400);
}

.search-box input {
    border: none;
    background: transparent;
    font-size: 0.9rem;
    width: 100%;
}

.search-box input:focus {
    outline: none;
}

.filter-select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    color: var(--gray-700);
    background: var(--white);
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.products-table {
    overflow-x: auto;
}

.products-table td {
    vertical-align: middle;
}

.product-table-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.product-table-cell img {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    object-fit: cover;
}

.product-table-cell h4 {
    font-weight: 500;
    color: var(--gray-800);
}

.table-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.875rem;
    color: var(--gray-500);
}

.pagination {
    display: flex;
    gap: 0.5rem;
}

.page-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius);
    color: var(--gray-600);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary);
    color: var(--white);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.modal-container {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.modal.active .modal-container {
    transform: scale(1);
}

.modal-container.modal-lg {
    max-width: 800px;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    color: var(--gray-600);
    z-index: 10;
}

.modal-close:hover {
    background: var(--gray-200);
}

.modal-content {
    padding: 2rem;
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--gray-800);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-group textarea {
    resize: vertical;
}

.image-upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    background: var(--gray-50);
    cursor: pointer;
    transition: all 0.2s ease;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
}

.image-upload-area i {
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.image-upload-area p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.uploaded-images {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.uploaded-image {
    position: relative;
    width: 80px;
    height: 80px;
}

.uploaded-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius);
}

.uploaded-image .remove-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: var(--white);
    border-radius: var(--radius-full);
    font-size: 0.7rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.settings-card .card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--white);
}

.settings-card .card-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--white);
    font-size: 1rem;
}

.settings-card .card-header h2 i {
    font-size: 1.1rem;
}

.card-body {
    padding: 1.5rem;
}

.settings-form .form-group {
    margin-bottom: 1.25rem;
}

.settings-form .form-group:last-of-type {
    margin-bottom: 0;
}

.settings-form label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.settings-form input,
.settings-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.settings-form input:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.social-input label i {
    font-size: 1.25rem;
}

.whatsapp-icon { color: #25D366; }
.facebook-icon { color: #1877F2; }
.instagram-icon { color: #E4405F; }
.twitter-icon { color: #1DA1F2; }

.shop-key-container {
    text-align: center;
}

.key-description {
    color: var(--gray-600);
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.shop-key-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    background: var(--gray-100);
    padding: 0.5rem;
    border-radius: var(--radius-lg);
}

.shop-key-display input {
    flex: 1;
    background: transparent;
    border: none;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    color: var(--gray-800);
    letter-spacing: 2px;
}

.shop-key-display input:focus {
    outline: none;
    box-shadow: none;
}

.btn-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius);
    color: var(--gray-600);
    transition: all 0.2s ease;
}

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

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    margin-bottom: 1rem;
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.key-warning {
    font-size: 0.8rem;
    color: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.password-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-group input {
    flex: 1;
    padding-right: 3rem;
}

.toggle-password-btn {
    position: absolute;
    right: 0.75rem;
    background: transparent;
    color: var(--gray-400);
    padding: 0.5rem;
    transition: color 0.2s ease;
}

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

.password-strength-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: var(--radius-full);
    margin-top: 0.5rem;
    overflow: hidden;
}

.password-strength-bar::after {
    content: '';
    display: block;
    height: 100%;
    width: 0;
    transition: all 0.3s ease;
}

.password-strength-bar.weak::after {
    width: 33%;
    background: var(--error);
}

.password-strength-bar.medium::after {
    width: 66%;
    background: var(--warning);
}

.password-strength-bar.strong::after {
    width: 100%;
    background: var(--success);
}

@media (max-width: 1024px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        left: -280px;
    }
    
    .sidebar.active {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .header-search {
        display: none;
    }
    
    .dashboard-content {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: 1;
    }
    
    .filters-bar {
        flex-wrap: wrap;
    }
    
    .search-box {
        max-width: none;
        width: 100%;
    }
}
