
.main {
    position: relative;
    z-index: 2;
    background-color: #faf8f5;
}

.profile-section {
    margin-top: 40px;
    margin-bottom: -60px;
}

.profile1-section {
    margin-top: 80px;
    margin-bottom: 0;
}

.section-title {
    margin-bottom: 10px;
}

/* FORM */
#form-user {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: auto;
    margin-top: -10px;
}

/* LABEL */
#form-user label {
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
}

/* INPUT */
#form-user .form-control {
    background: #fafafa;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    padding: 10px;
    color: #333;
}

#form-user .form-control:focus {
    background: #ffffff;
    border-color: #b5b5b5;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

/* SEZIONI DEL FORM */
#form-user .inputs {
    margin-bottom: 15px;
}

/* FOTO PROFILO */
#form-user img {
    border: 3px solid #e5e5e5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* BOTTONI */

/* INPUT FILE NASCOSTO */
#inputImage,
#submitHidden {
    display: none !important;
}

#mycolcenter {
    margin-top: 40px;
    margin-bottom: 30px;
}

#username1 {
    margin-bottom: -20px;
}

#image {
    margin-top: 10px;
    margin-bottom: 10px;
}

.btn {
    font-weight: 600;
    margin-left: 0;
    margin-bottom: 20px;
    margin-top: 10PX;
}

.card {
    margin-top: -30px;
    margin-bottom: 40px;
    background-color: whitesmoke;
}

.rounded-circle {
    margin-top: 0;
    margin-bottom: 10px;
}


.inputs label {
    display: flex;
    margin-left: 3px;
    font-weight: 500;
    font-size: 13px;
    margin-bottom: 3px;
    margin-top: 10px;
}

/* ===========================
   TABELLA — LIGHT STYLE
   =========================== */

.table-scroll {
    max-height: 400px;
    overflow-y: auto;
    overflow-x: auto;
    border: 0.5px solid #ccc;
    background: #ffffffcc;
    /* leggero vetro chiaro */
    backdrop-filter: blur(6px);
    margin-top: 10px;
    margin-bottom: 30px;
}

.table-scroll table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    border-spacing: 0;
    margin-bottom: 0;
}

.table-scroll th,
.table-scroll td {
    border: 1px solid #e0e0e0;
    padding: 6px 10px;
    color: #333;
    background: #fafafa;
    white-space: nowrap;
    /* evita schiacciamenti */
}

.table-scroll thead th {
    background: #f0f0f0;
    position: sticky;
    top: 0;
    z-index: 2;
    font-weight: 600;
}

@media only screen and (max-width: 640px) {
    .profile1-section {
        margin-top: 70px;
        margin-bottom: 0;
    }

    #mycolcenter {
        margin-top: 40px;
        margin-bottom: 10px;
    }
    
}

/* ===========================
         DARK MODE
   =========================== */

body.dark-mode .bg-image::after,
body.dark-mode section::after {
    background-color: rgba(0, 0, 0, 0.05) !important;
}

/* ===========================
   TABLE-SCROLL — DARK MODE
   =========================== */

body.dark-mode .table-scroll {
    background-color: rgba(255, 255, 255, 0.15) !important;
    /* vetro scuro */
    backdrop-filter: blur(6px);
    /* testo chiaro */
}

/* HEADER */
body.dark-mode .table-scroll thead th {
    background-color: rgba(255, 255, 255, 0.15) !important;
    color: #333;
    font-weight: 600;
    padding: 12px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.20);
}

/* RIGHE */
body.dark-mode .table-scroll tbody tr {
    background: rgba(255, 255, 255, 0.10);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    transition: background .15s;
}

/* HOVER */
body.dark-mode .table-scroll tbody tr:hover {
    background: rgba(255, 255, 255, 0.18);
}

/* CELLE */
body.dark-mode .table-scroll td {
    background: rgba(255, 255, 255, 0.10);
    padding: 12px;
    color: #ffffff;
    /* leggibile, non bianco sparato */
}

/* SCROLLBAR */
body.dark-mode .table-scroll::-webkit-scrollbar {
    width: 8px;
}

body.dark-mode .table-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 8px;
}

body.dark-mode .table-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .table-scroll label,
body.dark-mode .table-scroll td b,
body.dark-mode form label,
body.dark-mode .form-container label,
body.dark-mode .rounded_container label,
body.dark-mode .content label {
    color: #ffffff !important;
    font-weight: 600;
}

body.dark-mode form,
body.dark-mode .form-container,
body.dark-mode .rounded_container,
body.dark-mode .content {
    background-color: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: brightness(1.4) !important;
    border-radius: 10px;
    padding: 12px;
}

body.dark-mode #username1 {
    color: #fff;
}

body.dark-mode form input,
body.dark-mode form select,
body.dark-mode form textarea {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    border-color: #ccc !important;
}

/* SECONDARY BUTTON */
body.dark-mode .btn-outline-secondary {
    background: #3a3a3a !important;
    color: #f2f2f2 !important;
    border: 1px solid #3a3a3a!important;
}

body.dark-mode .btn-outline-secondary:hover {
    background: #f2f2f2 !important;
    border-color: #f2f2f2 !important;
    color: #4a4a4a !important;
}

body.dark-mode .btn-outline-primary {
    background: #3a3a3a !important;
    border: 1px solid #3a3a3a!important;
    color: #7ab8ff !important;
}

body.dark-mode .btn-outline-primary:hover {
    background: #f2f2f2 !important;
    color: #4da3ff !important;
}

/* DANGER BUTTON */
body.dark-mode .btn-outline-danger {
    background: #3a3a3a !important;
    /* rosso scuro elegante */
    color: #d64545 !important;
    border: 1px solid #3a3a3a !important;
}

body.dark-mode .btn-outline-danger:hover {
    background: #fff !important;
    /* rosso più vivo ma non neon */
    border-color: rgba(255, 255, 255, 0.28) !important;
    color: #d64545 !important
}
