 :root {
            --primary: #2ECC71;    /* Verde principal */
            --secondary: #FFA500;  /* Naranja secundario */
            --text: #333;          /* Texto oscuro */
			--menu-bg: #ffffff;
			--submenu-bg: #f8f9fa;
			--card-shadow: 0 4px 12px rgba(0,0,0,0.05);
        }
		
		html, body {
		  width: 100%;
		  max-width: 100vw;
		  overflow-x: hidden;
		}

        body {
            font-family: 'Segoe UI', Roboto, sans-serif;
            margin: 0 !important;
            padding: 0 !important;
            background-color: #f9f9f9;
            color: var(--text);
			line-height: normal;
        }

		.body2{
			font-family: 'Segoe UI', Roboto, sans-serif;
            margin: 0;
            padding: 0;
            background-color: #f9f9f9;
            color: var(--text);
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;	
			
		}	
        .login-container {
            width: 100%;
            max-width: 400px;
            padding: 2rem;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
            border-radius: 12px;
            text-align: center;
        }

        .logo2 {
            width: 150px;
            margin-bottom: 0rem;
        }

        h1 {
            color: #2ECC71;
            margin-bottom: 2rem;
            font-weight: 600;
        }

        .input-group {
            margin-bottom: 1rem;
            text-align: left;
			display: flex;
			flex-direction: column;
			align-items: center; 
        }
		
        label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 500;
        }

        input {
            width: 100%;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s;
        }

        input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 2px rgba(46, 204, 113, 0.2);
        }
		
		.input-group label {
			width: 100%; 
			text-align: center; 
		}

		.input-group input {
			max-width: 90%; 
			margin: 0 auto; 
		}
		
		input, textarea, select, .input-estilizado, .textarea-estilizado {
			box-sizing: border-box;
		}
		
        .btn {
            width: 100%;
            padding: 14px;
            border: none;
            border-radius: 8px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
        }

        .btn-primary {
            background-color: var(--primary);
            color: white;
        }

        .btn-primary:hover {
            background-color: #27ae60;
            transform: translateY(-2px);
        }

        .links {
            margin-top: 1.5rem;
            display: flex;
            justify-content: space-between;
        }

        a {
            color: var(--secondary);
            text-decoration: none;
            font-weight: 500;
        }

        a:hover {
            text-decoration: underline;
        }

        @media (max-width: 480px) {
            .login-container {
                padding: 1.5rem;
                margin: 0 1rem;
            }
        }
		
		*,
		*::before,
		*::after {
		  box-sizing: border-box;
		}
		
		
		/* REGISTRO */
		
		.terms-check {
			margin: 1.5rem 0;
			display: flex;
			align-items: center;
			font-size: 14px;
		}

		.terms-check input {
			width: auto;
			margin-right: 8px;
		}
		
		/* INICIO */
		
		.top-nav {
			background: var(--menu-bg);
			box-shadow: 0 2px 10px rgba(0,0,0,0.1);
			position: sticky;
			top: 0;
			z-index: 1000;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		
		.logo {
			height: 50px;
			transition: transform 0.2s;
		}

		.logo:hover {
			transform: scale(1.05);
		}
				
		.nav-container {
			display: flex;
			align-items: center;
			flex-grow: 1;
		}

		/* Menú principal - ESCRITORIO */
		.main-menu {
			display: flex;
			margin: 0 auto;
			padding: 0;
			list-style: none;
		}

		.menu-item {
			position: relative;
		}

		.menu-link {
			display: block;
			padding: 1.2rem 1.5rem;
			color: var(--text);
			text-decoration: none;
			font-weight: 500;
			transition: all 0.3s;
		}

		.menu-link:hover, 
		.menu-link.active {
			color: var(--primary);
			background-color: rgba(46, 204, 113, 0.1);
		}

		/* Submenú */
		.submenu {
			position: absolute;
			left: 0;
			top: 100%;
			width: 250px;
			background: var(--submenu-bg);
			box-shadow: var(--card-shadow);
			border-radius: 0 0 8px 8px;
			opacity: 0;
			visibility: hidden;
			transition: all 0.3s;
			z-index: 100;
			padding: 0;
			list-style: none;
		}

		.menu-item:hover .submenu {
			opacity: 1;
			visibility: visible;
		}

		.submenu-item {
			border-bottom: 1px solid #eee;
		}

		.submenu-link {
			display: block;
			padding: 0.8rem 1.5rem;
			color: var(--text);
			text-decoration: none;
			transition: all 0.2s;
		}

		.submenu-link:hover {
			background-color: rgba(46, 204, 113, 0.1);
			color: var(--primary);
			padding-left: 1.8rem;
		}

		/* User section - ESCRITORIO */
		.user-section {
			display: flex;
			align-items: center;
			gap: 15px;
			margin-left: 20px;
		}

		.user-info {
			text-align: right;
		}

		.user-name {
			font-weight: 600;
			margin-bottom: 3px;
		}

		.user-role {
			font-size: 0.8rem;
			color: #666;
		}

		.logout-btn {
			background: none;
			border: 1px solid #ddd;
			padding: 0.5rem;
			width: 40px;
			height: 40px;
			border-radius: 50%;
			cursor: pointer;
			transition: all 0.3s;
			display: flex;
			align-items: center;
			justify-content: center;
			color: var(--text);
		}

		.logout-btn:hover {
			border-color: var(--primary);
			color: var(--primary);
			background-color: rgba(46, 204, 113, 0.1);
		}

		/* Botón hamburguesa - MOBILE */
		.menu-toggle {
			display: none;
			background: none;
			border: none;
			font-size: 1.5rem;
			cursor: pointer;
			z-index: 1001;
		}

		/* ===== CONTENIDO PRINCIPAL ===== */
		.main-content {
			padding: 2rem 1rem;
			max-width: var(--content-max-width);
			margin: 0 auto;
		}

		.welcome-section {
			margin-bottom: 2rem;
			text-align: center;
		}

		.welcome-title {
			color: var(--primary);
			font-size: 1.8rem;
			margin-bottom: 0.1rem;
		}

		.welcome-subtitle {
			color: #666;
			font-weight: normal;
		}

		.card {
			background: white;
			border-radius: 8px;
			box-shadow: var(--card-shadow);
			padding: 1.5rem;
			margin: 0 auto 1.5rem;
			max-width: 100vw;
		}

		/* ===== TARJETAS Y ACCIONES RÁPIDAS ===== */
		.card-header {
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 1rem;
			padding-bottom: 0.75rem;
			border-bottom: 1px solid #eee;
		}

		.card-title {
			font-size: 1.25rem;
			font-weight: 600;
			color: var(--text);
			margin: 0;
		}

		.urgent-message {
			padding: 1rem;
			margin-bottom: 1rem;
			border-left: 3px solid #e74c3c;
			background-color: #fff9f9;
			display: flex;
			align-items: center;
		}

		.quick-actions {
			display: grid;
			grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
			gap: 1rem;
			max-width: 100%;
		}

		.action-btn {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 8px;
			padding: 12px;
			background-color: var(--primary);
			color: white;
			border: none;
			border-radius: 6px;
			cursor: pointer;
			transition: all 0.2s;
			font-weight: 500;
			text-align: center;
		}

		.action-btn:hover {
			background-color: #27ae60;
			transform: translateY(-2px);
			box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
		}

		.action-btn.secondary {
			background-color: var(--secondary);
		}

		.action-btn.secondary:hover {
			background-color: #e69500;
		}

		.reminder-list {
			padding-left: 0;
			list-style: none;
		}

		.reminder-list li {
			margin-bottom: 0.75rem;
			padding-left: 1.5rem;
			position: relative;
		}

		.reminder-list li::before {
			content: "•";
			color: var(--primary);
			font-weight: bold;
			position: absolute;
			left: 0;
		}

		.mobile-logout-item {
			display: none;
		}



		/* ===== RESPONSIVE ===== */
		@media (max-width: 992px) {
			.menu-toggle {
				display: block;
			}
			
			.nav-container {
				position: fixed;
				top: 70px;
				left: -100%;
				width: 80%;
				height: calc(100vh - 70px);
				background: white;
				flex-direction: column;
				transition: left 0.3s;
				padding: 1rem 0;
				z-index: 1000;
				box-shadow: 5px 0 15px rgba(0,0,0,0.1);
			}
			
			.nav-container.active {
				left: 0;
			}
			
			.main-menu {
				flex-direction: column;
				width: 100%;
			}
			
			.user-section {
				margin-top: auto;
				padding: 1rem 1.5rem;
				border-top: 1px solid #eee;
				width: 100%;
				justify-content: space-between;
			}
			
			.submenu {
				position: static;
				width: 100%;
				display: none;
				box-shadow: none;
			}
			
			.menu-item:hover .submenu,
			.submenu.active {
				display: block;
			}
			
			.mobile-logout-item {
				margin-top: auto; /* Lo empuja al final */
				border-top: 1px solid #eee;
				padding-top: 1rem;
			}
			
			.logout-btn-mobile {
				display: flex;
				align-items: center;
				gap: 10px;
				color: #e74c3c;
				font-weight: 500;
			}
			
			.logout-btn-mobile:hover {
				background-color: rgba(231, 76, 60, 0.1);
			}
			
			/* Oculta el logout de desktop en mobile */
			.user-section .logout-btn {
				display: none !important;
			}
			
			
		}

		/* ===== MEDIA QUERIES ADICIONALES ===== */
		
		@media (max-width: 768px) {
			.quick-actions {
				grid-template-columns: 1fr 1fr;
			}
			
			.card {
				padding: 1rem;
			}
			
			.menu-link {
				padding: 0.8rem 1rem;
			}
		}

		@media (max-width: 576px) {
			.quick-actions {
				grid-template-columns: 1fr;
			}
			
			.action-btn {
				padding: 10px;
			}
			
			.logo {
				height: 40px;
			}
			
			.top-nav {
				width:100%;
			}
			
			.main-content {
				padding: 1rem;
			}
		}


			/* COMUNICACION */
        .tab-content { 
    display: none;
    animation: fadeIn 0.4s;
    margin-top: 0; 
	margin-left:0;
	padding-bottom:0;
	padding-top:0;
	
}
.tab-content.active { 
    display: block; 
	margin-left:0;
}

/* ----- PESTAÑAS ----- */
		.tabs {
            display: flex;
            border-bottom: 1px solid #ddd;
            margin-bottom: 20px;
        }
        
        .tab {
            padding: 10px 20px;
            background: #f8f9fa;
            border: none;
            border-radius: 5px 5px 0 0;
            margin-right: 5px;
            cursor: pointer;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .tab i {
            font-size: 0.9em;
        }
        
        .tab.active {
            background: var(--secondary);
            color: white;
        }
        
        .tab-content {
            display: none;
            animation: fadeIn 0.3s;
        }
        
        .tab-content.active {
            display: block;
        }
        
        @keyframes fadeIn {
            from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
        }

/* ----- LISTA DE MENSAJES (RECIBIDOS) ----- */
.lista-mensajes {
    max-height: 70vh;
    overflow-y: auto;
}

.metadatos {
    text-align: right;
    color: #868e96;
    font-size: 0.8rem;
}

/* ----- TABLA DE ENVIADOS ----- */
.tabla-enviados {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
	 table-layout: fixed;
}

.tabla-enviados th {
    text-align: left;
    padding: 8px 0;
    color: #6c757d;
    font-weight: 500;
    border-bottom: 1px solid #e1e4e8;
}

.tabla-enviados td {
    padding: 8px 0;
    border-bottom: 1px solid #f1f3f5;
    vertical-align: top;
}

.destinatario-cell {
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ----- FORMULARIO (OPCIONAL - mantener si lo usas) ----- */
.form-group {
    margin-bottom: 1rem;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
}

#nuevo form {
    max-width: 100%; /* Elimina el límite de 700px que tenía antes */
}

.btn-enviar {
    background-color: var(--secondary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
}
.mensaje-linea {
    display: grid;
    grid-template-columns: 32px 16px minmax(120px, 1.3fr) minmax(180px, 2.7fr) 92px;
    align-items: center;
    padding: 11px 15px;
    border-bottom: 1px solid #f1f3f5;
    font-size: 0.97rem;
    cursor: pointer;
    transition: background 0.2s;
    background: #fff;
	gap: 9px;
}
.mensaje-linea.no-leido {
    background-color: #f8fafc;
    font-weight: 500;
}
.mensaje-linea:hover {
    background-color: #f6f8fc;
    box-shadow: inset 1px 0 0 #dadce0, inset -1px 0 0 #dadce0;
}
.checkbox input {
    margin: 0;
    cursor: pointer;
}
.estado-lectura {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: transparent;
}
.no-leido .estado-lectura { background: var(--secondary);}

.remitente {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding-right: 10px;
}
.asunto-contenido {
    display: flex;
    min-width: 0;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	align-items: center;
	flex-wrap: nowrap;
}
.asunto {
    font-weight: 600;
    color: #202124;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 7px;
	max-width: 60%;
    display: inline-block;
	min-width: 0;
    max-width: 100%;
}
.preview {
    color: #5f6368;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}
.fecha-adjuntos {
    display: flex;
    justify-content: flex-end;
    font-size: 0.85rem;
    color: #5f6368;
    gap: 8px;
}
.badge.urgent {
    background-color: #fff3bf;
    color: #e67700;
    font-size: 0.7rem;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 8px;
    font-weight: bold;
    display: inline-block;
}
#enviados .remitente {
    color: #5f6368;
    font-weight: 400;
}
#enviados .remitente::before {
    content: "Para: ";
    color: #9aa0a6;
    font-size: 0.85em;
}
#enviados .asunto { font-weight: 500;}
#enviados .fecha-adjuntos {
    justify-content: flex-end;
    gap: 10px;
}
/* Estado de entrega */
.estado-entrega { color: #2b8a3e; font-size: 0.8rem;}
.estado-pendiente { color: #e67700; }

/* ------------------------------ */
/*     MOBILE OPTIMIZACIÓN        */
/* ------------------------------ */
@media (max-width: 600px) {
  .mensaje-linea {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    padding: 10px 6px;
    border-radius: 11px;
    margin-bottom: 10px;
    background: #fff;
    box-shadow: 0 1px 5px rgba(0,0,0,0.04);
    border-bottom: none;
    font-size: 1em;
  }
  .checkbox {
    align-self: flex-start;
    margin-bottom: 3px;
  }
  .estado-lectura,
  .preview {
    display: none !important;
  }
  .remitente {
    font-weight: 500;
    color: #2d8bd6;
    font-size: 0.99em;
    margin-bottom: 0;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    padding: 0;
  }
  .asunto-contenido {
    display: block;
    font-weight: 600;
    color: #202124;
    margin-bottom: 2px;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 1em;
    min-width: 0;
    overflow: visible;
    text-overflow: unset;
  }
  .asunto {
    display: block;
    font-weight: 600;
    margin-bottom: 1px;
    color: #202124;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }
  .fecha-adjuntos {
    font-size: 0.87em;
    color: #888;
    margin-top: 0;
    justify-content: flex-end;
    align-self: flex-end;
    display: flex;
    gap: 6px;
  }
  #enviados .remitente::before {
    content: "Para: ";
    color: #9aa0a6;
    font-size: 0.94em;
    font-weight: 400;
  }
}

	.tab-content, .contenido-dinamico {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    min-height: 0 !important;
}

.tab-content > h2, .tab-content > h1 {
    margin-bottom: 10px !important;
    margin-top: 0 !important;
}

@media (max-width: 700px) {
    .tab-content, .contenido-dinamico, .contenedor-comunicacion {
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
    }
}

.tab-content:empty {
    min-height: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

html, body {
    height: auto !important;
    min-height: 0 !important;
    overflow-x: hidden;
}
.contenedor-comunicacion,
.contenido-dinamico,
.tab-content {
    min-height: 0 !important;
    height: auto !important;
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}
@media (min-width: 700px) {
    .contenedor-comunicacion,
    .contenido-dinamico,
    .tab-content {
        min-height: 0 !important;
        height: auto !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.contenedor-comunicacion {
	max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
    box-sizing: border-box;
}
footer {
    flex-shrink: 0;
}




/* REDACTAR */
.formulario-mensaje {
            max-width: 500px;
			width:100%;
            background: #fff;
			margin: 0 auto;
			padding: 20px 18px;
			box-sizing: border-box;
            border-radius: 12px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.08);
        }
        
        .estilo-gmail {
            margin-bottom: 25px;
            position: relative;
        }
        
        .label-con-icono {
            display: flex;
            align-items: center;
            gap: 10px;
            color: #5f6368;
            font-weight: 500;
            margin-bottom: 8px;
        }
        
        .icono-naranja {
            color: var(--secondary);
            font-size: 1.1rem;
        }
        
        .select-container {
            position: relative;
        }
        
        .select-estilizado {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #dadce0;
            border-radius: 8px;
            background-color: #fff;
            appearance: none;
            transition: border 0.2s;
            min-height: 46px;
        }
        
        .select-estilizado:focus {
            border-color: var(--secondary);
            outline: none;
            box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
        }
        
        .select-arrow {
            position: absolute;
            right: 15px;
            top: 50%;
            transform: translateY(-50%);
            pointer-events: none;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 5px solid #5f6368;
        }
        
        .input-estilizado, .textarea-estilizado {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid #dadce0;
            border-radius: 8px;
            font-family: inherit;
            transition: border 0.2s;
			display:block;
			margin:0;
			box-sizing: border-box;
        }
        
        .input-estilizado:focus, .textarea-estilizado:focus {
            border-color: var(--secondary);
            outline: none;
            box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.2);
        }
        
        .textarea-estilizado {
            min-height: 200px;
            resize: vertical;
        }
        
        .adjuntos-container {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .input-archivo {
            display: none;
        }
        
        .btn-adjuntar {
            padding: 10px 16px;
            background-color: #f8f9fa;
            border: 1px solid #dadce0;
            border-radius: 6px;
            color: #5f6368;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-adjuntar:hover {
            background-color: #f1f3f4;
            border-color: #c4c7c9;
        }
        
        .nombres-archivos {
            font-size: 0.85rem;
            color: #5f6368;
            line-height: 1.4;
        }
        
        .botones-accion {
            display: flex;
            gap: 12px;
            margin-top: 25px;
        }
        
        .btn-secundario {
            padding: 12px 24px;
            background: #f8f9fa;
            border: 1px solid #e1e4e8;
            border-radius: 6px;
            color: #5f6368;
            cursor: pointer;
            transition: all 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        
        .btn-secundario:hover {
            background: #e9ecef;
            border-color: #d4d8dd;
        }
        
        .btn-enviar2 {
            padding: 12px 24px;
            background: var(--secondary);
            border: none;
            border-radius: 6px;
            color: white;
            font-weight: 500;
            cursor: pointer;
            transition: background 0.2s;
            display: inline-flex;
            align-items: center;
            gap: 10px;
        }
        
        .btn-enviar2:hover {
            background: #ea580c;
        }
        
        .optgroup-estilizado {
            font-weight: 500;
            color: #5f6368;
            padding: 5px 0;
        }
        
        .optgroup-estilizado option {
            font-weight: 400;
            padding: 8px 15px;
        }
        
        .select-estilizado[multiple] option {
            padding: 8px 12px;
            border-bottom: 1px solid #f1f3f5;
        }
        
        .select-estilizado[multiple] option:checked {
            background-color: #fff3e8;
            color: var(--secondary);
        }
		
		/* Modal de mensaje completo */
.modal-mensaje {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    align-items: center;
    justify-content: center;
	cursor: pointer;
}

.modal-contenido {
    background: white;
    width: 70%;
    max-width: 800px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
	cursor: default;
}

.modal-header {
	position:relative;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-metadata {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    color: #666;
    font-size: 0.9em;
}

.modal-body {
    padding: 20px 24px 16px 24px;
    overflow-y: auto;
    flex-grow: 1;
    line-height: 1.6;
	flex: 1 1 auto;
	min-height: 0;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

.cerrar-modal {
    position: absolute;
    right: 16px;
    top: 14px;
    background: none;
    border: none;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    color: #fff;
	z-index: 11;
	width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
	transition: background .15s, color .13s;
	box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.btn-respuesta {
    padding: 8px 15px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-eliminar {
    padding: 8px 15px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
}

/* Estilos específicos para modal de enviados */
#enviado-estado {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 0;
}

.badge-entregado {
    background-color: #ebfbee;
    color: #2b8a3e;
	padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 0px;
}

.badge-pendiente {
    background-color: #fff3bf;
    color: #e67700;
	padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 500;
    margin-left: 10px;
}

.modal-footer {
    justify-content: space-between;
}

.btn-accion{
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
	font-weight: 500;
	color: white;
	background-color: var(--primary);
}

.btn-accion:hover {
   background-color: #f59f00; 
    filter: brightness(1.1); 
    transform: translateY(-1px); 
}
}

.btn-accion i {
    font-size: 0.9em;
}

/* Pestañas verticales izquierdas */
.tabs-vertical {
    width: 180px;
    padding: 20px 10px;
    background: #f8f9fa;
    border-right: 1px solid #e1e4e8;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pestana {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s;
    gap: 10px;
    color: #555;
    border-left: 4px solid transparent;
}

.pestana:hover {
    background: #e9ecef;
    border-left: 4px solid var(--secondary);
    color: #333;
}

.pestana.active {
    background-color: var(--secondary) !important;
    color: white !important;
    font-weight: 500;
    border-left: 4px solid darken(var(--secondary), 10%) !important;
}

.pestana i {
    width: 20px;
    text-align: center;
}

.contenido-principal {
    flex: 1;
    padding: 20px 30px;
}


/* Contenedor de pestañas */
.contenedor-pestanas {
    width: 200px;
    background: #f8f9fa;
    border-right: 1px solid #ddd;
    padding: 20px 0;
    position: sticky;
    top: 0; 
    height: calc(100vh - 350px);
    overflow-y: auto;
}

.contenido-dinamico {
    flex: 1;
    padding: 0 2px;
    margin: 0; 
    position: relative;
    z-index: 1;
    background: none;
}

@media (max-width: 540px) {
    .contenedor-comunicacion {
        flex-direction: column;
		padding: 8px 8px;
		max-width: 100vw;
		box-sizing: border-box;
        min-width: 0;
    }
    .contenedor-pestanas {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid #ddd;
        padding: 0;
        gap: 0;
        display: flex;
        position: static;
        height: auto;
        overflow-x: auto;
    }
    .pestana {
        flex: 1;
        border-radius: 0;
        border-left: none;
        border-bottom: 4px solid transparent;
        justify-content: center;
        padding: 12px 0;
        font-size: 1em;
        min-width: 0;
    }
    .pestana.active {
        border-bottom: 4px solid var(--secondary) !important;
        background: #fff8e1 !important;
        color: #FFA500 !important;
        border-left: none !important;
    }
    .contenido-dinamico {
		width:100%;
		min-height: calc(100vh - 180px); /* Solo mobile */
		padding: 8px 0;
    }
	
	.formulario-mensaje {
     max-width: 99vw;     
    padding: 12px 2vw;    
    border-radius: 12px;
  }
  
  
}

/* ----- CONTENEDOR PRINCIPAL ----- */
.contenedor-comunicacion {
    display: flex;
    align-items: flex-start;
	flex-wrap: nowrap;
	position: relative;
	margin:0;
	width: 100%;
	
}

.contenedor-principal { 
    flex: 1;
    display: flex;
    position: relative;
}

footer {
    flex-shrink: 0; 
}

.tabla-container {
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* ==================== */
/* ESTUDIANTES */
/* ==================== */
.herramientas-estudiantes {
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
}

.search-box {
    position: relative;
    flex-grow: 1;
    max-width: 200px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.input-search {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border: 1px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s;
}

.input-search:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.filtros-derecha {
    display: flex;
    gap: 10px;
    align-items: center;
}

.select-filtro {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    cursor: pointer;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: #f0f0f0;
    border: none;
    cursor: pointer;
}

/* ==================== */
/* ESTILOS DE TABLA */
/* ==================== */
.tabla-estudiantes {
    width: 100%;
    border-collapse: collapse;
}

.tabla-estudiantes th {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 2px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
    font-weight: 600;
}

.tabla-estudiantes td {
    padding: 12px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.tabla-estudiantes tbody tr:hover {
    background-color: rgba(46, 204, 113, 0.05);
    transition: all 0.2s;
}

/* ==================== */
/* ELEMENTOS DE FILA */
/* ==================== */
.avatar-tabla {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.nombre-completo {
    font-weight: 500;
}

.contacto-tutor {
    font-size: 0.85em;
    color: #666;
}

/* ==================== */
/* ACCIONES/BOTONES */
/* ==================== */
.acciones-tabla {
    display: flex;
    gap: 8px;
    justify-content: center;
}

.acciones-tabla button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acciones-tabla button:hover {
    transform: scale(1.1);
}

.acciones-tabla .btn-ver-est {
    color: #3498db;
    background-color: #e3f2fd;
}

.acciones-tabla .btn-contactar-est {
    color: #2ecc71;
    background-color: #e8f5e9;
}

.acciones-tabla .btn-eliminar-est {
    color: #e74c3c;
    background-color: #ffebee;
}
.formulario-agregar {
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.titulo-formulario {
    color: #2c3e50;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.subtitulo-seccion {
    color: #3498db;
    margin: 25px 0 15px 0;
    font-size: 1.1em;
}

/* Grid principal */
.grid-datos {
    display: flex;
    gap: 30px;
}

.columna-foto {
    flex: 0 0 200px;
}

.columna-datos {
    flex: 1;
}

/* Foto de perfil */
.avatar-upload-grande {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview-grande {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 3px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s;
}

.avatar-preview-grande:hover {
    border-color: #3498db;
}

.avatar-default-grande {
    text-align: center;
    color: #ccc;
}

.avatar-default-grande i {
    font-size: 60px;
    display: block;
    margin-bottom: 10px;
}

.avatar-default-grande span {
    font-size: 14px;
    color: #777;
}

.btn-subir-foto {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    font-size: 14px;
    transition: all 0.3s;
    border: none;
}

.btn-subir-foto:hover {
    background: #2980b9;
}

/* Estructuras de formulario */
.form-doble-columna {
    display: flex;
    gap: 50px;
}

.form-doble-columna .form-group {
    flex: 1;
}

.form-tres-columnas {
    display: flex;
    gap: 15px;
}

.form-tres-columnas .form-group {
    flex: 1;
}

.seccion-formulario {
    margin-bottom: 30px;
}

/* Elementos de formulario */
.form-group1 {
    margin-bottom: 15px;
}

.form-group1 label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #555;
}

.form-control1 {
    width: 100%;
    padding: 12px 15px;   
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s;
    box-sizing: border-box;
	min-width: 0;         
    max-width: 100%;
}

.form-control1:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(46,204,113,0.1);
    outline: none;
}

.textarea.form-control1 {
    min-height: 80px;
    resize: vertical;
}

#modal-nombre-est {
    font-weight: 400 !important;
}

/* Botones */
.form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.btn-cancelar {
    padding: 12px 20px;
    background: #f1f1f1;
    color: #555;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-cancelar:hover {
    background: #e0e0e0;
}

.btn-guardar {
    padding: 12px 20px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-guardar:hover {
    background: #27ae60;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-datos {
        flex-direction: column;
    }
    
    .form-doble-columna,
    .form-tres-columnas {
        flex-direction: column;
        gap: 15px;
    }
    
    .columna-foto {
        margin-bottom: 20px;
    }
}

.seccion{
	display: flex; 
	gap: 6px; 
	justify-content: center; 
	margin-bottom: 0.5rem; 
	flex-wrap: wrap; 
	align-items: center;
}

.seccion-activa{
	background: var(--secondary); 
	color: white; 
	padding: 4px 12px; 
	border-radius: 16px; 
	font-weight: 600; 
	font-size: 0.95rem;
}

.subtitle1 {
			color: #666;
			font-weight: normal;
			font-weight: 400; 
			font-size: 0.95rem;
			margin-top: 0.5rem;
		}


/* AGREGAR ESTUDIANTE */		
		
.formulario-completo {
    padding: 25px;
    margin-bottom: 30px;
}

.breadcrumb {
    margin-bottom: 15px;
    font-size: 0.9em;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.seccion-formulario {
    margin-bottom: 0px;
    padding-bottom: 0px;
	border-bottom: none;
}

.subtitulo-seccion {
    color: var(--primary);
    margin-bottom: 20px;
    font-size: 1.2em;
}

.subtitulo-seccion.con-icono {
    display: flex;
    align-items: center;
    gap: 10px;
}

.grid-formulario {
    display: flex;
    gap: 30px;
}

.columna-foto1 {
    flex: 0 0 200px;
}

.columna-datos1 {
    flex: 1;
}

/* Estilos para el upload de foto */
.avatar-upload1 {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.avatar-preview1 {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: #f8f9fa;
    border: 2px dashed #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar-preview1 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-default1 {
	background-image: url('../images/fotoest.png');
    background-size: cover;
    background-position: center;
    width: 100%;
    height: 100%;
    display: block;
}

.avatar-default1 i {
    display: none;
}

.btn-subir-foto1 {
    padding: 5px 14px;
    background: var(--primary);
    color: white;
    cursor: pointer;
	display: inline-block;
    font-size: 0.95rem;
    border-radius: 18px;
    border: 1px solid #bdbdbd;
    white-space: nowrap;
    margin-top: 8px;
    margin-bottom: 0;
    transition: background 0.2s;
    max-width: 140px; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-subir-foto1:hover {
    background: #2e86c1;
}

.btn-guardar-cambios2 {
    padding: 8px 15px;
    background: var(--secondary);
    color: white;
    cursor: pointer;
	display: inline-block;
    font-size: 0.95rem;
    border-radius: 5px;
    border: none;
    white-space: nowrap;
    margin-top: 8px;
    margin-bottom: 0;
    transition: background 0.2s;
    max-width: 200px; 
    overflow: hidden;
        }
        .btn-guardar-cambios2:hover {
            background: #ea9605;
            transform: translateY(-2px) scale(1.04);
        }

.input-file {
    display: none;
}

/* Estructuras de formulario */
.form-doble-columna1 {
    display: flex;
    gap: 20px;
}

.form-group2 {
    margin-bottom: 25px; 
    padding-right: 15px;
}

.form-doble-columna1 .form-group2 {
    flex: 1 1 0;
	min-width: 0;
}

.form-tres-columnas1 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Pie del formulario */
.form-footer1 {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-formulario {
        flex-direction: column;
    }
    
    .form-doble-columna1,
    .form-tres-columnas1 {
        grid-template-columns: 1fr;
    }
}

.form-doble-columna1 .form-group2:last-child,
.form-tres-columnas1 .form-group2:last-child {
    padding-right: 0 !important;
}

 .acciones-tabla .btn-tooltip {
        position: relative;
        overflow: visible;
    }
    .acciones-tabla .btn-tooltip .custom-tooltip {
        opacity: 0;
        pointer-events: none;
        position: absolute;
        bottom: 110%;
        left: 50%;
        transform: translateX(-50%);
        background: #333;
        color: #fff;
        border-radius: 5px;
        padding: 4px 10px;
        font-size: 0.85em;
        white-space: nowrap;
        transition: opacity .18s, transform .18s;
        z-index: 10;
        font-weight: 400;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    .acciones-tabla .btn-tooltip:hover .custom-tooltip,
    .acciones-tabla .btn-tooltip:focus .custom-tooltip {
        opacity: 1;
        pointer-events: auto;
        transform: translateX(-50%) translateY(-5px) scale(1.04);
    }
    /* Botón agregar estudiante */
    .btn-agregar-mini {
        padding: 7px 12px;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 18px;
        margin-left: 8px;
        font-size: 1em;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        transition: background .2s, box-shadow .2s, transform .15s;
        box-shadow: 0 2px 7px rgba(46,204,113,.08);
    }
    .btn-agregar-mini:hover {
        background: #27ae60;
        transform: translateY(-2px) scale(1.07);
    }
    /* Pequeñas animaciones en acciones */
    .acciones-tabla button {
        transition: background .18s, color .18s, transform .18s;
    }
    .acciones-tabla button:hover {
        transform: scale(1.11) rotate(-6deg);
        filter: brightness(1.10);
    }
    /* Modal estilos extra */
    .modal-mensaje {
        display: none;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0,0,0,0.6);
        justify-content: center;
        align-items: center;
        z-index: 2000;
    }
    .modal-mensaje.show {
        display: flex;
        animation: fadeIn .25s;
    }
    @keyframes fadeIn {
        from { opacity: 0; } to { opacity: 1; }
    }
    .modal-contenido {
        background: #fff;
        border-radius: 15px;
        max-width: 430px;
        width: 97vw;
        box-shadow: 0 6px 32px rgba(46,204,113,.13);
        padding: 0;
        overflow: hidden;
        animation: zoomIn .22s;
    }
    @keyframes zoomIn {
        from { transform: scale(.9);}
        to { transform: scale(1);}
    }
    .modal-header {
        padding: 20px 24px 10px 24px;
        background: var(--primary);
        color: #fff;
    }
    .modal-body {
        padding: 20px 24px 16px 24px;
    }
    .cerrar-modal {
        position: absolute;
        right: 12px;
        top: 12px;
        font-size: 1.5em;
        color: #fff;
        background: none;
        border: none;
        cursor: pointer;
        z-index: 10;
    }
    /* Responsive */
    
	@media (max-width: 600px) {
    .herramientas-estudiantes {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
        padding: 6px 0;
    }
    .search-box {
        max-width: 50%;
    }
    .filtros-derecha {
        justify-content: flex-start;
        gap: 7px;
        width: 100%;
    }
    .btn-icon,
    .btn-agregar-mini {
        min-width: 36px;
        width: 36px;
        height: 36px;
        font-size: 1em;
        padding: 0;
        justify-content: center;
    }
    .select-filtro {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
	
	.tabla-container {
        overflow-x: auto;
        padding: 8px 0;
    }
    .tabla-estudiantes {
        min-width: 430px; 
        font-size: 0.93em;
    }
	
	.acciones-tabla {
        gap: 4px;
    }
    .acciones-tabla button {
        min-width: 32px;
        min-height: 32px;
        font-size: 1.07em;
    }
}
	
	@media (max-width: 430px) {
    .modal-body {
        padding: 12px 6px !important;
    }
    
}

@media (max-width:600px) {
    .modal-header {
        border-radius: 0;
        padding-left: 0;
        padding-right: 0;
    }
    .modal-contenido {
        width:90vw !important;
		max-width: 380px !important;
		min-width: 0 !important;
		border-radius: 14px !important;
		margin: 0 !important;
		padding: 0 !important;
		left: 0 !important;
		right: 0 !important;
		margin-top: 20px !important;
        margin-bottom: 20px !important;
		margin-left: auto;
        margin-right: auto;
		max-height:87vh;
		box-shadow: 0 6px 32px rgba(0,0,0,0.16) !important;
    }
	
	.modal-footer .btn-accion,
    .modal-footer .btn-respuesta,
    .modal-footer .btn-eliminar {
        min-width: 36px;
        width: 36px;
        height: 36px;
        padding: 0 !important;
        font-size: 1.15em;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        /* ¡Extra! Redondeados si te gusta: */
        border-radius: 50%;
        /* Centrar icono */
    }
    .modal-footer .btn-accion i,
    .modal-footer .btn-respuesta i,
    .modal-footer .btn-eliminar i {
        margin: 0;
        font-size: 1.2em;
}

.modal-footer .btn-accion span,
    .modal-footer .btn-respuesta span,
    .modal-footer .btn-eliminar span {
        display: none !important;
    }
    /* O, más universal: */
    .modal-footer .btn-accion,
    .modal-footer .btn-respuesta,
    .modal-footer .btn-eliminar {
        /* Oculta cualquier texto que NO esté en <i> */
        text-indent: -9999px;
        overflow: hidden;
        position: relative;
    }
    .modal-footer .btn-accion i,
    .modal-footer .btn-respuesta i,
    .modal-footer .btn-eliminar i {
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        text-indent: 0;
        overflow: visible;
    }
	
}	


@media (max-width: 600px) {
    .formulario-completo.card {
        padding: 10px 5vw 15px 5vw;
        margin: 0 0 25px 0;
        border-radius: 13px;
        box-shadow: 0 3px 20px rgba(34,197,94,.07);
        width: 98vw;
        max-width: 99vw;
    }
    .grid-formulario, .form-doble-columna1 {
        flex-direction: column !important;
        gap: 30px !important;
    }
    .columna-foto1, .columna-datos1 {
        width: 100%;
        min-width: 0;
        margin-bottom: 14px;
    }
    .avatar-preview1 {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 13px auto;
    }
    .btn-subir-foto1 {
        font-size: 0.99em;
        padding: 9px 11px;
        width: 100%;
        justify-content: center;
    }
    .form-footer1 {
        flex-direction: column;
        gap: 9px;
        align-items: stretch;
    }
    .btn-cancelar, .btn-enviar2 {
        width: 100%;
        font-size: 1em;
        padding: 15px 0;
		display: inline-flex;
		align-items: center;             /* alinea verticalmente */
		justify-content: center;         /* centra horizontalmente */
		gap: 8px;  
    }
	
	.form-control11,
	input.form-control11,
	select.form-control11,
	textarea.form-control11 {
		  width: 100% !important;
		  max-width: 100% !important;
		  box-sizing: border-box !important;
		  padding: 12px 15px !important;
		  font-size: 16px !important;
		  border-radius: 8px !important;
		  min-width: 0;
}

	select.form-control11 {
	  min-height: 46px !important;
	  line-height: 1.25 !important;
	  -webkit-appearance: none;
	  -moz-appearance: none;
	  appearance: none;
	  padding-right: 42px !important;
	}

	/* Textarea: más alto por defecto en desktop */
	textarea.form-control11 {
	  min-height: 110px !important;     
	  resize: vertical;
	}

	.subtitulo-seccion {
        font-size: 1em;
        gap: 6px;
    }
    .subtitulo-seccion i {
        font-size: 1em;
    }
	
	 .avatar-preview1 {
        width: 105px;
        height: 105px;
        border-width: 1.5px;
    }
    .avatar-default1 i {
        font-size: 46px !important;
    }
}


 /* COMUNICACION */
	
	.calificaciones-card {
    background: #fff;
    max-width: 600px;
    margin: 0 auto 0 auto;
    padding: 30px 18px 24px 18px;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(46,204,113,0.07);
    position: relative;
	width:100%;
	box-sizing: border-box;
}


.tabs-periodos {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.tab-periodo {
    padding: 8px 18px;
    border: none;
    border-radius: 22px 22px 0 0;
    background: #f7f7f7;
    color: #333;
    font-weight: 500;
    cursor: pointer;
    font-size: 1em;
    border-bottom: 3px solid transparent;
    transition: background .2s, color .2s, border-bottom .18s;
    outline: none;
}
.tab-periodo.active {
    background: #FFA500;
    color: #fff;
    border-bottom: 3px solid #2ECC71;
}
.btn-configurar-criterios {
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 22px;
    padding: 8px 20px;
    font-size: 1em;
    font-weight: 500;
    margin-left: auto;
    margin-bottom: 14px;
    cursor: pointer;
    transition: background .2s, transform .12s;
    display: flex; align-items: center; gap:7px;
}
.btn-configurar-criterios:hover {
    background: #1cba57;
    transform: translateY(-2px) scale(1.04);
}
.tabla-notas {
    overflow-x: auto;
	width: 100%;
}
.tabla-notas table, .tabla-notas-main {
    border-collapse: collapse;
    width: max-content;
    min-width: 0;
}
.tabla-notas th, .tabla-notas td {
    padding: 8px 10px;
    border-bottom: 1px solid #e6e8ee;
    text-align: center;
    vertical-align: middle;
}
.tabla-notas th:first-child, .tabla-notas td:first-child {
    text-align: left;
    min-width: 140px;
}
.tabla-notas th {
    background: #f8faf6;
    color: #18a561;
    font-weight: 600;
}
.tabla-notas tbody tr:hover {
    background: #f8fafc;
}

.tabla-scroll {
    overflow-x: auto;
    width: 100%;
	overflow-y: hidden;
	padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
	max-width: 100%;
}


.tabla-scroll::-webkit-scrollbar {
    height: 6px;
}
.tabla-scroll::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.nota-read {
    background:#f8f9fa;
    border-radius:8px;
    padding:5px 10px;
    display:inline-block;
    min-width: 33px;
    font-weight: 500;
    color: #262626;
    letter-spacing: .3px;
    font-size: 1em;
}
.btn-agregar-mini {
    background: #2ecc71;
    color:#fff;
    border:none;
    border-radius:20px;
    padding:7px 16px;
    font-size:1em;
    cursor:pointer;
    transition: background .14s;
}
.btn-agregar-mini:hover {
    background: #1cba57;
}
.btn-envio-mini {
    background: #FFA500;
    color: #fff;
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 1em;
    cursor: pointer;
}
.btn-envio-mini.btn-secundario {
    background: #f5f5f5;
    color: #FFA500;
    border: 1px solid #FFA500;
}
@media (max-width: 700px) {
    .calificaciones-card {padding: 10px 2vw;}
    .tabla-notas table, .tabla-notas-main {min-width: 100%;}
    .tab-periodo {font-size: .95em;}
	.tabla-scroll {display: block; margin-left: 0; margin-right: 0; padding-left: 8px; padding-right: 8px;
    }
}

/* Botón guardar modal criterios */
#form-criterios .btn-guardar-criterios {
    background: #2ECC71;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size: 1em;
    font-weight: 500;
    transition: background .15s, transform .12s;
    cursor: pointer;
    margin-right: 7px;
    margin-top: 10px;
    float: right;
}
#form-criterios .btn-guardar-criterios:hover {
    background: #1cba57;
    transform:scale(1.04);
}
#form-criterios .form-footer1 {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}
.no-spin::-webkit-inner-spin-button,
.no-spin::-webkit-outer-spin-button {
    -webkit-appearance: none !important;
    margin: 0;
}
.no-spin {
    -moz-appearance: textfield;
}
/* Modal close button (dentro del modal) */
.botón-cerrar {
    position: absolute;
    right: 12px;
    top: 14px;
    font-size: 1.6em;
    color: #FFA500;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 33px; height: 33px;
    display: flex; align-items: center; justify-content: center;
    z-index: 1;
    transition: background .15s, color .13s;
}
.modal:hover {
    background: #ffe6b3;
    color: #d67c00;
}
#btn-descargar-pdf {
    background: #FFA500 !important;
    color: #fff !important;
    border-radius: 8px !important;
	min-width: 65px !important;
    height: 38px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(255,165,0,0.13) !important;
    font-size: 1em !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background .2s, transform .13s;
	padding: 0 10px !important;
	gap: 7px;
    cursor: pointer;
	width: auto !important;
}
#btn-descargar-pdf i {
    font-size: 1.1em !important;
}
#btn-descargar-pdf:hover {
    background: #e69500 !important;
    transform: translateY(-2px) scale(1.03);
}
#btn-descargar-pdf .custom-tooltip {
    left: 60% !important;
}
/* Más espacio entre filas en la tabla de ver notas */
#modal-boleta-body tr td, #modal-boleta-body tr th {
    padding-top: 11px !important;
    padding-bottom: 11px !important;
}
.modal-content {
    position: relative; /* Muy importante para ubicar .cerrar-modal */
}
.cerrar-modal:hover {
    background: #e69500;
    color: #fff;
}
input[type=number].no-spin::-webkit-outer-spin-button,
input[type=number].no-spin::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type=number].no-spin {
    -moz-appearance: textfield;
}


/* === MODALES === */
.modal,
.modal-criterios,
.modal-boleta {
    display: none !important; /* Se muestra con JS al activar */
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    width: 100vw !important; 
	height: 100vh !important;
    background: rgba(0,0,0,0.55) !important; 
    z-index: 9999 !important;
    justify-content: center!important;
    align-items: center!important;
    overflow-y: auto!important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}


/* Al mostrar el modal (ejemplo: .modal.show { display: flex; }) */
.modal[style*="display: flex"],
.modal-criterios[style*="display: flex"],
.modal-boleta[style*="display: flex"] {
    display: flex !important;
}

/* === MODAL CONTENT: caja blanca, bordes, responsive === */
.modal-content,
.modal-criterios-content,
.modal-boleta-content,
.modal-editar-content {
    background: #fff;
    border-radius: 13px;
    box-shadow: 0 8px 40px rgba(46,204,113,0.08), 0 1.5px 8px rgba(0,0,0,0.09);    
    width: 100%;
    padding-left: 0;
	padding-right: 0;
    position: relative;
    font-size: 1em;
	max-width: 440px;
	margin: 0 auto;
	margin-left: auto;
	margin-right: auto;
	box-sizing: border-box;
}


/* === HEADER de ambos modales === */
.modal-header,
.modal-criterios-header,
.boleta-header {
    background: #2ecc71;
    color: #fff;
    padding: 18px 24px 10px 24px;
    border-radius: 13px 13px 0 0;
    margin-bottom: 0;
	font-size:1em;
}

.boleta-header {
    padding: 18px 20px 10px 20px;
}

.modal-title,
.modal-header h3,
.modal-criterios-header h3 {
    font-size: 1em;
    font-weight: 500;
    margin: 0;
    color: #fff;
    letter-spacing: 0.01em;
	width: 100%;
}

/* === CUERPO de ambos modales === */
.modal-body,
.modal-criterios-body,
.modal-boleta-body {
    padding: 10px 9px 4px 9px;
    color: #333;
    line-height: 1.45;
}

.modal-body,
.modal-criterios-body,
.modal-boleta-body,
.boleta-info-secundaria,
.boleta-alumno-info,
#suma-pesos {
    font-size: 1em !important;  /* Más compacto */
}

#suma-pesos, .suma-pesos {
    font-size: 1em !important;
    font-weight: 500;
    margin-top: 7px;
    color: #333;
}

.modal-boleta-body {
    margin-top: 7px;
    padding: 10px 18px 14px 18px;
}

.boleta-institucion,
.institucion-nombre,
.boleta-title,
.boleta-info-secundaria {
    font-size: 1em;
    color: #fff;
}

.institucion-nombre {
    font-weight: 500;
}

.boleta-title {
    font-size:1em;
    font-weight: 500;
    margin-bottom: 6px;
}

.boleta-info-secundaria {
    margin-top: 6px;
}

.boleta-alumno-info {
    background: #f7f9fa;
    padding: 10px 20px 8px 20px;
    color: #333;
}

.boleta-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
}

.firma-profesor {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.firma-linea {
    border-bottom: 1.5px dashed #888;
    width: 120px;
    margin-bottom: 3px;
}

.firma-texto {
    font-size: 1em;
    color: #444;
}

/* === Botones del modal (Agregar, Guardar, Descargar, Cerrar) === */
.btn-mini,
.btn-criterio,
.btn-ver-mini,
.btn-add-criterio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.14s, transform 0.13s;
    box-shadow: 0 2px 8px rgba(46,204,113,0.07);
    background: #f5f5f5;
    color: #18a561;
    gap: 7px;
	min-width: 80px;
    min-height: 28px;
}

.btn-editar-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.14s, transform 0.13s;
    box-shadow: 0 2px 8px rgba(46,204,113,0.07);
    background: #f5f5f5;
    color: #18a561;
    gap: 7px;
	min-width: 0;
    min-height: 22px;
	width: auto;
}
.btn-editar-mini {
    background: #e9f7ef;
    color: #2ecc71;
}
.btn-editar-mini:hover {
    background: #2ecc71;
    color: #fff;
}

.btn-editar-notas {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 3px 7px;
    border: none;
    border-radius: 15px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s, color 0.14s, transform 0.13s;
    box-shadow: 0 2px 8px rgba(46,204,113,0.07);
    background: #f5f5f5;
    color: #18a561;
    gap: 7px;
	min-width: 0;
    min-height: 22px;
	width: auto;
}
.btn-editar-notas {
    background: #e9f7ef;
    color: #2ecc71;
}
.btn-editar-notas:hover {
    background: #2ecc71;
    color: #fff;
}


.btn-add-criterio:hover {
    background: #1cba57;
    transform: scale(1.05);
}

.btn-guardar-criterios {
    background: #2ecc71;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 6px 8px;
    font-size:1em;
    font-weight: 500;
    transition: background .15s, transform .12s;
    margin-top: 8px;
    margin-right: 5px;
    float: right;
}
.btn-guardar-criterios:hover {
    background: #1cba57;
}

.btn-accion-mini,
.btn-descargar-mini {
    background: #FFA500;
    color: #fff;
    border: none;
    border-radius: 16px;
    padding: 7px 14px;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    box-shadow: 0 2px 8px rgba(255,165,0,0.11);
    transition: background .16s, transform .13s;
}
.btn-accion-mini:hover,
.btn-descargar-mini:hover {
    background: #e69500;
    transform: translateY(-2px) scale(1.03);
}

/* Botón eliminar (papelera) de cada criterio */
.btn-ver-mini {
    background: #e3f2fd;
    color: #3498db;
}
.btn-ver-mini:hover {
    background: #3498db;
    color: #fff;
}
.btn-add-criterio {
    background: #f8faf6;
    color: #2ecc71;
    border: 1px solid #d4e6d5;
}
.btn-add-criterio:hover {
    background: #2ecc71;
    color: #fff;
}
.btn-criterio {
    background: #ffebe6;
    color: #e74c3c;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1em;
    cursor: pointer;
    transition: background .15s, color .15s;
}
.btn-criterio:hover {
    background: #e74c3c;
    color: #fff;
}

/* Botón CERRAR MODAL (X) */
.cerrar-modal,
.cerrar-modal-criterios,
.cerrar-modal-boleta {
    position: absolute;
    right: 16px;
    top: 12px;
    font-size: 1.26em;
    color: #fff;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    cursor: pointer;
    box-shadow: none !important;
    z-index: 11;
    transition: color .12s;
}
.cerrar-modal:hover {
    color: #FFA500;
}

/* Tablas dentro de los modales */
.criterios-lista,
.criterios-lista th,
.criterios-lista td,
#modal-boleta-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
}
.criterios-lista th, .criterios-lista td {
    padding: 7px 8px;
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
}
.criterios-lista th:first-child, .criterios-lista td:first-child {
    text-align: left;
    min-width: 100px;
}

#modal-boleta-body table th, #modal-boleta-body table td {
    padding-top: 11px;
    padding-bottom: 11px;
    text-align: center;
}

/* Inputs del modal criterios */
.form-control1 {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size:1em;
    transition: border .22s, box-shadow .19s;
	min-width: 70px;
    max-width: 120px;
}
.form-control1:focus {
    border-color: #2ecc71;
    box-shadow: 0 0 0 2px rgba(46,204,113,0.10);
    outline: none;
}

/* Mensaje suma de valores */
.suma-pesos,
#suma-pesos {
    font-size: 1em;
    margin-top: 8px;
    font-weight: 500;
    color: #333;
}

/* Footer del formulario criterios */
.form-footer1 {
    display: flex;
    justify-content: flex-end;
    gap: 2px;
    margin-top: 5px;
    padding-top: 4px;
    border-top: 1px solid #eee;
    background: none;
}

/* Responsive para modales */
@media (max-width: 540px) {
    .modal-content,
    .modal-criterios-content,
    .modal-boleta-content,
    .modal-editar-content	{
        width: 100% !important;
    max-width: calc(100vw - 20px) !important; /* Margen lateral reducido */
    padding: 0 !important;
    margin: 0 auto !important;
    border-radius: 10px !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12) !important;
    box-sizing: border-box !important;
    }
	 
    .modal-header,
    .modal-criterios-header,
    .boleta-header {
        padding-left: 10px !important;
        padding-right: 10px !important;
        border-radius: 10px 10px 0 0;
    }
    .modal-body,
    .modal-criterios-body,
    .modal-boleta-body {
        padding: 13px 8px 6px 8px !important;
    }
    .boleta-alumno-info {
        padding: 8px 10px 7px 10px !important;
    }
    .boleta-footer {
        padding: 9px 7px !important;
    }
    .cerrar-modal {
        right: 10px !important;
        top: 8px !important;
        font-size: 1.23em !important;
    }
}

/* Mejoras visuales extra */
.custom-tooltip {
    font-size: 0.92em;
    background: #333;
    color: #fff;
    padding: 4px 9px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.11);
    position: absolute;
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s, transform .16s;
    left: 50%;
    top: -36px;
    transform: translateX(-50%) scale(0.96);
}
.btn-accion-mini:hover .custom-tooltip,
.btn-descargar-mini:hover .custom-tooltip {
    opacity: 1;
    transform: translateX(-50%) scale(1.02);
}


.modal::before,
.modal:before,
.modal-content::before,
.modal-content:before {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}


.modal-content {
  position: relative;
  z-index: 1;
}


.modal-editar-header {
  background: #FFA500;
  color: #fff;
  padding: 16px;
  border-radius: 12px 12px 0 0;
}

@media (max-width: 700px) {
  .tabla-scroll {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}


/* PERFIL DE PROFESOR */
 .perfil-section {
      background: #fff;
      border-radius: 8px;
      padding: 25px;
      margin-bottom: 25px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }
    .perfil-title {
      font-size: 1.3rem;
      font-weight: 600;
      margin-bottom: 20px;
      border-bottom: 1px solid #ddd;
      padding-bottom: 10px;
	  color: var(--secondary);
    }
    .form-label {
      font-weight: 500;
    }
    .perfil-foto {
      width: 120px;
      height: 120px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid #ccc;
	  align-items: center;
    }
	.user-role-mini {
    font-size: 0.95rem;
    color: #444;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}
.perfil-funcion {
    color: #28a745; 
    font-weight: 500;
    font-size: 0.95em;
    letter-spacing: 0.1px;
}
.user-materia {
    color: #FFA500;
    font-weight: 500;
}
.user-seccion {
    color: #28a745;
    font-weight: 500;
}
.sep {
    color: #aaa;
    margin: 0 3px;
    font-size: 1em;
}
	
	.perfil-main-container {
  max-width: 780px;
  margin: 40px auto 0 auto;  
  padding: 0 18px;           
  display: flex;
  flex-direction: column;
  align-items: center;      
  width: 100%;
}
.perfil-main-container > * {
  width: 100%;               
}

.perfil-main-container,
.contenedor-principal,
.perfil-card {
    box-sizing: border-box;
    max-width: 800px;   /* O el ancho que prefieras */
    margin: 0 auto;
    padding-left: 16px;
    padding-right: 16px;
    width: 100%;
}

@media (max-width: 600px) {
    .perfil-main-container,
    .contenedor-principal,
    .perfil-card {
        padding-left: 5px;
        padding-right: 5px;
    }
    .grid-formulario {
        display: block !important;
    }
    .columna-foto1, .columna-datos1 {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 20px;
    }
    .form-doble-columna1 {
        flex-direction: column;
        gap: 0;
    }
}


		/* ENVIAR NOTAS */


		.grupo-destinatarios { margin-bottom: 2rem; }
        .grupo-header { font-weight: 600; margin-bottom: 10px; color: var(--primary);}
        .destinatario-lista { list-style:none; margin:0; padding:0;}
        .destinatario-lista li { display:flex; align-items:center; gap:10px; margin-bottom:7px;}
        .destinatario-lista label { flex:1;}
        .select-todos { margin-bottom: 8px; color:var(--secondary); font-size:0.99em; cursor:pointer;}
        .adjunto-label { margin-top: 1rem; font-weight: 500;}
		
		.subtitle2 {
			text-align: center; 
			color: var(--secondary);
		}
		
		.btn-envio-mini {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 7px 16px;
    font-size: 0.96em;
    font-weight: 500;
    min-width: 120px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background 0.16s, box-shadow 0.13s, transform 0.13s;
}
.btn-envio-mini.btn-secundario {
    background: var(--secondary);
    color: #fff;
}
.btn-envio-mini:hover {
    background: #27ae60;
    transform: translateY(-2px) scale(1.05);
}
.btn-envio-mini.btn-secundario:hover {
    background: #e69500;
}



/* INICIO ESTUDIANTES*/

/* --- Dashboard principal con márgenes generosos --- */
.dashboard-wrapper {
    max-width: 920px;
    margin: 0 auto;
    padding: 0 18px 32px 18px;
	width: 100%;
    box-sizing: border-box;

}

.dashboard-cards {
    display: flex;
    flex-direction: column;
    gap: 1.7rem;
    width: 100%;
}

/* --- Grid 2x2 para las 4 tarjetas importantes --- */
.dashboard-2x3-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: repeat(3, auto);
  gap: 24px 28px;
  width: 100%;
}

/* --- Tarjeta compacta para bloques rápidos --- */
.mini-card {
    background: #fff;
    border-radius: 11px;
    box-shadow: var(--card-shadow);
    padding: 1.1rem 1.05rem 1.1rem 1.05rem;
    min-width: 0;
    width: 100%;
	box-sizing: border-box;
    max-width: 100%;
}

.mini-card * {
    word-break: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
}

/* --- Header en las tarjetas mini --- */
.mini-card .card-header {
    margin-bottom: 0.7rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mini-card .card-title2 {
    font-size: 1.05em;
    margin: 0;
    font-weight: 600;
}

/* --- Ajustes especiales por tipo de mini-card --- */
.mini-card-mensajes .mensaje-linea {
    border: none;
    padding: 0.3rem 0 0.2rem 0;
    font-size: 0.98em;
}
.mini-card-hoy .reminder-list {
    font-size: 0.97em;
    margin-bottom: 0;
}
.mini-card-semana .mini-calendar {
    margin-top: 4px;
}

/* --- Calendario mini: cuadrícula visual para semana --- */
.mini-calendar {
    display: flex;
    gap: 8px;
    justify-content: space-between;
    margin-top: 3px;
}
.mini-calendar > div {
    background: #fafbfc;
    border-radius: 10px;
    padding: 6px 8px;
    text-align: center;
    min-width: 44px;
    font-size: 0.97em;
    color: var(--secondary);
    font-weight: 500;
    border: 1px solid #f2f2f2;
}
.mini-calendar span {
    font-size: 1.08em;
    color: #333;
    display: block;
    font-weight: 700;
}

/* --- Responsive: de grid a columna simple en pantallas pequeñas --- */
@media (max-width: 700px) {
    .dashboard-wrapper {
      max-width: 99vw;
      padding: 0 3vw 15vw 3vw;
  }
  .dashboard-2x3-grid {
      grid-template-columns: 1fr;
      gap: 16px;
	  display: flex;
      flex-direction: column;
    }
    .mini-card {
      padding: 0.85rem 0.5rem 0.95rem 0.6rem;
      border-radius: 9px;
      max-width: 99vw;
      min-width: 0;
      width: 100%;
    }
	.card-mensajes {
        margin-left: 0;
        max-width: 99vw;
    }	
	.card-accesos,
    .card-mensajes {
        max-width: 100% !important;
        min-width: 0;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 6vw;
        padding-right: 6vw;
        box-sizing: border-box;
    }
	
	.card-accesos .acciones-rapidas-btn {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.96em;
    padding: 9px 0;
    border-radius: 7px;
    height: 38px;
    justify-content: center;
  }
  
  .card-accesos .acciones-rapidas-btn i {
    font-size: 1em !important;
  }
  
    .quick-actions.actions-compact {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        width: 100%;
        gap: 8px 10px;
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		justify-items: stretch;
		padding: 0;
    }
	.dashboard-top-row,
	.dashboard-middle-row {
    flex-direction: column;
    gap: 16px;
  }
}

/* --- Pequeños ajustes visuales extra --- */
.mini-card .card-header a {
    font-size: 0.96em;
    color: var(--secondary);
    text-decoration: none;
}
.mini-card .card-header a:hover {
    text-decoration: underline;
}

		.acciones-rapidas-btn {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 7px;
			padding: 7px 0;
			font-size:0.93em;
			background-color: var(--primary);
			color: white;
			border: none;
			border-radius: 7px;
			cursor: pointer;
			transition: all 0.2s;
			font-weight: 500;
			text-align: center;
			min-width: 90px;
			min-height: 38px;   
			max-width: 160px;
			width: 110px;
			justify-content: center;
			margin:0 auto;
			min-width: 88px;
			max-width: 130px;
			box-sizing: border-box;
			
		}

		.acciones-rapidas-btn:hover {
			background-color: #27ae60;
			transform: translateY(-2px);
			box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
		}
		
		
		.acciones-rapidas-btn2 {
			display: flex;
			align-items: center;
			justify-content: center;
			gap: 7px;
			padding:  8px 15px;
			font-size:0.8em;
			background-color: var(--primary);
			color: white;
			border: none;
			border-radius: 5px;
			cursor: pointer;
			transition: all 0.2s;
			font-weight: 500;
			text-align: center;
			min-width: 75px;
			min-height: 38px;  
			width: 160px;
			margin:5px;
			min-width: 88px;
			max-width: 160px;
			box-sizing: border-box;
			white-space: nowrap;
			
		}

		.acciones-rapidas-btn2:hover {
			background-color: #27ae60;
			transform: translateY(-2px);
			box-shadow: 0 4px 8px rgba(46, 204, 113, 0.2);
		}
		
		
		.input-con-boton {
    display: flex;
    align-items: center;
    gap: 10px; /* Espacio entre el input y el botón */
}

@media (max-width: 600px) {
    .input-con-boton {
        flex-direction: column; /* Pone el botón debajo del input */
        align-items: stretch;   /* Hace que ambos ocupen el 100% del ancho */
    }

    .acciones-rapidas-btn2 {
        width: 100%;
        font-size: 0.9em;  /* Aumenta un poco el tamaño para mejor legibilidad */
        white-space: normal; /* Permite que el texto se divida si es necesario */
        word-wrap: break-word; /* Asegura que no se salga del contenedor */
        padding: 10px; /* Más cómodo para pantallas táctiles */
    }
}



		.card-accesos {
    padding: 0.7rem 0.7rem !important;
    max-width: 330px; 
	box-sizing: border-box;
    flex: 0 0 25%;
	min-width: 180px;
}

.card-mensajes {
    max-width: 100%;
    min-width: 200px;
    width: 100%;
    padding: 0.7rem 1.5rem !important;
    margin-left: 0 !important;  
	flex: 1 1 0;
    box-sizing: border-box;
}

.card-mensajes .mensaje-linea {
    font-size: 0.95em;
    padding: 5px 0;
}

.quick-actions.actions-compact {
    display: flex;
    flex-direction: column;
    align-items: center;     
    gap: 9px;               
    width: 100%;
    justify-content: center;
    padding: 8px 0;
}
.card-accesos .quick-actions {
    justify-content: center;
    align-items: center;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.dashboard-top-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}
.dashboard-top-row > .mini-card {
  flex: 1 1 0;
  min-width: 220px;
}

.dashboard-middle-row {
  display: flex;
  gap: 24px;
  margin-bottom: 24px;
}

.card-semana {
  width: 100%;
  margin-top: 0;
}


/* Ajuste de campos solo dentro del formulario "formulario-completo" */
.formulario-completo input,
.formulario-completo select,
.formulario-completo textarea {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  padding: 12px 15px !important;
  font-size: 16px !important;
  border-radius: 8px !important;
}

/* Altura mínima para selects */
.formulario-completo select {
  min-height: 46px !important;
  line-height: 1.25 !important;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  padding-right: 42px !important;
}

/* Altura mínima para textareas */
.formulario-completo textarea {
  min-height: 110px !important;
  resize: vertical;
}

/* --- Espaciado entre bloques sueltos debajo de las filas superiores --- */
.dashboard-wrapper > .mini-card + .mini-card {
  margin-top: 24px;
}

@media (max-width: 700px){
  .dashboard-wrapper > .mini-card + .mini-card {
    margin-top: 16px;
  }
}

 /* Ajustes finos para este dashboard (respetando tu sistema visual) */
    .stu-band{max-width: 960px; margin: 0 auto; padding: 0 18px 28px 18px;}
    .pill {display:inline-block; padding:3px 10px; border-radius:12px; font-size:.83em; font-weight:600}
    .pill-danger{background:#ffe8e6; color:#d64545}
    .pill-warn{background:#fff3bf; color:#b7791f}
    .pill-ok{background:#ebfbee; color:#1c7c4d}
    .tiny-muted{color:#6c757d; font-size:.9em}
    .list-clean{list-style:none; padding:0; margin:0}
    .task-line{display:grid; grid-template-columns: 24px 1fr auto; gap:10px; align-items:center; padding:8px 6px; border-bottom:1px solid #f2f2f2}
    .task-title {font-weight:600; color:#202124}
    .task-meta {font-size:.9em; color:#5f6368}
    .task-actions button{border:none; background:#f0f2f4; border-radius:50%; width:32px; height:32px; cursor:pointer}
    .badge-subject{background:#eef2ff; color:#2b5fda; border-radius:12px; padding:2px 8px; font-size:.78em; font-weight:600}
    .time-chip{background:#f8faf6; color:#18a561; border-radius:12px; padding:2px 8px; font-size:.78em; font-weight:600}
    .important-msg{padding:10px 12px; background:#fff; border:1px solid #eee; border-radius:10px; display:flex; gap:10px; align-items:flex-start}
    .notif-line{display:flex; gap:10px; align-items:flex-start; padding:8px 0; border-bottom:1px solid #f2f2f2}
    .notif-line i{color:var(--primary)}
    .timeline {display:flex; flex-direction:column; gap:10px}
    .timeline-item{background:#fff; border:1px solid #eee; border-radius:10px; padding:10px; box-shadow:0 2px 10px rgba(0,0,0,.03)}
    .timeline-top{display:flex; justify-content:space-between; align-items:center; gap:8px}
    .special-banner{background:#fff; border:1px dashed #FFD9A3; border-radius:12px; padding:12px; display:flex; gap:12px; align-items:flex-start; box-shadow:0 2px 10px rgba(255,165,0,.08); margin-bottom:16px}
    .special-banner i{color:#FFA500}
    .tabs-mini{display:flex; gap:6px; border-bottom:1px solid #eee; margin-bottom:10px}
    .tabs-mini button{border:none; background:#f8f9fa; padding:8px 12px; border-radius:8px 8px 0 0; cursor:pointer; font-weight:500}
    .tabs-mini button.active{background:var(--secondary); color:#fff}
    .empty-state{padding:12px; text-align:center; color:#6b7280}
    .card-title2 {font-weight:600; margin:0}
   .quick-grid {
  display: grid;
  grid-template-columns: 1fr; 
  gap: 10px;
}

    
    .acciones-rapidas-btn { width:100%; max-width:none; }



 /*BIBLIOTECA
 
  /* ====== Banda con márgenes laterales del 5% ====== */
    .matlib-band{
      width:100%;
      padding-left:5vw;   /* ≈ 5% */
      padding-right:5vw;  /* ≈ 5% */
      box-sizing:border-box;
    }

    /* ====== Grid 65% / 25% (con minmax(0,…) para evitar desbordes) ====== */
    .matlib-grid{
      display:grid;
      grid-template-columns: minmax(0,65%) minmax(0,25%);
      gap: clamp(12px, 1.6vw, 22px);
      align-items:start;
    }

    /* ====== TARJETA GRID (lado izquierdo) ====== */
    .matlib-list-card{
      background:#fff; border-radius:12px; box-shadow: var(--card-shadow);
      padding:14px; box-sizing:border-box; width:100%; min-width:0;
    }
    .matlib-header{
      display:flex; align-items:center; justify-content:space-between;
      border-bottom:1px solid #eee; padding-bottom:8px; margin-bottom:10px; gap:10px;
    }
    .matlib-sub{font-size:.95em; color:#6b7280; margin:2px 0 10px 0}

    /* Filtros (compatibles con tus estilos) */
    .matlib-filters{display:flex; gap:10px; align-items:center; justify-content:space-between; margin-bottom:8px; flex-wrap:wrap}
    .matlib-filters-left{display:flex; gap:10px; align-items:center; flex-wrap:wrap}
    .matlib-search{position:relative; flex-grow:1; max-width:320px}
    .matlib-search .fa-magnifying-glass{position:absolute; left:12px; top:50%; transform:translateY(-50%); color:#999}
    .matlib-input-search{width:100%; padding:10px 15px 10px 36px; border:1px solid #ddd; border-radius:8px; transition:.2s; box-sizing:border-box}
    .matlib-input-search:focus{border-color:var(--primary); box-shadow:0 0 0 3px rgba(46,204,113,.2); outline:none}
    .matlib-select{padding:10px; border:1px solid #ddd; border-radius:8px; background:#fff}

    /* ====== GRID DE TARJETAS ====== */
    .matlib-cards{
      display:grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 14px;
      width:100%;
	  padding-top: 1vw;     
	  padding-bottom: 1vw;  
	  box-sizing: border-box;
	  padding-top: 0;
	  
    }
    @media (max-width: 1100px){ .matlib-cards{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
    @media (max-width: 680px){ .matlib-cards{ grid-template-columns: 1fr; } }

    .matlib-card{
      background:#fff;
      border:1px solid #eee;
      border-radius:12px;
      box-shadow: 0 2px 10px rgba(0,0,0,0.03);
      padding:12px;
      display:flex; flex-direction:column; gap:8px;
      cursor:pointer;
      transition: transform .12s, box-shadow .12s, border-color .12s;
      min-width:0;
    }
    .matlib-card:hover{
      transform: translateY(-2px);
      box-shadow: 0 6px 16px rgba(46,204,113,.10);
      border-color:#e6f6ee;
    }
    .matlib-file-row{ display:flex; align-items:center; gap:10px; }
    .matlib-file-meta{ font-size:.82em; color:#6b7280; }
    .matlib-title{ font-weight:600; color:#202124; line-height:1.2; word-break:break-word; }
    .matlib-mini{ display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

    /* Badges propios (sin chocar con .badge de bootstrap ni tus .badge.*) */
    .matlib-badge{display:inline-block; padding:4px 10px; border-radius:14px; font-size:.86em; font-weight:600}
    .matlib-chip-pdf{background:#ffe8e6;color:#d64545}
    .matlib-chip-word{background:#e8f0ff;color:#2b5fda}
    .matlib-chip-ppt{background:#fff2cc;color:#b7791f}
    .matlib-chip-generic{background:#eef2f7;color:#50627a}
    .matlib-chip-acceso{background:#ecfff4;color:#1c7c4d}
    .matlib-chip-interno{background:#fff3e6;color:#c76a00}
    .matlib-chip-publico{background:#e8f0ff;color:#2b5fda}

    /* ====== FORMULARIO (lado derecho) ====== */
    .matlib-form{
      background:#fff; border-radius:12px; box-shadow: var(--card-shadow);
      padding:14px; box-sizing:border-box; width:100%; min-width:0; max-width:100%;
    }
    .matlib-form h3{ margin:0 0 6px 0; }
    .matlib-form .input-estilizado,
    .matlib-form .select-estilizado,
    .matlib-form .textarea-estilizado{ width:100%; max-width:100%; box-sizing:border-box; }
    .matlib-form .textarea-estilizado{ min-height:90px; }
    .matlib-helper{font-size:.9em; color:#5f6368}
    .matlib-btn-block{ display:inline-flex; width:100%; justify-content:center; align-items:center; gap:8px }

    /* Dropzone propia (sin chocar) */
    .matlib-dropzone{border:2px dashed #dadce0; border-radius:10px; background:#fafbfc; padding:12px; text-align:center; transition:.2s; margin-bottom:10px}
    .matlib-dropzone.dragover{border-color:var(--secondary); background:#fff8e8}
    .matlib-dropzone .matlib-dz-icon{font-size:1.6rem; margin-bottom:4px; color:var(--secondary)}
    .matlib-file-list{margin-top:8px; text-align:left; font-size:.92em; color:#444; max-height:160px; overflow:auto}
    .matlib-file-list li{display:flex; align-items:center; gap:8px; padding:6px 8px; background:#fff; border:1px solid #eee; border-radius:8px; margin-bottom:6px}
    .matlib-file-pill{padding:2px 8px; border-radius:10px; background:#f1f3f5; font-size:.82em}

    /* Botón icónico (no choca con tus .btn-icon) */
    .matlib-btn-icon{ width:34px; height:34px; border-radius:50%; border:none; background:#f0f2f4; cursor:pointer }
    .matlib-btn-icon:hover{ transform:scale(1.08); filter:brightness(1.03) }

    /* ====== MODAL propio (evita tus .modal) ====== */
    .matlib-modal{
      display:none; position:fixed; inset:0; background: rgba(0,0,0,.55);
      z-index: 9998; justify-content:center; align-items:center; padding: 14px;
    }
    .matlib-modal.show{ display:flex; }
    .matlib-modal-content{
      background:#fff; border-radius:13px; box-shadow: 0 8px 40px rgba(46,204,113,0.08), 0 1.5px 8px rgba(0,0,0,0.09);
      width:100%; max-width: 720px; box-sizing:border-box; overflow:hidden;
      display:flex; flex-direction:column;
    }
    .matlib-modal-header{
      background: var(--primary); color:#fff; padding:16px 20px; display:flex; align-items:center; justify-content:space-between;
    }
    .matlib-modal-title{ margin:0; font-weight:500; }
    .matlib-close{ background:none; border:none; color:#fff; font-size:1.3rem; cursor:pointer; }
    .matlib-modal-body{ padding:16px 18px; color:#333; }
    .matlib-kv{ display:grid; grid-template-columns: 160px 1fr; gap:10px; margin-bottom:8px; }
    .matlib-kv b{ color:#444; }
    .matlib-modal-footer{ padding:12px 18px; display:flex; gap:10px; justify-content:flex-end; border-top:1px solid #eee; }
    @media (max-width:560px){ .matlib-kv{ grid-template-columns: 1fr; } }

    /* ====== Responsive del layout ====== */
    @media (max-width: 992px){
      .matlib-grid{ grid-template-columns: 1fr; }
      .matlib-form{ order:2 }
      .matlib-list-card{ order:1 }
	   .matlib-cards{
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-top: 1vw;
    padding-bottom: 1vw;
    gap: 16px;
  }
  .matlib-cards > * { margin: 0 !important; }
    }
    @media (max-width: 600px){
      .matlib-band{ padding-left:4vw; padding-right:4vw; }
	  .matlib-cards{
    grid-template-columns: 1fr;
    padding-top: 1vw;
    padding-bottom: 1vw;
    gap: 16px;
  }
  .matlib-cards > * { margin: 0 !important; }
    }
	
	/* Fondo diferenciado del formulario solo en mobile */
@media (max-width: 992px) {
  .matlib-form {
    background: #FFF7E6;           
    border: 1px solid #FFD9A3;    
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(255,165,0,0.10);
  }
}

/* Botón agregar adaptativo */
@media (max-width: 768px) {
  .btn-agregar-mini {
    border-radius: 10px;
    padding: 11px 22px;
    font-size: 1rem;
    min-width: 180px;    
    width: auto;          
    display: inline-flex;
    align-items: center;
    gap: 8px;
  }
  .btn-agregar-mini span {
    display: inline;
  }
}


/* ====== PROGRAMAR ACTIVIDADES ====== */
    .ag-band{ width:100%; padding-left:5vw; padding-right:5vw; box-sizing:border-box; }

    /* Lista 60% / Form 40% (desktop) */
    .ag-grid{
      display:grid;
      grid-template-columns:minmax(0,60%) minmax(0,40%);
      gap:clamp(12px,1.6vw,22px);
      align-items:start;
    }
    @media (max-width: 992px){
      .ag-grid{ grid-template-columns: 1fr; }
    }

    .ag-list-card, .ag-form{
      background:#fff; border-radius:12px; box-shadow: var(--card-shadow); padding:14px;
    }

    .ag-cards{ display:grid; grid-template-columns: 1fr; gap:12px; }
    .ag-card{
      background:#fff; border:1px solid #eee; border-radius:12px; padding:12px;
      box-shadow:0 2px 10px rgba(0,0,0,.03); display:flex; flex-direction:column; gap:8px;
      transition:transform .12s, box-shadow .12s, border-color .12s; cursor:pointer;
    }
    .ag-card:hover{ transform:translateY(-2px); box-shadow:0 6px 16px rgba(46,204,113,.10); border-color:#e6f6ee; }

    .ag-meta{font-size:.92em; color:#5f6368}
    .chip{display:inline-block; padding:3px 9px; border-radius:12px; font-size:.82em; font-weight:600}
    .chip-tipo{background:#eef2f7; color:#50627a}
    .chip-hoy{background:#fff3bf; color:#b7791f}
    .chip-prox{background:#ecfff4; color:#1c7c4d}
    .chip-pasado{background:#ffe8e6; color:#d64545}
    .chip-priv{background:#e8f0ff; color:#2b5fda}
    .chip-pub{background:#f0fff6; color:#1c7c4d}
    .file-pill{padding:2px 8px; border-radius:10px; background:#f1f3f5; font-size:.82em}
    .ag-helper{ font-size:.9em; color:#5f6368 }

    .tabs-mini{display:flex; gap:6px; border-bottom:1px solid #eee; margin-bottom:10px}
    .tabs-mini button{border:none; background:#f8f9fa; padding:8px 12px; border-radius:8px 8px 0 0; cursor:pointer; font-weight:500}
    .tabs-mini button.active{background:var(--secondary); color:#fff}

    /* Accesos en 1 por fila */
    .quick-grid-1col{ display:grid; grid-template-columns: 1fr; gap:10px; }
    .acciones-rapidas-btn{ width:100%; max-width:none; }

    /* ====== Checkbox Audiencia (alineado izquierda) ====== */
    .audiencia-group { border: 0; padding: 0; margin: 0 0 14px 0; }
    .checkbox-list {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 8px 18px;
      margin-top: 6px;
    }
    @media (max-width: 700px) {
      .checkbox-list { grid-template-columns: 1fr; }
    }
    .chk-item {
      display: flex;
      align-items: center;
      gap: 8px;
      line-height: 1.25;
      color: #333;
      cursor: pointer;
      user-select: none;
    }
    .chk-item input[type="checkbox"] {
      width: 18px;
      height: 18px;
      margin: 0;
      flex: 0 0 18px;
      accent-color: var(--secondary);
    }
    .chk-item span { display: inline-block; }

    /* ====== Filtros responsive ====== */
    .matlib-filters{display:flex; gap:10px; align-items:center; justify-content:space-between; flex-wrap:wrap}
    .matlib-filters-left{display:flex; gap:10px; align-items:center; flex-wrap:wrap; flex:1}
    .matlib-search{position:relative; flex:1; min-width: 220px;}
    .matlib-search input{width:100%}
    .matlib-select{min-width: 160px;}

    @media (max-width: 700px){
      .matlib-filters-left{flex-direction:column; align-items:stretch}
      .matlib-search{min-width:0}
      .matlib-select{width:100%}
    }

    /* ====== Form responsive ====== */
    .formulario-mensaje{ max-width: 100%; width:100%; background: #fff5e6 !important;     
    border: 1px solid #ffebd1 !important;
    box-shadow: 0 2px 8px rgba(255,165,0,0.10);
    border-radius: 12px;}
    @media (max-width: 600px){
      .formulario-mensaje .btn-enviar2,
      .formulario-mensaje .btn-secundario,
      .btn-accion-mini, .btn-descargar-mini{
        width:100%;
      }
      .botones-accion{flex-direction:column}
    }

    /* Print */
    .print-wrapper { display:none; }
    @media print {
      .no-print{display:none!important;}
      .print-wrapper{display:block!important;}
      body{background:#fff;}
    }
	
	/* INICIO PADRES */
	