body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    background-color: #f4f4f9;
    color: #333;
}

header {
    background-color: #4a69bd;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 {
    margin: 0;
    font-size: 1.5rem;
}

.user-info {
    font-size: 0.9rem;
}

.user-info span {
    margin-right: 1rem;
}

.user-info a {
    color: white;
    margin-left: 1rem;
}

main {
    padding: 2rem;
}

.container {
    /*max-width: 1200px;*/
    margin: 0 auto;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

h1, h2 {
    color: #4a69bd;
}

a {
    color: #4a69bd;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.salesperson-list {
    list-style: none;
    padding: 0;
}

.salesperson-list li {
    margin: 0.5rem 0;
}

.salesperson-list a {
    display: block;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 5px;
    transition: background-color: 0.2s;
}

.salesperson-list a:hover {
    background-color: #e9ecef;
    text-decoration: none;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tbody tr:hover {
    background-color: #f1f3f5;
}

.alert-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

input[type="date"], input[type="text"] {
    padding: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 95%;
}

button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    background-color: #2ecc71;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #27ae60;
}

.save-btn {
    background-color: #4a69bd; /* Un bleu pour correspondre à l'en-tête */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    color: white;
}

.save-btn:hover {
    background-color: #3b5998; /* Un bleu un peu plus foncé au survol */
}

.save-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.save-btn:disabled:hover {
    background-color: #cccccc;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.centered {
    text-align: center;
}

.sort-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1rem;
    margin-left: 5px;
    color: inherit;
    padding: 0;
}

table.table-striped tbody tr.status-closed-permanently,
table.table-hover tbody tr.status-closed-permanently {
    background-color: #FF6347 !important; /* Tomato red */
}

table.table-striped tbody tr.status-closed-permanently:hover,
table.table-hover tbody tr.status-closed-permanently:hover {
    background-color: #E55337 !important; /* Slightly darker red on hover */
}


/* Admin page specific styles - keeping them as is */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}
.admin-section {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}
.admin-section h3 {
    margin-top: 0;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.admin-section form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.admin-section input, .admin-section select, .admin-section button {
     padding: 0.75rem;
     border: 1px solid #ccc;
     border-radius: 4px;
     font-size: 1rem;
}
.department-tag {
    display: inline-block;
    background-color: #4a69bd;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.9rem;
    margin-right: 0.5rem;
    cursor: pointer;
    border: none;
}
.department-tag:hover {
    background-color: #c0392b;
}
.flash-info {
    padding: 1rem;
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    margin-bottom: 1rem;
}
.refresh-db-btn {
    display: flex;
    align-items: center;
    background-color: #27ae60;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
}
.refresh-db-btn:hover {
    background-color: #219150;
}

.legend-container {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    width: 250px; /* Adjust width as needed */
}

.legend-container h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #4a69bd;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.legend-color {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    margin-right: 10px;
    border: 1px solid #ccc; /* Optional: for better visibility */
}

.legend-color.green {
    background-color: #5cb85c; /* A nice green */
}

.legend-color.orange {
    background-color: #f0ad4e; /* A nice orange */
}

.legend-color.red {
    background-color: #d9534f; /* A nice red */
}