:root {
    /*
     * Primary width knob for the entire application.
     * Change this value when you want to make both the public landing page
     * and the authenticated workspace narrower or wider.
     */
    --tb-layout-max-width: 1280px;

    /*
     * Width of the left workspace column.
     * Affects both the sticky sidebar and the matching header grid above it.
     */
    --tb-sidebar-width: 280px;
    --tb-ink: #0f172a;
    --tb-ink-soft: #475569;
    --tb-line: #e2e8f0;
    --tb-surface: rgba(255, 255, 255, 0.94);
    --tb-surface-strong: #ffffff;
    --tb-accent: #0d9488;
    --tb-accent-strong: #0f766e;
    --tb-accent-warm: #2563eb;
    --tb-success: #16a34a;
    --tb-danger: #dc2626;
    --tb-warning: #d97706;
    --tb-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
    --tb-radius-lg: 24px;
    --tb-radius-md: 18px;
    --tb-radius-sm: 12px;
    --tb-header-height: 74px;
    --tb-workspace-background:
        radial-gradient(circle at top left, rgba(13, 148, 136, 0.10), transparent 22%),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 18%),
        linear-gradient(180deg, #f8fafc 0%, #f3f7f8 100%);
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Manrope", "Segoe UI", sans-serif;
    color: var(--tb-ink);
    background:
        radial-gradient(circle at top left, rgba(255, 143, 63, 0.20), transparent 24%),
        radial-gradient(circle at bottom right, rgba(15, 157, 138, 0.20), transparent 28%),
        linear-gradient(180deg, #f5efe7 0%, #f5f7fb 44%, #eef6f3 100%);
}

body {
    min-height: 100vh;
    line-height: 1.55;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Global anchors remove underlines; the duplicate-response alert needs an explicit danger-colored inline chat link. */
.tb-duplicate-response-chat-link {
    color: var(--tb-danger);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.16em;
}

.tb-duplicate-response-chat-link:hover,
.tb-duplicate-response-chat-link:focus-visible {
    color: var(--tb-danger);
    text-decoration: underline;
}

.tb-duplicate-response-chat-link:focus-visible {
    outline: 3px solid rgba(220, 38, 38, 0.25);
    outline-offset: 3px;
    border-radius: 0.2rem;
}

button,
input,
textarea,
select {
    font: inherit;
}

#app {
    min-height: 100vh;
    min-height: 100dvh;
}

/*
 * Workspace routes must paint the full document canvas so the warm public-page
 * body background cannot show through below long authenticated pages.
 */
html:has(.tb-workspace-layout),
body:has(.tb-workspace-layout),
#app:has(.tb-workspace-layout) {
    background: var(--tb-workspace-background);
}

.tb-workspace-layout {
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--tb-workspace-background);
}

.tb-shell,
.tb-app-shell {
    /*
     * Main authenticated workspace container.
     * If profile, orders, responses, or work items start stretching too wide,
     * adjust --tb-layout-max-width above instead of editing every page.
     */
    display: grid;
    grid-template-columns: var(--tb-sidebar-width) minmax(0, 1fr);
    gap: 1.25rem;
    width: min(var(--tb-layout-max-width), calc(100% - 2rem));
    margin: 0 auto;
    min-height: calc(100vh - var(--tb-header-height));
    min-height: calc(100dvh - var(--tb-header-height));
    padding: 0 0 1.25rem;
}

.tb-sidebar,
.tb-app-sidebar {
    /* Keeps the left navigation attached under the fixed top bar on desktop. */
    position: sticky;
    top: calc(var(--tb-header-height) + 1.25rem);
    align-self: start;
    height: calc(100vh - var(--tb-header-height) - 2.5rem);
    height: calc(100dvh - var(--tb-header-height) - 2.5rem);
    padding: 0;
}

.tb-main,
.tb-app-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: 1.25rem;
    min-height: calc(100vh - var(--tb-header-height) - 1.25rem);
    min-height: calc(100dvh - var(--tb-header-height) - 1.25rem);
    min-width: 0;
    padding: 0;
}

.tb-content,
.tb-app-content {
    min-height: 100%;
    padding-bottom: 1rem;
}

.tb-nav-panel,
.tb-card,
.tb-panel,
.tb-empty,
.tb-loading,
.tb-alert,
.tb-form,
.tb-table-wrap {
    backdrop-filter: blur(18px);
    background: var(--tb-surface);
    border: 1px solid var(--tb-line);
    box-shadow: var(--tb-shadow);
}

.tb-home-page {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fbfc 0%, #f7fafb 42%, #f6fafc 100%);
}

.tb-home-header {
    /* Makes the header stick to the top of the viewport while scrolling */
    position: sticky;

    /* Defines the sticky position: the header sticks when it reaches the top */
    top: 0;

    /* Keeps the header above most other page elements */
    z-index: 40;

    /* Adds a nearly white, slightly transparent background */
    background: rgba(255, 255, 255, 0.94);

    /* Adds a subtle bottom border to separate the header from the content */
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);

    /* Adds a soft shadow below the header */
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);

    /* Blurs the content behind the semi-transparent header */
    backdrop-filter: blur(14px);
}

.tb-home-header-inner,
.tb-home-main {
    /*
     * Shared public-page width.
     * This intentionally uses the same width variable as the workspace shell
     * so both layout modes stay visually aligned.
     */
    width: min(var(--tb-layout-max-width), calc(100% - 2rem));

    /* Centers the block horizontally */
    margin: 0 auto;
}

.tb-home-header-inner {
    /* Places child elements in a horizontal row */
    display: flex;

    /* Vertically centers child elements inside the header */
    align-items: center;

    /* Pushes the first and last child elements to opposite sides */
    justify-content: space-between;

    /* Adds spacing between child elements if they get close to each other */
    gap: 1.25rem;

    /* Sets the minimum header height, while still allowing it to grow if needed */
    min-height: 74px;
}

.tb-home-header.is-workspace .tb-home-header-inner,
.tb-home-header-inner.is-workspace {
    /*
     * Workspace top bar grid.
     * Must mirror the shell below it, otherwise the top bar drifts full-width
     * while the sidebar/content area stays centered.
     */
    width: min(var(--tb-layout-max-width), calc(100% - 2rem));
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: var(--tb-sidebar-width) minmax(0, 1fr);
    align-items: center;
    gap: 1.25rem;
}

.tb-home-header.is-workspace .tb-home-nav,
.tb-home-header-inner.is-workspace .tb-home-nav {
    justify-content: flex-end;
}

.tb-home-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--tb-accent);
}

.tb-home-brand-mark {
    width: 42px;
    height: 42px;
    color: var(--tb-accent);
}

.tb-home-brand-mark svg {
    width: 100%;
    height: 100%;
}

.tb-home-brand-copy {
    color: var(--tb-accent);
    font-size: 2rem;
    line-height: 1;
}

.tb-home-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.9rem 1.35rem;
    flex-wrap: wrap;
}

.tb-home-nav-link,
.tb-home-user-menu summary {
    color: var(--tb-ink);
    font-weight: 700;
}

.tb-home-nav-register,
.tb-home-user-menu summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.75rem 1.2rem;
    border-radius: 14px;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tb-home-nav-register {
    color: #fff;
    background: linear-gradient(180deg, #12a8a1 0%, #0d9488 100%);
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.18);
}

.tb-home-nav-register:hover,
.tb-home-nav-register:focus-visible {
    background: linear-gradient(180deg, #10b4ac 0%, #0f8f85 100%);
    box-shadow: 0 16px 30px rgba(13, 148, 136, 0.22);
}

.tb-home-nav .tb-language-switcher {
    padding: 0.2rem;
    border-radius: 14px;
    background: #fff;
}

.tb-home-nav .tb-language-button {
    min-width: 44px;
    padding: 0.5rem 0.65rem;
}

.tb-home-nav .tb-language-button.is-active {
    background: var(--tb-accent);
}

.tb-home-user-menu {
    position: relative;
}

.tb-home-user-menu summary {
    list-style: none;
    cursor: pointer;
    border: 1px solid rgba(226, 232, 240, 1);
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    gap: 0.65rem;
}

.tb-home-user-menu summary::-webkit-details-marker {
    display: none;
}

.tb-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    object-fit: cover;
    flex: 0 0 auto;
}

.tb-avatar-fallback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tb-accent-strong, #0f766e);
    color: #fff;
    font-weight: 800;
    font-size: 1rem;
}

.tb-home-user-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
}

.tb-home-user-name {
    max-width: 14rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-home-user-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 0.6rem);
    display: grid;
    min-width: 200px;
    padding: 0.55rem;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 40px rgba(15, 23, 42, 0.12);
}

.tb-home-user-dropdown a,
.tb-home-user-dropdown button {
    border: 0;
    padding: 0.8rem 0.95rem;
    border-radius: 12px;
    color: var(--tb-ink);
    background: transparent;
    text-align: left;
    font-weight: 700;
    cursor: pointer;
}

.tb-home-user-dropdown a:hover,
.tb-home-user-dropdown button:hover {
    background: rgba(13, 148, 136, 0.08);
}

.tb-home-main {
    padding: 2rem 0 2.5rem;
}

.tb-home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.02fr) minmax(440px, 0.98fr);
    align-items: center;
    gap: 2.5rem;
    padding: 1.4rem 0 2.4rem;
}

.tb-home-copy {
    max-width: 560px;

    /* Moves only the text column to the top of the hero section */
    align-self: start;
}

.tb-home-copy h1 {
    margin: 0;
    font-size: clamp(3.3rem, 6vw, 4.85rem);
    line-height: 0.95;
    letter-spacing: -0.065em;
}

.tb-home-copy h1 span {
    display: block;
}

.tb-home-description {
    max-width: 510px;
    margin: 1.3rem 0 0;
    color: var(--tb-ink-soft);
    font-size: 1.28rem;
    line-height: 1.6;
}

.tb-home-description+.tb-home-hero-actions {
    margin-top: 2rem;
}

.tb-home-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.9rem;
}

.tb-home-page .tb-button {
    min-height: 58px;
    padding: 0.9rem 1.7rem;
    border-radius: 18px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.tb-home-page .tb-button-secondary {
    border-color: rgba(13, 148, 136, 0.9);
    color: var(--tb-accent);
    background: #fff;
}

.tb-home-note {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin: 1.05rem 0 0;
    color: #64748b;
    font-weight: 600;
}

.tb-home-note span[aria-hidden="true"] {
    display: inline-flex;
    flex: 0 0 auto;
}

.tb-home-note svg {
    width: 20px;
    height: 20px;
    color: #94a3b8;
    flex: 0 0 auto;
}

.tb-home-visual {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 520px;
    padding: 2rem;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 34px;
    background:
        radial-gradient(circle at 70% 18%, rgba(13, 148, 136, 0.16), transparent 34%),
        radial-gradient(circle at 18% 82%, rgba(37, 99, 235, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f8fbfc 100%);
    box-shadow: 0 32px 64px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.tb-home-visual::before,
.tb-home-visual::after {
    content: "";
    position: absolute;
    border-radius: 999px;
}

.tb-home-visual::before {
    width: 380px;
    height: 380px;
    right: -120px;
    top: 40px;
    background: rgba(13, 148, 136, 0.08);
}

.tb-home-visual::after {
    left: 44px;
    bottom: 42px;
    width: 180px;
    height: 14px;
    background: rgba(15, 118, 110, 0.10);
}

.tb-home-visual-card {
    position: relative;
    z-index: 1;
    display: grid;
    width: min(100%, 520px);
    aspect-ratio: 4 / 3;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 30px;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(255, 255, 255, 0.96));
    box-shadow: 0 28px 56px rgba(15, 23, 42, 0.12);
    overflow: hidden;
}

.tb-home-visual-image {
    display: block;
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-home-visual-image[src=""],
.tb-home-visual-image:not([src]) {
    display: none;
}

.tb-home-cta-stack {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.tb-home-cta-stack-item {
    display: block;
    width: 70px;
    height: 14px;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.tb-home-cta-stack-item.is-blue {
    background: linear-gradient(180deg, #8fd0d7 0%, #75b5c0 100%);
}

.tb-home-cta-stack-item.is-sand {
    background: linear-gradient(180deg, #efe7cf 0%, #d8cda8 100%);
}

.tb-home-cta-stack-item.is-white {
    background: linear-gradient(180deg, #ffffff 0%, #edf3f6 100%);
}

.tb-home-cta-sprout {
    position: relative;
    width: 74px;
    height: 94px;
}

.tb-home-cta-sprout-leaf {
    position: absolute;
    bottom: 28px;
    width: 28px;
    height: 58px;
    border-radius: 999px 999px 0 999px;
    background: linear-gradient(180deg, #a7de9c 0%, #65b66d 100%);
    transform-origin: bottom center;
}

.tb-home-cta-sprout-leaf.is-left {
    left: 12px;
    transform: rotate(-26deg);
}

.tb-home-cta-sprout-leaf.is-right {
    right: 10px;
    border-radius: 999px 999px 999px 0;
    transform: rotate(26deg);
}

.tb-home-cta-sprout-pot {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 0;
    height: 28px;
    border-radius: 10px 10px 14px 14px;
    background: linear-gradient(180deg, #fdfefe 0%, #dbe6ea 100%);
    border: 1px solid rgba(203, 213, 225, 0.9);
}

.tb-home-section {
    padding: 2rem 0 0;
}

.tb-home-section-title {
    margin: 0;
    text-align: center;
    font-size: clamp(2.1rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.tb-home-steps {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
    margin-top: 1.8rem;
}

.tb-home-steps::before {
    content: "";
    position: absolute;
    top: 52px;
    left: 12%;
    right: 12%;
    border-top: 2px dashed rgba(13, 148, 136, 0.25);
}

.tb-home-step-card {
    position: relative;
    z-index: 1;
    padding: 1.5rem 1.4rem 1.25rem;
    border: 1px solid rgba(226, 232, 240, 1);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.06);
    text-align: left;
}

.tb-home-step-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tb-home-step-number {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: rgba(13, 148, 136, 0.08);
    color: var(--tb-accent);
    font-size: 1.35rem;
    font-weight: 800;
}

.tb-home-step-illustration {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: rgba(13, 148, 136, 0.08);
    color: var(--tb-accent);
}

.tb-home-step-illustration svg {
    width: 28px;
    height: 28px;
}

.tb-home-step-card h3 {
    margin: 0;
    font-size: 1.65rem;
    line-height: 1.2;
    letter-spacing: -0.04em;
}

.tb-home-step-card p {
    margin: 0.65rem 0 0;
    color: #64748b;
}

.tb-home-cta-banner {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 190px;
    align-items: center;
    gap: 1.25rem;
    margin-top: 2.4rem;
    padding: 1.7rem 1.8rem;
    border: 1px solid rgba(214, 230, 235, 0.9);
    border-radius: 28px;
    background: linear-gradient(180deg, #f3fbfb 0%, #eef7f7 100%);
    box-shadow: 0 24px 42px rgba(15, 23, 42, 0.05);
}

.tb-home-cta-copy {
    text-align: center;
}

.tb-home-cta-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.05;
    letter-spacing: -0.05em;
}

.tb-home-cta-copy p {
    margin: 0.7rem 0 0;
    color: #64748b;
}

.tb-home-cta-copy .tb-home-hero-actions {
    justify-content: center;
    margin-top: 1.2rem;
}

.tb-home-cta-art {
    display: flex;
    align-items: end;
    gap: 0.7rem;
}

.tb-home-cta-art.is-right {
    justify-content: flex-end;
}

.tb-home-cta-mug {
    width: 42px;
    height: 48px;
    margin-bottom: 4px;
    border-radius: 0 0 14px 14px;
    background: linear-gradient(180deg, #52bcc3 0%, #179ca4 100%);
    position: relative;
}

.tb-home-cta-mug::after {
    content: "";
    position: absolute;
    top: 11px;
    right: -12px;
    width: 15px;
    height: 18px;
    border: 3px solid #179ca4;
    border-left: 0;
    border-radius: 0 12px 12px 0;
}

.tb-home-cta-cap {
    position: relative;
    width: 84px;
    height: 52px;
    margin-bottom: 10px;
}

.tb-home-cta-cap::before,
.tb-home-cta-cap::after {
    content: "";
    position: absolute;
}

.tb-home-cta-cap::before {
    inset: 0;
    background: #1f2937;
    clip-path: polygon(50% 0, 100% 36%, 50% 72%, 0 36%);
}

.tb-home-cta-cap::after {
    right: 10px;
    top: 20px;
    width: 4px;
    height: 28px;
    background: #eab308;
    border-radius: 999px;
    box-shadow: 0 28px 0 0 #eab308;
}

.tb-home-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.6rem 0 0.2rem;
    color: #64748b;
    font-size: 0.95rem;
}

.tb-page-header h1 {
    margin: 0;
    font-size: clamp(2.15rem, 4vw, 3.6rem);
    line-height: 1.03;
    letter-spacing: -0.04em;
}

.tb-page-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tb-page-header p,
.tb-card p,
.tb-panel p,
.tb-empty p,
.tb-loading p,
.tb-form-help,
.tb-list-meta {
    color: var(--tb-ink-soft);
}

.tb-eyebrow {
    margin: 0 0 0.35rem;
    color: var(--tb-accent-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    text-transform: uppercase;
}

.tb-nav-panel {
    padding: 1rem;
}

.tb-nav-panel,
.tb-app-nav-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--tb-radius-lg);
    background: rgba(255, 255, 255, 0.9);
}

.tb-nav-list,
.tb-app-nav {
    display: grid;
    gap: 0.45rem;
}

.tb-nav-link,
.tb-app-nav-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-height: 52px;
    border-radius: 16px;
    padding: 0.88rem 1rem;
    color: var(--tb-ink-soft);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.tb-nav-link span:last-child,
.tb-app-nav-link span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tb-nav-link.active,
.tb-nav-link:hover,
.tb-nav-link:focus-visible,
.tb-app-nav-link.active,
.tb-app-nav-link:hover,
.tb-app-nav-link:focus-visible {
    background: rgba(13, 148, 136, 0.10);
    color: var(--tb-ink);
    box-shadow: inset 3px 0 0 rgba(13, 148, 136, 0.9);
    transform: translateX(2px);
}

.tb-app-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #64748b;
    flex: 0 0 auto;
}

.tb-app-nav-icon svg {
    width: 100%;
    height: 100%;
}

.tb-nav-link-button {
    width: 100%;
    border: 0;
    text-align: left;
    background: transparent;
    cursor: pointer;
}

.tb-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.tb-language-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem;
    border: 1px solid var(--tb-line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
}

.tb-language-button {
    min-width: 48px;
    border: 0;
    border-radius: 999px;
    padding: 0.45rem 0.75rem;
    background: transparent;
    color: var(--tb-ink-soft);
    font-weight: 800;
    cursor: pointer;
}

.tb-language-button.is-active {
    background: var(--tb-ink);
    color: #fff;
}

.tb-screen-reader-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.tb-stack,
.tb-grid-cards,
.tb-form-grid,
.tb-list {
    display: grid;
    gap: 1rem;
}

.tb-card,
.tb-panel,
.tb-form,
.tb-empty,
.tb-loading,
.tb-alert,
.tb-table-wrap {
    border-radius: var(--tb-radius-lg);
    padding: 1.5rem;
}

.tb-grid-cards {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.tb-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tb-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.85rem 1.2rem;
    border-radius: 16px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 800;
    line-height: 1.2;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, border-color 0.2s ease;
}

.tb-button:hover,
.tb-button:focus-visible {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
}

.tb-button-primary {
    background: linear-gradient(135deg, var(--tb-accent) 0%, var(--tb-accent-strong) 100%);
    color: white;
}

.tb-button-primary:hover,
.tb-button-primary:focus-visible {
    background: linear-gradient(135deg, #10a79b 0%, #0f7e76 100%);
}

.tb-button-secondary {
    border-color: rgba(13, 148, 136, 0.24);
    background: rgba(255, 255, 255, 0.96);
    color: var(--tb-accent-strong);
}

.tb-button-secondary:hover,
.tb-button-secondary:focus-visible {
    border-color: rgba(13, 148, 136, 0.4);
    background: rgba(240, 253, 250, 0.92);
}

.tb-button-danger {
    background: rgba(201, 81, 77, 0.12);
    color: var(--tb-danger);
}

.tb-button:disabled,
.tb-button.is-disabled {
    opacity: 0.6;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.tb-form {
    max-width: 760px;
}

.tb-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tb-field {
    display: grid;
    gap: 0.45rem;
}

.tb-field-full {
    grid-column: 1 / -1;
}

.tb-label {
    font-size: 0.92rem;
    font-weight: 800;
}

.tb-input,
.tb-select,
.tb-textarea {
    width: 100%;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: var(--tb-radius-sm);
    background: var(--tb-surface-strong);
    padding: 0.82rem 0.95rem;
    min-height: 52px;
    color: var(--tb-ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tb-password-field {
    position: relative;
}

.tb-password-input {
    padding-right: 6.6rem;
}

.tb-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.8rem;
    transform: translateY(-50%);
    border: 0;
    padding: 0.2rem 0;
    background: transparent;
    color: var(--tb-accent-strong);
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
}

.tb-password-toggle:focus-visible {
    outline: 2px solid rgba(15, 157, 138, 0.3);
    border-radius: 6px;
}

.tb-input:focus,
.tb-select:focus,
.tb-textarea:focus {
    outline: 2px solid rgba(15, 157, 138, 0.16);
    box-shadow: 0 0 0 4px rgba(15, 157, 138, 0.08);
    border-color: rgba(15, 157, 138, 0.42);
}

.tb-textarea {
    min-height: 124px;
    resize: vertical;
}

.tb-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-weight: 700;
}

.tb-link {
    color: var(--tb-accent-strong);
    font-weight: 800;
}

.tb-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.tb-list-item {
    border: 1px solid var(--tb-line);
    border-radius: var(--tb-radius-md);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.58);
}

.tb-list-item-head,
.tb-detail-grid {
    display: grid;
    gap: 0.75rem;
}

.tb-open-request-card {
    padding: 1.1rem 1.15rem;
}

.tb-open-request-card__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: end;
}

.tb-open-request-card__body {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.tb-open-request-card__body h2 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.tb-open-request-card__metadata {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0;
    font-size: 0.9rem;
}

.tb-open-request-card__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.tb-open-request-card__meta-icon {
    display: inline-grid;
    place-items: center;
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
}

.tb-open-request-card__meta-icon svg {
    width: 100%;
    height: 100%;
}

.tb-open-request-card__description {
    margin: 0;
    color: var(--tb-ink-soft);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.tb-open-request-card__actions {
    display: flex;
    align-self: end;
    justify-content: flex-end;
}

.tb-open-request-card__button {
    width: auto;
    white-space: nowrap;
}

.tb-response-card__content {
    min-width: 0;
}

.tb-response-card__order-link {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.tb-detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.tb-detail {
    padding: 0.9rem 1rem;
    border: 1px solid var(--tb-line);
    border-radius: var(--tb-radius-md);
    background: rgba(255, 255, 255, 0.6);
}

.tb-detail dt {
    margin-bottom: 0.3rem;
    color: var(--tb-ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.tb-detail dd {
    margin: 0;
    font-weight: 700;
}

.tb-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(15, 157, 138, 0.10);
    color: var(--tb-accent-strong);
    font-size: 0.85rem;
    font-weight: 800;
}

.tb-card h2,
.tb-panel h2,
.tb-empty h2,
.tb-loading h2,
.tb-alert h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.tb-alert {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.875rem;
    align-items: flex-start;
    padding: 1rem 1.125rem;
    border-width: 1px;
    border-style: solid;
    border-radius: 18px;
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0f766e;
}

.tb-alert-info {
    background: #f0fdfa;
    border-color: #99f6e4;
    color: #0f766e;
}

.tb-alert-success {
    background: #f0fdf4;
    border-color: #86efac;
    color: #166534;
}

.tb-alert-warning {
    background: #fffbeb;
    border-color: #fcd34d;
    color: #92400e;
}

.tb-alert-error {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.tb-alert-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    flex: 0 0 1.5rem;
    margin-top: 0.05rem;
}

.tb-alert-info .tb-alert-icon {
    color: #0d9488;
}

.tb-alert-success .tb-alert-icon {
    color: #16a34a;
}

.tb-alert-warning .tb-alert-icon {
    color: #d97706;
}

.tb-alert-error .tb-alert-icon {
    color: #dc2626;
}

.tb-alert-icon svg {
    width: 100%;
    height: 100%;
}

.tb-alert-body {
    min-width: 0;
}

.tb-alert-body> :first-child {
    margin-top: 0;
}

.tb-alert-body> :last-child {
    margin-bottom: 0;
}

.tb-alert p {
    margin: 0;
    white-space: pre-line;
}

.tb-alert ul {
    margin: 0.5rem 0 0;
    padding-left: 1rem;
}

.tb-alert-actions {
    margin-top: 0.85rem;
}

.tb-empty,
.tb-loading {
    text-align: center;
}

.tb-dashboard-page {
    gap: 1.5rem;
}

.tb-profile-page-header {
    padding: 0;
}

.tb-profile-page-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3.2vw, 2.55rem);
    letter-spacing: -0.04em;
}

.tb-profile-page-header p {
    margin: 0.55rem 0 0;
    color: var(--tb-ink-soft);
    max-width: 760px;
}

.tb-profile-card {
    border: 1px solid var(--tb-line);
    border-radius: 30px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 252, 0.96) 100%);
    box-shadow: var(--tb-shadow);
    padding: clamp(1.2rem, 2.8vw, 2rem);
}

.tb-public-profile-section {
    display: grid;
    gap: 1.1rem;
}

.tb-public-profile-section-header h2 {
    margin: 0;
    font-size: clamp(1.75rem, 3vw, 2.35rem);
    line-height: 1.15;
}

.tb-public-profile-section-header p {
    margin: 0.35rem 0 0;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-public-profile-card {
    display: grid;
    gap: 0;
    border: 1px solid rgba(203, 213, 225, 0.86);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 54px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.tb-public-profile-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: clamp(1.2rem, 3vw, 2.4rem);
    padding: clamp(1.35rem, 3vw, 2rem);
}

.tb-public-profile-avatar {
    width: clamp(104px, 14vw, 148px);
    height: clamp(104px, 14vw, 148px);
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.tb-public-profile-avatar-fallback {
    display: inline-grid;
    place-items: center;
    background: linear-gradient(180deg, #14b8a6 0%, #0f766e 100%);
    color: #ffffff;
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
}

.tb-public-profile-main {
    min-width: 0;
}

.tb-public-profile-main h3 {
    margin: 0;
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.15;
}

.tb-public-profile-description {
    margin: 1rem 0 0;
    color: var(--tb-ink);
    font-weight: 700;
}

.tb-public-profile-meta {
    margin: 0.7rem 0 0;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-public-profile-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid rgba(226, 232, 240, 0.95);
    border-bottom: 1px solid rgba(226, 232, 240, 0.95);
}

.tb-public-profile-column {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.9rem;
    padding: clamp(1.15rem, 2.6vw, 1.7rem);
    min-width: 0;
}

.tb-public-profile-column + .tb-public-profile-column {
    border-left: 1px solid rgba(226, 232, 240, 0.95);
}

.tb-public-profile-column-icon,
.tb-public-profile-notice-icon,
.tb-public-profile-contact-item span:first-child,
.tb-public-profile-contact-warning span {
    display: inline-grid;
    place-items: center;
    color: var(--tb-accent-strong);
}

.tb-public-profile-column-icon svg,
.tb-public-profile-notice-icon svg,
.tb-public-profile-contact-item svg,
.tb-public-profile-contact-warning svg {
    width: 22px;
    height: 22px;
}

.tb-public-profile-column h4,
.tb-public-profile-notice h4,
.tb-public-profile-contacts h4 {
    margin: 0;
    font-size: 1rem;
}

.tb-public-profile-column p {
    margin: 0.65rem 0 0;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-public-profile-column .tb-chip-list {
    margin-top: 0.65rem;
}

.tb-public-profile-notice,
.tb-public-profile-contacts {
    margin: clamp(1.15rem, 2.6vw, 1.55rem);
    border: 1px solid rgba(203, 213, 225, 0.95);
    border-radius: 18px;
    background: rgba(248, 250, 252, 0.86);
}

.tb-public-profile-notice {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.95rem;
    align-items: start;
    padding: 1.05rem 1.2rem;
}

.tb-public-profile-notice p {
    margin: 0.3rem 0 0;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-public-profile-contacts {
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
    border-color: rgba(13, 148, 136, 0.28);
    background: rgba(240, 253, 250, 0.38);
}

.tb-public-profile-contact-heading,
.tb-public-profile-contact-list,
.tb-public-profile-contact-item,
.tb-public-profile-contact-warning {
    display: flex;
    align-items: center;
}

.tb-public-profile-contact-heading {
    gap: 0.75rem;
    color: var(--tb-accent-strong);
}

.tb-public-profile-contact-list {
    flex-wrap: wrap;
    gap: 0.9rem 2rem;
}

.tb-public-profile-contact-item {
    gap: 0.65rem;
    min-width: min(100%, 12rem);
    color: var(--tb-ink);
    font-weight: 800;
}

.tb-public-profile-contact-warning {
    gap: 0.75rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(13, 148, 136, 0.18);
    border-radius: 14px;
    background: rgba(240, 253, 250, 0.72);
}

.tb-public-profile-contact-warning p {
    margin: 0;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-profile-form {
    max-width: none;
    display: grid;
    gap: 1.3rem;
}

.tb-profile-form-section {
    border: 1px solid rgba(16, 32, 51, 0.08);
    border-radius: 24px;
    padding: clamp(1rem, 2vw, 1.4rem);
    background: rgba(255, 255, 255, 0.84);
    display: grid;
    gap: 1rem;
}

.tb-profile-form-section-responses {
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.5) 0%, rgba(255, 255, 255, 0.9) 100%);
}

.tb-profile-avatar-section {
    background: rgba(255, 255, 255, 0.92);
}

.tb-profile-avatar-layout {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.6vw, 1.7rem);
    flex-wrap: wrap;
}

.tb-profile-avatar-preview {
    width: clamp(96px, 18vw, 128px);
    height: clamp(96px, 18vw, 128px);
    font-size: clamp(2.35rem, 6vw, 3.35rem);
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.13);
}

.tb-profile-avatar-copy {
    display: grid;
    gap: 0.9rem;
    min-width: min(100%, 280px);
    flex: 1 1 280px;
}

.tb-profile-avatar-copy p {
    margin: 0;
    color: var(--tb-ink-soft);
}

.tb-profile-avatar-actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.tb-profile-avatar-upload-shell {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.tb-profile-avatar-upload-label {
    margin: 0;
    cursor: pointer;
}

/* Keep the real file input in the DOM for Blazor OnChange while the associated label owns the visible click target. */
.tb-profile-avatar-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.tb-profile-avatar-file-input:disabled {
    cursor: default;
}

.tb-profile-form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
}

.tb-profile-form-section-header h2 {
    margin: 0;
    font-size: 1.4rem;
    letter-spacing: -0.03em;
}

.tb-profile-form-section-header p {
    margin: 0.35rem 0 0;
    color: var(--tb-ink-soft);
}

.tb-profile-form-section-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: rgba(15, 157, 138, 0.12);
    color: var(--tb-accent-strong);
    display: inline-grid;
    place-items: center;
    flex: 0 0 44px;
}

.tb-profile-form-section-icon svg {
    width: 24px;
    height: 24px;
}

/* Profile-only Work format segmented picker; list/search filters intentionally continue using plain selects. */
.tb-profile-work-format-segments {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.tb-profile-work-format-option {
    min-height: 104px;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: 18px;
    background: rgba(248, 251, 252, 0.9);
    color: var(--tb-ink);
    box-shadow: 0 12px 28px rgba(16, 32, 51, 0.06);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0.55rem;
    padding: 0.9rem;
    font: inherit;
    font-weight: 800;
    text-align: center;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.tb-profile-work-format-option:hover,
.tb-profile-work-format-option:focus-visible {
    border-color: rgba(13, 148, 136, 0.34);
    background: rgba(240, 253, 250, 0.82);
    box-shadow: 0 16px 34px rgba(13, 148, 136, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.tb-profile-work-format-option.is-selected {
    border-color: rgba(13, 148, 136, 0.68);
    background: rgba(240, 253, 250, 0.95);
    color: var(--tb-accent-strong);
    box-shadow: 0 18px 38px rgba(13, 148, 136, 0.15);
}

.tb-profile-work-format-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: rgba(15, 157, 138, 0.1);
    color: var(--tb-accent-strong);
}

.tb-profile-work-format-icon svg {
    width: 25px;
    height: 25px;
}

.tb-profile-service-picker {
    display: grid;
    gap: 0.85rem;
}

.tb-profile-service-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    min-height: 44px;
}

.tb-profile-service-empty {
    margin: 0;
    color: var(--tb-ink-soft);
}

.tb-profile-service-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 38px;
    padding: 0.4rem 0.55rem 0.4rem 0.85rem;
    border: 1px solid rgba(13, 148, 136, 0.28);
    border-radius: 999px;
    background: rgba(15, 157, 138, 0.11);
    color: var(--tb-accent-strong);
    font-weight: 700;
}

.tb-profile-service-chip-remove {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 157, 138, 0.16);
    color: inherit;
    cursor: pointer;
    font: inherit;
    line-height: 1;
}

.tb-profile-service-chip-remove span {
    display: inline-grid;
    place-items: center;
}

.tb-profile-service-chip-remove svg {
    width: 14px;
    height: 14px;
}

.tb-profile-service-search-shell {
    position: relative;
}

.tb-profile-service-results {
    position: absolute;
    z-index: 5;
    top: calc(100% + 0.45rem);
    left: 0;
    right: 0;
    display: grid;
    gap: 0.25rem;
    padding: 0.45rem;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(16, 32, 51, 0.12);
}

.tb-filter-card {
    /* Service suggestions are absolute children and must paint above following list or empty-state surfaces. */
    position: relative;
    z-index: 10;
    background: var(--tb-surface-strong);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: var(--tb-radius-lg);
    gap: 1rem;
    padding: clamp(1.1rem, 2.6vw, 1.5rem);
}

.tb-filter-card-header {
    display: grid;
    gap: 0.25rem;
}

.tb-filter-card-header h2 {
    margin: 0;
    font-size: 1.18rem;
}

.tb-filter-card-header p {
    margin: 0;
    color: var(--tb-ink-soft);
}

/* Order filter panels keep full-width fields stacked above a compact, right-aligned reset action. */
.tb-filter-fields {
    display: grid;
    gap: 1rem;
}

.tb-filter-actions {
    display: flex;
    justify-content: flex-end;
}

.tb-filter-service-field {
    min-width: 0;
}

.tb-filter-service-picker {
    position: relative;
}

.tb-filter-service-control {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    min-height: 48px;
    width: 100%;
    border: 1px solid rgba(16, 32, 51, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.35rem 0.55rem;
}

.tb-filter-service-control:focus-within {
    border-color: rgba(15, 157, 138, 0.5);
    box-shadow: 0 0 0 3px rgba(15, 157, 138, 0.12);
}

.tb-filter-service-chip {
    min-height: 30px;
    max-width: 100%;
    padding: 0.28rem 0.45rem 0.28rem 0.7rem;
}

.tb-filter-service-chip > span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tb-filter-service-input {
    flex: 1 1 10rem;
    min-width: 8rem;
    border: none;
    outline: none;
    background: transparent;
    color: var(--tb-ink);
    font: inherit;
    padding: 0.45rem 0.2rem;
}

.tb-filter-suggestion-results {
    max-height: 15rem;
    overflow-y: auto;
}

.tb-filter-suggestion-results .tb-profile-service-result {
    border-radius: 10px;
    padding: 0.55rem 0.7rem;
}

.tb-profile-service-status {
    padding: 0.8rem 0.9rem;
    color: var(--tb-ink-soft);
}

.tb-profile-service-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border: none;
    border-radius: 14px;
    background: rgba(248, 251, 252, 0.9);
    padding: 0.8rem 0.9rem;
    color: var(--tb-ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.tb-profile-service-result:hover,
.tb-profile-service-result:focus-visible {
    background: rgba(15, 157, 138, 0.08);
}

.tb-profile-response-hint {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    border-radius: 16px;
    border: 1px solid rgba(13, 148, 136, 0.2);
    background: rgba(240, 253, 250, 0.55);
    padding: 0.8rem 0.9rem;
    color: #0f766e;
}

.tb-profile-response-hint span {
    display: inline-grid;
    place-items: center;
}

.tb-profile-response-hint svg {
    width: 19px;
    height: 19px;
}

.tb-profile-response-hint p {
    margin: 0;
    font-size: 0.92rem;
}

.tb-profile-form-actions {
    align-items: center;
    margin-top: 0.2rem;
}

.tb-profile-save-status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    max-width: min(100%, 34rem);
    padding: 0.35rem 0.65rem 0.35rem 0.4rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.25;
}

.tb-profile-save-status.is-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.tb-profile-save-status.is-error {
    border: 1px solid rgba(201, 81, 77, 0.26);
    background: rgba(254, 242, 242, 0.92);
    color: var(--tb-danger);
}

.tb-profile-save-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    flex: 0 0 1.35rem;
    border-radius: 999px;
    background: #16a34a;
    color: #ffffff;
}

.tb-profile-save-status-icon svg {
    width: 0.9rem;
    height: 0.9rem;
    stroke-width: 3;
}

.tb-auth-card {
    width: min(100%, 560px);
    padding: 1.7rem;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 251, 252, 0.96) 100%);
}

.tb-auth-page {
    display: grid;
    justify-items: center;
    align-items: start;
    padding: 2.75rem 0 1rem;
}

.tb-auth-form-grid {
    grid-template-columns: 1fr;
    gap: 0.9rem;
}

.tb-form-status-slot {
    min-height: 2rem;
    margin-bottom: 0.5rem;
}

.tb-form-status-slot .tb-alert,
.tb-form-status-slot .tb-empty,
.tb-form-status-slot .tb-loading {
    margin: 0;
}

.tb-chat-card {
    padding: clamp(1.1rem, 2.6vw, 1.55rem);
    border-color: rgba(203, 213, 225, 0.82);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.84);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.07);
}

.tb-chat-card__content {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: clamp(1rem, 2.6vw, 1.65rem);
    align-items: start;
}

.tb-chat-card__icon,
.tb-chat-card__open {
    display: inline-grid;
    place-items: center;
    color: var(--tb-accent-strong);
    background: linear-gradient(180deg, rgba(240, 253, 250, 0.96) 0%, rgba(228, 244, 243, 0.94) 100%);
}

.tb-chat-card__icon {
    width: clamp(64px, 8vw, 82px);
    height: clamp(64px, 8vw, 82px);
    border-radius: 20px;
}

.tb-chat-card__icon svg,
.tb-chat-card__open svg,
.tb-chat-card__meta-icon svg {
    width: 100%;
    height: 100%;
}

.tb-chat-card__icon svg,
.tb-chat-card__meta-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tb-chat-card__body {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.tb-chat-card__header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
}

.tb-chat-card__heading {
    min-width: 0;
}

.tb-chat-card__title {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.tb-chat-card__title a {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: bottom;
    white-space: nowrap;
}

.tb-chat-card__title a:hover,
.tb-chat-card__title a:focus-visible,
.tb-chat-card__profile-link:hover,
.tb-chat-card__profile-link:focus-visible {
    color: var(--tb-accent-strong);
}

.tb-chat-card__hint {
    margin: 0.35rem 0 0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 700;
}

.tb-chat-card__open {
    width: clamp(48px, 6vw, 64px);
    height: clamp(48px, 6vw, 64px);
    border-radius: 999px;
    transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.tb-chat-card__open span {
    display: inline-grid;
    place-items: center;
}

.tb-chat-card__open svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tb-chat-card__open:hover,
.tb-chat-card__open:focus-visible {
    background: rgba(13, 148, 136, 0.14);
    box-shadow: 0 12px 24px rgba(13, 148, 136, 0.16);
    transform: translateX(2px);
}

.tb-chat-card__divider {
    border-top: 1px solid rgba(226, 232, 240, 0.95);
}

.tb-chat-card__meta {
    display: grid;
    gap: 0.65rem;
}

.tb-chat-card__meta-row {
    display: grid;
    grid-template-columns: 1.5rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    margin: 0;
    color: var(--tb-ink);
    font-size: 1rem;
}

.tb-chat-card__meta-row strong {
    font-weight: 800;
}

.tb-chat-card__meta-icon {
    width: 1.35rem;
    height: 1.35rem;
    margin-top: 0.1rem;
    color: rgba(13, 148, 136, 0.74);
}

.tb-chat-card__profile-link,
.tb-chat-card__profile-text {
    color: var(--tb-ink);
    font-weight: 700;
}

.tb-chat-card__message-row > span:last-child {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.tb-chat-preview {
    margin: 0;
    color: var(--tb-ink-soft);
    white-space: pre-wrap;
    word-break: break-word;
}

.tb-chat-thread-panel {
    padding: 1.25rem;
}

.tb-chat-thread {
    display: grid;
    gap: 0.85rem;
}

.tb-chat-message {
    display: grid;
    gap: 0.35rem;
    max-width: min(42rem, 100%);
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.92);
}

.tb-chat-message.is-own {
    margin-left: auto;
    background: rgba(13, 148, 136, 0.10);
    border-color: rgba(13, 148, 136, 0.22);
}

.tb-chat-message-meta {
    margin: 0;
    color: var(--tb-ink-soft);
    font-size: 0.86rem;
    font-weight: 700;
}

.tb-chat-message-body {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.tb-chat-composer {
    gap: 1rem;
}

.tb-chat-textarea {
    min-height: 140px;
    resize: vertical;
}

.tb-validation-slot {
    min-height: 1.25rem;
    display: flex;
    align-items: flex-start;
}

.tb-auth-switch {
    margin: 1.1rem 0 0;
    text-align: center;
    color: var(--tb-ink-soft);
    font-weight: 700;
}

.tb-auth-actions {
    margin-top: 0.35rem;
}

.tb-auth-actions .tb-button {
    width: 100%;
}

.tb-password-policy-hint {
    margin: 0;
    white-space: pre-line;
}

.tb-table-wrap {
    overflow-x: auto;
}

.tb-table {
    width: 100%;
    border-collapse: collapse;
}

.tb-table th,
.tb-table td {
    padding: 0.8rem 0.4rem;
    border-bottom: 1px solid var(--tb-line);
    text-align: left;
}

.tb-table th {
    color: var(--tb-ink-soft);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.validation-message {
    display: block;
    color: var(--tb-danger);
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.25rem;
}

.valid.modified:not([type=checkbox]),
.invalid {
    outline: none;
}

/*
 * Blazor toggles this host element after unhandled client errors.
 * Keep it suppressed so raw runtime failure banners are not shown to users.
 */
#blazor-error-ui {
    display: none !important;
}

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto;
    margin: 0 auto;
}

.loading-progress circle {
    fill: none;
    stroke: #d8e0ea;
    stroke-width: 0.6rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--tb-accent);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

.loading-progress-text {
    position: absolute;
    inset: calc(20vh + 3.25rem) 0 auto;
    text-align: center;
    font-weight: 800;
}

.loading-progress-text:after {
    content: var(--blazor-load-percentage-text, "Loading");
}

@media (max-width: 1080px) {

    /*
     * Tablet breakpoint: collapse the workspace from two columns into one.
     * If the sidebar should remain visible longer on medium screens,
     * move this breakpoint lower.
     */

    .tb-shell,
    .tb-app-shell {
        grid-template-columns: 1fr;
    }

    .tb-sidebar,
    .tb-app-sidebar {
        position: static;
        height: auto;
    }

}

@media (max-width: 720px) {

    /*
     * Mobile breakpoint: reduce outer gutters so the content keeps breathing
     * room without touching the viewport edges.
     */

    .tb-sidebar,
    .tb-app-sidebar,
    .tb-main,
    .tb-app-main {
        padding: 0;
    }

    .tb-shell,
    .tb-app-shell {
        width: calc(100% - 1.5rem);
        padding: 0 0 1rem;
    }

    .tb-nav-panel.is-collapsed {
        display: none;
    }

    .tb-form-grid {
        grid-template-columns: 1fr;
    }

    .tb-page-header {
        align-items: start;
        flex-direction: column;
    }

    .tb-page-header {
        align-items: stretch;
        flex-direction: column;
    }

    .tb-profile-form-section-header {
        flex-direction: column;
    }

    .tb-public-profile-header {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .tb-public-profile-columns {
        grid-template-columns: 1fr;
    }

    .tb-public-profile-column + .tb-public-profile-column {
        border-left: 0;
        border-top: 1px solid rgba(226, 232, 240, 0.95);
    }

    .tb-public-profile-contact-list,
    .tb-public-profile-contact-warning {
        align-items: flex-start;
        flex-direction: column;
    }

    .tb-profile-work-format-segments {
        grid-template-columns: 1fr;
    }

    .tb-profile-work-format-option {
        min-height: 82px;
    }

    .tb-profile-service-result {
        align-items: flex-start;
        flex-direction: column;
    }

    .tb-actions {
        width: 100%;
    }

    .tb-button {
        width: 100%;
    }

    .tb-profile-save-status {
        width: fit-content;
        justify-content: flex-start;
        text-align: left;
    }

    .tb-filter-actions .tb-button {
        width: auto;
    }

    .tb-open-request-card__content {
        grid-template-columns: 1fr;
    }

    .tb-open-request-card__actions {
        justify-content: flex-end;
    }

    .tb-open-request-card__button {
        width: auto;
    }

    .tb-chat-card__content {
        grid-template-columns: 1fr;
    }

    .tb-chat-card__icon {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .tb-chat-card__header {
        align-items: start;
    }

    .tb-home-header.is-workspace .tb-home-header-inner,
    .tb-home-header-inner.is-workspace {
        /* On narrow screens the header stops reserving a sidebar column. */
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
}

@media (max-width: 1120px) {

    .tb-home-hero {
        grid-template-columns: 1fr;
    }

    .tb-home-copy {
        max-width: 100%;
    }

    .tb-home-visual {
        min-height: auto;
    }

    .tb-home-steps {
        grid-template-columns: 1fr;
    }

    .tb-home-steps::before,
    .tb-home-cta-art {
        display: none;
    }

    .tb-home-cta-banner {
        grid-template-columns: 1fr;
        padding: 1.8rem 1.4rem;
    }

    .tb-home-footer {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 760px) {

    .tb-home-header-inner,
    .tb-home-main {
        width: calc(100% - 1.5rem);
    }

    .tb-home-header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 0.9rem 0;
    }

    .tb-home-nav {
        justify-content: flex-start;
    }

    .tb-home-brand-copy {
        font-size: 1.75rem;
    }

    .tb-home-copy h1 {
        font-size: clamp(2.7rem, 11vw, 3.5rem);
    }

    .tb-home-description {
        font-size: 1.08rem;
    }

    .tb-home-hero-actions,
    .tb-home-cta-copy .tb-home-hero-actions {
        flex-direction: column;
    }

    .tb-home-visual {
        min-height: auto;
        padding: 1rem;
        border-radius: 28px;
    }

    .tb-home-visual-card {
        width: 100%;
        border-radius: 24px;
    }

    .tb-home-step-card h3 {
        font-size: 1.45rem;
    }

    .tb-auth-card {
        padding: 1.35rem;
        border-radius: 24px;
    }

}
