/* global.css */
.menu-toggle {
    display: none;
}
/* Reset CSS de bază și stiluri generale */
body, html {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    /*font-family: Arial, sans-serif;*/
    line-height: 1.1;
    color: #e68000;
    background-color: #ffffff;
    /* Asigură box-sizing pentru a preveni lățirea excesivă cauzată de Bootstrap */
    box-sizing: border-box;
    overflow-x: hidden; /* Previne scroll-ul orizontal la nivel de body */
}

/* Asigură că toate elementele moștenesc box-sizing, foarte important cu Bootstrap */
*, *::before, *::after {
    box-sizing: inherit;
}

/* Stiluri pentru Navbar (bara de sus) */
.navbar {
    background-color: #ffffff; /* Portocaliu */
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgb(255, 153, 0); /* Text alb */
    box-shadow: 0 2px 6px rgba(255, 153, 0, 0.705);
    width: 100%;
    /* Asigură că navbar-ul nu depășește lățimea viewport-ului */
    max-width: 93.7vw;
    box-sizing: border-box; /* Include padding-ul în calculul lățimii */
    position: fixed; /* Face navbar-ul să rămână sus chiar și la scroll */
    border-radius: 25px;
    top: 0;
    left: 42%;
    transform: translateX(-42%);
    z-index: 1000; /* Asigură că navbar-ul este deasupra altor elemente */
    /* O mică ajustare pentru a contracara scroll-ul orizontal pe unele browsere/Bootstrap */
    overflow-x: hidden;
}

.navbar-brand {
    font-size: 26px;
    font-weight: bold;
    color: rgb(255, 153, 0); /* Text alb */
}

.navbar-links {
    display: flex;
    gap: 25px; /* Spațiu între butoane */
    margin-left: auto; /* Împinge link-urile spre centru/dreapta */
    margin-right: 30px; /* Lasă spațiu între link-uri și info user */
}

.nav-button {
    color: rgb(255, 153, 0); /* Text alb pentru butoanele inactive */
    text-decoration: none; /* Elimină sublinierea implicită a link-urilor */
    font-size: 18px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: background-color 0.8s ease; /* Efect de tranziție la hover */
    white-space: nowrap; /* Previne ruperea textului pe mai multe rânduri */
}

.nav-button:hover {
    background-color: rgba(255, 153, 0, 0.3); /* Fundal ușor transparent la hover */
}

.nav-button.active {
    background-color: rgba(255, 153, 0, 0.3); /* Fundal mai vizibil pentru pagina activă */
    font-weight: bold; /* Text îngroșat pentru pagina activă */
    color: #ff9100 !important; /* Text portocaliu pentru butonul activ, pentru a fi vizibil */
}


.navbar-user-info {
    display: flex;
    align-items: center;
    gap: 15px; /* Spațiu între email și buton */
}

.navbar-user-info span {
    font-size: 16px;
    font-weight: normal;
}

.btn-logout {
    background-color: #dc3545; /* Roșu pentru deconectare */
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.btn-logout:hover {
    background-color: #c82333;
}

/* Stiluri generale pentru container (folosit doar pentru login/register) */
.container {
    background-color: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px; /* Max width pentru formularul de login/register */
    text-align: center;
    margin: auto;
}

/* Centrare pagină pentru formulare (login/register), aplicat direct pe body pentru acele pagini */
body.centered-form-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* Stiluri pentru elementele din formulare (login/register) */
h2 {
    color: #333;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: bold;
}

input[type="email"],
input[type="password"],
input[type="text"],
textarea,
select {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box; /* Include padding in width */
}

/* Stil personalizat pentru butoanele de acțiune */
.btn-action-custom {
    padding: 8px 13px !important; /* Mărește spațiul interior (mai lat) */
    font-size: 0.8em !important;   /* Mărește dimensiunea fontului */
    width: 40px !important;       /* Poți seta o lățime fixă */
}

/* Stiluri pentru butoanele generale din formulare (excluzând butoanele de acțiune din tabel și butonul de logout) */
button:not(.action-buttons button):not(.btn-logout):not(.btn-close) {
    background-color: #ff9100;
    color: white; /* Aceasta este culoarea textului pentru butonul "Creează Client" și alte butoane de formular */
    padding: 8px 8px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 18px;
    width: auto; /* MODIFICAT: Lățime automată */
    display: block; /* MODIFICAT: Ocupă întreaga lățime disponibilă și se așează pe o linie nouă */
    margin: 18px auto; /* MODIFICAT: Centrează butonul orizontal și adaugă spațiu sus/jos */
    transition: background-color 0.6s ease;
}

button:not(.action-buttons button):not(.btn-logout):not(.btn-close):hover {
    background-color: #e68000; /* O nuanță mai închisă la hover */
}

.message {
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

.message a {
    color: #ff9100;
    text-decoration: none;
}

.message a:hover {
    text-decoration: underline;
}

.error-message {
    color: red;
    margin-top: 10px;
    font-weight: bold;
}

.success-message {
    color: green;
    margin-top: 10px;
    font-weight: bold;
}

/* --- Stiluri pentru Pop-up (Modal) --- */
/* Lăsăm Bootstrap să gestioneze majoritatea stilurilor pentru .modal și .modal-backdrop */
/* Am eliminat toate stilurile care ar putea interfera cu Bootstrap aici */
.modal {
    /* Z-index-ul standard pentru modal-uri Bootstrap este 1050 */
    z-index: 1050;
}

.modal-content {
    background-color: #fefefe;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    max-width: 1300px; /* Lățimea maximă */
    width: 90vw; /* Lățime procentuală */
}

/* Animația personalizată (o păstrăm, dar nu o aplicăm direct pe .modal-content pentru a evita conflicte) */
@keyframes animatetop {
    from {top: -300px; opacity: 0}
    to {top: 0; opacity: 1}
}

.modal-content h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

/* Stiluri generale pentru butoanele de acțiune din tabel (aplicabile ambelor tabele) */
.action-buttons button {
    padding: 9px 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    white-space: nowrap;
    width: auto;
    display: inline-block;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.action-buttons button:hover {
    transform: translateY(-1px);
}

.action-buttons .edit-btn {
    background-color: #007bff; /* Albastru */
    color: white;
}
.action-buttons .edit-btn:hover { background-color: #0056b3; }

.action-buttons .delete-btn {
    background-color: #dc3545; /* Roșu */
    color: white;
}
.action-buttons .delete-btn:hover { background-color: #c82333; }

.action-buttons .service-btn {
    background-color: #28a745; /* VERDE! */
    color: rgb(255, 255, 255);
}
.action-buttons .service-btn:hover { background-color: #218838; }

/* Stil pentru mesaje (succes/eroare) */
.message {
    margin-top: 20px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Stiluri pentru butonul "Salvează Client" din modal */
.modal-save-btn {
    width: auto !important;
    padding: 12px 25px;
    font-size: 1.1em;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Stiluri pentru butonul "Autentificare" din pagina de login */
.login-btn {
    width: auto !important;
    padding: 12px 25px;
    font-size: 1.1em;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Stil pentru butonul "Șterge" din pagina Service */
.action-buttons .delete-service-btn {
    background-color: #dc3545;
    color: white;
}

.action-buttons .delete-service-btn:hover {
    background-color: #c82333;
}

/* Stiluri pentru butonul "Adaugă Deviz" din pagina Service */
.action-buttons .add-invoice-btn {
    background-color: #007bff;
    color: white;
}

.action-buttons .add-invoice-btn:hover {
    background-color: #0056b3;
}

/* Stiluri specifice pentru Dashboard Content (pagina Acasă) */
.dashboard-content {
    max-width: 1800px; /* MODIFICAT: Lățime maximă fixă */
    margin: 90px auto 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 11px rgb(255, 153, 0);
    box-sizing: border-box;
}

/* Stiluri pentru Tabelul de Clienți (Pagina Acasă - Dashboard) */
.client-list-section {
    margin-top: 20px;
}

#clientsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    table-layout: auto; /* NOU: Forțează lățimile coloanelor să fie fixe */
}

#clientsTable th, #clientsTable td {
    border: 1px solid #ddd;
    padding: 5px 10px;
    text-align: left;
    vertical-align: middle;
    word-wrap: break-word; /* Asigură împărțirea cuvintelor lungi */
    word-break: break-all; /* NOU: Forțează împărțirea oricărui cuvânt lung */
    font-size: 0.9em;
}

#clientsTable th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

#clientsTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#clientsTable tbody tr:hover {
    background-color: #f1f1f1;
}

/* Lățimi Coloane SPECIFICE pentru #clientsTable (Pagina Acasă - 9 COLOANE) */
#clientsTable th:nth-child(1), #clientsTable td:nth-child(1) { width: 5%; } /* ID */
#clientsTable th:nth-child(2), #clientsTable td:nth-child(2) { width: 10%; } /* Data Înregistrare */
#clientsTable th:nth-child(3), #clientsTable td:nth-child(3) { width: 12%; } /* Nume Client */
#clientsTable th:nth-child(4), #clientsTable td:nth-child(4) { width: 8%; } /* Telefon */
#clientsTable th:nth-child(5), #clientsTable td:nth-child(5) { width: 13%; } /* Tip Utilaj */
#clientsTable th:nth-child(6), #clientsTable td:nth-child(6) { width: 10%; } /* Denumire Utilaj */
#clientsTable th:nth-child(7), #clientsTable td:nth-child(7) { width: 8%; } /* Serie Șasiu */
#clientsTable th:nth-child(8), #clientsTable td:nth-child(8) { width: 35%; } /* Defecțiune - Mărit */
#clientsTable th:nth-child(9), #clientsTable td:nth-child(9) { width: 4%; } /* Status - Micșorat */
#clientsTable th:nth-child(10), #clientsTable td:nth-child(10) { width: 13%; } /* Acțiuni - Mărit */

/* Stiluri pentru butoanele de acțiune din tabelul de dashboard */
#clientsTable td.action-buttons {
    display: flex; /* Corectat: "flexbox" nu este o valoare validă */
    justify-content: space-between;
    padding:  5% 5% ;
    align-items: center; /* Corectat: "ce" nu este o valoare validă */
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    /*position: fixed;*/
    border-radius: 0px;
    top: auto; /* Poți ajusta distanța de sus */
    left: 50%; /* Centrează elementul față de mijlocul ecranului */
    /*transform: translateX(-50%); /* Trage elementul înapoi cu jumătate din lățimea sa */
    z-index: 1000;
}

/* Stiluri specifice pentru Service Content */
.service-content {
    max-width: 1800px; /* MODIFICAT: Lățime maximă fixă */
    margin: 90px auto 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 11px rgb(255, 153, 0);
    box-sizing: border-box;
}

/* --- Stiluri pentru Pagina Service --- */
.service-list-section {
    margin-top: 40px;
}

#serviceClientsTable {
 width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    table-layout: auto; /* NOU: Forțează lățimile coloanelor să fie fixe */
}


#serviceClientsTable td {
    border: 1px solid #ddd;
    padding: 5px 10px;
    text-align: left;
    vertical-align: middle;
    word-wrap: break-word; /* Asigură împărțirea cuvintelor lungi */
    word-break: break-all; /* NOU: Forțează împărțirea oricărui cuvânt lung */
    font-size: 0.9em;
}

#serviceClientsTable th {
   background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

#serviceClientsTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#serviceClientsTable tbody tr:hover {
    background-color: #f1f1f1;
}

/* Lățimi Coloane SPECIFICE pentru #serviceClientsTable (Pagina Service) */
#serviceClientsTable th:nth-child(1),#serviceClientsTable td:nth-child(1) { width: 5%;} /* ID */
#serviceClientsTable th:nth-child(2),#serviceClientsTable td:nth-child(2) {width: 12%;} /* Data Intrare Service */
#serviceClientsTable th:nth-child(3),#serviceClientsTable td:nth-child(3) {width: 12%; } /* Nume Client */
#serviceClientsTable th:nth-child(4),#serviceClientsTable td:nth-child(4) {width: 9%; } /* Telefon Client - Ajustat */
#serviceClientsTable th:nth-child(5),#serviceClientsTable td:nth-child(5) {width: 10%;} /* Tip Utilaj */
#serviceClientsTable th:nth-child(6),#serviceClientsTable td:nth-child(6) {width: 10%;} /* Denumire Utilaj */
#serviceClientsTable th:nth-child(7),#serviceClientsTable td:nth-child(7) {width: 8%;} /* serie utilaj */
#serviceClientsTable th:nth-child(8),#serviceClientsTable td:nth-child(8) {width: 35%;} /* Defecțiune - Redus */
#serviceClientsTable th:nth-child(9),#serviceClientsTable td:nth-child(9) {width: 5%; } /* Status - Ajustat */
#serviceClientsTable th:nth-child(10),#serviceClientsTable td:nth-child(10) {width: 12%;} /* Acțiuni - Mărit */

/* Stiluri pentru butoanele de acțiune din #serviceClientsTable */
#serviceClientsTable td.action-buttons {
     display: flex; /* Corectat: "flexbox" nu este o valoare validă */
    justify-content: space-between;
    padding:  5% 5% ;
    align-items: center; /* Corectat: "ce" nu este o valoare validă */
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    /*position: fixed;*/
    border-radius: 0px;
    top: auto; /* Poți ajusta distanța de sus */
    left: 50%; /* Centrează elementul față de mijlocul ecranului */
    /*transform: translateX(-50%); /* Trage elementul înapoi cu jumătate din lățimea sa */
    z-index: 1000;
}

.action-buttons .return-to-pending-btn {
    background-color: #28a745;
    color: white;
}

/* --- Stiluri specifice pentru butoanele "Șterge" și "Adaugă Deviz" --- */
/* Acestea asigură că butoanele au culoarea corectă indiferent de ordinea CSS */
#serviceClientsTable .action-buttons .delete-service-btn {
    background-color: #dc3545;
    color: white;
}

.action-buttons .delete-service-btn:hover {
    background-color: #c82333;
}

#serviceClientsTable .action-buttons .add-invoice-btn {
    background-color: #007bff;
    color: white;
}

.action-buttons .add-invoice-btn:hover {
    background-color: #0056b3;
}

/* Stiluri Specifice pentru Pagina Service (elemente non-tabel) */
.back-btn {
    background-color: #6c757d;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    transition: background-color 0.3s ease;
}

.back-btn:hover {
    background-color: #5a6268;
}

.back-btn i {
    margin-right: 5px;
}

.client-details-card {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
    box-shadow: 0 2px 4px rgba(224, 6, 6, 0.1);
}

.client-details-card p {
    margin-bottom: 10px;
    font-size: 1.1em;
}

.client-details-card strong {
    color: #333;
}


/*.status-badge {
    display: inline-block;
    padding: 8px 4px;
    border-radius: 100px;
    font-weight: bold;
    color: white; /* Culoarea textului implicită pentru badge-uri 
    text-transform: uppercase;
    font-size: 0.75em;
    min-width: 2px;
    text-align: left;
}*/


.btn-fixed-width {
    width: 100px; /* Ajustează această valoare după cum este necesar */
    text-align: center; /* Centrează iconița sau textul */
    /* Poți adăuga și alte stiluri, cum ar fi padding */
    padding: 10px 10px;
}
/* Stiluri pentru diferite statusuri (CULORILE TALE ORIGINALE) */
.status-pending {
    background-color: #ffffff;
    color: #333;
    font-size: 0.9em;
}


@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulsePending {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/*.status-in-service {
    background-color: #ffffff;
}*/

.status-completed {
    background-color: #28a745;
    font-size: 0.8em;

}

.status-canceled {
    background-color: #dc3545;
}

/* NOILE STILURI PENTRU REPARAT ȘI NEREPARAT */
.status-reparat {
    background-color: #28a745; /* Verde */
    color: white;
}

.status-nereparat {
    background-color: #dc3545; /* Roșu */
    color: white;
}


.service-action-buttons {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.service-action-buttons .btn {
    padding: 10px 15px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.service-action-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Stiluri pentru butoanele de service (culori diferite) */
.service-action-buttons .btn-primary {
    background-color: #007bff;
    color: white;
}

.service-action-buttons .btn-success {
    background-color: #28a745;
    color: white;
}

.service-action-buttons .btn-info {
    background-color: #17a2b8;
    color: white;
}

.service-action-buttons .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.service-action-buttons .btn-warning {
    background-color: #ffc107;
    color: #333;
}

/* Stiluri pentru rândurile de piese adăugate dinamic */
.part-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: flex-end;
    border: 1px solid #eee;
    padding: 10px;
    border-radius: 5px;
    background-color: #fdfdfd;
}

.part-row .form-group {
    flex: 1;
    min-width: 120px;
}

.part-row .form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: #555;
}

.part-row .form-control {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.part-row .remove-part-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #dc3545;
    color: white;
    font-size: 0.9em;
    height: 38px;
    margin-bottom: 0;
    align-self: flex-end;
}

.part-row .remove-part-btn:hover {
    background-color: #c82333;
}

#addPartRowBtn {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 12px 20px;
    font-size: 1em;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* Stiluri pentru secțiunea de manoperă */
.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.form-row label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-row input[type="number"],
.form-row select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #f4f4f4;
}

/* Stiluri pentru Totaluri */
.totals-section {
    margin-top: 20px;
    padding: 15px;
    border-top: 1px solid #eee;
    background-color: #f0f8ff;
    border-radius: 5px;
    text-align: right;
}

.totals-section p {
    margin-bottom: 5px;
    font-size: 1.1em;
    color: #444;
}

.totals-section h3 {
    margin-top: 10px;
    color: #0056b3;
    font-size: 1.6em;
}

/* Stiluri pentru butoanele din modal */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 50px;
    margin-top: 50px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.modal-actions .btn {
    padding: 12px 28px;
    font-size: 1.1em;
    min-width: 150px;
    text-align: center;
}

.modal-actions .btn-success {
    background-color: #28a745;
    color: white;
}

.modal-actions .btn-success:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

.modal-actions .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.modal-actions .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}

/* Stiluri pentru detalii client în modal (opțional, pentru un aspect mai curat) */
.client-details-summary {
    background-color: #e9f7ef;
    border: 1px solid #d4edda;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 20px;
    text-align: left;
}

.client-details-summary p {
    margin: 5px 0;
    font-size: 0.95em;
    color: #333;
}

.client-details-summary strong {
    color: #333;
}

/* Stiluri pentru câmpurile readonly/disabled din modal (pentru invoiceModal) */
.modal-content input[readonly],
.modal-content select[readonly],
.modal-content select[disabled],
.modal-content textarea[readonly] {
    background-color: #e9ecef;
    opacity: 1;
    cursor: not-allowed;
}

.modal-content hr {
    margin: 20px 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Stiluri pentru rândurile de piese din modal (invoiceModal) */
.part-row {
    border: 1px solid #dee2e6;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f8f9fa;
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.part-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.part-row .remove-part-btn {
    align-self: center;
    flex-shrink: 0;
    padding: 8px 12px;
}

.text-end {
    text-align: right;
}

/* Stiluri pentru badge-urile de status (pentru istoric) */
/* NOTĂ: Acestea sunt stilurile pe care le-ai furnizat, le-am păstrat și am adăugat doar reparat/nereparat */
.status-badge {
    padding:  2px;
    border-radius: 100px;
    font-weight: bold;
    color: #ffc107; /* Culoarea textului implicită pentru badge-uri */
    display: inline-block;
    min-width: 2px;
    text-align: center;
    text-transform: uppercase; /* Asigură că textul este uppercase */
}

@keyframes pulseSuccess {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.85;
  }
}


.status-completed { background-color: transparent; }
.status-pending { background-color: transparent; color: #e68000; }
.status-in_service { background-color: #007bff; }
.status-reparat { background-color: #28a745; /* Verde */ color: white; }
.status-nereparat { background-color: #dc3545; /* Roșu */ color: white; }


/* Stiluri pentru History Content */
.history-content {
    max-width: 1800px; /* MODIFICAT: Lățime maximă fixă */
    margin: 90px auto 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 11px rgb(255, 153, 0);
    box-sizing: border-box;
}

#historyClientsTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    table-layout: auto; /* NOU: Forțează lățimile coloanelor să fie fixe */
}

#historyClientsTable th, #historyClientsTable td {
    border: 1px solid #ddd;
    padding: 5px 10px;
    text-align: left;
    vertical-align: middle;
    word-wrap: break-word; /* Asigură împărțirea cuvintelor lungi */
    word-break: break-all; /* NOU: Forțează împărțirea oricărui cuvânt lung */
    font-size: 0.9em;
}

#historyClientsTable th {
    background-color: #f2f2f2;
    font-weight: bold;
    color: #555;
    white-space: nowrap;
}

#historyClientsTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

#historyClientsTable tbody tr:hover {
    background-color: #f1f1f1;
}

/* Lățimi Coloane SPECIFICE pentru #historyClientsTable */
#historyClientsTable th:nth-child(1), #historyClientsTable td:nth-child(1) { width: 6%; } /* ID */
#historyClientsTable th:nth-child(2), #historyClientsTable td:nth-child(2) { width: 11%; } /* Data Intrare Service */
#historyClientsTable th:nth-child(3), #historyClientsTable td:nth-child(3) { width: 11%; } /* Data Finalizare Service */
#historyClientsTable th:nth-child(4), #historyClientsTable td:nth-child(4) { width: 12%; } /* Nume Client */
#historyClientsTable th:nth-child(5), #historyClientsTable td:nth-child(5) { width: 12%; } /* Telefon Client */
#historyClientsTable th:nth-child(6), #historyClientsTable td:nth-child(6) { width: 7%; } /* Tip Utilaj */
#historyClientsTable th:nth-child(7), #historyClientsTable td:nth-child(7) { width: 12%; } /* Denumire Utilaj */
#historyClientsTable th:nth-child(8), #historyClientsTable td:nth-child(8) { width: 7%; } /* Status */
#historyClientsTable th:nth-child(9), #historyClientsTable td:nth-child(9) { width: 4%; } /* Acțiuni */

/* Stiluri pentru butoanele de acțiune din #historyClientsTable */
#historyClientsTable td.action-buttons {
    display: auto;
    flex-wrap: nowrap; /* NOU: Butoanele vor sta pe o singură linie */
    justify-content: flex-start;
    align-items: center;
    gap: 5px;
}

/* Stiluri specifice pentru Rapoarte Content */
.report-content {
    max-width: 1800px; /* MODIFICAT: Lățime maximă fixă */
    margin: 90px auto 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 11px rgb(255, 153, 0);
    box-sizing: border-box;
}

/* Stiluri specifice pentru Setări Content */
.settings-content {
    max-width: 1800px; /* MODIFICAT: Lățime maximă fixă */
    margin: 90px auto 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 50px;
    box-shadow: 0 10px 11px rgba(255, 153, 0);
    box-sizing: border-box;
}

/* Stiluri specifice pentru Setări Content */
.button-rapoarte {
     padding: 8px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    background-color: #e68000;
    color: white;
    font-size: 0.9em;
    height: 38px;
    margin-bottom: 0;
    align-self: flex-end;
}


        .button-service-separat {
  /* Dimensiunea și spațierea */
  padding: 12px 24px; /* Mai mult spațiu interior */
  margin: 5px;       /* Spațiu între butoane */
  border-radius: 25px;
  /* Stilul textului */
  font-size: 16px;
  font-weight: bold;
  text-transform: uppercase;
  
  /* Culoarea și fundalul */
  background-color: #e68000; /* Un albastru închis, elegant */
  color: #ffffff;           /* Text alb */
  border: 30px ; /* O bordură mai închisă */
  
  /* Efecte la hover */
  transition: all 0.3s ease; /* O tranziție lină */
}
.button-service-separat:hover {
  background-color: #1519fa; /* O nuanță mai închisă la trecerea cu mouse-ul */
  transform: translateY(-2px); /* Un efect subtil de ridicare */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* O umbră ușoară */
}

/* Stilul pentru când butonul este activ sau apăsat */
.button-service-separat:active {
  transform: translateY(0);
  box-shadow: none;
}

.card-slim {
  max-height: 250px;   /* înălțime maximă */
  min-height: 150px;   /* ca să nu se micșoreze prea mult */
  padding: 0.5rem;     /* mai mic decât default-ul */
}

.card-slim .card-body {
  padding: 0.5rem;     /* padding mai mic în body */
}

.card-slim canvas {
  max-height: 150px;   /* grafic mai mic */
}


/* === Navbar personalizat - transparent, portocaliu, elegant === */
.custom-navbar {
  background-color: transparent !important;
  border-bottom: 1px solid rgba(230, 80, 0, 0.4);
  backdrop-filter: blur(4px);
  padding: 0.3rem 0;
  transition: all 0.3s ease-in-out;
}

/* Brand / logo */
.custom-navbar .navbar-brand {
  color: #e68000 !important;
  font-weight: 700;
  font-size: 1.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* Linkuri principale */
.custom-navbar .nav-link {
  color: #e68000 !important;
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0.5rem;
  transition: color 0.2s ease, transform 0.2s ease;
  padding: 0.4rem 0 !important;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
  color: #ff7a33 !important;
  transform: translateY(-1px);
}

/* Buton deconectare */
.custom-navbar .btn-outline-warning {
  border-color: #e65000 !important;
  color: #e65000 !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 3px 10px;
  border-radius: 8px;
  background: transparent !important;
}

.custom-navbar .btn-outline-warning:hover {
  background-color: #e65000 !important;
  color: #fff !important;
}

/* === Desktop layout === */
.custom-navbar .navbar-nav {
  align-items: center;
  margin-left: 12rem !important; /* poziționează ușor spre dreapta */
}

/* === Hamburger icon (mobil) === */
.navbar-toggler {
  border-color: rgba(230, 80, 0, 0.6);
  border-radius: 6px;
  padding: 3px 6px;
}

.navbar-toggler-icon {
  background-image: none;
  position: relative;
  width: 24px;
  height: 2px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  height: 2px;
  background-color: #e65000;
  transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
  top: -6px;
}

.navbar-toggler-icon::after {
  top: 6px;
}

/* === Responsivitate - Mobil === */
@media (max-width: 991px) {
  .custom-navbar .navbar-nav {
    margin-left: 0 !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 10px 10px;
    padding: 10px 0;
  }

  .custom-navbar .nav-item {
    margin: 5px 0;
  }

  .custom-navbar .nav-link {
    display: block;
    width: 100%;
    color: #e65000 !important;
    font-weight: 600;
    font-size: 2rem;
    padding: 8px 0;
  }

  .custom-navbar .navbar-collapse.show {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }

  .navbar-toggler {
    border-color: #e65000;
  }

  .navbar-toggler-icon::before,
  .navbar-toggler-icon::after {
    background-color: #e65000;
  }
}




.chart-container {
  position: relative;
  width: 100%;
  height: 300px; /* înălțime pe desktop */
  margin: 0 auto;
}

@media (max-width: 768px) {
  .chart-container {
    height: 220px; /* înălțime mai mică pe telefon */
  }
}

canvas#monthlyRevenueChart {
  display: block;
  width: 100% !important;
  height: 100% !important;
}


.chart-container {
  position: relative;
  width: 100%;
  height: 150px;
}

@media (max-width: 768px) {
  .chart-container {
    height: 190px;
  }
}

canvas#monthlyRevenueChart {
  display: block;
  width: 100% !important;
  height: 100% !important;
}



/* === Fix final: spațiu vizibil între toate rândurile de carduri (inclusiv pe mobil) === */

/* Adaugă spațiu între fiecare .row care urmează după alt .row */
.dashboard-content .row + .row {
  margin-top: 1.75rem !important;
}

/* Pe ecrane mici, un pic mai mult spațiu pentru claritate */
@media (max-width: 768px) {
  .dashboard-content .row + .row {
    margin-top: 2.25rem !important;
  }
}

/* Asigură că umbrele cardurilor nu sunt tăiate */
.dashboard-content .row {
  overflow: visible !important;
}

/* === Spațiere uniformă între toate cardurile din dashboard === */

/* Toate rândurile care urmează după o secțiune de carduri */
.dashboard-content .row + .row {
  margin-top: 1.5rem !important; /* aceeași distanță ca între Top 10 piese și utilaje */
}

/* Pe ecrane mici, un pic mai mult spațiu pentru claritate */
@media (max-width: 768px) {
  .dashboard-content .row + .row {
    margin-top: 2rem !important;
  }
}

/* Corectăm umbrele și efectul de lipire */
.dashboard-content .row {
  overflow: visible !important;
}

.dashboard-content .card {
  position: relative;
  z-index: 2;
}

/* Siguranță suplimentară — se aplică doar dacă ceva taie marginile */
.dashboard-content {
  display: block !important;
  overflow: visible !important;
}


/* 🔧 Forțăm spațiere între cardurile din dashboard, ignorând tot Bootstrap-ul */
.dashboard-content > .row {
  margin-bottom: 1.75rem !important;  /* spațiu între fiecare rând */
}

@media (max-width: 768px) {
  .dashboard-content > .row {
    margin-bottom: 2.25rem !important; /* mai mult spațiu pe mobil */
  }
}

/* Corecție pentru umbre tăiate */
.dashboard-content {
  overflow: visible !important;
}


/* 🔧 Spațiere forțată între cardurile din dashboard (acasa.html) */
.container-fluid.dashboard-content > .row {
  margin-bottom: 2rem !important; /* spațiu clar între toate cardurile */
}

/* Pe ecrane mici, mărim ușor spațiul */
@media (max-width: 768px) {
  .container-fluid.dashboard-content > .row {
    margin-bottom: 2.5rem !important;
  }
}

/* Ne asigurăm că umbrele se văd complet */
.container-fluid.dashboard-content {
  overflow: visible !important;
  display: block !important;
}


