/* Stilizare tabel Rent Profi Tools */
.rent-tools-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-family: Arial, sans-serif;
    font-size: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
}

.rent-tools-table thead {
    background-color: #1976d2;
    color: white;
}

.rent-tools-table th,
.rent-tools-table td {
    border: 1px solid #ddd;
    padding: 12px 15px;
    text-align: center;
    vertical-align: middle;
}

.rent-tools-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.rent-tools-table tbody tr:hover {
    background-color: #f1f1f1;
}

/* Celula de status colorată */
.rent-tools-table td.status-cell {
    font-weight: bold;
    color: white;
}

/* Verde intens pentru intrare */
.rent-tools-table td.status-cell[style*="background-color: #c8e6c9;"] {
    background-color: #4caf50 !important;
}

/* Roșu intens pentru ieșire */
.rent-tools-table td.status-cell[style*="background-color: #ffcdd2;"] {
    background-color: #f44336 !important;
}

/* Container butoane acțiuni pe fiecare rând */
.action-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Stilizare buton Editare */
.edit-button {
    background-color: #ff9800;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    width: 120px;
}

.edit-button:hover {
    background-color: #fb8c00;
}

/* Stilizare buton Istoric */
.history-button {
    background-color: #607d8b;
    color: white;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
    width: 120px;
}

.history-button:hover {
    background-color: #455a64;
}

/* Stilizare buton Export XLS */
#exportXLS {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 20px;
}

#exportXLS:hover {
    background-color: #43a047;
}

/* Stilizare popup Editare */
#editPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9999;
}

#editPopupContent {
    background: #fff;
    width: 90%;
    max-width: 400px;
    margin: 100px auto;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

#editPopupContent h3 {
    margin-bottom: 20px;
}

#editPopupContent input[type="text"] {
    width: 90%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

#editPopupContent button {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 16px;
    margin: 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
}

#editPopupContent button:hover {
    background-color: #1565c0;
}

/* Stilizare popup Istoric */
#historyPopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: none;
    z-index: 9999;
}

#historyPopupContent {
    background: #fff;
    width: 95%;
    max-width: 600px;
    max-height: 80%;
    overflow-y: auto;
    margin: 50px auto;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
}

#historyPopupContent h3 {
    margin-bottom: 20px;
}

#historyPopupContent table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#historyPopupContent th,
#historyPopupContent td {
    border: 1px solid #ccc;
    padding: 10px;
}

#historyPopupContent button {
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 16px;
    margin: 10px 5px 0 5px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 14px;
}

#historyPopupContent button:hover {
    background-color: #1565c0;
}

/* ---------- Responsive pentru telefoane și tablete ---------- */
@media (max-width: 768px) {

    .rent-tools-table th,
    .rent-tools-table td {
        padding: 6px 4px;
        font-size: 12px;
        white-space: nowrap;
    }

    #editPopupContent,
    #historyPopupContent {
        margin: 30px auto;
        padding: 20px;
    }

    .edit-button,
    .history-button {
        width: 100%;
        padding: 8px;
        font-size: 12px;
    }

    #exportXLS {
        width: 100%;
        padding: 10px;
        font-size: 14px;
    }
}

/* Stilizare popup Imagine */
#imagePopup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    display: none !important;
    /* ASCUNS inițial */
}

#imagePopup.show {
    display: flex !important;
    /* APARE doar când îi adăugăm clasa .show din JS */
}

#imagePopupContent {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    max-width: 90vw;
    max-height: 90vh;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.4);
}

#popupImage {
    max-width: 100%;
    max-height: 70vh;
    display: block;
    margin: 0 auto 20px auto;
}

#closeImagePopup {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
}

#closeImagePopup:hover {
    background-color: #d32f2f;
}