/* ------------------------------------------------------------------ */
/* Novanex design tokens (reuse across app UI refresh)                */
/* ------------------------------------------------------------------ */
:root {
    --nx-primary: #007bff;
    --nx-primary-hover: #0069d9;
    --nx-primary-light: #6ea8fe;
    --nx-primary-ring: rgba(0, 123, 255, 0.15);
    --nx-danger: #dc3545;
    --nx-surface: #ffffff;
    --nx-surface-muted: #f8f9fa;
    --nx-input-bg: #ffffff;
    --nx-input-border: #ced4da;
    --nx-page-bg: #e9ecef;
    --nx-border: #dee2e6;
    --nx-border-hover: #ced4da;
    --nx-text: #343a40;
    --nx-text-secondary: #495057;
    --nx-text-muted: #6c757d;
    --nx-text-placeholder: #adb5bd;
    --nx-dark: #343a40;
    --nx-dark-deep: #23272b;
    --nx-radius: 0.375rem;
    --nx-radius-lg: 0.625rem;
    --nx-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --nx-shadow: 0 4px 24px rgba(0, 0, 0, 0.07), var(--nx-shadow-sm);
    --nx-font: "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --nx-transition: 0.15s ease;

    --nx-toast-success-accent: #198754;
    --nx-toast-success-bg: #ffffff;
    --nx-toast-success-icon-bg: rgba(25, 135, 84, 0.12);

    --nx-toast-error-accent: #dc3545;
    --nx-toast-error-bg: #ffffff;
    --nx-toast-error-icon-bg: rgba(220, 53, 69, 0.1);

    --nx-toast-warning-accent: #d97706;
    --nx-toast-warning-bg: #ffffff;
    --nx-toast-warning-icon-bg: rgba(217, 119, 6, 0.12);

    --nx-toast-info-accent: #007bff;
    --nx-toast-info-bg: #ffffff;
    --nx-toast-info-icon-bg: rgba(0, 123, 255, 0.1);
}

/* ------------------------------------------------------------------ */
/* Split-screen auth (login)                                          */
/* ------------------------------------------------------------------ */

html:has(.auth-split-page) {
    height: 100%;
}

.auth-split-page {
    --auth-font: "Plus Jakarta Sans", var(--nx-font);
    --auth-brand-bg: #0a192f;
    --auth-brand-surface: rgba(255, 255, 255, 0.05);
    --auth-brand-border: rgba(255, 255, 255, 0.08);
    --auth-accent: #0066ff;
    --auth-accent-soft: #3b8bff;
    --auth-accent-glow: rgba(0, 102, 255, 0.28);
    --auth-form-bg: #f8fafc;
    --auth-card-radius: 0.875rem;
    margin: 0;
    height: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    font-family: var(--auth-font);
    background: var(--auth-form-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-split-page--admin {
    --auth-accent: #6366f1;
    --auth-accent-soft: #818cf8;
    --auth-accent-glow: rgba(99, 102, 241, 0.35);
}

@media (min-width: 992px) {
    .auth-split-page {
        overflow: hidden;
    }
}

.auth-split {
    display: flex;
    min-height: 100vh;
}

@media (min-width: 992px) {
    .auth-split {
        height: 100vh;
        max-height: 100vh;
        overflow: hidden;
    }
}

/* Left branding panel */
.auth-split__brand {
    position: relative;
    display: none;
    flex: 0 0 45%;
    max-width: 45%;
    background:
        radial-gradient(ellipse 70% 55% at 15% 8%, rgba(0, 102, 255, 0.18), transparent 52%),
        radial-gradient(ellipse 60% 45% at 85% 92%, rgba(0, 142, 255, 0.1), transparent 48%),
        linear-gradient(165deg, #0a192f 0%, #0d1f3c 45%, #071018 100%);
    color: #fff;
    overflow: hidden;
}

.auth-split__brand--admin {
    background:
        radial-gradient(ellipse 80% 60% at 20% 10%, rgba(99, 102, 241, 0.24), transparent 55%),
        radial-gradient(ellipse 70% 50% at 90% 80%, rgba(139, 92, 246, 0.14), transparent 50%),
        linear-gradient(160deg, #111827 0%, #1e1b4b 48%, #0b1220 100%);
}

@media (min-width: 992px) {
    .auth-split__brand {
        display: flex;
        align-items: center;
        justify-content: center;
        height: 100vh;
        max-height: 100vh;
    }
}

.auth-split__mesh {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-split__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.55;
    animation: auth-orb-float 18s ease-in-out infinite;
}

.auth-split__orb--1 {
    top: -8%;
    right: -6%;
    width: min(380px, 45vw);
    height: min(380px, 45vw);
    background: rgba(0, 102, 255, 0.4);
}

.auth-split__orb--2 {
    bottom: 8%;
    left: -10%;
    width: min(320px, 38vw);
    height: min(320px, 38vw);
    background: rgba(0, 142, 255, 0.24);
    animation-delay: -6s;
}

.auth-split__orb--3 {
    top: 42%;
    left: 38%;
    width: min(220px, 28vw);
    height: min(220px, 28vw);
    background: rgba(59, 139, 255, 0.18);
    animation-delay: -12s;
}

.auth-split__brand--admin .auth-split__orb--1 {
    background: rgba(99, 102, 241, 0.45);
}

.auth-split__brand--admin .auth-split__orb--2 {
    background: rgba(139, 92, 246, 0.28);
}

.auth-split__brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: clamp(1rem, 2.5vh, 1.5rem);
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: clamp(1.75rem, 3.5vh, 2.75rem) clamp(2rem, 4.5vw, 3.25rem);
}

.auth-split__logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0;
}

.auth-split__logo-img {
    height: 40px;
    width: auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 0.5rem;
    padding: 0.3rem 0.45rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.auth-split__logo-name {
    display: block;
    font-size: 1.0625rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.auth-split__logo-tagline {
    display: block;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.1rem;
}

.auth-split__hero-row {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1.5rem);
    margin-bottom: 0;
}

.auth-split__hero-copy {
    flex: 1;
    min-width: 0;
}

.auth-split__title {
    font-size: clamp(1.625rem, 2.8vh, 2.125rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    color: #fff;
    letter-spacing: -0.03em;
}

.auth-split__title-accent {
    color: var(--auth-accent-soft);
}

.auth-split__brand--admin .auth-split__title-accent {
    background: linear-gradient(135deg, #a5b4fc 0%, #c4b5fd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.auth-split__description {
    font-size: 0.8125rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.62);
    margin: 0;
    max-width: 36ch;
}

.auth-split__illustration {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(7rem, 18vw, 16rem);
}

.auth-split__illustration img {
    width: 100%;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.22));
    animation: auth-illustration-float 6s ease-in-out infinite;
}

.auth-split__features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.auth-split__feature {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.6875rem 0.75rem;
    min-height: 0;
    background: var(--auth-brand-surface);
    border: 1px solid var(--auth-brand-border);
    border-radius: 0.625rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: background var(--nx-transition), border-color var(--nx-transition), transform var(--nx-transition);
}

.auth-split__feature:hover {
    background: rgba(255, 255, 255, 0.09);
    border-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.auth-split__feature-icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.4375rem;
    line-height: 0;
}

.auth-split__feature-icon--blue {
    background: rgba(0, 102, 255, 0.16);
    color: #60a5fa;
}

.auth-split__feature-icon--purple {
    background: rgba(139, 92, 246, 0.16);
    color: #a78bfa;
}

.auth-split__feature-icon--green {
    background: rgba(34, 197, 94, 0.16);
    color: #4ade80;
}

.auth-split__feature-icon--orange {
    background: rgba(249, 115, 22, 0.16);
    color: #fb923c;
}

.auth-split__brand--admin .auth-split__feature-icon {
    background: rgba(99, 102, 241, 0.2);
    color: #a5b4fc;
}

.auth-split__feature-icon > i {
    display: block;
    font-size: 0.8125rem;
    line-height: 1;
}

.auth-split__feature-text {
    min-width: 0;
}

.auth-split__feature-text strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}

.auth-split__feature-text span {
    display: block;
    font-size: 0.6875rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.45);
    margin-top: 0.1rem;
}

.auth-split__trust {
    margin-top: 0;
    padding-top: 0;
}

.auth-split__trust-label {
    margin: 0 0 0.75rem;
    font-size: 0.6875rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.38);
}

.auth-split__trust-logos {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem 1.75rem;
}

.auth-split__trust-logo {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Right form panel */
.auth-split__form-panel {
    position: relative;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem 1.25rem;
    background-color: var(--auth-form-bg);
    overflow-y: auto;
}

.auth-split-page--admin .auth-split__form-panel {
    background:
        radial-gradient(ellipse 90% 70% at 100% 0%, rgba(99, 102, 241, 0.07), transparent 55%),
        radial-gradient(ellipse 80% 60% at 0% 100%, rgba(139, 92, 246, 0.05), transparent 50%),
        var(--auth-form-bg);
}

@media (min-width: 992px) {
    .auth-split__form-panel {
        height: 100vh;
        max-height: 100vh;
    }
}

.auth-split__form-ambient {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.auth-split__form-dots {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(148, 163, 184, 0.35) 1px, transparent 1px);
    background-size: 22px 22px;
    opacity: 0.45;
    mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 20%, transparent 72%);
    -webkit-mask-image: radial-gradient(ellipse 85% 75% at 50% 35%, #000 20%, transparent 72%);
}

.auth-split__form-waves {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background:
        radial-gradient(ellipse 90% 70% at 85% 100%, rgba(0, 102, 255, 0.09), transparent 55%),
        radial-gradient(ellipse 70% 55% at 15% 95%, rgba(0, 142, 255, 0.06), transparent 50%);
}

.auth-split__form-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.45;
}

.auth-split__form-orb--1 {
    top: 8%;
    right: 12%;
    width: 220px;
    height: 220px;
    background: rgba(59, 130, 246, 0.12);
}

.auth-split__form-orb--2 {
    bottom: 12%;
    left: 8%;
    width: 180px;
    height: 180px;
    background: rgba(14, 165, 233, 0.1);
}

.auth-split-page--admin .auth-split__form-orb--1 {
    background: rgba(99, 102, 241, 0.12);
}

.auth-split-page--admin .auth-split__form-orb--2 {
    background: rgba(139, 92, 246, 0.1);
}

.auth-split__form-wrapper {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin: auto 0;
    animation: auth-card-enter 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-split__lang {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    z-index: 2;
}

.auth-split__lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #64748b;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    cursor: default;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.auth-split__lang-chevron {
    font-size: 0.625rem;
    opacity: 0.7;
}

.auth-split__mobile-logo {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-split__mobile-logo img {
    background: var(--nx-surface);
    border-radius: 0.625rem;
    padding: 0.4rem 0.55rem;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
}

.auth-split__card {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: var(--auth-card-radius);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 8px 32px rgba(15, 23, 42, 0.07);
    padding: 1.875rem 1.75rem 1.625rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.auth-split-page:not(.auth-split-page--admin) .auth-split__card::before {
    display: none;
}

.auth-split__card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--auth-accent), var(--auth-accent-soft));
}

.auth-split__card-icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    margin-bottom: 1rem;
    border-radius: 0.875rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.06));
    color: var(--auth-accent);
    font-size: 1.125rem;
    border: 1px solid rgba(59, 130, 246, 0.12);
}

.auth-split__card-icon--admin {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.14), rgba(99, 102, 241, 0.06));
    color: #6366f1;
    border-color: rgba(99, 102, 241, 0.14);
}

.auth-split__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.625rem;
    padding: 0.25rem 0.7rem;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.16);
    border-radius: 999px;
}

.auth-split__alert {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    padding: 0.75rem 0.875rem;
    margin-bottom: 1.125rem;
    font-size: 0.8125rem;
    line-height: 1.45;
    border-radius: 0.625rem;
    border: 1px solid transparent;
}

.auth-split__alert > i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.auth-split__alert--danger {
    color: #842029;
    background: #fff5f5;
    border-color: rgba(220, 53, 69, 0.2);
}

.auth-split__alert--success {
    color: #0f5132;
    background: #f0fdf4;
    border-color: rgba(25, 135, 84, 0.2);
}

.auth-split__card-header {
    margin-bottom: 1.375rem;
}

.auth-split__card-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.3rem;
    letter-spacing: -0.03em;
}

.auth-split__card-subtitle {
    font-size: 0.8125rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Form fields */
.auth-form {
    margin: 0;
}

.auth-field {
    margin-bottom: 1.125rem;
}

.auth-field__label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
    margin-bottom: 0.4rem;
}

.auth-field__control {
    position: relative;
}

.auth-field__input {
    display: block;
    width: 100%;
    height: 2.75rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    color: var(--nx-text);
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition), background var(--nx-transition);
}

.auth-field__input--leading {
    padding-left: 2.625rem;
}

.auth-field__input--trailing {
    padding-right: 2.75rem;
}

.auth-field__input::placeholder {
    color: var(--nx-text-placeholder);
}

.auth-field__input:hover:not(:disabled):not([readonly]) {
    border-color: #cbd5e1;
    background: #fff;
}

.auth-field__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 4px var(--auth-accent-glow);
}

.auth-field__input.is-invalid {
    border-color: var(--nx-danger);
    background: #fff8f8;
}

.auth-field__input.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
}

.auth-field__icon {
    position: absolute;
    top: 0;
    bottom: 0;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 0.875rem;
    pointer-events: none;
    transition: color var(--nx-transition);
}

.auth-field__icon--leading {
    left: 0;
    width: 2.625rem;
}

.auth-field__control:focus-within .auth-field__icon--leading {
    color: var(--auth-accent);
}

.auth-field__icon > i {
    display: block;
    line-height: 1;
}

.auth-field__toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 2.75rem;
    display: grid;
    place-items: center;
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    border-radius: 0 0.625rem 0.625rem 0;
    transition: color var(--nx-transition);
    padding: 0;
}

.auth-field__toggle > i {
    display: block;
    line-height: 1;
    font-size: 0.875rem;
}

.auth-field__toggle:hover {
    color: var(--nx-text-muted);
}

.auth-field__toggle:focus {
    outline: none;
    color: var(--auth-accent);
}

.auth-field__error {
    display: block;
    font-size: 0.75rem;
    color: var(--nx-danger);
    margin-top: 0.35rem;
}

/* Remember me & forgot password */
.auth-split__options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.375rem;
}

.auth-split__forgot {
    flex-shrink: 0;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--auth-accent);
    text-decoration: none;
    transition: color var(--nx-transition);
}

.auth-split__forgot:hover {
    color: #0052cc;
    text-decoration: underline;
}

.auth-split__remember {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    cursor: pointer;
    user-select: none;
}

.auth-split__remember input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.auth-split__remember-box {
    flex-shrink: 0;
    width: 1.125rem;
    height: 1.125rem;
    border: 1.5px solid #cbd5e1;
    border-radius: 0.3rem;
    background: #fff;
    transition: background var(--nx-transition), border-color var(--nx-transition), box-shadow var(--nx-transition);
    position: relative;
}

.auth-split__remember-box::after {
    content: "";
    position: absolute;
    left: 0.3rem;
    top: 0.1rem;
    width: 0.3rem;
    height: 0.55rem;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform 0.12s ease;
}

.auth-split__remember input:checked + .auth-split__remember-box {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
}

.auth-split__remember input:checked + .auth-split__remember-box::after {
    transform: rotate(45deg) scale(1);
}

.auth-split__remember input:focus-visible + .auth-split__remember-box {
    box-shadow: 0 0 0 3px var(--auth-accent-glow);
}

.auth-split__options .icheck-primary label {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    font-weight: 400;
    padding-left: 0.25rem;
    cursor: pointer;
}

/* Submit button */
.auth-split__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 2.75rem;
    padding: 0 1.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #fff;
    background: var(--auth-accent);
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--auth-accent-glow);
    transition: transform 0.15s ease, box-shadow var(--nx-transition), background var(--nx-transition);
}

.auth-split-page--admin .auth-split__submit {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.auth-split-page--admin .auth-split__submit:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
}

.auth-split__submit:hover {
    background: #0052cc;
    box-shadow: 0 8px 22px var(--auth-accent-glow);
    transform: translateY(-1px);
}

.auth-split__submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px var(--auth-accent-glow);
}

.auth-split__submit:focus {
    outline: none;
    box-shadow: 0 0 0 4px var(--auth-accent-glow), 0 4px 14px var(--auth-accent-glow);
}

.auth-split__submit:disabled,
.auth-split__submit.is-loading {
    opacity: 0.85;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
}

.auth-split__submit-spinner {
    display: none;
    font-size: 0.875rem;
}

.auth-split__submit.is-loading .auth-split__submit-spinner {
    display: inline-block;
}

.auth-split__submit.is-loading .auth-split__submit-icon {
    display: none;
}

.auth-split__submit-icon {
    font-size: 0.75rem;
    transition: transform var(--nx-transition);
}

.auth-split__submit:hover .auth-split__submit-icon {
    transform: translateX(3px);
}

.auth-split__footer {
    text-align: center;
    font-size: 0.6875rem;
    color: #94a3b8;
    margin: 1.5rem 0 0;
}

.auth-split__divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: #94a3b8;
    font-size: 0.75rem;
}

.auth-split__divider::before,
.auth-split__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.auth-split__social-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
}

.auth-split__social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.625rem;
    font-family: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    color: #334155;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition), background var(--nx-transition);
}

.auth-split__social-btn:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.auth-split__social-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.auth-split__signup-hint {
    margin: 1.125rem 0 0;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #94a3b8;
}

.auth-split__page-footer {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    margin-top: 1.5rem;
    text-align: center;
}

.auth-split__page-footer-copy {
    margin: 0 0 0.35rem;
    font-size: 0.6875rem;
    color: #94a3b8;
    line-height: 1.5;
}

.auth-split__page-footer-links {
    margin: 0;
    font-size: 0.6875rem;
    color: #94a3b8;
}

.auth-split__page-footer-links a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-split__page-footer-links a:hover {
    text-decoration: underline;
}

.auth-split__page-footer-links span {
    margin: 0 0.35rem;
    color: #cbd5e1;
}

@keyframes auth-orb-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12px, -18px) scale(1.04); }
    66% { transform: translate(-10px, 10px) scale(0.96); }
}

@keyframes auth-illustration-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes auth-card-enter {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 575.98px) {
    .auth-split__social-row {
        grid-template-columns: 1fr;
    }

    .auth-split__lang {
        top: 1rem;
        right: 1rem;
    }

    .auth-split__form-panel {
        padding: 3.25rem 1rem 1rem;
    }

    .auth-split__options {
        flex-wrap: wrap;
    }
}

@media (max-width: 991.98px) {
    .auth-split__hero-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .auth-split__illustration {
        width: min(100%, 9rem);
        align-self: center;
    }
}

.auth-split__hint {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    line-height: 1.55;
    margin: 0 0 1.25rem;
}

.auth-split__qr {
    display: flex;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.auth-split__qr svg,
.auth-split__qr img {
    max-width: 200px;
    height: auto;
    padding: 0.75rem;
    background: #fff;
    border-radius: var(--nx-radius);
    box-shadow: var(--nx-shadow-sm);
    border: 1px solid var(--nx-border);
}

.auth-field__input--code {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-align: center;
    padding-left: 0.875rem;
    padding-right: 0.875rem;
}

.auth-otp {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.375rem;
}

.auth-otp__box {
    width: 2.75rem;
    height: 3.25rem;
    padding: 0;
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    background: #fff;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    color: var(--nx-text);
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition);
    -moz-appearance: textfield;
}

.auth-otp__box::-webkit-outer-spin-button,
.auth-otp__box::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.auth-otp__box:focus {
    outline: none;
    border-color: var(--nx-primary);
    box-shadow: 0 0 0 3px var(--nx-primary-ring);
}

.auth-otp__box.is-invalid,
.auth-otp--invalid .auth-otp__box {
    border-color: #dc3545;
}

.auth-otp__box.is-invalid:focus,
.auth-otp--invalid .auth-otp__box:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

@media (max-width: 420px) {
    .auth-otp {
        gap: 0.35rem;
    }

    .auth-otp__box {
        width: 2.25rem;
        height: 2.875rem;
        font-size: 1.125rem;
    }
}

.auth-split__back {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 1.125rem;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    text-decoration: none;
    transition: color var(--nx-transition);
}

.auth-split__back:hover {
    color: var(--nx-primary);
    text-decoration: none;
}

@media (prefers-reduced-motion: reduce) {
    .auth-split__submit-icon,
    .auth-split__feature,
    .auth-split__orb,
    .auth-split__illustration img,
    .auth-split__form-wrapper {
        transition: none;
        animation: none;
    }
}

@media (max-width: 991.98px) {
    .auth-split__card {
        padding: 1.625rem 1.375rem 1.375rem;
    }
}

@media (max-height: 700px) and (min-width: 992px) {
    .auth-split__logo {
        margin-bottom: 1rem;
    }

    .auth-split__hero {
        margin-bottom: 0.75rem;
    }

    .auth-split__illustration {
        display: none;
    }

    .auth-split__features {
        gap: 0.375rem;
    }

    .auth-split__feature {
        padding: 0.5rem 0.625rem;
    }
}

.welcome-logo {
    opacity: .8;
    font-weight: bold;
    font-family: cursive;
    font-size: 2.5rem;
    text-align: center;
    padding-left: 10px;
    padding-right: 10px;
}

.navbar-logo {
    opacity: .8;
    font-weight: bold;
    font-family: cursive;
}

.navbar-logo {
    opacity: .8;
    font-weight: bold;
    font-family: cursive;
}

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.7);
    display: none;
    z-index: 9999;
}
.loader .spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 5px solid #f3f3f3;
    border-top: 5px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

.nx-page-loader {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.nx-page-loader.is-active,
html.nx-html-loading .nx-page-loader {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.nx-page-loader__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    min-width: 10rem;
    padding: 1.5rem 1.75rem;
    border-radius: 0.875rem;
    background: var(--nx-surface, #fff);
    border: 1px solid var(--nx-border, #e5e7eb);
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.nx-page-loader__spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid rgba(0, 123, 255, 0.15);
    border-top-color: var(--nx-primary, #007bff);
    border-radius: 50%;
    animation: nx-spin 0.8s linear infinite;
}

.nx-page-loader__label {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nx-text-secondary, #475569);
    letter-spacing: 0.01em;
}

.nx-content.is-loading {
    pointer-events: none;
}

@keyframes nx-spin {
    to { transform: rotate(360deg); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------ */
/* Dashboard shell (sidebar + topbar)                                 */
/* ------------------------------------------------------------------ */

html:has(.nx-dashboard) {
    height: 100%;
}

.nx-dashboard {
    margin: 0;
    min-height: 100vh;
    font-family: var(--nx-font);
    background: #f4f6f9;
    color: var(--nx-text);
}

.nx-app {
    display: flex;
    min-height: 100vh;
}

.nx-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.nx-content {
    flex: 1;
    padding: 1.25rem 1.5rem 1.75rem;
}

/* Sidebar */
.nx-sidebar {
    width: 260px;
    flex-shrink: 0;
    background: var(--nx-surface);
    border-right: 1px solid var(--nx-border);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 1040;
}

.nx-sidebar__brand {
    padding: 1.125rem 1.25rem 1rem;
    border-bottom: 1px solid var(--nx-border);
}

.nx-sidebar__brand-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none !important;
    color: inherit;
}

.nx-sidebar__logo {
    height: 36px;
    width: auto;
    border-radius: var(--nx-radius);
}

.nx-sidebar__brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.nx-sidebar__brand-text strong {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-sidebar__brand-text small {
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
}

.nx-sidebar__nav {
    flex: 1;
    padding: 0.875rem 0.75rem;
    overflow-y: auto;
}

.nx-sidebar__heading {
    padding: 0.5rem 0.875rem 0.5rem;
    color: var(--nx-text-muted);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nx-sidebar__heading:first-child {
    padding-top: 0.25rem;
}

.nx-sidebar__link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.875rem;
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-text-muted);
    text-decoration: none !important;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-sidebar__link:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-sidebar__link--active {
    background: var(--nx-primary) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.nx-sidebar__link-icon {
    width: 1.125rem;
    text-align: center;
    font-size: 0.875rem;
}

.nx-sidebar__group {
    margin-bottom: 0.25rem;
}

.nx-sidebar__link--toggle {
    width: 100%;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.nx-sidebar__chevron {
    margin-left: auto;
    font-size: 0.625rem;
    opacity: 0.55;
    transition: transform var(--nx-transition);
}

.nx-sidebar__group--open .nx-sidebar__chevron,
.nx-sidebar__link--toggle[aria-expanded="true"] .nx-sidebar__chevron {
    transform: rotate(180deg);
}

.nx-sidebar__subnav {
    padding: 0.25rem 0 0.375rem 2.25rem;
}

.nx-sidebar__sublink {
    display: block;
    padding: 0.45rem 0.75rem;
    margin-bottom: 0.125rem;
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--nx-text-muted);
    text-decoration: none !important;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-sidebar__sublink:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-sidebar__sublink--active {
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
    font-weight: 600;
}

.nx-sidebar__footer {
    padding: 0.75rem;
    border-top: 1px solid var(--nx-border);
}

.nx-sidebar__help {
    display: flex;
    gap: 0.75rem;
    padding: 0.875rem;
    margin-bottom: 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--nx-border);
    border-radius: 0.625rem;
}

.nx-sidebar__help-icon {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    display: grid;
    place-items: center;
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
    border-radius: 0.5rem;
    font-size: 0.875rem;
}

.nx-sidebar__help-body strong {
    display: block;
    font-size: 0.8125rem;
    margin-bottom: 0.2rem;
}

.nx-sidebar__help-body p {
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
    margin: 0 0 0.5rem;
    line-height: 1.4;
}

.nx-sidebar__help-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: none;
    background: none;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nx-primary);
    cursor: pointer;
}

.nx-sidebar__user-toggle {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.625rem;
    border-radius: 0.5rem;
    text-decoration: none !important;
    color: inherit;
    width: 100%;
}

.nx-sidebar__user-toggle:hover {
    background: var(--nx-surface-muted);
}

.nx-sidebar__user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.nx-sidebar__user-info strong {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-sidebar__user-info small {
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-sidebar__user-menu {
    min-width: 11rem;
}

/* Topbar */
.nx-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1.5rem;
    background: var(--nx-surface);
    border-bottom: 1px solid var(--nx-border);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.nx-topbar__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.nx-topbar__menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: 1px solid var(--nx-border);
    border-radius: var(--nx-radius);
    background: var(--nx-surface);
    color: var(--nx-text-muted);
    cursor: pointer;
}

.nx-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    white-space: nowrap;
}

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

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

.nx-breadcrumb i {
    font-size: 0.5625rem;
    opacity: 0.5;
}

.nx-breadcrumb span {
    color: var(--nx-text-secondary);
    font-weight: 500;
}

.nx-topbar__right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.nx-topbar__icon-btn {
    position: relative;
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: var(--nx-radius);
    background: transparent;
    color: var(--nx-text-muted);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-topbar__icon-btn:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-topbar__badge {
    position: absolute;
    top: 0.2rem;
    right: 0.2rem;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.25rem;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 1rem;
    text-align: center;
    color: #fff;
    background: var(--nx-danger);
    border-radius: 999px;
}

.nx-topbar__user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border-radius: 999px;
    text-decoration: none !important;
    color: inherit;
}

.nx-topbar__user-toggle:hover {
    background: var(--nx-surface-muted);
}

.nx-topbar__user-name {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--nx-text-secondary);
}

.nx-avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #6ea8fe, var(--nx-primary));
    color: #fff;
    font-weight: 600;
    flex-shrink: 0;
}

.nx-avatar--sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.6875rem;
}

.nx-avatar--md {
    width: 2.25rem;
    height: 2rem;
    font-size: 0.75rem;
}

.nx-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .nx-sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
    }

    .nx-app--sidebar-open .nx-sidebar {
        transform: translateX(0);
    }

    .nx-app--sidebar-open .nx-sidebar-backdrop {
        display: block;
    }

    .nx-topbar__menu-btn {
        display: inline-flex;
    }
}

/* ------------------------------------------------------------------ */
/* Mail Templates page                                                */
/* ------------------------------------------------------------------ */

.nx-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.nx-page-header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nx-text);
    margin: 0 0 0.25rem;
    letter-spacing: -0.02em;
}

.nx-page-header__subtitle {
    font-size: 0.875rem;
    color: var(--nx-text-muted);
    margin: 0;
}

.nx-page-header__actions {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    flex-wrap: wrap;
}

.nx-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 2.375rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none !important;
    transition: background var(--nx-transition), border-color var(--nx-transition), box-shadow var(--nx-transition);
    white-space: nowrap;
}

.nx-btn--outline {
    background: var(--nx-surface);
    border-color: var(--nx-border);
    color: var(--nx-text-secondary);
}

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

.nx-btn--primary {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
    color: #fff;
}

.nx-btn--primary:hover {
    background: var(--nx-primary-hover);
    border-color: var(--nx-primary-hover);
    box-shadow: 0 4px 14px rgba(0, 123, 255, 0.28);
    color: #fff;
}

/* KPI cards */
.nx-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 1199.98px) {
    .nx-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .nx-stats {
        grid-template-columns: 1fr;
    }
}

.nx-stat-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
}

a.nx-stat-card {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.nx-stat-card:hover {
    border-color: var(--nx-primary);
    box-shadow: var(--nx-shadow-md);
}

.nx-stat-card__label {
    font-size: 0.75rem;
    color: var(--nx-text-muted);
    margin: 0 0 0.35rem;
}

.nx-stat-card__value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--nx-text);
    margin: 0;
    line-height: 1.2;
}

.nx-stat-card__meta {
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
    margin: 0.25rem 0 0;
}

.nx-stat-card__comparison {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin: 0.35rem 0 0;
    line-height: 1.4;
}

.nx-stat-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.625rem;
    font-size: 1rem;
    flex-shrink: 0;
}

.nx-stat-card__icon--blue {
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
}

.nx-stat-card__icon--green {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.nx-stat-card__icon--orange {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.nx-stat-card__icon--purple {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.nx-stat-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    margin-top: 0;
}

.nx-stat-card__trend--up {
    color: #28a745;
}

.nx-stat-card__trend--down {
    color: #fd7e14;
}

.nx-stats--8 {
    grid-template-columns: repeat(4, 1fr);
}

.nx-stats--2 {
    grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1199.98px) {
    .nx-stats--8 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575.98px) {
    .nx-stats--8,
    .nx-stats--2 {
        grid-template-columns: 1fr;
    }
}

.nx-stat-card--compact {
    padding: 0.875rem 1rem;
}

.nx-stat-card--compact .nx-stat-card__value {
    font-size: 1.25rem;
}

.nx-dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 991.98px) {
    .nx-dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.nx-dashboard-controls {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.125rem;
    margin-bottom: 1.25rem;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
}

.nx-dashboard-controls__period {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.625rem;
    flex: 1 1 auto;
    min-width: 0;
}

.nx-dashboard-controls__period .nx-filter-field {
    flex: 0 0 auto;
    min-width: 0;
    width: auto;
}

.nx-dashboard-controls__period .nx-filter-field--period {
    min-width: 11rem;
}

.nx-dashboard-controls__period .nx-filter-field--period select {
    min-width: 11rem;
    width: 11rem;
}

.nx-dashboard-controls__period .nx-filter-field--date input {
    min-width: 9.5rem;
    width: 9.5rem;
}

.nx-dashboard-controls__compare {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.nx-dashboard-controls__toggles {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 1rem;
    flex: 0 0 auto;
}

.nx-dashboard-controls__source {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    flex: 0 0 auto;
}

.nx-dashboard-controls--compact {
    margin-bottom: 0;
    padding: 0.75rem 1rem;
}

.nx-dashboard-controls--compact .nx-segmented-control {
    flex-wrap: wrap;
}

.nx-dashboard-controls__compare-label {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    font-weight: 500;
    white-space: nowrap;
}

.nx-segmented-control {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem;
    background: var(--nx-surface-muted, #f4f6f9);
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
}

.nx-segmented-control .nx-btn {
    border-radius: 0.375rem;
    box-shadow: none;
}

.nx-segmented-control .nx-btn--outline {
    background: transparent;
    border-color: transparent;
}

.nx-segmented-control .nx-btn--outline:hover {
    background: rgba(0, 123, 255, 0.08);
    border-color: transparent;
}

@media (max-width: 767.98px) {
    .nx-dashboard-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-dashboard-controls__period {
        width: 100%;
    }

    .nx-dashboard-controls__period .nx-filter-field--period,
    .nx-dashboard-controls__period .nx-filter-field--period select {
        min-width: 0;
        width: 100%;
    }

    .nx-dashboard-controls__compare {
        width: 100%;
        padding-top: 0.25rem;
        border-top: 1px solid var(--nx-border);
    }

    .nx-dashboard-controls__toggles {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 0.25rem;
        border-top: 1px solid var(--nx-border);
    }

    .nx-dashboard-controls__source {
        width: 100%;
    }
}

.nx-form-input--sm {
    min-height: 2rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.8125rem;
}

.nx-btn--sm {
    min-height: 2rem;
    padding: 0.25rem 0.75rem;
    font-size: 0.8125rem;
}

#audience-growth-chart {
    max-height: 260px;
}

/* Filters */
.nx-filters {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1rem 1.125rem;
    margin-bottom: 1rem;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
    overflow: visible;
}

.nx-filter-field {
    flex: 1 1 160px;
    min-width: 0;
}

.nx-filter-field--search {
    flex: 2 1 200px;
}

.nx-filter-field--date {
    flex: 0 1 11.5rem;
    min-width: 10.5rem;
}

.nx-filter-error {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.75rem;
    line-height: 1.2;
    color: var(--nx-danger, #dc3545);
}

.nx-filter-error:empty {
    display: none;
    margin-top: 0;
}

.nx-filter-input.is-invalid {
    border-color: var(--nx-danger, #dc3545);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.nx-filter-field label {
    display: block;
    font-size: 0.6875rem;
    font-weight: 600;
    color: var(--nx-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.35rem;
}

.nx-filter-input-wrap {
    position: relative;
}

.nx-filter-input-wrap > i {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--nx-text-placeholder);
    font-size: 0.8125rem;
    pointer-events: none;
}

.nx-filter-input {
    display: block;
    width: 100%;
    height: 2.375rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--nx-text);
    background: var(--nx-input-bg);
    border: 1px solid var(--nx-input-border);
    border-radius: 0.5rem;
    box-shadow: var(--nx-shadow-sm);
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition), background var(--nx-transition);
}

.nx-filter-input-wrap .nx-filter-input {
    padding-left: 2.25rem;
}

.nx-filter-input::placeholder {
    color: var(--nx-text-placeholder);
}

.nx-filter-input:hover:not(:disabled):not([readonly]) {
    border-color: var(--nx-border-hover);
}

.nx-filter-input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 3px var(--nx-primary-ring);
    background: var(--nx-input-bg);
}

.nx-filter-input:disabled,
.nx-filter-input[readonly]:not(.nx-from-date):not(.nx-to-date) {
    background: var(--nx-surface-muted);
    color: var(--nx-text-muted);
    cursor: not-allowed;
}

.nx-filter-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.nx-btn--ghost {
    background: var(--nx-surface-muted);
    border-color: var(--nx-border);
    color: var(--nx-text-secondary);
}

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

/* Table panel */
.nx-table-panel {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
}

.nx-table-panel > .nx-table-toolbar:first-child {
    border-radius: 0.75rem 0.75rem 0 0;
}

.nx-table-panel > .nx-table-footer:last-child {
    border-radius: 0 0 0.75rem 0.75rem;
}

.nx-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.125rem;
    border-bottom: 1px solid var(--nx-border);
    background: #fafbfc;
    flex-wrap: wrap;
}

.nx-table-toolbar.is-visible {
    display: flex;
}

.nx-table-toolbar__left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nx-table-toolbar__count {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
}

.nx-table-toolbar__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nx-table-toolbar__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    height: 2rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    border: 1px solid var(--nx-border);
    background: var(--nx-surface);
    color: var(--nx-text-secondary);
    cursor: pointer;
}

.nx-table-toolbar__btn--danger {
    color: var(--nx-danger);
    border-color: rgba(220, 53, 69, 0.35);
}

.nx-table-toolbar__btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.nx-table-toolbar__btn--icon {
    width: 2rem;
    min-width: 2rem;
    padding: 0;
    justify-content: center;
}

.nx-table-toolbar__btn--icon:hover {
    border-color: var(--nx-primary);
    color: var(--nx-primary);
}

.nx-table-toolbar__right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-left: auto;
}

.nx-table-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

.nx-table-sort select {
    height: 2rem;
    padding: 0 1.75rem 0 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--nx-border);
    border-radius: 0.375rem;
    background: var(--nx-surface);
    color: var(--nx-text-secondary);
}

.nx-table-wrap {
    padding: 0;
    overflow-x: auto;
}

.nx-data-table {
    width: 100% !important;
    margin: 0 !important;
    border-collapse: separate;
    border-spacing: 0;
}

.nx-table-panel table.dataTable.nx-data-table {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    max-width: none !important;
}

.nx-data-table thead th {
    padding: 0.625rem 1rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--nx-border);
    border-top: none;
    white-space: nowrap;
    vertical-align: middle;
    line-height: 1.2;
    box-sizing: border-box;
}

/* DataTables sort indicators — label + stacked arrows (see .nx-th-sort) */
.nx-table-panel table.dataTable.nx-data-table > thead > tr > th:not(.sorting_disabled):not(.nx-table-col-actions) {
    padding-right: 1rem !important;
    cursor: pointer;
}

.nx-table-panel table.dataTable.nx-data-table > thead > tr > th.sorting_disabled {
    cursor: default;
}

.nx-table-panel table.dataTable.nx-data-table > thead .sorting,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc_disabled,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc_disabled {
    position: relative;
    white-space: nowrap;
    vertical-align: middle;
}

.nx-table-panel table.dataTable.nx-data-table > thead .sorting:before,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting:after,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc:before,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc:after,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc:before,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc:after,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc_disabled:before,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_asc_disabled:after,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc_disabled:before,
.nx-table-panel table.dataTable.nx-data-table > thead .sorting_desc_disabled:after {
    display: none !important;
    content: "" !important;
}

.nx-th-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    max-width: 100%;
}

.nx-th-sort__label {
    line-height: 1.2;
}

.nx-th-sort__icons {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 0;
    line-height: 1;
    padding: 0.05rem 0;
}

.nx-th-sort__up,
.nx-th-sort__down {
    display: block;
    font-size: 0.4375rem;
    line-height: 1;
    opacity: 0.35;
    color: var(--nx-text-muted);
}

.nx-th-sort__up.is-active,
.nx-th-sort__down.is-active {
    opacity: 1;
    color: var(--nx-primary);
}

.nx-table-panel table.dataTable.nx-data-table th,
.nx-table-panel table.dataTable.nx-data-table td {
    box-sizing: border-box;
}

.nx-data-table tbody td {
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    color: var(--nx-text-secondary);
    border-top: 1px solid #f0f2f5;
    vertical-align: middle;
    overflow: visible;
    position: relative;
}

.nx-data-table tbody tr:hover td {
    background: #fafbfc;
}

.nx-tpl-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 200px;
}

.nx-tpl-thumb {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #e8f0fe, #f0f4ff);
    border: 1px solid var(--nx-border);
    display: grid;
    place-items: center;
    color: var(--nx-primary);
    font-size: 0.875rem;
    flex-shrink: 0;
    overflow: hidden;
}

.nx-tpl-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nx-tpl-info strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text);
    margin-bottom: 0.25rem;
}

.nx-tag {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    font-size: 0.5625rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border-radius: 999px;
    text-transform: uppercase;
}

.nx-tag--blue {
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
}

.nx-tag--purple {
    background: rgba(111, 66, 193, 0.1);
    color: #6f42c1;
}

.nx-tag--green {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.nx-tag--orange {
    background: rgba(253, 126, 20, 0.1);
    color: #fd7e14;
}

.nx-list-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    align-items: center;
}

.nx-list-chip {
    display: inline-block;
    max-width: 10rem;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.25;
    color: var(--nx-text);
    background: #f4f6f9;
    border-radius: 999px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nx-list-chip--more {
    font-weight: 600;
    color: var(--nx-primary);
    background: rgba(0, 123, 255, 0.1);
}

.nx-sender-cell {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    min-width: 160px;
}

.nx-sender-info strong {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text);
}

.nx-sender-info small {
    display: block;
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
}

.nx-status {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    white-space: nowrap;
}

.nx-status::before {
    content: "";
    width: 0.4375rem;
    height: 0.4375rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.nx-status--active {
    background: rgba(40, 167, 69, 0.1);
    color: #1e7e34;
}

.nx-status--active::before {
    background: #28a745;
}

.nx-status--draft {
    background: rgba(253, 126, 20, 0.1);
    color: #c45d00;
}

.nx-status--draft::before {
    background: #fd7e14;
}

.nx-status--scheduled {
    background: rgba(111, 66, 193, 0.1);
    color: #5a32a3;
}

.nx-status--scheduled::before {
    background: #6f42c1;
}

.nx-status--archived {
    background: rgba(108, 117, 125, 0.12);
    color: var(--nx-text-muted);
}

.nx-status--archived::before {
    background: var(--nx-text-muted);
}

.nx-status--info {
    background: rgba(0, 123, 255, 0.1);
    color: #0056b3;
}

.nx-status--info::before {
    background: var(--nx-primary);
}

.nx-status--danger {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.nx-status--danger::before {
    background: var(--nx-danger);
}

.nx-usage {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    white-space: nowrap;
}

.nx-table-col-actions {
    width: 5.5rem;
    min-width: 5.5rem;
    text-align: center !important;
    white-space: nowrap;
}

.nx-table-col-actions--wide {
    width: 11rem;
    min-width: 11rem;
}

.nx-data-table tbody td.text-center,
.nx-data-table thead th.nx-table-col-actions {
    text-align: center !important;
}

.nx-data-table tbody td.text-center > .dropdown {
    display: inline-flex;
    justify-content: center;
}

.nx-data-table tbody td.text-center .nx-history-actions {
    justify-content: center;
}

.nx-actions-btn {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--nx-text-muted);
    cursor: pointer;
}

.nx-actions-btn:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-actions-menu .dropdown-item {
    font-size: 0.8125rem;
    padding: 0.5rem 1rem;
}

.nx-actions-menu .dropdown-item i {
    width: 1rem;
    margin-right: 0.5rem;
    color: var(--nx-text-muted);
}

.nx-table-panel .dropdown-menu {
    z-index: 1055;
}

body > .dropdown-menu.nx-actions-menu {
    z-index: 1060;
}

/* DataTables overrides */
.nx-table-panel .dataTables_wrapper {
    padding: 0;
    margin: 0;
}

.nx-table-panel .dataTables_wrapper .row {
    margin: 0;
}

.nx-table-panel .dataTables_wrapper .col-sm-12 {
    padding: 0;
}

.nx-table-panel .dataTables_length,
.nx-table-panel .dataTables_filter {
    display: none;
}

.nx-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 1.125rem;
    border-top: 1px solid var(--nx-border);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

#table-pagination .pagination {
    position: relative;
    z-index: 1;
}

.nx-table-footer .dataTables_info {
    padding: 0;
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

.nx-table-footer .dataTables_paginate {
    padding: 0;
    margin: 0;
}

.nx-table-footer .pagination {
    margin: 0;
    gap: 0.25rem;
}

.nx-table-footer .page-item .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 0.375rem !important;
    border-color: var(--nx-border);
    color: var(--nx-text-secondary);
    margin: 0;
}

.nx-table-footer .page-item.active .page-link {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
    color: #fff;
}

.nx-table-length {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

.nx-table-length--toolbar {
    margin: 0;
}

.nx-table-length__select,
.nx-table-length select {
    height: 2rem;
    padding: 0 1.5rem 0 0.5rem;
    font-size: 0.75rem;
    border: 1px solid var(--nx-border);
    border-radius: 0.375rem;
    background: var(--nx-surface);
    color: var(--nx-text-secondary);
    cursor: pointer;
}

.nx-table-footer .nx-table-length {
    display: none;
}

/* ------------------------------------------------------------------ */
/* Mail Template form (create / edit)                                 */
/* ------------------------------------------------------------------ */

.nx-form-page {
    max-width: 100%;
}

.nx-form-card {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
}

.nx-form-card__header {
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--nx-border);
    background: #fafbfc;
}

.nx-form-card__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-form-card__body {
    padding: 1.25rem;
}

.nx-form-field {
    margin-bottom: 1rem;
}

.nx-form-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
    margin-bottom: 0.35rem;
}

.nx-form-label .text-danger {
    color: var(--nx-danger);
}

.nx-form-input,
.nx-form-page .form-control,
.nx-form-page select.form-control,
.nx-form-page textarea.form-control {
    display: block;
    width: 100%;
    min-height: 2.375rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--nx-text);
    background: var(--nx-input-bg);
    border: 1px solid var(--nx-input-border);
    border-radius: 0.5rem;
    box-shadow: var(--nx-shadow-sm);
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition), background var(--nx-transition);
}

.nx-form-input::placeholder,
.nx-form-page .form-control::placeholder {
    color: var(--nx-text-placeholder);
}

.nx-form-input:hover:not(:disabled):not([readonly]),
.nx-form-page .form-control:hover:not(:disabled):not([readonly]) {
    border-color: var(--nx-border-hover);
}

.nx-form-input:focus,
.nx-form-page .form-control:focus {
    outline: none;
    background: var(--nx-input-bg);
    border-color: #80bdff;
    box-shadow: 0 0 0 3px var(--nx-primary-ring);
}

.nx-form-input:disabled,
.nx-form-page .form-control:disabled,
.nx-form-input[readonly],
.nx-form-page .form-control[readonly] {
    background: var(--nx-surface-muted);
    color: var(--nx-text-muted);
    cursor: not-allowed;
}

.nx-form-input.is-invalid,
.nx-form-page .form-control.is-invalid {
    border-color: var(--nx-danger);
    background: #fff8f8;
}

.nx-form-input.is-invalid:focus,
.nx-form-page .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15);
}

.nx-form-error {
    display: block;
    font-size: 0.75rem;
    color: var(--nx-danger);
    margin-top: 0.3rem;
    scroll-margin-top: 5.5rem;
    scroll-margin-bottom: 2rem;
}

.nx-form-group:has(.nx-form-error),
.nx-form-field:has(.nx-form-error),
.nx-file-field:has(.nx-form-error),
.nx-import-errors,
.nx-form-input.is-invalid,
.nx-form-page .form-control.is-invalid {
    scroll-margin-top: 5.5rem;
    scroll-margin-bottom: 2rem;
}

.nx-dialog__body .nx-form-group:has(.nx-form-error),
.nx-dialog__body .nx-form-field:has(.nx-form-error),
.nx-dialog__body .nx-file-field:has(.nx-form-error),
.nx-dialog__body .nx-import-errors {
    scroll-margin-top: 1rem;
    scroll-margin-bottom: 1rem;
}

.nx-form-note {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    margin: 0;
    line-height: 1.5;
}

.nx-form-note li {
    margin-bottom: 0.25rem;
}

.nx-form-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-primary);
    background: rgba(0, 123, 255, 0.08);
    border-radius: 0.375rem;
}

.nx-form-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-right: 1rem;
    font-size: 0.875rem;
    color: var(--nx-text-secondary);
}

.nx-attachment-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.375rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
    background: var(--nx-surface-muted);
    border: 1px dashed var(--nx-border-hover);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color var(--nx-transition), color var(--nx-transition);
}

.nx-attachment-btn:hover {
    border-color: var(--nx-primary);
    color: var(--nx-primary);
}

.nx-file-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem 0.35rem 0.75rem;
    margin: 0.25rem 0.5rem 0.25rem 0;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--nx-primary);
    background: rgba(0, 123, 255, 0.1);
    border-radius: 999px;
}

.nx-file-badge button {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    color: var(--nx-text-muted);
    cursor: pointer;
}

.nx-form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    padding-top: 0.5rem;
}

.nx-form-card__body--flush {
    padding: 0;
}

.nx-form-table {
    width: 100%;
    border-collapse: collapse;
}

.nx-form-table thead th {
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nx-text-muted);
    background: #fafbfc;
    border-bottom: 1px solid var(--nx-border);
    white-space: nowrap;
}

.nx-form-table tbody td {
    padding: 0.875rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid var(--nx-border);
}

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

.nx-form-table .nx-form-field {
    margin-bottom: 0;
}

.nx-form-table .nx-form-error {
    margin-top: 0.35rem;
}

.nx-btn--danger {
    background: var(--nx-surface);
    border-color: rgba(220, 53, 69, 0.35);
    color: var(--nx-danger);
}

.nx-btn--danger:hover:not(:disabled) {
    background: #fff5f5;
    border-color: var(--nx-danger);
    color: var(--nx-danger);
}

.nx-btn--info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

.nx-btn--info:hover:not(:disabled) {
    background: #138496;
    border-color: #117a8b;
    color: #fff;
}

.nx-btn--info:disabled,
.nx-btn--ghost:disabled,
.nx-btn--primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.nx-btn--danger:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.nx-form-page #customer_id {
    text-overflow: ellipsis;
}

.nx-form-page textarea#body {
    min-height: 400px;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.8125rem;
}

.nx-editor-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.nx-filter-field--typeahead {
    position: relative;
    overflow: visible;
}

.nx-filter-input-wrap--typeahead {
    overflow: visible;
}

.nx-filters .typeahead.dropdown-menu {
    z-index: 1060;
    width: 100%;
    min-width: 100%;
    max-height: 220px;
    overflow-y: auto;
    margin-top: 0.25rem;
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
    box-shadow: var(--nx-shadow);
}

.nx-email-group {
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
}

.nx-email-group > .form-control,
.nx-email-group > .nx-form-input {
    border-radius: 0;
    min-width: 0;
}

.nx-email-group > .form-control:first-child,
.nx-email-group > .nx-form-input:first-child {
    border-radius: 0.5rem 0 0 0.5rem;
    flex: 1 1 40%;
}

.nx-email-group .input-group-append .input-group-text {
    background: var(--nx-surface);
    border: 1px solid var(--nx-input-border);
    border-left: none;
    border-right: none;
    color: var(--nx-text-muted);
    padding: 0 0.75rem;
}

.nx-email-group .form-control,
.nx-email-group .nx-form-input,
.nx-email-group select.form-control {
    background: var(--nx-input-bg);
    border-color: var(--nx-input-border);
    box-shadow: none;
}

.nx-email-group .form-control:focus,
.nx-email-group select.form-control:focus {
    z-index: 2;
}

.nx-email-group select.form-control,
.nx-email-group select.nx-form-input {
    border-radius: 0 0.5rem 0.5rem 0;
    flex: 1 1 45%;
    max-width: none;
}

.nx-email-field__errors {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    margin-top: 0.25rem;
}

.nx-email-field__error--local {
    flex: 1 1 40%;
    min-width: 0;
}

.nx-email-field__error--domain {
    flex: 1 1 45%;
    min-width: 0;
}

.nx-email-field__error-gap {
    visibility: hidden;
    pointer-events: none;
    flex-shrink: 0;
}

.nx-email-field__error-gap .input-group-text {
    border-color: transparent;
    background: transparent;
}

.nx-email-field__errors .nx-form-error {
    margin-top: 0;
}

/* ------------------------------------------------------------------ */
/* Contact list page                                                  */
/* ------------------------------------------------------------------ */

.nx-contact-count {
    font-weight: 600;
    color: var(--nx-primary);
}

.nx-panel-card {
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
}

.nx-panel-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--nx-border);
    background: #fafbfc;
}

.nx-panel-card.is-collapsed .nx-panel-card__header {
    border-bottom: none;
}

.nx-panel-card__title {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-panel-card__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid var(--nx-border);
    border-radius: 0.375rem;
    background: var(--nx-surface);
    color: var(--nx-text-muted);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-panel-card__toggle:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-panel-card__toggle i {
    transition: transform var(--nx-transition);
}

.nx-panel-card.is-collapsed .nx-panel-card__toggle i {
    transform: rotate(-90deg);
}

.nx-panel-card__body {
    padding: 1.25rem;
}

.nx-panel-card.is-collapsed .nx-panel-card__body {
    display: none;
}

.nx-file-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nx-file-field__control {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    flex-wrap: nowrap;
    margin: 0;
    font-weight: 400;
    border: 1px solid var(--nx-input-border);
    border-radius: 0.5rem;
    background: var(--nx-input-bg);
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--nx-transition), box-shadow var(--nx-transition);
}

.nx-file-field__control:hover {
    border-color: var(--nx-border-hover);
}

.nx-file-field__control:focus-within {
    border-color: #80bdff;
    box-shadow: 0 0 0 3px var(--nx-primary-ring);
}

.nx-file-field__name {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    align-items: center;
    min-height: 2.375rem;
    padding: 0 0.75rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--nx-text-secondary);
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
}

.nx-file-field__name.is-placeholder {
    color: var(--nx-text-placeholder);
}

.nx-form-uploading [data-nx-upload-submit] {
    pointer-events: none;
}

.nx-form-uploading [data-nx-upload-submit]:disabled {
    opacity: 0.65;
}

.nx-file-field__name.is-uploading {
    color: var(--nx-text-muted);
    font-style: italic;
}

.nx-file-field__browse {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin: 0;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.375rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
    background: var(--nx-surface-muted);
    border: none;
    border-left: 1px solid var(--nx-input-border);
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    pointer-events: none;
    user-select: none;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-file-field__control:hover .nx-file-field__browse {
    background: #eef1f4;
    color: var(--nx-text);
}

.nx-file-field__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.nx-import-note {
    margin: 0.75rem 0 0;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    line-height: 1.5;
}

.nx-import-note a {
    color: var(--nx-primary);
    font-weight: 600;
}

.nx-import-errors {
    margin-top: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fff5f5;
    border: 1px solid rgba(220, 53, 69, 0.2);
    border-radius: 0.5rem;
}

.nx-import-errors h4 {
    margin: 0 0 0.5rem;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--nx-danger);
}

.nx-import-errors ul {
    margin: 0;
    padding-left: 1.25rem;
    font-size: 0.8125rem;
    color: var(--nx-danger);
}

.nx-status--inactive {
    background: rgba(220, 53, 69, 0.1);
    color: #b02a37;
}

.nx-status--inactive::before {
    background: var(--nx-danger);
}

.nx-subscribe-btn {
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
}

.nx-subscribe-btn:hover .nx-status {
    filter: brightness(0.97);
}

.nx-contact-email {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text);
}

.nx-contact-name {
    font-size: 0.8125rem;
    color: var(--nx-text-secondary);
}

.nx-modal-form .nx-form-field:last-child {
    margin-bottom: 0;
}

.nx-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    width: 100%;
}

/* Dashboard dialog modal (Bootstrap layout — no Tailwind) */
[x-cloak] {
    display: none !important;
}

body.nx-modal-open {
    overflow: hidden;
}

.nx-dialog {
    position: fixed;
    inset: 0;
    z-index: 1070;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.nx-dialog__backdrop {
    position: fixed;
    inset: 0;
    background: rgba(33, 37, 41, 0.5);
}

.nx-dialog__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    margin: auto;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transition: transform 0.3s ease-out;
}

.nx-dialog.nx-dialog--static .nx-dialog__panel {
    transform: scale(1.02);
}

@media (prefers-reduced-motion: reduce) {
    .nx-dialog__panel {
        transition: none;
    }

    .nx-dialog.nx-dialog--static .nx-dialog__panel {
        transform: none;
    }
}

.nx-dialog__panel--sm { max-width: 24rem; }
.nx-dialog__panel--md { max-width: 32rem; }
.nx-dialog__panel--lg { max-width: 42rem; }
.nx-dialog__panel--xl { max-width: 48rem; }
.nx-dialog__panel--2xl { max-width: 56rem; }
.nx-dialog__panel--7xl { max-width: 72rem; }

.nx-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--nx-border);
    background: #fafbfc;
}

.nx-dialog__header .nx-form-card__title {
    margin: 0;
}

.nx-dialog__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    color: var(--nx-text-muted);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-dialog__close:hover {
    background: var(--nx-surface-muted);
    color: var(--nx-text-secondary);
}

.nx-dialog__body {
    padding: 1.25rem;
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.nx-dialog__footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.625rem;
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--nx-border);
    background: #fafbfc;
}

.nx-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 0.25rem;
}

.nx-radio-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--nx-text-secondary);
    cursor: pointer;
}

.nx-radio-group input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: var(--nx-primary);
    cursor: pointer;
}

.nx-table-toolbar__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

/* ------------------------------------------------------------------ */
/* Image Gallery                                                      */
/* ------------------------------------------------------------------ */

.nx-upload-row {
    display: grid;
    grid-template-columns: minmax(10rem, 16rem) minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 1rem;
    row-gap: 0.35rem;
    align-items: end;
}

.nx-upload-row__prefix {
    grid-column: 1;
    grid-row: 1;
}

.nx-upload-row__files {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
}

.nx-upload-row__submit {
    grid-column: 3;
    grid-row: 1;
    flex: 0 0 auto;
}

.nx-upload-row-errors {
    grid-column: 2;
    grid-row: 2;
    margin-top: 0;
}

.nx-upload-row .nx-form-field,
.nx-upload-row .nx-file-field {
    margin-bottom: 0;
}

.nx-upload-row .nx-file-field .nx-form-label {
    margin-bottom: 0;
}

.nx-upload-row-errors .nx-form-error {
    margin-top: 0;
}

.nx-upload-row-errors .nx-form-error + .nx-form-error {
    margin-top: 0.25rem;
}

@media (max-width: 991.98px) {
    .nx-upload-row {
        grid-template-columns: 1fr;
    }

    .nx-upload-row__prefix,
    .nx-upload-row__files,
    .nx-upload-row__submit,
    .nx-upload-row-errors {
        grid-column: 1;
        grid-row: auto;
    }

    .nx-upload-row__submit {
        width: 100%;
    }

    .nx-upload-row__submit .nx-btn {
        width: 100%;
    }
}

.nx-gallery-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid var(--nx-border);
    background: #fafbfc;
}

.nx-gallery-panel__header .nx-form-card__title {
    margin: 0;
}

.nx-gallery-panel__count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nx-text-muted);
}

.nx-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 1rem;
    padding: 1.25rem;
}

.nx-gallery-item {
    min-width: 0;
}

.nx-gallery-item__media {
    position: relative;
    /* aspect-ratio: 1; */
    padding: 8px;
    border-radius: 0.625rem;
    overflow: hidden;
    border: 1px solid var(--nx-border);
    background: var(--nx-surface-muted);
}

.nx-gallery-item__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nx-gallery-item__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(33, 37, 41, 0.45);
    opacity: 0;
    transition: opacity var(--nx-transition);
}

.nx-gallery-item__media:hover .nx-gallery-item__overlay,
.nx-gallery-item__media:focus-within .nx-gallery-item__overlay {
    opacity: 1;
}

.nx-gallery-item__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 0.5rem;
    background: var(--nx-surface);
    color: var(--nx-text-secondary);
    cursor: pointer;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-gallery-item__btn:hover {
    background: var(--nx-primary);
    color: #fff;
}

.nx-gallery-item__btn--danger:hover {
    background: var(--nx-danger);
    color: #fff;
}

.nx-gallery-item__name {
    margin: 0.5rem 0 0;
    font-size: 0.6875rem;
    color: var(--nx-text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nx-gallery-empty {
    padding: 3rem 1.5rem;
    text-align: center;
}

.nx-gallery-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-bottom: 1rem;
    border-radius: 50%;
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
    font-size: 1.5rem;
}

.nx-gallery-empty__title {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-gallery-empty__text {
    margin: 0 auto;
    max-width: 24rem;
    font-size: 0.875rem;
    color: var(--nx-text-muted);
    line-height: 1.5;
}

.nx-gallery-footer {
    justify-content: center;
}

.nx-gallery-footer .pagination {
    margin: 0;
    gap: 0.25rem;
}

.nx-gallery-footer .page-item .page-link {
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 0.375rem !important;
    border-color: var(--nx-border);
    color: var(--nx-text-secondary);
    margin: 0;
}

.nx-gallery-footer .page-item.active .page-link {
    background: var(--nx-primary);
    border-color: var(--nx-primary);
    color: #fff;
}

/* Mail history */
.nx-btn--sm {
    height: 2rem;
    min-width: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
}

.nx-history-details strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--nx-text);
    line-height: 1.4;
}

.nx-history-details p {
    margin: 0.2rem 0 0;
    font-size: 0.75rem;
    color: var(--nx-text-muted);
    line-height: 1.4;
}

.nx-history-audience strong {
    display: block;
    font-size: 0.8125rem;
    color: var(--nx-text);
}

.nx-history-audience small {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

.nx-history-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.nx-progress-cell {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 110px;
}

.nx-progress-cell__count {
    display: block;
    color: var(--nx-text-muted);
    font-size: 0.6875rem;
    line-height: 1.2;
}

.nx-progress-cell__done {
    font-weight: 600;
    color: var(--nx-text-secondary);
}

.nx-progress {
    height: 1rem;
    background: var(--nx-surface-muted);
    border-radius: 999px;
    overflow: hidden;
}

.nx-progress__bar {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-width: 0;
    font-size: 0.625rem;
    font-weight: 600;
    color: #fff;
    background: var(--nx-primary);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.nx-progress__bar.is-idle {
    background: var(--nx-border);
    color: var(--nx-text-muted);
}

.nx-preview-frame {
    width: 100%;
    height: 420px;
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
    background: #fff;
}

.nx-preview-meta {
    margin: 0 0 0.75rem;
    font-size: 0.8125rem;
    color: var(--nx-text-secondary);
    line-height: 1.5;
}

.nx-preview-meta strong {
    color: var(--nx-text);
}

.nx-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1.5rem;
}

.nx-detail-grid--full {
    grid-column: 1 / -1;
}

.nx-detail-item {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--nx-text);
    line-height: 1.5;
}

.nx-detail-item__label {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #000000;
}

.nx-attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.nx-attachment-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.375rem;
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
    text-decoration: none !important;
    transition: background var(--nx-transition), color var(--nx-transition);
}

.nx-attachment-chip:hover {
    background: var(--nx-primary);
    color: #fff;
}

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

@media (max-width: 991.98px) {
    .nx-detail-grid {
        grid-template-columns: 1fr;
    }
}

/* Mail History Report */
.nx-mail-report__header {
    align-items: flex-start;
}

.nx-mail-report__title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.nx-mail-report__title-row .nx-page-header__title {
    margin-bottom: 0;
}

.nx-mail-report__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
}

.nx-mail-report__meta i {
    margin-right: 0.35rem;
    color: var(--nx-primary);
}

.nx-mail-report__stats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1199.98px) {
    .nx-mail-report__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .nx-mail-report__stats {
        grid-template-columns: 1fr;
    }
}

.nx-mail-report__rates {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    padding: 1rem 1.25rem;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
}

.nx-mail-report__rate-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 7rem;
}

.nx-mail-report__rate-item strong,
.nx-mail-report__rate-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--nx-text);
}

.nx-mail-report__rate-label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--nx-text-muted);
}

.nx-mail-report__rate-item--wide {
    flex: 1 1 16rem;
    min-width: 12rem;
}

.nx-mail-report__progress {
    height: 0.5rem;
    background: rgba(0, 123, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.nx-mail-report__progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--nx-primary), #4dabf7);
    border-radius: 999px;
    transition: width 0.3s ease;
}

.nx-detail-grid--report {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.nx-mail-report__details .nx-panel-card__body {
    padding: 1rem 1.25rem;
}

.nx-detail-grid--report-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem 1.25rem;
}

.nx-detail-grid--report-compact .nx-detail-item {
    min-width: 0;
}

.nx-detail-grid--report-compact .nx-report-filter-chips {
    margin-top: 0.15rem;
}

.nx-filters--embedded {
    margin-bottom: 1rem;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.nx-filters--with-metric {
    align-items: flex-end;
}

.nx-filters--with-metric .nx-metric-filter {
    margin-left: auto;
}

@media (max-width: 768px) {
    .nx-filters--with-metric .nx-metric-filter {
        margin-left: 0;
        width: 100%;
    }
}

.nx-metric-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.nx-metric-filter__label {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    white-space: nowrap;
}

.nx-metric-filter__toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    min-height: 2.375rem;
    background: #fff;
    border: 1px solid var(--nx-border, #dee2e6);
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-primary, #007bff);
    box-shadow: none;
    white-space: nowrap;
}

.nx-metric-filter__toggle:hover,
.nx-metric-filter__toggle:focus {
    background: #fff;
    border-color: var(--nx-border, #dee2e6);
    color: var(--nx-primary, #007bff);
    box-shadow: none;
}

.nx-metric-filter__toggle::after {
    margin-left: 0.15rem;
}

.nx-metric-filter__toggle-icon {
    font-size: 0.75rem;
    color: var(--nx-text-muted);
}

.nx-metric-filter__menu {
    min-width: 15rem;
    max-height: 18rem;
    overflow-y: auto;
    padding: 0.35rem 0;
    border-radius: 0.5rem;
    box-shadow: var(--nx-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.1));
}

.nx-metric-filter__option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    color: var(--nx-text);
    border: 0;
    background: transparent;
    width: 100%;
    text-align: left;
}

.nx-metric-filter__option:hover,
.nx-metric-filter__option:focus {
    background: rgba(0, 0, 0, 0.04);
    color: var(--nx-text);
}

.nx-metric-filter__check {
    width: 1rem;
    flex-shrink: 0;
    visibility: hidden;
    color: var(--nx-text-muted);
    font-size: 0.75rem;
}

.nx-metric-filter__option.is-active .nx-metric-filter__check {
    visibility: visible;
}

.nx-metric-filter__icon {
    width: 1.25rem;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--nx-text-muted);
    font-size: 0.875rem;
}

.nx-metric-filter__text {
    flex: 1;
}

.nx-performance-chart__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nx-performance-chart__header .nx-panel-card__title {
    margin-bottom: 0.15rem;
}

.nx-metric-filter--chart {
    margin-left: auto;
}

.nx-performance-chart__wrap {
    position: relative;
    height: 280px;
}

.nx-performance-chart__legend {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
}

.nx-performance-chart__legend-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 50%;
    background: #7c3aed;
}

@media (max-width: 768px) {
    .nx-metric-filter--chart {
        margin-left: 0;
        width: 100%;
    }

    .nx-performance-chart__wrap {
        height: 240px;
    }
}

.nx-table-panel--embedded {
    border: 0;
    box-shadow: none;
    background: transparent;
}

.nx-attachment-chip--file {
    width: auto;
    min-width: auto;
    height: auto;
    padding: 0.35rem 0.65rem;
    gap: 0.35rem;
    max-width: 100%;
}

.nx-attachment-chip--file span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 12rem;
}

.nx-sender-cell--compact .nx-avatar--sm {
    width: 1.75rem;
    height: 1.75rem;
    font-size: 0.6875rem;
}

.nx-report-message {
    display: inline-block;
    max-width: 18rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--nx-text-muted);
    font-size: 0.8125rem;
}

.nx-report-metric {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.5rem;
    height: 1.5rem;
    padding: 0 0.45rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.nx-report-metric--zero {
    background: rgba(108, 117, 125, 0.12);
    color: var(--nx-text-muted);
}

.nx-report-metric--active {
    background: rgba(40, 167, 69, 0.12);
    color: #28a745;
}

.nx-report-metric--danger {
    background: rgba(220, 53, 69, 0.12);
    color: #dc3545;
}

.nx-report-filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.nx-report-filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 999px;
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
}

@media (max-width: 991.98px) {
    .nx-detail-grid--report-compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .nx-detail-grid--report-compact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 991.98px) {
    .nx-detail-grid--report {
        grid-template-columns: 1fr;
    }
}

/* GDPR Block Mail */
.nx-gdpr-form-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 1.5rem;
}

.nx-gdpr-form-row__add {
    flex: 0 1 34%;
    min-width: 14rem;
}

.nx-gdpr-form-row__import {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 1.5rem;
    border-left: 1px solid var(--nx-border);
}

.nx-gdpr-form-row__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    column-gap: 0.75rem;
    row-gap: 0.35rem;
    align-items: end;
}

.nx-gdpr-form-row__field {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
}

.nx-gdpr-form-row__action {
    grid-column: 2;
    grid-row: 1;
    padding-bottom: 0.125rem;
}

.nx-gdpr-form-row__errors {
    grid-column: 1;
    grid-row: 2;
}

.nx-gdpr-form-row__errors .nx-form-error {
    margin-top: 0;
}

.nx-gdpr-form-row .nx-form-field,
.nx-gdpr-form-row .nx-file-field {
    margin-bottom: 0;
}

@media (max-width: 991.98px) {
    .nx-gdpr-form-row {
        flex-direction: column;
        gap: 1.25rem;
    }

    .nx-gdpr-form-row__add,
    .nx-gdpr-form-row__import {
        flex: 1 1 100%;
        width: 100%;
        padding-left: 0;
        border-left: none;
        padding-top: 0;
    }

    .nx-gdpr-form-row__import {
        padding-top: 1.25rem;
        border-top: 1px solid var(--nx-border);
    }

    .nx-gdpr-form-row__inner {
        grid-template-columns: 1fr;
    }

    .nx-gdpr-form-row__field,
    .nx-gdpr-form-row__action,
    .nx-gdpr-form-row__errors {
        grid-column: 1;
        grid-row: auto;
    }

    .nx-gdpr-form-row__action {
        width: 100%;
    }

    .nx-gdpr-form-row__action .nx-btn {
        width: 100%;
    }
}

/* Profile & Signature Template */
.nx-form-field--switch {
    margin-bottom: 0;
}

.nx-switch-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nx-switch-field .custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--nx-primary);
    border-color: var(--nx-primary);
}

.nx-switch-field .custom-control-label::before {
    background-color: #d1d5db;
    border-color: #d1d5db;
}

.nx-switch-field__status {
    font-size: 0.8125rem;
    font-weight: 600;
}

.nx-switch-field__status.is-on {
    color: #1e7e34;
}

.nx-switch-field__status.is-off {
    color: var(--nx-text-muted);
}

.nx-2fa-setup {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--nx-border);
}

.nx-2fa-setup__grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 1.5rem;
    align-items: start;
}

.nx-2fa-setup__qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--nx-border);
    border-radius: 0.75rem;
    box-shadow: var(--nx-shadow-sm);
}

.nx-2fa-setup__qr svg {
    display: block;
    max-width: 150px;
    height: auto;
}

.nx-2fa-setup__help {
    margin: 0 0 1rem;
    font-size: 0.8125rem;
    color: var(--nx-text-secondary);
    line-height: 1.6;
}

.nx-form-card__header--tabs {
    padding: 0 1.25rem;
}

.nx-tabs {
    border-bottom: none;
    margin-bottom: -1px;
}

.nx-tabs .nav-link {
    margin-bottom: 0;
    padding: 0.875rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-muted);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
}

.nx-tabs .nav-link:hover {
    color: var(--nx-text-secondary);
    border-color: transparent;
}

.nx-tabs .nav-link.active {
    color: var(--nx-primary);
    background: transparent;
    border-color: transparent;
    border-bottom-color: var(--nx-primary);
}

.nx-tab-content {
    padding-top: 0.25rem;
}

.nx-form-page .tox-tinymce {
    border-color: var(--nx-input-border) !important;
    border-radius: 0.5rem !important;
    box-shadow: var(--nx-shadow-sm);
    overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Mail template form UX (create / edit)                              */
/* ------------------------------------------------------------------ */

.nx-mail-template-form {
    padding-bottom: 5.5rem;
}

.nx-form-split {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
}

.nx-form-split > [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.nx-form-card--fill {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.nx-form-card--fill .nx-form-card__body {
    flex: 1;
}

.nx-form-split .nx-attach-zone__drop {
    min-height: 100%;
}

.nx-form-card__header--rich {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nx-form-card__heading {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    min-width: 0;
}

.nx-form-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.5rem;
    background: rgba(0, 123, 255, 0.1);
    color: var(--nx-primary);
    font-size: 0.875rem;
}

.nx-form-card__desc {
    margin: 0.15rem 0 0;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--nx-text-muted);
    line-height: 1.4;
}

.nx-form-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--nx-border);
}

.nx-form-section--last {
    margin-bottom: 1rem;
    padding-bottom: 0;
    border-bottom: none;
}

.nx-form-section__label {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.nx-form-hint {
    margin: 0.5rem 0 0;
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
    line-height: 1.5;
}

.nx-help-panel {
    margin-top: 0.25rem;
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
    background: var(--nx-surface-muted);
}

.nx-help-panel__summary {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.nx-help-panel__summary::-webkit-details-marker {
    display: none;
}

.nx-help-panel__summary::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-left: auto;
    font-size: 0.7rem;
    color: var(--nx-text-muted);
    transition: transform var(--nx-transition);
}

.nx-help-panel[open] .nx-help-panel__summary::after {
    transform: rotate(180deg);
}

.nx-help-panel .nx-form-note {
    padding: 0 1rem 0.875rem 2.25rem;
    margin: 0;
}

.nx-audience-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.nx-audience-summary--stack {
    flex-direction: row;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.nx-audience-summary--stack .nx-audience-summary__item {
    flex: 1 1 0;
    min-width: 5.5rem;
}

.nx-exclude-layout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1rem;
}

.nx-exclude-layout__stats {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.5rem;
    flex: 0 0 auto;
}

.nx-exclude-layout__stats .nx-audience-summary__item {
    flex: 0 0 auto;
    min-width: 5.25rem;
    max-width: 7rem;
    padding: 0.4rem 0.625rem;
}

.nx-exclude-layout__stats .nx-audience-summary__label {
    font-size: 0.625rem;
}

.nx-exclude-layout__stats .nx-audience-summary__value {
    margin-top: 0.1rem;
    font-size: 0.9375rem;
}

.nx-exclude-layout__field {
    flex: 1 1 16rem;
    min-width: 0;
}

@media (max-width: 767.98px) {
    .nx-exclude-layout__stats {
        width: 100%;
    }
}

.nx-audience-summary__item {
    display: inline-flex;
    flex-direction: column;
    min-width: 7rem;
    padding: 0.625rem 0.875rem;
    background: rgba(0, 123, 255, 0.06);
    border: 1px solid rgba(0, 123, 255, 0.12);
    border-radius: 0.5rem;
}

.nx-audience-summary__label {
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--nx-text-muted);
}

.nx-audience-summary__value {
    margin-top: 0.15rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--nx-primary);
    line-height: 1.2;
}

.nx-audience-summary__value--warn {
    color: #d97706;
}

.nx-audience-summary__value--ok {
    color: #198754;
}

.nx-schedule-panel {
    border: 1px solid var(--nx-border);
    border-radius: 0.625rem;
    background: var(--nx-surface-muted);
    overflow: hidden;
}

.nx-schedule-panel--active {
    border-color: rgba(0, 123, 255, 0.35);
    background: rgba(0, 123, 255, 0.04);
}

.nx-schedule-panel__toggle {
    padding: 0.875rem 1rem;
}

.nx-schedule-panel__fields {
    padding: 0 1rem 1rem;
    transition: opacity var(--nx-transition);
}

.nx-schedule-panel__fields--disabled {
    opacity: 0.55;
    pointer-events: none;
}

.nx-attach-zone__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    min-height: 7.5rem;
    padding: 1.25rem 1rem;
    margin: 0;
    text-align: center;
    cursor: pointer;
    border: 1.5px dashed var(--nx-border-hover);
    border-radius: 0.625rem;
    background: var(--nx-surface-muted);
    transition: border-color var(--nx-transition), background var(--nx-transition), color var(--nx-transition);
}

.nx-attach-zone__drop:hover {
    border-color: var(--nx-primary);
    background: rgba(0, 123, 255, 0.04);
}

.nx-attach-zone__icon {
    font-size: 1.5rem;
    color: var(--nx-primary);
    margin-bottom: 0.25rem;
}

.nx-attach-zone__title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nx-text-secondary);
}

.nx-attach-zone__meta {
    font-size: 0.75rem;
    color: var(--nx-text-muted);
    max-width: 28rem;
    line-height: 1.4;
}

.nx-attach-zone__files {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.875rem;
}

.nx-editor-toggle--header {
    margin-bottom: 0;
    padding: 0.25rem 0.5rem;
    background: var(--nx-surface);
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
}

.nx-tag-hints {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.625rem 0.875rem;
    background: var(--nx-surface-muted);
    border: 1px solid var(--nx-border);
    border-radius: 0.5rem;
}

.nx-tag-hints__label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--nx-text-muted);
}

.nx-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-family: Consolas, Monaco, monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--nx-primary);
    background: rgba(0, 123, 255, 0.1);
    border-radius: 0.375rem;
}

.nx-tag-hints__hint {
    font-size: 0.8125rem;
    color: var(--nx-text-muted);
}

.nx-form-sticky-actions {
    position: fixed;
    left: 260px;
    right: 0;
    bottom: 0;
    z-index: 1030;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--nx-border);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(8px);
}

.nx-form-sticky-actions__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
    margin: 0 auto;
}

.nx-form-sticky-actions__meta {
    min-width: 0;
}

.nx-form-actions--sticky {
    padding-top: 0;
    margin-left: auto;
}

@media (max-width: 991.98px) {
    .nx-form-sticky-actions {
        left: 0;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 767.98px) {
    .nx-mail-template-form {
        padding-bottom: 7.5rem;
    }

    .nx-form-sticky-actions__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .nx-form-actions--sticky {
        margin-left: 0;
    }

    .nx-form-actions--sticky .nx-btn {
        flex: 1 1 auto;
    }

    .nx-form-card__header--rich {
        flex-direction: column;
    }
}

@media (max-width: 767.98px) {
    .nx-2fa-setup__grid {
        grid-template-columns: 1fr;
    }

    .nx-2fa-setup__qr {
        justify-self: center;
    }
}

/* ------------------------------------------------------------------ */
/* SweetAlert2 toast notifications                                    */
/* ------------------------------------------------------------------ */

@keyframes nx-toast-in {
    from {
        opacity: 0;
        transform: translateX(1rem);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

body.swal2-toast-shown .swal2-container.swal2-top-end,
body.swal2-toast-shown .swal2-container.swal2-top-right {
    top: calc(3.65rem + 1rem) !important;
    right: 1.25rem !important;
    padding: 0;
    z-index: 1090;
}

.swal2-popup.swal2-toast.nx-toast {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-family: var(--nx-font);
    background: var(--nx-toast-surface) !important;
    border: 1px solid var(--nx-border) !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.1), 0 2px 6px rgba(15, 23, 42, 0.05) !important;
    padding: 0.875rem 2.5rem 0.875rem 3.25rem !important;
    min-width: 300px;
    max-width: 400px;
    overflow: hidden;
    grid-template-columns: none !important;
}

.swal2-popup.swal2-toast.nx-toast > * {
    grid-column: auto !important;
    grid-row: auto !important;
}

.swal2-popup.swal2-toast.nx-toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--nx-toast-accent);
    border-radius: 0.625rem 0 0 0.625rem;
}

.swal2-popup.swal2-toast.nx-toast.swal2-show {
    animation: nx-toast-in 0.32s ease-out forwards;
}

.nx-toast--success {
    --nx-toast-accent: var(--nx-toast-success-accent);
    --nx-toast-surface: var(--nx-toast-success-bg);
    --nx-toast-icon-bg: var(--nx-toast-success-icon-bg);
    --nx-toast-icon-color: var(--nx-toast-success-accent);
    border-color: rgba(25, 135, 84, 0.2) !important;
}

.nx-toast--error {
    --nx-toast-accent: var(--nx-toast-error-accent);
    --nx-toast-surface: var(--nx-toast-error-bg);
    --nx-toast-icon-bg: var(--nx-toast-error-icon-bg);
    --nx-toast-icon-color: var(--nx-toast-error-accent);
    border-color: rgba(220, 53, 69, 0.2) !important;
}

.nx-toast--warning {
    --nx-toast-accent: var(--nx-toast-warning-accent);
    --nx-toast-surface: var(--nx-toast-warning-bg);
    --nx-toast-icon-bg: var(--nx-toast-warning-icon-bg);
    --nx-toast-icon-color: var(--nx-toast-warning-accent);
    border-color: rgba(217, 119, 6, 0.2) !important;
}

.nx-toast--info {
    --nx-toast-accent: var(--nx-toast-info-accent);
    --nx-toast-surface: var(--nx-toast-info-bg);
    --nx-toast-icon-bg: var(--nx-toast-info-icon-bg);
    --nx-toast-icon-color: var(--nx-toast-info-accent);
    border-color: rgba(0, 123, 255, 0.2) !important;
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__title {
    flex: 1 1 auto;
    width: 100%;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--nx-text);
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.45;
    text-align: center !important;
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__icon {
    position: absolute;
    left: calc(4px + 0.75rem);
    top: 50%;
    transform: translateY(-50%);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 2.25rem !important;
    height: 2.25rem !important;
    min-width: 2.25rem !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 50%;
    background: var(--nx-toast-icon-bg);
    color: var(--nx-toast-icon-color);
    box-shadow: none;
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__icon .swal2-icon-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}

.swal2-popup.swal2-toast.nx-toast .nx-toast-fa-icon {
    font-size: 0.8125rem;
    line-height: 1;
    color: var(--nx-toast-icon-color);
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__close {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    align-self: auto;
    width: 1.625rem;
    height: 1.625rem;
    margin: 0 !important;
    font-size: 1.25rem;
    line-height: 1.625rem;
    color: var(--nx-text-muted);
    border-radius: 0.375rem;
    transition: color var(--nx-transition), background var(--nx-transition);
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__close:hover {
    color: var(--nx-text);
    background: rgba(15, 23, 42, 0.06);
}

.swal2-popup.swal2-toast.nx-toast .swal2-timer-progress-bar-container {
    position: absolute;
    left: 4px;
    right: 0;
    bottom: 0;
    height: 3px;
}

.swal2-popup.swal2-toast.nx-toast .nx-toast__progress {
    background: var(--nx-toast-accent);
}

@media (max-width: 575.98px) {
    body.swal2-toast-shown .swal2-container.swal2-top-end,
    body.swal2-toast-shown .swal2-container.swal2-top-right {
        top: calc(3.25rem + 0.75rem) !important;
        right: 0.75rem !important;
        left: 0.75rem;
    }

    .swal2-popup.swal2-toast.nx-toast {
        min-width: 0;
        max-width: none;
        width: 100%;
    }
}
