:root {
    --ui-bg: #07111f;
    --ui-surface: rgba(15, 23, 42, .82);
    --ui-surface-strong: rgba(15, 23, 42, .94);
    --ui-border: rgba(255, 255, 255, .10);
    --ui-muted: #94a3b8;
    --ui-text: #f8fafc;
    --ui-gold: #BDAC8E;
    --ui-blue: #60a5fa;
    --ui-orange: #f59e0b;
    --ui-green: #22c55e;
    --ui-red: #ef4444;
    --ui-radius: 10px;
    --ui-shadow: 0 18px 48px rgba(0, 0, 0, .28);
}

html[data-theme="light"] {
    --ui-bg: #eef1f4;
    --ui-surface: #ffffff;
    --ui-surface-strong: #ffffff;
    --ui-border: rgba(25, 33, 44, .16);
    --ui-muted: #56616f;
    --ui-text: #141a22;
    --ui-gold: #BDAC8E;
    --ui-shadow: 0 14px 34px rgba(24, 29, 36, .12);
}

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

html {
    width: 100%;
    min-width: 0;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
    background: var(--ui-bg);
    color: var(--ui-text);
}

html[data-theme="light"] body {
    background: var(--ui-bg) !important;
    color: var(--ui-text) !important;
}

html[data-theme="light"] .bg {
    background:
        linear-gradient(180deg, #f7f8f9 0%, #eef1f4 44%, #e6e8eb 100%) !important;
}

html[data-theme="light"] .bg::before,
html[data-theme="light"] .bg::after {
    opacity: .18;
}

html[data-theme="light"] .page,
html[data-theme="light"] .container,
html[data-theme="light"] .glass-container,
html[data-theme="light"] .page-content {
    color: var(--ui-text);
}

html[data-theme="light"] .topbar,
html[data-theme="light"] .subtitle,
html[data-theme="light"] .meta,
html[data-theme="light"] p,
html[data-theme="light"] .small,
html[data-theme="light"] .muted,
html[data-theme="light"] .field,
html[data-theme="light"] .value,
html[data-theme="light"] .bar-top,
html[data-theme="light"] .panel,
html[data-theme="light"] .card p {
    color: var(--ui-text);
}

html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3,
html[data-theme="light"] .topbar h1,
html[data-theme="light"] .section h2,
html[data-theme="light"] .panel h2,
html[data-theme="light"] .empty-panel h3 {
    color: #141a22 !important;
}

html[data-theme="light"] .subtitle,
html[data-theme="light"] .meta,
html[data-theme="light"] .small,
html[data-theme="light"] .muted,
html[data-theme="light"] .insight-card small,
html[data-theme="light"] .bar-top span,
html[data-theme="light"] .stat-label {
    color: var(--ui-muted) !important;
}

html[data-theme="light"] .backup-card p,
html[data-theme="light"] .status-card span,
html[data-theme="light"] .log-card span,
html[data-theme="light"] .log-panel small,
html[data-theme="light"] .backup-meta,
html[data-theme="light"] .empty {
    color: #4b5563 !important;
}

html[data-theme="light"] .backup-card p {
    line-height: 1.6;
}

html[data-theme="light"] .sidebar,
html[data-theme="light"] .mobile-topbar {
    background: #ffffff;
    border-color: rgba(25, 33, 44, .14);
    box-shadow: 0 18px 42px rgba(24, 29, 36, .12);
}

html[data-theme="light"] .sidebar a,
html[data-theme="light"] .sidebar-user-name,
html[data-theme="light"] .sidebar-close,
html[data-theme="light"] .hamburger-btn {
    color: #26303c;
}

html[data-theme="light"] .sidebar a:hover,
html[data-theme="light"] .sidebar-user,
html[data-theme="light"] .hamburger-btn,
html[data-theme="light"] .sidebar-close {
    background: #f1f3f5;
}

html[data-theme="light"] .sidebar a.active {
    background: #ebe4d5;
    border-color: #BDAC8E;
    color: #141a22;
}

html[data-theme="light"] .sidebar-divider,
html[data-theme="light"] .sidebar-bottom {
    border-color: rgba(25, 33, 44, .13);
}

html[data-theme="light"] .sidebar-divider {
    background: rgba(25, 33, 44, .16) !important;
}

html[data-theme="light"] .form-card,
html[data-theme="light"] .card,
html[data-theme="light"] .main-card,
html[data-theme="light"] .section-card,
html[data-theme="light"] .table-card,
html[data-theme="light"] .stat-card,
html[data-theme="light"] .file-card,
html[data-theme="light"] .status-panel,
html[data-theme="light"] .shadeon-card,
html[data-theme="light"] .panel,
html[data-theme="light"] .filters,
html[data-theme="light"] .user-pill,
html[data-theme="light"] .insight-card,
html[data-theme="light"] .quick-panel,
html[data-theme="light"] .log-card,
html[data-theme="light"] .log-panel,
html[data-theme="light"] .backup-card,
html[data-theme="light"] .backup-row,
html[data-theme="light"] .status-card,
html[data-theme="light"] .empty-state,
html[data-theme="light"] .empty-panel {
    background: var(--ui-surface) !important;
    border-color: var(--ui-border) !important;
    color: var(--ui-text) !important;
    box-shadow: var(--ui-shadow) !important;
}

html[data-theme="light"] .topbar {
    border-bottom-color: rgba(25, 33, 44, .12);
}

html[data-theme="light"] .stat-card::before,
html[data-theme="light"] .card::before,
html[data-theme="light"] .insight-card::before {
    background: linear-gradient(135deg, rgba(194, 178, 144, .18), transparent 58%) !important;
}

html[data-theme="light"] .stat-number,
html[data-theme="light"] .insight-card span,
html[data-theme="light"] .panel h2,
html[data-theme="light"] .section h2,
html[data-theme="light"] .empty-panel h3,
html[data-theme="light"] th {
    color: #6f5f3f !important;
}

html[data-theme="light"] .dashboard-page .stat-card .stat-number {
    color: #3b82f6 !important;
}

html[data-theme="light"] .dashboard-page .stat-card.orange .stat-number {
    color: #fb923c !important;
}

html[data-theme="light"] .dashboard-page .stat-card.green .stat-number {
    color: #4ade80 !important;
}

html[data-theme="light"] .dashboard-page .stat-card.red .stat-number {
    color: #f87171 !important;
}

html[data-theme="light"] .btn,
html[data-theme="light"] .btn-detail,
html[data-theme="light"] .btn-submit,
html[data-theme="light"] .save-status-btn,
html[data-theme="light"] .filters button {
    background: #BDAC8E !important;
    color:white !important;
}

html[data-theme="light"] .edit {
    background: #2563eb !important;
    color: #ffffff !important;
}

html[data-theme="light"] .password {
    background: #BDAC8E !important;
    color: #141a22 !important;
}

html[data-theme="light"] .delete,
html[data-theme="light"] .delete-btn,
html[data-theme="light"] .btn-delete {
    background: #fef2f2 !important;
    border-color: rgba(220, 38, 38, .30) !important;
    color: #991b1b !important;
}

.delete,
.delete-btn,
.btn-delete,
.btn-danger,
.delete-attachment,
.btn-log-clear {
    background: rgba(127, 29, 29, .24) !important;
    border: 1px solid rgba(248, 113, 113, .32) !important;
    color: #fecaca !important;
}

.delete:hover,
.delete-btn:hover,
.btn-delete:hover,
.btn-danger:hover,
.delete-attachment:hover,
.btn-log-clear:hover {
    background: rgba(127, 29, 29, .34) !important;
    border-color: rgba(248, 113, 113, .48) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .delete:hover,
html[data-theme="light"] .delete-btn:hover,
html[data-theme="light"] .btn-delete:hover,
html[data-theme="light"] .btn-danger:hover,
html[data-theme="light"] .delete-attachment:hover,
html[data-theme="light"] .btn-log-clear:hover {
    background: #fee2e2 !important;
    border-color: rgba(220, 38, 38, .42) !important;
    color: #7f1d1d !important;
}

html[data-theme="light"] .btn-secondary,
html[data-theme="light"] .btn.secondary,
html[data-theme="light"] .reset-link {
    background: #2f3a4b !important;
    color: #ffffff !important;
    border: 1px solid rgba(25, 33, 44, .18) !important;
}

html[data-theme="light"] .filters button {
    background: #BDAC8E !important;
    color: white !important;
}

html[data-theme="light"] .filters a,
html[data-theme="light"] .filters .reset-link {
    background: #2f3a4b !important;
    color: #ffffff !important;
}

html[data-theme="light"] .btn-danger {
    background: #fef2f2 !important;
    border-color: rgba(220, 38, 38, .30) !important;
    color: #991b1b !important;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    background: #f9fafb !important;
    color: #141a22 !important;
    border-color: rgba(25, 33, 44, .22) !important;
}

html[data-theme="light"] input[type="checkbox"],
html[data-theme="light"] input[type="radio"] {
    width: auto !important;
    min-width: 16px !important;
    height: 16px !important;
    margin: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border-color: #BDAC8E !important;
    accent-color: #BDAC8E;
    box-shadow: none !important;
}

html[data-theme="light"] .checkbox-group label,
html[data-theme="light"] .radio-card {
    background: #f7f8fa !important;
    border: 1px solid rgba(25, 33, 44, .16) !important;
    color: #26303c !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55);
}

html[data-theme="light"] .checkbox-group label:hover,
html[data-theme="light"] .radio-card:hover {
    background: #f3efe6 !important;
    border-color: rgba(194, 178, 144, .72) !important;
}

html[data-theme="light"] .radio-card span {
    color: #26303c !important;
}

html[data-theme="light"] .radio-card:has(input:checked),
html[data-theme="light"] .checkbox-group label:has(input:checked) {
    background: #ebe4d5 !important;
    border-color: #BDAC8E !important;
    color: #141a22 !important;
}

html[data-theme="light"] .checkbox-box,
html[data-theme="light"] .field,
html[data-theme="light"] .upload-box,
html[data-theme="light"] .file-card {
    background: #f7f8fa !important;
    border-color: rgba(25, 33, 44, .14) !important;
    color: #26303c !important;
}

html[data-theme="light"] .upload-box:hover {
    background: #f3efe6 !important;
    border-color: rgba(194, 178, 144, .72) !important;
}

html[data-theme="light"] label {
    color: #26303c !important;
}

html[data-theme="light"] .actions,
html[data-theme="light"] .sticky-actions {
    background: rgba(255, 255, 255, .94) !important;
    border-color: rgba(25, 33, 44, .14) !important;
    /* box-shadow: 0 16px 36px rgba(24, 29, 36, .12) !important; */
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #64748b;
}

html[data-theme="light"] table,
html[data-theme="light"] td {
    color: #26303c;
}

html[data-theme="light"] th {
    background: #f1f3f5;
    color: #6f5f3f !important;
}

html[data-theme="light"] td,
html[data-theme="light"] th {
    border-bottom-color: rgba(25, 33, 44, .11);
}

html[data-theme="light"] tr:hover td {
    background: #f7f3ea !important;
}

html[data-theme="light"] .action-badge,
html[data-theme="light"] .badge,
html[data-theme="light"] .status-badge,
html[data-theme="light"] .priority-badge {
    color: #26303c;
}

html[data-theme="light"] .admin,
html[data-theme="light"] .critical,
html[data-theme="light"] .priority-critical,
html[data-theme="light"] .status-error,
html[data-theme="light"] .toast-error .toast-icon {
    color: #ffffff !important;
}

html[data-theme="light"] .manager,
html[data-theme="light"] .high,
html[data-theme="light"] .medium,
html[data-theme="light"] .employee,
html[data-theme="light"] .novy,
html[data-theme="light"] .reseni,
html[data-theme="light"] .hotovo,
html[data-theme="light"] .status-new,
html[data-theme="light"] .status-progress,
html[data-theme="light"] .status-deferred,
html[data-theme="light"] .status-done,
html[data-theme="light"] .status-rejected {
    color: #ffffff !important;
}

html[data-theme="light"] .badge.status-new,
html[data-theme="light"] .badge.novy,
html[data-theme="light"] .status-badge.status-new,
html[data-theme="light"] .status-badge.novy {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}

html[data-theme="light"] .badge.status-progress,
html[data-theme="light"] .badge.reseni,
html[data-theme="light"] .status-badge.status-progress,
html[data-theme="light"] .status-badge.reseni {
    background: #ea580c !important;
    border-color: #c2410c !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(234, 88, 12, .22);
}

html[data-theme="light"] .badge.status-done,
html[data-theme="light"] .badge.hotovo,
html[data-theme="light"] .status-badge.status-done,
html[data-theme="light"] .status-badge.hotovo {
    background: #16a34a !important;
    border-color: #15803d !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(22, 163, 74, .22);
}

html[data-theme="light"] .badge.status-rejected,
html[data-theme="light"] .status-badge.status-rejected {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(220, 38, 38, .22);
}

html[data-theme="light"] .badge.status-deferred,
html[data-theme="light"] .status-badge.status-deferred {
    background: #eab308 !important;
    border-color: #ca8a04 !important;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(202, 138, 4, .22);
}

html[data-theme="light"] .badge.critical,
html[data-theme="light"] .priority-critical {
    background: #ffffff !important;
    border-color: rgba(220, 38, 38, .58) !important;
    color: #26303c !important;
    box-shadow: 0 8px 18px rgba(47, 58, 75, .10);
}

html[data-theme="light"] .badge.high,
html[data-theme="light"] .priority-high {
    background: #ffffff !important;
    border-color: rgba(234, 88, 12, .56) !important;
    color: #26303c !important;
    box-shadow: 0 8px 18px rgba(47, 58, 75, .10);
}

html[data-theme="light"] .badge.medium,
html[data-theme="light"] .priority-medium {
    background: #ffffff !important;
    border-color: rgba(180, 83, 9, .52) !important;
    color: #26303c !important;
    box-shadow: 0 8px 18px rgba(47, 58, 75, .10);
}

html[data-theme="light"] .badge.low,
html[data-theme="light"] .priority-low {
    background: #ffffff !important;
    border-color: rgba(3, 105, 161, .48) !important;
    color: #26303c !important;
    box-shadow: 0 8px 18px rgba(47, 58, 75, .10);
}

html[data-theme="light"] .badge.priority {
    background: #ffffff !important;
    border-color: rgba(148, 163, 184, .34) !important;
    color: #26303c !important;
    box-shadow: 0 8px 18px rgba(47, 58, 75, .13);
}

html[data-theme="light"] .budova-badge,
html[data-theme="light"] .badge.budova-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: auto !important;
    width: auto !important;
    max-width: 100%;
    background: #ebe4d5 !important;
    border: 1px solid rgba(194, 178, 144, .70) !important;
    color: #4b3f28 !important;
    white-space: normal;
    overflow-wrap: anywhere;
}

html[data-theme="light"] .logout-link {
    color: #b91c1c !important;
}

body::before {
    content: "";
    position: fixed;
    left: 50%;
    top: 0;
    z-index: 22000;
    width: min(560px, 72vw);
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, transparent, var(--ui-gold), transparent);
    box-shadow: 0 0 22px rgba(194, 178, 144, .42);
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) scaleX(.18);
    transform-origin: center;
}

body.ui-page-leaving::before {
    animation: uiTopSweep .24s ease-out both;
}

body.ui-page-ready .page,
body.ui-page-ready .container,
body.ui-page-ready .page-content,
body.ui-page-ready .glass-container {
    animation: uiPageEnter .34s cubic-bezier(.2, .78, .2, 1) both;
    will-change: opacity, transform, filter;
}

body.ui-page-leaving .page,
body.ui-page-leaving .container,
body.ui-page-leaving .page-content,
body.ui-page-leaving .glass-container {
    opacity: .12;
    filter: blur(3px);
    transform: translateY(10px) scale(.985);
    transition:
        opacity .22s ease,
        filter .22s ease,
        transform .22s cubic-bezier(.4, 0, 1, 1);
}

body.ui-page-ready .topbar {
    animation: uiHeaderEnter .38s cubic-bezier(.2, .78, .2, 1) .03s both;
}

body.ui-page-ready .stats-grid > *,
body.ui-page-ready .dashboard-insights > *,
body.ui-page-ready .grid > .card,
body.ui-page-ready .section,
body.ui-page-ready .table-card,
body.ui-page-ready .backup-row,
body.ui-page-ready .log-panel {
    animation: uiPanelEnter .34s cubic-bezier(.2, .78, .2, 1) both;
}

body.ui-page-ready .stats-grid > *:nth-child(2),
body.ui-page-ready .dashboard-insights > *:nth-child(2),
body.ui-page-ready .grid > .card:nth-child(2),
body.ui-page-ready .section:nth-child(2),
body.ui-page-ready .backup-row:nth-child(2),
body.ui-page-ready .log-panel:nth-child(2) {
    animation-delay: .04s;
}

body.ui-page-ready .stats-grid > *:nth-child(3),
body.ui-page-ready .dashboard-insights > *:nth-child(3),
body.ui-page-ready .grid > .card:nth-child(3),
body.ui-page-ready .section:nth-child(3),
body.ui-page-ready .backup-row:nth-child(3),
body.ui-page-ready .log-panel:nth-child(3) {
    animation-delay: .08s;
}

body.ui-page-ready .stats-grid > *:nth-child(4),
body.ui-page-ready .dashboard-insights > *:nth-child(4),
body.ui-page-ready .grid > .card:nth-child(4),
body.ui-page-ready .section:nth-child(4),
body.ui-page-ready .backup-row:nth-child(4),
body.ui-page-ready .log-panel:nth-child(4) {
    animation-delay: .12s;
}

@keyframes uiPageEnter {
    from {
        opacity: 0;
        filter: blur(4px);
        transform: translateY(14px) scale(.992);
    }

    to {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

@keyframes uiHeaderEnter {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes uiPanelEnter {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.992);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes uiTopSweep {
    0% {
        opacity: 0;
        transform: translateX(-50%) scaleX(.12);
    }

    35% {
        opacity: 1;
    }

    100% {
        opacity: .9;
        transform: translateX(-50%) scaleX(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    body::before {
        display: none !important;
    }

    body.ui-page-ready .page,
    body.ui-page-ready .container,
    body.ui-page-ready .page-content,
    body.ui-page-ready .glass-container {
        animation: none !important;
    }

    body.ui-page-leaving .page,
    body.ui-page-leaving .container,
    body.ui-page-leaving .page-content,
    body.ui-page-leaving .glass-container {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        transition: none !important;
    }

    body.ui-page-ready .topbar,
    body.ui-page-ready .stats-grid > *,
    body.ui-page-ready .dashboard-insights > *,
    body.ui-page-ready .grid > .card,
    body.ui-page-ready .section,
    body.ui-page-ready .table-card,
    body.ui-page-ready .backup-row,
    body.ui-page-ready .log-panel {
        animation: none !important;
    }
}

.page,
.container {
    max-width: 1620px;
    min-width: 0;
}

.topbar {
    border-bottom: 1px solid rgba(255, 255, 255, .06);
    padding-bottom: 18px;
}

.topbar h1,
h1 {
    letter-spacing: 0;
}

.form-card,
.card,
.main-card,
.section-card,
.table-card,
.stat-card,
.file-card,
.status-panel,
.shadeon-card {
    border-radius: var(--ui-radius) !important;
    background: var(--ui-surface) !important;
    border: 1px solid var(--ui-border) !important;
    box-shadow: var(--ui-shadow) !important;
    min-width: 0;
}

.section-card {
    padding: 20px !important;
}

input,
textarea,
select {
    border: 1px solid rgba(255, 255, 255, .10) !important;
    border-radius: 8px !important;
    background: rgba(2, 6, 23, .42) !important;
    color: var(--ui-text) !important;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(194, 178, 144, .72) !important;
    box-shadow: 0 0 0 3px rgba(194, 178, 144, .14) !important;
}

button,
.btn,
.btn-detail,
.btn-submit,
.save-status-btn {
    border-radius: 8px !important;
    font-family: inherit;
}

.btn,
.btn-detail,
.btn-secondary,
.reset-link {
    text-align: center;
}

.filters button,
.filters a,
.filters .reset-link {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 44px !important;
    min-width: 116px;
    padding: 0 18px !important;
    border: 0 !important;
    border-radius: 10px !important;
    font-family: inherit;
    font-size: 14px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.filters button:hover,
.filters a:hover,
.filters .reset-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .18);
}

.filters button {
    background: #BDAC8E !important;
    color: white !important;
}

.filters a,
.filters .reset-link {
    background: #1e293b !important;
    color: #ffffff !important;
}

.upload-icon,
.file-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(194, 178, 144, .12);
    border: 1px solid rgba(194, 178, 144, .30);
    color: var(--ui-gold);
    font-size: 12px !important;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.upload-icon {
    margin: 0 auto 12px;
}

.file-icon {
    margin-bottom: 10px;
}

.badge,
.status-badge,
.priority-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* min-height: 28px; */
    padding: 5px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .12);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
}

.badge.status-new,
.badge.novy,
.status-badge.status-new,
.status-badge.novy {
    color: #dbeafe;
    background: rgba(59, 130, 246, .18);
    border-color: rgba(96, 165, 250, .35);
}

.badge.status-progress,
.badge.reseni,
.status-badge.status-progress,
.status-badge.reseni {
    color: #ffedd5;
    background: rgba(245, 158, 11, .18);
    border-color: rgba(245, 158, 11, .36);
}

.badge.status-done,
.badge.hotovo,
.status-badge.status-done,
.status-badge.hotovo {
    color: #dcfce7;
    background: rgba(34, 197, 94, .16);
    border-color: rgba(34, 197, 94, .34);
}

.badge.status-rejected,
.status-badge.status-rejected {
    color: #fee2e2;
    background: rgba(239, 68, 68, .18);
    border-color: rgba(239, 68, 68, .38);
}

.badge.status-deferred,
.status-badge.status-deferred {
    color: #ffffff;
    background: rgba(250, 204, 21, .16);
    border-color: rgba(250, 204, 21, .36);
}

.badge.critical,
.priority-critical {
    color: #ffffff;
    background: rgba(47, 58, 75, .92);
    border-color: rgba(239, 68, 68, .38);
}

.badge.high,
.priority-high {
    color: #ffffff;
    background: rgba(47, 58, 75, .92);
    border-color: rgba(249, 115, 22, .34);
}

.badge.medium,
.priority-medium {
    color: #ffffff;
    background: rgba(47, 58, 75, .92);
    border-color: rgba(245, 158, 11, .34);
}

.badge.low,
.priority-low,
.badge.priority {
    color: #ffffff;
    background: rgba(47, 58, 75, .92);
    border-color: rgba(14, 165, 233, .28);
}

.dashboard-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: -10px 0 28px;
}

.insight-card {
    min-height: 96px;
    padding: 18px;
    border-radius: var(--ui-radius);
    background: rgba(15, 23, 42, .68);
    border: 1px solid var(--ui-border);
    box-shadow: 0 12px 30px rgba(0, 0, 0, .20);
}

.insight-card strong {
    display: block;
    margin-bottom: 8px;
    color: var(--ui-muted);
    font-size: 12px;
    text-transform: uppercase;
}

.insight-card span {
    display: block;
    color: var(--ui-gold);
    font-size: 30px;
    font-weight: 900;
}

.insight-card small {
    display: block;
    margin-top: 6px;
    color: var(--ui-muted);
}

.ticket-title {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.card p,
.small,
.field,
.value {
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.empty-state,
.empty-panel {
    grid-column: 1 / -1;
    width: 100%;
    padding: 34px;
    border-radius: var(--ui-radius);
    background: rgba(15, 23, 42, .58);
    border: 1px dashed rgba(194, 178, 144, .34);
    color: #e5e7eb;
    text-align: center;
}

.empty-panel h3 {
    margin: 0 0 8px;
    color: var(--ui-gold);
}

.comment-item.just-added {
    animation: uiCommentAdded .42s ease both, uiCommentGlow 1.6s ease .08s both;
}

@keyframes uiCommentAdded {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes uiCommentGlow {
    0%, 100% {
        box-shadow: inherit;
    }

    35% {
        box-shadow: 0 0 0 4px rgba(189, 172, 142, .16), 0 18px 44px rgba(0, 0, 0, .28);
    }
}

.toast-stack {
    position: fixed;
    left: 50%;
    top: 18px;
    right: auto;
    bottom: auto;
    transform: translateX(-50%);
    z-index: 20000;
    display: grid;
    align-items: start;
    gap: 10px;
    width: min(560px, calc(100vw - 32px));
    pointer-events: none;
}

.toast {
    position: relative;
    display: flex;
    align-self: start;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: 168px;
    box-sizing: border-box;
    padding: 14px 12px 14px 14px;
    border-radius: 8px;
    background: rgba(13, 20, 33, .96);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 18px 48px rgba(0, 0, 0, .34);
    color: var(--ui-text);
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
    transition: opacity .2s ease, transform .2s ease;
    overflow: hidden;
    --toast-duration: 3200ms;
}

html[data-theme="dark"] .toast,
html:not([data-theme="light"]) .toast {
    background:
        linear-gradient(135deg, rgba(189, 172, 142, .10), transparent 42%),
        rgba(13, 20, 33, .96);
    border-color: rgba(255, 255, 255, .12);
    color: #f8fafc;
}

.toast::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--ui-gold);
}

.toast-icon {
    display: inline-flex;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: rgba(194, 178, 144, .14);
    border: 1px solid rgba(194, 178, 144, .34);
    color: var(--ui-gold);
    font-weight: 900;
    line-height: 1;
}

.toast-body {
    flex: 1 1 auto;
    min-width: 0;
}

.toast-title {
    margin-bottom: 3px;
    color: #f8fafc;
    font-size: 14px;
    font-weight: 800;
}

.toast-text {
    min-width: 0;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.45;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.toast-timer {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    margin-top: 5px;
    position: relative;
}

.toast-timer svg {
    display: block;
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
}

.toast-timer circle {
    fill: none;
    stroke-width: 3;
}

.toast-timer-track {
    stroke: rgba(255, 255, 255, .14);
}

.toast-timer-ring {
    stroke: var(--toast-timer-color, var(--ui-gold));
    stroke-linecap: round;
    stroke-dasharray: 56.55;
    stroke-dashoffset: 0;
    animation: toast-ring-countdown var(--toast-duration) linear forwards;
}

.toast-close {
    display: inline-flex !important;
    flex: 0 0 34px;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    height: 34px;
    min-width: 34px !important;
    max-width: 34px !important;
    padding: 0 !important;
    border: 0;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .06);
    color: var(--ui-text);
    cursor: pointer;
    font-size: 22px;
    line-height: 1;
}

.toast-close:hover {
    background: rgba(255, 255, 255, .14);
}

.toast-hide {
    opacity: 0;
    transform: translateY(-8px);
}

.toast-success {
    border-color: rgba(34, 197, 94, .34);
}

html[data-theme="dark"] .toast-success,
html:not([data-theme="light"]) .toast-success {
    background:
        linear-gradient(135deg, rgba(34, 197, 94, .13), transparent 48%),
        rgba(13, 20, 33, .97);
}

.toast-success::before {
    background: #22c55e;
}

.toast-success .toast-icon {
    background: rgba(34, 197, 94, .14);
    border-color: rgba(34, 197, 94, .34);
    color: #86efac;
}

.toast-success .toast-timer {
    --toast-timer-color: #22c55e;
}

.toast-error {
    border-color: rgba(239, 68, 68, .42);
}

html[data-theme="dark"] .toast-error,
html:not([data-theme="light"]) .toast-error {
    background:
        linear-gradient(135deg, rgba(239, 68, 68, .14), transparent 48%),
        rgba(13, 20, 33, .97);
}

.toast-error::before {
    background: #ef4444;
}

.toast-error .toast-icon {
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .34);
    color: #fecaca;
}

.toast-error .toast-timer {
    --toast-timer-color: #ef4444;
}

html[data-theme="light"] .toast-timer-track {
    stroke: rgba(47, 58, 75, .18);
}

html[data-theme="light"] .toast {
    background:
        linear-gradient(135deg, rgba(189, 172, 142, .16), transparent 46%),
        #ffffff;
    border-color: rgba(25, 33, 44, .14);
    box-shadow: 0 18px 42px rgba(24, 29, 36, .16);
    color: #141a22;
}

html[data-theme="light"] .toast-title {
    color: #141a22;
}

html[data-theme="light"] .toast-text {
    color: #56616f;
}

html[data-theme="light"] .toast-icon {
    background: #f3efe6;
    border-color: rgba(189, 172, 142, .54);
    color: #6f5f3f;
}

html[data-theme="light"] .toast-close {
    background: #f1f3f5;
    color: #26303c;
}

html[data-theme="light"] .toast-close:hover {
    background: #e6e9ed;
}

html[data-theme="light"] .toast-success {
    background:
        linear-gradient(135deg, rgba(22, 163, 74, .12), transparent 50%),
        #ffffff;
    border-color: rgba(22, 163, 74, .28);
}

html[data-theme="light"] .toast-success::before {
    background: #16a34a;
}

html[data-theme="light"] .toast-success .toast-icon {
    background: #dcfce7;
    border-color: #bbf7d0;
    color: #15803d;
}

html[data-theme="light"] .toast-success .toast-timer {
    --toast-timer-color: #16a34a;
}

html[data-theme="light"] .toast-error {
    background:
        linear-gradient(135deg, rgba(220, 38, 38, .12), transparent 50%),
        #ffffff;
    border-color: rgba(220, 38, 38, .30);
}

html[data-theme="light"] .toast-error::before {
    background: #dc2626;
}

html[data-theme="light"] .toast-error .toast-icon {
    background: #fee2e2;
    border-color: #fecaca;
    color: #b91c1c !important;
}

html[data-theme="light"] .toast-error .toast-timer {
    --toast-timer-color: #dc2626;
}

@keyframes toast-ring-countdown {
    from {
        stroke-dashoffset: 0;
    }

    to {
        stroke-dashoffset: 56.55;
    }
}

@media (prefers-reduced-motion: reduce) {
    .comment-item.just-added,
    .toast-timer-ring {
        animation: none !important;
        stroke-dashoffset: 0;
    }
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 22px;
    align-items: start;
}

.detail-side {
    position: sticky;
    top: 24px;
    display: grid;
    gap: 14px;
}

.quick-panel {
    padding: 20px;
    border-radius: var(--ui-radius);
    background: rgba(15, 23, 42, .78);
    border: 1px solid var(--ui-border);
    box-shadow: var(--ui-shadow);
}

.quick-panel h2 {
    margin-top: 0;
}

.sticky-actions {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 16px;
}

@media (max-width: 960px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-side {
        position: static;
    }
}

@media (max-width: 768px) {
    .toast-stack {
        top: calc(64px + env(safe-area-inset-top) + 10px);
        width: calc(100vw - 20px);
    }

    .page,
    .container,
    .page-content,
    .glass-container {
        max-width: 100% !important;
        min-width: 0 !important;
        overflow-x: hidden;
    }

    .topbar {
        min-width: 0;
    }

    .user-pill,
    .subtitle,
    .meta {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    .stat-card,
    .insight-card,
    .form-card,
    .card,
    .main-card,
    .section-card,
    .table-card,
    .file-card,
    .status-panel,
    .quick-panel,
    .empty-state,
    .empty-panel {
        width: 100% !important;
        max-width: 100% !important;
    }

    .empty-state {
        padding: 16px !important;
    }

    .empty-panel {
        padding: 24px 18px !important;
    }

    .empty-panel .btn,
    .empty-panel .btn-detail,
    .empty-panel .btn-secondary {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100% !important;
        min-height: 44px;
        box-sizing: border-box;
    }

    .dashboard-insights {
        grid-template-columns: 1fr;
    }

    .filters,
    .card-actions,
    .actions,
    .action-top,
    .status-form {
        min-width: 0;
    }

    .filters {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        padding: 14px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .filters > *,
    .card-actions > *,
    .actions > *,
    .action-top > *,
    .status-form > * {
        width: 100% !important;
        max-width: 100%;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .filters .reset-link,
    .filters a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 40px;
    }

    .btn,
    .btn-detail,
    .btn-secondary,
    .btn-submit,
    .btn-small,
    .delete-btn,
    .save-status-btn,
    .reset-link {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .table-card,
    .table-wrap,
    .log-panel {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: max-content;
        min-width: 100%;
    }

    .sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 1000;
        margin: 0 -10px -24px;
        padding: 12px 10px;
        background: rgba(7, 17, 31, .96);
        backdrop-filter: blur(12px);
    }
}

/* Shared action icons */
.ui-has-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ui-action-icon {
    color: currentColor;
    pointer-events: none;
    transform-origin: center;
    transition: transform .18s ease, opacity .18s ease;
}

.ui-has-icon:disabled .ui-action-icon {
    opacity: .72;
}

.ui-has-icon:hover .ui-icon-send,
.ui-has-icon:focus-visible .ui-icon-send,
.detail-action:hover .ui-icon-message,
.detail-action:focus-visible .ui-icon-message {
    animation: uiIconNudge .52s cubic-bezier(.2, .8, .2, 1);
}

.ui-has-icon:hover .ui-icon-save,
.ui-has-icon:focus-visible .ui-icon-save,
.ui-has-icon:hover .ui-icon-check-all,
.ui-has-icon:focus-visible .ui-icon-check-all,
.ui-has-icon:hover .ui-icon-check-circle,
.ui-has-icon:focus-visible .ui-icon-check-circle {
    animation: uiIconConfirm .48s cubic-bezier(.2, .8, .2, 1);
}

.ui-has-icon:hover .ui-icon-refresh,
.ui-has-icon:focus-visible .ui-icon-refresh,
.ui-has-icon:hover .ui-icon-sync,
.ui-has-icon:focus-visible .ui-icon-sync {
    animation: uiIconSpinSoft .7s cubic-bezier(.2, .8, .2, 1);
}

.ui-has-icon:hover .ui-icon-download,
.ui-has-icon:focus-visible .ui-icon-download,
.ui-has-icon:hover .ui-icon-upload,
.ui-has-icon:focus-visible .ui-icon-upload {
    animation: uiIconTransfer .46s cubic-bezier(.2, .8, .2, 1);
}

.ui-has-icon:active .ui-action-icon,
.detail-action:active .ui-action-icon {
    transform: scale(.9);
}

.toast-icon svg {
    width: 18px;
    height: 18px;
    overflow: visible;
}

.toast-icon svg path,
.toast-icon svg circle {
    transform-origin: center;
}

.toast-success .toast-icon svg path {
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: uiIconDraw .42s ease .12s forwards;
}

.toast-error .toast-icon svg path {
    stroke-dasharray: 17;
    stroke-dashoffset: 17;
    animation: uiIconDraw .32s ease .1s forwards;
}

.toast-icon svg circle {
    animation: uiIconPop .34s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes uiIconNudge {
    0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
    45% { transform: translate3d(3px, -2px, 0) rotate(-8deg); }
}

@keyframes uiIconConfirm {
    0%, 100% { transform: scale(1); }
    45% { transform: scale(1.16) rotate(-5deg); }
}

@keyframes uiIconSpinSoft {
    to { transform: rotate(360deg); }
}

@keyframes uiIconTransfer {
    0%, 100% { transform: translateY(0); }
    45% { transform: translateY(3px); }
}

@keyframes uiIconDraw {
    to { stroke-dashoffset: 0; }
}

@keyframes uiIconPop {
    from {
        opacity: 0;
        transform: scale(.72);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Unified filters across ticket, user, audit and email views */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.filters.unified-filters {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: center !important;
    gap: 10px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    padding: 14px !important;
    margin-bottom: 22px !important;
    overflow: visible !important;
    box-sizing: border-box !important;
}

.filters.unified-filters .filter-control {
    position: relative;
    display: flex !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box;
}

.filters.unified-filters .filter-control::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    width: 15px;
    height: 15px;
    color: #94a3b8;
    background: currentColor;
    pointer-events: none;
    transform: translateY(-50%);
    -webkit-mask: var(--filter-icon) center / contain no-repeat;
    mask: var(--filter-icon) center / contain no-repeat;
}

.filters.unified-filters .filter-control input,
.filters.unified-filters .filter-control select {
    width: 100% !important;
    min-width: 0 !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 34px 0 38px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    box-sizing: border-box !important;
}

.filters.unified-filters .filter-actions {
    display: contents !important;
}

.filters.unified-filters .filter-actions > *,
.filters.unified-filters > button,
.filters.unified-filters > a {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 44px !important;
    height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.filter-icon-role {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 4 7l8 4 8-4-8-4Z'/%3E%3Cpath d='m4 12 8 4 8-4M4 17l8 4 8-4'/%3E%3C/svg%3E");
}

.filter-icon-sector {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.filter-icon-ticket {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16v5a2 2 0 0 0 0 4v5H4v-5a2 2 0 0 0 0-4V5Z'/%3E%3Cpath d='M12 7v2M12 11v2M12 15v2'/%3E%3C/svg%3E");
}

.filter-icon-action {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v4M12 17v4M3 12h4M17 12h4'/%3E%3Ccircle cx='12' cy='12' r='5'/%3E%3C/svg%3E");
}

.filter-icon-mail {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
}

.filter-icon-type {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13 11 4H4v7l9 9 7-7Z'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3C/svg%3E");
}

html[data-theme="light"] .filters.unified-filters .filter-control::before {
    color: #64748b;
}

@media (min-width: 1100px) {
    .filters.unified-filters {
        grid-template-columns:
            repeat(var(--filter-fields), minmax(0, 1fr))
            minmax(126px, .72fr)
            minmax(104px, .62fr) !important;
    }
}

@media (max-width: 768px) {
    .filters.unified-filters {
        grid-template-columns: minmax(0, 1fr) !important;
        padding: 12px !important;
    }

    .filters.unified-filters .filter-actions {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        grid-column: 1 / -1;
        gap: 10px;
        width: 100%;
        min-width: 0;
    }
}

/* Final approved statistics and filter actions */
.dashboard-page .stat-card,
.my-forms-page .stat-card,
.claimed-page .stat-card {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 112px;
}

.dashboard-page .stat-card-icon,
.my-forms-page .stat-card-icon,
.claimed-page .stat-card-icon {
    position: static;
    top: auto;
    right: auto;
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
}

.dashboard-page .stat-card-copy,
.my-forms-page .stat-card-copy,
.claimed-page .stat-card-copy {
    position: relative;
    z-index: 2;
    display: flex !important;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    margin: 0 !important;
}

.dashboard-page .stat-card-copy .stat-label,
.my-forms-page .stat-card-copy .stat-label,
.claimed-page .stat-card-copy > strong {
    order: 1;
    margin: 0 0 7px !important;
    color: #94a3b8;
    font-size: 12px !important;
    font-weight: 900;
    line-height: 1.2;
    text-transform: uppercase;
}

.dashboard-page .stat-card-copy .stat-number,
.my-forms-page .stat-card-copy .stat-number,
.claimed-page .stat-card-copy > span {
    order: 2;
    display: block !important;
    margin: 0 !important;
    font-size: 32px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

.dashboard-page .filters .filter-actions,
.my-forms-page .filters .filter-actions,
.claimed-page .filters .filter-actions {
    display: flex;
    flex: 1 0 100%;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 2px;
}

.dashboard-page .filters .filter-actions > *,
.my-forms-page .filters .filter-actions > *,
.claimed-page .filters .filter-actions > * {
    width: min(220px, 100%);
    min-width: 150px;
}

@media (max-width: 768px) {
    .dashboard-page .stat-card,
    .my-forms-page .stat-card,
    .claimed-page .stat-card {
        gap: 10px;
        min-height: 96px;
        padding: 13px !important;
    }

    .dashboard-page .stat-card-icon,
    .my-forms-page .stat-card-icon,
    .claimed-page .stat-card-icon {
        position: static;
        flex-basis: 28px;
        width: 28px !important;
        height: 28px !important;
    }

    .dashboard-page .stat-card-copy .stat-label,
    .my-forms-page .stat-card-copy .stat-label,
    .claimed-page .stat-card-copy > strong {
        margin-bottom: 6px !important;
        font-size: 10px !important;
    }

    .dashboard-page .stat-card-copy .stat-number,
    .my-forms-page .stat-card-copy .stat-number,
    .claimed-page .stat-card-copy > span {
        font-size: 27px !important;
    }

    .dashboard-page .filters .filter-actions,
    .my-forms-page .filters .filter-actions,
    .claimed-page .filters .filter-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 0;
    }

    .dashboard-page .filters .filter-actions > *,
    .my-forms-page .filters .filter-actions > *,
    .claimed-page .filters .filter-actions > * {
        width: 100% !important;
        min-width: 0;
    }
}

/* Dashboard and filter icons */
.dashboard-page .stat-card,
.my-forms-page .stat-card,
.claimed-page .stat-card {
    position: relative;
}

.dashboard-page .stat-card-icon,
.my-forms-page .stat-card-icon,
.claimed-page .stat-card-icon {
    position: absolute;
    top: 17px;
    right: 17px;
    z-index: 2;
    display: block !important;
    width: 22px !important;
    height: 22px !important;
    margin: 0 !important;
    color: #3b82f6;
    background: currentColor !important;
    opacity: .9;
    -webkit-mask: var(--stat-icon) center / contain no-repeat;
    mask: var(--stat-icon) center / contain no-repeat;
}

.dashboard-page .stat-card-progress .stat-card-icon,
.claimed-page .stats-grid .stat-card:nth-child(2) .stat-card-icon {
    color: #fb923c;
}

.dashboard-page .stat-card-done .stat-card-icon,
.claimed-page .stats-grid .stat-card:nth-child(3) .stat-card-icon {
    color: #4ade80;
}

.dashboard-page .stat-card-critical .stat-card-icon {
    color: #f87171;
}

.claimed-page .stats-grid .stat-card:nth-child(4) .stat-card-icon {
    color: #BDAC8E;
}

.stat-icon-new {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4h16v13H4z'/%3E%3Cpath d='M4 13h4l2 3h4l2-3h4M9 4V2h6v2'/%3E%3C/svg%3E");
}

.stat-icon-progress {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.stat-icon-done {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3C/svg%3E");
}

.stat-icon-critical {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10.3 3.7 2.6 17a2 2 0 0 0 1.7 3h15.4a2 2 0 0 0 1.7-3L13.7 3.7a2 2 0 0 0-3.4 0Z'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
}

.stat-icon-total {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9 5-9-5 9-5 9 5Z'/%3E%3Cpath d='m3 12 9 5 9-5M3 16l9 5 9-5'/%3E%3C/svg%3E");
}

.stat-icon-calendar {
    --stat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M8 2v4M16 2v4M3 10h18M8 14h.01M12 14h.01M16 14h.01'/%3E%3C/svg%3E");
}

.dashboard-page .filters .filter-control,
.my-forms-page .filters .filter-control,
.claimed-page .filters .filter-control {
    position: relative;
    display: flex;
    flex: 1 1 170px;
    min-width: 170px;
    max-width: 100%;
}

.dashboard-page .filters .filter-control::before,
.my-forms-page .filters .filter-control::before,
.claimed-page .filters .filter-control::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 2;
    width: 16px;
    height: 16px;
    color: #94a3b8;
    background: currentColor;
    pointer-events: none;
    transform: translateY(-50%);
    -webkit-mask: var(--filter-icon) center / contain no-repeat;
    mask: var(--filter-icon) center / contain no-repeat;
}

.dashboard-page .filters .filter-control input,
.dashboard-page .filters .filter-control select,
.my-forms-page .filters .filter-control input,
.my-forms-page .filters .filter-control select,
.claimed-page .filters .filter-control input,
.claimed-page .filters .filter-control select {
    width: 100%;
    min-width: 0;
    padding-left: 38px !important;
    box-sizing: border-box;
}

.filter-icon-search {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
}

.filter-icon-user,
.filter-icon-assignee {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}

.filter-icon-priority {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 21V4M5 5h11l-2 4 2 4H5'/%3E%3C/svg%3E");
}

.filter-icon-status {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.filter-icon-date {
    --filter-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3C/svg%3E");
}

.filters.unified-filters .filter-action {
    gap: 7px;
}

.filters.unified-filters .filter-action::before {
    content: "";
    flex: 0 0 15px;
    width: 15px;
    height: 15px;
    background: currentColor;
    -webkit-mask: var(--filter-action-icon) center / contain no-repeat;
    mask: var(--filter-action-icon) center / contain no-repeat;
}

.filter-action-submit {
    --filter-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 5h16M7 12h10M10 19h4'/%3E%3C/svg%3E");
}

.filter-action-reset {
    --filter-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 1 0 3-6.7L3 8'/%3E%3Cpath d='M3 3v5h5'/%3E%3C/svg%3E");
}

html[data-theme="light"] .dashboard-page .filters .filter-control::before,
html[data-theme="light"] .my-forms-page .filters .filter-control::before,
html[data-theme="light"] .claimed-page .filters .filter-control::before {
    color: #64748b;
}

@media (max-width: 768px) {
    .dashboard-page .stats-grid,
    .my-forms-page .stats-grid,
    .claimed-page .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100%;
        min-width: 0;
    }

    .dashboard-page .stat-card,
    .my-forms-page .stat-card,
    .claimed-page .stat-card,
    .dashboard-page .stat-card-copy,
    .my-forms-page .stat-card-copy,
    .claimed-page .stat-card-copy,
    .dashboard-page .filters,
    .my-forms-page .filters,
    .claimed-page .filters,
    .dashboard-page .filters .filter-actions,
    .my-forms-page .filters .filter-actions,
    .claimed-page .filters .filter-actions {
        width: 100%;
        min-width: 0 !important;
        max-width: 100%;
        box-sizing: border-box;
    }

    .dashboard-page .stat-card-icon,
    .my-forms-page .stat-card-icon,
    .claimed-page .stat-card-icon {
        top: 12px;
        right: 12px;
        width: 18px !important;
        height: 18px !important;
    }

    .dashboard-page .filters .filter-control,
    .my-forms-page .filters .filter-control,
    .claimed-page .filters .filter-control {
        width: 100%;
        min-width: 0;
    }
}

/* Unified ticket cards: dashboard, my forms, claimed forms */
.dashboard-page .ticket-grid,
.my-forms-page .ticket-grid,
.claimed-page .ticket-grid {
    gap: 18px !important;
    align-items: stretch;
}

.dashboard-page .ticket-grid > .card,
.my-forms-page .ticket-grid > .card,
.claimed-page .ticket-grid > .card {
    display: flex !important;
    flex-direction: column;
    isolation: isolate;
    min-height: 255px;
    padding: 20px !important;
    border-radius: 10px !important;
    background:
        linear-gradient(135deg, rgba(189, 172, 142, .08), transparent 46%),
        rgba(15, 23, 42, .82) !important;
    border: 1px solid rgba(255, 255, 255, .10) !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .24) !important;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease,
        background-color .18s ease !important;
}

.dashboard-page .ticket-grid > .card::before,
.my-forms-page .ticket-grid > .card::before,
.claimed-page .ticket-grid > .card::before {
    height: 3px !important;
    background: linear-gradient(90deg, #BDAC8E, #f59e0b) !important;
    opacity: .95 !important;
    z-index: 0;
}

.dashboard-page .ticket-grid > .card > *,
.my-forms-page .ticket-grid > .card > *,
.claimed-page .ticket-grid > .card > * {
    position: relative;
    z-index: 1;
}

.dashboard-page .ticket-grid > .card:hover,
.my-forms-page .ticket-grid > .card:hover,
.claimed-page .ticket-grid > .card:hover {
    transform: translateY(-3px) !important;
    border-color: rgba(189, 172, 142, .34) !important;
    box-shadow: 0 20px 44px rgba(0, 0, 0, .30) !important;
}

.dashboard-page .ticket-grid .ticket-title,
.my-forms-page .ticket-grid .ticket-title,
.claimed-page .ticket-grid .ticket-title {
    margin: 14px 0 8px !important;
    color: var(--ui-text) !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    line-height: 1.3 !important;
}

.dashboard-page .ticket-grid .small,
.my-forms-page .ticket-grid .small,
.claimed-page .ticket-grid .small,
.dashboard-page .ticket-grid p,
.my-forms-page .ticket-grid p,
.claimed-page .ticket-grid p {
    color: #cbd5e1 !important;
    opacity: 1 !important;
    font-size: 13px !important;
    line-height: 1.55 !important;
}

.dashboard-page .ticket-grid p,
.my-forms-page .ticket-grid p,
.claimed-page .ticket-grid p {
    margin: 10px 0 0 !important;
}

.dashboard-page .ticket-grid .badge,
.my-forms-page .ticket-grid .badge,
.claimed-page .ticket-grid .badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin: 0 6px 8px 0 !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap;
}

.dashboard-page .ticket-grid .badge.novy,
.my-forms-page .ticket-grid .badge.novy,
.claimed-page .ticket-grid .badge.novy,
.dashboard-page .ticket-grid .badge.status-new,
.my-forms-page .ticket-grid .badge.status-new,
.claimed-page .ticket-grid .badge.status-new {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
}

.dashboard-page .ticket-grid .badge.reseni,
.my-forms-page .ticket-grid .badge.reseni,
.claimed-page .ticket-grid .badge.reseni,
.dashboard-page .ticket-grid .badge.status-progress,
.my-forms-page .ticket-grid .badge.status-progress,
.claimed-page .ticket-grid .badge.status-progress {
    background: #ea580c !important;
    border-color: #c2410c !important;
}

.dashboard-page .ticket-grid .badge.hotovo,
.my-forms-page .ticket-grid .badge.hotovo,
.claimed-page .ticket-grid .badge.hotovo,
.dashboard-page .ticket-grid .badge.status-done,
.my-forms-page .ticket-grid .badge.status-done,
.claimed-page .ticket-grid .badge.status-done {
    background: #16a34a !important;
    border-color: #15803d !important;
}

.dashboard-page .ticket-grid .badge.status-rejected,
.my-forms-page .ticket-grid .badge.status-rejected,
.claimed-page .ticket-grid .badge.status-rejected {
    background: #dc2626 !important;
    border-color: #b91c1c !important;
}

.dashboard-page .ticket-grid .badge.status-deferred,
.my-forms-page .ticket-grid .badge.status-deferred,
.claimed-page .ticket-grid .badge.status-deferred {
    background: #eab308 !important;
    border-color: #ca8a04 !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.critical,
.my-forms-page .ticket-grid .badge.critical,
.claimed-page .ticket-grid .badge.critical {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(248, 113, 113, .58) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.high,
.my-forms-page .ticket-grid .badge.high,
.claimed-page .ticket-grid .badge.high {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(251, 146, 60, .54) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.medium,
.my-forms-page .ticket-grid .badge.medium,
.claimed-page .ticket-grid .badge.medium {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(245, 158, 11, .48) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.low,
.my-forms-page .ticket-grid .badge.low,
.claimed-page .ticket-grid .badge.low {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(56, 189, 248, .44) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.priority,
.my-forms-page .ticket-grid .badge.priority,
.claimed-page .ticket-grid .badge.priority {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.critical,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.critical,
html[data-theme="light"] .claimed-page .ticket-grid .badge.critical {
    background: #ffffff !important;
    border-color: rgba(220, 38, 38, .58) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.high,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.high,
html[data-theme="light"] .claimed-page .ticket-grid .badge.high {
    background: #ffffff !important;
    border-color: rgba(234, 88, 12, .56) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.medium,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.medium,
html[data-theme="light"] .claimed-page .ticket-grid .badge.medium {
    background: #ffffff !important;
    border-color: rgba(180, 83, 9, .52) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.low,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.low,
html[data-theme="light"] .claimed-page .ticket-grid .badge.low {
    background: #ffffff !important;
    border-color: rgba(3, 105, 161, .48) !important;
    color: #26303c !important;
}

.dashboard-page .ticket-grid .card-actions,
.my-forms-page .ticket-grid .card-actions,
.claimed-page .ticket-grid .card-actions {
    display: flex !important;
    gap: 10px !important;
    flex-wrap: wrap;
    margin-top: auto !important;
    padding-top: 18px;
}

.dashboard-page .ticket-grid .btn-detail,
.my-forms-page .ticket-grid .btn-detail,
.claimed-page .ticket-grid .btn-detail,
.dashboard-page .ticket-grid .btn-secondary,
.my-forms-page .ticket-grid .btn-secondary,
.claimed-page .ticket-grid .btn-secondary {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px !important;
    min-width: 132px;
    padding: 0 15px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        background-color .18s ease !important;
}

.dashboard-page .ticket-grid .btn-detail,
.my-forms-page .ticket-grid .btn-detail,
.claimed-page .ticket-grid .btn-detail {
    background: #BDAC8E !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .btn-secondary,
.my-forms-page .ticket-grid .btn-secondary,
.claimed-page .ticket-grid .btn-secondary {
    background: #1e293b !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .btn-detail:hover,
.my-forms-page .ticket-grid .btn-detail:hover,
.claimed-page .ticket-grid .btn-detail:hover,
.dashboard-page .ticket-grid .btn-secondary:hover,
.my-forms-page .ticket-grid .btn-secondary:hover,
.claimed-page .ticket-grid .btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, .20);
}

.dashboard-page .ticket-grid .btn-detail:active,
.my-forms-page .ticket-grid .btn-detail:active,
.claimed-page .ticket-grid .btn-detail:active,
.dashboard-page .ticket-grid .btn-secondary:active,
.my-forms-page .ticket-grid .btn-secondary:active,
.claimed-page .ticket-grid .btn-secondary:active {
    transform: translateY(0);
    box-shadow: none;
}

.dashboard-page .ticket-grid a:focus-visible,
.my-forms-page .ticket-grid a:focus-visible,
.claimed-page .ticket-grid a:focus-visible,
.dashboard-page .ticket-grid button:focus-visible,
.my-forms-page .ticket-grid button:focus-visible,
.claimed-page .ticket-grid button:focus-visible,
.dashboard-page .ticket-pagination-btn:focus-visible,
.my-forms-page .ticket-pagination-btn:focus-visible,
.claimed-page .ticket-pagination-btn:focus-visible {
    outline: 3px solid rgba(189, 172, 142, .34) !important;
    outline-offset: 3px;
}

.dashboard-page .ticket-grid .assignee,
.claimed-page .ticket-grid .assignee {
    background: rgba(189, 172, 142, .10) !important;
    border-color: rgba(189, 172, 142, .28) !important;
    color: #e5e7eb;
}

html[data-theme="light"] .dashboard-page .ticket-grid > .card,
html[data-theme="light"] .my-forms-page .ticket-grid > .card,
html[data-theme="light"] .claimed-page .ticket-grid > .card {
    background:
        linear-gradient(135deg, rgba(189, 172, 142, .14), transparent 48%),
        #fbfcfd !important;
    border-color: rgba(25, 33, 44, .12) !important;
    box-shadow: 0 12px 28px rgba(24, 29, 36, .10) !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid > .card:hover,
html[data-theme="light"] .my-forms-page .ticket-grid > .card:hover,
html[data-theme="light"] .claimed-page .ticket-grid > .card:hover {
    border-color: rgba(189, 172, 142, .44) !important;
    box-shadow: 0 16px 34px rgba(24, 29, 36, .14) !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .ticket-title,
html[data-theme="light"] .my-forms-page .ticket-grid .ticket-title,
html[data-theme="light"] .claimed-page .ticket-grid .ticket-title {
    color: #141a22 !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .small,
html[data-theme="light"] .my-forms-page .ticket-grid .small,
html[data-theme="light"] .claimed-page .ticket-grid .small,
html[data-theme="light"] .dashboard-page .ticket-grid p,
html[data-theme="light"] .my-forms-page .ticket-grid p,
html[data-theme="light"] .claimed-page .ticket-grid p {
    color: #526071 !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .assignee,
html[data-theme="light"] .claimed-page .ticket-grid .assignee {
    background: #f3efe6 !important;
    border-color: rgba(189, 172, 142, .42) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .assignee .small,
html[data-theme="light"] .claimed-page .ticket-grid .assignee .small {
    color: #56616f !important;
}

html[data-theme="light"] .dashboard-page .ticket-pagination-info,
html[data-theme="light"] .my-forms-page .ticket-pagination-info,
html[data-theme="light"] .claimed-page .ticket-pagination-info {
    color: #56616f !important;
}

html[data-theme="light"] .dashboard-page .filters,
html[data-theme="light"] .my-forms-page .filters,
html[data-theme="light"] .claimed-page .filters,
html[data-theme="light"] .dashboard-page .stat-card,
html[data-theme="light"] .my-forms-page .stat-card,
html[data-theme="light"] .claimed-page .stat-card {
    background: #fbfcfd !important;
    border-color: rgba(25, 33, 44, .12) !important;
    box-shadow: 0 12px 28px rgba(24, 29, 36, .09) !important;
}

@media (max-width: 768px) {
    .dashboard-page,
    .my-forms-page,
    .claimed-page {
        padding-bottom: 34px !important;
    }

    .dashboard-page .stats-grid,
    .my-forms-page .stats-grid,
    .claimed-page .stats-grid {
        gap: 12px !important;
        margin-bottom: 18px !important;
    }

    .dashboard-page .filters,
    .my-forms-page .filters,
    .claimed-page .filters {
        margin-bottom: 20px !important;
        border-radius: 10px !important;
    }

    .dashboard-page .ticket-grid,
    .my-forms-page .ticket-grid,
    .claimed-page .ticket-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .dashboard-page .ticket-grid > .card,
    .my-forms-page .ticket-grid > .card,
    .claimed-page .ticket-grid > .card {
        min-height: 0;
        padding: 12px !important;
    }

    .dashboard-page .ticket-grid .ticket-title,
    .my-forms-page .ticket-grid .ticket-title,
    .claimed-page .ticket-grid .ticket-title {
        margin: 8px 0 6px !important;
        font-size: 15px !important;
        line-height: 1.24 !important;
    }

    .dashboard-page .ticket-grid .small,
    .my-forms-page .ticket-grid .small,
    .claimed-page .ticket-grid .small {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
        font-size: 12px !important;
        line-height: 1.34 !important;
    }

    .dashboard-page .ticket-grid p,
    .my-forms-page .ticket-grid p,
    .claimed-page .ticket-grid p {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        margin-top: 6px !important;
        font-size: 12px !important;
        line-height: 1.34 !important;
    }

    .dashboard-page .ticket-grid .badge,
    .my-forms-page .ticket-grid .badge,
    .claimed-page .ticket-grid .badge {
        max-width: 100%;
        min-height: 26px;
        padding: 5px 8px !important;
        font-size: 11px !important;
        white-space: normal;
        text-align: center;
    }

    .dashboard-page .ticket-grid .assignee,
    .claimed-page .ticket-grid .assignee {
        margin-top: 8px !important;
        padding: 8px !important;
        border-radius: 8px !important;
        font-size: 11px !important;
        line-height: 1.3 !important;
    }

    .dashboard-page .ticket-grid .card-actions,
    .my-forms-page .ticket-grid .card-actions,
    .claimed-page .ticket-grid .card-actions {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 7px !important;
        padding-top: 10px;
    }

    .dashboard-page .ticket-grid .btn-detail,
    .my-forms-page .ticket-grid .btn-detail,
    .claimed-page .ticket-grid .btn-detail,
    .dashboard-page .ticket-grid .btn-secondary,
    .my-forms-page .ticket-grid .btn-secondary,
    .claimed-page .ticket-grid .btn-secondary,
    .dashboard-page .ticket-grid .delete-btn {
        width: 100% !important;
        min-height: 36px !important;
        min-width: 0;
        padding: 0 8px !important;
        font-size: 12px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dashboard-page .ticket-grid > .card,
    .my-forms-page .ticket-grid > .card,
    .claimed-page .ticket-grid > .card,
    .dashboard-page .ticket-grid .btn-detail,
    .my-forms-page .ticket-grid .btn-detail,
    .claimed-page .ticket-grid .btn-detail,
    .dashboard-page .ticket-grid .btn-secondary,
    .my-forms-page .ticket-grid .btn-secondary,
    .claimed-page .ticket-grid .btn-secondary {
        transition: none !important;
    }

    .dashboard-page .ticket-grid > .card:hover,
    .my-forms-page .ticket-grid > .card:hover,
    .claimed-page .ticket-grid > .card:hover,
    .dashboard-page .ticket-grid .btn-detail:hover,
    .my-forms-page .ticket-grid .btn-detail:hover,
    .claimed-page .ticket-grid .btn-detail:hover,
    .dashboard-page .ticket-grid .btn-secondary:hover,
    .my-forms-page .ticket-grid .btn-secondary:hover,
    .claimed-page .ticket-grid .btn-secondary:hover {
        transform: none !important;
    }
}

/* Final ticket-card grid: four columns on desktop, incomplete rows start left */
.dashboard-page .ticket-grid,
.my-forms-page .ticket-grid,
.claimed-page .ticket-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: start;
    align-items: stretch;
    width: 100%;
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    gap: 16px !important;
}

.dashboard-page .ticket-grid > .card,
.my-forms-page .ticket-grid > .card,
.claimed-page .ticket-grid > .card {
    width: 100%;
    max-width: none;
    min-width: 0;
    min-height: 330px;
    padding: 18px !important;
}

.claimed-page .ticket-grid > .card {
    min-height: 300px;
}

.dashboard-page .ticket-grid > .card > div:first-child,
.my-forms-page .ticket-grid > .card > div:first-child,
.claimed-page .ticket-grid > .card > div:first-child {
    min-height: 30px;
}

.dashboard-page .ticket-grid .ticket-title,
.my-forms-page .ticket-grid .ticket-title,
.claimed-page .ticket-grid .ticket-title {
    display: -webkit-box;
    min-height: 0;
    margin: 8px 0 7px !important;
    overflow: hidden;
    font-size: 16px !important;
    line-height: 1.3 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dashboard-page .ticket-grid .small,
.my-forms-page .ticket-grid .small,
.claimed-page .ticket-grid .small {
    display: -webkit-box;
    min-height: 60px;
    overflow: hidden;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.dashboard-page .ticket-grid .ticket-meta,
.my-forms-page .ticket-grid .ticket-meta,
.claimed-page .ticket-grid .ticket-meta {
    display: grid;
    gap: 5px;
    min-height: 0;
    overflow: visible;
    -webkit-line-clamp: initial;
}

.dashboard-page .ticket-grid .ticket-meta-row,
.my-forms-page .ticket-grid .ticket-meta-row,
.claimed-page .ticket-grid .ticket-meta-row {
    display: grid;
    grid-template-columns: 15px auto minmax(0, 1fr);
    align-items: start;
    column-gap: 5px;
    min-width: 0;
}

.dashboard-page .ticket-grid .ticket-meta-row::before,
.my-forms-page .ticket-grid .ticket-meta-row::before,
.claimed-page .ticket-grid .ticket-meta-row::before {
    content: "";
    width: 14px;
    height: 14px;
    margin-top: 2px;
    background: currentColor;
    opacity: .78;
    -webkit-mask: var(--ticket-icon) center / contain no-repeat;
    mask: var(--ticket-icon) center / contain no-repeat;
}

.dashboard-page .ticket-grid .ticket-meta-label,
.my-forms-page .ticket-grid .ticket-meta-label,
.claimed-page .ticket-grid .ticket-meta-label {
    font-weight: 800;
}

.dashboard-page .ticket-grid .ticket-meta-row > span:last-child,
.my-forms-page .ticket-grid .ticket-meta-row > span:last-child,
.claimed-page .ticket-grid .ticket-meta-row > span:last-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticket-meta-date {
    --ticket-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='17' rx='2'/%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3C/svg%3E");
}

.ticket-meta-system {
    --ticket-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Cpath d='M7 8h10M7 12h7M7 16h10'/%3E%3C/svg%3E");
}

.ticket-meta-product {
    --ticket-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 8-9 5-9-5 9-5 9 5Z'/%3E%3Cpath d='m3 8 9 5 9-5M3 12l9 5 9-5M3 16l9 5 9-5'/%3E%3C/svg%3E");
}

.ticket-meta-assignee {
    --ticket-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
}

.ticket-meta-claimed {
    --ticket-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.dashboard-page .ticket-grid p,
.my-forms-page .ticket-grid p,
.claimed-page .ticket-grid p {
    display: -webkit-box;
    min-height: 0;
    margin: 7px 0 0 !important;
    overflow: hidden;
    font-size: 12.5px !important;
    line-height: 1.5 !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.dashboard-page .ticket-grid .assignee,
.claimed-page .ticket-grid .assignee {
    margin-top: 8px !important;
    padding: 8px 10px !important;
}

.claimed-page .ticket-grid .ticket-meta-claimed {
    display: grid;
    grid-template-columns: 15px minmax(0, 1fr);
    align-items: center;
    column-gap: 5px;
    margin-top: 3px;
    text-decoration: none !important;
}

.claimed-page .ticket-grid .ticket-meta-claimed-content {
    display: inline;
    min-width: 0;
    text-decoration: none !important;
    white-space: nowrap;
}

.dashboard-page .ticket-grid .card-actions {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px !important;
}

.dashboard-page .ticket-grid .card-actions > .btn-detail {
    grid-column: auto;
}

.my-forms-page .ticket-grid .card-actions {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 8px !important;
}

.claimed-page .ticket-grid .card-actions {
    display: grid !important;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px !important;
    padding-top: 10px;
}

.dashboard-page .ticket-grid .card-actions > *,
.my-forms-page .ticket-grid .card-actions > *,
.claimed-page .ticket-grid .card-actions > *,
.dashboard-page .ticket-grid .card-actions form,
.my-forms-page .ticket-grid .card-actions form,
.claimed-page .ticket-grid .card-actions form {
    width: 100%;
    min-width: 0;
}

.dashboard-page .ticket-grid .card-actions .btn-detail,
.dashboard-page .ticket-grid .card-actions .btn-secondary,
.dashboard-page .ticket-grid .card-actions .delete-btn,
.my-forms-page .ticket-grid .card-actions .btn-detail,
.my-forms-page .ticket-grid .card-actions .btn-secondary,
.claimed-page .ticket-grid .card-actions .btn-detail,
.claimed-page .ticket-grid .card-actions .btn-secondary {
    width: 100% !important;
    min-width: 0;
    min-height: 40px !important;
    padding: 0 10px !important;
    font-size: 12.5px !important;
}

.dashboard-page .ticket-grid .ticket-action,
.my-forms-page .ticket-grid .ticket-action,
.claimed-page .ticket-grid .ticket-action {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.dashboard-page .ticket-grid .card-actions .ticket-action {
    padding-right: 5px !important;
    padding-left: 5px !important;
    font-size: 11.5px !important;
    gap: 4px;
}

.dashboard-page .ticket-grid .ticket-action::before,
.my-forms-page .ticket-grid .ticket-action::before,
.claimed-page .ticket-grid .ticket-action::before {
    content: "";
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    background: currentColor;
    -webkit-mask: var(--ticket-action-icon) center / contain no-repeat;
    mask: var(--ticket-action-icon) center / contain no-repeat;
}

.dashboard-page .ticket-grid .card-actions .ticket-action::before {
    flex-basis: 12px;
    width: 12px;
    height: 12px;
}

.ticket-action-open {
    --ticket-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
}

.ticket-action-claim {
    --ticket-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='m16 11 2 2 4-4'/%3E%3C/svg%3E");
}

.ticket-action-delete {
    --ticket-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M8 6V4h8v2M19 6l-1 14H6L5 6M10 11v5M14 11v5'/%3E%3C/svg%3E");
}

.dashboard-page .ticket-grid .delete-btn.ticket-action-delete,
.my-forms-page .ticket-grid .delete-btn.ticket-action-delete,
.claimed-page .ticket-grid .delete-btn.ticket-action-delete {
    background: rgba(127, 29, 29, .24) !important;
    border: 1px solid rgba(248, 113, 113, .32) !important;
    color: #fecaca !important;
}

.dashboard-page .ticket-grid .delete-btn.ticket-action-delete:hover,
.my-forms-page .ticket-grid .delete-btn.ticket-action-delete:hover,
.claimed-page .ticket-grid .delete-btn.ticket-action-delete:hover {
    background: rgba(127, 29, 29, .34) !important;
    border-color: rgba(248, 113, 113, .48) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .delete-btn.ticket-action-delete,
html[data-theme="light"] .my-forms-page .ticket-grid .delete-btn.ticket-action-delete,
html[data-theme="light"] .claimed-page .ticket-grid .delete-btn.ticket-action-delete {
    background: #fef2f2 !important;
    border-color: rgba(220, 38, 38, .28) !important;
    color: #991b1b !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .delete-btn.ticket-action-delete:hover,
html[data-theme="light"] .my-forms-page .ticket-grid .delete-btn.ticket-action-delete:hover,
html[data-theme="light"] .claimed-page .ticket-grid .delete-btn.ticket-action-delete:hover {
    background: #fee2e2 !important;
    border-color: rgba(220, 38, 38, .42) !important;
    color: #7f1d1d !important;
}

.ticket-action-release {
    --ticket-action-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='5' y='10' width='14' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 7.5-2'/%3E%3C/svg%3E");
}

@media (min-width: 769px) and (max-width: 1099px) {
    .dashboard-page .ticket-grid,
    .my-forms-page .ticket-grid,
    .claimed-page .ticket-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-page .ticket-grid > .card,
    .my-forms-page .ticket-grid > .card,
    .claimed-page .ticket-grid > .card {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .dashboard-page .ticket-grid,
    .my-forms-page .ticket-grid,
    .claimed-page .ticket-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px !important;
    }

    .dashboard-page .ticket-grid > .card,
    .my-forms-page .ticket-grid > .card,
    .claimed-page .ticket-grid > .card {
        width: 100%;
        max-width: none;
        min-height: 0;
        padding: 11px !important;
    }

    .dashboard-page .ticket-grid > .card > div:first-child,
    .my-forms-page .ticket-grid > .card > div:first-child,
    .claimed-page .ticket-grid > .card > div:first-child {
        min-height: 26px;
    }

    .dashboard-page .ticket-grid .ticket-title,
    .my-forms-page .ticket-grid .ticket-title,
    .claimed-page .ticket-grid .ticket-title {
        min-height: 0;
        margin: 6px 0 5px !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
    }

    .dashboard-page .ticket-grid .small,
    .my-forms-page .ticket-grid .small,
    .claimed-page .ticket-grid .small {
        min-height: 56px;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
        -webkit-line-clamp: 4;
    }

    .dashboard-page .ticket-grid .ticket-meta,
    .my-forms-page .ticket-grid .ticket-meta,
    .claimed-page .ticket-grid .ticket-meta {
        display: grid;
        min-height: 0;
        gap: 4px;
        overflow: visible;
    }

    .dashboard-page .ticket-grid .ticket-meta-row,
    .my-forms-page .ticket-grid .ticket-meta-row,
    .claimed-page .ticket-grid .ticket-meta-row {
        grid-template-columns: 12px minmax(0, 1fr);
        column-gap: 4px;
    }

    .dashboard-page .ticket-grid .ticket-meta-row::before,
    .my-forms-page .ticket-grid .ticket-meta-row::before,
    .claimed-page .ticket-grid .ticket-meta-row::before {
        width: 11px;
        height: 11px;
        margin-top: 1px;
    }

    .dashboard-page .ticket-grid .ticket-meta-label,
    .my-forms-page .ticket-grid .ticket-meta-label,
    .claimed-page .ticket-grid .ticket-meta-label {
        display: none;
    }

    .dashboard-page .ticket-grid .assignee .ticket-meta-row,
    .claimed-page .ticket-grid .assignee .ticket-meta-row {
        grid-template-columns: 11px auto minmax(0, 1fr);
    }

    .dashboard-page .ticket-grid .assignee .ticket-meta-label,
    .claimed-page .ticket-grid .assignee .ticket-meta-label {
        display: inline;
    }

    .dashboard-page .ticket-grid .assignee .ticket-meta-row > strong,
    .claimed-page .ticket-grid .assignee .ticket-meta-row > strong {
        white-space: nowrap;
    }

    .dashboard-page .ticket-grid p,
    .my-forms-page .ticket-grid p,
    .claimed-page .ticket-grid p {
        min-height: 0;
        margin-top: 5px !important;
        font-size: 10.5px !important;
        line-height: 1.35 !important;
    }

    .dashboard-page .ticket-grid .badge,
    .my-forms-page .ticket-grid .badge,
    .claimed-page .ticket-grid .badge {
        min-height: 23px;
        margin: 0 3px 4px 0 !important;
        padding: 4px 7px !important;
        font-size: 9px !important;
    }

    .dashboard-page .ticket-grid .assignee,
    .claimed-page .ticket-grid .assignee {
        margin-top: 6px !important;
        padding: 6px 7px !important;
        font-size: 10px !important;
    }

    .claimed-page .ticket-grid .ticket-meta-claimed {
        grid-template-columns: 11px minmax(0, 1fr);
    }

    .claimed-page .ticket-grid .ticket-meta-claimed-content {
        white-space: normal;
    }

    .dashboard-page .ticket-grid .card-actions,
    .my-forms-page .ticket-grid .card-actions,
    .claimed-page .ticket-grid .card-actions {
        grid-auto-flow: row;
        grid-template-columns: 1fr;
        gap: 6px !important;
        padding-top: 9px;
    }

    .dashboard-page .ticket-grid .card-actions > .btn-detail {
        grid-column: auto;
    }

    .dashboard-page .ticket-grid .card-actions .btn-detail,
    .dashboard-page .ticket-grid .card-actions .btn-secondary,
    .dashboard-page .ticket-grid .card-actions .delete-btn,
    .my-forms-page .ticket-grid .card-actions .btn-detail,
    .my-forms-page .ticket-grid .card-actions .btn-secondary,
    .claimed-page .ticket-grid .card-actions .btn-detail,
    .claimed-page .ticket-grid .card-actions .btn-secondary {
        min-height: 34px !important;
        padding: 0 6px !important;
        font-size: 10px !important;
    }
}

/* Final icon layout stabilization */
.dashboard-page .stat-card-icon,
.my-forms-page .stat-card-icon,
.claimed-page .stat-card-icon {
    position: static;
    top: auto;
    right: auto;
    z-index: 2;
    display: block !important;
    flex: 0 0 42px;
    width: 42px !important;
    height: 42px !important;
    margin: 0 !important;
    background: currentColor !important;
}

.dashboard-page .filters .filter-control,
.my-forms-page .filters .filter-control,
.claimed-page .filters .filter-control {
    position: relative;
    display: flex;
    flex: 1 1 170px;
    width: auto;
    min-width: 170px;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-page .filters .filter-control input,
.dashboard-page .filters .filter-control select,
.my-forms-page .filters .filter-control input,
.my-forms-page .filters .filter-control select,
.claimed-page .filters .filter-control input,
.claimed-page .filters .filter-control select {
    width: 100% !important;
    min-width: 0 !important;
    padding-left: 38px !important;
}

@media (max-width: 768px) {
    .dashboard-page .stat-card-icon,
    .my-forms-page .stat-card-icon,
    .claimed-page .stat-card-icon {
        position: static;
        top: auto;
        right: auto;
        flex-basis: 28px;
        width: 28px !important;
        height: 28px !important;
    }

    .dashboard-page .filters .filter-control,
    .my-forms-page .filters .filter-control,
    .claimed-page .filters .filter-control {
        width: 100% !important;
        min-width: 0 !important;
    }
}

/* Unified application data tables */
.data-table-card {
    overflow: hidden;
    border-radius: 8px !important;
}

.data-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    scrollbar-color: rgba(189, 172, 142, .7) rgba(255, 255, 255, .05);
    scrollbar-width: thin;
}

table.data-table {
    width: 100%;
    min-width: var(--data-table-min-width, 900px);
    border-collapse: separate;
    border-spacing: 0;
}

table.data-table th,
table.data-table td {
    padding: 13px 15px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    text-align: left;
    vertical-align: middle;
    line-height: 1.45;
}

table.data-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #121d30;
    color: var(--ui-gold);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

table.data-table tbody tr:nth-child(even) td {
    background: rgba(255, 255, 255, .018);
}

table.data-table tbody tr:hover td {
    background: rgba(189, 172, 142, .075);
}

table.data-table tbody tr:last-child td {
    border-bottom: 0;
}

/* Priority stays neutral; only its border carries a subtle severity cue. */
.dashboard-page .ticket-grid .badge.priority.priority-critical,
.my-forms-page .ticket-grid .badge.priority.priority-critical,
.claimed-page .ticket-grid .badge.priority.priority-critical {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(248, 113, 113, .58) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.priority.priority-high,
.my-forms-page .ticket-grid .badge.priority.priority-high,
.claimed-page .ticket-grid .badge.priority.priority-high {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(251, 146, 60, .54) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.priority.priority-medium,
.my-forms-page .ticket-grid .badge.priority.priority-medium,
.claimed-page .ticket-grid .badge.priority.priority-medium {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(245, 158, 11, .48) !important;
    color: #ffffff !important;
}

.dashboard-page .ticket-grid .badge.priority.priority-low,
.my-forms-page .ticket-grid .badge.priority.priority-low,
.claimed-page .ticket-grid .badge.priority.priority-low {
    background: rgba(47, 58, 75, .92) !important;
    border-color: rgba(56, 189, 248, .44) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.priority.priority-critical,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.priority.priority-critical,
html[data-theme="light"] .claimed-page .ticket-grid .badge.priority.priority-critical {
    background: #ffffff !important;
    border-color: rgba(220, 38, 38, .58) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.priority.priority-high,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.priority.priority-high,
html[data-theme="light"] .claimed-page .ticket-grid .badge.priority.priority-high {
    background: #ffffff !important;
    border-color: rgba(234, 88, 12, .56) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.priority.priority-medium,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.priority.priority-medium,
html[data-theme="light"] .claimed-page .ticket-grid .badge.priority.priority-medium {
    background: #ffffff !important;
    border-color: rgba(180, 83, 9, .52) !important;
    color: #26303c !important;
}

html[data-theme="light"] .dashboard-page .ticket-grid .badge.priority.priority-low,
html[data-theme="light"] .my-forms-page .ticket-grid .badge.priority.priority-low,
html[data-theme="light"] .claimed-page .ticket-grid .badge.priority.priority-low {
    background: #ffffff !important;
    border-color: rgba(3, 105, 161, .48) !important;
    color: #26303c !important;
}

.badge.priority,
.priority-badge,
.badge.priority.priority-critical,
.badge.priority.priority-high,
.badge.priority.priority-medium,
.badge.priority.priority-low,
.priority-badge.priority-critical,
.priority-badge.priority-high,
.priority-badge.priority-medium,
.priority-badge.priority-low {
    background: rgba(47, 58, 75, .92) !important;
    color: #ffffff !important;
}

.badge.priority.priority-critical,
.priority-badge.priority-critical,
.badge.critical {
    border-color: rgba(248, 113, 113, .58) !important;
}

.badge.priority.priority-high,
.priority-badge.priority-high,
.badge.high {
    border-color: rgba(251, 146, 60, .54) !important;
}

.badge.priority.priority-medium,
.priority-badge.priority-medium,
.badge.medium {
    border-color: rgba(245, 158, 11, .48) !important;
}

.badge.priority.priority-low,
.priority-badge.priority-low,
.badge.low {
    border-color: rgba(56, 189, 248, .44) !important;
}

html[data-theme="light"] .badge.priority,
html[data-theme="light"] .priority-badge,
html[data-theme="light"] .badge.priority.priority-critical,
html[data-theme="light"] .badge.priority.priority-high,
html[data-theme="light"] .badge.priority.priority-medium,
html[data-theme="light"] .badge.priority.priority-low,
html[data-theme="light"] .priority-badge.priority-critical,
html[data-theme="light"] .priority-badge.priority-high,
html[data-theme="light"] .priority-badge.priority-medium,
html[data-theme="light"] .priority-badge.priority-low {
    background: #ffffff !important;
    color: #26303c !important;
}

html[data-theme="light"] .badge.priority.priority-critical,
html[data-theme="light"] .priority-badge.priority-critical,
html[data-theme="light"] .badge.critical {
    border-color: rgba(220, 38, 38, .58) !important;
}

html[data-theme="light"] .badge.priority.priority-high,
html[data-theme="light"] .priority-badge.priority-high,
html[data-theme="light"] .badge.high {
    border-color: rgba(234, 88, 12, .56) !important;
}

html[data-theme="light"] .badge.priority.priority-medium,
html[data-theme="light"] .priority-badge.priority-medium,
html[data-theme="light"] .badge.medium {
    border-color: rgba(180, 83, 9, .52) !important;
}

html[data-theme="light"] .badge.priority.priority-low,
html[data-theme="light"] .priority-badge.priority-low,
html[data-theme="light"] .badge.low {
    border-color: rgba(3, 105, 161, .48) !important;
}

table.data-table a:not(.btn):not(.btn-small) {
    color: #8bbcff;
    font-weight: 700;
    text-decoration: none;
}

table.data-table a:not(.btn):not(.btn-small):hover {
    text-decoration: underline;
}

.data-table-nowrap {
    white-space: nowrap;
}

.data-table-action-cell form {
    margin: 0;
}

html[data-theme="light"] table.data-table thead th {
    background: #f0f2f5 !important;
    color: #6f5f3f !important;
}

html[data-theme="light"] table.data-table th,
html[data-theme="light"] table.data-table td {
    border-bottom-color: #e2e6eb;
}

html[data-theme="light"] table.data-table tbody tr:nth-child(even) td {
    background: #fafbfc;
}

html[data-theme="light"] table.data-table tbody tr:hover td {
    background: #f3efe6;
}

html[data-theme="light"] table.data-table a:not(.btn):not(.btn-small) {
    color: #1d5f9f;
}

@media (max-width: 768px) {
    .data-table-card {
        overflow: visible !important;
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        backdrop-filter: none !important;
    }

    .data-table-wrap {
        overflow: visible !important;
    }

    table.data-table {
        display: block;
        min-width: 0 !important;
        background: transparent;
    }

    table.data-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    table.data-table tbody {
        display: grid;
        gap: 10px;
        width: 100%;
    }

    table.data-table tbody tr {
        display: block;
        width: 100%;
        overflow: hidden;
        background: var(--ui-surface);
        border: 1px solid var(--ui-border);
        border-radius: 8px;
        box-shadow: 0 8px 22px rgba(0, 0, 0, .14);
    }

    table.data-table tbody tr:hover td,
    table.data-table tbody tr:nth-child(even) td {
        background: transparent;
    }

    table.data-table td {
        display: grid;
        grid-template-columns: minmax(88px, 31%) minmax(0, 1fr);
        gap: 10px;
        width: 100%;
        min-width: 0;
        padding: 9px 12px;
        border-bottom: 1px solid rgba(255, 255, 255, .07);
        overflow-wrap: anywhere;
    }

    table.data-table td::before {
        content: attr(data-label);
        color: var(--ui-muted);
        font-size: 10px;
        font-weight: 800;
        line-height: 1.45;
        text-transform: uppercase;
    }

    table.data-table td > .badge,
    table.data-table td > .status,
    table.data-table td > .action-badge {
        width: auto;
        justify-self: start;
    }

    table.data-table td[data-label="Akce"] {
        display: block;
        padding-top: 11px;
    }

    table.data-table td[data-label="Akce"]::before {
        display: block;
        margin-bottom: 8px;
    }

    table.data-table .actions-cell {
        display: grid !important;
        grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)) !important;
        gap: 7px !important;
        min-width: 0 !important;
    }

    table.data-table .actions-cell form,
    table.data-table .actions-cell .btn-small,
    table.data-table .data-table-action-cell form,
    table.data-table .data-table-action-cell .btn {
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }

    table.data-table .actions-cell .btn-small {
        min-height: 36px !important;
        padding: 0 7px !important;
        font-size: 11px !important;
    }

    table.data-table .data-table-empty-row {
        background: var(--ui-surface);
    }

    table.data-table .data-table-empty-cell {
        display: block;
        padding: 0;
        border: 0;
    }

    table.data-table .data-table-empty-cell::before {
        display: none;
    }

    html[data-theme="light"] table.data-table tbody tr {
        background: #ffffff;
        border-color: rgba(25, 33, 44, .16);
        box-shadow: 0 8px 22px rgba(24, 29, 36, .08);
    }

html[data-theme="light"] table.data-table td {
        border-bottom-color: #e2e6eb;
    }
}

/* Shared compact page header identity */
.app-topbar-side {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-left: auto;
}

.app-topbar-identity {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
    margin-left: auto;
}

.app-topbar-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    max-width: 100%;
    padding: 0 11px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 8px;
    background: rgba(15, 23, 42, .68);
    color: #d8dee8;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.app-topbar-sector {
    border-color: rgba(189, 172, 142, .28);
    background: rgba(189, 172, 142, .08);
    color: var(--ui-gold);
}

.topbar,
.help-topbar,
.stats-topbar,
.app-identity-header {
    align-items: flex-start !important;
}

.stats-topbar,
.app-identity-header {
    display: flex !important;
    justify-content: space-between;
    gap: 18px;
}

.topbar > .app-topbar-identity,
.help-topbar > .app-topbar-identity,
.stats-topbar > .app-topbar-identity,
.app-identity-header > .app-topbar-identity,
.ticket-hero > .app-topbar-identity {
    margin-left: auto;
}

.topbar .subtitle,
.topbar > div > p,
.help-topbar .help-subtitle,
.stats-topbar .stats-subtitle {
    margin-bottom: 0 !important;
}

html[data-theme="light"] .app-topbar-user {
    background: #ffffff;
    border-color: rgba(25, 33, 44, .14);
    color: #26303c;
    box-shadow: 0 6px 16px rgba(24, 29, 36, .06);
}

html[data-theme="light"] .app-topbar-sector {
    background: #f3efe7;
    border-color: #d8c8aa;
    color: #67583c;
}

@media (max-width: 768px) {
    .app-topbar-side {
        width: 100%;
        align-items: stretch;
        margin-left: 0;
    }

    .app-topbar-identity {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .app-topbar-chip {
        min-height: 32px;
    }

    .app-identity-header {
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .stats-topbar {
        flex-direction: column;
    }
}

/* System motion layer */
.stat-card,
.dashboard-page .ticket-grid > .card,
.my-forms-page .ticket-grid > .card,
.claimed-page .ticket-grid > .card,
.kanban-column,
.kanban-card,
.stats-kpi,
.stats-panel,
.supply-stat,
.supply-card {
    animation: uiSoftEnter .42s ease both;
}

.dashboard-page .ticket-grid > .card:nth-child(2n),
.my-forms-page .ticket-grid > .card:nth-child(2n),
.claimed-page .ticket-grid > .card:nth-child(2n),
.kanban-card:nth-child(2n),
.stats-kpi:nth-child(2n),
.supply-card:nth-child(2n) {
    animation-delay: .04s;
}

.dashboard-page .ticket-grid > .card:nth-child(3n),
.my-forms-page .ticket-grid > .card:nth-child(3n),
.claimed-page .ticket-grid > .card:nth-child(3n),
.kanban-card:nth-child(3n),
.stats-kpi:nth-child(3n),
.supply-card:nth-child(3n) {
    animation-delay: .08s;
}

.status-badge,
.badge.status-new,
.badge.status-progress,
.badge.status-deferred,
.badge.status-done,
.badge.status-rejected {
    animation: uiStatusBreath .74s ease both;
}

.empty,
.empty-state,
.empty-panel,
.supply-empty,
.kanban-card-empty,
.stats-empty {
    animation: uiSoftPulse 2.6s ease-in-out infinite;
}

.stat-number,
.stats-kpi-value,
.supply-stat-copy strong {
    transition: color .18s ease, transform .18s ease;
}

.stat-card:hover .stat-number,
.stats-kpi:hover .stats-kpi-value,
.supply-stat:hover .supply-stat-copy strong {
    transform: translateY(-1px);
}

@keyframes uiSoftEnter {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes uiStatusBreath {
    0% {
        box-shadow: 0 0 0 0 rgba(189, 172, 142, .0);
        transform: scale(.98);
    }
    45% {
        box-shadow: 0 0 0 4px rgba(189, 172, 142, .16);
        transform: scale(1.025);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(189, 172, 142, .0);
        transform: scale(1);
    }
}

@keyframes uiSoftPulse {
    0%, 100% { opacity: .78; }
    50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .stat-card,
    .dashboard-page .ticket-grid > .card,
    .my-forms-page .ticket-grid > .card,
    .claimed-page .ticket-grid > .card,
    .kanban-column,
    .kanban-card,
    .stats-kpi,
    .stats-panel,
    .supply-stat,
    .supply-card,
    .status-badge,
    .badge.status-new,
    .badge.status-progress,
    .badge.status-deferred,
    .badge.status-done,
    .badge.status-rejected,
    .empty,
    .empty-state,
    .empty-panel,
    .supply-empty,
    .kanban-card-empty,
    .stats-empty {
        animation: none !important;
    }

    .stat-number,
    .stats-kpi-value,
    .supply-stat-copy strong,
    .ui-action-icon,
    .toast-icon svg,
    .toast-icon svg path,
    .toast-icon svg circle {
        transition: none !important;
        animation: none !important;
    }
}
