   @import "../css/style.css";

   /* Layout */
   .user-container {
       display: grid;
       place-items: center;
   }

   .user-card {
       width: 100%;
       backdrop-filter: blur(14px);
       border-radius: 10px;
       padding: 40px;
       box-shadow: var(--color-shadow-form);
       border: 1px solid var(--color-border-form);
       background-color: var(--color-fondo-form);

   }

   /* Header */
   .user-header h2 {
       font-size: 28px;
       font-weight: 700;
       font-family: var(--font-base);
       color: var(--color-tipografia-sidebar);
   }

   .user-header p {
       color: var(--muted);
       margin-top: 6px;
   }

   /* Grid */
   .user-grid {
       margin-top: 30px;
       display: grid;
       grid-template-columns: 1fr 1fr .8fr;
       gap: 30px;
   }


   .user-grid>.user-col:first-child:nth-last-child(3) {
       border: none;
   }

   /* Columns */
   .user-col {
       background-color: var(--color-subItem-active-sidebar);
       border-radius: 0px;
       padding: 25px;
       border-left: 1px solid var(--color-border-form);
       background-color: transparent;
   }



   .user-col h3 {
       font-size: 18px;
       margin-bottom: 20px;
       color: var(--color-tipografia-description-form);
       font-family: var(--font-title);
   }

   /* Inputs */
   .input-box {
       position: relative;
       margin-bottom: 25px;
       margin-top: 50px;
   }


   .input-box input,
   .input-box select {
       width: 100%;
       padding: 14px;
       padding-left: 12px;
       border-radius: 12px;
       border: 1px solid var(--color-border-input-form);
       background: transparent;
       outline: none;
       transition: .25s;
       color: var(--color-tipografia-description-form);
   }


   .input-box label {
       position: absolute;
       left: 25px;
       top: 50%;
       transform: translateY(-50%);
       font-size: 13px;
       color: var(--color-tipografia-description-form);
       transition: .25s;
       pointer-events: none;
       color: var(--color-tipografia-description-form);
   }



   .input-box input:focus,
   .input-box select:focus {
       border-color: var(--primary);
       box-shadow: 0 0 0 4px rgba(79, 70, 229, .15);

   }

   .input-box input:focus+label,
   .input-box input:not(:placeholder-shown)+label,
   .input-box select:focus+label {
       top: -15px;
       left: 0px;
       background: transparent;
       padding: 0 6px;
       font-family: var(--font-title);
       font-size: 14px;
       margin-bottom: 2%;

   }

   /* Photo */
   .photo-box {
       text-align: center;
   }

   .photo-box input {
       display: none;
   }

   .photo-box img {
       width: 130px;
       height: 130px;
       border-radius: 50%;
       object-fit: cover;
       box-shadow: 0 15px 35px rgba(0, 0, 0, .25);
       border: 4px solid white;
   }

   .photo-box span {
       display: block;
       margin-top: 10px;
       font-size: 13px;
       color: var(--primary);
       cursor: pointer;
   }

   /* Status */
   .status-box {
       margin-top: 30px;
       display: flex;
       justify-content: space-between;
       align-items: center;
   }


   /* Actions */
   .form-actions {
       margin-top: 35px;
       text-align: right;
   }

   .form-actions button {
       background: linear-gradient(135deg, var(--primary), #6366f1);
       border: none;
       padding: 14px 40px;
       color: white;
       font-weight: 600;
       border-radius: 14px;
       cursor: pointer;
       transition: .3s;
   }

   .form-actions button:hover {
       transform: translateY(-2px);
       box-shadow: 0 20px 45px rgba(79, 70, 229, .4);
   }







   /*/ FOTO DE PREVISIZUALIZAR//*/
   /* Overlay */
   #photo-preview-overlay {
       position: fixed;
       inset: 0;
       z-index: 9999;
   }

   /* Fondo oscuro */
   .photo-preview-backdrop {
       position: absolute;
       inset: 0;
       background: rgba(0, 0, 0, .55);
       backdrop-filter: blur(6px);
   }

   /* Modal preview */
   .photo-preview-modal {
       position: absolute;
       top: 50%;
       left: 50%;
       transform: translate(-50%, -50%) scale(.95);
       background: var(--color-fondo-form);
       padding: 30px;
       border-radius: 20px;
       animation: previewIn .3s ease forwards;
       box-shadow: 0 40px 80px rgba(0, 0, 0, .6);
   }

   /* Imagen */
   .photo-preview-modal img {
       width: 420px;
       height: 420px;
       border-radius: 50%;
       object-fit: cover;
       display: block;
       margin: auto;
   }

   /* Acciones */
   .photo-preview-actions {
       margin-top: 25px;
       display: flex;
       justify-content: center;
       gap: 15px;
   }

   @keyframes previewIn {
       to {
           transform: translate(-50%, -50%) scale(1);
           opacity: 1;
       }
   }


   .photo-btn {
       padding: 10px 18px;
       border-radius: 12px;
       border: 1px dashed var(--color-border-input-form);
       background: transparent;
       color: var(--primary);
       cursor: pointer;
       display: flex;
       align-items: center;
       gap: 8px;
       font-weight: 500;
   }

   .photo-btn:hover {
       background: rgba(79, 70, 229, .08);
   }

   .btn-cancel {
       background-color: var(--color-btn-closed);
       width: 100px;
       height: 50px;
       color: white;
       border: none;
       border-radius: 10px;
       padding: 1%;
   }


   .btn-accept {
       background-color: var(--color-btn-accept);
       width: 100px;
       height: 50px;
       color: white;
       border: none;
       border-radius: 10px;
       padding: 1%;
   }


   /* ===============================
   VALIDACIÓN VISUAL
================================ */
   .input-box {
       position: relative;
   }

   .input-msg {
       display: block;
       margin-top: 6px;
       font-size: 12px;
       transition: .25s;
   }

   .msg-success {
       color: #22c55e;
   }

   .msg-error {
       color: #ef4444;
   }

   input.is-valid,
   select.is-valid {
       border-color:lime !important;
       background-color: rgba(0, 255, 0, 0.089);
       box-shadow: 0 0 0 3px rgba(34, 197, 94, .15);
   }

   input.is-invalid,
   select.is-invalid {
       border-color: #f70454 !important;
       background-color: rgba(255, 0, 0, 0.116);
       box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
   }



   /* =========================================================
   MODAL USUARIO CREADO – ESTILO PREMIUM
========================================================= */

   .created-user-box {
       text-align: center;
       padding: 20px 10px;
   }

   .created-user-icon {
       width: 80px;
       height: 80px;
       background: linear-gradient(135deg, #4ade80, #22c55e);
       border-radius: 50%;
       display: grid;
       place-items: center;
       margin: 0 auto 15px;
       box-shadow: 0 10px 25px rgba(34, 197, 94, 0.4);
   }

   .created-user-icon i {
       font-size: 38px;
       color: white;
   }

   .created-user-title {
       font-size: 22px;
       font-weight: 600;
       margin-bottom: 5px;
   }

   .created-user-subtitle {
       font-size: 14px;
       color: #6b7280;
       margin-bottom: 20px;
   }

   /* Credenciales */
   .credentials-card {
       background: rgba(255, 255, 255, 0.08);
       backdrop-filter: blur(12px);
       border-radius: 12px;
       padding: 15px;
       margin-bottom: 20px;
       border: 1px solid rgba(255, 255, 255, 0.15);
   }

   .credential-row {
       display: flex;
       justify-content: space-between;
       align-items: center;
       padding: 8px 0;
   }

   .credential-row+.credential-row {
       border-top: 1px dashed rgba(255, 255, 255, 0.2);
   }

   .credential-row .label {
       font-size: 13px;
       color: var(--color-tipografia-description-form);
   }

   .credential-row .value {
       font-size: 15px;
       font-weight: 600;
       color: var(--color-tipografia-description-form);
   }

   .credential-row .password {
       letter-spacing: 1px;
   }

   /* Botón copiar */
   .btn-copy-credentials {
       width: 100%;
       padding: 12px;
       border-radius: 10px;
       border: none;
       background-color: darkblue;
       color: #fff;
       font-size: 14px;
       font-weight: 500;
       cursor: pointer;
       display: flex;
       gap: 8px;
       justify-content: center;
       align-items: center;
       transition: all .3s ease;
   }

   .btn-copy-credentials:hover {
       transform: translateY(-1px);
       box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
   }

   .btn-copy-credentials.copied {
       background: linear-gradient(135deg, #22c55e, #16a34a);
       box-shadow: 0 8px 20px rgba(34, 197, 94, 0.4);
   }



   .table-avatar {
       width: 50px;
       height: 50px;
       object-fit: cover;
       border-radius: 100px;
       cursor: pointer;
   }

   .table-avatar-xl {
       position: relative;
       margin: auto;
       width: 100%;
       height: auto;
   }

   /* Usuario actual logueado en azul suave */
   .user-current {
       background-color: rgba(4, 255, 4, 0.444);
       border: solid 1px limegreen;
       /* azul claro */
   }






   /*/mensaje de bienvenida/*/
   .welcome-box {
       text-align: center;
       padding: 20px;
   }

   .welcome-box .welcome-avatar {
       width: 100px;
       height: 100px;
       border-radius: 50%;
       margin-bottom: 15px;
       object-fit: cover;
   }

   .welcome-box h2 {
       margin-bottom: 10px;
       color: #1a73e8;
   }

   .welcome-box p {
       font-size: 14px;
       color: #555;
   }



   /* Seccion panel de header de cambio de password */
.password-change-modal {
    background-color: var(--color-fondo-header-panel);
    padding: 20px 30px;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    box-shadow: var(--color-box-shadow-header-panel);
    color: var(--color-tipografia-one-header-panel);
    font-family: var(--font-title);
    border: solid 1px var(--color-border-header-panel);
}

.password-change-title {
    color: var(--color-tipografia-one-header-panel);
    text-align: center;
    margin-bottom: 10px;
    font-size: 1.5em;
}

.password-change-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.password-change-group {
    position: relative;
    flex: 1 1 200px;
}

.password-change-input {
    width: 100%;
    padding: 10px 45px 10px 15px; /* espacio para icono */
    border-radius: 10px;
    border: solid 1px var(--color-border-input-header-panel);
    outline: none;
    font-size: 14px;
    background-color: var(--color-input-search-header-panel);
    color: var(--color-tipografia-one-header-panel);
}

.password-change-input::placeholder {
    color: #94a3b8;
}

.password-change-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    transition: color 0.3s ease;
}

.password-change-toggle:hover {
    color: #38bdf8;
}

.password-change-btn {
    padding: 12px 20px;
    background: #0e91c9;
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.password-change-btn:hover {
    background: #0ea5e9;
}






@media (max-width: 900px) {
    .password-change-row {
        flex-direction: column;
        align-items: stretch; /* inputs ocupan todo el ancho */
        gap: 25px; /* menos espacio entre filas, más compacto */
    }

    .password-change-btn {
        width: 100%; /* botón ocupa todo el ancho en móviles */
        padding: 12px 0;
        font-size: 15px;
    }

    .password-change-group {
        flex: 1 1 auto; /* cada input toma su espacio natural */
    }
}


   @media (max-width:1024px) {

       /* Contenedor general */
       .user-container {
           padding: 15px;
           align-items: flex-start;
       }

       /* Card */
       .user-card {
           padding: 25px 20px;
           border-radius: 12px;
       }

       /* Header */
       .user-header h2 {
           font-size: 22px;
           text-align: center;
       }

       .user-header p {
           text-align: center;
           font-size: 14px;
       }

       /* Grid -> una sola columna */
       .user-grid {
           grid-template-columns: 1fr;
           gap: 20px;
       }

       /* Columnas */
       .user-col {
           padding: 20px 15px;
           border-left: none;
           border-top: 1px solid var(--color-border-form);
       }

       .user-col h3 {
           font-size: 16px;
           text-align: center;
       }

       /* Inputs */
       .input-box {
           margin-top: 35px;
           margin-bottom: 20px;
       }

       .input-box input,
       .input-box select {
           padding: 13px;
           font-size: 14px;
       }

       .input-box label {
           left: 15px;
           font-size: 12px;
       }

       /* Foto */
       .photo-box img {
           width: 110px;
           height: 110px;
       }

       .photo-box span {
           font-size: 12px;
       }

       /* Status */
       .status-box {
           flex-direction: column;
           gap: 15px;
           align-items: flex-start;
       }

       /* Actions */
       .form-actions {
           text-align: center;
       }

       .form-actions button {
           width: 100%;
           padding: 14px;
       }
   }


























































   .customer-permissions-wrapper {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.customer-permission-card {
    background-color: var(--color-fondo-form);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.05);
    transition: all 0.25s ease;
    background-color:var(--color-fondo-body);
    border: solid 1px var(--color-border-form);
}

.customer-permission-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.customer-permission-header {
    font-size: 15px;
    font-weight: 600;
    color:#f70454;
}

.customer-permission-divider {
    height: 1px;
    background-color:var(--color-fondo-header-panel);
    margin: 12px 0 16px 0;
    border-bottom: 1px solid var(--color-border-header-panel);
}

.customer-permission-actions {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    flex-wrap: wrap;
}

.perm-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.perm-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #6b7280;
}















.row-delegated td{
background-color: #f704551a;
border: solid 1px #f70454;
}

.td-owner {
    font-weight: 600;
    color: #e65100;
}

.badge-delegated-msg {
    background: linear-gradient(45deg, #ff9800, #ffb74d);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.badge-delegated-msg:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    color:rgba(50, 205, 50, 0.267)
}

