

@page {
  size: A4;
  font-family: "DejaVu Sans";
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  min-height: 100%;
  background: #e3f2fd;
  font-family: "DejaVu Sans", sans-serif;
}

/* ===== Barra superior ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  height: 50px;
  width: 100%;
  display: flex;
  align-items: center;
  background: #fff;
  box-shadow: 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

nav .logo {
  display: flex;
  align-items: center;
  margin: 0 24px;
}

.logo .menu-icon {
  color: #333;
  font-size: 24px;
  margin-right: 14px;
  cursor: pointer;
}

.logo .logo-name {
  color: #333;
  font-size: 22px;
  font-weight: 500;
}

/* ===== Sidebar lateral ===== */
nav .sidebar {
  position: fixed;
  top: 0;
  left: -260px;
  height: 100%;
  width: 260px;
  padding: 20px 0;
  background-color: #fff;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.1);
  transition: left 0.4s ease;
  z-index: 999;
}

nav.open .sidebar {
  left: 0;
}

.sidebar .sidebar-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  /*height: 100vh;  Altura máxima: alto de la pantalla */
  overflow-y: auto; /* Activa el scroll vertical si es necesario */
  padding: 30px 16px;
}

.sidebar-content .list {
  list-style: none;
}

.list .nav-link {
  display: flex;
  align-items: center;
  margin: 8px 0;
  padding: 14px 12px;
  border-radius: 8px;
  text-decoration: none;
  color: #707070;
}

.list .nav-link:hover {
  background-color: #4070f4;
  color: #fff;
}

.nav-link .icon {
  margin-right: 14px;
  font-size: 20px;
}

.nav-link .link {
  font-size: 16px;
  font-weight: 400;
}

/* ===== Overlay para móviles ===== */
.overlay {
  position: fixed;
  top: 0;
  left: -100%;
  height: 100vh;
  width: 100vw;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
  background: rgba(0, 0, 0, 0.3);
  z-index: 998;
}

nav.open ~ .overlay {
  left: 260px;
  opacity: 1;
  pointer-events: auto;
}








.custom-table {
  border-collapse: separate;
  border-spacing: 10px; /* Espacio entre celdas */
  width: 100%;
  background-color: transparent;
  font-size: 0.95rem;
}

.custom-table thead {
  background-color: transparent;
  color: #6b7280;
  font-weight: 600;
}

.custom-table thead th {
  border: none;
  padding: 0.75rem;
}

.custom-table tbody td {
  border: none;
  padding: 1rem;
  background-color: #f9fafb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease;
}

.custom-table tbody tr:hover td {
  background-color: #f3f4f6;
}

/* Estilos específicos para ocupados y libres */
.custom-table td.bg-success {
  background-color: #d1fae5 !important;
  color: #065f46 !important;
  font-weight: 500;
}

.custom-table td.bg-danger {
  background-color: #fecaca !important;
  color: #991b1b !important;
  font-weight: 500;
}




/* Estilos para tabla compacta */
.custom-table-compact {
    font-size: 0.9rem;
    line-height: 1.3;
}

.custom-table-compact th {
    padding: 0.5rem 0.75rem !important;
    font-weight: 600;
    font-size: 0.85rem;
    background-color: #343a40 !important;
    border-color: #495057 !important;
}

.custom-table-compact td {
    padding: 0.6rem 0.75rem !important;
    vertical-align: middle;
    border-color: #dee2e6;
}

.table-row-compact:hover {
    background-color: #f8f9fa !important;
}

.custom-table-compact .btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.custom-table-compact .btn-sm:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .custom-table-compact {
        font-size: 0.8rem;
    }
    
    .custom-table-compact th,
    .custom-table-compact td {
        padding: 0.3rem 0.5rem !important;
    }
}





/* Estilos para desktop - tabla normal */
.desktop-table {
    display: block;
}

.mobile-cards {
    display: none;
}

/* Estilos para móviles */
@media (max-width: 768px) {
    .desktop-table {
        display: none;
    }
    
    .mobile-cards {
        display: block;
    }
    
    .day-card {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .day-header {
        background: #f8f9fa;
        padding: 12px 16px;
        border-bottom: 1px solid #dee2e6;
        font-weight: 600;
        color: #495057;
    }
    
    .time-slot {
        padding: 12px 16px;
        border-bottom: 1px solid #f1f3f4;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .time-slot:last-child {
        border-bottom: none;
    }
    
    .time-label {
        font-weight: 600;
        color: #6c757d;
        font-size: 0.9rem;
        min-width: 80px;
    }
    
    .appointment-content {
        flex: 1;
        text-align: right;
    }
    
    .available-badge {
        background: #d1edff !important;
        color: #0066cc !important;
        padding: 4px 8px;
        border-radius: 4px;
        font-size: 0.8rem;
        font-weight: 500;
    }
    
    .appointment-btn {
        padding: 6px 12px !important;
        font-size: 0.85rem !important;
        border-radius: 6px !important;
        background: #007bff !important;
        border: none !important;
        color: white !important;
        max-width: 180px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

.btn-appointment {
    background: #007bff;
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* ======= NAVBAR ======= */
body.dark-mode nav {
    background-color: #1e1e2f !important;
    color: #f5f5f5 !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

body.dark-mode nav .logo .menu-icon,
body.dark-mode nav .logo .logo-name {
    color: #f5f5f5 !important;
}

/* ======= SIDEBAR ======= */
body.dark-mode .sidebar {
    background-color: #2c2f3e;
    color: #f5f5f5;
}

body.dark-mode .nav-link {
    color: #f5f5f5;
}

body.dark-mode .nav-link:hover {
    background-color: #444;
    color: #fff;
}


/* ======= MODALS ======= */
body.dark-mode .modal-content {
    background-color: #2c2f3e !important;
    color: #f5f5f5 !important;
}

body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    background-color: #1f2230 !important;
    border-color: #444 !important;
}

body.dark-mode .modal-header .btn-close {
    filter: invert(1);
}


/* ======= TABLAS ======= */
body.dark-mode .custom-table thead {
    background-color: #1f2230;
    color: #f5f5f5;
}

body.dark-mode .custom-table tbody td {
    background-color: #2c2f3e !important;
    color: #f5f5f5;
}

body.dark-mode .custom-table tbody tr:hover td {
    background-color: #3c3f4e !important;
}

/* Compacta también */
body.dark-mode .custom-table-compact th,
body.dark-mode .custom-table-compact td {
    background-color: #2c2f3e !important;
    color: #f5f5f5;
    border-color: #444;
}

/* ======= PAGINACIÓN ======= */
body.dark-mode .pagination .page-link {
    background-color: #2c2f3e !important;
    color: #f5f5f5 !important;
    border-color: #444 !important;
}

body.dark-mode .pagination .page-link:hover {
    background-color: #3c3f4e !important;
    color: #fff;
    border-color: #666;
}

body.dark-mode .pagination .page-item.active .page-link {
    background-color: #444 !important;
    border-color: #666 !important;
    color: #fff !important;
}


/* ====== GENERAL BUTTONS EN OSCURO ====== */
body.dark-mode .btn {
    color: #f5f5f5;
    border-color: #555;
}

body.dark-mode .btn:hover {
    background-color: #444;
}

/* ====== OVERLAY OSCURO ====== */
body.dark-mode .overlay {
    background-color: rgba(0, 0, 0, 0.6);
}
/*terminar de aplicar modo oscuro modal u nav*/

/* Fondo y texto general del modal */
body.dark-mode .modal-content,
body.dark-mode .modal-body,
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
    background-color: #2c2f3e !important;
    color: #f5f5f5 !important;
}

/* Etiquetas, textos pequeños, etc. */
body.dark-mode .modal-content label,
body.dark-mode .modal-content small,
body.dark-mode .modal-content span,
body.dark-mode .modal-content p,
body.dark-mode .modal-content h5,
body.dark-mode .modal-content h6 {
    color: #f5f5f5 !important;
}

/* Inputs, selects, textareas */
body.dark-mode .modal-content input,
body.dark-mode .modal-content select,
body.dark-mode .modal-content textarea {
    background-color: #1e1e2f !important;
    color: #f5f5f5 !important;
    border: 1px solid #555 !important;
}

/* Placeholders */
body.dark-mode .modal-content input::placeholder,
body.dark-mode .modal-content textarea::placeholder {
    color: #ccc !important;
}

/* Botones dentro del modal */
body.dark-mode .modal-content .btn {
    background-color: #444 !important;
    color: #f5f5f5 !important;
    border-color: #555 !important;
}

body.dark-mode .modal-content .btn:hover {
    background-color: #555 !important;
}

/* Cerrar botón */
body.dark-mode .modal-header .btn-close {
    filter: invert(1);
}

/* Links dentro del modal */
body.dark-mode .modal-content a {
    color: #9fc0ff !important;
}
