/* Modern SaaS UI - Tech Repair CRM 2.0 */

:root {
    /* Modern Color Palette */
    --primary-50: #f0f9ff;
    --primary-100: #e0f2fe;
    --primary-200: #bae6fd;
    --primary-300: #7dd3fc;
    --primary-400: #38bdf8;
    --primary-500: #0ea5e9;
    --primary-600: #0284c7;
    --primary-700: #0369a1;
    --primary-800: #075985;
    --primary-900: #0c4a6e;
    
    --secondary-50: #f8fafc;
    --secondary-100: #f1f5f9;
    --secondary-200: #e2e8f0;
    --secondary-300: #cbd5e1;
    --secondary-400: #94a3b8;
    --secondary-500: #64748b;
    --secondary-600: #475569;
    --secondary-700: #334155;
    --secondary-800: #1e293b;
    --secondary-900: #0f172a;
    
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-500: #22c55e;
    --success-600: #16a34a;
    
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    
    --danger-50: #fef2f2;
    --danger-100: #fee2e2;
    --danger-500: #ef4444;
    --danger-600: #dc2626;
    
    --neutral-50: #fafafa;
    --neutral-100: #f5f5f5;
    --neutral-200: #e5e5e5;
    --neutral-300: #d4d4d4;
    --neutral-400: #a3a3a3;
    --neutral-500: #737373;
    --neutral-600: #525252;
    --neutral-700: #404040;
    --neutral-800: #262626;
    --neutral-900: #171717;
    
    /* Modern Spacing & Sizing */
    --sidebar-width: 280px;
    --navbar-height: 64px;
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 0.75rem;
    --border-radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--neutral-50);
    color: var(--neutral-900);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Navbar */
.top-navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--neutral-200);
    height: var(--navbar-height);
    box-shadow: var(--shadow-sm);
    z-index: 1030;
    transition: all 0.3s ease;
    padding: 0 1.5rem;
}

/* Brand Logo */
.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-600);
    text-decoration: none;
}

.brand-logo:hover {
    color: var(--primary-700);
    text-decoration: none;
}

.brand-logo i {
    font-size: 1.5rem;
}

/* Search Container */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 2rem;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--neutral-300);
    background: var(--neutral-50);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: white;
}

.search-bar input::placeholder {
    color: var(--neutral-400);
}

/* Modern Buttons */
.btn-icon {
    background: transparent;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    padding: 0.625rem;
    color: var(--neutral-600);
    position: relative;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
    color: var(--neutral-800);
    transform: translateY(-1px);
}

.btn-quick-action {
    background: var(--primary-600);
    border: 1px solid var(--primary-600);
    border-radius: var(--border-radius-lg);
    padding: 0.625rem 1rem;
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-quick-action:hover {
    background: var(--primary-700);
    border-color: var(--primary-700);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* User Menu */
.btn-user-menu {
    background: transparent;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    padding: 0.5rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.btn-user-menu:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
    transform: translateY(-1px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
}

.avatar-text {
    text-transform: uppercase;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.user-name {
    font-weight: 600;
    color: var(--neutral-900);
    font-size: 0.875rem;
    line-height: 1.2;
}

.user-role {
    color: var(--neutral-500);
    font-size: 0.75rem;
    line-height: 1;
}

/* Notification Dropdown */
.notification-dropdown {
    width: 350px;
    padding: 0.5rem;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.notification-item i {
    margin-top: 0.125rem;
}

.notification-item .fw-bold {
    font-size: 0.875rem;
    color: var(--neutral-900);
}

.notification-item small {
    font-size: 0.75rem;
    line-height: 1.3;
}

/* Modern Top Navigation Bar */
.top-nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: var(--navbar-height);
    z-index: 1000;
    min-height: 64px;
}

.nav-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-left {
    flex: 1;
    justify-content: flex-start;
}

.nav-center {
    flex: 2;
    justify-content: center;
    max-width: 600px;
}

.nav-right {
    flex: 1;
    justify-content: flex-end;
}

/* Main Navigation */
.main-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 2rem;
}

.nav-item-group {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    color: var(--neutral-700);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.875rem;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-100);
    transform: translateY(-1px);
    text-decoration: none;
}

.nav-link.active {
    background: var(--primary-600);
    color: white;
    box-shadow: var(--shadow-md);
    border-color: var(--primary-600);
}

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

.nav-link span {
    font-weight: 500;
}

/* Navigation Dropdowns */
.nav-dropdown {
    position: relative;
}

.nav-dropdown .dropdown-toggle {
    background: transparent;
    border: none;
    padding: 0.625rem 1rem;
    border-radius: var(--border-radius-lg);
    font-weight: 500;
    color: var(--neutral-700);
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
}

.nav-dropdown .dropdown-toggle:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    border-color: var(--primary-100);
    transform: translateY(-1px);
}

.nav-dropdown .dropdown-toggle i:last-child {
    font-size: 0.75rem;
    margin-left: 0.25rem;
}

.nav-dropdown .dropdown-menu {
    margin-top: 0.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    background: white;
    min-width: 200px;
}

/* Search Container (Updated for Top Nav) */
.search-container {
    width: 100%;
    max-width: 400px;
}

.search-bar {
    position: relative;
    width: 100%;
}

.search-bar .search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    z-index: 1;
}

.search-bar input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--neutral-300);
    background: var(--neutral-50);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    background: white;
}

.search-bar input::placeholder {
    color: var(--neutral-400);
}

/* Mobile Navigation */
.mobile-nav {
    background: white;
    border-bottom: 1px solid var(--neutral-200);
    padding: 1rem;
}

.mobile-nav-content {
    max-width: 1200px;
    margin: 0 auto;
}

.mobile-nav-section h6 {
    font-weight: 700;
    color: var(--neutral-900);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0;
    border-radius: var(--border-radius-lg);
    color: var(--neutral-700);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: var(--primary-50);
    color: var(--primary-600);
    text-decoration: none;
}

.mobile-nav-link.active {
    background: var(--primary-600);
    color: white;
}

/* Main Content Area (Updated) */
.main-content {
    width: 100%;
    min-height: calc(100vh - var(--navbar-height));
    padding-top: var(--navbar-height);
}

.content-wrapper {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

/* Responsive Design for Top Navigation */
@media (max-width: 1200px) {
    .main-nav {
        display: none;
    }
    
    .nav-center {
        flex: 1;
        max-width: 300px;
    }
}

@media (max-width: 768px) {
    .top-nav-bar {
        padding: 0.75rem 1rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-left {
        order: 1;
        flex: 1;
    }
    
    .nav-center {
        order: 3;
        flex: 0 0 100%;
        max-width: none;
        margin-top: 0.5rem;
    }
    
    .nav-right {
        order: 2;
        flex: auto;
    }
    
    .search-container {
        max-width: none;
    }
    
    .user-info {
        display: none !important;
    }
    
    .btn-quick-action span {
        display: none !important;
    }
    
    .content-wrapper {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .brand-logo span {
        display: none;
    }
    
    .nav-section {
        gap: 0.5rem;
    }
    
    .content-wrapper {
        padding: 0.75rem;
    }
}

/* Modern Dashboard Styles */
.dashboard-header {
    background: linear-gradient(135deg, var(--primary-50) 0%, white 100%);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.header-left h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--primary-600), var(--primary-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-left p {
    color: var(--neutral-600);
    font-size: 1.125rem;
    margin: 0;
    font-weight: 500;
}

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

.date-range-selector .form-select {
    min-width: 180px;
    font-weight: 500;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.metric-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--neutral-300);
}

.metric-card:hover::before {
    opacity: 1;
}

.metric-card.metric-primary::before {
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
}

.metric-card.metric-success::before {
    background: linear-gradient(90deg, var(--success-500), var(--success-400));
}

.metric-card.metric-warning::before {
    background: linear-gradient(90deg, var(--warning-500), var(--warning-400));
}

.metric-card.metric-info::before {
    background: linear-gradient(90deg, var(--info-500), var(--info-400));
}

.metric-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.metric-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.metric-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

.metric-primary .metric-icon {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.metric-success .metric-icon {
    background: linear-gradient(135deg, var(--success-500), var(--success-600));
}

.metric-warning .metric-icon {
    background: linear-gradient(135deg, var(--warning-500), var(--warning-600));
}

.metric-info .metric-icon {
    background: linear-gradient(135deg, var(--info-500), var(--info-600));
}

.metric-trend {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-lg);
}

.metric-trend.positive {
    color: var(--success-600);
    background: var(--success-50);
    border: 1px solid var(--success-200);
}

.metric-trend.negative {
    color: var(--danger-600);
    background: var(--danger-50);
    border: 1px solid var(--danger-200);
}

.metric-value {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
    background: linear-gradient(135deg, var(--neutral-900), var(--neutral-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.metric-label {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--neutral-700);
    margin-bottom: 0.5rem;
}

.metric-subtitle {
    font-size: 0.875rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.dashboard-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

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

.card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--neutral-900);
    margin: 0;
}

.card-actions {
    display: flex;
    gap: 0.75rem;
}

.card-body {
    padding: 2.5rem;
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 350px;
}

/* Ticket List */
.ticket-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.ticket-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    transition: all 0.3s ease;
    background: white;
}

.ticket-item:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ticket-info {
    flex: 1;
}

.ticket-title {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.ticket-device {
    font-size: 0.875rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.ticket-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    margin: 0 1.5rem;
}

.ticket-id {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--primary-600);
}

.ticket-date {
    font-size: 0.75rem;
    color: var(--neutral-500);
}

/* Device List */
.device-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.device-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    transition: all 0.3s ease;
}

.device-item:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
}

.device-info {
    flex: 1;
}

.device-name {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.device-count {
    font-size: 0.875rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.device-progress {
    width: 120px;
}

.progress {
    height: 8px;
    background: var(--neutral-200);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    transition: width 0.3s ease;
}

/* Stock List */
.stock-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.stock-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    transition: all 0.3s ease;
}

.stock-item:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-300);
}

.stock-info {
    flex: 1;
}

.stock-name {
    font-weight: 700;
    color: var(--neutral-900);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.stock-sku {
    font-size: 0.875rem;
    color: var(--neutral-600);
    font-weight: 500;
}

.stock-quantity {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 1.5rem;
}

.stock-count {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--neutral-900);
}

.stock-min {
    font-size: 0.75rem;
    color: var(--neutral-500);
    font-weight: 500;
}

/* Quick Actions */
.quick-actions-card {
    margin-bottom: 2.5rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.quick-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2.5rem 1.5rem;
    border: 2px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.quick-action-btn:hover {
    border-color: var(--primary-300);
    background: var(--primary-50);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.quick-action-btn:hover .action-icon {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.action-label {
    font-weight: 700;
    color: var(--neutral-700);
    font-size: 0.9375rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--neutral-600);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.3;
    color: var(--neutral-400);
}

.empty-state h4 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--neutral-800);
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
    font-weight: 600;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-lg);
}

.btn-ghost:hover {
    background: var(--neutral-50);
    border-color: var(--neutral-400);
    color: var(--neutral-900);
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .chart-card,
    .quick-actions-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        justify-content: space-between;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        padding: 1.5rem;
    }
    
    .metric-card {
        padding: 1.5rem;
    }
    
    .card-header,
    .card-body {
        padding: 1.5rem;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .header-left h1 {
        font-size: 1.5rem;
    }
    
    .header-left p {
        font-size: 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .date-range-selector .form-select {
        width: 100%;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .ticket-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .ticket-meta {
        align-items: flex-start;
        margin: 0;
    }
}

/* Modern Cards */
.dashboard-card {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-500), var(--primary-400));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--neutral-300);
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card .card-body {
    padding: 2rem;
}

/* Modern Stats Cards */
.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--border-radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.stat-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--neutral-900), var(--neutral-700));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--neutral-600);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-change {
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

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

/* Modern Tables */
.table-modern {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-modern thead {
    background: var(--neutral-50);
    border-bottom: 1px solid var(--neutral-200);
}

.table-modern th {
    font-weight: 700;
    color: var(--neutral-700);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border: none;
}

.table-modern td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--neutral-100);
    color: var(--neutral-700);
}

.table-modern tbody tr {
    transition: background-color 0.2s ease;
}

.table-modern tbody tr:hover {
    background: var(--neutral-50);
}

/* Modern Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid;
    position: relative;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.status-received {
    background: var(--primary-50);
    color: var(--primary-700);
    border-color: var(--primary-200);
}

.status-in-progress {
    background: var(--warning-50);
    color: var(--warning-700);
    border-color: var(--warning-200);
}

.status-ready {
    background: var(--success-50);
    color: var(--success-700);
    border-color: var(--success-200);
}

.status-picked-up {
    background: var(--secondary-100);
    color: var(--secondary-700);
    border-color: var(--secondary-300);
}

.status-cancelled {
    background: var(--danger-50);
    color: var(--danger-700);
    border-color: var(--danger-200);
}

/* Modern Buttons */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius-lg);
    padding: 0.625rem 1.25rem;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600), var(--primary-500));
    border-color: var(--primary-600);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700), var(--primary-600));
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.btn-outline-primary:hover {
    background: var(--primary-50);
    border-color: var(--primary-400);
    color: var(--primary-700);
    transform: translateY(-1px);
}

/* Modern Form Controls */
.form-control, .form-select {
    border: 1px solid var(--neutral-300);
    border-radius: var(--border-radius-lg);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--neutral-700);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* Modern Modals */
.modal-content {
    border: none;
    border-radius: var(--border-radius-xl);
    box-shadow: var(--shadow-2xl);
    background: white;
}

.modal-header {
    border-bottom: 1px solid var(--neutral-200);
    padding: 1.5rem 2rem;
    background: var(--neutral-50);
    border-radius: var(--border-radius-xl) var(--border-radius-xl) 0 0;
}

.modal-title {
    font-weight: 700;
    color: var(--neutral-900);
    font-size: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid var(--neutral-200);
    padding: 1.5rem 2rem;
    background: var(--neutral-50);
    border-radius: 0 0 var(--border-radius-xl) var(--border-radius-xl);
}

/* Modern Search Bar */
.search-bar {
    position: relative;
}

.search-bar .search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neutral-400);
    z-index: 1;
}

.search-bar input {
    padding-left: 3rem;
    border-radius: var(--border-radius-xl);
    border: 1px solid var(--neutral-300);
    background: white;
    transition: all 0.2s ease;
}

.search-bar input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px var(--primary-100);
}

/* Modern Charts Container */
.chart-container {
    background: white;
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--neutral-900);
}

/* Modern Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--neutral-600);
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 2rem;
    opacity: 0.3;
    color: var(--neutral-400);
}

.empty-state .empty-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--neutral-800);
}

.empty-state .empty-description {
    font-size: 1rem;
    margin-bottom: 2rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Modern Alerts */
.alert-modern {
    border: none;
    border-radius: var(--border-radius-lg);
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-50);
    color: var(--success-800);
    border: 1px solid var(--success-200);
}

.alert-danger {
    background: var(--danger-50);
    color: var(--danger-800);
    border: 1px solid var(--danger-200);
}

.alert-warning {
    background: var(--warning-50);
    color: var(--warning-800);
    border: 1px solid var(--warning-200);
}

.alert-info {
    background: var(--primary-50);
    color: var(--primary-800);
    border: 1px solid var(--primary-200);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .content-wrapper {
        padding: 1rem;
        margin-left: 0;
    }
    
    .dashboard-card .card-body {
        padding: 1.5rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .table-modern {
        font-size: 0.875rem;
    }
    
    .table-modern th,
    .table-modern td {
        padding: 0.75rem 1rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Animations */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

/* Modern Tooltips */
.tooltip-inner {
    background: var(--neutral-900);
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Modern Pagination */
.pagination .page-link {
    border: 1px solid var(--neutral-300);
    color: var(--neutral-700);
    padding: 0.5rem 1rem;
    margin: 0 0.125rem;
    border-radius: var(--border-radius-md);
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background: var(--primary-50);
    border-color: var(--primary-300);
    color: var(--primary-700);
}

.pagination .page-item.active .page-link {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: white;
}

/* Modern Dropdowns */
.dropdown-menu {
    border: 1px solid var(--neutral-200);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    background: white;
}

.dropdown-item {
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1rem;
    transition: all 0.2s ease;
    font-weight: 500;
    color: var(--neutral-700);
}

.dropdown-item:hover {
    background: var(--neutral-50);
    color: var(--neutral-900);
}

/* Modern Notification Badge */
.notification-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    background: var(--danger-500);
    color: white;
    font-weight: 700;
    animation: pulse 2s infinite;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-navbar,
    .btn,
    .modal {
        display: none !important;
    }
    
    .content-wrapper {
        margin-left: 0 !important;
        padding: 0 !important;
    }
}
