/* Tdesk Solutions — design system e UX */
:root {
    --ts-primary: #0f4c56;
    --ts-primary-hover: #0a3840;
    --ts-accent: #16808a;
    --ts-bg: #eef2f1;
    --ts-bg-gradient-top: #e2eceb;
    --ts-auth-bg: #0b1f22;
    --ts-surface: #ffffff;
    --ts-surface-muted: rgba(238, 242, 241, 0.72);
    --ts-surface-subtle: #f4f7f6;
    --ts-surface-table-head: rgba(238, 242, 241, 0.92);
    --ts-filter-border: #d5e0de;
    --ts-filter-label: #475569;
    --ts-border: rgba(15, 43, 47, 0.1);
    --ts-text: #122226;
    --ts-muted: #5b6f74;
    --ts-overlay: rgba(11, 31, 34, 0.45);
    --ts-footer-bg: rgba(255, 255, 255, 0.65);
    --ts-input-focus-border: #2a8a8f;
    --ts-input-focus-ring: rgba(15, 76, 86, 0.2);
    --ts-font-display: "Syne", "Segoe UI", sans-serif;
    --ts-font-body: "Figtree", "Segoe UI", sans-serif;
    --ts-auth-ink: #0b1f22;
    --ts-auth-ink-mid: #123038;
    --ts-auth-copper: #c45c26;
    --ts-auth-copper-hover: #a84c1f;
    --ts-auth-mist: #d7e4e2;
    --ts-auth-paper: #f3f6f5;
    --ts-chatbot-body-bg: #f1f5f9;
    --ts-chatbot-chip-bg: #ffffff;
    --ts-chatbot-chip-border: #cbd5e1;
    --ts-chatbot-chip-hover-bg: #eff6ff;
    --ts-alert-success-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    --ts-alert-success-text: #065f46;
    --ts-alert-danger-bg: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    --ts-alert-danger-text: #991b1b;
    --ts-radius: 0.625rem;
    --ts-radius-sm: 0.375rem;
    --ts-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --ts-shadow-md: 0 4px 14px rgba(15, 23, 42, 0.08);
    --ts-nav-height: 60px;
    --ts-space-1: 0.25rem;
    --ts-space-2: 0.5rem;
    --ts-space-3: 0.75rem;
    --ts-space-4: 1rem;
    --ts-space-5: 1.25rem;
    --ts-space-6: 1.5rem;
    --ts-font-size-sm: 0.875rem;
    --ts-font-size-md: 1rem;
    --ts-font-size-lg: 1.125rem;
    --ts-transition-fast: 140ms ease;
    /* Identidade executiva (Dashboard + Métricas) */
    --ts-exec-navy: #1a122e;
    --ts-exec-navy-soft: #2a2142;
    --ts-exec-mint: #65f3cb;
    --ts-exec-mint-dim: rgba(101, 243, 203, 0.16);
    --ts-exec-teal: #0d9488;
    --ts-exec-panel-border: rgba(26, 18, 46, 0.08);
    --ts-exec-radius: 0.5rem;
    --ts-exec-display-font: Georgia, "Times New Roman", serif;
    --bs-body-font-family: var(--ts-font-body);
    --bs-body-bg: var(--ts-bg);
    --bs-body-color: var(--ts-text);
    --bs-secondary-color: var(--ts-muted);
    --bs-border-color: var(--ts-border);
    --bs-tertiary-bg: var(--ts-surface-subtle);
    --bs-primary: var(--ts-accent);
    --bs-primary-rgb: 37, 99, 235;
    color-scheme: light;
}

[data-bs-theme="dark"] {
    --ts-bg: #0b1f22;
    --ts-bg-gradient-top: #123038;
    --ts-auth-bg: #0b1f22;
    --ts-surface: #143038;
    --ts-surface-muted: rgba(20, 48, 56, 0.92);
    --ts-surface-subtle: #1b3c44;
    --ts-surface-table-head: rgba(27, 60, 68, 0.95);
    --ts-filter-border: rgba(167, 196, 194, 0.22);
    --ts-filter-label: #c5d5d3;
    --ts-border: rgba(167, 196, 194, 0.18);
    --ts-text: #eef5f4;
    --ts-muted: #9bb0ae;
    --ts-overlay: rgba(2, 12, 14, 0.62);
    --ts-footer-bg: rgba(11, 31, 34, 0.9);
    --ts-input-focus-border: #4db6b8;
    --ts-input-focus-ring: rgba(77, 182, 184, 0.24);
    --ts-auth-paper: #143038;
    --ts-chatbot-body-bg: #1e293b;
    --ts-chatbot-chip-bg: #334155;
    --ts-chatbot-chip-border: rgba(148, 163, 184, 0.35);
    --ts-chatbot-chip-hover-bg: rgba(37, 99, 235, 0.18);
    --ts-alert-success-bg: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(16, 185, 129, 0.22) 100%);
    --ts-alert-success-text: #a7f3d0;
    --ts-alert-danger-bg: linear-gradient(135deg, rgba(127, 29, 29, 0.45) 0%, rgba(239, 68, 68, 0.22) 100%);
    --ts-alert-danger-text: #fecaca;
    --ts-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    --ts-shadow-md: 0 4px 14px rgba(0, 0, 0, 0.45);
    --bs-body-bg: var(--ts-bg);
    --bs-body-color: var(--ts-text);
    --bs-secondary-color: var(--ts-muted);
    --bs-border-color: var(--ts-border);
    --bs-tertiary-bg: var(--ts-surface-subtle);
    color-scheme: dark;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    padding-top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ts-text);
    background-color: var(--ts-bg);
    -webkit-font-smoothing: antialiased;
    font-size: var(--ts-font-size-md);
    line-height: 1.45;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--ts-text);
    letter-spacing: -0.01em;
}

body.ts-app {
    background-image: linear-gradient(180deg, var(--ts-bg-gradient-top) 0%, var(--ts-bg) 120px);
    background-attachment: fixed;
}

body.page-login,
body.page-auth {
    padding-top: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: var(--ts-auth-ink);
    font-family: var(--ts-font-body);
    color: var(--ts-text);
}

body.page-login .footer-ts,
body.page-auth .footer-ts {
    display: none;
}

/* ——— Identidade auth Tdesk ——— */
.ts-auth {
    flex: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    min-height: 100vh;
    width: 100%;
}

.ts-auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(1.25rem, 3vw, 2.5rem);
    color: #eef5f4;
    background:
        radial-gradient(ellipse 70% 55% at 18% 20%, rgba(42, 138, 143, 0.35), transparent 58%),
        radial-gradient(ellipse 55% 45% at 88% 78%, rgba(196, 92, 38, 0.28), transparent 55%),
        linear-gradient(155deg, #0b1f22 0%, #123038 48%, #0a181b 100%);
}

.ts-auth-brand__atmosphere {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ts-auth-brand__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(238, 245, 244, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(238, 245, 244, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(120deg, rgba(0, 0, 0, 0.85), transparent 75%);
    animation: ts-auth-grid-drift 28s linear infinite;
}

.ts-auth-brand__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
}

.ts-auth-brand__orb--a {
    width: min(48vw, 420px);
    height: min(48vw, 420px);
    top: -12%;
    left: -8%;
    background: radial-gradient(circle, rgba(45, 160, 155, 0.35) 0%, transparent 70%);
    animation: ts-auth-orb-a 12s ease-in-out infinite alternate;
}

.ts-auth-brand__orb--b {
    width: min(40vw, 340px);
    height: min(40vw, 340px);
    right: -6%;
    bottom: 8%;
    background: radial-gradient(circle, rgba(196, 92, 38, 0.3) 0%, transparent 70%);
    animation: ts-auth-orb-b 14s ease-in-out infinite alternate;
}

.ts-auth-brand__hex {
    position: absolute;
    width: min(52vw, 460px);
    height: min(52vw, 460px);
    right: -8%;
    top: 18%;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 120'%3E%3Cpath fill='none' stroke='%23eef5f4' stroke-opacity='0.12' stroke-width='1.5' d='M60 8 L104 34 V86 L60 112 L16 86 V34 Z'/%3E%3Cpath fill='none' stroke='%23c45c26' stroke-opacity='0.35' stroke-width='1.2' d='M60 28 L88 44 V76 L60 92 L32 76 V44 Z'/%3E%3C/svg%3E")
        center / contain no-repeat;
    opacity: 0.9;
    animation: ts-auth-hex-pulse 9s ease-in-out infinite;
}

.ts-auth-brand__top,
.ts-auth-brand__hero,
.ts-auth-brand__foot {
    position: relative;
    z-index: 1;
}

.ts-auth-brand__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ts-auth-brand__mark {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.ts-auth-brand__logo {
    width: 3.25rem;
    height: 3.25rem;
    object-fit: contain;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.35));
}

.ts-auth-brand__wordmark {
    font-family: var(--ts-font-display);
    font-weight: 800;
    font-size: clamp(1.55rem, 2.6vw, 2rem);
    letter-spacing: -0.04em;
    line-height: 1;
}

.ts-auth-brand__hero {
    max-width: 28rem;
    margin: clamp(2rem, 8vh, 5rem) 0;
    animation: ts-auth-rise 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ts-auth-brand__kicker {
    margin: 0 0 0.65rem;
    font-family: var(--ts-font-display);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--ts-auth-copper);
}

.ts-auth-brand__title {
    margin: 0 0 0.85rem;
    font-family: var(--ts-font-display);
    font-weight: 800;
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    line-height: 0.98;
    letter-spacing: -0.045em;
    color: #f4faf9;
}

.ts-auth-brand__lead {
    margin: 0;
    font-size: clamp(1rem, 1.6vw, 1.15rem);
    line-height: 1.45;
    color: rgba(238, 245, 244, 0.78);
    max-width: 24rem;
}

.ts-auth-brand__tenant {
    display: inline-block;
    margin: 1.1rem 0 0;
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(238, 245, 244, 0.18);
    border-radius: 0.35rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
    color: var(--ts-auth-mist);
}

.ts-auth-brand__foot {
    margin: 0;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(238, 245, 244, 0.45);
}

.ts-auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 4vw, 3.5rem);
    background:
        linear-gradient(180deg, rgba(243, 246, 245, 0.97) 0%, #e8efed 100%);
    color: var(--ts-text);
    animation: ts-auth-panel-in 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

[data-bs-theme="dark"] .ts-auth-panel {
    background: linear-gradient(180deg, #143038 0%, #0f282e 100%);
    color: var(--ts-text);
}

.ts-auth-panel__inner {
    width: 100%;
    max-width: 24.5rem;
}

.ts-auth-panel__header {
    margin-bottom: 1.5rem;
}

.ts-auth-panel__title {
    margin: 0 0 0.35rem;
    font-family: var(--ts-font-display);
    font-weight: 700;
    font-size: clamp(1.65rem, 2.4vw, 2rem);
    letter-spacing: -0.03em;
    color: inherit;
}

.ts-auth-panel__subtitle {
    margin: 0;
    color: var(--ts-muted);
    font-size: 0.95rem;
}

.ts-auth-form .form-label {
    font-weight: 600;
    font-size: 0.86rem;
    color: inherit;
}

.ts-auth-input.form-control {
    border-radius: 0.45rem;
    border-color: rgba(15, 43, 47, 0.16);
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.88);
}

[data-bs-theme="dark"] .ts-auth-input.form-control {
    background: rgba(11, 31, 34, 0.45);
    border-color: rgba(167, 196, 194, 0.22);
    color: var(--ts-text);
}

.ts-auth-input.form-control:focus {
    border-color: #2a8a8f;
    box-shadow: 0 0 0 0.2rem rgba(15, 76, 86, 0.18);
}

.ts-auth-submit {
    margin-top: 0.35rem;
    border: 0;
    border-radius: 0.45rem;
    padding: 0.8rem 1rem;
    font-family: var(--ts-font-display);
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff !important;
    background: linear-gradient(135deg, var(--ts-auth-copper) 0%, #a84c1f 100%);
    transition: transform 160ms ease, filter 160ms ease, background 160ms ease;
}

.ts-auth-submit:hover,
.ts-auth-submit:focus {
    color: #fff !important;
    filter: brightness(1.05);
    transform: translateY(-1px);
    background: linear-gradient(135deg, #d0662d 0%, var(--ts-auth-copper-hover) 100%);
}

.ts-auth-panel__links {
    margin-top: 1.25rem;
    text-align: center;
}

.ts-auth-panel__links a,
.ts-auth-panel__links .btn-link {
    color: #0f4c56;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

[data-bs-theme="dark"] .ts-auth-panel__links a,
[data-bs-theme="dark"] .ts-auth-panel__links .btn-link {
    color: #8fd0cc;
}

.ts-auth-panel__links a:hover,
.ts-auth-panel__links .btn-link:hover {
    text-decoration: underline;
}

.ts-theme-toggle--auth {
    color: #eef5f4 !important;
    border-color: rgba(238, 245, 244, 0.28) !important;
    background: rgba(238, 245, 244, 0.08) !important;
}

.ts-theme-toggle--auth:hover {
    background: rgba(238, 245, 244, 0.16) !important;
}

@keyframes ts-auth-rise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes ts-auth-panel-in {
    from { opacity: 0; transform: translateX(16px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes ts-auth-orb-a {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(24px, 18px) scale(1.06); }
}

@keyframes ts-auth-orb-b {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-20px, -14px) scale(1.08); }
}

@keyframes ts-auth-hex-pulse {
    0%, 100% { opacity: 0.55; transform: rotate(0deg) scale(1); }
    50% { opacity: 0.9; transform: rotate(4deg) scale(1.03); }
}

@keyframes ts-auth-grid-drift {
    from { background-position: 0 0; }
    to { background-position: 48px 48px; }
}

@media (max-width: 899.98px) {
    .ts-auth {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .ts-auth-brand {
        min-height: auto;
        padding-bottom: 1.75rem;
    }

    .ts-auth-brand__hero {
        margin: 1.5rem 0 0.75rem;
    }

    .ts-auth-brand__title {
        font-size: clamp(2rem, 9vw, 2.6rem);
    }

    .ts-auth-brand__hex {
        opacity: 0.45;
        top: auto;
        bottom: -18%;
        right: -18%;
    }

    .ts-auth-panel {
        min-height: 55vh;
        animation-name: ts-auth-rise;
    }

    .ts-auth-brand__foot {
        display: none;
    }
}

.ts-main {
    flex: 1 0 auto;
    width: 100%;
    min-height: 0;
}

.container,
.container-fluid {
    flex: 1;
}

/* Barra superior — login */
.logo-tdesk-bar {
    z-index: 1050;
    background: transparent;
}

/* Navbar aplicativo */
.ts-navbar {
    background: linear-gradient(135deg, var(--ts-primary) 0%, #0a3038 100%) !important;
    box-shadow: 0 2px 12px rgba(11, 31, 34, 0.16);
    padding-top: 0;
    padding-bottom: 0;
    min-height: var(--ts-nav-height);
    align-items: center;
    gap: 0;
}

.ts-navbar .container-fluid {
    align-items: center;
}

.ts-navbar .navbar-collapse {
    align-items: center;
}

.ts-navbar .navbar-brand {
    font-weight: 600;
    letter-spacing: -0.02em;
}

.ts-navbar-end .navbar-brand {
    white-space: nowrap;
}

.ts-navbar .nav-link {
    border-radius: var(--ts-radius-sm);
    padding: 0.45rem 0.65rem !important;
    margin: 0 0.1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ts-navbar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ts-navbar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.18);
    font-weight: 600;
}

.ts-navbar .nav-link i {
    opacity: 0.92;
    margin-right: 0.35rem;
}

/* Ícone de notificação (balão + !): avisos sem aceite do usuário */
.ts-navbar .nav-link.ts-nav-link-avisos .ts-aviso-nav-badge {
    position: absolute;
    top: 0;
    right: 0;
    line-height: 0;
    pointer-events: none;
}

.ts-navbar .nav-link.ts-nav-link-avisos .ts-aviso-nav-badge__svg {
    display: block;
    width: 24px;
    height: 27px;
    vertical-align: top;
}

.ts-navbar .dropdown-menu {
    border: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow-md);
    border-radius: var(--ts-radius);
    padding: 0.35rem 0;
}

.ts-navbar .dropdown-item {
    border-radius: var(--ts-radius-sm);
    margin: 0 0.35rem;
    width: auto;
}

.logo-tdesk-nav {
    display: flex;
    align-items: center;
    align-self: stretch;
    flex-shrink: 0;
    padding: 0 1rem 0 0.85rem;
    margin-right: 0.35rem;
    border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.logo-tdesk-nav a {
    display: flex;
    align-items: center;
    line-height: 0;
    padding: 0.5rem 0;
    opacity: 0.98;
    transition: opacity 0.15s ease;
}

.logo-tdesk-nav a:hover {
    opacity: 1;
}

.logo-tdesk-nav img,
.logo-corporation {
    display: block;
    object-fit: contain;
    object-position: left center;
}

.logo-tdesk-nav .logo-corporation {
    height: 40px;
    max-height: 40px;
    max-width: 40px;
    width: 40px;
}

.logo-corporation--login {
    height: 48px;
    max-height: 48px;
    max-width: 48px;
    width: 48px;
}

.auth-logo {
    height: 4.5rem;
    width: 4.5rem;
    max-width: 4.5rem;
    max-height: 4.5rem;
    object-fit: contain;
}

@media (max-width: 767.98px) {
    .logo-tdesk-nav {
        padding: 0 0.65rem 0 0.5rem;
        margin-right: 0.15rem;
        max-width: none;
        border-right: none;
    }

    .logo-tdesk-nav .logo-corporation {
        height: 34px;
        max-height: 34px;
        max-width: 34px;
        width: 34px;
    }
}

@media (min-width: 1200px) {
    .logo-tdesk-nav .logo-corporation {
        height: 42px;
        max-height: 42px;
        max-width: 42px;
        width: 42px;
    }
}

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

.z-fixed {
    z-index: 1080;
}

/* Overlay ao aplicar filtros (formulário GET) */
.ts-filter-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10850;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(2px);
}

[data-bs-theme="dark"] .ts-filter-loading-overlay,
[data-bs-theme="dark"] .ts-action-loading-overlay {
    background: var(--ts-overlay);
}

.ts-filter-loading-overlay.is-visible {
    display: flex;
}

.ts-filter-loading-box {
    padding: 1.75rem 2rem;
    text-align: center;
    max-width: 22rem;
    animation: ts-filter-pop 0.2s ease-out;
}

@keyframes ts-filter-pop {
    from {
        opacity: 0;
        transform: scale(0.96);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .ts-filter-loading-box {
        animation: none;
    }
}

/* Cards */
.card {
    border-radius: var(--ts-radius);
    border: 1px solid var(--ts-border);
    box-shadow: var(--ts-shadow);
    background: var(--ts-surface);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-header {
    background: var(--ts-surface-muted);
    border-bottom: 1px solid var(--ts-border);
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.ts-card-interactive:hover {
    box-shadow: var(--ts-shadow-md);
    border-color: rgba(37, 99, 235, 0.2);
}

/* Cabeçalho de página */
.ts-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--ts-border);
}

.ts-page-header h1 {
    font-size: clamp(1.35rem, 2.5vw, 1.65rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ts-text);
}

.ts-page-header .btn {
    white-space: nowrap;
}

.ts-breadcrumb .breadcrumb {
    font-size: 0.82rem;
}

.ts-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: var(--ts-muted);
}

.ts-error-page-code {
    font-size: clamp(3rem, 12vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--ts-primary);
    line-height: 1;
}

/* Identidade executiva compartilhada — Dashboard + Métricas */
.ts-executive-shell,
.ts-metricas-dashboard {
	--mx-navy: var(--ts-exec-navy);
	--mx-navy-soft: var(--ts-exec-navy-soft);
	--mx-mint: var(--ts-exec-mint);
	--mx-mint-dim: var(--ts-exec-mint-dim);
	--mx-teal: var(--ts-exec-teal);
	--mx-surface: var(--ts-surface);
	--mx-border: var(--ts-exec-panel-border);
	--mx-muted: var(--ts-muted);
	--mx-radius: var(--ts-exec-radius);
}

[data-bs-theme="dark"] .ts-executive-shell,
[data-bs-theme="dark"] .ts-metricas-dashboard {
	--mx-border: var(--ts-border);
}

.ts-executive-hero,
.ts-metricas-hero {
	background: var(--ts-exec-navy);
	border-radius: var(--ts-exec-radius);
	padding: 1.75rem 1.5rem;
	margin-bottom: 1rem;
	color: #fff;
}

.ts-executive-hero-title,
.ts-metricas-hero-title {
	font-family: var(--ts-exec-display-font);
	font-size: clamp(1.35rem, 2.5vw, 1.85rem);
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 0.35rem;
	color: #fff;
}

.ts-executive-hero-sub,
.ts-metricas-hero-sub {
	margin: 0;
	font-size: 0.82rem;
	color: rgba(255, 255, 255, 0.72);
	max-width: 42rem;
	line-height: 1.45;
}

.ts-executive-hero-sub strong,
.ts-metricas-hero-sub strong {
	color: var(--ts-exec-mint);
	font-weight: 600;
}

.ts-executive-filter,
.ts-metricas-filter {
	background: var(--ts-surface);
	border: 1px solid var(--ts-exec-panel-border);
	border-radius: var(--ts-exec-radius);
	padding: 0.85rem 1rem;
	margin-bottom: 1rem;
}

[data-bs-theme="dark"] .ts-executive-filter,
[data-bs-theme="dark"] .ts-metricas-filter {
	border-color: var(--ts-border);
}

.ts-executive-section-title {
	margin: 0 0 0.65rem;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--ts-muted);
}

.ts-executive-kpi-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 1rem;
	margin-bottom: 1rem;
}

.ts-executive-kpi {
	background: var(--ts-surface);
	border: 1px solid var(--ts-exec-panel-border);
	border-radius: var(--ts-exec-radius);
	padding: 1.1rem 1.15rem 0.95rem;
	height: 100%;
	min-height: 5.5rem;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

a.ts-executive-kpi {
	text-decoration: none;
	color: inherit;
	cursor: pointer;
}

a.ts-executive-kpi:hover {
	transform: translateY(-2px);
	box-shadow: 0 10px 28px rgba(26, 18, 46, 0.1);
	border-color: rgba(101, 243, 203, 0.45);
}

a.ts-executive-kpi:focus-visible {
	outline: 2px solid var(--ts-exec-mint);
	outline-offset: 2px;
}

.ts-executive-kpi--dark {
	background: var(--ts-exec-navy);
	border-color: var(--ts-exec-navy);
	color: #fff;
}

.ts-executive-kpi--dark .ts-executive-kpi-label {
	color: var(--ts-exec-mint);
}

.ts-executive-kpi--dark .ts-executive-kpi-value {
	color: #fff;
}

.ts-executive-kpi-label {
	display: block;
	margin: 0 0 0.35rem;
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ts-muted);
}

.ts-executive-kpi-value {
	display: block;
	margin: 0;
	font-size: 1.85rem;
	font-weight: 800;
	line-height: 1.05;
	color: var(--ts-exec-navy);
	letter-spacing: -0.03em;
	font-variant-numeric: tabular-nums;
}

[data-bs-theme="dark"] .ts-executive-kpi-value {
	color: #f1f5f9;
}

.btn-ts-exec {
	background: var(--ts-exec-navy);
	color: #fff;
	border: 0;
}

.btn-ts-exec:hover,
.btn-ts-exec:focus {
	background: var(--ts-exec-navy-soft);
	color: #fff;
}

.btn-ts-exec-outline {
	border: 1px solid var(--ts-exec-navy);
	color: var(--ts-exec-navy);
	background: transparent;
}

.btn-ts-exec-outline:hover,
.btn-ts-exec-outline:focus {
	background: var(--ts-exec-mint-dim);
	border-color: var(--ts-exec-navy);
	color: var(--ts-exec-navy);
}

[data-bs-theme="dark"] .btn-ts-exec-outline {
	border-color: var(--ts-exec-mint);
	color: var(--ts-exec-mint);
}

[data-bs-theme="dark"] .btn-ts-exec-outline:hover,
[data-bs-theme="dark"] .btn-ts-exec-outline:focus {
	background: rgba(101, 243, 203, 0.12);
	color: var(--ts-exec-mint);
}

.ts-executive-shell .ts-page-header h1 {
	font-family: var(--ts-exec-display-font);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.ts-executive-shell .ts-dashboard-filters-card,
.ts-executive-shell .ts-executive-panel {
	background: var(--ts-surface);
	border: 1px solid var(--ts-exec-panel-border);
	border-radius: var(--ts-exec-radius);
	box-shadow: none;
}

.ts-executive-shell .ts-dashboard-filters-card .card-header {
	background: transparent;
	border-bottom: 1px solid var(--ts-exec-panel-border);
	font-size: 0.82rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ts-muted);
}

[data-bs-theme="dark"] .ts-executive-shell .ts-dashboard-filters-card,
[data-bs-theme="dark"] .ts-executive-shell .ts-executive-panel {
	border-color: var(--ts-border);
}

[data-bs-theme="dark"] .ts-executive-shell .ts-dashboard-filters-card .card-header {
	border-bottom-color: var(--ts-border);
}

.ts-executive-shell .dashboard-status-card {
	border-radius: var(--ts-exec-radius);
	border: 1px solid rgba(255, 255, 255, 0.18);
}

.ts-executive-shell a.text-decoration-none .dashboard-status-card:hover {
	box-shadow: 0 10px 28px rgba(26, 18, 46, 0.18);
	border-color: rgba(101, 243, 203, 0.45);
}

.ts-executive-shell .ts-dashboard-card-primary {
	min-height: 5.5rem;
	box-shadow: 0 2px 8px rgba(26, 18, 46, 0.08);
}

.ts-executive-shell .dashboard-status-label {
	font-size: 0.72rem;
	line-height: 1.2;
}

.ts-executive-shell .ts-executive-panel .card-header {
	background: transparent;
	border-bottom: 1px solid var(--ts-exec-panel-border);
	font-weight: 600;
}

.ts-executive-shell .ts-help-collapse .card {
	border: 1px solid var(--ts-exec-panel-border);
	border-radius: var(--ts-exec-radius);
	background: var(--ts-surface-subtle);
}

[data-bs-theme="dark"] .ts-executive-shell .ts-help-collapse .card {
	border-color: var(--ts-border);
}

@media (max-width: 991.98px) {
	.ts-executive-kpi-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 575.98px) {
	.ts-executive-kpi-grid {
		grid-template-columns: 1fr;
	}

	.ts-executive-kpi-value {
		font-size: 1.65rem;
	}
}

/* Dashboard: filtro de meses — lista nativa (envia mes[] no GET, sem Tom Select) */
.ts-dashboard-filters-card .ts-dashboard-mes-wrap {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.ts-dashboard-mes-wrap {
    min-width: min(100%, 14rem);
    max-width: 22rem;
}

/* Dashboard: Tom Select (mesma altura mínima que em Chamados) */
.ts-filter-fields-look .ts-dashboard-filters-card .ts-wrapper.form-select {
    min-height: 42px;
}

/* Filtros (chamados) */
.ts-filter-card .card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.ts-filter-card .card-header i {
    opacity: 0.85;
}

.ts-filter-card .form-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ts-muted);
    margin-bottom: 0.25rem;
}

/* Espaçamento unificado — cards de filtro (Dashboard, Chamados, Relatórios, Projetos) */
.ts-filter-card {
    margin-bottom: var(--ts-space-5);
}

.ts-filter-card .card-body {
    padding: var(--ts-space-4) var(--ts-space-5);
}

.ts-filter-card form > .row,
.ts-filter-card .card-body > .row,
.ts-filter-card .card-body > form.row {
    --bs-gutter-x: 0.75rem;
    --bs-gutter-y: 0.75rem;
}

@media (min-width: 768px) {
    .ts-filter-card .card-body {
        padding: var(--ts-space-5) var(--ts-space-6);
    }

    .ts-filter-card form > .row,
    .ts-filter-card .card-body > .row,
    .ts-filter-card .card-body > form.row {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}

.ts-filter-card .card-header + .card-body {
    padding-top: var(--ts-space-4);
}

/*
 * Mesmo visual dos filtros da tela de Chamados (classe .ts-tickets-legacy-look):
 * card discreto, cabeçalho #f8fafc, labels e campos com cantos ~6px.
 * Use no pai: ex. container do Dashboard (.ts-filter-fields-look).
 */
.ts-filter-fields-look .ts-filter-card {
    border-radius: 10px;
    box-shadow: none;
    border-color: var(--ts-filter-border);
}

.ts-filter-fields-look .ts-filter-card .card-header {
    background: var(--ts-surface-subtle) !important;
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--ts-filter-label);
    letter-spacing: 0.02em;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
    border-bottom-color: var(--ts-filter-border);
}

.ts-filter-fields-look .ts-filter-card .form-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--ts-filter-label);
    margin-bottom: 0.2rem;
}

.ts-filter-fields-look .ts-filter-card .form-control,
.ts-filter-fields-look .ts-filter-card .form-select,
.ts-filter-fields-look .ts-filter-card .btn {
    border-radius: 6px;
}

.ts-filter-fields-look .ts-filter-card .form-control-sm,
.ts-filter-fields-look .ts-filter-card .form-select-sm,
.ts-filter-fields-look .ts-filter-card .btn-sm {
    font-size: 0.82rem;
}

/* Tabelas */
.table {
    --bs-table-hover-bg: rgba(37, 99, 235, 0.04);
}

.table thead th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ts-muted);
    border-bottom-width: 1px;
    background: var(--ts-surface-table-head);
    white-space: nowrap;
}

.table-responsive {
    border-radius: 0 0 var(--ts-radius) var(--ts-radius);
}

.ts-table-wrap .table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--ts-border);
}

.table tbody td {
    vertical-align: middle;
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.55em;
}

/* Status específicos de chamados */
.badge.bg-pendente-peca,
.bg-pendente-peca {
    background-color: #6f42c1;
    color: #ffffff;
}

.badge.bg-em-andamento,
.bg-em-andamento {
    background-color: #ca8a04;
    color: #1c1917;
}

.badge.bg-retorno,
.bg-retorno {
    background-color: #ea580c;
    color: #ffffff;
}

.badge.bg-agendar,
.bg-agendar {
    background-color: #800020;
    color: #ffffff;
}

.bg-chamados-hoje {
    background-color: #084d6e;
    color: #ffffff;
}

.bg-chamados-previsto {
    background-color: #0d9488;
    color: #ffffff;
}

.badge.bg-pend-cliente,
.bg-pend-cliente {
    background-color: #a855f7;
    color: #ffffff;
}

.badge.bg-problema,
.bg-problema {
    background-color: #d97706;
    color: #1c1917;
}

.badge.bg-improdutiva,
.bg-improdutiva {
    background-color: #eab308;
    color: #422006;
}

.badge.bg-aguardando-aprovacao,
.bg-aguardando-aprovacao {
    background-color: #ef4444;
    color: #ffffff;
}

.badge.bg-concluido,
.bg-concluido {
    background-color: #059669;
    color: #ffffff;
}

.badge.bg-documentacao-pendente,
.bg-documentacao-pendente {
    background-color: #9333ea;
    color: #ffffff;
}

.badge.bg-desistencia-tecnica,
.bg-desistencia-tecnica {
    background-color: #92400e;
    color: #ffffff;
}

/* Dashboard — cards de status */
.dashboard-status-label {
    font-size: 0.82rem;
    line-height: 1.15;
    font-weight: 600;
}

.dashboard-status-card {
    min-height: 96px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

a.text-decoration-none .dashboard-status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
}

.dashboard-status-card h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Cards com fundo claro — contraste de texto no dashboard */
.dashboard-status-card.bg-em-andamento,
.dashboard-status-card.bg-improdutiva,
.dashboard-status-card.bg-problema {
    border-color: rgba(15, 23, 42, 0.14);
    color: #1c1917 !important;
}

.dashboard-status-card.bg-em-andamento .dashboard-status-label,
.dashboard-status-card.bg-improdutiva .dashboard-status-label,
.dashboard-status-card.bg-problema .dashboard-status-label,
.dashboard-status-card.bg-em-andamento h2,
.dashboard-status-card.bg-em-andamento h3,
.dashboard-status-card.bg-improdutiva h2,
.dashboard-status-card.bg-improdutiva h3,
.dashboard-status-card.bg-problema h2,
.dashboard-status-card.bg-problema h3 {
    color: #1c1917 !important;
    text-shadow: none;
}

.dashboard-status-card.bg-documentacao-pendente,
.dashboard-status-card.bg-aguardando-aprovacao {
    border-color: rgba(15, 23, 42, 0.1);
    color: #ffffff !important;
}

.dashboard-status-card.bg-documentacao-pendente .dashboard-status-label,
.dashboard-status-card.bg-aguardando-aprovacao .dashboard-status-label,
.dashboard-status-card.bg-documentacao-pendente h2,
.dashboard-status-card.bg-documentacao-pendente h3,
.dashboard-status-card.bg-aguardando-aprovacao h2,
.dashboard-status-card.bg-aguardando-aprovacao h3 {
    color: #ffffff !important;
    text-shadow: 0 1px 6px rgba(2, 6, 23, 0.2);
}

/* Melhora contraste dos cards escuros no dashboard */
.dashboard-status-card.bg-dark,
.dashboard-status-card.bg-secondary,
.dashboard-status-card.bg-desistencia-tecnica,
.dashboard-status-card.bg-chamados-hoje {
    color: #f8fafc !important;
}

.dashboard-status-card.bg-dark .dashboard-status-label,
.dashboard-status-card.bg-secondary .dashboard-status-label,
.dashboard-status-card.bg-desistencia-tecnica .dashboard-status-label,
.dashboard-status-card.bg-chamados-hoje .dashboard-status-label {
    color: #e2e8f0 !important;
}

.dashboard-status-card.bg-dark h2,
.dashboard-status-card.bg-dark h3,
.dashboard-status-card.bg-secondary h2,
.dashboard-status-card.bg-secondary h3,
.dashboard-status-card.bg-desistencia-tecnica h2,
.dashboard-status-card.bg-desistencia-tecnica h3,
.dashboard-status-card.bg-chamados-hoje h2,
.dashboard-status-card.bg-chamados-hoje h3,
.dashboard-status-card.bg-chamados-previsto h2,
.dashboard-status-card.bg-chamados-previsto h3 {
    color: #ffffff !important;
    text-shadow: 0 1px 8px rgba(2, 6, 23, 0.28);
}

/* Garante contraste do valor em qualquer card colorido do dashboard */
.dashboard-status-card.text-white h2,
.dashboard-status-card.text-white h3 {
    color: #ffffff !important;
}

/* Alertas / flash */
.ts-flash-stack {
    max-width: min(100%, 42rem);
    margin-left: auto;
    margin-right: auto;
}

.ts-flash-stack .alert {
    border: none;
    box-shadow: var(--ts-shadow-md);
    border-radius: var(--ts-radius);
}

.ts-flash-stack .alert-success {
    background: var(--ts-alert-success-bg);
    color: var(--ts-alert-success-text);
}

.ts-flash-stack .alert-danger {
    background: var(--ts-alert-danger-bg);
    color: var(--ts-alert-danger-text);
}

.alert .bi {
    flex-shrink: 0;
}

.ts-flash-title {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-bottom: 0.15rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--ts-input-focus-border);
    box-shadow: 0 0 0 0.2rem var(--ts-input-focus-ring);
}

.form-control,
.form-select {
    border-radius: var(--ts-radius-sm);
    min-height: 2.35rem;
    font-size: var(--ts-font-size-sm);
}

/* Campos obrigatórios — indicador visual padronizado */
.ts-required {
    color: #dc2626;
    font-weight: 700;
}

.ts-form-required-note {
    font-size: 0.8rem;
    color: var(--ts-muted);
    margin-bottom: 0;
}

.btn {
    border-radius: var(--ts-radius-sm);
    font-weight: 600;
    transition: transform var(--ts-transition-fast), box-shadow var(--ts-transition-fast), background-color var(--ts-transition-fast), border-color var(--ts-transition-fast);
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled,
.btn.disabled {
    transform: none;
    opacity: 0.72;
}

.btn-sm {
    min-height: 2rem;
    padding: 0.26rem 0.65rem;
    font-size: 0.78rem;
    line-height: 1.2;
}

.btn-primary,
.btn-outline-primary {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.btn-primary:not(:disabled):not(.disabled):hover {
    box-shadow: 0 4px 14px rgba(15, 76, 86, 0.22);
}

.btn-primary:not(:disabled):not(.disabled):active {
    transform: translateY(0);
    box-shadow: inset 0 2px 4px rgba(15, 23, 42, 0.18);
}

.btn-primary:focus-visible {
    box-shadow: 0 0 0 0.2rem var(--ts-input-focus-ring), 0 1px 0 rgba(15, 23, 42, 0.06);
}

.btn-outline-secondary,
.btn-outline-danger,
.btn-outline-primary {
    background: var(--ts-surface);
}

.btn-outline-danger:hover {
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.16);
}

.btn-outline-primary:hover {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.16);
}

.btn-outline-secondary:hover {
    box-shadow: 0 4px 12px rgba(71, 85, 105, 0.15);
}

.list-group-item {
    border-left: 0;
    border-right: 0;
}

/* Paginação */
.pagination .page-link {
    border-radius: var(--ts-radius-sm);
    margin: 0 0.15rem;
}

/* Rodapé */
footer.footer-ts {
    background: var(--ts-footer-bg);
    border-top: 1px solid var(--ts-border);
    margin-top: auto;
}

/* Chatbot flutuante */
#ts-chatbot-root .ts-chatbot-window {
    width: min(100vw - 2rem, 360px);
    max-height: min(70vh, 480px);
    border-radius: var(--ts-radius);
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.2);
    border: 1px solid var(--ts-border);
}

#ts-chatbot-root .ts-chatbot-header {
    background: linear-gradient(135deg, var(--ts-primary), var(--ts-accent));
    color: #fff;
    padding: 10px 12px;
}

#ts-chatbot-root .ts-chatbot-header-title {
    font-size: 0.9rem;
    font-weight: 600;
}

#ts-chatbot-root .ts-chatbot-header-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
}

#ts-chatbot-root .ts-chatbot-body {
    background: var(--ts-chatbot-body-bg);
    padding: 8px;
}

#ts-chatbot-root .ts-chatbot-msg {
    background: var(--ts-surface);
    border-radius: 12px;
    padding: 8px 10px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    border: 1px solid var(--ts-border);
}

#ts-chatbot-root .ts-chatbot-suggestions button {
    border-radius: 999px;
    border: 1px solid var(--ts-chatbot-chip-border);
    background: var(--ts-chatbot-chip-bg);
    color: var(--ts-text);
    font-size: 0.75rem;
    padding: 4px 10px;
    margin: 2px;
    transition: background 0.15s ease, border-color 0.15s ease;
}

#ts-chatbot-root .ts-chatbot-suggestions button:hover {
    background: var(--ts-chatbot-chip-hover-bg);
    border-color: var(--ts-accent);
}

#ts-chatbot-root .ts-chatbot-footer {
    background: var(--ts-surface);
    border-top: 1px solid var(--ts-border);
}

#ts-chatbot-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ts-primary), var(--ts-accent));
    border: none;
    color: #fff;
    font-size: 1.25rem;
    box-shadow: var(--ts-shadow-md);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

#ts-chatbot-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(30, 74, 138, 0.35);
}

#ts-chatbot-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

/* Estado vazio */
.ts-empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--ts-muted);
}

.ts-empty-state .bi {
    font-size: 2.5rem;
    opacity: 0.35;
    margin-bottom: 0.75rem;
}

/* Tabelas AJAX — carregando vs vazio */
.ts-table-loading td {
    padding: 2rem 1rem !important;
    text-align: center;
    color: var(--ts-muted);
    vertical-align: middle;
}

.ts-table-loading .spinner-border {
    margin-right: 0.5rem;
    vertical-align: -0.15em;
}

td .ts-empty-state {
    padding: 1.75rem 1rem;
}

.ts-chart-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem 1rem;
    color: var(--ts-muted);
    font-size: 0.875rem;
    text-align: center;
}

.ts-toast {
    max-width: min(24rem, calc(100vw - 2rem));
}

/* —— Chamados: filtros (Tom Select) e tabela —— */
.letter-spacing-tight {
    letter-spacing: 0.04em;
}

.ts-tickets-page .ts-filter-loading-overlay {
    z-index: 10850;
}

/* Tom Select: menu junto ao campo (dropdownParent = card de filtros) */
.ts-tickets-filters-card,
.ts-filter-card {
    position: relative;
    overflow: visible;
}

.ts-tickets-filters-card .ts-dropdown,
.ts-filter-card .ts-dropdown {
    z-index: 1060 !important;
}

body > .ts-dropdown {
    z-index: 10900 !important;
}

.ts-tickets-table-wrap {
    -webkit-overflow-scrolling: touch;
}

.ts-tickets-table {
    min-width: 1180px;
    table-layout: auto;
}

@media (max-width: 991.98px) {
    .ts-tickets-table {
        min-width: 28rem;
    }

    .ts-tickets-table .ts-tickets-title-cell {
        min-width: 8rem;
        max-width: 14rem;
        width: auto;
    }
}

.ts-tickets-mobile-hint {
    line-height: 1.4;
}

.ts-projeto-ticket-highlight {
    background: #fef9c3 !important;
    transition: background-color 0.35s ease;
}

[data-bs-theme="dark"] .ts-projeto-ticket-highlight {
    background: rgba(234, 179, 8, 0.22) !important;
}

.ts-tickets-table .ts-col-sla {
    min-width: 5.75rem;
    white-space: nowrap;
}

.ts-tickets-table .ts-tickets-title-cell {
    min-width: 10rem;
    max-width: 18rem;
    width: 14rem;
    word-break: normal;
    overflow-wrap: anywhere;
    white-space: normal;
    line-height: 1.35;
}

.ts-line-clamp-2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    max-width: 17rem;
}

.ts-tickets-page .ts-wrapper.form-select {
    min-height: 42px;
}

.ts-tickets-filters-card .card-header {
    border-bottom: 1px solid var(--ts-border);
}

.ts-tickets-quick-filters {
    padding-bottom: 0.125rem;
}

.ts-tickets-advanced-inner {
    border-top: 1px dashed var(--ts-border);
    margin-top: 0.25rem;
    padding-left: 0.125rem;
    padding-right: 0.125rem;
    overflow: visible;
}

/* Evita recortar o menu do Tom Select quando o painel “Mais filtros” está aberto */
.ts-tickets-page #ticketFiltersAdvanced.collapse.show,
.ts-tickets-page #ticketFiltersExterno.collapse.show,
.ts-tickets-page [id$="-ticket-filters-advanced"].collapse.show {
    overflow: visible !important;
}

/* Tailwind `.collapse { visibility: collapse }` vs Bootstrap Collapse */
.ts-tickets-page .collapse,
.paguemenos-page .collapse {
    visibility: visible;
}
.ts-tickets-page .collapse:not(.show),
.paguemenos-page .collapse:not(.show) {
    display: none;
}
.ts-tickets-page .collapsing,
.paguemenos-page .collapsing {
    visibility: visible;
}

.ts-tickets-results-card .card-header {
    font-size: 0.95rem;
}

/* Chamados: aparência clássica/compacta (referência do usuário) */
.ts-tickets-legacy-look .ts-page-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0;
    border-bottom: 0;
}

.ts-tickets-legacy-look .ts-page-header h1 {
    font-size: 2rem;
    font-weight: 500;
    letter-spacing: 0;
}

.ts-tickets-legacy-look .card,
.ts-tickets-legacy-look .ts-filter-card,
.ts-tickets-legacy-look .ts-tickets-results-card {
    border-radius: 10px;
    box-shadow: none;
    border-color: var(--ts-filter-border);
}

.ts-tickets-legacy-look .card-header {
    background: var(--ts-surface-subtle);
    font-weight: 600;
    font-size: 0.82rem;
    text-transform: uppercase;
    color: var(--ts-filter-label);
    letter-spacing: 0.02em;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}

.ts-tickets-legacy-look .form-label {
    font-size: 0.75rem;
    color: var(--ts-filter-label);
    margin-bottom: 0.2rem;
}

.ts-tickets-legacy-look .form-control,
.ts-tickets-legacy-look .form-select,
.ts-tickets-legacy-look .btn {
    border-radius: 6px;
}

.ts-tickets-legacy-look .form-control-sm,
.ts-tickets-legacy-look .form-select-sm,
.ts-tickets-legacy-look .btn-sm {
    font-size: 0.82rem;
}

.ts-tickets-legacy-look .table thead th {
    background: var(--ts-surface-table-head);
    color: var(--ts-muted);
    font-size: 0.72rem;
    letter-spacing: 0.03em;
}

.ts-tickets-legacy-look .table tbody td {
    font-size: 0.85rem;
    padding-top: 0.42rem;
    padding-bottom: 0.42rem;
}

.ts-tickets-legacy-look .ts-tickets-title-cell a {
    color: #0d6efd;
    font-weight: 600;
}

.ts-tickets-legacy-look .ts-tickets-title-cell a:hover {
    text-decoration: underline !important;
}

/* Overlay padrão para ações de submit (POST/DELETE/etc). */
.ts-action-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10860;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--ts-space-4);
    background: rgba(2, 6, 23, 0.32);
    backdrop-filter: blur(2px);
}

.ts-action-loading-overlay.is-visible {
    display: flex;
}

/* PAGO inline (lista de chamados) */
.ts-pago-select.ts-pago-sim {
    color: #166534 !important;
    border-color: rgba(22, 163, 74, 0.45) !important;
    background-color: #dcfce7 !important;
    background-image: none !important;
    font-weight: 600;
}

.ts-pago-select.ts-pago-nao {
    color: #991b1b !important;
    border-color: rgba(239, 68, 68, 0.45) !important;
    background-color: #fee2e2 !important;
    background-image: none !important;
    font-weight: 600;
}

/* Toggle de tema */
.ts-theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: inherit;
    border-radius: var(--ts-radius-sm);
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ts-theme-toggle:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 2px;
}

.ts-navbar .ts-theme-toggle {
    color: rgba(255, 255, 255, 0.92);
    padding: 0.45rem 0.65rem;
}

.ts-navbar .ts-theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.ts-auth-brand .ts-theme-toggle--auth {
    margin: 0;
    padding: 0.45rem 0.55rem;
}

[data-bs-theme="dark"] .table {
    --bs-table-hover-bg: rgba(96, 165, 250, 0.08);
    --bs-table-striped-bg: rgba(148, 163, 184, 0.06);
}

[data-bs-theme="dark"] .dropdown-menu {
    --bs-dropdown-bg: var(--ts-surface);
    --bs-dropdown-link-color: var(--ts-text);
    --bs-dropdown-link-hover-bg: rgba(96, 165, 250, 0.12);
    --bs-dropdown-border-color: var(--ts-border);
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background-color: var(--ts-surface);
    color: var(--ts-text);
    border-color: var(--ts-border);
}

[data-bs-theme="dark"] .form-control::placeholder {
    color: var(--ts-muted);
}

[data-bs-theme="dark"] .list-group-item {
    background-color: var(--ts-surface);
    color: var(--ts-text);
    border-color: var(--ts-border);
}

/* Empty states + dashboard brand */
.ts-empty-state {
    background: linear-gradient(180deg, rgba(15, 76, 86, 0.04), transparent);
}

.ts-empty-state__icon {
    font-size: 2.25rem;
    color: var(--ts-primary);
    opacity: 0.75;
}

.ts-dashboard-executive .ts-executive-hero {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    padding: 1.25rem 1.35rem;
    margin-bottom: 1rem;
    background:
        radial-gradient(ellipse 50% 80% at 100% 0%, rgba(196, 92, 38, 0.18), transparent 55%),
        linear-gradient(135deg, #0f4c56 0%, #123038 55%, #0b1f22 100%);
    color: #eef5f4;
}

.ts-dashboard-executive .ts-executive-hero-title,
.ts-dashboard-executive .ts-executive-hero-sub,
.ts-dashboard-executive .ts-executive-hero-sub strong {
    color: #eef5f4 !important;
}

.ts-dashboard-executive .ts-executive-hero-sub {
    opacity: 0.82;
    margin-bottom: 0;
}

.ts-onboarding .card {
    border-radius: 0.75rem;
}
