/* Variables CSS */
:root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #ff6b35;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-color: #374151;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Header */
.header {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-image {
    height: 50px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.empresa-logo {
    height: 80px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empresa-logo-placeholder {
    height: 80px;
    width: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.empresa-info {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.empresa-info i {
    margin-right: 0.5rem;
    color: #007bff;
}

.header-title {
    color: white;
    font-weight: 600;
    font-size: 1.5rem;
    margin: 0;
}

.settings-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.settings-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-name {
    color: white;
    font-weight: 500;
}

/* Main content */
.main-content {
    flex: 1;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

.login-main {
    display: flex;
    align-items: center;
    min-height: calc(100vh - 140px);
}

/* Login page styles */
.login-body {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
}

.main-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.card-header {
    margin-bottom: 2rem;
}

.card-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.card-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.card-description {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-login {
    background: var(--accent-color);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-login:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-certificate {
    background: transparent;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-certificate:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

/* Login card */
.login-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
    color: white;
}

.login-title {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1rem;
}

.login-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: white;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
    color: white;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.input-group-text {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.8);
}

.form-check-input:checked {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.form-check-label {
    color: rgba(255, 255, 255, 0.8);
}

.text-danger {
    color: #fca5a5 !important;
}

.certificate-info {
    margin-bottom: 2rem;
}

.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.info-box i {
    color: var(--secondary-color);
    margin-top: 0.125rem;
}

.info-box p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.9rem;
}

.login-footer {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.copyright {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin: 0;
}

/* Dashboard styles */
.dashboard-header {
    text-align: center;
    margin-bottom: 3rem;
}

.dashboard-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.app-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.app-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.app-title {
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.app-description {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    flex: 1;
}

.app-button {
    background: var(--accent-color);
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: auto;
}

.app-button:hover {
    background: #e55a2b;
    transform: translateY(-2px);
}

.no-apps {
    text-align: center;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
}

.no-apps i {
    font-size: 3rem;
    color: var(--warning-color);
    margin-bottom: 1rem;
}

.no-apps h3 {
    color: white;
    margin-bottom: 1rem;
}

.no-apps p {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
.footer {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    margin-top: auto;
    position: sticky;
    bottom: 0;
    z-index: 1000;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-text {
    color: white;
    margin: 0;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-link:hover {
    color: var(--accent-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.2rem;
    }
    
    .main-card,
    .login-card {
        padding: 2rem 1.5rem;
    }
    
    .card-title,
    .login-title {
        font-size: 1.8rem;
    }
    
    .dashboard-title {
        font-size: 2rem;
    }
    
    .footer-links {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .user-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media (max-width: 576px) {
    .login-options {
        gap: 0.75rem;
    }
    
    .btn-login,
    .btn-certificate {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.main-card,
.login-card,
.app-card {
    animation: fadeIn 0.6s ease-out;
}

/* Utilidades */
.text-center {
    text-align: center;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.d-flex {
    display: flex;
}

.align-items-center {
    align-items: center;
}

.justify-content-center {
    justify-content: center;
}

.gap-3 {
    gap: 1rem;
}
