/* Nexus - Premium Luxury Styles */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
    /* Luxury Color Palette */
    --nx-black: #0a0a0a;
    --nx-charcoal: #1a1a1a;
    --nx-white: #ffffff;
    --nx-ivory: #fafaf8;
    --nx-cream: #f5f5f3;
    --nx-gold: #b8860b;
    --nx-gold-light: #d4a84b;
    --nx-gold-subtle: rgba(184, 134, 11, 0.08);
    --nx-text: #1a1a1a;
    --nx-text-light: #6b6b6b;
    --nx-text-muted: #999999;
    --nx-border: #e8e8e6;
    --nx-border-dark: #2a2a2a;

    /* Premium Shadows */
    --nx-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --nx-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    --nx-shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
    --nx-shadow-gold: 0 8px 30px rgba(184, 134, 11, 0.1);

    /* Typography */
    --nx-font-display: 'Playfair Display', Georgia, serif;
    --nx-font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --nx-section-padding: 8rem;
}

/* Base Styles */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--nx-font-body);
    font-weight: 400;
    color: var(--nx-text);
    background: var(--nx-white);
    line-height: 1.7;
}

/* Premium Typography */
h1, h2, h3, h4, h5 {
    font-family: var(--nx-font-display);
    font-weight: 500;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* ===== NAVBAR ===== */
.navbar-nexus {
    background: var(--nx-white);
    border-bottom: 1px solid var(--nx-border);
    padding: 0.5rem 0;
    transition: all 0.3s ease;
}

.navbar-nexus.scrolled {
    box-shadow: var(--nx-shadow-sm);
}

.navbar-nexus .navbar-brand {
    color: var(--nx-black);
    font-family: var(--nx-font-body);
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.navbar-nexus .navbar-brand img {
    height: 22px;
}

.navbar-nexus .nav-link {
    color: var(--nx-text-light);
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.4rem 0.9rem;
    transition: color 0.3s ease;
}

.navbar-nexus .nav-link:hover {
    color: var(--nx-black);
}

.navbar-nexus .navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-nexus .navbar-toggler:focus {
    box-shadow: none;
}

.navbar-nexus .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.6%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='1.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar brand text - hide on mobile to prevent overlap */
@media (max-width: 991px) {
    .navbar-nexus .navbar-brand span {
        display: none;
    }

    .navbar-nexus .navbar-brand img {
        height: 32px;
    }
}

/* ===== HERO SECTION ===== */
.hero-premium {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--nx-white);
    position: relative;
    overflow: hidden;
}

.hero-premium::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 200%;
    background: linear-gradient(135deg, var(--nx-cream) 0%, transparent 60%);
    transform: rotate(-12deg);
    pointer-events: none;
}

.hero-premium .hero-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--nx-gold);
    margin-bottom: 2rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--nx-gold);
}

.hero-premium h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 400;
    color: var(--nx-black);
    margin-bottom: 2rem;
    max-width: 800px;
}

.hero-premium h1 span {
    font-style: italic;
    color: var(--nx-gold);
}

.hero-premium .hero-text {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 540px;
    margin-bottom: 3rem;
    line-height: 1.8;
}

/* ===== BUTTONS ===== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--nx-black);
    color: var(--nx-white);
    border: none;
    padding: 1.1rem 2.5rem;
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium:hover {
    background: var(--nx-charcoal);
    color: var(--nx-white);
    transform: translateY(-2px);
    box-shadow: var(--nx-shadow-lg);
}

.btn-premium-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    color: var(--nx-black);
    border: 1px solid var(--nx-black);
    padding: 1.1rem 2.5rem;
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-outline:hover {
    background: var(--nx-black);
    color: var(--nx-white);
}

.btn-premium-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: transparent;
    color: var(--nx-gold);
    border: 1px solid var(--nx-gold);
    padding: 1.1rem 2.5rem;
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-gold:hover {
    background: var(--nx-gold);
    color: var(--nx-white);
}

.btn-sm {
    padding: 0.7rem 1.5rem;
    font-size: 0.75rem;
}

/* ===== SECTION STYLES ===== */
.section-premium {
    padding: var(--nx-section-padding) 0;
}

.section-dark {
    background: var(--nx-black);
    color: var(--nx-white);
}

.section-cream {
    background: var(--nx-cream);
}

.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--nx-gold);
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.section-title-sm {
    font-size: clamp(2rem, 3vw, 2.5rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--nx-text-light);
    max-width: 600px;
    line-height: 1.8;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.6);
}

/* ===== VALUE CARDS ===== */
.value-card-premium {
    padding: 3rem;
    height: 100%;
    border: 1px solid var(--nx-border);
    background: var(--nx-white);
    transition: all 0.4s ease;
}

.value-card-premium:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-gold);
}

.value-card-premium .card-number {
    font-family: var(--nx-font-display);
    font-size: 3rem;
    font-weight: 600;
    color: var(--nx-gold);
    line-height: 1;
    margin-bottom: 2rem;
    opacity: 0.85;
}

.value-card-premium h3 {
    font-size: 1.35rem;
    font-weight: 500;
    margin-bottom: 1rem;
    color: var(--nx-black);
}

.value-card-premium p {
    font-size: 0.95rem;
    color: var(--nx-text-light);
    line-height: 1.7;
    margin: 0;
}

/* ===== PROJECT CARDS PREMIUM ===== */
.project-card-premium {
    position: relative;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-premium:hover {
    border-color: var(--nx-gold);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: translateY(-12px);
}

.project-card-premium:hover .project-card-accent {
    transform: scaleX(1);
}

.project-card-premium:hover .project-card-logo img,
.project-card-premium:hover .project-card-icon {
    transform: scale(1.05);
}

/* Card Hero - Logo Showcase */
.project-card-hero {
    position: relative;
    padding: 2.5rem 2rem 1.5rem;
    background: linear-gradient(180deg, var(--nx-cream) 0%, var(--nx-white) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.project-card-logo {
    width: 100%;
    max-width: 220px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-icon {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--project-color) 8%, white);
    border: 2px solid color-mix(in srgb, var(--project-color) 20%, transparent);
    border-radius: 20px;
    font-size: 3rem;
    color: var(--project-color);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card-status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.9rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
    background: var(--nx-white);
}

.project-card-status-development { border-color: #3b82f6; color: #3b82f6; }
.project-card-status-beta { border-color: var(--nx-gold); color: var(--nx-gold); }
.project-card-status-production { border-color: #22c55e; color: #22c55e; }
.project-card-status-maintenance { border-color: #f97316; color: #f97316; }
.project-card-status-deprecated { border-color: #ef4444; color: #ef4444; }

/* Card Content */
.project-card-content {
    padding: 1.5rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-card-title {
    font-family: var(--nx-font-display);
    font-size: 1.4rem;
    font-weight: 500;
    color: var(--nx-text);
    margin: 0 0 0.75rem 0;
    text-align: center;
}

.project-card-description {
    color: var(--nx-text-light);
    font-size: 0.9rem;
    line-height: 1.7;
    text-align: center;
    margin: 0 0 1rem 0;
    flex: 1;
}

.project-card-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: auto;
}

.project-stack-tag {
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    color: var(--nx-text-light);
    background: var(--nx-cream);
    border: 1px solid var(--nx-border);
}

.project-stack-more {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--nx-gold);
    background: transparent;
}

/* Card Actions */
.project-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2rem;
    border-top: 1px solid var(--nx-border);
    background: var(--nx-cream);
}

.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--nx-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-card-link:hover {
    color: var(--nx-gold);
    gap: 0.75rem;
}

.project-card-external {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--nx-text-light);
    border: 1px solid var(--nx-border);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-card-external:hover {
    color: var(--nx-gold);
    border-color: var(--nx-gold);
}

/* Card Accent Line */
.project-card-accent {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--project-color, var(--nx-gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== PROJECT DETAIL PAGE ===== */
.project-hero {
    position: relative;
    padding: 10rem 0 5rem;
    background: var(--nx-cream);
    overflow: hidden;
}

.project-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(212, 175, 55, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.project-hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.project-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text-light);
    text-decoration: none;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

.project-back-link:hover {
    color: var(--nx-gold);
    gap: 0.75rem;
}

/* Logo Showcase */
.project-logo-showcase {
    margin-bottom: 2.5rem;
}

.project-logo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 320px;
    max-width: 90%;
    height: 100px;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 16px;
    padding: 1rem 2.5rem;
    box-shadow:
        0 20px 40px -12px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(212, 175, 55, 0.08);
}

.project-logo-frame img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-icon-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 180px;
    height: 180px;
    background: color-mix(in srgb, var(--project-color) 8%, white);
    border: 2px solid color-mix(in srgb, var(--project-color) 20%, transparent);
    border-radius: 24px;
    font-size: 5rem;
    color: var(--project-color);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* Hero Info */
.project-hero-info {
    max-width: 600px;
    margin: 0 auto;
}

.project-hero-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.project-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: 1px solid;
    background: var(--nx-white);
}

.project-status-badge-development { border-color: #3b82f6; color: #3b82f6; }
.project-status-badge-beta { border-color: var(--nx-gold); color: var(--nx-gold); }
.project-status-badge-production { border-color: #22c55e; color: #22c55e; }
.project-status-badge-maintenance { border-color: #f97316; color: #f97316; }
.project-status-badge-deprecated { border-color: #ef4444; color: #ef4444; }

.project-launch-date {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--nx-text-light);
}

.project-hero-title {
    font-family: var(--nx-font-display);
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    letter-spacing: -0.02em;
    color: var(--nx-text);
    margin: 0 0 1rem 0;
}

.project-hero-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--nx-text-light);
    margin: 0 0 2rem 0;
}

.project-hero-actions {
    margin-top: 2rem;
}

/* Project Details Section */
.project-details {
    padding: 5rem 0;
    background: var(--nx-white);
}

.project-content {
    max-width: 100%;
}

.project-section-title {
    font-family: var(--nx-font-display);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--nx-text);
    margin: 0 0 2rem 0;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nx-border);
}

.project-description-content {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--nx-text-light);
}

.project-description-content p {
    margin-bottom: 1.5rem;
}

/* Project Sidebar */
.project-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.project-info-card {
    background: var(--nx-cream);
    border: 1px solid var(--nx-border);
}

.project-info-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--nx-border);
}

.project-info-card-header i {
    font-size: 1.1rem;
    color: var(--nx-gold);
}

.project-info-card-header h3 {
    font-family: var(--nx-font-display);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text);
    margin: 0;
}

.project-info-card-body {
    padding: 1.5rem;
}

/* Tech Grid */
.project-tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tech-item {
    padding: 0.4rem 0.9rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nx-text);
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
}

/* Meta List */
.project-meta-list {
    margin: 0;
}

.project-meta-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--nx-border);
}

.project-meta-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.project-meta-item:first-child {
    padding-top: 0;
}

.project-meta-item dt {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nx-text-light);
}

.project-meta-item dd {
    font-size: 0.85rem;
    color: var(--nx-text);
    margin: 0;
    text-align: right;
}

.project-status-inline {
    font-size: 0.75rem;
    font-weight: 600;
}

.project-status-inline-development { color: #3b82f6; }
.project-status-inline-beta { color: var(--nx-gold); }
.project-status-inline-production { color: #22c55e; }
.project-status-inline-maintenance { color: #f97316; }
.project-status-inline-deprecated { color: #ef4444; }

.project-website-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--nx-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.project-website-link:hover {
    color: var(--nx-gold);
}

.project-website-link i {
    font-size: 0.85rem;
}

/* CTA Card */
.project-cta-card {
    padding: 2rem;
    background: var(--nx-text);
    text-align: center;
}

.project-cta-card p {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 1.25rem 0;
}

.project-cta-card .btn-premium-outline {
    border-color: var(--nx-gold);
    color: var(--nx-gold);
}

.project-cta-card .btn-premium-outline:hover {
    background: var(--nx-gold);
    color: var(--nx-text);
}

/* More Projects Section */
.project-more {
    padding: 3rem 0;
    background: var(--nx-cream);
    border-top: 1px solid var(--nx-border);
}

.project-more-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.project-more-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-light);
}

.project-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--nx-text);
    text-decoration: none;
    transition: all 0.3s ease;
}

.project-more-link:hover {
    color: var(--nx-gold);
    gap: 0.75rem;
}

/* Legacy project styles for admin */
.project-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 2.5rem;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-gold);
    transform: translateY(-8px);
}

.project-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--nx-border);
}

.project-logo {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--nx-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--nx-white);
}

.project-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.project-logo-lg { width: 80px; height: 80px; }
.project-icon-lg { width: 80px; height: 80px; font-size: 2rem; }

.project-card h4 {
    font-family: var(--nx-font-display);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.project-card p {
    color: var(--nx-text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: 1px solid;
}

.project-status-development { border-color: #3b82f6; color: #3b82f6; }
.project-status-beta { border-color: var(--nx-gold); color: var(--nx-gold); }
.project-status-production { border-color: #22c55e; color: #22c55e; }
.project-status-maintenance { border-color: #f97316; color: #f97316; }
.project-status-deprecated { border-color: #ef4444; color: #ef4444; }

/* Hide stack tags in public view */
.stack-tag {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .project-hero {
        padding: 8rem 0 4rem;
    }

    .project-logo-frame {
        width: 260px;
        height: 80px;
    }

    .project-icon-frame {
        width: 120px;
        height: 120px;
    }

    .project-card-logo {
        max-width: 180px;
        height: 60px;
    }

    .project-card-icon {
        width: 100px;
        height: 100px;
    }

    .project-more-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

/* ===== ABOUT STYLES ===== */
.about-header-premium {
    padding: 10rem 0 6rem;
    background: var(--nx-cream);
    text-align: center;
}

.about-header-premium h1 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.about-header-premium p {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.mission-premium {
    padding: 6rem 0;
    border-bottom: 1px solid var(--nx-border);
}

.mission-premium h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

.mission-premium .lead {
    font-size: 1.25rem;
    color: var(--nx-text-light);
    line-height: 1.9;
}

/* ===== APPROACH GRID ===== */
.approach-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--nx-border);
}

.approach-item:last-child {
    border-bottom: none;
}

.approach-number {
    font-family: var(--nx-font-display);
    font-size: 1rem;
    color: var(--nx-gold);
    margin-bottom: 1rem;
}

.approach-item h4 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.approach-item p {
    color: var(--nx-text-light);
    font-size: 0.95rem;
    margin: 0;
}

/* ===== CTA SECTION ===== */
.cta-premium {
    padding: 8rem 0;
    background: var(--nx-black);
    text-align: center;
}

.cta-premium h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 400;
    color: var(--nx-white);
    margin-bottom: 1.5rem;
}

.cta-premium p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

.cta-premium .btn-premium-gold:hover {
    background: var(--nx-gold);
    color: var(--nx-black);
}

/* ===== PRODUCTS HEADER ===== */
.products-header-premium {
    padding: 10rem 0 6rem;
    background: var(--nx-cream);
    text-align: center;
}

.products-header-premium h1 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.products-header-premium p {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== FOOTER ===== */
.footer-premium {
    background: linear-gradient(180deg, var(--nx-black) 0%, #0d0d0d 100%);
    color: rgba(255, 255, 255, 0.6);
    padding: 5rem 0 2rem;
    position: relative;
}

.footer-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--nx-gold), transparent);
}

.footer-premium .footer-brand {
    font-family: var(--nx-font-body);
    font-weight: 600;
    font-size: 1.35rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nx-white);
}

.footer-premium .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-premium .footer-logo img {
    height: 32px;
    width: auto;
}

.footer-premium .footer-tagline {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
    max-width: 320px;
}

.footer-premium .footer-description {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    line-height: 1.7;
    max-width: 320px;
    margin: 0;
}

.footer-premium h6 {
    font-family: var(--nx-font-body);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--nx-white);
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-premium h6::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--nx-gold);
}

.footer-premium .footer-links {
    margin: 0;
    padding: 0;
}

.footer-premium .footer-links li {
    margin-bottom: 0.75rem;
}

.footer-premium .footer-links a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-premium .footer-links a:hover {
    color: var(--nx-gold);
    transform: translateX(4px);
}

.footer-premium a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.footer-premium a:hover {
    color: var(--nx-gold);
}

.footer-premium .footer-social {
    display: flex;
    gap: 0.75rem;
}

.footer-premium .social-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.footer-premium .social-link:hover {
    border-color: var(--nx-gold);
    color: var(--nx-gold);
    transform: translateY(-2px);
}

.footer-premium .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 3rem;
    padding-top: 2rem;
}

.footer-premium .footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

@media (max-width: 767px) {
    .footer-premium {
        padding: 4rem 0 2rem;
    }

    .footer-premium h6 {
        margin-bottom: 1rem;
    }

    .footer-premium .footer-links li {
        margin-bottom: 0.5rem;
    }
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    gap: 0.25rem;
}

.language-switcher a {
    padding: 0.4rem 0.6rem;
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.language-switcher a:hover,
.language-switcher a.active {
    color: var(--nx-black);
    border-color: var(--nx-black);
}

.footer-premium .language-switcher a {
    color: rgba(255, 255, 255, 0.4);
}

.footer-premium .language-switcher a:hover,
.footer-premium .language-switcher a.active {
    color: var(--nx-white);
    border-color: var(--nx-white);
}

/* ===== DECORATIVE ELEMENTS ===== */
.gold-line {
    width: 60px;
    height: 1px;
    background: var(--nx-gold);
    margin: 2rem 0;
}

.gold-line-center {
    margin: 2rem auto;
}

/* ===== LOGIN PAGE ===== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nx-cream);
}

.login-card {
    background: var(--nx-white);
    padding: 3.5rem;
    width: 100%;
    max-width: 440px;
    border: 1px solid var(--nx-border);
    box-shadow: var(--nx-shadow);
}

/* ===== OLD CLASS COMPATIBILITY ===== */
.btn-nexus {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--nx-black);
    color: var(--nx-white);
    border: none;
    padding: 0.9rem 2rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-nexus:hover {
    background: var(--nx-charcoal);
    color: var(--nx-white);
}

.btn-nexus-outline {
    display: inline-flex;
    align-items: center;
    background: transparent;
    color: var(--nx-text-light);
    border: 1px solid var(--nx-border);
    padding: 0.6rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-nexus-outline:hover {
    border-color: var(--nx-black);
    color: var(--nx-black);
}

.btn-nexus-outline.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
}

/* ===== ADMIN STYLES ===== */

/* Admin Page Base */
.admin-page {
    background: #f8f9fa;
    min-height: 100vh;
}

/* Admin Wrapper */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0f0f0f 0%, #1a1a1a 100%);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-brand span {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
    letter-spacing: 0.15em;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav {
    flex: 1;
}

.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section-title {
    padding: 0.5rem 1.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
}

/* Categorías plegables del menú (nav_collapse_controller.js) */
.sidebar-nav .nav-section {
    margin-bottom: 0.5rem;
}

button.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    background: none;
    border: 0;
    text-align: left;
    cursor: pointer;
    transition: color 0.2s ease;
}

button.nav-section-title:hover,
.nav-section.is-open > button.nav-section-title {
    color: rgba(255, 255, 255, 0.6);
}

button.nav-section-title:focus-visible {
    outline: 2px solid var(--nx-gold);
    outline-offset: -2px;
}

.nav-section-chevron {
    font-size: 0.85rem;
    transition: transform 0.2s ease;
    transform: rotate(-90deg);
}

.nav-section.is-open > .nav-section-title .nav-section-chevron {
    transform: rotate(0deg);
}

.nav-section-items {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.2s ease;
}

.nav-section.is-open > .nav-section-items {
    grid-template-rows: 1fr;
}

.nav-section-items-inner {
    overflow: hidden;
    min-height: 0;
}

.nav-item-project {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.nav-item-project .nav-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Proyecto que no está en producción: punto de estado a la derecha */
.nav-status {
    margin-left: auto;
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
}

.nav-status-maintenance { background: #f59e0b; }
.nav-status-development,
.nav-status-beta { background: #38bdf8; }
.nav-status-deprecated { background: #ef4444; }

@media (prefers-reduced-motion: reduce) {
    .nav-section-items,
    .nav-section-chevron {
        transition: none;
    }
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 400;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--nx-gold);
}

.nav-item-subtle {
    color: rgba(255, 255, 255, 0.5);
}

.nav-icon {
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.nav-badge {
    margin-left: auto;
    background: var(--nx-gold);
    color: #000;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
}

/* Sidebar Footer */
.sidebar-footer {
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 1rem;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    margin: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    color: #fff;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
}

.user-logout {
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.1rem;
    padding: 0.25rem;
    transition: color 0.2s;
}

.user-logout:hover {
    color: #ef4444;
}

/* Sidebar Overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

/* Main Content Area */
.admin-main {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Top Bar */
.admin-topbar {
    background: #fff;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--nx-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--nx-text);
    cursor: pointer;
    padding: 0.25rem;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.admin-breadcrumb a {
    color: var(--nx-text-muted);
    text-decoration: none;
}

.admin-breadcrumb a:hover {
    color: var(--nx-text);
}

.admin-breadcrumb span {
    color: var(--nx-text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Admin Content */
.admin-content {
    flex: 1;
    padding: 2rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-header-pretitle {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin-bottom: 0.25rem;
}

.page-header-title {
    font-family: var(--nx-font-display);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--nx-text);
    margin: 0;
}

/* Alerts */
.alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border: none;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
}

.alert-danger {
    background: #fef2f2;
    color: #991b1b;
}

.alert-icon {
    font-size: 1.25rem;
}

.alert-content {
    flex: 1;
    font-size: 0.875rem;
}

.alert-close {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.5;
    cursor: pointer;
    padding: 0.25rem;
}

.alert-close:hover {
    opacity: 1;
}

/* Admin Footer */
.admin-footer {
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--nx-border);
    background: #fff;
    font-size: 0.8rem;
    color: var(--nx-text-muted);
}

/* Admin Cards */
.admin-card {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    overflow: hidden;
}

.admin-card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--nx-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--nx-text);
    margin: 0;
}

.admin-card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card-modern {
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.stat-card-modern:hover {
    border-color: var(--nx-gold);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon-primary { background: #eff6ff; color: #3b82f6; }
.stat-icon-success { background: #ecfdf5; color: #10b981; }
.stat-icon-warning { background: #fffbeb; color: #f59e0b; }
.stat-icon-info { background: #f0f9ff; color: #0ea5e9; }
.stat-icon-danger { background: #fef2f2; color: #dc2626; }

/* Clickable stat card */
.stat-card-clickable {
    text-decoration: none;
    cursor: pointer;
    position: relative;
}

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

.stat-card-attention {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fff 0%, #fef2f2 100%);
    animation: pulse-attention 2s infinite;
}

@keyframes pulse-attention {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.1); }
    50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

.stat-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: #dc2626;
    color: white;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.stat-content {
    flex: 1;
}

.stat-value-modern {
    font-family: var(--nx-font-display);
    font-size: 2rem;
    font-weight: 500;
    color: var(--nx-text);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label-modern {
    font-size: 0.8rem;
    color: var(--nx-text-muted);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    padding: 0.875rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    text-align: left;
    border-bottom: 1px solid var(--nx-border);
    background: #fafafa;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--nx-border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: #fafafa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Action Buttons */
.btn-action {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--nx-text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-action:hover {
    background: #f3f4f6;
    color: var(--nx-text);
}

.btn-action-danger:hover {
    background: #fef2f2;
    color: #ef4444;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: #f3f4f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--nx-text-muted);
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--nx-text);
    margin-bottom: 0.5rem;
}

.empty-state-text {
    font-size: 0.875rem;
    color: var(--nx-text-muted);
    margin-bottom: 1.5rem;
}

/* Project Item */
.project-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--nx-border);
    border-radius: 10px;
    transition: all 0.2s;
}

.project-item:hover {
    border-color: var(--nx-gold);
    background: #fafafa;
}

.project-item-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.project-item-content {
    flex: 1;
    min-width: 0;
}

.project-item-name {
    font-weight: 500;
    color: var(--nx-text);
    margin-bottom: 0.125rem;
}

.project-item-status {
    font-size: 0.75rem;
}

/* Quick Action Cards */
.quick-action {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.2s;
}

.quick-action:hover {
    border-color: var(--nx-gold);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.quick-action-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.quick-action-text {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-text);
    flex: 1;
}

.quick-action-attention {
    border-color: #fecaca;
    background: #fef2f2;
}

.quick-action-attention:hover {
    border-color: #dc2626;
}

.quick-action-badge {
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    min-width: 24px;
    text-align: center;
}

/* Contact avatar small (for dashboard) */
.contact-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--nx-gold) 0%, var(--nx-gold-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    flex-shrink: 0;
}

/* Admin Contact Styles */
.contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--nx-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-text-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.table-row-unread {
    background: #fffbeb;
}

.table-row-unread:hover {
    background: #fef3c7 !important;
}

.unread-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--nx-gold);
}

.contact-message-content {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--nx-text);
    white-space: pre-wrap;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-info-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--nx-cream);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-gold);
    font-size: 1rem;
    flex-shrink: 0;
}

.contact-info-content {
    flex: 1;
    min-width: 0;
}

.contact-info-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin-bottom: 0.25rem;
}

.contact-info-value {
    font-size: 0.9rem;
    color: var(--nx-text);
    word-break: break-word;
}

.contact-info-value a {
    color: var(--nx-text);
    text-decoration: none;
}

.contact-info-value a:hover {
    color: var(--nx-gold);
}

/* Responsive */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-wrapper.sidebar-open .admin-sidebar {
        transform: translateX(0);
    }

    .admin-wrapper.sidebar-open .sidebar-overlay {
        display: block;
    }

    /* El panel se usa sobre todo desde el móvil: menú más ancho y zonas de
       toque de al menos 44 px. */
    .admin-sidebar {
        width: min(86vw, 320px);
    }

    button.nav-section-title {
        min-height: 44px;
        font-size: 0.7rem;
    }

    .menu-toggle,
    .sidebar-toggle {
        min-width: 44px;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .admin-main {
        margin-left: 0;
    }
}

@media (max-width: 767px) {
    .admin-content {
        padding: 1.5rem;
    }

    .admin-topbar {
        padding: 0 1.5rem;
    }

    .page-header-title {
        font-size: 1.5rem;
    }
}

/* Legacy compatibility */
.sidebar-dark {
    background: var(--nx-black) !important;
}

.sidebar-dark .nav-link {
    color: rgba(255, 255, 255, 0.6) !important;
}

.sidebar-dark .nav-link:hover,
.sidebar-dark .nav-link.active {
    color: var(--nx-white) !important;
    background: var(--nx-charcoal) !important;
}

/* ===== DOCUMENTATION STYLES ===== */

/* Docs Navigation Card */
.docs-nav-card {
    border-radius: 12px;
}

.docs-nav {
    padding: 0.5rem 0;
}

.docs-nav-compact {
    font-size: 0.875rem;
}

.docs-nav-section {
    margin-bottom: 1rem;
}

.docs-nav-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.docs-nav-header i {
    font-size: 0.875rem;
}

.docs-nav-link {
    display: block;
    padding: 0.5rem 1rem 0.5rem 2.25rem;
    color: var(--nx-text-light);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: all 0.2s;
    border-left: 2px solid transparent;
}

.docs-nav-link:hover {
    color: var(--nx-text);
    background: #f8f9fa;
}

.docs-nav-link.active {
    color: var(--nx-gold);
    background: rgba(184, 134, 11, 0.05);
    border-left-color: var(--nx-gold);
    font-weight: 500;
}

.docs-nav-divider {
    height: 1px;
    background: var(--nx-border);
    margin: 1rem 0;
}

.docs-nav-project {
    padding: 0.375rem 1rem 0.375rem 2.25rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nx-text);
}

.docs-nav-empty {
    text-align: center;
    padding: 2rem;
    color: var(--nx-text-muted);
}

.docs-nav-empty i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

/* Docs Welcome */
.docs-welcome {
    text-align: center;
    padding: 2rem;
}

.docs-welcome-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #d97706;
    margin-bottom: 1.5rem;
}

.docs-welcome-title {
    font-family: var(--nx-font-display);
    font-size: 1.75rem;
    font-weight: 500;
    color: var(--nx-text);
    margin-bottom: 0.75rem;
}

.docs-welcome-text {
    font-size: 1rem;
    color: var(--nx-text-muted);
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* Docs Categories */
.docs-categories {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.docs-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #fafafa;
    border-radius: 12px;
    min-width: 120px;
}

.docs-category-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.docs-category-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nx-text);
}

/* Docs Quick Links */
.docs-quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: #fafafa;
    border-radius: 8px;
    text-decoration: none;
    color: var(--nx-text);
    font-size: 0.875rem;
    transition: all 0.2s;
}

.docs-quick-link:hover {
    background: #f0f0f0;
    color: var(--nx-gold);
}

.docs-quick-link i {
    color: var(--nx-text-muted);
}

/* Docs Search Results */
.docs-search-results {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.docs-search-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s;
}

.docs-search-item:hover {
    background: #fafafa;
}

.docs-search-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-text-muted);
    flex-shrink: 0;
}

.docs-search-content {
    flex: 1;
    min-width: 0;
}

.docs-search-title {
    font-weight: 500;
    color: var(--nx-text);
    margin-bottom: 0.25rem;
}

.docs-search-excerpt {
    font-size: 0.875rem;
    color: var(--nx-text-light);
    line-height: 1.5;
    margin-bottom: 0.25rem;
}

.docs-search-path {
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

/* Legacy - keep for compatibility */
.docs-sidebar {
    background: var(--nx-cream);
    border-right: 1px solid var(--nx-border);
    min-height: calc(100vh - 60px);
}

.docs-nav-category {
    padding: 0.5rem 1rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.docs-nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    color: var(--nx-text-light);
    text-decoration: none;
    margin: 0 0.5rem;
    transition: all 0.2s ease;
}

.docs-nav-link:hover {
    color: var(--nx-black);
}

.docs-nav-link.active {
    background: var(--nx-black);
    color: var(--nx-white);
}

/* Markdown */
.markdown-body {
    line-height: 1.8;
}

.markdown-body h1 {
    font-family: var(--nx-font-display);
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nx-border);
}

.markdown-body h2 {
    font-family: var(--nx-font-display);
    font-size: 1.75rem;
    font-weight: 400;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.markdown-body h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.markdown-body pre {
    background: var(--nx-black);
    color: #e5e5e5;
    padding: 1.5rem;
    overflow-x: auto;
}

.markdown-body code {
    background: var(--nx-cream);
    padding: 0.2rem 0.5rem;
    font-size: 0.875em;
}

.markdown-body pre code {
    background: transparent;
    padding: 0;
}

/* ===== STATS ===== */
.stat-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 2.5rem;
}

.stat-value {
    font-family: var(--nx-font-display);
    font-size: 3rem;
    font-weight: 400;
    color: var(--nx-black);
}

.stat-label {
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin-top: 0.5rem;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    :root {
        --nx-section-padding: 5rem;
    }

    .hero-premium {
        min-height: auto;
        padding: 8rem 0 5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --nx-section-padding: 4rem;
    }

    .hero-premium {
        padding: 6rem 0 4rem;
    }

    .hero-premium h1 {
        font-size: 2.5rem;
    }

    .about-header-premium,
    .products-header-premium {
        padding: 8rem 0 4rem;
    }

    .value-card-premium {
        padding: 2rem;
    }

    .cta-premium {
        padding: 5rem 0;
    }
}

/* ===== SERVICES PAGE ===== */
.services-header-premium {
    padding: 10rem 0 6rem;
    background: var(--nx-cream);
    text-align: center;
}

.services-header-premium h1 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.services-header-premium p {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.service-card-premium {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 3rem;
    height: 100%;
    transition: all 0.4s ease;
}

.service-card-premium:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-gold);
}

.service-card-premium .service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nx-gold-subtle);
    color: var(--nx-gold);
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.service-card-premium h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card-premium > p {
    color: var(--nx-text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-features li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    color: var(--nx-text);
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.5rem;
    width: 6px;
    height: 6px;
    background: var(--nx-gold);
}

.process-step {
    text-align: center;
    padding: 2rem 1.5rem;
}

.process-step .process-number {
    font-family: var(--nx-font-display);
    font-size: 2.5rem;
    color: var(--nx-gold);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.process-step h4 {
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.process-step p {
    color: var(--nx-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.industry-tag {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    transition: all 0.3s ease;
}

.industry-tag:hover {
    border-color: var(--nx-gold);
}

.industry-tag i {
    color: var(--nx-gold);
    font-size: 1.25rem;
}

.industry-tag span {
    font-size: 0.85rem;
    color: var(--nx-text);
}

@media (max-width: 768px) {
    .services-header-premium {
        padding: 8rem 0 4rem;
    }

    .service-card-premium {
        padding: 2rem;
    }

    .process-step {
        padding: 1.5rem 1rem;
    }
}

/* ===== CONTACT PAGE ===== */
.contact-header-premium {
    padding: 10rem 0 6rem;
    background: var(--nx-cream);
    text-align: center;
}

.contact-header-premium h1 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.contact-header-premium p {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.contact-info-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 4rem;
    text-align: center;
}

.contact-info-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.contact-info-card .lead {
    color: var(--nx-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-align: left;
}

.contact-method i {
    font-size: 2rem;
    color: var(--nx-gold);
}

.contact-method h4 {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin-bottom: 0.25rem;
}

.contact-method a {
    font-size: 1.25rem;
    color: var(--nx-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-method a:hover {
    color: var(--nx-gold);
}

/* ===== LEGAL PAGES ===== */
.legal-header-premium {
    padding: 10rem 0 4rem;
    background: var(--nx-cream);
    text-align: center;
}

.legal-header-premium h1 {
    font-size: clamp(2.5rem, 4vw, 3rem);
    font-weight: 400;
    margin-bottom: 1rem;
}

.legal-header-premium p {
    font-size: 0.9rem;
    color: var(--nx-text-muted);
}

.legal-content {
    font-size: 1rem;
    line-height: 1.9;
    color: var(--nx-text);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.legal-content h3 {
    font-size: 1.25rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.legal-content p {
    margin-bottom: 1rem;
}

.legal-content ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .contact-header-premium,
    .legal-header-premium {
        padding: 8rem 0 4rem;
    }

    .contact-info-card {
        padding: 2rem;
    }
}

/* ===== CONTACT FORM ===== */
.contact-form-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 3rem;
}

.contact-form-header {
    text-align: center;
    margin-bottom: 3rem;
}

.contact-form-header h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.contact-form-header p {
    color: var(--nx-text-light);
    font-size: 1rem;
}

.form-group-premium {
    margin-bottom: 0;
}

.form-label-premium {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text);
    margin-bottom: 0.5rem;
}

.form-control-premium {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-family: var(--nx-font-body);
    color: var(--nx-text);
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    transition: all 0.3s ease;
}

.form-control-premium:focus {
    outline: none;
    border-color: var(--nx-gold);
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.1);
}

.form-control-premium::placeholder {
    color: var(--nx-text-muted);
}

textarea.form-control-premium {
    resize: vertical;
    min-height: 140px;
}

.form-check-premium {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.form-check-input-premium {
    width: 20px;
    height: 20px;
    margin-top: 0.15rem;
    flex-shrink: 0;
    accent-color: var(--nx-gold);
    cursor: pointer;
}

.form-check-label-premium {
    font-size: 0.9rem;
    color: var(--nx-text-light);
    line-height: 1.5;
}

.form-check-label-premium a {
    color: var(--nx-gold);
    text-decoration: underline;
}

.btn-submit-contact {
    width: 100%;
    justify-content: center;
    padding: 1.25rem 2rem;
}

.contact-success-message {
    text-align: center;
    background: #ecfdf5;
    border: 1px solid #10b981;
    padding: 3rem;
}

.contact-success-message .success-icon {
    width: 64px;
    height: 64px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.contact-success-message .success-icon i {
    font-size: 2rem;
    color: white;
}

.contact-success-message h3 {
    font-size: 1.5rem;
    color: #065f46;
    margin-bottom: 0.5rem;
}

.contact-success-message p {
    color: #047857;
    margin: 0;
}

@media (max-width: 768px) {
    .contact-form-card {
        padding: 2rem;
    }

    .contact-form-header {
        margin-bottom: 2rem;
    }
}

/* ===== COOKIE BANNER ===== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--nx-black);
    color: var(--nx-white);
    padding: 1.5rem 0;
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-banner-text {
    flex: 1;
    min-width: 300px;
}

.cookie-banner-text p {
    margin: 0;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.cookie-banner-text a {
    color: var(--nx-gold);
    text-decoration: underline;
}

.cookie-banner-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn-accept {
    background: var(--nx-gold);
    color: var(--nx-black);
}

.cookie-btn-accept:hover {
    background: var(--nx-gold-light);
}

.cookie-btn-reject {
    background: transparent;
    color: var(--nx-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-reject:hover {
    border-color: var(--nx-white);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1.25rem 0;
    }

    .cookie-banner-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .cookie-banner-text {
        min-width: auto;
    }

    .cookie-banner-buttons {
        width: 100%;
        justify-content: center;
    }
}

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

.animate-fade-in {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ===== BLOG STYLES ===== */

/* Blog Header */
.blog-header-premium {
    padding: 10rem 0 4rem;
    background: var(--nx-cream);
    text-align: center;
}

.blog-header-premium h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    font-weight: 400;
    margin-bottom: 1rem;
}

.blog-header-premium p {
    font-size: 1.15rem;
    color: var(--nx-text-light);
    max-width: 600px;
    margin: 0 auto;
}

.blog-header-single {
    padding: 10rem 0 3rem;
}

.blog-header-single h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.blog-post-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--nx-text-light);
}

.blog-post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-post-meta i {
    color: var(--nx-gold);
}

/* Blog Cards */
.blog-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.4s ease;
    overflow: hidden;
}

.blog-card:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-gold);
    transform: translateY(-4px);
}

.blog-card-featured {
    border-width: 2px;
}

.blog-card-image {
    display: block;
    position: relative;
    aspect-ratio: 16/10;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-svg {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.blog-card-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.blog-svg-placeholder {
    background: transparent;
}

.blog-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--nx-gold);
    color: var(--nx-black);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.4rem 0.75rem;
}

.blog-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-category {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: opacity 0.3s;
}

.blog-card-category:hover {
    opacity: 0.7;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.6em;
}

.blog-card-title a {
    color: var(--nx-text);
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card-title a:hover {
    color: var(--nx-gold);
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--nx-text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.blog-card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.8rem;
    color: var(--nx-text-muted);
    margin-top: auto;
    padding-top: 1rem;
}

.blog-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* Blog Post Content */
.blog-post-content {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 2rem;
}

.blog-post-image {
    margin: -2rem -2rem 2rem;
}

.blog-post-image img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-post-svg {
    width: 100%;
    aspect-ratio: 16/9;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.blog-post-svg svg {
    width: 100%;
    height: 100%;
    display: block;
}

.blog-post-body {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--nx-text);
}

.blog-post-body h2 {
    font-size: 1.75rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.blog-post-body h3 {
    font-size: 1.35rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-post-body p {
    margin-bottom: 1.25rem;
}

.blog-post-body img {
    max-width: 100%;
    height: auto;
    margin: 1.5rem 0;
}

.blog-post-body blockquote {
    border-left: 3px solid var(--nx-gold);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--nx-text-light);
}

.blog-post-body pre {
    background: var(--nx-black);
    color: #e5e5e5;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.blog-post-body code {
    background: var(--nx-cream);
    padding: 0.2rem 0.5rem;
    font-size: 0.9em;
}

.blog-post-body pre code {
    background: transparent;
    padding: 0;
}

/* Blog Post Tags */
.blog-post-tags {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--nx-border);
}

.tags-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--nx-text-muted);
}

.blog-tag {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    background: var(--nx-cream);
    color: var(--nx-text);
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s;
}

.blog-tag:hover {
    background: var(--nx-gold);
    color: var(--nx-black);
}

/* Blog Post Share */
.blog-post-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--nx-border);
}

.share-label {
    font-size: 0.85rem;
    color: var(--nx-text-muted);
}

.share-btn {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--nx-border);
    color: var(--nx-text-light);
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
}

.share-btn:hover {
    border-color: var(--nx-gold);
    color: var(--nx-gold);
}

.share-twitter:hover { border-color: #1DA1F2; color: #1DA1F2; }
.share-linkedin:hover { border-color: #0077B5; color: #0077B5; }
.share-facebook:hover { border-color: #1877F2; color: #1877F2; }
.share-whatsapp:hover { border-color: #25D366; color: #25D366; }

/* Blog Post Languages */
.blog-post-languages {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding-top: 1.5rem;
    margin-top: 1.5rem;
    border-top: 1px solid var(--nx-border);
}

.languages-label {
    font-size: 0.85rem;
    color: var(--nx-text-muted);
}

.language-link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}

.language-link:hover {
    border-color: var(--nx-gold);
    color: var(--nx-gold);
}

/* Blog Sidebar */
.blog-sidebar-widget {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.blog-sidebar-widget h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--nx-border);
}

/* Blog Category List */
.blog-category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-category-list li {
    margin-bottom: 0.5rem;
}

.blog-category-list li.active a {
    background: var(--nx-cream);
    color: var(--nx-gold);
}

.blog-category-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: var(--nx-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.blog-category-list a:hover {
    background: var(--nx-cream);
}

.blog-category-list a i {
    font-size: 1.1rem;
}

.blog-category-list .count {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--nx-text-muted);
}

/* Blog Latest Posts */
.blog-latest-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-latest-list li {
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--nx-border);
}

.blog-latest-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.blog-latest-list a {
    display: flex;
    gap: 1rem;
    text-decoration: none;
    color: var(--nx-text);
    transition: color 0.3s;
}

.blog-latest-list a:hover {
    color: var(--nx-gold);
}

.blog-latest-list img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    flex-shrink: 0;
}

.latest-post-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.latest-post-title {
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 0.25rem;
}

.latest-post-date {
    font-size: 0.8rem;
    color: var(--nx-text-muted);
}

/* Blog Pagination */
.blog-pagination .pagination {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.blog-pagination .page-item.active .page-link {
    background: var(--nx-black);
    color: var(--nx-white);
    border-color: var(--nx-black);
}

.blog-pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    color: var(--nx-text);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.blog-pagination .page-link:hover {
    border-color: var(--nx-gold);
    color: var(--nx-gold);
}

/* Blog Button */
.btn-premium-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--nx-gold);
    color: var(--nx-black);
    border: none;
    padding: 1rem 2rem;
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-premium-primary:hover {
    background: var(--nx-gold-light);
    color: var(--nx-black);
    transform: translateY(-2px);
    box-shadow: var(--nx-shadow-gold);
}

@media (max-width: 991px) {
    .blog-header-premium {
        padding: 8rem 0 3rem;
    }

    .blog-header-single {
        padding: 8rem 0 2rem;
    }

    .blog-post-meta {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .blog-header-premium {
        padding: 7rem 0 2.5rem;
    }

    .blog-post-content {
        padding: 1.5rem;
    }

    .blog-post-image {
        margin: -1.5rem -1.5rem 1.5rem;
    }

    .blog-post-share {
        flex-wrap: wrap;
    }

    .blog-card-content {
        padding: 1.25rem;
    }
}

/* ==========================================
   Settings Cards
   ========================================== */

.settings-card {
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
    background: white;
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    height: 100%;
}

.settings-card:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-md);
    transform: translateY(-2px);
    color: inherit;
    text-decoration: none;
}

.settings-card-disabled {
    opacity: 0.55;
    pointer-events: none;
    cursor: default;
}

.settings-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.settings-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.settings-card-title {
    font-family: var(--nx-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.4rem 0;
    color: var(--nx-text);
}

.settings-card-description {
    font-size: 0.8rem;
    color: var(--nx-text-muted);
    margin: 0;
    line-height: 1.5;
    flex: 1;
}

.settings-card-footer {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--nx-border);
}

.settings-card-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--nx-gold);
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.2s ease;
}

.settings-card:hover .settings-card-link {
    gap: 0.5rem;
}

/* ==========================================
   Billing - Dropzone & Import
   ========================================== */

/* Billing Filter Group */
.billing-filter-group {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--nx-border);
    border-radius: 10px;
    padding: 0;
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.billing-filter-group:hover {
    border-color: var(--nx-gold);
    box-shadow: var(--nx-shadow-gold);
}

.billing-filter-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
}

.billing-filter-item i {
    color: var(--nx-gold);
    font-size: 0.95rem;
    flex-shrink: 0;
}

.billing-filter-item select {
    border: none;
    background: transparent;
    font-family: var(--nx-font-display);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--nx-text);
    cursor: pointer;
    padding: 0.15rem 1.2rem 0.15rem 0;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23b8860b' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    outline: none;
}

.billing-filter-item select:focus {
    outline: none;
}

.billing-filter-divider {
    width: 1px;
    height: 20px;
    background: var(--nx-border);
    flex-shrink: 0;
}

@media (max-width: 575.98px) {
    .billing-filter-group {
        width: 100%;
    }

    .billing-filter-item {
        flex: 1;
        justify-content: center;
    }

    .billing-filter-item select {
        width: 100%;
    }
}

/* Billing KPI Grid */
.billing-kpi-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 1rem;
}

.billing-kpi-grid .stat-card-modern {
    padding: 1rem;
}

.billing-kpi-grid .stat-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 1rem;
}

.billing-kpi-grid .stat-value-modern {
    font-size: 1rem;
}

.billing-kpi-grid .stat-label-modern {
    font-size: 0.7rem;
}

@media (max-width: 1399.98px) {
    .billing-kpi-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 767.98px) {
    .billing-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Billing Tax Real vs Predicted */
.stat-card-editable {
    cursor: pointer;
    position: relative;
}

.stat-card-editable:hover {
    border-color: var(--nx-gold);
}

.tax-compare {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.25rem;
}

.tax-real-badge {
    display: inline-block;
    background: #f3f4f6;
    color: var(--nx-text);
    font-size: 0.6rem;
    font-weight: 600;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    white-space: nowrap;
}

.tax-error-badge {
    display: inline-block;
    font-size: 0.55rem;
    font-weight: 700;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
    white-space: nowrap;
}

.tax-error-good {
    background: #ecfdf5;
    color: #065f46;
}

.tax-error-bad {
    background: #fef2f2;
    color: #991b1b;
}

.tax-add-hint {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.6rem;
    color: var(--nx-gold);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.stat-card-editable:hover .tax-add-hint {
    opacity: 1;
}

.tax-input-form {
    width: 100%;
}

.tax-input-form .form-control {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

.billing-dropzone {
    border: 2px dashed var(--nx-border);
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: var(--nx-ivory);
}

.billing-dropzone:hover,
.billing-dropzone.dragover {
    border-color: var(--nx-gold);
    background: rgba(184, 134, 11, 0.04);
    box-shadow: var(--nx-shadow-gold);
}

.billing-dropzone.dragover {
    transform: scale(1.01);
}

.billing-dropzone.has-file {
    border-color: #10b981;
    border-style: solid;
    background: rgba(16, 185, 129, 0.04);
}

.billing-card-duplicate {
    border-color: #f59e0b;
}

.billing-duplicate-body {
    opacity: 0.45;
    pointer-events: none;
}

.billing-duplicate-notice {
    padding: 0.6rem 1rem;
    background: #fef3c7;
    color: #92400e;
    border-radius: 8px;
    font-size: 0.85rem;
}

/* Full-page drop overlay */
.billing-drop-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    pointer-events: none;
}

.billing-drop-overlay.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.billing-drop-overlay-content {
    text-align: center;
    color: white;
    padding: 3rem;
    border: 3px dashed var(--nx-gold);
    border-radius: 24px;
    min-width: 400px;
    background: rgba(184, 134, 11, 0.08);
    transform: scale(0.9);
    transition: transform 0.25s ease;
}

.billing-drop-overlay.active .billing-drop-overlay-content {
    transform: scale(1);
}

.billing-drop-overlay-content i {
    font-size: 4rem;
    color: var(--nx-gold);
    margin-bottom: 1rem;
    display: block;
}

.billing-drop-overlay-content h3 {
    font-family: var(--nx-font-display);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.billing-drop-overlay-content p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

/* ==========================================================================
   Panel central: Overview general y Overview leads.
   Pensado primero para el móvil (≈390 px): una columna, tarjetas apiladas y
   controles de 44 px o más. A partir de 768 px se abren columnas.
   ========================================================================== */
.ov-empty-icon { font-size: 2.5rem; opacity: 0.4; }

.ov-refresh { min-height: 40px; display: inline-flex; align-items: center; }

.ov-totals {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.ov-total {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1rem;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 10px;
    color: var(--nx-text);
    text-decoration: none;
    min-width: 0;
}

a.ov-total:hover { border-color: var(--nx-gold); color: var(--nx-text); }

.ov-total-value {
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.ov-total-value small { font-size: 1rem; font-weight: 400; color: var(--nx-text-muted); }
.ov-total-label { font-size: 0.78rem; color: var(--nx-text-light); }
.ov-total-alert { border-color: #f59e0b; background: #fffbeb; }
.ov-total-alert .ov-total-value { color: #b45309; }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

.ov-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 1rem;
    min-width: 0;
}

.ov-card-failed { border-color: #fca5a5; }

.ov-card-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.75rem; }

.ov-card-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.ov-card-title { min-width: 0; flex: 1; }

.ov-card-title h2 {
    font-family: var(--nx-font-body);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ov-card-version { font-size: 0.72rem; color: var(--nx-text-muted); }

.ov-card-link {
    flex: none;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: var(--nx-text-light);
    font-size: 1.2rem;
}

.ov-card-link:hover { background: var(--nx-cream); color: var(--nx-gold); }

.ov-card-error {
    margin: 0;
    padding: 0.75rem;
    border-radius: 8px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 0.875rem;
}

.ov-group + .ov-group { margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px solid var(--nx-border); }

.ov-group h3 {
    font-family: var(--nx-font-body);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin: 0 0 0.5rem;
}

.ov-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 0.75rem; margin: 0; }
.ov-metric { min-width: 0; }

.ov-metric dd {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}

.ov-metric dd small { font-size: 0.75rem; font-weight: 400; color: var(--nx-text-muted); }
.ov-metric dt { font-size: 0.75rem; font-weight: 400; color: var(--nx-text-light); }
.ov-metric-warning dd { color: #b45309; }

.ov-unconnected { margin-top: 1.5rem; color: var(--nx-text-light); font-size: 0.875rem; }

.ov-unconnected h2 {
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 0.25rem;
}

.ov-unconnected p { margin: 0 0 0.5rem; }
.ov-unconnected ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; }

/* --- Overview leads ------------------------------------------------------ */
.ld-summary { margin: 0 0 1rem; color: var(--nx-text-light); }
.ld-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }

.ld-card {
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 12px;
    padding: 1rem;
    min-width: 0;
}

.ld-card-spam { border-color: #fca5a5; }

.ld-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.6rem; }

.ld-project {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ld-age { flex: none; font-size: 0.78rem; color: var(--nx-text-light); }
.ld-age-late { color: #b45309; font-weight: 600; }

.ld-name {
    font-family: var(--nx-font-body);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    overflow-wrap: anywhere;
}

.ld-name small { font-size: 0.85rem; font-weight: 400; color: var(--nx-text-light); }

.ld-badges { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.75rem; }
.ld-badges:empty { display: none; }

.ld-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    background: var(--nx-cream);
    color: var(--nx-text-light);
    font-size: 0.75rem;
    font-weight: 500;
}

.ld-badge-hot { background: #dcfce7; color: #166534; }
.ld-badge-warm { background: #fef9c3; color: #854d0e; }
.ld-badge-cold { background: #e0f2fe; color: #075985; }
.ld-badge-spam,
.ld-badge-danger,
.ld-badge-fuera_cobertura { background: #fee2e2; color: #b91c1c; }

.ld-details { margin: 0 0 0.75rem; display: grid; gap: 0.4rem; }
.ld-details div { display: grid; grid-template-columns: minmax(0, 7.5rem) minmax(0, 1fr); gap: 0.5rem; font-size: 0.9rem; }
.ld-details dt { font-weight: 400; color: var(--nx-text-light); }
.ld-details dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.ld-ai {
    margin: 0 0 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    background: var(--nx-gold-subtle);
    font-size: 0.875rem;
}

.ld-message { margin-bottom: 0.75rem; font-size: 0.9rem; }

.ld-message summary,
.ld-discard summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--nx-text-light);
    font-size: 0.875rem;
}

.ld-message p { margin: 0; padding: 0.75rem; border-radius: 8px; background: var(--nx-cream); overflow-wrap: anywhere; }

.ld-contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; margin-bottom: 1rem; }

.ld-contact-btn {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    border: 1px solid var(--nx-border);
    border-radius: 8px;
    color: var(--nx-text);
    text-decoration: none;
    font-size: 0.9rem;
    min-width: 0;
}

.ld-contact-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ld-contact-btn:hover { border-color: var(--nx-gold); color: var(--nx-text); }

.ld-form { border-top: 1px solid var(--nx-border); padding-top: 0.9rem; display: grid; gap: 0.4rem; }
.ld-label { font-size: 0.78rem; font-weight: 600; color: var(--nx-text-light); margin: 0.25rem 0 0; }
.ld-label small { font-weight: 400; }

/* 16 px en los campos: con menos, iOS hace zoom al enfocarlos. */
.ld-select,
.ld-textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--nx-border);
    border-radius: 8px;
    background: var(--nx-white);
    color: var(--nx-text);
    font-size: 16px;
    font-family: inherit;
}

.ld-select:focus,
.ld-textarea:focus { outline: 2px solid var(--nx-gold); outline-offset: 1px; }

.ld-btn {
    width: 100%;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0.5rem;
}

.ld-btn-primary { background: var(--nx-charcoal); color: var(--nx-white); }
.ld-btn-primary:hover { background: var(--nx-gold); }
.ld-btn-danger { background: var(--nx-white); border-color: #fca5a5; color: #b91c1c; }
.ld-btn-danger:hover { background: #fef2f2; }

.ld-no-partner { margin: 0; font-size: 0.875rem; color: var(--nx-text-light); }

.ld-discard { margin-top: 0.25rem; }
.ld-discard p { margin: 0 0 0.25rem; font-size: 0.85rem; color: var(--nx-text-light); }

.ld-history { margin-top: 1.75rem; }

.ld-history h2 {
    font-family: var(--nx-font-body);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--nx-text-light);
    margin: 0 0 0.5rem;
}

.ld-history ul { list-style: none; margin: 0; padding: 0; }

.ld-history li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--nx-border);
    font-size: 0.85rem;
}

.ld-history li span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ld-history time { flex: none; color: var(--nx-text-muted); font-size: 0.78rem; }
.ld-history-failed { color: #b91c1c; }

@media (min-width: 768px) {
    .ov-totals { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .ov-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ld-list { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .ld-contact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1400px) {
    .ov-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* En el móvil el contenido del panel va a todo el ancho, con poco margen. */
@media (max-width: 575px) {
    .admin-content { padding: 1rem; }
    .page-header-title { font-size: 1.5rem; }
}

/* Los desplegables de la tarjeta: flecha a la derecha, que el `display: flex`
   se lleva el triángulo nativo. */
.ld-message summary,
.ld-discard summary { list-style: none; justify-content: space-between; }
.ld-message summary::-webkit-details-marker,
.ld-discard summary::-webkit-details-marker { display: none; }

.ld-message summary::after,
.ld-discard summary::after {
    content: '';
    width: 8px;
    height: 8px;
    margin-right: 6px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
}

.ld-message[open] summary::after,
.ld-discard[open] summary::after { transform: rotate(-135deg); }

/* --- Overview partners --------------------------------------------------- */
/* Rejilla que reparte todo el ancho: con una ficha, ocupa la fila entera; con
   muchas, tantas columnas como quepan. */
.pt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: 1rem;
    align-items: start;
}

.pt-grid .ov-card { container-type: inline-size; }

/* Ficha ancha (pocas fichas en pantalla grande): las cifras en cuatro columnas
   en vez de dejar media ficha en blanco. */
@container (min-width: 560px) {
    .pt-grid .ov-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@container (min-width: 900px) {
    .pt-grid .ov-metrics { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

.pt-missing {
    margin-top: 1.25rem;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    background: #fffbeb;
    color: #92400e;
    font-size: 0.875rem;
}

.pt-missing h2 { font-family: var(--nx-font-body); font-size: 0.95rem; font-weight: 600; margin: 0 0 0.15rem; }
.pt-missing p { margin: 0 0 0.6rem; }
.pt-missing ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }

.pt-missing li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    background: var(--nx-white);
    color: var(--nx-text);
    font-size: 0.82rem;
}

.pt-card-inactive { background: var(--nx-cream); }

.pt-head { margin-bottom: 0.75rem; }
.pt-head h3 { font-family: var(--nx-font-body); font-size: 1.05rem; font-weight: 600; margin: 0.6rem 0 0.5rem; overflow-wrap: anywhere; }
.pt-head .ld-badges { margin-bottom: 0; }

.pt-funnel { display: flex; height: 8px; gap: 2px; margin-top: 0.9rem; border-radius: 4px; overflow: hidden; }
.pt-funnel span { min-width: 4px; }

.pt-funnel-pendent { background: #94a3b8; }
.pt-funnel-contactat { background: #38bdf8; }
.pt-funnel-pressupostat { background: #f59e0b; }
.pt-funnel-guanyat { background: #16a34a; }
.pt-funnel-perdut { background: #dc2626; }

.pt-legend { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 0.9rem; font-size: 0.78rem; color: var(--nx-text-light); }
.pt-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 0.15rem; }
.pt-legend strong { color: var(--nx-text); font-variant-numeric: tabular-nums; }

/* --- Gestión de partners desde el panel central --------------------------- */
.ld-btn-secondary { background: var(--nx-white); border-color: var(--nx-border); color: var(--nx-text); text-decoration: none; }
.ld-btn-secondary:hover { border-color: var(--nx-gold); color: var(--nx-text); }

.pt-manage { margin-top: 0.9rem; min-height: 44px; font-size: 0.9rem; }

.pt-add { margin-top: 1rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: var(--nx-text-light); }

.pt-add a,
.pt-missing li a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0 0.75rem;
    border: 1px solid var(--nx-border);
    border-radius: 999px;
    background: var(--nx-white);
    color: var(--nx-text);
    text-decoration: none;
    font-size: 0.82rem;
}

.pt-add a:hover,
.pt-missing li a:hover { border-color: var(--nx-gold); }
.pt-missing li { padding: 0; background: none; }

.pf-back { min-height: 44px; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--nx-text-light); text-decoration: none; font-size: 0.875rem; }
.pf-errors { margin: 0.35rem 0 0; padding-left: 1.1rem; }

.pf-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.pf-form,
.pf-side { display: grid; gap: 1rem; min-width: 0; }

.pf-card { background: var(--nx-white); border: 1px solid var(--nx-border); border-radius: 12px; padding: 1rem; min-width: 0; }

.pf-card h2 {
    font-family: var(--nx-font-body);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
    margin: 0 0 0.75rem;
}

.pf-help { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--nx-text-light); }

.pf-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.85rem; }
.pf-field { display: grid; gap: 0.3rem; min-width: 0; }
.pf-field + .pf-choices,
.pf-choices + .pf-field { margin-top: 0.85rem; }
.pf-field label { font-size: 0.8rem; font-weight: 600; color: var(--nx-text-light); margin: 0; }
.pf-field label small { font-weight: 400; }
.pf-field > small { font-size: 0.78rem; color: var(--nx-text-muted); }

/* 16 px: con menos, iOS hace zoom al enfocar el campo. */
.pf-field input,
.pf-field textarea {
    width: 100%;
    min-height: 48px;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--nx-border);
    border-radius: 8px;
    background: var(--nx-white);
    color: var(--nx-text);
    font-size: 16px;
    font-family: inherit;
}

.pf-field input:focus,
.pf-field textarea:focus { outline: 2px solid var(--nx-gold); outline-offset: 1px; }

.pf-switch { display: flex; align-items: flex-start; gap: 0.75rem; min-height: 48px; padding: 0.6rem 0.75rem; border: 1px solid var(--nx-border); border-radius: 8px; cursor: pointer; margin: 0; }
.pf-switch input { width: 22px; height: 22px; margin-top: 0.1rem; flex: none; accent-color: var(--nx-gold); }
.pf-switch span { display: grid; }
.pf-switch small { color: var(--nx-text-muted); font-size: 0.78rem; }

.pf-choices { border: 1px solid var(--nx-border); border-radius: 8px; }
.pf-choices + .pf-choices { margin-top: 0.85rem; }

.pf-choices summary {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    list-style: none;
}

.pf-choices summary::-webkit-details-marker { display: none; }
.pf-choices summary span { font-weight: 400; color: var(--nx-text-light); font-size: 0.82rem; }

.pf-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0 0.5rem; padding: 0 0.5rem 0.5rem; }
.pf-checks label { min-height: 44px; display: flex; align-items: center; gap: 0.5rem; padding: 0 0.25rem; margin: 0; font-size: 0.9rem; cursor: pointer; min-width: 0; }
.pf-checks input { width: 20px; height: 20px; flex: none; accent-color: var(--nx-gold); }
.pf-checks span { overflow-wrap: anywhere; }

.pf-actions .ld-btn { margin-top: 0; }

.pf-members { list-style: none; margin: 0 0 0.9rem; padding: 0; }
.pf-members li { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; padding: 0.5rem 0; border-bottom: 1px solid var(--nx-border); font-size: 0.875rem; }
.pf-members span { overflow-wrap: anywhere; min-width: 0; }
.pf-members em { font-style: normal; }
.pf-invite { display: grid; gap: 0.25rem; }

@media (min-width: 768px) {
    .pf-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pf-field-wide { grid-column: 1 / -1; }
}

@media (min-width: 1100px) {
    .pf-layout { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); }
    .pf-actions .ld-btn { width: auto; padding: 0 2rem; }
}

/* --- Overview partners: una fila por proyecto, con buscador y filtros ------ */
.pj-toolbar { display: grid; gap: 0.6rem; margin-bottom: 0.75rem; }

.pj-search {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 48px;
    padding: 0 0.85rem;
    margin: 0;
    background: var(--nx-white);
    border: 1px solid var(--nx-border);
    border-radius: 10px;
    color: var(--nx-text-light);
}

.pj-search:focus-within { border-color: var(--nx-gold); }

/* 16 px: con menos, iOS hace zoom al enfocar. */
.pj-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 16px; color: var(--nx-text); }

/* En el móvil los filtros se deslizan en una fila en vez de ocupar tres. */
.pj-chips { display: flex; gap: 0.4rem; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.pj-chips::-webkit-scrollbar { display: none; }

.pj-chip {
    flex: none;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0 0.85rem;
    border: 1px solid var(--nx-border);
    border-radius: 999px;
    background: var(--nx-white);
    color: var(--nx-text);
    font-size: 0.85rem;
    cursor: pointer;
}

.pj-chip span { font-size: 0.75rem; color: var(--nx-text-muted); font-variant-numeric: tabular-nums; }
.pj-chip.is-active { background: var(--nx-charcoal); border-color: var(--nx-charcoal); color: var(--nx-white); }
.pj-chip.is-active span { color: rgba(255, 255, 255, 0.7); }

.pj-head { display: none; }
.pj-list { display: grid; gap: 0.5rem; }

.pj-row { background: var(--nx-white); border: 1px solid var(--nx-border); border-radius: 12px; min-width: 0; }
.pj-row-attention { border-left: 3px solid #f59e0b; }
.pj-row[open] { box-shadow: var(--nx-shadow-sm); }

/* Móvil: nombre arriba y las cifras debajo, cada una con su etiqueta. */
.pj-row summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    align-items: center;
    gap: 0.5rem 0.75rem;
    padding: 0.85rem;
    cursor: pointer;
    list-style: none;
}

.pj-row summary::-webkit-details-marker { display: none; }

.pj-name { grid-column: 1 / 4; display: flex; align-items: center; gap: 0.65rem; min-width: 0; }
.pj-name-text { display: grid; min-width: 0; }
.pj-name-text strong { font-size: 0.98rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-name-text small { font-size: 0.78rem; color: var(--nx-text-light); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pj-warn { font-style: normal; color: #b45309; font-weight: 600; }

.pj-chevron { grid-column: 4; grid-row: 1; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: var(--nx-text-light); transition: transform 0.2s ease; }
.pj-row[open] .pj-chevron { transform: rotate(180deg); }

.pj-cell { display: grid; font-size: 1rem; font-weight: 600; font-variant-numeric: tabular-nums; min-width: 0; }
.pj-cell::after { content: attr(data-label); order: 2; font-size: 0.7rem; font-weight: 400; color: var(--nx-text-light); }
.pj-cell small { font-weight: 400; color: var(--nx-text-muted); }
.pj-cell-warn { color: #b45309; }

/* En el móvil caben tres cifras por fila: partners y leads se leen en el detalle. */
.pj-cell[data-label="Partners"],
.pj-cell[data-label="Leads 30 d"] { display: none; }

.pj-body { padding: 0 0.85rem 0.85rem; border-top: 1px solid var(--nx-border); padding-top: 0.85rem; }
.pj-empty { margin: 0; font-size: 0.875rem; color: var(--nx-text-light); }
.pj-add { min-height: 44px; font-size: 0.9rem; margin-top: 0.85rem; }
.pj-none { margin: 1rem 0 0; text-align: center; color: var(--nx-text-light); }

.pj-body .ov-card { background: var(--nx-ivory); }

@media (min-width: 768px) {
    .pj-toolbar { grid-template-columns: minmax(220px, 320px) minmax(0, 1fr); align-items: center; }
    .pj-chips { flex-wrap: wrap; overflow: visible; }

    /* Escritorio: tabla alineada, una línea por proyecto. */
    .pj-head,
    .pj-row summary {
        grid-template-columns: minmax(0, 2.6fr) repeat(5, minmax(70px, 1fr)) 32px;
    }

    .pj-head {
        display: grid;
        gap: 0.75rem;
        padding: 0 0.85rem 0.4rem;
        font-size: 0.68rem;
        font-weight: 600;
        letter-spacing: 0.08em;
        text-transform: uppercase;
        color: var(--nx-text-muted);
    }

    .pj-head span:not(:first-child) { text-align: right; }
    .pj-row summary { padding: 0.6rem 0.85rem; }
    .pj-name,
    .pj-chevron { grid-column: auto; grid-row: auto; }
    .pj-cell,
    .pj-cell[data-label="Partners"],
    .pj-cell[data-label="Leads 30 d"] { display: block; text-align: right; font-size: 0.95rem; }
    .pj-cell::after { content: none; }
    .pj-add { width: auto; padding: 0 1.25rem; }
}

/* --- Overview facturación ------------------------------------------------- */
.bl-filters { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.bl-filters .pj-chip { text-decoration: none; }
.bl-filter-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0.5rem; }

.bl-filter { background: var(--nx-white); border: 1px solid var(--nx-border); border-radius: 10px; min-width: 0; }

.bl-filter summary {
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 0.85rem;
    cursor: pointer;
    font-size: 0.9rem;
    list-style: none;
}

.bl-filter summary::-webkit-details-marker { display: none; }
.bl-dates,
.bl-projects { padding: 0 0.85rem 0.85rem; display: grid; gap: 0.6rem; }
.bl-dates label { display: grid; gap: 0.25rem; font-size: 0.8rem; font-weight: 600; color: var(--nx-text-light); margin: 0; }
.bl-dates input { min-height: 48px; padding: 0 0.75rem; border: 1px solid var(--nx-border); border-radius: 8px; font-size: 16px; font-family: inherit; width: 100%; }
.bl-dates .ld-btn,
.bl-projects-actions .ld-btn { margin-top: 0; }
.bl-projects .pf-checks { padding: 0; }
.bl-projects-actions { display: grid; gap: 0.5rem; }

.bl-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bl-kpi-main { grid-column: 1 / -1; }
.bl-kpi-main .ov-total-value { font-size: 2.2rem; }
.bl-kpi-note { font-size: 0.75rem; color: var(--nx-text-muted); }
.bl-kpi-warn { color: #b45309; }

.bl-charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.bl-card { padding: 1rem; margin-bottom: 1rem; min-width: 0; }
.bl-charts .bl-card { margin-bottom: 0; }
.bl-h { font-family: var(--nx-font-body); font-size: 1rem; font-weight: 600; margin: 0 0 0.75rem; }
.bl-foot { margin: 0.75rem 0 0; font-size: 0.78rem; color: var(--nx-text-muted); }

/* Gráfico de barras (templates/admin/overview/_bar_chart.html.twig).
   Colores de serie validados para daltonismo; el texto nunca lleva el color de
   la serie. */
.bc {
    --bc-series-1: #2a78d6;
    --bc-series-2: #eb6834;
    --bc-neutral: #a3a39c;
    --bc-grid: #ecece8;
    margin: 0;
}

.bc-title { font-size: 1rem; font-weight: 600; color: var(--nx-text); margin-bottom: 0.5rem; }
.bc-legend { list-style: none; margin: 0 0 0.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; font-size: 0.8rem; color: var(--nx-text-light); }
.bc-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.2rem; }
.bc-legend strong { color: var(--nx-text); font-variant-numeric: tabular-nums; }
.bc-empty { margin: 0; padding: 2rem 0; text-align: center; color: var(--nx-text-light); font-size: 0.9rem; }

.bc-plot { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.5rem; }
.bc-axis { display: flex; flex-direction: column; justify-content: space-between; height: 180px; font-size: 0.7rem; color: var(--nx-text-muted); text-align: right; font-variant-numeric: tabular-nums; }
.bc-axis span { line-height: 1; transform: translateY(-50%); }
.bc-axis span:last-child { transform: translateY(50%); }

.bc-area { position: relative; min-width: 0; }
.bc-grid { position: absolute; inset: 0 0 auto 0; height: 180px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bc-grid i { display: block; border-top: 1px solid var(--bc-grid); }
.bc-grid i:last-child { border-color: var(--nx-border); }

.bc-columns { position: relative; display: flex; align-items: stretch; gap: 4px; height: 180px; }
.bc-dense { gap: 1px; }

/* La columna entera es la zona de toque, aunque la barra sea fina o esté vacía. */
.bc-col { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; cursor: pointer; border-radius: 4px; outline: 0; }
.bc-col.is-active,
.bc-col:focus-visible { background: rgba(0, 0, 0, 0.05); }

.bc-stack { width: 100%; max-width: 28px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; }
.bc-seg { display: block; min-height: 2px; }
.bc-seg:first-child { border-radius: 4px 4px 0 0; }

.bc-billed,
.bc-derived { background: var(--bc-series-1); }
.bc-pending { background: var(--bc-series-2); }
.bc-discarded { background: var(--bc-neutral); }

/* La previsión es la misma magnitud que lo facturable, todavía sin ocurrir:
   mismo tono, rayado. */
.bc-forecast {
    background: repeating-linear-gradient(135deg, var(--bc-series-1) 0 2px, rgba(42, 120, 214, 0.25) 2px 6px);
}

.bc-labels { display: flex; gap: 4px; margin-top: 0.35rem; font-size: 0.68rem; color: var(--nx-text-muted); }
.bc-dense + .bc-labels { gap: 1px; }
.bc-labels span { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; }

.bc-tip {
    position: absolute;
    top: 0;
    transform: translate(-50%, -6px);
    z-index: 5;
    display: grid;
    gap: 0.1rem;
    padding: 0.45rem 0.6rem;
    border-radius: 8px;
    background: var(--nx-charcoal);
    color: var(--nx-white);
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: var(--nx-shadow);
}

.bc-tip[hidden] { display: none; }
.bc-tip strong { font-size: 0.78rem; }

/* Tablas de facturación: en el móvil cada fila es una ficha con sus etiquetas. */
.bl-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.bl-table thead { display: none; }
.bl-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 0.75rem; padding: 0.85rem 0; border-bottom: 1px solid var(--nx-border); }
.bl-table tbody tr:last-child { border-bottom: 0; }
.bl-table th[scope="row"] { grid-column: 1 / -1; font-weight: 600; text-align: left; min-width: 0; }
.bl-table th[scope="row"] a { color: var(--nx-text); text-decoration: none; }
.bl-table th[scope="row"] small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--nx-text-light); }
.bl-table td { display: grid; font-variant-numeric: tabular-nums; min-width: 0; }
.bl-table td::after { content: attr(data-label); font-size: 0.7rem; color: var(--nx-text-light); }

.bl-bar { display: block; height: 4px; margin-top: 0.4rem; border-radius: 2px; background: var(--nx-cream); overflow: hidden; }
.bl-bar i { display: block; height: 100%; border-radius: 2px; background: #2a78d6; }

@media (min-width: 768px) {
    .bl-filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .bl-dates { grid-template-columns: 1fr 1fr auto; align-items: end; }
    .bl-projects-actions { grid-template-columns: repeat(2, max-content); }
    .bl-projects-actions .ld-btn,
    .bl-dates .ld-btn { width: auto; padding: 0 1.5rem; }
    .bl-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .bl-kpi-main { grid-column: auto; }
    .bl-kpi-main .ov-total-value { font-size: 1.6rem; }
    .bc-axis,
    .bc-grid,
    .bc-columns { height: 240px; }

    .bl-table thead { display: table-header-group; }
    .bl-table tr { display: table-row; }
    .bl-table th,
    .bl-table td { display: table-cell; padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--nx-border); vertical-align: middle; }
    .bl-table thead th { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--nx-text-muted); text-align: left; }
    .bl-table .num { text-align: right; }
    .bl-table td::after { content: none; }
    .bl-table th[scope="row"] { width: 34%; }
}

@media (min-width: 1200px) {
    .bl-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .bl-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* --- Overview facturación: pestañas y facturas de partners ---------------- */
.bl-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.4rem; margin-bottom: 1rem; padding: 0.3rem; background: var(--nx-cream); border-radius: 12px; }

.bl-tabs a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0 0.5rem;
    border-radius: 9px;
    color: var(--nx-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

.bl-tabs a.is-active { background: var(--nx-white); color: var(--nx-text); box-shadow: var(--nx-shadow-sm); }

.iv-totals { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.iv-range { display: flex; flex-wrap: wrap; align-items: center; gap: 0.35rem; margin-bottom: 0.75rem; font-size: 0.82rem; color: var(--nx-text-light); }
.iv-range a { min-height: 36px; display: inline-flex; align-items: center; padding: 0 0.7rem; border-radius: 999px; color: var(--nx-text-light); text-decoration: none; }
.iv-range a.is-active { background: var(--nx-white); border: 1px solid var(--nx-border); color: var(--nx-text); font-weight: 600; }

/* Fila de liquidación. Móvil: nombre arriba; importe y estado debajo. */
.iv-row summary { grid-template-columns: minmax(0, 1fr) auto; }
.iv-row .pj-name { grid-column: 1; }
.iv-row .pj-chevron { grid-column: 2; grid-row: 1; }
.iv-amount { grid-column: 1 / -1; display: flex; align-items: baseline; gap: 0.5rem; font-size: 1.15rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.iv-amount small { font-size: 0.78rem; font-weight: 400; color: var(--nx-text-light); }
.iv-state { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.iv-state em { font-style: normal; }

.iv-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
.iv-block { min-width: 0; }
.iv-block h3 { font-family: var(--nx-font-body); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--nx-text-muted); margin: 0 0 0.5rem; }
.iv-block .ld-btn { margin-top: 0.5rem; }
.iv-upload { display: grid; gap: 0.25rem; margin-top: 0.75rem; }

.iv-file { display: block; margin: 0; }
.iv-file input { width: 100%; min-height: 48px; padding: 0.6rem; border: 1px dashed var(--nx-border); border-radius: 8px; background: var(--nx-ivory); font-size: 16px; font-family: inherit; }
.iv-file input::file-selector-button { min-height: 32px; margin-right: 0.75rem; padding: 0 0.85rem; border: 1px solid var(--nx-border); border-radius: 6px; background: var(--nx-white); font: inherit; font-size: 0.85rem; cursor: pointer; }

.iv-paid { display: grid; gap: 0.25rem; }

@media (min-width: 768px) {
    .bl-tabs { display: inline-grid; grid-template-columns: repeat(2, max-content); }
    .bl-tabs a { padding: 0 1.25rem; }
    .iv-totals { grid-template-columns: repeat(2, minmax(0, 320px)); }
    .iv-row summary { grid-template-columns: minmax(0, 2.2fr) minmax(110px, 1fr) minmax(0, 2fr) 32px; padding: 0.6rem 0.85rem; }
    .iv-row .pj-name,
    .iv-row .pj-chevron,
    .iv-amount,
    .iv-state { grid-column: auto; grid-row: auto; }
    .iv-amount { flex-direction: column; align-items: flex-end; gap: 0; font-size: 1rem; }
    .iv-body { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .iv-block .ld-btn { width: auto; padding: 0 1.25rem; }
}

/* --- Overview SEO: una gráfica pequeña por proyecto --------------------- */
.seo-note { margin: 0 0 1rem; font-size: 0.8rem; color: var(--nx-text-light); }
.seo-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; margin-bottom: 1rem; }
.seo-card { min-width: 0; }
.seo-head h2 { margin: 0; font-family: var(--nx-font-body); font-size: 1rem; font-weight: 600; color: var(--nx-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seo-head p { margin: 0.15rem 0 0.9rem; font-size: 0.82rem; color: var(--nx-text-light); }
.seo-head strong { font-size: 1.05rem; color: var(--nx-text); font-variant-numeric: tabular-nums; }
.seo-delta { white-space: nowrap; }
.seo-plot { position: relative; height: 130px; }
.seo-plot svg { display: block; width: 100%; height: 100%; overflow: visible; }
.seo-max { position: absolute; left: 2px; top: -1.1rem; font-size: 0.7rem; color: var(--nx-text-muted); font-variant-numeric: tabular-nums; }
.seo-gridline { stroke: var(--nx-border, #e5e7eb); stroke-width: 1; vector-effect: non-scaling-stroke; }
.seo-area { fill: #2563eb; fill-opacity: 0.12; }
.seo-line { fill: none; stroke: #2563eb; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.seo-band rect { fill: transparent; }
.seo-band line { stroke: var(--nx-text-muted, #6b7280); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; pointer-events: none; }
.seo-band:hover line { opacity: 0.6; }
.seo-end { position: absolute; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #2563eb; box-shadow: 0 0 0 2px var(--nx-white, #fff); pointer-events: none; }
.seo-axis { display: flex; justify-content: space-between; margin-top: 0.4rem; font-size: 0.7rem; color: var(--nx-text-muted); font-variant-numeric: tabular-nums; }
@media (min-width: 768px) { .seo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1400px) { .seo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.seo-table tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 768px) { .seo-table tr { display: table-row; } }
