/* NotiPilot design system — built on Bootstrap 5.3 */

:root,
[data-bs-theme="light"] {
    --np-primary: #5b4cf5;
    --np-primary-600: #4a3be0;
    --np-primary-50: #f0eeff;
    --np-accent: #06b6d4;
    --np-success: #10b981;
    --np-warning: #f59e0b;
    --np-danger: #ef4444;

    --np-bg: #f6f7fb;
    --np-surface: #ffffff;
    --np-surface-2: #f9fafb;
    --np-border: #e8eaf1;
    --np-text: #0f172a;
    --np-muted: #64748b;
    --np-sidebar: #0b1020;
    --np-sidebar-text: #a5b0c8;
    --np-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .04);
    --np-shadow-lg: 0 10px 40px rgba(15, 23, 42, .10);
    --np-radius: 14px;
    --np-radius-sm: 10px;

    --bs-primary: var(--np-primary);
    --bs-primary-rgb: 91, 76, 245;
    --bs-body-bg: var(--np-bg);
    --bs-body-color: var(--np-text);
    --bs-border-color: var(--np-border);
    --bs-link-color: var(--np-primary);
    --bs-link-hover-color: var(--np-primary-600);
    --bs-body-font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-bs-theme="dark"] {
    --np-primary: #7c6ffb;
    --np-primary-600: #6b5ef0;
    --np-primary-50: rgba(124, 111, 251, .14);
    --np-bg: #0a0d17;
    --np-surface: #121726;
    --np-surface-2: #0f1422;
    --np-border: #232a3d;
    --np-text: #e6e9f2;
    --np-muted: #8b95ad;
    --np-sidebar: #070a12;
    --np-shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --np-shadow-lg: 0 10px 40px rgba(0, 0, 0, .45);

    --bs-primary: var(--np-primary);
    --bs-primary-rgb: 124, 111, 251;
    --bs-body-bg: var(--np-bg);
    --bs-body-color: var(--np-text);
    --bs-border-color: var(--np-border);
    --bs-secondary-bg: var(--np-surface-2);
    --bs-tertiary-bg: var(--np-surface-2);
}

:root, [data-bs-theme="light"] { --bs-link-color-rgb: 91, 76, 245; --bs-link-hover-color-rgb: 74, 59, 224; }
[data-bs-theme="dark"] { --bs-link-color-rgb: 169, 159, 255; --bs-link-hover-color-rgb: 199, 192, 255; }
.logo-on-dark { display: none; }
[data-bs-theme="dark"] .logo-on-dark { display: inline; }
[data-bs-theme="dark"] .logo-on-light { display: none; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { background: var(--np-bg); color: var(--np-text); font-size: .9375rem; }
::selection { background: rgba(var(--bs-primary-rgb), .2); }
a { text-decoration: none; }
.icon { flex-shrink: 0; vertical-align: -3px; }
.text-muted { color: var(--np-muted) !important; }
.fw-medium { font-weight: 500; }
.fs-7 { font-size: .8125rem; }

/* ---------- Buttons & forms ---------- */
.btn { border-radius: var(--np-radius-sm); font-weight: 500; padding: .55rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn-sm { padding: .35rem .7rem; font-size: .8125rem; }
.btn-lg { padding: .8rem 1.25rem; font-size: 1rem; }
.btn-primary { --bs-btn-bg: var(--np-primary); --bs-btn-border-color: var(--np-primary); --bs-btn-hover-bg: var(--np-primary-600); --bs-btn-hover-border-color: var(--np-primary-600); --bs-btn-active-bg: var(--np-primary-600); --bs-btn-disabled-bg: var(--np-primary); --bs-btn-disabled-border-color: var(--np-primary); box-shadow: 0 4px 14px rgba(var(--bs-primary-rgb), .28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(var(--bs-primary-rgb), .35); }
.btn-gradient { color: #fff; border: 0; background: linear-gradient(135deg, var(--np-primary), #8b5cf6 55%, var(--np-accent)); background-size: 200% 200%; box-shadow: 0 8px 24px rgba(var(--bs-primary-rgb), .35); }
.btn-gradient:hover { color: #fff; background-position: 100% 50%; transform: translateY(-1px); }
.btn-soft { color: var(--np-primary); background: var(--np-primary-50); border: 0; }
.btn-soft:hover { color: var(--np-primary-600); background: rgba(var(--bs-primary-rgb), .18); }
.btn-ghost { color: var(--np-muted); background: transparent; border: 1px solid var(--np-border); }
.btn-ghost:hover { color: var(--np-text); background: var(--np-surface-2); }
.btn-icon { width: 38px; height: 38px; padding: 0; }

.form-label { font-weight: 500; font-size: .875rem; margin-bottom: .35rem; }
.form-control, .form-select { border-radius: var(--np-radius-sm); border-color: var(--np-border); background-color: var(--np-surface); padding: .65rem .85rem; transition: border-color .15s, box-shadow .15s; }
.form-control:focus, .form-select:focus { border-color: var(--np-primary); box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), .14); }
.form-text { color: var(--np-muted); font-size: .8rem; }
.input-icon { position: relative; }
.input-icon > .icon { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); color: var(--np-muted); pointer-events: none; }
.input-icon > .form-control { padding-left: 2.6rem; }
.input-icon > .input-action { position: absolute; right: .4rem; top: 50%; transform: translateY(-50%); border: 0; background: none; color: var(--np-muted); padding: .4rem; border-radius: 8px; display: inline-flex; }
.input-icon > .input-action:hover { color: var(--np-text); background: var(--np-surface-2); }
.input-icon > .form-control.has-action { padding-right: 2.8rem; }

/* ---------- Cards ---------- */
.np-card { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); box-shadow: var(--np-shadow); }
.np-card-header { padding: 1.1rem 1.35rem; border-bottom: 1px solid var(--np-border); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.np-card-header h2, .np-card-header h3 { font-size: 1rem; font-weight: 600; margin: 0; }
.np-card-body { padding: 1.35rem; }
.np-section-title { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--np-muted); margin-bottom: .75rem; }

.np-alert { display: flex; gap: .75rem; align-items: flex-start; border-radius: var(--np-radius-sm); padding: .85rem 1rem; border: 1px solid; font-size: .9rem; }
.np-alert-success { background: rgba(16, 185, 129, .08); border-color: rgba(16, 185, 129, .25); color: #047857; }
.np-alert-danger { background: rgba(239, 68, 68, .08); border-color: rgba(239, 68, 68, .25); color: #b91c1c; }
.np-alert-info { background: var(--np-primary-50); border-color: rgba(var(--bs-primary-rgb), .2); color: var(--np-primary-600); }
[data-bs-theme="dark"] .np-alert-success { color: #6ee7b7; }
[data-bs-theme="dark"] .np-alert-danger { color: #fca5a5; }
.np-alert .btn-close { margin-left: auto; font-size: .7rem; }

.badge-soft { display: inline-flex; align-items: center; gap: .3rem; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; font-weight: 600; }
.badge-soft.success { background: rgba(16, 185, 129, .12); color: #059669; }
.badge-soft.danger { background: rgba(239, 68, 68, .12); color: #dc2626; }
.badge-soft.warning { background: rgba(245, 158, 11, .14); color: #b45309; }
.badge-soft.primary { background: var(--np-primary-50); color: var(--np-primary); }
.badge-soft.muted { background: var(--np-surface-2); color: var(--np-muted); border: 1px solid var(--np-border); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: inline-block; }

/* ---------- Portal shell ---------- */
.np-shell { display: flex; min-height: 100vh; }
.np-sidebar { width: 260px; flex-shrink: 0; background: var(--np-sidebar); color: var(--np-sidebar-text); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding: 1.25rem 1rem; z-index: 1040; }
.np-brand { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1.5rem; color: #fff; font-weight: 700; font-size: 1.1rem; letter-spacing: -.01em; }
.np-brand img { height: 32px; width: auto; }
.np-nav-label { font-size: .7rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #5d6883; padding: 1rem .75rem .4rem; }
.np-nav a { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: 10px; color: var(--np-sidebar-text); font-weight: 500; font-size: .9rem; transition: background .15s, color .15s; }
.np-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.np-nav a.active { background: linear-gradient(135deg, rgba(124, 111, 251, .25), rgba(6, 182, 212, .12)); color: #fff; box-shadow: inset 0 0 0 1px rgba(124, 111, 251, .35); }
.np-nav a.active .icon { color: #a99fff; }
.np-sidebar-card { margin-top: auto; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07); border-radius: 12px; padding: 1rem; font-size: .8rem; }
.np-sidebar-card .progress { height: 6px; background: rgba(255, 255, 255, .08); border-radius: 99px; }
.np-sidebar-card .progress-bar { background: linear-gradient(90deg, var(--np-primary), var(--np-accent)); border-radius: 99px; }

.np-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.np-topbar { height: 64px; display: flex; align-items: center; gap: .75rem; padding: 0 1.75rem; background: color-mix(in srgb, var(--np-bg) 80%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--np-border); position: sticky; top: 0; z-index: 1030; }
.np-topbar h1 { font-size: 1.05rem; font-weight: 600; margin: 0; }
.np-content { padding: 1.75rem; flex: 1; max-width: 1400px; width: 100%; }
.np-footer { padding: 1rem 1.75rem 1.5rem; color: var(--np-muted); font-size: .8rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.np-footer a { color: var(--np-muted); }
.np-footer a:hover { color: var(--np-text); }

.np-avatar { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; color: #fff; background: linear-gradient(135deg, var(--np-primary), var(--np-accent)); flex-shrink: 0; }
.np-user-btn { display: flex; align-items: center; gap: .6rem; background: none; border: 1px solid transparent; padding: .25rem .5rem .25rem .25rem; border-radius: 12px; color: var(--np-text); }
.np-user-btn:hover, .np-user-btn[aria-expanded="true"] { background: var(--np-surface); border-color: var(--np-border); }
.dropdown-menu { border-radius: 12px; border-color: var(--np-border); box-shadow: var(--np-shadow-lg); padding: .4rem; background: var(--np-surface); }
.dropdown-item { border-radius: 8px; padding: .5rem .75rem; display: flex; align-items: center; gap: .6rem; font-size: .875rem; }
.dropdown-item.active, .dropdown-item:active { background: var(--np-primary); }

.np-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.np-page-head h2 { font-size: 1.5rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .25rem; }
.np-page-head p { margin: 0; color: var(--np-muted); }

.np-backdrop { display: none; }
@media (max-width: 991.98px) {
    .np-sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .25s ease; box-shadow: var(--np-shadow-lg); }
    .np-sidebar.open { transform: translateX(0); }
    .np-backdrop.open { display: block; position: fixed; inset: 0; background: rgba(2, 6, 23, .5); z-index: 1035; }
    .np-topbar, .np-content, .np-footer { padding-left: 1rem; padding-right: 1rem; }
}

/* ---------- Dashboard ---------- */
.np-hero { position: relative; overflow: hidden; border-radius: 18px; padding: 1.75rem; color: #fff; background: radial-gradient(1200px 300px at 0% 0%, rgba(124, 111, 251, .9), transparent 60%), radial-gradient(900px 300px at 100% 100%, rgba(6, 182, 212, .75), transparent 60%), #111633; box-shadow: var(--np-shadow-lg); }
.np-hero::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px); background-size: 18px 18px; mask-image: linear-gradient(90deg, transparent, #000 60%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); pointer-events: none; }
.np-hero > * { position: relative; z-index: 1; }
.np-hero h2 { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; }
.np-hero p { color: rgba(255, 255, 255, .78); margin: 0; }
.np-hero .btn-light { color: #111633; font-weight: 600; }
.np-hero .btn-outline-light { border-color: rgba(255, 255, 255, .35); }

.np-stat { padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; height: 100%; }
.np-stat-icon { width: 42px; height: 42px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; }
.np-stat-icon.violet { background: var(--np-primary-50); color: var(--np-primary); }
.np-stat-icon.cyan { background: rgba(6, 182, 212, .12); color: #0891b2; }
.np-stat-icon.green { background: rgba(16, 185, 129, .12); color: #059669; }
.np-stat-icon.amber { background: rgba(245, 158, 11, .14); color: #d97706; }
.np-stat-value { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1; }
.np-stat-label { color: var(--np-muted); font-size: .85rem; }
.np-progress { height: 8px; border-radius: 99px; background: var(--np-surface-2); border: 1px solid var(--np-border); overflow: hidden; }
.np-progress > span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--np-primary), var(--np-accent)); transition: width .6s ease; }
.np-progress.warn > span { background: linear-gradient(90deg, var(--np-warning), var(--np-danger)); }

.np-quick { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.1rem; border-radius: var(--np-radius); border: 1px solid var(--np-border); background: var(--np-surface); color: var(--np-text); transition: border-color .15s, transform .15s, box-shadow .15s; height: 100%; }
.np-quick:hover { border-color: rgba(var(--bs-primary-rgb), .45); transform: translateY(-2px); box-shadow: var(--np-shadow-lg); color: var(--np-text); }
.np-quick .np-stat-icon { flex-shrink: 0; }
.btn-check:checked + .np-quick { border-color: var(--np-primary); background: var(--np-primary-50); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .15); transform: none; }
.btn-check:focus-visible + .np-quick { outline: 2px solid var(--np-primary); outline-offset: 2px; }
.np-quick strong { display: block; font-size: .92rem; }
.np-quick small { color: var(--np-muted); }

.np-app-card { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; height: 100%; transition: border-color .15s, box-shadow .15s; }
.np-app-card:hover { border-color: rgba(var(--bs-primary-rgb), .35); box-shadow: var(--np-shadow-lg); }
.np-app-logo { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: linear-gradient(135deg, #6366f1, #06b6d4); flex-shrink: 0; }
.np-app-meta { display: flex; gap: 1.25rem; font-size: .8rem; color: var(--np-muted); }
.np-app-meta strong { color: var(--np-text); font-size: 1rem; display: block; }
.np-code-pill { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .75rem; background: var(--np-surface-2); border: 1px solid var(--np-border); border-radius: 8px; padding: .3rem .5rem; color: var(--np-muted); display: inline-flex; align-items: center; gap: .4rem; max-width: 100%; overflow: hidden; }
.np-code-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-code-pill button { border: 0; background: none; color: inherit; padding: 0; display: inline-flex; }
.np-code-pill button:hover { color: var(--np-primary); }

.np-list { list-style: none; margin: 0; padding: 0; }
.np-list-item { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.35rem; border-bottom: 1px solid var(--np-border); }
.np-list-item:last-child { border-bottom: 0; }
.np-list-item:hover { background: var(--np-surface-2); }
.np-list-icon { width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--np-primary-50); color: var(--np-primary); flex-shrink: 0; }
.np-list-body { min-width: 0; flex: 1; }
.np-list-title { font-weight: 600; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.np-list-sub { color: var(--np-muted); font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.np-empty { text-align: center; padding: 3rem 1.5rem; }
.np-empty-icon { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 18px; display: flex; align-items: center; justify-content: center; background: var(--np-primary-50); color: var(--np-primary); }
.np-empty h3 { font-size: 1.05rem; font-weight: 600; }
.np-empty p { color: var(--np-muted); max-width: 420px; margin: 0 auto 1.25rem; }

.np-steps { counter-reset: step; list-style: none; padding: 0; margin: 0; }
.np-steps li { position: relative; padding: 0 0 1.1rem 2.75rem; }
.np-steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: -2px; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; background: var(--np-primary-50); color: var(--np-primary); }
.np-steps li.done::before { content: "✓"; background: var(--np-success); color: #fff; }
.np-steps li:not(:last-child)::after { content: ""; position: absolute; left: 14px; top: 32px; bottom: 4px; width: 2px; background: var(--np-border); }
.np-steps strong { display: block; font-size: .9rem; }
.np-steps span { color: var(--np-muted); font-size: .82rem; }

/* ---------- Send notification ---------- */
.np-phone { width: 290px; max-width: 100%; margin: 0 auto; aspect-ratio: 9 / 18.5; border-radius: 44px; padding: 12px; background: #0b0f1a; box-shadow: 0 30px 60px rgba(15, 23, 42, .25), inset 0 0 0 2px #262c3d; position: relative; }
.np-phone-screen { height: 100%; border-radius: 34px; overflow: hidden; position: relative; background: radial-gradient(400px 300px at 20% 10%, #7c6ffb, transparent 60%), radial-gradient(400px 300px at 90% 90%, #06b6d4, transparent 60%), #1b1f3b; padding: 46px 12px 12px; }
.np-phone-notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 26px; border-radius: 20px; background: #000; z-index: 2; }
.np-phone-time { color: #fff; text-align: center; font-size: 3rem; font-weight: 300; letter-spacing: -.02em; margin: .5rem 0 1.25rem; line-height: 1; }
.np-push { background: rgba(255, 255, 255, .82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-radius: 18px; padding: .7rem .8rem; color: #0f172a; font-size: .8rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .15); animation: np-drop .5s cubic-bezier(.2, .9, .3, 1.2); }
.np-push-head { display: flex; align-items: center; gap: .4rem; font-size: .7rem; color: #475569; margin-bottom: .2rem; }
.np-push-head img, .np-push-head .np-push-appicon { width: 18px; height: 18px; border-radius: 5px; background: linear-gradient(135deg, #6366f1, #06b6d4); }
.np-push-title { font-weight: 600; word-break: break-word; }
.np-push-body { color: #334155; word-break: break-word; white-space: pre-wrap; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
@keyframes np-drop { from { opacity: 0; transform: translateY(-12px) scale(.97); } to { opacity: 1; transform: none; } }

.np-counter { font-size: .75rem; color: var(--np-muted); }
.np-counter.over { color: var(--np-danger); }

/* Select2 theme */
body .select2-container--default .select2-selection--single { height: auto; min-height: 44px; border: 1px solid var(--np-border); border-radius: var(--np-radius-sm); background: var(--np-surface); padding: .45rem 2.2rem .45rem .85rem; display: flex; align-items: center; }
body .select2-container--default .select2-selection--single .select2-selection__rendered { padding: 0; line-height: 1.5; color: var(--np-text); }
body .select2-container--default .select2-selection--single .select2-selection__arrow { height: 100%; right: .6rem; }
body .select2-container--default .select2-selection--single .select2-selection__clear { margin-right: .5rem; color: var(--np-muted); }
body .select2-container--default.select2-container--focus .select2-selection--single, body .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--np-primary); box-shadow: 0 0 0 4px rgba(var(--bs-primary-rgb), .14); }
body .select2-dropdown { border: 1px solid var(--np-border); border-radius: 12px; box-shadow: var(--np-shadow-lg); overflow: hidden; background: var(--np-surface); color: var(--np-text); }
body .select2-container--open .select2-dropdown--below { border-top: 1px solid var(--np-border); border-radius: 12px; margin-top: 6px; }
body .select2-container--open .select2-dropdown--above { border-bottom: 1px solid var(--np-border); border-radius: 12px; margin-top: -6px; }
body .select2-container--default.select2-container--open .select2-selection--single { border-radius: var(--np-radius-sm); }
body .select2-search--dropdown { padding: .6rem; }
body .select2-container--default .select2-search--dropdown .select2-search__field { border: 1px solid var(--np-border); border-radius: 8px; padding: .5rem .7rem; background: var(--np-surface-2); color: var(--np-text); }
body .select2-results__options { max-height: 340px !important; padding: .25rem; }
body .select2-container--default .select2-results__group { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--np-muted); padding: .7rem .6rem .35rem; }
body .select2-container--default .select2-results__option { border-radius: 8px; padding: .5rem .6rem; }
body .select2-container--default .select2-results__option[role="group"] { padding: 0; }
body .select2-container--default .select2-results__option--group .select2-results__option { padding-left: .8rem; }
body .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable { background: var(--np-primary-50); color: var(--np-text); }
body .select2-container--default .select2-results__option--selected { background: var(--np-primary); color: #fff; }
.seg-opt { display: flex; align-items: center; justify-content: space-between; gap: .75rem; }
.seg-opt-count { font-size: .72rem; font-weight: 600; padding: .1rem .5rem; border-radius: 99px; background: var(--np-surface-2); border: 1px solid var(--np-border); color: var(--np-muted); white-space: nowrap; }
body .select2-results__option--selected .seg-opt-count { background: rgba(255, 255, 255, .2); color: #fff; border-color: transparent; }

/* ---------- Auth ---------- */
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; background: var(--np-surface); }
.auth-visual { position: relative; overflow: hidden; color: #fff; padding: 3rem; display: flex; flex-direction: column; justify-content: space-between; background: #070a1a; isolation: isolate; }
.auth-visual .blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75; z-index: -1; animation: np-float 16s ease-in-out infinite alternate; will-change: transform; }
.auth-visual .blob.b1 { width: 520px; height: 520px; background: #5b4cf5; top: -160px; left: -120px; }
.auth-visual .blob.b2 { width: 420px; height: 420px; background: #06b6d4; bottom: -140px; right: -100px; animation-delay: -5s; }
.auth-visual .blob.b3 { width: 300px; height: 300px; background: #c026d3; top: 40%; left: 45%; opacity: .45; animation-delay: -10s; }
.auth-visual .grid-overlay { position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse at center, #000 30%, transparent 75%); }
@keyframes np-float { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(40px, 30px) scale(1.08); } 100% { transform: translate(-30px, 50px) scale(.95); } }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; }
.auth-brand img { height: 36px; }
.auth-headline { max-width: 520px; }
.auth-headline h1 { font-size: clamp(2rem, 3.2vw, 3rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.08; margin-bottom: 1rem; }
.auth-headline h1 .grad { background: linear-gradient(90deg, #a99fff, #67e8f9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-headline p { color: rgba(255, 255, 255, .7); font-size: 1.05rem; }
.auth-stack { position: relative; height: 230px; max-width: 420px; margin: 2rem 0; }
.auth-push { position: absolute; left: 0; right: 0; display: flex; gap: .75rem; align-items: flex-start; padding: .9rem 1rem; border-radius: 18px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: 0 20px 40px rgba(0, 0, 0, .25); opacity: 0; animation: np-push-cycle 9s ease-in-out infinite; }
.auth-push:nth-child(1) { animation-delay: 0s; }
.auth-push:nth-child(2) { animation-delay: 3s; }
.auth-push:nth-child(3) { animation-delay: 6s; }
.auth-push .ap-icon { width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7c6ffb, #06b6d4); }
.auth-push .ap-title { font-weight: 600; font-size: .9rem; }
.auth-push .ap-body { color: rgba(255, 255, 255, .7); font-size: .82rem; }
.auth-push .ap-time { margin-left: auto; font-size: .7rem; color: rgba(255, 255, 255, .5); white-space: nowrap; }
@keyframes np-push-cycle {
    0% { opacity: 0; transform: translateY(-24px) scale(.96); top: 0; }
    6% { opacity: 1; transform: none; top: 0; }
    30% { opacity: 1; transform: none; top: 0; }
    36% { opacity: .55; transform: scale(.94); top: 84px; }
    60% { opacity: .55; transform: scale(.94); top: 84px; }
    66% { opacity: .25; transform: scale(.88); top: 158px; }
    90% { opacity: .25; transform: scale(.88); top: 158px; }
    100% { opacity: 0; transform: scale(.85); top: 190px; }
}
.auth-features { display: flex; gap: 1.5rem; flex-wrap: wrap; color: rgba(255, 255, 255, .75); font-size: .85rem; }
.auth-features span { display: inline-flex; align-items: center; gap: .45rem; }
.auth-features .icon { color: #67e8f9; }

.auth-form-wrap { display: flex; flex-direction: column; padding: 2rem 3rem; }
.auth-form-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.auth-form { width: 100%; max-width: 400px; margin: auto; padding: 2rem 0; }
.auth-form h2 { font-size: 1.85rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: .4rem; }
.auth-form .lead { color: var(--np-muted); font-size: .95rem; margin-bottom: 2rem; }
.auth-form .form-control { padding-top: .8rem; padding-bottom: .8rem; }
.auth-switch { text-align: center; margin-top: 1.75rem; color: var(--np-muted); font-size: .9rem; }
.auth-switch a { font-weight: 600; display: inline-flex; align-items: center; gap: .25rem; }
.auth-secure { display: flex; align-items: center; justify-content: center; gap: .4rem; color: var(--np-muted); font-size: .78rem; margin-top: 1.5rem; }
.auth-foot { color: var(--np-muted); font-size: .78rem; text-align: center; }
.auth-mobile-brand { display: none; }

.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: .5rem; }
.pw-meter span { height: 4px; border-radius: 4px; background: var(--np-border); transition: background .2s; }
.pw-meter[data-score="1"] span:nth-child(-n+1) { background: var(--np-danger); }
.pw-meter[data-score="2"] span:nth-child(-n+2) { background: var(--np-warning); }
.pw-meter[data-score="3"] span:nth-child(-n+3) { background: #84cc16; }
.pw-meter[data-score="4"] span { background: var(--np-success); }
.pw-hint { font-size: .75rem; color: var(--np-muted); margin-top: .35rem; display: flex; justify-content: space-between; }
.pw-suggest { border: 0; background: none; color: var(--np-primary); font-weight: 600; font-size: .75rem; padding: 0; display: inline-flex; align-items: center; gap: .25rem; }

@media (max-width: 991.98px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-form-wrap { padding: 1.25rem; }
    .auth-mobile-brand { display: flex; }
}

/* Language switcher */
.lang-btn { display: inline-flex; align-items: center; gap: .4rem; border: 1px solid var(--np-border); background: var(--np-surface); color: var(--np-text); border-radius: 10px; padding: .4rem .7rem; font-size: .85rem; font-weight: 500; }
.lang-btn:hover { background: var(--np-surface-2); }

/* ---------- Billing ---------- */
.np-plan-chip { font-size: .68rem; font-weight: 700; letter-spacing: .02em; padding: .15rem .5rem; border-radius: 99px; background: rgba(255, 255, 255, .1); color: #fff; }
.np-sidebar-card:hover { background: rgba(255, 255, 255, .07); color: var(--np-sidebar-text); }
.np-push-image { display: block; width: 100%; max-height: 140px; object-fit: cover; border-radius: 10px; margin-top: .5rem; }
.np-wallet { position: relative; overflow: hidden; border-radius: 18px; padding: 1.5rem; color: #fff; background: radial-gradient(700px 240px at 0% 0%, rgba(124, 111, 251, .95), transparent 60%), radial-gradient(600px 240px at 100% 100%, rgba(6, 182, 212, .8), transparent 60%), #111633; box-shadow: var(--np-shadow-lg); height: 100%; }
.np-wallet .label { color: rgba(255, 255, 255, .7); font-size: .8rem; font-weight: 500; }
.np-wallet .big { font-size: 2.4rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.05; }
.np-wallet .progress { height: 8px; background: rgba(255, 255, 255, .15); border-radius: 99px; }
.np-wallet .progress-bar { background: linear-gradient(90deg, #a99fff, #67e8f9); border-radius: 99px; }
.np-kv { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px dashed var(--np-border); font-size: .875rem; }
.np-kv:last-child { border-bottom: 0; }
.np-kv span:first-child { color: var(--np-muted); }
.np-plan { position: relative; display: flex; flex-direction: column; gap: .9rem; padding: 1.4rem; height: 100%; border-radius: var(--np-radius); border: 1px solid var(--np-border); background: var(--np-surface); transition: border-color .15s, box-shadow .15s, transform .15s; }
.np-plan:hover { border-color: rgba(var(--bs-primary-rgb), .45); box-shadow: var(--np-shadow-lg); transform: translateY(-2px); }
.np-plan.popular { border-color: var(--np-primary); box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .12), var(--np-shadow-lg); }
.np-plan.current { border-color: var(--np-success); }
.np-plan-badge { position: absolute; top: -11px; left: 1.4rem; font-size: .7rem; font-weight: 700; padding: .2rem .65rem; border-radius: 99px; color: #fff; background: linear-gradient(135deg, var(--np-primary), #8b5cf6); }
.np-plan-badge.current { background: var(--np-success); }
.np-plan h3 { font-size: 1.05rem; font-weight: 700; margin: 0; }
.np-plan .tagline { color: var(--np-muted); font-size: .82rem; margin: .15rem 0 0; }
.np-plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.np-plan .price small { font-size: .78rem; font-weight: 500; color: var(--np-muted); letter-spacing: 0; }
.np-plan .credits { font-size: .9rem; }
.np-plan .credits strong { font-size: 1.05rem; }
.np-plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; font-size: .84rem; }
.np-plan li { display: flex; gap: .5rem; align-items: flex-start; }
.np-plan li .icon { color: var(--np-success); margin-top: 2px; }
.np-tabs { border-bottom: 1px solid var(--np-border); gap: .25rem; padding: 0 1rem; }
.np-tabs .nav-link { border: 0; border-bottom: 2px solid transparent; color: var(--np-muted); font-weight: 500; font-size: .875rem; padding: .9rem .75rem; border-radius: 0; background: none; }
.np-tabs .nav-link.active { color: var(--np-primary); border-bottom-color: var(--np-primary); background: none; }
.np-table { width: 100%; font-size: .86rem; margin: 0; }
.np-table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--np-muted); font-weight: 600; padding: .75rem 1.35rem; border-bottom: 1px solid var(--np-border); white-space: nowrap; background: var(--np-surface-2); }
.np-table td { padding: .8rem 1.35rem; border-bottom: 1px solid var(--np-border); vertical-align: middle; }
.np-table tr:last-child td { border-bottom: 0; }
.np-table tbody tr:hover td { background: var(--np-surface-2); }
.np-table .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.np-table .pos { color: #059669; }
.np-table .neg { color: var(--np-danger); }
.np-result-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 1rem; display: flex; align-items: center; justify-content: center; }
.np-result-icon.ok { background: rgba(16, 185, 129, .12); color: #059669; }
.np-result-icon.fail { background: rgba(239, 68, 68, .12); color: #dc2626; }
.np-result-icon.wait { background: rgba(245, 158, 11, .14); color: #d97706; }

.np-invoice { max-width: 860px; margin: 0 auto; background: #fff; color: #0f172a; border-radius: var(--np-radius); border: 1px solid var(--np-border); padding: 2.5rem; }
.np-invoice h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: -.02em; }
.np-invoice .muted { color: #64748b; }
.np-invoice table { width: 100%; border-collapse: collapse; margin-top: 1.5rem; }
.np-invoice th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: #64748b; border-bottom: 2px solid #0f172a; padding: .6rem .4rem; }
.np-invoice td { border-bottom: 1px solid #e2e8f0; padding: .75rem .4rem; }
.np-invoice .totals { margin-left: auto; width: 300px; max-width: 100%; margin-top: 1rem; }
.np-invoice .totals div { display: flex; justify-content: space-between; padding: .35rem 0; }
.np-invoice .totals .grand { border-top: 2px solid #0f172a; font-weight: 800; font-size: 1.1rem; margin-top: .3rem; padding-top: .6rem; }
@media print {
    .np-sidebar, .np-topbar, .np-footer, .np-no-print, .np-alert { display: none !important; }
    body, .np-content { background: #fff !important; padding: 0 !important; }
    .np-invoice { border: 0; box-shadow: none; padding: 0; }
}

/* Bot protection: off-screen rather than display:none, which many bots skip */
.np-hp { position: absolute !important; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.np-captcha { min-height: 65px; }

/* Super admin */
.np-admin .np-sidebar { background: linear-gradient(180deg, #140b1f 0%, #0b1020 100%); }
.np-admin .np-nav a.active { background: rgba(239, 68, 68, .16); color: #fff; }
.np-danger-zone { border-color: rgba(239, 68, 68, .45); }
.np-danger-zone .np-card-header h3 { color: var(--np-danger); }
.np-admin-tag { display: inline-flex; align-items: center; gap: .25rem; font-size: .62rem; font-weight: 800; letter-spacing: .12em; padding: .2rem .5rem; border-radius: 6px; background: rgba(239, 68, 68, .15); color: #f87171; vertical-align: middle; margin-left: .5rem; }
.np-admin-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; background: radial-gradient(circle at 20% 10%, rgba(239, 68, 68, .08), transparent 40%), var(--np-bg); }
.np-admin-auth-card { width: 100%; max-width: 420px; background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); box-shadow: var(--np-shadow-lg); padding: 2rem; }
.np-admin-auth-card .np-admin-tag { margin-left: 0; }
.np-qr { display: flex; justify-content: center; padding: 1rem; background: #fff; border-radius: var(--np-radius-sm); border: 1px solid var(--np-border); }
.np-otp { letter-spacing: .5em; font-weight: 700; }
.np-bars { display: flex; align-items: flex-end; gap: 4px; height: 180px; }
.np-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; }
.np-bar span { width: 100%; min-height: 2px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--np-primary), #8b5cf6); }
.np-bar small { font-size: .62rem; color: var(--np-muted); white-space: nowrap; height: 1rem; line-height: 1rem; visibility: hidden; }
.np-bar:nth-child(5n+1) small, .np-bar:last-child small { visibility: visible; }

/* Contextual help ("?" buttons + Expo guide modal) */
.np-help-btn { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; margin-left: .3rem; padding: 0; border-radius: 50%; border: 1px solid rgba(var(--bs-primary-rgb), .35); background: var(--np-primary-50); color: var(--np-primary); font-size: .7rem; font-weight: 700; line-height: 1; vertical-align: 1px; cursor: pointer; transition: background .15s, color .15s; }
.np-help-btn:hover, .np-help-btn:focus-visible { background: var(--np-primary); color: #fff; outline: none; box-shadow: 0 0 0 3px rgba(var(--bs-primary-rgb), .25); }
.np-help-modal .modal-content { background: var(--np-surface); border: 1px solid var(--np-border); border-radius: var(--np-radius); }
.np-help-modal .modal-header, .np-help-modal .modal-footer { border-color: var(--np-border); }
.np-help-modal .modal-title { display: flex; align-items: center; gap: .5rem; font-weight: 700; }
.np-help-nav { gap: .25rem; position: sticky; top: 0; }
.np-help-nav .nav-link { display: flex; align-items: center; gap: .55rem; text-align: left; border-radius: var(--np-radius-sm); color: var(--np-muted); font-size: .88rem; font-weight: 500; padding: .55rem .75rem; }
.np-help-nav .nav-link:hover { background: var(--np-surface-2); color: var(--np-text); }
.np-help-nav .nav-link.active { background: var(--np-primary-50); color: var(--np-primary); font-weight: 600; }
.np-help-req { color: var(--np-danger); margin-left: auto; }
.np-help-steps li { padding-bottom: 1.5rem; }
.np-help-step-text { display: block; color: var(--np-text) !important; font-size: .9rem !important; padding-top: .2rem; }
.np-help-step-text strong { display: inline; font-size: inherit; }
.np-help-shot { margin: .85rem 0 0; }
.np-help-shot a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--np-border); box-shadow: var(--np-shadow); transition: box-shadow .15s, transform .15s; cursor: zoom-in; }
.np-help-shot a:hover { box-shadow: var(--np-shadow-lg); transform: translateY(-1px); }
.np-help-shot img { display: block; width: 100%; height: auto; background: #fff; }
.np-help-shot figcaption { font-size: .72rem; color: var(--np-muted); margin-top: .4rem; }
.np-help-code { position: relative; background: #0f172a; border-radius: var(--np-radius-sm); }
.np-help-code pre { margin: 0; padding: .9rem 3rem .9rem 1rem; color: #e2e8f0; font-size: .8rem; line-height: 1.55; overflow-x: auto; }
.np-help-code button { position: absolute; top: .5rem; right: .5rem; display: inline-flex; padding: .35rem; border: 1px solid rgba(255, 255, 255, .15); border-radius: 6px; background: rgba(255, 255, 255, .06); color: #cbd5e1; }
.np-help-code button:hover { background: rgba(255, 255, 255, .14); color: #fff; }
@media (max-width: 991.98px) {
    .np-help-nav { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; }
    .np-help-nav .nav-link { white-space: nowrap; }
}

/* Utilities */
.np-divider { height: 1px; background: var(--np-border); margin: 1.25rem 0; }
.np-kbd { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8em; padding: .1rem .4rem; border-radius: 6px; background: var(--np-surface-2); border: 1px solid var(--np-border); }
.np-toast-wrap { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 2000; display: flex; flex-direction: column; gap: .5rem; }
.np-toast { background: var(--np-text); color: var(--np-bg); padding: .7rem 1rem; border-radius: 10px; font-size: .85rem; box-shadow: var(--np-shadow-lg); animation: np-drop .3s ease; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
    .auth-push { opacity: 1; position: relative; margin-bottom: .75rem; }
    .auth-stack { height: auto; }
}
