/**
 * Multiapps — Estilos (Landing moderna + Admin)
 */

:root {
    --primary-color: #123B6F;
    --secondary-color: #00C2C7;
    --dark-color: #333842;
    --light-bg: #F4F7FB;
    --white: #FFFFFF;
    --text-muted: #6B7280;
    --shadow-sm: 0 2px 8px rgba(18, 59, 111, 0.08);
    --shadow-md: 0 8px 24px rgba(18, 59, 111, 0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: 0.3s ease;
    --hero-dark: #060d18;
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
}

* { box-sizing: border-box; }

/* ══════════════════════════════════════
   LANDING — Diseño moderno SaaS 2026
   ══════════════════════════════════════ */

.landing-body {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    color: var(--dark-color);
    background: #f8fafc;
    line-height: 1.6;
    padding-top: 80px;
    overflow-x: hidden;
}

/* Navbar glass */
.landing-nav {
    background: rgba(6, 13, 24, 0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.85rem 0;
    transition: all var(--transition);
}

.landing-nav.scrolled {
    background: rgba(6, 13, 24, 0.92);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.landing-brand {
    font-size: 1.25rem;
    font-weight: 800;
    color: #fff !important;
    letter-spacing: -0.02em;
}

.landing-link {
    color: rgba(255, 255, 255, 0.75) !important;
    font-weight: 500;
    font-size: 0.92rem;
    padding: 0.5rem 0.85rem !important;
    border-radius: 8px;
    transition: all var(--transition);
}

.landing-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.08);
}

.landing-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.25);
}

.landing-nav .navbar-toggler-icon {
    filter: invert(1);
}

.brand-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: #fff;
    border-radius: 10px;
    margin-right: 8px;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(0, 194, 199, 0.35);
}

/* Hero */
.landing-hero {
    position: relative;
    background: var(--hero-dark);
    color: #fff;
    overflow: hidden;
    margin-top: -80px;
    padding-top: 80px;
}

.hero-mesh {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 10% 20%, rgba(0, 194, 199, 0.18), transparent 55%),
        radial-gradient(ellipse 60% 50% at 90% 10%, rgba(18, 59, 111, 0.45), transparent 50%),
        radial-gradient(ellipse 50% 40% at 70% 90%, rgba(0, 194, 199, 0.12), transparent 50%);
    pointer-events: none;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%);
    pointer-events: none;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(0, 194, 199, 0.1);
    border: 1px solid rgba(0, 194, 199, 0.25);
    padding: 0.4rem 1rem;
    border-radius: 999px;
    margin-bottom: 1.5rem;
}

.hero-eyebrow-dot {
    width: 8px;
    height: 8px;
    background: var(--secondary-color);
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
}

.hero-headline {
    font-size: clamp(2.4rem, 5.5vw, 4rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
}

.hero-headline-accent {
    display: block;
    background: linear-gradient(135deg, var(--secondary-color), #7ee8eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-lead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.88);
    font-weight: 500;
    margin-bottom: 0.75rem;
    max-width: 520px;
}

.hero-copy {
    color: rgba(255, 255, 255, 0.55);
    max-width: 500px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2.5rem;
}

.btn-hero-primary {
    background: linear-gradient(135deg, var(--secondary-color), #00a8ad);
    color: #060d18;
    font-weight: 700;
    border: none;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition);
    box-shadow: 0 4px 24px rgba(0, 194, 199, 0.35);
}

.btn-hero-primary:hover {
    color: #060d18;
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(0, 194, 199, 0.45);
}

.btn-hero-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all var(--transition);
}

.btn-hero-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-landing-cta {
    background: linear-gradient(135deg, var(--secondary-color), #00a8ad);
    color: #060d18 !important;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    padding: 0.55rem 1.25rem;
    transition: all var(--transition);
}

.btn-landing-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 194, 199, 0.4);
    color: #060d18 !important;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.hero-stat strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hero-stat span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Hero bento */
.hero-bento {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.glass-panel {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 1.25rem;
}

.bento-cell-lg { grid-column: span 2; }

.bento-cell-wide { grid-column: span 2; }

.bento-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.bento-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.bento-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.bento-tags span {
    font-size: 0.75rem;
    padding: 0.3rem 0.65rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.75);
}

.bento-icon {
    font-size: 1.25rem;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.bento-cell strong {
    display: block;
    font-size: 0.9rem;
}

.bento-cell small {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.78rem;
}

.bento-progress span {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

.bento-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.bento-bar-fill {
    height: 100%;
    width: 78%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 4px;
    animation: bar-grow 2s ease-out;
}

@keyframes bar-grow {
    from { width: 0; }
    to { width: 78%; }
}

/* Sections */
.landing-section {
    padding: 5rem 0;
}

.landing-section--alt {
    background: linear-gradient(180deg, #eef2f7 0%, #f8fafc 100%);
}

.section-head {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3rem;
}

.section-kicker {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
}

.section-heading {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--hero-dark);
    margin-bottom: 0.75rem;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0;
}

/* Category bento */
.category-bento {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.category-tile {
    display: block;
    text-decoration: none;
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 20px;
    padding: 1.75rem;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.category-tile::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 194, 199, 0.06), rgba(18, 59, 111, 0.04));
    opacity: 0;
    transition: opacity var(--transition);
}

.category-tile:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(18, 59, 111, 0.12);
    border-color: rgba(0, 194, 199, 0.35);
}

.category-tile:hover::before { opacity: 1; }

.category-tile-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary-color), #1a5088);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    position: relative;
}

.category-tile-icon i {
    color: #fff;
    font-size: 1.25rem;
}

.category-tile h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--hero-dark);
    margin-bottom: 0.5rem;
    position: relative;
}

.category-tile p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.5;
    position: relative;
}

.category-tile-link {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--secondary-color);
    position: relative;
}

.category-tile-link i {
    transition: transform var(--transition);
}

.category-tile:hover .category-tile-link i {
    transform: translateX(4px);
}

/* Projects bento (destacados) */
.projects-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.projects-bento-item--wide {
    grid-column: span 2;
}

/* Project cards */
.project-card {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.project-card::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, transparent, transparent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    transition: background var(--transition);
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(18, 59, 111, 0.14);
}

.project-card:hover::after {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
}

.project-card--featured {
    border-color: rgba(0, 194, 199, 0.25);
}

.project-cover {
    height: 180px;
    overflow: hidden;
    position: relative;
}

.project-cover--placeholder .project-cover-gradient {
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.85;
}

.project-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-cover img {
    transform: scale(1.06);
}

.project-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(6, 13, 24, 0.75);
    backdrop-filter: blur(8px);
    color: #ffd966;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 217, 102, 0.3);
}

.project-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.project-logo {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #f1f5f9;
    border: 1px solid #e8edf3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.project-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hero-dark);
    margin-bottom: 0.2rem;
    letter-spacing: -0.01em;
}

.project-category {
    font-size: 0.78rem;
    color: var(--secondary-color);
    font-weight: 600;
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    flex: 1;
    margin-bottom: 1.25rem;
    line-height: 1.55;
}

.btn-demo {
    background: var(--hero-dark);
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    padding: 0.75rem 1.25rem;
    transition: all var(--transition);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.btn-demo:hover {
    background: linear-gradient(135deg, var(--primary-color), #1a5088);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(18, 59, 111, 0.25);
}

.btn-demo i {
    transition: transform var(--transition);
}

.btn-demo:hover i {
    transform: translateX(4px);
}

/* CTA band */
.landing-cta-band {
    padding: 2rem 0 5rem;
}

.cta-band-inner {
    background: linear-gradient(135deg, var(--primary-color), #0a2540);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.cta-band-inner h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.cta-band-inner p {
    color: rgba(255, 255, 255, 0.65);
    margin: 0;
}

.cta-band-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Footer */
.landing-footer {
    position: relative;
    background: var(--hero-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 4rem 0 2rem;
    overflow: hidden;
}

.landing-footer-glow {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 200px;
    background: radial-gradient(ellipse, rgba(0, 194, 199, 0.15), transparent 70%);
    pointer-events: none;
}

.landing-footer-brand {
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
}

.landing-footer-desc {
    color: rgba(255, 255, 255, 0.5);
    max-width: 420px;
}

.landing-footer-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 2.5rem 0 1.5rem;
}

.landing-footer-copy {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.35);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 20px;
    border: 1px dashed #dde3ea;
}

.empty-state i {
    font-size: 3rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-muted);
    margin: 0;
}

/* WhatsApp float */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
    z-index: 999;
    transition: all var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    background: #1da851;
    color: #fff;
    transform: scale(1.08);
}

/* Scroll reveal */
.reveal-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-up.visible,
.reveal-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-card {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* ══════════════════════════════════════
   ADMIN + utilidades compartidas
   ══════════════════════════════════════ */

body.admin-body,
.login-page body {
    font-family: 'Inter', sans-serif;
    padding-top: 0;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
    border-radius: 8px;
}

.btn-primary:hover {
    background: #0e2f58;
    border-color: #0e2f58;
}

.btn-whatsapp {
    background: #25D366;
    border-color: #25D366;
    color: #fff !important;
    font-weight: 600;
    border-radius: 8px;
}

.btn-whatsapp:hover {
    background: #1da851;
    color: #fff !important;
}

.admin-body {
    background: var(--light-bg);
    min-height: 100vh;
}

.admin-wrapper { display: flex; min-height: 100vh; }

.admin-sidebar {
    width: 260px;
    background: var(--primary-color);
    color: #fff;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform var(--transition);
}

.admin-sidebar-brand {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.admin-sidebar-brand a { color: #fff; text-decoration: none; }

.admin-nav { padding: 1rem 0; }

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
}

.admin-content { flex: 1; margin-left: 260px; padding: 2rem; }

.admin-topbar {
    background: #fff;
    padding: 1rem 2rem;
    margin: -2rem -2rem 2rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card { text-align: center; padding: 1.5rem; }

.admin-stat-card .stat-icon {
    width: 48px; height: 48px;
    margin: 0 auto 0.75rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.admin-stat-card .stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.admin-stat-card .stat-label { font-size: 0.85rem; color: var(--text-muted); }

.stat-icon-primary { background: rgba(18, 59, 111, 0.1); color: var(--primary-color); }
.stat-icon-secondary { background: rgba(0, 194, 199, 0.1); color: var(--secondary-color); }
.stat-icon-success { background: rgba(40, 167, 69, 0.1); color: #28a745; }
.stat-icon-warning { background: rgba(255, 193, 7, 0.1); color: #ffc107; }

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), #1a4d8a);
    padding: 2rem;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-logo { text-align: center; margin-bottom: 2rem; }
.login-logo i { font-size: 3rem; color: var(--primary-color); }

.table-actions .btn { padding: 0.25rem 0.5rem; font-size: 0.85rem; }
.badge-featured { background: var(--secondary-color); }

.img-preview {
    max-width: 80px;
    max-height: 80px;
    border-radius: 8px;
    object-fit: cover;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 991.98px) {
    .projects-bento { grid-template-columns: 1fr; }
    .projects-bento-item--wide { grid-column: span 1; }
    .hero-bento { grid-template-columns: 1fr; }
    .bento-cell-lg, .bento-cell-wide { grid-column: span 1; }

    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
    .sidebar-toggle { display: block; }
}

@media (max-width: 767.98px) {
    .landing-body { padding-top: 72px; }
    .hero-actions .btn-hero-primary,
    .hero-actions .btn-hero-ghost { width: 100%; justify-content: center; }
    .hero-stats { gap: 1.25rem; }
    .cta-band-inner { padding: 2rem 1.5rem; flex-direction: column; text-align: center; }
    .cta-band-actions { justify-content: center; }
    .whatsapp-float { bottom: 16px; right: 16px; width: 50px; height: 50px; font-size: 1.5rem; }
}
