/* Titillium Web font - Local Files */
@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-SemiBold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Titillium Web';
    src: url('../fonts/TitilliumWeb-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Global Styles */
body {
    font-family: 'Titillium Web', sans-serif;
    background-color: #f8f9fa;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    transition: all 0.3s;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #adb5bd;
    padding: 0.75rem 1rem;
    border-left: 3px solid transparent;
}

.sidebar .nav-link:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    color: #fff;
    border-left: 3px solid #0d6efd;
    background-color: rgba(13, 110, 253, 0.1);
}

/* Dashboard Cards */
.dashboard-card {
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: transform 0.3s ease;
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

.dashboard-card .card-body {
    display: flex;
    align-items: center;
}

.dashboard-card .icon {
    font-size: 2.5rem;
    margin-right: 1rem;
    width: 60px;
    height: 60px;
    line-height: 60px;
    text-align: center;
    border-radius: 50%;
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.dashboard-card .card-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #6c757d;
}

.dashboard-card .card-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0;
    color: #212529;
}

/* Different colors for dashboard cards */
.dashboard-card.clients .icon {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.dashboard-card.products .icon {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.dashboard-card.invoices .icon {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.dashboard-card.paid .icon {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.dashboard-card.due .icon {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0dcaf0;
}

.dashboard-card.unpaid .icon {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Chart containers */
.chart-container {
    position: relative;
    margin: auto;
    height: 300px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 20px;
}

/* Data Tables */
.data-table {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 20px;
}

/* Forms */
.form-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 20px;
}

/* Button hover effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Ensure Font Awesome icons display properly */
.btn i,
.btn .fas,
.btn .fa {
    display: inline-block !important;
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
    font-style: normal !important;
    font-variant: normal !important;
    text-rendering: auto !important;
    line-height: 1 !important;
}

/* Login Form */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.login-container .form-control {
    border-radius: 10px;
    padding: 10px 15px;
}

.login-container .btn {
    border-radius: 10px;
    padding: 10px 15px;
}

/* Invoice styles */
.invoice-container {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.invoice-details {
    margin-bottom: 30px;
}

.invoice-table th {
    background-color: #f8f9fa;
}

.payment-badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-weight: 600;
}

.payment-badge.bank {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.payment-badge.cash {
    background-color: rgba(13, 110, 253, 0.1);
    color: #0d6efd;
}

.payment-badge.unpaid {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -100%;
        z-index: 100;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .content-wrapper {
        margin-top: 20px;
    }
    
    .dashboard-card .card-body {
        flex-direction: column;
        text-align: center;
    }
    
    .dashboard-card .icon {
        margin-right: 0;
        margin-bottom: 1rem;
    }
}

/* Row color based on payment type */
.payment-row-cash {
    background-color: rgba(13, 110, 253, 0.1);
}
.payment-row-bank {
    background-color: rgba(25, 135, 84, 0.1);
}
.payment-row-unpaid {
    background-color: rgba(220, 53, 69, 0.1);
}

/* Product input styling */
.product-input-container {
    position: relative;
    width: 100%;
}

.product-direct-input {
    width: 100%;
}

.ui-autocomplete {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 9999 !important;
}

.ui-menu .ui-menu-item-wrapper:hover {
    background-color: #007bff;
    color: white;
}

/* Custom styles for jQuery UI autocomplete */
.ui-widget.ui-widget-content {
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.ui-menu .ui-menu-item {
    padding: 5px 10px;
    font-size: 14px;
} 

@media print {
    body {
        background-color: #fff;
    }

    .sidebar, 
    .navbar, 
    .btn, 
    .print-button, 
    .no-print {
        display: none !important;
    }

    .invoice-container {
        box-shadow: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }

    .content-wrapper {
        margin: 0;
        padding: 0;
    }

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

    .invoice-table th,
    .invoice-table td {
        border: 1px solid #000;
        padding: 8px;
    }
}
