/* Custom styling for the invoice tracking application */

/* Budget variance indicators */
.variance-positive {
    color: #28a745;
}

.variance-negative {
    color: #dc3545;
}

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s;
}

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

/* Cost breakdown table */
.cost-breakdown-table th {
    background-color: var(--bs-dark);
}

/* High emphasis for important numbers */
.emphasis {
    font-weight: bold;
    font-size: 1.1em;
}

/* Project status indicators */
.project-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 5px;
}

.status-under-budget {
    background-color: #28a745;
}

.status-over-budget {
    background-color: #dc3545;
}

.status-on-budget {
    background-color: #ffc107;
}

/* Custom header styling */
.page-header {
    border-bottom: 2px solid var(--bs-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
}

/* Invoice detail box */
.invoice-detail {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 15px;
}

/* Responsive tables for mobile */
@media (max-width: 767.98px) {
    /* Card-style tables for better mobile experience */
    .table-responsive-card {
        display: block;
    }
    
    .table-responsive-card thead {
        display: none;
    }
    
    .table-responsive-card tbody tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid var(--bs-gray-400);
        border-radius: 5px;
        padding: 0.5rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .table-responsive-card td {
        display: block;
        text-align: right;
        padding: 0.5rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .table-responsive-card td:last-child {
        border-bottom: none;
    }
    
    .table-responsive-card td:before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
    
    /* Adjust project detail layout for mobile */
    .project-detail-card {
        margin-bottom: 1rem;
    }
    
    /* Make buttons more touch-friendly on mobile */
    .btn {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.25rem;
    }
    
    /* Make buttons in tables easier to tap */
    .table .btn-sm {
        padding: 0.4rem 0.6rem;
        font-size: 0.875rem;
    }
    
    /* Give more space for form elements on mobile */
    .form-control, .form-select {
        padding: 0.5rem;
        min-height: 42px;
    }
    
    /* Adjust heading sizes for mobile */
    h1.page-header {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    /* Cost breakdown improvements for mobile */
    .scope-details-row .table-sm {
        font-size: 0.8rem;
    }
    
    /* Make invoice scanning easier on mobile */
    #invoice_pdf {
        padding: 1.5rem 1rem;
    }
}

/* Mobile-specific nav improvements */
@media (max-width: 575.98px) {
    .navbar-brand {
        font-size: 1.25rem;
        max-width: 40%;
    }
    
    .navbar-nav {
        margin-top: 0.5rem;
    }
    
    .nav-link {
        padding: 0.75rem 0;
    }
}
