html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #1A6B8A;
}

/* Theme color overrides */
.btn-primary {
    background-color: #1A6B8A;
    border-color: #1A6B8A;
    color: #fff;
}

.btn-primary:hover {
    background-color: #155a74;
    border-color: #155a74;
    color: #fff;
}

.btn-primary:active, .btn-primary:focus {
    background-color: #124e65;
    border-color: #124e65;
    color: #fff;
}

.btn-secondary {
    background-color: #2196A6;
    border-color: #2196A6;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #1b7f8d;
    border-color: #1b7f8d;
    color: #fff;
}

.btn-outline-secondary {
    color: #1A6B8A;
    border-color: #1A6B8A;
}

.btn-outline-secondary:hover {
    background-color: #1A6B8A;
    border-color: #1A6B8A;
    color: #fff;
}

.btn-outline-success {
    color: #2196A6;
    border-color: #2196A6;
}

.btn-outline-success:hover {
    background-color: #2196A6;
    border-color: #2196A6;
    color: #fff;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

[data-bs-theme="dark"] .btn-outline-danger {
    color: #ff6b7a;
    border-color: #ff6b7a;
}

[data-bs-theme="dark"] .btn-outline-danger:hover {
    background-color: #ff6b7a;
    border-color: #ff6b7a;
    color: #1a1f3c;
}

/* Status badge colors */
.status-new {
    background-color: #198754;
    color: #fff;
}

.status-inprogress {
    background-color: #1A6B8A;
    color: #fff;
}

.status-onhold {
    background-color: #ffc107;
    color: #212529;
}

.status-resolved {
    background-color: #198754;
    color: #fff;
}

.status-closed {
    background-color: #6c757d;
    color: #fff;
}

/* Priority badge colors */
.priority-low {
    background-color: #ffc107;
    color: #212529;
}

.priority-medium {
    background-color: #fd7e14;
    color: #fff;
}

.priority-high {
    background-color: #dc3545;
    color: #fff;
}

.priority-emergency {
    background-color: #8b0000;
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
}

/* Emergency row flash */
@keyframes emergency-flash {
    0%, 100% { box-shadow: inset 0 0 0 100px transparent; }
    50% { box-shadow: inset 0 0 0 100px rgba(220, 53, 69, 0.3); }
}

tr.emergency-row td {
    animation: emergency-flash 1.5s ease-in-out infinite;
}

/* General layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: #E0F2F5;
}

main {
    flex: 1;
}

.footer {
    margin-top: auto;
    background-color: #E0F2F5;
}

/* Navbar */
.navbar {
    height: 90px;
    background-color: #1B3A4B !important;
}

/* Sidebar layout wrapper */
.sidebar-layout {
    min-height: calc(100vh - 76px);
}

/* Sidebar */
.sidebar {
    width: 250px;
    min-width: 250px;
    z-index: 1040;
    border-right: none;
    background-color: #1A6B8A !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .sidebar {
    background-color: #12505f !important;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.3);
}

.main-with-sidebar {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 76px);
    flex: 1;
}

.sidebar-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1.1rem 0.25rem;
}

[data-bs-theme="dark"] .sidebar-section-label {
    color: rgba(255, 255, 255, 0.4);
}

.sidebar-link {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    display: flex;
    align-items: center;
    box-shadow: inset 3px 0 0 transparent;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-link svg {
    opacity: 0.75;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.sidebar-link:hover svg {
    opacity: 1;
}

.sidebar-link.active-link {
    background-color: rgba(255, 255, 255, 0.16);
    color: #fff;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #5CC8C8;
}

.sidebar-link.active-link svg {
    opacity: 1;
    color: #5CC8C8;
}

[data-bs-theme="dark"] .sidebar-link {
    color: rgba(255, 255, 255, 0.78);
}

[data-bs-theme="dark"] .sidebar-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

[data-bs-theme="dark"] .sidebar-link.active-link {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
    box-shadow: inset 3px 0 0 #5CC8C8;
}

.sidebar .sidebar-user {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8rem;
}

[data-bs-theme="dark"] .sidebar .sidebar-user {
    color: rgba(255, 255, 255, 0.6);
}

.sidebar .sidebar-divider {
    border-color: rgba(255, 255, 255, 0.15);
    margin: 0.5rem 1rem;
}

[data-bs-theme="dark"] .sidebar .sidebar-divider {
    border-color: rgba(255, 255, 255, 0.1);
}

/* Desktop: sidebar is visible, push content right */
@media (min-width: 992px) {
    .sidebar {
        display: block !important;
    }

    .main-with-sidebar {
        margin-left: 0;
    }
}

/* Mobile: sidebar is an offcanvas overlay */
@media (max-width: 991.98px) {
    .sidebar {
        position: fixed;
        top: 0;
        width: 280px;
        border-right: none;
    }

    .main-with-sidebar {
        margin-left: 0;
    }
}

.table th {
    white-space: nowrap;
}

.badge {
    font-size: 0.8rem;
    padding: 0.35em 0.65em;
}

/* Cards */
.card {
    background-color: #2196A6;
    border: none;
    color: #fff;
}

.card .card-header {
    background-color: rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.card .text-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.card .table {
    color: #fff;
}

.card .table thead tr {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

.card .table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.card .table tbody tr:last-child {
    border-bottom: none;
}

.card .table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.card a {
    color: #E0F2F5;
}

/* Stat cards on dashboard */
.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

/* ===== Split-panel Login ===== */
.login-split {
    display: flex;
    min-height: 100vh;
    margin: -1rem -0.75rem;
}

/* Left brand panel */
.login-brand-panel {
    flex: 1;
    background-color: #1B3A4B;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-decorations {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.login-dots {
    position: absolute;
    top: 40px;
    left: 40px;
    opacity: 0.8;
}

.login-shape {
    position: absolute;
    border-radius: 50%;
}

.login-shape-circle-lg {
    width: 220px;
    height: 220px;
    background-color: #2196A6;
    opacity: 0.1;
    bottom: -60px;
    left: -40px;
}

.login-shape-ring-tr {
    width: 160px;
    height: 160px;
    border: 3px solid rgba(255, 255, 255, 0.12);
    top: 60px;
    right: -30px;
}

.login-shape-circle-sm {
    width: 40px;
    height: 40px;
    background-color: #2196A6;
    opacity: 0.2;
    top: 30%;
    left: 15%;
}

.login-shape-pill {
    width: 100px;
    height: 40px;
    border-radius: 20px;
    background-color: rgba(255, 255, 255, 0.08);
    bottom: 25%;
    right: 10%;
    transform: rotate(-20deg);
}

.login-shape-ring-bl {
    width: 100px;
    height: 100px;
    border: 3px solid #2196A6;
    opacity: 0.15;
    bottom: 15%;
    left: 20%;
}

.login-shape-ring-sm {
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    top: 20%;
    right: 25%;
}

.login-brand-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 2rem;
}

.login-brand-heading {
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.login-brand-sub {
    color: #5a8a96;
    font-size: 1.05rem;
    margin: 0;
}

/* Right form panel */
.login-form-panel {
    flex: 1;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
}

.login-logo-tile {
    width: 120px;
    height: 120px;
    background: #1B3A4B;
    border-radius: 20px;
    box-shadow: 0 2px 12px rgba(27, 58, 75, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.login-logo-tile img {
    max-width: 100px;
    max-height: 90px;
    object-fit: contain;
}

.login-form-heading {
    text-align: center;
    color: #1B3A4B;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.75rem;
}

.login-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1B3A4B;
    margin-bottom: 0.35rem;
    display: block;
}

.login-input-wrap {
    position: relative;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #2196A6;
    pointer-events: none;
    z-index: 2;
}

.login-input {
    background-color: #F4F4F4 !important;
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding-left: 40px !important;
    height: 46px;
    font-size: 0.9rem;
    color: #1B3A4B;
}

.login-input:focus {
    background-color: #fff !important;
    border-color: #2196A6;
    box-shadow: 0 0 0 3px rgba(33, 150, 166, 0.15);
}

.login-muted {
    color: #5a8a96;
    font-size: 0.9rem;
}

.login-link {
    color: #2196A6;
    font-size: 0.9rem;
}

.login-link:hover {
    color: #1A6B8A;
}

.login-btn {
    background-color: #2196A6;
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.7rem;
    border-radius: 0.5rem;
    letter-spacing: 0.02em;
    transition: background-color 0.2s;
}

.login-btn:hover {
    background-color: #1b7f8d;
    color: #fff;
}

.login-btn:active {
    background-color: #1A6B8A;
    color: #fff;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    color: #5a8a96;
    font-size: 0.85rem;
}

.login-divider::before,
.login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
}

.login-social-btn {
    border: 1px solid #e0e0e0;
    border-radius: 0.5rem;
    padding: 0.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.login-social-btn:hover {
    border-color: #2196A6;
    box-shadow: 0 1px 6px rgba(33, 150, 166, 0.15);
    background: #fff;
}

/* Mobile: hide left panel */
@media (max-width: 767.98px) {
    .login-brand-panel {
        display: none;
    }
    .login-form-panel {
        padding: 2rem 1.5rem;
    }
}

/* Login page (used by register) */
.login-page {
    background: linear-gradient(135deg, #1B3A4B 0%, #1A6B8A 100%);
    margin: -1rem -0.75rem;
    padding: 1rem 0.75rem;
}

.min-vh-75 {
    min-height: 75vh;
}

.login-page .card {
    border-radius: 0.75rem;
    background-color: #fff;
    color: #212529;
}

.login-page .card .text-muted {
    color: #6c757d !important;
}

.login-page .form-floating > .form-control {
    border-radius: 0.5rem;
}

.login-page .btn-primary {
    border-radius: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.025em;
}

/* Landing page */
.landing-title { color: #1B3A4B; }
.landing-subtitle { color: #1A6B8A; }
.landing-divider { border-color: #2196A6; }
.landing-text { color: #1B3A4B; }
.landing-card-text { color: #555; }
.landing-demo-card { background-color: #1B3A4B; border: none; }
.landing-demo-title { color: #E0F2F5; }
.landing-demo-label { color: rgba(255, 255, 255, 0.7); }
.landing-demo-code { color: #5CC8C8; font-size: 0.95rem; }

[data-bs-theme="dark"] .landing-title { color: #e0e2e8; }
[data-bs-theme="dark"] .landing-subtitle { color: #5CC8C8; }
[data-bs-theme="dark"] .landing-divider { border-color: #3a3f55; }
[data-bs-theme="dark"] .landing-text { color: #b0b3c0; }
[data-bs-theme="dark"] .landing-card { background: #22252e; border-color: #2e3140; }
[data-bs-theme="dark"] .landing-card .card-title { color: #e0e2e8; }
[data-bs-theme="dark"] .landing-card-text { color: #9a9eb0; }
[data-bs-theme="dark"] .landing-demo-card { background-color: #22252e; }

/* Dashboard page */
.dashboard-landing {
    max-width: 860px;
    margin: 0 auto;
    padding-top: 1rem;
}

.dashboard-header {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1.25rem;
}

.dashboard-greeting {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1B3A4B;
    margin-bottom: 0.25rem;
}

.dashboard-subtitle {
    color: #6c757d;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Primary tickets CTA on dashboard */
.dashboard-tickets-btn {
    background: #00c9a7;
    color: #fff;
    border: 1px solid #00c9a7;
    border-radius: 0.75rem;
    padding: 0.75rem 2.5rem;
    font-weight: 600;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 4px 12px rgba(0, 201, 167, 0.25);
}

.dashboard-tickets-btn:hover,
.dashboard-tickets-btn:focus,
.dashboard-tickets-btn:active {
    background: #00b496;
    color: #fff;
    border-color: #00b496;
    box-shadow: 0 6px 16px rgba(0, 201, 167, 0.35);
}

[data-bs-theme="dark"] .dashboard-tickets-btn {
    background: #00c9a7;
    color: #0b0d10;
    border-color: #00c9a7;
}

[data-bs-theme="dark"] .dashboard-tickets-btn:hover,
[data-bs-theme="dark"] .dashboard-tickets-btn:focus,
[data-bs-theme="dark"] .dashboard-tickets-btn:active {
    background: #00b496;
    color: #0b0d10;
    border-color: #00b496;
}

/* Stat cards */
.dashboard-stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.dashboard-stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}

.dashboard-stat-resolved {
    color: #6c757d;
}

.dashboard-stat-label {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6c757d;
    margin-top: 0.25rem;
}

/* Navigation cards */
.dashboard-nav-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.dashboard-nav-card:hover {
    border-color: #1A6B8A;
    box-shadow: 0 4px 16px rgba(26, 107, 138, 0.1);
}

.dashboard-nav-card .card-title {
    color: #1B3A4B;
    font-size: 1.15rem;
}

.dashboard-nav-card .card-text {
    color: #6c757d;
    font-size: 0.9rem;
}

.dashboard-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dashboard-card-icon-tickets {
    background: rgba(26, 107, 138, 0.1);
    color: #1A6B8A;
}

.dashboard-card-icon-tasks {
    background: rgba(33, 150, 166, 0.1);
    color: #2196A6;
}

.dashboard-card-arrow {
    color: #c0c4cc;
    flex-shrink: 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.dashboard-nav-card:hover .dashboard-card-arrow {
    color: #1A6B8A;
    transform: translateX(3px);
}

.dashboard-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

/* Dashboard dark mode */
[data-bs-theme="dark"] .dashboard-header {
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .dashboard-greeting {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .dashboard-subtitle {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .dashboard-stat-card {
    background: #22252e;
    border-color: #2e3140;
}

[data-bs-theme="dark"] .dashboard-stat-resolved {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .dashboard-stat-label {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .dashboard-nav-card {
    background: #22252e;
    border-color: #2e3140;
}

[data-bs-theme="dark"] .dashboard-nav-card:hover {
    border-color: #5CC8C8;
    box-shadow: 0 4px 16px rgba(92, 200, 200, 0.1);
}

[data-bs-theme="dark"] .dashboard-nav-card .card-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .dashboard-nav-card .card-text {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .dashboard-card-icon-tickets {
    background: rgba(26, 107, 138, 0.2);
    color: #5CC8C8;
}

[data-bs-theme="dark"] .dashboard-card-icon-tasks {
    background: rgba(33, 150, 166, 0.2);
    color: #5CC8C8;
}

[data-bs-theme="dark"] .dashboard-card-arrow {
    color: #4a4e5e;
}

[data-bs-theme="dark"] .dashboard-nav-card:hover .dashboard-card-arrow {
    color: #5CC8C8;
}

[data-bs-theme="dark"] .dashboard-section-label {
    color: #8a8ea0;
}

/* Dark mode overrides */
[data-bs-theme="dark"] body {
    background-color: #1a1d23;
}

[data-bs-theme="dark"] .navbar {
    background-color: #111a22 !important;
}

[data-bs-theme="dark"] .card {
    background-color: #1b4a52;
    color: #e0e0e0;
}

[data-bs-theme="dark"] .card .table {
    color: #e0e0e0;
}

[data-bs-theme="dark"] .login-split .login-brand-panel {
    background-color: #0f1f28;
}

[data-bs-theme="dark"] .login-split .login-form-panel {
    background-color: var(--bs-body-bg);
}

[data-bs-theme="dark"] .login-form-heading {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .login-label {
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .login-input {
    background-color: #2b2f38 !important;
    border-color: #3a3f4a;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .login-input:focus {
    background-color: #1a1d23 !important;
    border-color: #2196A6;
}

[data-bs-theme="dark"] .login-logo-tile {
    background: #2b2f38;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .login-social-btn {
    background: #2b2f38;
    border-color: #3a3f4a;
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .login-social-btn:hover {
    border-color: #2196A6;
    background: #2b2f38;
}

[data-bs-theme="dark"] .login-divider::before,
[data-bs-theme="dark"] .login-divider::after {
    background-color: #3a3f4a;
}

[data-bs-theme="dark"] .login-page {
    background: linear-gradient(135deg, #0f1f28 0%, #12505f 100%);
}

[data-bs-theme="dark"] .login-page .card {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
}

[data-bs-theme="dark"] .login-page .card .text-muted {
    color: var(--bs-secondary-color) !important;
}

[data-bs-theme="dark"] .footer {
    background-color: #1a1d23;
}

[data-bs-theme="dark"] .text-dark {
    color: var(--bs-body-color) !important;
}

/* Dark mode toggle button */
.dark-mode-toggle {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 0.375rem;
    color: rgba(255, 255, 255, 0.75);
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    transition: color 0.15s, border-color 0.15s;
}

.dark-mode-toggle:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
}

/* Nav profile avatar & dropdown */
.nav-profile-btn {
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.nav-profile-btn::after {
    display: none; /* hide default dropdown caret */
}

.nav-profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #2196A6;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.2s;
    overflow: hidden;
}

.nav-profile-btn:hover .nav-profile-avatar,
.nav-profile-btn.show .nav-profile-avatar {
    border-color: rgba(255, 255, 255, 0.7);
}

.nav-profile-dropdown {
    min-width: 280px;
    border-radius: 0.75rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding: 0;
    overflow: hidden;
}

.nav-profile-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
}

.nav-profile-avatar-lg {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #2196A6;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

.nav-profile-jobtitle {
    font-size: 0.78rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.nav-profile-info {
    min-width: 0;
}

.nav-profile-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1B3A4B;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-profile-email {
    font-size: 0.8rem;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-profile-logout {
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: #6c757d;
    display: flex;
    align-items: center;
}

.nav-profile-logout:hover {
    color: #dc3545;
    background: #fef2f2;
}

.nav-profile-dropdown .dropdown-divider {
    margin: 0;
}

/* Profile dropdown dark mode */
[data-bs-theme="dark"] .nav-profile-dropdown {
    background: #22252e;
    border-color: #2e3140;
}

[data-bs-theme="dark"] .nav-profile-name {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .nav-profile-email {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .nav-profile-logout {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .nav-profile-logout:hover {
    color: #f87171;
    background: rgba(248, 113, 113, 0.1);
}

/* Navbar nav links */
.navbar .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
}

.navbar .nav-link:hover {
    color: #fff !important;
}

/* Primary navigation links (left side) */
.navbar .navbar-nav.me-auto .nav-link {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    padding: 0.45rem 0.9rem;
    margin: 0 0.1rem;
    border-radius: 0.375rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .navbar-nav.me-auto .nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

.navbar .navbar-nav.me-auto .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.14);
    font-weight: 600;
}

.navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.25);
}

.navbar .navbar-toggler-icon {
    filter: invert(1);
}

/* ===== Tickets Dashboard ===== */
.tk-dashboard {
    margin: -1.5rem;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 76px);
}

/* Dark header bar */
.tk-header {
    background-color: #1a1f3c;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.tk-header-left {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
}

.tk-header-title {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.tk-header-count {
    color: #8a8fa8;
    font-size: 0.85rem;
}

.tk-header-right {
    display: flex;
    align-items: center;
}

.tk-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.tk-search-input {
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    color: #fff;
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    font-size: 0.875rem;
    width: 280px;
    transition: background-color 0.2s, border-color 0.2s;
}

.tk-search-input::placeholder {
    color: #8a8fa8;
}

.tk-search-input:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: #00c9a7;
    outline: none;
    color: #fff;
}

.tk-search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #00c9a7;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

/* Tabs (Active / Resolved) */
.tk-tabs {
    background: #fff;
    padding: 0 1.5rem;
    border-bottom: 1px solid #e0e2e8;
    margin: 0;
}

.tk-tabs .nav-link {
    color: #6c757d;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 0.75rem 1rem;
    font-weight: 500;
}

.tk-tabs .nav-link:hover {
    color: #00c9a7;
    border-bottom-color: transparent;
}

.tk-tabs .nav-link.active {
    color: #00c9a7;
    background: transparent;
    border-bottom-color: #00c9a7;
}

[data-bs-theme="dark"] .tk-tabs {
    background: #1e2126;
    border-bottom-color: #2d3138;
}

[data-bs-theme="dark"] .tk-tabs .nav-link {
    color: #adb5bd;
}

[data-bs-theme="dark"] .tk-tabs .nav-link.active {
    color: #00c9a7;
}

/* Body area: main + filters */
.tk-body {
    display: flex;
    flex: 1;
    background-color: #f4f5f7;
}

.tk-main {
    flex: 1;
    padding: 1.5rem;
    min-width: 0;
}

/* Stat cards — hero "Total" in a fixed first column, buckets in an auto-fill grid
   so every card is equal width and the last row never stretches to fill the gap. */
.tk-stats {
    display: grid;
    grid-template-columns: minmax(200px, 1.4fr) repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.tk-stat-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 140px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.2s, border-color 0.2s;
}

.tk-stat-clickable {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.tk-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Hero "Total" card: larger figure + icon so it anchors the row. */
.tk-stat-hero {
    padding: 1.1rem 1.4rem;
}

.tk-stat-hero .tk-stat-value {
    font-size: 2rem;
}

.tk-stat-hero .tk-stat-icon {
    width: 50px;
    height: 50px;
}

.tk-stat-active {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.tk-stat-active .tk-stat-value,
.tk-stat-active .tk-stat-label {
    color: #fff !important;
}

.tk-stat-active .tk-stat-icon {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

.tk-stat-active.tk-bucket-unassigned { background: #f57c00 !important; box-shadow: 0 4px 12px rgba(245, 124, 0, 0.35); }
.tk-stat-active.tk-bucket-total { background: #5c6bc0 !important; box-shadow: 0 4px 12px rgba(92, 107, 192, 0.35); }
.tk-stat-active.tk-bucket-new { background: #ff4d4f !important; box-shadow: 0 4px 12px rgba(255, 77, 79, 0.35); }
.tk-stat-active.tk-bucket-inprogress { background: #00c9a7 !important; box-shadow: 0 4px 12px rgba(0, 201, 167, 0.35); }
.tk-stat-active.tk-bucket-onhold { background: #e6a800 !important; box-shadow: 0 4px 12px rgba(230, 168, 0, 0.35); }
.tk-stat-active.tk-bucket-emergency { background: #ff4d4f !important; box-shadow: 0 4px 12px rgba(255, 77, 79, 0.35); }
.tk-stat-active.tk-bucket-all { background: #1A6B8A !important; box-shadow: 0 4px 12px rgba(26, 107, 138, 0.35); }
.tk-stat-active.tk-bucket-closed { background: #6c757d !important; box-shadow: 0 4px 12px rgba(108, 117, 125, 0.35); }

.tk-stat-alert {
    border: 2px solid #ff4d4f;
}

.tk-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tk-stat-all { background: rgba(26, 107, 138, 0.2); color: #1A6B8A; }
.tk-stat-closed { background: rgba(108, 117, 125, 0.15); color: #6c757d; }
.tk-stat-unassigned { background: rgba(255, 152, 0, 0.12); color: #f57c00; }
.tk-stat-total { background: rgba(92, 107, 192, 0.12); color: #5c6bc0; }
.tk-stat-new { background: rgba(255, 77, 79, 0.12); color: #ff4d4f; }
.tk-stat-progress { background: rgba(0, 201, 167, 0.12); color: #00c9a7; }
.tk-stat-hold { background: rgba(255, 193, 7, 0.12); color: #e6a800; }
.tk-stat-emergency { background: rgba(255, 77, 79, 0.12); color: #ff4d4f; }

.tk-stat-warn {
    border: 2px solid #f57c00;
}

.tk-text-warning {
    color: #f57c00 !important;
}

.tk-stat-value {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1f3c;
    line-height: 1.2;
}

/* Let the text column shrink so long bucket names can be clipped instead of
   overflowing the card (the icon stays fixed-width via flex-shrink: 0). */
.tk-stat-card > div:not(.tk-stat-icon) {
    min-width: 0;
}

.tk-stat-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #8a8fa8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ticket list card */
.tk-list-card {
    background: #fff;
    border-radius: 0.75rem 0.75rem 0.5rem 0.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

/* Toolbar */
.tk-toolbar {
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 1px solid #eef0f4;
}

.tk-toolbar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1f3c;
    margin: 0;
}

.tk-toolbar-sub {
    font-size: 0.8rem;
    color: #8a8fa8;
    display: block;
}

.tk-toolbar-right {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.tk-btn-primary {
    background-color: #00c9a7;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}

.tk-btn-primary:hover {
    background-color: #00b396;
    color: #fff;
}

.tk-btn-outline {
    background: #fff;
    color: #3949ab;
    border: 1px solid #5c6bc0;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tk-btn-outline:hover,
.tk-btn-outline:focus,
.tk-btn-outline:active {
    background: #fff;
    color: #3949ab;
    border-color: #5c6bc0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.tk-filter-toggle-btn {
    background: transparent;
    color: #5c6bc0;
    border: 1px solid #dde0e8;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tk-link {
    color: #00c9a7;
    text-decoration: none;
}

.tk-link:hover {
    color: #00b396;
    text-decoration: underline;
}

/* Wavy decorative line */
.tk-wavy-line {
    position: absolute;
    left: 0;
    top: 80px;
    bottom: 0;
    width: 6px;
    opacity: 0.4;
    pointer-events: none;
}

.tk-wavy-line svg {
    width: 100%;
    height: 100%;
}

/* Ticket rows */
.tk-list-body {
    padding-left: 8px;
}

.tk-row {
    position: relative;
    border-bottom: 1px solid #f0f1f5;
    transition: background-color 0.15s;
}

.tk-row:last-child {
    border-bottom: none;
}

.tk-row:hover {
    background-color: #f8f9fc;
}

.tk-row:nth-child(even) {
    background-color: #fcfcfd;
}

.tk-row:nth-child(even):hover {
    background-color: #f8f9fc;
}

.tk-row-emergency {
    border-left: 4px solid #ff4d4f;
    animation: tk-emergency-flash 1.5s ease-in-out infinite;
}

.tk-row-emergency .tk-row-inner {
    padding-left: calc(1.25rem - 4px);
}

@keyframes tk-emergency-flash {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(255, 77, 79, 0.14); }
}

.tk-row-inner {
    display: flex;
    align-items: center;
    padding: 0.9rem 1.25rem;
    gap: 1rem;
}

.tk-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5c6bc0, #00c9a7);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: 0.04em;
    overflow: hidden;
}

.tk-avatar img,
.nav-profile-avatar img,
.nav-profile-avatar-lg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.tk-row-content {
    flex: 1;
    min-width: 0;
}

.tk-row-top {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.tk-row-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1f3c;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tk-row-title:hover {
    color: #00c9a7;
}

.tk-priority-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tk-dot-urgent { background-color: #ff4d4f; }
.tk-dot-normal { background-color: #c8ccd8; }

.tk-ticket-id {
    font-size: 0.75rem;
    color: #8a8fa8;
    flex-shrink: 0;
}

.tk-row-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tk-meta-text {
    font-size: 0.75rem;
    color: #8a8fa8;
}

/* Live "In Progress" timer on dashboard rows: bold, black in light / white in dark */
.tk-progress-timer {
    font-weight: 700;
    color: #000;
}

[data-bs-theme="dark"] .tk-progress-timer {
    color: #fff;
}

.tk-meta-divider {
    color: #c8ccd8;
    font-size: 0.75rem;
}

.tk-unassigned {
    font-style: italic;
}

.tk-row-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.tk-row-date {
    font-size: 0.75rem;
    color: #8a8fa8;
    white-space: nowrap;
}

.tk-emergency-timer {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
    border: 1px solid rgba(255, 77, 79, 0.3);
    border-radius: 1rem;
    padding: 0.2rem 0.6rem;
    white-space: nowrap;
    animation: emergency-pulse 2s ease-in-out infinite;
}

@keyframes emergency-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.tk-row-dates {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.1rem;
}

.tk-resolved-notes-preview {
    font-size: 0.78rem;
    color: #6b7194;
    margin-top: 0.35rem;
    line-height: 1.4;
    font-style: italic;
}

.tk-resolved-notes-label {
    font-weight: 600;
    font-style: normal;
    color: #8a8fa8;
}

[data-bs-theme="dark"] .tk-resolved-notes-preview {
    color: #5a6080;
}

.tk-btn-view {
    background: rgba(92, 107, 192, 0.1);
    color: #5c6bc0;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
}

.tk-btn-view:hover {
    background: rgba(92, 107, 192, 0.2);
    color: #5c6bc0;
}

.tk-btn-edit {
    background: rgba(0, 201, 167, 0.1);
    color: #00c9a7;
    border: none;
    border-radius: 0.4rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
}

.tk-btn-edit:hover {
    background: rgba(0, 201, 167, 0.2);
    color: #00c9a7;
}

/* Checkbox & bulk resolve */
.tk-row-checkbox {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.tk-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    border-color: #c8ccd8;
}

.tk-checkbox:checked {
    background-color: #00c9a7;
    border-color: #00c9a7;
}

.tk-select-bar {
    padding: 0.5rem 1.25rem;
    border-bottom: 1px solid #eef0f4;
    background: #f8f9fc;
}

.tk-select-all-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #8a8fa8;
    cursor: pointer;
    margin: 0;
}

.tk-row-selected {
    background-color: rgba(92, 107, 192, 0.06) !important;
    border-left: 3px solid #5c6bc0;
}

.tk-row-selected .tk-row-inner {
    padding-left: calc(1.25rem - 3px);
}

.tk-row-resolved {
    background-color: rgba(0, 201, 167, 0.18) !important;
    border-left: 3px solid #00c9a7;
}

.tk-row-resolved .tk-row-inner {
    padding-left: calc(1.25rem - 3px);
}

.tk-btn-resolve-selected {
    background-color: #00c9a7;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}

.tk-btn-resolve-selected:hover {
    background-color: #00b396;
    color: #fff;
}

.tk-btn-close-selected {
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.45rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: background-color 0.2s;
}

.tk-btn-close-selected:hover {
    background-color: #565e64;
    color: #fff;
}

.tk-btn-close-confirm {
    background-color: #6c757d;
    color: #fff;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tk-btn-close-confirm:hover {
    background-color: #565e64;
    color: #fff;
}

/* Modal styling */
.tk-modal {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.tk-modal-header {
    background: #1a1f3c;
    color: #fff;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.tk-modal-header .btn-close {
    filter: invert(1);
}

.tk-modal-body {
    padding: 1.5rem;
}

.tk-modal-sub {
    font-size: 0.85rem;
    color: #8a8fa8;
    margin-bottom: 1.25rem;
}

.tk-modal-footer {
    border-top: 1px solid #eef0f4;
    padding: 1rem 1.5rem;
}

[data-bs-theme="dark"] .tk-modal {
    background: #22252e;
}

[data-bs-theme="dark"] .tk-modal-header {
    background: #12152b;
}

[data-bs-theme="dark"] .tk-modal-body {
    background: #22252e;
}

[data-bs-theme="dark"] .tk-modal-footer {
    background: #22252e;
    border-top-color: #2e3140;
}

[data-bs-theme="dark"] .tk-select-bar {
    background: #282b36;
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .tk-row-selected {
    background-color: rgba(92, 107, 192, 0.1) !important;
}

[data-bs-theme="dark"] .tk-row-resolved {
    background-color: rgba(0, 201, 167, 0.12) !important;
}

[data-bs-theme="dark"] .tk-checkbox {
    border-color: #3a3f55;
}

/* Empty state */
.tk-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #8a8fa8;
}

.tk-empty-icon {
    color: #c8ccd8;
    margin-bottom: 1rem;
}

.tk-empty h5 {
    color: #1a1f3c;
    margin-bottom: 0.5rem;
}

.tk-empty p {
    color: #8a8fa8;
    margin: 0;
}

.tk-empty-filters {
    display: inline-block;
    margin: 0.75rem 0 1rem;
    padding: 0;
    text-align: left;
    list-style: none;
}

.tk-empty-filters li {
    font-size: 0.9rem;
    color: #5a5f7a;
    padding: 0.15rem 0;
}

.tk-empty-filter-key {
    font-weight: 600;
    color: #1a1f3c;
}

[data-bs-theme="dark"] .tk-empty-filters li {
    color: #b0b3c0;
}

[data-bs-theme="dark"] .tk-empty-filter-key {
    color: #e0e2e8;
}

/* Pagination */
.tk-pagination {
    padding: 0.75rem 1.5rem;
    border-top: 1px solid #eef0f4;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.tk-pagination-text {
    font-size: 0.8rem;
    color: #8a8fa8;
}

/* Right filter panel */
.tk-filters {
    width: 260px;
    background: #fff;
    border-left: 1px solid #eef0f4;
    padding: 1.5rem;
    flex-shrink: 0;
    overflow-y: auto;
}

.tk-filters-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.tk-filters-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1f3c;
    margin: 0;
}

.tk-filter-group {
    margin-bottom: 1rem;
}

.tk-filter-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1a1f3c;
    margin-bottom: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.tk-filter-input {
    border-radius: 0.4rem;
    border-color: #dde0e8;
    font-size: 0.85rem;
}

.tk-filter-input:focus {
    border-color: #00c9a7;
    box-shadow: 0 0 0 2px rgba(0, 201, 167, 0.15);
}

/* Responsive: hide filter panel below xl */
@media (max-width: 1199.98px) {
    .tk-filters {
        position: fixed;
        right: -280px;
        top: 0;
        bottom: 0;
        z-index: 1060;
        width: 280px;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        padding-top: 2rem;
    }

    .tk-filters.tk-filters-open {
        right: 0;
    }
}

/* Responsive: below md, stack stat cards */
@media (max-width: 767.98px) {
    .tk-header {
        padding: 1rem;
    }

    .tk-search-input {
        width: 200px;
    }

    .tk-main {
        padding: 1rem;
    }

    .tk-stats {
        grid-template-columns: 1fr;
    }

    .tk-stat-card {
        min-width: 100%;
    }

    .tk-row-inner {
        flex-wrap: wrap;
    }

    .tk-row-actions {
        width: 100%;
        justify-content: flex-end;
        margin-top: 0.5rem;
    }

    .tk-toolbar {
        padding: 1rem;
    }

    .tk-toolbar-right {
        flex-wrap: wrap;
    }
}

/* ===== Dashboard dark mode ===== */
[data-bs-theme="dark"] .tk-header {
    background-color: #12152b;
}

[data-bs-theme="dark"] .tk-body {
    background-color: #1a1d23;
}

[data-bs-theme="dark"] .tk-stat-card {
    background: #22252e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .tk-stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .tk-stat-active.tk-bucket-unassigned { background: #e67300 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-total { background: #4a5ab5 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-new { background: #e04345 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-inprogress { background: #00b394 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-onhold { background: #cc9600 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-emergency { background: #e04345 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-all { background: #155a74 !important; }
[data-bs-theme="dark"] .tk-stat-active.tk-bucket-closed { background: #565e64 !important; }

[data-bs-theme="dark"] .tk-stat-value {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-list-card {
    background: #22252e;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .tk-toolbar {
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .tk-toolbar-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-toolbar-sub {
    color: #6b7194;
}

[data-bs-theme="dark"] .tk-btn-outline {
    background: transparent;
    color: #8a90c0;
    border-color: #3a3f55;
    box-shadow: none;
}

[data-bs-theme="dark"] .tk-btn-outline:hover,
[data-bs-theme="dark"] .tk-btn-outline:focus,
[data-bs-theme="dark"] .tk-btn-outline:active {
    background: transparent;
    color: #8a90c0;
    border-color: #3a3f55;
    box-shadow: none;
}

[data-bs-theme="dark"] .tk-filter-toggle-btn {
    color: #8a90c0;
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .tk-row {
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .tk-row:hover {
    background-color: #282b36;
}

[data-bs-theme="dark"] .tk-row:nth-child(even) {
    background-color: #252830;
}

[data-bs-theme="dark"] .tk-row:nth-child(even):hover {
    background-color: #282b36;
}

[data-bs-theme="dark"] .tk-row-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-row-title:hover {
    color: #00c9a7;
}

[data-bs-theme="dark"] .tk-avatar {
    background: linear-gradient(135deg, #4a5498, #00a88a);
}

[data-bs-theme="dark"] .tk-btn-view {
    background: rgba(92, 107, 192, 0.15);
    color: #8a90c0;
}

[data-bs-theme="dark"] .tk-btn-view:hover {
    background: rgba(92, 107, 192, 0.25);
}

[data-bs-theme="dark"] .tk-btn-edit {
    background: rgba(0, 201, 167, 0.15);
    color: #00c9a7;
}

[data-bs-theme="dark"] .tk-btn-edit:hover {
    background: rgba(0, 201, 167, 0.25);
}

[data-bs-theme="dark"] .tk-search-input {
    background-color: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .tk-search-input:focus {
    background-color: rgba(255, 255, 255, 0.08);
}

[data-bs-theme="dark"] .tk-wavy-line svg path {
    stroke: #3a3f55;
}

[data-bs-theme="dark"] .tk-pagination {
    border-top-color: #2e3140;
}

[data-bs-theme="dark"] .tk-empty h5 {
    color: #e0e2e8;
}

/* Filter panel dark mode */
[data-bs-theme="dark"] .tk-filters {
    background: #22252e;
    border-left-color: #2e3140;
}

[data-bs-theme="dark"] .tk-filters-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-filter-label {
    color: #c0c4d8;
}

[data-bs-theme="dark"] .tk-filter-input {
    background-color: #2b2f3a;
    border-color: #3a3f55;
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-filter-input:focus {
    background-color: #1a1d23;
    border-color: #00c9a7;
}

@keyframes tk-emergency-flash-dark {
    0%, 100% { background-color: transparent; }
    50% { background-color: rgba(255, 77, 79, 0.18); }
}

[data-bs-theme="dark"] .tk-row-emergency {
    animation-name: tk-emergency-flash-dark;
}

/* ===== Detail Page ===== */
.tk-detail-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.5rem;
}

.tk-detail-main .tk-detail-card,
.tk-detail-sidebar .tk-detail-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tk-detail-sidebar .tk-detail-card {
    margin-bottom: 1rem;
}

.tk-detail-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1a1f3c;
    margin-bottom: 1rem;
}

.tk-detail-description {
    font-size: 0.95rem;
    color: #3a3f55;
    line-height: 1.7;
    white-space: pre-wrap;
}

.tk-detail-section-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8a8fa8;
    margin-bottom: 0.75rem;
}

.tk-detail-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tk-avatar-sm {
    width: 32px;
    height: 32px;
    font-size: 0.6rem;
}

.tk-detail-user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1a1f3c;
}

.tk-detail-user-date {
    font-size: 0.75rem;
    color: #8a8fa8;
}

.tk-detail-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f1f5;
}

.tk-detail-info-row:last-child {
    border-bottom: none;
}

.tk-detail-info-label {
    font-size: 0.8rem;
    color: #8a8fa8;
    font-weight: 500;
}

.tk-detail-info-value {
    font-size: 0.8rem;
    color: #1a1f3c;
    font-weight: 600;
}

.tk-linked-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem 0;
}

.tk-linked-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f1f5;
}

.tk-linked-item:last-child {
    border-bottom: none;
}

.tk-linked-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.tk-linked-label {
    font-size: 0.72rem;
    color: #8a8fa8;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tk-linked-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1f3c;
    text-decoration: none;
}

.tk-linked-link:hover {
    text-decoration: underline;
}

.tk-linked-title {
    font-size: 0.78rem;
    color: #5a6078;
    margin-top: 0.15rem;
    margin-left: 0.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tk-linked-remove-form {
    margin: 0;
    margin-left: auto;
}

.tk-linked-remove {
    background: transparent;
    border: none;
    color: #8a8fa8;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0 0.25rem;
    cursor: pointer;
}

.tk-linked-remove:hover {
    color: #d9534f;
}

.tk-linked-add-form {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #f0f1f5;
}

.tk-linked-add-row {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
}

.tk-linked-add-id {
    flex: 0 0 80px;
}

.tk-linked-add-type {
    flex: 1 1 110px;
    min-width: 110px;
}

[data-bs-theme="dark"] .tk-linked-item {
    border-bottom-color: #2a2f4a;
}

[data-bs-theme="dark"] .tk-linked-link {
    color: #e5e7f0;
}

[data-bs-theme="dark"] .tk-linked-title {
    color: #a0a5b8;
}

[data-bs-theme="dark"] .tk-linked-add-form {
    border-top-color: #2a2f4a;
}

.tk-btn-outline-light {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.4rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
}

.tk-btn-outline-light:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
}

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

/* Detail dark mode */
[data-bs-theme="dark"] .tk-detail-main .tk-detail-card,
[data-bs-theme="dark"] .tk-detail-sidebar .tk-detail-card {
    background: #22252e;
}

[data-bs-theme="dark"] .tk-detail-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-detail-description {
    color: #b0b4c8;
}

[data-bs-theme="dark"] .tk-detail-user-name {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-detail-info-row {
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .tk-detail-info-value {
    color: #e0e2e8;
}

/* ===== Form Pages (Create / Edit) ===== */
.tk-form-container {
    max-width: 900px;
    margin: 0 auto;
}

.tk-form-card {
    background: #fff;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.tk-form-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.25rem;
    color: #00c9a7;
}

.tk-form-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1f3c;
    margin: 0;
}

.tk-form-subtitle {
    font-size: 0.85rem;
    color: #8a8fa8;
    margin-bottom: 1.75rem;
}

.tk-form-group {
    margin-bottom: 1.25rem;
}

.tk-form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1f3c;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.tk-form-input {
    background-color: #f4f5f7 !important;
    border: 1px solid #dde0e8;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    color: #1a1f3c;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tk-form-input:focus {
    background-color: #fff !important;
    border-color: #00c9a7;
    box-shadow: 0 0 0 3px rgba(0, 201, 167, 0.12);
}

.tk-form-input::placeholder {
    color: #8a8fa8;
}

.tk-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.tk-form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid #eef0f4;
}

/* Form dark mode */
[data-bs-theme="dark"] .tk-form-card {
    background: #22252e;
}

[data-bs-theme="dark"] .tk-form-title {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-form-label {
    color: #c0c4d8;
}

[data-bs-theme="dark"] .tk-form-input {
    background-color: #2b2f3a !important;
    border-color: #3a3f55;
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-form-input:focus {
    background-color: #1a1d23 !important;
    border-color: #00c9a7;
}

[data-bs-theme="dark"] .tk-form-input::placeholder {
    color: #6b7194;
}

/* ===== Searchable select (ticket create/edit dropdowns) ===== */
.tk-ss {
    position: relative;
}

/* Native <select> stays in the DOM (so it still submits) but is hidden. */
.tk-ss-native {
    display: none !important;
}

.tk-ss-button {
    width: 100%;
    text-align: left;
    cursor: pointer;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.tk-ss-button.tk-ss-placeholder {
    color: #8a8fa8;
}

.tk-ss-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1080;
    display: flex;
    flex-direction: column;
    max-height: 280px;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #dde0e8;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(16, 24, 40, 0.12);
}

.tk-ss-search {
    width: 100%;
    margin-bottom: 0.4rem;
    padding: 0.4rem 0.6rem;
    font-size: 0.9rem;
    color: #1a1f3c;
    background: #fff;
    border: 1px solid #dde0e8;
    border-radius: 0.4rem;
    outline: none;
}

.tk-ss-search:focus {
    border-color: #00c9a7;
    box-shadow: 0 0 0 3px rgba(0, 201, 167, 0.12);
}

.tk-ss-list {
    margin: 0;
    padding: 0;
    overflow-y: auto;
    list-style: none;
}

.tk-ss-option {
    padding: 0.45rem 0.6rem;
    font-size: 0.9rem;
    color: #1a1f3c;
    border-radius: 0.4rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tk-ss-option.tk-ss-active {
    background-color: #eafaf6;
}

.tk-ss-option.tk-ss-selected {
    font-weight: 600;
}

.tk-ss-option.tk-ss-disabled {
    color: #b0b3c0;
    cursor: default;
}

.tk-ss-empty {
    padding: 0.5rem 0.6rem;
    font-size: 0.85rem;
    color: #8a8fa8;
    list-style: none;
}

/* Searchable select dark mode */
[data-bs-theme="dark"] .tk-ss-button.tk-ss-placeholder {
    color: #6b7194;
}

[data-bs-theme="dark"] .tk-ss-panel {
    background: #22252e;
    border-color: #3a3f55;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

[data-bs-theme="dark"] .tk-ss-search {
    color: #e0e2e8;
    background: #2b2f3a;
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .tk-ss-search:focus {
    border-color: #00c9a7;
}

[data-bs-theme="dark"] .tk-ss-option {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-ss-option.tk-ss-active {
    background-color: #2e3a3a;
}

[data-bs-theme="dark"] .tk-ss-option.tk-ss-disabled {
    color: #6b7194;
}

[data-bs-theme="dark"] .tk-ss-empty {
    color: #6b7194;
}

[data-bs-theme="dark"] .tk-form-actions {
    border-top-color: #2e3140;
}

@media (max-width: 575.98px) {
    .tk-form-row {
        grid-template-columns: 1fr;
    }

    .tk-form-card {
        padding: 1.25rem;
    }
}

/* ═══════════════════════════════════════════════════════
   Statistics Page Styles
   ═══════════════════════════════════════════════════════ */

/* Date range picker */
.st-range-picker {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    padding: 0.25rem;
}

.st-range-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.35rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.st-range-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.st-range-btn.active {
    background: #00c9a7;
    color: #fff;
    font-weight: 600;
}

/* Trend indicator */
.st-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 0.15rem;
}

.st-trend-up { color: #ff4d4f; }
.st-trend-down { color: #00c9a7; }

/* Two-column grid for charts and tables */
.st-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 991.98px) {
    .st-grid-2 {
        grid-template-columns: 1fr;
    }
}

/* Donut center label */
.st-donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -60%);
    text-align: center;
    pointer-events: none;
}

.st-donut-total {
    font-size: 2rem;
    font-weight: 700;
    color: #1a1f3c;
    line-height: 1;
}

.st-donut-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #8a8fa8;
}

/* Tables inside stat cards */
.st-table-wrap {
    overflow-x: auto;
}

.st-table {
    font-size: 0.85rem;
}

.st-table thead th {
    background: #f8f9fb;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.65rem 1rem;
    border-bottom: 2px solid #eef0f4;
    white-space: nowrap;
}

.st-table tbody td {
    padding: 0.65rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f0f1f5;
    color: #374151;
}

.st-table tbody tr:last-child td {
    border-bottom: none;
}

/* SLA breach row highlight */
.st-breach-row {
    background: rgba(255, 77, 79, 0.04) !important;
}

.st-breach-row:hover {
    background: rgba(255, 77, 79, 0.08) !important;
}

.st-breach-time {
    color: #ff4d4f;
    font-weight: 600;
    font-size: 0.8rem;
}

/* Category color dots */
.st-cat-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.st-cat-hardware { background: #5c6bc0; }
.st-cat-software { background: #00c9a7; }
.st-cat-network { background: #1A6B8A; }
.st-cat-access { background: #f57c00; }
.st-cat-other { background: #8a8fa8; }

/* ── Dark mode overrides for Statistics ── */
[data-bs-theme="dark"] .st-range-picker {
    background: rgba(0, 0, 0, 0.2);
}

[data-bs-theme="dark"] .st-donut-total {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .st-donut-label {
    color: #6b7280;
}

[data-bs-theme="dark"] .st-table thead th {
    background: #1a1d23;
    color: #8a8fa8;
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .st-table tbody td {
    color: #b0b3c0;
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .st-breach-row {
    background: rgba(255, 77, 79, 0.06) !important;
}

[data-bs-theme="dark"] .st-breach-row:hover {
    background: rgba(255, 77, 79, 0.1) !important;
}

@media (max-width: 575.98px) {
    .st-range-picker {
        flex-wrap: wrap;
    }
    .st-range-btn {
        font-size: 0.7rem;
        padding: 0.3rem 0.5rem;
    }
}

/* ===== Comments / Discussion ===== */
.tk-comment-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    height: 1.4em;
    background: #1A6B8A;
    color: #fff;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    margin-left: 0.5rem;
    padding: 0 0.4em;
    vertical-align: middle;
}

.tk-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tk-comment {
    padding: 1rem;
    background: #f8f9fb;
    border-radius: 0.5rem;
    border: 1px solid #eef0f4;
}

.tk-comment-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.tk-comment-meta {
    display: flex;
    flex-direction: column;
}

.tk-comment-author {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1B3A4B;
}

.tk-comment-date {
    font-size: 0.72rem;
    color: #8a8fa8;
}

.tk-comment-body {
    font-size: 0.9rem;
    color: #3a3f55;
    line-height: 1.6;
    white-space: pre-wrap;
    padding-left: 2.55rem;
}

.tk-comment-form {
    padding-top: 1rem;
    border-top: 1px solid #eef0f4;
}

/* Comments dark mode */
[data-bs-theme="dark"] .tk-comment {
    background: #2b2f3a;
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .tk-comment-author {
    color: #e0e2e8;
}

[data-bs-theme="dark"] .tk-comment-body {
    color: #b0b4c8;
}

[data-bs-theme="dark"] .tk-comment-form {
    border-top-color: #2e3140;
}

/* ===== Attachments / Screenshots ===== */
.tk-screenshot-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tk-screenshot-thumb {
    width: 120px;
    height: 90px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.tk-attachments-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tk-attachment-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    max-width: 180px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.tk-attachment-item img {
    width: 180px;
    height: 135px;
    object-fit: cover;
    border-radius: 0.5rem;
    border: 1px solid #dee2e6;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.tk-attachment-item:hover img {
    border-color: #1A6B8A;
    box-shadow: 0 2px 8px rgba(26, 107, 138, 0.15);
}

.tk-attachment-name {
    font-size: 0.75rem;
    color: #6c757d;
    margin-top: 0.35rem;
    text-align: center;
    word-break: break-all;
    max-width: 180px;
}

[data-bs-theme="dark"] .tk-screenshot-thumb {
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .tk-attachment-item img {
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .tk-attachment-item:hover img {
    border-color: #5CC8C8;
    box-shadow: 0 2px 8px rgba(92, 200, 200, 0.15);
}

[data-bs-theme="dark"] .tk-attachment-name {
    color: #8a8ea0;
}

/* ===== Lightbox ===== */
.tk-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tk-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.tk-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tk-lightbox-content img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 0.5rem;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.tk-lightbox-close {
    position: absolute;
    top: -2.5rem;
    right: -0.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.25rem;
    line-height: 1;
}

.tk-lightbox-close:hover {
    opacity: 1;
}

.tk-lightbox-caption {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    margin-top: 0.75rem;
    text-align: center;
}

/* ===== Activity Log ===== */
.tk-activity-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.tk-activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f0f1f5;
}

.tk-activity-item:last-child {
    border-bottom: none;
}

.tk-activity-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f0f1f5;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.tk-activity-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tk-activity-text {
    font-size: 0.85rem;
    color: #3a3f55;
    line-height: 1.4;
}

.tk-activity-text strong {
    font-weight: 600;
    color: #1B3A4B;
}

.tk-activity-date {
    font-size: 0.72rem;
    color: #8a8fa8;
    margin-top: 0.1rem;
}

[data-bs-theme="dark"] .tk-activity-item {
    border-bottom-color: #2e3140;
}

[data-bs-theme="dark"] .tk-activity-icon {
    background: #2b2f3a;
    color: #8a8ea0;
}

[data-bs-theme="dark"] .tk-activity-text {
    color: #b0b4c8;
}

[data-bs-theme="dark"] .tk-activity-text strong {
    color: #e0e2e8;
}

/* ===== Review Stars ===== */
.review-stars-container {
    padding: 0.5rem 0;
}

.review-stars {
    display: inline-flex;
    gap: 0.25rem;
}

.review-star {
    background: none;
    border: none;
    padding: 0.15rem;
    cursor: pointer;
    color: #d1d5db;
    transition: color 0.15s, transform 0.15s;
}

.review-star:hover {
    transform: scale(1.15);
}

.review-star-active {
    color: #f59e0b;
}

.review-star-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #f59e0b;
    margin-top: 0.35rem;
    min-height: 1.2em;
}

/* Stars display (read-only, used on resolved/details pages) */
.review-stars-display {
    display: inline-flex;
    gap: 0.1rem;
    color: #f59e0b;
    vertical-align: middle;
}

.review-stars-display svg {
    width: 14px;
    height: 14px;
}

.review-rating-text {
    font-size: 0.8rem;
    color: #6c757d;
    margin-left: 0.35rem;
}

[data-bs-theme="dark"] .review-star {
    color: #4a4e5e;
}

[data-bs-theme="dark"] .review-star-active {
    color: #f59e0b;
}

[data-bs-theme="dark"] .review-rating-text {
    color: #8a8ea0;
}

/* Review inline on resolved rows */
.tk-review-inline {
    display: flex;
    align-items: center;
    margin-top: 0.35rem;
}

/* Statistics page — review section */
.st-avg-rating {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1B3A4B;
    line-height: 1;
}

[data-bs-theme="dark"] .st-avg-rating {
    color: #e0e2e8;
}

.st-rating-dist {
    max-width: 400px;
}

.st-rating-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.st-rating-label {
    font-size: 0.78rem;
    color: #6c757d;
    width: 3.5rem;
    text-align: right;
    flex-shrink: 0;
}

.st-rating-bar-track {
    flex: 1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.st-rating-bar-fill {
    height: 100%;
    background: #f59e0b;
    border-radius: 4px;
    transition: width 0.3s;
}

.st-rating-count {
    font-size: 0.78rem;
    color: #6c757d;
    width: 1.5rem;
    text-align: left;
    flex-shrink: 0;
}

[data-bs-theme="dark"] .st-rating-label,
[data-bs-theme="dark"] .st-rating-count {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .st-rating-bar-track {
    background: #2e3140;
}

.st-reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.st-review-item {
    padding: 0.75rem 1rem;
    background: #f8f9fb;
    border-radius: 0.5rem;
    border: 1px solid #eef0f4;
}

.st-review-meta {
    font-size: 0.8rem;
    color: #6c757d;
}

.st-review-text {
    font-size: 0.88rem;
    color: #3a3f55;
    margin-top: 0.25rem;
    white-space: pre-wrap;
}

[data-bs-theme="dark"] .st-review-item {
    background: #2b2f3a;
    border-color: #3a3f55;
}

[data-bs-theme="dark"] .st-review-meta {
    color: #8a8ea0;
}

[data-bs-theme="dark"] .st-review-text {
    color: #b0b4c8;
}
