:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
}

body {
    background-color: #f5f6fa;
    font-family: 'Amiri', serif;
}

/* Styles for the full-screen overlay */
#offline-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(30, 40, 50, 0.9);
    z-index: 10000;
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    backdrop-filter: blur(5px);
}

.offline-overlay-content {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 15px;
    color: #333;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Prevent body scrolling when overlay is active */
body.no-scroll {
    overflow: hidden;
}


.accounting-system-option {
    border: 2px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    background-color: #fff;
    height: 100%;
}
.accounting-system-option:hover {
    border-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.accounting-system-option input[type="radio"] {
    display: none; 
}
.accounting-system-option input[type="radio"]:checked + .card-content {
    border-color: var(--primary-color);
    background-color: #f8f9fa;
}
.accounting-system-option input[type="radio"]:checked + .card-content .fa-check-circle {
    opacity: 1;
    transform: scale(1);
}
.accounting-system-option .fa-check-circle {
    color: var(--primary-color);
    position: absolute;
    top: 10px;
    left: 10px;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease-in-out;
}
.card-content {
    position: relative;
}
.card-content i.fs-1 {
    color: var(--secondary-color);
}

.main-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 10px 0;
}

.nav-tabs {
    border-bottom: 2px solid var(--primary-color);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; 
}
.nav-tabs .nav-link {
    white-space: nowrap; 
}
.nav-tabs::-webkit-scrollbar {
    height: 4px;
}
.nav-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.invoice-item {
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    transition: background-color: 0.3s;
}
.invoice-item:hover {
    background-color: #f9f9f9;
}

#receiptPreviewContent {
    width: 170mm;
    min-height: 297mm;
    margin: 0 auto;
    background: white;
    box-sizing: border-box;
    padding: 20px;
    word-break: keep-all;
    font-family: 'Amiri', serif;
    direction: rtl;
    unicode-bidi: embed;
    position: relative;
    z-index: 1;
    border: 1px solid #ccc; 
}
#receiptPreviewContent .preview-footer {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    text-align: center;
    font-size: 0.8em;
    color: #555;
}

.service-details {
    white-space: pre-wrap;
    max-width: 100%;
    font-family: 'Amiri', serif;
}

.invoice-table {
    width: 100%;
    table-layout: fixed;
    border: 2px solid #dee2e6;
    font-family: 'Amiri', serif;
    background-color: rgba(255, 255, 255, 0.8);
}

.invoice-table th,
.invoice-table td {
    border: 1px solid #dee2e6;
    padding: 12px;
    text-align: center;
    font-family: 'Amiri', serif;
}

.invoice-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

#inventoryItems tr td, #inventoryItems tr th,
#customerItems tr td, #customerItems tr th,
#supplierItems tr td, #supplierItems tr th {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
}

#inventoryItems thead th,
#customerItems thead th,
#supplierItems thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}
.low-stock {
    background-color: #fff3cd !important; 
    color: #856404;
}
.low-stock-icon {
    color: #ffc107; 
}

.is-invalid {
    border-color: #dc3545 !important;
}

footer {
    font-family: 'Amiri', serif;
    border-top: 1px solid #eee;
    position: relative;
    bottom: 0;
    width: 100%;
}

.status-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-action {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
}

.import-option-card {
    cursor: pointer;
    border: 1px solid #dee2e6;
    transition: all 0.2s ease-in-out;
}
.import-option-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}


@media (max-width: 768px) {
    .display-4 {
        font-size: 2.2rem;
    }
    #receiptPreviewContent {
        width: 100%;
        min-height: auto;
        padding: 10px;
    }
    .invoice-table th, .invoice-table td {
        padding: 8px;
        font-size: 0.9rem;
    }
    .main-card {
        padding: 15px;
    }
}

@media print {
    body * {
        visibility: hidden;
    }
    #receiptPreviewContent, #receiptPreviewContent * {
        visibility: visible !important;
    }
    #receiptPreviewContent {
        position: absolute !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        font-size: 12px !important;
        padding: 5mm !important;
        box-shadow: none !important;
        border: none !important;
    }
    .invoice-table {
        width: 100% !important;
        font-size: 10px !important;
    }
    .print-hide {
        display: none !important;
    }
    #receiptPreviewContent .preview-footer {
        font-size: 10px !important;
    }
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

.card {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 10px;
}

@keyframes blink {
    0% { opacity: 0.3; }
    50% { opacity: 1; }
    100% { opacity: 0.3; }
}

.trend-icon {
    font-size: 1.5rem;
    transition: all 0.3s;
}

.blink {
    animation: blink 1s ease-in-out 2;
}

.green {
    color: #28a745 !important;
}

.red {
    color: #dc3545 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #28a745 !important;
}

#companyLogo {
    margin: 0 auto 20px;
    max-height: 80px;
    display: none;
}

.background-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.2;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
}

.design-preview {
    border: 2px dashed #ccc;
    padding: 15px;
    margin: 10px 0;
    min-height: 200px;
    position: relative;
    background-color: white;
}
.design-preview-content {
    font-family: 'Amiri', serif;
}
.design-preview-header {
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}
.design-preview-text {
    font-size: 0.9em;
}
.design-preview-footer {
    margin-top: 15px;
    font-size: 0.8em;
    text-align: center;
    border-top: 1px solid #eee;
    padding-top: 5px;
}