body {
    font-family: sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

header, footer {
    background-color: #333;
    color: #fff;
    text-align: center;
    padding: 1em 0;
}

header {
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 1em 20px; 
    background-color: #333;
    color: #fff;
}

header h1 {
    margin: 0; 
    text-align: left; 
}

.main-nav {
    display: flex;
    gap: 10px; 
    position: absolute; 
    left: 50%;
    transform: translateX(-50%);
}

.nav-button {
    padding: 8px 15px;
    color: #fff;
    background-color: #555; 
    border: none;
    border-radius: 4px;
    text-decoration: none;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap; 
}

.nav-button:hover {
    background-color: #666;
}

.nav-button.active {
    background-color: #f0ad4e; 
    color: #333;
    font-weight: bold;
    cursor: default; 
}

#admin-login-button {
    position: static; 
    transform: none; 
    background-color: #f0ad4e;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-left: auto; 
}

#admin-login-button:hover {
    background-color: #ec971f;
}

main {
    padding: 20px;
}

section {
    margin-bottom: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

label {
    display: block;
    margin-bottom: 5px;
}

input[type="date"],
input[type="text"],
input[type="number"],
input[type="password"],
select {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; 
}

button {
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover {
    background-color: #449d44;
}

#sales-list {
    list-style: none;
    padding: 0;
}

#sales-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

#sales-list li:last-child {
    border-bottom: none;
}

#sales-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#sales-summary #clear-sales {
    margin-top: 20px; 
    background-color: #d9534f; 
}

#sales-summary #clear-sales:hover {
    background-color: #c9302c;
}

#sales-chart {
    max-width: 400px;
    max-height: 300px;
}

.action-buttons {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    margin-top: 15px; 
    width: 100%; 
}

.action-buttons button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
}

#add-cash-button {
    background-color: #f0ad4e; 
}
#add-cash-button:hover {
    background-color: #ec971f;
}

#download-sales {
    background-color: #337ab7; 
}
#download-sales:hover {
    background-color: #286090;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

.service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    background-color: #f9f9f9;
}

.service-item:hover {
    background-color: #eee;
}

.service-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 5px;
}

.service-label {
    text-align: center; 
    font-size: 0.8em;
}

#barber-sales-summary {
    margin-top: 30px;
    width: 100%;
}

#barber-sales-summary h3 {
    text-align: center; 
    margin-bottom: 15px;
}

#barber-tables-container {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    margin-bottom: 20px;
    overflow-x: auto; 
    padding: 10px 5px; 
    width: 100%; 
    box-sizing: border-box;
}

.barber-table { 
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 150px; 
    text-align: center;
    flex-shrink: 0; 
}

.barber-table h4 { 
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.barber-table p { 
    font-size: 1.1em;
    font-weight: bold;
    color: #5cb85c;
    margin: 0;
}

#sales-totals h3 {
    margin: 5px 0; 
    text-align: center;
}

#total-cash-display {
    color: #449d44; 
    font-weight: bold;
}

#payment-method-summary {
    margin-top: 30px; 
    width: 100%;
}

#payment-method-summary h3 {
    text-align: center;
    margin-bottom: 15px; 
    color: #333;
}

#payment-tables-container {
    display: flex;
    justify-content: center; 
    gap: 15px; 
    flex-wrap: wrap; 
    padding: 10px 5px; 
    width: 100%;
    box-sizing: border-box;
}

.payment-method-table {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    min-width: 150px;
    text-align: center;
    flex-shrink: 0;
}

.payment-method-table h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.payment-method-table p {
    font-size: 1.1em;
    font-weight: bold;
    color: #5cb85c;
    margin: 0;
}

.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px; 
    border-radius: 8px;
}

.modal-content.wide {
     max-width: 90%; 
     margin: 5% auto; 
}

.close, .close-admin, .close-history { 
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus,
.close-admin:hover,
.close-admin:focus,
.close-history:hover,
.close-history:focus { 
    color: black;
    text-decoration: none;
}

#adminLoginModal .modal-content {
    width: 50%;
    max-width: 400px; 
}

#adminLoginModal label {
    display: block;
    margin-bottom: 5px;
}

#adminLoginModal input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#adminLoginModal button {
    width: 100%; 
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}
#adminLoginModal button:hover {
    background-color: #449d44;
}

#cash-history-button {
    background-color: #6f42c1; 
}
#cash-history-button:hover {
    background-color: #5a349c;
}

#record-tip-payout-button {
    background-color: #dc3545; 
}
#record-tip-payout-button:hover {
    background-color: #c82333;
}

#cashHistoryModal .modal-content {
}

#cashHistoryModal label {
    display: block;
    margin-bottom: 5px;
}

#cashHistoryModal input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

#cashHistoryModal button { 
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
}
#cashHistoryModal button:hover {
    background-color: #449d44;
}

#history-login-submit {
    width: 100%;
}

#history-content-section {
    margin-top: 20px;
}

.table-container {
    max-height: 50vh; 
    overflow-y: auto;
    margin-top: 15px; 
    border: 1px solid #ddd; 
}

#cash-history-table {
    width: 100%;
    border-collapse: collapse;
}

#cash-history-table th,
#cash-history-table td {
    border: 1px solid #ddd;
    padding: 8px 10px; 
    text-align: left;
    font-size: 0.9em; 
}

#cash-history-table th {
    background-color: #f2f2f2;
    font-weight: bold;
    position: sticky; 
    top: 0; 
    z-index: 1; 
}

#cash-history-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#cash-history-table tbody tr:hover {
    background-color: #e9ecef;
}

#download-history-csv {
    background-color: #007bff; 
    margin-bottom: 10px; 
}
#download-history-csv:hover {
    background-color: #0056b3;
}

.error-message {
    color: red;
    font-size: 0.9em;
    margin-top: 10px;
    text-align: center;
}

#sales-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

#sales-table th, #sales-table td {
    padding: 12px 18px;
    text-align: left;
    font-size: 14px;
    color: #333;
}

#sales-table th {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

#sales-table td {
    background-color: #f9f9f9;
}

#sales-table tbody tr {
    transition: background-color 0.3s ease;
}

#sales-table tbody tr:hover {
    background-color: #f1f1f1;
}

#sales-table td {
    border-bottom: 1px solid #ddd;
}


#sales-table td:nth-child(even) {
    background-color: #f7f7f7;
}

#sales-table tbody tr:first-child td {
    border-top: none;
}

#sales-table tfoot {
    background-color: #007bff;
    color: white;
    font-weight: bold;
}

#sales-table tfoot td {
    padding: 10px;
    text-align: center;
    font-size: 16px;
}

#close-fecho-modal {
  background-color: red;
  color: white;
}

#close-remove-modal {
  background-color: red;
  color: white;
}

#close-remove-modal-cofre {
  background-color: red;
  color: white;
}

#confirm-fecho {
  background-color: green;
  color: white;
  border: 1px solid black;
}
