/* UrbanIA Chile Pro - Estilos Principales */
/* Versión: 2.1 Comercial */
/* Fecha: 2025-11-11 */

/* =====================================================
   RESET Y CONFIGURACIÓN BASE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* =====================================================
   CONTENEDOR DE LOGIN
   ===================================================== */

.login-container {
    max-width: 450px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

.login-header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.login-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
}

.version-info {
    background: rgba(255,255,255,0.1);
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
}

/* =====================================================
   FORMULARIO DE LOGIN
   ===================================================== */

.login-form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-options {
    margin-bottom: 25px;
}

/* Checkbox personalizada */
.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: #666;
}

.checkbox-container input {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    margin-right: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-container input:checked + .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkbox-container input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* =====================================================
   BOTÓN DE LOGIN
   ===================================================== */

.login-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.login-button:active {
    transform: translateY(0);
}

.login-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.login-button.loading {
    pointer-events: none;
}

.button-text {
    transition: opacity 0.3s ease;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: none;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* =====================================================
   MENSAJES DE ESTADO
   ===================================================== */

.status-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(-10px);
}

.status-message.show {
    opacity: 1;
    transform: translateY(0);
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.status-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* =====================================================
   CUENTAS DEMO
   ===================================================== */

.demo-accounts {
    background: rgba(255,255,255,0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.demo-accounts h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
    font-size: 1.3rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.demo-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.demo-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.demo-card:active {
    transform: translateY(-1px);
}

.demo-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.demo-info h4 {
    margin-bottom: 5px;
    color: #333;
    font-size: 1.1rem;
}

.demo-info p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.demo-role {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.demo-role.full-access {
    background: #28a745;
}

/* =====================================================
   DASHBOARD STYLES
   ===================================================== */

.dashboard-container {
    min-height: 100vh;
    background: #f8f9fa;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content h1 {
    font-size: 1.8rem;
    margin: 0;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.user-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.user-role {
    font-size: 0.9rem;
    opacity: 0.9;
}

.user-plan {
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-plan.admin {
    background: #28a745;
}

.user-plan.premium {
    background: #ffc107;
    color: #333;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* =====================================================
   CONTENIDO DEL DASHBOARD
   ===================================================== */

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.welcome-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.welcome-section h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 2rem;
}

.welcome-section p {
    color: #666;
    font-size: 1.1rem;
}

.dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.info-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
}

.info-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-card p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.green {
    background: #28a745;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.credentials {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    border-left: 4px solid #667eea;
}

.hosting-details {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    border-left: 4px solid #28a745;
}

.hosting-details div {
    margin-bottom: 5px;
}

.hosting-details div:last-child {
    margin-bottom: 0;
}

/* =====================================================
   ERROR MESSAGES
   ===================================================== */

.error-message {
    background: #dc3545;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */

@media (max-width: 768px) {
    .login-container {
        padding: 15px;
    }
    
    .login-header h1 {
        font-size: 2rem;
    }
    
    .login-form-container {
        padding: 20px;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .user-info {
        align-items: center;
    }
    
    .user-details {
        align-items: center;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
    }
    
    .welcome-section {
        padding: 20px;
    }
    
    .welcome-section h2 {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 1.8rem;
    }
    
    .demo-card {
        padding: 15px;
    }
    
    .info-card {
        padding: 20px;
    }
    
    .dashboard-main {
        padding: 20px 15px;
    }
}