/* style.css */
:root {
    --primary-color: #4361ee;
    --primary-dark: #3a56d4;
    --secondary-color: #7209b7;
    --success-color: #4cc9f0;
    --danger-color: #f72585;
    --warning-color: #f8961e;
    --info-color: #43aa8b;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 12px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 
        /* macOS/iOS */
        -apple-system, BlinkMacSystemFont,
        /* Windows */
        'Segoe UI',
        /* Android */
        Roboto,
        /* Linux */
        'Helvetica Neue', Arial, 'Noto Sans',
        /* Fallback */
        sans-serif,
        /* Emoji support */
        'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
    
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--dark-color);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 40px 30px;
    box-shadow: var(--box-shadow-lg);
    animation: slideUp 0.5s ease;
}

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

.brand-header {
    text-align: center;
    margin-bottom: 30px;
}

.brand-header .logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: white;
    font-size: 32px;
}

.brand-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 5px;
}

.logo-login {
    width: 350px;
    height: auto;
}

.logo-main {
    width: 200px;
    height: auto;
}

.subtitle {
    color: var(--gray-color);
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(67, 97, 238, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #3a86ff);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #f9844a);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #b5179e);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 14px;
    width: auto;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 50%;
}

/* Alert Styles */
.alert {
    padding: 12px 15px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, #ffe3e3, #ffc9c9);
    color: #c92a2a;
    border-left: 4px solid #ff6b6b;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-left: 4px solid #ffd43b;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-left: 4px solid #51cf66;
}

/* Features */
.features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

.feature {
    text-align: center;
    color: var(--gray-color);
    font-size: 12px;
}

.feature i {
    display: block;
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
    background: #f5f7fb;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: white;
    box-shadow: var(--box-shadow);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sidebar-header h2 {
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.menu-item {
    padding: 12px 20px;
    color: var(--gray-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.menu-item:hover, .menu-item.active {
    background: rgba(67, 97, 238, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

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

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    transition: var(--transition);
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 25px;
}

.page-title h1 {
    color: var(--primary-color);
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    font-size: 11px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.stat-card.warning {
    border-top-color: var(--warning-color);
}

.stat-card.danger {
    border-top-color: var(--danger-color);
}

.stat-card.success {
    border-top-color: var(--success-color);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-card .stat-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}

.stat-card.warning .stat-icon {
    background: linear-gradient(135deg, var(--warning-color), #f9844a);
}

.stat-card.danger .stat-icon {
    background: linear-gradient(135deg, var(--danger-color), #b5179e);
}

.stat-card.success .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #3a86ff);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-label {
    color: var(--gray-color);
    font-size: 14px;
}

.stat-change {
    font-size: 12px;
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.positive {
    color: #51cf66;
}

.negative {
    color: #ff6b6b;
}

/* Charts Section */
.charts-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
}

.chart-header {
    margin-bottom: 20px;
}

.chart-header h3 {
    color: var(--primary-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Table Styles */
.table-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h3 {
    color: var(--primary-color);
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

thead {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
}

th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--light-gray);
}

tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

/* Form Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--box-shadow-lg);
}

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

.modal-header h3 {
    color: var(--primary-color);
    font-size: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--gray-color);
    transition: var(--transition);
}

.close-btn:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 25px;
}

/* Mobile search enhancements */
@media (max-width: 768px) {
    .search-box {
        position: sticky;
        top: 60px;
        z-index: 100;
        background: white;
        padding: 10px 0;
        margin-bottom: 10px;
    }
    
    /* Floating search on scroll */
    .table-header.sticky {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        background: white;
        z-index: 1000;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 10px 15px;
        margin: 0;
        border-radius: 0;
    }
    
    /* Search with icon */
    .search-box.with-icon {
        position: relative;
    }
    
    .search-box.with-icon i {
        position: absolute;
        left: 15px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-color);
        pointer-events: none;
    }
    
    .search-box.with-icon .form-control {
        padding-left: 45px;
    }
}

/* Search and Filter Styles */
.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    display: flex;
    gap: 8px;
}

.search-box .form-control {
    padding-right: 40px;
    flex: 1;
}

.search-box #clearSearch {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    border: none;
    background: transparent;
    color: var(--gray-color);
    padding: 0 15px;
    display: none;
}

.search-box #clearSearch.visible {
    display: flex;
    align-items: center;
}

.mobile-filters {
    display: none;
}

.filter-panel {
    background: var(--light-gray);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0;
}

.filter-actions {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

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

/* Mobile specific filter styles */
@media (max-width: 768px) {
    .search-box {
        min-width: 100%;
        order: 1;
    }
    
    .mobile-filters {
        display: flex;
        order: 2;
    }
    
    .filter-panel {
        grid-template-columns: 1fr;
        margin-top: 10px;
    }
    
    .filter-actions {
        grid-column: 1;
        margin-top: 10px;
    }
    
    /* Make search more prominent on mobile */
    .table-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .table-actions {
        display: flex;
        gap: 10px;
        width: 100%;
    }
}

/* Search highlighting */
.highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* Loading state */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid var(--light-gray);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        width: 70px;
    }
    
    .sidebar-header h2 span,
    .menu-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 70px;
    }
    
    .top-bar {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .action-buttons {
        width: 100%;
    }
    
    .action-buttons .btn {
        flex: 1;
        min-width: 120px;
    }
}

@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .features {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .modal-content {
        margin: 10px;
    }
}

/* Print Styles */
@media print {
    .sidebar, .top-bar .user-info, .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stat-card, .chart-card, .table-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* In your style.css file, add this */
input.form-control[type="password"],
input.form-control[type="text"] {
    font-size: 16px; /* Prevents iOS zoom on focus */
    height: 48px; /* Better touch target on mobile */
}

/* For PIN input specifically */
input#pin {
    text-align: center;
    letter-spacing: 8px; /* Makes PIN digits more spaced out */
    font-family: monospace; /* Makes PIN digits look uniform */
}

/* Remove spin buttons from number inputs on webkit browsers */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Category specific styles */
.categories-grid {
    display: grid;
    gap: 20px;
}

.category-color {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-block;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.color-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.color-presets {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.color-preset {
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.color-preset:hover {
    transform: scale(1.1);
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--light-gray);
    border-radius: 12px;
    font-size: 12px;
    color: var(--gray-color);
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.empty-state i {
    color: var(--light-gray);
    margin-bottom: 20px;
}

.empty-state h3 {
    color: var(--gray-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--gray-color);
    margin-bottom: 20px;
}

.search-box {
    min-width: 250px;
}

/* Form Card */
.form-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 30px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -10px;
    margin-right: -10px;
}

.form-row .form-group {
    padding-left: 10px;
    padding-right: 10px;
}

.col-md-3, .col-md-6, .col-md-12 {
    position: relative;
    width: 100%;
    padding-left: 10px;
    padding-right: 10px;
}

.col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.confirmation-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.confirmation-buttons .btn {
    min-width: 200px;
}

.total-value {
    font-weight: 600;
    color: var(--primary-color);
}

.ml-3 {
    margin-left: 15px;
}

.mb-0 {
    margin-bottom: 0;
}

/* Purchase List Styles */
.purchase-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.purchase-list-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    border-left: 4px solid var(--primary-color);
}

.purchase-list-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.purchase-list-card.pending {
    border-left-color: var(--warning-color);
}

.purchase-list-card.completed {
    border-left-color: var(--success-color);
}

.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
}

.list-status {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.list-date {
    font-size: 12px;
    color: var(--gray-color);
}

.list-actions {
    display: flex;
    gap: 8px;
}

.list-body h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.list-notes {
    color: var(--gray-color);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.4;
}

.list-stats {
    display: flex;
    gap: 20px;
    margin-top: 15px;
}

.list-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.list-stats .stat i {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 5px;
}

.list-stats .stat span {
    font-size: 12px;
    color: var(--gray-color);
}

.list-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.completed-date {
    font-size: 12px;
    color: var(--success-color);
    font-weight: 500;
}

.filter-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.filter-form {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.section-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.items-table {
    margin-bottom: 20px;
}

.items-table th {
    background: var(--light-gray);
    color: var(--dark-color);
}

.stock-status {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.stock-status.success {
    background: rgba(76, 201, 240, 0.1);
    color: #4cc9f0;
}

.stock-status.warning {
    background: rgba(248, 150, 30, 0.1);
    color: #f8961e;
}

.stock-status.danger {
    background: rgba(247, 37, 133, 0.1);
    color: #f72585;
}

.summary-card {
    background: rgba(67, 97, 238, 0.05);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(67, 97, 238, 0.1);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(67, 97, 238, 0.1);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span:first-child {
    font-weight: 500;
    color: var(--primary-color);
}

.summary-row span:last-child {
    font-weight: 600;
    color: var(--dark-color);
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.info-item h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item p {
    margin-bottom: 8px;
    color: var(--dark-color);
}

.summary-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.summary-stats .stat {
    text-align: center;
}

.summary-stats .stat-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.summary-stats .stat-label {
    display: block;
    font-size: 12px;
    color: var(--gray-color);
    margin-top: 5px;
}

.action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.action-buttons-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stock-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.stock-indicator.success {
    background: rgba(76, 201, 240, 0.1);
    color: #4cc9f0;
}

.stock-indicator.warning {
    background: rgba(248, 150, 30, 0.1);
    color: #f8961e;
}

.stock-indicator.danger {
    background: rgba(247, 37, 133, 0.1);
    color: #f72585;
}

/* Print Styles */
.print-header {
    text-align: center;
    margin-bottom: 30px;
}

.print-header h1 {
    color: #000;
    margin-bottom: 10px;
}

.print-header h2 {
    color: #333;
    margin-bottom: 15px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.print-table th {
    background: #f5f5f5;
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.print-table td {
    padding: 10px;
    border: 1px solid #ddd;
}

.checkbox-cell {
    text-align: center;
    font-size: 20px;
}

.print-footer {
    text-align: center;
    margin-top: 30px;
    color: #666;
    font-size: 12px;
}

/* Summary Grid */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: rgba(67, 97, 238, 0.05);
    border-radius: 8px;
}

.summary-item span:first-child {
    font-weight: 500;
    color: var(--gray-color);
}

.summary-item span:last-child {
    font-weight: 600;
    color: var(--primary-color);
}

/* Table Actions */
.table-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .purchase-lists-grid {
        grid-template-columns: 1fr;
    }
    
    .list-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .action-buttons-group {
        flex-direction: column;
    }
    
    .action-buttons-group .btn {
        width: 100%;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }

    /* Chart container to prevent overflow */
    .chart-container {
        position: relative;
        height: 200px;
        width: 100%;
    }

    /* Limit chart size */
    canvas {
        max-height: 200px !important;
        width: 100% !important;
    }

    /* Prevent chart cards from expanding */
    .chart-card {
        min-height: 300px;
        display: flex;
        flex-direction: column;
    }

    .chart-card .chart-header {
        flex-shrink: 0;
    }

    .chart-card .chart-container {
        flex-grow: 1;
    }

    /* Chart Styles */
    .charts-section {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 20px;
        margin-bottom: 30px;
    }

    .chart-card {
        background: white;
        border-radius: var(--border-radius);
        padding: 20px;
        box-shadow: var(--box-shadow);
        display: flex;
        flex-direction: column;
        height: 350px; /* Fixed height */
    }

    .chart-header {
        margin-bottom: 15px;
        flex-shrink: 0;
    }

    .chart-header h3 {
        color: var(--primary-color);
        margin-bottom: 5px;
        font-size: 18px;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .chart-header small {
        color: var(--gray-color);
        font-size: 12px;
    }

    .chart-container {
        flex: 1;
        position: relative;
        min-height: 200px;
    }

    .chart-footer {
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px solid var(--light-gray);
        flex-shrink: 0;
    }

    /* Make charts responsive */
    canvas {
        max-width: 100% !important;
        height: auto !important;
    }

    .notification-dropdown {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.notification-dropdown .dropdown-menu {
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    padding: 0;
}

.notification-header {
    padding: 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.notification-body {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: #f8f9fa;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-content {
    flex: 1;
    margin-right: 10px;
}

.stock-info {
    margin: 5px 0;
}

.stock-info .badge {
    margin-right: 5px;
    font-size: 0.75rem;
}

.notification-footer {
    padding: 1rem;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

/* Make dropdown scrollable on mobile */
@media (max-width: 576px) {
    .notification-dropdown .dropdown-menu {
        width: 280px;
        position: fixed !important;
        top: 60px !important;
        right: 10px !important;
        left: auto !important;
    }
}
}