/* 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;

    /* 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-track: transparent;
    --trezo-scrollbar-thumb: rgba(100, 116, 139, 0.22);
    --trezo-scrollbar-thumb-hover: rgba(100, 116, 139, 0.38);

    --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-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;
}

.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;
    }

    .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;
    }

    .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:hover,
.trezo-table-wrap > table a:hover,
.trezo-admin-content > table a:hover {
    color: var(--trezo-primary-hover);
    text-decoration: underline;
}

.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;
}

.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: wrap;
    gap: 4px;
    justify-content: flex-end;
}

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

.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: 6px 11px;
    min-width: 34px;
    min-height: 34px;
    text-align: center;
    font-size: var(--trezo-fs-sm);
    font-weight: 500;
    line-height: 1.2;
    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: 12px;
}

.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: var(--trezo-surface);
    color: var(--trezo-heading);
}

.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-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-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-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-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;
    }

    .trezo-filter-panel {
        position: static;
    }

    .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;
    }
}

@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: var(--trezo-surface);
    color: var(--trezo-heading);
}

.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: var(--trezo-surface);
    color: var(--trezo-heading);
    box-shadow: none;
}

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

.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-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-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);
}
