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

:root {
    --bg-color: #0f172a; /* Slate 900 */
    --card-bg: rgba(30, 41, 59, 0.6); /* Slate 800 glass */
    --card-border: rgba(255, 255, 255, 0.08);
    --card-border-hover: rgba(16, 185, 129, 0.5); /* Green glow hover */
    --text-color: #f8fafc; /* Slate 50 */
    --text-muted: #94a3b8; /* Slate 400 */
    --accent-primary: #10b981; /* Emerald 500 */
    --accent-hover: #059669; /* Emerald 600 */
    --accent-glow: rgba(16, 185, 129, 0.15);
    
    --font-sans: 'Inter', sans-serif;
    --font-brand: 'Outfit', sans-serif;

    /* Module specific accent colors */
    --color-campo: #10b981; /* Emerald */
    --color-contable: #eab308; /* Yellow/Gold */
    --color-comercial: #3b82f6; /* Blue */
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(234, 179, 8, 0.03) 0px, transparent 50%),
        radial-gradient(at 50% 100%, rgba(15, 23, 42, 1) 0px, transparent 50%);
    color: var(--text-color);
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Subtle top decorative bar */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-campo), var(--color-contable));
    z-index: 100;
}

/* Background light orbs */
.glow-bg-1 {
    position: fixed;
    top: -100px;
    left: -50px;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.06) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

.glow-bg-2 {
    position: fixed;
    bottom: -100px;
    right: -50px;
    width: 45vw;
    height: 45vw;
    background: radial-gradient(circle, rgba(234, 179, 8, 0.04) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
    filter: blur(80px);
}

/* Main Layout Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 100%;
}

/* Header styling */
header {
    text-align: center;
    margin-bottom: 40px;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-area-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.header-logo-icon {
    height: 80px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(16, 185, 129, 0.3));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.header-logo-icon:hover {
    transform: scale(1.08) rotate(-3deg);
}

.header-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(99%) sepia(1%) saturate(1142%) hue-rotate(185deg) Page;
    transition: transform 0.3s ease;
}

.header-logo-img:hover {
    transform: scale(1.03);
}

.hero-text h2 {
    font-family: var(--font-brand);
    font-size: 0.85rem;
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    font-weight: 700;
}

.hero-text h1 {
    font-family: var(--font-brand);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 12px;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--color-campo) 0%, var(--color-contable) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-muted);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0 auto 16px auto;
    line-height: 1.6;
}

.support-area {
    display: flex;
    justify-content: center;
}

.support-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
}

.support-link i {
    width: 16px;
    height: 16px;
    color: var(--accent-primary);
}

.support-link:hover {
    color: var(--text-color);
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Systems Section */
.system-section {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
}

.system-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px; /* Centered 3 column layout */
    margin: 0 auto;
}

/* Cards */
.system-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.05);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    cursor: default;

    /* Entry animations */
    opacity: 0;
    transform: translateY(20px);
    animation: cardReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.system-card:nth-child(1) { animation-delay: 0.1s; }
.system-card:nth-child(2) { animation-delay: 0.2s; }
.system-card:nth-child(3) { animation-delay: 0.3s; }

@keyframes cardReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Top colored accent bar on hover */
.system-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.system-card.campo-card::before { background: linear-gradient(90deg, var(--color-campo), #34d399); }
.system-card.contable-card::before { background: linear-gradient(90deg, var(--color-contable), #fbbf24); }
.system-card.comercial-card::before { background: linear-gradient(90deg, var(--color-comercial), #60a5fa); }

.system-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.4), 0 0 20px rgba(16, 185, 129, 0.05);
}

.system-card.campo-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
}

.system-card.contable-card:hover {
    border-color: rgba(234, 179, 8, 0.35);
}

.system-card.comercial-card:hover {
    border-color: rgba(59, 130, 246, 0.35);
}

.system-card:hover::before {
    opacity: 1;
}

/* Glow effects */
.card-glow-effect {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.system-card:hover .card-glow-effect {
    opacity: 1;
}

/* Icons */
.card-icon-wrapper {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-icon-wrapper i {
    width: 24px;
    height: 24px;
}

.system-card:hover .card-icon-wrapper {
    transform: scale(1.1) translateY(-2px);
}

.card-icon-wrapper.campo {
    background: rgba(16, 185, 129, 0.1);
    color: var(--color-campo);
    filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.2));
}

.card-icon-wrapper.contable {
    background: rgba(234, 179, 8, 0.1);
    color: var(--color-contable);
    filter: drop-shadow(0 0 10px rgba(234, 179, 8, 0.2));
}

.card-icon-wrapper.comercial {
    background: rgba(59, 130, 246, 0.1);
    color: var(--color-comercial);
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.2));
}

/* Typography in cards */
.system-card h3 {
    font-family: var(--font-brand);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 6px;
}

.module-code {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    margin-bottom: 12px;
    display: inline-block;
}

.campo-card .module-code {
    color: var(--color-campo);
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.15);
}

.contable-card .module-code {
    color: var(--color-contable);
    background: rgba(234, 179, 8, 0.08);
    border: 1px solid rgba(234, 179, 8, 0.15);
}

.comercial-card .module-code {
    color: var(--color-comercial);
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
}

.card-description {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

/* Buttons */
.enter-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 10px 18px;
    color: #e2e8f0;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.enter-btn i {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.campo-card:hover .enter-btn:not(:disabled) {
    background: var(--color-campo);
    border-color: var(--color-campo);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.contable-card:hover .enter-btn:not(:disabled) {
    background: var(--color-contable);
    border-color: var(--color-contable);
    color: #0f172a;
    box-shadow: 0 8px 20px rgba(234, 179, 8, 0.3);
}

.comercial-card:hover .enter-btn:not(:disabled) {
    background: var(--color-comercial);
    border-color: var(--color-comercial);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.system-card:hover .enter-btn:not(:disabled) i {
    transform: translateX(4px);
}

/* Migration Notice */
.migration-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(234, 179, 8, 0.06); /* Transparent gold */
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 10px;
    padding: 10px 14px;
    margin-bottom: 16px;
    width: 100%;
    color: #fef08a; /* Yellow 200 */
    font-size: 0.78rem;
    font-weight: 500;
}

.migration-notice i {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-contable);
}

.icon-spin {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Disabled button state */
.enter-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: rgba(255, 255, 255, 0.02) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    color: var(--text-muted) !important;
    box-shadow: none !important;
}


/* Offline toast */
.offline-toast {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: #ef4444;
    border-radius: 12px;
    padding: 12px 20px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3);
    z-index: 1000;
    transform: translateY(150px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.offline-toast.visible {
    transform: translateY(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast-content i {
    width: 18px;
    height: 18px;
}

/* Floating WhatsApp button */
.whatsapp-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25d366;
    color: #ffffff;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.25);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.35);
}

/* Footer styling */
footer {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

footer p {
    color: var(--text-muted);
    font-size: 0.8rem;
    letter-spacing: 0.5px;
}

/* Responsive configurations */
@media (max-width: 768px) {
    .container { padding: 40px 16px; }
    .system-grid { grid-template-columns: 1fr; gap: 20px; max-width: 450px; }
    .hero-text h1 { font-size: 1.8rem; }
    .whatsapp-btn { bottom: 20px; right: 20px; padding: 10px 18px; }
}
