DiploMaster/assets/css/styles.css

602 lines
9.5 KiB
CSS

/* Reset y estilos base */
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', sans-serif;
height: 100vh;
overflow: hidden;
}
/* Estilos para el contenedor del login */
.login-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
width: 100vw;
background: linear-gradient(135deg, #003f7d 0%, #0066cc 100%);
padding: 20px;
}
.login-card {
background: white;
border-radius: 16px;
padding: 2.5rem;
width: 100%;
max-width: 380px;
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
position: relative;
overflow: hidden;
}
.login-card::before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 5px;
background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
}
.logo-container {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
}
.logo-icon {
width: 40px;
height: 40px;
color: #2563eb;
margin-right: 10px;
}
.login-card h1 {
color: #1e293b;
margin: 0;
font-size: 1.8rem;
}
.welcome-text {
color: #64748b;
text-align: center;
margin-bottom: 2rem;
font-size: 0.95rem;
}
.input-group {
position: relative;
margin-bottom: 1.5rem;
}
.input-icon {
position: absolute;
left: 12px;
top: 50%;
transform: translateY(-50%);
width: 20px;
height: 20px;
color: #94a3b8;
z-index: 2;
}
.login-card input {
width: 100%;
padding: 0.75rem 0.75rem 0.75rem 40px;
border: 1px solid #e2e8f0;
border-radius: 8px;
font-size: 0.95rem;
transition: all 0.3s ease;
background-color: #f8fafc;
}
.login-card input:focus {
border-color: #2563eb;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
background-color: white;
}
.login-btn {
width: 100%;
padding: 0.85rem;
font-size: 1rem;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
margin-top: 1rem;
background: linear-gradient(90deg, #2563eb 0%, #1d4ed8 100%);
border: none;
border-radius: 8px;
cursor: pointer;
transition: all 0.3s ease;
}
.login-btn:hover {
background: linear-gradient(90deg, #1d4ed8 0%, #1e40af 100%);
transform: translateY(-1px);
}
.btn-icon {
width: 20px;
height: 20px;
}
.footer-links {
display: flex;
justify-content: space-between;
margin-top: 1.5rem;
font-size: 0.85rem;
}
.footer-links a {
color: #64748b;
text-decoration: none;
transition: color 0.2s ease;
}
.footer-links a:hover {
color: #2563eb;
}
/* Estilos para la aplicación principal */
#app-content {
display: flex;
flex-direction: column;
height: 100vh;
width: 100vw;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
background-color: #003f7d;
color: white;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
position: relative;
}
header h1 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
header h1 {
position: absolute;
left: 50%;
transform: translateX(-50%);
}
#user-info {
order: -1;
display: flex;
align-items: center;
gap: 1rem;
}
/* Estilos para la tabla en el dashboard */
.stats {
margin-bottom: 1.5rem;
}
.stats p {
margin: 0.5rem 0;
}
/* Paginación */
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 1rem;
margin-top: 1rem;
}
.pagination-btn {
padding: 0.5rem 1rem;
min-width: 100px;
}
#page-info {
font-size: 0.9rem;
color: #64748b;
}
#current-user {
font-weight: 600;
background: rgba(255, 255, 255, 0.1);
padding: 0.5rem 1rem;
border-radius: 20px;
}
.main-container {
display: flex;
flex: 1;
overflow: hidden;
}
.sidebar {
width: 250px;
background-color: #f8fafc;
padding: 1.5rem 1rem;
border-right: 1px solid #e2e8f0;
overflow-y: auto;
}
.sidebar-menu {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar-menu li {
padding: 0.75rem 1rem;
margin-bottom: 0.5rem;
border-radius: 6px;
cursor: pointer;
transition: all 0.2s ease;
display: flex;
align-items: center;
gap: 0.75rem;
}
.sidebar-menu li:hover {
background-color: #e0e7ff;
}
.sidebar-menu li.active {
background-color: #2563eb;
color: white;
}
.content {
flex: 1;
padding: 2rem;
overflow-y: auto;
background-color: #f9fafb;
}
.content-section {
display: none;
}
.content-section.active {
display: block;
}
.card {
background: white;
border-left: 4px solid #2563eb;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.card h2 {
margin-top: 0;
color: #003f7d;
font-size: 1.25rem;
}
.btn {
background-color: #2563eb;
color: white;
padding: 0.6rem 1.25rem;
border: none;
border-radius: 6px;
cursor: pointer;
font-weight: 600;
font-family: 'Inter', sans-serif;
transition: background-color 0.2s ease;
}
.btn:hover {
background-color: #1d4ed8;
}
input,
select {
width: 100%;
padding: 0.75rem;
margin-top: 0.5rem;
margin-bottom: 1rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-family: 'Inter', sans-serif;
}
input:focus,
select:focus {
outline: none;
border-color: #2563eb;
box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}
.oculto {
display: none;
}
/* Estilos para el contenido específico */
.course-list {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1.5rem;
}
.course-card {
background: white;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
padding: 1.25rem;
transition: transform 0.2s ease;
}
.course-card:hover {
transform: translateY(-2px);
}
.diploma-preview {
max-width: 600px;
margin: 0 auto;
background: white;
padding: 2rem;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
text-align: center;
}
.diploma-preview img {
max-width: 100%;
height: auto;
margin: 1rem 0;
}
/* Estilos para el buscador y tabla */
.search-container {
display: flex;
gap: 10px;
margin-bottom: 20px;
}
.search-input {
flex: 1;
padding: 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
font-family: 'Inter', sans-serif;
}
.table-container {
overflow-x: auto;
margin-top: 20px;
}
.courses-table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}
.courses-table th, .courses-table td {
padding: 12px 15px;
text-align: left;
border-bottom: 1px solid #e2e8f0;
}
.courses-table th {
background-color: #f8fafc;
font-weight: 600;
color: #003f7d;
}
.courses-table tr:hover {
background-color: #f5f7fa;
}
.download-btn {
padding: 0.4rem 0.8rem;
font-size: 0.9rem;
}
.pagination {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-top: 20px;
}
.pagination-btn {
padding: 0.5rem 1rem;
}
/* Mantén todos tus estilos anteriores y añade estos */
/* Estilos para el dashboard */
.admin .sidebar-menu li[data-section="courses"],
.admin .sidebar-menu li[data-section="students"],
.user .sidebar-menu li[data-section="my-courses"],
.user .sidebar-menu li[data-section="diplomas"] {
display: none;
}
.admin .sidebar-menu li[data-section="courses"],
.admin .sidebar-menu li[data-section="students"] {
display: flex;
}
.user .sidebar-menu li[data-section="my-courses"],
.user .sidebar-menu li[data-section="diplomas"] {
display: flex;
}
/* Mejoras de responsive */
@media (max-width: 768px) {
.main-container {
flex-direction: column;
}
.sidebar {
width: 100%;
height: auto;
}
.login-card {
width: 90%;
padding: 1.5rem;
}
}
/* Estilos adicionales */
.loader {
text-align: center;
padding: 2rem;
font-style: italic;
color: #64748b;
}
.course-card {
background: white;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
padding: 1.25rem;
margin-bottom: 1rem;
transition: transform 0.2s ease;
}
.course-card:hover {
transform: translateY(-2px);
}
.course-card h3 {
margin-top: 0;
color: #003f7d;
}
.diploma-preview {
background: white;
border-radius: 8px;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
padding: 1.5rem;
margin-bottom: 1.5rem;
text-align: center;
}
.diploma-preview h3 {
color: #003f7d;
}
.search-container {
display: flex;
gap: 0.5rem;
margin-bottom: 1rem;
}
.search-input {
flex: 1;
padding: 0.75rem;
border: 1px solid #e2e8f0;
border-radius: 6px;
}
/* Añadir al final del archivo */
/* Estilos para el header */
header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 2rem;
}
header h1 {
position: static;
transform: none;
margin: 0;
}
#user-info {
order: 1;
display: flex;
align-items: center;
gap: 1rem;
}
/* Estilos para el enlace de cerrar sesión */
.logout-link {
color: #333;
text-decoration: none;
padding: 0.75rem 1rem;
display: block;
transition: all 0.2s ease;
}
.logout-link:hover {
color: #e53e3e;
background-color: #fee2e2;
}
/* Estilos para la columna de acciones */
.courses-table td:last-child {
text-align: center;
}
.download-btn {
padding: 0.4rem 0.8rem;
font-size: 0.9rem;
background-color: #38a169;
}
.download-btn:hover {
background-color: #2f855a;
}
.download-btn:disabled {
background-color: #a0aec0;
cursor: not-allowed;
}
/* Badges para tipos de curso */
.badge {
padding: 4px 8px;
border-radius: 12px;
font-size: 0.8em;
font-weight: 600;
text-transform: capitalize;
}
.badge.active {
background-color: #4CAF50;
color: white;
}
.badge.inactive {
background-color: #f44336;
color: white;
}
.badge.type-inyeccion {
background-color: #2196F3;
color: white;
}
.badge.type-pildora {
background-color: #FF9800;
color: white;
}
.badge.type-tratamiento {
background-color: #9C27B0;
color: white;
}