/* =============================================================================
   SISTEMA DE DISEÑO CORPORATIVO - HOSTING AGRO HUERTATEK
   Estilos adaptados a los colores oficiales de Huertatek.com
   ============================================================================= */

/* Importación de Fuentes Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Variables de Color (Paleta Oficial Huertatek - Light Mode Premium) */
:root {
    --bg-main: #f8fdf8;
    --bg-grad-start: #f8fdf8;
    --bg-grad-end: #eaf5eb;
    
    --card-bg: #ffffff;
    --card-border: rgba(0, 0, 0, 0.08);
    --card-border-focus: rgba(46, 125, 50, 0.4);
    
    --primary: #2e7d32;
    --primary-hover: #1b5e20;
    --primary-glow: rgba(46, 125, 50, 0.15);
    
    --accent: #f1c40f;
    --danger: #d32f2f;
    --danger-hover: #c62828;
    --info: #1976d2;
    
    --text-main: #1a1a1a;
    --text-muted: #555555;
    --text-dark: #ffffff; /* Usado para texto en botones primarios oscuros */
    
    --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --border-radius: 16px;
}

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

body {
    background: linear-gradient(135deg, var(--bg-grad-start) 0%, var(--bg-grad-end) 100%);
    color: var(--text-main);
    font-family: var(--font-sans);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Estructura y Contenedores */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.auth-wrapper {
    min-height: calc(100vh - 150px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 20px 60px 20px;
}

/* Landing Page Hero */
.hero-section {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.88), rgba(27, 94, 32, 0.92)),
        url('hero-vegetation-bg.png') center/cover no-repeat;
    color: white;
    padding: 90px 20px 140px 20px;
    position: relative;
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 40px;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero-text {
    text-align: left;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 20px;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 30px;
    line-height: 1.6;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.2);
}

.hero-image-container {
    position: relative;
    animation: floatSlow 6s ease-in-out infinite;
    display: flex;
    justify-content: center;
}

.hero-illustration {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
}

/* Hero Particles */
.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: particleFloat 20s infinite ease-in-out;
}

.particle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    background: radial-gradient(circle, rgba(129, 199, 132, 0.2) 0%, transparent 70%);
    animation-delay: 0s;
}

.particle-2 {
    width: 200px;
    height: 200px;
    top: 50%;
    right: -50px;
    background: radial-gradient(circle, rgba(76, 175, 80, 0.15) 0%, transparent 70%);
    animation-delay: -5s;
}

.particle-3 {
    width: 150px;
    height: 150px;
    bottom: 100px;
    left: 30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation-delay: -10s;
}

.particle-4 {
    width: 100px;
    height: 100px;
    top: 30%;
    left: 60%;
    background: radial-gradient(circle, rgba(129, 199, 132, 0.15) 0%, transparent 70%);
    animation-delay: -15s;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.1); }
    50% { transform: translate(-20px, 20px) scale(0.9); }
    75% { transform: translate(20px, 10px) scale(1.05); }
}

@keyframes floatSlow {
    0% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
    100% { transform: translateY(0) rotate(0deg); }
}

@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    .hero-text {
        text-align: center;
    }
    .hero-text h1 {
        font-size: 2.8rem;
    }
}

/* Tarjetas y Contenedores de Vidrio (Glassmorphic) */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-normal), border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.glass-card:hover {
    border-color: var(--card-border-focus);
    box-shadow: 0 8px 30px rgba(46, 125, 50, 0.08);
}

.glass-card.auth-card {
    width: 100%;
    max-width: 520px;
    padding: 40px;
}

/* Grid de Beneficios en la Landing */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.feature-box {
    text-align: center;
    padding: 25px;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-box h3 {
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--primary);
}

.feature-box p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Formularios y Inputs */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-main);
    font-family: var(--font-sans);
    font-size: 1rem;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 8px rgba(46, 125, 50, 0.15);
}

.input-subdomain-wrapper {
    display: flex;
    align-items: center;
}

.subdomain-suffix {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-left: none;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.input-subdomain-wrapper .form-input {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

/* Botones Premium */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 4px 14px rgba(46, 125, 50, 0.25);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, 0.35);
}

.btn-secondary {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.btn-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.btn-danger {
    background: var(--danger);
    color: #ffffff;
}

.btn-danger:hover {
    background: var(--danger-hover);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

/* Estilo Botones Redondeados del Hero (Clonado de Huertatek.com) */
.cta-button {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    border: none;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    cursor: pointer;
}

.cta-button-primary {
    background: white;
    color: var(--primary-hover) !important;
}

.cta-button-primary:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.cta-button-secondary {
    background-color: rgba(0, 0, 0, 0.3);
    color: white !important;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-button-secondary:hover {
    background-color: rgba(0, 0, 0, 0.5);
    border-color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Alertas y Feedback */
.alert {
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    border: 1px solid transparent;
}

.alert-danger {
    background: rgba(211, 47, 47, 0.1);
    border-color: rgba(211, 47, 47, 0.2);
    color: #b71c1c;
}

.alert-success {
    background: rgba(46, 125, 50, 0.1);
    border-color: rgba(46, 125, 50, 0.2);
    color: #1b5e20;
}

.alert-warning {
    background: rgba(241, 196, 15, 0.1);
    border-color: rgba(241, 196, 15, 0.2);
    color: #856404;
}

.subdomain-feedback {
    font-size: 0.85rem;
    margin-top: 5px;
    font-weight: 600;
}

.feedback-checking { color: var(--accent); }
.feedback-available { color: var(--primary); }
.feedback-unavailable { color: var(--danger); }

/* Navegación y Cabeceras */
.app-header {
    background: linear-gradient(145deg, #4caf50, #2e7d32);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.brand img {
    height: 45px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    font-size: 1rem;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.nav-links a.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Panel Layout */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .hero-section h1 {
        font-size: 2.2rem;
    }
}

.panel-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.panel-subtitle {
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* Tablas Premium */
.table-responsive {
    overflow-x: auto;
    margin-top: 20px;
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.95rem;
}

.premium-table th {
    background: rgba(0, 0, 0, 0.02);
    padding: 16px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--card-border);
}

.premium-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    color: var(--text-main);
}

.premium-table tr:hover td {
    background: rgba(0, 0, 0, 0.01);
}

/* Insignias de Estado */
.status-badge {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.status-active {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
}

.status-suspended {
    background: rgba(241, 196, 15, 0.15);
    color: #d48c00;
}

.status-deleted {
    background: rgba(211, 47, 47, 0.15);
    color: #d32f2f;
}

.status-pending {
    background: rgba(25, 118, 210, 0.15);
    color: #1976d2;
}


/* Panel de Administración: Tarjetas de Métricas */
.metrics-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    padding: 25px;
    display: flex;
    flex-direction: column;
}

.metric-card .label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 5px;
}

.metric-card .val {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.metric-card .val span {
    color: var(--primary);
}

/* Modales y Cuadros de Diálogo */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

.modal {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--transition-normal);
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.modal p {
    color: var(--text-muted);
}

.modal-backdrop.open .modal {
    transform: scale(1);
}

/* Credenciales y Detalles de Sitio */
.credentials-box {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.cred-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 0.95rem;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.08);
    padding-bottom: 8px;
}

.cred-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.cred-label {
    color: var(--text-muted);
    font-weight: 600;
}

.cred-val {
    font-family: monospace;
    color: var(--text-main);
    font-weight: 700;
    word-break: break-all;
}

/* Enlaces de Ayuda y Tutoriales */
.help-links {
    margin-top: 20px;
}

.help-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: rgba(0, 0, 0, 0.01);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin-bottom: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: all var(--transition-fast);
}

.help-item:hover {
    background: rgba(46, 125, 50, 0.05);
    border-color: var(--primary);
    transform: translateX(5px);
}

.help-icon {
    font-size: 1.2rem;
    color: var(--primary);
    margin-right: 12px;
}

.help-text {
    font-weight: 600;
    font-size: 0.9rem;
}

/* Footer General */
.app-footer {
    border-top: 1px solid var(--card-border);
    padding: 30px 20px;
    text-align: center;
    margin-top: 80px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Responsive Header */
@media (max-width: 1024px) {
    .header-container {
        flex-direction: column;
        gap: 12px;
        padding: 12px 15px;
    }
    .nav-links {
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
        justify-content: flex-start;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        gap: 4px;
    }
    .nav-links::-webkit-scrollbar {
        height: 3px;
    }
    .nav-links::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
    }
}

/* Info Split Grid */
.info-split-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
}

@media (max-width: 992px) {
    .info-split-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* Identidad Digital Section Style (Estilo Pattern Roots de Huertatek.com) */
.identity-digital-section {
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.88), rgba(27, 94, 32, 0.92)),
        url('fondo-hidroponia.jpg') center/cover no-repeat;
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
    margin: 60px 0;
}

.identity-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.identity-digital-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

.identity-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 3.5rem;
    align-items: center;
    position: relative;
    z-index: 2;
}

.identity-left h2 {
    font-size: 2.2rem;
    color: white !important;
    margin-bottom: 1.5rem;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.identity-left p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.identity-right {
    background: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.identity-right h3 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.identity-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.identity-list li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 1.05rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    text-align: left;
}

.identity-list li i {
    color: #ffffff;
    font-size: 1.15rem;
    margin-top: 3px;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

.identity-list li strong {
    color: #ffffff;
    font-weight: 700;
}

@media (max-width: 992px) {
    .identity-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .identity-digital-section {
        padding: 3rem 0;
    }
}
