/* ================================================================
   DEJOL WHOLESALE POS - MODERN GLASSMORPHISM DESIGN
   ================================================================ */

:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --secondary-color: #6366f1;
    --secondary-dark: #4f46e5;
    --danger-color: #ef4444;
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-tertiary: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --border-light: rgba(148, 163, 184, 0.1);
    --border-medium: rgba(148, 163, 184, 0.2);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.15);
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==================== APP CONTAINER ==================== */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    height: 100vh;
    width: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

/* ==================== SIDEBAR ==================== */
.sidebar {
    grid-column: 1;
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-right: 1px solid var(--glass-border);
    padding: 1.5rem;
    overflow-y: auto;
    gap: 1.5rem;
}

.sidebar-header {
    margin-bottom: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo i {
    font-size: 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition-normal);
    border-left: 3px solid transparent;
    cursor: pointer;
}

.nav-item:hover {
    color: var(--text-primary);
    background: rgba(16, 185, 129, 0.1);
    padding-left: calc(1.5rem + 0.5rem);
}

.nav-item.active {
    color: var(--primary-color);
    background: rgba(16, 185, 129, 0.15);
    border-left-color: var(--primary-color);
    padding-left: calc(1.5rem + 0.5rem);
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    border-top: 1px solid var(--border-light);
    padding-top: 1.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.avatar {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 9999px;
    font-size: 24px;
    color: var(--primary-color);
}

.user-name {
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-content::-webkit-scrollbar {
    width: 8px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 9999px;
}

.pages-container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.page {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    gap: 2rem;
}

.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.subtitle {
    color: var(--text-muted);
    font-size: 14px;
}

/* ==================== DASHBOARD GRID ==================== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
}

.stat-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.sales {
    background: rgba(16, 185, 129, 0.2);
    color: var(--primary-color);
}

.stat-icon.orders {
    background: rgba(99, 102, 241, 0.2);
    color: var(--secondary-color);
}

.stat-icon.inventory {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.stat-icon.customers {
    background: rgba(239, 68, 68, 0.2);
    color: var(--danger-color);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0.5rem 0;
}

.stat-change {
    font-size: 12px;
    color: var(--primary-color);
}

/* ==================== DASHBOARD SECTION ==================== */
.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==================== TABLES ==================== */
.table-wrapper {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: rgba(51, 65, 85, 0.5);
}

.data-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: rgba(51, 65, 85, 0.3);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.badge.in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-color);
}

.badge.low-stock {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

.badge.out-stock {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

/* ==================== ORDER LAYOUT ==================== */
.order-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.order-main {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    min-height: 0;
}

.header-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
}

.search-container {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 1rem 1rem 1rem calc(1rem + 24px);
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-medium);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.search-input:focus {
    outline: none;
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.search-shortcut {
    position: absolute;
    right: 1rem;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
    padding: 4px 8px;
    border-radius: 0.375rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.icon-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    border-radius: 0.75rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.icon-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: translateY(-2px);
}

.badge {
    top: -2px;
    right: -2px;
    background: var(--danger-color);
    color: white;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* ==================== PRODUCTS SECTION ==================== */
.products-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    overflow-y: auto;
    padding-right: 1rem;
    flex: 1;
}

.products-grid::-webkit-scrollbar {
    width: 6px;
}

.products-grid::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
}

.product-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all var(--transition-normal);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--shadow-md);
}

.product-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
    transform: translateY(-4px);
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.product-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.product-sku {
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(148, 163, 184, 0.1);
    padding: 4px 8px;
    border-radius: 0.375rem;
}

.stock-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 12px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(16, 185, 129, 0.15);
    color: var(--primary-color);
}

.stock-badge.out-stock {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.product-pricing {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-secondary);
}

.pricing-tier {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.product-actions {
    display: flex;
    gap: 1rem;
}

.quantity-input {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-medium);
    border-radius: 0.75rem;
    padding: 0 0.5rem;
    overflow: hidden;
}

.quantity-input button {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.quantity-input button:hover {
    background: rgba(16, 185, 129, 0.1);
}

.quantity-input input {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    text-align: center;
    width: 100%;
    padding: 1rem 0;
    font-size: 14px;
    font-weight: 600;
}

.quantity-input input:focus {
    outline: none;
}

/* ==================== CART PANEL ==================== */
.cart-panel {
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    padding: 1.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    gap: 1.5rem;
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - 4rem);
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border: none;
    border-radius: 0.5rem;
    color: var(--secondary-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 14px;
}

.btn-icon:hover {
    background: rgba(99, 102, 241, 0.2);
    transform: rotate(180deg);
}

.cart-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.section-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.customer-select {
    padding: 1rem 1.5rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-medium);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.customer-select:hover,
.customer-select:focus {
    outline: none;
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.customer-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.cart-items-wrapper {
    flex: 1;
    overflow-y: auto;
    margin-right: calc(-1 * 1.5rem);
    padding-right: 1.5rem;
}

.cart-items-wrapper::-webkit-scrollbar {
    width: 6px;
}

.cart-items-wrapper::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.2);
    border-radius: 9999px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: rgba(51, 65, 85, 0.4);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.cart-item-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.cart-item-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 16px;
}

.cart-item-remove:hover {
    color: var(--danger-color);
}

.cart-item-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-secondary);
}

.cart-item-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-item-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(16, 185, 129, 0.15);
    border: none;
    border-radius: 0.5rem;
    color: var(--primary-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    font-size: 12px;
}

.cart-item-qty-btn:hover {
    background: rgba(16, 185, 129, 0.3);
}

.cart-item-qty {
    width: 40px;
    text-align: center;
    font-weight: 600;
}

.cart-item-price {
    font-weight: 700;
    color: var(--primary-color);
}

.empty-cart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-cart p {
    font-size: 13px;
}

.empty-cart.hidden {
    display: none;
}

/* ==================== CART SUMMARY ==================== */
.cart-summary {
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.summary-row .value {
    font-weight: 600;
    color: var(--text-primary);
}

.summary-row.total {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.summary-row.total .value {
    font-size: 20px;
    color: var(--primary-color);
}

.summary-row.discount .value {
    color: var(--primary-color);
}

.summary-divider {
    height: 1px;
    background: var(--border-light);
}

.cart-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 0;
    border-top: 1px solid var(--border-light);
    border-bottom: 1px solid var(--border-light);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
}

.checkbox-item:hover {
    color: var(--text-primary);
}

.checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0.75rem;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(99, 102, 241, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.3);
    border-color: var(--secondary-color);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.3);
    font-size: 13px;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 12px;
    background: rgba(99, 102, 241, 0.2);
    color: var(--secondary-color);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.btn-small:hover {
    background: rgba(99, 102, 241, 0.3);
}

.cart-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-actions .btn {
    width: 100%;
}

/* ==================== INVENTORY CONTROLS ==================== */
.inventory-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-bottom: 15px;
}

.inventory-controls .btn {
    flex-shrink: 0;
}

#inventorySearch {
    flex: 1;
}

/* ==================== PRICING GRID ==================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.pricing-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.pricing-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.pricing-card .sku {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pricing-tiers {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tier {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 0.5rem;
}

.tier span {
    color: var(--text-secondary);
}

.tier strong {
    color: var(--primary-color);
}

/* ==================== ANALYTICS ==================== */
.analytics-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
}

.chart-card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.chart-placeholder i {
    font-size: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.analytics-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 0.5rem;
}

.rank {
    font-weight: 700;
    color: var(--primary-color);
    min-width: 30px;
}

.name {
    flex: 1;
    color: var(--text-primary);
}

.value {
    color: var(--text-muted);
}

/* ==================== SETTINGS ==================== */
.settings-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-section {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

.settings-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
}

.form-input {
    padding: 1rem;
    background: rgba(51, 65, 85, 0.5);
    border: 1px solid var(--border-medium);
    border-radius: 0.75rem;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-normal);
}

.form-input:focus {
    outline: none;
    background: rgba(51, 65, 85, 0.8);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.settings-option {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-light);
}

.settings-option:last-child {
    border-bottom: none;
}

/* ==================== MODAL ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    gap: 1.5rem;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.btn-close {
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.payment-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-section h3 {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary-color);
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    background: rgba(51, 65, 85, 0.3);
    border-radius: 0.5rem;
    font-size: 14px;
}

.detail-row.large {
    padding: 1.5rem;
    font-size: 18px;
    font-weight: 700;
}

.detail-value {
    font-weight: 600;
    color: var(--text-primary);
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.payment-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: rgba(51, 65, 85, 0.3);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.payment-option:hover {
    background: rgba(51, 65, 85, 0.5);
    border-color: var(--primary-color);
}

.payment-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.payment-option span {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 14px;
}

.payment-option span i {
    width: 20px;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.modal-footer .btn {
    flex: 1;
}

/* ==================== NOTIFICATIONS ==================== */
.notification {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 600;
    animation: slideIn 0.3s ease-out;
    opacity: 0;
    z-index: 999;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification.show {
    opacity: 1;
}

.notification i {
    font-size: 18px;
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .app-container {
        grid-template-columns: 200px 1fr;
    }

    .sidebar {
        padding: 1rem;
    }

    .sidebar-nav {
        gap: 0.5rem;
    }

    .nav-item {
        padding: 0.75rem 1rem;
        font-size: 13px;
    }

    .page {
        padding: 1rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 1024px) {
    .app-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr;
    }

    .sidebar {
        grid-column: 1;
        grid-row: 1;
        flex-direction: row;
        padding: 1rem;
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
        overflow-x: auto;
        gap: 1rem;
    }

    .sidebar-header {
        margin: 0;
    }

    .sidebar-nav {
        flex-direction: row;
        gap: 0.5rem;
        overflow-x: auto;
    }

    .nav-item span {
        display: none;
    }

    .sidebar-footer {
        display: none;
    }

    .main-content {
        grid-column: 1;
        grid-row: 2;
    }

    .order-layout {
        grid-template-columns: 1fr;
    }

    .cart-panel {
        max-height: 50vh;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
    }
}

/* ==================== UTILITY CLASSES ==================== */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}

*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
