/* Premium tenant brand studio */
.tenant-brand-studio {
    --tb-ink: #11223d;
    --tb-muted: #6f8098;
    --tb-line: #e1e8f2;
    --tb-blue: #316bf0;
    max-width: 1510px;
    margin: 0 auto;
    padding: 28px 26px 48px;
    color: var(--tb-ink);
}

.tb-page-header,
.tb-button,
.tb-hero,
.tb-hero__meta,
.tb-identity-lockup,
.tb-company-picker,
.tb-company-picker__form,
.tb-readiness__card,
.tb-panel-heading,
.tb-input-shell,
.tb-upload-zone,
.tb-upload-rules,
.tb-save-bar,
.tb-save-bar > div,
.tb-preview-panel__heading,
.tb-live-pill,
.tb-preview-brand,
.tb-preview-note {
    display: flex;
    align-items: center;
}

.tb-page-header { justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.tb-breadcrumb { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; color: #8b99ad; font-size: .68rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.tb-breadcrumb i { font-size: .52rem; }
.tb-breadcrumb strong { color: var(--tb-blue); }
.tb-page-header h1 { margin: 0; color: #0b1930; font-size: clamp(1.85rem, 2.4vw, 2.45rem); font-weight: 800; letter-spacing: -.045em; }
.tb-page-header p { margin: 6px 0 0; color: var(--tb-muted); font-size: .95rem; }

.tb-button { min-height: 42px; justify-content: center; gap: 9px; padding: 0 16px; border: 1px solid transparent; border-radius: 12px; font-size: .8rem; font-weight: 800; text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tb-button:hover { transform: translateY(-1px); }
.tb-button--quiet { border-color: #dbe3ee; background: #fff; color: #40536e; }
.tb-button--quiet:hover { border-color: #aac1f5; color: #285edc; }
.tb-button--primary { border: 0; background: linear-gradient(135deg, #3c77f5, #275bdd); color: #fff; box-shadow: 0 9px 20px rgba(49, 107, 240, .2); }
.tb-button--primary:hover { color: #fff; box-shadow: 0 12px 28px rgba(49, 107, 240, .29); }

.tb-hero { position: relative; overflow: hidden; justify-content: space-between; gap: 35px; min-height: 220px; margin-bottom: 15px; padding: 35px 40px; border: 1px solid rgba(111, 145, 217, .24); border-radius: 22px; background: radial-gradient(circle at 88% 5%, rgba(86, 127, 255, .28), transparent 32%), linear-gradient(125deg, #0d1931, #162b57 60%, #183875); color: #fff; box-shadow: 0 18px 45px rgba(19, 39, 78, .16); }
.tb-hero::before { position: absolute; right: 29%; bottom: -125px; width: 260px; height: 260px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; content: ""; }
.tb-hero__content { position: relative; z-index: 1; max-width: 720px; }
.tb-eyebrow { color: #8fb1ff; font-size: .66rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.tb-eyebrow span { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #4be3a1; box-shadow: 0 0 0 5px rgba(75, 227, 161, .12); }
.tb-hero h2 { margin: 10px 0 8px; color: #fff; font-size: clamp(1.55rem, 2.2vw, 2.2rem); font-weight: 800; letter-spacing: -.035em; }
.tb-hero__content > p { max-width: 650px; margin: 0; color: #afbed9; font-size: .9rem; line-height: 1.65; }
.tb-hero__meta { gap: 19px; flex-wrap: wrap; margin-top: 24px; color: #d7e1f5; font-size: .68rem; font-weight: 650; }
.tb-hero__meta i { margin-right: 6px; color: #77a0ff; }

.tb-hero__identity { position: relative; z-index: 1; min-width: 340px; padding: 18px 20px; border: 1px solid rgba(255,255,255,.14); border-radius: 17px; background: rgba(255,255,255,.075); backdrop-filter: blur(12px); }
.tb-hero__label { display: block; margin-bottom: 12px; color: #94a8cd; font-size: .6rem; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.tb-identity-lockup { gap: 12px; min-width: 0; }
.tb-identity-mark { display: grid; overflow: hidden; flex: 0 0 48px; height: 48px; place-items: center; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: linear-gradient(145deg, #407df5, #2457d2); color: #fff; box-shadow: 0 8px 20px rgba(19, 54, 133, .28); }
.tb-identity-mark img, .tb-preview-mark img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.tb-identity-mark b { font-size: .82rem; font-weight: 850; }
.tb-identity-lockup > span:last-child { min-width: 0; }
.tb-identity-lockup strong, .tb-identity-lockup small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-identity-lockup strong { max-width: 235px; color: #fff; font-size: .87rem; }
.tb-identity-lockup small { margin-top: 2px; color: #a9b8d3; font-size: .66rem; }
.tb-identity-lockup--light strong { color: #172a46; }
.tb-identity-lockup--light small { color: #7c8ba0; }
.tb-hero__reference { display: flex; justify-content: space-between; margin-top: 15px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.09); color: #8fa3ca; font-size: .6rem; text-transform: uppercase; }
.tb-hero__reference strong { color: #dbe6fb; letter-spacing: .08em; }

.tb-company-picker { gap: 16px; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--tb-line); border-radius: 16px; background: #fff; box-shadow: 0 7px 22px rgba(28, 48, 83, .05); }
.tb-company-picker__icon { display: grid; flex: 0 0 43px; height: 43px; place-items: center; border-radius: 12px; background: #edf3ff; color: #3269ec; }
.tb-company-picker__copy { min-width: 205px; }
.tb-company-picker__copy span, .tb-company-picker__copy strong, .tb-company-picker__copy small { display: block; }
.tb-company-picker__copy span { color: #7889a1; font-size: .58rem; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.tb-company-picker__copy strong { color: #233752; font-size: .78rem; }
.tb-company-picker__copy small { color: #8c99ac; font-size: .63rem; }
.tb-company-picker__form { flex: 1; gap: 9px; justify-content: flex-end; }
.tb-company-picker__form label { position: absolute; overflow: hidden; width: 1px; height: 1px; clip: rect(0,0,0,0); }
.tb-company-picker__form select { width: min(100%, 500px); height: 43px; padding: 0 38px 0 13px; border: 1px solid #d9e2ee; border-radius: 11px; outline: 0; background-color: #f9fbfd; color: #243751; font-size: .78rem; }
.tb-company-picker__form select:focus { border-color: #78a2ff; box-shadow: 0 0 0 3px rgba(49, 107, 240, .09); }

.tb-readiness { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 15px; }
.tb-readiness__card { position: relative; gap: 12px; min-width: 0; padding: 14px 16px; border: 1px solid var(--tb-line); border-radius: 15px; background: #fff; box-shadow: 0 6px 18px rgba(24, 43, 78, .045); }
.tb-readiness__card > span { display: grid; flex: 0 0 36px; height: 36px; place-items: center; border-radius: 11px; }
.tb-readiness__card > div { min-width: 0; flex: 1; }
.tb-readiness__card small, .tb-readiness__card strong, .tb-readiness__card em { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-readiness__card small { color: #8695aa; font-size: .57rem; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.tb-readiness__card strong { color: #253a57; font-size: .74rem; }
.tb-readiness__card em { color: #919db0; font-size: .61rem; font-style: normal; }
.tb-readiness__card > i { font-size: .75rem; }
.tb-readiness__card.is-ready > span { background: #ebfaf3; color: #0c9961; }
.tb-readiness__card.is-ready > i { color: #19aa71; }
.tb-readiness__card.is-fallback > span { background: #fff5df; color: #c87b00; }
.tb-readiness__card.is-fallback > i { color: #dda020; }

.tb-studio-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); gap: 15px; align-items: start; }
.tb-editor-panel, .tb-preview-panel { border: 1px solid var(--tb-line); border-radius: 20px; background: #fff; box-shadow: 0 12px 32px rgba(24, 44, 79, .065); }
.tb-editor-panel { padding: 24px; }
.tb-panel-heading { gap: 13px; margin-bottom: 23px; padding-bottom: 18px; border-bottom: 1px solid #ebeff5; }
.tb-panel-heading__icon { display: grid; flex: 0 0 43px; height: 43px; place-items: center; border-radius: 13px; background: #edf3ff; color: #3169e9; }
.tb-panel-heading > div > span, .tb-preview-panel__heading > div > span { color: #3569df; font-size: .58rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.tb-panel-heading h2, .tb-preview-panel__heading h2 { margin: 2px 0 0; color: #172a46; font-size: 1rem; font-weight: 800; }
.tb-panel-heading p { margin: 3px 0 0; color: #8391a5; font-size: .68rem; }
.tb-validation.validation-summary-valid { display: none; }
.tb-validation { font-size: .72rem; }

.tb-field { margin-bottom: 19px; }
.tb-field > label { display: flex; justify-content: space-between; margin-bottom: 7px; color: #33475f; font-size: .7rem; font-weight: 800; }
.tb-field > label em { color: #99a5b5; font-size: .59rem; font-style: normal; font-weight: 600; }
.tb-input-shell { position: relative; }
.tb-input-shell > i { position: absolute; left: 13px; color: #8ea0b9; font-size: .72rem; }
.tb-input-shell input { width: 100%; height: 45px; padding: 0 82px 0 38px; border: 1px solid #d9e2ed; border-radius: 11px; outline: 0; background: #fbfcfe; color: #213650; font-size: .78rem; transition: border-color .16s ease, box-shadow .16s ease; }
.tb-input-shell input:focus { border-color: #75a0ff; background: #fff; box-shadow: 0 0 0 3px rgba(49, 107, 240, .09); }
.tb-input-shell > span { position: absolute; right: 12px; color: #9aa6b6; font-size: .58rem; }
.tb-field > small { display: block; margin-top: 6px; color: #8b98aa; font-size: .62rem; }
.tb-field > small strong { color: #5d708c; }

.tb-upload-zone { position: relative; gap: 13px; min-height: 95px; padding: 15px; border: 1.5px dashed #c9d7eb; border-radius: 14px; background: #f8faff; cursor: pointer; transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.tb-upload-zone:hover, .tb-upload-zone.is-dragging { border-color: #6492f7; background: #f1f6ff; transform: translateY(-1px); }
.tb-upload-zone.is-invalid { border-color: #e45362; background: #fff5f6; }
.tb-upload-zone__icon { display: grid; flex: 0 0 45px; height: 45px; place-items: center; border-radius: 13px; background: #e9f1ff; color: #346be8; font-size: 1rem; }
.tb-upload-zone__copy { min-width: 0; flex: 1; }
.tb-upload-zone__copy strong, .tb-upload-zone__copy small { display: block; }
.tb-upload-zone__copy strong { color: #29405f; font-size: .73rem; }
.tb-upload-zone__copy small { overflow: hidden; margin-top: 3px; color: #8391a6; font-size: .63rem; text-overflow: ellipsis; white-space: nowrap; }
.tb-upload-zone__copy u { color: #3469e4; text-decoration: none; }
.tb-upload-zone__types { padding: 5px 7px; border: 1px solid #dde6f2; border-radius: 7px; background: #fff; color: #8290a4; font-size: .52rem; font-weight: 800; letter-spacing: .04em; }
.tb-upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tb-upload-rules { justify-content: space-between; gap: 10px; margin-top: 7px; color: #8795a8; font-size: .59rem; }
.tb-upload-rules i { margin-right: 4px; color: #21a772; }

.tb-save-bar { justify-content: space-between; gap: 15px; margin: 25px -24px -24px; padding: 16px 24px; border-top: 1px solid #e7ecf3; border-radius: 0 0 20px 20px; background: #f9fafc; }
.tb-save-bar > div { gap: 10px; color: #71829a; }
.tb-save-bar > div > i { color: #4b75d9; }
.tb-save-bar span strong, .tb-save-bar span small { display: block; }
.tb-save-bar span strong { color: #40546f; font-size: .67rem; }
.tb-save-bar span small { font-size: .58rem; }

.tb-preview-panel { position: sticky; top: 82px; padding: 22px; background: linear-gradient(180deg, #fff, #fafcff); }
.tb-preview-panel__heading { justify-content: space-between; gap: 15px; margin-bottom: 18px; }
.tb-live-pill { gap: 6px; padding: 5px 8px; border: 1px solid #c7ecdd; border-radius: 999px; background: #effbf6; color: #16895c; font-size: .59rem; font-weight: 800; }
.tb-live-pill i { width: 6px; height: 6px; border-radius: 50%; background: #20b879; box-shadow: 0 0 0 4px rgba(32,184,121,.1); }

.tb-browser-preview { overflow: hidden; border: 1px solid #dce4ef; border-radius: 15px; background: #f3f6fb; box-shadow: 0 13px 28px rgba(23, 42, 78, .12); }
.tb-browser-preview__bar { display: flex; align-items: center; gap: 5px; height: 32px; padding: 0 10px; border-bottom: 1px solid #dce4ef; background: #fff; }
.tb-browser-preview__bar > span { width: 6px; height: 6px; border-radius: 50%; background: #e3e8ef; }
.tb-browser-preview__bar > span:first-child { background: #ff8d94; }
.tb-browser-preview__bar > span:nth-child(2) { background: #ffd16c; }
.tb-browser-preview__bar > span:nth-child(3) { background: #55d19a; }
.tb-browser-preview__bar > div { display: flex; align-items: center; gap: 5px; width: 58%; height: 18px; margin: 0 auto; padding: 0 8px; border-radius: 5px; background: #f1f4f8; color: #94a0b1; font-size: .46rem; }
.tb-browser-preview__bar b { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.tb-browser-preview__body { display: grid; grid-template-columns: 36% 64%; min-height: 260px; }
.tb-browser-preview__body > aside { padding: 16px 12px; background: #111e3b; }
.tb-preview-brand { gap: 7px; min-width: 0; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.tb-preview-mark { display: grid; overflow: hidden; flex: 0 0 27px; height: 27px; place-items: center; border-radius: 8px; background: linear-gradient(145deg, #447ff6, #285bd7); color: #fff; font-size: .46rem; }
.tb-preview-brand > span:last-child { min-width: 0; }
.tb-preview-brand strong, .tb-preview-brand small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-preview-brand strong { color: #fff; font-size: .49rem; }
.tb-preview-brand small { color: #8fa2c7; font-size: .39rem; }
.tb-preview-nav { display: grid; gap: 6px; margin-top: 13px; }
.tb-preview-nav span { padding: 7px 8px; border-radius: 6px; color: #8294b7; font-size: .43rem; }
.tb-preview-nav span.active { background: rgba(73, 121, 244, .2); color: #b8ceff; }
.tb-preview-nav i { width: 13px; margin-right: 4px; }
.tb-preview-content { padding: 15px; }
.tb-preview-topbar { display: flex; justify-content: flex-end; gap: 5px; margin-bottom: 24px; }
.tb-preview-topbar span, .tb-preview-topbar b { height: 5px; border-radius: 99px; background: #dce4ef; }
.tb-preview-topbar span { width: 24px; }
.tb-preview-topbar b { width: 9px; height: 9px; background: #80a2ef; }
.tb-preview-content h3 { margin: 0; color: #223650; font-size: .68rem; font-weight: 800; }
.tb-preview-content p { margin: 2px 0 12px; color: #96a2b2; font-size: .4rem; }
.tb-preview-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.tb-preview-stats span { height: 42px; border: 1px solid #e1e7f0; border-radius: 6px; background: #fff; box-shadow: 0 3px 8px rgba(25,42,75,.04); }
.tb-preview-stats span:first-child { border-top: 2px solid #4e80ec; }
.tb-preview-stats span:nth-child(2) { border-top: 2px solid #39bb88; }
.tb-preview-stats span:nth-child(3) { border-top: 2px solid #f0ac3b; }
.tb-preview-chart { display: flex; align-items: flex-end; gap: 7px; height: 79px; margin-top: 8px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 7px; background: #fff; }
.tb-preview-chart i { flex: 1; height: 45%; border-radius: 3px 3px 0 0; background: #dbe6ff; }
.tb-preview-chart i:nth-child(2) { height: 70%; }
.tb-preview-chart i:nth-child(3) { height: 54%; }
.tb-preview-chart i:nth-child(4) { height: 88%; background: #5f8cf2; }
.tb-preview-chart i:nth-child(5) { height: 64%; }
.tb-preview-chart i:nth-child(6) { height: 76%; }

.tb-preview-lockup { margin-top: 16px; padding: 14px; border: 1px solid #e1e8f2; border-radius: 13px; background: #fff; }
.tb-preview-lockup > span { display: block; margin-bottom: 10px; color: #8795a9; font-size: .56rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tb-preview-lockup .tb-identity-mark { flex-basis: 39px; height: 39px; border-color: #dce5f2; border-radius: 11px; box-shadow: 0 6px 14px rgba(28, 65, 147, .14); }
.tb-preview-lockup .tb-identity-lockup strong { font-size: .73rem; }
.tb-preview-lockup .tb-identity-lockup small { font-size: .59rem; }
.tb-preview-note { gap: 10px; margin-top: 14px; padding: 11px 13px; border-radius: 12px; background: #eff4ff; color: #45658f; }
.tb-preview-note > i { color: #376ce4; }
.tb-preview-note strong, .tb-preview-note span { display: block; }
.tb-preview-note strong { color: #33537f; font-size: .66rem; }
.tb-preview-note span { font-size: .57rem; }

@media (max-width: 1199.98px) {
    .tenant-brand-studio { padding: 24px 20px 42px; }
    .tb-studio-grid { grid-template-columns: 1fr; }
    .tb-preview-panel { position: static; }
    .tb-browser-preview { max-width: 720px; }
}

@media (max-width: 767.98px) {
    .tenant-brand-studio { padding: 18px 12px 34px; }
    .tb-page-header, .tb-company-picker { align-items: flex-start; flex-direction: column; }
    .tb-hero { align-items: stretch; flex-direction: column; padding: 27px 22px; }
    .tb-hero__identity { min-width: 0; }
    .tb-company-picker__form { align-items: stretch; flex-direction: column; width: 100%; }
    .tb-company-picker__form select { width: 100%; }
    .tb-readiness { grid-template-columns: 1fr; }
    .tb-save-bar { align-items: stretch; flex-direction: column; }
    .tb-browser-preview__body { grid-template-columns: 38% 62%; min-height: 220px; }
}

@media (max-width: 479.98px) {
    .tb-editor-panel, .tb-preview-panel { padding: 17px; }
    .tb-save-bar { margin: 22px -17px -17px; padding: 15px 17px; }
    .tb-upload-zone { align-items: flex-start; flex-wrap: wrap; }
    .tb-upload-zone__types { margin-left: 58px; }
    .tb-browser-preview__body { grid-template-columns: 1fr; }
    .tb-browser-preview__body > aside { display: none; }
}
