/* ==========================
   RESET Y BODY
========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Segoe UI", Arial, sans-serif;
    background-color: #f4f5f7;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ==========================
   HEADER
========================== */
header {
    background-color: #d96d28; /* modificado a color logo naranja */
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    font-size: 1.8em;
}

header nav a {
    color: white;
    text-decoration: none;
    margin-left: 15px;
    font-weight: bold;
}

header nav a:hover {
    text-decoration: underline;
}

/* ==========================
   BOTÓN HAMBURGUESA
========================== */
#menu-toggle { 
    display: none; 
    font-size: 1.8rem; 
    background: none; 
    border: none; 
    color: white; 
    cursor: pointer; 
    z-index: 1100; /* asegurar que esté sobre el header */
    position: relative; 
}

/* ==========================
   SIDEBAR FIJO
========================== */
.sidebar {
    height: 100vh;
    width: 250px;
    position: fixed;
    top: 80px; /* ajustado según header */
    left: 0;
    background-color: #04337c; /* modificado a color logo azul */
    color: white;
    overflow-y: auto;
    padding-top: 20px;
}

.sidebar a,
.sidebar .btn {
    color: white;
    text-decoration: none;
    display: block;
    padding: 12px;
    text-align: left;
    transition: all 0.2s;
}

.sidebar a:hover,
.sidebar .btn:hover {
    background-color: white;
    color: #04337c !important;
}

/* ==========================
   MAIN DASHBOARD
========================== */
main {
    display: flex;
    flex: 1;
    gap: 20px;
    padding: 20px;
    margin-left: 250px; /* margen para sidebar */
    margin-top: 80px;   /* margen para header */
}

/* Panel izquierdo: Mis Tareas */
.panel-izquierdo {
    flex: 3;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    min-height: 600px;
    overflow-y: auto;
}
.panel-izquierdo h2 {
    margin-bottom: 10px;
    color: #2d3e50;
}

.panel-izquierdo ul li {
    background: #f0f4ff;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;
}

.panel-izquierdo ul li:hover {
    background: #dbe4ff;
}

/* Panel derecho: Documentos y Notificaciones */
.panel-derecho {
    flex: 1;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    min-height: 600px;
    overflow-y: auto;
}

/* ==========================
   TABLAS
========================== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

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

th {
    background-color: #2d3e50;
    color: white;
    font-weight: normal;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #eef2f7;
}

/* ==========================
   BOTONES
========================== */
a.button, button {
    padding: 6px 12px;
    border-radius: 4px;
    background-color: #27ae60;
    color: white;
    text-decoration: none;
    font-size: 0.85em;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

a.button:hover, button:hover {
    background-color: #1e8449;
}

a.button.rechazar {
    background-color: #c0392b;
}

a.button.rechazar:hover {
    background-color: #96281b;
}

/* Botones agrupados */
.tarea-card .btn-group,
.comentario-form .btn-group,
.crear-tarea-container .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tarea-card button,
.comentario-form button,
.crear-tarea-container button,
a.button {
    flex: 1 1 auto; /* se ajustan según espacio disponible */
}

/* ==========================
   ESTADOS DE TAREAS
========================== */
li .estado {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

li .estado.completada {
    background-color: #27ae60;
    color: white;
}

li .estado.pendiente {
    background-color: #f39c12;
    color: white;
}

/* ==========================
   FORMULARIOS
========================== */
form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

input[type="text"], input[type="password"], input[type="email"], textarea, select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    width: 100%;
}

button[type="submit"] {
    width: fit-content;
}

/* ==========================
   NOTIFICACIONES
========================== */
.notificaciones {
    margin-top: 20px;
}

.notificaciones li {
    background-color: #fff3cd;
    border-left: 5px solid #ffeeba;
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
}

/* ==========================
   RESPONSIVE
========================== */
@media (max-width: 900px) {
    main {
        flex-direction: column;
    }

    .panel-izquierdo {
        flex: 1;
    }
}

/* ==========================
   PERFIL
========================== */
.profile-container {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.profile-card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
}

.profile-card h2 {
    margin-bottom: 15px;
}

/* ==========================
   CREAR NUEVA TAREA
========================== */
.crear-tarea-container {
    max-width: 800px;
    margin: 20px auto;
    background: #eaf2fb; /* azul claro tipo dashboard */
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.crear-tarea-container h2 {
    margin-bottom: 20px;
    color: #2d3e50;
}

.crear-tarea-container fieldset {
    border: 1px solid #ccc;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    background: white;
}

.crear-tarea-container legend {
    font-weight: bold;
    padding: 0 10px;
}

.crear-tarea-container input[type="text"],
.crear-tarea-container input[type="file"],
.crear-tarea-container select,
.crear-tarea-container textarea {
    width: 100%;
    padding: 8px 10px;
    margin-top: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.crear-tarea-container button[type="submit"] {
    background-color: #2980b9; /* azul dashboard */
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.crear-tarea-container button[type="submit"]:hover {
    background-color: #1c5980;
}

/* ==========================
   FORMULARIO DE ARCHIVOS
========================== */
.archivo-form {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #d1d9e6;
}

/* ==========================
   COMENTARIOS
========================== */
.comentario-form {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.comentario-form textarea {
    width: 100%;
    min-height: 70px;
    padding: 8px 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    resize: vertical;
}

.comentario-form button {
    margin-top: 10px;
    background-color: #2980b9;
    color: white;
    border-radius: 5px;
    padding: 8px 15px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: 0.2s;
}

.comentario-form button:hover {
    background-color: #1c5980;
}

/* ==========================
   FORM PANEL
========================== */
.form-panel {
    background: #eaf2fb;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #d1e2f3;
    margin-bottom: 15px;
}

.crear-tarea-container {
    background: #eaf2fb;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #d1e2f3;
    margin-bottom: 20px;
}

.crear-tarea-container h2 {
    color: #2d3e50;
}

.comentario-form {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

.comentario-form button {
    margin-top: 10px;
}

/* ==========================
   TARJETA DE TAREAS
========================== */
.tarea-card {
    border: 2px solid #ccc;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
}

/* Pendiente = gris */
.tarea-card.pendiente {
    background-color: #f8f9fa;
    border-color: #adb5bd;
}

/* En espera de GNP = amarillo */
.tarea-card.en-espera {
    background-color: #fff3cd;
    border-color: #ffecb5;
}

/* Completada = verde */
.tarea-card.completada {
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.user-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
}

/* --------------------------
   Estilo para notificaciones
--------------------------- */
#notiList li.list-group-item,
#notiList li.text-muted {
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 4px;
    padding: 8px 12px;
    font-size: 0.9rem;
    line-height: 1.3;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

#notiList li.list-group-item:hover {
    background-color: #e9ecef;
    transform: translateX(2px);
}

#notiList li.list-group-item strong {
    color: #0d6efd;
    font-weight: 600;
    margin-right: 6px;
}

#notiList li.text-muted {
    text-align: center;
    font-style: italic;
    cursor: default;
}

.profile-img {
    width: 100%;
    height: 200px;       /* ajustable según prefieras */
    object-fit: cover;   /* recorta proporcionalmente */
    border-radius: 8px;  /* bordes redondeados, puedes poner 50% para círculo */
}

/* ==========================
   RESPONSIVE CELULAR
========================== */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
        padding: 15px 20px;
        gap: 10px;
    }
    header nav {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    #menu-toggle {
        display: block;
    }
}

    /* Sidebar: fijo arriba como menú colapsable */
    .sidebar {
        position: absolute;
        width: 100%;
        height: auto;
        top: 60px;
        left: 0;
        display: none; /* oculto por defecto */
        z-index: 1050;
    }

    .sidebar.show {
        display: block !important;
    }

    main {
        margin-left: 0;
        margin-top: 0;
        padding: 10px;
        gap: 15px;
    }

    /* Paneles apilados */
    .panel-izquierdo,
    .panel-derecho {
        flex: 1;
        min-height: auto;
    }

    /* Ajuste de tarjetas y listas */
    .panel-izquierdo ul li,
    .tarea-card,
    .crear-tarea-container,
    .comentario-form,
    .profile-card {
        padding: 12px;
        margin-bottom: 15px;
    }

    /* Formularios y botones */
    form input[type="text"],
    form input[type="password"],
    form input[type="email"],
    form select,
    form textarea,
    .crear-tarea-container input[type="text"],
    .crear-tarea-container input[type="file"],
    .crear-tarea-container select,
    .crear-tarea-container textarea,
    .comentario-form textarea {
        font-size: 0.95em;
        padding: 8px;
    }

    button,
    a.button {
        font-size: 0.9em;
        padding: 8px 14px;
    }

    /* Ajuste imagenes de perfil y tarjetas */
    .profile-img,
    .user-card img {
        height: 180px;
    }

    /* Notificaciones */
    #notiList li.list-group-item,
    #notiList li.text-muted {
        font-size: 0.85rem;
        padding: 8px 10px;
    }



.comentario-avatar{
  width:34px;
  height:34px;
  border-radius:50%;
  object-fit:cover;
  border:1px solid rgba(0,0,0,.08);
}
