:root {
    --qt-primary: #d90429;
    --qt-primary-dark: #850016;
    --qt-ink: #111111;
    --qt-black: #000000;
    --qt-bg: #f4f6fb;
    --qt-surface: #ffffff;
    --qt-surface-muted: #f8fafc;
    --qt-border: #d7deea;
    --qt-text: #18202f;
    --qt-muted: #61708a;
    --qt-success: #0f766e;
    --qt-danger: #b42318;
    --qt-shadow: 0 20px 60px rgba(16, 24, 40, 0.08);
}

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--qt-text);
    background:
        radial-gradient(circle at top left, rgba(217, 4, 41, 0.12), transparent 28%),
        linear-gradient(180deg, #fbfcfe 0%, var(--qt-bg) 100%);
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
small { color: var(--qt-muted); }

.qt-shell {
    display: flex;
    min-height: 100vh;
}

.qt-sidebar {
    width: 280px;
    background: linear-gradient(180deg, #0d1016 0%, #161b24 100%);
    color: #fff;
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    min-height: 100vh;
}

.qt-sidebar__eyebrow,
.qt-topbar__eyebrow,
.qt-auth-card__eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.qt-sidebar__title {
    font-size: 28px;
    font-weight: 800;
    margin-top: 10px;
}

.qt-nav {
    display: grid;
    gap: 10px;
    align-content: start;
}

.qt-nav__link {
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.78);
}

.qt-nav__link.is-active,
.qt-nav__link:hover {
    background: linear-gradient(135deg, rgba(217, 4, 41, 0.88), rgba(11, 11, 11, 0.92));
    color: #fff;
}

.qt-sidebar__footer {
    display: grid;
    gap: 16px;
    margin-top: auto;
}

.qt-sidebar__user {
    display: grid;
    gap: 6px;
    color: rgba(255,255,255,0.8);
}

.qt-main {
    flex: 1;
    padding: 24px;
}

.qt-main--guest {
    display: grid;
    place-items: center;
    padding: 40px;
}

.qt-topbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 26px 28px;
    margin-bottom: 20px;
    border-radius: 26px;
    background: linear-gradient(135deg, #0f1116 0%, #1d2430 42%, #7d0f25 100%);
    color: #fff;
    box-shadow: var(--qt-shadow);
}

.qt-topbar h1 {
    font-size: 38px;
    line-height: 1.05;
    margin: 10px 0 12px;
}

.qt-topbar p {
    max-width: 760px;
    color: rgba(255,255,255,0.8);
}

.qt-grid {
    display: grid;
    gap: 18px;
}

.qt-grid--stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qt-grid--dashboard { grid-template-columns: 2fr 1fr; }
.qt-grid--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qt-grid--tenant { grid-template-columns: 2fr 1fr; align-items: start; }
.qt-grid--tenant-single { grid-template-columns: 1fr; }
.qt-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-top: 14px;
}

.qt-inline-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.qt-inline-form input {
    min-height: 38px;
    border: 1px solid var(--qt-border);
    border-radius: 10px;
    padding: 8px 10px;
}

.qt-progress {
    height: 12px;
    background: var(--qt-surface-muted);
    border: 1px solid var(--qt-border);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.qt-progress span {
    display: block;
    height: 100%;
    background: var(--qt-success);
}

.qt-checklist,
.qt-instruction-list {
    display: grid;
    gap: 12px;
}

.qt-checklist__row,
.qt-instruction-list section {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 16px;
    border: 1px solid var(--qt-border);
    border-radius: 14px;
    background: var(--qt-surface-muted);
}

.qt-checklist__row div,
.qt-instruction-list section {
    display: grid;
    gap: 6px;
}

.qt-checklist__row span,
.qt-instruction-list p {
    color: var(--qt-muted);
    line-height: 1.5;
}

.qt-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--qt-muted);
}

.qt-section-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin: 10px 0 12px;
}

.qt-section-tab {
    display: grid;
    gap: 5px;
    min-height: 86px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255,255,255,0.82);
    border: 1px solid var(--qt-border);
    color: var(--qt-text);
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.05);
}

.qt-section-tab strong {
    font-size: 14px;
    line-height: 1.2;
}

.qt-section-tab span {
    color: var(--qt-muted);
    font-size: 12px;
    line-height: 1.35;
}

.qt-section-tab.is-active {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

.qt-section-tab.is-active span {
    color: rgba(255,255,255,0.74);
}

.qt-page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.qt-page-tabs--secondary {
    margin-top: 0;
}

.qt-page-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(255,255,255,0.8);
    border: 1px solid var(--qt-border);
    color: var(--qt-text);
    font-weight: 700;
    box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.qt-page-tab small {
    color: var(--qt-muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.qt-page-tab.is-active {
    background: linear-gradient(135deg, var(--qt-primary) 0%, var(--qt-primary-dark) 100%);
    color: #fff;
    border-color: transparent;
}

.qt-page-tab.is-active small {
    color: rgba(255,255,255,0.8);
}

.qt-page-tab.is-locked {
    opacity: 0.82;
}

.qt-card {
    background: var(--qt-surface);
    border: 1px solid rgba(215, 222, 234, 0.9);
    border-radius: 22px;
    padding: 20px 22px;
    box-shadow: var(--qt-shadow);
}

.qt-card--nested {
    border-radius: 18px;
    padding: 18px;
    box-shadow: none;
    background: var(--qt-surface-muted);
}

.qt-card--locked {
    opacity: 0.78;
}

.qt-card__header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    align-items: flex-start;
    margin-bottom: 14px;
}

.qt-card__header > div {
    min-width: 0;
}

.qt-card__header h2 {
    font-size: 28px;
    margin-bottom: 6px;
}

.qt-card__header p {
    color: var(--qt-muted);
    max-width: 720px;
    line-height: 1.55;
}

.qt-stat span {
    display: block;
    color: var(--qt-muted);
    margin-bottom: 12px;
}

.qt-stat strong {
    font-size: 20px;
    line-height: 1.1;
    word-break: break-word;
}

.qt-stat--tenant-id strong {
    font-size: 17px;
    line-height: 1.2;
}

.qt-stack {
    display: grid;
    gap: 16px;
}

.qt-tenant-row,
.qt-tenant-card,
.qt-site-card,
.qt-version-row,
.qt-member-row,
.qt-audit-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    background: var(--qt-surface-muted);
}

.qt-tenant-row span,
.qt-tenant-card span,
.qt-site-card span,
.qt-version-row span,
.qt-member-row span,
.qt-audit-row span {
    color: var(--qt-muted);
    display: block;
    margin-top: 4px;
}

.qt-version-row {
    cursor: pointer;
    list-style: none;
}

.qt-version-row:hover {
    border-color: #c5d1e2;
}

.qt-version-row::-webkit-details-marker {
    display: none;
}

.qt-history-item {
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    background: var(--qt-surface-muted);
}

.qt-history-item__meta {
    text-align: right;
}

.qt-history-item__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: #eff3f8;
    color: var(--qt-text);
    font-size: 12px;
    font-weight: 700;
    margin-top: 8px;
}

.qt-history-item__body {
    padding: 12px 18px 18px;
}

.qt-history-change {
    border: 1px solid var(--qt-border);
    border-radius: 16px;
    background: var(--qt-surface);
    padding: 14px 16px;
}

.qt-history-change__header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.qt-history-change__values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.qt-history-change__values label {
    display: block;
    margin-bottom: 8px;
    color: var(--qt-muted);
    font-weight: 700;
}

.qt-history-change__values pre {
    margin: 0;
    padding: 12px;
    border-radius: 14px;
    background: #101828;
    color: #f8fafc;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.qt-history-empty,
.qt-history-color,
.qt-history-banners,
.qt-history-text {
    min-height: 42px;
}

.qt-history-empty {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--qt-muted);
    border: 1px dashed var(--qt-border);
}

.qt-history-color {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid var(--qt-border);
}

.qt-history-color__swatch {
    width: 18px;
    height: 18px;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

.qt-history-color__code {
    font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    color: var(--qt-text);
}

.qt-history-banners {
    display: grid;
    gap: 12px;
}

.qt-history-banner {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--qt-border);
}

.qt-history-banner__image {
    width: 100%;
    height: 86px;
    object-fit: cover;
    border-radius: 12px;
    background: #e5e7eb;
}

.qt-history-banner__content {
    display: grid;
    gap: 6px;
}

.qt-history-banner__content span {
    color: var(--qt-muted);
    margin-top: 0;
}

.qt-history-text {
    padding: 12px;
    border-radius: 14px;
    background: #101828;
    color: #f8fafc;
    white-space: pre-wrap;
    word-break: break-word;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.qt-tenant-row__meta,
.qt-tenant-card__meta,
.qt-member-row__actions,
.qt-site-card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qt-site-card {
    display: grid;
}

.qt-checkout-site {
    display: grid;
    gap: 16px;
    padding: 18px;
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    background: var(--qt-surface-muted);
}

.qt-checkout-site__header,
.qt-gateway-row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
}

.qt-checkout-site__header span,
.qt-gateway-row span,
.qt-diagnostics-grid span {
    color: var(--qt-muted);
    display: block;
    margin-top: 4px;
}

.qt-diagnostics-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.qt-diagnostics-grid > div,
.qt-gateway-row {
    padding: 14px;
    border: 1px solid var(--qt-border);
    border-radius: 16px;
    background: #fff;
}

.qt-diagnostics-grid strong,
.qt-gateway-row strong {
    word-break: break-word;
}

.qt-gateway-list,
.qt-warning-list {
    display: grid;
    gap: 10px;
}

.qt-warning-list > div {
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}

.qt-form {
    display: grid;
    gap: 16px;
}

.qt-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.qt-form__field {
    display: grid;
    gap: 8px;
}

.qt-form__field label {
    font-weight: 700;
    font-size: 14px;
}

.qt-color-field {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qt-branding-layout {
    display: grid;
    gap: 22px;
}

.qt-branding-layout__app-name {
    max-width: 520px;
}

.qt-branding-layout__logo-row,
.qt-branding-layout__colors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.qt-color-card {
    padding: 14px 16px;
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(245,247,252,0.96));
    box-shadow: 0 10px 24px rgba(17, 24, 39, 0.04);
}

.qt-color-picker-shell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #eef2f8);
    border: 1px solid var(--qt-border);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.qt-color-picker {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    cursor: pointer;
}

.qt-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.qt-color-picker::-webkit-color-swatch {
    border: 0;
    border-radius: 12px;
}

.qt-color-picker::-moz-color-swatch {
    border: 0;
    border-radius: 12px;
}

.qt-color-swatch {
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    border-radius: 14px;
    border: 1px solid var(--qt-border);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.35);
    background: #ffffff;
}

.qt-upload-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px dashed var(--qt-border);
    border-radius: 18px;
    background: var(--qt-surface-muted);
}

.qt-upload-card--compact {
    gap: 10px;
}

.qt-upload-preview {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--qt-border);
    padding: 10px;
}

.qt-upload-preview--logo {
    max-height: 96px;
    padding: 8px 10px;
}

.qt-banner-builder__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.qt-banner-builder__header p {
    color: var(--qt-muted);
}

.qt-banner-card {
    cursor: grab;
}

.qt-banner-card__header {
    cursor: pointer;
}

.qt-banner-card__summary {
    display: grid;
    gap: 6px;
}

.qt-banner-card__thumb {
    width: 84px;
    height: 56px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--qt-border);
    background: #fff;
    box-shadow: 0 6px 16px rgba(16, 24, 40, 0.06);
}

.qt-banner-card.is-expanded .qt-banner-card__thumb {
    display: none;
}

.qt-banner-card.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

.qt-banner-card__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.qt-banner-toggle {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--qt-border);
    border-radius: 999px;
    background: #fff;
    color: var(--qt-text);
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.06);
}

.qt-banner-toggle__icon {
    font-size: 16px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.qt-banner-card.is-expanded .qt-banner-toggle__icon {
    transform: rotate(180deg);
}

.qt-banner-card__body {
    display: grid;
    gap: 18px;
    padding-top: 18px;
}

.qt-banner-card__body[hidden] {
    display: none !important;
}

.qt-banner-card__image-row {
    width: 100%;
}

.qt-banner-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.qt-home-section-builder {
    display: grid;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--qt-border);
}

.qt-home-section-card.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

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

.qt-product-picker {
    display: grid;
    gap: 12px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    background: #fff;
}

.qt-product-picker[hidden] {
    display: none !important;
}

.qt-product-picker__selected,
.qt-product-picker__results {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.qt-product-picker__search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.qt-product-chip,
.qt-product-result {
    border: 1px solid var(--qt-border);
    background: var(--qt-surface-muted);
    color: var(--qt-text);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
}

.qt-product-chip {
    padding: 8px 12px;
}

.qt-product-chip::after {
    content: "x";
    margin-left: 8px;
    color: var(--qt-danger);
    font-weight: 800;
}

.qt-product-result {
    display: inline-grid;
    grid-template-columns: 34px minmax(140px, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 8px 12px 8px 8px;
    text-align: left;
}

.qt-product-result img,
.qt-product-result__image {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    object-fit: cover;
    background: #e5eaf2;
}

.qt-product-result small {
    white-space: nowrap;
}

.qt-button--small {
    padding: 10px 14px;
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    border-radius: 16px;
    border: 1px solid var(--qt-border);
    background: #fff;
    padding: 14px 16px;
    font: inherit;
    color: var(--qt-text);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.qt-checkbox-list {
    display: grid;
    gap: 12px;
}

.qt-checkbox-list--two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qt-checkbox-list--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qt-checkbox,
.qt-checkbox--inline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--qt-text);
}

.qt-checkbox input[type='checkbox'] {
    width: 18px;
    height: 18px;
    accent-color: var(--qt-primary);
}

.qt-feature-toggle {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: var(--qt-text);
}

.qt-feature-toggle--disabled {
    opacity: 0.65;
}

.qt-feature-toggle__label {
    font-weight: 600;
}

.switch {
    font-size: 17px;
    position: relative;
    display: inline-block;
    width: 3.5em;
    height: 2em;
    flex: 0 0 auto;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: white;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid var(--qt-border);
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.slider:before {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    right: 0.3em;
    bottom: 0.24em;
    transform: translateX(150%);
    background-color: #59d102;
    border-radius: inherit;
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.slider:after {
    position: absolute;
    content: "";
    height: 1.4em;
    width: 1.4em;
    left: 0.3em;
    bottom: 0.24em;
    background-color: #e11d48;
    border-radius: inherit;
    transition: all 0.4s cubic-bezier(0.215, 0.610, 0.355, 1);
}

.switch input:focus + .slider {
    box-shadow: 0 0 1px #59d102;
}

.switch input:checked + .slider:before {
    transform: translateY(0);
}

.switch input:checked + .slider::after {
    transform: translateX(-150%);
}

.switch input:disabled + .slider {
    cursor: not-allowed;
    background: #f3f4f6;
}


.qt-table {
    display: grid;
    border: 1px solid var(--qt-border);
    border-radius: 18px;
    overflow: hidden;
}

.qt-table__head,
.qt-table__row {
    display: grid;
    grid-template-columns: 120px 1fr 1fr 160px 110px;
    gap: 14px;
    padding: 14px 16px;
    align-items: center;
}

.qt-table__head {
    background: #f2f5fb;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
    color: var(--qt-muted);
}

.qt-table__row:nth-child(even) {
    background: #fbfcfe;
}

.qt-table__row--muted {
    opacity: 0.55;
    background: #f6f7fa;
}

.qt-table__row.is-dragging {
    opacity: 0.45;
}

.qt-table__head span:nth-child(4) {
    justify-self: center;
}

.qt-table__toggle-cell {
    justify-self: center;
}

.qt-table__head--sessions,
.qt-table__row--sessions {
    grid-template-columns: 140px 1.2fr 1fr 1fr 1fr 120px 120px;
}

.qt-table__head--tenant-admin,
.qt-table__row--tenant-admin {
    grid-template-columns: 1.2fr 1.3fr 0.8fr 0.8fr 0.8fr 0.9fr 0.8fr 0.9fr 0.9fr 1fr;
}

.qt-table__head--devices,
.qt-table__row--devices {
    grid-template-columns: 0.8fr 1fr 1fr 1fr 1.1fr 0.8fr;
}

.qt-table__head--campaigns,
.qt-table__row--campaigns {
    grid-template-columns: 1.5fr 0.8fr 0.8fr 0.7fr 0.7fr 0.7fr 1fr;
}

.qt-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: 700;
    font: inherit;
}

.qt-button--primary {
    background: linear-gradient(135deg, var(--qt-primary) 0%, var(--qt-primary-dark) 100%);
    color: #fff;
}

.qt-button--ghost {
    background: #eff3f8;
    color: var(--qt-text);
}

.qt-button--danger {
    background: #fee4e2;
    color: var(--qt-danger);
}

.qt-button[disabled],
.qt-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.qt-button--block { width: 100%; }

.qt-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.qt-badge--locked {
    background: #111827;
    color: #fff;
}

.qt-badge--good {
    background: #dcfce7;
    color: #166534;
}

.qt-badge--danger {
    background: #fee4e2;
    color: #b42318;
}

.qt-badge--muted {
    background: #eef2f7;
    color: #4b5565;
}

.qt-alert {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.qt-alert ul {
    margin: 10px 0 0 18px;
    padding: 0;
}

.qt-alert--success {
    background: #dcfce7;
    color: #166534;
}

.qt-alert--error {
    background: #fee4e2;
    color: #912018;
}

.qt-copy-button {
    border: 0;
    border-radius: 999px;
    background: #eff3f8;
    color: var(--qt-text);
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    margin-left: 8px;
    padding: 6px 10px;
}

.qt-help-text {
    color: var(--qt-muted);
    line-height: 1.5;
    margin: 10px 0 14px;
}

.qt-info-panel,
.qt-success-note,
.qt-warning-list {
    border-radius: 16px;
    line-height: 1.55;
    margin: 14px 0;
    padding: 14px 16px;
}

.qt-info-panel {
    background: #eef6ff;
    border: 1px solid #bfd7ff;
    color: #1e3a8a;
}

.qt-success-note {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.qt-warning-list {
    display: grid;
    gap: 6px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.qt-warning-list span,
.qt-warning-list div {
    color: inherit;
}

.qt-inline-warning {
    display: inline-flex !important;
    margin-top: 8px !important;
    padding: 4px 8px;
    border-radius: 999px;
    background: #fff7ed;
    color: #9a3412 !important;
    font-size: 12px;
    font-weight: 700;
}

.qt-readiness-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.qt-readiness-grid--compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qt-readiness-item {
    border: 1px solid var(--qt-border);
    border-radius: 16px;
    background: var(--qt-surface-muted);
    padding: 14px 16px;
}

.qt-readiness-item.is-complete {
    background: #ecfdf3;
    border-color: #bbf7d0;
}

.qt-readiness-item strong,
.qt-readiness-item span {
    display: block;
}

.qt-readiness-item span {
    color: var(--qt-muted);
    line-height: 1.45;
    margin-top: 6px;
}

.qt-definition-list {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.qt-definition-list dt {
    color: var(--qt-muted);
    font-size: 13px;
    margin-bottom: 4px;
}

.qt-definition-list dd {
    margin: 0;
    font-weight: 700;
    word-break: break-word;
}

.qt-auth-card {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    overflow: hidden;
    border-radius: 32px;
    background: var(--qt-surface);
    box-shadow: var(--qt-shadow);
}

.qt-auth-card__hero {
    padding: 44px;
    background: linear-gradient(135deg, #0c0f13 0%, #161d28 40%, #7d0f25 100%);
    color: #fff;
}

.qt-auth-card__hero h1 {
    font-size: 42px;
    margin: 18px 0 14px;
}

.qt-auth-card__hero p {
    color: rgba(255,255,255,0.8);
    max-width: 34ch;
}

.qt-auth-card__form {
    padding: 44px;
}

.qt-empty {
    color: var(--qt-muted);
}

@media (max-width: 1200px) {
    .qt-grid--stats,
    .qt-grid--dashboard,
    .qt-grid--two,
    .qt-grid--tenant,
    .qt-form__grid,
    .qt-diagnostics-grid,
    .qt-checkbox-list--two,
    .qt-checkbox-list--three,
    .qt-auth-card {
        grid-template-columns: 1fr;
    }

    .qt-sidebar {
        width: 220px;
    }
}

@media (max-width: 900px) {
    .qt-shell {
        flex-direction: column;
    }

    .qt-sidebar {
        width: auto;
    }

    .qt-topbar {
        flex-direction: column;
    }

    .qt-banner-form-grid,
    .qt-home-section-grid,
    .qt-product-picker__search {
        grid-template-columns: 1fr;
    }

    .qt-table__head,
    .qt-table__row,
    .qt-table__head--sessions,
    .qt-table__row--sessions {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .qt-branding-layout__logo-row,
    .qt-branding-layout__colors {
        grid-template-columns: 1fr;
    }
}
