/* Reset y estilos base */
* { 
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --info-color: #3498db;
    --light-gray: #ecf0f1;
    --dark-gray: #7f8c8d;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    font-size: 14px;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    animation: float 6s ease-in-out infinite;
}

.login-page::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: white;
    padding: 30px 30px;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    animation: slideUp 0.6s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-box h1 {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.login-box h2 {
    text-align: center;
    color: var(--dark-gray);
    margin-bottom: 35px;
    font-size: 16px;
    font-weight: 400;
}

.login-box .form-group {
    position: relative;
    margin-bottom: 25px;
}

.login-box .form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-bottom: 8px;
    display: block;
    transition: var(--transition);
}

.login-box .form-control {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-box .form-control:focus {
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
}

.login-box .form-group::before {
    content: '📧';
    position: absolute;
    left: 14px;
    top: 38px;
    font-size: 16px;
    pointer-events: none;
}

.login-box .form-group:last-of-type::before {
    content: '🔒';
}

.login-box .btn-block {
    margin-top: 30px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.login-box .btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.login-box .btn-block:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(102, 126, 234, 0.4);
}

.login-box .alert {
    margin-bottom: 25px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 60px;
    height: 100vh;
    background: var(--secondary-color);
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 1000;
    transition: width 0.3s ease;
    white-space: nowrap;
}

.sidebar:hover {
    width: 220px;
}

.sidebar-header {
    padding: 15px 0;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sidebar-header::before {
    content: 'GP';
    font-size: 20px;
    font-weight: bold;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    opacity: 1;
    transition: opacity 0.3s;
}

.sidebar:hover .sidebar-header::before {
    opacity: 0;
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar:hover .sidebar-header h2 {
    opacity: 1;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    overflow: hidden;
}

.sidebar-menu li a span {
    min-width: 60px;
    text-align: center;
    font-size: 18px;
    margin-right: 0;
    display: flex;
    justify-content: center;
}

.sidebar-menu li a:hover,
.sidebar-menu li.active a {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-menu li.logout {
    margin-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
}

.sidebar-menu li.logout a {
    color: var(--danger-color);
}

/* Main Content */
.main-content {
    margin-left: 60px;
    min-height: 100vh;
    padding: 30px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--light-gray);
}

.page-header h1 {
    font-size: 24px;
    color: var(--secondary-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Forms */
.form-horizontal {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
    font-size: 18px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-group {
    margin-bottom: 20px;
    flex: 1;
}

.form-group.col-md-6 {
    flex: 0 0 calc(50% - 10px);
}

.form-group.col-md-4 {
    flex: 0 0 calc(33.333% - 14px);
}

.form-group.full-width {
    flex: 0 0 100%;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-control-sm {
    padding: 5px 10px;
    font-size: 13px;
}

.form-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: var(--dark-gray);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: var(--dark-gray);
    color: white;
}

.btn-secondary:hover {
    background: #6c7a89;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover {
    background: #2980b9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-color: var(--success-color);
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-color: var(--danger-color);
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-color: var(--info-color);
}

/* Tables */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--secondary-color);
    color: white;
}

.data-table th {
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
}

.data-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #eee;
    font-size: 13px;
}

.data-table tbody tr:hover {
    background: #f8f9fa;
}

.data-table .actions {
    display: flex;
    gap: 5px;
}

.text-center {
    text-align: center;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-primary {
    background: #e3f2fd;
    color: var(--primary-color);
}

.badge-secondary {
    background: #f5f5f5;
    color: var(--dark-gray);
}

.badge-success {
    background: #e8f5e9;
    color: var(--success-color);
}

.badge-danger {
    background: #ffebee;
    color: var(--danger-color);
}

.badge-warning {
    background: #fff3e0;
    color: var(--warning-color);
}

.badge-info {
    background: #e3f2fd;
    color: var(--info-color);
}

.badge-pendiente {
    background: #fff3e0;
    color: #f39c12;
}

.badge-en_revision {
    background: #e3f2fd;
    color: #3498db;
}

.badge-aceptada {
    background: #e8f5e9;
    color: #27ae60;
}

.badge-rechazada {
    background: #ffebee;
    color: #e74c3c;
}

/* Dashboard */
.dashboard-content {
    padding: 20px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.dashboard-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.dashboard-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 18px;
}

.dashboard-card p {
    color: var(--dark-gray);
    margin-bottom: 20px;
}

/* Empresas */
.empresas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.empresa-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    transition: var(--transition);
}

.empresa-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.empresa-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.empresa-logo-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.empresa-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.empresa-ubicacion,
.empresa-email {
    font-size: 14px;
    color: var(--dark-gray);
    margin-bottom: 8px;
}

.empresa-descripcion {
    font-size: 13px;
    color: #666;
    margin: 15px 0;
}

.empresa-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

/* Postulaciones */
.postulaciones-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.postulacion-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.postulacion-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
}

.postulacion-logo-placeholder {
    width: 60px;
    height: 60px;
    background: var(--light-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 15px;
}

.postulacion-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.postulacion-fecha,
.postulacion-estado {
    font-size: 14px;
    margin-bottom: 10px;
}

.postulacion-documentos {
    margin: 15px 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.postulacion-documentos ul {
    list-style: none;
    margin-top: 10px;
}

.postulacion-documentos li {
    margin-bottom: 5px;
}

.postulacion-documentos a {
    color: var(--primary-color);
    text-decoration: none;
}

.postulacion-documentos a:hover {
    text-decoration: underline;
}

.postulacion-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

/* Prácticas */
.practicas-list {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.practica-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.practica-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--light-gray);
}

.practica-header h3 {
    color: var(--secondary-color);
    font-size: 18px;
}

.practica-details {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.practica-detail-item {
    padding: 10px 0;
}

.practica-detail-item strong {
    display: block;
    margin-bottom: 5px;
    color: var(--dark-gray);
    font-size: 13px;
}

.practica-actions {
    display: flex;
    gap: 10px;
    padding-top: 20px;
    border-top: 1px solid var(--light-gray);
}

/* Detail Card */
.detail-card {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 20px;
}

.detail-card h2 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--light-gray);
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.detail-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-item label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.detail-item span,
.detail-item p {
    color: var(--secondary-color);
    font-size: 15px;
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    overflow: auto;
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: var(--border-radius);
    max-width: 600px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: var(--dark-gray);
    cursor: pointer;
}

.close:hover {
    color: var(--danger-color);
}

/* Utility Classes */
.mt-4 {
    margin-top: 2rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        white-space: normal;
    }
    
    .sidebar:hover {
        width: 100%;
    }

    .sidebar-header {
        height: auto;
        display: block;
        padding: 25px 20px;
    }

    .sidebar-header::before {
        display: none;
    }

    .sidebar-header h2 {
        opacity: 1;
        display: block;
    }
    
    .sidebar-menu li a {
        padding: 12px 20px;
    }

    .sidebar-menu li a span {
        min-width: auto;
        margin-right: 12px;
        display: inline-block;
        text-align: left;
        font-size: 20px;
    }

    .main-content {
        margin-left: 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .form-group.col-md-6,
    .form-group.col-md-4 {
        flex: 0 0 100%;
    }
    
    .dashboard-grid,
    .empresas-grid,
    .postulaciones-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 12px;
    }
    
    .data-table th,
    .data-table td {
        padding: 8px;
    }
}
