﻿:root {
    --th-red: #AA3930;
    --th-red-deep: #7A2822;
    --th-gold: #AA3930;
    --th-ivory: #F5F5F5;
    --th-cream: #F5F5F5;
    --th-surface: #FFFFFF;
    --th-ink: #1A1A1A;
    --th-muted: #6B6B6B;
    --th-line: #E6E6E6;
    --th-shadow: 0 10px 28px rgba(0, 0, 0, 0.06);
    --th-photo: #ffffff;
    --th-bg: #FAFAFA;
    --th-serif: "IBM Plex Sans Condensed", "IBM Plex Sans", "Segoe UI", sans-serif;
    --th-sans: "IBM Plex Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --color-sf-primary: 170, 57, 48;
    --color-sf-primary-text-color: 255, 255, 255;
}

html.th-dark {
    --th-red: #E07A72;
    --th-red-deep: #C45B52;
    --th-gold: #E07A72;
    --th-ivory: #12141A;
    --th-cream: #12141A;
    --th-surface: #1C1F28;
    --th-ink: #F3F4F6;
    --th-muted: #A3AAB8;
    --th-line: #2E3440;
    --th-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
    --th-photo: #ffffff;
    --th-bg: #161922;
    --color-sf-primary: 224, 122, 114;
    --color-sf-primary-text-color: 255, 255, 255;
}

html, body {
    font-family: var(--th-sans);
    color: var(--th-ink);
    background: var(--th-ivory);
    letter-spacing: 0.01em;
}

h1, h2, h3, h4, .th-serif {
    font-family: var(--th-serif);
    font-weight: 600;
    letter-spacing: 0.02em;
}

a, .btn-link {
    color: var(--th-red);
}

.btn-primary {
    color: #fff;
    background-color: var(--th-red);
    border-color: var(--th-red-deep);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--th-red) !important;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.material-symbols-outlined {
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 24;
    font-weight: 300;
    line-height: 1;
}

.mud-icon-root {
    opacity: 0.92;
}

.mud-button .mud-button-icon-start .mud-icon-root,
.mud-button-filled .mud-icon-root {
    opacity: 1;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid var(--th-red);
}

.validation-message {
    color: var(--th-red);
    font-size: 0.8rem;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.status-bar-safe-area {
    display: none;
}

@supports (-webkit-touch-callout: none) {
    .status-bar-safe-area {
        display: flex;
        position: sticky;
        top: 0;
        height: env(safe-area-inset-top);
        background-color: var(--th-ivory);
        width: 100%;
        z-index: 1;
    }

    .flex-column, .navbar-brand {
        padding-left: env(safe-area-inset-left);
    }
}

.e-tab-text {
    color: var(--th-red) !important;
    font-family: var(--th-sans) !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    font-size: 0.75rem !important;
}

.e-indicator {
    background-color: var(--th-red) !important;
}

/* Layout */
.th-shell {
    min-height: 100vh;
    background: var(--th-ivory);
}

.th-appbar.mud-appbar,
.th-appbar .mud-toolbar,
.th-appbar .mud-toolbar-appbar {
    background: var(--th-surface) !important;
    color: var(--th-ink) !important;
    overflow: visible !important;
}

.th-appbar.mud-appbar {
    border-bottom: 3px solid var(--th-red);
    box-shadow: 0 8px 24px rgba(28, 25, 23, 0.06) !important;
    padding-right: max(0.75rem, env(safe-area-inset-right)) !important;
}

.th-appbar .mud-toolbar {
    padding-right: 0.25rem !important;
}

.th-cart-wrap {
    flex: 0 0 auto;
    position: relative;
    z-index: 20;
    margin-left: 0.35rem;
}

.th-cart-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.45rem 0.3rem 0.5rem;
    border: none;
    background: var(--th-red);
    color: #fff;
    cursor: pointer;
    min-height: 38px;
    overflow: visible;
}

.th-cart-btn:hover {
    background: var(--th-red-deep);
}

.th-cart-btn.is-pulse {
    animation: th-cart-pulse 0.6s ease;
}

.th-cart-btn.is-pulse .th-cart-count {
    transform: scale(1.15);
}

@keyframes th-cart-pulse {
    0% { transform: scale(1); }
    30% { transform: scale(1.14); }
    100% { transform: scale(1); }
}

.th-cart-btn .mud-icon-root {
    color: #fff !important;
    font-size: 1.2rem !important;
    opacity: 1;
}

.th-cart-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.th-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.55rem;
    height: 1.55rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: #fff;
    color: var(--th-red);
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.th-logo {
    height: 34px;
    width: auto;
    flex-shrink: 0;
    background: #fff;
    border-radius: 8px;
    padding: 2px 4px;
    box-sizing: content-box;
}

.th-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
    color: inherit;
}

.th-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}

.th-brand-name {
    font-family: var(--th-sans);
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: var(--th-ink);
}

.th-brand-branch {
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.16em;
    color: var(--th-red);
    margin-left: 0.35em;
}

.th-brand-loc {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
    color: var(--th-muted);
}

.th-brand-motto {
    font-family: var(--th-serif);
    font-style: italic;
    color: var(--th-red);
}

.th-appbar-tools {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
    margin-right: 0.75rem;
}

.th-mobile-tools {
    display: flex;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
}

.th-mobile-tools .th-search-host,
.th-mobile-tools .th-search-host.th-search-mobile {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.th-branch-host {
    flex: 0 0 148px;
    width: 148px;
    min-width: 148px;
}

.th-branch-host.th-branch--appbar {
    flex: 0 0 auto;
    width: 118px;
    min-width: 108px;
    max-width: 132px;
    margin-right: 0.25rem;
}

.th-branch-host.th-branch--drawer {
    flex: none;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.th-drawer-branch {
    width: 100%;
}

.th-branch-host.th-branch--mobile {
    flex: 0 0 132px;
    width: 132px;
    min-width: 132px;
}

.th-branch-field {
    width: 100%;
    margin: 0 !important;
}

.th-branch-field .mud-input-root {
    background: var(--th-surface);
}

.th-branch--appbar .th-branch-field .mud-input-label {
    font-size: 0.7rem !important;
}

.th-appbar-tools .th-search-host {
    flex: 0 0 300px;
    width: 300px;
    min-width: 300px;
    max-width: 300px;
}

.th-search-host {
    position: relative;
    display: flex;
    align-items: stretch;
    flex: 0 0 340px;
    width: 340px;
    min-width: 340px;
    max-width: 340px;
    z-index: 40;
}

.th-search-host.th-search-mobile {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-width: none;
}

.th-search-field {
    width: 100%;
    margin: 0 !important;
}

.th-search-field.mud-input-control-margin-dense {
    margin: 0 !important;
}

.th-search-field .mud-input-control-helper-container,
.th-search-field .mud-input-helper-text {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.th-search .mud-input-outlined-border,
.th-search-field .mud-input-outlined-border {
    border-color: var(--th-line) !important;
}

.th-search-host.is-busy .mud-input-adornment-end .mud-icon-button:not(:last-child),
.th-search-host.is-busy .mud-input-clear-button,
.th-search-host.is-busy button[aria-label="Clear"] {
    display: none !important;
}

.th-search-spin {
    position: absolute;
    right: 2.35rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.th-search-spin .mud-progress-circular {
    width: 18px !important;
    height: 18px !important;
}

.th-search-drop {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: -1px;
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-top: none;
    box-shadow: var(--th-shadow);
    z-index: 50;
    max-height: 360px;
    overflow: auto;
    text-align: left;
}

.th-main.mud-main-content {
    background: var(--th-ivory);
    padding-top: 5.25rem !important;
}

.th-page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0.75rem 1.5rem 2.5rem;
}

.th-drawer.mud-drawer {
    background: var(--th-surface) !important;
    border-right: 1px solid var(--th-line);
    color: var(--th-ink) !important;
}

.th-drawer .mud-nav-link {
    border-radius: 2px;
    margin-bottom: 0.2rem;
    color: var(--th-ink) !important;
    letter-spacing: 0.06em;
    font-size: 0.82rem;
}

.th-drawer .mud-nav-link .mud-icon-root {
    color: var(--th-red) !important;
    font-size: 1.35rem !important;
    opacity: 0.95;
}

.th-drawer .mud-nav-link.active,
.th-drawer .mud-nav-link:hover {
    background: rgba(170, 57, 48, 0.08) !important;
    color: var(--th-red) !important;
}

.th-page-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 0 0 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--th-line);
    min-height: 4.75rem;
}

.th-page-header__row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    width: 100%;
}

.th-page-header__lead {
    flex: 0 0 2.75rem;
    width: 2.75rem;
    height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.1rem;
}

.th-page-header__text {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.th-page-header__icon {
    color: var(--th-red);
    font-size: 1.55rem;
    line-height: 1;
    font-variation-settings: "FILL" 0, "wght" 300, "GRAD" -25, "opsz" 24;
}

.th-page-header h1,
.th-page-header__title {
    font-family: var(--th-serif);
    font-size: 1.85rem;
    font-weight: 500;
    margin: 0;
    color: var(--th-ink);
    letter-spacing: 0.02em;
    line-height: 1.2;
}

.th-page-header__subtitle {
    margin: 0;
    color: var(--th-muted);
    font-size: 0.9rem;
    max-width: 40rem;
    line-height: 1.4;
    min-height: 1.4em;
}

.th-back {
    cursor: pointer;
    color: var(--th-red);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
    width: 2.75rem;
    height: 2.75rem;
    min-width: 2.75rem;
    min-height: 2.75rem;
}

/* Category tiles */
.th-loader-host {
    display: block;
    width: 100%;
}

.th-category-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

.th-category-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 300px;
    cursor: pointer;
    background: var(--th-surface);
    box-shadow: var(--th-shadow);
    border: 1px solid var(--th-line);
    border-top: 3px solid var(--th-gold);
}

.th-category-card:hover {
    border-color: var(--th-gold);
    box-shadow: 0 16px 36px rgba(176, 137, 104, 0.16);
}

.th-category-card img {
    flex: 1;
    width: 100%;
    min-height: 0;
    object-fit: contain;
    object-position: center;
    padding: 1.25rem 1.25rem 0.5rem;
    background: var(--th-photo);
}

.th-category-card__count {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    background: #dc3545;
    border: 1px solid #dc3545;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #fff;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
    position: static;
}

.th-category-card__overlay {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1.1rem 1rem;
    background: var(--th-surface);
    color: var(--th-ink);
    border-top: 1px solid var(--th-line);
}

.th-category-card__overlay h3 {
    margin: 0;
    min-width: 0;
    flex: 1 1 auto;
    font-size: 1.5rem;
    color: var(--th-ink);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Product cards */
.th-product-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: 1.25rem;
}

.th-product-card {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-top: 3px solid var(--th-gold);
    box-shadow: var(--th-shadow);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.th-product-card:hover {
    transform: translateY(-3px);
    border-color: var(--th-gold);
    box-shadow: 0 18px 48px rgba(176, 137, 104, 0.14);
}

.th-product-card.is-added {
    border-color: var(--th-red);
    box-shadow: 0 0 0 3px var(--th-red), 0 18px 40px rgba(170, 57, 48, 0.22);
    animation: th-added-pop 0.4s ease;
}

.th-product-card.is-added:hover {
    transform: none;
    border-color: var(--th-red);
}

@keyframes th-added-pop {
    0% { transform: scale(1); }
    35% { transform: scale(1.03); }
    100% { transform: scale(1); }
}

.th-product-card__media {
    position: relative;
    height: 240px;
    background: var(--th-photo);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.th-product-card__stamp {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    background: rgba(170, 57, 48, 0.88);
    color: #fff;
    animation: th-stamp-in 0.28s ease;
}

.th-product-card__stamp .mud-icon-root {
    font-size: 3rem !important;
    color: #fff !important;
    opacity: 1;
}

.th-product-card__stamp span {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

@keyframes th-stamp-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.th-product-card__media img {
    max-width: 85%;
    max-height: 85%;
    width: auto;
    height: auto;
    object-fit: contain;
    background: var(--th-photo);
}

.th-product-card__body {
    padding: 1.1rem 1.15rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.th-product-card__body h3 {
    font-size: 1.35rem;
    margin: 0 0 0.4rem;
}

.th-product-card__desc {
    color: var(--th-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin: 0 0 0.4rem;
    flex: 1;
    overflow-wrap: anywhere;
}

.th-product-card__desc.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.th-desc-toggle {
    align-self: flex-start;
    margin: 0 0 0.85rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--th-red);
    cursor: pointer;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.th-product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--th-line);
}

.th-product-card__footer .th-add-btn {
    margin-left: auto;
}

.th-price-tag {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--th-surface);
    color: var(--th-ink);
    padding: 5px 10px 5px 8px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    z-index: 2;
    line-height: 1;
    border: 1px solid var(--th-line);
    max-width: calc(100% - 20px);
}

.th-price-tag--discount {
    align-items: flex-start;
    border-radius: 14px;
    padding: 7px 10px 6px 8px;
}

.th-price-tag::before {
    content: "";
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    background: var(--th-red);
    border-radius: 50%;
    margin-top: 0.28rem;
}

.th-price-tag__stack {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.th-price-tag__amount {
    font-family: var(--th-serif);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--th-red);
    letter-spacing: 0.01em;
}

.th-price-tag__was {
    font-size: 0.62rem;
    color: var(--th-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
}

.th-price-tag__label {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--th-muted);
    margin-left: -2px;
    line-height: 1.25;
}

.th-price-tag__off {
    color: var(--th-red);
    font-weight: 700;
}

.th-discount-banner {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    margin: 0 0 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(170, 57, 48, 0.22);
    border-left: 3px solid var(--th-red);
    background: linear-gradient(90deg, rgba(170, 57, 48, 0.08), transparent 70%);
    border-radius: 10px;
}

.th-discount-banner__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: var(--th-red);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.th-discount-banner__text {
    color: var(--th-ink);
    font-size: 0.88rem;
    line-height: 1.35;
}

.th-price {
    font-family: var(--th-serif);
    color: var(--th-red);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.th-price__was {
    display: block;
    margin-top: 0.2rem;
    font-family: var(--th-sans);
    font-size: 0.78rem;
    color: var(--th-muted);
    text-decoration: line-through;
}

.th-price small,
.th-price__note {
    display: block;
    margin-top: 0.15rem;
    font-family: var(--th-sans);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--th-gold);
}

.th-add-btn.mud-button-filled {
    font-weight: 700 !important;
    letter-spacing: 0.03em;
    min-height: 36px;
    flex-shrink: 0;
    min-width: 8.5rem;
}

.th-add-btn.is-added.mud-button-filled {
    background: var(--th-surface) !important;
    color: var(--th-red) !important;
    box-shadow: inset 0 0 0 2px var(--th-red) !important;
    min-width: 10rem;
}

.th-add-btn.is-added.mud-button-filled .mud-icon-root {
    color: var(--th-red) !important;
    opacity: 1;
}

.th-empty {
    color: var(--th-muted);
    padding: 2rem 0;
}

/* Login */
.th-login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background:
        radial-gradient(ellipse at 20% 0%, rgba(170, 57, 48, 0.12) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 100%, rgba(170, 57, 48, 0.06) 0%, transparent 50%),
        var(--th-ivory);
}

.th-login-card {
    width: min(920px, 100%);
    display: grid;
    grid-template-columns: 1fr;
    background: var(--th-surface);
    border-radius: 16px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 24px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.th-login-brand {
    background: linear-gradient(155deg, var(--th-red) 0%, var(--th-red-deep) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2.5rem 2.25rem;
    position: relative;
}

.th-login-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.08), transparent 50%),
        radial-gradient(circle at 70% 80%, rgba(0, 0, 0, 0.12), transparent 50%);
    pointer-events: none;
}

.th-login-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    background: #fff;
    border-radius: 14px;
    padding: 0.4rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.th-login-branch {
    font-size: 0.62rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    opacity: 0.72;
    font-weight: 500;
}

.th-login-brand h1 {
    color: #fff;
    font-family: var(--th-serif);
    font-size: 1.75rem;
    margin: 0.35rem 0 0.55rem;
    letter-spacing: 0.04em;
    text-transform: none;
    line-height: 1.15;
    font-weight: 700;
}

.th-login-brand p {
    margin: 0;
    max-width: 22rem;
    font-size: 0.88rem;
    line-height: 1.6;
    opacity: 0.85;
}

.th-login-motto {
    font-family: var(--th-serif);
    font-size: 1.2rem;
    font-style: italic;
    letter-spacing: 0.02em;
    opacity: 0.98;
    margin-bottom: 0.55rem !important;
    line-height: 1.35;
}

.th-login-lead {
    opacity: 0.8;
}

.th-contact-motto {
    font-family: var(--th-serif);
    font-size: 1.25rem;
    font-style: italic;
    color: var(--th-red);
    margin: 0 0 1rem;
    line-height: 1.35;
}

.th-contact-name {
    font-size: 1.65rem;
    margin: 0 0 0.15rem;
}

.th-contact-branch {
    margin: 0 0 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.68rem;
    color: var(--th-red);
    font-weight: 600;
}

.th-contact-region {
    margin-top: 1.5rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--th-red);
}

.th-login-form {
    padding: 2.25rem 2rem 2rem;
    display: flex;
    flex-direction: column;
}

.th-login-heading {
    margin-bottom: 1.25rem;
}

.th-login-heading span {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--th-red);
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.th-login-heading h2 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--th-ink);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.th-login-tabs .mud-tabs-toolbar {
    background: transparent !important;
    border-bottom: 2px solid var(--th-line);
    min-height: 0;
}

.th-login-tabs .mud-tab {
    text-transform: none !important;
    letter-spacing: 0.02em;
    font-weight: 600;
    font-size: 0.9rem;
    min-width: 0;
    padding: 0.8rem 1.1rem;
    color: var(--th-muted) !important;
    background: transparent !important;
    opacity: 1 !important;
    transition: color 0.2s ease;
}

.th-login-tabs .mud-tab:hover {
    color: var(--th-ink) !important;
    background: transparent !important;
}

.th-login-tabs .mud-tab.mud-tab-active {
    color: var(--th-red) !important;
    background: transparent !important;
}

.th-login-tabs .mud-tab-slider {
    background: var(--th-red) !important;
    height: 3px !important;
    border-radius: 3px 3px 0 0 !important;
}

.th-login-panel {
    padding-top: 1.35rem;
}

.th-login-help {
    margin: 0.5rem 0 1.25rem;
    font-size: 0.82rem;
    color: var(--th-muted);
}

.th-login-link {
    border: none;
    background: none;
    padding: 0;
    color: var(--th-red);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition: opacity 0.15s;
}

.th-login-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.th-login-submit {
    margin-top: 0.35rem;
    min-height: 46px;
    font-weight: 700 !important;
    border-radius: 10px !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.02em !important;
    box-shadow: 0 2px 8px rgba(170, 57, 48, 0.25) !important;
    transition: box-shadow 0.2s ease, transform 0.15s ease !important;
}

.th-login-submit:hover {
    box-shadow: 0 4px 14px rgba(170, 57, 48, 0.35) !important;
    transform: translateY(-1px);
}

.th-login-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.th-login-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.35rem;
}

.th-login-form .mud-input-outlined .mud-input-outlined-border {
    border-color: var(--th-line) !important;
    border-radius: 10px !important;
    transition: border-color 0.2s ease !important;
}

.th-login-form .mud-input:focus-within .mud-input-outlined-border {
    border-color: var(--th-red) !important;
    border-width: 2px !important;
}

.th-login-form .mud-input-label {
    font-size: 0.85rem !important;
}

.th-login-form .mud-input-label-outlined {
    transform: translate(14px, -6px) scale(0.75) !important;
    background: var(--th-surface);
    padding: 0 4px;
}

.th-verify-section {
    text-align: center;
    padding: 0.5rem 0;
}

.th-verify-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--th-ink);
    margin: 0 0 0.5rem;
}

.th-verify-description {
    font-size: 0.85rem;
    color: var(--th-muted);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.th-status-dialog {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    background: var(--th-surface);
    border-radius: 20px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    width: min(720px, calc(100vw - 2rem));
    max-height: min(90vh, 820px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--th-line);
}

.th-status-dialog__hero {
    padding: 1.35rem 1.5rem 1.15rem;
    background: linear-gradient(155deg, rgba(170, 57, 48, 0.08), transparent 55%);
    border-bottom: 1px solid var(--th-line);
}

.th-status-dialog__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.th-status-dialog__close {
    margin: -4px -8px 0 0;
}

.th-status-dialog__kicker {
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--th-red);
    font-weight: 700;
}

.th-status-dialog__title {
    font-family: var(--th-serif);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--th-ink);
    margin: 0.35rem 0 0;
    letter-spacing: 0.02em;
}

.th-status-dialog__current {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.85rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--th-surface);
    border: 1px solid rgba(170, 57, 48, 0.22);
    color: var(--th-red);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.th-status-dialog__layout {
    display: grid;
    grid-template-columns: 168px minmax(0, 1fr);
    flex: 1;
    min-height: 0;
}

.th-status-dialog__rail {
    padding: 1.25rem 1rem 1.25rem 1.35rem;
    background: var(--th-bg);
    border-right: 1px solid var(--th-line);
    overflow-y: auto;
}

.th-status-rail-step {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    position: relative;
}

.th-status-rail-step:not(:last-child)::after {
    content: "";
    position: absolute;
    left: 13px;
    top: calc(100% - 4px);
    width: 2px;
    height: calc(0.55rem + 8px);
    background: var(--th-line);
}

.th-status-rail-step.is-done:not(:last-child)::after {
    background: rgba(170, 57, 48, 0.35);
}

.th-status-rail-step__marker {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 2px solid var(--th-line);
    background: var(--th-surface);
    color: var(--th-muted);
}

.th-status-rail-step.is-done .th-status-rail-step__marker {
    background: var(--th-red);
    border-color: var(--th-red);
    color: #fff;
}

.th-status-rail-step.is-current .th-status-rail-step__marker {
    border-color: var(--th-red);
    color: var(--th-red);
    box-shadow: 0 0 0 4px rgba(170, 57, 48, 0.1);
}

.th-status-rail-step__label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--th-muted);
    line-height: 1.25;
}

.th-status-rail-step.is-done .th-status-rail-step__label,
.th-status-rail-step.is-current .th-status-rail-step__label {
    color: var(--th-ink);
}

.th-status-rail-step.is-current .th-status-rail-step__label {
    font-weight: 700;
}

.th-status-dialog__main {
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
}

.th-status-dialog__body {
    flex: 1;
    overflow-y: auto;
    padding: 1.35rem 1.5rem;
}

.th-status-dialog__footer {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 1.5rem 1.35rem;
    border-top: 1px solid var(--th-line);
    background: var(--th-surface);
}

.th-status-section__title {
    margin: 0 0 0.35rem;
    font-family: var(--th-serif);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--th-ink);
}

.th-status-section__lead {
    margin: 0 0 1.15rem;
    font-size: 0.88rem;
    color: var(--th-muted);
    line-height: 1.55;
}

.th-status-section--centered {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.th-status-next-card {
    text-align: center;
    max-width: 320px;
    padding: 1.5rem 1rem;
}

.th-status-next-card__icon {
    color: var(--th-red);
    margin-bottom: 0.75rem;
}

.th-status-next-card__title {
    margin: 0 0 0.5rem;
    font-family: var(--th-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--th-ink);
}

.th-status-next-card__text {
    margin: 0;
    font-size: 0.88rem;
    color: var(--th-muted);
    line-height: 1.55;
}

.th-status-action {
    border-radius: 12px !important;
    text-transform: none !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
}

.th-status-action--primary {
    box-shadow: 0 8px 20px rgba(170, 57, 48, 0.22);
}

.th-status-action--ghost {
    opacity: 0.9;
}

.th-return-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.th-return-onceoff {
    margin-top: 1rem;
    padding: 0.85rem 0.9rem;
    border-radius: 12px;
    background: var(--th-ivory);
    border: 1px dashed var(--th-line);
}

.th-return-onceoff__title {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-return-onceoff__lead {
    margin: 0 0 0.65rem;
    font-size: 0.76rem;
    color: var(--th-muted);
    line-height: 1.4;
}

.th-return-onceoff__item {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 0.75rem;
    padding: 0.45rem 0;
    border-top: 1px solid var(--th-line);
}

.th-return-onceoff__item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.th-return-onceoff__name {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--th-ink);
}

.th-return-onceoff__meta {
    font-size: 0.72rem;
    color: var(--th-muted);
}

.th-return-item {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.th-return-item.is-expanded {
    border-color: rgba(170, 57, 48, 0.28);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.th-return-item__main {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.95rem 1rem;
}

.th-return-item.is-returned {
    opacity: 0.72;
    background: var(--th-bg);
}

.th-return-item__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.th-return-item__name {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--th-ink);
    line-height: 1.3;
}

.th-return-item__type {
    display: inline-flex;
    align-items: center;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--th-line);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--th-muted);
    background: var(--th-ivory);
}

.th-return-item__type.is-daily {
    color: var(--th-red);
    border-color: rgba(170, 57, 48, 0.28);
    background: rgba(170, 57, 48, 0.08);
}

.th-return-item__type.is-monthly {
    color: #8C6B62;
    border-color: rgba(140, 107, 98, 0.35);
    background: rgba(184, 149, 107, 0.16);
}

.th-return-item__meta {
    font-size: 0.76rem;
    color: var(--th-muted);
    font-weight: 500;
}

.th-return-item__qtyselect {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 2px;
    border-radius: 10px;
    background: var(--th-bg);
    border: 1px solid var(--th-line);
}

.th-qty-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--th-ink);
    cursor: pointer;
}

.th-qty-btn:hover:not(:disabled) {
    background: rgba(170, 57, 48, 0.08);
    color: var(--th-red);
}

.th-qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.th-qty-btn__value {
    min-width: 1.75rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--th-ink);
}

.th-return-item__hire {
    padding: 1rem 1rem 1.1rem;
    background: var(--th-bg);
    border-top: 1px solid var(--th-line);
}

.th-return-item__hire-title {
    margin: 0 0 0.75rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--th-red);
}

.th-return-item__hire-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.th-return-item__hire-footer {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--th-line);
}

.th-return-item__hire-duration {
    width: 100%;
    min-width: 0;
}

.th-return-item__hire-duration .e-float-input,
.th-return-item__hire-duration .e-control-wrapper {
    width: 100%;
}

.th-return-item__hire-note {
    font-size: 0.78rem;
    color: var(--th-muted);
    font-weight: 600;
    line-height: 1.4;
}

@media (max-width: 640px) {
    .th-status-dialog__layout {
        grid-template-columns: 1fr;
    }

    .th-status-dialog__rail {
        display: flex;
        gap: 0.35rem;
        padding: 0.85rem 1rem;
        border-right: none;
        border-bottom: 1px solid var(--th-line);
        overflow-x: auto;
    }

    .th-status-rail-step {
        flex-direction: column;
        align-items: center;
        min-width: 4.5rem;
        padding: 0;
        text-align: center;
    }

    .th-status-rail-step:not(:last-child)::after {
        display: none;
    }

    .th-status-rail-step__label {
        font-size: 0.62rem;
    }

    .th-return-item__hire-grid {
        grid-template-columns: 1fr;
    }

    .th-status-section--centered {
        min-height: 160px;
    }
}

/* Legacy status stepper — kept for reference, superseded by rail */
.th-status-stepper {
    display: none;
}

.th-status-dialog__prompt {
    font-size: 0.9rem;
    color: var(--th-ink);
    margin: 0 0 1rem;
    text-align: center;
    line-height: 1.5;
}

.th-hire-auto-dates {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--th-bg);
    border: 1px solid var(--th-line);
    font-size: 0.82rem;
    color: var(--th-muted);
    line-height: 1.5;
}

.th-hire-auto-dates strong {
    color: var(--th-ink);
}

.th-history-timeline {
    position: relative;
    padding-left: 20px;
    margin-bottom: 1rem;
}

.th-history-timeline::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--th-line);
}

.th-history-entry {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
    position: relative;
}

.th-history-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
    margin-left: -20px;
    z-index: 1;
}

.th-history-content {
    flex: 1;
    min-width: 0;
}

.th-history-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--th-ink);
}

.th-history-note {
    font-size: 0.75rem;
    color: var(--th-muted);
    margin-top: 2px;
    white-space: pre-line;
}

.th-history-date {
    font-size: 0.7rem;
    color: var(--th-muted);
    margin-top: 2px;
}

.th-history-timeline--wide {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 0;
    margin: 0;
}

.th-history-timeline--wide::before {
    display: none;
}

.th-history-timeline--wide .th-history-entry {
    display: grid;
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 0.75rem 0.85rem;
    align-items: start;
    padding: 0.9rem 1rem;
    margin: 0;
    border: 1px solid var(--th-line);
    border-left: 3px solid var(--th-history-accent, var(--th-red));
    border-radius: 10px;
    background: var(--th-surface);
}

.th-history-timeline--wide .th-history-dot {
    width: 10px;
    height: 10px;
    margin: 0.35rem 0 0;
}

.th-history-timeline--wide .th-history-content {
    min-width: 0;
}

.th-history-entry__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.35rem 1rem;
}

.th-history-timeline--wide .th-history-label {
    font-size: 0.86rem;
}

.th-history-timeline--wide .th-history-date {
    margin-top: 0;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.th-history-timeline--wide .th-history-note {
    margin-top: 0.45rem;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--th-ink);
    white-space: pre-line;
}

.th-contact {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    padding: 2.5rem 2rem;
    box-shadow: var(--th-shadow);
    max-width: 640px;
}

.th-contact p {
    color: var(--th-muted);
    margin-bottom: 0.5rem;
}

.th-contact-block {
    margin: 1.15rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid var(--th-line);
}

.th-contact-label {
    display: block;
    margin-bottom: 0.35rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--th-red);
}

.th-contact-value {
    margin: 0 !important;
    color: var(--th-ink) !important;
    line-height: 1.45;
}

.th-contact-link {
    color: var(--th-red);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.th-contact-link:hover {
    border-bottom-color: var(--th-red);
    color: var(--th-red-deep);
}

.th-contact-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.55rem;
    margin-top: 0.55rem;
}

.th-contact-sep {
    color: var(--th-line);
}

.th-contact-hours {
    list-style: none;
    margin: 0;
    padding: 0;
    color: var(--th-ink);
    line-height: 1.55;
}

.th-contact-lead {
    margin-top: 1.35rem !important;
}

.th-customer-edit {
    min-width: min(560px, 92vw);
}

.th-customer-edit__hint {
    font-size: 0.72rem;
    color: var(--th-muted);
    margin-top: 0.35rem;
    line-height: 1.35;
}

.th-customer-edit__field-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--th-muted);
}

.th-customer-edit__categories {
    margin-top: 1rem;
    border: 1px solid var(--th-line);
    border-radius: 10px;
    background: var(--th-ivory);
    overflow: hidden;
}

.th-customer-edit__categories-head {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid var(--th-line);
    background: var(--th-surface);
}

.th-customer-edit__categories-head > span:first-child {
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--th-red);
}

.th-customer-edit__categories-note {
    font-size: 0.72rem;
    color: var(--th-muted);
}

.th-customer-edit__categories-list {
    max-height: 280px;
    overflow: auto;
    padding: 0.35rem 0.55rem 0.55rem;
}

.th-customer-edit__category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 110px;
    gap: 0.65rem;
    align-items: center;
    padding: 0.35rem 0.3rem;
    border-bottom: 1px solid var(--th-line);
}

.th-customer-edit__category-row:last-child {
    border-bottom: none;
}

.th-customer-edit__category-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    cursor: pointer;
    font-size: 0.88rem;
    color: var(--th-ink);
}

.th-customer-edit__category-toggle input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--th-red);
    flex-shrink: 0;
}

.th-customer-edit__category-toggle span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-customer-edit__discount-input {
    width: 110px;
    height: 2.15rem;
    border: 1px solid var(--th-line);
    border-radius: 8px;
    background: var(--th-surface);
    color: var(--th-ink);
    padding: 0 0.55rem;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.th-customer-edit__discount-input--wide {
    width: 100%;
    max-width: 12rem;
}

.th-customer-edit__discount-input:focus {
    outline: none;
    border-color: var(--th-red);
    box-shadow: 0 0 0 2px rgba(170, 57, 48, 0.18);
}

/* Unlock/lock without waiting for Blazor to re-render Syncfusion's edit dialog */
.th-customer-edit__category-row:not(:has(input[type="checkbox"]:checked)) .th-customer-edit__discount-input {
    opacity: 0.45;
    pointer-events: none;
    background: #ececec;
    color: var(--th-muted);
}

.e-dlg-header,
.e-dlg-header-content {
    font-family: var(--th-serif) !important;
    color: var(--th-ink) !important;
    letter-spacing: 0.04em;
}

.e-footer-content {
    border-top: 1px solid var(--th-line);
}

.th-search-mobile {
    width: 100%;
}

.th-boot {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--th-ivory);
}

.th-search-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.7rem;
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: none;
    border-bottom: 1px solid var(--th-line);
    background: var(--th-surface);
    color: inherit;
    cursor: pointer;
    text-align: left;
}

.th-search-item:last-child {
    border-bottom: none;
}

.th-search-item:hover {
    background: var(--th-ivory);
}

.th-search-item img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--th-photo);
    border: 1px solid var(--th-line);
    flex-shrink: 0;
}

.th-search-item__copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    flex: 1;
    text-align: left;
}

.th-search-item__name {
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.th-search-item__price {
    font-size: 0.75rem;
    color: var(--th-red);
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.th-search-item__off {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--th-red);
    border-radius: 999px;
    padding: 0.12rem 0.4rem;
}

.th-search-empty {
    padding: 0.5rem 0.75rem;
    color: var(--th-muted);
    font-size: 0.85rem;
}

.th-hire-dialog.e-dialog {
    border: 1px solid var(--th-line) !important;
    box-shadow: var(--th-shadow) !important;
    max-width: 100vw;
}

.th-hire-dialog .e-dlg-header-content,
.th-hire-dialog .e-footer-content {
    background: var(--th-surface);
    border-color: var(--th-line) !important;
}

.th-hire-dialog .e-footer-content {
    padding: 0.75rem 1rem !important;
}

.th-hire-dialog .e-dlg-content {
    background: var(--th-ivory);
    padding: 0.85rem 1rem 1.25rem !important;
}

.th-hire-dialog .e-dlg-content > * {
    width: 100%;
    max-width: none;
}

.th-add {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.th-add__hero {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.th-add__media {
    width: 108px;
    height: 108px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--th-photo);
    border: 1px solid var(--th-line);
}

.th-add__media img {
    max-width: 88%;
    max-height: 88%;
    object-fit: contain;
}

.th-add__intro h2 {
    margin: 0 0 0.45rem;
    font-size: 1.45rem;
    line-height: 1.2;
}

.th-add__label {
    font-size: 0.68rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--th-gold);
    margin-bottom: 0.4rem;
}

.th-add__desc .th-desc-toggle {
    margin: 0;
}

.th-add__desc p {
    margin: 0.55rem 0 0;
    color: var(--th-ink);
    font-size: 0.92rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.th-add__desc p.is-clamped {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.th-add__related {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.th-add__note {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: var(--th-muted);
}

.th-add__footer {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.th-add__actions {
    display: flex;
    justify-content: flex-end;
}

.th-hire-title {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.th-hire-title--completed {
    gap: 0.55rem;
    padding-bottom: 0.15rem;
}

.th-hire-title__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.85rem;
    padding-top: 0.15rem;
}

.th-hire-title__contact-item {
    font-size: 0.78rem;
    color: var(--th-muted);
    line-height: 1.4;
    word-break: break-word;
}

.th-hire-title__contact-item:first-child {
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--th-ink);
}

.th-hire-title__contact-item--period {
    font-variant-numeric: tabular-nums;
}

.th-hire-dialog .e-dlg-header-content:has(.th-hire-title--completed) {
    padding-bottom: 0.85rem !important;
}

.th-hire-kicker {
    font-size: 0.65rem;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: var(--th-gold);
}

.th-hire-kicker--motto {
    font-family: var(--th-serif);
    font-size: 1.15rem;
    font-style: italic;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--th-red);
    line-height: 1.3;
}

.th-hire-title .th-serif {
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--th-ink);
}

.th-hire-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.th-hire-layout--wizard {
    gap: 0;
    width: 100%;
    grid-template-columns: 1fr !important;
}

.th-hire-layout--completed {
    gap: 1rem;
    width: 100%;
    grid-template-columns: 1fr;
}

.th-hire-layout--completed .th-hire-pane--cart,
.th-hire-layout--completed .th-hire-pane--history {
    grid-column: 1 / -1;
}

.th-hire-pane--history {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 12px;
    padding: 1rem 1.05rem;
    width: 100%;
}

.th-hire-pane--full {
    width: 100%;
    max-width: none;
}

.th-hire-layout--wizard .th-hire-pane--form.th-hire-pane--full {
    max-width: none;
    margin: 0;
    width: 100%;
}

.th-hire-pane {
    background: transparent;
    border: none;
    padding: 0;
}

.th-hire-pane--form {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 12px;
    padding: 1rem 1.05rem;
}

.th-hire-pane__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.th-hire-pane__head h2 {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-hire-pane__head span {
    font-size: 0.8rem;
    color: var(--th-muted);
}

.th-hire-table {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.th-hire-period {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 12px;
    padding: 0.85rem 0.9rem;
    margin-bottom: 0.85rem;
}

.th-hire-period--summary {
    margin-top: 0.85rem;
    margin-bottom: 0;
    background: var(--th-ivory);
}

.th-hire-period .th-hire-pane__head {
    margin-bottom: 0.5rem;
}

.th-hire-period__pickers {
    margin-bottom: 0.35rem;
}

.th-hire-period__hint,
.th-hire-period__note {
    margin: 0.35rem 0 0;
    font-size: 0.76rem;
    color: var(--th-muted);
    line-height: 1.45;
}

.th-hire-period__note strong {
    color: var(--th-ink);
    font-weight: 600;
}

.th-hire-period__custom {
    margin-top: 0.55rem;
}

.th-hire-period__custom-toggle {
    margin: 0;
}

.th-hire-period__custom-toggle .mud-typography-body1 {
    font-size: 0.82rem;
    font-weight: 600;
}

.th-hire-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 12px;
    overflow: hidden;
}

.th-hire-group + .th-hire-group {
    margin-top: 0;
}

.th-hire-group__head {
    padding: 0.55rem 0.85rem;
    background: var(--th-ivory);
    border-bottom: 1px solid var(--th-line);
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--th-red);
}

.th-hire-line {
    border-bottom: 1px solid var(--th-line);
}

.th-hire-line:last-child {
    border-bottom: none;
}

.th-hire-row {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) auto auto;
    grid-template-rows: auto auto;
    gap: 0.45rem 0.65rem;
    align-items: start;
    padding: 0.65rem 0.85rem;
}

.th-hire-row img {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: var(--th-photo);
    border: 1px solid var(--th-line);
    border-radius: 6px;
}

.th-hire-row__main {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.th-hire-row__bar {
    display: contents;
}

.th-hire-row__bar .th-hire-qtybox {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
    justify-self: end;
}

.th-hire-row__toggle {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    flex-shrink: 1;
    min-width: 0;
}

.th-hire-row__toggle .mud-switch {
    margin: 0;
    padding: 0;
}

.th-hire-row__main strong {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.25;
}

.th-hire-row__price {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--th-red);
    font-variant-numeric: tabular-nums;
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.th-hire-row__off {
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--th-red);
    border-radius: 999px;
    padding: 0.12rem 0.4rem;
    white-space: nowrap;
}

.th-hire-row__was {
    font-size: 0.7rem;
    color: var(--th-muted);
    text-decoration: line-through;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
}

.th-hire-row__bill {
    display: block;
    font-size: 0.68rem;
    font-weight: 500;
    color: var(--th-muted);
    line-height: 1.35;
    margin-top: 0.1rem;
}

.th-hire-row__toggle .mud-typography-body1 {
    font-size: 0.72rem;
    line-height: 1.2;
    white-space: nowrap;
}

.th-hire-row__dates-label {
    font-size: 0.72rem;
    color: var(--th-muted);
    line-height: 1.35;
}

.th-hire-row__dates-slot {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.22s ease;
    overflow: hidden;
    overflow-anchor: none;
}

.th-hire-row__dates-slot > .th-hire-row__dates {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, padding 0.22s ease;
    padding-top: 0;
    padding-bottom: 0;
}

.th-hire-row__dates-slot.is-open {
    grid-template-rows: 1fr;
}

.th-hire-row__dates-slot.is-open > .th-hire-row__dates {
    opacity: 1;
    pointer-events: auto;
    padding-top: 0;
    padding-bottom: 0.65rem;
}

.th-hire-line {
    overflow-anchor: none;
}

.th-hire-row__dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem 0.65rem;
    padding-left: calc(0.85rem + 40px + 0.65rem);
    padding-right: 0.85rem;
}

.th-hire-qtybox {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 6.5rem;
    min-width: 6.5rem;
    flex-shrink: 0;
    border: 1px solid var(--th-line);
    border-radius: 8px;
    background: var(--th-ivory);
}

.th-hire-qtybox span {
    width: 1.75rem;
    min-width: 1.75rem;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
}

.th-hire-row__remove {
    grid-column: 4;
    grid-row: 1;
    justify-self: end;
    align-self: start;
}

.th-hire-days {
    padding: 0 0.85rem 0.65rem calc(0.85rem + 40px + 0.65rem);
    max-width: 16rem;
}

@media (max-width: 640px) {
    .th-hire-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        grid-template-rows: auto auto;
        gap: 0.35rem 0.55rem;
        padding: 0.6rem 0.75rem;
        align-items: start;
    }

    .th-hire-row img {
        width: 36px;
        height: 36px;
    }

    .th-hire-row__main {
        grid-column: 2;
        grid-row: 1;
    }

    .th-hire-row__main strong {
        font-size: 0.84rem;
        padding-right: 0.25rem;
    }

    .th-hire-row__bar {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.45rem 0.65rem;
        grid-column: 2 / span 2;
        grid-row: 2;
        width: 100%;
        min-width: 0;
    }

    .th-hire-row__bar:not(:has(.th-hire-row__toggle)) {
        justify-content: flex-end;
    }

    .th-hire-row__bar .th-hire-qtybox {
        grid-column: unset;
        grid-row: unset;
        align-self: center;
        justify-self: unset;
    }

    .th-hire-row__toggle {
        grid-column: unset;
        grid-row: unset;
    }

    .th-hire-row__toggle .mud-typography-body1 {
        font-size: 0.68rem;
    }

    .th-hire-qtybox {
        width: auto;
        min-width: 6.25rem;
        max-width: 9rem;
        flex-shrink: 0;
    }

    .th-hire-row__remove {
        grid-column: 3;
        grid-row: 1;
        align-self: start;
    }

    .th-hire-row__dates,
    .th-hire-days {
        grid-template-columns: 1fr;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .th-hire-row__dates-slot.is-open > .th-hire-row__dates {
        padding-bottom: 0.6rem;
    }

    .th-hire-period {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
        border-radius: 10px;
        overflow-anchor: none;
    }

    .th-hire-period__note,
    .th-hire-period__hint {
        min-height: 2.4em;
    }

    .th-hire-period__pickers,
    .th-hire-schedule-edit {
        grid-template-columns: 1fr;
    }

    .th-hire-group {
        border-radius: 10px;
    }

    .th-hire-group__head {
        padding: 0.5rem 0.75rem;
    }

    .th-hire-footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.65rem;
        align-items: stretch;
    }

    .th-hire-footer__meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.12rem;
    }

    .th-hire-footer__summary {
        font-size: 0.86rem;
    }

    .th-hire-footer__period {
        font-size: 0.74rem;
    }

    .th-hire-footer__totals {
        align-items: stretch;
        width: 100%;
        justify-self: stretch;
    }

    .th-hire-footer__total-row {
        justify-content: space-between;
        width: 100%;
    }

    .th-hire-footer__estimates {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        width: 100%;
        justify-self: stretch;
        justify-content: stretch;
        gap: 0;
        border: 1px solid var(--th-line);
        border-radius: 10px;
        overflow: hidden;
        background: var(--th-ivory);
    }

    .th-hire-footer__estimate {
        flex: none;
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.55rem 0.7rem;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .th-hire-footer__estimate + .th-hire-footer__estimate {
        border-left: none;
        border-top: 1px solid var(--th-line);
        padding-left: 0.7rem;
    }

    .th-hire-footer__estimate-label {
        white-space: normal;
        letter-spacing: 0.06em;
        line-height: 1.25;
        text-align: left;
    }

    .th-hire-footer__estimate-value {
        font-size: 1.05rem;
        flex-shrink: 0;
        text-align: right;
    }

    .th-hire-footer__cta,
    .th-hire-footer__actions {
        margin-left: 0;
        width: 100%;
        justify-self: stretch;
    }

    .th-hire-footer__cta .mud-button-root,
    .th-hire-footer__actions .mud-button-root {
        width: 100%;
        min-width: 0 !important;
    }

    .th-hire-footer__actions {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
    }

    .th-hire-pane--form {
        padding: 0.85rem 0.75rem;
        border-radius: 10px;
    }

    .th-hire-fields--contact {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .th-hire-row {
        grid-template-columns: 44px minmax(0, 1fr) auto auto;
    }

    .th-hire-row img {
        width: 44px;
        height: 44px;
    }
}

.th-hire-item-note,
.th-hire-schedule {
    margin: 0;
    padding: 0 0.85rem 0.65rem;
    font-size: 0.78rem;
    color: var(--th-muted);
    line-height: 1.45;
}

.th-hire-schedule {
    padding: 0;
    margin-bottom: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.th-hire-link {
    display: inline-block;
    margin: 0 0.85rem 0.65rem;
    padding: 0;
    border: none;
    background: none;
    color: var(--th-red);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.th-hire-link:hover {
    color: var(--th-red-deep);
}

.th-hire-schedule-edit {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 0.5rem;
}

.th-hire-fields--contact {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.th-hire-item-times .mud-input-control {
    margin-top: 0;
}

.th-hire-item-times__inherit {
    margin: 0;
    font-size: 0.78rem;
    color: var(--th-muted);
}

.th-hire-when {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.th-hire-when--item {
    margin-top: 0.35rem;
}

.th-hire-pane--form .th-hire-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

@media (min-width: 900px) {
    .th-hire-layout:not(.th-hire-layout--wizard):not(.th-hire-layout--completed) {
        grid-template-columns: 1.1fr 0.9fr;
        align-items: start;
    }

    .th-hire-layout--wizard .th-hire-fields--contact,
    .th-hire-layout--wizard .th-hire-schedule-edit {
        grid-template-columns: 1fr 1fr;
    }
}

.th-hire-footer {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.85rem 1.25rem;
    width: 100%;
}

.th-hire-footer--confirm,
.th-hire-footer--readonly {
    grid-template-columns: minmax(0, 1fr) auto;
}

.th-hire-dialog .e-footer-content {
    padding: 0.85rem 1.05rem !important;
    border-top: 1px solid var(--th-line) !important;
    background: var(--th-surface) !important;
}

.th-hire-footer__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.65rem;
    min-width: 0;
}

.th-hire-footer__summary {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--th-ink);
}

.th-hire-footer__period {
    font-size: 0.78rem;
    color: var(--th-muted);
    font-variant-numeric: tabular-nums;
}

.th-hire-footer__totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.28rem;
    min-width: 0;
    justify-self: end;
}

.th-hire-footer__total-row {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.75rem;
}

.th-hire-footer__total-label {
    font-size: 0.68rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--th-muted);
    white-space: nowrap;
}

.th-hire-footer__total-value {
    font-family: var(--th-serif);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--th-red);
    font-variant-numeric: tabular-nums;
    min-width: 5.5rem;
    text-align: right;
}

.th-hire-footer__note {
    margin: 0.35rem 0 0;
    font-size: 0.72rem;
    line-height: 1.4;
    color: var(--th-muted);
    max-width: 28rem;
}

.th-hire-footer__estimates {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: stretch;
    gap: 0.55rem 0.75rem;
    min-width: 0;
    justify-self: end;
}

.th-hire-footer__estimate {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.12rem;
    min-width: 6.75rem;
}

.th-hire-footer__estimate + .th-hire-footer__estimate {
    border-left: 1px solid var(--th-line);
    padding-left: 0.75rem;
}

.th-hire-footer__estimate-label {
    font-size: 0.66rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--th-muted);
    white-space: nowrap;
}

.th-hire-footer__estimate-value {
    font-family: var(--th-serif);
    font-size: 1.12rem;
    font-weight: 700;
    color: var(--th-red);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

.th-hire-footer__cta {
    justify-self: end;
    flex-shrink: 0;
}

.th-hire-footer__cta .mud-button-root {
    min-width: 9.5rem;
    font-weight: 700 !important;
}

.th-hire-footer__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    justify-self: end;
    flex-shrink: 0;
}

.th-hire-footer__back .mud-button-root {
    min-width: 6.5rem;
}

.th-hire-footer__submit .mud-button-root {
    min-width: 11rem;
    font-weight: 700 !important;
}

@media (max-width: 860px) {
    .th-hire-footer,
    .th-hire-footer--confirm,
    .th-hire-footer--readonly {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        align-items: stretch;
    }

    .th-hire-footer__meta {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.12rem;
    }

    .th-hire-footer__totals,
    .th-hire-footer__estimates,
    .th-hire-footer__cta,
    .th-hire-footer__actions {
        justify-self: stretch;
        width: 100%;
    }

    .th-hire-footer__totals {
        align-items: stretch;
    }

    .th-hire-footer__total-row {
        justify-content: space-between;
        width: 100%;
    }

    .th-hire-footer__estimates {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        justify-content: stretch;
        gap: 0;
        border: 1px solid var(--th-line);
        border-radius: 10px;
        overflow: hidden;
        background: var(--th-ivory);
    }

    .th-hire-footer__estimate {
        flex: none;
        width: 100%;
        min-width: 0;
        flex-direction: row;
        align-items: baseline;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.55rem 0.75rem;
        border: none;
        border-radius: 0;
        background: transparent;
    }

    .th-hire-footer__estimate + .th-hire-footer__estimate {
        border-left: none;
        border-top: 1px solid var(--th-line);
        padding-left: 0.75rem;
    }

    .th-hire-footer__estimate-label {
        white-space: normal;
        letter-spacing: 0.06em;
        line-height: 1.25;
        text-align: left;
    }

    .th-hire-footer__estimate-value {
        flex-shrink: 0;
        text-align: right;
    }

    .th-hire-footer__cta .mud-button-root,
    .th-hire-footer__actions .mud-button-root {
        width: 100%;
        min-width: 0 !important;
    }

    .th-hire-footer__actions {
        display: grid;
        grid-template-columns: 1fr 1.4fr;
        gap: 0.5rem;
    }
}

.th-hire-estimates {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
}

.th-hire-estimate {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

@media (max-width: 640px) {
    .th-hire-fields--contact,
    .th-hire-schedule-edit {
        grid-template-columns: 1fr;
    }
}

.th-hire-toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.th-hire-toolbar__label {
    font-family: var(--th-serif);
    font-size: 1.35rem;
    color: var(--th-ink);
}

.th-hire-toolbar__hint {
    font-size: 0.82rem;
    color: var(--th-muted);
}

.th-hire-toolbar__actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.th-hire-empty {
    background: var(--th-surface);
    border: 1px dashed var(--th-line);
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--th-muted);
}

.th-hire-form {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    padding: 1rem;
}

.th-hire-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
}

.th-hire-fields__full {
    grid-column: 1 / -1;
}

.th-hire-note {
    margin: 0.75rem 0 0.85rem;
    font-size: 0.78rem;
    color: var(--th-muted);
    line-height: 1.45;
}

.th-hire-note strong {
    color: var(--th-red);
    font-weight: 600;
}

.th-hire-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.25rem;
}

@media (max-width: 640px) {
    .th-brand-name {
        font-size: 0.68rem;
        letter-spacing: 0.1em;
    }

    .th-brand-loc.th-brand-motto {
        display: block;
        font-size: 0.62rem;
        line-height: 1.25;
    }

    .th-brand-text {
        max-width: 9.5rem;
    }

    .th-cart-label {
        display: none;
    }

    .th-cart-btn {
        padding: 0.28rem 0.38rem;
    }

    .th-page {
        padding: 0.35rem 0.75rem calc(2rem + env(safe-area-inset-bottom));
    }

    .th-main.mud-main-content,
    .th-main--mobile.mud-main-content {
        padding-top: 4.4rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }

.th-page-header__title {
        font-size: 1.55rem;
    }

    .th-page-header__subtitle {
        font-size: 0.85rem;
    }

    .th-category-card {
        height: 240px;
    }

    .th-product-card:hover {
        transform: none;
    }

    .th-product-card__media {
        height: 200px;
    }

    .th-product-card__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .th-product-card__footer .mud-button {
        width: 100%;
    }

    .th-hire-dialog.e-dialog {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        height: 100dvh !important;
        max-height: 100% !important;
        max-height: 100dvh !important;
        margin: 0 !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .th-hire-dialog .e-dlg-header-content {
        padding: 0.75rem 0.85rem !important;
        padding-top: calc(0.75rem + env(safe-area-inset-top, 0px)) !important;
        flex-shrink: 0;
    }

    .th-hire-dialog .e-dlg-content {
        padding: 0.65rem 0.75rem 0.85rem !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        height: auto !important;
    }

    .th-hire-dialog .e-footer-content {
        padding: 0.65rem 0.75rem calc(0.65rem + env(safe-area-inset-bottom, 0px)) !important;
        box-shadow: 0 -6px 16px rgba(36, 28, 21, 0.08);
        flex-shrink: 0;
    }

    .th-hire-title .th-serif {
        font-size: 1.15rem;
    }

    .th-hire-title__contact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .th-hire-title__contact-item {
        font-size: 0.75rem;
    }

    .th-hire-title__contact-item:first-child {
        font-size: 0.82rem;
    }

    .th-add-dialog.e-dialog {
        max-height: 100dvh !important;
    }

    .th-add-dialog .e-dlg-content {
        display: flex !important;
        flex-direction: column !important;
    }

    .th-add-dialog .th-add {
        flex: 1 1 auto;
        min-height: 100%;
    }

    .th-add-dialog .th-add__footer {
        margin-top: auto;
        padding-top: 0.5rem;
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .th-add-dialog .th-add__actions .mud-button {
        width: 100%;
    }

    .th-hire-toolbar {
        flex-direction: column;
    }

    .th-hire-submit {
        justify-content: stretch;
    }

    .th-hire-submit .mud-button {
        width: 100%;
    }

    .th-login-card {
        border-radius: 12px;
    }

    .th-login-brand {
        padding: 1.75rem 1.25rem;
        border-radius: 0;
    }

    .th-login-form {
        padding: 1.5rem 1.25rem 1.5rem;
    }

    .th-contact {
        padding: 1.4rem 1.1rem;
    }
}

@media (hover: none) {
    .th-product-card:hover {
        transform: none;
        box-shadow: var(--th-shadow);
    }
}

@media (min-width: 641px) {
    .th-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .th-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .th-login-card {
        grid-template-columns: 0.42fr 0.58fr;
        min-height: 540px;
    }

    .th-login-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 960px) {
    .th-category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .th-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .th-page-header__title {
        font-size: 2rem;
    }
}

@media (min-width: 1280px) {
    .th-product-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (min-width: 1600px) {
    .th-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .th-product-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

/* Syncfusion toasts */
.e-toast-container {
    position: fixed !important;
    inset: 0 !important;
    left: 0 !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    transform: none !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: flex-end !important;
    padding: 0 1.25rem 1.25rem 0 !important;
    pointer-events: none !important;
    z-index: 100000 !important;
}

.e-toast-container .e-toast {
    pointer-events: auto !important;
    position: relative !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    background: var(--th-cream) !important;
    color: var(--th-ink) !important;
    border: 1px solid var(--th-line) !important;
    border-top: 3px solid var(--th-red) !important;
    border-left: 1px solid var(--th-line) !important;
    border-radius: 0 !important;
    box-shadow: 0 22px 50px rgba(44, 38, 34, 0.16) !important;
    font-family: var(--th-sans) !important;
    min-height: 0 !important;
    padding: 1.15rem 1.25rem 1.2rem !important;
    width: min(380px, calc(100vw - 2rem)) !important;
}

.e-toast-container .e-toast.e-toast-success,
.e-toast-container .e-toast.e-toast-info {
    border-top-color: var(--th-red) !important;
}

.e-toast-container .e-toast.e-toast-warning {
    border-top-color: var(--th-gold) !important;
}

.e-toast-container .e-toast.e-toast-danger {
    border-top-color: var(--th-red-deep) !important;
}

.e-toast-container .e-toast-icon,
.e-toast-container .e-toast .e-toast-icon {
    display: none !important;
}

.e-toast-container .e-toast-message {
    padding: 0 1.5rem 0 0 !important;
}

.e-toast-container .e-toast-title {
    font-family: var(--th-serif) !important;
    font-size: 0.78rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.18em !important;
    text-transform: uppercase !important;
    color: var(--th-red) !important;
    margin-bottom: 0.35rem !important;
}

.e-toast-container .e-toast-content {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: var(--th-ink) !important;
}

.e-toast-container .e-toast-close-icon {
    color: var(--th-muted) !important;
    font-size: 13px !important;
}

.e-toast-container .e-toast-progress {
    background: var(--th-gold) !important;
    height: 2px !important;
}

/* Syncfusion aligned to Talisman theme */
.e-control,
.e-control-wrapper,
.e-btn,
.e-css.e-btn,
.e-input-group,
.e-float-input,
.e-grid,
.e-dialog,
.e-tab,
.e-dropdownbase {
    font-family: var(--th-sans) !important;
}

.e-primary.e-btn,
.e-btn.e-primary {
    background: var(--th-red) !important;
    border-color: var(--th-red) !important;
    color: #fff !important;
}

.e-primary.e-btn:hover,
.e-btn.e-primary:hover {
    background: var(--th-red-deep) !important;
    border-color: var(--th-red-deep) !important;
}

.e-input-group:not(.e-success):not(.e-warning):not(.e-error),
.e-input-group.e-control-wrapper:not(.e-success):not(.e-warning):not(.e-error) {
    border-color: var(--th-line) !important;
}

.e-input-group.e-input-focus:not(.e-success):not(.e-warning):not(.e-error),
.e-input-group.e-control-wrapper.e-input-focus:not(.e-success):not(.e-warning):not(.e-error) {
    border-color: var(--th-red) !important;
    box-shadow: 0 0 0 1px var(--th-red) !important;
}

.e-float-text,
.e-float-input .e-float-text {
    color: var(--th-muted) !important;
    font-family: var(--th-sans) !important;
}

.e-input-group input.e-input,
.e-input-group textarea.e-input,
.e-float-input input,
.e-float-input textarea {
    color: var(--th-ink) !important;
    background: transparent !important;
}

.e-grid {
    border-color: var(--th-line) !important;
    font-family: var(--th-sans) !important;
}

.e-grid .e-headercell,
.e-grid .e-headercelldiv {
    background: var(--th-surface) !important;
    color: var(--th-ink) !important;
    font-family: var(--th-sans) !important;
}

.e-grid .e-rowcell {
    color: var(--th-ink) !important;
    border-color: var(--th-line) !important;
}

.e-grid .e-altrow {
    background: var(--th-ivory) !important;
}

.e-grid .e-toolbar,
.e-grid .e-groupdroparea,
.e-grid .e-gridheader,
.e-grid .e-gridcontent,
.e-grid .e-gridpager {
    background: var(--th-surface) !important;
    border-color: var(--th-line) !important;
    color: var(--th-ink) !important;
}

.e-pager .e-currentitem {
    background: var(--th-red) !important;
    border-color: var(--th-red) !important;
}

.e-tab .e-tab-header {
    background: var(--th-surface) !important;
    border-color: var(--th-line) !important;
}

.e-dialog {
    background: var(--th-surface) !important;
    border-color: var(--th-line) !important;
    color: var(--th-ink) !important;
}

.e-dlg-overlay {
    background: rgba(28, 25, 23, 0.45) !important;
}

.e-checkbox-wrapper .e-frame.e-check,
.e-css.e-checkbox-wrapper .e-frame.e-check {
    background-color: var(--th-red) !important;
    border-color: var(--th-red) !important;
}

.e-ddl.e-popup,
.e-dropdownbase.e-popup {
    background: var(--th-surface) !important;
    border-color: var(--th-line) !important;
    color: var(--th-ink) !important;
}

.e-dropdownbase .e-list-item {
    color: var(--th-ink) !important;
}

.e-dropdownbase .e-list-item.e-active,
.e-dropdownbase .e-list-item.e-hover {
    background: var(--th-ivory) !important;
    color: var(--th-red) !important;
}

.th-theme-fab {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--th-line);
    border-radius: 50%;
    background: var(--th-surface);
    color: var(--th-ink);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, transform 0.15s ease;
}

.th-theme-fab:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

html.th-dark .e-toast-container .e-toast {
    background: var(--th-surface) !important;
    color: var(--th-ink) !important;
}

html.th-dark body,
html.th-dark .th-main.mud-main-content,
html.th-dark .mud-layout,
html.th-dark .mud-drawer {
    background: var(--th-ivory) !important;
    color: var(--th-ink) !important;
}

html.th-dark .mud-appbar,
html.th-dark .mud-paper,
html.th-dark .mud-navmenu,
html.th-dark .e-grid,
html.th-dark .e-dialog,
html.th-dark .th-analytics-panel,
html.th-dark .th-analytics-kpi,
html.th-dark .th-analytics-mix,
html.th-dark .th-analytics-mix-card {
    background: var(--th-surface) !important;
    color: var(--th-ink) !important;
    border-color: var(--th-line) !important;
}

html.th-dark .mud-nav-link,
html.th-dark .mud-typography,
html.th-dark .e-headertext,
html.th-dark .e-rowcell {
    color: var(--th-ink) !important;
}

html.th-dark .mud-nav-link .mud-nav-link-text,
html.th-dark .th-analytics-toolbar__hint,
html.th-dark .th-analytics-panel__lead,
html.th-dark .th-analytics-kpi__label,
html.th-dark .th-analytics-donut-caption {
    color: var(--th-muted) !important;
}

html.th-dark .th-theme-fab {
    background: var(--th-surface);
    color: var(--th-ink);
    border: 1px solid var(--th-line);
    box-shadow: var(--th-shadow);
}

html.th-dark .e-input-group,
html.th-dark .e-control-wrapper,
html.th-dark .e-float-input {
    background: var(--th-bg) !important;
    color: var(--th-ink) !important;
    border-color: var(--th-line) !important;
}

/* Analytics dashboard */
.th-analytics {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.th-analytics-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 1rem;
}

.th-analytics-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    background: rgba(170, 57, 48, 0.1);
    color: var(--th-red);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.th-analytics-toolbar__hint {
    color: var(--th-muted);
    font-size: 0.84rem;
}

.th-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.th-analytics-kpi {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: start;
    padding: 1rem 1rem 2.2rem;
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: var(--th-shadow);
}

.th-analytics-kpi__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(170, 57, 48, 0.1);
    color: var(--th-red);
}

.th-analytics-kpi__icon--revenue {
    background: rgba(170, 57, 48, 0.14);
}

.th-analytics-kpi__icon--avg {
    background: rgba(107, 107, 107, 0.12);
    color: var(--th-muted);
}

.th-analytics-kpi__body {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.th-analytics-kpi__label {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-analytics-kpi__value {
    font-family: var(--th-serif);
    font-size: 1.55rem;
    line-height: 1.1;
    color: var(--th-ink);
}

.th-analytics-kpi__meta {
    font-size: 0.78rem;
    font-weight: 600;
}

.th-analytics-kpi__meta.is-up {
    color: #2E7D4F;
}

.th-analytics-kpi__meta.is-down {
    color: var(--th-red);
}

.th-analytics-kpi__meta.is-neutral {
    color: var(--th-muted);
    font-weight: 500;
}

html.th-dark .th-analytics-kpi__meta.is-up {
    color: #6BCB77;
}

.th-analytics-kpi__prior {
    position: absolute;
    left: 1rem;
    right: 1rem;
    bottom: 0.75rem;
    font-size: 0.72rem;
    color: var(--th-muted);
}

.th-analytics-mix {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: var(--th-shadow);
    padding: 1.05rem 1.15rem 1.15rem;
}

.th-analytics-mix__header {
    margin-bottom: 0.85rem;
}

.th-analytics-mix__title {
    margin: 0;
    font-size: 1.15rem;
}

.th-analytics-mix__lead {
    margin: 0.25rem 0 0;
    color: var(--th-muted);
    font-size: 0.84rem;
}

.th-analytics-mix__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.th-analytics-mix-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.18rem;
    min-width: 0;
    padding: 0.9rem 0.95rem 2rem;
    border: 1px solid var(--th-line);
    border-radius: 12px;
    background: var(--th-ivory);
}

.th-analytics-mix-card__label {
    font-size: 0.68rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--th-muted);
}

.th-analytics-mix-card__value {
    font-family: var(--th-serif);
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--th-red);
    font-variant-numeric: tabular-nums;
}

.th-analytics-mix-card__meta {
    font-size: 0.76rem;
    font-weight: 600;
}

.th-analytics-mix-card__meta.is-up {
    color: #2E7D4F;
}

.th-analytics-mix-card__meta.is-down {
    color: var(--th-red);
}

.th-analytics-mix-card__meta.is-neutral {
    color: var(--th-muted);
    font-weight: 500;
}

html.th-dark .th-analytics-mix-card__meta.is-up {
    color: #6BCB77;
}

.th-analytics-mix-card__share {
    font-size: 0.74rem;
    color: var(--th-muted);
}

.th-analytics-mix-card__prior {
    position: absolute;
    left: 0.95rem;
    right: 0.95rem;
    bottom: 0.7rem;
    font-size: 0.7rem;
    color: var(--th-muted);
}

.th-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.th-analytics-side {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.th-analytics-panel {
    background: var(--th-surface);
    border: 1px solid var(--th-line);
    border-radius: 14px;
    box-shadow: var(--th-shadow);
    padding: 1.1rem 1.15rem 1.15rem;
}

.th-analytics-panel__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.th-analytics-panel__title {
    margin: 0;
    font-size: 1.15rem;
}

.th-analytics-panel__lead {
    margin: 0.25rem 0 0;
    color: var(--th-muted);
    font-size: 0.84rem;
}

.th-analytics-panel__tag {
    flex-shrink: 0;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: var(--th-ivory);
    border: 1px solid var(--th-line);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--th-red);
}

.th-analytics-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: -0.25rem 0 0.95rem;
}

.th-analytics-filter {
    appearance: none;
    border: 1px solid var(--th-line);
    background: var(--th-ivory);
    color: var(--th-muted);
    border-radius: 999px;
    padding: 0.28rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}

.th-analytics-filter.is-active {
    background: rgba(170, 57, 48, 0.12);
    border-color: rgba(170, 57, 48, 0.28);
    color: var(--th-red);
}

.th-analytics-chart {
    margin-bottom: 1rem;
}

.th-analytics-chart--donut {
    position: relative;
    margin-bottom: 0.35rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.th-analytics-donut-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-inline: auto;
    overflow: hidden;
}

.th-analytics-donut-center {
    position: absolute;
    left: 50%;
    top: 58%;
    transform: translate(-50%, -50%);
    z-index: 1;
    width: min(46%, 7.5rem);
    text-align: center;
    pointer-events: none;
}

.th-analytics-donut-center.is-narrow {
    top: 50%;
    width: min(52%, 8.25rem);
}

.th-analytics-donut-center strong {
    display: block;
    font-family: var(--th-serif);
    font-size: clamp(0.95rem, 2.6vw, 1.25rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--th-ink);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.th-analytics-donut-center.is-narrow strong {
    font-size: clamp(0.92rem, 4.6vw, 1.15rem);
}

.th-analytics-donut-caption {
    margin: 0 0 0.85rem;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-analytics-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 180px;
    color: var(--th-muted);
    text-align: center;
}

.th-analytics-empty .mud-icon-root {
    font-size: 2rem;
    opacity: 0.55;
}

.th-analytics-empty p {
    margin: 0;
    font-size: 0.9rem;
}

.th-analytics-rank {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.th-analytics-rank__item {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.65rem;
    align-items: center;
}

.th-analytics-rank__pos {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: var(--th-ivory);
    border: 1px solid var(--th-line);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--th-muted);
}

.th-analytics-rank__main {
    min-width: 0;
}

.th-analytics-rank__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.35rem;
}

.th-analytics-rank__name {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
    font-size: 0.84rem;
    color: var(--th-ink);
    overflow: hidden;
}

.th-analytics-rank__name-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-analytics-type {
    flex-shrink: 0;
    padding: 0.12rem 0.4rem;
    border-radius: 999px;
    border: 1px solid var(--th-line);
    background: var(--th-ivory);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--th-muted);
}

.th-analytics-type--daily {
    color: var(--th-red);
    border-color: rgba(170, 57, 48, 0.28);
    background: rgba(170, 57, 48, 0.08);
}

.th-analytics-type--monthly {
    color: #8C6B62;
    border-color: rgba(140, 107, 98, 0.35);
    background: rgba(184, 149, 107, 0.16);
}

.th-analytics-type--onceoff {
    color: #555;
    border-color: rgba(107, 107, 107, 0.35);
    background: rgba(107, 107, 107, 0.1);
}

.th-analytics-rank__value {
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--th-red);
}

.th-analytics-rank__bar {
    height: 4px;
    border-radius: 999px;
    background: var(--th-line);
    overflow: hidden;
}

.th-analytics-rank__bar::after {
    content: "";
    display: block;
    height: 100%;
    width: var(--fill, 0%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--th-red), #C45B52);
}

.th-analytics-legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.th-analytics-legend__item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    gap: 0.55rem 0.65rem;
    align-items: center;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--th-line);
}

.th-analytics-legend__item:last-child {
    padding-bottom: 0;
    border-bottom: none;
}

.th-analytics-legend__swatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.th-analytics-legend__name {
    font-size: 0.84rem;
    color: var(--th-ink);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.th-analytics-legend__pct {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--th-muted);
}

.th-analytics-legend__total {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--th-red);
    text-align: right;
    min-width: 4.5rem;
}

@media (max-width: 1100px) {
    .th-analytics-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .th-analytics {
        gap: 0.95rem;
    }

    .th-analytics-kpis {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    .th-analytics-mix__cards {
        grid-template-columns: 1fr;
        gap: 0.55rem;
    }

    .th-analytics-mix-card {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "label value"
            "meta value"
            "share share"
            "prior prior";
        column-gap: 0.85rem;
        row-gap: 0.12rem;
        align-items: start;
        padding: 0.75rem 0.85rem 1.65rem;
    }

    .th-analytics-mix-card__label {
        grid-area: label;
    }

    .th-analytics-mix-card__value {
        grid-area: value;
        align-self: center;
        font-size: 1.2rem;
        text-align: right;
    }

    .th-analytics-mix-card__meta {
        grid-area: meta;
    }

    .th-analytics-mix-card__share {
        grid-area: share;
        margin-top: 0.15rem;
    }

    .th-analytics-mix-card__prior {
        left: 0.85rem;
        right: 0.85rem;
        bottom: 0.55rem;
    }
}

@media (max-width: 640px) {
    .th-analytics {
        gap: 0.8rem;
    }

    .th-analytics-toolbar {
        gap: 0.4rem 0.65rem;
    }

    .th-analytics-toolbar__hint {
        width: 100%;
        font-size: 0.76rem;
        line-height: 1.35;
    }

    .th-analytics-kpi {
        gap: 0.65rem;
        padding: 0.85rem 0.85rem 1.85rem;
        border-radius: 12px;
    }

    .th-analytics-kpi__icon {
        width: 36px;
        height: 36px;
        border-radius: 10px;
    }

    .th-analytics-kpi__value {
        font-size: 1.3rem;
    }

    .th-analytics-kpi__meta {
        font-size: 0.74rem;
    }

    .th-analytics-kpi__prior {
        left: 0.85rem;
        right: 0.85rem;
        bottom: 0.6rem;
        font-size: 0.68rem;
    }

    .th-analytics-mix {
        padding: 0.85rem;
        border-radius: 12px;
    }

    .th-analytics-mix__title {
        font-size: 1.05rem;
    }

    .th-analytics-mix__lead {
        font-size: 0.78rem;
    }

    .th-analytics-panel {
        padding: 0.9rem;
        border-radius: 12px;
    }

    .th-analytics-panel__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
        margin-bottom: 0.75rem;
    }

    .th-analytics-panel__title {
        font-size: 1.05rem;
    }

    .th-analytics-panel__lead {
        font-size: 0.78rem;
    }

    .th-analytics-filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: -0.1rem -0.15rem 0.8rem;
        padding: 0.1rem 0.15rem 0.2rem;
    }

    .th-analytics-filters::-webkit-scrollbar {
        display: none;
    }

    .th-analytics-filter {
        flex-shrink: 0;
    }

    .th-analytics-chart {
        margin-bottom: 0.75rem;
    }

    .th-analytics-chart--donut {
        overflow: hidden;
    }

    .th-analytics-donut-wrap {
        max-width: min(100%, 260px);
    }

    .th-analytics-donut-wrap .e-accumulationchart,
    .th-analytics-donut-wrap .e-chart-focused {
        max-width: 100% !important;
    }

    .th-analytics-chart--bar {
        margin-left: -0.35rem;
        margin-right: -0.35rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .th-analytics-empty {
        min-height: 140px;
    }

    .th-analytics-rank__row {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .th-analytics-rank__name {
        flex-wrap: wrap;
        row-gap: 0.25rem;
    }

    .th-analytics-legend__item {
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 0.2rem 0.55rem;
    }

    .th-analytics-legend__pct {
        grid-column: 2;
    }

    .th-analytics-legend__total {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
        min-width: 0;
    }
}

