/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    color: #333;
}

/* Country Sections Styles */
.country-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.country-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.country-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.country-header {
    background: linear-gradient(135deg, #4a90e2 0%, #357abd 100%);
    color: white;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.country-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
}

.country-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.country-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #666;
}

.country-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.country-empty h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

/* App Container */
.app-container {
    display: grid;
    grid-template-areas:
        "header"
        "navbar"
        "main";
    grid-template-columns: 1fr;
    grid-template-rows: 70px 60px 1fr;
    min-height: 100vh;
}

/* Header */
.header {
    grid-area: header;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 100%;
}

.app-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4a5568;
}

.current-date {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
}

/* Top Navigation Bar */
.top-navbar {
    grid-area: navbar;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 2px 20px rgba(102, 126, 234, 0.3);
    overflow-x: auto;
}

.nav-container {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    gap: 0.5rem;
    min-width: max-content;
}

.nav-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    position: relative;
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    transform: translateY(-2px);
}

.nav-tab.active {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

.nav-icon {
    font-size: 1.1rem;
}

.nav-text {
    font-weight: 500;
}

/* Main Content */
.main-content {
    grid-area: main;
    padding: 0;
    overflow-y: auto;
    background: #f8fafc;
}

/* Pages */
.page {
    display: none;
    background: white;
    min-height: 100%;
    padding: 2rem;
    animation: fadeIn 0.3s ease-in-out;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.page-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2d3748;
}

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

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

/* Advanced Search */
.advanced-search {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-filters {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-group, .filter-group {
    display: flex;
    flex-direction: column;
}

.filter-select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.inventory-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #f7fafc;
    border-radius: 10px;
    border-right: 4px solid #667eea;
}

.stat-label {
    color: #718096;
    font-weight: 500;
}

.stat-value {
    color: #2d3748;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #68d391, #48bb78);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.readonly-input {
    background: #f7fafc !important;
    color: #4a5568 !important;
    font-weight: 600;
    cursor: not-allowed;
}

.search-input {
    margin-bottom: 2rem;
    max-width: 400px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 20px;
    color: white;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dashboard-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 1rem;
}

.current-time {
    font-size: 1rem;
    opacity: 0.8;
    font-weight: 500;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.main-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.nav-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    text-align: center;
}

.nav-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.nav-card-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.nav-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.nav-card p {
    color: #718096;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.nav-card-stats {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.nav-card-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 10px;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.nav-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.special-nav-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.special-nav-card h3 {
    color: white;
}

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

.quick-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.quick-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Page Container */
.page-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.header-title h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.header-title p {
    color: #718096;
    font-size: 1rem;
}

/* Table Controls */
.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-container {
    flex: 1;
    max-width: 400px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    right: 1rem;
    color: #718096;
    font-size: 1.2rem;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f7fafc;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.filter-container {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.9rem;
    background: white;
    transition: all 0.3s ease;
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 15px;
    color: white;
}

.stat-info {
    flex: 1;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Data Table */
.table-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table thead {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.data-table th {
    padding: 1rem;
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.data-table td {
    padding: 1rem;
    text-align: right;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: all 0.3s ease;
}

.data-table tbody tr:hover {
    background: #f7fafc;
}

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

/* Table Empty State */
.table-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.table-empty h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.table-empty p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Order Form Styles */
.order-form-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.section-header h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2d3748;
}

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

.order-items-container {
    min-height: 200px;
}

.no-items-message {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
    border: 2px dashed #e2e8f0;
    border-radius: 15px;
}

.order-item-card {
    background: #f7fafc;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.order-item-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

/* Product Search Styles */
.product-search-container {
    position: relative;
    width: 100%;
}

.product-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.3s ease;
    direction: rtl;
}

.product-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.product-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.product-option {
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.product-option:hover {
    background-color: #f8fafc;
}

.product-option:last-child {
    border-bottom: none;
}

.product-name {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 4px;
}

.product-details {
    font-size: 12px;
    color: #718096;
}

.no-results {
    padding: 16px;
    text-align: center;
    color: #a0aec0;
    font-style: italic;
}

/* Stock status styles */
.product-option.in-stock {
    border-right: 3px solid #48bb78;
}

.product-option.low-stock {
    border-right: 3px solid #ed8936;
    background-color: #fffaf0;
}

.product-option.out-of-stock {
    border-right: 3px solid #f56565;
    background-color: #fed7d7;
    opacity: 0.7;
    cursor: not-allowed;
}

.product-option.out-of-stock:hover {
    background-color: #fed7d7;
}

.product-code {
    font-weight: 600;
    color: #4a5568;
}

.product-stock {
    color: #2d3748;
}

.product-price {
    color: #38a169;
    font-weight: 600;
}

/* Search help text */
.search-help-text {
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    color: #234e52;
    font-size: 14px;
    text-align: center;
}

/* Date range filter styles */
.date-range-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 4px 8px;
    min-width: 280px;
}

.date-input {
    border: none !important;
    background: transparent !important;
    padding: 8px 4px !important;
    font-size: 14px;
    color: #2d3748;
    min-width: 120px;
}

.date-input:focus {
    outline: none;
    background: #f7fafc !important;
}

.date-separator {
    color: #718096;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.clear-dates-btn {
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 4px;
    padding: 4px 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
}

.clear-dates-btn:hover {
    background: #fc8181;
    color: white;
}

.date-range-container:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Quick date filters */
.quick-date-filters {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.quick-date-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.quick-date-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
}

.quick-date-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.2);
}

.quick-date-btn.active {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 2px 4px rgba(72, 187, 120, 0.3);
}

/* Date Range Summary */
.date-range-summary {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.summary-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #cbd5e0;
}

.summary-icon {
    font-size: 18px;
}

.summary-title {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.summary-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.summary-label {
    color: #718096;
    font-size: 14px;
}

.summary-value {
    font-weight: 600;
    color: #2d3748;
    font-size: 14px;
}

.item-number {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.remove-item-btn {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-item-btn:hover {
    background: #feb2b2;
    transform: scale(1.1);
}

.order-summary-card {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid #e2e8f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.summary-label {
    color: #4a5568;
    font-weight: 500;
}

.summary-value {
    color: #2d3748;
    font-weight: 700;
}

.total-row {
    border-top: 2px solid #667eea;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 1.3rem;
}

.total-row .summary-label {
    color: #667eea;
    font-weight: 700;
}

.total-row .summary-value {
    color: #667eea;
    font-size: 1.5rem;
}

/* Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    display: inline-block;
}

.status-pending {
    background: #fed7aa;
    color: #c05621;
}

.status-completed {
    background: #c6f6d5;
    color: #22543d;
}

.status-cancelled {
    background: #fed7d7;
    color: #c53030;
}

.status-paid {
    background: #bee3f8;
    color: #2a69ac;
}

.status-unpaid {
    background: #fbb6ce;
    color: #97266d;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.action-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.action-btn-primary {
    background: #667eea;
    color: white;
}

.action-btn-primary:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.action-btn-success {
    background: #48bb78;
    color: white;
}

.action-btn-success:hover {
    background: #38a169;
    transform: translateY(-1px);
}

.action-btn-danger {
    background: #f56565;
    color: white;
}

.action-btn-danger:hover {
    background: #e53e3e;
    transform: translateY(-1px);
}

.action-btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.action-btn-secondary:hover {
    background: #cbd5e0;
    transform: translateY(-1px);
}

/* Quantity Badge */
.quantity-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9rem;
}

.quantity-badge.out-of-stock {
    background: #fed7d7;
    color: #c53030;
}

.quantity-badge.low-stock {
    background: #feebc8;
    color: #c05621;
}

.quantity-badge.in-stock {
    background: #c6f6d5;
    color: #22543d;
}

/* Product Row Styling */
.product-row.out-of-stock {
    background: rgba(254, 215, 215, 0.3);
}

.product-row.low-stock {
    background: rgba(254, 235, 200, 0.3);
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-controls {
        flex-direction: column;
        gap: 1rem;
    }

    .search-container {
        max-width: 100%;
    }

    .filter-container {
        flex-wrap: wrap;
        justify-content: center;
    }

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

    .data-table {
        font-size: 0.8rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 0.25rem;
    }

    .action-btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
    }

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

    .order-form-container {
        gap: 1rem;
    }

    .form-section {
        padding: 1rem;
    }

    .main-nav-grid {
        grid-template-columns: 1fr;
    }

    .nav-card {
        padding: 1.5rem;
    }

    .nav-card-icon {
        font-size: 3rem;
    }

    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .page-container {
        padding: 1rem;
    }

    .dashboard-container {
        padding: 1rem;
    }

    .dashboard-header {
        padding: 1.5rem;
    }

    .dashboard-header h1 {
        font-size: 2rem;
    }

    .stats-bar {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-icon {
        font-size: 1.5rem;
        width: 50px;
        height: 50px;
    }

    .header-actions {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-tab {
        padding: 0.5rem;
    }

    .nav-text {
        display: none;
    }

    .nav-icon {
        font-size: 1.5rem;
    }
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.product-card.out-of-stock {
    border-color: #e53e3e;
    background: #fed7d7;
}

.product-card.low-stock {
    border-color: #dd6b20;
    background: #feebc8;
}

.product-card.in-stock {
    border-color: #38a169;
}

.stock-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.stock-status.out-of-stock {
    background: #fed7d7;
    color: #c53030;
}

.stock-status.low-stock {
    background: #feebc8;
    color: #c05621;
}

.stock-status.in-stock {
    background: #c6f6d5;
    color: #22543d;
}

/* Order Progress */
.order-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
    max-width: 200px;
}

.progress-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    right: -50%;
    width: 100%;
    height: 2px;
    background: #e2e8f0;
    z-index: 1;
}

.progress-step.active:not(:last-child)::after {
    background: #667eea;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #718096;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.progress-step.active .step-number {
    background: #667eea;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.progress-step.completed .step-number {
    background: #38a169;
    color: white;
}

.step-label {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-label {
    color: #667eea;
    font-weight: 600;
}

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

.product-code {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.product-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.product-info-item {
    text-align: center;
    padding: 0.5rem;
    background: #f7fafc;
    border-radius: 8px;
}

.product-info-label {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 0.25rem;
}

.product-info-value {
    font-weight: 600;
    color: #2d3748;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
}

.product-actions .btn {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: #718096;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #e53e3e;
}

/* Order Items */
.order-item {
    background: #f7fafc;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 2px solid #e2e8f0;
}

.order-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.order-item-number {
    font-weight: 600;
    color: #667eea;
}

.remove-item-btn {
    background: #fed7d7;
    color: #e53e3e;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.remove-item-btn:hover {
    background: #feb2b2;
    transform: scale(1.1);
}

/* Order Summary */
.order-summary {
    background: #f7fafc;
    border-radius: 15px;
    padding: 1.5rem;
    margin-top: 2rem;
    border: 2px solid #e2e8f0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.summary-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: #667eea;
    border-top: 2px solid #e2e8f0;
    padding-top: 0.5rem;
    margin-top: 1rem;
}

/* Orders List */
.order-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.order-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.order-id {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
}

.order-date {
    color: #718096;
    font-size: 0.9rem;
}

.order-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.order-info-item {
    text-align: center;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 10px;
}

.order-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.order-actions .btn {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Status Badges */
.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.status-pending {
    background: #fed7aa;
    color: #c05621;
}

.status-completed {
    background: #c6f6d5;
    color: #22543d;
}

.status-cancelled {
    background: #fed7d7;
    color: #c53030;
}

.status-paid {
    background: #bee3f8;
    color: #2a69ac;
}

.status-unpaid {
    background: #fbb6ce;
    color: #97266d;
}

/* Expenses List */
.expense-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #667eea;
}

.expense-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.expense-amount {
    font-size: 1.3rem;
    font-weight: 700;
    color: #e53e3e;
}

.expense-date {
    color: #718096;
    font-size: 0.9rem;
}

.expense-note {
    color: #4a5568;
    line-height: 1.5;
}

/* Report Content */
.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-top: 4px solid #667eea;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #718096;
    font-size: 0.9rem;
}

.profit-positive {
    color: #38a169;
}

.profit-negative {
    color: #e53e3e;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 0.5rem;
        gap: 0.25rem;
    }

    .nav-tab {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }

    .nav-text {
        display: none;
    }

    .nav-icon {
        font-size: 1.3rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .page {
        padding: 1rem;
        border-radius: 15px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .order-info {
        grid-template-columns: 1fr;
    }
    
    .order-actions {
        flex-direction: column;
    }
    
    .order-actions .btn {
        flex: none;
    }
    
    .report-stats {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-card {
        padding: 1.5rem;
    }

    .dashboard-card-icon {
        font-size: 2.5rem;
    }

    .quick-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .quick-action-btn {
        flex: 1;
        min-width: 120px;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

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

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

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

/* Notifications */
.notification {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 10000;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(-100px);
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 500px;
    margin: 0 auto;
}

.notification.show {
    transform: translateY(0);
    opacity: 1;
}

.notification-success {
    background: linear-gradient(135deg, #68d391, #48bb78);
    color: white;
}

.notification-error {
    background: linear-gradient(135deg, #fc8181, #f56565);
    color: white;
}

.notification-info {
    background: linear-gradient(135deg, #63b3ed, #4299e1);
    color: white;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-message {
    flex: 1;
    font-weight: 500;
}

.notification-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.notification-close:hover {
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #718096;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #4a5568;
}

.empty-state p {
    font-size: 1rem;
    line-height: 1.6;
}

/* Item Summary */
.item-summary {
    display: inline-block;
    background: #e2e8f0;
    color: #4a5568;
    padding: 0.25rem 0.5rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin: 0.25rem;
}

.order-items-summary {
    margin: 1rem 0;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 10px;
    border-right: 3px solid #667eea;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* Report Specific Styles */
.report-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e2e8f0;
}

.report-header h3 {
    font-size: 1.5rem;
    color: #2d3748;
    font-weight: 700;
}

.report-section {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.report-section h4 {
    font-size: 1.2rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
}

.report-section ul {
    list-style: none;
    padding: 0;
}

.report-section li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.report-section li:last-child {
    border-bottom: none;
}

/* Report Calculation Details */
.calculation-details {
    background: #f7fafc;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.calc-row.total-row {
    border-top: 2px solid #4299e1;
    margin-top: 0.5rem;
    padding-top: 1rem;
    background: #ebf8ff;
    border-radius: 8px;
    padding-left: 1rem;
    padding-right: 1rem;
}

.calc-label {
    font-weight: 500;
    color: #4a5568;
}

.calc-value {
    font-weight: 600;
    color: #2d3748;
}

.profit-positive {
    color: #38a169 !important;
}

.profit-negative {
    color: #e53e3e !important;
}

/* Report Notes */
.report-notes {
    background: #f0fff4;
    border-left: 4px solid #38a169;
    padding: 1rem;
    border-radius: 0 8px 8px 0;
}

.report-notes li {
    border-bottom: none;
    padding: 0.25rem 0;
    display: block;
    color: #2f855a;
}

/* Additional Mobile Responsiveness */
@media (max-width: 480px) {
    .header-content {
        padding: 0 1rem;
    }

    .app-title {
        font-size: 1.2rem;
    }

    .current-date {
        font-size: 0.8rem;
    }

    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .page-header h2 {
        font-size: 1.5rem;
        text-align: center;
    }

    .modal-content {
        padding: 1rem;
        margin: 1rem;
    }

    .notification {
        left: 10px;
        right: 10px;
        top: 10px;
    }

    .stat-card {
        padding: 1rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

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

    .dashboard-card {
        padding: 1.5rem;
    }

    .dashboard-card-icon {
        font-size: 2.5rem;
    }

    .quick-actions {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .quick-action-btn {
        flex: 1;
        min-width: 120px;
    }

    .dashboard-stat-value {
        font-size: 2rem;
    }
}

/* Deposits Page Specific Styles */
.transaction-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.transaction-type.deposit {
    background-color: #d1fae5;
    color: #065f46;
}

.transaction-type.withdrawal {
    background-color: #fee2e2;
    color: #991b1b;
}

.amount.deposit {
    color: #059669;
    font-weight: 600;
}

.amount.withdrawal {
    color: #dc2626;
    font-weight: 600;
}

.balance {
    font-weight: 600;
    color: #1f2937;
}

/* Filters Section */
.filters-section {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.filters-row {
    display: flex;
    gap: 1rem;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 150px;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Responsive Filters */
@media (max-width: 768px) {
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        min-width: auto;
    }
}

/* Expense Types Styling */
.expense-type {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.expense-type-operating {
    background-color: #dbeafe;
    color: #1e40af;
}

.expense-type-miscellaneous {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.expense-type-purchases {
    background-color: #dcfce7;
    color: #166534;
}

/* Purchase Items Styling */
.purchase-items-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f9fafb;
}

.purchase-item {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 0.75rem;
    align-items: end;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 0.75rem;
}

.purchase-item:last-child {
    margin-bottom: 0;
}

.purchase-item .form-group {
    margin-bottom: 0;
}

.purchase-item select,
.purchase-item input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.purchase-item .remove-btn {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.375rem;
    padding: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    height: fit-content;
}

.purchase-item .remove-btn:hover {
    background: #dc2626;
}

.total-cost-display {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.75rem;
    text-align: center;
    font-size: 1.125rem;
    font-weight: 600;
    color: #059669;
}

.purchase-item-cost {
    font-size: 0.875rem;
    color: #6b7280;
    text-align: right;
}

@media (max-width: 768px) {
    .purchase-item {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
}

/* Expense Note Styling */
.expense-note {
    max-width: 300px;
    word-wrap: break-word;
    line-height: 1.4;
}

.expense-note strong {
    color: #059669;
    font-weight: 600;
}

/* Action Button Info */
.action-btn-info {
    background-color: #3b82f6;
    color: white;
    margin-left: 0.25rem;
}

.action-btn-info:hover {
    background-color: #2563eb;
}

.action-btn-success {
    background-color: #10b981;
    color: white;
    margin-left: 0.25rem;
}

.action-btn-success:hover {
    background-color: #059669;
}

.action-btn-warning {
    background-color: #f59e0b;
    color: white;
    margin-left: 0.25rem;
}

.action-btn-warning:hover {
    background-color: #d97706;
}

.action-btn-secondary {
    background-color: #6b7280;
    color: white;
    margin-left: 0.25rem;
    cursor: not-allowed;
}

.action-btn-secondary:hover {
    background-color: #4b5563;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-received {
    background-color: #d1fae5;
    color: #065f46;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-unknown {
    background-color: #f3f4f6;
    color: #6b7280;
}

/* Form Help Text */
.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    color: #6b7280;
    font-style: italic;
}

/* Invoice Selection Styling */
.invoice-selection-container {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    background-color: #f9fafb;
    max-height: 400px;
    overflow-y: auto;
}

.available-invoice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: all 0.2s;
}

.available-invoice:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.available-invoice.selected {
    border-color: #10b981;
    background-color: #ecfdf5;
}

.invoice-info {
    flex: 1;
}

.invoice-number {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.invoice-details {
    font-size: 0.875rem;
    color: #6b7280;
}

.invoice-amount {
    font-weight: 600;
    color: #059669;
    font-size: 1.125rem;
}

.invoice-checkbox {
    margin-left: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
}

.selected-invoices-summary {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.selected-invoices-summary h4 {
    margin-bottom: 0.75rem;
    color: #1f2937;
    font-size: 1rem;
}

.selected-invoice-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.selected-invoice-remove {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 0.25rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    font-size: 0.75rem;
}

.selected-invoice-remove:hover {
    background: #dc2626;
}

.total-amount-display {
    margin-top: 1rem;
    padding: 0.75rem;
    background: #f0f9ff;
    border: 1px solid #0ea5e9;
    border-radius: 0.375rem;
    text-align: center;
    color: #0c4a6e;
}

.no-selection {
    color: #6b7280;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Deposit Type Badges */
.deposit-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.deposit-type-amount {
    background-color: #dbeafe;
    color: #1e40af;
}

.deposit-type-invoices {
    background-color: #d1fae5;
    color: #065f46;
}

/* Invoice Details Modal Styling */
.invoice-details-modal {
    max-width: 500px;
    margin: 0 auto;
}

.invoice-items-details {
    margin: 1rem 0;
}

.invoice-detail-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.invoice-info {
    margin-bottom: 0.5rem;
}

.invoice-customer {
    color: #6b7280;
    font-size: 0.875rem;
    margin-left: 0.5rem;
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #4b5563;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.invoice-total {
    font-weight: 600;
    color: #059669;
}

.total-deposit {
    text-align: center;
    padding: 1rem;
    background: #f0f9ff;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    color: #0c4a6e;
    border: 1px solid #0ea5e9;
}

/* Payment Note Styling */
.payment-note {
    display: block;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.375rem;
    color: #92400e;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Payment Analysis Styling */
.payment-analysis {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 1rem 0;
}

.analysis-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.analysis-label {
    font-weight: 500;
    color: #475569;
}

.analysis-value {
    font-weight: 600;
    color: #1e293b;
}

/* Company Account Page Styles */
.main-balance-section {
    margin-bottom: 2rem;
}

.balance-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.balance-icon {
    font-size: 3rem;
    opacity: 0.9;
}

.balance-content h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
    opacity: 0.9;
}

.balance-amount {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.balance-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.8;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
}

.status-indicator.warning {
    background: #f59e0b;
}

.status-indicator.danger {
    background: #ef4444;
}

/* Financial Summary */
.financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid;
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card.income {
    border-left-color: #10b981;
}

.summary-card.expense {
    border-left-color: #ef4444;
}

.summary-card.pending {
    border-left-color: #f59e0b;
}

.summary-card {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.summary-icon {
    font-size: 2rem;
    opacity: 0.8;
}

.summary-content h4 {
    margin: 0 0 0.5rem 0;
    color: #374151;
    font-size: 1rem;
}

.summary-amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.summary-content small {
    color: #6b7280;
    font-size: 0.875rem;
}

/* Cash Flow Analysis */
.cash-flow-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.cash-flow-section h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.cash-flow-chart {
    display: flex;
    align-items: center;
    gap: 1rem;
    overflow-x: auto;
    padding: 1rem 0;
}

.flow-item {
    text-align: center;
    min-width: 120px;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 2px solid #e2e8f0;
}

.flow-item.final {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.flow-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.flow-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

.flow-amount.positive {
    color: #059669;
}

.flow-amount.negative {
    color: #dc2626;
}

.flow-arrow {
    font-size: 1.5rem;
    color: #64748b;
    font-weight: bold;
}

/* Recent Transactions */
.recent-transactions-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.recent-transactions-section h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

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

.transaction-item:hover {
    background-color: #f8fafc;
}

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

.transaction-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.transaction-icon.deposit {
    background: #d1fae5;
    color: #065f46;
}

.transaction-icon.withdrawal {
    background: #fee2e2;
    color: #991b1b;
}

.transaction-icon.expense {
    background: #fef3c7;
    color: #92400e;
}

.transaction-details h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    color: #1f2937;
}

.transaction-details p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.transaction-amount {
    font-size: 1.125rem;
    font-weight: 600;
}

.transaction-amount.positive {
    color: #059669;
}

.transaction-amount.negative {
    color: #dc2626;
}

/* Financial Alerts */
.financial-alerts-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.financial-alerts-section h3 {
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.alert-item.warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
}

.alert-item.danger {
    background: #fee2e2;
    border: 1px solid #ef4444;
}

.alert-item.info {
    background: #dbeafe;
    border: 1px solid #3b82f6;
}

.alert-icon {
    font-size: 1.5rem;
}

.alert-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
}

.alert-content p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .balance-card {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .balance-amount {
        font-size: 2rem;
    }

    .cash-flow-chart {
        flex-direction: column;
        gap: 0.5rem;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .transaction-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Report Type Description */
.report-type-description {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.description-item {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Detailed Report Styles */
.detailed-section {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #3b82f6;
}

.detailed-section h4 {
    margin-bottom: 1.5rem;
    color: #1f2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detailed-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.detailed-table th,
.detailed-table td {
    padding: 0.75rem;
    text-align: right;
    border-bottom: 1px solid #e5e7eb;
}

.detailed-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.detailed-table tr:hover {
    background: #f9fafb;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.summary-item {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    text-align: center;
}

.summary-item h5 {
    margin: 0 0 0.5rem 0;
    color: #64748b;
    font-size: 0.875rem;
}

.summary-item .value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.summary-item.positive .value {
    color: #059669;
}

.summary-item.negative .value {
    color: #dc2626;
}

.summary-item.warning .value {
    color: #d97706;
}

/* Charts and Graphs */
.chart-container {
    background: #f8fafc;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin: 1rem 0;
}

.chart-title {
    text-align: center;
    margin-bottom: 1rem;
    color: #374151;
    font-weight: 600;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 0.5rem;
    height: 1rem;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #059669);
    transition: width 0.3s ease;
}

.progress-fill.warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
}

.progress-fill.danger {
    background: linear-gradient(90deg, #ef4444, #dc2626);
}

/* Detailed Lists */
.detailed-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.list-item:hover {
    background: #f8fafc;
}

.item-info h6 {
    margin: 0 0 0.25rem 0;
    color: #1f2937;
}

.item-info p {
    margin: 0;
    font-size: 0.875rem;
    color: #6b7280;
}

.item-value {
    font-weight: 600;
    color: #1e293b;
}

.item-value.positive {
    color: #059669;
}

.item-value.negative {
    color: #dc2626;
}

/* Recommendations */
.recommendations-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.alert-item.success {
    background: #d1fae5;
    border: 1px solid #10b981;
}

.alert-item.success .alert-icon {
    color: #065f46;
}

.alert-item.success .alert-content h4 {
    color: #065f46;
}

.alert-item.success .alert-content p {
    color: #047857;
}

/* No data message */
.no-data {
    text-align: center;
    color: #6b7280;
    font-style: italic;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 0.5rem;
    border: 1px dashed #d1d5db;
}

/* Product Sales Analysis */
.product-item {
    border-left: 4px solid #3b82f6;
    background: #f8fafc;
}

.product-item:hover {
    background: #f1f5f9;
}

.quantity-badge {
    background: #dbeafe;
    color: #1e40af;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: inline-block;
}

.revenue-amount {
    font-size: 1.125rem;
    font-weight: 600;
    color: #059669;
}

.product-orders {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.875rem;
    padding: 0;
}

.btn-link:hover {
    color: #1d4ed8;
}

.product-orders-details {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
}

.order-detail {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
    font-size: 0.875rem;
}

.order-detail:last-child {
    border-bottom: none;
}

.order-detail span:first-child {
    font-weight: 600;
    color: #1f2937;
}

.order-detail span:last-child {
    color: #059669;
    font-weight: 600;
}

/* Responsive adjustments for product analysis */
@media (max-width: 768px) {
    .order-detail {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    .product-orders {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .item-value {
        text-align: left;
    }
}

/* Purchase Details Modal Styling */
.purchase-details-modal {
    max-width: 500px;
    margin: 0 auto;
}

.purchase-items-details {
    margin: 1rem 0;
}

.purchase-detail-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.item-info {
    margin-bottom: 0.5rem;
}

.item-code {
    color: #6b7280;
    font-size: 0.875rem;
}

.item-details {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #4b5563;
}

.item-total {
    font-weight: 600;
    color: #059669;
}

.total-cost {
    text-align: center;
    padding: 1rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    font-size: 1.125rem;
    color: #059669;
}
