/* Global Styles */
body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #333;
}

/* Navigation Styles */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Sidebar Styles */
.sidebar-container {
    background: white;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
}

#sidebarContent {
    background: white;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.company-logo-container {
    padding: 0.75rem;
    text-align: center;
 /*   background-color: #212529; */
    margin-top: -48px;
    margin-bottom: 1rem;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    max-width: 100%;
    height: auto;
    max-height: 40px;
    object-fit: contain;
}

.company-name {
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    word-break: break-word;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: 0.5rem 1rem;
}

.sidebar .nav-link i {
    margin-right: 4px;
    width: 16px;
}

.sidebar .nav-link:hover {
    color: #2470dc;
}

.sidebar .nav-link.active {
    color: #2470dc;
}

@media (max-width: 767.98px) {
    .sidebar-container {
        margin-bottom: 1rem;
    }
    
    .company-logo-container {
        margin-top: 0;
    }
    
    .navbar-toggler.sidebar-toggler {
        background-color: #f8f9fa;
        border: 1px solid #ddd;
        padding: 8px 15px;
        margin: 10px 0;
        text-align: left;
        width: 100%;
    }
    
    #sidebarContent {
        height: auto;
        padding: 15px;
        border-radius: 4px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
}

@media (min-width: 768px) {
    .sidebar-container {
        position: fixed;
        top: 56px;
        bottom: 0;
        left: 0;
        padding-top: 0;
    }
    
    .company-logo-container {
        margin-top: 0;
    }
    
    main {
        margin-left: 25%;
    }
}

@media (min-width: 992px) {
    main {
        margin-left: 16.666667%;
    }
}

/* Table Styles */
.table {
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.table thead {
    background-color: #f8f9fa;
}

.table th {
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table td {
    vertical-align: middle;
}

.table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Card Styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 600;
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 0.375rem;
}

.form-label {
    font-weight: 500;
    color: #495057;
}

/* Button Styles */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Alert Styles */
.alert {
    border-radius: 0.5rem;
    border-left-width: 4px;
    font-weight: 500;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.alert-error,
.alert-danger {
    background-color: #fff3f3;
    border-left-color: #dc3545;
    color: #dc3545;
}

.alert-success {
    background-color: #f0fff4;
    border-left-color: #28a745;
    color: #28a745;
}

.alert-warning {
    background-color: #fffbf0;
    border-left-color: #ffc107;
    color: #856404;
}

.alert-info {
    background-color: #f0f8ff;
    border-left-color: #17a2b8;
    color: #17a2b8;
}

/* Page Header Styles */
.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.page-header h1, .page-header h2 {
    color: #212529;
    font-weight: 600;
    margin-bottom: 0;
}

/* Dashboard Stats */
.stats-card {
    background-color: #fff;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.stats-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stats-card .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #212529;
}

/* Status Badges */
.badge {
    font-weight: 500;
    padding: 0.5em 0.75em;
}

/* Action Buttons */
.action-buttons .btn {
    padding: 0.25rem 0.5rem;
    margin-right: 0.25rem;
}

.action-buttons .btn:last-child {
    margin-right: 0;
}

/* Search Form */
.search-form {
    margin-bottom: 1.5rem;
}

.search-form .form-control {
    max-width: 300px;
}

/* Pagination */
.pagination {
    margin-top: 1.5rem;
    margin-bottom: 0;
}

.page-link {
    padding: 0.375rem 0.75rem;
}

/* Modal Styles */
.modal-content {
    border-radius: 0.5rem;
}

.modal-header {
    background-color: #f8f9fa;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

/* Dashboard Stats Cards */
.stats-card {
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    padding: 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
}

.stats-card.primary {
    border-left: 0.25rem solid #4e73df;
}

.stats-card.success {
    border-left: 0.25rem solid #1cc88a;
}

.stats-card.warning {
    border-left: 0.25rem solid #f6c23e;
}

.stats-card.info {
    border-left: 0.25rem solid #36b9cc;
}

.stats-card .title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.stats-card.primary .title {
    color: #4e73df;
}

.stats-card.success .title {
    color: #1cc88a;
}

.stats-card.warning .title {
    color: #f6c23e;
}

.stats-card.info .title {
    color: #36b9cc;
}

.stats-card .value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #5a5c69;
    margin-bottom: 0;
}

.stats-card .icon {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #dddfeb;
    font-size: 2rem;
}

/* Quick Actions */
.quick-actions .btn {
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.quick-actions .btn i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

/* Activity Card */
.activity-card {
    min-height: 300px;
}

.activity-card .empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: #6c757d;
}

.activity-card .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Print Styles */
@media print {
    .sidebar, .navbar, .action-buttons, .search-form {
        display: none !important;
    }
    
    .table {
        box-shadow: none;
    }
}

/* Invoice Detail Styles */
.card-header h6 {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Condensed spacing */
.g-3 {
    --bs-gutter-y: 0.75rem;
    --bs-gutter-x: 0.75rem;
}

.small {
    font-size: 0.875rem;
    line-height: 1.3;
}

.fw-bold {
    font-size: 0.95rem;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

/* Invoice sections */
.invoice-company-info {
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

.invoice-client-info {
    font-size: 0.875rem;
    line-height: 1.3;
}

.invoice-details {
    font-size: 0.875rem;
    line-height: 1.3;
}

.invoice-details .badge {
    font-size: 0.8rem;
    padding: 0.35em 0.5em;
}

.invoice-bank-info {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.2;
    margin-top: 0.5rem;
}

.text-nowrap {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .invoice-details, .invoice-bank-info {
        margin-top: 0.75rem;
    }
}
