:root {
    --primary-color: #2a5298;
    --primary-dark: #1e3c72;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-bg: #f8f9fa;
    --dark-text: #343a40;
    --border-color: #dee2e6;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f0f2f5;
    color: var(--dark-text);
}

/* Landing Page Styles */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-nav {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand h1 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
}

.nav-brand p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-primary, .btn-success, .btn-secondary, .btn-danger {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #218838;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-small {
    padding: 5px 10px;
    font-size: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
}

.btn-small:hover {
    background: var(--primary-dark);
}

/* inline editing buttons placed alongside row actions */
.inline-save,
.inline-cancel {
    margin-left: 4px;
    background: var(--success-color);
}
.inline-cancel {
    background: var(--danger-color);
}
.inline-save:hover,
.inline-cancel:hover {
    opacity: 0.8;
}

td.editable {
    cursor: pointer;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 4rem 2rem;
    background: white;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.feature-link {
    display: inline-block;
    margin-top: 1rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.stats-section {
    background: var(--light-bg);
    padding: 4rem 2rem;
    text-align: center;
}

.stats-section h2 {
    margin-bottom: 2rem;
    color: var(--primary-dark);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.stat-item {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stat-label {
    margin-top: 0.5rem;
    color: #666;
}

.main-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: auto;
}

/* App Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
}

.nav-item:hover, .nav-item.active {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left: 4px solid white;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.content-header h1 {
    font-size: 24px;
    color: var(--primary-dark);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Search Input */
.search-input {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 300px;
    font-size: 14px;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.data-table th {
    background: var(--primary-color);
    color: white;
    padding: 12px;
    font-weight: 500;
    text-align: left;
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tr:hover {
    background: var(--light-bg);
}

/* Tabs */
.tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
}

.tab-btn.active {
    border-bottom-color: var(--primary-color);
    color: var(--primary-color);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 50px auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.modal-content.large-modal {
    max-width: 900px;
}

.modal-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
    color: white;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
}

.close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    opacity: 0.8;
}

.modal-body {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.page-numbers {
    display: flex;
    gap: 5px;
    align-items: center;
}

.page-number-button {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
}

.page-number-button.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-number-button:hover:not(.active) {
    background: var(--light-bg);
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    cursor: pointer;
    border-radius: 4px;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status Badges */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing {
    background: #cce5ff;
    color: #004085;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-safe {
    background: #d4edda;
    color: #155724;
}

.status-near-expiry {
    background: #fff3cd;
    color: #856404;
}

.status-expired {
    background: #f8d7da;
    color: #721c24;
}

/* Availability Badges */
.availability-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

.availability-available {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.availability-outofstock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.availability-irregular {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.availability-unlisted {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.availability-discontinued {
    background: #343a40;
    color: white;
    border: 1px solid #1d2124;
}

/* Dashboard Styles */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    font-size: 40px;
}

.stat-details h3 {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.stat-details p {
    font-size: 28px;
    font-weight: 600;
    color: var(--primary-color);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.dashboard-card.full-width {
    grid-column: span 2;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 16px;
    color: var(--dark-text);
}

.card-body {
    padding: 20px;
    max-height: 400px;
    overflow-y: auto;
}

/* POS Styles */
.pos-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.pos-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    padding: 20px;
}

.product-search {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.product-search input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 16px;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding: 5px;
}

.product-card {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.product-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.product-card .name {
    font-weight: 600;
    margin-bottom: 5px;
}

.product-card .price {
    color: var(--success-color);
    font-weight: 600;
    font-size: 18px;
}

.product-card .stock {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

/* Cart Section */
.pos-cart {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 600px;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 15px;
}

.cart-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 5px;
}

.cart-item .item-name {
    font-weight: 500;
}

.cart-item .item-price {
    color: var(--success-color);
}

.cart-item .item-qty input {
    width: 60px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-align: center;
}

.cart-item .item-total {
    font-weight: 600;
}

.cart-item .remove-item {
    color: var(--danger-color);
    cursor: pointer;
    font-size: 18px;
}

.cart-summary {
    background: white;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-row.total {
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-color);
    border-top: 2px solid var(--border-color);
    padding-top: 8px;
    margin-top: 8px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions button {
    flex: 1;
}

/* Packing Queue Styles */
.packing-queue {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    padding: 20px;
}

.packing-item {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border-color);
}

.packing-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.packing-item.priority-high {
    border-left: 4px solid #dc3545;
}

.packing-item.priority-normal {
    border-left: 4px solid #28a745;
}

.packing-item.priority-low {
    border-left: 4px solid #ffc107;
}

.packing-item-header {
    padding: 15px;
    background: var(--light-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.priority-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.priority-badge.priority-high {
    background: #f8d7da;
    color: #721c24;
}

.packing-item-body {
    padding: 15px;
}

.packing-item-footer {
    padding: 15px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    margin: 10px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

/* Packing Filters */
.packing-filters {
    padding: 15px 20px;
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
}

.packing-filters select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

/* Verification Checks */
.verification-checks {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding: 8px;
    background: white;
    border-radius: 4px;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Photo Upload */
.photo-upload {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 4px;
}

/* Timeline Events */
.timeline-event {
    padding: 10px;
    border-left: 2px solid var(--primary-color);
    margin-left: 10px;
    margin-bottom: 10px;
    background: var(--light-bg);
    border-radius: 0 4px 4px 0;
}

/* Courier Summary */
.courier-summary,
.order-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.summary-card h4 {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-card p {
    font-size: 24px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Patient Info Grid */
.patient-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.info-card {
    background: var(--light-bg);
    padding: 15px;
    border-radius: 6px;
}

.info-card h4 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Alert Items */
.alert-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

.alert-item.warning {
    background: #fff3cd;
}

.alert-item.danger {
    background: #f8d7da;
}

/* Chart Containers */
canvas {
    max-height: 300px;
    max-width: 100%;
}

/* Items Table */
.items-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.items-table th {
    background: var(--light-bg);
    padding: 10px;
    text-align: left;
}

.items-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
}

/* Month Picker */
.month-picker-container {
    display: flex;
    align-items: center;
    gap: 5px;
}

.month-input {
    flex: 1;
}

.month-picker-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.month-picker-btn:hover {
    background: var(--primary-dark);
}

/* Loading States */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-row {
    text-align: center;
    padding: 60px;
    color: #6c757d;
    font-style: italic;
}

.no-data {
    text-align: center;
    padding: 60px;
    color: #6c757d;
    font-style: italic;
    background: white;
    border-radius: 8px;
    grid-column: 1 / -1;
}

/* Error Message */
.error-message {
    text-align: center;
    padding: 60px;
    color: #721c24;
    background: #f8d7da;
    border-radius: 12px;
    margin: 20px;
}

/* Highlight */
.highlight {
    background: #fff3cd;
    color: #856404;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
}

/* Expiry Badge */
.expiry-badge {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
}

/* Text Utilities */
.text-right {
    text-align: right;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }
    
    .sidebar-header h2,
    .nav-item span {
        display: none;
    }
    
    .main-content {
        margin-left: 60px;
    }
    
    .header-actions {
        flex-direction: column;
    }
    
    .search-input {
        width: 100%;
    }
    
    .pos-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-card.full-width {
        grid-column: span 1;
    }
    
    .patient-info-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        display: none;
    }
}
/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.action-buttons .btn-small {
    padding: 4px 8px;
    font-size: 12px;
    min-width: 30px;
}

/* No Data Message */
.no-data {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
    border-radius: 8px;
}

/* Text Colors */
.text-success {
    color: #28a745;
    font-weight: 600;
}

.text-danger {
    color: #dc3545;
    font-weight: 600;
}

.text-warning {
    color: #ffc107;
    font-weight: 600;
}

/* Status Badge Colors */
.status-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Info Card */
.info-card {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.info-card h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2a5298;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 5px;
}

/* Sale Items Table */
.sale-items-section {
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.items-table th {
    background: #2a5298;
    color: white;
    padding: 10px;
    font-size: 13px;
}

.items-table td {
    padding: 8px;
    vertical-align: middle;
}

.items-table input[type="number"],
.items-table select {
    width: 100%;
    padding: 6px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Order Item Row */
.order-item-row {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.order-item-row:hover {
    background: #e9ecef;
}

/* Large Modal */
.modal-content.large-modal {
    max-width: 900px;
    width: 95%;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .items-table {
        font-size: 12px;
    }
    
    .items-table th,
    .items-table td {
        padding: 5px;
    }
}

/* Sidebar Styles with Collapse Functionality */

.sidebar {
    width: 260px;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

/* Collapsed Sidebar (for mobile) */
.sidebar.collapsed-sidebar {
    width: 70px;
}

.sidebar.collapsed-sidebar .nav-text,
.sidebar.collapsed-sidebar .nav-group-title,
.sidebar.collapsed-sidebar .group-toggle,
.sidebar.collapsed-sidebar .user-name {
    display: none;
}

.sidebar.collapsed-sidebar .nav-icon {
    margin-right: 0;
    font-size: 20px;
}

.sidebar.collapsed-sidebar .nav-item {
    justify-content: center;
    padding: 15px 0;
}

.sidebar.collapsed-sidebar .sidebar-header h2 {
    display: none;
}

.sidebar.collapsed-sidebar .user-info {
    justify-content: center;
}

/* Sidebar Header */
.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: white;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    font-size: 20px;
    width: 35px;
    height: 35px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.2);
}

/* Navigation Groups */
.nav-group {
    margin-bottom: 5px;
}

.nav-group-header {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.2);
    transition: background 0.3s;
    border-left: 3px solid transparent;
}

.nav-group-header:hover {
    background: rgba(0,0,0,0.3);
}

.nav-group-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.7);
}

.group-toggle {
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    transition: transform 0.3s;
}

/* Group Content */
.nav-group-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Collapsed State */
.nav-group.collapsed .nav-group-content {
    display: none;
}

/* Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 20px 10px 30px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-size: 14px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    border-left-color: white;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left-color: white;
    font-weight: 500;
}

.nav-icon {
    margin-right: 12px;
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.nav-text {
    flex: 1;
}

/* Sidebar Footer */
.sidebar-footer {
    position: sticky;
    bottom: 0;
    margin-top: 20px;
    padding: 15px 20px;
    background: rgba(0,0,0,0.3);
    border-top: 1px solid rgba(255,255,255,0.1);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.user-avatar {
    font-size: 20px;
    width: 32px;
    height: 32px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

/* Main Content Adjustment */
.main-content {
    margin-left: 260px;
    padding: 20px;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed-sidebar + .main-content {
    margin-left: 70px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 260px;
        transform: translateX(-100%);
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed-sidebar {
        width: 260px;
        transform: translateX(-100%);
    }
    
    .sidebar.collapsed-sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed-sidebar .nav-text,
    .sidebar.collapsed-sidebar .nav-group-title,
    .sidebar.collapsed-sidebar .group-toggle,
    .sidebar.collapsed-sidebar .user-name {
        display: block;
    }
    
    .sidebar.collapsed-sidebar .nav-icon {
        margin-right: 12px;
    }
    
    .sidebar.collapsed-sidebar .nav-item {
        justify-content: flex-start;
        padding: 10px 20px;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .sidebar-toggle {
        display: block;
    }
}

/* Animation for group toggle */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-group-content {
    animation: slideDown 0.3s ease;
}

/* Scrollbar styling */
.sidebar::-webkit-scrollbar {
    width: 5px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
    border-radius: 5px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.5);
}

/* Tab Content Styles */
.warehouse-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.warehouse-tab-content.active {
    display: block;
}

/* Tab Button Styles */
.warehouse-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.warehouse-tabs .tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
    transition: all 0.3s;
    flex: 1;
}

.warehouse-tabs .tab-btn:hover {
    background: var(--light-bg);
}

.warehouse-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading-row {
    text-align: center;
    padding: 40px !important;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
}

/* Readonly field style */
.readonly-field {
    background: #f0f0f0;
    cursor: not-allowed;
}

/* Store Management Styles */

/* Summary Cards */
.store-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.summary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.summary-icon {
    font-size: 32px;
    width: 50px;
    height: 50px;
    background: var(--light-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.summary-details h4 {
    font-size: 13px;
    color: #6c757d;
    margin-bottom: 5px;
}

.summary-details p {
    font-size: 20px;
    font-weight: 600;
    color: var(--primary-color);
}

/* Store Tabs */
.store-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.store-tabs .tab-btn {
    padding: 10px 20px;
    background: none;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--dark-text);
    transition: all 0.3s;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.store-tabs .tab-btn:hover {
    background: var(--light-bg);
}

.store-tabs .tab-btn.active {
    background: var(--primary-color);
    color: white;
}

/* Tab Content */
.store-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.store-tab-content.active {
    display: block;
}

/* Display Controls */
.display-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.info-text {
    color: #6c757d;
    font-size: 13px;
}

/* Highlight Row */
.highlight-row {
    background: #fff3cd !important;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { background: #fff3cd; }
    50% { background: #ffe69c; }
    100% { background: #fff3cd; }
}

/* Sales Filters */
.sales-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.sales-filters input,
.sales-filters select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
}

/* Details Grid */
.details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    padding: 15px;
    background: var(--light-bg);
    border-radius: 6px;
    margin-bottom: 15px;
}

/* Receipt Styles */
.receipt {
    font-family: 'Courier New', monospace;
    max-width: 300px;
    margin: 0 auto;
}

.receipt-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #000;
}

.receipt-header h2 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
}

.receipt-table th,
.receipt-table td {
    padding: 5px;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.receipt-table th {
    background: var(--light-bg);
    font-size: 12px;
}

.receipt-summary {
    margin: 15px 0;
    padding: 10px;
    background: var(--light-bg);
    border-radius: 6px;
}

.summary-line {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.summary-line.total {
    font-weight: bold;
    border-top: 2px solid #000;
    padding-top: 5px;
    margin-top: 5px;
}

.receipt-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 10px;
    border-top: 2px dashed #000;
    font-size: 12px;
    color: #666;
}

/* Modal Footer */
.modal-footer {
    padding: 15px 24px;
    background: var(--light-bg);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-radius: 0 0 12px 12px;
}

/* Readonly Field */
.readonly-field {
    background: #f0f0f0;
    cursor: not-allowed;
    border: 1px solid #ddd;
}

/* Search Box */
.search-box {
    position: relative;
    display: inline-block;
}

.search-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.search-input {
    padding-right: 35px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
    justify-content: center;
}

.action-buttons .btn-small {
    padding: 5px 8px;
    font-size: 12px;
    min-width: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .store-tabs .tab-btn {
        padding: 8px 5px;
        font-size: 12px;
    }
    
    .store-tabs .tab-btn span {
        display: none;
    }
    
    .store-summary {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sales-filters {
        flex-direction: column;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .details-grid {
        grid-template-columns: 1fr;
    }
}
/* Empty State Styles */
.no-data {
    text-align: center;
    padding: 40px !important;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px;
}

.empty-icon {
    font-size: 64px;
    display: block;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    color: #495057;
    margin-bottom: 10px;
    font-size: 18px;
}

.empty-state p {
    color: #6c757d;
    margin-bottom: 20px;
    font-size: 14px;
}

.empty-state .btn-primary {
    display: inline-block;
    padding: 10px 20px;
}

/* Loading State */
.loading-row {
    text-align: center;
    padding: 60px !important;
    color: #6c757d;
    font-style: italic;
    background: #f8f9fa;
}

.loading-spinner {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Table Container */
.table-container {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: auto;
    margin-bottom: 20px;
}

.table-container table {
    margin-bottom: 0;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid var(--border-color);
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-size: 14px;
    color: var(--dark-text);
}

/* Searchable Select Styles */
.searchable-select {
    position: relative;
}

.searchable-select input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    background: white;
}

.searchable-select input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(42, 82, 152, 0.1);
}

.dropdown-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.dropdown-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: var(--light-bg);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item.selected {
    background-color: var(--primary-color);
    color: white;
}