:root {

    --nx-red: #990000;
    --nx-purple: #4b4cb8;

    --nx-black: #000001;
    --nx-bg: #0b0b0f;
    --nx-card: #121218;
    --nx-card-hover: #171720;

    --nx-text: #ffffff;
    --nx-text-muted: #a0a0b0;

    --nx-border: #262632;

    --nx-success: #00b894;
    --nx-warning: #f39c12;
    --nx-danger: #e74c3c;

    --radius: 16px;

    --shadow:
        0 10px 30px rgba(0,0,0,.35);

    --transition: all .25s ease;

    --container: 1280px;
}

* {
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body {
    font-family:
        Inter,
        Segoe UI,
        sans-serif;

    background:var(--nx-bg);

    color:var(--nx-text);

    min-height:100vh;

    line-height:1.6;
}

a {
    color:inherit;
    text-decoration:none;
}

img {
    max-width:100%;
}

.container {
    width:100%;
    max-width:var(--container);
    margin:auto;
    padding:0 20px;
}

.gradient-text {
    background:
        linear-gradient(
            90deg,
            var(--nx-red),
            var(--nx-purple)
        );

    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.btn {

    display:inline-flex;
    align-items:center;
    justify-content:center;

    padding:14px 24px;

    border-radius:12px;

    font-weight:600;

    transition:var(--transition);

    cursor:pointer;
}

.btn-primary {

    background:
        linear-gradient(
            135deg,
            var(--nx-red),
            var(--nx-purple)
        );

    color:#fff;
}

.btn-primary:hover {

    transform:translateY(-2px);

    box-shadow:
        0 0 30px rgba(75,76,184,.4);
}

.btn-secondary {

    border:1px solid var(--nx-border);

    background:var(--nx-card);
}

.btn-secondary:hover {
    background:var(--nx-card-hover);
}

.card {

    background:
        linear-gradient(
            180deg,
            rgba(18,21,35,.95),
            rgba(10,12,20,.95)
        );

    border:1px solid rgba(
        255,
        255,
        255,
        .05
    );

    border-radius:18px;

    padding:28px;

    transition:.2s ease;

}

.card:hover {

    border-color:rgba(
        255,
        255,
        255,
        .08
    );

    transform:translateY(-2px);

}

.site-header {

    position:sticky;
    top:0;

    z-index:100;

    backdrop-filter:blur(12px);

    border-bottom:
        1px solid rgba(255,255,255,.05);

    background:
        rgba(11,11,15,.8);
}

.site-header-inner {

    height:80px;

    display:flex;

    align-items:center;

    justify-content:space-between;
}

.logo {

    font-size:24px;
    font-weight:800;
}

.logo span {
    color:var(--nx-purple);
}

.nav {

    display:flex;
    gap:30px;
}

.nav a {

    color:var(--nx-text-muted);

    transition:var(--transition);
}

.nav a:hover {
    color:#fff;
}

.nav-user {
    color:#cfd4e0;
    font-size:14px;
}

.hero {

    position:relative;

    overflow:hidden;

    padding:
        140px 0
        120px;
}

.hero::before {

    content:"";

    position:absolute;

    width:700px;
    height:700px;

    top:-250px;
    left:-250px;

    background:
        radial-gradient(
            var(--nx-purple),
            transparent 70%
        );

    opacity:.15;
}

.hero::after {

    content:"";

    position:absolute;

    width:700px;
    height:700px;

    right:-250px;
    bottom:-250px;

    background:
        radial-gradient(
            var(--nx-red),
            transparent 70%
        );

    opacity:.15;
}

.hero-content {

    position:relative;
    z-index:2;

    max-width:900px;
}

.hero h1 {

    font-size:72px;

    line-height:1.1;

    margin-bottom:20px;
}

.hero p {

    font-size:22px;

    color:var(--nx-text-muted);

    margin-bottom:40px;
}

.hero-actions {

    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

.section {

    padding:100px 0;
}

.section-title {

    font-size:48px;

    margin-bottom:20px;

    text-align:center;
}

.section-subtitle {

    max-width:700px;

    margin:auto;

    text-align:center;

    color:var(--nx-text-muted);

    margin-bottom:60px;
}

.grid-3 {

    display:grid;

    grid-template-columns:
        repeat(3,1fr);

    gap:24px;
}

.feature-card h3 {

    margin-bottom:12px;

    font-size:22px;
}

.feature-card p {
    color:var(--nx-text-muted);
}

.integration-grid {

    display:grid;

    grid-template-columns:
        repeat(auto-fit,minmax(180px,1fr));

    gap:20px;
}

.integration-card {

    text-align:center;
    padding:30px;
}

.integration-coming {

    opacity:.5;
}

.cta-section {

    text-align:center;
}

.cta-section h2 {

    font-size:54px;

    margin-bottom:20px;
}

.cta-section p {

    color:var(--nx-text-muted);

    margin-bottom:30px;
}

.site-footer {

    border-top:
        1px solid rgba(255,255,255,.05);

    padding:60px 0;
}

.footer-grid {

    display:grid;

    grid-template-columns:
        2fr 1fr 1fr 1fr;

    gap:40px;
}

.footer-title {

    margin-bottom:15px;

    font-weight:700;
}

.footer-links {

    display:flex;

    flex-direction:column;

    gap:10px;
}

.footer-links a {

    color:var(--nx-text-muted);
}

.footer-links a:hover {
    color:#fff;
}

.auth-wrapper {

    display:flex;

    align-items:center;
    justify-content:center;

    min-height:100vh;

    padding:40px;
}

.auth-card {

    width:100%;
    max-width:500px;
}

.form-group {

    margin-bottom:20px;
}

.form-label {

    display:block;

    margin-bottom:8px;
}

.form-input {

    width:100%;

    background:#0d0d14;

    border:1px solid var(--nx-border);

    color:#fff;

    border-radius:12px;

    padding:14px;
}

.form-input:focus {

    outline:none;

    border-color:var(--nx-purple);
}

@media (max-width: 992px) {

    .hero h1 {
        font-size:52px;
    }

    .grid-3 {
        grid-template-columns:1fr;
    }

    .footer-grid {
        grid-template-columns:1fr;
    }
}

@media (max-width:768px) {

    .nav {
        display:none;
    }

    .hero h1 {
        font-size:42px;
    }

    .section-title {
        font-size:34px;
    }

    .cta-section h2 {
        font-size:38px;
    }
}

/* ==========================================
   Dashboard
========================================== */

.dashboard-welcome {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin:50px 0 30px;
}

.dashboard-eyebrow {
    color:var(--brand-secondary);
    text-transform:uppercase;
    font-size:12px;
    letter-spacing:2px;
    margin-bottom:10px;
}

.dashboard-welcome h1 {
    font-size:52px;
    margin:0 0 10px;
}

.dashboard-welcome p {
    color:#9ca3af;
}

.dashboard-stats {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:20px;
    margin-bottom:30px;
}

.dashboard-stat {
    background:#0f111b;
    border:1px solid rgba(255,255,255,.05);
    border-radius:16px;
    padding:25px;
}

.dashboard-stat-label {
    color:#8f96a3;
    margin-bottom:10px;
}

.dashboard-stat-value {
    font-size:42px;
    font-weight:700;
}

.dashboard-recommendations {
    margin-bottom:30px;
}

.recommendation-list {
    display:flex;
    flex-direction:column;
    gap:16px;
    margin-top:20px;
}

.recommendation-item {
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:18px;
    background:#111521;
    border-radius:12px;
}

.dashboard-bottom {
    display:grid;
    grid-template-columns:2fr 1fr;
    gap:20px;
    margin-bottom:30px;
}

.activity-list {
    list-style:none;
    padding:0;
    margin:20px 0 0;
}

.activity-list li {
    padding:15px 0;
    border-bottom:1px solid rgba(255,255,255,.05);
}

.muted {
    color:#9ca3af;
}

.dashboard-table {
    width:100%;
    margin-top:15px;
}

.dashboard-table td {
    padding:12px 0;
    border-bottom:1px solid rgba(255,255,255,.05);
}

@media (max-width:1000px) {

    .dashboard-stats {
        grid-template-columns:1fr 1fr;
    }

    .dashboard-bottom {
        grid-template-columns:1fr;
    }

    .dashboard-welcome {
        flex-direction:column;
        align-items:flex-start;
        gap:20px;
    }

    .recommendation-item {
        flex-direction:column;
        align-items:flex-start;
        gap:15px;
    }

}

@media (max-width:700px) {

    .dashboard-stats {
        grid-template-columns:1fr;
    }

}



/* ==========================================
   App Layout (Sidebar)
========================================== */

.app-layout {
    display:flex;
    min-height:calc(100vh - 72px);
}

.app-sidebar {
    width:260px;
    min-width:260px;
    background:#070911;
    border-right:1px solid rgba(255,255,255,.05);
    position:sticky;
    top:72px;
    height:calc(100vh - 72px);
    overflow-y:auto;
    padding:28px 22px;
}

.app-main {
    flex:1;
    padding:40px;
}

.sidebar-logo {
    display:block;
    font-size:28px;
    font-weight:700;
    color:#fff;
    text-decoration:none;
    margin-bottom:36px;
}

.sidebar-section {
    margin-bottom:32px;
}

.sidebar-title {
    font-size:11px;
    color:#6f7688;
    text-transform:uppercase;
    letter-spacing:2px;
    margin-bottom:10px;
    font-weight:700;
}

.sidebar-nav {
    display:flex;
    flex-direction:column;
    gap:4px;
}

.sidebar-nav a {
    display:block;
    color:#cfd4e0;
    text-decoration:none;
    padding:12px 14px;
    border-radius:10px;
    transition:all .15s ease;
    font-size:14px;
    font-weight:500;
}

.sidebar-nav a:hover {
    background:#111521;
    color:#fff;
}

.sidebar-nav a.active {
    background:linear-gradient(
        90deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
    color:#fff;
}

.sidebar-nav a.active:hover {
    color:#fff;
}

@media (max-width:1000px) {

    .app-layout {
        flex-direction:column;
    }

    .app-sidebar {
        width:100%;
        min-width:100%;
        height:auto;
        position:relative;
        top:0;
        padding:20px;
        border-right:none;
        border-bottom:1px solid rgba(255,255,255,.05);
    }

    .app-main {
        padding:20px;
    }

}

/* ==========================================
   404 Page
========================================== */

.error-page {
    min-height:70vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:80px 20px;
}

.error-container {
    max-width:700px;
    text-align:center;
}

.error-code {
    font-size:140px;
    font-weight:800;
    line-height:1;
    margin-bottom:20px;

    background:linear-gradient(
        90deg,
        var(--brand-primary),
        var(--brand-secondary)
    );

    -webkit-background-clip:text;
    -webkit-text-fill-color:transparent;
}

.error-container h1 {
    font-size:48px;
    margin-bottom:16px;
}

.error-container p {
    color:#9ca3af;
    font-size:18px;
    line-height:1.7;
    margin-bottom:32px;
}

.error-actions {
    display:flex;
    justify-content:center;
    gap:16px;
    flex-wrap:wrap;
}

/* ==========================================
   Integration
========================================== */

.integration-grid{
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(260px,1fr));
    gap:20px;
    margin-bottom:30px;
}

.integration-card{
    display:flex;
    flex-direction:column;
    gap:15px;
}

/* ==========================================
   Settings Page
========================================== */


.form-group{
    display:flex;
    flex-direction:column;
    gap:8px;
    margin-bottom:20px;
}

.form-group label{
    font-size:14px;
    font-weight:600;
}

.form-group input,
.form-group select{
    width:100%;
}

.dashboard-grid{
    display:grid;
    grid-template-columns:
        repeat(auto-fit,minmax(400px,1fr));
    gap:24px;
    margin-bottom:24px;
}

.checkbox{
    display:flex;
    gap:10px;
    align-items:center;
    margin-bottom:12px;
}

.alert{
    padding:15px;
    border-radius:10px;
    margin-bottom:20px;
}

.alert-success{
    background:#0f2b18;
    border:1px solid #1f7a43;
    color:#9be7b3;
}

/* ==========================================
   Modern Forms
========================================== */

.form-group {
    margin-bottom:22px;
}

.form-group label {
    display:block;
    margin-bottom:8px;
    font-size:13px;
    font-weight:600;
    color:#8f96ab;
    text-transform:uppercase;
    letter-spacing:.5px;
}

.form-group input,
.form-group select,
.form-group textarea {

    width:100%;

    background:#0d1220;

    border:1px solid rgba(
        255,
        255,
        255,
        .08
    );

    border-radius:12px;

    padding:14px 16px;

    color:#fff;

    font-size:15px;

    transition:all .2s ease;

    outline:none;

}

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {

    border-color:rgba(
        255,
        255,
        255,
        .15
    );

}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {

    border-color:var(--brand-primary);

    box-shadow:
        0 0 0 4px rgba(
            153,
            0,
            0,
            .15
        );

    background:#101729;

}

.form-group input::placeholder,
.form-group textarea::placeholder {

    color:#666f87;

}

.checkbox {

    display:flex;
    align-items:center;

    gap:12px;

    padding:12px 0;

    color:#d5d9e5;

    font-size:15px;

}

.checkbox input {

    width:18px;
    height:18px;

    accent-color:
        var(--brand-primary);

}

.plan-card {

    position:relative;

    overflow:hidden;

}

.plan-name {

    font-size:32px;
    font-weight:700;

    margin:8px 0 20px;

}

.plan-badge {

    display:inline-block;

    padding:6px 12px;

    border-radius:999px;

    background:rgba(
        153,
        0,
        0,
        .15
    );

    border:1px solid rgba(
        153,
        0,
        0,
        .3
    );

    color:#ff9c9c;

    font-size:12px;

    font-weight:700;

    text-transform:uppercase;

    letter-spacing:1px;

}

.subscription-card {
    min-height:340px;
}

.plan-badge {

    display:inline-flex;
    align-items:center;

    padding:6px 12px;

    border-radius:999px;

    background:rgba(
        153,
        0,
        0,
        .15
    );

    border:1px solid rgba(
        153,
        0,
        0,
        .25
    );

    color:#ff9c9c;

    font-size:11px;
    font-weight:700;
    letter-spacing:1px;

    margin-bottom:16px;
}

.plan-name {

    font-size:48px;
    font-weight:800;

    line-height:1;

    margin-bottom:12px;
}

.plan-features {

    margin:28px 0;

    display:flex;
    flex-direction:column;

    gap:12px;
}

.plan-feature {

    color:#d5d9e5;

    padding-bottom:12px;

    border-bottom:1px solid rgba(
        255,
        255,
        255,
        .05
    );
}

.plan-feature:last-child {
    border-bottom:none;
}

.plan-actions {
    margin-top:auto;
}

.muted {
    color:#8f96ab;
}

/*
|--------------------------------------------------------------------------
| Admin Plans
|--------------------------------------------------------------------------
*/

.admin-create-plan{
    margin-bottom:32px;
}

.admin-create-plan form{
    display:grid;
    grid-template-columns:2fr 2fr 1fr auto;
    gap:12px;
}

.plan-grid{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(600px,1fr));
    gap:24px;
}

.plan-card{
    display:flex;
    flex-direction:column;
    gap:20px;
    height:100%;
}

.plan-edit-form{
    display:grid;
    grid-template-columns:2fr 2fr 1fr auto;
    gap:12px;
    padding-bottom:16px;
    border-bottom:1px solid rgba(255,255,255,.08);
}

.plan-edit-form input{
    width:100%;
}

.plan-feature-list{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.feature-row{
    display:grid;
    grid-template-columns:140px 1fr auto auto;
    gap:12px;
    align-items:center;
    padding:10px 0;
    border-bottom:1px solid rgba(255,255,255,.06);
}

.feature-row:last-child{
    border-bottom:none;
}

.plan-feature-key{
    font-weight:600;
    color:rgba(255,255,255,.85);
    text-transform:capitalize;
    word-break:break-word;
}

.feature-row form{
    display:contents;
}

.feature-row input{
    width:100%;
}

.inline-form{
    display:flex;
    gap:12px;
    align-items:center;
    flex-wrap:wrap;
}

.inline-form input{
    flex:1;
    min-width:120px;
}

.plan-delete{
    margin-top:auto;
    padding-top:12px;
    border-top:1px solid rgba(255,255,255,.08);
}

.plan-delete button{
    width:100%;
}

.btn-danger{
    background:rgba(220,38,38,.15);
    border:1px solid rgba(220,38,38,.35);
}

.btn-danger:hover{
    background:rgba(220,38,38,.25);
}

@media (max-width:1200px){

    .plan-grid{
        grid-template-columns:1fr;
    }

}

@media (max-width:768px){

    .admin-create-plan form,
    .plan-edit-form{
        grid-template-columns:1fr;
    }

    .feature-row{
        grid-template-columns:1fr;
    }

    .feature-row form{
        display:flex;
        flex-direction:column;
        gap:8px;
    }

    .feature-row button{
        width:100%;
    }

}

.plan-price-display{
    font-size:1.25rem;
    font-weight:600;
    margin:8px 0 16px;
    color:var(--text-secondary);
}

.status-good{
    color:#22c55e;
    font-weight:600;
}

.status-missing{
    color:#f59e0b;
    font-weight:600;
    text-decoration:none;
}

.status-missing:hover{
    text-decoration:underline;
}

/*
|--------------------------------------------------------------------------
| Customers
|--------------------------------------------------------------------------
*/

.segment-filter{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding:10px 16px;
    border-radius:10px;
    background:rgba(255,255,255,.03);
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
    text-decoration:none;
    transition:.2s ease;
}

.segment-filter:hover{
    background:#990000;
    border-color:#990000;
    color:#fff;
}

.segment-filter.active{
    background:#990000;
    border-color:#990000;
    color:#fff;
}

.customer-search{
    width:100%;
    padding:12px 14px;
    border-radius:10px;
    background:#0b1020;
    border:1px solid rgba(255,255,255,.08);
    color:#fff;
}

.customer-search:focus{
    outline:none;
    border-color:#990000;
}

.badge-vip{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    background:#1f5131;
    color:#fff;
    font-size:.8rem;
}

.badge-risk{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    background:#990000;
    color:#fff;
    font-size:.8rem;
}

.badge-dormant{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    background:#7a5b00;
    color:#fff;
    font-size:.8rem;
}

.badge-standard{
    display:inline-block;
    padding:4px 10px;
    border-radius:999px;
    background:rgba(255,255,255,.08);
    color:#fff;
    font-size:.8rem;
}

.dashboard-table{
    width:100%;
    table-layout:fixed;
}

.dashboard-table th,
.dashboard-table td{
    text-align:left;
}

.dashboard-table th:last-child,
.dashboard-table td:last-child{
    width:140px;
}

.customer-intelligence-field{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.customer-intelligence-field label{
    font-size:.8rem;
    font-weight:600;
    color:#c7cadb;
    text-transform:uppercase;
    letter-spacing:.04em;
}

.customer-intelligence-field input{
    width:100%;
    height:46px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.08);
    border-radius:10px;
    background:#060c22;
    color:#fff;
    font-size:1rem;
}

.customer-intelligence-field input:focus{
    outline:none;
    border-color:#990000;
    box-shadow:0 0 0 3px rgba(153,0,0,.15);
}

.badge-standard{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 10px;
    border-radius:999px;
    background:#1e293b;
    color:#ffffff;
    font-size:.75rem;
    font-weight:600;
}

.badge-risk-rule{
    display:inline-flex;
    align-items:center;
    gap:6px;
    padding:4px 10px;
    border-radius:999px;
    background:#7c5a00;
    color:#fff;
    font-size:.75rem;
    font-weight:600;
}