/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #e9ecef; /* Lighter background for a modern feel */
    color: #343a40; /* Darker text for better contrast */
    line-height: 1.6;
}

/* Container for content */
.container {
    max-width: 960px; /* Slightly wider container */
    margin: 30px auto; /* More vertical spacing */
    padding: 25px; /* More internal padding */
    background-color: #ffffff;
    border-radius: 10px; /* More rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08); /* Softer, more pronounced shadow */
}

/* Header and Navigation (Leveraging Bootstrap's navbar classes) */
header {
    background-color: #f8f9fa; /* Light gray for header */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Consistent shadow with container */
}

.navbar-brand, .navbar-nav .nav-link {
    color: #343a40 !important; /* Darker text for contrast */
}

.navbar-nav .nav-link:hover {
    color: #007bff !important; /* Blue on hover for menu items */
}

/* No custom nav, logo, or nav-links styles needed as Bootstrap handles them */
/* The existing header.php already uses Bootstrap's navbar classes */

/* Main Content Area */
main {
    padding: 20px 0;
}

h2, h3 {
    color: #28a745; /* Bootstrap success green */
    border-bottom: 1px solid #dee2e6; /* Lighter border */
    padding-bottom: 10px;
    margin-bottom: 20px;
}

/* Form Styles - Relying on Bootstrap's .form-group, .form-control, .is-invalid, .invalid-feedback */
/* Custom styles for form elements are largely removed as Bootstrap handles them */
.form-group {
    margin-bottom: 1rem; /* Bootstrap default */
}

.form-group label {
    font-weight: 600; /* Slightly bolder labels */
    color: #495057; /* Darker grey for labels */
}

/* Buttons - Relying on Bootstrap's .btn, .btn-primary, etc. */
/* Custom button styles are largely removed as Bootstrap handles them */
.btn {
    /* Bootstrap handles display, padding, border-radius, text-decoration, color, cursor, font-size, border, transition */
    margin-right: 0; /* Remove right margin for stacking */
    margin-bottom: 0.5rem; /* Consistent spacing */
    width: 100%; /* Make all buttons full width by default */
}

/* Custom colors for specific buttons to match the theme */
.btn-primary {
    background-color: #28a745; /* Bootstrap success green */
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838; /* Darker green on hover */
    border-color: #1e7e34;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

.btn-view {
    background-color: #007bff; /* Bootstrap primary blue */
    border-color: #007bff;
}

.btn-view:hover {
    background-color: #0056b3;
    border-color: #004085;
}

.btn-edit {
    background-color: #ffc107; /* Bootstrap warning yellow */
    border-color: #ffc107;
    color: #212529; /* Dark text for yellow button */
}

.btn-edit:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

.btn-pdf {
    background-color: #dc3545; /* Bootstrap danger red */
    border-color: #dc3545;
}

.btn-pdf:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-delete {
    background-color: #dc3545; /* Bootstrap danger red */
    border-color: #dc3545;
}

.btn-delete:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-sm {
    /* Bootstrap handles this */
}

/* Alerts - Relying on Bootstrap's .alert, .alert-danger, .alert-success */
/* Custom alert styles are largely removed as Bootstrap handles them */
.alert {
    /* Bootstrap handles padding, margin-bottom, border-radius, font-size */
}

/* Offer List (index.php) - Using Bootstrap card and list-group for modern look */
.search-form {
    margin-bottom: 1.5rem; /* Consistent spacing */
}

.search-form input[type="text"] {
    margin-bottom: 0.5rem; /* Space between input and button */
}

.offer-list .card { /* Using Bootstrap card for each offer item */
    margin-bottom: 1rem;
    border: none; /* Remove default card border */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Light shadow for cards */
}

.offer-list .card-header {
    background-color: #f8f9fa; /* Light header background */
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: bold;
    color: #343a40;
}

.offer-list .card-body {
    padding: 1rem;
}

.offer-list .card-title {
    color: #28a745; /* Green for titles */
    margin-bottom: 0.5rem;
}

.offer-list .card-text {
    color: #6c757d; /* Grey for text */
    margin-bottom: 0.5rem;
}

.attention-to-text {
    font-size: 0.85em; /* Smaller font size for "in atentia" */
}

.offer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* Consistent spacing */
    margin-top: 1rem;
}

/* Tables (edit_offer.php, view_offer.php) - Using Bootstrap table classes */
/* .table-responsive and .table classes handle most of this */
.table-responsive {
    margin-bottom: 1.5rem;
}

.offer-positions-table {
    /* Bootstrap's .table, .table-striped, .table-bordered handle most styling */
    margin-top: 1rem;
}

.offer-positions-table th {
    background-color: #e9ecef; /* Light grey for table headers */
    font-weight: 600;
    color: #495057;
}

.offer-positions-table tfoot td {
    background-color: #f8f9fa; /* Lighter grey for table footer */
    font-weight: 600;
}

.text-right {
    text-align: right;
}

/* View Offer Specific Styles - Using Bootstrap utilities for spacing and text */
.offer-details-view p {
    margin-bottom: 0.5rem;
    font-size: 1.05em;
}

.offer-details-view strong {
    color: #28a745; /* Green for strong text */
}

.notes-section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #dee2e6; /* Lighter border */
}

.notes-section h3 {
    color: #28a745;
    margin-bottom: 1rem;
}

.notes-section p {
    margin-bottom: 0.3rem;
    font-size: 0.95em;
}

.signatures-section {
    display: flex;
    justify-content: space-around;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #adb5bd; /* Softer dashed line */
}

.signature-box {
    text-align: center;
    width: 48%; /* Slightly adjusted width */
}

.signature-box p {
    margin: 0;
    font-weight: 600;
}

/* Footer - Using Bootstrap's bg-dark and text-white */
footer {
    text-align: center;
    padding: 1.5rem;
    background-color: transparent; /* Drop footer color */
    color: #6c757d; /* Grey text for footer */
    margin-top: 2rem;
    box-shadow: none; /* Remove shadow for footer */
}

/* Responsive Design */
@media (max-width: 768px) {

    .container {
        margin: 10px;
        padding: 15px;
    }

    .search-form input[type="text"] {
        margin-bottom: 0.5rem;
    }

    .offer-positions-table th,
    .offer-positions-table td {
        font-size: 0.85em;
        padding: 6px;
    }

    .signatures-section {
        flex-direction: column;
        gap: 30px;
    }

    .signature-box {
        width: 100%;
    }
}