/* NeuralDocs shared premium polish */
:root {
    --ndp-bg: #02060f;
    --ndp-ink: #f8fafc;
    --ndp-muted: #8aa0bf;
    --ndp-cyan: #06b6d4;
    --ndp-blue: #0ea5e9;
    --ndp-green: #10b981;
    --ndp-red: #ef4444;
    --ndp-line: rgba(6,182,212,0.18);
    --ndp-glass: rgba(8,15,30,0.72);
    --ndp-ease: cubic-bezier(0.22,1,0.36,1);
}

html {
    background:
        radial-gradient(circle at 18% -12%, rgba(6,182,212,0.20), transparent 32%),
        radial-gradient(circle at 88% 8%, rgba(14,165,233,0.14), transparent 34%),
        radial-gradient(circle at 50% 120%, rgba(16,185,129,0.08), transparent 34%),
        var(--ndp-bg);
}

body {
    text-rendering: geometricPrecision;
    -webkit-font-smoothing: antialiased;
}

html::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background:
        linear-gradient(rgba(6,182,212,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6,182,212,0.028) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 18%, rgba(0,0,0,0.72), transparent 72%);
}

html::after {
    content: "";
    position: fixed;
    inset: auto -18vw -28vw auto;
    width: 52vw;
    height: 52vw;
    min-width: 360px;
    min-height: 360px;
    z-index: -2;
    pointer-events: none;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6,182,212,0.14), rgba(14,165,233,0.08) 42%, transparent 70%);
    filter: blur(8px);
    animation: ndpDrift 18s var(--ndp-ease) infinite alternate;
}

::selection {
    background: rgba(6,182,212,0.28);
    color: #fff;
}

:focus-visible {
    outline: 2px solid rgba(6,182,212,0.95);
    outline-offset: 3px;
    box-shadow: 0 0 0 6px rgba(6,182,212,0.14) !important;
}

a,
button,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
}

button,
a[class*="btn"],
.btn,
.btn-cta,
.btn-ghost,
.btn-submit,
.btn-primary,
.btn-form,
.btn-hero-primary,
.btn-hero-sec {
    transition:
        transform 0.28s var(--ndp-ease),
        box-shadow 0.28s var(--ndp-ease),
        border-color 0.28s ease,
        background-color 0.28s ease,
        opacity 0.28s ease;
}

button:hover,
a[class*="btn"]:hover,
.btn:hover,
.btn-cta:hover,
.btn-submit:hover,
.btn-primary:hover,
.btn-form:hover,
.btn-hero-primary:hover {
    transform: translateY(-2px);
}

.card,
.form-box,
.feature-card,
.stat-card,
.proof-card,
.modal-content,
.terminal,
.chart-box,
.kpi-card,
.nd-section-wrap,
.pricing-card,
.plan-card,
.download-card,
.settings-card {
    box-shadow:
        0 24px 70px rgba(0,0,0,0.36),
        inset 0 1px 0 rgba(255,255,255,0.055);
}

.card,
.form-box,
.modal-content {
    position: relative;
    overflow: hidden;
    border-color: rgba(6,182,212,0.20) !important;
}

.card::before,
.form-box::before,
.modal-content::before {
    content: none;
    display: none;
}

.card > *,
.form-box > *,
.modal-content > * {
    position: relative;
    z-index: 1;
}

input,
textarea,
select,
.form-input,
.field input {
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

input:focus,
textarea:focus,
select:focus,
.form-input:focus,
.field input:focus {
    border-color: rgba(6,182,212,0.55) !important;
    box-shadow:
        0 0 0 4px rgba(6,182,212,0.10),
        0 14px 38px rgba(6,182,212,0.08),
        inset 0 1px 0 rgba(255,255,255,0.06) !important;
}

.logo,
.page-title,
.hero-title,
.card-title,
.section-title {
    text-wrap: balance;
}

.hero-tag,
.live-badge,
.status-badge,
.divider-text {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.feature-card,
.stat-card,
.proof-card,
.card,
.form-box {
    animation: none;
}

.feature-card:nth-child(2),
.stat-card:nth-child(2),
.proof-card:nth-child(2) {
    animation-delay: 70ms;
}

.feature-card:nth-child(3),
.stat-card:nth-child(3),
.proof-card:nth-child(3) {
    animation-delay: 140ms;
}

@keyframes ndpEnter {
    from { opacity: 0; transform: translateY(18px) scale(0.985); filter: blur(8px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

@keyframes ndpDrift {
    from { transform: translate3d(0,0,0) scale(1); opacity: 0.75; }
    to { transform: translate3d(-5vw,-4vw,0) scale(1.08); opacity: 1; }
}

@media (max-width: 900px) {
    html[data-nd-view="analiticas"] #app-content #ndFilterBar .nd-fb-left {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    html[data-nd-view="analiticas"] #app-content #ndFilterIndicator {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    html[data-nd-view="analiticas"] #app-content #ndFilterIndicatorText {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
    }
}

@media (max-width: 520px) {
    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-card {
        min-width: 0 !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-card-head {
        display: grid !important;
        grid-template-columns: 38px minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 8px !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-card-head .nh-credits {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 30px !important;
        padding: 4px 5px !important;
        white-space: normal !important;
        overflow-wrap: anywhere !important;
        line-height: 1.15 !important;
        text-align: center !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-block-header {
        flex-wrap: wrap !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-block-info {
        min-width: 0 !important;
    }

    html[data-nd-view="neuralhub"] body #app-content#app-content .nh-block-right {
        flex: 1 1 100% !important;
        width: calc(100% - 43px) !important;
        max-width: calc(100% - 43px) !important;
        margin-left: 43px !important;
        justify-content: space-between !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
