html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* ============================= */
/*        Stiluri generale      */
/* ============================= */
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
}

/* ============================= */
/*        Pagina de login       */
/* ============================= */
body.login-page {
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

form {
    background: #ffffff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    width: 320px;
}

h2 {
    margin-bottom: 20px;
    text-align: center;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    margin-top: 12px;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-sizing: border-box;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
    background-color: #fff;
}

button {
    width: 100%;
    padding: 10px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    margin-top: 15px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s ease;
}

button:hover {
    background: #555;
}

.g-recaptcha {
    margin-top: 15px;
}

/* ============================= */
/*         Mesaje de eroare      */
/* ============================= */
.error-message {
    background-color: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}


/* ============================= */
/*       Dashboard layout        */
/* ============================= */
body.dashboard-layout {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
}

.sidebar {
    width: 240px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: #222;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    z-index: 9999;
}

.sidebar h3 {
    margin: 0 0 20px;
    font-size: 18px;
}

.sidebar a {
    color: #fff;
    text-decoration: none;
    margin: 10px 0;
    display: block;
    padding: 8px;
    border-radius: 6px;
    transition: background 0.3s;
}

.sidebar a:hover {
    background: #444;
}

.content {
    margin-left: 240px;
    padding: 30px;
    background: #f5f5f5;
    min-height: 100vh;
    box-sizing: border-box;
}

.success-message {
    background-color: #e0ffe0;
    border: 1px solid #a4d4a4;
    color: #2d8a2d;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

/* ============================= */
/*         Profil layout         */
/* ============================= */
.profil-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
    background: #fff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.profil-form-wrapper form {
    display: flex;
    flex-direction: column;
}

.profil-form-wrapper label {
    margin-top: 15px;
    font-weight: 500;
}

.profil-form-wrapper input[type="text"],
.profil-form-wrapper input[type="password"] {
    margin-top: 5px;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: 0.3s;
}

.profil-form-wrapper hr {
    margin: 20px 0;
    border: none;
    border-top: 1px solid #ddd;
}


/* ============================= */
/*      Utilizatori layout       */
/* ============================= */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-radius: 8px;
    overflow: hidden;
}

.user-table th,
.user-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.user-table th {
    background: #f4f4f4;
    font-weight: bold;
}

.user-table tr:hover {
    background: #f9f9f9;
}

.btn-add {
    display: inline-block;
    padding: 10px 16px;
    margin-bottom: 12px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: bold;
}

.btn-edit,
.btn-toggle,
.btn-delete {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    margin-right: 6px;
}

td.actiuni {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}

.btn-icon {
    display: inline-block;
    text-decoration: none;
    font-size: 18px;
    color: #333;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.btn-icon:hover {
    transform: scale(1.2);
    color: #e53935;
}

.btn-delete {
    background: none;
    border: none;
    color: red;
    font-size: 18px;
    cursor: pointer;
    text-decoration: none;
    padding: 5px;
}

.btn-delete:hover {
    color: darkred;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    border-radius: 20px;
    font-weight: 500;
    color: white;
}

.badge-admin {
    background-color: #007bff;
}

.badge-agent {
    background-color: #28a745;
}

.badge-inactiv {
    background-color: #dc3545;
}

/* ============================= */
/*      Adaugă utilizator        */
/* ============================= */
.add-user-page .form-container {
    max-width: 420px;
    margin: 0 auto;
    background: #ffffff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.add-user-page .form-container label {
    margin-top: 15px;
    font-weight: 500;
}

.add-user-page .form-container input[type="text"],
.add-user-page .form-container input[type="password"] {
    margin-top: 5px;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: 0.3s;
}

.add-user-page .form-container button {
    margin-top: 25px;
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.add-user-page .form-container button:hover {
    background: #555;
}

.add-user-page .error {
    background-color: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.add-user-page .success {
    background-color: #e0ffe0;
    border: 1px solid #a4d4a4;
    color: #2d8a2d;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.add-user-page .form-container select {
    margin-top: 5px;
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: 0.3s;
}

.add-user-page .form-container select:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
    background-color: #fff;
}

/* ============================= */
/*     Editare utilizator        */
/* ============================= */
.edit-user-page .form-container {
    max-width: 420px;
    margin: 30px auto;
    background: #ffffff;
    padding: 2em;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.edit-user-page .form-container label {
    margin-top: 15px;
    font-weight: 600;
    color: #333;
}

.edit-user-page .form-container input[type="text"],
.edit-user-page .form-container input[type="password"] {
    padding: 12px 14px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 5px;
}

.edit-user-page .form-container input:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
    background-color: #fff;
}

.edit-user-page .form-container button {
    margin-top: 25px;
    padding: 12px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
}

.edit-user-page .form-container button:hover {
    background: #555;
}

.edit-user-page .error {
    background-color: #fff0f0;
    border: 1px solid #ffcccc;
    color: #cc0000;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.edit-user-page .success {
    background-color: #e0ffe0;
    border: 1px solid #a4d4a4;
    color: #2d8a2d;
    padding: 10px;
    margin-top: 15px;
    border-radius: 8px;
    font-size: 14px;
    text-align: center;
}

.edit-user-page .form-container select {
    padding: 12px 14px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 15px;
    background-color: #f9f9f9;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.edit-user-page .form-container select:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
    outline: none;
    background-color: #fff;
}

.product-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.product-table th,
.product-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

/* ============================= */
/*         Estimări layout       */
/* ============================= */
.estimari-page .estimari-container {
    max-width: none;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

.estimari-page .estimari-card {
    overflow-x: auto;
    width: 100%;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    background-color: #fff;
}

.estimari-page .estimari-container h1 {
    text-align: center;
    margin-bottom: 25px;
}

.estimari-page .form-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 30px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.05);
    overflow-x: auto;
    width: auto;
}

.estimari-page table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.estimari-page table th,
.estimari-page table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

.estimari-page table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.estimari-page input[type="number"] {
    width: 60px;
    padding: 6px;
    font-size: 14px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: #f9f9f9;
}

.estimari-page input[type="text"] {
    width: 60px;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    padding: 5px;
}

.estimari-page input[type="number"]:focus {
    border-color: #4A90E2;
    outline: none;
    background-color: #fff;
}

.estimari-page button {
    width: 100%;
    padding: 12px;
    background-color: #333;
    color: #fff;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.estimari-page button:hover {
    background-color: #555;
}

.estimari-page .btn-container {
    text-align: center;
}

/* ============================= */
/*         Filtre inventar       */
/* ============================= */
.filters-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 950px;
    width: 100%;
    margin-bottom: 25px;
    box-sizing: border-box;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    gap: 18px;
    align-items: end;
}

.filter-item {
    display: flex;
    flex-direction: column;
}

.filter-item label {
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.filter-item input[type="date"],
.filter-item select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    font-size: 15px;
    background: #f9fafb;
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.filter-item input[type="date"]:focus,
.filter-item select:focus {
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
    outline: none;
    background: #fff;
}

.filters-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
}

.filters-actions button {
    width: 220px;
    height: 46px;
    border: none;
    border-radius: 10px;
    background: #333;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 0;
}

.filters-actions button:hover {
    background: #555;
}

/* Responsive */
@media (max-width: 1100px) {
    .filters-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filters-actions {
        justify-content: stretch;
    }

    .filters-actions button {
        width: 100%;
    }
}

/* ============================= */
/*        Detalii inventar       */
/* ============================= */
.inventar-card {
    background: #fff;
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.inventar-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
}

.inventar-info-item {
    display: flex;
    flex-direction: column;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 14px 16px;
}

.inventar-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
    font-weight: 600;
}

.inventar-value {
    font-size: 15px;
    color: #222;
    font-weight: 700;
    word-break: break-word;
}

@media (max-width: 1100px) {
    .inventar-info-grid {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 700px) {
    .inventar-info-grid {
        grid-template-columns: 1fr;
    }
}


.btn-reset {
    display: inline-block;
    padding: 10px 16px;
    background: #ffffff;
    color: #333;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #ccc;
    margin-left: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-reset:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* =========================
   EDITARE DOCUMENTE ÎNCĂRCARE
========================= */

.edit-doc-page .content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 30px;
}

.edit-doc-page h2 {
    width: 100%;
    max-width: 520px;
    margin-bottom: 25px;
}

.edit-doc-page .form-container {
    width: 100%;
    max-width: 520px;
    padding: 30px;
    margin: 0 auto;
}

.edit-doc-page label {
    display: block;
    margin-top: 14px;
    margin-bottom: 6px;
    font-weight: 600;
}

.edit-doc-page input,
.edit-doc-page select {
    width: 100%;
    height: 46px;
    border-radius: 8px;
    border: 1px solid #ccc;
    padding: 0 12px;
    font-size: 15px;
    box-sizing: border-box;
}

.edit-doc-page button {
    width: 100%;
    margin-top: 25px;
    height: 48px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
}