/**
 * QuoteNest publisher UI — shared tokens, guest auth (body.qn-publisher-guest),
 * and authenticated portal chrome (body.qn-publisher-app). Does not load on admin.
 */

:root {
    --qn-bg: #f9f7f2;
    --qn-white: #ffffff;
    --qn-navy: #162032;
    --qn-navy-muted: #3d4f66;
    --qn-primary: #2563eb;
    --qn-primary-deep: #1d4ed8;
    --qn-primary-soft: #3b82f6;
    --qn-accent-warm: #c4a574;
    --qn-border: rgba(22, 32, 50, 0.12);
    --qn-shadow: 0 4px 24px rgba(22, 32, 50, 0.06), 0 1px 3px rgba(22, 32, 50, 0.04);
    --qn-shadow-lg: 0 16px 40px rgba(22, 32, 50, 0.1), 0 4px 12px rgba(22, 32, 50, 0.06);
    --qn-radius-card: 20px;
    --qn-radius-input: 12px;
    --qn-radius-btn: 9999px;

    /* Publisher “play” palette (used in publisher-layout only) */
    --qn-play-cyan: #22d3ee;
    --qn-play-indigo: #6366f1;
    --qn-play-violet: #a78bfa;
    --qn-play-fuchsia: #e879f9;
    --qn-play-rose: #fb7185;
    --qn-play-amber: #fbbf24;
    --qn-play-emerald: #34d399;
}

/* —— Guest auth shell (publisher login / password flows only) —— */

body.qn-publisher-guest,
body.qn-publisher-guest * {
    box-sizing: border-box;
}

body.qn-publisher-guest {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--qn-navy);
    background: var(--qn-bg);
    -webkit-font-smoothing: antialiased;
}

body.qn-publisher-guest .qn-site-header {
    background: var(--qn-white);
    border-bottom: 1px solid var(--qn-border);
    padding: 0.875rem 1.5rem;
    position: relative;
    z-index: 10;
}

body.qn-publisher-guest .qn-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

body.qn-publisher-guest .qn-logo img {
    height: 36px;
    width: auto;
    display: block;
}

body.qn-publisher-guest .qn-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.qn-publisher-guest .qn-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1.15rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--qn-primary);
    background: transparent;
    border: 1.5px solid var(--qn-primary);
    border-radius: var(--qn-radius-btn);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

body.qn-publisher-guest .qn-btn-outline:hover {
    background: rgba(37, 99, 235, 0.06);
    color: var(--qn-primary-deep);
}

body.qn-publisher-guest .qn-page {
    min-height: calc(100vh - 57px);
    display: flex;
    align-items: stretch;
}

body.qn-publisher-guest .qn-split {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: clamp(2rem, 5vw, 4rem);
    padding: clamp(1.5rem, 4vw, 3rem) 1.5rem 2.5rem;
}

@media (max-width: 900px) {
    body.qn-publisher-guest .qn-split {
        grid-template-columns: 1fr;
        align-items: start;
        padding-top: 1.5rem;
    }
}

body.qn-publisher-guest .qn-hero {
    position: relative;
    padding-right: clamp(0px, 3vw, 2rem);
}

@media (max-width: 900px) {
    body.qn-publisher-guest .qn-hero {
        padding-right: 0;
        text-align: center;
    }
}

body.qn-publisher-guest .qn-hero h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin: 0 0 1rem;
    color: var(--qn-navy);
}

body.qn-publisher-guest .qn-hero h2 .qn-highlight {
    color: var(--qn-primary);
    font-weight: 700;
}

body.qn-publisher-guest .qn-hero .qn-lead {
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--qn-navy-muted);
    margin: 0;
    max-width: 32rem;
}

@media (max-width: 900px) {
    body.qn-publisher-guest .qn-hero .qn-lead {
        margin-left: auto;
        margin-right: auto;
    }
}

body.qn-publisher-guest .qn-hero-deco {
    position: absolute;
    width: min(340px, 70vw);
    height: min(340px, 70vw);
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(196, 165, 116, 0.22) 0%, rgba(196, 165, 116, 0.05) 55%, transparent 70%);
    top: 50%;
    right: -4rem;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 0;
}

@media (max-width: 900px) {
    body.qn-publisher-guest .qn-hero-deco {
        display: none;
    }
}

body.qn-publisher-guest .qn-hero-inner {
    position: relative;
    z-index: 1;
}

body.qn-publisher-guest .qn-panel {
    position: relative;
    z-index: 1;
}

body.qn-publisher-guest .qn-auth-card {
    width: 100%;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
    background: var(--qn-white);
    border-radius: var(--qn-radius-card);
    box-shadow: var(--qn-shadow);
    border: 1px solid var(--qn-border);
    padding: 2rem 1.75rem 1.75rem;
}

@media (min-width: 901px) {
    body.qn-publisher-guest .qn-auth-card {
        margin-left: 0;
        margin-right: 0;
    }
}

body.qn-publisher-guest .qn-auth-card h1 {
    font-size: 1.375rem;
    font-weight: 700;
    margin: 0 0 0.35rem;
    color: var(--qn-navy);
    letter-spacing: -0.02em;
}

body.qn-publisher-guest .qn-auth-card .qn-sub {
    color: var(--qn-navy-muted);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

body.qn-publisher-guest .qn-input-wrap {
    margin-bottom: 1.1rem;
}

body.qn-publisher-guest .qn-input-wrap label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--qn-navy);
}

body.qn-publisher-guest .qn-input-wrap input[type="email"],
body.qn-publisher-guest .qn-input-wrap input[type="password"] {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--qn-border);
    border-radius: var(--qn-radius-input);
    font-size: 1rem;
    font-family: inherit;
    color: var(--qn-navy);
    background: #fafaf8;
    transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

body.qn-publisher-guest .qn-input-wrap input::placeholder {
    color: #8896a8;
}

body.qn-publisher-guest .qn-input-wrap input:focus {
    outline: none;
    border-color: var(--qn-primary);
    background: var(--qn-white);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.18);
}

body.qn-publisher-guest .qn-input-wrap .invalid-feedback {
    color: #dc2626;
    font-size: 0.8125rem;
    margin-top: 0.35rem;
    display: block;
}

body.qn-publisher-guest .qn-input-wrap input.is-invalid {
    border-color: #dc2626;
}

body.qn-publisher-guest .qn-row-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1.15rem;
}

body.qn-publisher-guest .qn-check {
    font-size: 0.875rem;
    color: var(--qn-navy-muted);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    cursor: pointer;
}

body.qn-publisher-guest .qn-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--qn-primary);
}

body.qn-publisher-guest .qn-row-between a {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--qn-primary);
    text-decoration: none;
}

body.qn-publisher-guest .qn-row-between a:hover {
    text-decoration: underline;
    color: var(--qn-primary-deep);
}

body.qn-publisher-guest .qn-btn {
    display: block;
    width: 100%;
    padding: 0.8rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    color: #fff !important;
    background: var(--qn-primary);
    border: none;
    border-radius: var(--qn-radius-btn);
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.35);
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

body.qn-publisher-guest .qn-btn:hover {
    background: var(--qn-primary-deep);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

body.qn-publisher-guest .qn-btn:active {
    transform: scale(0.99);
}

body.qn-publisher-guest .qn-links {
    text-align: center;
    margin-top: 1.35rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--qn-border);
    font-size: 0.875rem;
    color: var(--qn-navy-muted);
}

body.qn-publisher-guest .qn-links a {
    color: var(--qn-primary);
    font-weight: 600;
    text-decoration: none;
}

body.qn-publisher-guest .qn-links a:hover {
    text-decoration: underline;
}

body.qn-publisher-guest .qn-req-list {
    color: var(--qn-navy-muted);
    font-size: 0.8125rem;
    line-height: 1.5;
    margin: 0 0 0.5rem;
}

body.qn-publisher-guest .qn-req-list ul {
    margin: 0.35rem 0 0;
    padding-left: 1.1rem;
}

/* =============================================================================
   Authenticated publisher app — colorful, modern “play” theme (gradients).
   Scoped to body.qn-publisher-app only; does not affect admin.
   ============================================================================= */

@keyframes qn-publisher-shimmer {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: 200% 50%;
    }
}

body.qn-publisher-app {
    font-family: "Inter", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    background-color: #f1f5f9;
}

/* Top bar — do not set position (AdminLTE layout-fixed uses position:fixed on .main-header) */
body.qn-publisher-app .main-header {
    border-bottom: 1px solid rgba(148, 163, 184, 0.35) !important;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}

body.qn-publisher-app .main-header .nav-link {
    color: var(--qn-navy);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.qn-publisher-app .main-header .nav-link:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.1));
    color: #4338ca;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.2);
}

/* Main canvas — same whitish vertical wash as sidebar */
body.qn-publisher-app .content-wrapper {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%);
}

body.qn-publisher-app .content-header {
    padding-top: 1.35rem;
    padding-bottom: 0.35rem;
}

body.qn-publisher-app .content-header h1 {
    font-weight: 800;
    font-size: 1.85rem;
    letter-spacing: -0.035em;
    line-height: 1.2;
    color: #1e1b4b;
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
    body.qn-publisher-app .content-header h1 {
        background: linear-gradient(105deg, #312e81 0%, #6366f1 30%, #a855f7 55%, #db2777 82%, #ea580c 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
        -webkit-text-fill-color: transparent;
    }
}

body.qn-publisher-app .content-header .text-muted {
    color: #5b6478 !important;
    font-size: 0.98rem;
    margin-top: 0.4rem;
    font-weight: 500;
}

body.qn-publisher-app .content-header .breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    padding: 0.45rem 0.95rem;
    margin-bottom: 0;
    border-radius: 14px;
    border: 2px solid rgba(99, 102, 241, 0.35);
    background: #fff !important;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.12);
}

body.qn-publisher-app .content {
    padding-top: 0.65rem;
}

/* Sidebar — whitish / light (do not set position; keep AdminLTE layout-fixed) */
body.qn-publisher-app .main-sidebar {
    background:
        linear-gradient(
            180deg,
            rgba(34, 211, 238, 0.55),
            rgba(129, 140, 248, 0.55),
            rgba(232, 121, 249, 0.45)
        ) left / 4px 100% no-repeat,
        linear-gradient(180deg, #ffffff 0%, #f8fafc 45%, #f1f5f9 100%) !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(148, 163, 184, 0.35);
}

body.qn-publisher-app .main-sidebar .brand-link.qn-sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 3.35rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    padding: 0.85rem 1rem 0.85rem 1rem;
    background: #fff;
}

body.qn-publisher-app .main-sidebar .qn-sidebar-brand-logo {
    height: auto;
    width: auto;
    max-height: 32px;
    max-width: 11rem;
    object-fit: contain;
    object-position: left center;
    filter: none;
}

body.qn-publisher-app.sidebar-mini.sidebar-collapse .main-sidebar .brand-link.qn-sidebar-brand {
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.qn-publisher-app.sidebar-mini.sidebar-collapse .main-sidebar .qn-sidebar-brand-logo {
    max-width: 10rem;
    max-height: 28px;
}

body.qn-publisher-app .main-sidebar .sidebar {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    box-sizing: border-box;
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item {
    margin-bottom: 0.2rem;
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link {
    color: #334155;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 0;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link .nav-icon {
    color: #64748b;
    transition: transform 0.2s ease, color 0.2s ease;
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link:hover {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(250, 245, 255, 0.95));
    color: #1e293b;
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.12);
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link:hover .nav-icon {
    transform: scale(1.08);
    color: #4f46e5;
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active {
    background: linear-gradient(135deg, #2563eb 0%, #6366f1 50%, #8b5cf6 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.28);
}

body.qn-publisher-app .sidebar-light-primary .nav-sidebar > .nav-item > .nav-link.active .nav-icon {
    color: #fff !important;
}

body.qn-publisher-app .sidebar-light-primary .nav-treeview {
    padding-bottom: 0.35rem;
    margin-left: 0;
    margin-right: 0;
}

body.qn-publisher-app .sidebar-light-primary .nav-treeview > .nav-item > .nav-link {
    border-radius: 10px;
    margin-left: 0.35rem;
    margin-right: 0.35rem;
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    color: #475569;
    transition: background 0.15s ease, color 0.15s ease;
}

body.qn-publisher-app .sidebar-light-primary .nav-treeview > .nav-item > .nav-link.active,
body.qn-publisher-app .sidebar-light-primary .nav-treeview > .nav-item > .nav-link.active:hover {
    background: linear-gradient(90deg, rgba(224, 231, 255, 0.95), rgba(237, 233, 254, 0.95)) !important;
    color: #4338ca !important;
    box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.25);
}

body.qn-publisher-app .sidebar-light-primary .nav-treeview > .nav-item > .nav-link.active .nav-icon {
    color: #4f46e5 !important;
}

body.qn-publisher-app .sidebar-light-primary .nav-treeview > .nav-item > .nav-link:hover {
    color: #1e293b;
    background: rgba(241, 245, 249, 0.9);
}

/* Dashboard tiles — punchy multi-stop gradients + playful hover */
body.qn-publisher-app .small-box {
    border-radius: 22px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 36px rgba(79, 70, 229, 0.15), 0 2px 8px rgba(0, 0, 0, 0.06);
}

body.qn-publisher-app .qn-publisher-dashboard-cards {
    margin-top: 0.45rem;
    padding-top: 0.35rem;
    padding-bottom: 1rem;
}

body.qn-publisher-app .qn-publisher-dashboard-cards > [class*="col-"] {
    margin-bottom: 1.1rem;
}

body.qn-publisher-app .qn-publisher-dashboard-cards .small-box {
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

body.qn-publisher-app .qn-publisher-dashboard-cards .small-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 48px rgba(124, 58, 237, 0.22), 0 8px 24px rgba(236, 72, 153, 0.14);
}

body.qn-publisher-app .small-box .inner {
    padding: 1.45rem 1.3rem 1.2rem;
    position: relative;
    z-index: 1;
}

body.qn-publisher-app .small-box .inner h3 {
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.035em;
    margin-bottom: 0.4rem;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.12);
}

body.qn-publisher-app .small-box .inner p {
    font-size: 0.97rem;
    line-height: 1.5;
    opacity: 0.96;
    font-weight: 500;
}

body.qn-publisher-app .small-box .icon {
    font-size: 3.75rem !important;
    opacity: 0.32;
    top: 0.75rem;
    right: 0.75rem;
    max-width: 42%;
    overflow: hidden;
    text-align: right;
    transition: transform 0.35s ease, opacity 0.25s ease;
}

body.qn-publisher-app .qn-publisher-dashboard-cards .small-box:hover .icon {
    transform: scale(1.08) rotate(-6deg);
    opacity: 0.42;
}

body.qn-publisher-app .small-box.bg-info {
    background: linear-gradient(135deg, #0e7490 0%, #14b8a6 35%, #22d3ee 70%, #6366f1 100%) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box.bg-info .icon {
    color: rgba(255, 255, 255, 0.45);
}

body.qn-publisher-app .small-box.bg-info .small-box-footer {
    background: linear-gradient(90deg, rgba(15, 118, 110, 0.65), rgba(79, 70, 229, 0.45)) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box.bg-success {
    background: linear-gradient(135deg, #047857 0%, #10b981 40%, #4ade80 75%, #fbbf24 100%) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box.bg-success .icon {
    color: rgba(255, 255, 255, 0.45);
}

body.qn-publisher-app .small-box.bg-success .small-box-footer {
    background: linear-gradient(90deg, rgba(5, 150, 105, 0.65), rgba(22, 163, 74, 0.5)) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box.bg-secondary {
    background: linear-gradient(135deg, #4c1d95 0%, #7c3aed 38%, #c026d3 72%, #f97316 100%) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box.bg-secondary .icon {
    color: rgba(255, 255, 255, 0.45);
}

body.qn-publisher-app .small-box.bg-secondary .small-box-footer {
    background: linear-gradient(90deg, rgba(76, 29, 149, 0.65), rgba(192, 38, 211, 0.45)) !important;
    color: #fff !important;
}

body.qn-publisher-app .small-box .small-box-footer {
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    padding: 0.8rem 1rem;
    transition: filter 0.2s ease, transform 0.2s ease;
}

body.qn-publisher-app .small-box .small-box-footer:hover {
    filter: brightness(1.12) saturate(1.1);
    color: #fff !important;
    transform: translateX(3px);
}

/* Forms & buttons — candy focus + gradient primary */
body.qn-publisher-app .form-control {
    border-radius: 14px;
    border: 1.5px solid rgba(99, 102, 241, 0.2);
    background: rgba(255, 255, 255, 0.92);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

body.qn-publisher-app .form-control:focus {
    border-color: transparent;
    background: #fff;
    box-shadow:
        0 0 0 3px rgba(99, 102, 241, 0.25),
        0 0 0 6px rgba(236, 72, 153, 0.12);
}

body.qn-publisher-app .btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #db2777 100%);
    border: none;
    border-radius: 14px;
    font-weight: 700;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-shadow: 0 6px 20px rgba(124, 58, 237, 0.35);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.qn-publisher-app .btn-primary:hover,
body.qn-publisher-app .btn-primary:focus {
    background: linear-gradient(135deg, #1d4ed8 0%, #6d28d9 45%, #be185d 100%);
    filter: saturate(1.08);
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(219, 39, 119, 0.4);
}

body.qn-publisher-app .btn-primary:not(:disabled):not(.disabled):active,
body.qn-publisher-app .btn-primary:not(:disabled):not(.disabled).active {
    transform: translateY(0);
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.35);
}

body.qn-publisher-app .btn-secondary,
body.qn-publisher-app .btn-default {
    border-radius: 14px;
    font-weight: 600;
    border: 1.5px solid rgba(99, 102, 241, 0.35);
    background: linear-gradient(180deg, #fff, #f5f3ff);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

body.qn-publisher-app .btn-secondary:hover,
body.qn-publisher-app .btn-default:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.15);
}

/* Reports: "Select Metrics" should match metric summary chips (.badge-secondary), not the light .btn-secondary skin */
body.qn-publisher-app #select-metrics-btn.btn-secondary {
    background: #6c757d;
    background-image: none;
    border: 1px solid #6c757d;
    color: #fff;
}

body.qn-publisher-app #select-metrics-btn.btn-secondary:hover,
body.qn-publisher-app #select-metrics-btn.btn-secondary:focus {
    background: #5a6268;
    border-color: #545b62;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body.qn-publisher-app #select-metrics-btn.btn-secondary:not(:disabled):not(.disabled):active,
body.qn-publisher-app #select-metrics-btn.btn-secondary:not(:disabled):not(.disabled).active {
    background: #545b62;
    border-color: #4e555b;
    color: #fff;
}

/* Reports: dimension + metrics modal Cancel — same gray as Select Metrics / chips */
body.qn-publisher-app #dimensions-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary,
body.qn-publisher-app #metrics-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary {
    background: #6c757d;
    background-image: none;
    border: 1px solid #6c757d;
    color: #fff;
}

body.qn-publisher-app #dimensions-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:hover,
body.qn-publisher-app #dimensions-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:focus,
body.qn-publisher-app #metrics-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:hover,
body.qn-publisher-app #metrics-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:focus {
    background: #5a6268;
    border-color: #545b62;
    color: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

body.qn-publisher-app #dimensions-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:not(:disabled):not(.disabled):active,
body.qn-publisher-app #metrics-modal .modal-footer .btn-publisher-muted-cancel.btn-secondary:not(:disabled):not(.disabled):active {
    background: #545b62;
    border-color: #4e555b;
    color: #fff;
}

body.qn-publisher-app .card {
    border-radius: 20px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    overflow: visible;
    background: linear-gradient(145deg, #ffffff 0%, #fafbff 55%, #fff7ed 100%);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1), 0 2px 10px rgba(0, 0, 0, 0.04);
    position: relative;
}

body.qn-publisher-app .card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 4px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    background: linear-gradient(90deg, var(--qn-play-cyan), var(--qn-play-indigo), var(--qn-play-fuchsia), var(--qn-play-amber));
    background-size: 200% 100%;
    animation: qn-publisher-shimmer 9s linear infinite;
    opacity: 0.95;
    pointer-events: none;
    z-index: 1;
}

body.qn-publisher-app .card-header {
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    font-weight: 700;
    color: #312e81;
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.06), rgba(236, 72, 153, 0.05));
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    position: relative;
    z-index: 2;
}

body.qn-publisher-app .card-body {
    position: relative;
    z-index: 2;
}

body.qn-publisher-app .content .breadcrumb,
body.qn-publisher-app .card .breadcrumb {
    background: transparent;
    border: none;
    box-shadow: none;
    padding-left: 0;
}

body.qn-publisher-app .breadcrumb-item.active {
    color: #6366f1;
    font-weight: 600;
}

body.qn-publisher-app .dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: 0 16px 48px rgba(79, 70, 229, 0.18), 0 4px 16px rgba(236, 72, 153, 0.1);
    overflow: visible;
}

body.qn-publisher-app .dropdown-item {
    transition: background 0.15s ease, padding-left 0.15s ease;
}

body.qn-publisher-app .dropdown-item:hover {
    background: linear-gradient(90deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.08));
    padding-left: 1.1rem;
}

body.qn-publisher-app .table thead th {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1), rgba(236, 72, 153, 0.06));
    color: #312e81;
    font-weight: 700;
    border-bottom: 3px solid #818cf8;
    border-top: none;
}

body.qn-publisher-app .badge-primary,
body.qn-publisher-app .badge.bg-primary {
    background: linear-gradient(135deg, #4f46e5, #db2777) !important;
}

@media (prefers-reduced-motion: reduce) {
    body.qn-publisher-app .card::before {
        animation: none;
    }

    body.qn-publisher-app .qn-publisher-dashboard-cards .small-box,
    body.qn-publisher-app .qn-publisher-dashboard-cards .small-box:hover {
        transform: none;
    }
}

/* Campaign form — prominent validation (postback vs URL parameters) */
body.qn-publisher-app .qn-campaign-validation-alert {
    font-size: 1rem;
    line-height: 1.55;
    border-left: 5px solid #dc3545;
    border-radius: 12px;
}

body.qn-publisher-app .qn-campaign-validation-alert__icon {
    color: #dc3545;
    font-size: 1.75rem;
    line-height: 1;
}

body.qn-publisher-app .qn-campaign-validation-alert__title {
    font-size: 1.1rem;
    color: #721c24;
}

body.qn-publisher-app .qn-campaign-validation-alert__body {
    font-size: 1.05rem;
    color: #491217;
}

body.qn-publisher-app .qn-campaign-utm-hint {
    font-size: 0.95rem;
    line-height: 1.45;
    border-radius: 10px;
}

body.qn-publisher-app .qn-field-error-feedback {
    font-size: 0.95rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

/* Bank details page */
body.qn-publisher-app .qn-bank-details-card .card-header {
    padding: 1.15rem 1.35rem;
    align-items: flex-start !important;
}

body.qn-publisher-app .qn-bank-details-card__intro {
    flex: 1;
    min-width: 0;
}

body.qn-publisher-app .qn-bank-details-card__heading {
    flex: 1;
    min-width: 0;
}

body.qn-publisher-app .qn-bank-details-card .card-title {
    display: block;
    float: none;
    width: 100%;
    line-height: 1.3;
    margin-right: 0;
}

body.qn-publisher-app .qn-bank-details-card__subtitle {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #64748b;
    max-width: 36rem;
}

body.qn-publisher-app .qn-bank-details-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(34, 211, 238, 0.2));
    color: #4f46e5;
    font-size: 1.25rem;
    flex-shrink: 0;
}

body.qn-publisher-app .qn-bank-status-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.45rem 0.75rem;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

body.qn-publisher-app .qn-bank-mode-badge {
    font-size: 0.85rem;
    font-weight: 700;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
}

body.qn-publisher-app .qn-bank-field {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    height: 100%;
    padding: 1rem 1.1rem;
    border-radius: 14px;
    border: 1px solid rgba(99, 102, 241, 0.12);
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

body.qn-publisher-app .qn-bank-field:hover {
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.1);
}

body.qn-publisher-app .qn-bank-field__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(236, 72, 153, 0.08));
    color: #6366f1;
    flex-shrink: 0;
}

body.qn-publisher-app .qn-bank-field__body {
    min-width: 0;
    flex: 1;
}

body.qn-publisher-app .qn-bank-field__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    margin-bottom: 0.25rem;
}

body.qn-publisher-app .qn-bank-field__value {
    display: block;
    font-size: 0.98rem;
    font-weight: 600;
    color: #1e293b;
    word-break: break-word;
}

body.qn-publisher-app .qn-bank-empty {
    border-radius: 16px;
    border: 1px dashed rgba(99, 102, 241, 0.35);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.04), rgba(255, 255, 255, 0.6));
}

body.qn-publisher-app .qn-bank-empty__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    font-size: 1.75rem;
    color: #6366f1;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(34, 211, 238, 0.15));
}

body.qn-publisher-app .qn-bank-divider {
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    margin: 1.25rem 0 1.5rem;
}

body.qn-publisher-app .qn-bank-form-section {
    margin-top: 0.5rem;
    padding: 1.25rem;
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(99, 102, 241, 0.1);
}

body.qn-publisher-app .qn-bank-form-section__title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6366f1;
    margin-bottom: 1rem;
}

body.qn-publisher-app .qn-bank-form .form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
}

@media (max-width: 767.98px) {
    body.qn-publisher-app .qn-bank-details-card .card-header {
        flex-direction: column;
        align-items: flex-start !important;
    }
}

/* —— Support & FAQ (publisher.resources) —— */

body.qn-publisher-app .qn-support-faq-page .qn-faq-accordion {
    overflow: hidden;
}

/* Nested accordion rows: strip global publisher card chrome */
body.qn-publisher-app .qn-support-faq-page .qn-faq-item.card {
    box-shadow: none;
    background: transparent;
    border: none;
    border-radius: 0;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item.card::before {
    display: none;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item .qn-faq-item-header.card-header {
    border-radius: 0;
    background: var(--qn-white);
    border-bottom: none;
    font-weight: inherit;
    color: inherit;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item .card-body.qn-faq-answer {
    border-radius: 0;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item {
    border-bottom: 1px solid var(--qn-border);
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item:last-child {
    border-bottom: none;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-item-header {
    padding: 0;
    background: var(--qn-white);
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--qn-navy);
    text-align: left;
    text-decoration: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
    white-space: normal;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-toggle:hover,
body.qn-publisher-app .qn-support-faq-page .qn-faq-toggle:focus {
    text-decoration: none;
    color: var(--qn-primary-deep);
    background: rgba(37, 99, 235, 0.06);
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-toggle:focus {
    box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.22);
    outline: none;
    position: relative;
    z-index: 1;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-q-text {
    flex: 1;
    line-height: 1.45;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-chevron {
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--qn-navy-muted);
    transition: transform 0.2s ease;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-toggle.collapsed .qn-faq-chevron {
    transform: rotate(-90deg);
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-answer {
    padding: 1rem 1.25rem 1.25rem;
    background: rgba(248, 250, 252, 0.92);
    font-size: 0.95rem;
    line-height: 1.55;
    border-top: 1px solid rgba(22, 32, 50, 0.07);
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-answer p:last-child,
body.qn-publisher-app .qn-support-faq-page .qn-faq-answer ul:last-child,
body.qn-publisher-app .qn-support-faq-page .qn-faq-answer pre:last-child {
    margin-bottom: 0;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-answer ul {
    padding-left: 1.25rem;
    margin-bottom: 0.5rem;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-answer code {
    font-size: 0.9em;
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(22, 32, 50, 0.06);
    color: #1e3a5f;
}

body.qn-publisher-app .qn-support-faq-page .qn-faq-code-block {
    font-size: 0.8125rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    margin-bottom: 0;
}

body.qn-publisher-app .qn-support-faq-page .qn-support-terms-card .qn-support-terms-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(37, 99, 235, 0.12));
    color: var(--qn-primary-deep);
}

body.qn-publisher-app .qn-support-faq-page .qn-legal-section-label {
    letter-spacing: 0.05em;
    font-size: 0.72rem;
}
