
*{
  box-sizing: border-box;
}
/* CSS general */
html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* altura mínima completa de la pantalla */
}

main {
    flex: 1; /* ocupa el espacio disponible */
}

/* General */
body {
  font-family: sans-serif;
  background-color: #0c0c0c;
  color: #f0f0f0;
  margin: 0;
  padding: 0;
}
h2 {
    text-align: center !important;
    color: #9b0b0b !important;
}

/* HEADER PRINCIPAL */
header.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #9b0b0b;; /* rojo */
    color: white;
    padding: 10px 20px;
    position: relative;
}

/* Espacio para imagen a la izquierda */
header .logo-space {
    width: 60px; /* ajustable según imagen futura */
    height: 60px;
    background-color: transparent; /* puedes poner un color temporal */
}

/* Título centrado */
header .title-header {
    flex: 1;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
}

/* Botón hamburguesa */
header .hamburger-btn {
    font-size: 28px;
    background: none;
    border: none;
    color: rgb(255, 255, 255);
    cursor: pointer  ;
    z-index: 10;
}

/* Menú overlay */
.fullscreen-menu-header {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 40px;
    z-index: 9999;
}

.fullscreen-menu-header a {
    color: white;
    font-size: 28px;
    text-decoration: none;
    font-weight: bold;
    transition: transform 0.2s;
}

.fullscreen-menu-header a:hover {
    transform: scale(1.1);
}

/* Mostrar menú cuando tenga clase 'show' */
.fullscreen-menu-header.show {
    display: flex;
}


/* pied de pagina*/
.footer {
  background-color: #111;
  color: #ccc;
  padding: 40px 20px 10px;
  font-size: 14px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
width: 100%;   /* 👈 en vez de max-width */
  margin: 0;     /* 👈 importante */
}

.footer-section {
  flex: 1 1 250px;
  margin: 10px;
}

.footer-section h4 {
  color: #fff;
  margin-bottom: 10px;
}

.footer-section p {
  line-height: 1.5;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 8px;
}

.footer-section ul li a {
  color: #ccc;
  text-decoration: none;
}

.footer-section ul li a:hover {
  color: #fff;
}

.social-icons a img {
  width: 24px;
  height: 24px;
  margin-right: 10px;
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid #333;
  padding-top: 10px;
  margin-top: 20px;
  font-size: 12px;
}
.logo-img {
    width: 100%;     /* ocupa todo el ancho del div */
    height: 100%;    /* ocupa todo el alto del div */
    object-fit: contain; /* mantiene proporción, no se deforma */
}
/*dashboard addmin*/
/*====================*/
main {
    flex: 1;
    padding: 20px;
    background-color: #1a1a1a;
    font-family: sans-serif;
}

.admin-section {
    background: #2a2a2a;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.admin-section h3 {
    margin-top: 0;
    color: #e74c3c;
}

.admin-section form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-section input, 
.admin-section select {
    padding: 8px;
    font-size: 16px;
    flex: 1 1 150px;
    background: #333;
    color: #eee;
    border: 1px solid #555;
    border-radius: 4px;
}
.admin-section button {
    padding: 8px 16px;
    background-color: #9b0b0b;
    color: white;
    border: none;
    cursor: pointer;
    border-radius: 5px;
}

.admin-section button:hover {
    background-color: #7a0808;
}

/* Lista gráfica de usuarios */
.user-list {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.user-card {
    background: #333;
    padding: 15px;
    border-radius: 8px;
    flex: 1 1 calc(30% - 15px);
    min-width: 200px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-card h4 {
    margin: 0 0 5px 0;
    color: #f0f0f0;
}

.user-card p {
    margin: 2px 0;
    font-size: 14px;
    color: #ccc;
}

/*dashboard pañol*/
/* Reutilizamos estilos de admin-section y user-card */


button {
    padding: 10px 20px;
    border: none;
    background-color: #9b0b0b;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background-color: #7a0808;
}

.estado-cards {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

/* CONTENIDO PROFESOR */
.prof-dashboard {
    padding: 20px;
}

.prof-header {
    margin-bottom: 20px;
}

.prof-header h1 {
    font-size: 26px;
}

.solicitar-box, .activos-box {
    background: #3f3a3a;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* FORM */
.form-group {
    margin-bottom: 15px;
}

select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    border: 1px solid #530d0d;
    background: #333;
    color: #eee;
}

/* BOTÓN */
button {
    background-color: #9b0b0b;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

button:hover {
    background-color: #7a0808;
}

/* MENSAJE */
#mensaje {
    margin-top: 10px;
    font-weight: bold;
}

/* TABLA */
table {
    width: 100%;
    border-collapse: collapse;
    background: rgb(77, 70, 70);
    border-radius: 5px;
    overflow: hidden;
}

th, td {
    padding: 10px;
    border-bottom: 1px solid #7a2828;
    text-align: center;
}

th {
    background-color: #922020;
    
}
/*pañol*/
/* CONTENEDOR GENERAL */
.panol-container {
    padding: 20px;
}

/* SECCIONES */
.panol-section {
    background: #2a2a2a;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* FORMULARIO */
.panol-form {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.panol-form input,
.panol-form select {
    flex: 1;
    padding: 8px;
}

/* ITEMS */
.panol-item {
    background: #3a3a3a;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #eee;
}
/* 🔥 EVITA QUE ROMPA EL FOOTER */
#historyList, #availableTools, #loansList, #deudoresList {
    max-height: 250px;
    overflow-y: auto;
}

/* 🔥 MEJOR DISTRIBUCIÓN */
.panol-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 🔥 SECCIÓN MÁS ORDENADA */
.panol-section {
    min-height: 200px;
}

/* ========================= */
/* 🧱 FILA DOBLE (clave) */
/* ========================= */

/* ========================= */
/* 📦 CAJAS IGUALES */
/* ========================= */

/* ========================= */
/* 🔥 SIEMPRE EN FILA */
/* ========================= */

.double-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ⚠️ IMPORTANTE: eliminá o comentá el responsive anterior */
/*
@media (max-width: 768px) {
    .double-section {
        grid-template-columns: 1fr;
    }
}
*/

/* ========================= */
/* 📦 MISMA ESTRUCTURA */
/* ========================= */

.box-equal {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* CONTENIDO INTERNO */
.form-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.form-horizontal {
    display: flex;
    flex-direction:flex ;
    gap: 10px;
}
/* SELECT ARRIBA DESTACADO */
.form-vertical select {
    font-weight: bold;
     height: 35px;        /* ↓ altura */
    padding: 5px 10px;   /* ↓ espacio interno */
    font-size: 14px;
}

/* LISTA */
.list-container {
    background: #2a2a2a;
    border-radius: 8px;
    padding: 10px;
    height: 120px;
    overflow-y: auto;
}

footer {
  text-align: center;
  padding: 10px;
  font-size: 14px;
}

footer a {
  text-decoration: none;
  color: inherit;
  font-weight: bold;
}

footer a:hover {
  text-decoration: underline;
}
/* Centrado total de pantalla */
.login-main {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #1a1a1a;
}

/* Caja */
.login-box {
    background: #222;
    padding: 40px;
    width: 320px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
    text-align: center;
}

/* Título */
.login-title {
    color: #e74c3c;
    margin-bottom: 25px;
}

/* Form */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Inputs */
.login-form input {
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #555;
    background-color: #333;
    color: #eee;
    outline: none;
    transition: 0.2s;
}

.login-form input:focus {
    border-color: #cc0000;
    background-color: #444;
}

/* Botón */
.login-btn {
    padding: 12px;
    background-color: #cc0000; /* rojo */
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    transition: 0.3s;
}

.login-btn:hover {
    background-color: #a80000;
}

/* Error */
.login-error {
    color: red;
    margin-top: 10px;
    font-size: 14px;
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
}

.modal-content {
  background: #2a2a2a;
  color: #eee;
  margin: 10% auto;
  padding: 20px;
  width: 400px;
  border-radius: 10px;
}

.modal-content input {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
}

.modal-buttons {
  display: flex;
  justify-content: space-between;
}

.tool-card {
    max-width: 400px;
    margin: 30px auto;
    padding: 25px;
    border-radius: 15px;
    background: #2a2a2a;
    color: #eee;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
}

.tool-card h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #eee;
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tool-form label {
    font-size: 14px;
    color: #ccc;
}

.tool-form select,
.tool-form input {
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #555;
    background: #333;
    color: #eee;
    outline: none;
    transition: border 0.2s;
}

.tool-form select:focus,
.tool-form input:focus {
    border: 1px solid #9b0b0b;
}

#createBtn {
    margin-top: 10px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: #9b0b0b;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
}

#createBtn:hover {
    background: #7a0808;
}

.msg {
    text-align: center;
    font-size: 14px;
    margin-top: 10px;
}

.msg.ok {
    color: green;
}

.msg.error {
    color: red;
}
.archivo-item {
    display: flex;
    align-items: center;
    margin-top: 10px;
    gap: 10px;
}

/* 🔥 NOMBRE CONTROLADO */
.archivo-nombre {
    flex: 1;
    max-width: 300px; /* podés ajustar esto */
    
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BOTONES SIEMPRE A LA DERECHA */
.acciones {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

/* tamaño fijo para que no bailen */
.acciones button {
    width: 110px;
}

/* ========================================= */
/* DOCUMENTOS (carpetas y archivos)          */
/* ========================================= */

.doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.doc-item {
    background: #333;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px 15px;
    text-align: center;
    color: #eee;
    cursor: default;
    transition: all 0.2s ease;
    position: relative;
}

.doc-item:hover {
    border-color: #9b0b0b;
    box-shadow: 0 4px 12px rgba(155, 11, 11, 0.15);
    transform: translateY(-2px);
}

.doc-item.folder {
    cursor: pointer;
}

.doc-item .doc-icon {
    font-size: 2.2rem;
    margin-bottom: 8px;
    line-height: 1;
}

.doc-item .doc-name {
    font-weight: 600;
    display: block;
    word-break: break-word;
    font-size: 0.9rem;
}

.doc-item .doc-actions {
    margin-top: 10px;
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}

.doc-item .doc-actions a,
.doc-item .doc-actions button {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.78rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    color: white;
    transition: background 0.15s;
}

.doc-actions .btn-download {
    background: #27ae60;
}

.doc-actions .btn-download:hover {
    background: #1e8449;
}

.doc-actions .btn-delete {
    background: #e74c3c;
}

.doc-actions .btn-delete:hover {
    background: #c0392b;
}

.empty-folder {
    text-align: center;
    color: #888;
    padding: 30px 0;
    font-style: italic;
}

.form-inline {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================= */
/* RESPONSIVO PARA TODAS LAS PÁGINAS         */
/* ========================================= */
@media (max-width: 768px) {
    /* Cards y destacados */
    .destacado .card {
        flex: 1 1 100% !important;
        max-width: 100% !important;
    }
    
    /* Layouts dobles o grillas */
    .double-section, .grid-especialidades {
        grid-template-columns: 1fr !important;
    }
    
    /* Formularios y elementos en el dashboard */
    .panol-form, .form-horizontal, .admin-section form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .panol-form input, .panol-form select, .admin-section input, .admin-section select {
        width: 100%;
        margin-bottom: 5px;
    }
    
    /* Listas de archivos y pañol items */
    .archivo-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    .acciones {
        justify-content: center;
        margin-left: 0;
        flex-wrap: wrap;
    }
    .acciones button {
        flex: 1;
        width: auto;
    }
    
    .panol-item {
        flex-direction: column;
        align-items: stretch !important;
        gap: 10px;
    }
    
    /* Ajustes generales */
    .login-box {
        width: 90%;
        padding: 20px;
    }
    
    table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    th, td {
        padding: 8px;
    }
    
    .modal-content {
        width: 90%;
        margin: 20% auto;
    }
}