/* Mobile & tablet responsive tweaks */

@media (max-width: 1024px) {
    .navbar-toggle { display:inline-flex; }
    .navbar-menu { display:none; }
    .navbar-menu.drawer { display:flex; }
    .navbar-menu.drawer a { padding:10px 12px; border-radius:6px; }
    .navbar-menu.drawer .navbar-user { margin-top:10px; }
    .dias-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap:6px !important; padding:8px !important; min-height:auto !important; }
    .dia-card { background:#fff; border:1px solid #e5e7eb; border-radius:10px; }
    .dia-card.otro-mes { opacity:0.45; color:#94a3b8; background:#f1f5f9; }
    .dia-card.has-entrevistas { background:linear-gradient(135deg, #2c5282 0%, #1e3a63 100%); color:#fff; border-color:#1e3a63; box-shadow:0 6px 16px rgba(30,58,99,0.25); }
    .dia-card.has-entrevistas .dia-numero { color:#fff; }
}

@media (max-width: 1024px) {
    .navbar .container { padding: 0.75rem 1.25rem; }
    .agenda-header, .page-header { flex-direction: column; align-items: flex-start; }
    .dias-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap:6px !important; padding:8px !important; min-height:auto !important; }
    .tareas-container .flex { flex-direction: column; }
    .tareas-container { padding: 0 10px; }
    .minuta-sheet { padding: 20px 24px; }
    .mobile-summary { display:block; }
    .minuta-table { display: none; }
    .minuta-sheet .btn { width: 100%; justify-content: center; }
}

@media (max-width: 768px) {
    .dias-grid { grid-template-columns: repeat(7, minmax(0, 1fr)) !important; gap:6px !important; padding:6px !important; min-height:auto !important; }
    .agenda-controls { width: 100%; }
    .agenda-controls > * { flex: 1 1 45%; }
    .lider-chips { gap: 6px; }
    .calendario-header { flex-direction: column; align-items: flex-start; }
    .navbar-menu.drawer { width: 240px; }
    #modalEntrevista .modal-content { width: 95%; max-height: 90vh; overflow-y: auto; }
    #modalEntrevista .form-row { flex-direction: column; }
    .entrevista-detail-row { grid-template-columns: 1fr; }
    h1 { font-size: 1.8rem; line-height: 1.2; }
    h2 { font-size: 1.4rem; line-height: 1.25; }

    /* Tablas compactas */
    .table { font-size: 0.95rem; }
    .table th, .table td { padding: 10px 8px; }
    .table-responsive { overflow-x: auto; }

    /* Tablas: mostrar solo lo esencial en móvil */
    .table th:nth-child(n+4):not(:last-child),
    .table td:nth-child(n+4):not(:last-child) { display: none; }
    .table td:last-child { text-align: right; }
}

@media (max-width: 560px) {
    .tareas-container table { font-size: 0.95rem; }
    .tareas-container th, .tareas-container td { padding: 10px 6px; }
    .bitacora-content { padding: 14px; }
    .agenda-container { padding: 12px; }
    .calendario { border-radius:12px; overflow:hidden; }
    .calendario-header { padding:12px 14px; border-radius:12px 12px 0 0; }
    .calendario-nav button { padding:6px 10px; }
    .dias-grid { grid-template-columns: repeat(7, 1fr); gap:5px; padding:8px; min-height:auto; background:#f8fafc; }
    .dia-card { width:100%; padding:4px; border:1px solid #e5e7eb; border-radius:10px; text-align:center; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; aspect-ratio:1/1; background:#fff; min-height:auto; }
    .dia-numero { font-size:0.95rem; display:flex; justify-content:center; align-items:center; color:#1f2937; line-height:1; }
    .dia-card.otro-mes { opacity:0.45; color:#94a3b8; background:#f1f5f9; }
    .dia-card.has-entrevistas { background:linear-gradient(135deg, #2c5282 0%, #1e3a63 100%); color:#fff; border-color:#1e3a63; box-shadow:0 6px 16px rgba(30,58,99,0.25); }
    .dia-card.has-entrevistas .dia-numero { color:#fff; }
    .dia-dot { display:none; }
    .badge-evento { width:10px; height:10px; border-radius:50%; padding:0; margin:0 auto; font-size:0; display:inline-block; }
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }
    .navbar-menu.drawer { width: 85vw; }
}

/* Mobile day list under calendar */
.lista-dia-mobile {
    margin-top: 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
    padding: 12px;
}

.lista-dia-mobile.hidden {
    display: none;
}

.lista-dia-header {
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: capitalize;
}

.lista-dia-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.lista-dia-item {
    border: 1px solid #d9e1ec;
    border-radius: 10px;
    padding: 12px;
    background: linear-gradient(135deg, #f9fbff 0%, #eef3fb 100%);
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.lista-dia-item:active { transform: scale(0.995); box-shadow: 0 3px 9px rgba(0,0,0,0.08); }

.lista-dia-hora {
    font-weight: 700;
    margin-bottom: 4px;
    color: #2c5282;
}

.lista-dia-nombre {
    font-weight: 600;
    margin-bottom: 2px;
    color: #111827;
}

.lista-dia-detalle {
    color: #4b5563;
    font-size: 13px;
}

.lista-dia-empty {
    color: #777;
    text-align: center;
    padding: 14px 0;
}

#calendario-contenido .dia-card.active {
    border-color: #387adf;
    box-shadow: 0 0 0 2px rgba(56, 122, 223, 0.12);
}
