/**
 * MEATIOWA Locker Dashboard - Stylesheet
 * Mobile-first responsive design
 * Follows MEATIOWA rustic farmhouse design system
 */

/* ============================================
   CSS VARIABLES - MEATIOWA DESIGN SYSTEM
   ============================================ */
:root {
    /* Primary Colors */
    --barn-red: #8B2323;
    --barn-red-dark: #6B1A1A;
    --barn-red-light: #A52A2A;
    --cream: #FDF5E6;
    --cream-dark: #F5ECD5;
    --hay: #D4A84B;
    --hay-dark: #B8923F;
    --sage: #6B8E6B;
    --sage-dark: #5A7A5A;
    --wood-brown: #654321;

    /* Neutral Colors */
    --charcoal: #2C2C2C;
    --slate: #4A4A4A;
    --medium-gray: #6B6B6B;
    --light-gray: #E8E8E8;
    --off-white: #FAFAFA;
    --white: #FFFFFF;

    /* Status Colors */
    --success: #4A7C4A;
    --success-light: #E8F5E8;
    --warning: #D4A84B;
    --warning-light: #FFF8E8;
    --danger: #C53030;
    --danger-light: #FEE8E8;
    --info: #3182CE;
    --info-light: #E8F4FE;

    /* Typography */
    --font-heading: 'Bitter', Georgia, serif;
    --font-body: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-handwritten: 'Caveat', cursive;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-xxl: 3rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.5;
    color: var(--charcoal);
    background-color: var(--cream);
    min-height: 100vh;
}

/* ============================================
   LOGIN SCREEN
   ============================================ */
.login-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--barn-red) 0%, var(--barn-red-dark) 100%);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.login-screen.active {
    display: flex;
}

.login-container {
    background: var(--white);
    padding: var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
    margin: var(--space-md);
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-xl);
}

.login-header .logo-text {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--barn-red);
    margin: 0;
}

.login-header .logo-tagline {
    color: var(--medium-gray);
    margin-top: var(--space-xs);
}

.login-form .form-group {
    margin-bottom: var(--space-md);
}

.login-form label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--charcoal);
}

.login-form input {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--barn-red);
}

.login-form .btn-block {
    width: 100%;
    padding: var(--space-md);
    margin-top: var(--space-md);
}

.login-help {
    text-align: center;
    margin-top: var(--space-md);
    color: var(--medium-gray);
}

.login-links {
    text-align: center;
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--light-gray);
}

.login-links a {
    color: var(--barn-red);
    text-decoration: none;
    font-size: 0.875rem;
}

.login-links span {
    color: var(--light-gray);
    margin: 0 var(--space-sm);
}

a {
    color: var(--barn-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--barn-red-dark);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--white);
    border-right: 1px solid var(--light-gray);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
}

.sidebar.open {
    transform: translateX(0);
}

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

.logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--barn-red);
    letter-spacing: 1px;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-toggle {
    display: none;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.sidebar-toggle:hover {
    background: var(--cream);
}

.sidebar-nav {
    flex: 1;
    padding: var(--space-md) 0;
    overflow-y: auto;
}

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

.nav-item a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    color: var(--slate);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}

.nav-item a:hover {
    background: var(--cream);
    color: var(--barn-red);
}

.nav-item.active a {
    background: var(--cream);
    color: var(--barn-red);
    border-left-color: var(--barn-red);
    font-weight: 600;
}

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

.nav-item .badge {
    margin-left: auto;
    background: var(--barn-red);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.nav-section {
    margin-top: var(--space-lg);
    padding-top: var(--space-lg);
    border-top: 1px solid var(--light-gray);
}

.nav-section-title {
    display: block;
    padding: 0 var(--space-lg) var(--space-sm);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--medium-gray);
}

.sidebar-footer {
    padding: var(--space-lg);
    border-top: 1px solid var(--light-gray);
}

.locker-profile {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.locker-avatar {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--barn-red);
    color: var(--white);
    border-radius: var(--radius-md);
    font-size: 1.1rem;
}

.locker-info {
    display: flex;
    flex-direction: column;
}

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

.locker-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.locker-status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--medium-gray);
}

.locker-status.online::before {
    background: var(--success);
}

/* Sidebar Actions (Logout, Account) */
.sidebar-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--light-gray);
}

.sidebar-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--dark-gray);
    background: var(--off-white);
}

.sidebar-btn:hover {
    background: var(--light-gray);
    color: var(--charcoal);
}

.sidebar-btn.logout-btn {
    color: #dc3545;
}

.sidebar-btn.logout-btn:hover {
    background: #fff5f5;
    color: #c82333;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    margin-left: 0;
    min-height: 100vh;
    transition: margin-left var(--transition-normal);
}

/* ============================================
   TOP HEADER
   ============================================ */
.top-header {
    position: sticky;
    top: 0;
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-bottom: 1px solid var(--light-gray);
    height: var(--header-height);
    z-index: 50;
}

.mobile-menu-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.mobile-menu-btn:hover {
    background: var(--cream);
}

.header-search {
    flex: 1;
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--cream);
    border-radius: var(--radius-full);
}

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

.header-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-left: auto;
}

.btn-icon {
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--slate);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.btn-icon:hover {
    background: var(--cream);
    color: var(--charcoal);
}

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

.user-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--cream);
    border-radius: var(--radius-full);
    color: var(--charcoal);
    font-weight: 500;
    transition: all var(--transition-fast);
}

.user-btn:hover {
    background: var(--cream-dark);
}

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

/* ============================================
   PAGE CONTENT
   ============================================ */
.page-content {
    padding: var(--space-lg);
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.page-header h1 {
    font-size: 1.75rem;
    color: var(--charcoal);
}

.page-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 40px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--barn-red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--barn-red-dark);
}

.btn-secondary {
    background: var(--slate);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--charcoal);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--barn-red);
    color: var(--barn-red);
}

.btn-outline:hover {
    background: var(--barn-red);
    color: var(--white);
}

.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.8rem;
    min-height: 32px;
}

/* ============================================
   STATS CARDS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

.stat-icon.sales {
    background: var(--success-light);
    color: var(--success);
}

.stat-icon.orders {
    background: var(--info-light);
    color: var(--info);
}

.stat-icon.customers {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-icon.weight {
    background: rgba(139, 35, 35, 0.1);
    color: var(--barn-red);
}

.stat-content {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--charcoal);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--medium-gray);
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* ============================================
   CHARTS
   ============================================ */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

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

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
}

.chart-header h3 {
    font-size: 1rem;
    color: var(--charcoal);
}

.chart-legend {
    display: flex;
    gap: var(--space-md);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.legend-item .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.sales { background: var(--barn-red); }
.dot.orders { background: var(--hay); }

.chart-body {
    padding: var(--space-lg);
    height: 250px;
}

/* ============================================
   ACTIVITY CARDS
   ============================================ */
.activity-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.activity-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
    font-size: 1rem;
    color: var(--charcoal);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card-header h3 i {
    color: var(--barn-red);
}

.view-all {
    font-size: 0.85rem;
    font-weight: 600;
}

.card-body {
    padding: var(--space-lg);
    max-height: 300px;
    overflow-y: auto;
}

/* Order List Items */
.order-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.order-item:hover {
    background: var(--cream);
}

.order-info {
    flex: 1;
}

.order-number {
    font-weight: 600;
    color: var(--charcoal);
}

.order-customer {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

.order-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--barn-red);
}

.order-status {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.order-status.pending {
    background: var(--warning-light);
    color: var(--warning);
}

.order-status.processing {
    background: var(--info-light);
    color: var(--info);
}

.order-status.ready {
    background: var(--success-light);
    color: var(--success);
}

/* Alert List Items */
.alert-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    background: var(--warning-light);
    margin-bottom: var(--space-sm);
}

.alert-item.critical {
    background: var(--danger-light);
}

.alert-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-md);
    color: var(--warning);
}

.alert-item.critical .alert-icon {
    color: var(--danger);
}

.alert-info {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    color: var(--charcoal);
    font-size: 0.9rem;
}

.alert-detail {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

/* ============================================
   DATA TABLES
   ============================================ */
.data-table-container {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

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

.data-table th,
.data-table td {
    padding: var(--space-md);
    text-align: left;
}

.data-table th {
    background: var(--cream);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate);
    border-bottom: 2px solid var(--light-gray);
}

.data-table td {
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.9rem;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--cream);
}

.data-table .actions {
    display: flex;
    gap: var(--space-xs);
}

.data-table .actions button {
    padding: var(--space-xs);
    color: var(--medium-gray);
    transition: color var(--transition-fast);
}

.data-table .actions button:hover {
    color: var(--barn-red);
}

/* ============================================
   TABS
   ============================================ */
.orders-tabs,
.loyalty-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    font-weight: 600;
    color: var(--slate);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.tab-btn:hover {
    border-color: var(--barn-red);
    color: var(--barn-red);
}

.tab-btn.active {
    background: var(--barn-red);
    border-color: var(--barn-red);
    color: var(--white);
}

.tab-btn .badge {
    background: rgba(255, 255, 255, 0.2);
    color: inherit;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: var(--radius-full);
}

.tab-btn.active .badge {
    background: var(--white);
    color: var(--barn-red);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

/* Tab Navigation Bar */
.tab-nav {
    display: flex;
    gap: var(--space-xs);
    background: var(--white);
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    overflow-x: auto;
    box-shadow: var(--shadow-sm);
}

.tab-nav .tab-btn {
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
}

.tab-nav .tab-btn:hover {
    background: var(--cream);
    border: none;
    color: var(--charcoal);
}

.tab-nav .tab-btn.active {
    background: var(--barn-red);
    color: var(--white);
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.9375rem;
    color: var(--medium-gray);
}

.breadcrumb a {
    color: var(--barn-red);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb span {
    color: var(--charcoal);
    font-weight: 500;
}

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

/* ============================================
   FILTER BAR
   ============================================ */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.search-input {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.search-input:focus-within {
    border-color: var(--barn-red);
}

.search-input i {
    color: var(--medium-gray);
}

.search-input input {
    flex: 1;
    border: none;
    outline: none;
}

.filter-bar select {
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    color: var(--charcoal);
    min-width: 150px;
}

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

.filter-group {
    display: flex;
    gap: var(--space-sm);
}

.date-range-select {
    padding: var(--space-sm) var(--space-md);
    background: var(--white);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    color: var(--charcoal);
    font-weight: 500;
}

/* ============================================
   PRODUCTS GRID
   ============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all var(--transition-fast);
}

.product-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.product-card-image {
    height: 160px;
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--barn-red);
    position: relative;
}

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

.product-card-badge {
    position: absolute;
    top: var(--space-sm);
    right: var(--space-sm);
    padding: 4px 10px;
    background: var(--barn-red);
    color: var(--white);
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-full);
}

.product-card-body {
    padding: var(--space-lg);
}

.product-card-name {
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.product-card-category {
    font-size: 0.8rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
}

.product-card-price {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--barn-red);
    margin-bottom: var(--space-sm);
}

.product-card-stock {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 0.85rem;
}

.product-card-stock .stock-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stock-dot.in-stock { background: var(--success); }
.stock-dot.low-stock { background: var(--warning); }
.stock-dot.out-of-stock { background: var(--danger); }

.product-card-actions {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--light-gray);
}

.product-card-actions button {
    flex: 1;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--transition-fast);
}

.product-card-actions .btn-edit {
    background: var(--cream);
    color: var(--charcoal);
}

.product-card-actions .btn-edit:hover {
    background: var(--cream-dark);
}

/* ============================================
   INVENTORY SUMMARY
   ============================================ */
.inventory-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.summary-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.summary-card.warning {
    background: var(--warning-light);
}

.summary-card.danger {
    background: var(--danger-light);
}

.summary-value {
    display: block;
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--charcoal);
}

.summary-label {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* ============================================
   SETTINGS
   ============================================ */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

.settings-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-sm);
}

.settings-card h3 {
    font-size: 1.125rem;
    color: var(--charcoal);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.settings-card h3 i {
    color: var(--barn-red);
}

.settings-form .form-group {
    margin-bottom: var(--space-lg);
}

.settings-form label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--slate);
    margin-bottom: var(--space-xs);
}

.settings-form input,
.settings-form select,
.settings-form textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
    transition: border-color var(--transition-fast);
}

.settings-form input:focus,
.settings-form select:focus,
.settings-form textarea:focus {
    outline: none;
    border-color: var(--barn-red);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
}

.form-check {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--barn-red);
}

.form-check label {
    font-weight: normal;
    margin-bottom: 0;
}

/* Tiers List */
.tiers-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.tier-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--cream);
    border-radius: var(--radius-md);
}

.tier-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-radius: var(--radius-md);
    font-size: 1.25rem;
}

.tier-item.bronze .tier-icon { color: #CD7F32; }
.tier-item.silver .tier-icon { color: #C0C0C0; }
.tier-item.gold .tier-icon { color: #FFD700; }

.tier-info {
    flex: 1;
}

.tier-name {
    font-weight: 600;
    color: var(--charcoal);
}

.tier-threshold {
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.tier-multiplier {
    font-weight: 600;
    color: var(--sage);
}

/* ============================================
   REPORTS
   ============================================ */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.report-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.report-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.report-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    border-radius: var(--radius-lg);
    margin: 0 auto var(--space-md);
    font-size: 1.75rem;
    color: var(--barn-red);
}

.report-card h3 {
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.report-card p {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* ============================================
   MODALS
   ============================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
}

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

.modal-content {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.95);
    transition: transform var(--transition-fast);
}

.modal.open .modal-content {
    transform: scale(1);
}

.modal-content.modal-small {
    max-width: 400px;
}

.modal-content.modal-large {
    max-width: 700px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
}

.modal-header h2 {
    font-size: 1.25rem;
    color: var(--charcoal);
}

.modal-close {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--medium-gray);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--cream);
    color: var(--charcoal);
}

.modal-body {
    flex: 1;
    padding: var(--space-lg);
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-top: 1px solid var(--light-gray);
}

.modal-footer .btn {
    flex: 1;
}

/* Form styles in modal */
.modal .form-group {
    margin-bottom: var(--space-lg);
}

.modal label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--slate);
    margin-bottom: var(--space-xs);
}

.modal input,
.modal select,
.modal textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--light-gray);
    border-radius: var(--radius-md);
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--barn-red);
}

.modal .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.modal .form-row .flex-2 {
    grid-column: span 2;
}

.modal .checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-lg);
}

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

.input-prefix {
    padding: var(--space-md);
    background: var(--cream);
    border: 2px solid var(--light-gray);
    border-right: none;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    color: var(--medium-gray);
}

.input-group input {
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.image-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    background: var(--cream);
    border: 2px dashed var(--light-gray);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.image-upload:hover {
    border-color: var(--barn-red);
}

.image-upload i {
    font-size: 2rem;
    color: var(--medium-gray);
    margin-bottom: var(--space-sm);
}

.image-upload span {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

.image-upload input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Stock adjustment modal */
.stock-product {
    text-align: center;
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
    margin-bottom: var(--space-lg);
}

.stock-product .product-name {
    display: block;
    font-weight: 600;
    color: var(--charcoal);
    margin-bottom: var(--space-xs);
}

.stock-product .current-stock {
    font-size: 0.9rem;
    color: var(--medium-gray);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    top: calc(var(--header-height) + var(--space-md));
    right: var(--space-md);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    min-width: 280px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.success { border-left: 4px solid var(--success); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--info); }

.toast i {
    font-size: 1.25rem;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    color: var(--charcoal);
}

.toast-message {
    font-size: 0.85rem;
    color: var(--medium-gray);
}

/* ============================================
   ANALYTICS PAGE STYLES
   ============================================ */
.analytics-tabs {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-xl);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: var(--space-sm);
}

.analytics-tabs .tab-btn {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    font-weight: 600;
    color: var(--medium-gray);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.analytics-tabs .tab-btn:hover {
    color: var(--barn-red);
    background: var(--cream-dark);
}

.analytics-tabs .tab-btn.active {
    color: var(--barn-red);
    border-bottom: 3px solid var(--barn-red);
    margin-bottom: -2px;
}

.analytics-content {
    display: none;
}

.analytics-content.active {
    display: block;
}

.stat-card.highlight {
    background: linear-gradient(135deg, var(--barn-red), var(--barn-red-dark));
    color: var(--white);
}

.stat-card.highlight .stat-value,
.stat-card.highlight .stat-label {
    color: var(--white);
}

.stat-card.highlight .stat-change {
    color: rgba(255,255,255,0.8);
}

.stat-card .stat-detail {
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-top: var(--space-xs);
}

/* Customer Segment Cards */
.stat-card.segment-vip .stat-icon {
    background: linear-gradient(135deg, #D4A84B, #B8923F);
}

.stat-card.segment-regular .stat-icon {
    background: var(--info);
}

.stat-card.segment-new .stat-icon {
    background: var(--sage);
}

.stat-card.segment-risk .stat-icon {
    background: var(--danger);
}

/* Chart Card Enhancements */
.chart-card.wide {
    grid-column: span 2;
}

.chart-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    padding: var(--space-md);
    border-top: 1px solid var(--light-gray);
}

.chart-stat {
    text-align: center;
}

.chart-stat .label {
    display: block;
    font-size: 0.75rem;
    color: var(--medium-gray);
}

.chart-stat .value {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--charcoal);
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.metric-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
}

.metric-header i {
    color: var(--barn-red);
}

.metric-header h4 {
    font-size: 0.875rem;
    color: var(--medium-gray);
    font-weight: 500;
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--charcoal);
}

.metric-detail {
    font-size: 0.75rem;
    color: var(--medium-gray);
    margin-top: var(--space-xs);
}

/* Movers Grid */
.movers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.movers-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.movers-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--light-gray);
}

.movers-list li:last-child {
    border-bottom: none;
}

.movers-list .product {
    font-weight: 500;
}

.movers-list .days {
    color: var(--medium-gray);
    font-size: 0.875rem;
}

/* Card Styling */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.card .card-header {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card .card-header h3 {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.card .card-body {
    padding: var(--space-lg);
}

/* Badge styles for analytics */
.badge.warning {
    background: var(--warning-light);
    color: var(--hay-dark);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.danger {
    background: var(--danger-light);
    color: var(--danger);
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

/* Table positive/negative indicators */
.data-table td.positive {
    color: var(--success);
    font-weight: 600;
}

.data-table td.negative {
    color: var(--danger);
    font-weight: 600;
}

/* Button Small */
.btn-sm {
    padding: var(--space-xs) var(--space-sm);
    font-size: 0.875rem;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Tablet and up */
@media (min-width: 768px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: none;
    }

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

    .mobile-menu-btn {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .activity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .inventory-summary {
        grid-template-columns: repeat(4, 1fr);
    }

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

    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .page-content {
        padding: var(--space-xl);
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .page-content {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions .btn {
        flex: 1;
    }

    .header-search {
        display: none;
    }

    .user-name {
        display: none;
    }

    .modal .form-row {
        grid-template-columns: 1fr;
    }

    .modal .form-row .flex-2 {
        grid-column: span 1;
    }
}

/* ============================================
   BULK PROCESSING
   ============================================ */
.allocation-weight-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-sm);
}

.allocation-info {
    flex: 1;
}

.allocation-weight-input {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
}

.allocation-weight-input input {
    width: 100px;
    padding: var(--space-xs) var(--space-sm);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}

.allocations-summary ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
}

.allocations-summary li {
    margin: var(--space-xs) 0;
}

.listing-info {
    padding: var(--space-md);
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
}

.listing-info h4 {
    margin: 0 0 var(--space-xs);
}

.listing-info p {
    margin: 0;
    color: var(--text-secondary);
}

/* Status badges for bulk processing */
.status-badge.status-active { background: #d4edda; color: #155724; }
.status-badge.status-sold_out { background: #cce5ff; color: #004085; }
.status-badge.status-processing { background: #fff3cd; color: #856404; }
.status-badge.status-ready { background: #d1ecf1; color: #0c5460; }
.status-badge.status-completed { background: #e2e3e5; color: #383d41; }
.status-badge.status-closed { background: #f8d7da; color: #721c24; }

.text-success { color: #28a745; }
.text-muted { color: #6c757d; }

.actions-cell {
    display: flex;
    gap: var(--space-xs);
    flex-wrap: wrap;
}

.allocations-weight-list h4 {
    margin: var(--space-md) 0 var(--space-sm);
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border-light);
}
