/* ==========================================================
   QuoteWing — Core Design System
   ========================================================== */

:root {
    /* Brand */
    --qp-ink: #172033;
    --qp-ink-soft: #34405a;
    --qp-brand: #5b4ce6;
    --qp-brand-deep: #4638c8;
    --qp-brand-soft: #eeecff;
    --qp-accent: #7c6ff2;

    /* Surfaces */
    --qp-page: #f7f8fc;
    --qp-surface: #ffffff;
    --qp-surface-soft: #f1f3f9;

    /* Text */
    --qp-text: #172033;
    --qp-text-muted: #697386;
    --qp-text-light: #ffffff;

    /* Borders */
    --qp-border: #e3e7ef;
    --qp-border-strong: #ccd3df;

    /* Feedback */
    --qp-success: #16845b;
    --qp-warning: #a66512;
    --qp-danger: #c43d4b;

    /* Shape */
    --qp-radius-sm: 10px;
    --qp-radius-md: 16px;
    --qp-radius-lg: 24px;

    /* Shadows */
    --qp-shadow-sm: 0 4px 14px rgba(23, 32, 51, 0.06);
    --qp-shadow-md: 0 14px 40px rgba(23, 32, 51, 0.10);

    /* Layout */
    --qp-sidebar-width: 252px;
    --qp-content-max: 1440px;

    /* Motion */
    --qp-transition: 180ms ease;
}


/* ==========================================================
   Reset
   ========================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--qp-page);
    color: var(--qp-text);
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

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

a {
    color: var(--qp-brand);
    text-decoration: none;
}

a:hover {
    color: var(--qp-brand-deep);
}

img,
svg {
    display: block;
    max-width: 100%;
}


/* ==========================================================
   Typography
   ========================================================== */

.qp-eyebrow {
    margin: 0 0 8px;
    color: var(--qp-brand);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.qp-title {
    margin: 0;
    color: var(--qp-ink);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 760;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.qp-subtitle {
    margin: 14px 0 0;
    color: var(--qp-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}


/* ==========================================================
   Buttons
   ========================================================== */

.qp-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;

    border: 1px solid transparent;
    border-radius: var(--qp-radius-sm);
    padding: 10px 18px;

    cursor: pointer;

    font-weight: 700;
    line-height: 1;

    transition:
        background-color var(--qp-transition),
        border-color var(--qp-transition),
        color var(--qp-transition),
        transform var(--qp-transition),
        box-shadow var(--qp-transition);
}

.qp-button:hover {
    transform: translateY(-1px);
}

.qp-button:active {
    transform: translateY(0);
}

.qp-button--primary {
    background: var(--qp-brand);
    color: var(--qp-text-light);
    box-shadow: 0 8px 20px rgba(91, 76, 230, 0.22);
}

.qp-button--primary:hover {
    background: var(--qp-brand-deep);
    color: var(--qp-text-light);
}

.qp-button--secondary {
    border-color: var(--qp-border);
    background: var(--qp-surface);
    color: var(--qp-ink);
}

.qp-button--secondary:hover {
    border-color: var(--qp-border-strong);
    background: var(--qp-surface-soft);
    color: var(--qp-ink);
}


/* ==========================================================
   Forms
   ========================================================== */

.qp-field {
    display: grid;
    gap: 7px;
}

.qp-label {
    color: var(--qp-ink-soft);
    font-size: 0.875rem;
    font-weight: 700;
}

.qp-input,
.qp-select,
.qp-textarea {
    width: 100%;
    border: 1px solid var(--qp-border-strong);
    border-radius: var(--qp-radius-sm);
    outline: none;
    background: var(--qp-surface);
    color: var(--qp-text);

    transition:
        border-color var(--qp-transition),
        box-shadow var(--qp-transition);
}

.qp-input,
.qp-select {
    min-height: 48px;
    padding: 0 14px;
}

.qp-textarea {
    min-height: 120px;
    resize: vertical;
    padding: 12px 14px;
}

.qp-input:focus,
.qp-select:focus,
.qp-textarea:focus {
    border-color: var(--qp-brand);
    box-shadow: 0 0 0 4px rgba(91, 76, 230, 0.11);
}


/* ==========================================================
   Cards
   ========================================================== */

.qp-card {
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius-md);
    background: var(--qp-surface);
    box-shadow: var(--qp-shadow-sm);
}


/* ==========================================================
   Messages
   ========================================================== */

.qp-message {
    margin: 0;
    border: 1px solid #f0cbd0;
    border-radius: var(--qp-radius-sm);
    padding: 11px 13px;
    background: #fff5f6;
    color: var(--qp-danger);
    font-size: 0.875rem;
}


/* ==========================================================
   Accessibility
   ========================================================== */

:focus-visible {
    outline: 3px solid rgba(91, 76, 230, 0.28);
    outline-offset: 3px;
}

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


/* ==========================================================
   Authentication
   ========================================================== */

.qp-auth-page {
    background: var(--qp-surface);
}

.qp-auth {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(360px, 0.9fr) minmax(480px, 1.1fr);
}

.qp-auth__brand {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 85% 18%,
            rgba(124, 111, 242, 0.32),
            transparent 28%
        ),
        radial-gradient(
            circle at 10% 88%,
            rgba(124, 111, 242, 0.18),
            transparent 32%
        ),
        var(--qp-ink);
    color: var(--qp-text-light);
}

.qp-auth__brand::after {
    content: "";
    position: absolute;
    right: -110px;
    bottom: -120px;
    width: 340px;
    height: 340px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 50%;
}

.qp-auth__brand-inner {
    position: relative;
    z-index: 1;
    display: flex;
    width: min(100%, 620px);
    min-height: 100%;
    flex-direction: column;
    margin-left: auto;
    padding: 46px clamp(36px, 6vw, 82px);
}

.qp-brandmark {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 11px;
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.qp-brandmark:hover {
    color: #ffffff;
}

.qp-brandmark__logo {
    display: block;
    width: 48px;
    height: 34px;
    flex: 0 0 auto;
    object-fit: contain;
}

.qp-brandmark__word {
    color: inherit;
    font: inherit;
    letter-spacing: inherit;
}

.qp-auth__story {
    max-width: 500px;
    margin: auto 0;
    padding: 70px 0;
}

.qp-auth__story .qp-eyebrow {
    color: #aaa2ff;
}

.qp-auth__headline {
    max-width: 520px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.5rem, 4.2vw, 4.7rem);
    font-weight: 780;
    letter-spacing: -0.055em;
    line-height: 0.98;
}

.qp-auth__headline span {
    display: block;
    color: #aaa2ff;
}

.qp-auth__description {
    max-width: 470px;
    margin: 24px 0 0;
    color: #c6cbd7;
    font-size: 1rem;
    line-height: 1.75;
}

.qp-auth__features {
    display: grid;
    gap: 14px;
    margin-top: 34px;
}

.qp-auth__feature {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #e7e9ef;
    font-size: 0.94rem;
}

.qp-auth__check {
    display: grid;
    width: 25px;
    height: 25px;
    flex: 0 0 25px;
    place-items: center;
    border: 1px solid rgba(170, 162, 255, 0.35);
    border-radius: 50%;
    background: rgba(91, 76, 230, 0.16);
    color: #c8c3ff;
    font-size: 0.75rem;
    font-weight: 900;
}

.qp-auth__brand-note {
    margin: 0;
    color: #8992a5;
    font-size: 0.8rem;
}

.qp-auth__form-side {
    display: grid;
    place-items: center;
    padding: 48px clamp(28px, 7vw, 100px);
    background: var(--qp-surface);
}

.qp-auth__form-wrap {
    width: min(100%, 440px);
}

.qp-auth__mobile-brand {
    display: none;
}

.qp-auth__heading {
    margin-bottom: 32px;
}

.qp-auth__heading h2 {
    margin: 0;
    color: var(--qp-ink);
    font-size: clamp(1.8rem, 3vw, 2.35rem);
    font-weight: 760;
    letter-spacing: -0.04em;
    line-height: 1.1;
}

.qp-auth__heading > p:last-child {
    margin: 12px 0 0;
    color: var(--qp-text-muted);
}

.qp-message-list {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
}

.qp-auth-form {
    display: grid;
    gap: 19px;
}

.qp-button--full {
    width: 100%;
    margin-top: 5px;
}

.qp-auth__switch {
    margin: 26px 0 0;
    color: var(--qp-text-muted);
    text-align: center;
    font-size: 0.9rem;
}

.qp-auth__switch a {
    margin-left: 3px;
    font-weight: 750;
}


/* ==========================================================
   Authentication — Responsive
   ========================================================== */

@media (max-width: 900px) {
    .qp-auth {
        grid-template-columns: 1fr;
    }

    .qp-auth__brand {
        display: none;
    }

    .qp-auth__form-side {
        min-height: 100vh;
        padding: 38px 24px;
    }

    .qp-auth__mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 64px;
        color: var(--qp-ink);
        font-weight: 800;
    }
}

@media (max-width: 520px) {
    .qp-auth__form-side {
        align-items: start;
        padding: 28px 20px 40px;
    }

    .qp-auth__mobile-brand {
        margin-bottom: 48px;
    }

    .qp-auth__heading {
        margin-bottom: 26px;
    }
}


/* ==========================================================
   Authentication — Visual refinement
   ========================================================== */

@media (min-width: 901px) {
    .qp-auth {
        grid-template-columns: minmax(400px, 0.88fr) minmax(520px, 1.12fr);
    }

    .qp-auth__headline {
        max-width: 500px;
        font-size: clamp(2.7rem, 3.7vw, 4.15rem);
        line-height: 1.01;
    }

    .qp-auth__form-wrap {
        width: min(100%, 470px);
    }
}


/* ==========================================================
   Language switcher
   ========================================================== */

.qp-auth__topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qp-language {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.qp-language form {
    margin: 0;
}

.qp-language__option {
    border: 0;
    padding: 4px 2px;
    background: transparent;
    color: #9ca5b7;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    transition: color var(--qp-transition);
}

.qp-language__option:hover,
.qp-language__option.is-active {
    color: #ffffff;
}

.qp-language__divider {
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.75rem;
}

.qp-auth__mobile-topbar {
    display: none;
}

@media (max-width: 900px) {
    .qp-auth__mobile-topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        margin-bottom: 64px;
    }

    .qp-auth__mobile-topbar .qp-auth__mobile-brand {
        display: flex;
        margin-bottom: 0;
    }

    .qp-auth__mobile-topbar .qp-language__option {
        color: var(--qp-text-muted);
    }

    .qp-auth__mobile-topbar .qp-language__option:hover,
    .qp-auth__mobile-topbar .qp-language__option.is-active {
        color: var(--qp-brand);
    }

    .qp-auth__mobile-topbar .qp-language__divider {
        color: var(--qp-border-strong);
    }

    .qp-auth__form-wrap > .qp-auth__mobile-brand {
        display: none;
    }
}

@media (max-width: 520px) {
    .qp-auth__mobile-topbar {
        margin-bottom: 48px;
    }
}


/* ==========================================================
   Business onboarding
   ========================================================== */

.qp-onboarding-page {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 8% 0%,
            rgba(91, 76, 230, 0.08),
            transparent 32rem
        ),
        var(--qp-page);
}

.qp-onboarding {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.qp-onboarding__header {
    width: min(100% - 48px, 1180px);
    margin: 0 auto;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.qp-brandmark--dark {
    color: var(--qp-ink);
}

.qp-brandmark--dark:hover {
    color: var(--qp-brand);
}

.qp-onboarding__header .qp-language__option {
    color: var(--qp-text-muted);
}

.qp-onboarding__header .qp-language__option:hover,
.qp-onboarding__header .qp-language__option.is-active {
    color: var(--qp-brand);
}

.qp-onboarding__header .qp-language__divider {
    color: var(--qp-border-strong);
}

.qp-onboarding__content {
    width: min(100% - 48px, 1040px);
    margin: auto;
    padding: 56px 0 72px;
    display: grid;
    grid-template-columns: minmax(0, 0.88fr) minmax(420px, 1fr);
    gap: 88px;
    align-items: center;
}

.qp-onboarding__intro {
    max-width: 450px;
}

.qp-onboarding__intro .qp-eyebrow {
    margin-bottom: 18px;
    color: var(--qp-brand);
}

.qp-onboarding__intro h1 {
    margin: 0;
    max-width: 440px;
    color: var(--qp-ink);
    font-size: clamp(2.7rem, 4.5vw, 4.5rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.qp-onboarding__intro > p:last-child {
    margin: 26px 0 0;
    max-width: 420px;
    color: var(--qp-text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
}

.qp-onboarding__card {
    padding: 36px;
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius-lg);
    background: var(--qp-surface);
    box-shadow: var(--qp-shadow-lg);
}

.qp-onboarding__step {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--qp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.qp-onboarding__step span:first-child {
    color: var(--qp-brand);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.qp-onboarding__step span:last-child {
    color: var(--qp-text-muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.qp-onboarding-form {
    display: grid;
    gap: 24px;
}

.qp-field__help {
    margin: 8px 0 0;
    color: var(--qp-text-muted);
    font-size: 0.8rem;
    line-height: 1.5;
}

.qp-onboarding__footer {
    width: min(100% - 48px, 1180px);
    margin: 0 auto;
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-top: 1px solid var(--qp-border);
    color: var(--qp-text-muted);
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .qp-onboarding__header {
        width: min(100% - 40px, 680px);
    }

    .qp-onboarding__content {
        width: min(100% - 40px, 620px);
        padding: 42px 0 64px;
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .qp-onboarding__intro {
        max-width: 560px;
    }

    .qp-onboarding__intro h1 {
        max-width: 560px;
        font-size: clamp(2.5rem, 9vw, 4rem);
    }

    .qp-onboarding__intro > p:last-child {
        max-width: 540px;
    }

    .qp-onboarding__footer {
        width: min(100% - 40px, 680px);
    }
}

@media (max-width: 520px) {
    .qp-onboarding__header {
        width: calc(100% - 32px);
        min-height: 76px;
    }

    .qp-onboarding__content {
        width: calc(100% - 32px);
        padding: 32px 0 48px;
        gap: 34px;
    }

    .qp-onboarding__intro h1 {
        font-size: 2.55rem;
    }

    .qp-onboarding__card {
        padding: 24px 20px;
        border-radius: var(--qp-radius-md);
    }

    .qp-onboarding__step {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .qp-onboarding__footer {
        width: calc(100% - 32px);
        padding: 20px 0;
        text-align: center;
    }
}


/* ==========================================================
   QuotePilot application workspace
   ========================================================== */

.qp-app-page {
    min-height: 100vh;
    background: var(--qp-page);
}

.qp-app {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
}


/* Sidebar */

.qp-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    padding: 30px 22px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: var(--qp-ink);
    color: #fff;
}

.qp-brandmark--sidebar {
    color: #fff;
}

.qp-sidebar__nav {
    margin-top: 54px;
    display: grid;
    gap: 8px;
}

.qp-sidebar__link {
    min-height: 46px;
    padding: 0 14px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: #aeb7ca;
    font-size: 0.9rem;
    font-weight: 650;
    text-decoration: none;
}

.qp-sidebar__link.is-active {
    background: rgba(124, 111, 242, 0.16);
    color: #fff;
}

.qp-sidebar__link.is-disabled {
    cursor: default;
    opacity: 0.7;
}

.qp-sidebar__icon {
    width: 22px;
    display: inline-flex;
    justify-content: center;
    color: #8e83f5;
    font-size: 1.05rem;
}

.qp-sidebar__bottom {
    display: grid;
    gap: 20px;
}

.qp-sidebar__business {
    padding: 18px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    gap: 6px;
}

.qp-sidebar__business-label {
    color: #818ca3;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.qp-sidebar__business strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.88rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qp-sidebar__logout {
    width: 100%;
    border: 0;
    padding: 10px 14px;
    background: transparent;
    color: #aeb7ca;
    cursor: pointer;
    text-align: left;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 650;
}

.qp-sidebar__logout:hover {
    color: #fff;
}



/* Mobile application navigation */

.qp-mobile-menu-toggle {
    display: none;
}

@media (max-width: 720px) {
    .qp-sidebar {
        position: relative;
        z-index: 50;
    }

    .qp-sidebar__top {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 18px;
    }

    .qp-mobile-menu-toggle {
        width: 42px;
        height: 42px;
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        border-radius: 11px;
        display: grid;
        align-content: center;
        gap: 4px;
        background: rgba(255, 255, 255, 0.06);
        cursor: pointer;
    }

    .qp-mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        border-radius: 999px;
        background: #ffffff;
        transition:
            transform var(--qp-transition),
            opacity var(--qp-transition);
    }

    .qp-mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .qp-mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
        opacity: 0;
    }

    .qp-mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .qp-sidebar__nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 18px;
        left: 18px;
        z-index: 60;
        margin-top: 0;
        padding: 10px;
        display: none;
        gap: 5px;
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 14px;
        background: var(--qp-ink);
        box-shadow: var(--qp-shadow-md);
    }

    .qp-sidebar__nav.is-open {
        display: grid;
    }

    .qp-sidebar__link {
        min-height: 48px;
    }
}

/* Dashboard workspace */

.qp-dashboard {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 42px 54px;
}

.qp-dashboard__topbar {
    min-height: 92px;
    border-bottom: 1px solid var(--qp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.qp-dashboard__section-label {
    margin: 0 0 3px;
    color: var(--qp-text-muted);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.qp-dashboard__topbar h1 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1.18rem;
    letter-spacing: -0.025em;
}

.qp-dashboard__topbar .qp-language__option {
    color: var(--qp-text-muted);
}

.qp-dashboard__topbar .qp-language__option:hover,
.qp-dashboard__topbar .qp-language__option.is-active {
    color: var(--qp-brand);
}

.qp-dashboard__topbar .qp-language__divider {
    color: var(--qp-border-strong);
}


/* Welcome */

.qp-dashboard__welcome {
    padding: 48px 0 36px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.qp-dashboard__welcome h2 {
    margin: 8px 0 10px;
    color: var(--qp-ink);
    font-size: clamp(2rem, 3.3vw, 3.25rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.qp-dashboard__welcome p:last-child {
    max-width: 620px;
    margin: 0;
    color: var(--qp-text-muted);
    line-height: 1.65;
}

.qp-dashboard__welcome .qp-button:disabled {
    opacity: 0.55;
    cursor: default;
}


/* Statistics */

.qp-dashboard__stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.qp-stat-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius-md);
    background: var(--qp-surface);
    box-shadow: var(--qp-shadow-sm);
}

.qp-stat-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--qp-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.qp-stat-card__mark {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-size: 0.74rem;
    font-weight: 850;
}

.qp-stat-card > strong {
    display: block;
    margin-top: 22px;
    color: var(--qp-ink);
    font-size: 2.25rem;
    line-height: 1;
    letter-spacing: -0.05em;
}

.qp-stat-card > p {
    margin: 7px 0 0;
    color: var(--qp-text-muted);
    font-size: 0.76rem;
}


/* Main dashboard cards */

.qp-dashboard__grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.75fr);
    gap: 20px;
}

.qp-dashboard-card {
    min-width: 0;
    border: 1px solid var(--qp-border);
    border-radius: var(--qp-radius-md);
    background: var(--qp-surface);
    box-shadow: var(--qp-shadow-sm);
}

.qp-dashboard-card__header {
    min-height: 82px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--qp-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qp-dashboard-card__eyebrow {
    margin: 0 0 5px;
    color: var(--qp-brand);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.1em;
}

.qp-dashboard-card__header h3 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1rem;
}


/* Empty quotes */

.qp-empty-state {
    min-height: 300px;
    padding: 42px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.qp-empty-state__symbol {
    width: 54px;
    height: 54px;
    margin-bottom: 18px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-weight: 850;
}

.qp-empty-state h4 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1rem;
}

.qp-empty-state p {
    max-width: 390px;
    margin: 9px 0 0;
    color: var(--qp-text-muted);
    font-size: 0.84rem;
    line-height: 1.6;
}


/* Quick actions */

.qp-quick-actions {
    padding: 10px 24px;
}

.qp-quick-action {
    padding: 20px 0;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 14px;
}

.qp-quick-action + .qp-quick-action {
    border-top: 1px solid var(--qp-border);
}

.qp-quick-action__number {
    color: var(--qp-brand);
    font-size: 0.67rem;
    font-weight: 850;
    letter-spacing: 0.06em;
}

.qp-quick-action strong {
    display: block;
    color: var(--qp-ink);
    font-size: 0.84rem;
}

.qp-quick-action p {
    margin: 5px 0 0;
    color: var(--qp-text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}


/* Tablet */

@media (max-width: 1050px) {
    .qp-app {
        grid-template-columns: 210px minmax(0, 1fr);
    }

    .qp-dashboard {
        padding-right: 28px;
        padding-left: 28px;
    }

    .qp-dashboard__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qp-dashboard__grid {
        grid-template-columns: 1fr;
    }
}


/* Mobile */

@media (max-width: 720px) {
    .qp-app {
        display: block;
    }

    .qp-sidebar {
        position: relative;
        z-index: 100;
        width: 100%;
        height: auto;
        padding: 18px 18px;
        flex-direction: row;
        align-items: center;
    }

    .qp-sidebar__nav,
    .qp-sidebar__business {
        display: none;
    }

    .qp-sidebar__bottom {
        display: block;
    }

    .qp-sidebar__logout {
        width: auto;
        padding: 8px;
    }

    .qp-dashboard {
        padding: 0 18px 40px;
    }

    .qp-dashboard__topbar {
        min-height: 76px;
    }

    .qp-dashboard__welcome {
        padding: 36px 0 28px;
        align-items: flex-start;
        flex-direction: column;
        gap: 24px;
    }

    .qp-dashboard__welcome h2 {
        font-size: 2.35rem;
    }

    .qp-dashboard__stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qp-stat-card {
        padding: 18px;
    }

    .qp-stat-card > strong {
        margin-top: 18px;
        font-size: 1.9rem;
    }
}

@media (max-width: 440px) {
    .qp-dashboard__stats {
        grid-template-columns: 1fr;
    }

    .qp-dashboard__topbar {
        align-items: flex-start;
        padding: 18px 0;
    }

    .qp-dashboard__welcome h2 {
        font-size: 2.05rem;
    }

    .qp-dashboard-card__header,
    .qp-quick-actions {
        padding-right: 18px;
        padding-left: 18px;
    }
}


/* =========================================================
   CUSTOMERS — FORM WORKSPACE
   ========================================================= */

.qp-customer-workspace {
    padding-bottom: 64px;
}

.qp-customer-form__back {
    margin: 8px 0 30px;
}

.qp-customer-form__back a {
    color: var(--qp-ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}

.qp-customer-form__back a:hover {
    color: var(--qp-brand);
}

.qp-customer-form__intro {
    max-width: 760px;
    margin-bottom: 30px;
}

.qp-customer-form__intro h2 {
    margin: 8px 0 10px;
    color: var(--qp-ink);
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.qp-customer-form__intro > p:last-child {
    max-width: 680px;
    margin: 0;
    color: var(--qp-ink-soft);
    line-height: 1.7;
}

.qp-customer-form {
    overflow: hidden;
    max-width: 1050px;
    border: 1px solid #e7e9f2;
    border-radius: 24px;
    background: #ffffff;
    box-shadow: var(--qp-shadow-soft);
}

.qp-customer-form__section {
    padding: 30px 34px 34px;
}

.qp-customer-form__section + .qp-customer-form__section {
    border-top: 1px solid #eceef5;
}

.qp-customer-form__section-heading {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 24px;
}

.qp-customer-form__section-heading > span {
    display: inline-grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-size: 0.72rem;
    font-weight: 800;
}

.qp-customer-form__section-heading h3 {
    margin: 0 0 4px;
    color: var(--qp-ink);
    font-size: 1rem;
}

.qp-customer-form__section-heading p {
    margin: 0;
    color: #778096;
    font-size: 0.86rem;
    line-height: 1.55;
}

.qp-form-grid {
    display: grid;
    gap: 20px;
}

.qp-form-grid--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qp-form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qp-form-grid--address {
    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(0, 1fr)
        minmax(120px, 0.7fr)
        minmax(0, 1fr);
}

.qp-field--full {
    grid-column: 1 / -1;
}

.qp-field {
    min-width: 0;
}

.qp-field label {
    display: block;
    margin-bottom: 8px;
    color: var(--qp-ink);
    font-size: 0.82rem;
    font-weight: 750;
}

.qp-field input,
.qp-field textarea,
.qp-field select {
    width: 100%;
    border: 1px solid #dfe3ed;
    border-radius: 12px;
    outline: none;
    background: #fbfcfe;
    color: var(--qp-ink);
    font: inherit;
    transition:
        border-color var(--qp-transition),
        box-shadow var(--qp-transition),
        background var(--qp-transition);
}

.qp-field input,
.qp-field select {
    min-height: 48px;
    padding: 0 14px;
}

.qp-field textarea {
    min-height: 118px;
    padding: 13px 14px;
    resize: vertical;
}

.qp-field input::placeholder,
.qp-field textarea::placeholder {
    color: #a4aabb;
}

.qp-field input:focus,
.qp-field textarea:focus,
.qp-field select:focus {
    border-color: var(--qp-brand);
    background: #ffffff;
    box-shadow: 0 0 0 4px var(--qp-brand-soft);
}

.qp-field__error {
    margin: 7px 0 0;
    color: #b42318;
    font-size: 0.78rem;
    line-height: 1.45;
}

.qp-form-alert {
    margin: 24px 34px 0;
    padding: 12px 14px;
    border: 1px solid #f2c8c4;
    border-radius: 12px;
    background: #fff7f6;
    color: #8f241c;
    font-size: 0.84rem;
}

.qp-customer-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 22px 34px;
    border-top: 1px solid #eceef5;
    background: #fafbfe;
}

.qp-customer-form__actions .qp-button {
    min-width: 142px;
    justify-content: center;
}


@media (max-width: 1050px) {
    .qp-form-grid--three {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qp-form-grid--address {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 720px) {
    .qp-customer-workspace {
        padding-bottom: 36px;
    }

    .qp-customer-form__back {
        margin-bottom: 24px;
    }

    .qp-customer-form {
        border-radius: 18px;
    }

    .qp-customer-form__section {
        padding: 24px 20px 26px;
    }

    .qp-form-grid--two,
    .qp-form-grid--three,
    .qp-form-grid--address {
        grid-template-columns: 1fr;
    }

    .qp-customer-form__actions {
        padding: 18px 20px;
    }
}


@media (max-width: 440px) {
    .qp-customer-form__section-heading {
        gap: 11px;
    }

    .qp-customer-form__actions {
        flex-direction: column-reverse;
    }

    .qp-customer-form__actions .qp-button {
        width: 100%;
    }
}


/* Customers — active dashboard entry point */

.qp-quick-action--link {
    color: inherit;
    text-decoration: none;
    border-radius: 12px;
    transition:
        background var(--qp-transition),
        transform var(--qp-transition);
}

.qp-quick-action--link:hover {
    background: var(--qp-brand-soft);
    transform: translateX(3px);
}

.qp-quick-action--link:focus-visible {
    outline: 3px solid var(--qp-brand-soft);
    outline-offset: 3px;
}


/* =========================================================
   CUSTOMERS — DIRECTORY
   ========================================================= */

.qp-customers-workspace {
    padding-bottom: 64px;
}

.qp-customers-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin: 38px 0 24px;
}

.qp-customers-hero > div {
    max-width: 720px;
}

.qp-customers-hero h2 {
    margin: 8px 0 10px;
    color: var(--qp-ink);
    font-size: clamp(1.8rem, 3vw, 2.55rem);
    line-height: 1.1;
    letter-spacing: -0.035em;
}

.qp-customers-hero p:last-child {
    margin: 0;
    color: var(--qp-ink-soft);
    line-height: 1.7;
}

.qp-customers-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    padding: 18px 22px;
    border: 1px solid #e7e9f2;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: var(--qp-shadow-soft);
}

.qp-customers-summary > div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.qp-customers-summary span {
    color: var(--qp-ink-soft);
    font-size: 0.84rem;
    font-weight: 700;
}

.qp-customers-summary strong {
    color: var(--qp-ink);
    font-size: 1.45rem;
}

.qp-customers-summary p {
    margin: 0;
    color: #778096;
    font-size: 0.84rem;
}

.qp-customer-directory {
    overflow: hidden;
    border: 1px solid #e7e9f2;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: var(--qp-shadow-soft);
}

.qp-customer-directory__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 26px;
    border-bottom: 1px solid #eceef5;
}

.qp-customer-directory__header h3 {
    margin: 5px 0 0;
    color: var(--qp-ink);
    font-size: 1.05rem;
}

.qp-customer-directory__count {
    display: inline-grid;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    place-items: center;
    border-radius: 10px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-size: 0.8rem;
    font-weight: 800;
}

.qp-customer-table-wrap {
    overflow-x: auto;
}

.qp-customer-table {
    width: 100%;
    border-collapse: collapse;
}

.qp-customer-table th,
.qp-customer-table td {
    padding: 17px 18px;
    border-bottom: 1px solid #eef0f5;
    text-align: left;
    vertical-align: middle;
}

.qp-customer-table th {
    background: #fafbfe;
    color: #778096;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qp-customer-table td {
    color: var(--qp-ink-soft);
    font-size: 0.86rem;
}

.qp-customer-table tbody tr:last-child td {
    border-bottom: 0;
}

.qp-customer-table tbody tr {
    transition: background var(--qp-transition);
}

.qp-customer-table tbody tr:hover {
    background: #fafaff;
}

.qp-customer-name {
    color: var(--qp-ink);
    font-weight: 800;
    text-decoration: none;
}

.qp-customer-name:hover {
    color: var(--qp-brand);
}

.qp-customer-contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.qp-customer-table__muted {
    color: #a4aabb;
}

.qp-customer-table__action {
    width: 56px;
    text-align: right !important;
}

.qp-customer-table__action a {
    display: inline-grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-weight: 800;
    text-decoration: none;
    transition:
        background var(--qp-transition),
        transform var(--qp-transition);
}

.qp-customer-table__action a:hover {
    transform: translateX(2px);
    background: #e4e0ff;
}

.qp-customers-empty {
    display: flex;
    min-height: 390px;
    padding: 54px 28px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    border: 1px solid #e7e9f2;
    border-radius: 20px;
    background: #ffffff;
    text-align: center;
    box-shadow: var(--qp-shadow-soft);
}

.qp-customers-empty__symbol {
    display: grid;
    width: 62px;
    height: 62px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 18px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-size: 1.15rem;
    font-weight: 850;
}

.qp-customers-empty h3 {
    margin: 7px 0 9px;
    color: var(--qp-ink);
    font-size: 1.3rem;
}

.qp-customers-empty > p:not(.qp-dashboard-card__eyebrow) {
    max-width: 510px;
    margin: 0 0 24px;
    color: #778096;
    line-height: 1.65;
}

.qp-visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}


@media (max-width: 820px) {
    .qp-customers-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .qp-customers-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}


@media (max-width: 720px) {
    .qp-customers-workspace {
        padding-bottom: 36px;
    }

    .qp-customer-directory {
        border-radius: 18px;
    }

    .qp-customer-table thead {
        display: none;
    }

    .qp-customer-table,
    .qp-customer-table tbody,
    .qp-customer-table tr,
    .qp-customer-table td {
        display: block;
        width: 100%;
    }

    .qp-customer-table tr {
        padding: 14px 18px;
        border-bottom: 1px solid #eceef5;
    }

    .qp-customer-table tbody tr:last-child {
        border-bottom: 0;
    }

    .qp-customer-table td {
        display: grid;
        grid-template-columns: 100px minmax(0, 1fr);
        gap: 14px;
        padding: 7px 0;
        border: 0;
    }

    .qp-customer-table td::before {
        content: attr(data-label);
        color: #8a92a6;
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
    }

    .qp-customer-table__action {
        display: block !important;
        width: 100%;
        padding-top: 12px !important;
        text-align: left !important;
    }

    .qp-customer-table__action::before {
        display: none;
    }
}


@media (max-width: 520px) {
    .qp-customers-hero .qp-button {
        width: 100%;
        justify-content: center;
    }

    .qp-customer-directory__header {
        padding: 20px;
    }

    .qp-customers-empty {
        min-height: 350px;
        padding: 42px 20px;
    }
}


/* ==========================================================
   CUSTOMERS — PROFILE
   ========================================================== */

.qp-customer-profile {
    min-width: 0;
}

.qp-customer-profile__back {
    margin-bottom: 18px;
}

.qp-customer-profile__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 30px 32px;
    margin-bottom: 24px;
    background:
        linear-gradient(
            135deg,
            rgba(91, 76, 230, 0.08),
            rgba(124, 111, 242, 0.03)
        ),
        #ffffff;
    border: 1px solid rgba(91, 76, 230, 0.12);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-customer-profile__identity {
    display: flex;
    align-items: center;
    gap: 20px;
    min-width: 0;
}

.qp-customer-profile__avatar {
    display: grid;
    place-items: center;
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    background: var(--qp-brand);
    color: #ffffff;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    box-shadow: 0 10px 24px rgba(91, 76, 230, 0.22);
}

.qp-customer-profile__eyebrow {
    display: block;
    margin-bottom: 7px;
    color: var(--qp-brand);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.13em;
}

.qp-customer-profile__identity h1 {
    margin: 0;
    color: var(--qp-ink);
    font-size: clamp(1.7rem, 3vw, 2.35rem);
    line-height: 1.08;
    letter-spacing: -0.04em;
}

.qp-customer-profile__identity p {
    margin: 8px 0 0;
    color: var(--qp-ink-soft);
    font-size: 1rem;
}

.qp-customer-profile__actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.qp-customer-profile__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.qp-profile-card {
    min-width: 0;
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 16px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-profile-card--wide {
    grid-column: 1 / -1;
}

.qp-profile-card__heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-profile-card__number {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand-deep);
    font-size: 0.75rem;
    font-weight: 800;
}

.qp-profile-card__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--qp-brand);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.qp-profile-card__heading h2 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1.05rem;
    line-height: 1.35;
}

.qp-profile-list {
    margin: 0;
}

.qp-profile-list__item {
    display: grid;
    grid-template-columns: minmax(90px, 0.38fr) minmax(0, 1fr);
    gap: 18px;
    padding: 16px 0;
    border-bottom: 1px solid rgba(23, 32, 51, 0.06);
}

.qp-profile-list__item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.qp-profile-list__item dt {
    color: var(--qp-ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
}

.qp-profile-list__item dd {
    min-width: 0;
    margin: 0;
    color: var(--qp-ink);
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.qp-profile-list__item a {
    color: var(--qp-brand-deep);
    text-decoration: none;
}

.qp-profile-list__item a:hover {
    text-decoration: underline;
}

.qp-profile-list__empty {
    color: #7b8498;
    font-weight: 500;
}

.qp-profile-address {
    padding-top: 16px;
    color: var(--qp-ink);
    font-size: 0.94rem;
    line-height: 1.7;
}

.qp-profile-address p {
    margin: 0 0 2px;
}

.qp-profile-notes {
    margin: 18px 0 0;
    color: var(--qp-ink-soft);
    font-size: 0.94rem;
    line-height: 1.75;
}

.qp-profile-card > .qp-profile-list__empty {
    display: block;
    margin: 18px 0 0;
    line-height: 1.65;
}

.qp-profile-activity {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding-top: 18px;
}

.qp-profile-activity > div {
    padding: 17px 18px;
    background: var(--qp-page);
    border: 1px solid rgba(23, 32, 51, 0.06);
    border-radius: 12px;
}

.qp-profile-activity span {
    display: block;
    margin-bottom: 6px;
    color: var(--qp-ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.qp-profile-activity strong {
    color: var(--qp-ink);
    font-size: 0.94rem;
}

@media (max-width: 900px) {
    .qp-customer-profile__hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .qp-customer-profile__actions {
        width: 100%;
    }

    .qp-customer-profile__actions .qp-button {
        width: 100%;
        justify-content: center;
    }

    .qp-customer-profile__grid {
        grid-template-columns: 1fr;
    }

    .qp-profile-card--wide {
        grid-column: auto;
    }
}

@media (max-width: 620px) {
    .qp-customer-profile__hero {
        padding: 22px;
    }

    .qp-customer-profile__identity {
        align-items: flex-start;
    }

    .qp-customer-profile__avatar {
        flex-basis: 56px;
        width: 56px;
        height: 56px;
        border-radius: 16px;
        font-size: 1.35rem;
    }

    .qp-profile-card {
        padding: 21px;
    }

    .qp-profile-list__item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .qp-profile-activity {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   SERVICES — CATALOG
   ========================================================= */

.qp-services-workspace {
    min-width: 0;
}

.qp-services-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 22px;
    padding: 30px 32px;
    background:
        radial-gradient(
            circle at 88% 20%,
            rgba(91, 76, 230, 0.12),
            transparent 32%
        ),
        #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-services-hero > div {
    max-width: 680px;
}

.qp-services-hero h2 {
    margin: 6px 0 9px;
    color: var(--qp-ink);
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.qp-services-hero p:last-child {
    max-width: 620px;
    margin: 0;
    color: var(--qp-ink-soft);
    font-size: 0.94rem;
    line-height: 1.7;
}

.qp-services-hero .qp-button {
    flex: 0 0 auto;
}


/* Summary */

.qp-services-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.qp-services-summary > div {
    position: relative;
    overflow: hidden;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 15px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-services-summary > div::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 72px;
    height: 72px;
    background: var(--qp-brand-soft);
    border-radius: 0 0 0 72px;
    opacity: 0.55;
}

.qp-services-summary span {
    position: relative;
    z-index: 1;
    display: block;
    margin-bottom: 7px;
    color: var(--qp-ink-soft);
    font-size: 0.78rem;
    font-weight: 700;
}

.qp-services-summary strong {
    position: relative;
    z-index: 1;
    color: var(--qp-ink);
    font-size: 1.65rem;
    line-height: 1;
}


/* Catalog */

.qp-service-catalog {
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-service-catalog__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
}

.qp-service-catalog__header h3 {
    margin: 4px 0 0;
    color: var(--qp-ink);
    font-size: 1.15rem;
}

.qp-service-catalog__count {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 11px;
    background: var(--qp-page);
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 999px;
    color: var(--qp-ink-soft);
    font-size: 0.76rem;
    font-weight: 700;
}

.qp-service-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.qp-service-card {
    display: flex;
    min-width: 0;
    min-height: 230px;
    flex-direction: column;
    padding: 20px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 15px;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.qp-service-card:hover {
    transform: translateY(-2px);
    border-color: rgba(91, 76, 230, 0.22);
    box-shadow: 0 14px 30px rgba(23, 32, 51, 0.08);
}

.qp-service-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.qp-service-card__status {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 28px;
    padding: 5px 10px;
    background: #eefbf5;
    border: 1px solid #d7f3e4;
    border-radius: 999px;
    color: #277a54;
    font-size: 0.7rem;
    font-weight: 800;
}

.qp-service-card__status::before {
    content: "";
    width: 6px;
    height: 6px;
    flex: 0 0 6px;
    background: currentColor;
    border-radius: 50%;
}

.qp-service-card__status.is-inactive {
    background: var(--qp-page);
    border-color: rgba(23, 32, 51, 0.08);
    color: #7b8498;
}

.qp-service-card__edit {
    color: var(--qp-brand-deep);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}

.qp-service-card__edit:hover {
    text-decoration: underline;
}

.qp-service-card__body {
    flex: 1;
}

.qp-service-card__body h3 {
    margin: 0 0 9px;
    color: var(--qp-ink);
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.qp-service-card__body p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: var(--qp-ink-soft);
    font-size: 0.84rem;
    line-height: 1.65;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.qp-service-card__body .qp-service-card__muted {
    color: #8a92a3;
    font-style: italic;
}

.qp-service-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-service-card__footer span {
    color: var(--qp-ink-soft);
    font-size: 0.72rem;
    font-weight: 700;
}

.qp-service-card__footer strong {
    color: var(--qp-ink);
    font-size: 1.12rem;
    letter-spacing: -0.015em;
}


/* Empty state */

.qp-services-empty {
    display: flex;
    min-height: 340px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 46px 28px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
    text-align: center;
}

.qp-services-empty__symbol {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 18px;
    background: var(--qp-brand-soft);
    border-radius: 15px;
    color: var(--qp-brand-deep);
    font-size: 1.6rem;
    font-weight: 500;
}

.qp-services-empty h3 {
    margin: 5px 0 8px;
    color: var(--qp-ink);
    font-size: 1.2rem;
}

.qp-services-empty > p:not(.qp-dashboard-card__eyebrow) {
    max-width: 480px;
    margin: 0 0 22px;
    color: var(--qp-ink-soft);
    font-size: 0.9rem;
    line-height: 1.65;
}


/* Services responsive */

@media (max-width: 1050px) {
    .qp-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .qp-services-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 25px;
    }

    .qp-services-hero .qp-button {
        width: 100%;
        justify-content: center;
    }

    .qp-services-summary {
        grid-template-columns: 1fr;
    }

    .qp-service-catalog {
        padding: 21px;
    }

    .qp-service-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .qp-services-hero {
        padding: 21px;
    }

    .qp-service-catalog__header {
        align-items: flex-start;
        flex-direction: column;
    }

    .qp-service-card {
        min-height: 0;
    }

    .qp-services-empty {
        min-height: 300px;
        padding: 36px 21px;
    }
}


/* =========================================================
   SERVICES — FORM
   ========================================================= */

.qp-service-form-workspace {
    min-width: 0;
}

.qp-service-form__back {
    margin-bottom: 18px;
}

.qp-service-form__back a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--qp-ink-soft);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

.qp-service-form__back a:hover {
    color: var(--qp-brand-deep);
}

.qp-service-form__intro {
    max-width: 760px;
    margin-bottom: 22px;
}

.qp-service-form__intro h2 {
    margin: 6px 0 8px;
    color: var(--qp-ink);
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.qp-service-form__intro > p:last-child {
    max-width: 650px;
    margin: 0;
    color: var(--qp-ink-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

.qp-service-form {
    max-width: 900px;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-service-form__section {
    padding: 28px 30px;
}

.qp-service-form__section + .qp-service-form__section {
    border-top: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-service-form__section-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.qp-service-form__section-heading > span {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    background: var(--qp-brand-soft);
    border-radius: 10px;
    color: var(--qp-brand-deep);
    font-size: 0.72rem;
    font-weight: 800;
}

.qp-service-form__section-heading h3 {
    margin: 0 0 4px;
    color: var(--qp-ink);
    font-size: 1rem;
}

.qp-service-form__section-heading p {
    margin: 0;
    color: var(--qp-ink-soft);
    font-size: 0.82rem;
    line-height: 1.55;
}


/* Price and availability */

.qp-service-form__settings {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(300px, 1.3fr);
    gap: 22px;
    align-items: stretch;
}

.qp-service-price-input {
    position: relative;
}

.qp-service-price-input > span {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--qp-ink-soft);
    font-size: 0.9rem;
    font-weight: 800;
    pointer-events: none;
}

.qp-service-price-input input {
    width: 100%;
    padding-left: 31px;
}

.qp-service-price-field .qp-field__help {
    margin: 8px 0 0;
    color: #7b8498;
    font-size: 0.75rem;
    line-height: 1.5;
}

.qp-service-availability {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    padding: 18px 20px;
    background: var(--qp-page);
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 13px;
}

.qp-service-availability > div {
    min-width: 0;
}

.qp-service-availability strong {
    display: block;
    margin-bottom: 4px;
    color: var(--qp-ink);
    font-size: 0.88rem;
}

.qp-service-availability p {
    max-width: 360px;
    margin: 0;
    color: var(--qp-ink-soft);
    font-size: 0.76rem;
    line-height: 1.5;
}


/* Active switch */

.qp-service-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.qp-service-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.qp-service-toggle__track {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 24px;
    background: #c9ced8;
    border-radius: 999px;
    transition: background 160ms ease;
}

.qp-service-toggle__track span {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(23, 32, 51, 0.2);
    transition: transform 160ms ease;
}

.qp-service-toggle input:checked + .qp-service-toggle__track {
    background: var(--qp-brand);
}

.qp-service-toggle input:checked + .qp-service-toggle__track span {
    transform: translateX(18px);
}

.qp-service-toggle input:focus-visible + .qp-service-toggle__track {
    outline: 3px solid rgba(91, 76, 230, 0.2);
    outline-offset: 2px;
}

.qp-service-toggle__label {
    color: var(--qp-ink);
    font-size: 0.78rem;
    font-weight: 800;
}


/* Form actions */

.qp-service-form__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px 30px;
    background: #fafbfe;
    border-top: 1px solid rgba(23, 32, 51, 0.07);
}


/* Service form responsive */

@media (max-width: 720px) {
    .qp-service-form {
        max-width: none;
    }

    .qp-service-form__section {
        padding: 24px;
    }

    .qp-service-form__settings {
        grid-template-columns: 1fr;
    }

    .qp-service-availability {
        align-items: flex-start;
        flex-direction: column;
    }

    .qp-service-form__actions {
        padding: 18px 24px;
    }
}

@media (max-width: 520px) {
    .qp-service-form__section {
        padding: 21px;
    }

    .qp-service-form__section-heading {
        gap: 11px;
    }

    .qp-service-form__actions {
        flex-direction: column-reverse;
        padding: 18px 21px;
    }

    .qp-service-form__actions .qp-button {
        width: 100%;
        justify-content: center;
    }
}


/* ==========================================================
   QUOTES — DYNAMIC ITEMS
   ========================================================== */

#quote-items {
    display: grid;
    gap: 18px;
}

.qp-quote-item {
    padding: 22px;
    border: 1px solid var(--qp-border);
    border-radius: 16px;
    background: var(--qp-surface-soft);
}

.qp-quote-item__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.qp-quote-item__title {
    margin: 0;
    color: var(--qp-ink);
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qp-quote-item__remove {
    border: 0;
    padding: 4px 0;
    background: transparent;
    color: var(--qp-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.qp-quote-item__remove:hover {
    color: var(--qp-ink);
}

#add-quote-item {
    margin-top: 18px;
}

@media (max-width: 720px) {
    .qp-quote-item {
        padding: 18px;
    }

    .qp-quote-item__header {
        align-items: flex-start;
    }
}


/* ==========================================================
   QUOTES — LIST
   ========================================================== */

.qp-quotes-workspace {
    min-width: 0;
}

.qp-quotes-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 24px;
    padding: 30px;
    border: 1px solid var(--qp-border);
    border-radius: 20px;
    background: var(--qp-surface);
}

.qp-quotes-hero h2 {
    margin: 6px 0 8px;
}

.qp-quotes-hero p {
    max-width: 680px;
    margin-bottom: 0;
    color: var(--qp-text-muted);
}

.qp-quotes-panel {
    overflow: hidden;
    border: 1px solid var(--qp-border);
    border-radius: 20px;
    background: var(--qp-surface);
}

.qp-quotes-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border-bottom: 1px solid var(--qp-border);
}

.qp-quotes-panel__header h3 {
    margin: 4px 0 0;
}

.qp-quotes-panel__count {
    color: var(--qp-text-muted);
    font-size: 0.88rem;
    font-weight: 700;
}

.qp-quotes-list__head,
.qp-quote-row {
    display: grid;
    grid-template-columns:
        minmax(120px, 0.8fr)
        minmax(190px, 1.5fr)
        minmax(130px, 0.9fr)
        minmax(110px, 0.8fr)
        minmax(100px, 0.7fr);
    align-items: center;
    gap: 18px;
}

.qp-quotes-list__head {
    padding: 13px 26px;
    background: var(--qp-surface-soft);
    color: var(--qp-text-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qp-quote-row {
    padding: 20px 26px;
    border-top: 1px solid var(--qp-border);
}

.qp-quotes-list__head + .qp-quote-row {
    border-top: 0;
}

.qp-quote-row__number strong {
    color: var(--qp-ink);
}

.qp-quote-row__customer strong {
    font-weight: 700;
}

.qp-quote-row__total {
    text-align: right;
}

.qp-quote-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--qp-surface-soft);
    color: var(--qp-text-muted);
    font-size: 0.76rem;
    font-weight: 800;
}

.qp-quote-status--accepted {
    color: var(--qp-ink);
}

.qp-quote-status--rejected,
.qp-quote-status--expired {
    opacity: 0.72;
}

.qp-quote-row__mobile-label {
    display: none;
}

.qp-quotes-empty {
    padding: 64px 30px;
    border: 1px solid var(--qp-border);
    border-radius: 20px;
    background: var(--qp-surface);
    text-align: center;
}

.qp-quotes-empty__symbol {
    display: grid;
    width: 48px;
    height: 48px;
    margin: 0 auto 18px;
    place-items: center;
    border-radius: 14px;
    background: var(--qp-surface-soft);
    font-size: 1.4rem;
}

.qp-quotes-empty h3 {
    margin: 6px 0 8px;
}

.qp-quotes-empty > p:not(.qp-dashboard-card__eyebrow) {
    max-width: 540px;
    margin: 0 auto 24px;
    color: var(--qp-text-muted);
}

@media (max-width: 900px) {
    .qp-quotes-list__head {
        display: none;
    }

    .qp-quote-row {
        grid-template-columns: 1fr 1fr;
        gap: 18px 24px;
    }

    .qp-quote-row__mobile-label {
        display: block;
        margin-bottom: 4px;
        color: var(--qp-text-muted);
        font-size: 0.72rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    .qp-quote-row__total {
        text-align: left;
    }
}

@media (max-width: 720px) {
    .qp-quotes-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .qp-quotes-hero .qp-button {
        width: 100%;
    }

    .qp-quote-row {
        grid-template-columns: 1fr;
    }

    .qp-quotes-panel__header {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* =========================================================
   QUOTES — DETAIL
   ========================================================= */

.qp-quote-detail {
    min-width: 0;
}

.qp-quote-detail__back {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.qp-quote-detail__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}


/* Hero */

.qp-quote-detail__hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 18px;
    padding: 30px 32px;
    background:
        linear-gradient(
            135deg,
            rgba(91, 76, 230, 0.08),
            rgba(124, 111, 242, 0.025)
        ),
        #ffffff;
    border: 1px solid rgba(91, 76, 230, 0.12);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-quote-detail__eyebrow {
    display: block;
    margin-bottom: 6px;
    color: var(--qp-brand);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.qp-quote-detail__hero h1 {
    margin: 0;
    color: var(--qp-ink);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.qp-quote-detail__hero p {
    margin: 9px 0 0;
    color: var(--qp-ink-soft);
    font-size: 0.94rem;
}


/* Quote metadata */

.qp-quote-detail__meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.qp-quote-detail__meta article {
    min-width: 0;
    padding: 17px 19px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.07);
    border-radius: 14px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-quote-detail__meta span {
    display: block;
    margin-bottom: 6px;
    color: var(--qp-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    text-transform: uppercase;
}

.qp-quote-detail__meta strong {
    display: block;
    color: var(--qp-ink);
    font-size: 0.9rem;
    overflow-wrap: anywhere;
}


/* Main panels */

.qp-quote-detail__panel {
    min-width: 0;
    padding: 26px;
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.08);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-quote-detail__section-heading {
    padding-bottom: 20px;
    margin-bottom: 4px;
    border-bottom: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-quote-detail__section-heading > div {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.qp-quote-detail__section-number {
    display: grid;
    place-items: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand-deep);
    font-size: 0.75rem;
    font-weight: 800;
}

.qp-quote-detail__section-heading h2 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1.05rem;
    line-height: 1.35;
}


/* Items */

.qp-quote-items-table {
    min-width: 0;
    padding-top: 8px;
}

.qp-quote-items-table__head,
.qp-quote-items-table__row {
    display: grid;
    grid-template-columns:
        minmax(220px, 2fr)
        minmax(90px, 0.6fr)
        minmax(110px, 0.8fr)
        minmax(110px, 0.8fr);
    align-items: center;
    gap: 18px;
}

.qp-quote-items-table__head {
    padding: 12px 14px;
    color: var(--qp-text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qp-quote-items-table__head span:nth-child(n + 2) {
    text-align: right;
}

.qp-quote-items-table__row {
    padding: 18px 14px;
    border-top: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-quote-items-table__row > div:nth-child(n + 2) {
    text-align: right;
}

.qp-quote-items-table__row strong {
    color: var(--qp-ink);
}

.qp-quote-items-table__mobile-label {
    display: none;
}

.qp-quote-items-table__empty {
    padding: 28px 14px 18px;
    color: var(--qp-text-muted);
    text-align: center;
}


/* Notes + financial summary */

.qp-quote-detail__bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.55fr);
    align-items: start;
    gap: 20px;
    margin-top: 20px;
}

.qp-quote-detail__text-block {
    padding-top: 20px;
}

.qp-quote-detail__text-block + .qp-quote-detail__text-block {
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid rgba(23, 32, 51, 0.07);
}

.qp-quote-detail__text-block > span {
    display: block;
    margin-bottom: 7px;
    color: var(--qp-text-muted);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qp-quote-detail__text-block p {
    margin: 0;
    color: var(--qp-ink-soft);
    font-size: 0.92rem;
    line-height: 1.7;
}

.qp-quote-detail__empty {
    color: var(--qp-text-muted) !important;
}


/* Total card */

.qp-quote-summary {
    position: sticky;
    top: 24px;
    padding: 26px;
    background: var(--qp-ink);
    border-radius: 18px;
    box-shadow: var(--qp-shadow-sm);
}

.qp-quote-summary .qp-quote-detail__eyebrow {
    color: rgba(255, 255, 255, 0.62);
}

.qp-quote-summary h2 {
    margin: 0 0 22px;
    color: #ffffff;
    font-size: 1.25rem;
}

.qp-quote-summary dl {
    margin: 0;
}

.qp-quote-summary dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.qp-quote-summary dt,
.qp-quote-summary dd {
    margin: 0;
}

.qp-quote-summary dt {
    color: rgba(255, 255, 255, 0.66);
    font-size: 0.84rem;
}

.qp-quote-summary dd {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
}

.qp-quote-summary .qp-quote-summary__total {
    padding: 20px 0 0;
    border-bottom: 0;
}

.qp-quote-summary__total dt {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 800;
}

.qp-quote-summary__total dd {
    color: #ffffff;
    font-size: 1.55rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}


/* Responsive */

@media (max-width: 1000px) {
    .qp-quote-detail__meta {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .qp-quote-detail__bottom {
        grid-template-columns: 1fr;
    }

    .qp-quote-summary {
        position: static;
    }
}

@media (max-width: 760px) {
    .qp-quote-detail__back {
        align-items: stretch;
        flex-direction: column;
    }

    .qp-quote-detail__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .qp-quote-detail__actions .qp-button:first-child {
        grid-column: 1 / -1;
    }

    .qp-quote-detail__actions .qp-button {
        width: 100%;
    }

    .qp-quote-detail__hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 24px;
    }

    .qp-quote-detail__meta {
        grid-template-columns: 1fr;
    }

    .qp-quote-detail__panel,
    .qp-quote-summary {
        padding: 22px;
    }

    .qp-quote-items-table__head {
        display: none;
    }

    .qp-quote-items-table__row {
        grid-template-columns: 1fr 1fr;
        gap: 16px 20px;
        padding: 18px 4px;
    }

    .qp-quote-items-table__row > div:nth-child(n + 2) {
        text-align: left;
    }

    .qp-quote-items-table__mobile-label {
        display: block;
        margin-bottom: 4px;
        color: var(--qp-text-muted);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }
}

@media (max-width: 520px) {
    .qp-quote-items-table__row {
        grid-template-columns: 1fr;
    }
}


/* Quote list — full clickable row */

.qp-quote-row {
    position: relative;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.qp-quote-row:hover {
    background: rgba(91, 76, 230, 0.045);
}

.qp-quote-row:focus-visible {
    z-index: 1;
    outline: 2px solid var(--qp-brand);
    outline-offset: -2px;
}

.qp-quote-row__number-value {
    color: var(--qp-brand);
    font-weight: 800;
}

.qp-quote-row__arrow {
    position: absolute;
    top: 50%;
    right: 10px;
    color: var(--qp-text-muted);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1;
    opacity: 0.55;
    transform: translateY(-50%);
    transition:
        color 160ms ease,
        opacity 160ms ease,
        transform 160ms ease;
}

.qp-quote-row:hover .qp-quote-row__arrow {
    color: var(--qp-brand);
    opacity: 1;
    transform: translate(3px, -50%);
}

@media (max-width: 900px) {
    .qp-quote-row {
        padding-right: 42px;
    }

    .qp-quote-row__arrow {
        right: 16px;
    }
}


/* =========================================================
   DASHBOARD — RECENT QUOTES
   ========================================================= */

.qp-recent-quotes {
    padding: 0 24px;
}

.qp-recent-quote {
    position: relative;
    display: grid;
    grid-template-columns:
        minmax(150px, 1.5fr)
        minmax(105px, 0.8fr)
        minmax(90px, 0.7fr)
        minmax(90px, 0.7fr);
    align-items: center;
    gap: 16px;
    min-height: 72px;
    padding: 14px 28px 14px 0;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid var(--qp-border);
    transition: background-color 160ms ease;
}

.qp-recent-quote:last-child {
    border-bottom: 0;
}

.qp-recent-quote:hover {
    background: rgba(91, 76, 230, 0.045);
}

.qp-recent-quote:focus-visible {
    outline: 2px solid var(--qp-brand);
    outline-offset: -2px;
}

.qp-recent-quote__identity {
    min-width: 0;
}

.qp-recent-quote__identity strong,
.qp-recent-quote__identity span {
    display: block;
}

.qp-recent-quote__identity strong {
    color: var(--qp-brand);
    font-size: 0.84rem;
    font-weight: 800;
}

.qp-recent-quote__identity span {
    margin-top: 4px;
    overflow: hidden;
    color: var(--qp-ink);
    font-size: 0.8rem;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qp-recent-quote__date {
    color: var(--qp-text-muted);
    font-size: 0.78rem;
}

.qp-recent-quote__total {
    color: var(--qp-ink);
    font-size: 0.84rem;
    text-align: right;
}

.qp-recent-quote__arrow {
    position: absolute;
    top: 50%;
    right: 4px;
    color: var(--qp-text-muted);
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.5;
    transform: translateY(-50%);
    transition:
        color 160ms ease,
        opacity 160ms ease,
        transform 160ms ease;
}

.qp-recent-quote:hover .qp-recent-quote__arrow {
    color: var(--qp-brand);
    opacity: 1;
    transform: translate(3px, -50%);
}

@media (max-width: 720px) {
    .qp-recent-quotes {
        padding: 0 18px;
    }

    .qp-recent-quote {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px 16px;
        padding: 16px 28px 16px 0;
    }

    .qp-recent-quote__date {
        grid-column: 1;
    }

    .qp-recent-quote .qp-quote-status {
        grid-column: 2;
        grid-row: 1;
    }

    .qp-recent-quote__total {
        grid-column: 2;
        grid-row: 2;
    }
}

/* =========================================
   QUOTES — SEARCH
   ========================================= */

.qp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.qp-quote-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.15rem 1.75rem;
    border-bottom: 1px solid #e6e9f2;
}

.qp-quote-search__field {
    position: relative;
    flex: 1;
    min-width: 0;
}

.qp-quote-search__icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #737d93;
    font-size: 1.25rem;
    line-height: 1;
    pointer-events: none;
}

.qp-quote-search__input {
    box-sizing: border-box;
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 2.8rem;
    border: 1px solid #dfe3ee;
    border-radius: 12px;
    background: #ffffff;
    color: #172033;
    font: inherit;
    font-size: 0.95rem;
    outline: none;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.qp-quote-search__input::placeholder {
    color: #8992a6;
}

.qp-quote-search__input:focus {
    border-color: #6754e8;
    box-shadow: 0 0 0 3px rgba(103, 84, 232, 0.12);
}

.qp-quote-search__button,
.qp-quote-search__clear {
    box-sizing: border-box;
    min-height: 48px;
    padding-inline: 1.25rem;
    white-space: nowrap;
}

.qp-quote-search__clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #59647a;
    background: transparent;
    text-decoration: none;
}

.qp-quote-search-empty {
    padding: 3rem 1.75rem;
    text-align: center;
}

.qp-quote-search-empty__symbol {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 1rem;
    place-items: center;
    border-radius: 14px;
    background: #f1efff;
    color: #5e4be7;
    font-weight: 800;
}

.qp-quote-search-empty h4 {
    margin: 0 0 0.5rem;
}

.qp-quote-search-empty p {
    margin: 0 auto 1.25rem;
    color: #737d93;
}

@media (max-width: 640px) {
    .qp-quote-search {
        align-items: stretch;
        flex-wrap: wrap;
        padding: 1rem;
    }

    .qp-quote-search__field {
        flex-basis: 100%;
    }

    .qp-quote-search__button,
    .qp-quote-search__clear {
        flex: 1;
    }
}

/* =========================================
   QUOTES — SEARCH SUGGESTIONS
   ========================================= */

.qp-quote-suggestions {
    position: absolute;
    z-index: 30;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid #e1e5ef;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(23, 32, 51, 0.12);
}

.qp-quote-suggestions[hidden] {
    display: none;
}

.qp-quote-suggestion {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    color: #172033;
    text-decoration: none;
    border-bottom: 1px solid #eef0f5;
}

.qp-quote-suggestion:last-child {
    border-bottom: 0;
}

.qp-quote-suggestion:hover,
.qp-quote-suggestion:focus-visible {
    background: #f7f6ff;
}

.qp-quote-suggestion strong {
    flex: 0 0 auto;
}

.qp-quote-suggestion span {
    min-width: 0;
    overflow: hidden;
    color: #68738a;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qp-quote-suggestions__empty {
    padding: 1rem;
    color: #737d93;
    text-align: center;
}

/* =========================================================
   APPLICATION — MOBILE NAVIGATION
   ========================================================= */

.qp-mobile-nav__footer {
    display: none;
}

@media (max-width: 720px) {
    .qp-sidebar__bottom {
        display: none;
    }

    .qp-sidebar__nav.is-open {
        display: grid;
    }

    .qp-mobile-nav__footer {
        display: grid;
        gap: 8px;
        margin-top: 6px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .qp-mobile-nav__business {
        display: grid;
        gap: 4px;
        padding: 12px 14px 14px;
    }

    .qp-mobile-nav__business-label {
        color: #818ca3;
        font-size: 0.65rem;
        font-weight: 800;
        letter-spacing: 0.1em;
    }

    .qp-mobile-nav__business strong {
        overflow: hidden;
        color: #ffffff;
        font-size: 0.88rem;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .qp-mobile-nav__footer form {
        margin: 0;
        padding-top: 8px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .qp-mobile-nav__logout {
        width: 100%;
        min-height: 48px;
        padding: 0 14px;
        border: 0;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
        background: transparent;
        color: #aeb7ca;
        cursor: pointer;
        text-align: left;
        font: inherit;
        font-size: 0.9rem;
        font-weight: 650;
    }

    .qp-mobile-nav__logout:hover,
    .qp-mobile-nav__logout:focus-visible {
        background: rgba(124, 111, 242, 0.12);
        color: #ffffff;
    }
}


/* Mobile navigation final positioning */

@media (max-width: 720px) {
    .qp-sidebar__nav {
        top: calc(100% + 8px);
    }
}


/* =========================================================
   QUOTES — ROW ACTIONS
   ========================================================= */

.qp-quote-row {
    position: relative;
}

.qp-quote-row__main {
    min-width: 0;
    display: contents;
    color: inherit;
    text-decoration: none;
}

.qp-quote-row__delete-form {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qp-quote-row__delete {
    width: 38px;
    height: 38px;
    padding: 9px;
    border: 0;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: transparent;
    color: #9aa4b8;
    cursor: pointer;
    transition:
        color var(--qp-transition),
        background var(--qp-transition),
        transform var(--qp-transition);
}

.qp-quote-row__delete svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.qp-quote-row__delete:hover,
.qp-quote-row__delete:focus-visible {
    background: rgba(210, 67, 67, 0.09);
    color: #c74343;
}

.qp-quote-row__delete:active {
    transform: scale(0.94);
}

@media (max-width: 900px) {
    .qp-quote-row__main {
        display: contents;
    }
}

@media (max-width: 720px) {
    .qp-quote-row__delete {
        width: 40px;
        height: 40px;
    }
}


/* Quote row delete action — final positioning */

.qp-quote-row {
    padding-right: 82px;
}

.qp-quote-row__delete-form {
    position: absolute;
    top: 50%;
    right: 34px;
    z-index: 2;
    margin: 0;
    transform: translateY(-50%);
}

.qp-quote-row__arrow {
    right: 12px;
}

@media (max-width: 900px) {
    .qp-quote-row {
        padding-right: 72px;
    }

    .qp-quote-row__delete-form {
        top: 14px;
        right: 14px;
        transform: none;
    }

    .qp-quote-row__arrow {
        right: 16px;
        bottom: 16px;
        top: auto;
        transform: none;
    }

    .qp-quote-row:hover .qp-quote-row__arrow {
        transform: translateX(3px);
    }
}


/* =========================================================
   DASHBOARD — MOBILE QUICK ACTIONS
   ========================================================= */

@media (max-width: 720px) {
    .qp-quick-actions {
        display: grid;
        gap: 10px;
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .qp-quick-action--link {
        position: relative;
        min-height: 82px;
        padding: 16px 46px 16px 16px;
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: center;
        border: 1px solid var(--qp-border);
        border-radius: 14px;
        background: var(--qp-surface);
    }

    .qp-quick-action + .qp-quick-action {
        border-top: 1px solid var(--qp-border);
    }

    .qp-quick-action--link::after {
        content: "›";
        position: absolute;
        top: 50%;
        right: 16px;
        color: var(--qp-brand);
        font-size: 1.35rem;
        font-weight: 700;
        line-height: 1;
        transform: translateY(-50%);
    }

    .qp-quick-action--link:active {
        background: var(--qp-brand-soft);
        transform: scale(0.99);
    }
}


/* ==========================================================
   Quote detail — status management
   ========================================================== */

.qp-quote-status-panel {
    display: grid;
    gap: 22px;
    margin-bottom: 24px;
    padding: 24px;
    border: 1px solid var(--qp-border);
    border-radius: 20px;
    background: var(--qp-surface);
}

.qp-quote-status-panel__content {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.qp-quote-status-panel__content h2 {
    margin: 5px 0 7px;
}

.qp-quote-status-panel__content p {
    max-width: 650px;
    margin: 0;
    color: var(--qp-text-muted);
    line-height: 1.6;
}

.qp-quote-status-panel__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
    border-top: 1px solid var(--qp-border);
}

.qp-quote-status-panel__actions form {
    margin: 0;
}

.qp-quote-status-panel__final {
    margin: 0;
    color: var(--qp-text-muted);
    font-size: 0.92rem;
    font-weight: 650;
    line-height: 1.6;
}

.qp-quote-status--draft {
    background: var(--qp-surface-soft);
    color: var(--qp-text-muted);
}

.qp-quote-status--sent {
    background: rgba(91, 76, 230, 0.10);
    color: var(--qp-brand-deep);
}

.qp-quote-status--accepted {
    background: rgba(39, 132, 91, 0.10);
    color: var(--qp-ink);
}

.qp-quote-status--rejected,
.qp-quote-status--expired {
    background: var(--qp-surface-soft);
    color: var(--qp-text-muted);
    opacity: 0.78;
}

@media (max-width: 640px) {
    .qp-quote-status-panel {
        padding: 20px;
    }

    .qp-quote-status-panel__content {
        flex-direction: column;
        gap: 14px;
    }

    .qp-quote-status-panel__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .qp-quote-status-panel__actions form,
    .qp-quote-status-panel__actions .qp-button {
        width: 100%;
    }
}


/* ==========================================================
   Message states
   ========================================================== */

.qp-message--success {
    border-color: rgba(22, 132, 91, 0.24);
    background: rgba(22, 132, 91, 0.08);
    color: var(--qp-success);
}


/* ==========================================================
   Subscription plan selection
   ========================================================== */

.qp-plan-layout {
    width: min(100% - 48px, 1120px);
    grid-template-columns: minmax(0, 0.78fr) minmax(500px, 1.22fr);
    gap: 78px;
}

.qp-plan-intro {
    max-width: 430px;
}

.qp-plan-trial-note {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 32px;
    padding-top: 26px;
    border-top: 1px solid var(--qp-border);
}

.qp-plan-trial-note__mark {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    background: rgba(91, 76, 230, 0.1);
    color: var(--qp-brand);
    font-weight: 900;
}

.qp-plan-trial-note div {
    display: grid;
    gap: 3px;
}

.qp-plan-trial-note strong {
    color: var(--qp-ink);
    font-size: 0.92rem;
}

.qp-plan-trial-note div span {
    color: var(--qp-text-muted);
    font-size: 0.8rem;
    line-height: 1.45;
}

.qp-plan-card {
    padding: 32px;
}

.qp-plan-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.qp-plan-card__eyebrow {
    margin: 0 0 5px;
    color: var(--qp-brand);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.11em;
}

.qp-plan-card__heading h2 {
    margin: 0;
    color: var(--qp-ink);
    font-size: 1.65rem;
    letter-spacing: -0.035em;
}

.qp-plan-card__trial {
    flex: 0 0 auto;
    border: 1px solid rgba(91, 76, 230, 0.18);
    border-radius: 999px;
    padding: 7px 11px;
    background: rgba(91, 76, 230, 0.07);
    color: var(--qp-brand);
    font-size: 0.72rem;
    font-weight: 800;
}

.qp-plan-form {
    display: grid;
    gap: 20px;
}

.qp-plan-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0;
    border: 0;
    padding: 0;
}

.qp-plan-option {
    position: relative;
    min-width: 0;
    cursor: pointer;
}

.qp-plan-option__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.qp-plan-option__surface {
    position: relative;
    display: flex;
    min-height: 190px;
    height: 100%;
    flex-direction: column;
    border: 1px solid var(--qp-border-strong);
    border-radius: var(--qp-radius-md);
    padding: 20px;
    background: var(--qp-surface);
    transition:
        border-color var(--qp-transition),
        box-shadow var(--qp-transition),
        transform var(--qp-transition),
        background-color var(--qp-transition);
}

.qp-plan-option:hover .qp-plan-option__surface {
    border-color: rgba(91, 76, 230, 0.42);
    transform: translateY(-1px);
}

.qp-plan-option__input:focus-visible + .qp-plan-option__surface {
    outline: 3px solid rgba(91, 76, 230, 0.28);
    outline-offset: 3px;
}

.qp-plan-option__input:checked + .qp-plan-option__surface {
    border-color: var(--qp-brand);
    background: rgba(91, 76, 230, 0.035);
    box-shadow: 0 0 0 1px var(--qp-brand);
}

.qp-plan-option__top {
    display: flex;
    min-height: 28px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.qp-plan-option__name {
    color: var(--qp-ink);
    font-size: 0.9rem;
    font-weight: 800;
}

.qp-plan-option__saving {
    border-radius: 999px;
    padding: 5px 7px;
    background: rgba(22, 132, 91, 0.09);
    color: var(--qp-success);
    font-size: 0.62rem;
    font-weight: 850;
    white-space: nowrap;
}

.qp-plan-option__price {
    display: flex;
    align-items: baseline;
    gap: 5px;
    margin-top: 21px;
}

.qp-plan-option__price strong {
    color: var(--qp-ink);
    font-size: 1.75rem;
    letter-spacing: -0.045em;
}

.qp-plan-option__price span {
    color: var(--qp-text-muted);
    font-size: 0.72rem;
}

.qp-plan-option__detail {
    margin-top: 10px;
    padding-right: 22px;
    color: var(--qp-text-muted);
    font-size: 0.76rem;
    line-height: 1.5;
}

.qp-plan-option__selector {
    position: absolute;
    right: 17px;
    bottom: 17px;
    width: 18px;
    height: 18px;
    border: 2px solid var(--qp-border-strong);
    border-radius: 50%;
    background: var(--qp-surface);
}

.qp-plan-option__input:checked
+ .qp-plan-option__surface
.qp-plan-option__selector {
    border: 5px solid var(--qp-brand);
}

.qp-plan-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 15px 0;
    border-top: 1px solid var(--qp-border);
    border-bottom: 1px solid var(--qp-border);
    font-size: 0.76rem;
}

.qp-plan-summary span {
    color: var(--qp-text-muted);
}

.qp-plan-summary strong {
    color: var(--qp-ink-soft);
    text-align: right;
}

.qp-plan-submit {
    min-height: 50px;
}

.qp-plan-fine-print {
    margin: -5px 0 0;
    color: var(--qp-text-muted);
    text-align: center;
    font-size: 0.7rem;
    line-height: 1.5;
}

.qp-plan-unavailable h2 {
    margin-top: 0;
    color: var(--qp-ink);
}

.qp-plan-unavailable p {
    margin-bottom: 0;
    color: var(--qp-text-muted);
}

.qp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}


@media (max-width: 900px) {
    .qp-plan-layout {
        width: min(100% - 40px, 680px);
        grid-template-columns: 1fr;
        gap: 38px;
    }

    .qp-plan-intro {
        max-width: 580px;
    }
}


@media (max-width: 520px) {
    .qp-plan-layout {
        width: calc(100% - 32px);
    }

    .qp-plan-card {
        padding: 24px 20px;
    }

    .qp-plan-card__heading {
        align-items: flex-start;
    }

    .qp-plan-options {
        grid-template-columns: 1fr;
    }

    .qp-plan-option__surface {
        min-height: 168px;
    }

    .qp-plan-summary {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .qp-plan-summary strong {
        text-align: left;
    }
}


/* ==========================================================
   Billing & subscription
   ========================================================== */

.qp-billing {
    padding: 42px 0 60px;
}

.qp-billing__intro {
    max-width: 680px;
    margin-bottom: 26px;
}

.qp-billing__intro h2 {
    margin: 7px 0 10px;
    color: var(--qp-ink);
    font-size: clamp(1.8rem, 3vw, 2.5rem);
    letter-spacing: -0.04em;
}

.qp-billing__intro > p:last-child {
    margin: 0;
    color: var(--qp-text-muted);
    line-height: 1.65;
}

.qp-billing-card {
    max-width: 900px;
}

.qp-billing-status {
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--qp-brand-soft);
    color: var(--qp-brand);
    font-size: 0.72rem;
    font-weight: 800;
}

.qp-billing-card__body {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

/*
 * Settings forms reuse the billing card shell.
 * Keep form content aligned with the card header/footer
 * without changing the billing detail grid itself.
 */
.qp-billing-card__body > form {
    padding: 24px;
}

.qp-billing-detail {
    min-height: 105px;
    padding: 24px;
    display: grid;
    align-content: center;
    gap: 7px;
    border-bottom: 1px solid var(--qp-border);
}

.qp-billing-detail:nth-child(odd) {
    border-right: 1px solid var(--qp-border);
}

.qp-billing-detail span {
    color: var(--qp-text-muted);
    font-size: 0.75rem;
    font-weight: 650;
}

.qp-billing-detail strong {
    color: var(--qp-ink);
    font-size: 1rem;
}

.qp-billing-card__footer {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
}

.qp-billing-card__footer .qp-button {
    flex-shrink: 0;
    white-space: nowrap;
}

.qp-billing-notice {
    max-width: 570px;
}

.qp-billing-notice strong {
    color: var(--qp-ink);
    font-size: 0.88rem;
}

.qp-billing-notice p {
    margin: 6px 0 0;
    color: var(--qp-text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.qp-billing .qp-message-list {
    max-width: 900px;
}

.qp-billing-dialog {
    width: min(520px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 22px;
    background: transparent;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}

.qp-billing-dialog::backdrop {
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(3px);
}

.qp-billing-dialog__content {
    padding: 30px;
    border: 1px solid var(--qp-border);
    border-radius: 22px;
    background: #ffffff;
}

.qp-billing-dialog__content h3 {
    margin: 7px 0 12px;
    color: var(--qp-ink);
    font-size: 1.45rem;
    letter-spacing: -0.025em;
}

.qp-billing-dialog__content > p:not(.qp-eyebrow) {
    margin: 0;
    color: var(--qp-text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.qp-billing-dialog__actions {
    margin-top: 26px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.qp-billing-dialog__actions .qp-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

@media (max-width: 720px) {
    .qp-billing {
        padding-top: 30px;
    }

    .qp-billing-card__body {
        grid-template-columns: 1fr;
    }

    .qp-billing-detail:nth-child(odd) {
        border-right: 0;
    }

    .qp-billing-card__footer {
        align-items: stretch;
        flex-direction: column;
    }

    .qp-billing-card__footer .qp-button {
        width: 100%;
    }

    .qp-billing-dialog__content {
        padding: 24px 20px;
    }

    .qp-billing-dialog__actions {
        flex-direction: column-reverse;
    }

    .qp-billing-dialog__actions .qp-button {
        width: 100%;
    }
}

/* ==========================================
   SUBSCRIPTION CHECKOUT — ACTIVATION PENDING
   ========================================== */

.qp-subscription-pending {
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    padding: 48px 24px;
}

.qp-subscription-pending-card {
    width: min(100%, 620px);
    text-align: center;
    padding: 48px;
    border: 1px solid var(--qp-border);
    border-radius: 24px;
    background: var(--qp-surface);
    box-shadow: var(--qp-shadow);
}

.qp-subscription-pending-kicker {
    margin-bottom: 12px;
    font-weight: 700;
}

.qp-subscription-pending-card h1 {
    margin-bottom: 18px;
}

.qp-subscription-pending-card p {
    margin-bottom: 18px;
}

.qp-subscription-pending-card .qp-button {
    margin-top: 10px;
}

/* ==========================================
   BILLING DIALOG — COMMERCIAL CONFIRMATION
   ========================================== */

.qp-billing-dialog__content {
    position: relative;
}

.qp-billing-dialog__close {
    position: absolute;
    top: 20px;
    right: 22px;
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--qp-text-muted);
    cursor: pointer;
    font: inherit;
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1;
}

.qp-billing-dialog__close:hover {
    background: var(--qp-surface-soft);
    color: var(--qp-ink);
}

.qp-billing-dialog__close:focus-visible {
    outline: 3px solid rgba(91, 70, 245, 0.22);
    outline-offset: 2px;
}

.qp-billing-dialog__actions {
    justify-content: space-between;
    align-items: center;
}

.qp-billing-dialog__actions .qp-button {
    min-width: 170px;
}

.qp-button--danger {
    border-color: var(--qp-danger);
    background: var(--qp-danger);
    color: #ffffff;
}

.qp-button--danger:hover {
    border-color: #a92f3d;
    background: #a92f3d;
    color: #ffffff;
}

.qp-button--danger:focus-visible {
    outline: 3px solid rgba(196, 61, 75, 0.22);
    outline-offset: 3px;
}

@media (max-width: 720px) {
    .qp-billing-dialog__close {
        top: 14px;
        right: 14px;
    }

    .qp-billing-dialog__actions .qp-button {
        min-width: 0;
    }
}


/* ==========================================================
   PASSWORD VISIBILITY TOGGLE
   ========================================================== */

.qp-password-field {
    position: relative;
}

.qp-password-field > input {
    padding-right: 54px;
}

.qp-password-toggle {
    position: absolute;
    top: 50%;
    right: 9px;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--qp-text-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transform: translateY(-50%);
    transition:
        background-color var(--qp-transition),
        color var(--qp-transition);
}

.qp-password-toggle:hover {
    background: var(--qp-surface-soft);
    color: var(--qp-brand);
}

.qp-password-toggle:focus-visible {
    outline: 2px solid var(--qp-brand);
    outline-offset: 2px;
}

.qp-password-toggle svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.qp-password-toggle__slash {
    opacity: 0;
}

.qp-password-toggle.is-visible .qp-password-toggle__slash {
    opacity: 1;
}
