/* ===================================
   NEXUS FRONTEND - CSS OPTIMIZADO
   ================================== */

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    
    line-height: 1.6;
    color: #333;
}

/* ====== FLASH MESSAGES ====== */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 400px;
}

.flash {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 0.5s ease;
    cursor: pointer;
    transition: all 0.3s ease;
}

.flash:hover {
    transform: translateX(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.flash-success { background: rgba(72, 187, 120, 0.9); color: white; }
.flash-error { background: rgba(245, 101, 101, 0.9); color: white; }
.flash-info { background: rgba(66, 153, 225, 0.9); color: white; }

/* ====== LOGIN PAGE ====== */
.login-container {
    display: flex;
   
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.welcome-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.welcome-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 1rem;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.welcome-url {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    position: absolute;
    bottom: 2rem;
}

.login-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    padding: 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 1.8rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-subtitle {
    color: #666;
    margin-top: 0.5rem;
}

/* ====== DASHBOARD HEADER ====== */
.dashboard-header {
    background: linear-gradient(135deg, #5b6eea 0%, #6a4aa2 100%);
    color: white;
    padding: 35px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom-left-radius: 18px;
    border-bottom-right-radius: 18px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.dashboard-header h1 {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 12px;
}

/* ====== BUTTONS ====== */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: white;
    color: #5b6eea;
    border: 2px solid white;
}

.btn-primary:hover {
    background: #eef1ff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-danger {
    background: #e53e3e;
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-info {
    background: #3498db;
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Botón "Volver al Dashboard" */
.btn-back {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    color: white;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    transition: 0.25s ease;
    backdrop-filter: blur(6px);
}

.btn-back i {
    background: rgba(255, 255, 255, 0.25);
    padding: 6px;
    border-radius: 50%;
    font-size: 12px;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateX(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.btn-modern {
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.22s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-modern.btn-primary {
    background: white;
    color: #5b6eea;
    border: 2px solid white;
}

.btn-modern.btn-primary:hover {
    background: #eef1ff;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ====== FORM ELEMENTS ====== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-input,
.form-group input, 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    background: rgba(255,255,255,0.9);
    transition: 0.3s;
    font-size: 14px;
}

.form-input:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #667eea;
    background: white;
    outline: none;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

/* ====== CONTAINERS ====== */
.dashboard-container,
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 20px;
}

.admin-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ====== BADGES ====== */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-success { background: #d1fae5; color: #065f46; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-active { background: #d1fae5; color: #065f46; }
.status-inactive { background: #fee2e2; color: #991b1b; }
.status-expired { background: #fef3c7; color: #92400e; }

/* ====== ANIMATIONS ====== */
@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
