/* =====================================================
   Abone themanew — strict rectangular catalog UI
   Colors: Abone brand (#5B67F5, #40c057, #fd7e14…)
   Namespace: .tn-*  |  border-radius: 0
   ===================================================== */

html {
    touch-action: manipulation;
    -ms-touch-action: manipulation;
}

:root {
    --tn-primary: #5B67F5;
    --tn-primary-dark: #4a54d4;
    --tn-primary-soft: #eef0ff;
    --tn-accent: #fd7e14;
    --tn-accent-soft: #fff4e6;
    --tn-success: #40c057;
    --tn-success-soft: #ebfbee;
    --tn-danger: #fa5252;
    --tn-bg: #f4f4f7;
    --tn-surface: #ffffff;
    --tn-surface-2: #fafafa;
    --tn-border: #dddddd;
    --tn-border-light: #eeeeee;
    --tn-text: #1a1a1a;
    --tn-muted: #717182;
    --tn-link: #5B67F5;
    --tn-header-top-h: 72px;
    --tn-header-nav-h: 44px;
    --tn-container: 1280px;
    --tn-sidebar-w: 240px;
    --tn-filter-w: 260px;
    --tn-bottom-nav-h: 52px;
    --tn-radius: 0;
}

[data-theme="dark"] {
    --tn-primary-soft: #1e2248;
    --tn-accent-soft: #3d2a12;
    --tn-success-soft: #1a3320;
    --tn-bg: #121212;
    --tn-surface: #1a1a1a;
    --tn-surface-2: #222222;
    --tn-border: #333333;
    --tn-border-light: #2a2a2a;
    --tn-text: #f3f4f6;
    --tn-muted: #9ca3af;
    --tn-link: #8590ff;
}

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

.tn-body {
    margin: 0;
    min-height: 100dvh;
    /* Segoe UI / system-ui have real 600–700 faces; Arial faux-bolds 800+ and makes Cyrillic look crooked */
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tn-text);
    background: var(--tn-bg);
    touch-action: manipulation;
    overscroll-behavior-y: none;
}

/*
 * base.css sets overflow-x:hidden on html/body/#app-container.
 * Per CSS, that forces overflow-y to compute as "auto", creating nested
 * scrollports — wheel/trackpad scroll breaks; only dragging the scrollbar works.
 * Use clip (does not flip overflow-y) so the document scrolls normally.
 */
html[data-site-shell="themanew"] {
    height: auto;
    min-height: 100%;
    overflow-x: clip;
    overflow-y: auto;
}

html[data-site-shell="themanew"] body.tn-body {
    height: auto;
    min-height: 100%;
    overflow-x: clip;
    overflow-y: visible;
}

.tn-body #app-container {
    max-width: none;
    width: 100%;
    margin: 0;
    box-shadow: none;
    overflow-x: clip;
    overflow-y: visible;
}

/* Public SVG icons via CSS mask (currentColor) */
.tn-icon {
    display: inline-block;
    flex-shrink: 0;
    width: var(--tn-icon-size, 20px);
    height: var(--tn-icon-size, 20px);
    background-color: currentColor;
    -webkit-mask: var(--tn-icon) center / contain no-repeat;
    mask: var(--tn-icon) center / contain no-repeat;
    vertical-align: middle;
}
.tn-icon--home { --tn-icon: url('/images/icons/home.svg'); }
.tn-icon--map { --tn-icon: url('/images/icons/map.svg'); }
.tn-icon--map-pin { --tn-icon: url('/images/icons/map-pin.svg'); }
.tn-icon--list { --tn-icon: url('/images/icons/list.svg'); }
.tn-icon--heart { --tn-icon: url('/images/icons/heart.svg'); }
.tn-icon--heart-fill { --tn-icon: url('/images/icons/heart-fill.svg'); }
.tn-icon--user { --tn-icon: url('/images/icons/user.svg'); }
.tn-icon--users { --tn-icon: url('/images/icons/users.svg'); }
.tn-icon--search { --tn-icon: url('/images/icons/search.svg'); }
.tn-icon--menu { --tn-icon: url('/images/icons/menu.svg'); }
.tn-icon--sliders { --tn-icon: url('/images/icons/sliders.svg'); }
.tn-icon--navigation { --tn-icon: url('/images/icons/navigation.svg'); }
.tn-icon--share { --tn-icon: url('/images/icons/share.svg'); }
.tn-icon--chevron-left { --tn-icon: url('/images/icons/chevron-left.svg'); }
.tn-icon--chevron-right { --tn-icon: url('/images/icons/chevron-right.svg'); }
.tn-icon--chevron-down { --tn-icon: url('/images/icons/chevron-down.svg'); }
.tn-icon--phone { --tn-icon: url('/images/icons/phone.svg'); }
.tn-icon--package { --tn-icon: url('/images/icons/package.svg'); }
.tn-icon--percent { --tn-icon: url('/images/icons/percent.svg'); }
.tn-icon--percent-bold { --tn-icon: url('/images/icons/percent-bold.svg'); }
.tn-icon--x { --tn-icon: url('/images/icons/x.svg'); }
.tn-icon--eye { --tn-icon: url('/images/icons/eye.svg'); }
.tn-icon--eye-off { --tn-icon: url('/images/icons/eye-off.svg'); }
.tn-icon--plus { --tn-icon: url('/images/icons/plus.svg'); }
.tn-icon--building { --tn-icon: url('/images/icons/building.svg'); }
.tn-icon--message { --tn-icon: url('/images/icons/message.svg'); }
.tn-icon--store { --tn-icon: url('/images/icons/store.svg'); }
.tn-icon--moon { --tn-icon: url('/images/icons/moon.svg'); }
.tn-icon--sun { --tn-icon: url('/images/icons/sun.svg'); }
.tn-icon--logout { --tn-icon: url('/images/icons/logout.svg'); }
.tn-icon--help { --tn-icon: url('/images/icons/help.svg'); }
.tn-icon--bell { --tn-icon: url('/images/icons/bell.svg'); }
.tn-icon--clock { --tn-icon: url('/images/icons/clock.svg'); }
.tn-icon--calendar { --tn-icon: url('/images/icons/calendar.svg'); }
.tn-icon--ticket { --tn-icon: url('/images/icons/ticket.svg'); }
.tn-icon--trophy { --tn-icon: url('/images/icons/trophy.svg'); }
.tn-icon--gift { --tn-icon: url('/images/icons/gift.svg'); }
.tn-icon--shield { --tn-icon: url('/images/icons/shield.svg'); }
.tn-icon--link { --tn-icon: url('/images/icons/link.svg'); }
.tn-icon--maximize { --tn-icon: url('/images/icons/maximize.svg'); }
.tn-icon--wallet { --tn-icon: url('/images/icons/wallet.svg'); }
.tn-icon--shopping-cart { --tn-icon: url('/images/icons/shopping-cart.svg'); }
.tn-icon--chart-column { --tn-icon: url('/images/icons/chart-column.svg'); }
.tn-icon--star { --tn-icon: url('/images/icons/star.svg'); }
.tn-icon--qr { --tn-icon: url('/images/icons/qr.svg'); }
.tn-icon--viewfinder { --tn-icon: url('/images/icons/viewfinder.svg'); }
.tn-icon--vk { --tn-icon: url('/images/icons/vk.svg'); }
.tn-icon--telegram { --tn-icon: url('/images/icons/telegram.svg'); }
.tn-icon--whatsapp { --tn-icon: url('/images/icons/whatsapp.svg'); }
.tn-icon--app-store { --tn-icon: url('/images/icons/app-store.svg'); }
.tn-icon--google-play { --tn-icon: url('/images/icons/google-play.svg'); }
.tn-icon--rustore { --tn-icon: url('/images/icons/rustore.svg'); }
.tn-icon--mail { --tn-icon: url('/images/icons/mail.svg'); }
.tn-icon--keypad { --tn-icon: url('/images/icons/keypad.svg'); }
.tn-icon--check-circle { --tn-icon: url('/images/icons/check-circle.svg'); }
.tn-icon--book { --tn-icon: url('/images/icons/book.svg'); }
.tn-icon--headphones { --tn-icon: url('/images/icons/headphones.svg'); }
.tn-icon--flag { --tn-icon: url('/images/icons/flag.svg'); }
.tn-icon--flame { --tn-icon: url('/images/icons/flame.svg'); }
.tn-icon--tag { --tn-icon: url('/images/icons/tag.svg'); }
.tn-icon--paperclip { --tn-icon: url('/images/icons/paperclip.svg'); }
.tn-icon--refresh-cw { --tn-icon: url('/images/icons/refresh-cw.svg'); }
.tn-icon--send { --tn-icon: url('/images/icons/send.svg'); }
.tn-icon--circle-plus { --tn-icon: url('/images/icons/circle-plus.svg'); }
.tn-icon--arrow-down { --tn-icon: url('/images/icons/arrow-down.svg'); }
.tn-icon--arrow-up { --tn-icon: url('/images/icons/arrow-up.svg'); }
.tn-icon--minus { --tn-icon: url('/images/icons/minus.svg'); }
.tn-icon--user-plus { --tn-icon: url('/images/icons/user-plus.svg'); }
.tn-icon--credit-card { --tn-icon: url('/images/icons/credit-card.svg'); }
.tn-icon--file-text { --tn-icon: url('/images/icons/file-text.svg'); }
.tn-icon--megaphone { --tn-icon: url('/images/icons/megaphone.svg'); }
.tn-icon--ellipsis-vertical { --tn-icon: url('/images/icons/ellipsis-vertical.svg'); }
.tn-icon--trash { --tn-icon: url('/images/icons/trash.svg'); }
.tn-icon--pencil { --tn-icon: url('/images/icons/pencil.svg'); }
.tn-icon--copy { --tn-icon: url('/images/icons/copy.svg'); }
.tn-icon--external-link { --tn-icon: url('/images/icons/external-link.svg'); }
.tn-icon--image { --tn-icon: url('/images/icons/image.svg'); }
.tn-icon--download { --tn-icon: url('/images/icons/download.svg'); }
.tn-icon--settings { --tn-icon: url('/images/icons/settings.svg'); }
.tn-icon--crown { --tn-icon: url('/images/icons/crown.svg'); }

.tn-body a { color: var(--tn-link); }
.tn-body a.tn-btn--primary,
.tn-body a.tn-btn--primary:link,
.tn-body a.tn-btn--primary:visited,
.tn-body a.tn-btn--primary:hover,
.tn-body a.tn-btn--primary:active,
.tn-body a.tn-btn--primary:focus {
    color: #fff !important;
}
.tn-body a.tn-btn--success,
.tn-body a.tn-btn--success:link,
.tn-body a.tn-btn--success:visited,
.tn-body a.tn-btn--success:hover,
.tn-body a.tn-btn--success:active {
    color: #fff !important;
}

/* Fixed site header — sticky fails under base.css overflow-x:hidden on html/body/#app-container */
.tn-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding-top: env(safe-area-inset-top, 0px);
    background: var(--tn-surface);
}

.tn-spa-loader {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.tn-spa-loader.active {
    opacity: 1;
    pointer-events: all;
}

.tn-spa-loader__card {
    min-width: 160px;
    height: 48px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-surface, #fff);
    border: 1px solid var(--tn-border, #ddd);
    font-weight: 700;
    color: var(--tn-text, #111);
}

/* Toast notifications — themanew rectangular brand style */
html[data-site-shell="themanew"] .toast-container {
    top: calc(12px + env(safe-area-inset-top, 0px));
    right: 12px;
    left: 12px;
    gap: 8px;
}

@media (min-width: 480px) {
    html[data-site-shell="themanew"] .toast-container {
        left: auto;
        width: 360px;
    }
}

html[data-site-shell="themanew"] .toast {
    background: var(--tn-surface, #fff);
    color: var(--tn-text, #1a1a1a);
    border: 1px solid var(--tn-border, #ddd);
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    padding: 12px 14px;
    gap: 12px;
    animation: tn-toast-in 0.25s ease-out;
}

html[data-site-shell="themanew"] .toast.toast-success {
    background: var(--tn-surface, #fff);
    color: var(--tn-text, #1a1a1a);
    border-color: var(--tn-primary, #5B67F5);
    border-left: 4px solid var(--tn-primary, #5B67F5);
    box-shadow: 0 10px 28px rgba(91, 103, 245, 0.14);
}

html[data-site-shell="themanew"] .toast.toast-error {
    background: var(--tn-surface, #fff);
    color: var(--tn-text, #1a1a1a);
    border-color: var(--tn-danger, #fa5252);
    border-left: 4px solid var(--tn-danger, #fa5252);
    box-shadow: 0 10px 28px rgba(250, 82, 82, 0.14);
}

html[data-site-shell="themanew"] .toast.toast-info,
html[data-site-shell="themanew"] .toast.toast-warning {
    background: var(--tn-surface, #fff);
    color: var(--tn-text, #1a1a1a);
    border-left: 4px solid var(--tn-accent, #fd7e14);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
}

html[data-site-shell="themanew"] .toast-icon {
    width: 32px;
    height: 32px;
    border: 1px solid var(--tn-border, #ddd);
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary, #5B67F5);
}

html[data-site-shell="themanew"] .toast.toast-error .toast-icon {
    background: #fff5f5;
    color: var(--tn-danger, #fa5252);
    border-color: #ffc9c9;
}

html[data-site-shell="themanew"] .toast-icon svg {
    width: 18px;
    height: 18px;
}

html[data-site-shell="themanew"] .toast-message {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
}

html[data-site-shell="themanew"] .toast-out {
    transform: translateX(24px);
}

@keyframes tn-toast-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html[data-site-shell="themanew"][data-theme="dark"] .toast,
html[data-site-shell="themanew"][data-theme="dark"] .toast.toast-success,
html[data-site-shell="themanew"][data-theme="dark"] .toast.toast-error {
    background: var(--tn-surface, #1a1a1a);
    color: var(--tn-text, #f5f5f5);
}

.tn-container {
    width: min(100% - 24px, var(--tn-container));
    margin-inline: auto;
}

/* ── Header top bar ── */
.tn-header-top {
    background: var(--tn-surface);
    border-bottom: 1px solid var(--tn-border);
}

.tn-header-top__inner {
    min-height: var(--tn-header-top-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
}

.tn-header-top__end {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
    flex-shrink: 0;
    min-width: 0;
}

.tn-header-cta {
    display: none;
    align-items: center;
    gap: 6px;
    flex-shrink: 1;
    min-width: 0;
}

.tn-header-support,
.tn-header-partner {
    display: none;
}

.tn-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--tn-text);
    min-width: 0;
}

.tn-logo img {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
}

.tn-logo__text strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 700;
}

.tn-logo__text small {
    display: block;
    font-size: 11px;
    color: var(--tn-muted);
    margin-top: 2px;
}

.tn-search-bar {
    display: flex;
    width: 100%;
    min-width: 0;
}

.tn-header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.tn-header-tools {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-shrink: 0;
}

.tn-city-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    max-width: min(148px, 34vw);
    padding: 0 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    cursor: pointer;
    flex-shrink: 1;
    min-width: 0;
}

.tn-city-btn:hover {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
    border-color: var(--tn-primary);
}

.tn-city-btn .tn-city-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.tn-city-btn--drawer {
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
}

@media (max-width: 1023px) {
    .tn-city-btn--header {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .tn-city-btn--drawer {
        display: none !important;
    }
}

.tn-search {
    position: relative;
    flex-shrink: 0;
}

.tn-search__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 90;
    width: min(420px, calc(100vw - 24px));
    padding: 10px;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.tn-search__panel[hidden] {
    display: none !important;
}

.tn-search.is-open .tn-search__btn {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
    border-color: var(--tn-primary);
}

.tn-icon-btn,
.tn-body a.tn-icon-btn,
.tn-body a.tn-icon-btn:visited {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    text-decoration: none;
    cursor: pointer;
    padding: 0;
}

.tn-icon-btn:hover,
.tn-body a.tn-icon-btn:hover {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
    border-color: var(--tn-primary);
}

.tn-notif-dot {
    position: absolute;
    top: 7px;
    right: 7px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tn-danger, #fa5252);
    border: 1.5px solid var(--tn-surface, #fff);
}

.tn-notif-dot[hidden] { display: none !important; }

.tn-notif-modal .modal-content {
    max-width: 440px;
    width: 100%;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden;
    text-align: left;
}

.tn-notif-modal .modal-content > h3 {
    margin: 0 !important;
    padding: 16px 48px 14px 18px;
    border-bottom: 1px solid var(--tn-border-light, #eee);
    text-align: left !important;
    font-size: 18px !important;
}

.tn-notif-modal .modal-body {
    padding: 0;
}

.tn-notif-modal .modal-footer {
    margin: 0 !important;
    padding: 12px 16px;
    border-top: 1px solid var(--tn-border-light, #eee);
}

.tn-notif-modal .modal-close {
    top: 12px !important;
    right: 12px !important;
}

.tn-notif-panel {
    max-height: min(60vh, 420px);
    overflow: auto;
}

.tn-notif-empty {
    display: grid;
    gap: 8px;
    justify-items: center;
    padding: 36px 20px;
    text-align: center;
    color: var(--tn-muted, #717182);
}

.tn-notif-empty__icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border: 1px solid var(--tn-border, #ddd);
    background: var(--tn-surface-2, #fafafa);
    color: var(--tn-primary, #5B67F5);
    margin-bottom: 4px;
}

.tn-notif-empty strong {
    color: var(--tn-text, #1a1a1a);
    font-size: 15px;
}

.tn-notif-empty p {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
}

.tn-notif-list {
    display: grid;
    gap: 0;
}

.tn-notif-item {
    display: grid;
    gap: 4px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light, #eee);
    background: var(--tn-surface, #fff);
    text-align: left;
    cursor: pointer;
    font: inherit;
    position: relative;
}

.tn-notif-item:last-child {
    border-bottom: 0;
}

.tn-notif-item:hover {
    background: var(--tn-primary-soft, #eef0ff);
}

.tn-notif-item strong {
    font-size: 14px;
    color: var(--tn-text, #111);
    padding-right: 12px;
}

.tn-notif-item span {
    font-size: 13px;
    color: var(--tn-muted, #888);
    line-height: 1.4;
}

.tn-notif-item time {
    font-size: 11px;
    color: var(--tn-muted, #888);
    opacity: 0.8;
}

.tn-notif-item.is-read {
    opacity: 0.72;
}

.tn-notif-item:not(.is-read)::after {
    content: '';
    position: absolute;
    top: 18px;
    right: 14px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tn-danger, #fa5252);
}

.tn-account {
    position: relative;
    flex-shrink: 0;
}

.tn-account__panel {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    min-width: 240px;
    padding: 8px;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
}

.tn-account__panel[hidden] {
    display: none !important;
}

.tn-account__head {
    display: grid;
    gap: 2px;
    padding: 8px 10px 10px;
    border-bottom: 1px solid var(--tn-border-light);
    margin-bottom: 6px;
}

.tn-account__head strong {
    font-size: 14px;
    color: var(--tn-text);
}

.tn-account__head span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-account.is-open .tn-account__btn {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
    border-color: var(--tn-primary);
}

@media (max-width: 1023px) {
    .tn-search__panel {
        position: fixed;
        top: calc(var(--tn-header-top-h) + env(safe-area-inset-top, 0px));
        left: 12px;
        right: 12px;
        width: auto;
    }
}

.tn-search-bar input {
    flex: 1;
    min-width: 0;
    height: 40px;
    border: 1px solid var(--tn-border);
    border-right: 0;
    padding: 0 12px;
    font: inherit;
    background: var(--tn-surface);
    color: var(--tn-text);
}

.tn-search-bar input:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
}

.tn-search-bar button {
    width: 48px;
    height: 40px;
    border: 1px solid var(--tn-accent);
    background: var(--tn-accent);
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.tn-search-bar button svg {
    width: 18px;
    height: 18px;
}

/* ── Header nav row ── */
.tn-header-nav {
    background: var(--tn-surface);
    border-bottom: 1px solid var(--tn-border);
    overflow: visible;
    position: relative;
    z-index: 40;
}

.tn-header-nav__inner {
    display: flex;
    align-items: stretch;
    min-height: var(--tn-header-nav-h);
    overflow: visible;
}

.tn-nav-primary {
    display: none;
    align-items: stretch;
    flex: 1;
    min-width: 0;
    overflow: visible;
}

.tn-main-nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.tn-main-nav li { flex-shrink: 0; }

.tn-main-nav a {
    display: block;
    padding: 0 14px;
    line-height: var(--tn-header-nav-h);
    text-decoration: none;
    color: var(--tn-link);
    font-weight: 600;
    border-right: 1px solid var(--tn-border-light);
    white-space: nowrap;
}

.tn-main-nav a:hover,
.tn-main-nav a.is-active {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
}

.tn-nav-end {
    display: none;
    margin-left: auto;
    flex-shrink: 0;
    align-items: stretch;
}

.tn-nav-support {
    display: inline-flex;
    align-items: center;
    height: var(--tn-header-nav-h);
    padding: 0 16px;
    border-left: 1px solid var(--tn-border-light);
    background: transparent;
    color: var(--tn-link);
    text-decoration: none;
    font-weight: 600;
    white-space: nowrap;
}

.tn-nav-support:hover,
.tn-nav-support.is-active {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
}

.tn-nav-partner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--tn-header-nav-h);
    padding: 0 16px;
    border-left: 1px solid var(--tn-border-light);
    background: var(--tn-success-soft);
    color: var(--tn-success);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    border: 0;
    border-left: 1px solid var(--tn-border-light);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.tn-nav-partner:hover {
    filter: brightness(0.97);
}

/* Partner cabinet establishment picker */
.tn-cab {
    position: relative;
    display: inline-flex;
    align-items: stretch;
}

.tn-cab__btn {
    height: var(--tn-header-nav-h);
}

.tn-cab__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
}

.tn-cab.is-open .tn-cab__caret {
    transform: rotate(180deg);
}

.tn-cab__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 80;
    width: min(360px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #e6e9f0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 12px 32px rgba(26, 28, 46, 0.14);
}

.tn-cab__search {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #e6e9f0;
    border-radius: 0;
    background: #fff;
    margin-bottom: 10px;
}

.tn-cab__search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 13px;
    color: #1a1c2e;
    min-width: 0;
}

.tn-cab__search input::placeholder { color: #a0a7b8; }

.tn-cab__list {
    max-height: 320px;
    overflow: auto;
    overflow-anchor: none;
}

.tn-cab__section { margin-bottom: 8px; }

.tn-cab__section-title {
    padding: 6px 8px 8px;
    font-size: 13px;
    font-weight: 800;
    color: #1a1c2e;
}

.tn-cab__section-title--muted {
    font-size: 12px;
    font-weight: 700;
    color: #8b93a7;
}

.tn-cab__item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 42px;
    padding: 8px 10px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #1a1c2e;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.tn-cab__item:hover { background: #f4f6fb; }

.tn-cab__item.is-current {
    background: #eef0ff;
}

.tn-cab__item-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-cab__badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    height: 22px;
    padding: 0 8px;
    border-radius: 0;
    background: #ebfbee;
    color: #2f9e44;
    font-size: 11px;
    font-weight: 700;
}

.tn-cab__empty {
    padding: 16px 8px;
    text-align: center;
    color: #8b93a7;
    font-size: 13px;
    font-weight: 600;
}

/* Global partner ⋮ actions menu */
.tn-pmenu {
    position: relative;
    display: inline-flex;
    align-items: stretch;
    flex-shrink: 0;
}

.tn-pmenu[hidden] {
    display: none !important;
}

.tn-pmenu__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tn-pmenu__btn:hover,
.tn-pmenu.is-open .tn-pmenu__btn {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-pmenu__panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 85;
    min-width: 260px;
    max-width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, 480px);
    overflow: auto;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
    display: none;
}

html[data-theme="dark"] .tn-pmenu__panel {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

.tn-pmenu.is-open .tn-pmenu__panel,
.tn-pmenu__panel.active {
    display: block;
}

.tn-pmenu__panel[hidden] {
    display: none !important;
}

.tn-pmenu--drawer {
    display: block;
    width: 100%;
}

.tn-pmenu--drawer .tn-pmenu__btn {
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    gap: 8px;
    border-left: 0;
    padding: 10px 14px;
    background: var(--tn-surface-2);
    font-size: 14px;
    font-weight: 700;
}

.tn-pmenu__label {
    font-size: 14px;
    font-weight: 700;
}

.tn-pmenu--drawer .tn-pmenu__panel {
    position: static;
    top: auto;
    right: auto;
    margin-top: 8px;
    width: 100%;
    max-width: none;
    box-shadow: none;
}

/* Partner page chrome: title + ⋮ */
.tn-pbar-wrap {
    width: min(100% - 24px, var(--tn-container));
    margin: 0 auto 14px;
}

.tn-pbar-wrap[hidden] {
    display: none !important;
}

.tn-pbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    padding: 6px 0 12px;
    border-bottom: 1px solid var(--tn-border);
}

.tn-pbar__left {
    min-width: 0;
    flex: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.tn-pbar__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.tn-pbar__back:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-pbar__back[hidden] {
    display: none !important;
}

.tn-pbar__title {
    margin: 0;
    font-size: clamp(18px, 2.4vw, 22px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--tn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-pbar__right {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(100%, 720px);
}

.tn-pbar__est {
    max-width: min(240px, 36vw);
}

.tn-pbar__date[hidden],
.tn-pbar__est[hidden],
.tn-pbar__add[hidden] {
    display: none !important;
}

.tn-pbar__add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 14px;
    border: 0;
    border-radius: 0;
    background: var(--tn-primary, #5B67F5);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.tn-pbar__add:hover {
    filter: brightness(0.96);
}

@media (max-width: 767px) {
    .tn-pbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        grid-template-areas:
            "left est menu"
            "date date date";
        gap: 8px 10px;
        align-items: center;
    }

    .tn-pbar__left {
        grid-area: left;
        flex: none;
    }

    .tn-pbar__right {
        display: contents;
    }

    .tn-pbar__date {
        grid-area: date;
        width: 100%;
        max-width: none;
        justify-content: space-between;
    }

    .tn-pbar__date #pdash-date-label {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tn-pbar__est {
        grid-area: est;
        max-width: min(200px, 52vw);
    }

    .tn-pbar-wrap .tn-pmenu--bar {
        grid-area: menu;
        justify-self: end;
    }

    .tn-pbar__add:not([hidden]) {
        grid-column: 1 / -1;
        width: 100%;
        justify-self: stretch;
    }

    .tn-pbar__add:not([hidden]) ~ .tn-pbar__date:not([hidden]) {
        grid-row: 3;
    }
}

.tn-pmenu--bar .tn-pmenu__btn {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

html[data-site-shell="themanew"] #spa-content.tn-main {
    display: flex;
    flex-direction: column;
}

.tn-cab--drawer {
    display: block;
    width: 100%;
}

.tn-cab--drawer .tn-cab__btn,
.tn-nav-partner--drawer {
    width: 100%;
    height: auto;
    min-height: 44px;
    justify-content: flex-start;
    border-left: 0 !important;
    border-radius: 0;
    background: var(--tn-success-soft) !important;
    color: var(--tn-success) !important;
    padding: 10px 14px;
}

.tn-drawer__actions .tn-cab {
    order: 0;
}

.tn-cab--drawer .tn-cab__panel {
    position: static;
    width: 100%;
    margin-top: 8px;
    box-shadow: none;
}

.tn-user-nav {
    display: flex;
    align-items: center;
    gap: 0;
    margin-left: auto;
}

.tn-user-nav a,
.tn-user-nav button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--tn-header-nav-h);
    padding: 0 14px;
    border: 0;
    border-left: 1px solid var(--tn-border-light);
    background: transparent;
    color: var(--tn-link);
    text-decoration: none;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tn-user-nav a:hover,
.tn-user-nav button:hover {
    background: var(--tn-primary-soft);
}

.tn-user-nav .tn-user-nav__cta {
    background: var(--tn-success-soft);
    color: var(--tn-success);
}

/* «Ещё» dropdown in header nav — outside scrollable .tn-main-nav */
.tn-more {
    display: none;
    position: relative;
    flex-shrink: 0;
    z-index: 50;
}

.tn-more__btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: var(--tn-header-nav-h);
    padding: 0 14px;
    border: 0;
    border-right: 1px solid var(--tn-border-light);
    background: transparent;
    color: var(--tn-link);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.tn-more__btn:hover,
.tn-more.is-open .tn-more__btn {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
}

.tn-more__caret {
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.7;
}

.tn-more__panel {
    position: absolute;
    top: calc(100% + 1px);
    right: 0;
    z-index: 80;
    width: min(320px, calc(100vw - 24px));
    max-height: min(70vh, 520px);
    overflow: auto;
    background: var(--tn-surface, #fff);
    border: 1px solid var(--tn-border);
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
    padding: 6px 0;
}

.tn-more__panel[hidden] {
    display: none !important;
}

.tn-more__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 14px;
    border: 0;
    background: transparent;
    color: var(--tn-text, #1a1a2e);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.tn-more__item:hover {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary-dark, #3d47c9);
}

.tn-more__item--danger {
    color: var(--tn-danger, #dc2626);
}

.tn-more__item--danger:hover {
    background: #fff5f5;
    color: var(--tn-danger, #dc2626);
}

.tn-more__item--muted {
    font-size: 12px;
    font-weight: 500;
    color: var(--tn-muted, #8b8b9a);
}

.tn-more__divider {
    height: 1px;
    margin: 6px 0;
    background: var(--tn-border-light, #ececf2);
}

.tn-more__shell {
    padding: 8px 12px 10px;
    border-top: 1px solid var(--tn-border-light, #ececf2);
}

.tn-drawer__more {
    padding: 8px 0 4px;
    border-top: 1px solid var(--tn-border-light);
    margin-top: 8px;
}

.tn-drawer__more .tn-more__item {
    padding: 12px 16px;
}

.tn-drawer__more .tn-more__shell {
    display: none;
}

.tn-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    cursor: pointer;
    color: var(--tn-text);
    padding: 0;
    flex-shrink: 0;
}

.tn-menu-toggle:hover {
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
    border-color: var(--tn-primary);
}

/* Mobile: show burger (must come AFTER base display:none) */
@media (max-width: 1023px) {
    .tn-menu-toggle.tn-menu-toggle--top {
        display: inline-flex !important;
    }

    .tn-header-top .tn-logo {
        display: none;
    }

    .tn-header-nav {
        display: none;
    }

    .tn-header-top__inner {
        gap: 8px;
    }

    .tn-header-cta {
        display: flex;
    }

    .tn-header-partner {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 34px;
        padding: 0 10px;
        border: 1px solid var(--tn-primary);
        background: var(--tn-primary);
        color: #fff !important;
        text-decoration: none;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tn-header-support {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 34px;
        padding: 0 8px;
        border: 1px solid var(--tn-border);
        background: var(--tn-surface);
        color: var(--tn-link) !important;
        text-decoration: none;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .tn-header-support:hover {
        background: var(--tn-primary-soft);
    }

    .tn-header-partner:hover {
        filter: brightness(0.96);
    }
}

@media (max-width: 420px) {
    .tn-header-support {
        padding: 0 6px;
        font-size: 10px;
    }

    .tn-header-partner {
        padding: 0 8px;
        font-size: 10px;
    }
}

@media (min-width: 1024px) {
    .tn-header-cta,
    .tn-header-partner,
    .tn-header-support {
        display: none !important;
    }
}

/* themanew: #spa-content must not trap page scroll / break fixed header layout */
html[data-site-shell="themanew"] #spa-content {
    overflow: visible !important;
}

/* ── Layout ── */
.tn-main {
    padding: calc(var(--tn-header-top-h) + env(safe-area-inset-top, 0px) + 8px) 0 0;
}

.tn-main__inner {
    width: min(100% - 24px, var(--tn-container));
    margin-inline: auto;
}

.tn-breadcrumbs {
    display: none !important;
    padding: 12px 0 0;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-breadcrumbs a {
    color: var(--tn-link);
    text-decoration: none;
}

.tn-breadcrumbs a:hover { text-decoration: underline; }

.tn-page-title {
    margin: 8px 0 16px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.25;
}

.tn-catalog-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    align-items: start;
}

.tn-filters {
    display: none;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    margin-bottom: 12px;
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.tn-filters.is-open { display: block; }

.tn-filter-block {
    border-bottom: 1px solid var(--tn-border-light);
    padding: 12px;
    overflow: hidden;
}

.tn-filter-block:last-child { border-bottom: 0; }

.tn-filter-block h3 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 700;
}

.tn-filter-list {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

.tn-filter-list li {
    margin-bottom: 2px;
    max-width: 100%;
    overflow: hidden;
}

.tn-filter-list a {
    display: block;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 6px 8px 6px 10px;
    border-left: 2px solid var(--tn-border);
    color: var(--tn-link);
    text-decoration: none;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-filter-list a:hover,
.tn-filter-list a.is-active {
    border-left-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-filter-list__group {
    overflow: visible;
}

.tn-filter-spoiler {
    margin: 0;
}

.tn-filter-spoiler__summary {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    list-style: none;
    cursor: pointer;
    position: relative;
    padding: 6px 28px 6px 10px;
    border-left: 2px solid var(--tn-border);
    color: var(--tn-link);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

.tn-filter-spoiler__summary::-webkit-details-marker {
    display: none;
}

.tn-filter-spoiler__summary:hover,
.tn-filter-spoiler__summary.is-active,
.tn-filter-spoiler.is-active-group > .tn-filter-spoiler__summary {
    border-left-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-filter-spoiler__summary::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10px;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid var(--tn-muted);
    border-bottom: 1.5px solid var(--tn-muted);
    transform: translateY(-70%) rotate(45deg);
    transition: transform 0.15s;
    pointer-events: none;
}

.tn-filter-spoiler[open] > .tn-filter-spoiler__summary::after {
    transform: translateY(-30%) rotate(225deg);
}

.tn-filter-spoiler__subs {
    list-style: none;
    margin: 0;
    padding: 2px 0 4px;
}

.tn-filter-spoiler__subs > li > a {
    padding-left: 18px;
}

.tn-filter-list__sub a {
    padding-left: 22px;
    font-size: 12px;
    font-weight: 600;
}

.tn-filter-toggle {
    display: flex;
    width: 100%;
    margin-bottom: 12px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-link);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tn-catalog-main { min-width: 0; }

.tn-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
}

.tn-toolbar--filters-only {
    padding: 0;
    background: transparent;
    border: 0;
}

.tn-toolbar--catalog {
    justify-content: space-between;
    gap: 8px;
}

.tn-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 110px);
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-align: left;
}

.tn-cat-btn:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-cat-btn .tn-icon {
    flex-shrink: 0;
    color: var(--tn-muted);
}

.tn-cat-btn__label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-filter-btn__label {
    white-space: nowrap;
}

.tn-sort-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.tn-sort-tabs a {
    display: block;
    padding: 6px 10px;
    border: 1px solid transparent;
    color: var(--tn-link);
    text-decoration: none;
    font-size: 13px;
}

.tn-sort-tabs a.is-active {
    border-color: var(--tn-border);
    background: var(--tn-primary-soft);
    font-weight: 700;
}

.tn-view-toggle {
    display: none;
    gap: 0;
}

.tn-view-toggle button {
    width: 36px;
    height: 32px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    cursor: pointer;
    color: var(--tn-muted);
}

.tn-view-toggle button + button { border-left: 0; }

.tn-view-toggle button.is-active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

/* ── Product cards: mobile list ── */
.tn-items {
    display: flex;
    flex-direction: column;
    gap: 0;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
}

.tn-item {
    display: grid;
    grid-template-columns: 88px 1fr auto;
    gap: 12px;
    align-items: stretch;
    padding: 12px;
    border-bottom: 1px solid var(--tn-border-light);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.tn-item:last-child { border-bottom: 0; }
.tn-item:hover { background: var(--tn-surface-2); }

.tn-item__img {
    width: 88px;
    height: 88px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-bg);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.tn-item__img img,
.tn-item__ph {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    font-weight: 800;
    font-size: 22px;
}

.tn-item__discount {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 1;
    background: var(--tn-primary);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 7px;
}

.tn-item__discount--hot {
    background: var(--tn-accent, #fd7e14);
}

.tn-item__hot {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 1;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-accent, #fd7e14);
    color: #fff;
}

.tn-item__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.tn-item__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.tn-item__title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-link);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tn-item__fav {
    flex-shrink: 0;
    margin: -4px -4px 0 0;
    border: 0;
    background: transparent;
    color: var(--tn-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tn-item__fav .tn-icon {
    width: 18px;
    height: 18px;
    --tn-icon-size: 18px;
}

.tn-item__fav.is-active { color: var(--tn-danger, #fa5252); }

/* Legacy off/on spans (map etc.) — only one visible */
.tn-item__fav > .tn-item__fav-on { display: none !important; }
.tn-item__fav.is-active > .tn-item__fav-off { display: none !important; }
.tn-item__fav.is-active > .tn-item__fav-on { display: inline-flex !important; }

.tn-item__cat {
    margin: 0;
    font-size: 12px;
    color: var(--tn-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-item__meta {
    margin: 2px 0 0;
    font-size: 11px;
    color: var(--tn-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tn-item__loc,
.tn-item__rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.tn-item__loc svg { color: var(--tn-danger, #fa5252); flex-shrink: 0; }

.tn-item__loc {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    flex: 1;
}

.tn-item__rating {
    flex-shrink: 0;
    font-size: 12px;
    color: var(--tn-text);
    font-weight: 700;
    margin-left: auto;
}

.tn-item__star { color: var(--tn-accent, #fd7e14); flex-shrink: 0; }

.tn-item__rating--empty {
    color: #b0b0ba;
    font-weight: 600;
}

.tn-item__rating--empty .tn-item__star {
    color: #d0d0d8;
}

.tn-item__rating--empty .tn-item__rating-num {
    color: #b0b0ba;
}

.tn-item__reviews {
    color: var(--tn-muted);
    font-weight: 600;
}

.tn-item__chevron {
    color: var(--tn-muted);
    font-size: 22px;
    line-height: 1;
    padding-right: 2px;
    align-self: center;
}

/* legacy hooks kept inert */
.tn-item__bookmark,
.tn-item__badge,
.tn-item__price,
.tn-item__footer,
.tn-item__icons,
.tn-item__cta,
.tn-item__desc { display: none !important; }

.tn-stars {
    color: #c5c5c5;
    letter-spacing: 1px;
    font-size: 12px;
}

/* ── Grid mode (desktop) ── */
.tn-items--grid {
    display: none;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    padding: 0;
    border: 0;
    background: transparent;
}

.tn-items--grid .tn-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    grid-template-columns: unset;
    padding: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    gap: 0;
}

.tn-items--grid .tn-item:hover {
    background: var(--tn-surface);
    border-color: var(--tn-primary);
}

.tn-items--grid .tn-item__img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-items--grid .tn-item__body {
    padding: 12px;
    gap: 6px;
    flex: 1;
    justify-content: flex-start;
}

.tn-items--grid .tn-item__title {
    font-size: 15px;
    font-weight: 700;
}

.tn-items--grid .tn-item__meta {
    margin-top: auto;
    padding-top: 6px;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.tn-items--grid .tn-item__chevron { display: none; }

.tn-items--grid .tn-item__discount {
    font-size: 12px;
    padding: 6px 8px;
}

.tn-items--grid .tn-item__hot {
    width: 28px;
    height: 28px;
}

.tn-btn-buy {
    width: 32px;
    height: 32px;
    border: 1px solid var(--tn-success);
    background: var(--tn-success);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-section-block { margin-bottom: 20px; }

.tn-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.tn-section-head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.tn-section-head a {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: var(--tn-link, #5b67f5);
    white-space: nowrap;
}

/* ── Home page card rails (screenshot layout, rectangular) ── */
.tn-home-rail {
    margin-bottom: 10px;
}

.tn-home-rail .tn-section-head {
    margin-bottom: 14px;
}

.tn-home-rail .tn-section-head h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--tn-text, #1a1a1a);
}

.tn-home-rail .tn-section-head a {
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-link, #5b67f5);
}

.tn-home-rail__wrap {
    position: relative;
}

.tn-home-rail__track {
    display: flex !important;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 2px 8px;
    border: 0;
    background: transparent;
}

.tn-home-rail__track::-webkit-scrollbar {
    display: none;
}

.tn-home-rail__track .tn-item {
    flex: 0 0 calc((100% - 42px) / 4);
    min-width: 200px;
    max-width: 280px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.08);
    overflow: hidden;
    text-decoration: none;
    color: inherit;
}

.tn-home-rail__track .tn-item:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(17, 24, 39, 0.12);
}

.tn-home-rail__track .tn-item__img {
    width: 100%;
    height: 150px;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
}

.tn-home-rail__track .tn-item__img img,
.tn-home-rail__track .tn-item__ph {
    border-radius: 0;
}

.tn-home-rail__track .tn-item__discount {
    top: 5px;
    left: 5px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 8px;
    background: #4f5bd5;
}

.tn-home-rail__track .tn-item__discount--hot {
    background: var(--tn-accent, #fd7e14);
}

.tn-home-rail__track .tn-item__hot {
    top: 5px;
    right: 5px;
    border-radius: 0;
}

.tn-home-rail__track .tn-item__body {
    padding: 8px;
    gap: 0;
    flex: 1;
    justify-content: flex-start;
    background: #fff;
}

.tn-home-rail__track .tn-item__title {
    font-size: 15px;
    font-weight: 700;
    color: #3f41b5;
    -webkit-line-clamp: 1;
}

.tn-home-rail__track .tn-item__fav {
    color: #5b67f5;
}

.tn-home-rail__track .tn-item__fav.is-active {
    color: #fa5252;
}

.tn-home-rail__track .tn-item__cat {
    font-size: 12px;
    color: #8a8a96;
    margin: 0;
}

.tn-home-rail__track .tn-item__meta {
    margin-top: auto;
    padding-top: 4px;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 8px;
    font-size: 12px;
}

.tn-home-rail__track .tn-item__loc {
    color: #8a8a96;
}

.tn-home-rail__track .tn-item__rating-num {
    color: #1a1a1a;
    font-weight: 700;
}

.tn-home-rail__track .tn-item__rating--empty,
.tn-home-rail__track .tn-item__rating--empty .tn-item__rating-num {
    color: #b0b0ba;
    font-weight: 600;
}

.tn-home-rail__track .tn-item__rating--empty .tn-item__star {
    color: #d0d0d8;
}

.tn-home-rail__track .tn-item__reviews {
    color: #8a8a96;
    font-weight: 400;
}

.tn-home-rail__track .tn-item__chevron {
    display: none;
}

.tn-home-rail__prev,
.tn-home-rail__next {
    position: absolute;
    top: 50%;
    z-index: 2;
    transform: translateY(-70%);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #5b67f5;
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.16);
    cursor: pointer;
}

.tn-home-rail__prev {
    left: -6px;
}

.tn-home-rail__next {
    right: -6px;
}

.tn-home-rail__prev:hover,
.tn-home-rail__next:hover {
    background: #f7f7ff;
}

.tn-home-rail__prev[hidden],
.tn-home-rail__next[hidden] {
    display: none;
}

html[data-theme="dark"] .tn-home-rail__track .tn-item,
html[data-theme="dark"] .tn-home-rail__track .tn-item:hover,
html[data-theme="dark"] .tn-home-rail__track .tn-item__body {
    background: var(--tn-surface);
}

html[data-theme="dark"] .tn-home-rail__track .tn-item {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .tn-home-rail__track .tn-item__title {
    color: #a5b4fc;
}

html[data-theme="dark"] .tn-home-rail__prev,
html[data-theme="dark"] .tn-home-rail__next {
    background: var(--tn-surface);
    color: var(--tn-link);
}

@media (max-width: 1023px) {
    .tn-home-rail__track .tn-item {
        flex-basis: calc((100% - 14px) / 2);
        min-width: 180px;
        max-width: 240px;
    }

    .tn-home-rail .tn-section-head h2 {
        font-size: 18px;
    }
}

@media (max-width: 640px) {
    .tn-home-rail__track .tn-item {
        flex-basis: 72%;
        min-width: 220px;
        max-width: 260px;
    }

    .tn-home-rail__prev {
        left: 4px;
        width: 32px;
        height: 32px;
    }

    .tn-home-rail__next {
        right: 4px;
        width: 32px;
        height: 32px;
    }
}

.tn-item__more {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-empty {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 48px 24px;
    text-align: center;
}

.tn-empty__icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.tn-empty__title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
}

.tn-empty__text {
    margin: 0 0 16px;
    color: var(--tn-muted);
    max-width: 360px;
    margin-inline: auto;
}

.tn-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tn-btn--primary {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-btn--ghost {
    background: var(--tn-surface-2);
    border-color: var(--tn-border);
    color: var(--tn-text);
}

.tn-btn--success {
    background: var(--tn-success);
    border-color: var(--tn-success);
    color: #fff;
}

.tn-btn--block { width: 100%; }

.tn-banner {
    border: 1px solid var(--tn-border);
    background: var(--tn-primary-soft);
    padding: 14px 16px;
    margin-bottom: 16px;
}

.tn-banner strong { color: var(--tn-primary-dark); }

.tn-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 16px;
}

.tn-pagination a,
.tn-pagination span {
    min-width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-link);
    text-decoration: none;
    font-size: 13px;
}

.tn-pagination .is-current {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
    font-weight: 700;
}

/* ── Bottom nav (mobile) ── */
.tn-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    height: calc(var(--tn-bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    background: var(--tn-surface);
    border-top: 1px solid var(--tn-border);
}

.tn-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 4px 0 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--tn-muted);
    text-decoration: none;
}

.tn-bottom-nav a .tn-icon {
    --tn-icon-size: 20px;
}

.tn-bottom-nav a.is-active { color: var(--tn-primary); }

/* ── Footer ── */
.tn-footer {
    margin-top: 16px;
    background: #f5f6fa;
    border-top: 1px solid #e8eaef;
    padding: 24px 0 calc(var(--tn-bottom-nav-h) + 16px + env(safe-area-inset-bottom, 0px));
    font-size: 14px;
    color: #8b93a7;
}

.tn-footer__top {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px 20px;
}

.tn-footer__brand {
    max-width: 280px;
}

.tn-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    margin-bottom: 10px;
}

.tn-footer__logo img {
    width: 42px;
    height: 42px;
    border-radius: 0;
    flex-shrink: 0;
}

.tn-footer__logo-text strong {
    display: block;
    font-size: 18px;
    line-height: 1.15;
    font-weight: 800;
    color: #1a1c2e;
}

.tn-footer__logo-text small {
    display: block;
    margin-top: 2px;
    font-size: 11px;
    color: #9aa0b0;
}

.tn-footer__about {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: #8b93a7;
}

.tn-footer__brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.tn-footer__social {
    display: flex;
    gap: 8px;
}

.tn-footer__social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 0;
    background: #e8eaf6;
    color: #5b67f5;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.tn-footer__social-btn:hover {
    background: #5b67f5;
    color: #fff;
}

.tn-footer__shell {
    margin: 0;
}

.tn-footer__shell .site-shell-switcher {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    width: auto;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.tn-footer__shell .site-shell-switcher__label {
    margin: 0;
    font-size: 10px;
    letter-spacing: 0.03em;
}

.tn-footer__shell .site-shell-switcher__buttons {
    display: inline-flex;
    grid-template-columns: none;
    width: auto;
    gap: 4px;
}

.tn-footer__shell .site-shell-switcher__btn {
    width: auto;
    min-width: 0;
    height: 28px;
    padding: 0 8px;
    font-size: 11px;
    white-space: nowrap;
}

.tn-footer__heading {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: #1a1c2e;
}

.tn-footer__spoiler {
    margin: 0;
    border: 0;
    border-top: 1px solid #e4e7ef;
    padding-top: 10px;
}

.tn-footer__spoiler--brand {
    border-top: 0;
    padding-top: 0;
}

.tn-footer__spoiler > summary.tn-footer__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.tn-footer__spoiler > summary.tn-footer__heading::-webkit-details-marker {
    display: none;
}

.tn-footer__spoiler > summary.tn-footer__heading::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #8b93a7;
    border-bottom: 2px solid #8b93a7;
    transform: rotate(45deg);
    transition: transform 0.15s;
    flex-shrink: 0;
}

.tn-footer__spoiler[open] > summary.tn-footer__heading::after {
    transform: rotate(-135deg);
    margin-top: 4px;
}

.tn-footer__spoiler .tn-footer__links,
.tn-footer__spoiler .tn-footer__spoiler-body {
    margin-top: 8px;
    padding-bottom: 4px;
}

.tn-footer__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tn-footer__links li {
    margin: 0 0 4px;
}

.tn-footer__links a {
    color: #8b93a7;
    text-decoration: none;
    font-size: 13px;
    line-height: 1.3;
    transition: color 0.15s;
}

.tn-footer__links a:hover {
    color: #5b67f5;
}

.tn-footer__apps-text {
    margin: 0 0 10px;
    font-size: 12px;
    line-height: 1.35;
    color: #8b93a7;
}

.tn-footer__stores {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    max-width: 180px;
}

.tn-footer__store {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    height: 44px;
    padding: 0 14px;
    border: 1px solid #e4e7ef;
    border-radius: 0;
    background: #fff;
    color: #1a1c2e;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.tn-footer__store:hover {
    background: #e8eaf6;
    border-color: #d5daf0;
}

.tn-footer__store .tn-icon {
    flex-shrink: 0;
    color: #5b67f5;
}

.tn-footer__store-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1.1;
}

.tn-footer__store-text small {
    font-size: 9px;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: #8b93a7;
}

.tn-footer__store-text strong {
    font-size: 14px;
    font-weight: 700;
}

.tn-footer__bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e4e7ef;
}

.tn-footer__copy {
    margin: 0;
    font-size: 12px;
    color: #9aa0b0;
}

.tn-footer__contacts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.tn-footer__contact {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1a1c2e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.tn-footer__contact .tn-icon {
    color: #8b93a7;
    flex-shrink: 0;
}

.tn-footer__contact:hover {
    color: #5b67f5;
}

@media (max-width: 1023px) {
    .tn-footer {
        padding-top: 0;
    }

    .tn-footer .tn-container {
        width: 100%;
        max-width: none;
    }

    .tn-footer__top {
        gap: 0;
    }

    .tn-footer__brand,
    .tn-footer__col {
        max-width: none;
        width: 100%;
    }

    .tn-footer__spoiler {
        width: 100%;
        padding-top: 0;
        border-top: 1px solid #e4e7ef;
    }

    .tn-footer__spoiler--brand {
        border-top: 0;
    }

    .tn-footer__spoiler > summary.tn-footer__heading {
        padding: 14px 16px;
        min-height: 48px;
    }

    .tn-footer__spoiler .tn-footer__links,
    .tn-footer__spoiler .tn-footer__spoiler-body {
        margin-top: 0;
        padding: 0 16px 14px;
    }

    .tn-footer__stores {
        max-width: none;
    }

    .tn-footer__bottom {
        margin-top: 0;
        padding: 14px 16px 0;
    }
}

html[data-theme="dark"] .tn-footer {
    background: #12141c;
    border-top-color: #2a2e3a;
    color: #94a3b8;
}

html[data-theme="dark"] .tn-footer__logo-text strong,
html[data-theme="dark"] .tn-footer__heading,
html[data-theme="dark"] .tn-footer__contact {
    color: #f1f5f9;
}

html[data-theme="dark"] .tn-footer__logo-text small,
html[data-theme="dark"] .tn-footer__about,
html[data-theme="dark"] .tn-footer__links a,
html[data-theme="dark"] .tn-footer__apps-text,
html[data-theme="dark"] .tn-footer__copy {
    color: #94a3b8;
}

html[data-theme="dark"] .tn-footer__social-btn {
    background: #1e2433;
    color: #a5b4fc;
}

html[data-theme="dark"] .tn-footer__spoiler {
    border-top-color: #2a2e3a;
}

html[data-theme="dark"] .tn-footer__bottom {
    border-top-color: #2a2e3a;
}

html[data-theme="dark"] .tn-footer__store {
    background: #111827;
    border-color: #111827;
    color: #fff;
}

html[data-theme="dark"] .tn-footer__store:hover {
    background: #000;
    border-color: #000;
}

html[data-theme="dark"] .tn-footer__store .tn-icon {
    color: #fff;
}

html[data-theme="dark"] .tn-footer__store-text small {
    color: rgba(255, 255, 255, 0.75);
}

/* ── Drawer ── */
.tn-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
}

.tn-drawer.is-open {
    pointer-events: auto;
    visibility: visible;
}

.tn-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity 0.2s;
}

.tn-drawer.is-open .tn-drawer__backdrop { opacity: 1; }

.tn-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(88vw, 300px);
    height: 100%;
    background: var(--tn-surface);
    border-right: 1px solid var(--tn-border);
    transform: translateX(-100%);
    transition: transform 0.25s;
    overflow: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.tn-drawer.is-open .tn-drawer__panel { transform: translateX(0); }

.tn-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--tn-border);
}

.tn-drawer__actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-drawer__actions .tn-btn { justify-content: flex-start; }

.tn-drawer__actions .tn-btn--fav { background: var(--tn-primary-soft); color: var(--tn-primary); }

.tn-drawer__actions .tn-btn--add { background: var(--tn-success-soft); color: var(--tn-success); }

.tn-drawer__nav {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.tn-drawer__nav a {
    display: block;
    padding: 10px 12px 10px 16px;
    border-left: 2px solid transparent;
    color: var(--tn-link);
    text-decoration: none;
    font-weight: 600;
}

.tn-drawer__nav a:hover {
    border-left-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-drawer__section {
    padding: 12px;
    border-top: 1px solid var(--tn-border-light);
}

.tn-drawer__footer {
    margin-top: auto;
}

.tn-drawer__section--city {
    padding-top: 12px;
}

.tn-drawer__section--city .tn-city-btn--drawer {
    width: 100%;
}

.tn-legacy-zone {
    border: 1px solid var(--tn-border-light);
    padding: 8px;
    margin-top: 8px;
    background: var(--tn-surface);
}

/* Shell switcher inside themanew */
.tn-body .site-shell-switcher {
    border-radius: 0;
    background: transparent;
    border-color: var(--tn-border);
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.tn-body .site-shell-switcher__buttons {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.tn-body .site-shell-switcher__btn {
    border-radius: 0;
    min-width: 0;
    font-size: 12px;
    padding: 8px 4px;
}

/* ── Desktop ── */
@media (min-width: 768px) {
    .tn-footer__top {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tn-footer__brand {
        grid-column: 1 / -1;
        max-width: 420px;
    }

    .tn-footer__bottom {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    .tn-footer {
        padding: 28px 0 24px;
    }

    .tn-footer__top {
        grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(0, 0.85fr)) minmax(180px, 1fr);
        gap: 24px 28px;
        align-items: start;
    }

    .tn-footer__brand {
        grid-column: auto;
        max-width: none;
    }

    .tn-footer__spoiler {
        border-top: 0;
        padding-top: 0;
    }

    .tn-footer__spoiler > summary.tn-footer__heading {
        pointer-events: none;
        cursor: default;
        margin-bottom: 8px;
        padding: 0;
    }

    .tn-footer__spoiler > summary.tn-footer__heading::after {
        display: none;
    }

    /* Keep link columns always visible on desktop even if details is closed */
    .tn-footer__spoiler > .tn-footer__links,
    .tn-footer__spoiler > .tn-footer__spoiler-body {
        display: block !important;
        margin-top: 0;
        padding-bottom: 0;
    }

    .tn-footer__spoiler--brand > summary.tn-footer__heading {
        display: none;
    }

    .tn-footer__spoiler--brand > .tn-footer__spoiler-body {
        margin-top: 0;
    }

    .tn-main {
        padding-top: calc(var(--tn-header-top-h) + var(--tn-header-nav-h) + env(safe-area-inset-top, 0px) + 8px);
        padding-bottom: 0;
    }

    .tn-nav-primary { display: flex; }

    .tn-main-nav { display: flex; }

    .tn-more { display: block; }

    .tn-nav-end { display: flex; }

    .tn-menu-toggle,
    .tn-menu-toggle--top { display: none !important; }

    .tn-logo { display: flex; }

    .tn-header-nav { display: block; }

    .tn-filter-toggle { display: none; }

    .tn-filters {
        display: block;
        margin-bottom: 0;
        width: 100%;
        max-width: var(--tn-filter-w);
    }

    .tn-catalog-layout {
        grid-template-columns: var(--tn-filter-w) minmax(0, 1fr);
        gap: 16px;
    }

    .tn-catalog-layout--full {
        grid-template-columns: minmax(0, 1fr);
    }

    .tn-view-toggle { display: flex; }

    .tn-bottom-nav { display: none; }

    .tn-items--list { display: none; }

    .tn-items--grid { display: grid; }

    .tn-drawer { display: none; }
}

/* List view override on desktop when toggled */
.tn-catalog-main[data-view="list"] .tn-items--grid { display: none; }

.tn-catalog-main[data-view="list"] .tn-items--list { display: flex; }

/* Compact grid view — denser than home rails (Partners / Wholesalers) */
.tn-catalog-main[data-view="compact"] .tn-items--list { display: none; }

.tn-catalog-main[data-view="compact"] .tn-items--grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
}

@media (min-width: 640px) {
    .tn-catalog-main[data-view="compact"] .tn-items--grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

@media (min-width: 1024px) {
    .tn-catalog-main[data-view="compact"] .tn-items--grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 0;
    gap: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    box-shadow: 0 1px 6px rgba(17, 24, 39, 0.07);
    overflow: hidden;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item:hover {
    background: #fff;
    border-color: transparent;
    box-shadow: 0 3px 12px rgba(17, 24, 39, 0.1);
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__img {
    width: 100%;
    height: 96px;
    aspect-ratio: auto;
    border: 0;
    border-radius: 0;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__img img,
.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__ph {
    border-radius: 0;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__discount {
    top: 4px;
    left: 4px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 6px;
    background: #4f5bd5;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__discount--hot {
    background: var(--tn-accent, #fd7e14);
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__hot {
    top: 4px;
    right: 4px;
    border-radius: 0;
    transform: scale(0.85);
    transform-origin: top right;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__body {
    padding: 6px;
    gap: 0;
    flex: 1;
    justify-content: flex-start;
    background: #fff;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    color: #3f41b5;
    -webkit-line-clamp: 1;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__fav {
    color: #5b67f5;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__fav svg,
.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__fav .tn-icon {
    width: 16px;
    height: 16px;
    --tn-icon-size: 16px;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__fav.is-active {
    color: #fa5252;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__cat {
    font-size: 11px;
    color: #8a8a96;
    margin: 0;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__meta {
    margin-top: auto;
    padding-top: 2px;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 6px;
    font-size: 11px;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__loc {
    color: #8a8a96;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__rating-num {
    color: #1a1a1a;
    font-weight: 700;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__rating--empty,
.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__rating--empty .tn-item__rating-num {
    color: #b0b0ba;
    font-weight: 600;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__rating--empty .tn-item__star {
    color: #d0d0d8;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__reviews {
    color: #8a8a96;
    font-weight: 400;
}

.tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__chevron {
    display: none;
}

html[data-theme="dark"] .tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item,
html[data-theme="dark"] .tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item:hover,
html[data-theme="dark"] .tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__body {
    background: var(--tn-surface);
}

html[data-theme="dark"] .tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .tn-catalog-main[data-view="compact"] .tn-items--grid .tn-item__title {
    color: #a5b4fc;
}

/* Grid on mobile (from filters modal) — compact uses its own styles above */
@media (max-width: 1023px) {
    .tn-catalog-main[data-view="grid"] .tn-items--list {
        display: none;
    }

    .tn-catalog-main[data-view="grid"] .tn-items--grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0;
        border: 0;
        background: transparent;
    }

    .tn-catalog-main[data-view="grid"] .tn-items--grid .tn-item {
        display: flex;
        flex-direction: column;
        border: 1px solid var(--tn-border);
        background: var(--tn-surface);
        padding: 0;
    }

    .tn-catalog-main[data-view="grid"] .tn-items--grid .tn-item__img {
        width: 100%;
        aspect-ratio: 4 / 3;
        border: 0;
        border-bottom: 1px solid var(--tn-border-light);
    }

    .tn-catalog-main[data-view="grid"] .tn-items--grid .tn-item__chevron {
        display: none;
    }
}

/* ── Simple page / legacy wrap ── */
.tn-page-intro {
    margin: 0 0 16px;
    color: var(--tn-muted);
    max-width: 640px;
}

.tn-simple-page {
    max-width: var(--tn-container);
    margin: 0 auto;
    padding: 0 0 24px;
}

.tn-legacy-zone--flush {
    border-style: solid;
    padding: 0;
    overflow: hidden;
}

.tn-legacy-zone .page-content {
    max-width: none;
    padding: 12px;
}

.tn-legacy-zone .map-container-full {
    min-height: min(70vh, 640px);
}

.tn-legacy-zone--flush .chat-page {
    min-height: min(72vh, 680px);
}

.tn-legacy-zone .reg-screen,
.tn-legacy-zone .login-screen {
    max-width: 480px;
    margin: 0 auto;
}

.tn-legacy-zone .offline-container {
    min-height: min(60vh, 520px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tn-legacy-zone .admin-header,
.tn-legacy-zone .page-content > .admin-header:first-child {
    margin-top: 0;
}

.tn-legacy-zone--flush .page-content {
    padding: 0;
    max-width: none;
}

/* ── Establishment product page ── */
.tn-establishment {
    max-width: var(--tn-container);
    margin: 0 auto;
    padding: 0 0 32px;
}

/* ── Requested hiding/padding polish ── */
.tn-page-title--home-discounts {
    display: none !important;
}

/* ── Home banners (hero + promo cards) ── */
.tn-home-banners {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 0 0 10px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.tn-home-banners__main,
.tn-home-banners__card {
    border-radius: 0;
    overflow: hidden;
}

.tn-home-banners__main {
    position: relative;
    height: 200px;
    min-height: 200px;
    border: 0;
    background: #0b1220;
    touch-action: pan-y;
    user-select: none;
    -webkit-user-select: none;
}

.tn-home-banners__track {
    position: relative;
    width: 100%;
    height: 100%;
}

.tn-home-banners__slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: stretch;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.45s ease;
    background-color: #0b1220;
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tn-home-banners__slide::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        90deg,
        #0b1220 0%,
        #0b1220 34%,
        rgba(11, 18, 32, 0.72) 52%,
        rgba(11, 18, 32, 0.2) 72%,
        transparent 88%
    );
    pointer-events: none;
}

.tn-home-banners__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.tn-home-banners__content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 8px;
    width: min(400px, 54%);
    height: 100%;
    padding: 20px 28px 34px;
    box-sizing: border-box;
    color: #fff;
    pointer-events: none;
}

.tn-home-banners__title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
}

.tn-home-banners__text {
    margin: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
}

.tn-home-banners__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 42px;
    padding: 0 18px;
    margin-top: 4px;
    border: 0;
    border-radius: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    color: #fff;
    white-space: nowrap;
    transition: filter 0.15s ease;
}

.tn-home-banners__btn:hover {
    filter: brightness(1.06);
}

.tn-home-banners__btn--primary {
    background: #4f63f6;
}

.tn-home-banners__btn--success {
    background: #2f9e44;
}

.tn-home-banners__dots {
    position: absolute;
    left: 28px;
    bottom: 14px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 7px;
}

.tn-home-banners__dot {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.tn-home-banners__dot.is-active {
    background: #fff;
    transform: scale(1.35);
}

.tn-home-banners__arrows {
    position: absolute;
    right: 14px;
    bottom: 12px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tn-home-banners__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(20, 24, 36, 0.82);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

.tn-home-banners__arrow:hover {
    background: rgba(20, 24, 36, 0.95);
}

.tn-home-banners__arrow:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.tn-home-banners__card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
    height: 200px;
    min-height: 200px;
    padding: 20px 18px 16px;
    border: 0;
    text-decoration: none;
    color: inherit;
    background: var(--tn-surface);
    box-sizing: border-box;
}

.tn-home-banners__card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    max-width: 72%;
}

.tn-home-banners__card > .tn-home-banners__btn {
    position: relative;
    z-index: 2;
    margin-top: auto;
}

.tn-home-banners__card--giveaways {
    background: #eef0fb;
}

.tn-home-banners__card--partner {
    background: #eef6ef;
}

html[data-theme="dark"] .tn-home-banners__card--giveaways {
    background: #1a1d2e;
}

html[data-theme="dark"] .tn-home-banners__card--partner {
    background: #152018;
}

.tn-home-banners__card-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: #1a1a1a;
}

.tn-home-banners__card-text {
    margin: 0;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.35;
    color: #5c5c66;
}

.tn-home-banners__card-art {
    position: absolute;
    right: 10px;
    bottom: 5px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    pointer-events: none;
    line-height: 0;
}

.tn-home-banners__card-img {
    display: block;
    width: auto;
    height: auto;
    object-fit: contain;
}

.tn-home-banners__card-img--gifts {
    max-width: 120px;
    max-height: 90px;
}

.tn-home-banners__card-img--partner {
    max-width: 100px;
    max-height: 90px;
}

html[data-theme="dark"] .tn-home-banners__card-title {
    color: #f1f5f9;
}

html[data-theme="dark"] .tn-home-banners__card-text {
    color: #94a3b8;
}

@media (min-width: 768px) {
    .tn-home-banners {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
        align-items: stretch;
    }
}

@media (min-width: 1024px) {
    .tn-home-banners__main,
    .tn-home-banners__card {
        height: 200px;
        min-height: 200px;
    }

    .tn-home-banners__content {
        padding: 22px 32px 36px;
        gap: 8px;
    }

    .tn-home-banners__title {
        font-size: 26px;
    }

    .tn-home-banners__text {
        font-size: 14px;
    }

    .tn-home-banners__btn {
        height: 42px;
        padding: 0 18px;
        font-size: 13px;
    }

    .tn-home-banners__dots {
        left: 32px;
        bottom: 14px;
    }

    .tn-home-banners__card {
        padding: 22px 20px 18px;
    }

    .tn-home-banners__card-title {
        font-size: 18px;
    }

    .tn-home-banners__card-text {
        font-size: 13px;
    }
}

@media (max-width: 767px) {
    .tn-home-banners__main {
        height: 180px;
        min-height: 180px;
    }

    .tn-home-banners__card {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        height: auto;
        min-height: 0;
        padding: 10px 12px;
    }

    .tn-home-banners__card > .tn-home-banners__btn {
        display: none;
    }

    .tn-home-banners__content {
        width: 78%;
        padding: 20px 18px 36px;
        gap: 10px;
    }

    .tn-home-banners__title {
        font-size: 20px;
    }

    .tn-home-banners__text {
        font-size: 13px;
    }

    .tn-home-banners__btn {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .tn-home-banners__dots {
        left: 18px;
        bottom: 12px;
    }

    .tn-home-banners__arrows {
        right: 10px;
        bottom: 10px;
    }

    .tn-home-banners__card-body {
        max-width: 68%;
        gap: 4px;
        margin: 0;
    }

    .tn-home-banners__card-title {
        font-size: 15px;
        line-height: 1.25;
    }

    .tn-home-banners__card-text {
        font-size: 12px;
        line-height: 1.3;
    }

    .tn-home-banners__card-art {
        position: static;
        flex-shrink: 0;
        margin-left: auto;
    }

    .tn-home-banners__card-img--gifts {
        max-width: 72px;
        max-height: 58px;
    }

    .tn-home-banners__card-img--partner {
        max-width: 64px;
        max-height: 56px;
    }
}

/* Straight corners for establishment page (themanew) */
.tn-establishment,
.tn-establishment *:not(.tn-review__avatar),
.tn-establishment *:not(.tn-review__avatar)::before,
.tn-establishment *:not(.tn-review__avatar)::after {
    border-radius: 0 !important;
}

.tn-establishment .tn-review__avatar {
    border-radius: 50% !important;
}

.tn-establishment__grid {
    display: grid;
    gap: 10px;
    margin-bottom: 20px;
}

.tn-establishment__main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

@media (min-width: 960px) {
    .tn-establishment__grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        gap: 10px;
    }
}

.tn-establishment__media {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tn-establishment__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tn-establishment__summary {
    min-width: 0;
}

.tn-est-gallery {
    position: relative;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    overflow: hidden;
}

.tn-est-gallery .hero-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    aspect-ratio: 16 / 10;
    max-height: 480px;
    scrollbar-width: none;
}

.tn-est-gallery .hero-slider::-webkit-scrollbar { display: none; }

.tn-est-gallery .slider-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.tn-est-gallery .slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-est-gallery__counter {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    padding: 4px 10px;
    border-radius: 0;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
}

.tn-est-icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 0;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.tn-est-icon-btn:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-est-icon-btn svg,
.tn-est-icon-btn .tn-icon {
    width: 18px;
    height: 18px;
    --tn-icon-size: 18px;
    display: block;
}

.tn-est-icon-btn--like.active,
.tn-est-icon-btn--like.is-active {
    color: var(--tn-danger);
    border-color: color-mix(in srgb, var(--tn-danger) 35%, var(--tn-border));
}

.tn-est-icon-btn--like .tn-est-like-off { display: inline-flex; }
.tn-est-icon-btn--like .tn-est-like-on { display: none !important; }
.tn-est-icon-btn--like.active .tn-est-like-off,
.tn-est-icon-btn--like.is-active .tn-est-like-off { display: none !important; }
.tn-est-icon-btn--like.active .tn-est-like-on,
.tn-est-icon-btn--like.is-active .tn-est-like-on { display: inline-flex !important; }

.tn-est-like-off,
.tn-est-like-on {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    width: 18px;
    height: 18px;
}

.tn-est-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.12);
    color: var(--tn-text);
    cursor: pointer;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-est-slider-nav.prev { left: 12px; }
.tn-est-slider-nav.next { right: 12px; }

.tn-est-thumbs {
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.tn-est-thumbs::-webkit-scrollbar { display: none; }

.tn-est-thumbs__btn {
    flex: 0 0 72px;
    width: 72px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0;
    background: var(--tn-surface);
    cursor: pointer;
    overflow: hidden;
}

.tn-est-thumbs__btn.is-active { border-color: var(--tn-primary); }
.tn-est-thumbs__btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tn-establishment__summary {
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    position: sticky;
    top: 12px;
}

.tn-est-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 36px;
}

.tn-est-summary-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.tn-est-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    min-width: 0;
    color: var(--tn-muted);
    font-size: 13px;
    line-height: 1.2;
}

.tn-est-category {
    display: inline-flex;
    align-items: center;
}

.tn-est-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
    color: var(--tn-text);
    line-height: 1;
}

.tn-est-rating__star {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    color: #f59f00;
    line-height: 0;
}

.tn-est-rating__star .tn-icon {
    width: 14px;
    height: 14px;
    --tn-icon-size: 14px;
    display: block;
}

.tn-est-rating__value {
    font-variant-numeric: tabular-nums;
}

.tn-est-title {
    margin: 0;
    flex: 1;
    min-width: 0;
    font-size: clamp(22px, 2.6vw, 28px);
    line-height: 1.2;
    font-weight: 800;
}

.tn-est-discount {
    position: relative;
    display: flex;
    gap: 12px;
    align-items: center;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 18%, var(--tn-border));
    border-radius: 0;
    background: var(--tn-primary-soft);
    padding: 10px;
    min-height: 64px;
    cursor: pointer;
    overflow: hidden;
}

.tn-est-discount--hot {
    background: var(--tn-accent-soft);
    border-color: color-mix(in srgb, var(--tn-accent) 30%, var(--tn-border));
}

.tn-est-discount--locked { cursor: pointer; }

.tn-est-discount__icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 0;
    color: var(--tn-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.tn-est-discount__icon .tn-icon {
    width: 20px;
    height: 20px;
    --tn-icon-size: 20px;
    display: block;
}

.tn-est-discount--hot .tn-est-discount__icon {
    background: color-mix(in srgb, var(--tn-accent) 16%, transparent);
    color: var(--tn-accent);
}

.tn-est-discount__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.tn-est-discount__body strong {
    font-size: 15px;
    line-height: 1.25;
    font-weight: 800;
}

.tn-est-discount__body span {
    color: var(--tn-muted);
    font-size: 12px;
    line-height: 1.3;
}

.tn-est-discount__qr {
    flex-shrink: 0;
    margin-left: auto;
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 12%, var(--tn-border));
    padding: 4px;
}

.tn-est-discount__qr #mini-qrcode,
.tn-est-discount__qr canvas,
.tn-est-discount__qr img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 48px;
    max-height: 48px;
}

.tn-est-discount__watermark {
    position: absolute;
    right: 8px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    line-height: 0;
    color: color-mix(in srgb, var(--tn-primary) 10%, transparent);
    pointer-events: none;
    user-select: none;
    display: flex;
    align-items: center;
    opacity: 0.9;
}

.tn-est-discount__watermark .tn-icon {
    --tn-icon-size: 72px;
    width: 72px;
    height: 72px;
}

.tn-est-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tn-est-actions .tn-btn {
    min-height: 44px;
    border-radius: 0;
    font-weight: 700;
}

.tn-btn--outline {
    background: var(--tn-surface);
    border: 1px solid var(--tn-primary);
    color: var(--tn-primary);
}

.tn-btn--outline:hover {
    background: var(--tn-primary-soft);
}

.tn-est-info {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--tn-border-light);
}

.tn-est-info li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-est-info li:last-child { border-bottom: none; }

.tn-est-info__ico {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--tn-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-est-info__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-est-info__label {
    font-size: 12px;
    color: var(--tn-muted);
    font-weight: 600;
}

.tn-est-info__value {
    font-size: 14px;
    color: var(--tn-text);
    text-decoration: none;
    line-height: 1.4;
}

.tn-est-info__value--link {
    color: var(--tn-primary);
    font-weight: 600;
}

.tn-est-info__clickable { cursor: pointer; }

.tn-est-map {
    display: block;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    overflow: hidden;
    background: var(--tn-surface-2);
    aspect-ratio: 2.4 / 1;
}

.tn-est-map img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-est-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface-2);
}

.tn-est-help__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-est-help__text strong {
    font-size: 13px;
    line-height: 1.3;
}

.tn-est-help__text span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-est-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    overflow: hidden;
    margin: 0 0 12px;
    background: var(--tn-surface);
}

.tn-est-tab {
    flex: 1 1 auto;
    min-width: 100px;
    border: none;
    border-right: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 12px 14px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    color: var(--tn-muted);
}

.tn-est-tab:last-child { border-right: none; }

.tn-est-tab.active,
.establishment-tab-btn.active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-est-panel {
    display: none;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    padding: 18px;
    background: var(--tn-surface);
}

.tn-est-panel.active,
.profile-tab-content.active { display: block; }

.tn-est-panel__title {
    margin: 0 0 12px;
    font-size: 18px;
}

.tn-est-desc { margin: 0; line-height: 1.55; color: var(--tn-text); }

.tn-est-report {
    margin-top: 16px;
}

.tn-est-report__btn,
.tn-est-report__locked {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 12px 14px;
    border: 0;
    border-radius: 0;
    background: var(--tn-primary-soft);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
}

.tn-est-report__btn { cursor: pointer; }

.tn-est-report__ico {
    flex-shrink: 0;
    color: var(--tn-primary);
    display: inline-flex;
}

@media (max-width: 959px) {
    /* Gallery → venue data → tabs/panels */
    .tn-establishment__grid {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .tn-establishment__main {
        display: contents;
    }

    .tn-establishment__media { order: 1; }
    .tn-establishment__summary { order: 2; }
    .tn-establishment__content { order: 3; }

    .tn-establishment__summary {
        position: static;
    }

    .tn-est-thumbs {
        margin-bottom: 0;
    }

    .tn-est-actions {
        grid-template-columns: 1fr 1fr;
    }

    .tn-est-actions .tn-btn--accent {
        grid-column: 1 / -1;
    }

    .tn-est-help {
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .tn-est-thumbs__btn {
        flex-basis: 64px;
        width: 64px;
        height: 48px;
    }

    .tn-est-discount__watermark .tn-icon {
        --tn-icon-size: 56px;
        width: 56px;
        height: 56px;
    }
}

.tn-select {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 8px 10px;
    font: inherit;
}

/* ── Reviews tab (1:1 mockup) ── */
#etab-content-reviews.tn-est-panel {
    padding: 16px;
}

.tn-select--reviews {
    width: auto;
    min-width: 132px;
    min-height: 30px;
    height: 30px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    color: var(--tn-text);
    font-size: 12px;
    font-weight: 600;
    padding: 0 26px 0 10px;
    appearance: none;
    -webkit-appearance: none;
    background-color: var(--tn-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23999' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
}

.tn-review-sort {
    position: relative;
    display: inline-flex;
}

.tn-review-sort__btn {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    min-height: 30px !important;
    height: 30px;
    padding: 0 10px !important;
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-surface) !important;
    color: var(--tn-text) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    line-height: 1;
    white-space: nowrap;
}

.tn-review-sort__btn:hover {
    border-color: var(--tn-primary) !important;
    color: var(--tn-primary) !important;
}

.tn-review-sort__chevron {
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.15s ease;
}

.tn-review-sort__btn[aria-expanded="true"] .tn-review-sort__chevron {
    transform: rotate(180deg);
}

.tn-review-sort__menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 20;
    min-width: 100%;
    width: max-content;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
    padding: 4px 0;
}

.tn-review-sort__menu[hidden] {
    display: none !important;
}

.tn-review-sort__option {
    display: block;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--tn-text);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
}

.tn-review-sort__option:hover,
.tn-review-sort__option.is-active {
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
    color: var(--tn-primary);
}

.tn-est-reviews-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.tn-est-reviews-head .tn-est-panel__title {
    margin: 0;
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    color: var(--tn-text);
}

.tn-est-reviews-count {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.tn-est-reviews-tools {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-left: auto;
}

.tn-est-reviews-tools .tn-btn,
.tn-est-reviews-tools .tn-btn--primary,
.tn-est-reviews-tools .tn-btn--sm {
    width: auto;
    min-height: 30px;
    height: 30px;
    border-radius: 0 !important;
    font-size: 12px;
    font-weight: 700;
    padding: 0 12px;
    line-height: 1;
    white-space: nowrap;
}

.tn-reviews-list {
    display: flex;
    flex-direction: column;
}

.tn-review {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 12px;
    padding: 16px 0;
    border: 0;
    border-bottom: 1px solid var(--tn-border);
    background: transparent;
}

.tn-review:last-child {
    border-bottom: 0;
    padding-bottom: 4px;
}

.tn-review__avatar {
    width: 40px;
    height: 40px;
    border-radius: 50% !important;
    background: #f3f3f5;
    border: 1px solid #e6e6ef;
    color: #444;
    font-size: 15px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.tn-review__body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tn-review__top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.tn-review__name {
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
    line-height: 1.2;
}

.tn-review__stars {
    display: inline-flex;
    gap: 0;
    line-height: 1;
    letter-spacing: -0.5px;
}

.tn-review__star {
    display: inline-flex;
    align-items: center;
    color: #d4d4d8;
}

.tn-review__star.is-on {
    color: #f5a623;
}

.tn-review__date {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.3;
}

.tn-review__text {
    margin: 2px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tn-text);
    white-space: pre-wrap;
    word-break: break-word;
}

.tn-review__photos {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.tn-review__photo {
    width: 64px;
    height: 64px;
    padding: 0;
    border: 1px solid var(--tn-border);
    border-radius: 0 !important;
    background: #f3f3f5;
    overflow: hidden;
    cursor: pointer;
}

.tn-review__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 640px) {
    .tn-est-reviews-head {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .tn-est-reviews-tools {
        margin-left: 0;
        width: 100%;
        justify-content: stretch;
    }

    .tn-est-reviews-tools .tn-select--reviews {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tn-est-reviews-tools .tn-btn,
    .tn-est-reviews-tools .tn-btn--primary {
        flex: 0 0 auto;
    }

    .tn-review {
        grid-template-columns: 36px minmax(0, 1fr);
        gap: 10px;
        padding: 14px 0;
    }

    .tn-review__avatar {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }
}

.tn-reviews-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    margin-top: 16px;
    padding-top: 4px;
}

.tn-reviews-pager__btn {
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tn-reviews-pager__btn:hover:not(:disabled):not(.is-active) {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-reviews-pager__btn.is-active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-reviews-pager__btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.tn-empty-inline {
    margin: 12px 0 0;
    color: var(--tn-muted);
    font-size: 14px;
}

.tn-giveaway-list { display: grid; gap: 10px; }

.tn-giveaway-card {
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: 12px;
    align-items: center;
    border: 1px solid var(--tn-border);
    padding: 10px;
    text-decoration: none;
    color: inherit;
    background: var(--tn-surface-2);
}

.tn-giveaway-card img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border: 1px solid var(--tn-border-light);
}

.tn-giveaway-card strong { display: block; margin-bottom: 4px; }

.tn-giveaway-card span { font-size: 13px; color: var(--tn-muted); }

.tn-btn--sm { padding: 6px 10px; font-size: 13px; }

.tn-btn--accent {
    background: var(--tn-accent-soft);
    color: var(--tn-accent);
    border: 1px solid var(--tn-accent);
}

.tn-btn--block { width: 100%; justify-content: center; }

/* ── Auth modal (phone-first flow, mockup 1:1) ── */
.tn-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 520;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.tn-auth-modal[hidden] {
    display: none !important;
}

.tn-auth-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
}

.tn-auth-modal__panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 400px;
    max-height: min(92vh, 720px);
    overflow: auto;
    background: #fff;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18);
    padding: 28px 24px 24px;
}

[data-theme="dark"] .tn-auth-modal__panel {
    background: var(--tn-surface);
    border-color: var(--tn-border);
}

.tn-auth-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
}

.tn-auth-modal__close:hover {
    color: #1a1a2e;
    background: #f4f4f7;
}

.tn-auth-modal__body {
    padding: 0;
}

.tn-am {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tn-am__title {
    margin: 0 28px 8px 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.25;
    color: #1a1a2e;
    text-align: center;
}

.tn-am__lead {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.45;
    color: #8b8b9a;
    text-align: center;
}

.tn-am__error {
    display: none;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 0;
    background: #fff5f5;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
}

.tn-am__error.is-visible {
    display: block;
}

.tn-am__field {
    display: grid;
    gap: 6px;
    margin: 0 0 14px;
}

.tn-am__label {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e;
}

.tn-am__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tn-am__phone-row {
    display: flex;
    gap: 8px;
}

.tn-am__prefix {
    flex: 0 0 56px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    background: #fafafa;
    color: #6b7280;
    font-size: 15px;
    font-weight: 700;
}

.tn-am__input {
    width: 100%;
    height: 48px;
    box-sizing: border-box;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    background: #fff;
    padding: 0 14px;
    font: inherit;
    font-size: 15px;
    color: #1a1a2e;
    outline: none;
}

.tn-am__input:focus {
    border-color: #5B67F5;
    box-shadow: 0 0 0 3px rgba(91, 103, 245, 0.12);
}

.tn-am__phone-row .tn-am__input {
    flex: 1;
}

.tn-am__input--phone {
    width: 100%;
}

.tn-am__input:-webkit-autofill {
    animation-name: tn-am-autofill-start;
    animation-duration: 0.01s;
}

@keyframes tn-am-autofill-start {
    from { opacity: 1; }
    to { opacity: 1; }
}

.tn-am__pw {
    position: relative;
}

.tn-am__pw .tn-am__input {
    padding-right: 44px;
}

.tn-am__eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #b0b0c0;
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    line-height: 0;
}

.tn-am__eye.is-on {
    color: #5B67F5;
}

.tn-am__phone-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 16px;
    padding: 12px 14px;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    background: #fafafa;
}

.tn-am__phone-card-meta {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tn-am__phone-card-label {
    font-size: 12px;
    color: #8b8b9a;
}

.tn-am__phone-card-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.tn-am__link {
    border: 0;
    background: transparent;
    color: #5B67F5;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.tn-am__link:hover {
    text-decoration: underline;
}

.tn-am__forgot {
    display: flex;
    justify-content: flex-end;
    margin: -6px 0 16px;
}

.tn-am__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 0;
    background: #5B67F5;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tn-am__btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.tn-am__btn:hover:not(:disabled) {
    background: #4a54d4;
}

.tn-am__btn--tg {
    margin-top: 12px;
    background: #fff;
    color: #5B67F5;
    border: 1.5px solid #5B67F5;
}

.tn-am__btn--tg:hover:not(:disabled) {
    background: #eef0ff;
}

.tn-am__divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 16px 0 4px;
    color: #9ca3af;
    font-size: 12px;
}

.tn-am__divider::before,
.tn-am__divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #ececf2;
}

.tn-am__legal {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12px;
    line-height: 1.45;
    color: #9ca3af;
}

.tn-am__legal a {
    color: #5B67F5;
    font-weight: 600;
    text-decoration: underline;
}

.tn-am__methods {
    display: flex;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 14px;
}

.tn-am__method {
    flex: 1;
    height: 42px;
    border: 0;
    border-right: 1px solid #e6e6ef;
    background: #fff;
    color: #6b7280;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tn-am__method:last-child {
    border-right: 0;
}

.tn-am__method.is-active {
    background: #5B67F5;
    color: #fff;
}

.tn-am__note {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.4;
    color: #8b8b9a;
    text-align: center;
}

.tn-am__loading {
    padding: 40px 12px;
    text-align: center;
    color: #8b8b9a;
    font-weight: 600;
}

[data-theme="dark"] .tn-am__title,
[data-theme="dark"] .tn-am__label,
[data-theme="dark"] .tn-am__phone-card-value,
[data-theme="dark"] .tn-am__input {
    color: var(--tn-text);
}

[data-theme="dark"] .tn-am__input,
[data-theme="dark"] .tn-am__prefix,
[data-theme="dark"] .tn-am__phone-card,
[data-theme="dark"] .tn-am__methods {
    background: var(--tn-surface-2);
    border-color: var(--tn-border);
}

[data-theme="dark"] .tn-am__btn--tg {
    background: transparent;
}

html[data-site-shell="themanew"] .tn-auth-modal__panel {
    border-radius: 0 !important;
}

/* Legacy auth page chrome kept for non-modal fallbacks */
.tn-auth-modal__head { display: none; }

.tn-auth {
    display: flex;
    justify-content: center;
    padding: 8px 0 24px;
}

.tn-auth__card,
.tn-auth-modal .tn-auth__card,
.tn-auth--wizard .tn-auth__card {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

/* Kill legacy full-screen auth chrome from client.css inside themanew auth */
.tn-auth.login-screen,
.tn-auth.reg-screen,
.tn-auth .login-screen,
.tn-auth .reg-screen,
.tn-auth-modal .login-screen,
.tn-auth-modal .reg-screen {
    position: static !important;
    inset: auto !important;
    width: auto !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
    overflow: visible !important;
}

.tn-auth .login-screen::before,
.tn-auth .login-screen::after,
.tn-auth .reg-screen::before,
.tn-auth .reg-screen::after,
.tn-auth.reg-screen::before,
.tn-auth.reg-screen::after,
.tn-auth--wizard::before,
.tn-auth--wizard::after {
    display: none !important;
    content: none !important;
}

.tn-auth-modal .tn-auth {
    display: block;
    padding: 0;
}

.tn-auth-modal .tn-auth__card {
    max-width: none;
}

.tn-auth__brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    margin: 0 0 8px;
}

.tn-auth__brand img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
}

.tn-auth__brand strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--tn-text, #111827);
    letter-spacing: -0.02em;
}

.tn-auth-modal .tn-auth--in-modal:not(.tn-auth--wizard) .tn-auth__brand {
    display: none;
}

.tn-auth-modal .tn-auth--wizard .tn-auth__brand {
    display: flex;
}

.tn-auth-modal .tn-auth--wizard .tn-auth__brand img {
    display: none;
}

.tn-auth__lead,
.tn-auth .tn-note,
.tn-auth--wizard .tn-note {
    margin: 0 0 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1.4;
    color: #8b8b9a;
}

.tn-auth__error,
.tn-auth .a-error,
.tn-auth--wizard .a-error {
    display: none;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff5f5;
    color: var(--tn-danger, #dc2626);
    font-size: 13px;
}

.tn-auth__error.active,
.tn-auth .a-error.active,
.tn-auth .a-error[style*="flex"],
.tn-auth--wizard .a-error.active,
.tn-auth--wizard .a-error[style*="flex"] {
    display: flex;
}

.tn-auth__form {
    display: grid;
    gap: 14px;
    margin-bottom: 12px;
}

.tn-field,
.tn-auth .a-group {
    display: grid;
    gap: 6px;
    margin: 0;
}

.tn-field__label,
.tn-auth .a-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #8b8b9a;
}

.tn-field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tn-field__input,
.tn-auth .a-input,
.tn-auth .tn-select,
.tn-auth select {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    background: #f4f4f7;
    padding: 12px 14px;
    font: inherit;
    font-size: 15px;
    color: var(--tn-text, #111827);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

[data-theme="dark"] .tn-field__input,
[data-theme="dark"] .tn-auth .a-input {
    background: var(--tn-surface);
    border-color: var(--tn-border);
    color: var(--tn-text);
}

.tn-field__input:focus,
.tn-auth .a-input:focus {
    border-color: rgba(91, 103, 245, 0.45);
    box-shadow: 0 0 0 3px rgba(91, 103, 245, 0.15);
    background: #fff;
}

[data-theme="dark"] .tn-field__input:focus,
[data-theme="dark"] .tn-auth .a-input:focus {
    background: var(--tn-surface-2);
}

.tn-field__password,
.tn-auth .pw-wrap { position: relative; }

.tn-field__password .tn-field__input,
.tn-auth .pw-wrap .a-input,
.tn-auth .pw-wrap .tn-field__input {
    padding-right: 44px;
}

.tn-field__toggle,
.tn-auth .pw-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #b0b0c0;
    cursor: pointer;
    padding: 4px;
    line-height: 0;
}

.tn-field__toggle .tn-pw-eye-off { display: none; }

.tn-auth__link,
.tn-auth .a-link-btn,
.tn-auth .a-footer a {
    color: var(--tn-primary, #5B67F5);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.tn-auth__link:hover,
.tn-auth .a-link-btn:hover {
    text-decoration: underline;
}

.tn-auth .tn-btn,
.tn-auth .a-btn,
.tn-auth .a-btn-secondary {
    border-radius: 12px;
    min-height: 48px;
    font-weight: 700;
    box-shadow: none;
}

.tn-auth .tn-btn--primary,
.tn-auth .a-btn:not(.a-btn-secondary):not(.inactive) {
    background: var(--tn-primary, #5B67F5);
    border: 1px solid var(--tn-primary, #5B67F5);
    color: #fff;
}

.tn-auth .tn-btn--primary:hover,
.tn-auth .a-btn:not(.a-btn-secondary):hover {
    filter: brightness(0.96);
}

.tn-auth .a-btn.inactive {
    opacity: 0.5;
    pointer-events: none;
}

.tn-auth .tn-btn--ghost,
.tn-auth .a-btn-secondary {
    background: #fff;
    border: 1.5px solid #e6e6ef;
    color: var(--tn-text, #1a1a2e);
}

[data-theme="dark"] .tn-auth .tn-btn--ghost,
[data-theme="dark"] .tn-auth .a-btn-secondary {
    background: var(--tn-surface);
    border-color: var(--tn-border);
    color: var(--tn-text);
}

.tn-auth__tg,
.tn-auth #tg-reg-direct-btn,
.tn-auth #tg-login-btn {
    margin-top: 10px;
    background: #2AABEE !important;
    border-color: #2AABEE !important;
    color: #fff !important;
    border-radius: 12px;
}

.tn-auth__divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    color: #b0b0c0;
    font-size: 12px;
    font-weight: 600;
}

.tn-auth__divider::before,
.tn-auth__divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #ececf2;
}

.tn-auth--wizard {
    display: flex;
    justify-content: center;
    padding: 8px 0 24px;
}

.tn-auth--wizard .tn-wizard,
.tn-auth--wizard .reg-steps-viewport {
    position: relative;
    border: 0;
    padding: 0;
    background: transparent;
    min-height: 0;
    overflow: visible;
}

.tn-auth--wizard .tn-wizard__step,
.tn-auth--wizard .reg-step,
html[data-site-shell="themanew"] .reg-step {
    display: none;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    box-sizing: border-box;
    transition: none;
}

.tn-auth--wizard .tn-wizard__step.active,
.tn-auth--wizard .tn-wizard__step.is-active,
.tn-auth--wizard .reg-step.active,
html[data-site-shell="themanew"] .reg-step.active,
html[data-site-shell="themanew"] .reg-step.is-active {
    display: block;
}

html[data-site-shell="themanew"] .reg-step.exit-left,
html[data-site-shell="themanew"] .reg-step.enter-right {
    position: relative;
    transform: none;
    opacity: 1;
    pointer-events: auto;
}

.tn-auth--wizard .tn-wizard__dots,
.tn-auth--wizard .reg-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 0 0 20px;
}

.tn-auth--wizard .tn-wizard__dot,
.tn-auth--wizard .reg-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(91, 103, 245, 0.22);
    transition: width 0.2s, border-radius 0.2s, background 0.2s;
}

.tn-auth--wizard .tn-wizard__dot.is-active,
.tn-auth--wizard .tn-wizard__dot.active,
.tn-auth--wizard .reg-dot.active {
    width: 28px;
    border-radius: 4px;
    background: var(--tn-primary, #5B67F5);
}

.tn-auth--wizard .tn-wizard__dot.is-done,
.tn-auth--wizard .tn-wizard__dot.done,
.tn-auth--wizard .reg-dot.done {
    background: var(--tn-primary, #5B67F5);
}

.tn-auth .tn-method-tabs,
.tn-auth .method-selector {
    display: flex;
    gap: 0;
    margin: 0 0 4px;
    border: 1px solid #e6e6ef;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
}

[data-theme="dark"] .tn-auth .tn-method-tabs,
[data-theme="dark"] .tn-auth .method-selector {
    border-color: var(--tn-border);
    background: var(--tn-surface);
}

.tn-auth .method-btn {
    flex: 1;
    height: 42px;
    border: none;
    border-right: 1px solid #e6e6ef;
    border-radius: 0;
    background: transparent;
    color: #6b7280;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.tn-auth .method-btn:last-child { border-right: 0; }

.tn-auth .method-btn.selected,
.tn-auth .method-btn.is-active {
    background: var(--tn-primary, #5B67F5);
    color: #fff;
}

.tn-auth__back,
.tn-auth .reg-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 14px;
    padding: 0;
    border: none;
    background: none;
    color: #8b8b9a;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tn-auth__back:hover,
.tn-auth .reg-back:hover {
    color: var(--tn-primary, #5B67F5);
}

.tn-auth__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tn-consent,
.tn-auth .consent-box {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 4px 0 0;
    padding: 12px;
    border: 1px solid #ececf2;
    border-radius: 12px;
    background: #fafafa;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
}

.tn-consent input,
.tn-auth .consent-box input {
    margin-top: 2px;
    flex-shrink: 0;
}

.tn-auth .a-phone-badge,
.tn-auth .tn-badge {
    display: inline-flex;
    margin: 0 0 14px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid #e6e6ef;
    background: #f4f4f7;
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text, #1a1a2e);
}

.tn-auth .a-resend-row,
.tn-auth .inbound-resend {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 12px;
    color: #8b8b9a;
}

.tn-auth__footer,
.tn-auth .a-footer,
.tn-auth--wizard .a-footer {
    text-align: center;
    margin: 16px 0 0;
    font-size: 13px;
    color: #8b8b9a;
}

.tn-auth .inbound-wait {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 12px;
    border-radius: 12px;
    background: #f4f4f7;
    font-size: 13px;
    color: #6b7280;
}

.tn-auth .login-suggestion {
    margin-top: 10px;
}

.tn-auth .login-suggestion.hidden,
.tn-auth .hidden {
    display: none !important;
}

.tn-auth .code-input {
    letter-spacing: 0.35em;
    font-weight: 700;
    text-align: center;
}

@media (max-width: 560px) {
    .tn-auth__grid { grid-template-columns: 1fr; }
    .tn-auth-modal__body { padding: 12px; }
}

/* Auth required gate (protected pages) */
.tn-auth-gate {
    display: flex;
    justify-content: center;
    padding: 24px 0 40px;
}

.tn-auth-gate__card {
    width: 100%;
    max-width: 420px;
    padding: 36px 24px 28px;
    text-align: center;
}

.tn-auth-gate__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 16px;
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary, #5B67F5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tn-auth-gate__title {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 800;
    color: var(--tn-text, #111827);
}

.tn-auth-gate__text {
    margin: 0 0 22px;
    font-size: 14px;
    line-height: 1.45;
    color: #8b8b9a;
}

.tn-auth-gate__actions {
    display: grid;
    gap: 10px;
}

.tn-auth-gate__actions .tn-btn {
    min-height: 48px;
}

.tn-auth-gate__back {
    margin: 18px 0 0;
    font-size: 13px;
    color: #8b8b9a;
}

.tn-auth-gate__back a {
    color: var(--tn-primary, #5B67F5);
    font-weight: 700;
    text-decoration: none;
}

.tn-auth-gate__back a:hover { text-decoration: underline; }

.tn-auth-gate__noscript {
    margin-top: 12px;
    font-size: 13px;
}

/* ── Prose (legal, static content) ── */
.tn-prose {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 20px 18px 28px;
    font-size: 14px;
    line-height: 1.65;
    color: var(--tn-text);
}

.tn-prose > p:first-child {
    margin-top: 0;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-prose h3 {
    margin: 24px 0 8px;
    font-size: 16px;
    font-weight: 800;
}

.tn-prose h3:first-of-type { margin-top: 0; }

.tn-prose p { margin: 0 0 10px; }

.tn-prose ul {
    margin: 8px 0 10px;
    padding-left: 20px;
}

.tn-prose li { margin-bottom: 6px; }

.tn-prose a {
    color: var(--tn-link);
    text-decoration: none;
}

.tn-prose a:hover { text-decoration: underline; }

/* ── Status pages (404, offline) ── */
.tn-status {
    max-width: 480px;
    margin: 24px auto 32px;
    padding: 32px 20px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    text-align: center;
}

.tn-status__code {
    font-size: 72px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 16px;
    color: var(--tn-primary);
}

.tn-status__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: var(--tn-muted);
}

.tn-status__icon svg {
    width: 100%;
    height: 100%;
}

.tn-status__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 800;
}

.tn-status__text {
    margin: 0 0 20px;
    color: var(--tn-muted);
    line-height: 1.55;
}

.tn-status__url {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    padding: 10px 12px;
    margin-bottom: 20px;
    text-align: left;
}

.tn-status__url-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--tn-muted);
    margin-bottom: 4px;
}

.tn-status__url code {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    font-size: 13px;
    color: var(--tn-primary);
    word-break: break-all;
}

.tn-status__actions {
    display: grid;
    gap: 8px;
}

.tn-status__note {
    margin-top: 16px;
    font-size: 12px;
    color: var(--tn-muted);
}

/* ── Tabs ── */
.tn-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border: 1px solid var(--tn-border);
    margin-bottom: 16px;
}

.tn-tabs a,
.tn-tabs button {
    flex: 1;
    min-width: 0;
    height: 38px;
    border: none;
    border-right: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.tn-tabs a:last-child,
.tn-tabs button:last-child { border-right: 0; }

.tn-tabs a.is-active,
.tn-tabs button.is-active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-tabs a:hover:not(.is-active),
.tn-tabs button:hover:not(.is-active) {
    background: var(--tn-surface-2);
    color: var(--tn-text);
}

/* ── Profile (dedicated) ── */
.tn-profile--dash .tn-profile__view { display: none; }
.tn-profile--dash .tn-profile__view.is-active,
.tn-profile--dash .tn-profile__view.active { display: block; }

.tn-profile--dash .visited-tab-content { display: none; }
.tn-profile--dash .visited-tab-content.is-active,
.tn-profile--dash .visited-tab-content.active { display: block; }

.tn-profile-subhead {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.tn-profile-subhead__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tn-profile-subhead__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
}

.tn-prof-hero {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    margin-bottom: 12px;
}

.tn-prof-hero__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0;
    padding: 18px 20px;
}

.tn-prof-hero__identity {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding-right: 20px;
}

.tn-prof-hero__avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

.tn-prof-hero__avatar {
    width: 88px;
    height: 88px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tn-muted);
}

.tn-prof-hero__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-prof-hero__avatar-btn {
    position: absolute;
    right: -6px;
    bottom: -6px;
    width: 30px;
    height: 30px;
    border: 2px solid var(--tn-surface);
    border-radius: 50%;
    background: var(--tn-primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.tn-prof-hero__name {
    margin: 0 0 6px;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.15;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--tn-text);
}

.tn-prof-hero__name-edit {
    border: 0;
    background: transparent;
    color: var(--tn-primary);
    padding: 0;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.tn-prof-hero__phone {
    margin: 0 0 6px;
    font-size: 14px;
    color: var(--tn-muted);
}

.tn-prof-hero__city {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-prof-stat {
    padding: 4px 28px;
    min-width: 150px;
}

.tn-prof-stat--saved {
    border-left: 1px solid var(--tn-border);
    border-right: 1px solid var(--tn-border);
}

.tn-prof-stat--sub {
    padding-right: 8px;
}

.tn-prof-stat__label {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    margin-bottom: 6px;
}

.tn-prof-stat__value {
    display: block;
    font-size: clamp(22px, 2.4vw, 30px);
    font-weight: 800;
    color: var(--tn-primary);
    line-height: 1.1;
    white-space: nowrap;
}

.tn-prof-stat__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-prof-premium {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 22%, var(--tn-border));
    background: var(--tn-surface);
    margin-bottom: 12px;
}

.tn-prof-premium--locked {
    background: var(--tn-surface);
}

.tn-prof-premium__icon {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 28%, var(--tn-border));
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-prof-premium__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.tn-prof-premium__text strong {
    font-size: 15px;
    font-weight: 800;
}

.tn-prof-premium__text span {
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.35;
}

.tn-prof-premium__btn {
    flex-shrink: 0;
    min-height: 40px;
    padding-inline: 18px;
    white-space: nowrap;
}

.tn-prof-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(260px, 1fr);
    gap: 12px;
    align-items: stretch;
}

.tn-prof-partner {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 360px;
}

.tn-prof-partner__pane {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 18px 20px 16px;
    text-align: center;
}

.tn-prof-partner__pane--code {
    border-left: 1px solid var(--tn-border);
}

.tn-prof-partner__title {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 800;
    text-align: left;
    color: var(--tn-text);
}

.tn-prof-partner__sub {
    margin: -8px 0 12px;
    font-size: 12px;
    color: var(--tn-muted);
    text-align: left;
}

.tn-prof-partner__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 0;
}

.tn-prof-partner__qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: 1px solid var(--tn-border-light);
    background: #fff;
}

.tn-prof-partner__qr canvas,
.tn-prof-partner__qr img {
    display: block;
}

.tn-prof-partner__note {
    margin: 0;
    max-width: 260px;
    font-size: 12px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-prof-partner__code {
    width: 100%;
    max-width: 280px;
    padding: 16px 12px;
    border: 1px dashed color-mix(in srgb, var(--tn-primary) 50%, var(--tn-border));
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    font-size: clamp(28px, 3.2vw, 36px);
    font-weight: 800;
    letter-spacing: 0.16em;
}

.tn-prof-partner__btn {
    margin-top: 14px;
    width: 100%;
    min-height: 42px;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 45%, var(--tn-border));
    background: color-mix(in srgb, var(--tn-primary-soft) 70%, var(--tn-surface));
    color: var(--tn-primary);
    font-size: 13px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
}

.tn-prof-partner__btn:hover {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-prof-partner--locked .tn-prof-partner__locked {
    grid-column: 1 / -1;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: var(--tn-muted);
    text-align: center;
}

.tn-prof-partner--locked .tn-prof-partner__locked p {
    margin: 0;
    font-size: 14px;
    max-width: 320px;
}

.tn-prof-actions-card {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 18px 16px 8px;
    display: flex;
    flex-direction: column;
}

.tn-prof-actions-card__title {
    margin: 0 0 8px;
    padding: 0 4px;
    font-size: 15px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-prof-actions {
    list-style: none;
    margin: 0;
    padding: 0;
    width: 100%;
    flex: 1;
}

.tn-prof-actions__item {
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light);
    background: transparent;
    color: inherit;
    text-decoration: none;
    padding: 14px 4px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.tn-prof-actions__item--danger {
    color: var(--tn-danger);
}

.tn-prof-actions__item--danger .tn-prof-actions__ico {
    color: var(--tn-danger);
    border-color: color-mix(in srgb, var(--tn-danger) 22%, var(--tn-border));
    background: var(--tn-danger-soft, #fff5f5);
}

.tn-prof-actions__item--danger:hover {
    background: var(--tn-danger-soft, #fff5f5);
}

.tn-prof-actions li:last-child .tn-prof-actions__item {
    border-bottom: 0;
}

.tn-prof-actions__ico {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border: 1px solid color-mix(in srgb, var(--tn-primary) 18%, var(--tn-border));
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-prof-actions__label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-text);
}

.tn-prof-actions__chev {
    color: var(--tn-muted);
    display: inline-flex;
    opacity: 0.75;
}

@media (max-width: 1024px) {
    .tn-prof-hero__row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .tn-prof-hero__identity {
        padding-right: 0;
    }

    .tn-prof-stat {
        min-width: 0;
        padding: 12px 0 0;
    }

    .tn-prof-stat--saved {
        border-left: 0;
        border-right: 0;
        border-top: 1px solid var(--tn-border);
        padding-top: 14px;
    }

    .tn-prof-stat--sub {
        border-top: 1px solid var(--tn-border);
        padding-top: 14px;
        padding-right: 0;
    }

    .tn-prof-bottom {
        grid-template-columns: 1fr;
    }

    .tn-prof-partner {
        min-height: 0;
    }
}

@media (max-width: 640px) {
    .tn-prof-premium {
        flex-wrap: wrap;
    }

    .tn-prof-premium__btn {
        width: 100%;
    }

    .tn-prof-partner {
        grid-template-columns: 1fr;
    }

    .tn-prof-partner__pane--code {
        border-left: 0;
        border-top: 1px solid var(--tn-border);
    }
}

.tn-profile #profile-tab-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-bottom: 16px;
}

.tn-profile .tn-profile__panel { display: none; }
.tn-profile .tn-profile__panel.is-active,
.tn-profile .tn-profile__panel.active { display: block; }

.tn-profile .visited-tab-content { display: none; }
.tn-profile .visited-tab-content.is-active,
.tn-profile .visited-tab-content.active { display: block; }

.tn-tabs--mini {
    width: fit-content;
    margin-bottom: 12px;
}

.tn-tabs__btn { position: relative; }
.tn-tabs__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 6px;
    font-size: 10px;
    font-weight: 800;
    background: var(--tn-danger);
    color: #fff;
}

.tn-section-title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.tn-profile-card {
    border: 1px solid var(--tn-border);
    background: var(--tn-primary);
    color: #fff;
    padding: 16px;
    margin-bottom: 12px;
}

.tn-profile-card__head {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    margin-bottom: 14px;
}

.tn-profile-card__edit {
    position: absolute;
    top: 0;
    right: 0;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    color: #fff;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.tn-profile-card__avatar {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tn-profile-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-profile-card__name { margin: 0; font-size: 16px; font-weight: 800; }
.tn-profile-card__phone { font-size: 12px; opacity: 0.75; margin-top: 2px; }

.tn-profile-card__stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.tn-profile-card__label {
    display: block;
    font-size: 11px;
    opacity: 0.7;
    margin-bottom: 2px;
}

.tn-profile-card__value {
    display: block;
    font-size: 18px;
    font-weight: 800;
}

.tn-profile-card .tn-btn--ghost {
    background: #fff;
    color: var(--tn-primary);
    border-color: #fff;
}

.tn-qr {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
}

.tn-qr--locked { padding: 28px 16px; }

.tn-qr__canvas {
    display: inline-block;
    padding: 10px;
    border: 1px solid var(--tn-border-light);
    background: #fff;
    margin-bottom: 12px;
}

.tn-qr__hint {
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tn-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tn-qr__code {
    display: inline-block;
    padding: 10px 20px;
    border: 1px dashed var(--tn-primary);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.tn-row {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.tn-row--static { cursor: default; }
.tn-row:not(.tn-row--static):hover { background: var(--tn-surface-2); }

.tn-row__thumb {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border: 1px solid var(--tn-border-light);
    overflow: hidden;
    background: var(--tn-surface-2);
}

.tn-row__thumb img { width: 100%; height: 100%; object-fit: cover; }

.tn-row__body { flex: 1; min-width: 0; }
.tn-row__title { display: block; font-size: 14px; font-weight: 700; }
.tn-row__meta { display: block; font-size: 12px; color: var(--tn-muted); margin-top: 2px; }
.tn-row__chevron { color: var(--tn-muted); font-size: 18px; }
.tn-row__saved { color: var(--tn-success); font-size: 14px; font-weight: 700; white-space: nowrap; }

.tn-invite {
    border: 1px solid var(--tn-primary);
    background: var(--tn-primary);
    color: #fff;
    padding: 14px 16px;
}

.tn-invite__title { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.tn-invite__text { margin: 0 0 10px; font-size: 13px; opacity: 0.9; }
.tn-invite__stat { margin-bottom: 10px; font-size: 13px; }

.tn-invite__link {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.12);
    padding: 6px 8px 6px 12px;
}

.tn-invite__link span {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
}

.tn-invite__link .tn-btn { background: #fff; color: var(--tn-primary); border-color: #fff; }

.tn-settings {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 14px 16px;
}

.tn-setting-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-setting-row:last-of-type { border-bottom: 0; }
.tn-setting-row__text { min-width: 0; }
.tn-setting-row strong { display: block; font-size: 14px; }

.tn-danger-actions {
    display: grid;
    gap: 12px;
    justify-items: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--tn-border-light);
}

.tn-link-danger {
    color: var(--tn-danger);
    font-size: 14px;
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    opacity: 0.85;
}

.tn-link-danger:hover { opacity: 1; }

.tn-link-danger--sm {
    font-size: 12px;
    font-weight: 600;
    opacity: 0.75;
}

.tn-link-logout {
    color: var(--tn-primary);
    font-size: 16px;
    font-weight: 800;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.tn-link-logout:hover {
    color: var(--tn-primary-dark, #4a54d4);
}

.tn-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    margin-top: 16px;
}

.tn-card__preview {
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--tn-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-vacancy {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 14px;
}

.tn-vacancy__head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.tn-vacancy__logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid var(--tn-border-light);
    flex-shrink: 0;
    cursor: pointer;
    padding: 0;
}

.tn-vacancy__logo--fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-primary);
    color: #fff;
    font-weight: 900;
    font-size: 16px;
    border: none;
}

.tn-vacancy__titles { min-width: 0; flex: 1; }
.tn-vacancy__est {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: var(--tn-muted);
    text-transform: uppercase;
    margin-bottom: 2px;
}
.tn-vacancy__title { margin: 0; font-size: 15px; font-weight: 800; }

.tn-vacancy__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.tn-vacancy__desc {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-vacancy__contact {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
}

.tn-badge__clear {
    margin-left: 6px;
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
    color: inherit;
    padding: 0;
}

.tn-toolbar__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
}

/* Legacy overrides still used by partner/admin zones */
.tn-profile .user-card,
.tn-profile .dashboard-card,
.tn-profile .profile-section-card {
    border-radius: 0;
    border: 1px solid var(--tn-border-light);
}

.tn-map-page .map-container-full {
    /* legacy soft style — real sizing is in dedicated chrome block below */
    border: 1px solid var(--tn-border);
}

.tn-map-page .filter-btn-map,
.tn-map-page .location-btn-map {
    border-radius: 0;
    border: 1px solid var(--tn-border);
}

.tn-map-page .bottom-sheet {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface) !important;
    color: var(--tn-text);
}

.tn-subscribe .sub-plan-card,
.tn-subscribe .sub-benefits,
.tn-subscribe .sub-info {
    border-radius: 0;
}

.tn-subscribe .sub-plan-card {
    border: 1px solid var(--tn-border-light);
}

.tn-subscribe .sub-plan-card.best {
    border-color: var(--tn-primary);
}

.tn-subscribe .sub-plan-card.selected {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-giveaways .contest-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--tn-border);
}

.tn-giveaways .contest-tab-btn {
    flex: 1;
    margin: 0;
    border: none;
    border-right: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 8px;
}

.tn-giveaways .contest-tab-btn:last-child { border-right: 0; }

.tn-giveaways .contest-tab-btn.active,
.tn-giveaways .contest-tab-btn.is-active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-giveaways .contest-tab-content { display: none; }
.tn-giveaways .contest-tab-content.active,
.tn-giveaways .contest-tab-content.is-active { display: block; }

.tn-giveaways .contests-grid .card,
.tn-giveaways .empty-giveaway,
.tn-giveaways .contest-card-unified {
    border-radius: 0;
    border: 1px solid var(--tn-border-light);
}

/* ── Giveaways page (screenshot layout, rectangular themanew) ── */
.tn-simple-page:has(.tn-giv) .tn-breadcrumbs {
    display: none;
}

.tn-giv {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-bottom: 32px;
}

.tn-giv__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tn-giv__title {
    margin: 0;
    font-size: clamp(24px, 3vw, 32px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-giv__subtitle {
    margin: 6px 0 0;
    font-size: 14px;
    color: var(--tn-muted);
}

.tn-giv__mine {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tn-giv__mine:hover,
.tn-giv__mine.is-active {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
    background: var(--tn-primary-soft, #eef0ff);
}

.tn-giv-hero {
    position: relative;
    height: clamp(200px, 28vw, 280px);
    border: 1px solid #111;
    background: #0b0b0f;
    overflow: hidden;
}

.tn-giv-hero__track {
    position: absolute;
    inset: 0;
}

.tn-giv-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
    cursor: pointer;
}

.tn-giv-hero__slide.is-active {
    opacity: 1;
    pointer-events: auto;
}

.tn-giv-hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}

.tn-giv-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.15) 100%);
}

.tn-giv-hero__content {
    position: absolute;
    left: 28px;
    bottom: 28px;
    right: 80px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    z-index: 1;
}

.tn-giv-hero__name {
    margin: 0;
    color: #fff;
    font-size: clamp(20px, 3vw, 28px);
    font-weight: 800;
    line-height: 1.2;
}

.tn-giv-hero__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
}

.tn-giv-hero__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,0.16);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.tn-giv-hero__nav:hover { background: rgba(255,255,255,0.28); }
.tn-giv-hero__nav--prev { left: 12px; }
.tn-giv-hero__nav--next { right: 12px; }

.tn-giv-hero__dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
}

.tn-giv-hero__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,0.35);
    cursor: pointer;
}

.tn-giv-hero__dot.is-active { background: var(--tn-primary, #5B67F5); }

.tn-giv-hero__expand {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 0;
    background: rgba(255,255,255,0.16);
    color: #fff;
    cursor: pointer;
}

.tn-giv-filters {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 0.9fr)) auto;
    gap: 10px;
    align-items: stretch;
}

.tn-giv-filters__search {
    position: relative;
    display: flex;
    align-items: center;
}

.tn-giv-filters__search input {
    width: 100%;
    min-height: 42px;
    padding: 0 36px 0 38px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    box-sizing: border-box;
}

.tn-giv-filters__search input[type="search"]::-webkit-search-decoration,
.tn-giv-filters__search input[type="search"]::-webkit-search-cancel-button,
.tn-giv-filters__search input[type="search"]::-webkit-search-results-button,
.tn-giv-filters__search input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance: none;
    appearance: none;
}

.tn-giv-filters__search .tn-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    --tn-icon-size: 18px;
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-giv-filters__select {
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
}

.tn-giv-filters__apply {
    white-space: nowrap;
    min-height: 42px;
    border-radius: 0;
}

.tn-giv-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--tn-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.tn-giv-tabs::-webkit-scrollbar { display: none; }

.tn-giv-tabs__btn {
    flex: 0 0 auto;
    margin: 0;
    padding: 12px 16px;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: var(--tn-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.tn-giv-tabs__btn.is-active {
    color: var(--tn-primary, #5B67F5);
    border-bottom-color: var(--tn-primary, #5B67F5);
}

.tn-giv-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.tn-giv-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
    overflow: hidden;
    min-width: 0;
}

.tn-giv-card[hidden] { display: none !important; }

.tn-giv-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 11;
    background: #f3f4f8;
    overflow: hidden;
}

.tn-giv-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-giv-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    min-height: 24px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 800;
    border-radius: 0;
}

.tn-giv-card__badge--active { background: #ebfbee; color: #2f9e44; }
.tn-giv-card__badge--soon { background: #e7f5ff; color: #1971c2; }
.tn-giv-card__badge--done { background: #f1f3f5; color: #868e96; }

.tn-giv-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    flex: 1;
}

.tn-giv-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
}

.tn-giv-card__title a {
    color: inherit;
    text-decoration: none;
}

.tn-giv-card__title a:hover { color: var(--tn-primary); }

.tn-giv-card__desc {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--tn-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8em;
}

.tn-giv-card__meta {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 6px 12px;
    margin-top: auto;
}

.tn-giv-card__meta-row:first-child {
    grid-column: 1 / -1;
}

.tn-giv-card__meta-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-giv-card__meta-row strong { color: var(--tn-text); font-weight: 700; }
.tn-giv-card__meta-row svg { flex-shrink: 0; }
.tn-giv-card__meta-row--price { justify-self: end; font-weight: 700; color: var(--tn-text); }

.tn-giv-card__cta {
    margin-top: 4px;
    border-radius: 0;
}

.tn-giv-card__cta--soon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--tn-primary);
    border-color: var(--tn-primary);
}

.tn-giv-empty {
    text-align: center;
    padding: 40px 16px;
    border: 1px dashed var(--tn-border);
    background: var(--tn-surface);
}

.tn-giv-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
}

.tn-giv-empty p {
    margin: 0;
    color: var(--tn-muted);
    font-size: 13px;
}

@media (max-width: 1100px) {
    .tn-giv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tn-giv-filters {
        grid-template-columns: 1fr 1fr;
    }
    .tn-giv-filters__search,
    .tn-giv-filters__apply {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .tn-giv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-giv-hero { height: 200px; }
    .tn-giv-hero__content { left: 16px; bottom: 40px; right: 16px; }
    .tn-giv-hero__nav { display: none; }
}

@media (max-width: 520px) {
    .tn-giv-grid { grid-template-columns: 1fr; }
    .tn-giv-filters { grid-template-columns: 1fr; }
}

/* ── Giveaway details (screenshot layout) ── */
.tn-simple-page:has(.tn-givd) .tn-breadcrumbs {
    display: none;
}

.tn-givd {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.tn-givd__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.tn-givd__crumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-givd__crumbs a {
    color: var(--tn-muted);
    text-decoration: none;
}

.tn-givd__crumbs a:hover { color: var(--tn-primary); }

.tn-givd__crumbs-tail {
    color: var(--tn-text);
    font-weight: 600;
    max-width: min(420px, 55vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-givd__top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tn-givd__back,
.tn-givd__share-btn {
    min-height: 38px;
    border-radius: 0;
    gap: 8px;
}

.tn-givd-hero {
    position: relative;
    height: clamp(220px, 32vw, 320px);
    overflow: hidden;
    background: #111;
    border: 1px solid var(--tn-border-light);
}

.tn-givd-hero__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center right;
}

.tn-givd-hero__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(0,0,0,.82) 0%, rgba(0,0,0,.45) 48%, rgba(0,0,0,.15) 100%);
}

.tn-givd-hero__content {
    position: absolute;
    left: 28px;
    bottom: 28px;
    right: 80px;
    z-index: 1;
    color: #fff;
}

.tn-givd-hero__title {
    margin: 0;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
    text-transform: uppercase;
}

.tn-givd-hero__sub {
    margin: 8px 0 0;
    font-size: 15px;
    opacity: .9;
    max-width: 520px;
}

.tn-givd-hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.tn-givd-hero__badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255,255,255,.16);
    color: #fff;
    border: 1px solid rgba(255,255,255,.18);
}

.tn-givd-hero__badge--active {
    background: #40c057;
    border-color: #37b24d;
    color: #fff;
}

.tn-givd-hero__badge--soon {
    background: #339af0;
    border-color: #228be6;
}

.tn-givd-hero__badge--done {
    background: rgba(255,255,255,.22);
    color: #e9ecef;
}

.tn-givd-hero__expand {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,.28);
    background: rgba(0,0,0,.35);
    color: #fff;
    cursor: pointer;
    border-radius: 0;
}

.tn-givd-hero__expand:hover { background: rgba(0,0,0,.55); }

.tn-givd-stats {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 200px;
    gap: 16px;
    align-items: stretch;
    padding: 16px 18px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

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

.tn-givd-stat {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}

.tn-givd-stat__icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2, #f8f9fa);
    color: var(--tn-primary);
}

.tn-givd-stat__label {
    font-size: 12px;
    color: var(--tn-muted);
    margin-bottom: 2px;
}

.tn-givd-stat__value {
    font-size: 18px;
    font-weight: 800;
    color: var(--tn-text);
    line-height: 1.2;
}

.tn-givd-stat__value--sm { font-size: 14px; }

.tn-givd-stat__hint {
    margin-top: 2px;
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-givd-stats__cta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
}

.tn-givd-stats__cta .tn-btn {
    border-radius: 0;
    min-height: 42px;
}

.tn-givd-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid var(--tn-border-light);
    scrollbar-width: none;
}

.tn-givd-tabs::-webkit-scrollbar { display: none; }

.tn-givd-tabs__btn {
    flex: 0 0 auto;
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 12px 14px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
}

.tn-givd-tabs__btn:hover { color: var(--tn-text); }

.tn-givd-tabs__btn.is-active {
    color: var(--tn-primary);
    border-bottom-color: var(--tn-primary);
}

.tn-givd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 20px;
    align-items: start;
}

.tn-givd-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
    min-width: 0;
}

.tn-givd-section__title {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-givd-section__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: var(--tn-muted);
}

.tn-givd-steps {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tn-givd-step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-givd-step__n {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.tn-givd-step p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tn-text);
}

.tn-givd-prize {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-givd-prize img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    background: #111;
}

.tn-givd-prize h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
}

.tn-givd-prize p {
    margin: 0;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.45;
}

.tn-givd-prize__loc {
    margin-top: 8px !important;
    color: var(--tn-text) !important;
    font-weight: 600;
}

.tn-givd-acc {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-givd-acc__item {
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-givd-acc__item:last-child { border-bottom: 0; }

.tn-givd-acc__item summary {
    list-style: none;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 16px;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-givd-acc__item summary::-webkit-details-marker { display: none; }

.tn-givd-acc__ico {
    color: var(--tn-primary);
    display: inline-flex;
}

.tn-givd-acc__chev {
    color: var(--tn-muted);
    transform: rotate(90deg);
    transition: transform .15s ease;
}

.tn-givd-acc__item[open] .tn-givd-acc__chev {
    transform: rotate(-90deg);
}

.tn-givd-acc__body {
    padding: 0 16px 14px 54px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tn-muted);
}

.tn-givd-winner-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tn-givd-winner-inline strong {
    font-size: 18px;
}

.tn-givd-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    background: var(--tn-primary);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 999px;
}

.tn-givd-plist {
    list-style: none;
    margin: 0;
    padding: 0;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-givd-plist li {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--tn-border-light);
    font-size: 13px;
}

.tn-givd-plist li:last-child { border-bottom: 0; }

.tn-givd-plist__rank {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-surface-2, #f1f3f5);
    font-weight: 800;
    font-size: 11px;
}

.tn-givd-plist__tickets {
    color: var(--tn-primary);
    font-weight: 700;
}

.tn-givd-org__card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    max-width: 360px;
}

.tn-givd-org__mark {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff7a1a;
    color: #fff;
    font-weight: 900;
    font-size: 14px;
}

.tn-givd-org__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-givd-org__meta a {
    color: var(--tn-primary);
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
}

.tn-givd-org__meta a:hover { text-decoration: underline; }

.tn-givd-org__meta span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-givd-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 12px;
}

.tn-givd-card {
    padding: 14px 16px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-givd-card__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.tn-givd-card__head h3,
.tn-givd-card__title-plain {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.tn-givd-card__title-plain { margin-bottom: 12px; }

.tn-givd-card__ico {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border-light);
    color: var(--tn-muted);
}

.tn-givd-card__ico--gold {
    color: #f59f00;
    background: #fff9db;
    border-color: #ffe066;
}

.tn-givd-card__ico--blue {
    color: var(--tn-primary);
    background: var(--tn-primary-soft, #eef0ff);
    border-color: #c5cafc;
}

.tn-givd-card__name {
    margin: 0 0 10px;
    font-size: 20px;
    font-weight: 800;
}

.tn-givd-card__muted {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tn-muted);
}

.tn-givd-tickets {
    list-style: none;
    margin: 0 0 12px;
    padding: 0;
    display: grid;
    gap: 6px;
}

.tn-givd-tickets li {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2, #fafafa);
    font-size: 13px;
}

.tn-givd-tickets code {
    font-size: 10px;
    opacity: .45;
}

.tn-givd-social {
    display: flex;
    gap: 10px;
}

.tn-givd-social__btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #fff;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
    border: 0;
    cursor: pointer;
}

.tn-givd-social__btn .tn-icon {
    color: inherit;
}

.tn-givd-social__btn--vk { background: #4a76a8; }
.tn-givd-social__btn--tg { background: #2aabee; }
.tn-givd-social__btn--wa { background: #25d366; }
.tn-givd-social__btn--link {
    background: #e9ecef;
    color: #495057;
}

.tn-givd-stat__icon .tn-icon,
.tn-givd-card__ico .tn-icon,
.tn-givd-acc__ico .tn-icon,
.tn-givd-hero__expand .tn-icon,
.tn-givd__share-btn .tn-icon,
.tn-givd-stats__cta .tn-icon {
    color: inherit;
}

.tn-givd-dates {
    margin: 0;
    display: grid;
    gap: 10px;
    font-size: 13px;
}

.tn-givd-dates div { display: grid; gap: 2px; }
.tn-givd-dates dt { color: var(--tn-muted); }
.tn-givd-dates dd { margin: 0; font-weight: 700; color: var(--tn-text); }

@media (max-width: 1100px) {
    .tn-givd-stats {
        grid-template-columns: 1fr;
    }
    .tn-givd-stats__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .tn-givd-stats__cta {
        flex-direction: row;
    }
    .tn-givd-layout {
        grid-template-columns: 1fr;
    }
    .tn-givd-side { position: static; }
}

@media (max-width: 640px) {
    .tn-givd-hero { height: 220px; }
    .tn-givd-hero__content { left: 16px; bottom: 16px; right: 56px; }
    .tn-givd-stats__grid { grid-template-columns: 1fr; }
    .tn-givd-stats__cta { flex-direction: column; }
    .tn-givd-steps { grid-template-columns: 1fr; }
    .tn-givd-prize { grid-template-columns: 1fr; }
    .tn-givd-acc__body { padding-left: 16px; }
}

.tn-howto .ob-page {
    position: relative;
    max-width: none;
    width: 100%;
    margin: 0;
    z-index: 1;
    min-height: min(78vh, 820px);
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    overflow: hidden;
}

.tn-howto .ob-visual-card,
.tn-howto .ob-main-btn,
.tn-howto .ob-skip-btn {
    border-radius: 0;
}

.tn-howto .ob-main-btn {
    background: var(--tn-primary);
    border: 1px solid var(--tn-primary);
}

.tn-visited .visited-card {
    border-radius: 0;
    border: 1px solid var(--tn-border-light);
    margin-bottom: 10px;
}

.tn-visited .dashboard-card {
    border-radius: 0;
    border: 1px solid var(--tn-border-light);
}

/* ── Vacancies page (screenshot layout, rectangular themanew) ── */
.tn-simple-page:has(.tn-vac) .tn-breadcrumbs {
    display: none;
}

.tn-vac {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 48px;
}

.tn-vac__intro { max-width: 720px; }

.tn-vac__title {
    margin: 0;
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-vac__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    color: var(--tn-muted);
}

/* Category chips */
.tn-vac-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.tn-vac-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}

.tn-vac-chip span {
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-vac-chip.is-active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-vac-chip.is-active span { color: rgba(255, 255, 255, 0.9); }

.tn-vac-chip:hover:not(.is-active) {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-vac-chip:hover:not(.is-active) span { color: var(--tn-primary); }

.tn-vac-chip--more {
    padding-right: 10px;
}

.tn-vac-chip__chev {
    transform: rotate(90deg);
    transition: transform .15s ease;
}

.tn-vac-chip-more {
    position: relative;
}

.tn-vac-chip-more.is-open .tn-vac-chip__chev {
    transform: rotate(-90deg);
}

.tn-vac-chip-more__panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 40;
    min-width: 220px;
    max-height: 280px;
    overflow: auto;
    background: var(--tn-surface);
    border: 1px solid var(--tn-border);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    display: flex;
    flex-direction: column;
}

.tn-vac-chip-more__panel[hidden] { display: none !important; }

.tn-vac-chip-more__panel a {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-text);
    text-decoration: none;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-vac-chip-more__panel a:last-child { border-bottom: 0; }

.tn-vac-chip-more__panel a:hover,
.tn-vac-chip-more__panel a.is-active {
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
}

.tn-vac-chip-more__panel a span { color: var(--tn-muted); font-weight: 700; }

/* Two-column layout */
.tn-vac-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 24px;
    align-items: start;
}

.tn-vac-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

/* Quick search bar */
.tn-vac-quick {
    display: grid;
    grid-template-columns: minmax(160px, 1.6fr) minmax(140px, 1fr) minmax(120px, .9fr) auto;
    gap: 10px;
    align-items: stretch;
}

.tn-vac-quick__search {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
}

.tn-vac-quick__search input {
    width: 100%;
    height: 44px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    padding: 0 40px 0 12px;
    box-sizing: border-box;
}

.tn-vac-quick__search input:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

.tn-vac-quick__search .tn-icon {
    position: absolute;
    right: 12px;
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-vac-quick__select {
    height: 44px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background-color: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    padding: 0 32px 0 12px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%868e96' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.tn-vac-quick__select:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

.tn-vac-quick__btn {
    height: 44px;
    border-radius: 0;
    white-space: nowrap;
    padding: 0 18px;
}

/* Vacancy cards */
.tn-vac-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-vac-card {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 18px 20px;
}

.tn-vac-card__top {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
}

.tn-vac-card__title {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 800;
    color: var(--tn-text);
    line-height: 1.25;
}

.tn-vac-card__company {
    display: inline-block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-primary);
    text-decoration: none;
}

.tn-vac-card__company:hover { text-decoration: underline; }

.tn-vac-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tn-vac-tag {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 600;
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary-dark, #4a54d4);
}

.tn-vac-tag.is-full {
    background: #e8ebff;
    color: #4550d4;
}

.tn-vac-tag.is-part {
    background: #e6f7ed;
    color: #1f7a45;
}

.tn-vac-tag.is-intern {
    background: #fff4e5;
    color: #b35c00;
}

.tn-vac-tag.is-project {
    background: #f3e8ff;
    color: #7b2cbf;
}

.tn-vac-tag.is-none {
    background: #e6f7ed;
    color: #1f7a45;
}

.tn-vac-tag.is-one {
    background: #f3e8ff;
    color: #7b2cbf;
}

.tn-vac-tag.is-three {
    background: #fff4e5;
    color: #b35c00;
}

.tn-vac-tag.is-five {
    background: #e0f2fe;
    color: #0369a1;
}

.tn-vac-card__salary {
    font-size: 16px;
    font-weight: 800;
    color: #2f9e44;
    line-height: 1.3;
    white-space: nowrap;
    text-align: right;
}

.tn-vac-card__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.tn-vac-card__place {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-vac-card__place .tn-icon { color: var(--tn-muted); flex-shrink: 0; }

.tn-vac-card__more {
    border-radius: 0;
    min-height: 36px;
    padding: 0 14px;
    color: var(--tn-primary);
    border-color: var(--tn-primary);
    background: var(--tn-surface);
}

.tn-vac-card__details {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--tn-border-light);
    display: grid;
    gap: 14px;
}

.tn-vac-card__details[hidden] { display: none !important; }

.tn-vac-card__full h3,
.tn-vac-card__contact-label {
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tn-muted);
}

.tn-vac-card__full p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--tn-text);
    white-space: pre-wrap;
}

.tn-vac-card__contact {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2, #fafafa);
}

.tn-vac-card__contact-name {
    font-size: 13px;
    font-weight: 700;
}

.tn-vac-card__contact-phone {
    font-size: 15px;
    font-weight: 800;
}

.tn-vac-card__contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tn-vac-card__contact-actions .tn-btn {
    border-radius: 0;
    min-height: 36px;
}

.tn-vac-card__contact-actions a.tn-btn--primary,
.tn-vac-card__contact-actions a.tn-btn--primary:visited,
.tn-vac-card__contact-actions a.tn-btn--primary:hover {
    color: #fff !important;
}

.tn-vac-empty {
    text-align: center;
    padding: 48px 16px;
    border: 1px dashed var(--tn-border);
    background: var(--tn-surface);
}

.tn-vac-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
}

.tn-vac-empty p {
    margin: 0 0 14px;
    color: var(--tn-muted);
    font-size: 13px;
}

/* Pagination */
.tn-vac-pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding-top: 4px;
}

.tn-vac-pager__btn,
.tn-vac-pager__num {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: 0;
}

.tn-vac-pager__num.is-active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-vac-pager__num:hover:not(.is-active) {
    color: var(--tn-primary);
}

.tn-vac-pager__btn.is-disabled { opacity: .35; pointer-events: none; }

.tn-vac-pager__dots {
    width: 28px;
    text-align: center;
    color: var(--tn-muted);
}

/* Sidebar filters */
.tn-vac-side {
    position: sticky;
    top: 16px;
}

.tn-vac-side__card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px 16px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-vac-side__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}

.tn-vac-side__head h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-vac-side__head a {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-primary);
    text-decoration: none;
}

.tn-vac-side__head a:hover { text-decoration: underline; }

.tn-vac-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tn-vac-field__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-vac-field__search {
    position: relative;
    display: flex;
    align-items: center;
}

.tn-vac-field input[type="search"],
.tn-vac-field input[type="number"],
.tn-vac-field select {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background-color: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    padding: 0 12px;
    box-sizing: border-box;
}

.tn-vac-field__search input {
    padding-right: 36px;
}

.tn-vac-field__search .tn-icon {
    position: absolute;
    right: 10px;
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-vac-field select {
    padding-right: 32px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%868e96' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.tn-vac-field input:focus,
.tn-vac-field select:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

.tn-vac-field__salary {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
}

.tn-vac-field__salary-sep {
    color: var(--tn-muted);
    font-size: 13px;
    line-height: 1;
}

.tn-vac-side .tn-btn--block {
    width: 100%;
    height: 44px;
    border-radius: 0;
    margin-top: 4px;
}

@media (max-width: 1100px) {
    .tn-vac-layout {
        grid-template-columns: 1fr;
    }
    .tn-vac-side {
        position: static;
        order: -1;
    }
    .tn-vac-quick {
        grid-template-columns: 1fr 1fr;
    }
    .tn-vac-quick__search,
    .tn-vac-quick__btn {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .tn-vac-quick { grid-template-columns: 1fr; }
    .tn-vac-card__top { grid-template-columns: 1fr; }
    .tn-vac-card__salary {
        text-align: left;
        white-space: normal;
    }
    .tn-vac-card__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Bottom city picker — themanew rectangular style */
html[data-site-shell="themanew"] .vac-picker-overlay,
html[data-site-shell="themanew"] .tn-picker-overlay {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    z-index: 9500;
}

html[data-site-shell="themanew"] .vac-picker-sheet,
html[data-site-shell="themanew"] .tn-picker-sheet {
    max-width: none;
    width: 100%;
    left: 0;
    right: 0;
    margin: 0;
    background: var(--tn-surface, #fff);
    border-radius: 0;
    border-top: 1px solid var(--tn-border, #ddd);
    box-shadow: 0 -12px 32px rgba(15, 23, 42, 0.16);
    padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px));
    max-height: min(82dvh, 640px);
    z-index: 9501;
    transition: transform 0.28s ease;
}

html[data-site-shell="themanew"] .vac-picker-handle,
html[data-site-shell="themanew"] .tn-picker-handle {
    width: 36px;
    height: 3px;
    margin: 10px auto 0;
    background: var(--tn-border, #ddd);
    border-radius: 0;
}

html[data-site-shell="themanew"] .vac-picker-header,
html[data-site-shell="themanew"] .tn-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--tn-border-light, #eee);
}

html[data-site-shell="themanew"] .tn-picker-title,
html[data-site-shell="themanew"] .vac-picker-header .text-16,
html[data-site-shell="themanew"] .vac-picker-header span {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--tn-text, #1a1a1a);
}

html[data-site-shell="themanew"] .vac-picker-close,
html[data-site-shell="themanew"] .tn-picker-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border, #ddd);
    background: var(--tn-surface, #fff);
    color: var(--tn-text, #1a1a1a);
    border-radius: 0;
    padding: 0;
    cursor: pointer;
}

html[data-site-shell="themanew"] .vac-picker-close:hover,
html[data-site-shell="themanew"] .tn-picker-close:hover {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary-dark, #4a54d4);
    border-color: var(--tn-primary, #5B67F5);
}

html[data-site-shell="themanew"] .vac-picker-search-wrap,
html[data-site-shell="themanew"] .tn-picker-search-wrap {
    padding: 12px 16px;
    position: relative;
}

html[data-site-shell="themanew"] .vac-picker-search,
html[data-site-shell="themanew"] .tn-picker-search {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tn-border, #ddd);
    border-radius: 0;
    background: var(--tn-surface-2, #fafafa);
    color: var(--tn-text, #1a1a1a);
    padding: 0 12px;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

html[data-site-shell="themanew"] .vac-picker-search:focus,
html[data-site-shell="themanew"] .tn-picker-search:focus {
    outline: 2px solid var(--tn-primary, #5B67F5);
    outline-offset: -2px;
    background: var(--tn-surface, #fff);
    border-color: var(--tn-primary, #5B67F5);
}

html[data-site-shell="themanew"] .vac-picker-search-icon {
    display: none;
}

html[data-site-shell="themanew"] .vac-picker-list,
html[data-site-shell="themanew"] .tn-picker-list {
    padding: 0 8px 8px;
    overflow: auto;
    display: grid;
    gap: 0;
}

html[data-site-shell="themanew"] .vac-picker-item,
html[data-site-shell="themanew"] .tn-picker-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light, #eee);
    border-radius: 0;
    background: transparent;
    color: var(--tn-text, #1a1a1a);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

html[data-site-shell="themanew"] .vac-picker-item:last-child,
html[data-site-shell="themanew"] .tn-picker-item:last-child {
    border-bottom: 0;
}

html[data-site-shell="themanew"] .vac-picker-item:hover,
html[data-site-shell="themanew"] .tn-picker-item:hover {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary-dark, #4a54d4);
}

html[data-site-shell="themanew"] .vac-picker-item.active,
html[data-site-shell="themanew"] .vac-picker-item.is-active,
html[data-site-shell="themanew"] .tn-picker-item.active,
html[data-site-shell="themanew"] .tn-picker-item.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary, #5B67F5);
    border-left: 3px solid var(--tn-primary, #5B67F5);
    padding-left: 9px;
}

/* Desktop: centered dialog instead of bottom sheet */
@media (min-width: 768px) {
    html[data-site-shell="themanew"] .vac-picker-sheet,
    html[data-site-shell="themanew"] .tn-picker-sheet {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        width: min(440px, calc(100vw - 48px));
        max-height: min(72vh, 560px);
        margin: 0;
        border: 1px solid var(--tn-border, #ddd);
        border-top: 1px solid var(--tn-border, #ddd);
        box-shadow: 0 20px 48px rgba(15, 23, 42, 0.2);
        padding-bottom: 12px;
        transform: translate(-50%, -48%) scale(0.96);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.22s ease, opacity 0.22s ease;
    }

    html[data-site-shell="themanew"] .vac-picker-sheet.active,
    html[data-site-shell="themanew"] .tn-picker-sheet.active {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
        pointer-events: auto;
    }

    html[data-site-shell="themanew"] .vac-picker-handle,
    html[data-site-shell="themanew"] .tn-picker-handle {
        display: none;
    }

    html[data-site-shell="themanew"] .vac-picker-header,
    html[data-site-shell="themanew"] .tn-picker-header {
        padding-top: 16px;
    }

    html[data-site-shell="themanew"] .vac-picker-list,
    html[data-site-shell="themanew"] .tn-picker-list {
        max-height: min(48vh, 380px);
    }
}

html[data-site-shell="themanew"][data-theme="dark"] .vac-picker-sheet,
html[data-site-shell="themanew"][data-theme="dark"] .tn-picker-sheet,
html[data-site-shell="themanew"][data-theme="dark"] .vac-picker-search:focus,
html[data-site-shell="themanew"][data-theme="dark"] .tn-picker-search:focus {
    background: var(--tn-surface, #1a1a1a);
    color: var(--tn-text, #f5f5f5);
}

/* ── Support sidebar (shared nav + help card) ── */
.tn-supsb {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 16px;
}

.tn-supsb__nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-supsb__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-supsb__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tn-supsb__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--tn-text);
    text-decoration: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.tn-supsb__item .tn-icon {
    color: var(--tn-muted);
    flex-shrink: 0;
}

.tn-supsb__item:hover {
    background: var(--tn-surface-2, #fafafa);
}

.tn-supsb__item.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
}

.tn-supsb__item.is-active .tn-icon {
    color: var(--tn-primary);
}

.tn-supsb__help {
    padding: 14px;
    border: 1px solid transparent;
    background: var(--tn-primary-soft, #eef0ff);
    display: grid;
    gap: 8px;
}

.tn-supsb__help-title {
    font-size: 14px;
    font-weight: 800;
    color: var(--tn-text);
    line-height: 1.3;
}

.tn-supsb__help-text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--tn-muted);
}

.tn-supsb__help-btn {
    width: 100%;
    border-radius: 0;
    min-height: 40px;
    justify-content: center;
    text-decoration: none;
    color: #fff !important;
}

/* ── Support tickets list (screenshot layout, rectangular themanew) ── */
.tn-simple-page:has(.tn-sup) .tn-breadcrumbs {
    display: none;
}

.tn-sup {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-bottom: 48px;
}

.tn-sup__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tn-sup__intro { max-width: 640px; }

.tn-sup__title {
    margin: 0;
    font-size: clamp(28px, 3.5vw, 36px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-sup__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tn-muted);
}

.tn-sup__new {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 0;
    padding: 0 16px;
    white-space: nowrap;
}

.tn-sup-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.tn-sup-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tn-sup-filters {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 16px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-sup-filters__block {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tn-sup-filters__label,
.tn-sup-side__label,
.tn-sup-field__label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-sup-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tn-sup-nav__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 40px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--tn-text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.tn-sup-nav__item:hover {
    background: var(--tn-surface-2, #fafafa);
}

.tn-sup-nav__item.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
}

.tn-sup-nav__left {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tn-sup-nav__left .tn-icon {
    color: var(--tn-muted);
    flex-shrink: 0;
}

.tn-sup-nav__item.is-active .tn-icon {
    color: var(--tn-primary);
}

.tn-sup-nav__count {
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-sup-nav__item.is-active .tn-sup-nav__count {
    color: var(--tn-primary);
}

.tn-sup-field {
    display: flex;
    flex-direction: column;
    margin: 0;
}

.tn-sup-field select,
.tn-sup-field input[type="search"] {
    width: 100%;
    height: 40px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background-color: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    padding: 0 12px;
    box-sizing: border-box;
}

.tn-sup-field select {
    padding-right: 32px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%868e96' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.tn-sup-field__search {
    position: relative;
    display: flex;
    align-items: center;
}

.tn-sup-field__search input {
    padding-right: 36px;
}

.tn-sup-field__search .tn-icon {
    position: absolute;
    right: 10px;
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-sup-field select:focus,
.tn-sup-field input:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

.tn-sup-filters__reset,
.tn-sup-side__reset {
    border-radius: 0;
    min-height: 40px;
    width: 100%;
    justify-content: center;
    color: var(--tn-primary);
    border-color: var(--tn-primary);
    text-decoration: none;
    box-sizing: border-box;
}

.tn-sup-table-wrap {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    overflow: hidden;
}

.tn-sup-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tn-sup-table th,
.tn-sup-table td {
    padding: 14px 16px;
    text-align: left;
    vertical-align: middle;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-sup-table th {
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
    white-space: nowrap;
}

.tn-sup-table th:nth-child(1),
.tn-sup-table td:nth-child(1) { width: 64px; }

.tn-sup-table th:nth-child(3),
.tn-sup-table td:nth-child(3) { width: 150px; }

.tn-sup-table th:nth-child(4),
.tn-sup-table td:nth-child(4) { width: 100px; }

.tn-sup-table th:nth-child(5),
.tn-sup-table td:nth-child(5) { width: 180px; }

.tn-sup-table th:nth-child(6),
.tn-sup-table td:nth-child(6) { width: 44px; padding-left: 0; padding-right: 12px; }

.tn-sup-row {
    cursor: pointer;
    transition: background .12s ease;
}

.tn-sup-row:hover {
    background: var(--tn-surface-2, #fafafa);
}

.tn-sup-row:focus-visible {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
}

.tn-sup-td-id {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-muted);
    font-variant-numeric: tabular-nums;
}

.tn-sup-td-subject {
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-sup-td-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-text);
    font-variant-numeric: tabular-nums;
}

.tn-sup-td-date {
    font-size: 13px;
    color: var(--tn-muted);
    white-space: nowrap;
}

.tn-sup-td-go {
    color: var(--tn-muted);
    text-align: right;
}

.tn-sup-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tn-sup-badge.is-open {
    background: #f1f3f5;
    color: #495057;
}

.tn-sup-badge.is-work {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
}

.tn-sup-badge.is-wait {
    background: #fff4e5;
    color: #c26a00;
}

.tn-sup-badge.is-closed {
    background: #e6f7ed;
    color: #1f7a45;
}

.tn-sup-empty {
    text-align: center;
    padding: 56px 20px;
}

.tn-sup-empty h3 {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
}

.tn-sup-empty p {
    margin: 0 0 16px;
    color: var(--tn-muted);
    font-size: 13px;
}

.tn-sup-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px 16px;
}

.tn-sup-foot__info {
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-sup-pager {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tn-sup-pager__btn,
.tn-sup-pager__num {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-radius: 0;
}

.tn-sup-pager__num.is-active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-sup-pager__num:hover:not(.is-active) {
    color: var(--tn-primary);
}

.tn-sup-pager__btn.is-disabled {
    opacity: .35;
    pointer-events: none;
}

@media (max-width: 1100px) {
    .tn-sup-layout {
        grid-template-columns: 1fr;
    }

    .tn-sup-table-wrap {
        overflow-x: auto;
    }

    .tn-sup-table {
        min-width: 720px;
    }
}

@media (max-width: 720px) {
    .tn-sup__head {
        flex-direction: column;
        align-items: stretch;
    }

    .tn-sup__new {
        width: 100%;
        justify-content: center;
    }
}

/* ── Support ticket view (3-column screenshot layout) ── */
.tn-simple-page:has(.tn-supv) .tn-breadcrumbs {
    display: none;
}

.tn-simple-page:has(.tn-supv) {
    padding-top: 0;
}

.tn-supv {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr) 280px;
    gap: 16px;
    align-items: start;
    padding-bottom: 40px;
}

.tn-supv-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-supv-nav__card,
.tn-supv-panel,
.tn-supv-info__card,
.tn-supv-help {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-supv-nav__card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px;
}

.tn-supv-nav__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-supv-nav__list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tn-supv-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 0 10px;
    border: 0;
    background: transparent;
    color: var(--tn-text);
    text-decoration: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.tn-supv-nav__item .tn-icon { color: var(--tn-muted); flex-shrink: 0; }

.tn-supv-nav__item:hover {
    background: var(--tn-surface-2, #fafafa);
}

.tn-supv-nav__item.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
}

.tn-supv-nav__item.is-active .tn-icon { color: var(--tn-primary); }

.tn-supv-help {
    padding: 14px;
    background: var(--tn-primary-soft, #eef0ff);
    border-color: transparent;
    display: grid;
    gap: 8px;
}

.tn-supv-help__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-surface);
    color: var(--tn-primary);
}

.tn-supv-help__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.4;
    color: var(--tn-text);
    font-weight: 600;
}

.tn-supv-help__btn {
    border-radius: 0;
    min-height: 40px;
    justify-content: center;
    text-decoration: none;
    color: #fff !important;
}

.tn-supv-panel {
    display: flex;
    flex-direction: column;
    min-height: min(64vh, 640px);
    overflow: hidden;
}

.tn-supv-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-supv-back {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    cursor: pointer;
    flex-shrink: 0;
}

.tn-supv-back:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-supv-head__info { min-width: 0; flex: 1; }

.tn-supv-head__title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.tn-supv-head__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-supv-close-btn {
    margin-left: auto;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    min-height: 32px;
    padding: 0 10px;
    cursor: pointer;
}

.tn-supv-head__meta {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.4;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.tn-supv-head__subject,
.tn-supv-head__created {
    min-width: 0;
}

.tn-supv-profile-link {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--tn-primary);
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
}

.tn-supv-profile-link:hover {
    text-decoration: underline;
}

.tn-supv-profile-link--name {
    font-size: inherit;
}

button.tn-supv-msg__avatar.tn-supv-profile-link {
    cursor: pointer;
}

button.tn-supv-msg__avatar.tn-supv-profile-link:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.admin-list-profile-link {
    font-size: inherit;
    line-height: inherit;
}

.tn-supv-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 18px 0;
    padding: 12px 14px;
    border: 1px solid #c6e9d1;
    background: #f3fbf6;
}

.tn-supv-status--info {
    border-color: var(--tn-border);
    background: var(--tn-primary-soft, #eef0ff);
}

.tn-supv-status--wait {
    border-color: #f5d9b0;
    background: #fff8ef;
}

.tn-supv-status__left {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
}

.tn-supv-status__check,
.tn-supv-status__left .tn-icon {
    color: #2f9e44;
    flex-shrink: 0;
    margin-top: 1px;
}

.tn-supv-status--info .tn-icon { color: var(--tn-primary); }
.tn-supv-status--wait .tn-icon { color: #c26a00; }

.tn-supv-status__title {
    font-size: 14px;
    font-weight: 800;
    color: #1f7a45;
}

.tn-supv-status--info .tn-supv-status__title { color: var(--tn-primary); }
.tn-supv-status--wait .tn-supv-status__title { color: #c26a00; }

.tn-supv-status__sub {
    margin-top: 2px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-supv-rate {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.tn-supv-rate__label {
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-muted);
}

.tn-supv-rate__stars {
    display: inline-flex;
    gap: 2px;
}

.tn-supv-rate__star {
    border: 0;
    background: transparent;
    color: #ced4da;
    padding: 2px;
    cursor: pointer;
}

.tn-supv-rate__star.is-on { color: #fab005; }
.tn-supv-rate__star:hover { color: #fcc419; }

.tn-supv-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: var(--tn-surface);
}

.tn-supv-msg {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    max-width: min(100%, 560px);
}

.tn-supv-msg.is-own {
    align-self: flex-end;
    flex-direction: row;
}

.tn-supv-msg.is-other {
    align-self: flex-start;
}

.tn-supv-msg__avatar {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    color: var(--tn-muted);
    font-size: 13px;
    font-weight: 800;
    flex-shrink: 0;
}

.tn-supv-msg__avatar.is-admin,
.tn-supv-msg__avatar.is-you {
    background: var(--tn-primary);
    color: #fff;
}

.tn-supv-msg__col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tn-supv-msg.is-own .tn-supv-msg__col { align-items: flex-end; }

.tn-supv-msg__meta {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-supv-msg__meta strong {
    color: var(--tn-text);
    font-weight: 700;
}

.tn-supv-bubble {
    position: relative;
    padding: 12px 14px;
    border: 1px solid var(--tn-border-light);
    background: #f8f9fa;
    color: var(--tn-text);
    font-size: 14px;
    line-height: 1.45;
    max-width: 100%;
}

.tn-supv-bubble.is-own {
    background: var(--tn-primary-soft, #eef0ff);
    border-color: color-mix(in srgb, var(--tn-primary) 22%, transparent);
}

.tn-supv-bubble__title {
    font-weight: 800;
    margin-bottom: 4px;
}

.tn-supv-bubble__text {
    white-space: pre-wrap;
    word-break: break-word;
}

.tn-supv-bubble__attach {
    margin-top: 8px;
}

.tn-supv-bubble__file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-primary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.tn-supv-bubble__image {
    display: block;
    max-width: min(100%, 280px);
}

.tn-supv-bubble__image img {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--tn-border);
}

.tn-supv-bubble__ticks {
    display: flex;
    justify-content: flex-end;
    margin-top: 6px;
    color: var(--tn-primary);
    opacity: .85;
}

.tn-supv-empty {
    margin: auto;
    text-align: center;
    color: var(--tn-muted);
    font-size: 14px;
}

.tn-supv-closed {
    padding: 14px 18px;
    border-top: 1px solid var(--tn-border-light);
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-text);
    font-size: 13px;
    line-height: 1.45;
}

.tn-supv-closed a {
    color: var(--tn-primary);
    font-weight: 700;
    text-decoration: none;
}

.tn-supv-closed a:hover { text-decoration: underline; }

.tn-supv-composer,
.tn-supv .chat-input-area {
    padding: 12px 14px;
    border-top: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    flex-shrink: 0;
    display: grid;
    gap: 8px;
}

.tn-supv-composer__attach-preview {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-bg, #fafafa);
    font-size: 13px;
    color: var(--tn-text);
}

.tn-supv-composer__attach-preview:has(.tn-supv-composer__attach-name:not(:empty)) {
    display: flex;
}

.tn-supv-composer__attach-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-supv-composer__attach-clear {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tn-supv-composer__attach-clear:hover {
    color: var(--tn-text);
}

.tn-supv-composer__wrap,
.tn-supv .chat-input-wrap {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tn-supv-composer__attach,
.tn-supv .chat-attach-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    padding: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.tn-supv-composer__attach:hover,
.tn-supv .chat-attach-btn:hover {
    background: var(--tn-primary-soft, #eef0ff);
}

.tn-supv-composer__input,
.tn-supv .chat-textarea {
    flex: 1;
    min-height: 44px;
    max-height: 110px;
    resize: none;
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-bg, #fafafa) !important;
    color: var(--tn-text) !important;
    font: inherit;
    font-size: 14px;
    line-height: 1.5;
    padding: 10px 12px !important;
    box-sizing: border-box;
    outline: none;
}

.tn-supv-composer__input::placeholder,
.tn-supv .chat-textarea::placeholder {
    color: var(--tn-muted);
}

.tn-supv-composer__input:focus,
.tn-supv .chat-textarea:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary) !important;
    background: var(--tn-surface) !important;
}

.tn-supv-composer__send,
.tn-supv .chat-send-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px;
    padding: 0 !important;
    border-radius: 0 !important;
    border: 1px solid var(--tn-primary) !important;
    background: var(--tn-primary) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: none !important;
    cursor: pointer;
}

.tn-supv-composer__send:active,
.tn-supv .chat-send-btn:active {
    transform: none;
}

.tn-supv-composer__send.sending,
.tn-supv .chat-send-btn.sending {
    opacity: 0.6;
    pointer-events: none;
}

.tn-supv-info__card {
    padding: 0;
    overflow: hidden;
}

.tn-supv-info__title {
    margin: 0;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 800;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-supv-info__list {
    margin: 0;
    display: grid;
    gap: 0;
}

.tn-supv-info__row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    align-items: start;
    margin: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-supv-info__row:last-child {
    border-bottom: 0;
}

.tn-supv-info__row dt {
    display: contents;
}

.tn-supv-info__row dt .tn-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    margin-top: 2px;
    color: var(--tn-muted);
}

.tn-supv-info__label {
    grid-column: 2;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--tn-muted);
    line-height: 1.3;
}

.tn-supv-info__row dd {
    grid-column: 2;
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
    line-height: 1.35;
    word-break: break-word;
}

.tn-supv-priority {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
}

.tn-supv-priority__dot {
    width: 8px;
    height: 8px;
    background: #fab005;
    flex-shrink: 0;
}

.tn-supv-priority.is-low .tn-supv-priority__dot { background: #868e96; }
.tn-supv-priority.is-high .tn-supv-priority__dot { background: #fa5252; }

.tn-supv-tags {
    display: flex !important;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.tn-supv-tag {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
    font-size: 12px;
    font-weight: 700;
}

.tn-supv-tag--muted {
    background: #f1f3f5;
    color: var(--tn-muted);
}

@media (max-width: 1100px) {
    .tn-supv {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tn-supv-main { order: 1; }
    .tn-supv-info { order: 2; }
    .tn-supsb { order: 3; }

    .tn-supv-nav { order: -1; }

    .tn-supv-panel {
        min-height: 56vh;
    }
}

@media (max-width: 720px) {
    .tn-supv {
        gap: 10px;
        padding-bottom: 24px;
    }

    .tn-supv-head {
        padding: 12px 14px;
        gap: 10px;
        align-items: center;
    }

    .tn-supv-back {
        width: 36px;
        height: 36px;
    }

    .tn-supv-head__title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "title title"
            "badge action";
        align-items: center;
        column-gap: 8px;
        row-gap: 8px;
    }

    .tn-supv-head__title {
        grid-area: title;
        font-size: 16px;
        line-height: 1.25;
    }

    .tn-supv-head__title-row .tn-sup-badge {
        grid-area: badge;
        justify-self: start;
    }

    .tn-supv-close-btn {
        grid-area: action;
        margin-left: 0;
        justify-self: end;
        min-height: 30px;
        padding: 0 8px;
    }

    .tn-supv-head__meta {
        display: grid;
        gap: 4px;
        margin-top: 8px;
        font-size: 12px;
    }

    .tn-supv-head__subject,
    .tn-supv-head__created {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tn-supv-status {
        flex-direction: column;
        align-items: flex-start;
    }

    .tn-supv-rate {
        align-items: flex-start;
    }

    .tn-supv-msg {
        max-width: 100%;
    }

    .tn-supv-messages {
        padding: 12px;
    }

    .tn-supv-composer,
    .tn-supv .chat-input-area {
        padding: 10px 12px;
    }

    .tn-supv-composer__wrap,
    .tn-supv .chat-input-wrap {
        gap: 6px;
    }

    .tn-supv-composer__attach,
    .tn-supv .chat-attach-btn,
    .tn-supv-composer__send,
    .tn-supv .chat-send-btn {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px;
    }

    .tn-supv-composer__input,
    .tn-supv .chat-textarea {
        min-height: 40px;
        font-size: 13px;
        padding: 8px 10px !important;
    }
}

/* ── Support create (screenshot layout) ── */
.tn-simple-page:has(.tn-supc) .tn-breadcrumbs {
    display: none;
}

.tn-supc {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding-bottom: 48px;
}

.tn-supc-nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 16px;
}

.tn-supc-nav__card,
.tn-supc-help,
.tn-supc-form {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-supc-nav__card {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tn-supc-nav__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
}

.tn-supc-nav__list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tn-supc-nav__item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 0 12px;
    border: 0;
    background: transparent;
    color: var(--tn-text);
    text-decoration: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.tn-supc-nav__item .tn-icon {
    color: var(--tn-muted);
    flex-shrink: 0;
}

.tn-supc-nav__item:hover {
    background: var(--tn-surface-2, #fafafa);
}

.tn-supc-nav__item.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
}

.tn-supc-nav__item.is-active .tn-icon {
    color: var(--tn-primary);
}

.tn-supc-help {
    padding: 18px 16px;
    display: grid;
    gap: 8px;
    justify-items: start;
}

.tn-supc-help__icon {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary);
    margin-bottom: 4px;
}

.tn-supc-help__title {
    font-size: 15px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-supc-help__text {
    margin: 0 0 6px;
    font-size: 13px;
    line-height: 1.4;
    color: var(--tn-muted);
}

.tn-supc-help__btn {
    width: 100%;
    border-radius: 0;
    min-height: 42px;
    justify-content: center;
    color: #fff !important;
}

.tn-supc-main {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tn-supc__title {
    margin: 0;
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-supc__subtitle {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--tn-muted);
    max-width: 560px;
}

.tn-supc-form {
    padding: 22px 20px;
    display: grid;
    gap: 18px;
}

.tn-supc-field {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.tn-supc-field__label,
.tn-supc-field > legend.tn-supc-field__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
    padding: 0;
}

.tn-supc-field__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tn-supc-field__count {
    font-size: 12px;
    color: var(--tn-muted);
    font-variant-numeric: tabular-nums;
}

.tn-supc-field__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-bg, #fafafa);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    padding: 10px 12px;
}

.tn-supc-field__input::placeholder {
    color: var(--tn-muted);
    opacity: .85;
}

.tn-supc-field__input:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
    background: var(--tn-surface);
}

.tn-supc-field__textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

.tn-supc-priority__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.tn-supc-prio {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 72px;
    padding: 12px 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    text-align: left;
    cursor: pointer;
    font: inherit;
}

.tn-supc-prio:hover {
    border-color: var(--tn-primary);
}

.tn-supc-prio.is-active {
    border-color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 8%, transparent);
    box-shadow: inset 0 0 0 1px var(--tn-primary);
}

.tn-supc-prio__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: #f1f3f5;
}

.tn-supc-prio__icon.is-low {
    background: #e6f7ed;
    color: #2f9e44;
}

.tn-supc-prio__icon.is-mid {
    background: #fff4e5;
    color: #f59f00;
}

.tn-supc-prio__icon.is-high {
    background: #ffe3e3;
    color: #fa5252;
}

.tn-supc-prio__text {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.tn-supc-prio__text strong {
    font-size: 14px;
    font-weight: 800;
}

.tn-supc-prio__text span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-supc-prio__check {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--tn-primary);
    opacity: 0;
}

.tn-supc-prio.is-active .tn-supc-prio__check {
    opacity: 1;
}

.tn-supc-attach {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 52px;
    padding: 8px 10px 8px 12px;
    border: 1px dashed var(--tn-border);
    background: var(--tn-surface);
    box-sizing: border-box;
}

.tn-supc-attach.is-drag {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft, #eef0ff);
}

.tn-supc-attach__btn {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    text-align: left;
    font: inherit;
}

.tn-supc-attach__clip {
    color: var(--tn-primary);
    flex-shrink: 0;
}

.tn-supc-attach__copy {
    display: grid;
    gap: 1px;
    min-width: 0;
}

.tn-supc-attach__link {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-primary);
    line-height: 1.25;
}

.tn-supc-attach__hint {
    font-size: 11px;
    color: var(--tn-muted);
    line-height: 1.25;
}

.tn-supc-attach__file {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
}

.tn-supc-attach__name {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-supc-attach__remove {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
}

.tn-supc-attach__remove:hover {
    color: var(--tn-text);
}

.tn-supc-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

.tn-supc-actions__clear,
.tn-supc-actions__submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 0;
    min-height: 44px;
}

.tn-supc-actions__submit {
    padding: 0 18px;
}

@media (max-width: 980px) {
    .tn-supc {
        grid-template-columns: 1fr;
    }

    .tn-supc-nav {
        position: static;
    }

    .tn-supc-priority__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .tn-supc-actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .tn-supc-actions__clear,
    .tn-supc-actions__submit {
        width: 100%;
        justify-content: center;
    }
}

/* ── Messages / support / chat ── */
.tn-messages .messages-tabs,
.tn-support .support-header + .tickets-list {
    margin-top: 0;
}

.tn-messages .messages-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 16px;
    border: 1px solid var(--tn-border);
}

.tn-messages .messages-tab-btn {
    flex: 1;
    margin: 0;
    border: none;
    border-right: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 10px 8px;
}

.tn-messages .messages-tab-btn:last-child { border-right: 0; }

.tn-messages .messages-tab-btn.active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-messages .dashboard-card,
.tn-messages .offer-inbox-filters,
.tn-messages .dialog-list-item,
.tn-messages .empty-giveaway {
    border-radius: 0;
    border: 1px solid var(--tn-border-light);
}

.tn-support .support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.tn-support .support-create-btn,
.tn-support--form .support-submit-btn,
.tn-support--form .form-input,
.tn-support--form .dashboard-card {
    border-radius: 0;
}

.tn-support .support-ticket-card,
.tn-support--form .dashboard-card {
    border: 1px solid var(--tn-border-light);
}

/* New support ticket form */
.tn-support--form {
    max-width: 560px;
}

.tn-support-form {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 20px;
}

.tn-support-form .tn-field__label {
    display: block;
    margin-bottom: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-muted);
}

.tn-support-form .tn-field__input,
.tn-support-form .tn-select {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border) !important;
    background: var(--tn-surface-2) !important;
    box-shadow: none !important;
    min-height: 44px;
}

.tn-support-form .tn-field__input:focus,
.tn-support-form .tn-select:focus {
    border-color: var(--tn-primary) !important;
    background: var(--tn-surface) !important;
    box-shadow: 0 0 0 2px rgba(91, 103, 245, 0.18) !important;
}

.tn-support-form__message {
    min-height: 140px;
    resize: vertical;
    line-height: 1.45;
}

.tn-support-form__submit,
.tn-support--form .tn-btn--primary {
    border-radius: 0 !important;
    min-height: 48px;
    font-size: 15px;
    font-weight: 800;
    margin-top: 4px;
}

.tn-support--form .tn-auth__card,
.tn-support--form .support-create-card,
.tn-support--form .custom-select-trigger,
.tn-support--form .custom-select-options,
.tn-support--form .custom-select-options .option {
    border-radius: 0 !important;
}

/* Support create — polished themanew form */
.tn-support--create {
    max-width: 560px;
}

.tn-support-create__lead {
    margin: 0 0 16px;
    color: var(--tn-muted);
    font-size: 14px;
    line-height: 1.45;
}

.tn-support-create__form {
    display: grid;
    gap: 16px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 18px;
}

.tn-support-create__field {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.tn-support-create__label,
.tn-support-create__field > legend.tn-support-create__label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
    padding: 0;
}

.tn-support-create__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tn-support-create__count {
    font-size: 11px;
    color: var(--tn-muted);
    font-variant-numeric: tabular-nums;
}

.tn-support-create__input {
    width: 100%;
    box-sizing: border-box;
    min-height: 44px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-bg);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    padding: 10px 12px;
}

.tn-support-create__input::placeholder {
    color: var(--tn-muted);
    opacity: 0.85;
}

.tn-support-create__input:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

.tn-support-create__textarea {
    min-height: 160px;
    resize: vertical;
    line-height: 1.5;
}

.tn-support-create__chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.tn-support-create__chip {
    display: grid;
    gap: 2px;
    align-content: center;
    min-height: 56px;
    padding: 10px 8px;
    border: 1px solid var(--tn-border);
    background: var(--tn-bg);
    color: var(--tn-text);
    cursor: pointer;
    text-align: left;
    font: inherit;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tn-support-create__chip strong {
    font-size: 13px;
    font-weight: 700;
}

.tn-support-create__chip span {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-support-create__chip:hover {
    border-color: var(--tn-primary);
}

.tn-support-create__chip.is-active {
    border-color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 14%, transparent);
    box-shadow: inset 0 0 0 1px var(--tn-primary);
}

.tn-support-create__chip.is-active span {
    color: var(--tn-primary);
}

.tn-support-create__chip--high.is-active {
    border-color: var(--tn-danger, #fa5252);
    background: color-mix(in srgb, var(--tn-danger, #fa5252) 12%, transparent);
    box-shadow: inset 0 0 0 1px var(--tn-danger, #fa5252);
}

.tn-support-create__chip--high.is-active span {
    color: var(--tn-danger, #fa5252);
}

.tn-support-create__actions {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px;
    margin-top: 4px;
}

.tn-support-create__actions .tn-btn,
.tn-support-create__submit {
    min-height: 44px;
    border-radius: 0 !important;
    font-weight: 700;
}

.tn-support-create__submit {
    width: 100%;
}

@media (max-width: 520px) {
    .tn-support-create__chips {
        grid-template-columns: 1fr;
    }

    .tn-support-create__actions {
        grid-template-columns: 1fr;
    }

    .tn-support-create__actions .tn-btn--ghost {
        order: 2;
    }
}

.tn-chat .chat-page,
.tn-chat .tn-chat__page {
    display: flex;
    flex-direction: column;
    min-height: min(68vh, 640px);
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    margin-top: 0 !important;
    padding-bottom: 0 !important;
    height: auto !important;
    overflow: hidden;
}

.tn-chat__header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-chat__back,
.tn-chat__icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font: inherit;
    color: var(--tn-text);
    border-radius: 0 !important;
}

.tn-chat__header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.tn-chat__avatar,
.tn-chat .chat-header-avatar {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-primary) !important;
    box-shadow: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #fff !important;
    flex-shrink: 0;
}

.tn-chat__name,
.tn-chat .chat-header-name {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    background: none;
    border: none;
    padding: 0;
    color: var(--tn-text) !important;
    cursor: pointer;
    text-align: left;
}

.tn-chat__status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--tn-muted);
    margin-top: 2px;
}

.tn-chat__banner,
.tn-chat__subject,
.tn-chat__closed,
.tn-chat .chat-subject-banner,
.tn-chat .chat-moderator-banner,
.tn-chat .chat-closed-banner {
    border-bottom: 1px solid var(--tn-border-light) !important;
    padding: 10px 12px !important;
    background: var(--tn-primary-soft) !important;
    font-size: 13px;
    border-radius: 0 !important;
}

.tn-chat .chat-subject-icon {
    border-radius: 0 !important;
    background: var(--tn-surface) !important;
    border: 1px solid var(--tn-border);
}

.tn-chat .chat-subject-label {
    color: var(--tn-primary) !important;
}

.tn-chat__messages,
.tn-chat .chat-messages-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px !important;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--tn-bg) !important;
}

.tn-chat__date,
.tn-chat .chat-date-divider {
    text-align: center;
    font-size: 11px;
    color: var(--tn-muted);
    margin: 6px 0;
}

.tn-chat .chat-date-divider span {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    color: var(--tn-muted);
    font-weight: 600;
}

.tn-chat__msg-avatar,
.tn-chat .chat-avatar {
    width: 28px;
    height: 28px;
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-surface-2) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: none !important;
}

.tn-chat .chat-message-row {
    margin-bottom: 0 !important;
    gap: 8px;
}

.tn-chat .chat-bubble-wrap {
    max-width: min(78%, 440px);
    gap: 4px;
}

.tn-chat .chat-sender-name {
    font-size: 11px;
    font-weight: 700;
    color: var(--tn-muted);
    padding: 0 2px;
}

.tn-chat__bubble,
.tn-chat .chat-bubble {
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-surface) !important;
    color: var(--tn-text) !important;
    padding: 10px 12px 8px !important;
    box-shadow: none !important;
    max-width: 100%;
}

.tn-chat .chat-bubble.own,
.tn-chat__bubble.own {
    background: var(--tn-primary) !important;
    border-color: var(--tn-primary) !important;
    color: #fff !important;
}

.tn-chat .chat-bubble.other,
.tn-chat__bubble.other {
    background: var(--tn-surface) !important;
    border-color: var(--tn-border) !important;
    color: var(--tn-text) !important;
}

.tn-chat .chat-bubble.moderator,
.tn-chat__bubble.moderator {
    background: var(--tn-accent-soft, #fff4e6) !important;
    border-color: var(--tn-accent, #fd7e14) !important;
    color: var(--tn-text) !important;
}

.tn-chat .chat-bubble-text {
    font-size: 14px;
    line-height: 1.45;
    color: inherit !important;
}

.tn-chat .chat-bubble-time {
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.7;
    color: inherit !important;
}

.tn-chat .chat-message-row.own .chat-bubble-time {
    opacity: 0.85;
}

.tn-chat__composer,
.tn-chat .chat-input-area {
    border-top: 1px solid var(--tn-border) !important;
    padding: 10px 12px !important;
    background: var(--tn-surface) !important;
}

.tn-chat__composer-wrap,
.tn-chat .chat-input-wrap {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

.tn-chat__textarea,
.tn-chat .chat-textarea {
    flex: 1;
    min-height: 42px;
    max-height: 120px;
    border: 1px solid var(--tn-border) !important;
    border-radius: 0 !important;
    background: var(--tn-surface-2) !important;
    color: var(--tn-text) !important;
    padding: 10px 12px !important;
    font: inherit;
    font-size: 14px;
    resize: none;
    outline: none;
}

.tn-chat__textarea:focus,
.tn-chat .chat-textarea:focus {
    border-color: var(--tn-primary) !important;
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    background: var(--tn-surface) !important;
}

.tn-chat__send,
.tn-chat .chat-send-btn {
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    padding: 0 !important;
    border-radius: 0 !important;
    border: 1px solid var(--tn-primary) !important;
    background: var(--tn-primary) !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: none !important;
}

.tn-chat__empty,
.tn-chat .chat-empty {
    text-align: center;
    color: var(--tn-muted);
    padding: 40px 16px;
}

.tn-chat .chat-header,
.tn-chat .chat-input-bar,
.tn-chat .chat-message-bubble,
.tn-chat .chat-bubble,
.tn-chat .chat-back-btn,
.tn-chat .chat-report-btn,
.tn-chat .chat-close-ticket-btn,
.tn-chat .chat-subject-menu-btn {
    border-radius: 0 !important;
}

.tn-chat .chat-close-ticket-btn {
    background: #fff5f5 !important;
    color: var(--tn-danger) !important;
    border: 1px solid #ffc9c9 !important;
}

.tn-chat .chat-report-btn {
    background: var(--tn-surface-2) !important;
    border: 1px solid var(--tn-border) !important;
    color: var(--tn-text) !important;
}

.tn-chat .chat-subject-dropdown {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border) !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14) !important;
}

.tn-chat .chat-offer-card,
.tn-chat .offer-card {
    border-radius: 0 !important;
}

/* Map: override client.css mobile fixed+transform (breaks Yandex tiles in desktop shell).
   Do NOT force width/height on inner .ymaps3* nodes — that blanks the canvas. */
.tn-map-page {
    position: relative;
}

.tn-map-page .tn-map,
.tn-map-page .map-container-full {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    transform: none !important;
    max-width: none !important;
    width: 100% !important;
    height: min(72vh, 720px) !important;
    min-height: 480px !important;
    z-index: 1 !important;
    border: 1px solid var(--tn-border);
    overflow: hidden;
    background: var(--tn-surface-2);
    margin: 0;
    will-change: auto !important;
    backface-visibility: visible !important;
    -webkit-backface-visibility: visible !important;
}

.tn-map-page #map,
.tn-map-page .tn-map__canvas {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
}

.tn-map-page .tn-map__loader {
    background: rgba(255, 255, 255, 0.72);
}

.tn-map-page .filter-btn-map,
.tn-map-page .location-btn-map,
.tn-map-page .tn-map__ctrl {
    border-radius: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: none;
    right: 12px;
}

.tn-map-page .filter-btn-map,
.tn-map-page .tn-map__ctrl--filter {
    bottom: 88px;
}

.tn-map-page .location-btn-map,
.tn-map-page .tn-map__ctrl--locate {
    bottom: 36px;
}

html[data-site-shell="themanew"] .tn-map-sheet,
.tn-map-sheet {
    --mpc: var(--tn-primary);
    --mpc-soft: var(--tn-primary-soft);
    --mpc-text: var(--tn-text);
    --mpc-muted: var(--tn-muted);
    --mpc-line: var(--tn-border-light);
    border: 1px solid var(--tn-border);
    background: var(--tn-surface) !important;
    color: var(--tn-text) !important;
    box-shadow: 0 -8px 32px rgba(15, 23, 42, 0.14);
    overflow: hidden;
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .tn-map-sheet,
html[data-site-shell="themanew"] .tn-map-sheet *,
html[data-site-shell="themanew"] .tn-map-sheet *::before,
html[data-site-shell="themanew"] .tn-map-sheet *::after,
.tn-map-sheet,
.tn-map-sheet *,
.tn-map-sheet *::before,
.tn-map-sheet *::after {
    border-radius: 0 !important;
}

.tn-map-sheet__handle {
    width: 36px;
    height: 4px;
    margin: 10px auto 0;
    background: var(--tn-border);
    display: none;
}

.tn-map-place {
    display: grid;
    grid-template-columns: minmax(220px, 0.95fr) minmax(0, 1.15fr);
    grid-template-areas:
        "gallery intro"
        "gallery offer"
        "gallery actions"
        "gallery details";
    gap: 12px 16px;
    padding: 14px 16px 16px;
    align-items: start;
    min-width: 0;
}

.tn-map-place__gallery { grid-area: gallery; min-width: 0; }
.tn-map-place__intro { grid-area: intro; min-width: 0; padding-right: 88px; }
.tn-map-place__tools {
    grid-area: intro;
    justify-self: end;
    align-self: start;
    display: flex;
    gap: 8px;
    z-index: 2;
}
.tn-map-place__offer { grid-area: offer; }
.tn-map-place__actions { grid-area: actions; }
.tn-map-place__details { grid-area: details; }

.tn-map-place__main {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    aspect-ratio: 4 / 3;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    overflow: hidden;
}

.tn-map-place__main-hit {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.tn-map-place__main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-map-place__counter {
    position: absolute;
    right: 6px;
    bottom: 6px;
    z-index: 2;
    padding: 2px 7px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.2;
    pointer-events: none;
}

.tn-map-place__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--tn-border);
    background: color-mix(in srgb, var(--tn-surface) 92%, transparent);
    color: var(--tn-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.14);
}

.tn-map-place__nav:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-map-place__nav--prev { left: 8px; }
.tn-map-place__nav--next { right: 8px; }

.tn-map-place__nav[hidden] { display: none !important; }

.tn-map-place__thumbs {
    display: flex;
    gap: 6px;
    margin-top: 8px;
    overflow-x: auto;
    scrollbar-width: none;
}

.tn-map-place__thumbs::-webkit-scrollbar { display: none; }

.tn-map-place__thumb {
    flex: 0 0 56px;
    width: 56px;
    height: 44px;
    padding: 0;
    border: 2px solid transparent;
    background: var(--tn-surface-2);
    overflow: hidden;
    cursor: pointer;
}

.tn-map-place__thumb.is-active { border-color: var(--mpc); }
.tn-map-place__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-map-place__title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text) !important;
    cursor: pointer;
}

.tn-map-place__category {
    margin: 4px 0 0;
    font-size: 12px;
    color: var(--tn-muted) !important;
    line-height: 1.3;
}

.tn-map-place__rating {
    margin-top: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text) !important;
}

.tn-map-place__star { color: #f5a623; }
.tn-map-place__reviews {
    font-weight: 500;
    color: var(--tn-muted) !important;
    font-size: 12px;
}

.tn-map-place__icon-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--tn-border) !important;
    background: var(--tn-surface) !important;
    color: var(--tn-muted) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.tn-map-place__icon-btn:hover { border-color: var(--tn-primary); color: var(--tn-primary); }

.tn-map-place__icon-btn--like {
    color: var(--tn-primary) !important;
}

.tn-map-place__icon-btn--like:hover {
    border-color: var(--tn-primary) !important;
    color: var(--tn-primary) !important;
}

.tn-map-place__fav-on { display: none !important; }
.tn-map-place__icon-btn--like.active .tn-map-place__fav-off,
.tn-map-place__icon-btn--like.is-active .tn-map-place__fav-off { display: none !important; }
.tn-map-place__icon-btn--like.active .tn-map-place__fav-on,
.tn-map-place__icon-btn--like.is-active .tn-map-place__fav-on { display: inline-flex !important; }

.tn-map-place__icon-btn--like.active,
.tn-map-place__icon-btn--like.is-active {
    color: var(--tn-danger) !important;
    border-color: color-mix(in srgb, var(--tn-danger) 40%, var(--tn-border)) !important;
}

.tn-map-place__icon-btn--like.active:hover,
.tn-map-place__icon-btn--like.is-active:hover {
    color: var(--tn-danger) !important;
    border-color: var(--tn-danger) !important;
}

.tn-map-place__offer {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 0;
    background: var(--tn-primary-soft) !important;
    color: var(--tn-text) !important;
    overflow: hidden;
    cursor: pointer;
}

.tn-map-place__offer--active { background: var(--tn-primary-soft) !important; }

.tn-map-place__offer-ico {
    flex-shrink: 0;
    color: var(--mpc);
    display: inline-flex;
}

.tn-map-place__offer-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    position: relative;
    z-index: 1;
}

.tn-map-place__offer-body strong {
    font-size: 13px;
    font-weight: 800;
    color: var(--tn-text) !important;
}

.tn-map-place__offer-body span {
    font-size: 12px;
    color: var(--tn-muted) !important;
}

.tn-map-place__offer-pct {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    color: color-mix(in srgb, var(--mpc) 22%, transparent);
    pointer-events: none;
    user-select: none;
}

.tn-map-place__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tn-map-place__actions .tn-btn,
.tn-map-place__actions .establishment-action-btn {
    min-height: 44px !important;
    height: 44px;
    font-weight: 700 !important;
    font-size: 14px !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 0 !important;
    padding: 0 12px !important;
}

.tn-map-place__actions .tn-btn--primary,
.tn-map-place__actions .primary {
    background: var(--mpc) !important;
    border-color: var(--mpc) !important;
    color: #fff !important;
}

.tn-map-place__actions .tn-btn--outline,
.tn-map-place__actions .secondary {
    background: var(--tn-surface) !important;
    border: 1.5px solid var(--mpc) !important;
    color: var(--mpc) !important;
}

.tn-map-place__details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.tn-map-place__row {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 16px;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--tn-border-light) !important;
}

.tn-map-place__row:last-child { border-bottom: 0; }

.tn-map-place__row-ico {
    color: var(--tn-muted) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-map-place__row-text { min-width: 0; }

.tn-map-place__label {
    display: block;
    font-size: 11px;
    color: var(--tn-muted) !important;
    margin-bottom: 2px;
}

.tn-map-place__value {
    display: block;
    font-size: 13px;
    color: var(--tn-text) !important;
    line-height: 1.35;
    word-break: break-word;
}

.tn-map-place__value--link {
    color: var(--mpc);
    text-decoration: none;
    font-weight: 600;
}

.tn-map-place__value--link:hover { text-decoration: underline; }

.tn-map-place__chevron {
    color: var(--tn-muted) !important;
    display: inline-flex;
}

/* Desktop: floating card over map — fit content, no internal scroll */
@media (min-width: 960px) {
    .tn-map-page .tn-map {
        position: relative;
    }

    .tn-map-page .tn-map-sheet.bottom-sheet {
        position: absolute !important;
        left: 50% !important;
        right: auto !important;
        bottom: 20px !important;
        top: auto !important;
        width: min(760px, calc(100% - 40px)) !important;
        max-width: 760px !important;
        height: auto !important;
        max-height: none !important;
        margin: 0 !important;
        transform: translateX(-50%) translateY(24px) !important;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.22s ease, opacity 0.22s ease, visibility 0.22s ease;
        z-index: 30 !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        border: 1px solid var(--tn-border);
        background: var(--tn-surface) !important;
        color: var(--tn-text) !important;
    }

    .tn-map-page .tn-map-sheet.bottom-sheet.active {
        transform: translateX(-50%) translateY(0) !important;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .tn-map-page .tn-map__ctrl--filter { bottom: 88px; }
    .tn-map-page .tn-map__ctrl--locate { bottom: 36px; }

    .tn-map-sheet__handle,
    .tn-map-page .tn-map-sheet .sheet-handle {
        display: none !important;
    }

    .tn-map-page .tn-map-sheet .tn-map-place {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
        align-items: start;
        grid-template-columns: minmax(200px, 0.85fr) minmax(0, 1.15fr);
        gap: 10px 14px;
        padding: 12px 16px 14px;
    }

    .tn-map-page .tn-map-sheet .tn-map-place__main {
        aspect-ratio: 1 / 1;
        max-height: 220px;
    }

    .tn-map-page .tn-map-sheet .tn-map-place__thumbs {
        margin-top: 6px;
    }

    .tn-map-page .tn-map-sheet .tn-map-place__thumb {
        flex: 0 0 48px;
        width: 48px;
        height: 38px;
    }

    .tn-map-page .tn-map-sheet .tn-map-place__title {
        font-size: 20px;
    }

    .tn-map-page .tn-map-sheet .tn-map-place__row {
        padding: 8px 0;
    }

    .tn-map-place__intro { padding-right: 88px; }
}

@media (max-width: 959px) {
    html[data-site-shell="themanew"] .tn-map-page .tn-map-sheet.bottom-sheet,
    .tn-map-page .tn-map-sheet.bottom-sheet {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: min(78vh, 640px) !important;
        transform: translateY(110%) !important;
        border-radius: 0 !important;
        overflow: hidden !important;
        display: flex;
        flex-direction: column;
        /* Cover bottom nav (z-index below sheet); keep home-indicator inset only */
        padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)) !important;
        border: 0 !important;
        border-top: 1px solid var(--tn-border) !important;
        box-shadow: 0 -10px 40px rgba(15, 23, 42, 0.18);
        z-index: 15000 !important;
        background: var(--tn-surface) !important;
        color: var(--tn-text) !important;
    }

    html[data-site-shell="themanew"] .tn-map-page .tn-map-sheet.bottom-sheet.active,
    .tn-map-page .tn-map-sheet.bottom-sheet.active {
        transform: translateY(0) !important;
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
    }

    /* Keep bottom nav under the open place card */
    html[data-site-shell="themanew"] body:has(.tn-map-sheet.bottom-sheet.active) .tn-bottom-nav {
        z-index: 80 !important;
    }

    .tn-map-sheet__handle {
        display: block;
        flex-shrink: 0;
        background: var(--tn-border);
    }

    .tn-map-place {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
        -webkit-overflow-scrolling: touch;
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr) auto;
        grid-template-areas:
            "gallery intro tools"
            "offer offer offer"
            "actions actions actions"
            "details details details";
        gap: 12px 10px;
        padding: 8px 16px 16px;
        align-items: start;
    }

    .tn-map-place__gallery { grid-area: gallery; }

    .tn-map-place__main {
        width: 64px;
        height: 64px;
        aspect-ratio: 1;
        max-height: none;
    }

    .tn-map-place__thumbs { display: none !important; }
    .tn-map-place__nav { display: none !important; }

    .tn-map-place__counter {
        right: 3px;
        bottom: 3px;
        padding: 1px 5px;
        font-size: 9px;
    }

    .tn-map-place__intro {
        grid-area: intro;
        padding-right: 0;
        align-self: center;
        min-width: 0;
    }

    .tn-map-place__title {
        font-size: 18px;
        font-weight: 800;
        color: var(--tn-text);
    }

    .tn-map-place__category {
        margin-top: 2px;
        font-size: 12px;
        color: var(--tn-muted);
    }

    .tn-map-place__rating {
        margin-top: 4px;
        font-size: 12px;
        gap: 3px;
        color: var(--tn-text);
    }

    .tn-map-place__reviews { font-size: 12px; color: var(--tn-muted); }

    .tn-map-place__tools {
        grid-area: tools;
        margin-top: 0;
        justify-self: end;
        align-self: start;
        gap: 8px;
    }

    .tn-map-place__icon-btn {
        width: 36px;
        height: 36px;
        background: var(--tn-surface);
        border-color: var(--tn-border);
        color: var(--tn-muted);
    }

    .tn-map-place__icon-btn--like {
        color: var(--tn-primary) !important;
    }

    .tn-map-place__icon-btn--like.active,
    .tn-map-place__icon-btn--like.is-active {
        color: var(--tn-danger) !important;
    }

    .tn-map-place__offer {
        padding: 12px 14px;
        background: var(--tn-primary-soft);
    }

    .tn-map-place__offer-body strong {
        font-size: 13px;
        color: var(--tn-text);
    }
    .tn-map-place__offer-body span {
        font-size: 12px;
        color: var(--tn-muted);
    }
    .tn-map-place__offer-pct { font-size: 56px; right: 8px; }

    .tn-map-place__actions { gap: 10px; }

    .tn-map-place__actions .tn-btn,
    .tn-map-place__actions .establishment-action-btn {
        min-height: 44px !important;
        height: 44px;
        font-size: 14px !important;
    }

    .tn-map-place__row {
        padding: 12px 0;
        gap: 12px;
        border-bottom-color: var(--tn-border-light);
    }

    .tn-map-place__value { color: var(--tn-text); }
    .tn-map-place__label { color: var(--tn-muted); }
}

[data-theme="dark"] .tn-map-sheet {
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] .tn-map-place__actions .tn-btn--outline,
[data-theme="dark"] .tn-map-place__actions .secondary {
    background: var(--tn-surface) !important;
    color: var(--tn-primary) !important;
}

[data-theme="dark"] .tn-map-place__counter {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .tn-map-place__icon-btn {
    background: var(--tn-surface-2) !important;
}

[data-theme="dark"] .tn-map-page .tn-map__loader {
    background: rgba(18, 18, 18, 0.72);
}

.tn-rate .auth-card,
.tn-rate .rating-star-btn {
    border-radius: 0;
}

.tn-rate .auth-card {
    border: 1px solid var(--tn-border);
    max-width: 420px;
    margin: 24px auto;
    padding: 24px 20px;
}

/* ── Staff personal stats (screenshot layout) ── */
.tn-simple-page:has(.tn-sperson) .tn-breadcrumbs {
    display: none;
}

.tn-sperson {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 28px;
}

.tn-sperson__title {
    margin: 0;
    font-size: clamp(22px, 2.8vw, 28px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-sperson__subtitle {
    margin: 0 0 4px;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-sperson-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.tn-sperson-metric {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 10px 12px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-sperson-metric__icon {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-sperson-metric__icon--blue { background: #e7f5ff; color: #339af0; }
.tn-sperson-metric__icon--green { background: #ebfbee; color: #40c057; }
.tn-sperson-metric__icon--pink { background: #fff0f6; color: #e64980; }
.tn-sperson-metric__icon--violet { background: #eef0ff; color: #5B67F5; }

.tn-sperson-metric__label {
    font-size: 11px;
    color: var(--tn-muted);
    margin-bottom: 2px;
}

.tn-sperson-metric__value {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-sperson-metric__value--sm { font-size: 16px; }

.tn-sperson-metric__star {
    color: #fab005;
    font-size: 14px;
    margin-left: 2px;
}

.tn-sperson-metric__hint {
    margin-top: 2px;
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-sperson-card {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 12px 14px;
}

.tn-sperson-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.tn-sperson-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 800;
}

.tn-sperson-card__btn {
    margin-top: 10px;
    border-radius: 0;
    min-height: 36px;
    color: var(--tn-primary);
    border-color: var(--tn-primary);
}

.tn-sperson-periods {
    display: grid;
    gap: 0;
    border: 1px solid var(--tn-border-light);
}

.tn-sperson-periods__row {
    display: grid;
    grid-template-columns: minmax(100px, 1.2fr) repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--tn-border-light);
    font-size: 13px;
}

.tn-sperson-periods__row:last-child { border-bottom: 0; }

.tn-sperson-periods__row--head {
    background: var(--tn-surface-2, #f8f9fa);
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-sperson-periods__row span[role="rowheader"] {
    color: var(--tn-muted);
    font-size: 12px;
}

.tn-sperson-periods__row strong {
    font-weight: 800;
    font-size: 13px;
}

.tn-sperson-cols {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.9fr);
    gap: 10px;
    align-items: start;
}

.tn-sperson-side {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tn-sperson-empty {
    margin: 0;
    padding: 10px 0;
    color: var(--tn-muted);
    font-size: 13px;
}

.tn-sperson-ops {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0;
}

.tn-sperson-ops__item {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-sperson-ops__item:last-child { border-bottom: 0; }
.tn-sperson-ops__item[hidden] { display: none !important; }

.tn-sperson-ops__ico {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-sperson-ops__ico.is-sale { background: #e7f5ff; color: #339af0; }
.tn-sperson-ops__ico.is-rating { background: #ebfbee; color: #40c057; }

.tn-sperson-ops__body {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.tn-sperson-ops__body strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-sperson-ops__body span {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-sperson-ops__right {
    text-align: right;
    display: grid;
    gap: 1px;
}

.tn-sperson-ops__right strong {
    font-size: 13px;
    font-weight: 800;
}

.tn-sperson-ops__rating {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-sperson-ops__rating em {
    font-style: normal;
    color: #fab005;
}

.tn-sperson-top {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.tn-sperson-top li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.tn-sperson-top__rank {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-surface-2, #f1f3f5);
    font-size: 11px;
    font-weight: 800;
}

.tn-sperson-top__body {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.tn-sperson-top__body strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-sperson-top__body span {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-sperson-top__sum {
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.tn-sperson-ratings {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.tn-sperson-ratings li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tn-sperson-ratings li[hidden] { display: none !important; }

.tn-sperson-ratings li > div {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.tn-sperson-ratings strong {
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-sperson-ratings span {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-sperson-ratings__stars {
    color: #fab005;
    letter-spacing: 1px;
    font-size: 13px;
    flex-shrink: 0;
}

.tn-sperson-scanner,
.tn-sperson-scanner:link,
.tn-sperson-scanner:visited,
.tn-sperson-scanner:hover,
.tn-sperson-scanner:active,
.tn-sperson-scanner:focus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    width: 100%;
    background: var(--tn-primary);
    color: #fff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 800;
    border: 1px solid var(--tn-primary);
    box-shadow: 0 8px 18px rgba(91, 103, 245, 0.22);
}

.tn-sperson-scanner:hover { filter: brightness(1.05); }
.tn-sperson-scanner .tn-icon { color: #fff !important; }

@media (max-width: 1100px) {
    .tn-sperson-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tn-sperson-cols { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
    .tn-sperson-metrics { grid-template-columns: 1fr; }
    .tn-sperson-periods__row {
        grid-template-columns: 80px repeat(3, minmax(0, 1fr));
        padding: 8px;
        font-size: 12px;
        gap: 4px;
    }
    .tn-sperson-periods__row strong { font-size: 11px; }
}

/* ── Partner cabinet ── */
.tn-partner > .admin-header .admin-title,
.tn-partner > .contest-header .admin-title,
.tn-partner > .page-header h3 {
    display: none;
}

.tn-partner .dashboard-card,
.tn-partner .admin-header,
.tn-partner .partner-stat-card,
.tn-partner .transaction-card,
.tn-partner .catalog-item-card,
.tn-partner .offer-card,
.tn-partner .contest-card,
.tn-partner .vacancy-card,
.tn-partner .staff-card {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border-light);
}

.tn-partner .btn-primary,
.tn-partner .btn-secondary,
.tn-partner .form-input,
.tn-partner .estab-select,
.tn-partner .filter-btn,
.tn-partner .filter-btn-icon,
.tn-partner .scan-btn,
.tn-partner .more-btn {
    border-radius: 0 !important;
}

.tn-partner .partner-menu-grid a,
.tn-partner .scanner-card {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border-light);
}

/* Partner dashboard — full themanew look */
.tn-partner-dash {
    display: grid;
    gap: 14px;
}

.tn-partner-dash .tn-panel-head {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 12px 14px;
}

.tn-partner-dash .tn-panel-head__est {
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-partner-dash__filters {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 10px 12px;
}

.tn-partner-dash .tn-chip,
.tn-partner-dash .filter-btn,
.tn-partner-dash .filter-btn-icon {
    border-radius: 0 !important;
    height: 36px;
    background: var(--tn-surface) !important;
    border: 1px solid var(--tn-border) !important;
    color: var(--tn-text) !important;
    box-shadow: none !important;
}

.tn-partner-dash .tn-chip.active,
.tn-partner-dash .tn-chip.is-active,
.tn-partner-dash .filter-btn.active,
.tn-partner-dash .filter-btn-icon.active {
    background: var(--tn-primary) !important;
    border-color: var(--tn-primary) !important;
    color: #fff !important;
}

.tn-partner-dash .tn-stat-grid {
    margin-bottom: 0;
}

.tn-partner-dash .tn-stat {
    border-radius: 0 !important;
    background: var(--tn-surface) !important;
    border: 1px solid var(--tn-border) !important;
    color: var(--tn-text) !important;
    box-shadow: none !important;
}

.tn-partner-dash .tn-stat--accent {
    background: var(--tn-primary) !important;
    border-color: var(--tn-primary) !important;
    color: #fff !important;
}

.tn-partner-dash .tn-stat--accent .tn-stat__label,
.tn-partner-dash .tn-stat--accent .tn-stat__meta {
    color: rgba(255, 255, 255, 0.78) !important;
}

.tn-partner-dash .tn-stat--accent .tn-stat__value {
    color: #fff !important;
}

.tn-partner-dash .tn-stat__meta--ok {
    color: var(--tn-success) !important;
    font-weight: 700;
}

.tn-partner-dash .tn-scan-btn,
.tn-partner-dash .scan-btn {
    width: 100%;
    min-height: 72px !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    border: 1px solid var(--tn-primary) !important;
    background: var(--tn-primary) !important;
    color: #fff !important;
    box-shadow: none !important;
    font-size: 16px;
    font-weight: 800;
}

.tn-partner-dash .tn-scan-btn:hover,
.tn-partner-dash .scan-btn:hover {
    filter: brightness(1.04);
}

.tn-partner-dash__empty,
.tn-partner-dash .no-visits {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    padding: 28px 16px;
    text-align: center;
    color: var(--tn-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 !important;
}

.tn-partner-dash .tn-section {
    margin: 0;
}

.tn-partner-dash .tn-row {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tn-partner-dash .tn-row__thumb {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}

.tn-partner-dash .tn-row__body {
    flex: 1;
    min-width: 0;
}

.tn-partner-dash .tn-row__title {
    display: block;
    font-size: 14px;
}

.tn-partner-dash .tn-row__meta {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    margin-top: 2px;
}

.tn-partner-dash .tn-row__aside {
    text-align: right;
    flex-shrink: 0;
}

.tn-partner-dash .tn-row__aside strong {
    display: block;
    font-size: 14px;
}

.tn-partner-dash .tn-row__saved {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-success);
}

.tn-partner-dash .tn-date-popup,
.tn-partner-dash .date-popup {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

html[data-site-shell="themanew"] #date-popup.date-popup,
html[data-site-shell="themanew"] #date-popup.tn-date-popup {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

html[data-site-shell="themanew"] #date-popup .date-popup-input,
html[data-site-shell="themanew"] #date-popup .tn-field__input,
html[data-site-shell="themanew"] #date-popup .date-popup-apply,
html[data-site-shell="themanew"] #date-popup .tn-btn {
    border-radius: 0 !important;
}

.tn-partner-dash .tn-field--inline {
    display: grid;
    gap: 4px;
}

.tn-partner-dash .tn-select {
    min-width: 220px;
}

/* ── Partner catalog (1:1 screenshot) ── */
.tn-pcat {
    --pcat-radius: 0;
    --pcat-border: #e6e9f0;
    --pcat-muted: #8b93a7;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0 32px;
}

.tn-pcat__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.tn-pcat__title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #1a1c2e;
    line-height: 1.15;
}

.tn-pcat__subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--pcat-muted);
    max-width: 520px;
}

.tn-pcat__add {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border: none;
    border-radius: var(--pcat-radius);
    background: #5B67F5;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(91, 103, 245, 0.25);
}

.tn-pcat__add:hover { filter: brightness(1.05); }

.tn-pcat__est {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tn-pcat__label {
    font-size: 13px;
    font-weight: 600;
    color: #3c4257;
}

.tn-pcat__select {
    height: 44px;
    border: 1px solid var(--pcat-border);
    border-radius: var(--pcat-radius);
    background: #fff;
    color: #1a1c2e;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 0 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.tn-pcat__select--block {
    width: 100%;
    max-width: none;
}

.tn-pcat__select--static {
    display: flex;
    align-items: center;
    background-image: none;
    padding-right: 14px;
    font-weight: 600;
}

.tn-pcat__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px 160px auto;
    gap: 12px;
    align-items: center;
}

.tn-pcat__search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--pcat-border);
    border-radius: var(--pcat-radius);
    background: #fff;
}

.tn-pcat__search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #1a1c2e;
    min-width: 0;
}

.tn-pcat__search input::placeholder { color: #a0a7b8; }

.tn-pcat__export {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #5B67F5;
    border-radius: var(--pcat-radius);
    background: #fff;
    color: #5B67F5;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.tn-pcat__export:hover { background: #eef0ff; }

.tn-pcat__panel {
    border: 1px solid var(--pcat-border);
    border-radius: 0;
    background: #fff;
    overflow: auto;
}

.tn-pcat__table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 980px;
}

/* Override client.css .catalog-mgmt-card { display:flex } — it breaks <tr> columns */
.tn-pcat__table .catalog-mgmt-card.tn-pcat__row,
.tn-pcat__table tr.tn-pcat__row {
    display: table-row;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.tn-pcat__table .tn-pcat__row > td {
    display: table-cell;
}

.tn-pcat__table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pcat-muted);
    background: #f7f8fb;
    border-bottom: 1px solid var(--pcat-border);
    white-space: nowrap;
}

.tn-pcat__th-name,
.tn-pcat__td-name { width: 26%; }
.tn-pcat__table th:nth-child(2),
.tn-pcat__td-cat { width: 12%; }
.tn-pcat__table th:nth-child(3),
.tn-pcat__td-price { width: 14%; }
.tn-pcat__table th:nth-child(4) { width: 10%; }
.tn-pcat__table th:nth-child(5),
.tn-pcat__td-vis { width: 14%; }
.tn-pcat__th-sort,
.tn-pcat__td-sort { width: 90px; text-align: center !important; }
.tn-pcat__th-actions,
.tn-pcat__td-actions { width: 180px; }

.tn-pcat__table td {
    padding: 14px 16px;
    font-size: 14px;
    color: #1a1c2e;
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}

.tn-pcat__row:last-child td { border-bottom: 0; }
.tn-pcat__row.is-inactive { opacity: 0.55; }
.tn-pcat__row.dragging { background: #f4f6ff; }

.tn-pcat__item {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    background: transparent;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: inherit;
    max-width: 100%;
    width: 100%;
    min-width: 0;
}

.tn-pcat__thumb {
    width: 40px;
    height: 40px;
    border-radius: 0;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.tn-pcat__item-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-pcat__item-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #1a1c2e;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-pcat__item-text em {
    font-style: normal;
    font-size: 12px;
    color: var(--pcat-muted);
}

.tn-pcat__td-cat,
.tn-pcat__td-vis {
    color: #3c4257;
    white-space: nowrap;
}

.tn-pcat__td-price {
    font-weight: 600;
    white-space: nowrap;
}

.tn-pcat__status {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 10px;
    border-radius: 0;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tn-pcat__status.is-on {
    background: #ebfbee;
    color: #2f9e44;
}

.tn-pcat__status.is-off {
    background: #f1f3f5;
    color: #868e96;
}

.tn-pcat__td-sort {
    text-align: center;
}

.tn-pcat__sort-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    border: 1px solid var(--pcat-border);
    border-radius: 0;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    color: #3c4257;
}

.tn-pcat__actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2px;
}

.tn-pcat__icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #9aa3b5;
    cursor: pointer;
}

.tn-pcat__icon:hover {
    background: #f4f6fb;
    color: #5B67F5;
}

.tn-pcat__icon--danger:hover {
    background: #fff5f5;
    color: #fa5252;
}

.catalog-drag-handle { cursor: grab; }

.tn-pcat__pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tn-pcat__count {
    font-size: 13px;
    color: var(--pcat-muted);
    font-weight: 600;
    min-width: 180px;
}

.tn-pcat__pages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
}

.tn-pcat__page-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--pcat-border);
    border-radius: 0;
    background: #fff;
    color: #3c4257;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.tn-pcat__page-btn.is-active {
    background: #5B67F5;
    border-color: #5B67F5;
    color: #fff;
}

.tn-pcat__page-btn:disabled {
    opacity: 0.4;
    cursor: default;
}

.tn-pcat__page-gap {
    color: var(--pcat-muted);
    padding: 0 2px;
}

.tn-pcat__perpage {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--pcat-muted);
    font-weight: 600;
    white-space: nowrap;
}

.tn-pcat__perpage select {
    height: 36px;
    border: 1px solid var(--pcat-border);
    border-radius: 0;
    background: #fff;
    color: #1a1c2e;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 0 28px 0 10px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.tn-pcat__empty {
    border: 1px solid var(--pcat-border);
    border-radius: 0;
    background: #fff;
    padding: 56px 24px;
    text-align: center;
}

.tn-pcat__empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #1a1c2e;
}

.tn-pcat__empty p {
    margin: 0 0 18px;
    color: var(--pcat-muted);
}

@media (max-width: 960px) {
    .tn-pcat__bar {
        grid-template-columns: 1fr 1fr;
    }
    .tn-pcat__search { grid-column: 1 / -1; }
    .tn-pcat__export { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
    .tn-pcat__top { flex-direction: column; }
    .tn-pcat__add { width: 100%; }
    .tn-pcat__bar { grid-template-columns: 1fr; }
    .tn-pcat__pager { justify-content: center; text-align: center; }
    .tn-pcat__count { min-width: 0; width: 100%; }
}

/* Partner catalog create / edit form */
.tn-pcatform {
    --pcaf-border: #e6e9f0;
    --pcaf-muted: #8b93a7;
    --pcaf-text: #1a1c2e;
    width: 100%;
    margin: 0;
    padding: 8px 0 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tn-pcatform__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    color: #5B67F5;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.tn-pcatform__back:hover { text-decoration: underline; }

.tn-pcatform__head { display: grid; gap: 8px; }

.tn-pcatform__title {
    margin: 0;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pcaf-text);
    line-height: 1.15;
}

.tn-pcatform__subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--pcaf-muted);
    max-width: 560px;
}

.tn-pcatform__card {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 24px;
    border: 1px solid var(--pcaf-border);
    border-radius: 0;
    background: #fff;
}

.tn-pcatform__row {
    display: grid;
    gap: 16px;
}

.tn-pcatform__row--2 {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.tn-pcatform__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    min-width: 0;
}

.tn-pcatform__label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.tn-pcatform__label {
    font-size: 13px;
    font-weight: 700;
    color: #3c4257;
}

.tn-pcatform__hint-inline {
    font-size: 12px;
    font-weight: 600;
    color: var(--pcaf-muted);
    white-space: nowrap;
}

.tn-pcatform__input,
.tn-pcatform select.tn-pcatform__input,
.tn-pcatform textarea.tn-pcatform__input {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1px solid var(--pcaf-border);
    border-radius: 0 !important;
    background: #fff;
    color: var(--pcaf-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.tn-pcatform select.tn-pcatform__input {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

.tn-pcatform__textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
}

.tn-pcatform__input:focus {
    border-color: #5B67F5;
    box-shadow: 0 0 0 3px rgba(91, 103, 245, 0.12);
}

.tn-pcatform__control {
    position: relative;
}

.tn-pcatform__control .tn-pcatform__input {
    padding-bottom: 28px;
}

.tn-pcatform__counter {
    position: absolute;
    right: 12px;
    bottom: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #a0a7b8;
    pointer-events: none;
}

.tn-pcatform__affix {
    position: relative;
}

.tn-pcatform__affix .tn-pcatform__input {
    padding-right: 36px;
}

.tn-pcatform__affix-text {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--pcaf-muted);
    font-weight: 700;
    font-size: 14px;
    pointer-events: none;
}

.tn-pcatform__toggle-block {
    display: grid;
    gap: 6px;
}

.tn-pcatform__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--pcaf-text);
    cursor: pointer;
}

.tn-pcatform__toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #5B67F5;
    border-radius: 0;
}

.tn-pcatform__help {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--pcaf-muted);
    line-height: 1.4;
}

.tn-pcatform__photos {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.tn-pcatform__add-photo,
.tn-pcatform .offer-image-add {
    aspect-ratio: 1;
    border: 1px dashed #c5cad6;
    border-radius: 0 !important;
    background: #fafbfe;
    color: #5B67F5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px;
    font: inherit;
}

.tn-pcatform__add-plus {
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    color: #5B67F5;
}

.tn-pcatform__add-text {
    font-size: 11px;
    font-weight: 600;
    color: var(--pcaf-muted);
    text-align: center;
    line-height: 1.3;
}

.tn-pcatform__photo,
.tn-pcatform .offer-image-preview {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--pcaf-border);
    border-radius: 0 !important;
    overflow: hidden;
    background: #f4f6fb;
}

.tn-pcatform .offer-image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-pcatform .offer-image-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 0;
    background: rgba(26, 28, 46, 0.72);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tn-pcatform__photo-count {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--pcaf-muted);
}

.tn-pcatform__submit {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 0;
    background: #5B67F5;
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

.tn-pcatform__submit:hover { filter: brightness(1.05); }

.tn-pcatform__danger {
    width: 100%;
    height: 44px;
    border: 1px solid #fa5252;
    border-radius: 0;
    background: #fff;
    color: #fa5252;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.tn-pcatform .input-group.has-error .tn-pcatform__input {
    border-color: #fa5252;
}

.tn-pcatform .field-error {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #fa5252;
}

@media (max-width: 720px) {
    .tn-pcatform__row--2 { grid-template-columns: 1fr; }
    .tn-pcatform__card { padding: 16px; }
    .tn-pcatform__photos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tn-pcatform__title { font-size: 24px; }
}

/* Partner contests / giveaways list */
.tn-pcontests {
    --pcn-border: #e6e9f0;
    --pcn-muted: #8b93a7;
    --pcn-text: #1a1c2e;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 8px 0 32px;
    width: 100%;
}

.tn-pcontests__back {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    color: #5B67F5;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.tn-pcontests__back:hover { text-decoration: underline; }

.tn-pcontests__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.tn-pcontests__title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pcn-text);
    line-height: 1.15;
}

.tn-pcontests__subtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--pcn-muted);
}

.tn-pcontests__add {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 18px;
    border: 0;
    border-radius: 0;
    background: #5B67F5;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.tn-pcontests__add:hover { filter: brightness(1.05); }

.tn-pcontests__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    border-bottom: 1px solid var(--pcn-border);
}

.tn-pcontests__tab {
    position: relative;
    border: 0;
    background: transparent;
    padding: 12px 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--pcn-muted);
    cursor: pointer;
}

.tn-pcontests__tab.is-active {
    color: #5B67F5;
}

.tn-pcontests__tab.is-active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: #5B67F5;
}

.tn-pcontests__bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 12px;
    align-items: center;
}

.tn-pcontests__search {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
}

.tn-pcontests__search input {
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: var(--pcn-text);
    min-width: 0;
}

.tn-pcontests__search input::placeholder { color: #a0a7b8; }

.tn-pcontests__sort {
    height: 44px;
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
    color: var(--pcn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 0 40px 0 14px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
}

.tn-pcontests__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-pcontests__card {
    display: grid;
    grid-template-columns: 88px minmax(0, 1.4fr) minmax(180px, 0.8fr) auto;
    gap: 18px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
}

.tn-pcontests__card[hidden],
.tn-pcontests__card.is-hidden,
.tn-pcontests__empty[hidden] {
    display: none !important;
}

.tn-pcontests__thumb {
    width: 88px;
    height: 88px;
    border-radius: 0;
    overflow: hidden;
    background: #f4f6fb;
    border: 1px solid var(--pcn-border);
    flex-shrink: 0;
}

.tn-pcontests__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-pcontests__main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tn-pcontests__name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--pcn-text);
    line-height: 1.25;
}

.tn-pcontests__est {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--pcn-muted);
}

.tn-pcontests__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.tn-pcontests__dates {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pcn-muted);
}

.tn-pcontests__badge {
    display: inline-flex;
    align-items: center;
    height: 24px;
    padding: 0 8px;
    border-radius: 0;
    font-size: 11px;
    font-weight: 700;
}

.tn-pcontests__badge.is-active {
    background: #ebfbee;
    color: #2f9e44;
}

.tn-pcontests__badge.is-done {
    background: #f1f3f5;
    color: #868e96;
}

.tn-pcontests__badge.is-draft {
    background: #eef0ff;
    color: #5B67F5;
}

.tn-pcontests__badge.is-cancel {
    background: #fff5f5;
    color: #fa5252;
}

.tn-pcontests__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 20px;
    font-size: 13px;
    color: #3c4257;
    font-weight: 600;
}

.tn-pcontests__stats strong {
    font-weight: 800;
    color: var(--pcn-text);
}

.tn-pcontests__prize {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tn-pcontests__prize-label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    height: 22px;
    padding: 0 8px;
    border-radius: 0;
    background: #eef0ff;
    color: #5B67F5;
    font-size: 11px;
    font-weight: 700;
}

.tn-pcontests__prize-text {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #3c4257;
    line-height: 1.4;
}

.tn-pcontests__actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-self: end;
}

.tn-pcontests__icon {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
    color: #9aa3b5;
    cursor: pointer;
    padding: 0;
}

.tn-pcontests__icon:hover {
    background: #f4f6fb;
    color: #5B67F5;
}

.tn-pcontests__more {
    position: relative;
}

.tn-pcontests__menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 20;
    min-width: 200px;
    padding: 6px;
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
    box-shadow: 0 12px 28px rgba(26, 28, 46, 0.12);
}

.tn-pcontests__menu button {
    width: 100%;
    display: block;
    border: 0;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--pcn-text);
    cursor: pointer;
}

.tn-pcontests__menu button:hover { background: #f4f6fb; }
.tn-pcontests__menu button.is-danger { color: #fa5252; }
.tn-pcontests__menu button.is-danger:hover { background: #fff5f5; }

.tn-pcontests__empty {
    border: 1px solid var(--pcn-border);
    border-radius: 0;
    background: #fff;
    padding: 48px 24px;
    text-align: center;
}

.tn-pcontests__empty h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: var(--pcn-text);
}

.tn-pcontests__empty p {
    margin: 0 0 18px;
    color: var(--pcn-muted);
}

@media (max-width: 960px) {
    .tn-pcontests__card {
        grid-template-columns: 72px minmax(0, 1fr);
        grid-template-areas:
            "thumb main"
            "prize prize"
            "actions actions";
    }
    .tn-pcontests__thumb { grid-area: thumb; width: 72px; height: 72px; }
    .tn-pcontests__main { grid-area: main; }
    .tn-pcontests__prize { grid-area: prize; }
    .tn-pcontests__actions { grid-area: actions; justify-self: start; }
    .tn-pcontests__bar { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .tn-pcontests__top { flex-direction: column; }
    .tn-pcontests__add { width: 100%; }
    .tn-pcontests__tabs { gap: 4px 14px; }
}

/* Partner contest participants */
.tn-pparts__intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.tn-pparts__intro-main {
    min-width: 0;
    flex: 1;
}

.tn-pparts__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-top: 12px;
}

.tn-pparts__stat {
    font-size: 13px;
    font-weight: 600;
    color: #3c4257;
}

.tn-pparts__stat strong {
    font-weight: 800;
    color: var(--pcn-text, #1a1c2e);
}

.tn-pparts__edit {
    box-shadow: none;
    background: #fff;
    color: #5B67F5;
    border: 1px solid #5B67F5;
}

.tn-pparts__edit:hover {
    filter: none;
    background: #eef0ff;
}

.tn-pparts__section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-pparts__section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tn-pparts__section-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--pcn-text, #1a1c2e);
}

.tn-pparts__search {
    min-width: min(360px, 100%);
}

.tn-pparts__board {
    border: 1px solid var(--pcn-border, #e6e9f0);
    border-radius: 0;
    background: #fff;
}

.tn-pparts__board-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-bottom: 1px solid #eef0f4;
}

.tn-pparts__board-row:last-child { border-bottom: 0; }

.tn-pparts__rank {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pcn-border, #e6e9f0);
    border-radius: 0;
    font-size: 13px;
    font-weight: 800;
    color: #3c4257;
    flex-shrink: 0;
}

.tn-pparts__board-body {
    flex: 1;
    min-width: 0;
    font-size: 14px;
    color: var(--pcn-text, #1a1c2e);
}

.tn-pparts__board-aside {
    text-align: right;
    flex-shrink: 0;
}

.tn-pparts__board-count {
    display: block;
    font-size: 16px;
    font-weight: 800;
    color: #5B67F5;
}

.tn-pparts__board-tickets {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--pcn-muted, #8b93a7);
}

.tn-pparts__panel {
    border: 1px solid var(--pcn-border, #e6e9f0);
    border-radius: 0;
    background: #fff;
    overflow: auto;
}

.tn-pparts__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
    table-layout: fixed;
}

.tn-pparts__table thead th {
    text-align: left;
    padding: 14px 16px;
    font-size: 12px;
    font-weight: 700;
    color: var(--pcn-muted, #8b93a7);
    background: #f7f8fb;
    border-bottom: 1px solid var(--pcn-border, #e6e9f0);
    white-space: nowrap;
}

.tn-pparts__table th:nth-child(1) { width: 42%; }
.tn-pparts__table th:nth-child(2) { width: 28%; }
.tn-pparts__table th:nth-child(3) { width: 30%; }

.tn-pparts__table td {
    padding: 14px 16px;
    font-size: 14px;
    color: var(--pcn-text, #1a1c2e);
    border-bottom: 1px solid #eef0f4;
    vertical-align: middle;
}

.tn-pparts__row:last-child td { border-bottom: 0; }

.tn-pparts__row[hidden],
.tn-pparts__row.is-hidden {
    display: none !important;
}

.tn-pparts__user {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.tn-pparts__avatar {
    width: 40px;
    height: 40px;
    border-radius: 0;
    overflow: hidden;
    background: #f4f6fb;
    border: 1px solid var(--pcn-border, #e6e9f0);
    flex-shrink: 0;
}

.tn-pparts__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-pparts__user-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-pparts__user-text strong {
    font-size: 14px;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-pparts__user-text em {
    font-style: normal;
    font-size: 12px;
    font-weight: 600;
    color: var(--pcn-muted, #8b93a7);
}

.tn-pparts__code {
    display: block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    color: #5B67F5;
    background: #eef0ff;
    padding: 4px 8px;
    width: fit-content;
    border-radius: 0;
}

.tn-pparts__num {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pcn-muted, #8b93a7);
}

.tn-pparts__date {
    font-size: 13px;
    font-weight: 600;
    color: #3c4257;
    white-space: nowrap;
}

@media (max-width: 720px) {
    .tn-pparts__section-head { flex-direction: column; align-items: stretch; }
    .tn-pparts__search { min-width: 0; width: 100%; }
}

/* Partner contest create / edit form */
.tn-pceform__type { display: none; }
.tn-pceform__type.is-active { display: block; }

.tn-pceform__preview {
    width: 120px;
    height: 120px;
    border: 1px solid var(--pcaf-border, #e6e9f0);
    border-radius: 0;
    overflow: hidden;
    background: #f4f6fb;
}

.tn-pceform__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-pceform__file {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.tn-pceform__file input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.tn-pceform__file-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #5B67F5;
    border-radius: 0;
    background: #fff;
    color: #5B67F5;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.tn-pceform__file:hover .tn-pceform__file-btn {
    background: #eef0ff;
}

.tn-pceform__file-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--pcaf-muted, #8b93a7);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ── Partner dashboard (screenshot 1:1) ── */
.tn-pdash {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 28px;
}

.tn-pdash__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.tn-pdash__title {
    margin: 0 0 6px;
    font-size: clamp(24px, 3vw, 30px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-pdash__subtitle {
    margin: 0;
    font-size: 14px;
    color: var(--tn-muted);
    max-width: 520px;
}

.tn-pdash__head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
}

.tn-pdash__est-select,
.tn-pdash__est-name {
    min-height: 42px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    padding: 0 12px;
}

.tn-pdash__est-name {
    display: inline-flex;
    align-items: center;
    max-width: 220px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-pdash__date-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    border-radius: 0;
    cursor: pointer;
}

.tn-pdash__date-btn:hover,
.tn-pdash__date-btn.active {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-pdash__more {
    width: 42px;
    height: 42px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: var(--tn-text);
}

.tn-pdash .tn-dropdown {
    right: 0;
    top: calc(100% + 6px);
}

.tn-pdash__quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
}

.tn-pdash__quick-btn {
    min-height: 34px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    border-radius: 0;
    cursor: pointer;
}

.tn-pdash__quick-btn.active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-pdash__empty-state {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 40px 20px;
    text-align: center;
}

.tn-pdash__empty-state h3 {
    margin: 0 0 8px;
    font-size: 18px;
}

.tn-pdash__empty-state p {
    margin: 0 0 16px;
    color: var(--tn-muted);
}

.tn-pdash__metrics {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.tn-pdash-metric {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 118px;
}

.tn-pdash-metric__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.tn-pdash-metric__label {
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-muted);
}

.tn-pdash-metric__icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tn-pdash-metric__icon--violet { background: #eef0ff; color: #5B67F5; }
.tn-pdash-metric__icon--green { background: #ebfbee; color: #40C057; }
.tn-pdash-metric__icon--blue { background: #e7f5ff; color: #339AF0; }
.tn-pdash-metric__icon--yellow { background: #fff9db; color: #FAB005; }
.tn-pdash-metric__icon--pink { background: #fff0f6; color: #E64980; }

.tn-pdash-metric__value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
    color: var(--tn-text);
}

.tn-pdash-metric__change {
    font-size: 12px;
    font-weight: 600;
}

.tn-pdash-metric__change.is-up,
.tn-pdash-top__change.is-up { color: #40C057; }

.tn-pdash-metric__change.is-down,
.tn-pdash-top__change.is-down { color: #FA5252; }

.tn-pdash__mid {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.9fr) minmax(0, 0.9fr);
    gap: 12px;
    align-items: stretch;
}

.tn-pdash__bottom {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tn-pdash-card {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 16px 18px;
    min-height: 100%;
}

.tn-pdash-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.tn-pdash-card__title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-pdash-card__hint {
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-muted);
    border: 1px solid var(--tn-border);
    padding: 6px 10px;
}

.tn-pdash-card__link {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-primary);
    text-decoration: none;
}

.tn-pdash-card__link:hover { text-decoration: underline; }

.tn-pdash__muted {
    padding: 24px 8px;
    text-align: center;
    color: var(--tn-muted);
    font-size: 13px;
    font-weight: 600;
}

.tn-pdash-chart__svg {
    width: 100%;
    height: 220px;
    display: block;
}

.tn-pdash-chart__legend {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--tn-muted);
    font-weight: 600;
}

.tn-pdash-chart__dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 6px;
    vertical-align: -1px;
}

.tn-pdash-chart__dot--cur { background: #5B67F5; }
.tn-pdash-chart__dot--prev {
    background: transparent;
    border: 2px dashed #cfd4de;
    box-sizing: border-box;
}

.tn-pdash-donut {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 8px auto 16px;
}

.tn-pdash-donut__svg {
    width: 100%;
    height: 100%;
}

.tn-pdash-donut__center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.tn-pdash-donut__center strong {
    font-size: 22px;
    font-weight: 800;
    color: var(--tn-text);
    line-height: 1;
}

.tn-pdash-donut__center span {
    font-size: 12px;
    color: var(--tn-muted);
    margin-top: 4px;
}

.tn-pdash-donut__legend {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tn-pdash-donut__legend li {
    display: grid;
    grid-template-columns: 10px 1fr auto;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}

.tn-pdash-donut__swatch {
    width: 10px;
    height: 10px;
}

.tn-pdash-donut__name { color: var(--tn-muted); }
.tn-pdash-donut__legend strong { color: var(--tn-text); font-weight: 700; }

.tn-pdash-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tn-pdash-events__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tn-pdash-events__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-pdash-events__icon.is-gift { background: #fff0f6; color: #e64980; }
.tn-pdash-events__icon.is-doc { background: #e7f5ff; color: #339af0; }
.tn-pdash-events__icon.is-promo { background: #fff9db; color: #f59f00; }

.tn-pdash-events__body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-pdash-events__body p {
    margin: 4px 0;
    font-size: 12px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-pdash-events__body time {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-pdash-top {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-pdash-top__item {
    display: grid;
    grid-template-columns: 24px 40px 1fr auto;
    gap: 12px;
    align-items: center;
}

.tn-pdash-top__rank {
    font-size: 14px;
    font-weight: 800;
    color: var(--tn-muted);
    text-align: center;
}

.tn-pdash-top__thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border: 1px solid var(--tn-border-light);
}

.tn-pdash-top__thumb--ph {
    display: block;
    background: var(--tn-bg);
}

.tn-pdash-top__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-pdash-top__body strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tn-pdash-top__body span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-pdash-top__change {
    font-size: 13px;
    font-weight: 700;
}

.tn-pdash-reviews {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tn-pdash-reviews__item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tn-pdash-reviews__avatar {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
}

.tn-pdash-reviews__body {
    flex: 1;
    min-width: 0;
}

.tn-pdash-reviews__row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tn-pdash-reviews__row strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-pdash-reviews__stars {
    color: #FAB005;
    font-size: 12px;
    letter-spacing: 1px;
}

.tn-pdash-reviews__row time {
    margin-left: auto;
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-pdash-reviews__body p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.4;
}

@media (max-width: 1100px) {
    .tn-pdash__metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .tn-pdash__mid {
        grid-template-columns: 1fr 1fr;
    }

    .tn-pdash-card--chart {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .tn-pdash__metrics {
        grid-template-columns: 1fr 1fr;
    }

    .tn-pdash__mid,
    .tn-pdash__bottom {
        grid-template-columns: 1fr;
    }

    .tn-pdash-card--chart {
        grid-column: auto;
    }

    .tn-pdash__head-actions {
        width: 100%;
    }

    .tn-pdash__date-btn {
        flex: 1;
        justify-content: space-between;
    }
}

@media (max-width: 480px) {
    .tn-pdash__metrics {
        grid-template-columns: 1fr;
    }
}


/* ── Admin panel ── */
.tn-admin {
    /* Windows: leave default ClearType; antialiased makes Arial/Cyrillic look jagged */
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
    text-rendering: auto;
    font-family: system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Utility classes from client.css (font-800/900) faux-bold on fonts without those faces */
html[data-site-shell="themanew"] .tn-admin .admin-title,
html[data-site-shell="themanew"] .tn-admin .tn-panel-head__title,
html[data-site-shell="themanew"] .tn-admin .admin-list-title,
html[data-site-shell="themanew"] .tn-admin .font-800,
html[data-site-shell="themanew"] .tn-admin .font-850,
html[data-site-shell="themanew"] .tn-admin .font-900,
html[data-site-shell="themanew"] .tn-admin .text-10-800-uppercase,
html[data-site-shell="themanew"] .tn-admin h1,
html[data-site-shell="themanew"] .tn-admin h2,
html[data-site-shell="themanew"] .tn-admin h3,
html[data-site-shell="themanew"] .tn-admin h4,
html[data-site-shell="themanew"] .tn-admin .btn-primary,
html[data-site-shell="themanew"] .tn-admin .btn-secondary {
    font-weight: 700 !important;
    letter-spacing: normal !important;
}

html[data-site-shell="themanew"] .tn-admin .text-uppercase,
html[data-site-shell="themanew"] .tn-admin .uppercase {
    text-transform: none !important;
    letter-spacing: normal !important;
}

html[data-site-shell="themanew"] .tn-admin .tracking-wider,
html[data-site-shell="themanew"] .tn-admin .tracking-wide,
html[data-site-shell="themanew"] .tn-admin .tracking-tighter {
    letter-spacing: normal !important;
}

.tn-admin-vacancy__est {
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-primary);
    margin-bottom: 2px;
    letter-spacing: normal;
    text-transform: none;
}

/* Avoid subpixel blur from transform animations inside admin */
html[data-site-shell="themanew"] .tn-admin .animate {
    animation: tn-admin-fade-in 0.35s ease forwards;
    transform: none !important;
}

@keyframes tn-admin-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.tn-admin .dashboard-card,
.tn-admin .admin-header,
.tn-admin .report-card,
.tn-admin .payment-row,
.tn-admin .settings-section,
.tn-admin .aup-modal .modal-content {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border-light);
}

.tn-admin .btn-primary,
.tn-admin .btn-secondary,
.tn-admin .form-input,
.tn-admin .input-field,
.tn-admin .pag-btn,
.tn-admin .admin-filter-input,
.tn-admin .admin-filter-select,
.tn-admin .search-input,
.tn-admin .rounded-8,
.tn-admin .rounded-10,
.tn-admin .rounded-16,
.tn-admin .rounded-6 {
    border-radius: 0 !important;
}

/* Native select: no vertical padding + matched line-height (fixes crooked text on Windows) */
html[data-site-shell="themanew"] .tn-admin select,
html[data-site-shell="themanew"] .tn-admin .tn-select,
html[data-site-shell="themanew"] .tn-admin .admin-filter-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-sizing: border-box;
    display: inline-block;
    width: auto;
    max-width: 100%;
    height: 36px !important;
    min-height: 36px;
    line-height: 36px !important;
    padding: 0 28px 0 10px !important;
    margin: 0;
    font-family: inherit;
    font-size: 13px !important;
    font-weight: 600 !important;
    letter-spacing: normal !important;
    color: var(--tn-text);
    background-color: var(--tn-surface);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    border: 1px solid var(--tn-border);
    border-radius: 0 !important;
    cursor: pointer;
    vertical-align: middle;
}

html[data-site-shell="themanew"] .tn-admin select:focus,
html[data-site-shell="themanew"] .tn-admin .admin-filter-select:focus {
    outline: 2px solid var(--tn-primary);
    outline-offset: -2px;
    border-color: var(--tn-primary);
}

html[data-theme="dark"][data-site-shell="themanew"] .tn-admin select,
html[data-theme="dark"][data-site-shell="themanew"] .tn-admin .admin-filter-select {
    background-color: var(--tn-surface);
    color: var(--tn-text);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23a1a1aa' stroke-width='2.5'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.tn-admin .admin-tab-btn,
.tn-admin .tab-btn {
    border-radius: 0 !important;
}

.tn-admin .admin-tab-btn.active,
.tn-admin .tab-btn.active {
    background: var(--tn-primary);
    color: #fff;
    border-color: var(--tn-primary);
}

.tn-admin .tn-legacy-zone,
.tn-admin .tn-legacy-zone--flush {
    border: 0;
    padding: 0;
    margin: 0;
}

/* Admin chrome + scrollable nav */
.tn-admin-chrome {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 12px;
}

.tn-admin-chrome__tools {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.tn-admin-bar__users {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tn-admin-bar__users[hidden] { display: none !important; }

.tn-admin__sr-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.tn-admin-nav {
    flex: 1;
    min-width: 0;
    position: relative;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
}

.tn-admin-nav__groups {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
}

.tn-admin-nav__group {
    position: relative;
}

.tn-admin-nav__group-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--tn-muted);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.tn-admin-nav__group-btn:hover {
    color: var(--tn-text);
    background: var(--tn-surface-2);
}

.tn-admin-nav__group.is-active .tn-admin-nav__group-btn,
.tn-admin-nav__group.is-open .tn-admin-nav__group-btn {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
}

.tn-admin-nav__group-label {
    flex-shrink: 0;
}

.tn-admin-nav__group-current {
    font-size: 11px;
    font-weight: 600;
    color: var(--tn-muted);
    padding: 2px 6px;
    border-radius: 0;
    background: var(--tn-surface-2);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-admin-nav__group.is-active .tn-admin-nav__group-current {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 12%, transparent);
}

.tn-admin-nav__chevron {
    flex-shrink: 0;
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.tn-admin-nav__group.is-open .tn-admin-nav__chevron {
    transform: rotate(180deg);
}

.tn-admin-nav__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 50;
    min-width: 180px;
    padding: 6px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.tn-admin-nav__group.is-open .tn-admin-nav__dropdown {
    display: block;
}

.tn-admin-nav__dropdown-item {
    display: block;
    padding: 10px 12px;
    border-radius: 0;
    color: var(--tn-text);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.tn-admin-nav__dropdown-item:hover {
    background: var(--tn-surface-2);
    color: var(--tn-text);
}

.tn-admin-nav__dropdown-item.is-active {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
    font-weight: 700;
}

.tn-admin-nav__direct {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 0;
    color: var(--tn-muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease;
}

.tn-admin-nav__direct:hover {
    color: var(--tn-text);
    background: var(--tn-surface-2);
}

.tn-admin-nav__direct.is-active {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
}

@media (max-width: 768px) {
    .tn-admin-nav__groups {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .tn-admin-nav__groups::-webkit-scrollbar {
        display: none;
    }

    .tn-admin-nav__group-btn {
        font-size: 12px;
        padding: 8px 10px;
    }

    .tn-admin-nav__group-current {
        display: none;
    }

    /* overflow-x:auto clips absolute dropdowns — lift clip while open */
    .tn-admin-chrome:has(.tn-admin-nav.is-dropdown-open),
    .tn-admin-nav.is-dropdown-open {
        position: relative;
        z-index: 80;
        overflow: visible;
    }

    .tn-admin-nav.is-dropdown-open .tn-admin-nav__groups {
        overflow: visible;
    }

    .tn-admin-nav__group.is-open {
        z-index: 81;
    }

    .tn-admin-nav.is-dropdown-open .tn-admin-nav__dropdown {
        position: fixed;
        top: 0;
        left: 12px;
        right: auto;
        width: min(280px, calc(100vw - 24px));
        min-width: 0;
        max-height: min(50vh, 320px);
        overflow-y: auto;
        z-index: 90;
        box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
    }
}

/* legacy flat nav items (fallback) */
.tn-admin-nav__track {
    display: flex;
    align-items: stretch;
    gap: 2px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px;
    scroll-snap-type: x proximity;
}

.tn-admin-nav__track::-webkit-scrollbar { display: none; }

.tn-admin-nav__item {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--tn-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.01em;
    padding: 8px 12px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
    flex: 0 0 auto;
    scroll-snap-align: start;
    position: relative;
    transition: color 0.15s ease, background 0.15s ease;
}

.tn-admin-nav__item:hover {
    color: var(--tn-text);
    background: var(--tn-surface-2);
}

.tn-admin-nav__item.is-active,
.tn-admin-nav__item.active {
    color: var(--tn-primary);
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
}

.tn-admin-nav__item.is-active::after,
.tn-admin-nav__item.active::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 10px;
    bottom: 2px;
    height: 2px;
    background: var(--tn-primary);
}

/* legacy tabs (if any remain) */
.tn-admin-bar {
    display: flex;
    align-items: stretch;
    gap: 0;
    margin: 0 0 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-admin-tabs {
    display: flex;
    gap: 0;
    margin: 0 0 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tn-admin-tabs__btn {
    flex: 1 0 auto;
    min-width: max-content;
    border: none;
    border-right: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-muted);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    padding: 8px 10px;
    cursor: pointer;
    white-space: nowrap;
}

.tn-admin-tabs__btn.is-active,
.tn-admin-tabs__btn.active {
    background: var(--tn-primary);
    color: #fff;
}

.tn-admin .admin-stat-grid,
.tn-admin .tn-stat-grid.admin-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.tn-admin .admin-stat-card,
.tn-admin .tn-stat.admin-stat-card {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 8px 10px;
    box-shadow: none !important;
}

.tn-admin .admin-stat-card.primary,
.tn-admin .tn-stat.admin-stat-card.primary {
    background: var(--tn-primary) !important;
    border-color: var(--tn-primary) !important;
    color: #fff !important;
}

.tn-admin .admin-stat-card.primary .admin-stat-label,
.tn-admin .admin-stat-card.primary .tn-stat__label {
    color: rgba(255, 255, 255, 0.78) !important;
}

.tn-admin .tn-stat__value,
.tn-admin .admin-stat-value {
    font-size: 18px !important;
    line-height: 1.2;
}

.tn-admin .tn-stat__label,
.tn-admin .admin-stat-label {
    font-size: 10px !important;
    margin-bottom: 2px !important;
}

.tn-admin .admin-list-item,
.tn-admin .tn-row.admin-list-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px !important;
    margin-bottom: 4px !important;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    border-radius: 0 !important;
    box-shadow: none !important;
}

.tn-admin .tn-row.admin-list-item {
    /* avoid double chrome when both classes present */
}

.tn-admin .admin-list-img,
.tn-admin .tn-row__thumb {
    width: 32px !important;
    height: 32px !important;
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    flex-shrink: 0;
    object-fit: cover;
}

.tn-admin .admin-list-title,
.tn-admin .tn-row__title {
    font-size: 13px !important;
    font-weight: 700;
    margin: 0;
    line-height: 1.25;
}

.tn-admin .admin-list-subtitle,
.tn-admin .tn-row__meta {
    font-size: 11px !important;
    margin: 1px 0 0 !important;
    color: var(--tn-muted);
}

.tn-admin .w-32.h-32,
.tn-admin .btn-secondary.w-32,
.tn-admin .btn-primary.w-32 {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px;
    min-height: 28px !important;
    padding: 0 !important;
}

.tn-admin .tn-section-title,
.tn-admin .section-title {
    font-size: 13px !important;
    margin: 0 !important;
}

.tn-admin .tn-toolbar,
.tn-admin .section-header {
    margin-bottom: 6px !important;
    gap: 8px;
}

.tn-admin .section {
    margin-top: 10px !important;
}

.tn-admin .search-wrapper {
    margin-bottom: 8px !important;
}

.tn-admin .search-input {
    padding: 8px 10px 8px 34px !important;
    font-size: 13px !important;
}

.tn-admin .tn-icon-btn,
.tn-admin .tn-panel-head__more,
.tn-admin .admin-icon-btn {
    width: 32px !important;
    height: 32px !important;
}

.tn-admin .admin-dropdown-menu,
.tn-admin .tn-admin-menu {
    min-width: 200px;
    max-height: min(70vh, 480px);
    overflow: auto;
    padding: 0 !important;
    border-radius: 0 !important;
}

.tn-admin .admin-menu-item,
html[data-site-shell="themanew"] .admin-menu-item {
    padding: 8px 12px !important;
    font-size: 12px !important;
    border-radius: 0 !important;
    gap: 0 !important;
}

/* Compact categories + spoilers */
.tn-admin-cats {
    display: grid;
    gap: 6px;
}

.tn-admin-cat {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tn-admin-cat[data-open="true"] {
    border-color: color-mix(in srgb, var(--tn-primary) 45%, var(--tn-border));
    box-shadow: inset 3px 0 0 var(--tn-primary);
}

.tn-admin-cat__row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    min-height: 38px;
}

.tn-admin-cat__toggle {
    width: 28px;
    height: 28px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    color: var(--tn-muted);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    padding: 0;
    transition: transform 0.18s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.tn-admin-cat[data-open="true"] .tn-admin-cat__toggle {
    transform: rotate(90deg);
    color: var(--tn-primary);
    border-color: color-mix(in srgb, var(--tn-primary) 35%, var(--tn-border));
    background: color-mix(in srgb, var(--tn-primary) 10%, transparent);
}

.tn-admin-cat__spoiler {
    border-top: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
}

.tn-admin-cat__spoiler[hidden] {
    display: none !important;
}

.tn-admin-cat__empty {
    margin: 0;
    padding: 10px 12px 10px 40px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-admin-cat__row--sub {
    padding-left: 40px;
    border-top: 1px solid var(--tn-border-light);
    background: transparent;
}

.tn-admin-cat__row--sub:first-child {
    border-top: 0;
}

.tn-admin-cat__icon {
    width: 28px;
    height: 28px;
    border: 1px solid var(--tn-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-size: 12px;
    background: var(--tn-surface-2);
}

.tn-admin-cat__icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-admin-cat__name {
    flex: 1;
    min-width: 0;
    height: 30px !important;
    min-height: 30px !important;
    border: 1px solid transparent !important;
    background: transparent !important;
    font-weight: 700 !important;
    font-size: 13px !important;
    padding: 0 6px !important;
}

.tn-admin-cat__name:focus {
    border-color: var(--tn-primary) !important;
    background: var(--tn-surface) !important;
}

.tn-admin-cat__count {
    appearance: none;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    font-size: 11px;
    font-weight: 700;
    color: var(--tn-muted);
    padding: 4px 8px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.tn-admin-cat__count:hover {
    color: var(--tn-primary);
    border-color: color-mix(in srgb, var(--tn-primary) 40%, var(--tn-border));
}

.tn-admin-cat__add {
    display: flex;
    gap: 6px;
    padding: 8px 8px 8px 40px;
    border-bottom: 1px solid var(--tn-border-light);
    background: color-mix(in srgb, var(--tn-primary) 4%, var(--tn-surface-2));
}

.tn-admin-cat__add.hidden { display: none; }

.tn-admin-cat__subs {
    display: grid;
}

.tn-admin-cats__create {
    display: flex;
    gap: 6px;
    align-items: center;
}

.tn-admin-cats__create .tn-field__input {
    flex: 1;
    min-height: 34px !important;
    height: 34px;
}

.tn-admin-cats__icon-btn {
    width: 34px;
    height: 34px;
    border: 1px dashed var(--tn-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    font-weight: 800;
    color: var(--tn-muted);
}

.tn-admin .tn-btn--sm {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-height: 28px;
}

.tn-admin .tn-btn--danger {
    color: var(--tn-danger, #fa5252) !important;
}

.tn-admin-panel {
    padding: 10px !important;
}

.tn-admin-panel--tight {
    padding: 8px !important;
    margin-bottom: 8px;
}

.tn-admin-panel__title {
    font-size: 13px !important;
    margin: 0 0 8px !important;
}

.tn-admin-form {
    gap: 8px !important;
}

.tn-admin-form .tn-form-stack {
    gap: 8px !important;
}

.tn-admin-form .tn-field__input,
.tn-admin-form .form-input {
    min-height: 36px !important;
}

.tn-admin-form__actions {
    padding: 8px !important;
    bottom: 8px;
}

.tn-admin .tn-admin-empty {
    padding: 16px !important;
    font-size: 13px;
}

.tn-admin #content-settings .dashboard-card {
    padding: 10px !important;
    margin-bottom: 8px !important;
}

.tn-admin #content-settings .grid.grid-cols-3 {
    gap: 6px !important;
    margin-bottom: 8px !important;
}

html[data-site-shell="themanew"] .tn-page-title {
    font-size: 20px;
    margin: 0 0 8px;
}

html[data-site-shell="themanew"] .tn-simple-page .tn-breadcrumbs {
    margin-bottom: 6px;
}

.tn-admin .admin-empty-state {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    padding: 28px 16px;
    text-align: center;
    border-radius: 0 !important;
}

.tn-admin .search-wrapper {
    position: relative;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    margin-bottom: 12px;
}

.tn-admin .search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-admin .search-input {
    width: 100%;
    border: 0 !important;
    background: transparent !important;
    border-radius: 0 !important;
    padding: 12px 12px 12px 40px;
    font: inherit;
    font-size: 14px;
    box-shadow: none !important;
}

.tn-admin .pag-btn {
    min-width: 36px;
    height: 36px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font-weight: 700;
}

.tn-admin .pag-btn.active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-admin .admin-badge {
    border-radius: 0 !important;
    font-size: 10px;
    font-weight: 800;
    padding: 2px 6px;
    text-transform: uppercase;
}

.tn-admin .admin-badge.success {
    background: var(--tn-success-soft);
    color: var(--tn-success);
}

.tn-admin .admin-badge.warning {
    background: #fff4e6;
    color: #fd7e14;
}

.tn-admin .admin-dropdown-menu {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
    backdrop-filter: none;
    padding: 0;
    min-width: 240px;
}

.tn-admin .admin-menu-item {
    border-radius: 0 !important;
    border-bottom: 1px solid var(--tn-border-light);
    font-size: 13px;
    font-weight: 600;
    padding: 12px 14px;
}

.tn-admin .admin-menu-item:last-child { border-bottom: 0; }

.tn-admin .admin-menu-item:hover,
.tn-admin .admin-menu-item.active {
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
}

.tn-admin .rank-badge {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}

.tn-admin .rank-badge.top {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-admin .section-title,
.tn-admin .tn-section-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
}

.tn-admin .link-btn {
    border-radius: 0 !important;
    color: var(--tn-primary);
    font-weight: 700;
    background: none;
    border: none;
    cursor: pointer;
}

.tn-admin .dashboard-card {
    background: var(--tn-surface);
    padding: 16px !important;
}

.tn-admin .input-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-muted);
}

/* Admin form panels */
.tn-admin--form,
.tn-admin-form {
    display: grid;
    gap: 14px;
}

.tn-admin-form__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tn-admin-panel {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 16px;
}

.tn-admin-panel--nested {
    background: var(--tn-surface-2);
    margin: 0;
}

.tn-admin-panel__title {
    margin: 0 0 14px;
    font-size: 15px;
    font-weight: 800;
}

.tn-admin-panel__subtitle {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 800;
    color: var(--tn-accent, #fd7e14);
}

.tn-admin-panel__text {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-admin-meta {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-primary-soft);
    padding: 12px 14px;
}

.tn-admin-meta__label {
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-primary);
    margin-bottom: 2px;
}

.tn-admin-meta__value {
    font-size: 15px;
    font-family: ui-monospace, monospace;
}

.tn-admin-form .tn-form-stack {
    padding: 0;
    gap: 14px;
}

.tn-admin-form .tn-field__label,
.tn-admin-form .input-label {
    display: block;
    margin-bottom: 6px;
}

.tn-admin-form .tn-field__input,
.tn-admin-form .form-input,
.tn-admin-form .form-textarea,
.tn-admin-form select.form-input,
.tn-admin-form .time-input {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border) !important;
    background: var(--tn-surface-2) !important;
    box-shadow: none !important;
    min-height: 44px;
    width: 100%;
}

.tn-admin-form textarea.tn-field__input,
.tn-admin-form .form-textarea {
    min-height: 100px;
    padding: 12px;
    resize: vertical;
}

.tn-admin-form .tn-field__hint,
.tn-admin .tn-field__hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-admin-form__row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.tn-admin-form__row .tn-field__input,
.tn-admin-form__row .form-input { flex: 1; }

.tn-admin-form__row--times {
    align-items: center;
}

.tn-admin-form__sep {
    color: var(--tn-muted);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.tn-admin-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.tn-admin-map,
.tn-admin #map-picker {
    width: 100%;
    height: 250px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    border-radius: 0 !important;
    overflow: hidden;
    touch-action: none;
}

.tn-hours {
    display: grid;
    gap: 8px;
}

.tn-hours__row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 8px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
}

.tn-hours__day {
    font-size: 13px;
    font-weight: 800;
}

.tn-hours__times {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.tn-hours__times .time-input {
    min-height: 36px !important;
}

.tn-hours__closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--tn-muted);
    cursor: pointer;
    white-space: nowrap;
}

.tn-admin-switch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tn-admin-switch strong {
    display: block;
    font-size: 14px;
}

.tn-admin-switch span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tn-muted);
    font-weight: 500;
}

.tn-admin-form__actions {
    position: sticky;
    bottom: 12px;
    z-index: 20;
    padding: 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.08);
}

.tn-admin .tn-alert {
    border: 1px solid var(--tn-border);
    padding: 12px 14px;
    font-size: 14px;
    font-weight: 600;
}

.tn-admin .tn-alert--error {
    border-color: var(--tn-danger, #fa5252);
    background: #fff5f5;
    color: var(--tn-danger, #fa5252);
}

.tn-admin .tn-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 0 !important;
}

.tn-admin .tn-gallery.preview-container,
.tn-admin .preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 8px;
}

.tn-admin .preview-item {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--tn-border);
    overflow: hidden;
    border-radius: 0 !important;
    background: var(--tn-surface-2);
}

.tn-admin .preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.tn-admin .primary-badge,
.tn-admin .set-primary-btn,
.tn-admin .img-delete-btn {
    border-radius: 0 !important;
}

.tn-admin .search-results-dropdown {
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-admin .tab-content { display: none; }
.tn-admin .tab-content.active { display: block; }

.tn-admin .rounded-8,
.tn-admin .rounded-10,
.tn-admin .rounded-12,
.tn-admin .rounded-16,
.tn-admin .rounded-18,
.tn-admin .rounded-20,
.tn-admin .rounded-full {
    border-radius: 0 !important;
}

.tn-admin .admin-form-box,
.tn-admin .bg-hot-5,
.tn-admin .bg-muted {
    border-radius: 0 !important;
}

.tn-admin .switch .slider {
    border-radius: 0 !important;
}

.tn-admin .switch .slider:before {
    border-radius: 0 !important;
}

.tn-admin .tn-admin-empty,
.tn-admin .admin-empty-state {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    padding: 28px 16px;
    text-align: center;
    color: var(--tn-muted);
    font-size: 14px;
    font-weight: 600;
    border-radius: 0 !important;
}

.tn-admin .btn-primary,
.tn-admin .btn-secondary {
    border-radius: 0 !important;
    min-height: 36px;
}

.tn-admin .w-32.h-32,
.tn-admin .btn-secondary.w-32,
.tn-admin .btn-primary.w-32 {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tn-admin #content-settings .dashboard-card,
.tn-admin #content-categories .dashboard-card,
.tn-admin #content-categories .admin-form-box {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 16px;
}

.tn-admin #content-settings .grid.grid-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.tn-admin #content-settings .grid.grid-cols-3 > .dashboard-card {
    text-align: center;
    padding: 12px !important;
}

.tn-admin .section {
    margin-top: 16px;
}

.tn-admin .section-header {
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .tn-admin-form__grid {
        grid-template-columns: 1fr;
    }

    .tn-hours__row {
        grid-template-columns: 32px 1fr;
        grid-template-rows: auto auto;
    }

    .tn-hours__closed {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .tn-admin #content-settings .grid.grid-cols-3 {
        grid-template-columns: 1fr;
    }
}

/* ── Establishment edit (sidebar + toolbar, screenshot layout) ── */
.tn-est-edit {
    width: 100%;
    max-width: none;
    margin: 0;
    padding-bottom: 32px;
}

.tn-simple-page:has(.tn-est-edit) .tn-page-title {
    display: none;
}

.tn-admin--form.tn-est-edit .tn-admin-form {
    gap: 0 !important;
}

.tn-est-edit__form {
    display: block;
}

.tn-est-edit__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    padding: 14px 18px;
    margin-bottom: 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
    position: sticky;
    top: 8px;
    z-index: 30;
}

.tn-est-edit__toolbar-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;
}

.tn-est-edit__avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    overflow: hidden;
}

.tn-est-edit__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-est-edit__title-block {
    min-width: 0;
}

.tn-est-edit__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--tn-text);
}

.tn-est-edit__meta {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.tn-est-edit__toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tn-est-edit__profile {
    min-height: 42px;
    padding: 0 16px;
    border-radius: 0 !important;
    font-weight: 700;
}

.tn-est-edit__save {
    min-width: 180px;
    min-height: 42px;
    padding: 0 18px;
    font-weight: 700;
    border-radius: 0 !important;
}

.tn-est-edit__shell {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
    overflow: hidden;
    min-height: 520px;
}

.tn-est-edit__side {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 10px;
    border-right: 1px solid var(--tn-border);
    background: #fafbfd;
}

.tn-est-edit__side-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5c6478;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}

.tn-est-edit__side-btn:hover:not(.is-active) {
    background: #f0f2f7;
    color: var(--tn-text);
}

.tn-est-edit__side-btn.is-active {
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary, #5B67F5);
}

.tn-est-edit__side-ico {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
}

.tn-est-edit__side-btn.is-active .tn-est-edit__side-ico {
    color: var(--tn-primary, #5B67F5);
}

.tn-est-edit__panels {
    min-width: 0;
    padding: 22px 24px 28px;
    background: var(--tn-surface);
}

.tn-est-edit__panel {
    display: none;
    animation: tn-est-edit-fade 0.2s ease;
}

.tn-est-edit__panel.is-active {
    display: block;
}

@keyframes tn-est-edit-fade {
    from { opacity: 0.4; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

.tn-est-edit__panel-title {
    margin: 0 0 20px;
    font-size: 20px;
    font-weight: 800;
    color: var(--tn-text);
    letter-spacing: -0.02em;
}

.tn-est-edit__card {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.tn-est-edit__card--wide { max-width: none; }

.tn-est-edit__card--nested {
    padding: 16px;
    border: 1px solid var(--tn-border-light);
    background: #fafbfd;
}

.tn-est-edit__card--status {
    margin-top: 8px;
    padding: 16px 18px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
}

.tn-est-edit__subtitle {
    margin: 0 0 6px;
    font-size: 15px;
    font-weight: 800;
}

.tn-est-edit__lead {
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.45;
}

.tn-est-edit__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.tn-est-edit__label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-est-edit__label em {
    color: #e03131;
    font-style: normal;
    font-weight: 800;
}

.tn-est-edit__optional {
    font-weight: 600;
    color: var(--tn-muted);
    text-transform: none;
}

.tn-est-edit__control {
    position: relative;
    display: block;
}

.tn-est-edit__control .tn-est-edit__input {
    padding-right: 72px;
}

.tn-est-edit__control--area .tn-est-edit__input {
    padding-right: 14px;
    padding-bottom: 28px;
}

.tn-est-edit__counter {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    font-weight: 600;
    color: #9aa3b5;
    pointer-events: none;
    white-space: nowrap;
}

.tn-est-edit__counter--area {
    top: auto;
    bottom: 10px;
    transform: none;
}

.tn-est-edit__input {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: #fff;
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    box-sizing: border-box;
}

.tn-est-edit__input:focus {
    outline: none;
    border-color: var(--tn-primary);
    box-shadow: 0 0 0 3px rgba(91, 103, 245, 0.12);
}

.tn-est-edit__textarea {
    min-height: 120px;
    padding: 12px 14px;
    resize: vertical;
    line-height: 1.45;
}

.tn-est-edit__input--short { max-width: 160px; }
.tn-est-edit__input--time { width: 120px; min-width: 120px; }

.tn-est-edit__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238b93a7' d='M1.4 1.4 6 6l4.6-4.6L12 2.8 6 8.8 0 2.8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.tn-est-edit__hint {
    font-size: 12px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-est-edit__grid {
    display: grid;
    gap: 14px 16px;
}

.tn-est-edit__grid--2 { grid-template-columns: 1fr 1fr; }
.tn-est-edit__grid--4 { grid-template-columns: repeat(4, 1fr); }

.tn-est-edit__tags-wrap .establishment-tags-field { margin-top: 4px; }

.tn-est-edit .establishment-tags-field .input-label,
.tn-est-edit .establishment-tags-field label {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-est-edit .establishment-tags-field .form-input,
.tn-est-edit .establishment-tags-field input[type="text"] {
    min-height: 46px;
    border-radius: 0;
}

.tn-est-edit .tag-input-wrap { border-radius: 0; }

.tn-est-edit__search-row {
    display: flex;
    gap: 8px;
}

.tn-est-edit__search-row .tn-est-edit__input { flex: 1; }

.tn-est-edit__search-btn {
    width: 46px;
    min-width: 46px;
    padding: 0;
    border-radius: 0 !important;
}

.tn-est-edit__map {
    height: 320px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    overflow: hidden;
}

.tn-est-edit .search-results-dropdown { border-radius: 0; }

.tn-est-edit__time-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tn-est-edit__time-sep {
    color: var(--tn-muted);
    font-weight: 600;
}

.tn-est-edit__hours {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tn-est-edit__hours-row {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    gap: 12px;
    align-items: center;
}

.tn-est-edit__hours-day {
    font-weight: 800;
    font-size: 13px;
}

.tn-est-edit__hours-times {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tn-est-edit__hours-closed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-muted);
    white-space: nowrap;
}

.tn-est-edit__gallery.preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.tn-est-edit .preview-item { border-radius: 0; }

.tn-est-edit__upload .tn-est-edit__file {
    width: 100%;
    padding: 10px;
    border: 1px dashed var(--tn-border);
    background: #fafbfd;
}

.tn-est-edit__upload .tn-est-edit__file::file-selector-button {
    margin-right: 12px;
    padding: 8px 12px;
    border: 1px solid var(--tn-border);
    background: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tn-est-edit__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tn-est-edit__status-text strong {
    display: block;
    font-size: 14px;
    font-weight: 800;
}

.tn-est-edit__status-text span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-est-edit .switch .slider { border-radius: 20px !important; }
.tn-est-edit .switch .slider:before { border-radius: 50% !important; }

.tn-est-edit__pending {
    max-width: 480px;
    margin: 24px auto;
    text-align: center;
    padding: 32px 24px;
}

.tn-est-edit__pending-ico {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    background: var(--tn-primary-soft, #eef0ff);
    color: var(--tn-primary, #5B67F5);
}

.tn-est-edit__terms-scroll {
    max-height: min(52vh, 480px);
    overflow: auto;
    padding: 14px 16px;
    margin: 12px 0 16px;
    border: 1px solid var(--tn-border);
    background: #fafbfd;
    font-size: 13px;
    line-height: 1.5;
}

.tn-est-edit__terms-scroll .tn-est-edit__terms-h {
    margin: 18px 0 8px;
    font-size: 14px;
    font-weight: 800;
}

.tn-est-edit__terms-scroll .tn-est-edit__terms-h:first-of-type {
    margin-top: 0;
}

.tn-est-edit__terms-scroll p,
.tn-est-edit__terms-scroll ul {
    margin: 0 0 10px;
}

.tn-est-edit__terms-scroll ul {
    padding-left: 18px;
}

.tn-est-edit__terms-scroll li {
    margin-bottom: 4px;
}

.tn-est-edit__agree {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
}

.tn-est-edit__agree input {
    margin-top: 2px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.tn-est-edit__agree a {
    color: var(--tn-primary, #5B67F5);
}

.tn-est-edit__actions-mobile {
    display: none;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0;
    position: sticky;
    bottom: 12px;
    z-index: 20;
    box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
}

.tn-est-edit__tabs { display: none !important; }

@media (min-width: 768px) {
    .tn-est-edit__grid--4 { grid-template-columns: 1fr 1fr; }
    .tn-est-edit__map { height: 420px; }
    .tn-est-edit__gallery.preview-container { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1024px) {
    .tn-est-edit__title { font-size: 20px; }
    .tn-est-edit__actions-mobile { display: none !important; }
    .tn-est-edit__grid--4 { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 1023px) {
    .tn-est-edit__shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .tn-est-edit__side {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        border-right: 0;
        border-bottom: 1px solid var(--tn-border);
        padding: 8px 10px;
        gap: 6px;
        scrollbar-width: none;
        align-items: center;
        height: auto;
        min-height: 0;
    }

    .tn-est-edit__side::-webkit-scrollbar { display: none; }

    .tn-est-edit__side-btn {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        padding: 0 12px;
        align-self: center;
        white-space: nowrap;
    }

    .tn-est-edit__side-btn > span:last-child {
        white-space: nowrap;
    }

    .tn-est-edit__panels { padding: 16px; }

    .tn-est-edit__toolbar-actions .tn-est-edit__save { display: none; }
    .tn-est-edit__actions-mobile { display: block; }

    .tn-est-edit__grid--2,
    .tn-est-edit__grid--4 { grid-template-columns: 1fr; }

    .tn-est-edit__hours-row {
        grid-template-columns: 32px 1fr;
        grid-template-rows: auto auto;
    }

    .tn-est-edit__hours-closed {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 640px) {
    .tn-est-edit__toolbar { padding: 12px 14px; }
    .tn-est-edit__toolbar-actions .tn-btn--ghost { display: none; }
}

/* ── Shared UI components ── */
.tn-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tn-card {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 14px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    text-align: left;
    width: 100%;
    font: inherit;
    color: inherit;
}

.tn-card:hover { background: var(--tn-surface-2); }

.tn-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.tn-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
}

.tn-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    white-space: nowrap;
}

.tn-badge--open { border-color: var(--tn-success); color: var(--tn-success); background: #ecfdf3; }
.tn-badge--answered { border-color: var(--tn-primary); color: var(--tn-primary); background: var(--tn-primary-soft); }
.tn-badge--closed { border-color: var(--tn-muted); color: var(--tn-muted); }
.tn-badge--pending { border-color: var(--tn-accent); color: var(--tn-accent); background: var(--tn-accent-soft); }
.tn-badge--hot { border-color: var(--tn-danger); color: var(--tn-danger); }

.tn-list { display: grid; gap: 10px; }

.tn-plan-list { display: grid; gap: 10px; margin-bottom: 16px; }

.tn-plan {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 14px 16px;
    cursor: pointer;
    position: relative;
}

.tn-plan.is-best { border-color: var(--tn-primary); }

.tn-plan.is-selected {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-plan__badge {
    position: absolute;
    top: -1px;
    right: 12px;
    background: var(--tn-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
}

.tn-plan__name { display: block; font-weight: 700; font-size: 15px; }

.tn-plan__meta { display: block; font-size: 12px; color: var(--tn-muted); margin-top: 4px; }

.tn-plan__discount { color: var(--tn-success); font-weight: 700; margin-left: 6px; }

.tn-plan__price { font-size: 20px; font-weight: 800; color: var(--tn-primary); }

.tn-plan__old {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    text-decoration: line-through;
    text-align: right;
}

.tn-benefits { display: grid; gap: 10px; }

.tn-benefit {
    display: flex;
    gap: 12px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 12px 14px;
}

.tn-benefit__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    flex-shrink: 0;
    color: var(--tn-primary);
}

.tn-benefit__title { display: block; font-weight: 700; font-size: 14px; }

.tn-benefit__desc { display: block; font-size: 12px; color: var(--tn-muted); margin-top: 2px; }

.tn-vhist .tn-breadcrumbs { display: none; }

.tn-vhist-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
}

.tn-vhist-head__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.tn-vhist-head__title {
    margin: 0;
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-vhist-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tn-vhist-filters__btn {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-muted);
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tn-vhist-filters__btn:hover {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
}

.tn-vhist-filters__btn.is-active {
    border-color: var(--tn-primary);
    background: var(--tn-primary);
    color: #fff;
}

.tn-vhist-summary {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--tn-muted);
}

.tn-vhist-summary strong {
    color: var(--tn-primary);
    font-weight: 800;
}

.tn-vhist-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tn-vhist-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr) auto auto;
    align-items: stretch;
    gap: 16px;
    width: 100%;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    overflow: hidden;
    min-height: 112px;
}

.tn-vhist-card[hidden],
.tn-vhist-card.is-period-hidden {
    display: none !important;
}

.tn-vhist-card:hover {
    background: var(--tn-surface-2);
}

.tn-vhist-card__media {
    position: relative;
    width: 132px;
    min-height: 112px;
    background: var(--tn-surface-2);
    display: block;
    flex-shrink: 0;
}

.tn-vhist-card__media img {
    width: 100%;
    height: 100%;
    min-height: 112px;
    object-fit: cover;
    display: block;
}

.tn-vhist-card__discount {
    position: absolute;
    left: 8px;
    bottom: 8px;
    padding: 3px 7px;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    background: var(--tn-primary);
    line-height: 1.2;
}

.tn-vhist-card__discount.is-hot {
    background: var(--tn-danger, #fa5252);
}

.tn-vhist-card__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    padding: 14px 0;
    min-width: 0;
}

.tn-vhist-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.tn-vhist-card__name {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--tn-text);
}

.tn-vhist-card__status {
    flex-shrink: 0;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.tn-vhist-card__status.is-active {
    background: #e8f5e9;
    color: #2e7d32;
}

.tn-vhist-card__status.is-inactive {
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}

.tn-vhist-card__addr {
    display: inline-flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.35;
}

.tn-vhist-card__addr .tn-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.tn-vhist-card__spent-label {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    margin-bottom: 2px;
}

.tn-vhist-card__spent-value {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-vhist-card__visit {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-end;
    gap: 2px;
    padding: 14px 0;
    min-width: 108px;
    text-align: right;
}

.tn-vhist-card__visit-label {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-vhist-card__visit-date {
    font-size: 15px;
    font-weight: 800;
    color: var(--tn-text);
    line-height: 1.2;
}

.tn-vhist-card__visit-time {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-vhist-card__chev {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    padding-right: 14px;
    color: var(--tn-muted);
    opacity: 0.65;
}

.tn-vhist-empty-filter {
    margin: 16px 0 0;
    text-align: center;
    color: var(--tn-muted);
    font-size: 14px;
}

.tn-vhist-empty-filter.hidden {
    display: none;
}

@media (max-width: 860px) {
    .tn-vhist-card {
        grid-template-columns: 108px minmax(0, 1fr);
        grid-template-rows: auto auto;
        gap: 10px 12px;
        padding: 0 12px 12px 0;
    }

    .tn-vhist-card__media {
        width: 108px;
        min-height: 96px;
        grid-row: 1 / span 2;
    }

    .tn-vhist-card__media img {
        min-height: 96px;
    }

    .tn-vhist-card__visit {
        grid-column: 2;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 6px 10px;
        padding: 0;
        min-width: 0;
        text-align: left;
    }

    .tn-vhist-card__chev {
        grid-column: 2;
        justify-self: end;
        padding: 0;
    }

    .tn-vhist-card__top {
        flex-wrap: wrap;
    }
}

/* —— Client transaction history (/profile/transactions) —— */
.tn-txhist .tn-breadcrumbs { display: none; }

.tn-txhist-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.tn-txhist-head__main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.tn-txhist-head__back {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
    border-radius: 0;
}

.tn-txhist-head__title {
    margin: 0;
    font-size: clamp(22px, 2.5vw, 28px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--tn-text);
}

.tn-txhist-head__export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--tn-primary);
    background: var(--tn-surface);
    color: var(--tn-primary);
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    border-radius: 0;
}

.tn-txhist-head__export:hover {
    background: var(--tn-primary-soft);
}

.tn-txhist-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.tn-txhist-filters__field {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 0 12px;
    min-height: 42px;
    border-radius: 0;
    flex: 0 0 auto;
}

.tn-txhist-filters__field--date {
    margin-left: auto;
    width: auto;
    max-width: none;
    padding: 0;
    overflow: visible;
    z-index: 5;
}

.tn-txhist-filters__date-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    padding: 10px 12px;
    min-height: 42px;
    cursor: pointer;
}

.tn-txhist-filters__ico {
    color: var(--tn-muted);
    flex-shrink: 0;
}

.tn-txhist-filters__date-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-text);
    white-space: nowrap;
}

.tn-txhist-date-popup {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 280px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 14px;
    z-index: 40;
    border-radius: 0;
}

.tn-txhist-date-popup[hidden] {
    display: none !important;
}

.tn-txhist-date-popup__title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--tn-text);
}

.tn-txhist-date-popup__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 12px;
}

.tn-txhist-date-popup__label {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-txhist-date-popup__input {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    padding: 8px 10px;
    min-height: 36px;
    border-radius: 0;
}

.tn-txhist-date-popup__apply {
    width: 100%;
    border: 0;
    background: var(--tn-primary);
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 0;
}

.tn-txhist-date-popup__apply:hover {
    background: var(--tn-primary-dark, #4a54d4);
}

.tn-txhist-filters__field:not(.tn-txhist-filters__field--date) {
    min-width: 180px;
    overflow: hidden;
}

.tn-txhist-filters__select {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 10px 28px 10px 0;
    width: 100%;
    cursor: pointer;
    border-radius: 0;
}

.tn-txhist-filters__chev {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--tn-muted);
    pointer-events: none;
}

.tn-txhist-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    margin-bottom: 16px;
    border-radius: 0;
}

.tn-txhist-summary__item {
    padding: 16px 18px;
    border-right: 1px solid var(--tn-border);
}

.tn-txhist-summary__item:last-child {
    border-right: none;
}

.tn-txhist-summary__label {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    margin-bottom: 6px;
}

.tn-txhist-summary__value {
    display: block;
    font-size: clamp(18px, 2vw, 24px);
    font-weight: 800;
    line-height: 1.1;
}

.tn-txhist-summary__value.is-primary { color: var(--tn-primary); }
.tn-txhist-summary__value.is-income { color: var(--tn-success); }
.tn-txhist-summary__value.is-expense { color: var(--tn-danger); }
.tn-txhist-summary__value.is-balance { color: var(--tn-primary-dark, #3b44c4); }

.tn-txhist-table-wrap {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    overflow-x: auto;
    border-radius: 0;
}

.tn-txhist-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 880px;
}

.tn-txhist-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-muted);
    padding: 12px 14px;
    border-bottom: 1px solid var(--tn-border);
    white-space: nowrap;
}

.tn-txhist-table td {
    padding: 14px;
    border-bottom: 1px solid var(--tn-border-light, var(--tn-border));
    vertical-align: middle;
    font-size: 13px;
}

.tn-txhist-table tr:last-child td {
    border-bottom: none;
}

.tn-txhist-row.is-collapsed {
    display: none;
}

.tn-txhist-row__date-day {
    display: block;
    font-weight: 600;
    color: var(--tn-text);
}

.tn-txhist-row__date-time {
    display: block;
    font-size: 12px;
    color: var(--tn-muted);
    margin-top: 2px;
}

.tn-txhist-row__op {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
}

.tn-txhist-row__icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    border-radius: 0;
}

.tn-txhist-row__icon.is-blue { background: #5b67f5; }
.tn-txhist-row__icon.is-orange { background: #fd7e14; }
.tn-txhist-row__icon.is-green { background: #40c057; }

.tn-txhist-row__op-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-txhist-row__op-text strong {
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-txhist-row__op-text span {
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-txhist-row__type {
    color: var(--tn-text);
    white-space: nowrap;
}

.tn-txhist-row__amount {
    font-weight: 700;
    white-space: nowrap;
}

.tn-txhist-row__amount.is-income { color: var(--tn-success); }
.tn-txhist-row__amount.is-expense { color: var(--tn-danger); }

.tn-txhist-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 0;
}

.tn-txhist-badge.is-success {
    background: var(--tn-success-soft);
    color: var(--tn-success);
}

.tn-txhist-badge.is-cancelled {
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}

.tn-txhist-row__balance {
    font-weight: 700;
    color: var(--tn-text);
    white-space: nowrap;
}

.tn-txhist-row__chev {
    color: var(--tn-muted);
    width: 24px;
}

.tn-txhist-empty {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 48px 20px;
    text-align: center;
    color: var(--tn-muted);
    border-radius: 0;
}

.tn-txhist-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 16px;
}

.tn-txhist-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid var(--tn-primary);
    background: var(--tn-surface);
    color: var(--tn-primary);
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
}

.tn-txhist-more:hover {
    background: var(--tn-primary-soft);
}

@media (max-width: 900px) {
    .tn-txhist-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tn-txhist-summary__item:nth-child(2) {
        border-right: none;
    }

    .tn-txhist-summary__item:nth-child(1),
    .tn-txhist-summary__item:nth-child(2) {
        border-bottom: 1px solid var(--tn-border);
    }
}

@media (max-width: 640px) {
    .tn-txhist-head {
        flex-direction: column;
        align-items: stretch;
    }

    .tn-txhist-head__export {
        justify-content: center;
    }

    .tn-txhist-filters__field:not(.tn-txhist-filters__field--date) {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }

    .tn-txhist-filters__field--date {
        margin-left: 0;
        width: auto;
        flex: 0 0 auto;
    }

    .tn-txhist-summary {
        grid-template-columns: 1fr;
    }

    .tn-txhist-summary__item {
        border-right: none;
        border-bottom: 1px solid var(--tn-border);
    }

    .tn-txhist-summary__item:last-child {
        border-bottom: none;
    }
}

.tn-visited {
    display: grid;
    gap: 10px;
}

.tn-visited-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
    color: inherit;
    overflow: hidden;
}

.tn-visited-item:hover { background: var(--tn-surface-2); }

.tn-visited-item__img {
    width: 96px;
    height: 96px;
    position: relative;
    background: var(--tn-surface-2);
}

.tn-visited-item__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-visited-item__discount {
    position: absolute;
    left: 0;
    bottom: 0;
    background: var(--tn-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
}

.tn-visited-item__discount.is-hot { background: var(--tn-danger); }

.tn-visited-item__body { padding: 10px 12px 10px 0; min-width: 0; }

.tn-visited-item__top {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.tn-visited-item__name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.tn-visited-item__cat {
    margin: 0 0 8px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-visited-item__stats {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 11px;
}

.tn-visited-item__stats span { display: block; color: var(--tn-muted); }

.tn-visited-item__stats strong { display: block; font-size: 13px; color: var(--tn-text); }

.tn-rate-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.tn-rate-star {
    width: 44px;
    height: 44px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    font-size: 22px;
    cursor: pointer;
}

.tn-rate-star.is-active {
    border-color: var(--tn-accent);
    background: var(--tn-accent-soft);
}

/* Review modal star picker — empty stars must stay visible on white */
.star-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #9aa0b0;
    line-height: 0;
    transition: color 0.15s ease, transform 0.15s ease;
}

.star-label svg {
    fill: #e8eaf0;
    stroke: #8b93a7;
    stroke-width: 1.6;
    stroke-linejoin: round;
}

.star-label .tn-icon {
    color: #8b93a7;
    opacity: 0.55;
}

.star-label:hover {
    color: #f59e0b;
    transform: scale(1.06);
}

.star-label:hover svg {
    fill: #fde68a;
    stroke: #f59e0b;
}

.star-label:hover .tn-icon {
    color: #f59e0b;
    opacity: 1;
}

.star-label.is-active {
    color: #fbbf24;
}

.star-label.is-active svg {
    fill: #fbbf24;
    stroke: #f59e0b;
}

.star-label.is-active .tn-icon {
    color: #f59e0b;
    opacity: 1;
}

.tn-note {
    margin: 0 0 16px;
    font-size: 13px;
    color: var(--tn-muted);
    text-align: center;
}

.tn-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: var(--tn-text);
}

.tn-filter-btn--toolbar {
    flex-shrink: 0;
}

.tn-filter-btn__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tn-primary);
    flex-shrink: 0;
}

.tn-toolbar .tn-filter-btn--toolbar {
    margin-right: 0;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 1023px) {
    .tn-toolbar--catalog {
        padding: 8px 10px;
    }

    .tn-toolbar--catalog .tn-filter-btn--toolbar {
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .tn-cat-btn {
        height: 36px;
        font-size: 12px;
    }
}

@media (min-width: 1024px) {
    /* Filters live in the sidebar; hide the empty mobile toolbar (was leaving a 12px gap). */
    .tn-toolbar--catalog {
        display: none;
    }
}

/* ── Catalog filters modal ── */
.tn-catalog-filters-modal .modal-content {
    max-width: 720px;
    width: calc(100vw - 32px);
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.tn-catalog-categories-modal .modal-content {
    max-width: 420px;
    width: calc(100vw - 32px);
    border-radius: 0 !important;
    padding: 0 !important;
    overflow: hidden;
}

.tn-catalog-categories-modal .modal-content > h3 {
    margin: 0 !important;
    padding: 16px 48px 14px 20px;
    border-bottom: 1px solid var(--tn-border-light);
    font-size: 18px !important;
    text-align: left !important;
}

.tn-cat-modal {
    padding: 8px 0 12px;
}

.tn-cat-modal__list {
    display: flex;
    flex-direction: column;
    max-height: min(60vh, 420px);
    overflow-y: auto;
}

.tn-cat-modal__item {
    display: block;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light);
    border-radius: 0;
    background: transparent;
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    padding: 12px 20px;
    cursor: pointer;
}

.tn-cat-modal__item:last-child {
    border-bottom: 0;
}

.tn-cat-modal__item:hover {
    background: var(--tn-surface-2);
}

.tn-cat-modal__item.is-active {
    color: var(--tn-primary);
    background: var(--tn-primary-soft);
    font-weight: 800;
}

.tn-cat-modal__item.is-selected {
    color: var(--tn-primary);
    font-weight: 800;
}

.tn-cat-modal__item--nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.tn-cat-modal__chevron {
    flex-shrink: 0;
    color: var(--tn-text-muted);
}

.tn-cat-modal__item--all {
    font-weight: 800;
}

.tn-cat-modal__back {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light);
    border-radius: 0;
    background: transparent;
    color: var(--tn-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    padding: 12px 20px;
    cursor: pointer;
}

.tn-cat-modal__back:hover {
    background: var(--tn-surface-2);
}

.tn-filter-list__sub a {
    padding-left: 22px;
    font-size: 12px;
    font-weight: 600;
}

.tn-catalog-filters-modal .modal-content > h3 {
    margin: 0 !important;
    padding: 16px 48px 14px 20px;
    border-bottom: 1px solid var(--tn-border-light);
    font-size: 18px !important;
    text-align: left !important;
}

.tn-catalog-filters {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.tn-catalog-filters__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 18px 20px;
}

@media (min-width: 720px) {
    .tn-catalog-filters__grid {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 28px;
    }
}

.tn-catalog-filters__col {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-width: 0;
}

.tn-catalog-filters__section {
    min-width: 0;
}

.tn-catalog-filters__label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
    color: var(--tn-text);
}

.tn-catalog-filters__select {
    width: 100%;
    height: 44px;
    padding: 0 36px 0 12px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.tn-catalog-filters__range-track {
    position: relative;
    height: 28px;
    margin: 4px 0 2px;
}

.tn-catalog-filters__range-track input[type="range"] {
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    margin: 0;
    transform: translateY(-50%);
    pointer-events: none;
    appearance: none;
    background: transparent;
    height: 28px;
}

.tn-catalog-filters__range-track input[type="range"]::-webkit-slider-runnable-track {
    height: 4px;
    background: #dbe1ff;
    border-radius: 0;
}

.tn-catalog-filters__range-track input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -7px;
    border: 0;
    border-radius: 50%;
    background: var(--tn-primary, #5b67f5);
    pointer-events: auto;
    cursor: pointer;
}

.tn-catalog-filters__range-track input[type="range"]::-moz-range-track {
    height: 4px;
    background: #dbe1ff;
    border-radius: 0;
}

.tn-catalog-filters__range-track input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: 0;
    border-radius: 50%;
    background: var(--tn-primary, #5b67f5);
    pointer-events: auto;
    cursor: pointer;
}

.tn-catalog-filters__range-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-catalog-filters__range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.tn-catalog-filters__range-inputs label {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--tn-border);
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-catalog-filters__range-inputs input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-text);
    outline: none;
}

.tn-catalog-filters__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tn-catalog-filters__chip {
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tn-catalog-filters__chip.is-active {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
    color: var(--tn-primary-dark);
}

.tn-catalog-filters__toggles {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 2px;
}

.tn-catalog-filters__toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--tn-text);
    cursor: pointer;
}

.tn-catalog-filters__switch {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    width: 44px;
    height: 24px;
}

.tn-catalog-filters__switch input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
    z-index: 1;
}

.tn-catalog-filters__switch-ui {
    position: absolute;
    inset: 0;
    background: #d9d9de;
    border-radius: 0;
    transition: background 0.15s ease;
}

.tn-catalog-filters__switch-ui::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 0;
    transition: transform 0.15s ease;
}

.tn-catalog-filters__switch input:checked + .tn-catalog-filters__switch-ui {
    background: var(--tn-primary, #5b67f5);
}

.tn-catalog-filters__switch input:checked + .tn-catalog-filters__switch-ui::before {
    transform: translateX(20px);
}

.tn-catalog-filters__footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    padding: 14px 20px 18px;
    border-top: 1px solid var(--tn-border-light);
}

.tn-catalog-filters__footer .tn-catalog-filters__reset,
.tn-catalog-filters__footer .tn-catalog-filters__submit {
    width: 100%;
    height: 44px;
    margin: 0;
    padding: 0 12px;
    border-radius: 0;
    box-sizing: border-box;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.tn-catalog-filters__footer .tn-catalog-filters__reset {
    border: 1px solid var(--tn-primary);
    background: #fff;
    color: var(--tn-primary);
}

.tn-catalog-filters__footer .tn-catalog-filters__submit {
    border: 0;
    background: var(--tn-primary, #5b67f5);
    color: #fff;
}

.tn-catalog-filters__footer .tn-catalog-filters__submit:hover {
    filter: brightness(1.05);
}

.tn-catalog-filters__section--views {
    padding: 16px 20px 0;
}

.tn-filter-block--actions {
    padding-bottom: 4px;
}

.tn-filter-btn--sidebar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 40px;
    border: 1px solid var(--tn-primary);
    border-radius: 0;
    background: var(--tn-primary);
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    position: relative;
}

.tn-filter-btn--sidebar .tn-filter-btn__dot {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
}

.tn-catalog-filters__views {
    display: flex;
    gap: 8px;
}

.tn-catalog-filters__view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-height: 72px;
    padding: 10px 6px;
    border: 2px solid var(--tn-border);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.tn-catalog-filters__view svg {
    width: 24px;
    height: 24px;
}

.tn-catalog-filters__view.is-active {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--tn-primary) 35%, transparent);
}

.tn-catalog-filters__hot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--tn-danger) 35%, var(--tn-border));
    background: color-mix(in srgb, var(--tn-danger) 8%, var(--tn-surface));
}

.tn-catalog-filters__hot-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ff6b35, #ff4500);
    font-size: 20px;
    flex-shrink: 0;
}

.tn-catalog-filters__hot-text {
    flex: 1;
    min-width: 0;
}

.tn-catalog-filters__hot-text strong {
    display: block;
    font-size: 15px;
    font-weight: 800;
    color: #ff6b6b;
}

.tn-catalog-filters__hot-text span {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-catalog-filters__select:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.tn-select {
    width: 100%;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 10px 12px;
    font: inherit;
}

.tn-form-stack { display: grid; gap: 14px; }

.tn-map-shell {
    border: 1px solid var(--tn-border);
    margin-bottom: 0;
}

.tn-map-shell .map-container-full {
    min-height: min(72vh, 720px);
}

.tn-chat-shell .chat-page {
    min-height: min(68vh, 640px);
    border: 1px solid var(--tn-border);
}

.tn-wizard .tn-wizard__step { display: none; }
.tn-wizard .tn-wizard__step.is-active { display: block; }

.tn-wizard__dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.tn-wizard__dot {
    width: 10px;
    height: 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    padding: 0;
}

.tn-wizard__dot.is-active { background: var(--tn-primary); border-color: var(--tn-primary); }
.tn-wizard__dot.is-done { background: var(--tn-success); border-color: var(--tn-success); }

.tn-method-tabs {
    display: flex;
    gap: 0;
    border: 1px solid var(--tn-border);
    margin-bottom: 14px;
}

.tn-method-tabs button {
    flex: 1;
    border: none;
    border-right: 1px solid var(--tn-border);
    background: var(--tn-surface);
    height: 38px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tn-method-tabs button:last-child { border-right: 0; }
.tn-method-tabs button.is-active { background: var(--tn-primary); color: #fff; }



/* ── Partner/Admin dedicated panel chrome ── */
.tn-panel-head {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tn-border-light);
}

.tn-panel-head__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.tn-panel-head__title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

.tn-panel-head__sub { margin-top: 6px; }

.tn-panel-head__est {
    font-size: 13px;
    color: var(--tn-primary);
    font-weight: 700;
}

.tn-panel-head__more {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.tn-panel-head__actions { position: relative; }

.tn-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 40;
    min-width: 240px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    display: none;
}

.tn-dropdown.active,
.tn-partner .actions-dropdown.active { display: block; }

.tn-dropdown__item,
.tn-partner .dropdown-item,
.tn-pmenu__item {
    display: block;
    width: 100%;
    text-align: left;
    border: none;
    border-bottom: 1px solid var(--tn-border-light);
    background: transparent;
    padding: 12px 14px;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-text);
    cursor: pointer;
}

.tn-dropdown__item:hover,
.tn-partner .dropdown-item:hover,
.tn-pmenu__item:hover {
    background: var(--tn-surface-2);
    color: var(--tn-text);
}

.tn-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 14px;
}

.tn-stat {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    padding: 14px;
}

.tn-stat.primary,
.tn-stat.admin-stat-card.primary {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-stat__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--tn-muted);
    margin-bottom: 4px;
}

.tn-stat__value {
    display: block;
    font-size: 22px;
    font-weight: 800;
}

.tn-stat__meta {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tn-chip {
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.tn-chip.active,
.tn-chip.is-active,
.tn-partner .filter-btn.active {
    background: var(--tn-primary);
    border-color: var(--tn-primary);
    color: #fff;
}

.tn-chip--icon { width: 34px; padding: 0; }

.tn-scan-btn {
    width: 100%;
    min-height: 88px;
    border: 1px solid var(--tn-primary);
    background: var(--tn-primary);
    color: #fff;
    font: inherit;
    font-size: 18px;
    font-weight: 800;
    cursor: pointer;
    margin-bottom: 16px;
}

.tn-scan-btn:hover { filter: brightness(1.05); }

.tn-scanner__viewport {
    position: relative;
    border: 1px solid var(--tn-border);
    background: #111;
    min-height: 320px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tn-scanner__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    z-index: 5;
}

.tn-scanner__error {
    text-align: center;
    color: #fff;
    padding: 16px;
}

.tn-scanner__frame {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 4;
    pointer-events: none;
}

/* ── Partner scanner page (3-column layout) ── */
.tn-scanner-page {
    max-width: var(--tn-container);
    margin: 0 auto;
    padding: 0;
}

.tn-scanner-page__back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tn-primary);
    text-decoration: none;
}

.tn-scanner-page__back:hover {
    text-decoration: underline;
}

.tn-scanner-page__card,
.tn-scanner-page__manual {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    border-radius: 0;
    box-shadow: none;
}

.tn-scanner-page__card {
    padding: 24px;
    margin-bottom: 16px;
}

.tn-scanner-page__grid {
    display: grid;
    grid-template-columns: minmax(240px, 280px) minmax(0, 1fr) minmax(220px, 260px);
    gap: 28px;
    align-items: start;
}

.tn-scanner-est__heading,
.tn-scanner-page__scan-heading,
.tn-scanner-help__heading {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-scanner-est__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tn-scanner-est__field-label {
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-scanner-est__select {
    width: 100%;
    min-height: 44px;
    border-radius: 0 !important;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    padding: 0 36px 0 12px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238b93a7' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.tn-scanner-est__select:focus {
    outline: none;
    border-color: var(--tn-primary);
}

.tn-scanner-est__single {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-bg);
    font-size: 14px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-scanner-est__address {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-scanner-est__hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-scanner-page__scan {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tn-scanner-page__viewport {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 3;
    border-radius: 0;
    margin: 0 auto;
    min-height: 0;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-viewport {
    border-radius: 0 !important;
    aspect-ratio: 4 / 3;
    max-width: 480px;
    width: 100%;
    margin-bottom: 0;
    box-shadow: none;
}

.tn-scanner-page__overlay {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 4;
    pointer-events: none;
}

.tn-scanner-page__overlay.active {
    display: flex;
}

.tn-scanner-page__corners {
    position: relative;
    width: min(88%, 320px);
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.tn-scanner-page__corner {
    position: absolute;
    width: 28px;
    height: 28px;
    border: 3px solid #fff;
}

.tn-scanner-page__corner--tl { top: 0; left: 0; border-right: none; border-bottom: none; }
.tn-scanner-page__corner--tr { top: 0; right: 0; border-left: none; border-bottom: none; }
.tn-scanner-page__corner--bl { bottom: 0; left: 0; border-right: none; border-top: none; }
.tn-scanner-page__corner--br { bottom: 0; right: 0; border-left: none; border-top: none; }

.tn-scanner-page__laser {
    position: absolute;
    left: 0;
    right: 0;
    top: 6%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--tn-primary) 20%, var(--tn-primary) 80%, transparent);
    box-shadow: 0 0 10px rgba(91, 103, 245, 0.95), 0 0 22px rgba(91, 103, 245, 0.55);
    animation: tn-scanner-laser 2.2s ease-in-out infinite;
    pointer-events: none;
    z-index: 2;
}

@keyframes tn-scanner-laser {
    0%, 100% {
        top: 6%;
        opacity: 0.75;
    }
    50% {
        top: 94%;
        opacity: 1;
    }
}

@keyframes tn-scanner-spin {
    to { transform: rotate(360deg); }
}

.tn-scanner-page__hint {
    margin: 14px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
    text-align: center;
}

.tn-scanner-help__steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tn-scanner-help__step {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.tn-scanner-help__icon {
    width: 40px;
    height: 40px;
    border-radius: 0;
    background: var(--tn-primary-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tn-scanner-help__text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.tn-scanner-help__text strong {
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
}

.tn-scanner-help__text span {
    font-size: 12px;
    color: var(--tn-muted);
    line-height: 1.4;
}

.tn-scanner-help__tip {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-top: 20px;
    padding: 12px 14px;
    border-radius: 0;
    background: var(--tn-primary-soft);
    border: 1px solid rgba(91, 103, 245, 0.15);
}

.tn-scanner-help__tip p {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--tn-text);
}

.tn-scanner-help__tip-icon {
    flex-shrink: 0;
    margin-top: 1px;
    opacity: 0.7;
}

.tn-scanner-page__manual {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
}

.tn-scanner-page__manual-title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-scanner-page__manual-desc {
    margin: 0;
    font-size: 13px;
    color: var(--tn-muted);
    max-width: 480px;
}

.tn-scanner-page__manual-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    flex-shrink: 0;
    min-height: 48px;
    padding: 0 20px;
    border: 1px solid var(--tn-primary);
    border-radius: 0;
    background: var(--tn-surface);
    color: var(--tn-primary);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s, color 0.15s;
}

.tn-scanner-page__manual-btn:hover {
    background: var(--tn-primary-soft);
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-permission-overlay.active {
    display: flex;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-loader-spinner {
    margin: 0 auto 16px;
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--tn-primary);
    border-radius: 50%;
    animation: tn-scanner-spin 0.8s linear infinite;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-permission-overlay {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #111;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-error-panel {
    display: none;
    text-align: center;
    padding: 20px;
    flex-direction: column;
    align-items: center;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-error-panel.active {
    display: flex;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-error-title {
    color: #fff;
    margin-bottom: 16px;
    font-weight: 500;
}

html[data-site-shell="themanew"] .tn-scanner-page .scanner-loading-hint,
html[data-site-shell="themanew"] .tn-scanner-page .scanner-error-subtext {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
}

@media (max-width: 1024px) {
    .tn-scanner-page__grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .tn-scanner-page__scan {
        order: -1;
    }

    .tn-scanner-page__manual {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .tn-scanner-page__manual-text {
        text-align: center;
    }

    .tn-scanner-page__manual-desc {
        max-width: none;
    }
}

@media (max-width: 560px) {
    .tn-scanner-page__card {
        padding: 16px;
    }

    .tn-scanner-page__manual {
        padding: 16px;
    }
}

.tn-card__actions {
    display: flex;
    gap: 6px;
    padding: 0 12px 12px;
}

.tn-status {
    border: 1px solid var(--tn-border);
    padding: 10px 12px;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 600;
}

.tn-status--ok {
    border-color: var(--tn-success);
    background: #ecfdf3;
    color: var(--tn-success);
}

.tn-partner .header-actions,
.tn-admin .admin-menu-container { position: relative; }

.tn-admin .tn-panel-head {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.tn-admin .tn-admin__tab-title {
    font-size: 15px;
    font-weight: 800;
    margin: 0;
}

.tn-admin .admin-icon-btn,
.tn-admin .tn-panel-head__more {
    width: 40px;
    height: 40px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    border-radius: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (min-width: 900px) {
    .tn-admin .admin-stat-grid,
    .tn-admin #content-stats .admin-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* ── Partner stories / forms extras ── */
.tn-form-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tn-upload {
    min-height: 120px;
    border: 1px dashed var(--tn-border);
    background: var(--tn-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    color: var(--tn-muted);
}

.tn-stories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.tn-story-card {
    position: relative;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
    overflow: hidden;
}

.tn-story-card__thumb {
    aspect-ratio: 9 / 16;
    background: #111;
}

.tn-story-card__thumb img,
.tn-story-card .stories-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.tn-story-card__del {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    cursor: pointer;
}

.tn-story-card__meta {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-status--err {
    border-color: var(--tn-danger, #fa5252);
    background: #fff5f5;
    color: var(--tn-danger, #fa5252);
}

.tn-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border: 1px solid var(--tn-border);
}

@media (min-width: 720px) {
    .tn-stories-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tn-est-catalog-preview {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--tn-border-light);
}
.tn-est-catalog-preview__row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.tn-est-catalog-preview__card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 0 0 10px;
    text-align: left;
    cursor: pointer;
    font: inherit;
}
.tn-est-catalog-preview__card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    background: var(--tn-surface-2);
}
.tn-est-catalog-preview__ph {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1;
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}
.tn-est-catalog-preview__card strong {
    padding: 0 10px;
    font-size: 13px;
    line-height: 1.3;
}
.tn-est-catalog-preview__card span {
    padding: 0 10px;
    font-size: 12px;
    color: var(--tn-muted);
}
@media (min-width: 720px) {
    .tn-est-catalog-preview__row {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}
.tn-establishment .catalog-showcase-list,
.tn-establishment .catalog-card { border-radius: 0; }
.tn-establishment .catalog-card {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}


/* ── Establishment product page (ref layout) ── */
.tn-est-product__hero {
    display: grid;
    gap: 16px;
    margin-bottom: 18px;
}

@media (min-width: 900px) {
    .tn-est-product__hero {
        grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
        align-items: start;
        gap: 24px;
    }
}

.tn-est-thumbs {
    display: flex;
    gap: 8px;
    margin: 10px 0 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
}

.tn-est-thumbs::-webkit-scrollbar { display: none; }

.tn-est-thumbs__btn {
    flex: 0 0 72px;
    width: 72px;
    height: 56px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 0;
    background: var(--tn-surface);
    cursor: pointer;
    overflow: hidden;
}

.tn-est-thumbs__btn.is-active { border-color: var(--tn-primary); }
.tn-est-thumbs__btn img { width: 100%; height: 100%; object-fit: cover; display: block; }

.tn-est-sub {
    margin: 0 0 14px;
    color: var(--tn-muted);
    font-size: 13px;
}

.tn-est-pricebox {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.tn-est-pricebox__main {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    cursor: pointer;
}

.tn-est-pricebox__main strong {
    font-size: 18px;
    grid-column: 1;
}

.tn-est-pricebox__main span {
    grid-column: 1;
    font-size: 12px;
    color: var(--tn-muted);
}

.tn-est-pricebox__qr { grid-row: 1 / span 2; grid-column: 2; }
.tn-est-pricebox__main.is-hot strong { color: var(--tn-accent); }
.tn-est-pricebox__main.is-locked { opacity: 0.9; }

.tn-est-pricebox__rating {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-btn--success {
    background: var(--tn-success);
    border-color: var(--tn-success);
    color: #fff;
}

.tn-est-quick {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.tn-est-quick__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid var(--tn-border);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
}

.tn-est-quick__btn--ask {
    background: var(--tn-accent);
    border-color: var(--tn-accent);
    color: #fff;
}

.tn-est-tabs--icons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 0;
    border: 1px solid var(--tn-border);
    border-bottom: 0;
    background: var(--tn-surface);
}

.tn-est-tabs--icons .tn-est-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 10px 6px;
    border: 0;
    border-right: 1px solid var(--tn-border-light);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--tn-muted);
}

.tn-est-tabs--icons .tn-est-tab:last-child { border-right: 0; }

.tn-est-tabs--icons .tn-est-tab.active {
    color: var(--tn-primary);
    background: var(--tn-surface);
    box-shadow: inset 0 -2px 0 var(--tn-primary);
}

.tn-est-tab__ico { font-size: 16px; line-height: 1; }

.tn-est-assort { margin-top: 18px; }

.tn-est-assort__list {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    margin-top: 10px;
}

.tn-est-assort__row {
    display: grid;
    grid-template-columns: 64px 1fr auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border: 0;
    border-bottom: 1px solid var(--tn-border-light);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
    width: 100%;
    color: inherit;
}

.tn-est-assort__row:last-child { border-bottom: 0; }
.tn-est-assort__row:hover { background: var(--tn-surface-2); }

.tn-est-assort__thumb {
    width: 64px;
    height: 64px;
    border: 1px solid var(--tn-border-light);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--tn-surface-2);
    position: relative;
}

.tn-est-assort__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-est-assort__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.tn-est-assort__body strong {
    font-size: 14px;
    color: var(--tn-link);
    font-weight: 700;
}

.tn-est-assort__body span,
.tn-est-assort__group {
    font-size: 12px;
    color: var(--tn-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tn-est-assort__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.tn-est-assort__order {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid var(--tn-primary);
    color: var(--tn-primary);
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.tn-est-assort__order.catalog-card-action {
    cursor: pointer;
}

.tn-est-catalog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.tn-establishment .catalog-card-discount {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    font-size: 10px;
    font-weight: 800;
    background: var(--tn-danger);
    color: #fff;
    padding: 2px 4px;
}

@media (min-width: 900px) {
    .tn-est-product__summary .tn-est-title { font-size: 28px; }
    .tn-est-thumbs__btn { flex-basis: 72px; width: 72px; height: 72px; }
}

/* ── Modals: rectangular theme (overrides client.css rounded modals) ── */
html[data-site-shell="themanew"] .modal-content,
html[data-site-shell="themanew"] .modal-content.glass-card,
html[data-site-shell="themanew"] .aup-modal .modal-content {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .modal-content .rounded-4,
html[data-site-shell="themanew"] .modal-content .rounded-6,
html[data-site-shell="themanew"] .modal-content .rounded-8,
html[data-site-shell="themanew"] .modal-content .rounded-10,
html[data-site-shell="themanew"] .modal-content .rounded-12,
html[data-site-shell="themanew"] .modal-content .rounded-14,
html[data-site-shell="themanew"] .modal-content .rounded-16,
html[data-site-shell="themanew"] .modal-content .rounded-18,
html[data-site-shell="themanew"] .modal-content .rounded-20,
html[data-site-shell="themanew"] .modal-content .rounded-24,
html[data-site-shell="themanew"] .modal-content .rounded-28,
html[data-site-shell="themanew"] .modal-content .rounded-full,
html[data-site-shell="themanew"] .modal-content .btn-primary,
html[data-site-shell="themanew"] .modal-content button {
    border-radius: 0 !important;
}

.tn-pay-consent,
.tn-pay-confirm-modal .tn-pay-consent,
.tn-pay-confirm-modal .tn-pay-btn,
.tn-pay-confirm-modal .btn-primary,
.tn-pay-confirm-modal .modal-content,
.tn-pay-confirm-modal .modal-close {
    border-radius: 0 !important;
}

.tn-pay-consent__check {
    border-radius: 0 !important;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border: 2px solid var(--tn-primary, #5B67F5);
    background: #fff;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}

.tn-pay-consent__check:checked {
    background: var(--tn-primary, #5B67F5);
}

.tn-pay-consent__check:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

html[data-site-shell="themanew"] .tn-auth-modal__panel {
    border-radius: 0 !important;
}

.tn-qr-modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 8px 4px 4px;
    text-align: center;
}

.tn-qr-modal__code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--tn-border);
    padding: 12px;
}

.tn-qr-modal__code img,
.tn-qr-modal__code canvas {
    display: block;
}

.tn-qr-modal__hint {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-muted);
}

.tn-qr-modal__digits {
    display: inline-block;
    border: 2px dashed color-mix(in srgb, var(--tn-primary) 45%, var(--tn-border));
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.18em;
    padding: 10px 20px;
}

.tn-qr-modal__note {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--tn-text);
}

.tn-qr-modal__sub {
    margin: 0;
    font-size: 12px;
    color: var(--tn-muted);
}

html[data-site-shell="themanew"] .modal-close,
html[data-site-shell="themanew"] .modal-overlay .modal-close,
html[data-site-shell="themanew"] .tn-auth-modal__close {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .modal-btn,
html[data-site-shell="themanew"] .modal-footer .modal-btn,
html[data-site-shell="themanew"] .modal-footer button,
html[data-site-shell="themanew"] .modal-overlay .rounded-xl,
html[data-site-shell="themanew"] .modal-overlay .rounded-full,
html[data-site-shell="themanew"] .modal-overlay .rounded-16,
html[data-site-shell="themanew"] .modal-overlay .rounded-18 {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .modal-overlay .map-filter-select,
html[data-site-shell="themanew"] .modal-body .map-filter-select,
html[data-site-shell="themanew"] .modal-content select,
html[data-site-shell="themanew"] .modal-content input,
html[data-site-shell="themanew"] .modal-content textarea,
html[data-site-shell="themanew"] .modal-content .scanner-modal-amount-input,
html[data-site-shell="themanew"] .modal-content .scanner-modal-manual-code-input {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .modal-gallery-stage,
html[data-site-shell="themanew"] .modal-gallery-nav,
html[data-site-shell="themanew"] .modal-content img,
html[data-site-shell="themanew"] .modal-image-gallery .modal-content {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .tn-auth-modal .tn-auth__card,
html[data-site-shell="themanew"] .tn-auth-modal .method-btn,
html[data-site-shell="themanew"] .tn-auth-modal .tn-btn,
html[data-site-shell="themanew"] .tn-auth-modal .tn-auth input,
html[data-site-shell="themanew"] .tn-auth-modal .tn-auth select {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .tn-auth-modal .tn-am__input,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__prefix,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__btn,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__phone-card,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__error,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__methods,
html[data-site-shell="themanew"] .tn-auth-modal .tn-am__method,
html[data-site-shell="themanew"] .tn-auth-modal .tn-auth-modal__close,
html[data-site-shell="themanew"] .tn-auth-modal * {
    border-radius: 0 !important;
}

html[data-site-shell="themanew"] .tn-catalog-filters-modal .modal-content h3 {
    color: var(--tn-text) !important;
}

html[data-site-shell="themanew"] .tn-catalog-filters-modal .modal-close {
    background: var(--tn-surface) !important;
    color: var(--tn-muted) !important;
    border: 1px solid var(--tn-border) !important;
}

/* ── City picker modal (themanew) ── */
.tn-city-picker-modal .modal-content {
    max-width: 480px;
}

html[data-site-shell="themanew"] .tn-city-picker-modal .modal-content h3 {
    color: var(--tn-text) !important;
}

.tn-city-picker {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tn-city-picker__search {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 14px;
}

.tn-city-picker__list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.tn-city-picker__btn {
    min-height: 70px;
    padding: 8px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-align: center;
}

.tn-city-picker__btn:hover {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-city-picker__name {
    font-size: 13px;
    font-weight: 700;
}

.tn-city-picker__region {
    font-size: 9px;
    color: var(--tn-muted);
}

.tn-city-picker__count {
    font-size: 10px;
    color: var(--tn-primary);
    font-weight: 600;
}

.tn-city-picker__empty {
    grid-column: 1 / -1;
    margin: 0;
    padding: 20px;
    text-align: center;
    color: var(--tn-muted);
}

/* ── Admin user profile (tn-aup) ─────────────────────────────────── */
.tn-aup__head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tn-aup__hero {
    margin-bottom: 10px;
}

.tn-aup__hero-main {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.tn-aup__avatar {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface-2);
    overflow: hidden;
}

.tn-aup__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-aup__identity {
    min-width: 0;
    flex: 1;
}

.tn-aup__name {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.tn-aup__phone {
    margin: 4px 0 0;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-aup__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tn-aup__badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border: 1px solid var(--tn-border);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}

.tn-aup__badge--admin {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.tn-aup__badge--partner {
    border-color: var(--tn-primary);
    background: var(--tn-primary-soft);
    color: var(--tn-primary);
}

.tn-aup__badge--staff {
    border-color: #fde68a;
    background: #fffbeb;
    color: #d97706;
}

.tn-aup__badge--client {
    border-color: var(--tn-border);
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}

.tn-aup__badge--premium {
    border-color: #86efac;
    background: #ecfdf3;
    color: #16a34a;
}

.tn-aup__badge--free {
    border-color: var(--tn-border);
    background: var(--tn-surface-2);
    color: var(--tn-muted);
}

.tn-aup__badge--tg {
    border-color: #7dd3fc;
    background: #f0f9ff;
    color: #0284c7;
}

.tn-aup__badge--blocked {
    border-color: #fecaca;
    background: #fef2f2;
    color: #dc2626;
}

.tn-aup__meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

@media (min-width: 768px) {
    .tn-aup__meta-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1100px) {
    .tn-aup__meta-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.tn-aup__meta {
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
    padding: 10px 12px;
    min-width: 0;
}

.tn-aup__meta--wide {
    grid-column: 1 / -1;
}

.tn-aup__meta-label {
    display: block;
    margin-bottom: 4px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-muted);
}

.tn-aup__meta-value {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--tn-text);
    word-break: break-word;
}

.tn-aup__meta-value--mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
}

.tn-aup__meta-value--danger {
    color: #dc2626;
}

.tn-aup__link {
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-weight: 700;
    color: var(--tn-primary);
    cursor: pointer;
    text-align: left;
}

.tn-aup__link:hover {
    text-decoration: underline;
}

.tn-aup__ips {
    margin-top: 16px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-aup__ips-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
}

.tn-aup__ips-title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-aup__ips-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-muted);
    white-space: nowrap;
}

.tn-aup__ips-table-wrap {
    overflow-x: auto;
}

.tn-aup__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.tn-aup__table th,
.tn-aup__table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--tn-border-light);
    text-align: left;
    vertical-align: top;
}

.tn-aup__table th {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--tn-muted);
    background: var(--tn-surface);
    white-space: nowrap;
}

.tn-aup__table tbody tr:hover td {
    background: var(--tn-surface-2);
}

.tn-aup__table tbody tr:last-child td {
    border-bottom: none;
}

.tn-aup__table-ip {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 600;
    color: var(--tn-text);
    white-space: nowrap;
}

.tn-aup__pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--tn-border-light);
    background: var(--tn-surface-2);
}

.tn-aup__pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    min-width: 96px;
    padding: 0 12px;
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    color: var(--tn-text);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.tn-aup__pager-btn:hover:not(.is-disabled) {
    border-color: var(--tn-primary);
    color: var(--tn-primary);
    background: var(--tn-primary-soft);
}

.tn-aup__pager-btn.is-disabled {
    opacity: 0.45;
    cursor: default;
    pointer-events: none;
}

.tn-aup__pager-status {
    flex: 1;
    text-align: center;
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-aup__pager-status strong {
    color: var(--tn-text);
    font-weight: 800;
}

@media (max-width: 520px) {
    .tn-aup__pager {
        flex-wrap: wrap;
        justify-content: center;
    }

    .tn-aup__pager-status {
        order: -1;
        width: 100%;
        margin-bottom: 4px;
    }

    .tn-aup__pager-btn {
        flex: 1;
        min-width: 0;
    }
}

.tn-aup__tab-count {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    border: 1px solid currentColor;
    font-size: 10px;
    font-weight: 800;
    opacity: 0.85;
}

.tn-admin-tabs__btn.is-active .tn-aup__tab-count,
.tn-admin-tabs__btn.active .tn-aup__tab-count {
    border-color: rgba(255, 255, 255, 0.45);
    opacity: 1;
}

.tn-aup .tab-content {
    display: none;
}

.tn-aup .tab-content.active {
    display: block;
}

.tn-aup__list-item {
    cursor: pointer;
    margin-bottom: 8px;
}

.tn-aup__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tn-aup__thumb--avatar img {
    object-fit: cover;
}

.tn-aup__list-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    flex-shrink: 0;
}

.tn-aup__list-accent {
    font-size: 12px;
    font-weight: 800;
    color: var(--tn-primary);
}

.tn-aup__list-muted {
    font-size: 11px;
    font-weight: 600;
    color: var(--tn-muted);
}

.tn-aup__owned-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.tn-aup__review {
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 14px;
    margin-bottom: 8px;
}

.tn-aup__review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.tn-aup__review-est {
    font-size: 14px;
    font-weight: 800;
}

.tn-aup__review-stars {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.tn-aup__review-text {
    margin: 0 0 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--tn-muted);
}

.tn-aup__review-date {
    font-size: 11px;
    color: var(--tn-muted);
}

.tn-aup__empty {
    margin: 8px 0 12px;
}

.tn-aup__subscription {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid var(--tn-border-light);
    background: var(--tn-surface);
}

.tn-aup__subscription-head {
    margin-bottom: 12px;
}

.tn-aup__subscription-title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 800;
    color: var(--tn-text);
}

.tn-aup__subscription-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.tn-aup__subscription-expires {
    font-size: 13px;
    color: var(--tn-muted);
}

.tn-aup__subscription-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tn-aup__subscription-actions .tn-btn {
    min-height: 40px;
}

html[data-theme="dark"] .tn-aup__badge--premium {
    border-color: #166534;
    background: #14532d;
    color: #86efac;
}

html[data-theme="dark"] .tn-aup__badge--admin {
    border-color: #7f1d1d;
    background: #450a0a;
    color: #fca5a5;
}

html[data-theme="dark"] .tn-aup__badge--tg {
    border-color: #075985;
    background: #0c4a6e;
    color: #7dd3fc;
}

.tn-aup__field-label {
    display: block;
    margin: 0 0 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--tn-muted);
}

.tn-aup__actions {
    display: grid;
    gap: 8px;
    margin-top: 16px;
    padding-bottom: 24px;
}

.tn-aup-modal {
    position: fixed;
    inset: 0;
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.tn-aup-modal[hidden] {
    display: none !important;
}

.tn-aup-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tn-aup-modal__panel {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    border: 1px solid var(--tn-border);
    background: var(--tn-surface);
    padding: 20px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.18);
}

.tn-aup-modal__title {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 800;
}

.tn-aup-modal__text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.45;
    color: var(--tn-muted);
}

.tn-aup-modal__input {
    width: 100%;
    margin-bottom: 10px;
    border-radius: 0 !important;
}

.tn-aup-modal__actions {
    display: flex;
    gap: 8px;
    margin-top: 4px;
}

.tn-aup-modal__actions .tn-btn {
    flex: 1;
}

.tn-aup .tn-btn--danger {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

.tn-aup .tn-stat-grid {
    margin-bottom: 10px;
}

@media (max-width: 640px) {
    .tn-aup__hero-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .tn-aup__meta-grid {
        grid-template-columns: 1fr;
    }
}

[data-theme="dark"] .tn-aup__badge--admin,
[data-theme="dark"] .tn-aup__badge--blocked {
    background: rgba(220, 38, 38, 0.12);
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

[data-theme="dark"] .tn-aup__badge--premium {
    background: rgba(22, 163, 74, 0.12);
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

[data-theme="dark"] .tn-aup__badge--staff {
    background: rgba(217, 119, 6, 0.12);
    border-color: rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

[data-theme="dark"] .tn-aup__badge--tg {
    background: rgba(2, 132, 199, 0.12);
    border-color: rgba(56, 189, 248, 0.35);
    color: #7dd3fc;
}

[data-theme="dark"] .tn-aup-modal__panel {
    background: var(--tn-surface);
    border-color: var(--tn-border);
}

[data-theme="dark"] .tn-aup .tn-btn--danger {
    background: rgba(220, 38, 38, 0.15) !important;
    border-color: rgba(248, 113, 113, 0.35) !important;
    color: #fca5a5 !important;
}

