/* Trezo-inspired dashboard theme (light / dark) */

:root,
[data-theme="light"] {
    --trezo-primary: #605dff;
    --trezo-primary-hover: #524fd9;
    --trezo-primary-soft: rgba(96, 93, 255, 0.12);
    --trezo-success: #37d80a;
    --trezo-success-soft: rgba(55, 216, 10, 0.12);
    --trezo-warning: #ffbc2b;
    --trezo-warning-soft: rgba(255, 188, 43, 0.15);
    --trezo-danger: #fd5812;
    --trezo-danger-soft: rgba(253, 88, 18, 0.12);
    --trezo-info: #2db6f5;
    --trezo-info-soft: rgba(45, 182, 245, 0.12);

    --trezo-body-bg: #f6f7f9;
    --trezo-surface: #ffffff;
    --trezo-surface-2: #f4f6fc;
    --trezo-border: #eceef2;
    --trezo-text: #64748b;
    --trezo-text-muted: #8695aa;
    --trezo-heading: #3a4252;

    --trezo-sidebar-bg: #ffffff;
    --trezo-sidebar-text: #64748b;
    --trezo-sidebar-text-active: #605dff;
    --trezo-sidebar-hover: #f4f6fc;
    --trezo-sidebar-border: #eceef2;

    --trezo-header-bg: #ffffff;
    --trezo-header-border: #eceef2;
    --trezo-shadow: 0 1px 3px rgba(47, 43, 61, 0.06);
    --trezo-radius: 8px;
    --trezo-radius-lg: 10px;
    --trezo-sidebar-width: 250px;
    --trezo-header-height: 64px;
    --trezo-sticky-gap: 12px;
    --trezo-sticky-top: calc(var(--trezo-header-height) + var(--trezo-sticky-gap));

    /* Typography — Trezo CRM (Inter, 14px body) */
    --trezo-font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --trezo-font-base: 14px;
    --trezo-line-height: 1.5;
    --trezo-fs-xs: 12px;
    --trezo-fs-sm: 13px;
    --trezo-fs-md: 14px;
    --trezo-fs-lg: 16px;
    --trezo-fs-xl: 20px;
    --trezo-fs-2xl: 26px;
    --trezo-fs-stat: 24px;

    --trezo-space-page: 20px;
    --trezo-space-section: 20px;
    --trezo-space-grid: 16px;
    --trezo-space-card: 16px;

    --trezo-scrollbar-size: 6px;
    --trezo-scrollbar-size-thin: 4px;
    --trezo-scrollbar-track: transparent;
    --trezo-scrollbar-thumb: rgba(100, 116, 139, 0.22);
    --trezo-scrollbar-thumb-hover: rgba(100, 116, 139, 0.38);
    --trezo-scrollbar-thumb-subtle: rgba(100, 116, 139, 0.16);
    --trezo-scrollbar-thumb-subtle-hover: rgba(100, 116, 139, 0.28);

    --trezo-btn-radius: 6px;
    --trezo-btn-secondary: #3a4252;
    --trezo-btn-secondary-hover: #313846;
    --trezo-btn-light: #d5d9e2;
    --trezo-btn-light-hover: #b5b8c0;

    --trezo-table-head-bg: transparent;
    --trezo-table-row-hover: #f4f6fc;
    --trezo-table-cell-y: 13px;
    --trezo-table-cell-x: 16px;
}

[data-theme="dark"] {
    --trezo-body-bg: #0a0e19;
    --trezo-surface: #0c1427;
    --trezo-surface-2: #15203c;
    --trezo-border: #172036;
    --trezo-text: #8695aa;
    --trezo-text-muted: #64748b;
    --trezo-heading: #ffffff;

    --trezo-primary-soft: rgba(96, 93, 255, 0.16);
    --trezo-success-soft: rgba(55, 216, 10, 0.12);
    --trezo-warning-soft: rgba(255, 188, 43, 0.12);
    --trezo-danger-soft: rgba(253, 88, 18, 0.12);
    --trezo-info-soft: rgba(45, 182, 245, 0.12);

    --trezo-sidebar-bg: #0c1427;
    --trezo-sidebar-text: #8695aa;
    --trezo-sidebar-text-active: #ffffff;
    --trezo-sidebar-hover: #15203c;
    --trezo-sidebar-border: #172036;

    --trezo-header-bg: #0c1427;
    --trezo-header-border: #172036;
    --trezo-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);

    --trezo-scrollbar-track: transparent;
    --trezo-scrollbar-thumb: rgba(134, 149, 170, 0.22);
    --trezo-scrollbar-thumb-hover: rgba(134, 149, 170, 0.4);
    --trezo-scrollbar-thumb-subtle: rgba(134, 149, 170, 0.14);
    --trezo-scrollbar-thumb-subtle-hover: rgba(134, 149, 170, 0.26);

    --trezo-table-row-hover: rgba(255, 255, 255, 0.03);
}

.trezo-lucide-icon,
svg.lucide {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
    width: 1.125em;
    height: 1.125em;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trezo-btn .trezo-lucide-icon,
.trezo-btn svg.lucide {
    width: 16px;
    height: 16px;
}

.trezo-card-title .trezo-lucide-icon,
.trezo-card-title svg.lucide {
    width: 20px;
    height: 20px;
    color: var(--trezo-primary);
}

html[data-theme="dark"] .trezo-theme-icon-light,
html[data-theme="light"] .trezo-theme-icon-dark {
    display: none;
}

* {
    box-sizing: border-box;
}

body.trezo-body {
    margin: 0;
    padding: 0;
    font-family: var(--trezo-font-family);
    font-size: var(--trezo-font-base);
    line-height: var(--trezo-line-height);
    background: var(--trezo-body-bg);
    color: var(--trezo-text);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.trezo-wrapper {
    display: flex;
    min-height: 100vh;
}

.trezo-sidebar {
    width: var(--trezo-sidebar-width);
    flex-shrink: 0;
    background: var(--trezo-sidebar-bg);
    border-right: 1px solid var(--trezo-sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    transition: transform 0.25s ease, width 0.25s ease, opacity 0.25s ease;
}

.trezo-wrapper.sidebar-collapsed {
    --trezo-sidebar-width: 0px;
}

.trezo-wrapper.sidebar-collapsed .trezo-sidebar {
    transform: translateX(-100%);
    opacity: 0;
    pointer-events: none;
}

.trezo-wrapper.sidebar-collapsed .trezo-main-area {
    margin-left: 0;
}

.trezo-sidebar-brand {
    padding: 14px 16px;
    border-bottom: 1px solid var(--trezo-sidebar-border);
    min-height: 64px;
    display: flex;
    align-items: center;
}

.trezo-sidebar-brand .trezo-brand-link {
    display: flex;
    align-items: center;
    width: 100%;
    text-decoration: none;
}

.trezo-brand-logo {
    height: 30px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    display: block;
}

[data-theme="dark"] .trezo-brand-logo {
    filter: brightness(0) invert(1);
}

.trezo-sidebar-nav {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px 12px 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--trezo-scrollbar-thumb) var(--trezo-scrollbar-track);
    scrollbar-gutter: stable;
}

.trezo-sidebar-nav::-webkit-scrollbar {
    width: var(--trezo-scrollbar-size);
}

.trezo-sidebar-nav::-webkit-scrollbar-track {
    background: var(--trezo-scrollbar-track);
    margin: 6px 0;
    border-radius: 999px;
}

.trezo-sidebar-nav::-webkit-scrollbar-thumb {
    background-color: var(--trezo-scrollbar-thumb);
    border-radius: 999px;
    border: 1px solid transparent;
    background-clip: padding-box;
}

.trezo-sidebar-nav::-webkit-scrollbar-thumb:hover {
    background-color: var(--trezo-scrollbar-thumb-hover);
}

.trezo-sidebar-nav::-webkit-scrollbar-corner {
    background: transparent;
}

.trezo-nav-label {
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--trezo-text-muted);
    margin: 12px 10px 5px;
}

.trezo-nav-label:first-child {
    margin-top: 0;
}

.trezo-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 7px;
    color: var(--trezo-sidebar-text);
    text-decoration: none;
    font-size: var(--trezo-fs-md);
    font-weight: 500;
    transition: all 0.2s ease;
}

.trezo-nav-link i,
.trezo-nav-link .trezo-lucide-icon,
.trezo-nav-link svg.lucide {
    width: 18px;
    height: 18px;
    text-align: center;
    font-size: 18px;
    flex-shrink: 0;
}

.trezo-nav-link:hover,
.trezo-nav-link.active {
    background: var(--trezo-sidebar-hover);
    color: var(--trezo-sidebar-text-active);
    text-decoration: none;
}

.trezo-nav-link.active {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}

[data-theme="dark"] .trezo-nav-link.active {
    color: #ffffff;
    background: rgba(96, 93, 255, 0.18);
}

.trezo-sidebar-footer {
    padding: 12px;
    border-top: 1px solid var(--trezo-sidebar-border);
}

.trezo-main-area {
    flex: 1;
    margin-left: var(--trezo-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.trezo-header {
    height: 64px;
    background: var(--trezo-header-bg);
    border-bottom: 1px solid var(--trezo-header-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 1030;
}

.trezo-header-left,
.trezo-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.trezo-icon-btn {
    width: 38px;
    height: 38px;
    border: 1px solid var(--trezo-border);
    border-radius: 50%;
    background: var(--trezo-surface);
    color: var(--trezo-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

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

.trezo-icon-btn .trezo-lucide-icon,
.trezo-icon-btn svg.lucide {
    width: 18px;
    height: 18px;
}

.trezo-balance-badge {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: var(--trezo-success-soft);
    color: var(--trezo-success);
    font-weight: 600;
    font-size: var(--trezo-fs-sm);
    text-decoration: none;
}

.trezo-balance-badge:hover {
    text-decoration: none;
    color: var(--trezo-success);
    opacity: 0.9;
}

.trezo-user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px 6px 6px;
    border: 1px solid var(--trezo-border);
    border-radius: 999px;
    background: var(--trezo-surface);
}

.trezo-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--trezo-primary), #9747ff);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--trezo-fs-sm);
    font-weight: 700;
}

.trezo-user-name {
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.3;
}

.trezo-user-id {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-content {
    padding: var(--trezo-space-page);
    flex: 1;
}

.trezo-page-header {
    margin-bottom: var(--trezo-space-section);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.trezo-page-header-main {
    flex: 1;
    min-width: 220px;
}

/* Equal vertical rhythm between page sections (header, hero, stats, cards) */
.trezo-page-stack,
.trezo-doc-page,
.trezo-dispatch-page,
.trezo-ticket-page,
.trezo-module-page {
    display: flex;
    flex-direction: column;
    gap: var(--trezo-space-section);
}

.trezo-page-stack > :is(.trezo-page-header, .trezo-stats-grid, .trezo-card, .trezo-admin-content, .trezo-admin-workspace, .trezo-list-filter-card, .trezo-alert-inline, .trezo-notice-banner, .trezo-ticket-hero, .trezo-ticket-grid, .trezo-dispatch-board-header, .container-fluid),
.trezo-doc-page > :is(.trezo-page-header, .trezo-stats-grid, .trezo-card, .trezo-admin-content, .trezo-ticket-hero),
.trezo-dispatch-page > :is(.trezo-page-header, .trezo-stats-grid, .trezo-card, .trezo-ticket-hero, .trezo-ticket-grid),
.trezo-ticket-page > :is(.trezo-page-header, .trezo-ticket-hero, .trezo-ticket-grid),
.trezo-module-page > :is(.trezo-page-header, .trezo-card) {
    margin-top: 0;
    margin-bottom: 0;
}

/* Hero banner + stat cards: extra air (flex gap alone looks too tight) */
:is(.trezo-page-stack, .trezo-doc-page, .trezo-dispatch-page, .trezo-ticket-page) > .trezo-ticket-hero + .trezo-stats-grid {
    margin-top: var(--trezo-space-section);
}

.trezo-role-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
}

.trezo-role-badge .trezo-lucide-icon,
.trezo-role-badge svg.lucide {
    width: 14px;
    height: 14px;
}

.trezo-role-badge-support,
.trezo-role-badge-finance {
    background: var(--trezo-surface-2);
    border-color: var(--trezo-border);
    color: var(--trezo-text-muted);
}

.trezo-page-title {
    margin: 0 0 4px;
    font-size: var(--trezo-fs-xl);
    font-weight: 700;
    color: var(--trezo-heading);
    line-height: 1.2;
}

.trezo-page-subtitle {
    margin: 0;
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-md);
}

.trezo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--trezo-fs-md);
    color: var(--trezo-text-muted);
}

.trezo-breadcrumb a {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--trezo-space-grid);
    margin-bottom: var(--trezo-space-section);
}

.trezo-stats-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.trezo-stat-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    padding: 14px 16px;
    box-shadow: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

a.trezo-stat-card-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.trezo-stat-card-link:hover {
    border-color: rgba(245, 158, 11, 0.45);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.08);
    color: inherit;
    text-decoration: none;
}

a.trezo-stat-card-link.is-active {
    border-color: rgba(245, 158, 11, 0.55);
    background: rgba(245, 158, 11, 0.05);
}

a.trezo-stat-card-link-open:hover {
    border-color: rgba(34, 197, 94, 0.45);
    box-shadow: 0 2px 8px rgba(34, 197, 94, 0.08);
}

a.trezo-stat-card-link-open.is-active {
    border-color: rgba(34, 197, 94, 0.55);
    background: rgba(34, 197, 94, 0.05);
}

.trezo-ticket-presets {
    margin-top: -4px;
}

.trezo-stat-label {
    font-size: var(--trezo-fs-md);
    color: var(--trezo-text-muted);
    margin-bottom: 6px;
}

.trezo-stat-value {
    font-size: var(--trezo-fs-stat);
    font-weight: 700;
    color: var(--trezo-heading);
    line-height: 1.15;
}

.trezo-stat-meta {
    margin-top: 4px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-stat-meta a {
    color: var(--trezo-text-muted);
    font-weight: 500;
    text-decoration: none;
}

.trezo-stat-meta a:hover {
    color: var(--trezo-primary);
}

.trezo-stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.trezo-stat-icon.primary { background: var(--trezo-primary-soft); color: var(--trezo-primary); }
.trezo-stat-icon.success { background: var(--trezo-success-soft); color: #25b003; }
.trezo-stat-icon.warning { background: var(--trezo-warning-soft); color: #fe7a36; }
.trezo-stat-icon.info { background: var(--trezo-info-soft); color: var(--trezo-info); }
.trezo-stat-icon .trezo-lucide-icon,
.trezo-stat-icon svg.lucide {
    width: 20px;
    height: 20px;
}

.trezo-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    box-shadow: none;
    margin-bottom: var(--trezo-space-section);
}

.trezo-card-header {
    padding: var(--trezo-space-card) var(--trezo-space-card) 0;
}

.trezo-card-title {
    margin: 0;
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    color: var(--trezo-heading);
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trezo-card-subtitle {
    margin: 4px 0 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-card-body {
    padding: var(--trezo-space-card);
}

.trezo-grid-2,
.trezo-grid-sections {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--trezo-space-grid);
}

.trezo-api-key {
    font-family: Consolas, Monaco, monospace;
    font-size: var(--trezo-fs-sm);
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--trezo-surface-2);
    border: 1px dashed var(--trezo-border);
    color: var(--trezo-heading);
    word-break: break-all;
    line-height: 1.5;
}

.trezo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--trezo-btn-radius);
    font-size: var(--trezo-fs-md);
    font-weight: 400;
    line-height: 1.5;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    white-space: nowrap;
}

.trezo-btn:focus-visible {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.25);
}

.trezo-btn:disabled,
.trezo-btn.disabled,
.trezo-btn[disabled] {
    opacity: 0.65;
    pointer-events: none;
}

/* Basic buttons */
.trezo-btn-primary {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

.trezo-btn-primary:hover,
.trezo-btn-primary:focus {
    background: var(--trezo-primary-hover);
    border-color: var(--trezo-primary-hover);
    color: #fff;
    text-decoration: none;
}

.trezo-btn-secondary {
    background: var(--trezo-btn-secondary);
    border-color: var(--trezo-btn-secondary);
    color: #fff;
}

.trezo-btn-secondary:hover,
.trezo-btn-secondary:focus {
    background: var(--trezo-btn-secondary-hover);
    border-color: var(--trezo-btn-secondary-hover);
    color: #fff;
    text-decoration: none;
}

.trezo-btn-success {
    background: var(--trezo-success);
    border-color: var(--trezo-success);
    color: #000;
}

.trezo-btn-success:hover,
.trezo-btn-success:focus {
    background: #55de2f;
    border-color: #4bdc23;
    color: #000;
    text-decoration: none;
}

.trezo-btn-danger {
    background: var(--trezo-danger);
    border-color: var(--trezo-danger);
    color: #000;
}

.trezo-btn-danger:hover,
.trezo-btn-danger:focus {
    background: #fd7136;
    border-color: #fd692a;
    color: #000;
    text-decoration: none;
}

.trezo-btn-warning {
    background: var(--trezo-warning);
    border-color: var(--trezo-warning);
    color: #000;
}

.trezo-btn-warning:hover,
.trezo-btn-warning:focus {
    background: #ffc64b;
    border-color: #ffc340;
    color: #000;
    text-decoration: none;
}

.trezo-btn-info {
    background: var(--trezo-info);
    border-color: var(--trezo-info);
    color: #000;
}

.trezo-btn-info:hover,
.trezo-btn-info:focus {
    background: #4dc1f7;
    border-color: #42bdf6;
    color: #000;
    text-decoration: none;
}

.trezo-btn-light {
    background: var(--trezo-btn-light);
    border-color: var(--trezo-btn-light);
    color: #000;
}

.trezo-btn-light:hover,
.trezo-btn-light:focus {
    background: var(--trezo-btn-light-hover);
    border-color: #aaaeb5;
    color: #000;
    text-decoration: none;
}

.trezo-btn-dark {
    background: #000;
    border-color: #000;
    color: #fff;
}

.trezo-btn-dark:hover,
.trezo-btn-dark:focus {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
    text-decoration: none;
}

.trezo-btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--trezo-primary);
    padding-left: 0;
    padding-right: 0;
}

.trezo-btn-link:hover,
.trezo-btn-link:focus {
    color: var(--trezo-primary-hover);
    text-decoration: underline;
}

/* Outline buttons */
.trezo-btn-outline,
.trezo-btn-outline-secondary {
    background: transparent;
    border-color: var(--trezo-btn-secondary);
    color: var(--trezo-btn-secondary);
}

.trezo-btn-outline:hover,
.trezo-btn-outline:focus,
.trezo-btn-outline-secondary:hover,
.trezo-btn-outline-secondary:focus {
    background: var(--trezo-btn-secondary);
    border-color: var(--trezo-btn-secondary);
    color: #fff;
    text-decoration: none;
}

.trezo-btn-outline-primary {
    background: transparent;
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
}

.trezo-btn-outline-primary:hover,
.trezo-btn-outline-primary:focus {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
    text-decoration: none;
}

.trezo-btn-outline-success {
    background: transparent;
    border-color: var(--trezo-success);
    color: var(--trezo-success);
}

.trezo-btn-outline-success:hover,
.trezo-btn-outline-success:focus {
    background: var(--trezo-success);
    border-color: var(--trezo-success);
    color: #000;
    text-decoration: none;
}

.trezo-btn-outline-danger {
    background: transparent;
    border-color: var(--trezo-danger);
    color: var(--trezo-danger);
}

.trezo-btn-outline-danger:hover,
.trezo-btn-outline-danger:focus {
    background: var(--trezo-danger);
    border-color: var(--trezo-danger);
    color: #000;
    text-decoration: none;
}

.trezo-btn-outline-warning {
    background: transparent;
    border-color: var(--trezo-warning);
    color: var(--trezo-warning);
}

.trezo-btn-outline-warning:hover,
.trezo-btn-outline-warning:focus {
    background: var(--trezo-warning);
    border-color: var(--trezo-warning);
    color: #000;
    text-decoration: none;
}

.trezo-btn-outline-info {
    background: transparent;
    border-color: var(--trezo-info);
    color: var(--trezo-info);
}

.trezo-btn-outline-info:hover,
.trezo-btn-outline-info:focus {
    background: var(--trezo-info);
    border-color: var(--trezo-info);
    color: #000;
    text-decoration: none;
}

.trezo-btn-outline-light {
    background: transparent;
    border-color: var(--trezo-btn-light);
    color: var(--trezo-heading);
}

.trezo-btn-outline-light:hover,
.trezo-btn-outline-light:focus {
    background: var(--trezo-btn-light);
    border-color: var(--trezo-btn-light);
    color: #000;
    text-decoration: none;
}

.trezo-btn-outline-dark {
    background: transparent;
    border-color: #000;
    color: #000;
}

.trezo-btn-outline-dark:hover,
.trezo-btn-outline-dark:focus {
    background: #000;
    border-color: #000;
    color: #fff;
    text-decoration: none;
}

/* Sizes */
.trezo-btn-sm {
    padding: 4px 8px;
    font-size: var(--trezo-fs-xs);
    border-radius: 5px;
}

.trezo-btn-lg {
    padding: 8px 16px;
    font-size: var(--trezo-fs-lg);
    border-radius: 8px;
}

html[data-theme="dark"] .trezo-btn-outline,
html[data-theme="dark"] .trezo-btn-outline-secondary {
    background: var(--trezo-body-bg);
    border-color: var(--trezo-border);
    color: var(--trezo-heading);
}

html[data-theme="dark"] .trezo-btn-outline:hover,
html[data-theme="dark"] .trezo-btn-outline:focus,
html[data-theme="dark"] .trezo-btn-outline-secondary:hover,
html[data-theme="dark"] .trezo-btn-outline-secondary:focus {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

html[data-theme="dark"] .trezo-btn-outline-primary {
    background: transparent;
    border-color: var(--trezo-primary);
    color: #fff;
}

html[data-theme="dark"] .trezo-btn-outline-primary:hover,
html[data-theme="dark"] .trezo-btn-outline-primary:focus {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

html[data-theme="dark"] .trezo-btn-light {
    background: var(--trezo-surface-2);
    border-color: var(--trezo-border);
    color: var(--trezo-heading);
}

html[data-theme="dark"] .trezo-btn-link {
    color: #fff;
}

html[data-theme="dark"] .trezo-btn-link:hover,
html[data-theme="dark"] .trezo-btn-link:focus {
    color: var(--trezo-primary);
}

.trezo-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.trezo-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.trezo-quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text);
    text-decoration: none;
    text-align: center;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
    min-height: 88px;
}

.trezo-quick-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-quick-item-icon .trezo-lucide-icon,
.trezo-quick-item-icon svg.lucide,
.trezo-quick-item > .trezo-lucide-icon,
.trezo-quick-item > svg.lucide,
.trezo-quick-item > i[data-lucide] {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    flex-shrink: 0;
}

.trezo-quick-item > .trezo-lucide-icon,
.trezo-quick-item > svg.lucide,
.trezo-quick-item > i[data-lucide] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    color: var(--trezo-primary);
    box-sizing: border-box;
}

.trezo-quick-item > svg.lucide {
    width: 18px;
    height: 18px;
    padding: 9px;
    box-sizing: content-box;
}

.trezo-quick-item span:not(.trezo-quick-item-icon) {
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
    color: var(--trezo-heading);
    line-height: 1.35;
}

.trezo-quick-item:hover {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    text-decoration: none;
}

.trezo-quick-item:hover .trezo-quick-item-icon,
.trezo-quick-item:hover > svg.lucide,
.trezo-quick-item:hover > .trezo-lucide-icon {
    color: var(--trezo-primary);
    border-color: rgba(96, 93, 255, 0.25);
    background: var(--trezo-surface);
}

.trezo-section-card {
    height: 100%;
    margin-bottom: 0;
}

.trezo-link-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.trezo-link-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--trezo-text);
    text-decoration: none;
    font-size: var(--trezo-fs-md);
    font-weight: 500;
    transition: all 0.2s ease;
}

.trezo-link-item i,
.trezo-link-item .trezo-lucide-icon,
.trezo-link-item svg.lucide {
    width: 18px;
    height: 18px;
    font-size: 17px;
    color: var(--trezo-primary);
    text-align: center;
    flex-shrink: 0;
}

.trezo-link-item:hover {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-partner-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: var(--trezo-fs-md);
    font-weight: 500;
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-logout-form {
    margin: 0;
}

.trezo-content .alert {
    border-radius: var(--trezo-radius);
    font-size: var(--trezo-fs-md);
}

.trezo-notice-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--trezo-space-section);
    padding: 10px 12px;
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
}

.trezo-notice-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
    flex-shrink: 0;
}

.trezo-notice-body {
    flex: 1;
    min-width: 0;
}

.trezo-notice-title {
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.3;
}

.trezo-notice-text {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    margin-top: 2px;
}

@media (max-width: 1199px) {
    .trezo-stats-grid,
    .trezo-stats-grid-3,
    .trezo-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 991px) {
    .trezo-grid-2,
    .trezo-grid-sections {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .trezo-sidebar {
        transform: translateX(-100%);
    }

    .trezo-wrapper.sidebar-open .trezo-sidebar {
        transform: translateX(0);
    }

    .trezo-main-area {
        margin-left: 0;
    }

    .trezo-header {
        height: auto;
        min-height: 56px;
        padding: 8px 12px;
        gap: 8px;
    }

    :root,
    [data-theme="light"],
    [data-theme="dark"] {
        --trezo-header-height: 56px;
    }

    .trezo-header-left {
        flex: 1;
        min-width: 0;
    }

    .trezo-header-right {
        flex-shrink: 0;
        gap: 6px;
    }

    .trezo-breadcrumb {
        display: none;
    }

    .trezo-balance-badge {
        padding: 5px 9px;
        font-size: 12px;
    }

    .trezo-user-chip {
        padding: 2px;
        border: none;
        background: transparent;
    }

    .trezo-stats-grid,
    .trezo-stats-grid-3 {
        grid-template-columns: 1fr;
    }

    .trezo-user-chip .trezo-user-name,
    .trezo-user-chip .trezo-user-id {
        display: none;
    }

    .trezo-content {
        padding: 14px 12px;
        overflow-x: hidden;
    }

    .trezo-page-header-main {
        min-width: 0;
        flex: 1 1 100%;
    }

    .trezo-admin-toolbar-actions {
        width: 100%;
    }

    .trezo-record-head {
        flex-direction: column;
        align-items: stretch;
    }

    .trezo-order-headline {
        min-width: 0;
        max-width: 100%;
    }

    .trezo-record-sub,
    .trezo-record-title {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .trezo-record-card {
        max-width: 100%;
    }

    .trezo-table-pager {
        margin: 0;
        max-width: 100%;
        justify-content: center;
    }

    .trezo-table-pager .pagination {
        flex-wrap: nowrap;
        justify-content: center;
        gap: 2px;
    }

    .trezo-table-pager .pagination > li > a,
    .trezo-table-pager .pagination > li > span {
        min-width: 26px;
        min-height: 26px;
        padding: 2px 6px;
        font-size: 11px;
    }

    .trezo-table-pager .pagination > .first,
    .trezo-table-pager .pagination > .last {
        display: none;
    }

    .trezo-page-title {
        font-size: var(--trezo-fs-lg);
    }

    .trezo-page-subtitle {
        font-size: var(--trezo-fs-sm);
    }

    .trezo-notice-banner {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 12px;
    }

    .trezo-notice-banner > .trezo-btn {
        width: 100%;
        justify-content: center;
    }

    .trezo-stat-card {
        padding: 12px 14px;
    }

    .trezo-stat-value {
        font-size: var(--trezo-fs-lg);
    }

    .trezo-stat-icon {
        width: 34px;
        height: 34px;
    }

    .trezo-grid-2 {
        gap: 12px;
    }

    .trezo-card-body,
    .trezo-card-header {
        padding-left: 14px;
        padding-right: 14px;
    }

    .trezo-api-key {
        font-size: 12px;
        padding: 10px 12px;
    }

    .trezo-btn-group {
        flex-direction: column;
        gap: 6px;
    }

    .trezo-btn-group .trezo-btn {
        width: 100%;
        white-space: normal;
        justify-content: center;
    }

    .trezo-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .trezo-quick-item {
        min-height: 76px;
        padding: 10px 6px;
    }

    .trezo-card-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .trezo-card-header-row > .trezo-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ===== PRODUCTS BLOCK ===== */
.trezo-products {
    margin-bottom: var(--trezo-space-section);
}

.trezo-products .products-header {
    margin-bottom: 12px;
}

.trezo-products .products-header h1 {
    margin: 0 0 2px;
    font-size: var(--trezo-fs-lg);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-products .products-header .subtitle {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-products .products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--trezo-space-grid);
    margin-bottom: var(--trezo-space-section);
    align-items: stretch;
}

.trezo-products .products-grid-main {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1199px) {
    .trezo-products .products-grid-main {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

.trezo-products .product-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    box-shadow: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.trezo-products .product-card.priority {
    border-left: 3px solid var(--trezo-border);
}

.trezo-products .product-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--trezo-border);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    min-height: 62px;
}

.trezo-products .product-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-products .product-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    flex-shrink: 0;
}

.trezo-products .product-icon .trezo-lucide-icon,
.trezo-products .product-icon svg.lucide,
.trezo-products .product-card-simple .product-icon .trezo-lucide-icon,
.trezo-products .product-card-simple .product-icon svg.lucide {
    width: 18px;
    height: 18px;
}

.trezo-products .product-actions .trezo-lucide-icon,
.trezo-products .product-actions svg.lucide,
.trezo-products .notification-action .trezo-lucide-icon,
.trezo-products .notification-action svg.lucide {
    width: 14px;
    height: 14px;
    margin-right: 4px;
}

.trezo-products .product-icon.photo {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}
.trezo-products .product-icon.photo .trezo-lucide-icon,
.trezo-products .product-icon.photo svg.lucide { color: var(--trezo-primary); stroke: var(--trezo-primary); }

.trezo-products .product-icon.software {
    background: var(--trezo-surface-2);
    color: var(--trezo-text);
}
.trezo-products .product-icon.software .trezo-lucide-icon,
.trezo-products .product-icon.software svg.lucide { color: var(--trezo-text); stroke: var(--trezo-text); }

.trezo-products .product-icon.website {
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
}
.trezo-products .product-icon.website .trezo-lucide-icon,
.trezo-products .product-icon.website svg.lucide { color: var(--trezo-text-muted); stroke: var(--trezo-text-muted); }

.trezo-products .product-icon.queue,
.trezo-products .product-icon.connector,
.trezo-products .product-icon.sync,
.trezo-products .product-icon.qr {
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
}
.trezo-products .product-icon.queue .trezo-lucide-icon,
.trezo-products .product-icon.queue svg.lucide,
.trezo-products .product-icon.connector .trezo-lucide-icon,
.trezo-products .product-icon.connector svg.lucide,
.trezo-products .product-icon.sync .trezo-lucide-icon,
.trezo-products .product-icon.sync svg.lucide,
.trezo-products .product-icon.qr .trezo-lucide-icon,
.trezo-products .product-icon.qr svg.lucide {
    color: var(--trezo-text-muted);
    stroke: var(--trezo-text-muted);
}

.trezo-products .product-status {
    font-size: var(--trezo-fs-xs);
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
    border: none;
    flex-shrink: 0;
    align-self: flex-start;
    max-width: 46%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trezo-products .product-status.connected {
    background: var(--trezo-success-soft);
    color: #25b003;
}

.trezo-products .product-status.warning {
    background: var(--trezo-warning-soft);
    color: #fe7a36;
}

.trezo-products .product-status.expired {
    background: var(--trezo-danger-soft);
    color: var(--trezo-danger);
}

.trezo-products .product-status.demo {
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
}

.trezo-products .product-status.promo {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}

.trezo-products .product-card.promote {
    border-color: rgba(96, 93, 255, 0.28);
    box-shadow: 0 6px 22px rgba(96, 93, 255, 0.08);
}

.trezo-products .product-card.promote::before {
    content: '';
    display: block;
    height: 3px;
    background: var(--trezo-primary);
}

.trezo-products .product-cta-banner {
    margin-bottom: 0;
    padding: 12px 14px;
    border-radius: var(--trezo-radius);
    background: var(--trezo-primary-soft);
    border: 1px solid rgba(96, 93, 255, 0.18);
    flex: 1 1 auto;
}

.trezo-products .product-cta-title {
    font-size: var(--trezo-fs-md);
    font-weight: 700;
    color: var(--trezo-heading);
    margin-bottom: 4px;
}

.trezo-products .product-cta-text {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    line-height: 1.45;
    color: var(--trezo-text-muted);
}

.trezo-products .product-offer-content {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 176px;
}

.trezo-products .product-card.promote .product-offer-content {
    min-height: 176px;
}

.trezo-products .product-offer-points {
    margin: 10px 0 0;
    padding: 0;
    list-style: none;
}

.trezo-products .product-offer-points li {
    position: relative;
    padding: 0 0 0 14px;
    margin-bottom: 6px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-products .product-offer-points li:last-child {
    margin-bottom: 0;
}

.trezo-products .product-offer-points li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--trezo-primary);
}

.trezo-products .product-offer-points li strong {
    color: var(--trezo-heading);
    font-weight: 600;
}

.trezo-products .product-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.trezo-products .product-info {
    flex: 1 1 auto;
    min-height: 0;
}

.trezo-products .download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 12px;
}

.trezo-products .info-item {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
}

.trezo-products .info-item:last-child {
    border-bottom: none;
}

.trezo-products .info-label {
    color: var(--trezo-text-muted);
    font-weight: 400;
}

.trezo-products .info-value {
    font-weight: 500;
    color: var(--trezo-heading);
    text-align: right;
}

.trezo-products .info-value.expired { color: var(--trezo-danger); }
.trezo-products .info-value.active { color: var(--trezo-text); }
.trezo-products .info-value.warning { color: var(--trezo-warning); }

.trezo-products .product-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--trezo-border);
    flex-shrink: 0;
    min-height: 92px;
    justify-content: flex-end;
}

.trezo-products .product-actions .product-action:not(.product-action-link) {
    width: 100%;
}

.trezo-products .product-action,
.trezo-products .notification-action.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--trezo-btn-radius);
    font-size: var(--trezo-fs-md);
    font-weight: 400;
    line-height: 1.5;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-products .product-action.primary,
.trezo-products .notification-action.btn {
    background: var(--trezo-primary);
    color: #fff;
    border-color: var(--trezo-primary);
}

.trezo-products .product-action.primary:hover,
.trezo-products .notification-action.btn:hover {
    background: var(--trezo-primary-hover);
    border-color: var(--trezo-primary-hover);
    color: #fff;
    text-decoration: none;
}

.trezo-products .product-action.big-button,
.trezo-products .product-action.big-button-caption {
    min-height: 46px;
    font-size: var(--trezo-fs-md);
}

.trezo-products .product-action.secondary {
    background: transparent;
    border-color: var(--trezo-btn-secondary);
    color: var(--trezo-btn-secondary);
}

.trezo-products .product-action.secondary:hover {
    background: var(--trezo-btn-secondary);
    border-color: var(--trezo-btn-secondary);
    color: #fff;
    text-decoration: none;
}

.trezo-products .product-action.warning {
    background: transparent;
    border-color: var(--trezo-warning);
    color: var(--trezo-warning);
}

.trezo-products .product-action.warning:hover {
    background: var(--trezo-warning);
    border-color: var(--trezo-warning);
    color: #000;
    text-decoration: none;
}

.trezo-products .brand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid var(--trezo-border);
    border-radius: 7px;
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
    color: var(--trezo-text);
    background: var(--trezo-surface);
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.trezo-products .brand-btn:hover {
    border-color: var(--trezo-text-muted);
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-products .btn-google i { color: #4285f4; }
.trezo-products .btn-chrome .trezo-lucide-icon,
.trezo-products .btn-chrome svg.lucide { color: #4285f4; stroke: #4285f4; }
.trezo-products .btn-rustore .trezo-lucide-icon,
.trezo-products .btn-rustore svg.lucide { color: var(--trezo-text-muted); stroke: var(--trezo-text-muted); }
.trezo-products .btn-apple i { color: var(--trezo-text); }

.trezo-products .product-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    text-decoration: none;
    align-self: center;
}

.trezo-products .product-action-link:hover {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-products .suggested-products {
    margin-top: 4px;
    padding-top: 16px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-products .suggested-header h2 {
    margin: 0 0 2px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-products .suggested-header p {
    margin: 0 0 12px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-products .product-card-simple {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    padding: 16px;
    text-align: center;
    box-shadow: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trezo-products .product-card-simple > .product-icon,
.trezo-products .product-card-simple > h4,
.trezo-products .product-card-simple > p {
    width: 100%;
}

.trezo-products .product-card-simple h4 {
    margin: 10px 0 6px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-products .product-card-simple p {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    margin: 0 0 12px;
    line-height: 1.45;
    flex: 1 1 auto;
}

.trezo-products .product-card-simple > .notification-action.btn,
.trezo-products .product-card-simple > a.notification-action {
    margin-top: auto;
    width: 100%;
    align-self: stretch;
}

.trezo-products .product-card-simple .qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 auto;
    width: 100%;
}

.trezo-products .product-card-simple .qr-container .trezo-qr-print-btn {
    margin-top: auto;
    width: 100%;
}

.trezo-products .product-card-simple .product-icon {
    margin: 0 auto;
}

.trezo-products .qr-container h6,
.trezo-products .trezo-qr-title {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
    margin: 0 0 10px;
    font-weight: 600;
}

.trezo-products .trezo-qr-image {
    width: min(200px, 100%);
    height: auto;
    margin: 0 auto 12px;
    display: block;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    padding: 6px;
    background: #fff;
}

.trezo-products .trezo-qr-print-btn {
    width: 100%;
    margin-top: 2px;
}

@media (max-width: 767px) {
    .trezo-products .products-grid,
    .trezo-products .products-grid-main {
        grid-template-columns: 1fr;
    }

    .trezo-products .product-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .trezo-products .product-status {
        max-width: 100%;
        white-space: normal;
        text-align: left;
    }

    .trezo-products .product-title span {
        font-size: var(--trezo-fs-md);
        line-height: 1.35;
    }

    .trezo-products .download-actions {
        flex-direction: column;
    }

    .trezo-products .brand-btn {
        width: 100%;
        justify-content: center;
    }

    .trezo-products .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }

    .trezo-products .info-value {
        text-align: left;
    }

    .trezo-products .product-actions {
        min-height: 0;
    }

    .trezo-products .product-card-simple {
        padding: 14px;
    }

    .trezo-dashboard .trezo-products .products-header {
        margin-bottom: 10px;
    }

    .trezo-dashboard .trezo-products .products-header h1 {
        font-size: var(--trezo-fs-md);
        font-weight: 600;
        margin-bottom: 2px;
    }

    .trezo-dashboard .trezo-products .products-header .subtitle {
        font-size: var(--trezo-fs-xs);
    }

    .trezo-dashboard-admin .trezo-page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .trezo-dashboard-admin .trezo-role-badges {
        width: 100%;
    }

    .trezo-dashboard-admin .trezo-admin-section-head {
        align-items: flex-start;
    }

    .trezo-dashboard-admin .trezo-admin-section-title {
        font-size: var(--trezo-fs-md);
    }

    .trezo-dashboard-admin .trezo-admin-section-subtitle {
        font-size: var(--trezo-fs-xs);
    }

    .trezo-dashboard-admin .trezo-admin-operator-card .products-header {
        display: none;
    }

    .trezo-dashboard-admin .trezo-admin-tables-grid .trezo-card {
        margin-bottom: 0;
    }

    .trezo-dashboard-admin .trezo-table-col-comment {
        display: none;
    }

    .trezo-dashboard-admin .trezo-table-cell-wrap {
        max-width: none;
    }

    .trezo-dashboard-admin .trezo-data-table thead th,
    .trezo-dashboard-admin .trezo-data-table tbody td {
        padding: 8px 10px;
        font-size: var(--trezo-fs-sm);
    }

    .trezo-dashboard-admin .trezo-card-title {
        font-size: var(--trezo-fs-md);
    }

    .trezo-dashboard-admin .trezo-card-subtitle {
        font-size: var(--trezo-fs-xs);
    }
}

/* Admin dashboard */
.trezo-stats-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.trezo-quick-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.trezo-admin-quick-card {
    margin-bottom: var(--trezo-space-section);
}

.trezo-admin-finance-stats {
    margin-bottom: var(--trezo-space-section);
}

.trezo-admin-section {
    margin-bottom: var(--trezo-space-section);
}

.trezo-admin-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-admin-section-head > .trezo-lucide-icon,
.trezo-admin-section-head > svg.lucide {
    width: 22px;
    height: 22px;
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-admin-section-title {
    margin: 0 0 4px;
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-admin-section-subtitle {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-admin-operator-card {
    margin-top: 8px;
}

.trezo-card-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    padding-bottom: 12px;
}

.trezo-table-wrap {
    padding-top: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.trezo-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

.trezo-table-scroll .grid-view {
    min-width: 0;
}

.trezo-table-scroll .trezo-data-table {
    width: 100%;
}

.trezo-admin-metrics-table {
    min-width: 280px;
}

.trezo-admin-sites-table {
    min-width: 260px;
}

.trezo-table-cell-wrap {
    min-width: 120px;
    max-width: 220px;
    white-space: normal;
    word-break: break-word;
}

.trezo-table-cell-num,
.trezo-table-cell-date {
    white-space: nowrap;
    width: 1%;
}

.trezo-table-cell-num {
    text-align: right;
}

.trezo-table-cell-date {
    text-align: left;
}

.trezo-admin-table-card .trezo-card-body > .trezo-table-footnote {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-table-empty,
.trezo-table-scroll .empty {
    margin: 0;
    padding: 16px 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    text-align: center;
}

.trezo-table-wrap > .summary {
    margin: 0 0 12px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

/* Trezo UI Kit — Tables */
.trezo-data-table,
.trezo-table-wrap > table,
.trezo-admin-content > table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    font-size: var(--trezo-fs-md);
    color: var(--trezo-text);
    background: transparent;
}

.trezo-data-table thead th,
.trezo-table-wrap > table thead th,
.trezo-admin-content > table thead th {
    padding: var(--trezo-table-cell-y) var(--trezo-table-cell-x);
    text-align: left;
    font-weight: 500;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    border-bottom: 1px solid var(--trezo-border);
    background: var(--trezo-table-head-bg);
    white-space: nowrap;
    vertical-align: middle;
}

.trezo-data-table tbody td,
.trezo-table-wrap > table tbody td,
.trezo-admin-content > table tbody td {
    padding: var(--trezo-table-cell-y) var(--trezo-table-cell-x);
    border-bottom: 1px solid var(--trezo-border);
    color: var(--trezo-text);
    vertical-align: middle;
    line-height: 1.5;
}

.trezo-data-table tbody tr:last-child td,
.trezo-table-wrap > table tbody tr:last-child td,
.trezo-admin-content > table tbody tr:last-child td {
    border-bottom: none;
}

.trezo-data-table tbody tr:hover td,
.trezo-table-wrap > table tbody tr:hover td,
.trezo-admin-content > table tbody tr:hover td {
    background: var(--trezo-table-row-hover);
}

.trezo-data-table.is-striped tbody tr:nth-child(even) td,
.trezo-table-wrap > table.table-striped tbody tr:nth-child(odd) td {
    background: var(--trezo-surface-2);
}

.trezo-data-table.is-striped tbody tr:nth-child(even):hover td,
.trezo-table-wrap > table.table-striped tbody tr:nth-child(odd):hover td {
    background: var(--trezo-table-row-hover);
}

.trezo-data-table tfoot td,
.trezo-table-wrap > table tfoot td,
.trezo-admin-content > table tfoot td {
    padding: var(--trezo-table-cell-y) var(--trezo-table-cell-x);
    font-weight: 600;
    color: var(--trezo-heading);
    border-top: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
    vertical-align: middle;
}

.trezo-data-table a,
.trezo-table-wrap > table a,
.trezo-admin-content > table a {
    color: var(--trezo-primary);
    text-decoration: none;
    font-weight: 500;
}

.trezo-data-table a.trezo-btn,
.trezo-table-wrap > table a.trezo-btn,
.trezo-admin-content > table a.trezo-btn {
    font-weight: 400;
    text-decoration: none;
}

.trezo-data-table a.trezo-btn-primary,
.trezo-table-wrap > table a.trezo-btn-primary,
.trezo-admin-content > table a.trezo-btn-primary {
    color: #fff;
}

.trezo-data-table a.trezo-btn-primary .trezo-lucide-icon,
.trezo-table-wrap > table a.trezo-btn-primary .trezo-lucide-icon,
.trezo-admin-content > table a.trezo-btn-primary .trezo-lucide-icon,
.trezo-data-table a.trezo-btn-primary svg.lucide,
.trezo-table-wrap > table a.trezo-btn-primary svg.lucide,
.trezo-admin-content > table a.trezo-btn-primary svg.lucide {
    color: #fff;
}

.trezo-data-table a.trezo-btn-primary:hover,
.trezo-table-wrap > table a.trezo-btn-primary:hover,
.trezo-admin-content > table a.trezo-btn-primary:hover {
    color: #fff;
    text-decoration: none;
}

.trezo-data-table a.trezo-btn-outline,
.trezo-table-wrap > table a.trezo-btn-outline,
.trezo-admin-content > table a.trezo-btn-outline {
    color: var(--trezo-heading);
}

.trezo-data-table a:hover,
.trezo-table-wrap > table a:hover,
.trezo-admin-content > table a:hover {
    color: var(--trezo-primary-hover);
    text-decoration: underline;
}

.trezo-data-table a.trezo-btn:hover,
.trezo-table-wrap > table a.trezo-btn:hover,
.trezo-admin-content > table a.trezo-btn:hover {
    text-decoration: none;
}

.trezo-data-table .trezo-tag,
.trezo-table-wrap .trezo-tag {
    vertical-align: middle;
}

.trezo-table-muted {
    color: var(--trezo-text-muted);
}

.trezo-table-strong {
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-table-warning {
    color: var(--trezo-warning);
    font-weight: 600;
}

.trezo-table-danger {
    color: var(--trezo-danger);
    font-weight: 600;
}

.trezo-table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-table-pager {
    margin-top: 0;
    max-width: 100%;
    display: flex;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.trezo-table-summary,
.trezo-table-footnote {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-table-wrap + .trezo-table-footnote,
.trezo-table-wrap + .trezo-table-summary {
    margin-top: 12px;
}

.trezo-table-footnote a,
.trezo-table-summary strong {
    color: var(--trezo-heading);
    font-weight: 600;
}

.trezo-table-footnote a {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-table-footnote a:hover {
    color: var(--trezo-primary-hover);
    text-decoration: underline;
}

.trezo-table-pager.pagination,
.trezo-table-pager .pagination {
    margin: 0;
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    gap: 3px;
    justify-content: flex-end;
}

.trezo-table-pager.pagination > li,
.trezo-table-pager .pagination > li {
    display: inline-flex;
    flex: 0 0 auto;
}

.trezo-table-pager.pagination > li > a,
.trezo-table-pager.pagination > li > span,
.trezo-table-pager .pagination > li > a,
.trezo-table-pager .pagination > li > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--trezo-btn-radius);
    margin: 0;
    padding: 4px 8px;
    min-width: 30px;
    min-height: 30px;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    color: var(--trezo-text);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.trezo-table-pager.pagination > li > a:hover,
.trezo-table-pager .pagination > li > a:hover {
    background: var(--trezo-primary-soft);
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
}

.trezo-table-pager.pagination > .active > a,
.trezo-table-pager.pagination > .active > span,
.trezo-table-pager .pagination > .active > a,
.trezo-table-pager .pagination > .active > span {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

.trezo-table-pager.pagination > .disabled > span,
.trezo-table-pager.pagination > .disabled > a,
.trezo-table-pager .pagination > .disabled > span,
.trezo-table-pager .pagination > .disabled > a {
    opacity: 0.45;
    pointer-events: none;
}

html[data-theme="dark"] .trezo-data-table thead th,
html[data-theme="dark"] .trezo-table-wrap > table thead th,
html[data-theme="dark"] .trezo-admin-content > table thead th {
    color: var(--trezo-text-muted);
    border-bottom-color: var(--trezo-border);
}

html[data-theme="dark"] .trezo-data-table tbody td,
html[data-theme="dark"] .trezo-table-wrap > table tbody td,
html[data-theme="dark"] .trezo-admin-content > table tbody td {
    border-bottom-color: var(--trezo-border);
}

html[data-theme="dark"] .trezo-data-table tbody tr:hover td,
html[data-theme="dark"] .trezo-table-wrap > table tbody tr:hover td,
html[data-theme="dark"] .trezo-admin-content > table tbody tr:hover td {
    background: var(--trezo-table-row-hover);
}

html[data-theme="dark"] .trezo-data-table tfoot td,
html[data-theme="dark"] .trezo-table-wrap > table tfoot td,
html[data-theme="dark"] .trezo-admin-content > table tfoot td {
    background: var(--trezo-surface-2);
    border-top-color: var(--trezo-border);
}

html[data-theme="dark"] .trezo-data-table.is-striped tbody tr:nth-child(even) td,
html[data-theme="dark"] .trezo-table-wrap > table.table-striped tbody tr:nth-child(odd) td {
    background: rgba(255, 255, 255, 0.02);
}

html[data-theme="dark"] .trezo-table-pager.pagination > li > a,
html[data-theme="dark"] .trezo-table-pager.pagination > li > span,
html[data-theme="dark"] .trezo-table-pager .pagination > li > a,
html[data-theme="dark"] .trezo-table-pager .pagination > li > span {
    background: var(--trezo-surface);
    border-color: var(--trezo-border);
    color: var(--trezo-text);
}

html[data-theme="dark"] .trezo-table-pager.pagination > li > a:hover,
html[data-theme="dark"] .trezo-table-pager .pagination > li > a:hover {
    background: var(--trezo-primary-soft);
    border-color: var(--trezo-primary);
    color: #fff;
}

/* ===== ADMIN WORKSPACE (users, orders, sales) ===== */
.trezo-admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.trezo-admin-toolbar-title {
    margin: 0;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-admin-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-admin-workspace {
    display: grid;
    grid-template-columns: 248px minmax(0, 1fr);
    gap: var(--trezo-space-grid);
    align-items: start;
}

.trezo-admin-content {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    padding: 16px;
}

.trezo-filter-panel {
    position: sticky;
    top: var(--trezo-sticky-top);
    z-index: 1020;
}

.trezo-filter-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    overflow: hidden;
}

.trezo-filter-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-filter-card-body {
    padding: 12px 14px 14px;
}

.trezo-filter-card-body .form-group {
    margin-bottom: 10px;
}

.trezo-filter-card-body .form-control {
    height: 34px;
    padding: 6px 10px;
    font-size: var(--trezo-fs-sm);
    border-radius: 7px;
    border-color: var(--trezo-border);
    background-color: var(--trezo-surface-2);
    color: var(--trezo-heading);
}

.trezo-filter-card-body .form-control:focus {
    background-color: var(--trezo-surface);
    border-color: var(--trezo-primary);
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.12);
}

.trezo-filter-card-body .checkbox,
.trezo-filter-card-body .form-check {
    margin: 8px 0 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-filter-card-body .form-group > label,
.trezo-filter-card-body .checkbox label,
.trezo-filter-card-body .form-check-label {
    font-weight: 400;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    margin-bottom: 0;
    cursor: pointer;
}

.trezo-filter-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.trezo-filter-inline .form-group {
    margin-bottom: 0;
    flex: 1 1 120px;
}

.trezo-period-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.trezo-period-preset {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
    text-decoration: none;
}

.trezo-period-preset:hover,
.trezo-period-preset.active {
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-sort-wrap {
    margin-bottom: 12px;
}

.trezo-sort-wrap::before {
    content: 'Сортировка';
    display: block;
    margin-bottom: 6px;
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--trezo-text-muted);
}

.trezo-sort-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.trezo-sort-bar li {
    margin: 0;
}

.trezo-sort-bar li a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.trezo-sort-bar li a:hover {
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-sort-wrap .trezo-sort-bar a.trezo-sort-link.asc,
.trezo-sort-wrap .trezo-sort-bar a.trezo-sort-link.desc,
.trezo-sort-bar li a.asc,
.trezo-sort-bar li a.desc,
.trezo-sort-bar a.asc,
.trezo-sort-bar a.desc {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    font-weight: 600;
    box-shadow: inset 0 0 0 1px rgba(96, 93, 255, 0.35);
}

.trezo-sort-wrap .trezo-sort-bar a.trezo-sort-link.asc::after,
.trezo-sort-wrap .trezo-sort-bar a.trezo-sort-link.desc::after,
.trezo-sort-bar li a.asc::after,
.trezo-sort-bar a.asc::after {
    content: '↑';
    font-size: 10px;
    line-height: 1;
}

.trezo-sort-wrap .trezo-sort-bar a.trezo-sort-link.desc::after,
.trezo-sort-bar li a.desc::after,
.trezo-sort-bar a.desc::after {
    content: '↓';
    font-size: 10px;
    line-height: 1;
}

html[data-theme="dark"] .trezo-tag-success {
    color: var(--trezo-success);
}

html[data-theme="dark"] .trezo-tag-warning {
    color: var(--trezo-warning);
}

html[data-theme="dark"] .trezo-products .product-status.connected {
    color: var(--trezo-success);
}

html[data-theme="dark"] .trezo-products .product-action.secondary {
    background: var(--trezo-body-bg);
    border-color: var(--trezo-border);
    color: var(--trezo-heading);
}

html[data-theme="dark"] .trezo-products .product-action.secondary:hover {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

html[data-theme="dark"] .trezo-products .product-action.warning {
    background: transparent;
    border-color: var(--trezo-warning);
    color: var(--trezo-warning);
}

html[data-theme="dark"] .trezo-products .product-action.warning:hover {
    background: var(--trezo-warning);
    border-color: var(--trezo-warning);
    color: #000;
}

html[data-theme="dark"] .trezo-stat-icon.success {
    color: var(--trezo-success);
}

html[data-theme="dark"] .trezo-stat-icon.warning {
    color: var(--trezo-warning);
}

.trezo-record-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trezo-record-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    padding: 14px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-record-card:hover {
    border-color: rgba(96, 93, 255, 0.22);
    box-shadow: var(--trezo-shadow);
}

.trezo-record-card.is-paid {
    border-color: rgba(55, 216, 10, 0.35);
}

.trezo-record-card.is-pending {
    border-left: 3px solid var(--trezo-warning);
}

.trezo-record-card--with-photo {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.trezo-record-body {
    flex: 1;
    min-width: 0;
}

.trezo-record-thumb {
    flex: 0 0 auto;
    display: block;
    width: 144px;
    height: 144px;
    border-radius: var(--trezo-radius);
    overflow: hidden;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-record-thumb:hover {
    border-color: rgba(96, 93, 255, 0.35);
    box-shadow: var(--trezo-shadow);
    text-decoration: none;
}

.trezo-record-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.trezo-record-thumb--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.trezo-record-thumb--empty:hover {
    border-color: rgba(96, 93, 255, 0.35);
    box-shadow: var(--trezo-shadow);
}

.trezo-record-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--trezo-text-muted);
    opacity: 0.45;
}

.trezo-record-thumb-placeholder svg {
    width: 36px;
    height: 36px;
}

.trezo-wrapper.sidebar-collapsed .trezo-record-thumb {
    width: 208px;
    height: 208px;
}

.trezo-record-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.trezo-record-title {
    margin: 0 0 2px;
    font-size: var(--trezo-fs-lg);
    font-weight: 600;
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-record-title:hover {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-record-id,
.trezo-record-sub {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-record-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.trezo-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    border: none;
    background: var(--trezo-surface-2);
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    color: var(--trezo-text-muted);
    white-space: nowrap;
}

.trezo-tag-primary {
    color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
}

.trezo-tag-success {
    color: #25b003;
    background: var(--trezo-success-soft);
}

.trezo-tag-warning {
    color: #fe7a36;
    background: var(--trezo-warning-soft);
}

.trezo-tag-danger {
    color: var(--trezo-danger);
    background: var(--trezo-danger-soft);
}

.trezo-record-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
    margin-bottom: 10px;
}

.trezo-record-field {
    min-width: 0;
}

.trezo-record-field-label {
    display: block;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    margin-bottom: 2px;
}

.trezo-record-field-value {
    font-size: var(--trezo-fs-md);
    color: var(--trezo-heading);
    word-break: break-word;
}

.trezo-record-field-value a {
    color: var(--trezo-primary);
    text-decoration: none;
    font-weight: 500;
}

.trezo-record-field-value a:hover {
    text-decoration: underline;
}

.trezo-record-details {
    margin: 8px 0 10px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-record-details > summary {
    cursor: pointer;
    padding: 8px 12px;
    font-size: var(--trezo-fs-md);
    font-weight: 500;
    color: var(--trezo-heading);
    list-style: none;
}

.trezo-record-details > summary::-webkit-details-marker {
    display: none;
}

.trezo-record-details-body {
    padding: 0 12px 10px;
}

.trezo-token {
    display: block;
    margin-top: 4px;
    padding: 6px 8px;
    border-radius: 6px;
    background: var(--trezo-surface-2);
    border: 1px dashed var(--trezo-border);
    font-family: Consolas, Monaco, monospace;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    word-break: break-all;
}

.trezo-token-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.trezo-token-row .trezo-token {
    flex: 1 1 220px;
    margin-top: 0;
}

.trezo-token-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trezo-token-actions .trezo-btn {
    white-space: nowrap;
}

.trezo-record-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 10px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-record-actions .trezo-btn {
    padding: 6px 10px;
    font-size: var(--trezo-fs-sm);
}

/* ===== PHOTO EQUIPMENT ===== */
.trezo-device-onboard {
    margin-bottom: var(--trezo-space-section);
}

.trezo-device-onboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.trezo-device-onboard-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    margin-bottom: 6px;
}

.trezo-device-onboard-text {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
    max-width: 640px;
}

.trezo-device-onboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.trezo-api-key-compact {
    max-width: 220px;
    margin: 0;
    font-size: var(--trezo-fs-xs);
    padding: 8px 10px;
}

.trezo-device-card-expired {
    border-left: 3px solid var(--trezo-danger);
}

.trezo-device-card-expiring {
    border-left: 3px solid var(--trezo-warning);
}

.trezo-device-card .trezo-tag .trezo-lucide-icon,
.trezo-device-card .trezo-tag svg.lucide {
    width: 12px;
    height: 12px;
    margin-right: 2px;
}

.trezo-order-headline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.trezo-order-amount {
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-alert-inline {
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius);
    border: 1px solid rgba(253, 88, 18, 0.25);
    background: var(--trezo-danger-soft);
    color: var(--trezo-danger);
    font-size: var(--trezo-fs-sm);
}

/* ===== Balance top-up page ===== */
.trezo-pay-page {
    max-width: 1120px;
}

.trezo-pay-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: var(--trezo-space-section);
    padding: 24px 28px;
    border-radius: var(--trezo-radius-lg);
    background: linear-gradient(135deg, #605dff 0%, #7a58ff 52%, #9747ff 100%);
    color: #fff;
    box-shadow: 0 14px 40px rgba(96, 93, 255, 0.24);
}

.trezo-pay-hero-glow {
    position: absolute;
    top: -40%;
    right: -8%;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    pointer-events: none;
}

.trezo-pay-hero-content {
    position: relative;
    z-index: 1;
}

.trezo-pay-hero-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    opacity: 0.88;
    margin-bottom: 6px;
}

.trezo-pay-hero-balance {
    font-size: clamp(32px, 5vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.trezo-pay-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    font-size: var(--trezo-fs-sm);
    opacity: 0.9;
}

.trezo-pay-hero-dot {
    opacity: 0.6;
}

.trezo-pay-hero-icon {
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(8px);
    flex-shrink: 0;
}

.trezo-pay-hero-icon .trezo-lucide-icon,
.trezo-pay-hero-icon svg.lucide {
    width: 34px;
    height: 34px;
    color: #fff;
}

.trezo-pay-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: var(--trezo-space-grid);
    align-items: start;
}

.trezo-pay-form-card .trezo-card-body {
    padding-top: 0;
}

.trezo-pay-field-label {
    display: block;
    margin-bottom: 10px;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-pay-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.trezo-pay-preset {
    display: inline-flex;
    align-items: center;
    padding: 7px 12px;
    border: 1px solid var(--trezo-border);
    border-radius: 999px;
    background: var(--trezo-surface);
    color: var(--trezo-text);
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.trezo-pay-preset:hover {
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
}

.trezo-pay-preset.is-active {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    box-shadow: inset 0 0 0 1px rgba(96, 93, 255, 0.12);
}

.trezo-pay-amount-wrap {
    position: relative;
    margin-bottom: 16px;
}

.trezo-pay-amount-wrap .form-group {
    margin-bottom: 0;
}

.trezo-pay-amount-input {
    height: 58px;
    padding: 10px 52px 10px 16px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-heading);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: none;
}

.trezo-pay-amount-input:focus {
    border-color: var(--trezo-primary);
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.15);
}

.trezo-pay-amount-suffix {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    font-size: var(--trezo-fs-lg);
    font-weight: 600;
    color: var(--trezo-text-muted);
    pointer-events: none;
}

.trezo-pay-breakdown {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface-2);
}

.trezo-pay-breakdown-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-pay-breakdown-row strong {
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    white-space: nowrap;
}

.trezo-pay-breakdown-row.is-muted {
    color: var(--trezo-text-muted);
}

.trezo-pay-breakdown-row.is-muted strong {
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    color: var(--trezo-text-muted);
}

.trezo-pay-breakdown-row.is-total {
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px dashed var(--trezo-border);
}

.trezo-pay-breakdown-row.is-total strong {
    font-size: var(--trezo-fs-lg);
    color: var(--trezo-primary);
}

.trezo-pay-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.trezo-pay-submit {
    min-height: 46px;
    padding-left: 18px;
    padding-right: 18px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
}

.trezo-pay-submit:disabled {
    opacity: 0.55;
    pointer-events: none;
}

.trezo-pay-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-pay-note .trezo-lucide-icon,
.trezo-pay-note svg.lucide {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: var(--trezo-success);
    flex-shrink: 0;
}

.trezo-pay-alert {
    display: flex;
    gap: 12px;
    margin-bottom: var(--trezo-space-grid);
    padding: 14px 16px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid rgba(255, 188, 43, 0.35);
    background: var(--trezo-warning-soft);
}

.trezo-pay-alert-icon .trezo-lucide-icon,
.trezo-pay-alert-icon svg.lucide {
    width: 20px;
    height: 20px;
    color: var(--trezo-warning);
    margin-top: 2px;
}

.trezo-pay-alert-title {
    margin-bottom: 4px;
    font-size: var(--trezo-fs-md);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-pay-alert p {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.55;
}

.trezo-pay-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trezo-pay-steps li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.trezo-pay-step-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    font-size: var(--trezo-fs-sm);
    font-weight: 700;
    flex-shrink: 0;
}

.trezo-pay-steps strong {
    display: block;
    margin-bottom: 2px;
    font-size: var(--trezo-fs-md);
    color: var(--trezo-heading);
}

.trezo-pay-steps p {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-pay-features {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: var(--trezo-space-grid);
}

.trezo-pay-feature {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
}

.trezo-pay-feature-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--trezo-surface-2);
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-pay-feature-icon .trezo-lucide-icon,
.trezo-pay-feature-icon svg.lucide {
    width: 18px;
    height: 18px;
}

.trezo-pay-feature strong {
    display: block;
    margin-bottom: 2px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
}

.trezo-pay-feature p {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-pay-feature a {
    color: var(--trezo-primary);
    font-weight: 500;
    text-decoration: none;
}

.trezo-pay-feature a:hover {
    text-decoration: underline;
}

/* Invoice / order form (extends pay page) */
.trezo-order-page .trezo-order-hero .trezo-pay-hero-icon {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.trezo-order-field {
    margin-bottom: 18px;
}

.trezo-order-field-hint {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 8px 0 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-order-select {
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text);
    min-height: 42px;
    box-shadow: none;
}

.trezo-order-select:focus {
    border-color: var(--trezo-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--trezo-primary-soft);
}

.trezo-order-purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.trezo-order-purpose-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.trezo-order-purpose-card:hover {
    border-color: var(--trezo-primary);
}

.trezo-order-purpose-card.is-active {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(96, 93, 255, 0.25);
}

.trezo-order-purpose-icon {
    color: var(--trezo-primary);
}

.trezo-order-purpose-title {
    font-size: var(--trezo-fs-md);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-order-purpose-hint {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-order-dynamic {
    margin-bottom: 18px;
}

.trezo-order-form .field-orderform-count {
    margin-bottom: 0;
}

.trezo-order-form .field-adminorderform-count {
    margin-bottom: 0;
}

.trezo-admin-order-email-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.trezo-admin-order-email-row .form-group {
    flex: 1;
    min-width: 220px;
    margin-bottom: 0;
}

.trezo-admin-order-email-row .trezo-btn {
    flex-shrink: 0;
    margin-top: 0;
}

.trezo-admin-order-user-name {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.2;
}

.trezo-payments-filter .form-group {
    margin-bottom: 0;
}

.trezo-payments-filter {
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.trezo-payments-admin-hint {
    margin: 4px 0 0;
    max-width: 520px;
}

.trezo-payments-totals-card {
    margin-top: var(--trezo-space-section);
}

.trezo-payments-totals-card .trezo-pay-breakdown {
    margin: 0;
}

.trezo-payment-card .trezo-record-field-wide {
    grid-column: 1 / -1;
}

.trezo-payments-user-hero .trezo-pay-hero-balance {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.trezo-balance-page .trezo-balance-hero .trezo-pay-hero-balance {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.trezo-balance-amount.is-credit {
    color: var(--trezo-success);
}

.trezo-balance-amount.is-debit {
    color: var(--trezo-danger);
}

.trezo-balance-net.is-positive {
    color: #bbf7d0;
}

.trezo-balance-net.is-negative {
    color: #fecaca;
}

.trezo-balance-card.is-credit {
    border-left: 3px solid var(--trezo-success);
}

.trezo-balance-card.is-debit {
    border-left: 3px solid var(--trezo-danger);
}

.trezo-balance-filter {
    margin-top: 14px;
}

.trezo-balance-filter .trezo-filter-checkbox-label {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    white-space: nowrap;
}

.trezo-balance-hint {
    margin: 4px 0 0;
    max-width: 560px;
}

.trezo-balance-totals-card {
    margin-top: var(--trezo-space-section);
}

.trezo-balance-totals-card .trezo-pay-breakdown {
    margin: 0;
}

.trezo-balance-cancel-hint {
    margin: 0 0 8px;
}

.trezo-promo-code {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--trezo-heading);
}

.trezo-promo-card .trezo-record-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-promo-copy.is-copied {
    border-color: var(--trezo-success);
    color: var(--trezo-success);
}

.trezo-promo-filter-hint {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-promo-filter-hint p {
    margin: 0 0 6px;
}

.trezo-promo-presets-card .trezo-card-body {
    padding-top: 14px;
    padding-bottom: 14px;
}

.trezo-promo-list-hint {
    margin: 4px 0 0;
}

.trezo-text-muted {
    color: var(--trezo-text-muted);
}

html[data-theme="dark"] .trezo-pay-hero {
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .trezo-pay-amount-input {
    background: var(--trezo-surface);
}

html[data-theme="dark"] .trezo-pay-breakdown {
    background: var(--trezo-surface-2);
}

@media (max-width: 991px) {
    .trezo-pay-grid {
        grid-template-columns: 1fr;
    }

    .trezo-pay-hero-icon {
        display: none;
    }
}

@media (max-width: 575px) {
    .trezo-pay-actions .trezo-btn {
        width: 100%;
    }

    .trezo-order-purpose-grid {
        grid-template-columns: 1fr;
    }

    .trezo-pay-amount-input {
        font-size: 24px;
    }
}

.trezo-tag-muted {
    color: var(--trezo-text-muted);
    background: var(--trezo-surface-2);
}

.trezo-oto-legend {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-legend-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-legend-list {
    margin: 0;
    padding-left: 18px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.55;
}

.trezo-oto-legend-list li {
    margin-bottom: 4px;
}

.trezo-bootstrap-modal .modal-content {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    box-shadow: var(--trezo-shadow);
    color: var(--trezo-text);
}

.trezo-bootstrap-modal .modal-header {
    border-bottom: 1px solid var(--trezo-border);
    padding: 16px 20px;
}

.trezo-bootstrap-modal .modal-header .modal-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: var(--trezo-fs-lg);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-bootstrap-modal .modal-body {
    padding: 16px 20px 20px;
}

.trezo-bootstrap-modal .modal-footer {
    border-top: 1px solid var(--trezo-border);
    padding: 12px 20px 16px;
}

.trezo-bootstrap-modal .close {
    color: var(--trezo-text-muted);
    opacity: 1;
    text-shadow: none;
}

.trezo-bootstrap-modal .close:hover,
.trezo-bootstrap-modal .close:focus {
    color: var(--trezo-heading);
    opacity: 1;
}

.trezo-oto-quick-filter .form-group {
    margin-bottom: 0;
}

.trezo-oto-quick-filter .checkbox {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-oto-grid-wrap {
    overflow-x: auto;
}

.trezo-oto-grid thead tr.filters td,
.trezo-oto-grid thead tr.filters th {
    padding: 8px 10px;
    background: var(--trezo-surface-2);
    border-bottom: 1px solid var(--trezo-border);
    vertical-align: middle;
}

.trezo-oto-grid thead tr.filters .form-control {
    height: 32px;
    padding: 4px 8px;
    font-size: var(--trezo-fs-xs);
    border-radius: 6px;
    border-color: var(--trezo-border);
    min-width: 72px;
}

.trezo-oto-grid .trezo-tag {
    white-space: nowrap;
}

.trezo-oto-card--full-stack {
    background: linear-gradient(135deg, var(--trezo-surface) 0%, rgba(55, 216, 10, 0.04) 100%);
}

.trezo-oto-card--partial {
    border-left: 3px solid rgba(96, 93, 255, 0.35);
}

.trezo-oto-product-badges {
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: 320px;
}

.trezo-oto-filter-section {
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-oto-filter-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.trezo-oto-filter-details:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.trezo-oto-filter-section-title {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--trezo-text-muted);
}

.trezo-oto-filter-form .form-group {
    margin-bottom: 8px;
}

.trezo-oto-filter-form .form-group:has(label input[type="checkbox"]) {
    margin-bottom: 6px;
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group > label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding-left: 0;
    margin-bottom: 0;
    font-weight: 400;
    line-height: 1.45;
    color: var(--trezo-text);
    cursor: pointer;
    transition: color 0.15s ease;
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group > label:has(input[type="checkbox"]:checked) {
    color: var(--trezo-heading);
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group > input[type="hidden"] {
    display: none;
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    appearance: none;
    -webkit-appearance: none;
    border: 1.5px solid var(--trezo-border);
    border-radius: 4px;
    background: var(--trezo-surface-2);
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group label input[type="checkbox"]:hover {
    border-color: rgba(96, 93, 255, 0.45);
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group label input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px var(--trezo-primary-soft);
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group label input[type="checkbox"]:checked {
    border-color: var(--trezo-primary);
    background-color: var(--trezo-primary);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6l2.5 2.5 4.5-5' stroke='%23ffffff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 11px 11px;
}

.trezo-filter-card-body .trezo-oto-filter-form .form-group label input[type="checkbox"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.trezo-filter-card--oto-sticky-actions {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--trezo-sticky-top) - var(--trezo-sticky-gap));
}

.trezo-filter-card--oto-sticky-actions .trezo-filter-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 0;
}

.trezo-oto-filter-form--stacked {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}

.trezo-oto-filter-form-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 12px 14px 12px 12px;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--trezo-scrollbar-thumb-subtle) var(--trezo-scrollbar-track);
    scrollbar-gutter: stable;
}

.trezo-oto-filter-form-scroll::-webkit-scrollbar {
    width: var(--trezo-scrollbar-size-thin);
}

.trezo-oto-filter-form-scroll::-webkit-scrollbar-track {
    background: var(--trezo-scrollbar-track);
    margin: 4px 0;
}

.trezo-oto-filter-form-scroll::-webkit-scrollbar-thumb {
    background-color: var(--trezo-scrollbar-thumb-subtle);
    border-radius: 999px;
}

.trezo-oto-filter-form-scroll::-webkit-scrollbar-thumb:hover {
    background-color: var(--trezo-scrollbar-thumb-subtle-hover);
}

.trezo-oto-filter-form-actions {
    flex-shrink: 0;
    padding: 10px 14px 14px;
    border-top: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
}

.trezo-oto-filter-form-actions .trezo-btn {
    width: 100%;
}

.trezo-oto-filter-details {
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-oto-filter-details-summary {
    cursor: pointer;
    list-style: none;
    margin-bottom: 0;
}

.trezo-oto-filter-details-summary::-webkit-details-marker {
    display: none;
}

.trezo-oto-filter-details-summary::after {
    content: '▸';
    margin-left: auto;
    font-size: 11px;
    opacity: 0.55;
    transition: transform 0.15s ease;
}

.trezo-oto-filter-details[open] .trezo-oto-filter-details-summary::after {
    transform: rotate(90deg);
}

.trezo-oto-filter-details-body {
    padding-top: 8px;
}

.trezo-oto-smart-search-card {
    margin-bottom: var(--trezo-space-grid);
    border-color: rgba(96, 93, 255, 0.18);
    background: linear-gradient(135deg, var(--trezo-surface) 0%, rgba(96, 93, 255, 0.04) 100%);
}

.trezo-oto-smart-search-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: stretch;
}

.trezo-oto-smart-search-input-wrap {
    position: relative;
    flex: 1 1 320px;
    min-width: 0;
}

.trezo-oto-smart-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--trezo-text-muted);
    pointer-events: none;
}

.trezo-oto-smart-search-input {
    width: 100%;
    height: 46px;
    padding: 0 14px 0 42px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    font-size: var(--trezo-fs-md);
    color: var(--trezo-text);
}

.trezo-oto-smart-search-input:focus {
    outline: none;
    border-color: rgba(96, 93, 255, 0.45);
    box-shadow: 0 0 0 3px rgba(96, 93, 255, 0.12);
}

.trezo-oto-smart-search-hint {
    margin-top: 8px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-smart-suggest {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 30;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    box-shadow: var(--trezo-shadow);
}

.trezo-oto-smart-suggest.is-hidden {
    display: none;
}

.trezo-oto-smart-suggest-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 2px 12px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--trezo-border);
    text-decoration: none;
    color: inherit;
}

.trezo-oto-smart-suggest-item:last-child {
    border-bottom: none;
}

.trezo-oto-smart-suggest-item:hover {
    background: var(--trezo-surface-2);
    text-decoration: none;
}

.trezo-oto-smart-suggest-label {
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-smart-suggest-meta {
    grid-column: 1;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-smart-suggest-segment {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-primary);
    white-space: nowrap;
}

.trezo-oto-legend-collapsible {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-legend-summary {
    cursor: pointer;
    list-style: none;
}

.trezo-oto-legend-summary::-webkit-details-marker {
    display: none;
}

.trezo-oto-legend-body {
    padding-top: 0;
    border-top: 1px solid var(--trezo-border);
}

.trezo-oto-sales-presets {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-card--prospect {
    border-left: 3px solid var(--trezo-border);
}

.trezo-oto-upsell-hint {
    margin-top: 6px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-primary);
}

.trezo-record-title-link {
    color: inherit;
    text-decoration: none;
}

.trezo-record-title-link:hover {
    color: var(--trezo-primary);
    text-decoration: underline;
}

.trezo-oto-card-actions {
    align-items: center;
}

.trezo-oto-action-more {
    position: relative;
    display: inline-block;
}

.trezo-oto-action-more > summary {
    list-style: none;
    cursor: pointer;
}

.trezo-oto-action-more > summary::-webkit-details-marker {
    display: none;
}

.trezo-oto-action-menu {
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 20;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface);
    box-shadow: var(--trezo-shadow-md, 0 8px 24px rgba(0, 0, 0, 0.12));
}

.trezo-oto-action-menu-item a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: calc(var(--trezo-radius) - 2px);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-oto-action-menu-item a:hover {
    background: var(--trezo-surface-2);
    color: var(--trezo-primary);
}

.trezo-pto-card--full {
    border-left: 3px solid rgba(55, 216, 10, 0.55);
}

.trezo-pto-card--partial {
    border-left: 3px solid rgba(96, 93, 255, 0.45);
}

.trezo-record-field-span-all {
    grid-column: 1 / -1;
}

.trezo-pto-register-workspace {
    grid-template-columns: 248px minmax(0, 1fr);
}

.trezo-oto-filter-active-q {
    margin-bottom: 10px;
}

.trezo-admin-toolbar {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.trezo-admin-toolbar-meta {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-text-warning {
    color: var(--trezo-warning);
}

.trezo-tag-sm {
    font-size: 10px;
    padding: 2px 6px;
    margin-left: 6px;
}

html[data-theme="dark"] .trezo-stat-icon.muted {
    color: var(--trezo-text-muted);
}

.trezo-stat-icon.muted {
    color: var(--trezo-text-muted);
}

.trezo-oto-update-actions-bar {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-update-actions-bar .trezo-card-body {
    padding-top: 12px;
    padding-bottom: 12px;
}

.trezo-oto-update-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(300px, 30%);
    gap: var(--trezo-space-grid);
    align-items: start;
}

.trezo-oto-update-main,
.trezo-oto-update-aside {
    display: flex;
    flex-direction: column;
    gap: var(--trezo-space-grid);
    min-width: 0;
}

.trezo-oto-update-aside {
    position: sticky;
    top: var(--trezo-sticky-top);
    z-index: 1020;
}

.trezo-oto-fold-card {
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    overflow: hidden;
}

.trezo-oto-fold-card:not([open]) {
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.trezo-oto-fold-card:not([open]) .trezo-oto-fold-trigger {
    border-radius: inherit;
}

.trezo-oto-fold-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    margin: 0;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.trezo-oto-fold-trigger::-webkit-details-marker {
    display: none;
}

.trezo-oto-fold-trigger-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.trezo-oto-fold-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    color: var(--trezo-text-muted);
}

.trezo-oto-fold-card[open] .trezo-oto-fold-icon {
    color: var(--trezo-primary);
    border-color: rgba(96, 93, 255, 0.25);
}

.trezo-oto-fold-title {
    display: block;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.3;
}

.trezo-oto-fold-meta {
    display: block;
    margin-top: 2px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.35;
}

.trezo-oto-fold-meta a {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-oto-fold-meta a:hover {
    text-decoration: underline;
}

.trezo-oto-fold-chevron {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    position: relative;
    opacity: 0.45;
    transition: transform 0.15s ease;
}

.trezo-oto-fold-chevron::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translate(-50%, -65%) rotate(45deg);
    color: var(--trezo-text-muted);
}

.trezo-oto-fold-card[open] .trezo-oto-fold-chevron {
    transform: rotate(180deg);
    opacity: 0.8;
}

.trezo-oto-fold-panel {
    padding: 0 16px 16px;
    border-top: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-oto-update-page .trezo-oto-sales-stats .trezo-stat-card-compact {
    min-height: 84px;
}

.trezo-oto-update-page .trezo-oto-sales-stats .trezo-stat-card-compact > div:first-child {
    width: 100%;
}

.trezo-oto-update-page .trezo-oto-sales-stats .trezo-stat-value {
    font-size: 1.35rem;
}

.trezo-oto-registry-table th {
    width: 22%;
    min-width: 120px;
    white-space: nowrap;
}

.trezo-oto-registry-table td {
    word-break: normal;
    overflow-wrap: anywhere;
}

.trezo-oto-help-doc {
    margin-bottom: 0;
}

.trezo-oto-pto-compact {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--trezo-border);
}

.trezo-oto-pto-compact-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.trezo-oto-pto-registry-link {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-oto-pto-registry-link:hover {
    text-decoration: underline;
}

.trezo-oto-pto-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trezo-oto-pto-item {
    padding: 10px 12px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-oto-pto-item-title {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-pto-id {
    display: inline-block;
    margin-right: 6px;
    font-weight: 500;
    color: var(--trezo-text-muted);
}

.trezo-oto-pto-address {
    margin-top: 4px;
    line-height: 1.45;
}

.trezo-oto-pto-product-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.trezo-oto-pto-more {
    font-size: var(--trezo-fs-sm);
}

.trezo-oto-pto-empty,
.trezo-oto-pto-empty-inline {
    margin: 0;
}

.trezo-oto-pto-table th,
.trezo-oto-pto-table td {
    font-size: var(--trezo-fs-sm);
    vertical-align: top;
}

.trezo-oto-pto-contacts div + div {
    margin-top: 4px;
}

.trezo-oto-update-page .trezo-page-title {
    font-size: clamp(1.35rem, 2.5vw, 1.75rem);
}

.trezo-oto-update-subtitle {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.trezo-oto-identity-card {
    border-color: rgba(96, 93, 255, 0.22);
    background: linear-gradient(135deg, rgba(96, 93, 255, 0.05), rgba(96, 93, 255, 0.01));
}

.trezo-oto-identity-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.trezo-oto-identity-top-row {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
    gap: 20px 28px;
    align-items: start;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(96, 93, 255, 0.12);
}

.trezo-oto-identity-contacts-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 20px;
    align-items: center;
}

.trezo-oto-identity-contact {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
    min-width: 0;
}

.trezo-oto-identity-contact-link {
    color: var(--trezo-heading);
    font-weight: 600;
    text-decoration: none;
    word-break: break-word;
}

.trezo-oto-identity-contact-link:hover {
    color: var(--trezo-primary);
    text-decoration: underline;
}

.trezo-oto-identity-requisites-top {
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(96, 93, 255, 0.12);
}

.trezo-oto-identity-requisites-content {
    min-width: 0;
}

.trezo-oto-identity-details {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr);
    gap: 20px 28px;
    align-items: start;
}

.trezo-oto-identity-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-oto-identity-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    min-width: 0;
}

.trezo-oto-identity-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    color: var(--trezo-primary);
}

.trezo-oto-identity-label {
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--trezo-text-muted);
    margin-bottom: 4px;
}

.trezo-oto-identity-value {
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.45;
    word-break: break-word;
}

.trezo-oto-identity-address .trezo-oto-identity-value {
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.55;
}

.trezo-oto-identity-mono {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
}

.trezo-oto-identity-mono-inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.trezo-oto-identity-pair {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: baseline;
}

.trezo-oto-identity-pair-key {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--trezo-text-muted);
}

.trezo-oto-identity-site-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-oto-identity-site-link:hover {
    text-decoration: underline;
}

.trezo-oto-identity-site-ext {
    display: inline-flex;
    margin-left: 6px;
    color: var(--trezo-text-muted);
    vertical-align: middle;
}

.trezo-oto-identity-site-ext:hover {
    color: var(--trezo-primary);
}

.trezo-oto-identity-site-meta {
    margin-top: 6px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-identity-site.is-warning .trezo-oto-identity-icon {
    border-color: rgba(254, 122, 54, 0.35);
    color: #fe7a36;
}

.trezo-oto-update-upsell-inline {
    margin-bottom: 0;
    padding: 10px 14px;
    border-radius: var(--trezo-radius);
    background: rgba(96, 93, 255, 0.08);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-primary);
}

.trezo-oto-sales-stats {
    margin-bottom: 0;
}

.trezo-oto-sales-contact-plain {
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-sales-quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-oto-meta-dl {
    margin: 0;
    display: grid;
    gap: 10px;
}

.trezo-oto-meta-dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: var(--trezo-fs-sm);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-oto-meta-dl dt {
    margin: 0;
    color: var(--trezo-text-muted);
    font-weight: 500;
}

.trezo-oto-meta-dl dd {
    margin: 0;
    font-weight: 600;
    color: var(--trezo-heading);
}

@media (max-width: 900px) {
    .trezo-oto-identity-top-row,
    .trezo-oto-identity-details {
        grid-template-columns: 1fr;
    }

    .trezo-oto-identity-mono-inline {
        flex-direction: column;
        gap: 6px;
    }

    .trezo-oto-identity-contacts-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

.trezo-stat-value-suffix {
    font-size: 0.65em;
    font-weight: 500;
    color: var(--trezo-text-muted);
}

.trezo-oto-sales-upsell-card {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-sales-upsell-card .trezo-card-body {
    padding: 12px 16px;
}

.trezo-oto-sales-contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 20px;
}

.trezo-oto-sales-contact-item {
    min-width: 0;
}

.trezo-oto-sales-contact-value {
    display: block;
    margin-top: 4px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    word-break: break-word;
}

.trezo-oto-sales-contact-warning .trezo-oto-sales-contact-value {
    font-weight: 600;
}

.trezo-oto-update-product-item.is-missing {
    border-color: rgba(253, 88, 18, 0.28);
    background: rgba(253, 88, 18, 0.04);
}

.trezo-oto-product-cta {
    margin-top: 8px;
}

.trezo-oto-product-cta {
    margin-top: 8px;
}

@media (max-width: 1100px) {
    .trezo-oto-update-workspace {
        grid-template-columns: 1fr;
    }

    .trezo-oto-update-aside {
        position: static;
    }

    .trezo-oto-sales-contacts-grid {
        grid-template-columns: 1fr;
    }
}

.trezo-oto-sales-finance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0;
}

.trezo-oto-payments-list {
    list-style: none;
    margin: 12px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trezo-oto-payments-list li {
    padding: 8px 10px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-oto-payment-sum {
    font-weight: 700;
    color: var(--trezo-success);
}

.trezo-oto-payment-comment {
    margin-top: 4px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-crm-soon .trezo-card-body {
    padding: 12px 14px;
}

.trezo-oto-update-upsell {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius);
    background: rgba(96, 93, 255, 0.08);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-primary);
}

.trezo-oto-update-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.trezo-oto-update-product-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-oto-update-product-item.is-active {
    border-color: rgba(55, 216, 10, 0.35);
    background: rgba(55, 216, 10, 0.06);
    color: var(--trezo-text);
}

.trezo-oto-update-product-item strong {
    color: var(--trezo-heading);
}

.trezo-oto-roadmap-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.trezo-oto-roadmap-item {
    padding: 12px;
    border: 1px dashed var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-oto-roadmap-item.is-soon strong::after {
    content: ' · скоро';
    font-weight: 400;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-roadmap-item p {
    margin: 6px 0 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-help-lead {
    margin: 0 0 12px;
    font-size: var(--trezo-fs-sm);
    line-height: 1.55;
}

.trezo-oto-help-section {
    margin-bottom: 18px;
}

.trezo-oto-help-section:last-of-type {
    margin-bottom: 0;
}

.trezo-oto-help-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-help-note {
    margin: 10px 0 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-oto-help-footer {
    margin: 16px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-oto-legend-list--ordered {
    padding-left: 20px;
}

.trezo-oto-legend-list--ordered li {
    margin-bottom: 8px;
}

.trezo-oto-help-block {
    margin-bottom: 10px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    padding: 8px 10px;
    background: var(--trezo-surface-2);
}

.trezo-oto-help-block summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-help-block .trezo-oto-legend-list {
    margin-top: 8px;
}

.trezo-oto-update-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-oto-update-links-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-oto-link-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: var(--trezo-fs-sm);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-oto-link-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trezo-oto-link-row span {
    color: var(--trezo-text-muted);
}

.trezo-alert-success {
    margin-bottom: var(--trezo-space-grid);
    padding: 10px 14px;
    border-radius: var(--trezo-radius);
    background: rgba(55, 216, 10, 0.12);
    border: 1px solid rgba(55, 216, 10, 0.25);
    color: var(--trezo-text);
}

@media (max-width: 900px) {
    .trezo-oto-update-product-grid,
    .trezo-oto-roadmap-grid {
        grid-template-columns: 1fr;
    }

    .trezo-oto-registry-table th {
        width: 34%;
    }
}

.trezo-operator-card-layout {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.trezo-operator-card-main {
    flex: 1;
    min-width: 0;
}

.trezo-operator-card-qr {
    flex: 0 0 168px;
    width: 168px;
}

.trezo-operator-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trezo-operator-address {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trezo-operator-card-actions {
    flex-wrap: wrap;
    gap: 6px;
}

.trezo-operator-card-actions .trezo-btn {
    padding: 6px 10px;
}

.trezo-operator-user-link {
    font-weight: 600;
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-operator-user-link:hover {
    text-decoration: underline;
}

.trezo-operator-link-muted {
    color: var(--trezo-text-muted);
}

.trezo-operator-qr-details {
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface-2);
    overflow: hidden;
}

.trezo-operator-qr-summary {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
    list-style: none;
    user-select: none;
}

.trezo-operator-qr-summary::-webkit-details-marker {
    display: none;
}

.trezo-operator-qr-body {
    padding: 0 10px 10px;
}

.trezo-operator-qr--compact {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trezo-operator-qr-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 8px;
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    color: var(--trezo-text-muted);
}

.trezo-operator-qr-image--compact {
    width: 132px;
    height: 132px;
    margin: 0 auto 8px;
    padding: 4px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: #fff;
}

.trezo-operator-qr-print {
    width: 100%;
}

.trezo-operator-qr-error {
    padding: 8px 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    text-align: center;
}

.trezo-operator-qr-error p {
    margin: 6px 0 8px;
}

@media (min-width: 1100px) {
    .trezo-operator-qr-details {
        border: none;
        background: transparent;
    }

    .trezo-operator-qr-summary {
        display: none;
    }

    .trezo-operator-qr-body {
        padding: 0;
    }

    .trezo-operator-card-qr .trezo-operator-qr--compact {
        padding: 10px;
        border: 1px solid var(--trezo-border);
        border-radius: var(--trezo-radius-lg);
        background: var(--trezo-surface-2);
    }
}

@media (max-width: 1099px) {
    .trezo-operator-card-layout {
        flex-direction: column;
    }

    .trezo-operator-card-qr {
        flex: none;
        width: 100%;
    }

    .trezo-operator-card-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .trezo-operator-card-grid {
        grid-template-columns: 1fr;
    }
}

/* Operator view page */
.trezo-operator-view-page {
    display: flex;
    flex-direction: column;
    gap: var(--trezo-space-grid);
}

.trezo-operator-view-stats {
    margin-bottom: 0;
}

.trezo-operator-view-tags {
    margin: 0;
}

.trezo-operator-view-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) min(300px, 32%);
    gap: var(--trezo-space-grid);
    align-items: start;
}

.trezo-operator-view-main,
.trezo-operator-view-aside {
    display: flex;
    flex-direction: column;
    gap: var(--trezo-space-grid);
    min-width: 0;
}

.trezo-operator-view-aside {
    position: sticky;
    top: 12px;
}

.trezo-operator-view-attestat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trezo-operator-view-qr-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.trezo-operator-view-qr-body .trezo-operator-qr--compact {
    width: 100%;
    max-width: 200px;
}

.trezo-operator-view-page .trezo-operator-view-stats .trezo-stat-card-compact {
    min-height: 84px;
}

@media (max-width: 1100px) {
    .trezo-operator-view-workspace {
        grid-template-columns: 1fr;
    }

    .trezo-operator-view-aside {
        position: static;
    }

    .trezo-operator-view-attestat-grid {
        grid-template-columns: 1fr;
    }
}

.trezo-oto-match-progress {
    margin-bottom: var(--trezo-space-grid);
}

.trezo-oto-match-progress.is-hidden {
    display: none;
}

.trezo-oto-match-progress-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.trezo-oto-match-progress-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-oto-match-progress-step {
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-oto-match-progress-bar-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.trezo-oto-match-progress-bar {
    flex: 1;
    height: 10px;
    border-radius: 999px;
    background: var(--trezo-surface-2);
    overflow: hidden;
}

.trezo-oto-match-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--trezo-primary), #37d80a);
    transition: width 0.35s ease;
}

.trezo-oto-match-progress-percent {
    min-width: 44px;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
    text-align: right;
}

.trezo-oto-match-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-oto-match-result {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-oto-match-result.is-hidden {
    display: none;
}

.trezo-tag-link {
    text-decoration: none;
    transition: opacity 0.15s ease, box-shadow 0.15s ease;
}

.trezo-tag-link:hover {
    opacity: 0.92;
    box-shadow: 0 0 0 1px rgba(96, 93, 255, 0.25);
    text-decoration: none;
}

.trezo-oto-user-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-oto-user-link:hover {
    text-decoration: underline;
}

.trezo-grid-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    color: var(--trezo-text-muted);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.trezo-grid-action:hover {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-form-section-title {
    margin: 0 0 14px;
    font-size: var(--trezo-fs-lg);
    font-weight: 600;
    color: var(--trezo-heading);
}

@media (max-width: 991px) {
    .trezo-admin-workspace {
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
    }

    .trezo-filter-panel {
        position: static;
        min-width: 0;
        max-width: 100%;
    }

    .trezo-admin-content {
        min-width: 0;
        max-width: 100%;
    }

    .trezo-page-stack {
        min-width: 0;
        max-width: 100%;
    }

    .trezo-filter-panel .trezo-filter-card .trezo-filter-card-body {
        display: none !important;
    }

    .trezo-filter-panel .trezo-filter-card.is-filter-open .trezo-filter-card-body {
        display: block !important;
    }

    .trezo-filter-panel .trezo-filter-card-head {
        cursor: pointer;
        user-select: none;
    }

    .trezo-filter-panel .trezo-filter-card-head > span:first-child::after {
        content: '▾';
        display: inline-block;
        margin-left: 6px;
        font-size: 11px;
        color: var(--trezo-text-muted);
        transition: transform 0.15s ease;
    }

    .trezo-filter-panel .trezo-filter-card.is-filter-open .trezo-filter-card-head > span:first-child::after {
        transform: rotate(180deg);
    }

    .trezo-device-onboard-grid {
        grid-template-columns: 1fr;
    }

    .trezo-device-onboard-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .trezo-record-grid {
        grid-template-columns: 1fr;
    }

    .trezo-record-thumb {
        width: 112px;
        height: 112px;
    }

    .trezo-wrapper.sidebar-collapsed .trezo-record-thumb {
        width: 144px;
        height: 144px;
    }
}

@media (max-width: 1199px) {
    .trezo-quick-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .trezo-stats-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .trezo-quick-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .trezo-quick-grid-4 .trezo-quick-item {
        min-height: 76px;
        padding: 10px 6px;
    }
}

.trezo-news-card {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-news-card:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.trezo-news-card-image {
    width: 100%;
    height: 88px;
    object-fit: cover;
    border-radius: var(--trezo-radius);
    border: 1px solid var(--trezo-border);
}

.trezo-news-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 6px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-news-card-title {
    margin: 0 0 8px;
    font-size: var(--trezo-fs-md);
    line-height: 1.35;
}

.trezo-news-card-title a {
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-news-card-title a:hover {
    color: var(--trezo-primary);
}

.trezo-news-card-excerpt {
    margin-bottom: 10px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.5;
}

.trezo-news-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-news-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius);
    text-decoration: none;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.trezo-news-item:hover {
    background: var(--trezo-surface-2);
    border-color: var(--trezo-border);
    text-decoration: none;
}

.trezo-news-date {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-news-title {
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.4;
}

.trezo-news-item:hover .trezo-news-title {
    color: var(--trezo-primary);
}

.trezo-news-empty {
    margin: 0;
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-md);
}

/* ===== PTO updater page ===== */
.trezo-updater-page {
    max-width: 960px;
}

.trezo-updater-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.trezo-updater-guest-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-updater-guest-note .trezo-lucide-icon,
.trezo-updater-guest-note svg.lucide {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--trezo-primary);
    stroke: var(--trezo-primary);
}

.trezo-updater-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-updater-item {
    padding: 16px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-updater-item:hover {
    border-color: color-mix(in srgb, var(--trezo-primary) 35%, var(--trezo-border));
    box-shadow: var(--trezo-shadow-sm);
}

.trezo-updater-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.trezo-updater-item-title {
    margin: 0 0 6px;
    font-size: var(--trezo-fs-md);
    font-weight: 600;
    color: var(--trezo-heading);
    line-height: 1.35;
}

.trezo-updater-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-updater-item-meta time,
.trezo-updater-item-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trezo-updater-item-body {
    font-size: var(--trezo-fs-sm);
    line-height: 1.6;
    color: var(--trezo-text);
}

.trezo-updater-item-body a {
    color: var(--trezo-primary);
    text-decoration: underline;
}

.trezo-updater-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.trezo-updater-item-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-updater-download-count,
.trezo-updater-download-muted {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-updater-download-muted {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trezo-updater-empty {
    margin: 0;
    padding: 24px 12px;
    text-align: center;
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-md);
}

@media (max-width: 767px) {
    .trezo-updater-item-head {
        flex-direction: column;
    }

    .trezo-record-badges {
        justify-content: flex-start;
    }

    .trezo-updater-status {
        justify-content: flex-start;
    }
}

.trezo-impersonation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid var(--trezo-warning-border, #f0c674);
    border-radius: var(--trezo-radius-md, 10px);
    background: var(--trezo-warning-bg, rgba(240, 198, 116, 0.12));
    color: var(--trezo-text);
    font-size: var(--trezo-fs-sm);
}

.trezo-impersonation-bar strong {
    color: var(--trezo-heading);
}

html[data-theme="dark"] .trezo-impersonation-bar {
    border-color: rgba(240, 198, 116, 0.35);
    background: rgba(240, 198, 116, 0.08);
}

/* Legacy pages inside Trezo layout */
.trezo-content .panel.panel-default {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    box-shadow: none;
    margin-bottom: var(--trezo-space-section);
}

.trezo-content .panel-default > .panel-heading {
    padding: 14px 16px;
    background: transparent;
    border-bottom: 1px solid var(--trezo-border);
    color: var(--trezo-heading);
    font-weight: 600;
}

.trezo-content .panel-default > .panel-body {
    padding: 16px;
}

.trezo-content .alert {
    border-radius: var(--trezo-radius);
    border-width: 1px;
    font-size: var(--trezo-fs-sm);
}

.trezo-content .alert-info {
    background: var(--trezo-info-soft);
    border-color: rgba(45, 182, 245, 0.25);
    color: var(--trezo-heading);
}

.trezo-content .alert-warning {
    background: var(--trezo-warning-soft);
    border-color: rgba(255, 188, 43, 0.35);
    color: var(--trezo-heading);
}

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

.trezo-content .btn-success:hover,
.trezo-content .btn-primary:hover {
    background: var(--trezo-primary-hover);
    border-color: var(--trezo-primary-hover);
    color: #fff;
}

.trezo-content .btn-default,
.trezo-content .btn-info {
    background: var(--trezo-surface);
    border-color: var(--trezo-border);
    color: var(--trezo-text);
}

.trezo-content .btn-default:hover,
.trezo-content .btn-info:hover {
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
}

.trezo-filter-panel .panel.panel-default {
    margin-bottom: 0;
}

.trezo-filter-panel .panel-default > .panel-heading {
    font-size: var(--trezo-fs-sm);
}

.trezo-filter-panel .panel-body .form-control {
    height: 34px;
    font-size: var(--trezo-fs-sm);
    border-radius: 7px;
    border-color: var(--trezo-border);
    background-color: var(--trezo-surface-2);
    color: var(--trezo-heading);
}

.trezo-filter-panel .panel-body .form-control:focus {
    background-color: var(--trezo-surface);
    border-color: var(--trezo-primary);
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.12);
}

.trezo-filter-panel .panel-body .form-group > label,
.trezo-filter-panel .checkbox label {
    font-weight: 400;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-legacy-list .list-view > div {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    padding: 14px 16px;
    margin-bottom: 10px;
}

.trezo-legacy-list .list-view > div:hover {
    border-color: rgba(96, 93, 255, 0.22);
}

.trezo-legacy-list hr {
    display: none;
}

.trezo-legacy-list .table {
    margin-bottom: 0;
    font-size: var(--trezo-fs-sm);
}

.trezo-legacy-list .table.explain > tbody > tr > td {
    border-top-color: var(--trezo-border);
    padding: 6px 8px;
}

.trezo-legacy-list h3 {
    margin-top: 0;
    font-size: var(--trezo-fs-lg);
    color: var(--trezo-heading);
}

.trezo-legacy-list h3 small {
    color: var(--trezo-text-muted);
}

.trezo-alert-info {
    border-color: rgba(45, 182, 245, 0.28);
    background: var(--trezo-info-soft);
    color: var(--trezo-heading);
}

.trezo-alert-success {
    border-color: rgba(55, 216, 10, 0.28);
    background: var(--trezo-success-soft);
    color: var(--trezo-heading);
}

.trezo-alert-danger {
    border-color: rgba(253, 88, 18, 0.25);
    background: var(--trezo-danger-soft);
    color: var(--trezo-danger);
}

.trezo-alert-info a {
    color: var(--trezo-primary);
    font-weight: 600;
}

.trezo-form-card .form-group {
    margin-bottom: 14px;
}

.trezo-form-card .control-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-form-card .form-control {
    border-radius: 7px;
    border-color: var(--trezo-border);
    background-color: var(--trezo-surface-2);
    color: var(--trezo-heading);
    box-shadow: none;
}

.trezo-form-card .form-control:focus {
    border-color: var(--trezo-primary);
    background-color: var(--trezo-surface);
    color: var(--trezo-heading);
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.12);
}

.trezo-form-card .form-control::placeholder {
    color: var(--trezo-text-muted);
    opacity: 1;
}

/* Поля ввода внутри Trezo-страниц (в т.ч. inline в таблицах) */
.trezo-content .form-control,
.trezo-content textarea.form-control,
.trezo-content select.form-control {
    background-color: var(--trezo-surface-2);
    border-color: var(--trezo-border);
    color: var(--trezo-heading);
    box-shadow: none;
}

.trezo-content .form-control:focus {
    background-color: var(--trezo-surface);
    border-color: var(--trezo-primary);
    color: var(--trezo-heading);
    box-shadow: 0 0 0 0.2rem rgba(96, 93, 255, 0.12);
}

.trezo-content .form-control::placeholder {
    color: var(--trezo-text-muted);
    opacity: 1;
}

html[data-theme="dark"] .trezo-content .form-control,
html[data-theme="dark"] .trezo-content textarea.form-control,
html[data-theme="dark"] .trezo-content select.form-control {
    background-color: var(--trezo-surface-2);
    border-color: var(--trezo-border);
    color: var(--trezo-heading);
}

html[data-theme="dark"] .trezo-content .form-control:focus {
    background-color: var(--trezo-surface);
    border-color: var(--trezo-primary);
    color: var(--trezo-heading);
}

.trezo-form-hint {
    margin: 0 0 14px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.trezo-min-app-version-card {
    margin-bottom: var(--trezo-space-section);
}

.trezo-min-app-version-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
}

.trezo-min-app-version-form .form-group {
    margin-bottom: 0;
}

.trezo-min-app-version-form label {
    display: block;
    margin-bottom: 6px;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-min-app-version-form .form-control {
    font-family: Consolas, Monaco, monospace;
    font-size: var(--trezo-fs-sm);
}

.trezo-min-app-version-actions {
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-min-app-version-hint {
    margin: 0;
    flex: 1 1 220px;
}

.trezo-min-app-source {
    display: inline-block;
    margin-top: 4px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-min-app-source-override {
    color: var(--trezo-warning);
}

.trezo-code-inline {
    padding: 1px 6px;
    border-radius: 4px;
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    font-family: Consolas, Monaco, monospace;
    font-size: 0.92em;
    color: var(--trezo-heading);
}

@media (max-width: 991px) {
    .trezo-min-app-version-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .trezo-min-app-version-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trezo-min-app-version-actions .trezo-btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 575px) {
    .trezo-news-card {
        grid-template-columns: 1fr;
    }

    .trezo-news-card-image {
        height: 160px;
    }
}

/* Ticket support form & queue */

.trezo-ticket-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid var(--trezo-border);
    background: linear-gradient(135deg, rgba(96, 93, 255, 0.12), rgba(151, 71, 255, 0.08));
}

.trezo-ticket-hero-glow {
    position: absolute;
    inset: auto -40px -60px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(96, 93, 255, 0.25), transparent 70%);
    pointer-events: none;
}

.trezo-ticket-hero-content {
    position: relative;
    z-index: 1;
}

.trezo-ticket-hero-label {
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--trezo-text-muted);
}

.trezo-ticket-hero-title {
    margin-top: 4px;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-ticket-hero-meta {
    margin-top: 8px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-ticket-hero-dot {
    margin: 0 6px;
}

.trezo-ticket-hero-icon {
    position: relative;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-ticket-hero-icon .trezo-lucide-icon,
.trezo-ticket-hero-icon svg.lucide {
    width: 28px;
    height: 28px;
}

.trezo-ticket-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.trezo-ticket-form-card .trezo-card-body {
    padding-top: 8px;
}

.trezo-ticket-field {
    margin-bottom: 18px;
}

.trezo-ticket-field-label,
.trezo-ticket-form .control-label {
    display: block;
    margin-bottom: 8px;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-ticket-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.trezo-ticket-type-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 14px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.trezo-ticket-type-card:hover {
    border-color: var(--trezo-primary);
}

.trezo-ticket-type-card.is-active {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    box-shadow: inset 0 0 0 1px rgba(96, 93, 255, 0.25);
}

.trezo-ticket-type-icon {
    color: var(--trezo-primary);
}

.trezo-ticket-type-title {
    font-size: var(--trezo-fs-md);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-ticket-type-hint {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-ticket-message,
.trezo-ticket-contacts,
.trezo-ticket-status-select {
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
    color: var(--trezo-text);
    box-shadow: none;
}

.trezo-ticket-message {
    min-height: 180px;
    resize: vertical;
}

.trezo-ticket-message:focus,
.trezo-ticket-contacts:focus,
.trezo-ticket-status-select:focus {
    border-color: var(--trezo-primary);
    outline: none;
    box-shadow: 0 0 0 3px var(--trezo-primary-soft);
}

.trezo-ticket-message-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 6px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-ticket-message-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trezo-ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.trezo-ticket-submit {
    align-self: flex-start;
    min-width: 220px;
}

.trezo-ticket-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-ticket-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trezo-ticket-tips {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-ticket-tips li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.5;
}

.trezo-ticket-tips .trezo-lucide-icon,
.trezo-ticket-tips svg.lucide {
    margin-top: 2px;
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-ticket-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-ticket-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
    color: var(--trezo-text);
    text-decoration: none;
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    transition: border-color 0.15s ease, color 0.15s ease;
}

.trezo-ticket-link:hover {
    border-color: var(--trezo-primary);
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-ticket-preview {
    margin-top: 10px;
    padding: 12px 14px;
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.55;
    white-space: normal;
}

.trezo-ticket-view-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.trezo-ticket-view-grid.is-single-column {
    grid-template-columns: minmax(0, 1fr);
}

.trezo-ticket-view-main-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.trezo-ticket-contacts-bar .trezo-card-body {
    padding-top: 0;
}

.trezo-ticket-contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px 20px;
}

.trezo-ticket-contacts-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.trezo-ticket-contacts-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.trezo-ticket-device-link-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-ticket-aside-fold {
    margin-bottom: 0;
}

.trezo-ticket-aside-fold .trezo-oto-fold-trigger {
    padding: 10px 12px;
    gap: 10px;
    align-items: center;
}

.trezo-ticket-aside-fold .trezo-oto-fold-trigger-main {
    min-width: 0;
    flex: 1;
}

.trezo-ticket-aside-fold .trezo-oto-fold-icon {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.trezo-ticket-aside-fold .trezo-oto-fold-title {
    font-size: var(--trezo-fs-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.trezo-ticket-aside-fold .trezo-oto-fold-meta {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trezo-ticket-aside-fold-text {
    min-width: 0;
    flex: 1;
}

.trezo-ticket-aside-fold-chevron-wrap {
    flex: 0 0 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.trezo-ticket-aside-fold-meta-status {
    font-weight: 600;
}

.trezo-ticket-aside-fold-meta-status.is-success {
    color: #16a34a;
}

.trezo-ticket-aside-fold-meta-status.is-warning,
.trezo-ticket-aside-fold-meta-status:not(.is-success):not(.is-muted) {
    color: #d97706;
}

.trezo-ticket-aside-fold-meta-status.is-muted {
    color: var(--trezo-text-muted);
}

.trezo-ticket-aside-fold .trezo-oto-fold-panel {
    padding: 8px 12px 12px;
    background: var(--trezo-surface);
}

.trezo-ticket-aside-fold-panel {
    padding-top: 8px;
}

.trezo-ticket-aside-fold-panel .trezo-ticket-meta-list {
    gap: 5px;
}

.trezo-ticket-aside-fold-panel .trezo-ticket-meta-row {
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
}

.trezo-ticket-aside-fold-panel .trezo-ticket-meta-label {
    flex: 0 0 88px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
    line-height: 1.35;
    padding-top: 1px;
}

.trezo-ticket-aside-fold-panel .trezo-ticket-meta-value {
    flex: 1;
    min-width: 0;
    font-size: var(--trezo-fs-xs);
    line-height: 1.35;
}

.trezo-ticket-aside-fold-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 0;
}

.trezo-ticket-aside-fold-actions .trezo-btn {
    flex: 1 1 calc(50% - 3px);
    min-width: 0;
}

.trezo-ticket-aside-fold-actions-single {
    width: 100%;
    margin-top: 4px;
}

.trezo-ticket-aside-fold-alert {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin: 0 0 8px;
    padding: 6px 8px;
    border-radius: var(--trezo-radius-md);
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    color: var(--trezo-text);
    font-size: 11px;
    line-height: 1.35;
}

.trezo-ticket-aside-fold-alert svg {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-top: 1px;
    color: #d97706;
}

.trezo-ticket-aside-fold.is-registry-inactive:not([open]) {
    border-color: rgba(245, 158, 11, 0.35);
}

.trezo-ticket-aside-fold.has-summary-lines .trezo-oto-fold-trigger {
    align-items: flex-start;
}

.trezo-ticket-aside-fold.has-summary-lines .trezo-ticket-aside-fold-chevron-wrap {
    margin-top: 4px;
}

.trezo-ticket-aside-fold-summary-lines {
    display: block;
    margin-top: 4px;
}

.trezo-ticket-aside-fold-summary-line {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    font-size: 11px;
    line-height: 1.35;
    color: var(--trezo-text-muted);
    white-space: normal;
}

.trezo-ticket-aside-fold-summary-line + .trezo-ticket-aside-fold-summary-line {
    margin-top: 3px;
}

.trezo-ticket-aside-fold-summary-line svg {
    flex: 0 0 12px;
    width: 12px;
    height: 12px;
    margin-top: 1px;
    opacity: 0.7;
}

.trezo-ticket-aside-fold-summary-line a {
    color: var(--trezo-primary);
    text-decoration: none;
    white-space: nowrap;
}

.trezo-ticket-aside-fold-summary-line a:hover {
    text-decoration: underline;
}

.trezo-ticket-aside-fold-summary-pto-text {
    min-width: 0;
}

.trezo-ticket-aside-fold-summary-line-muted {
    opacity: 0.85;
}

.trezo-ticket-aside-fold-summary-note {
    margin-left: 4px;
    font-size: 10px;
    color: var(--trezo-text-muted);
    white-space: nowrap;
}

.trezo-ticket-pto-summary-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 6px;
}

.trezo-ticket-pto-summary-item {
    font-size: var(--trezo-fs-xs);
    line-height: 1.35;
    color: var(--trezo-text);
}

.trezo-ticket-pto-summary-coords {
    display: block;
    margin-top: 1px;
    font-size: 10px;
    color: var(--trezo-text-muted);
    font-variant-numeric: tabular-nums;
}

.trezo-ticket-meta-row-block .trezo-ticket-meta-value {
    display: block;
}

.trezo-ticket-aside-fold.is-registry-inactive:not([open]) .trezo-oto-fold-icon {
    color: #d97706;
    border-color: rgba(245, 158, 11, 0.3);
    background: rgba(245, 158, 11, 0.08);
}

.trezo-ticket-device-oto-form {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding-top: 2px;
}

.trezo-ticket-device-oto-form-inner {
    margin: 0;
}

.trezo-ticket-device-oto-form-row {
    display: flex;
    align-items: stretch;
    gap: 6px;
}

.trezo-ticket-device-oto-input {
    flex: 1;
    min-width: 0;
    height: 32px;
    padding: 4px 8px;
    font-size: var(--trezo-fs-sm);
}

.trezo-ticket-device-oto-save {
    flex: 0 0 32px;
    width: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trezo-ticket-device-oto-hint {
    margin: 0;
    font-size: 11px;
    line-height: 1.35;
    color: var(--trezo-text-muted);
}

.trezo-ticket-device-oto-hint a {
    color: var(--trezo-primary);
    text-decoration: none;
    font-weight: 500;
}

.trezo-ticket-device-oto-hint a:hover {
    text-decoration: underline;
}

.trezo-ticket-device-oto-hint-muted {
    color: var(--trezo-text-muted);
}

.trezo-ticket-aside-fold.is-readonly {
    pointer-events: none;
}

.trezo-ticket-aside-fold.is-readonly .trezo-ticket-aside-fold-chevron-wrap {
    display: none;
}

.trezo-ticket-thread-card .trezo-card-body {
    padding-top: 0;
}

.trezo-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trezo-ticket-thread-item {
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    padding: 14px 16px;
}

.trezo-ticket-thread-item.is-support {
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.04);
}

.trezo-ticket-thread-item.is-user {
    border-color: rgba(59, 130, 246, 0.2);
    background: rgba(59, 130, 246, 0.03);
}

.trezo-ticket-thread-item.is-internal {
    opacity: 0.82;
    border-style: dashed;
}

.trezo-ticket-thread-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 10px;
}

.trezo-ticket-thread-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--trezo-surface-2, var(--trezo-border));
    color: var(--trezo-text-muted);
    flex-shrink: 0;
}

.trezo-ticket-thread-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}

.trezo-ticket-thread-author {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-text);
}

.trezo-ticket-thread-date {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-ticket-thread-body {
    font-size: var(--trezo-fs-md);
    line-height: 1.65;
    color: var(--trezo-text);
    white-space: normal;
    word-break: break-word;
}

.trezo-ticket-thread-empty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2, rgba(0, 0, 0, 0.03));
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-ticket-card-locked {
    opacity: 0.95;
}

.trezo-ticket-status-readonly {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-ticket-locked-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    font-size: var(--trezo-fs-sm);
    line-height: 1.5;
    color: var(--trezo-text-muted);
}

.trezo-ticket-message-full {
    font-size: var(--trezo-fs-md);
    line-height: 1.65;
    color: var(--trezo-text);
    white-space: normal;
}

.trezo-ticket-view-aside {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.trezo-ticket-meta-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.trezo-ticket-meta-row {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trezo-ticket-meta-label {
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--trezo-text-muted);
}

.trezo-ticket-meta-value {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-ticket-view-actions {
    border-top: 1px solid var(--trezo-border);
}

.trezo-empty-wrap {
    padding: 24px 0;
}

.trezo-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 36px 20px;
    border-radius: var(--trezo-radius-lg);
    border: 1px dashed var(--trezo-border);
    background: var(--trezo-surface);
    text-align: center;
}

.trezo-empty-state .trezo-lucide-icon,
.trezo-empty-state svg.lucide {
    width: 40px;
    height: 40px;
    color: var(--trezo-text-muted);
}

.trezo-empty-state p {
    margin: 0;
    font-size: var(--trezo-fs-md);
    color: var(--trezo-text-muted);
}

@media (max-width: 991px) {
    .trezo-ticket-grid,
    .trezo-ticket-view-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .trezo-ticket-type-grid {
        grid-template-columns: 1fr;
    }

    .trezo-ticket-hero {
        flex-direction: column;
        align-items: flex-start;
    }

    .trezo-ticket-submit {
        width: 100%;
    }
}

/* Documents service (doc/index) */
.trezo-doc-hero {
    background: linear-gradient(135deg, rgba(45, 182, 245, 0.12), rgba(96, 93, 255, 0.1));
}

.trezo-doc-stat-client {
    font-size: clamp(1rem, 2vw, 1.35rem);
    line-height: 1.25;
}

.trezo-doc-client-info {
    margin: -6px 0 14px;
    padding: 12px 14px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
    line-height: 1.5;
}

.trezo-doc-client-info.is-hidden {
    display: none;
}

.trezo-doc-client-info.is-loading {
    background: var(--trezo-surface-2);
    color: var(--trezo-text-muted);
}

.trezo-doc-client-info.is-success {
    border-color: rgba(55, 216, 10, 0.28);
    background: var(--trezo-success-soft);
    color: var(--trezo-heading);
}

.trezo-doc-client-info.is-error {
    border-color: rgba(253, 88, 18, 0.28);
    background: var(--trezo-danger-soft);
    color: var(--trezo-heading);
}

.trezo-doc-print-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.trezo-doc-print-card {
    padding: 16px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-doc-print-title {
    font-weight: 700;
    color: var(--trezo-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}

.trezo-doc-print-meta {
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-doc-print-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.trezo-doc-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-doc-detail-row {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 10px;
    font-size: var(--trezo-fs-sm);
}

.trezo-doc-detail-label {
    color: var(--trezo-text-muted);
}

.trezo-doc-aside-meta {
    font-size: var(--trezo-fs-sm);
}

.trezo-doc-aside-label {
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--trezo-text-muted);
    margin-bottom: 4px;
}

.trezo-doc-delete {
    width: 100%;
    justify-content: center;
    color: var(--trezo-danger);
    border-color: rgba(253, 88, 18, 0.35);
}

@media (max-width: 767px) {
    .trezo-doc-print-grid {
        grid-template-columns: 1fr;
    }

    .trezo-doc-detail-row {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Module CRUD pages (pto, dc, operator, dkp, user) */
.trezo-list-filter-card .trezo-card-body {
    padding-top: 14px;
    padding-bottom: 14px;
}

.trezo-record-card.is-disabled {
    opacity: 0.82;
    border-color: rgba(253, 88, 18, 0.22);
}

.trezo-record-grid-wide {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trezo-record-extra {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--trezo-border);
}

.trezo-view-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 20px;
    align-items: start;
}

.trezo-detail-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.trezo-detail-table th,
.trezo-detail-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--trezo-border);
    vertical-align: top;
}

.trezo-detail-table th {
    width: 38%;
    color: var(--trezo-text-muted);
    font-weight: 600;
    font-size: var(--trezo-fs-sm);
}

.trezo-detail-table td {
    color: var(--trezo-heading);
    font-size: var(--trezo-fs-sm);
}

.trezo-dc-view-body .table.explain td,
.trezo-dc-view-body .table.explain th {
    border-color: var(--trezo-border);
}

.trezo-dc-view-body .alert {
    border-radius: var(--trezo-radius-md);
}

.trezo-form-card h4 {
    margin: 18px 0 10px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-form-card .btn-success,
.trezo-form-card .btn-primary,
.trezo-form-card .btn-default {
    border-radius: 7px;
}

.trezo-form-card .btn-primary,
.trezo-form-card .btn-success {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
}

@media (max-width: 991px) {
    .trezo-record-grid-wide,
    .trezo-view-grid {
        grid-template-columns: 1fr;
    }
}

/* Dispatch super-service (dcqueries) */
.trezo-dispatch-hero {
    background: linear-gradient(135deg, rgba(151, 71, 255, 0.12), rgba(96, 93, 255, 0.1));
}

.trezo-dispatch-select-grid {
    align-items: start;
}

.trezo-dispatch-pto-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

.trezo-dispatch-pto-card {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.trezo-dispatch-pto-card:hover {
    border-color: rgba(96, 93, 255, 0.35);
}

.trezo-dispatch-pto-card input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trezo-dispatch-pto-card-body {
    flex: 1;
    min-width: 0;
}

.trezo-dispatch-pto-title {
    display: block;
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-dispatch-pto-meta {
    display: block;
    margin-top: 2px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-pto-check {
    color: var(--trezo-border);
}

.trezo-dispatch-pto-check .trezo-lucide-icon,
.trezo-dispatch-pto-check svg.lucide {
    width: 22px;
    height: 22px;
}

.trezo-dispatch-pto-card:has(input:checked) {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    box-shadow: 0 0 0 1px rgba(96, 93, 255, 0.15);
}

.trezo-dispatch-pto-card:has(input:checked) .trezo-dispatch-pto-check {
    color: var(--trezo-primary);
}

.trezo-dispatch-board .panel {
    border-radius: var(--trezo-radius-md);
    border-color: var(--trezo-border);
    box-shadow: none;
}

.trezo-dispatch-board .panel-heading {
    border-top-left-radius: calc(var(--trezo-radius-md) - 1px);
    border-top-right-radius: calc(var(--trezo-radius-md) - 1px);
}

.trezo-dispatch-page .trezo-stats-grid {
    margin-bottom: var(--trezo-space-section);
}

.trezo-dispatch-quota-bar {
    margin-top: 10px;
    height: 6px;
    border-radius: 999px;
    background: var(--trezo-surface-2);
    overflow: hidden;
}

.trezo-dispatch-quota-bar-lg {
    height: 8px;
    margin-top: 8px;
}

.trezo-dispatch-quota-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--trezo-primary), #605dff);
    transition: width 0.25s ease;
}

.trezo-dispatch-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.9fr) minmax(360px, 1.4fr) minmax(260px, 0.9fr);
    gap: var(--trezo-space-grid);
    align-items: start;
}

.trezo-dispatch-col {
    display: flex;
    flex-direction: column;
    gap: var(--trezo-space-grid);
    min-width: 0;
}

.trezo-dispatch-card .trezo-card-body {
    padding-top: 12px;
}

.trezo-dispatch-card-stack {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.trezo-dispatch-card-queue .trezo-card-body {
    min-height: 420px;
}

.trezo-dispatch-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
}

.trezo-dispatch-queue-list {
    min-height: 420px;
}

.trezo-dispatch-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 28px 16px;
    border: 1px dashed var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-sm);
    text-align: center;
}

.trezo-dispatch-empty .trezo-lucide-icon,
.trezo-dispatch-empty svg.lucide {
    width: 28px;
    height: 28px;
    opacity: 0.55;
}

.trezo-dispatch-empty-actions {
    margin-top: 4px;
}

.trezo-dispatch-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid rgba(45, 182, 245, 0.22);
    background: var(--trezo-info-soft);
    color: var(--trezo-heading);
    font-size: var(--trezo-fs-sm);
}

.trezo-dispatch-notice-label {
    font-weight: 600;
    margin-bottom: 2px;
}

.trezo-dispatch-notice-value {
    color: var(--trezo-text);
}

.trezo-dispatch-slot-result {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-slot-success {
    display: flex;
    flex-direction: column;
    gap: 4px;
    color: var(--trezo-heading);
}

.trezo-dispatch-slot-success strong {
    font-size: var(--trezo-fs-md);
    color: var(--trezo-success);
}

.trezo-dispatch-slot-error {
    color: var(--trezo-danger);
}

.trezo-dispatch-incoming-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-dispatch-incoming-card:hover {
    border-color: rgba(96, 93, 255, 0.28);
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.trezo-dispatch-incoming-main {
    flex: 1;
    min-width: 0;
}

.trezo-dispatch-incoming-title {
    font-weight: 600;
}

.trezo-dispatch-incoming-title a {
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-dispatch-incoming-title a:hover {
    color: var(--trezo-primary);
}

.trezo-dispatch-incoming-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-queue-item {
    padding: 14px 16px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-dispatch-queue-item.queued-item {
    cursor: grab;
}

.trezo-dispatch-queue-item.queued-item:active {
    cursor: grabbing;
}

.trezo-dispatch-queue-item-active {
    border-color: rgba(34, 197, 94, 0.35);
    background: rgba(34, 197, 94, 0.04);
}

.sortable-ghost.trezo-dispatch-queue-item {
    opacity: 0.55;
    border-style: dashed;
}

.trezo-dispatch-queue-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.trezo-dispatch-queue-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.trezo-dispatch-queue-title a {
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-dispatch-queue-title a:hover {
    color: var(--trezo-primary);
}

.trezo-dispatch-queue-subtitle {
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-link-btn {
    display: inline-flex;
    margin-left: 6px;
    padding: 1px 7px;
    border-radius: 999px;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    text-decoration: none;
}

.trezo-dispatch-drag-handle {
    color: var(--trezo-text-muted);
    cursor: grab;
    line-height: 1;
}

.trezo-dispatch-drag-handle .trezo-lucide-icon,
.trezo-dispatch-drag-handle svg.lucide {
    width: 18px;
    height: 18px;
}

.trezo-dispatch-queue-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 10px;
}

.trezo-dispatch-timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-dispatch-timer .trezo-lucide-icon,
.trezo-dispatch-timer svg.lucide {
    width: 14px;
    height: 14px;
}

.trezo-dispatch-queue-time {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-queue-schedule {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
}

.trezo-dispatch-schedule-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    color: var(--trezo-text-muted);
}

.trezo-dispatch-schedule-row .trezo-lucide-icon,
.trezo-dispatch-schedule-row svg.lucide {
    width: 13px;
    height: 13px;
    vertical-align: -2px;
}

.trezo-dispatch-schedule-muted {
    color: var(--trezo-text-muted);
    font-style: italic;
}

.trezo-dispatch-queue-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.trezo-dispatch-alert {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: var(--trezo-radius-sm);
    font-size: var(--trezo-fs-sm);
}

.trezo-dispatch-alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--trezo-danger);
}

.trezo-dispatch-expert-card {
    padding: 12px 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface);
}

.trezo-dispatch-expert-card.is-free {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.04);
}

.trezo-dispatch-expert-card.is-busy {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.04);
}

.trezo-dispatch-expert-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.trezo-dispatch-expert-body {
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-dispatch-expert-task {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-dispatch-expert-free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-success);
}

.trezo-dispatch-pto-summary {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-dispatch-pto-name a {
    font-weight: 600;
    color: var(--trezo-heading);
    text-decoration: none;
}

.trezo-dispatch-pto-name a:hover {
    color: var(--trezo-primary);
}

.trezo-dispatch-quota-inline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-dispatch-text-success {
    color: var(--trezo-success);
}

.trezo-dispatch-text-warning {
    color: var(--trezo-warning);
}

.trezo-dispatch-text-muted {
    color: var(--trezo-text-muted);
}

@media (max-width: 1199px) {
    .trezo-dispatch-grid {
        grid-template-columns: 1fr 1fr;
    }

    .trezo-dispatch-col-main {
        grid-column: 1 / -1;
        order: -1;
    }
}

@media (max-width: 767px) {
    .trezo-dispatch-grid {
        grid-template-columns: 1fr;
    }

    .trezo-dispatch-col-main {
        order: 0;
    }
}

html[data-theme="dark"] .trezo-dispatch-incoming-card:hover,
html[data-theme="dark"] .trezo-dispatch-queue-item {
    box-shadow: none;
}

html[data-theme="dark"] .trezo-dispatch-queue-item-active {
    background: rgba(34, 197, 94, 0.08);
}

html[data-theme="dark"] .trezo-dispatch-expert-card.is-free {
    background: rgba(34, 197, 94, 0.08);
}

html[data-theme="dark"] .trezo-dispatch-expert-card.is-busy {
    background: rgba(245, 158, 11, 0.08);
}

.trezo-stat-delta-success {
    color: var(--trezo-success);
}

.trezo-stat-delta-danger {
    color: var(--trezo-danger);
}

.trezo-stat-delta-neutral {
    color: var(--trezo-text-muted);
}

.trezo-stat-delta {
    font-weight: 600;
    margin-top: 6px;
    line-height: 1.45;
}

.trezo-stat-value-split {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.trezo-stat-value-sep {
    font-size: 0.72em;
    font-weight: 600;
    color: var(--trezo-text-muted);
}

.trezo-stat-tariff-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin-top: 2px;
}

.trezo-stat-tariff-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.trezo-stat-tariff-term {
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-stat-tariff-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--trezo-heading);
    line-height: 1.15;
}

.trezo-stat-tariff-value-money {
    font-size: 1rem;
}

.trezo-stat-tariff-delta {
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
}

.trezo-app-sales-wrap {
    max-width: 100%;
}

.trezo-app-sales-table {
    min-width: 980px;
    font-size: var(--trezo-fs-sm);
}

.trezo-app-sales-table thead th,
.trezo-app-sales-table tbody td,
.trezo-app-sales-table tfoot td {
    padding: 8px 10px;
    text-align: right;
}

.trezo-app-sales-table thead th:first-child,
.trezo-app-sales-table thead th:nth-child(2),
.trezo-app-sales-table tbody td:first-child,
.trezo-app-sales-table tbody td:nth-child(2),
.trezo-app-sales-table tfoot td:first-child,
.trezo-app-sales-table tfoot td:nth-child(2) {
    text-align: left;
}

.trezo-app-sales-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--trezo-surface);
}

.trezo-app-sales-month {
    left: 42px;
    min-width: 92px;
}

.trezo-app-sales-group-new {
    background: rgba(34, 197, 94, 0.06);
}

.trezo-app-sales-group-renew {
    background: rgba(45, 182, 245, 0.08);
}

.trezo-app-sales-group-end {
    border-right: 2px solid var(--trezo-border);
}

html[data-theme="dark"] .trezo-app-sales-sticky {
    background: var(--trezo-surface);
}

html[data-theme="dark"] .trezo-app-sales-group-new {
    background: rgba(34, 197, 94, 0.1);
}

html[data-theme="dark"] .trezo-app-sales-group-renew {
    background: rgba(45, 182, 245, 0.12);
}

/* Auth pages (login, signup, password reset) */

.trezo-auth-body {
    overflow-x: hidden;
}

.trezo-auth-page {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 32px;
}

.trezo-auth-bg {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.trezo-auth-bg-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.45;
}

.trezo-auth-bg-shape-1 {
    width: 420px;
    height: 420px;
    top: -120px;
    right: -80px;
    background: var(--trezo-primary);
}

.trezo-auth-bg-shape-2 {
    width: 360px;
    height: 360px;
    bottom: -100px;
    left: -60px;
    background: var(--trezo-info);
}

.trezo-auth-topbar {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: flex-end;
    margin-bottom: 8px;
}

.trezo-auth-main {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.trezo-auth-main:has(.trezo-auth-card--wide),
.trezo-auth-main:has(.trezo-pay-photo),
.trezo-auth-main:has(.trezo-updater-page) {
    max-width: 520px;
}

@media (min-width: 768px) {
    .trezo-auth-main:has(.trezo-pay-photo) {
        max-width: 760px;
    }

    .trezo-auth-main:has(.trezo-updater-page) {
        max-width: 860px;
    }
}

.trezo-auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.trezo-auth-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.trezo-auth-logo {
    max-width: 180px;
    height: auto;
}

[data-theme="dark"] .trezo-auth-logo {
    filter: brightness(0) invert(1);
}

.trezo-auth-alert {
    margin-bottom: 16px;
}

.trezo-auth-flashes {
    width: 100%;
    margin-bottom: 16px;
}

.trezo-auth-flash {
    margin: 0 0 10px;
    padding: 12px 14px;
    border-radius: var(--trezo-radius);
    border: 1px solid transparent;
    font-size: var(--trezo-fs-sm);
    line-height: 1.5;
    box-shadow: none;
}

.trezo-auth-flash:last-child {
    margin-bottom: 0;
}

.trezo-auth-flash.alert-success {
    background: var(--trezo-success-soft);
    border-color: rgba(55, 216, 10, 0.25);
    color: var(--trezo-heading);
}

.trezo-auth-flash.alert-danger,
.trezo-auth-flash.alert-error {
    background: var(--trezo-danger-soft);
    border-color: rgba(253, 88, 18, 0.25);
    color: var(--trezo-heading);
}

.trezo-auth-flash.alert-info {
    background: var(--trezo-info-soft);
    border-color: rgba(45, 182, 245, 0.25);
    color: var(--trezo-heading);
}

.trezo-auth-flash.alert-warning {
    background: var(--trezo-warning-soft);
    border-color: rgba(255, 188, 43, 0.35);
    color: var(--trezo-heading);
}

.trezo-auth-flash .close {
    opacity: 0.55;
    text-shadow: none;
    color: inherit;
}

.trezo-auth-card {
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    box-shadow: var(--trezo-shadow);
    padding: 28px 28px 24px;
}

.trezo-auth-card-head {
    text-align: center;
    margin-bottom: 22px;
}

.trezo-auth-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}

.trezo-auth-icon .trezo-lucide-icon,
.trezo-auth-icon svg.lucide {
    width: 24px;
    height: 24px;
}

.trezo-auth-title {
    margin: 0 0 8px;
    font-size: var(--trezo-fs-xl);
    font-weight: 700;
    color: var(--trezo-heading);
    line-height: 1.3;
}

.trezo-auth-subtitle {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-auth-subtitle strong {
    color: var(--trezo-heading);
    font-weight: 600;
    word-break: break-word;
}

.trezo-auth-code-input {
    letter-spacing: 0.08em;
    font-weight: 600;
    text-align: center;
}

.trezo-auth-form .form-group {
    margin-bottom: 16px;
}

.trezo-auth-form .control-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
    margin-bottom: 6px;
}

.trezo-auth-form .form-control {
    height: 44px;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
    color: var(--trezo-heading);
    font-size: var(--trezo-fs-md);
    box-shadow: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.trezo-auth-form .form-control:focus {
    border-color: var(--trezo-primary);
    background: var(--trezo-surface);
    box-shadow: 0 0 0 3px var(--trezo-primary-soft);
}

.trezo-auth-form .form-control::placeholder {
    color: var(--trezo-text-muted);
}

.trezo-auth-form .help-block-error {
    margin: 6px 0 0;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-danger);
}

.trezo-auth-form .has-error .form-control {
    border-color: var(--trezo-danger);
}

.trezo-auth-captcha {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.trezo-auth-captcha-image img,
.trezo-auth-captcha-img {
    display: block;
    height: 44px;
    width: auto;
    border-radius: 8px;
    border: 1px solid var(--trezo-border);
    cursor: pointer;
    background: var(--trezo-surface);
}

.trezo-auth-captcha-input {
    flex: 1;
    min-width: 140px;
}

.trezo-auth-captcha-input .form-control {
    width: 100%;
}

.trezo-auth-checkbox-group {
    margin-bottom: 18px;
}

.trezo-auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.trezo-auth-checkbox input[type="checkbox"] {
    margin: 2px 0 0;
    width: 16px;
    height: 16px;
    accent-color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-auth-checkbox label {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
    line-height: 1.45;
    font-weight: 400;
}

.trezo-auth-checkbox label a {
    color: var(--trezo-primary);
    font-weight: 600;
    text-decoration: none;
}

.trezo-auth-checkbox label a:hover {
    text-decoration: underline;
}

.trezo-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}

.trezo-auth-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    font-weight: 600;
}

.trezo-auth-btn .trezo-lucide-icon,
.trezo-auth-btn svg.lucide {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.trezo-auth-links {
    margin-top: 16px;
    text-align: center;
}

.trezo-auth-links a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-primary);
    font-weight: 600;
    text-decoration: none;
}

.trezo-auth-links a:hover {
    text-decoration: underline;
}

.trezo-auth-footer-note {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--trezo-border);
    text-align: center;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-auth-register-link {
    display: inline-block;
    margin-left: 6px;
    color: var(--trezo-primary);
    font-weight: 700;
    text-decoration: none;
}

.trezo-auth-register-link:hover {
    text-decoration: underline;
}

.trezo-auth-footer {
    position: relative;
    z-index: 1;
    margin-top: 24px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

@media (max-width: 479px) {
    .trezo-auth-card {
        padding: 22px 18px 18px;
    }

    .trezo-auth-logo {
        max-width: 150px;
    }
}

.trezo-auth-note {
    margin: 0 0 16px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-auth-note a {
    color: var(--trezo-primary);
    font-weight: 600;
    text-decoration: none;
}

.trezo-auth-note a:hover {
    text-decoration: underline;
}

.trezo-auth-media {
    margin-top: 20px;
    border-radius: var(--trezo-radius-lg);
    overflow: hidden;
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-auth-media-img {
    display: block;
    width: 100%;
    height: auto;
}

.trezo-auth-media-caption {
    margin: 0;
    padding: 10px 12px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    text-align: center;
}

.trezo-auth-icon--success {
    background: var(--trezo-success-soft);
    color: var(--trezo-success);
}

.trezo-auth-card--message {
    text-align: center;
}

.trezo-auth-card--message .trezo-auth-actions {
    margin-top: 8px;
}

.trezo-auth-steps {
    margin: 0 0 22px;
    padding-left: 20px;
    color: var(--trezo-text);
    font-size: var(--trezo-fs-sm);
    line-height: 1.6;
}

.trezo-auth-steps li + li {
    margin-top: 12px;
}

.trezo-pay-photo {
    width: 100%;
}

.trezo-pay-shell {
    overflow: hidden;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    box-shadow: var(--trezo-shadow);
}

.trezo-pay-hero {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 24px 22px;
    background: linear-gradient(135deg, #605dff 0%, #7a58ff 52%, #9747ff 100%);
    color: #fff;
}

.trezo-pay-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.16);
    flex-shrink: 0;
}

.trezo-pay-hero-icon .trezo-lucide-icon,
.trezo-pay-hero-icon svg.lucide {
    width: 28px;
    height: 28px;
}

.trezo-pay-hero-label {
    font-size: var(--trezo-fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.85;
    margin-bottom: 4px;
}

.trezo-pay-hero-title {
    margin: 0 0 6px;
    font-size: var(--trezo-fs-xl);
    font-weight: 700;
    line-height: 1.25;
}

.trezo-pay-hero-text {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    opacity: 0.92;
    line-height: 1.5;
}

.trezo-pay-body {
    padding: 22px 22px 18px;
}

.trezo-pay-block + .trezo-pay-block {
    margin-top: 24px;
}

.trezo-pay-block-head {
    margin-bottom: 14px;
}

.trezo-pay-block-title {
    margin: 0 0 4px;
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-pay-block-subtitle {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
}

.trezo-pay-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 16px 18px;
    border: 1px solid rgba(96, 93, 255, 0.18);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-primary-soft);
}

.trezo-pay-summary-label {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-pay-summary-price {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
    color: var(--trezo-heading);
}

.trezo-pay-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    width: 100%;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
}

.trezo-pay-summary-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trezo-pay-badge-danger {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--trezo-danger-soft);
    color: var(--trezo-danger);
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
}

.trezo-pay-info-value-mono {
    word-break: break-all;
    font-size: var(--trezo-fs-xs);
    font-weight: 500;
}

.trezo-pay-methods {
    display: grid;
    gap: 12px;
}

.trezo-pay-method {
    padding: 16px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface-2);
}

.trezo-pay-method-primary {
    border-color: rgba(96, 93, 255, 0.22);
    background: linear-gradient(180deg, rgba(96, 93, 255, 0.08), rgba(96, 93, 255, 0.03));
}

.trezo-pay-method-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
}

.trezo-pay-method-head .trezo-lucide-icon,
.trezo-pay-method-head svg.lucide {
    width: 22px;
    height: 22px;
    color: var(--trezo-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.trezo-pay-method-title {
    font-size: var(--trezo-fs-md);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-pay-method-text {
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
}

.trezo-pay-footer {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--trezo-border);
    text-align: center;
}

.trezo-pay-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.trezo-pay-notice .trezo-lucide-icon,
.trezo-pay-notice svg.lucide {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.trezo-pay-photo-header {
    text-align: center;
    margin-bottom: 22px;
}

.trezo-pay-photo-icon {
    margin-bottom: 14px;
}

.trezo-pay-periods {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 768px) {
    .trezo-pay-periods {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.trezo-pay-period {
    display: block;
    text-align: center;
    padding: 16px 10px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface-2);
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

a.trezo-pay-period:hover {
    border-color: var(--trezo-primary);
    transform: translateY(-1px);
    text-decoration: none;
    color: inherit;
}

.trezo-pay-period.active {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    box-shadow: 0 8px 24px rgba(96, 93, 255, 0.16);
}

.trezo-pay-period-months {
    font-size: var(--trezo-fs-lg);
    font-weight: 700;
    color: var(--trezo-heading);
}

.trezo-pay-period-price {
    margin-top: 4px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text);
}

.trezo-pay-period-discount {
    display: inline-block;
    margin-top: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--trezo-success-soft);
    color: var(--trezo-success);
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
}

.trezo-pay-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-bottom: 18px;
}

@media (min-width: 576px) {
    .trezo-pay-info-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.trezo-pay-info-item {
    padding: 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-pay-info-label {
    margin-bottom: 6px;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    font-weight: 600;
}

.trezo-pay-info-value {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
    font-weight: 600;
}

.trezo-pay-section {
    margin-top: 22px;
    padding-top: 22px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-pay-section-title {
    margin: 0 0 16px;
    text-align: center;
    font-size: var(--trezo-fs-lg);
    color: var(--trezo-heading);
}

.trezo-pay-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.trezo-pay-btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
}

.trezo-pay-yandex-form {
    margin: 0;
}

.trezo-pay-yandex-form .form-group {
    margin: 0;
}

.trezo-pay-note {
    margin: 0;
    text-align: center;
    font-size: var(--trezo-fs-xs);
    color: var(--trezo-text-muted);
    line-height: 1.5;
}

.trezo-pay-note-danger {
    color: var(--trezo-danger);
}

.trezo-pay-notices {
    margin-top: 18px;
}

.trezo-pay-notice {
    margin-bottom: 10px;
}

.trezo-admin-pay-workspace .trezo-filter-panel {
    min-width: 320px;
}

.admin-pay-operation-btn {
    cursor: pointer;
    position: relative;
}

.admin-pay-operation-btn input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-pay-operation-btn.is-active {
    border-color: var(--trezo-primary);
    background: color-mix(in srgb, var(--trezo-primary) 12%, transparent);
    color: var(--trezo-primary);
}

.admin-pay-operation-group .admin-pay-operation-btn:last-child.is-active {
    border-color: var(--trezo-danger, #dc3545);
    background: color-mix(in srgb, var(--trezo-danger, #dc3545) 12%, transparent);
    color: var(--trezo-danger, #dc3545);
}

/* DC create wizard */
.trezo-wizard {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trezo-wizard-nav {
    position: relative;
}

.trezo-wizard-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
}

.trezo-wizard-nav-item {
    display: flex;
    min-height: 0;
}

.trezo-wizard-nav-btn {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.trezo-wizard-nav-btn:disabled {
    opacity: 0.55;
    cursor: default;
}

.trezo-wizard-nav-item.is-active .trezo-wizard-nav-btn {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary-soft);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--trezo-primary) 25%, transparent);
}

.trezo-wizard-nav-item.is-complete .trezo-wizard-nav-num {
    background: var(--trezo-primary);
    color: #fff;
}

.trezo-wizard-nav-num {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--trezo-surface);
    border: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
    font-weight: 700;
    color: var(--trezo-heading);
    flex-shrink: 0;
}

.trezo-wizard-nav-item.is-active .trezo-wizard-nav-num {
    background: var(--trezo-primary);
    border-color: var(--trezo-primary);
    color: #fff;
}

.trezo-wizard-nav-text {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 2px;
    flex: 1;
    min-width: 0;
    min-height: calc(1.25em * 2 + 2px + 1.3em);
}

.trezo-wizard-nav-text strong {
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
    line-height: 1.25;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: calc(1.25em * 2);
}

.trezo-wizard-nav-text small {
    font-size: 11px;
    color: var(--trezo-text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trezo-wizard-progress {
    height: 4px;
    margin-top: 12px;
    border-radius: 999px;
    background: var(--trezo-border);
    overflow: hidden;
}

.trezo-wizard-progress-bar {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--trezo-primary), color-mix(in srgb, var(--trezo-primary) 70%, #60f));
    transition: width 0.25s ease;
}

.trezo-wizard-panel {
    padding-top: 4px;
}

.trezo-wizard-panel[hidden] {
    display: none !important;
}

.trezo-wizard-panel.is-active {
    animation: trezoWizardFadeIn 0.2s ease;
}

@keyframes trezoWizardFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.trezo-wizard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid var(--trezo-border);
}

.trezo-wizard-actions .trezo-btn {
    min-width: 140px;
}

.trezo-wizard-actions [hidden],
.trezo-wizard-actions #dc-wizard-submit[style*="display: none"],
.trezo-wizard-actions #dc-wizard-submit[style*="display:none"] {
    display: none !important;
}

.trezo-wizard-demo-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: var(--trezo-radius-md);
    border: 1px dashed var(--trezo-border);
    background: color-mix(in srgb, var(--trezo-primary) 5%, var(--trezo-surface-2));
}

.trezo-wizard-side-hint {
    position: sticky;
    top: 88px;
}

.trezo-wizard-side-note {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--trezo-border);
}

/* DC view page */
.trezo-dc-view-page .trezo-view-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.trezo-dc-status-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 20px;
    margin-bottom: 20px;
    padding: 14px 18px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-dc-status-hero--success {
    border-color: color-mix(in srgb, var(--trezo-success, #22c55e) 35%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-success, #22c55e) 8%, var(--trezo-surface-2));
}

.trezo-dc-status-hero--warning {
    border-color: color-mix(in srgb, var(--trezo-warning, #f59e0b) 35%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-warning, #f59e0b) 8%, var(--trezo-surface-2));
}

.trezo-dc-status-hero--info {
    border-color: color-mix(in srgb, var(--trezo-primary) 30%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-primary) 8%, var(--trezo-surface-2));
}

.trezo-dc-status-hero--danger {
    border-color: color-mix(in srgb, var(--trezo-danger, #dc3545) 35%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-danger, #dc3545) 8%, var(--trezo-surface-2));
}

.trezo-dc-status-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 6px;
}

.trezo-dc-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
}

.trezo-dc-status-tags {
    margin: 0;
}

.trezo-dc-status-aside {
    flex: 0 0 auto;
    display: flex;
    align-items: flex-start;
    padding-left: 18px;
    border-left: 1px solid color-mix(in srgb, var(--trezo-border) 85%, transparent);
}

.trezo-dc-status-main {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

.trezo-dc-status-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 5px 11px;
    border-radius: 999px;
    font-size: var(--trezo-fs-sm);
    font-weight: 700;
    line-height: 1.2;
}

.trezo-dc-status-badge--success {
    background: color-mix(in srgb, var(--trezo-success, #22c55e) 18%, transparent);
    color: var(--trezo-success, #16a34a);
}

.trezo-dc-status-badge--warning {
    background: color-mix(in srgb, var(--trezo-warning, #f59e0b) 18%, transparent);
    color: #b45309;
}

.trezo-dc-status-badge--info {
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}

.trezo-dc-status-badge--danger {
    background: color-mix(in srgb, var(--trezo-danger, #dc3545) 18%, transparent);
    color: var(--trezo-danger, #dc3545);
}

.trezo-dc-status-badge--muted {
    background: var(--trezo-surface);
    color: var(--trezo-heading);
    border: 1px solid var(--trezo-border);
}

.trezo-dc-status-hint {
    margin: 0;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    line-height: 1.45;
    max-width: 56rem;
}

.trezo-dc-pipeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: flex-start;
    gap: 0;
}

.trezo-dc-pipeline-step {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    min-width: 68px;
    padding: 0 10px;
    opacity: 0.45;
}

.trezo-dc-pipeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 14px;
    left: calc(50% + 16px);
    width: calc(100% - 32px);
    height: 2px;
    background: var(--trezo-border);
    pointer-events: none;
}

.trezo-dc-pipeline-step.is-done:not(:last-child)::after {
    background: color-mix(in srgb, var(--trezo-success, #22c55e) 55%, var(--trezo-border));
}

.trezo-dc-pipeline-step.is-active,
.trezo-dc-pipeline-step.is-done {
    opacity: 1;
}

.trezo-dc-pipeline-num {
    position: relative;
    z-index: 1;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--trezo-border);
    background: var(--trezo-surface);
    font-size: var(--trezo-fs-xs);
    font-weight: 700;
    color: var(--trezo-text-muted);
}

.trezo-dc-pipeline-step.is-active .trezo-dc-pipeline-num {
    border-color: var(--trezo-primary);
    background: var(--trezo-primary);
    color: #fff;
    box-shadow: 0 0 0 3px var(--trezo-primary-soft);
}

.trezo-dc-pipeline-step.is-done .trezo-dc-pipeline-num {
    border-color: var(--trezo-success, #22c55e);
    background: var(--trezo-success, #22c55e);
    color: #fff;
}

.trezo-dc-pipeline-label {
    font-size: 11px;
    color: var(--trezo-text-muted);
    text-align: center;
    line-height: 1.2;
}

.trezo-dc-view-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-dc-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-dc-action-stack .trezo-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 140px;
    justify-content: center;
}

.trezo-dc-view-footnote {
    margin: 12px 0 0;
}

.trezo-dc-view-toolbar {
    align-items: center;
    gap: 10px;
}

.trezo-dc-toolbar-group {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 4px;
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
}

.trezo-dc-toolbar-group--print {
    background: color-mix(in srgb, var(--trezo-primary) 5%, var(--trezo-surface-2));
    border-color: color-mix(in srgb, var(--trezo-primary) 18%, var(--trezo-border));
}

.trezo-dc-toolbar-group-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 0 4px 0 6px;
    font-size: var(--trezo-fs-xs);
    font-weight: 600;
    color: var(--trezo-text-muted);
    white-space: nowrap;
}

.trezo-dc-interval-card {
    margin-bottom: 16px;
}

.trezo-dc-interval-progress {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.trezo-dc-interval-progress-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.trezo-dc-interval-progress-bar {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--trezo-primary, #3b82f6) 12%, var(--trezo-border));
    overflow: hidden;
}

.trezo-dc-interval-progress-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--trezo-primary, #3b82f6), color-mix(in srgb, var(--trezo-primary, #3b82f6) 70%, #22c55e));
    transition: width 0.3s ease;
}

.trezo-dc-interval-progress--compact {
    margin-top: 8px;
}

.trezo-dc-portal-expert-card {
    margin-bottom: 16px;
}

.trezo-dc-portal-expert--compact .trezo-dc-portal-expert-meta {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    font-size: 0.85rem;
    color: var(--trezo-muted, #64748b);
}

.trezo-dc-portal-expert--compact .trezo-dc-portal-expert-meta li + li {
    margin-top: 2px;
}

.trezo-dc-portal-expert-name {
    margin-bottom: 6px;
}

.trezo-dc-portal-expert-meta {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.9rem;
    color: var(--trezo-muted, #64748b);
}

.trezo-dc-portal-expert-thumb {
    font-size: 0.8rem;
    word-break: break-all;
}

.trezo-dc-portal-queue-stop {
    margin-bottom: 16px;
    border-color: color-mix(in srgb, var(--trezo-danger, #dc2626) 35%, var(--trezo-border, #e2e8f0));
    background: color-mix(in srgb, var(--trezo-danger, #dc2626) 6%, var(--trezo-surface, #fff));
}

.trezo-dc-portal-queue-stop-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.trezo-dc-portal-queue-stop-icon {
    color: var(--trezo-danger, #dc2626);
    flex-shrink: 0;
    margin-top: 2px;
}

.trezo-dc-portal-queue-stop-title {
    display: block;
    font-size: 1.05rem;
    color: var(--trezo-danger, #dc2626);
}

.trezo-dc-portal-queue-stop-sub {
    font-size: 0.9rem;
    color: var(--trezo-muted, #64748b);
    margin-top: 2px;
}

.trezo-dc-portal-queue-stop-draft {
    margin: 0 0 10px;
    font-size: 0.95rem;
}

.trezo-dc-portal-queue-stop-steps {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    color: var(--trezo-text, #1e293b);
}

.trezo-dc-portal-queue-stop-steps li + li {
    margin-top: 6px;
}

.trezo-dc-photo-status {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 10px;
    margin-bottom: 14px;
}

.trezo-dc-photo-status-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-text-muted);
}

.trezo-dc-view-payment-card .trezo-dc-payment-form .form-group,
.trezo-dc-payment-form--inline {
    margin-bottom: 0;
}

.trezo-dc-payment-cell-badge {
    margin-bottom: 8px;
}

.trezo-dc-payment-cell-hint {
    margin: 0 0 10px;
}

.trezo-dc-payment-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.trezo-dc-payment-inline .form-control {
    flex: 1 1 220px;
    min-width: 0;
    height: 34px;
    padding: 6px 10px;
    font-size: var(--trezo-fs-sm);
    border-radius: 7px;
}

.trezo-dc-view-aside .trezo-dc-photo-board--aside {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 0;
}

.trezo-dc-view-aside .trezo-dc-photo-slot {
    min-height: 0;
}

.trezo-dc-view-aside .trezo-dc-photo-slot-head {
    padding: 6px 8px;
}

.trezo-dc-view-aside .trezo-dc-photo-slot-label {
    font-size: var(--trezo-fs-xs);
}

.trezo-dc-view-aside .trezo-dc-photo-slot-body {
    min-height: 100px;
    padding: 8px;
}

.trezo-dc-view-aside .trezo-dc-photo-img {
    max-height: 120px;
}

.trezo-dc-view-photos-card .trezo-card-header-row {
    align-items: center;
    padding-bottom: 0;
}

.trezo-dc-photo-status--compact {
    margin-bottom: 10px;
    padding-bottom: 0;
    border-bottom: 0;
}

.trezo-dc-photo-status--compact .trezo-dc-photo-status-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-text-muted);
}

.trezo-dc-photo-preview-hint {
    margin: 0 0 10px;
}

.trezo-dc-pto-coords {
    margin: 0 0 12px;
}

.trezo-dc-pto-coords-main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.trezo-dc-pto-coords-main strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-heading);
}

.trezo-dc-pto-coords-value {
    font-family: var(--trezo-font-mono, ui-monospace, monospace);
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-dc-pto-coords-hint {
    margin: 0;
}

/* PTO view */
.trezo-pto-view-page .trezo-view-grid,
.trezo-module-page .trezo-pto-view-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.trezo-pto-status-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    border-radius: var(--trezo-radius-lg);
    border: 1px solid var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-pto-status-hero--success {
    border-color: color-mix(in srgb, var(--trezo-success, #22c55e) 35%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-success, #22c55e) 8%, var(--trezo-surface-2));
}

.trezo-pto-status-hero--muted {
    border-color: var(--trezo-border);
    background: var(--trezo-surface-2);
}

.trezo-pto-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.trezo-pto-status-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.trezo-pto-status-hint {
    margin: 0;
}

.trezo-pto-view-main,
.trezo-pto-view-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.trezo-pto-operator-name {
    display: block;
    font-size: var(--trezo-fs-lg);
    color: var(--trezo-heading);
    margin-bottom: 4px;
}

.trezo-pto-operator-head {
    margin-bottom: 10px;
}

.trezo-pto-operator-actions {
    margin-top: 14px;
}

.trezo-detail-table--compact th {
    width: 42%;
}

.trezo-pto-coords-value {
    font-family: var(--trezo-font-mono, ui-monospace, monospace);
    font-weight: 600;
}

.trezo-pto-price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.trezo-pto-price-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
}

.trezo-pto-price-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--trezo-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.trezo-pto-price-value {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

@media (max-width: 991px) {
    .trezo-pto-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .trezo-pto-price-grid {
        grid-template-columns: 1fr;
    }
}

.trezo-pto-form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.trezo-pto-form-main,
.trezo-pto-form-aside {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.trezo-pto-form-operator-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.trezo-pto-form-operator-select {
    flex: 1 1 240px;
    min-width: 0;
}

.trezo-pto-form-operator-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-pto-form-coords-note {
    margin: 0 0 12px;
}

.trezo-pto-form-price-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px 12px;
}

.trezo-pto-form-hints {
    margin: 0 0 14px;
    padding-left: 18px;
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-sm);
    line-height: 1.45;
}

.trezo-pto-form-hints li + li {
    margin-top: 8px;
}

.trezo-form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 14px;
}

@media (max-width: 991px) {
    .trezo-pto-form-layout {
        grid-template-columns: 1fr;
    }

    .trezo-pto-form-price-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trezo-form-grid-2 {
        grid-template-columns: 1fr;
    }
}

.trezo-dc-manage-photos-card .trezo-dc-photo-manage-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-dc-manage-photos-card .trezo-dc-photo-status {
    margin-bottom: 0;
}

.trezo-dc-photo-manage-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.95fr);
    gap: 16px;
    align-items: start;
}

.trezo-dc-photo-manage-panel {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-source-card {
    flex: 0 1 auto;
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-pick {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-pick-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-pick-grid {
    flex: 1 1 auto;
    max-height: min(42vh, 360px);
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-pick-list {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.trezo-dc-photo-manage-panel .trezo-dc-photo-actions .trezo-btn {
    width: 100%;
    justify-content: center;
}

.trezo-dc-photo-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.trezo-dc-photo-slot {
    display: flex;
    flex-direction: column;
    min-height: 200px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    overflow: hidden;
}

.trezo-dc-photo-slot--empty {
    border-style: dashed;
    background: color-mix(in srgb, var(--trezo-warning, #f59e0b) 6%, var(--trezo-surface-2));
}

.trezo-dc-photo-slot--filled {
    border-color: color-mix(in srgb, var(--trezo-success, #22c55e) 35%, var(--trezo-border));
}

.trezo-dc-photo-slot-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--trezo-border);
    background: var(--trezo-surface);
}

.trezo-dc-photo-slot-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: var(--trezo-fs-xs);
    font-weight: 700;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
}

.trezo-dc-photo-slot-label {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
}

.trezo-dc-photo-slot-body {
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 160px;
}

.trezo-dc-photo-slot.trezo-dc-photo-slot--preview {
    min-height: 0;
    height: auto;
    align-self: start;
}

.trezo-dc-photo-slot--preview .trezo-dc-photo-slot-body {
    flex: 0 0 auto;
    min-height: 0;
}

.trezo-dc-photo-slot--preview.trezo-dc-photo-slot--empty .trezo-dc-photo-slot-body {
    min-height: 120px;
}

.trezo-dc-photo-slot--preview .trezo-dc-photo-img {
    max-height: min(36vh, 280px);
    width: 100%;
    object-fit: contain;
}

.trezo-dc-photo-placeholder {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: var(--trezo-fs-sm);
    color: var(--trezo-text-muted);
    text-align: center;
}

.trezo-dc-photo-frame,
.trezo-dc-photo-img {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: contain;
    border: 0;
    border-radius: var(--trezo-radius-sm);
}

.trezo-dc-photo-link {
    display: block;
    width: 100%;
}

.trezo-dc-photo-frame {
    min-height: 160px;
}

.trezo-dc-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-dc-photo-manage {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.trezo-dc-photo-source-card {
    padding: 14px;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
}

.trezo-dc-photo-source-head {
    margin-bottom: 12px;
}

.trezo-dc-photo-source-head strong {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--trezo-fs-sm);
}

.trezo-dc-photo-source-head .trezo-form-hint {
    margin-top: 6px;
}

.trezo-dc-photo-pick-field {
    margin: 0;
}

.trezo-dc-photo-pick-field .help-block {
    margin-top: 8px;
}

.trezo-dc-photo-pick-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.trezo-dc-photo-actions .trezo-btn {
    flex: 1 1 calc(50% - 4px);
    min-width: 130px;
    justify-content: center;
}

.trezo-dc-photo-card-badge {
    margin-left: 8px;
    vertical-align: middle;
}

.trezo-btn-danger-outline {
    color: var(--trezo-danger, #dc3545);
    border-color: color-mix(in srgb, var(--trezo-danger, #dc3545) 35%, var(--trezo-border));
}

.trezo-dc-photo-pick-grid {
    max-height: 420px;
    overflow: auto;
    margin-bottom: 12px;
}

.trezo-dc-photo-pick-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.trezo-dc-photo-pick-item {
    display: flex;
    flex-direction: column;
    margin: 0;
    cursor: pointer;
    border: 2px solid var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    overflow: hidden;
    transition: border-color 0.15s ease, opacity 0.15s ease;
    position: relative;
    min-height: 0;
}

.trezo-dc-photo-pick-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.trezo-dc-photo-pick-item.is-selected {
    border-color: var(--trezo-primary);
    box-shadow: 0 0 0 1px var(--trezo-primary);
}

.trezo-dc-photo-pick-item.is-disabled {
    opacity: 0.45;
}

.trezo-dc-photo-pick-thumb {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.trezo-dc-photo-pick-thumb img,
.trezo-dc-photo-pick-img {
    display: block;
    width: 100%;
    height: 88px;
    min-height: 88px;
    max-height: 88px;
    object-fit: cover;
    background: var(--trezo-surface);
}

.trezo-dc-photo-pick-date {
    display: block;
    padding: 5px 8px;
    font-size: var(--trezo-fs-xs, 12px);
    line-height: 1.25;
    color: var(--trezo-text-muted);
    background: var(--trezo-surface-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trezo-dc-upload-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.trezo-dc-upload-field {
    padding: 14px;
    border: 1px dashed var(--trezo-border);
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
}

.trezo-dc-upload-slots-status {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0;
}

.trezo-dc-upload-slot-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
    font-size: var(--trezo-fs-sm);
}

.trezo-dc-upload-slot-status.is-done {
    border-color: color-mix(in srgb, var(--trezo-success, #22c55e) 35%, var(--trezo-border));
    background: color-mix(in srgb, var(--trezo-success, #22c55e) 8%, var(--trezo-surface-2));
}

.trezo-dc-upload-slot-status.is-pending {
    border-style: dashed;
}

.trezo-dc-upload-slot-status-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 999px;
    font-size: var(--trezo-fs-xs);
    font-weight: 700;
    background: var(--trezo-primary-soft);
    color: var(--trezo-primary);
    flex-shrink: 0;
}

.trezo-dc-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.trezo-dc-photo-item iframe {
    border: 0;
    border-radius: var(--trezo-radius-md);
    min-height: 180px;
}

.trezo-dc-photo-edit {
    display: inline-block;
    margin-bottom: 6px;
    font-size: var(--trezo-fs-sm);
}

@media (max-width: 991px) {
    .trezo-dc-status-hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
        margin-bottom: 14px;
    }

    .trezo-dc-status-body {
        flex: 0 0 auto;
        width: 100%;
        gap: 4px;
    }

    .trezo-dc-status-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .trezo-dc-status-tags {
        justify-content: flex-start;
    }

    .trezo-dc-status-aside {
        width: 100%;
        padding-left: 0;
        padding-top: 8px;
        border-left: 0;
        border-top: 1px solid color-mix(in srgb, var(--trezo-border) 85%, transparent);
        align-items: flex-start;
        align-self: auto;
    }

    .trezo-dc-pipeline {
        justify-content: flex-start;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0;
    }

    .trezo-dc-pipeline-step {
        flex: 0 0 auto;
        min-width: 52px;
        padding: 0 6px;
        gap: 4px;
    }

    .trezo-dc-pipeline-step:not(:last-child)::after {
        top: 12px;
        left: calc(50% + 10px);
        width: calc(100% - 20px);
    }

    .trezo-dc-pipeline-label {
        font-size: 10px;
        line-height: 1.1;
        max-width: 48px;
    }

    .trezo-dc-view-page .trezo-view-grid {
        grid-template-columns: 1fr;
    }

    .trezo-dc-photo-manage-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .trezo-dc-photo-manage-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 767px) {
    .trezo-dc-status-hero {
        padding: 10px 12px;
        gap: 6px;
    }

    .trezo-dc-status-badge {
        font-size: 12px;
        padding: 4px 9px;
    }

    .trezo-dc-status-hint {
        font-size: 12px;
        line-height: 1.35;
    }

    .trezo-dc-status-tags .trezo-tag {
        font-size: 11px;
        padding: 3px 8px;
    }

    .trezo-dc-pipeline-num {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .trezo-dc-pipeline-step:not(:last-child)::after {
        top: 11px;
    }
}

@media (max-width: 575px) {
    .trezo-dc-photo-board,
    .trezo-dc-photo-manage,
    .trezo-dc-photo-manage-grid,
    .trezo-dc-upload-fields,
    .trezo-dc-photo-pick-list {
        grid-template-columns: 1fr;
    }

    .trezo-dc-view-aside .trezo-dc-photo-board--aside {
        grid-template-columns: 1fr;
    }

    .trezo-dc-photo-grid {
        grid-template-columns: 1fr;
    }

    .trezo-dc-action-stack .trezo-btn {
        flex-basis: 100%;
    }
}

.trezo-wizard-form .dc-wizard-invalid,
.trezo-wizard-form .form-control.dc-wizard-invalid {
    border-color: var(--trezo-danger, #dc3545) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--trezo-danger, #dc3545) 15%, transparent);
}

@media (max-width: 1199px) {
    .trezo-wizard-nav-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .trezo-wizard-nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trezo-wizard-nav-text {
        min-height: calc(1.25em * 2);
    }

    .trezo-wizard-nav-text small {
        display: none;
    }

    .trezo-wizard-actions .trezo-btn {
        flex: 1 1 calc(50% - 5px);
        min-width: 0;
    }
}

/* Photo equipment — gallery */
.trezo-pe-photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 12px;
}

.trezo-pe-photo-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--trezo-border);
    border-radius: var(--trezo-radius-lg);
    background: var(--trezo-surface);
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.trezo-pe-photo-card:hover {
    border-color: rgba(96, 93, 255, 0.28);
    box-shadow: var(--trezo-shadow);
}

.trezo-pe-photo-card.is-hidden-from-picker {
    opacity: 0.88;
}

.trezo-pe-photo-thumb {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--trezo-surface-2);
    cursor: zoom-in;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.trezo-pe-photo-thumb--error {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    color: var(--trezo-text-muted);
    font-size: var(--trezo-fs-sm);
    cursor: default;
}

.trezo-pe-photo-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.trezo-pe-photo-thumb:hover .trezo-pe-photo-img {
    transform: scale(1.03);
}

.trezo-pe-photo-meta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 12px 12px;
}

.trezo-pe-photo-meta-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.trezo-pe-photo-date {
    font-size: var(--trezo-fs-sm);
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-pe-photo-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trezo-pe-photo-tags .trezo-tag a {
    color: inherit;
    text-decoration: none;
}

.trezo-pe-photo-tags .trezo-tag a:hover {
    text-decoration: underline;
}

.trezo-pe-photo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.trezo-pe-photo-actions .trezo-btn {
    padding: 5px 8px;
    font-size: var(--trezo-fs-xs);
}

.trezo-pe-lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.trezo-pe-lightbox[hidden] {
    display: none !important;
}

.trezo-pe-lightbox-backdrop {
    position: absolute;
    inset: 0;
    border: 0;
    padding: 0;
    background: rgba(10, 14, 25, 0.82);
    cursor: zoom-out;
}

.trezo-pe-lightbox-dialog {
    position: relative;
    z-index: 1;
    max-width: min(96vw, 1200px);
    max-height: 92vh;
}

.trezo-pe-lightbox-img {
    display: block;
    max-width: 100%;
    max-height: 92vh;
    margin: 0 auto;
    border-radius: var(--trezo-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    object-fit: contain;
    background: #000;
}

.trezo-pe-lightbox-close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 2;
    width: 40px;
    height: 40px;
    border: 1px solid var(--trezo-border);
    border-radius: 50%;
    background: var(--trezo-surface);
    color: var(--trezo-heading);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--trezo-shadow);
}

body.trezo-pe-lightbox-open {
    overflow: hidden;
}

.trezo-stats-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.trezo-stats-grid-oto-portfolio {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.trezo-stat-meta-compact {
    line-height: 1.45;
}

.trezo-stat-icon.danger {
    background: var(--trezo-danger-soft);
    color: var(--trezo-danger);
}

.trezo-text-success { color: #25b003; }
.trezo-text-warning { color: #fe7a36; }
.trezo-text-danger { color: var(--trezo-danger); }

.trezo-tag-xs {
    font-size: 11px;
    padding: 2px 6px;
}

/* Diagnostic prices dashboard */
.trezo-dp-alert-urgent p { margin: 0.35rem 0 0; }

.trezo-dp-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-dp-region-table .trezo-dp-row-critical {
    background: var(--trezo-danger-soft);
}

.trezo-dp-region-table .trezo-dp-row-warning {
    background: var(--trezo-warning-soft);
}

.trezo-dp-region-table .trezo-dp-row-ok {
    background: transparent;
}

.trezo-dp-missing,
.trezo-dp-issues {
    font-size: var(--trezo-fs-sm);
    line-height: 1.35;
}

.trezo-dp-actions {
    white-space: nowrap;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.trezo-dp-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--trezo-primary);
    font-weight: 500;
}

.trezo-dp-search-phrase {
    margin-bottom: 1rem;
    padding: 12px 14px;
    border: 1px dashed var(--trezo-border);
    border-radius: var(--trezo-radius);
    background: var(--trezo-surface-2);
}

.trezo-dp-search-phrase .control-label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-dp-search-phrase-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: stretch;
    margin-top: 8px;
}

.trezo-dp-search-phrase-row .form-control {
    flex: 1 1 220px;
    min-width: 0;
    font-size: var(--trezo-fs-sm);
}

.trezo-dp-pravo-fetch-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 12px;
    margin-top: 10px;
}

.trezo-dp-pravo-fetch-row .trezo-form-hint {
    margin: 0;
    flex: 1 1 220px;
}

.trezo-dp-import-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-dp-import-upload-card {
    width: 100%;
}

.trezo-dp-import-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) minmax(340px, 1.05fr);
    gap: 16px;
    align-items: start;
}

.trezo-dp-pdf-viewer-card {
    position: sticky;
    top: 12px;
}

.trezo-dp-pdf-viewer-body {
    padding: 0;
}

.trezo-dp-pdf-viewer-frame {
    display: block;
    width: 100%;
    height: min(78vh, 920px);
    min-height: 480px;
    border: 0;
    border-radius: 0 0 var(--trezo-radius-lg) var(--trezo-radius-lg);
    background: #525659;
}

.trezo-dp-pdf-viewer-frame.is-hidden,
.trezo-dp-pdf-viewer-empty.is-hidden,
#dp-pdf-viewer-open.is-hidden {
    display: none;
}

.trezo-dp-pdf-viewer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 320px;
    padding: 32px 24px;
    text-align: center;
    color: var(--trezo-text-muted);
}

.trezo-dp-pdf-viewer-empty .trezo-lucide-icon,
.trezo-dp-pdf-viewer-empty svg.lucide {
    width: 40px;
    height: 40px;
    opacity: 0.45;
}

.trezo-dp-compare-card {
    min-height: 420px;
}

.trezo-dp-compare-card .trezo-card-body {
    max-height: min(78vh, 920px);
    overflow: auto;
}

.trezo-dp-compare-empty {
    text-align: center;
    color: var(--trezo-text-muted);
    padding: 48px 24px;
}

.trezo-dp-compare-empty .trezo-lucide-icon,
.trezo-dp-compare-empty svg.lucide {
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.trezo-dp-compare-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: 12px;
}

.trezo-dp-legend-item {
    font-size: var(--trezo-fs-sm);
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--trezo-border);
}

.trezo-dp-compare-create,
.trezo-dp-legend-item.trezo-dp-compare-create {
    background: var(--trezo-success-soft);
    border-color: transparent;
}

.trezo-dp-compare-update,
.trezo-dp-legend-item.trezo-dp-compare-update {
    background: var(--trezo-warning-soft);
    border-color: transparent;
}

.trezo-dp-compare-missing,
.trezo-dp-legend-item.trezo-dp-compare-missing {
    background: var(--trezo-danger-soft);
    border-color: transparent;
}

.trezo-dp-compare-table tr.trezo-dp-compare-create td {
    background: color-mix(in srgb, var(--trezo-success-soft) 55%, transparent);
}

.trezo-dp-compare-table tr.trezo-dp-compare-update td {
    background: color-mix(in srgb, var(--trezo-warning-soft) 55%, transparent);
}

.trezo-dp-compare-table tr.trezo-dp-compare-missing td {
    background: color-mix(in srgb, var(--trezo-danger-soft) 45%, transparent);
}

.trezo-dp-new-cell .form-control {
    max-width: 140px;
}

.trezo-dp-parse-status {
    margin: 12px 0;
}

.trezo-dp-apply-actions {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--trezo-border);
}

@media (max-width: 1199px) {
    .trezo-stats-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .trezo-dp-import-workspace {
        grid-template-columns: 1fr;
    }

    .trezo-dp-pdf-viewer-card {
        position: static;
    }

    .trezo-dp-pdf-viewer-frame {
        min-height: 360px;
        height: 55vh;
    }
}

@media (max-width: 575px) {
    .trezo-stats-grid-4 {
        grid-template-columns: 1fr;
    }

    .trezo-dp-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .trezo-pe-photo-gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .trezo-pe-photo-actions .trezo-btn {
        flex: 1 1 calc(50% - 6px);
        justify-content: center;
    }
}

/* Admin user create / update */
.trezo-admin-user-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.trezo-admin-user-workspace .trezo-admin-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.trezo-admin-user-workspace .trezo-filter-panel {
    min-width: 300px;
}

.trezo-admin-user-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-admin-user-form > .trezo-form-actions {
    margin-top: 0;
    padding: 4px 0 0;
}

.trezo-admin-permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 16px;
}

.trezo-admin-permissions-grid .form-group {
    margin-bottom: 8px;
}

.trezo-admin-permissions-grid .checkbox {
    margin: 0;
}

.trezo-admin-permissions-grid .checkbox label {
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    color: var(--trezo-heading);
}

.trezo-input-action-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.trezo-input-action-row .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.trezo-input-action-row .trezo-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.trezo-stat-value-compact {
    font-size: 1.15rem;
}

.trezo-admin-user-meta-grid {
    grid-template-columns: 1fr;
    gap: 10px;
}

.trezo-admin-user-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.trezo-admin-user-actions .trezo-btn {
    justify-content: flex-start;
}

.trezo-admin-user-action-more {
    position: relative;
}

.trezo-admin-user-action-more .trezo-oto-action-menu {
    top: calc(100% + 6px);
    right: auto;
    left: 0;
    bottom: auto;
    width: 100%;
}

@media (max-width: 991px) {
    .trezo-admin-user-workspace {
        grid-template-columns: 1fr;
    }

    .trezo-admin-permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Photoequipment update */
.trezo-pe-update-workspace {
    grid-template-columns: minmax(0, 1fr) 300px;
}

.trezo-pe-update-workspace .trezo-admin-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.trezo-pe-update-workspace .trezo-filter-panel {
    min-width: 300px;
}

.trezo-pe-update-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.trezo-pe-update-form > .trezo-form-actions {
    margin-top: 0;
    padding: 4px 0 0;
}

.trezo-pe-form-descr-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 0 14px;
}

.trezo-pe-update-qr {
    text-align: center;
}

.trezo-pe-update-qr-img {
    width: 100%;
    max-width: 220px;
    border-radius: var(--trezo-radius-md);
    border: 1px solid var(--trezo-border);
}

.trezo-pe-update-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
}

.trezo-pe-update-actions .trezo-btn {
    justify-content: flex-start;
}

@media (max-width: 991px) {
    .trezo-pe-update-workspace {
        grid-template-columns: 1fr;
    }

    .trezo-pe-form-descr-grid {
        grid-template-columns: 1fr;
    }
}

.trezo-appmetrica-card {
    margin-bottom: 24px;
}

.trezo-appmetrica-summary {
    margin-bottom: 20px;
}

.trezo-appmetrica-section {
    margin-top: 24px;
}

.trezo-appmetrica-section-title {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 600;
}

.trezo-appmetrica-events-note {
    margin: 0 0 12px;
}

.trezo-appmetrica-event-title {
    font-weight: 600;
}

.trezo-appmetrica-event-code {
    margin-top: 4px;
    font-size: 12px;
}

.trezo-appmetrica-daily {
    margin-top: 8px;
}

.trezo-appmetrica-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 160px;
    padding: 8px 0 0;
    overflow-x: auto;
}

.trezo-appmetrica-bar-item {
    flex: 1 1 56px;
    min-width: 56px;
    text-align: center;
}

.trezo-appmetrica-bar-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 100px;
    margin-bottom: 6px;
}

.trezo-appmetrica-bar-fill {
    width: 28px;
    border-radius: 6px 6px 2px 2px;
    background: linear-gradient(180deg, var(--trezo-primary, #605dff) 0%, rgba(96, 93, 255, 0.55) 100%);
}

.trezo-appmetrica-bar-value {
    font-size: 12px;
    font-weight: 600;
}

.trezo-appmetrica-bar-label {
    font-size: 11px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-card-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.trezo-registration-kpi-card {
    margin-bottom: 24px;
}

.trezo-registration-kpi-hero {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 24px;
    align-items: center;
}

.trezo-registration-kpi-score {
    border-radius: var(--trezo-radius-lg, 16px);
    padding: 20px 16px;
    text-align: center;
    border: 1px solid var(--trezo-border, #e2e8f0);
    background: var(--trezo-surface-muted, #f8fafc);
}

.trezo-registration-kpi-score-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.trezo-registration-kpi-score-label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-registration-kpi-score-success .trezo-registration-kpi-score-value {
    color: #16a34a;
}

.trezo-registration-kpi-score-warning .trezo-registration-kpi-score-value {
    color: #d97706;
}

.trezo-registration-kpi-score-danger .trezo-registration-kpi-score-value {
    color: #dc2626;
}

.trezo-registration-kpi-progress-wrap {
    margin-bottom: 16px;
}

.trezo-registration-kpi-progress-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-registration-kpi-progress {
    height: 10px;
    border-radius: 999px;
    background: var(--trezo-border, #e2e8f0);
    overflow: hidden;
}

.trezo-registration-kpi-progress-bar {
    height: 100%;
    border-radius: 999px;
}

.trezo-registration-kpi-progress-bar-success {
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

.trezo-registration-kpi-progress-bar-warning {
    background: linear-gradient(90deg, #fbbf24, #d97706);
}

.trezo-registration-kpi-progress-bar-danger {
    background: linear-gradient(90deg, #f87171, #dc2626);
}

.trezo-registration-kpi-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.trezo-registration-kpi-stat-label {
    font-size: 12px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-registration-kpi-stat-value {
    margin-top: 4px;
    font-size: 1.35rem;
    font-weight: 700;
}

.trezo-registration-kpi-stat-hint,
.trezo-registration-kpi-link {
    display: inline-block;
    margin-top: 4px;
    font-size: 12px;
}

.trezo-registration-kpi-versions {
    margin-top: 24px;
}

.trezo-registration-kpi-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.trezo-registration-kpi-badge-success {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.trezo-registration-kpi-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #b45309;
}

.trezo-registration-kpi-badge-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

@media (max-width: 991px) {
    .trezo-registration-kpi-hero {
        grid-template-columns: 1fr;
    }

    .trezo-registration-kpi-stats {
        grid-template-columns: 1fr;
    }
}

.trezo-photo-kpi-strip {
    margin-bottom: 20px;
    padding: 14px 16px;
}

.trezo-photo-kpi-strip-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.trezo-photo-kpi-strip-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.trezo-photo-kpi-strip-period {
    font-size: 12px;
    font-weight: 500;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-photo-kpi-strip-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-photo-kpi-strip-body {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px 24px;
}

.trezo-photo-kpi-strip-main {
    flex: 1 1 320px;
    min-width: 0;
}

.trezo-photo-kpi-strip-kpi {
    display: inline-flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 8px;
}

.trezo-photo-kpi-strip-kpi-label {
    font-size: 13px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-photo-kpi-strip-kpi-value {
    font-size: 1.5rem;
    line-height: 1;
}

.trezo-photo-kpi-strip-kpi-success .trezo-photo-kpi-strip-kpi-value {
    color: #16a34a;
}

.trezo-photo-kpi-strip-kpi-warning .trezo-photo-kpi-strip-kpi-value {
    color: #d97706;
}

.trezo-photo-kpi-strip-kpi-danger .trezo-photo-kpi-strip-kpi-value {
    color: #dc2626;
}

.trezo-photo-kpi-strip-progress {
    height: 6px;
    border-radius: 999px;
    background: var(--trezo-border, #e2e8f0);
    overflow: hidden;
    margin-bottom: 6px;
}

.trezo-photo-kpi-strip-progress .trezo-registration-kpi-progress-bar {
    height: 100%;
}

.trezo-photo-kpi-strip-meta,
.trezo-photo-kpi-strip-am {
    font-size: 13px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-photo-kpi-strip-am {
    flex: 0 1 auto;
    white-space: nowrap;
}

.trezo-photo-kpi-strip-am-label {
    font-weight: 600;
    color: var(--trezo-text, #0f172a);
    margin-right: 6px;
}

.trezo-photo-kpi-strip-sep {
    margin: 0 6px;
    opacity: 0.5;
}

.trezo-photo-kpi-strip-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.trezo-photo-kpi-strip-link:hover {
    color: var(--trezo-primary, #605dff);
}

.trezo-table-row-danger td {
    background: rgba(239, 68, 68, 0.06);
}

.trezo-photo-kpi-dual-kpi {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-bottom: 8px;
}

@media (max-width: 767px) {
    .trezo-photo-kpi-strip-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .trezo-photo-kpi-strip-am {
        white-space: normal;
    }
}

.trezo-metrics-page .trezo-page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.trezo-page-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.trezo-metrics-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--trezo-border, #e2e8f0);
}

.trezo-metrics-tab {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--trezo-text-muted, #64748b);
    text-decoration: none;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.trezo-metrics-tab:hover {
    color: var(--trezo-text, #0f172a);
    background: var(--trezo-surface-muted, #f8fafc);
}

.trezo-metrics-tab.is-active {
    color: var(--trezo-primary, #605dff);
    background: rgba(96, 93, 255, 0.08);
    border-color: rgba(96, 93, 255, 0.18);
}

.trezo-metrics-tab-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trezo-metrics-panel {
    margin-bottom: 0;
}

.trezo-metrics-overview-stats {
    margin-bottom: 0;
}

.trezo-metrics-overview {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.trezo-metrics-overview-panels {
    gap: 20px;
}

.trezo-metrics-overview-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    margin-top: 14px;
}

.trezo-metrics-inline-link {
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
}

.trezo-metrics-inline-link:hover {
    text-decoration: underline;
}

.trezo-card-title-sm {
    font-size: 1rem;
    margin: 0;
}

.trezo-stat-value-kpi-success {
    color: #16a34a;
}

.trezo-stat-value-kpi-warning {
    color: #d97706;
}

.trezo-stat-value-kpi-danger {
    color: #dc2626;
}

.trezo-appmetrica-bars-compact {
    min-height: 120px;
}

.trezo-appmetrica-bar-track-compact {
    height: 72px;
}

.trezo-mau-chart-card {
    margin-bottom: 20px;
    padding: 14px 16px 12px;
}

.trezo-mau-chart-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.trezo-mau-chart-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.trezo-mau-chart-subtitle {
    margin-top: 4px;
    font-size: 12px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-mau-chart-summary {
    text-align: right;
    font-size: 12px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-mau-chart-summary strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
    color: var(--trezo-text, #0f172a);
}

.trezo-mau-chart-change {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.trezo-mau-chart-change-up {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.trezo-mau-chart-change-down {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.trezo-mau-chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    min-height: 140px;
    padding-top: 4px;
    overflow-x: auto;
}

.trezo-mau-chart-bar-item {
    flex: 1 1 52px;
    min-width: 52px;
    text-align: center;
}

.trezo-mau-chart-bar-value {
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 6px;
    white-space: nowrap;
}

.trezo-mau-chart-bar-track {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    height: 96px;
    margin-bottom: 6px;
}

.trezo-mau-chart-bar-fill {
    width: 32px;
    border-radius: 8px 8px 3px 3px;
    background: linear-gradient(180deg, #7c79ff 0%, rgba(96, 93, 255, 0.5) 100%);
}

.trezo-mau-chart-bar-fill.is-partial {
    background: linear-gradient(180deg, rgba(96, 93, 255, 0.65) 0%, rgba(96, 93, 255, 0.25) 100%);
    border: 1px dashed rgba(96, 93, 255, 0.45);
}

.trezo-mau-chart-bars-wide {
    gap: 6px;
}

.trezo-mau-chart-bars-wide .trezo-mau-chart-bar-item {
    min-width: 40px;
    flex: 1 1 40px;
}

.trezo-mau-chart-bars-wide .trezo-mau-chart-bar-fill {
    width: 22px;
}

.trezo-mau-chart-bars-wide .trezo-mau-chart-bar-value {
    font-size: 10px;
}

.trezo-mau-chart-bars-wide .trezo-mau-chart-bar-label {
    font-size: 10px;
}

.trezo-mau-chart-card.trezo-metrics-panel {
    margin-bottom: 20px;
}

.trezo-mau-chart-bar-label {
    font-size: 11px;
    color: var(--trezo-text-muted, #64748b);
}

.trezo-mau-chart-foot {
    display: flex;
    gap: 14px;
    margin-top: 10px;
}

.trezo-mau-chart-empty {
    font-size: 13px;
    color: var(--trezo-text-muted, #64748b);
    padding: 8px 0 4px;
}

@media (max-width: 767px) {
    .trezo-mau-chart-head {
        flex-direction: column;
    }

    .trezo-mau-chart-summary {
        text-align: left;
    }
}

.trezo-sales-dash-card {
    margin-bottom: var(--trezo-space-section);
    padding: 14px 16px 12px;
}

.trezo-sales-dash-head-actions {
    margin-left: auto;
}

.trezo-admin-section-head {
    flex-wrap: wrap;
}

.trezo-sales-dash-metrics {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.trezo-sales-dash-metric {
    padding: 10px 12px;
    border: 1px solid var(--trezo-border);
    border-radius: 12px;
    background: var(--trezo-surface, #fff);
    min-width: 0;
}

.trezo-sales-dash-metric-primary {
    border-color: rgba(96, 93, 255, 0.25);
    background: linear-gradient(180deg, rgba(96, 93, 255, 0.06) 0%, rgba(96, 93, 255, 0.01) 100%);
}

.trezo-sales-dash-metric-label {
    display: block;
    font-size: 11px;
    color: var(--trezo-text-muted);
    margin-bottom: 4px;
}

.trezo-sales-dash-metric-value {
    display: block;
    font-size: 1.15rem;
    line-height: 1.15;
    color: var(--trezo-heading);
}

.trezo-sales-dash-metric-meta {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--trezo-text-muted);
}

.trezo-sales-dash-metric-hint,
.trezo-sales-dash-change {
    display: inline-block;
    margin-top: 6px;
}

.trezo-sales-dash-inline-link {
    color: var(--trezo-primary);
    text-decoration: none;
}

.trezo-sales-dash-inline-link:hover {
    text-decoration: underline;
}

.trezo-sales-dash-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
    font-size: 12px;
}

.trezo-sales-dash-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.trezo-sales-dash-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
}

.trezo-sales-dash-category strong {
    font-weight: 700;
}

.trezo-sales-dash-category span:last-child {
    opacity: 0.75;
}

.trezo-sales-dash-chart {
    margin-bottom: 10px;
}

.trezo-sales-dash-bars {
    min-height: 120px;
}

.trezo-sales-dash-bar-track {
    height: 80px;
}

.trezo-sales-dash-bar-fill {
    background: linear-gradient(180deg, #22c55e 0%, rgba(34, 197, 94, 0.45) 100%);
}

.trezo-sales-dash-bar-fill.is-today {
    background: linear-gradient(180deg, #605dff 0%, rgba(96, 93, 255, 0.5) 100%);
}

.trezo-sales-dash-bar-weekday {
    display: block;
    font-size: 10px;
    opacity: 0.75;
}

.trezo-sales-dash-foot {
    padding-top: 4px;
}

.trezo-sales-dash-presets {
    margin: 0;
}

.trezo-sales-dash-services {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 4px;
}

.trezo-sales-dash-service-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--trezo-border);
}

.trezo-sales-dash-service-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.trezo-sales-dash-service-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.trezo-sales-dash-service-tag {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.trezo-sales-dash-service-name {
    font-size: 13px;
    color: var(--trezo-text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.trezo-sales-dash-service-stats {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-shrink: 0;
}

.trezo-sales-dash-service-cnt {
    font-size: 12px;
    color: var(--trezo-text-muted);
}

.trezo-sales-dash-service-sum {
    font-size: 14px;
    color: var(--trezo-heading);
}

.trezo-sales-dash-empty-card {
    margin-bottom: var(--trezo-space-section);
}

.trezo-sales-dash-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-align: center;
    color: var(--trezo-text-muted);
    font-size: 13px;
    padding: 24px 16px;
}

@media (max-width: 1199px) {
    .trezo-sales-dash-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .trezo-sales-dash-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .trezo-sales-dash-service-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .trezo-sales-dash-service-name {
        white-space: normal;
    }
}

/* Error page (Trezo) */
.trezo-error-page {
    max-width: 760px;
}

.trezo-error-panel .trezo-card-body {
    padding: 32px 28px;
}

.trezo-error-card-inner {
    padding: 8px 0 4px;
}

.trezo-error-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
    margin-bottom: 24px;
}

.trezo-error-code {
    font-size: 56px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--trezo-primary);
    opacity: 0.18;
}

.trezo-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--trezo-danger) 12%, transparent);
    color: var(--trezo-danger);
    margin-top: -44px;
}

.trezo-error-icon .trezo-lucide-icon,
.trezo-error-icon svg.lucide {
    width: 34px;
    height: 34px;
}

.trezo-error-title {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--trezo-heading);
}

.trezo-error-message {
    max-width: 520px;
    font-size: var(--trezo-fs-md);
    line-height: 1.55;
    color: var(--trezo-text-muted);
}

.trezo-error-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.trezo-error-debug {
    margin-top: 24px;
    width: 100%;
    border-top: 1px solid var(--trezo-border);
    padding-top: 16px;
    text-align: left;
}

.trezo-error-debug summary {
    cursor: pointer;
    font-size: 13px;
    color: var(--trezo-text-muted);
    margin-bottom: 10px;
}

.trezo-error-debug pre {
    margin: 0;
    padding: 12px;
    border-radius: var(--trezo-radius-md);
    background: var(--trezo-surface-2);
    border: 1px solid var(--trezo-border);
    font-size: 12px;
    line-height: 1.45;
    overflow: auto;
    max-height: 280px;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 575px) {
    .trezo-error-panel .trezo-card-body {
        padding: 24px 18px;
    }

    .trezo-error-code {
        font-size: 44px;
    }

    .trezo-error-actions {
        flex-direction: column;
    }

    .trezo-error-actions .trezo-btn {
        width: 100%;
        justify-content: center;
    }
}
