/* ============================================================
   Plataforma de Chamados — REDESIGN V2 (versão de teste)
   Direção: "Console Operacional Editorial"
   Papel quente + tinta quase-preta + esmeralda confiante,
   acento coral para urgência. Tipografia com caráter.
   ============================================================ */

/* Fonte original do projeto (auto-hospedada) — mantida no redesign */
@font-face {
    font-family: 'Space Grotesk';
    src: url('../fonts/SpaceGrotesk-VariableFont_wght.ttf') format('truetype');
    font-weight: 300 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* --- marca / cor (tokens herdados remapeados → cascateia em todo o CSS) --- */
    --primary-color: #0BA678;       /* esmeralda viva e confiante */
    --primary-dark: #07614A;        /* esmeralda profunda (gradientes/hover) */
    --primary-light: #2DE0A6;       /* menta brilhante (brilhos/acentos) */
    --primary-ultra-light: #E7F7F0; /* lavagem clara da marca */
    --secondary-color: #7C8388;     /* neutro médio */
    --success-color: #0BA678;
    --warning-color: #F5A524;       /* âmbar */
    --danger-color: #FF5436;        /* coral vívido — urgência */
    --bg-color: #F4F1EA;            /* papel quente */
    --text-color: #14181B;          /* tinta quase-preta */
    --text-light: #7C8388;
    --border-color: #E5E0D4;        /* borda quente */

    /* --- novos tokens v2 --- */
    --ink: #14181B;
    --ink-soft: #3A4248;
    --paper: #F4F1EA;
    --surface: #FFFFFF;
    --surface-2: #FBFAF4;
    --signal: #FF5436;
    --signal-deep: #D8341B;
    --brand-bright: #2DE0A6;
    --line: #E5E0D4;
    --line-strong: #D8D2C2;

    /* --- tipografia: fonte original do projeto em tudo --- */
    --font-display: 'Space Grotesk', 'Inter', sans-serif;
    --font-ui: 'Space Grotesk', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'Space Grotesk', 'Inter', sans-serif;

    /* --- sombras (mais ricas, com tinta + toque de marca) --- */
    --shadow: 0 1px 2px rgba(20, 24, 27, 0.06), 0 1px 3px rgba(20, 24, 27, 0.05);
    --shadow-md: 0 4px 10px rgba(20, 24, 27, 0.08), 0 2px 4px rgba(20, 24, 27, 0.05);
    --shadow-lg: 0 18px 40px rgba(7, 97, 74, 0.16), 0 6px 14px rgba(20, 24, 27, 0.08);
    --radius: 0.9rem;
    --radius-sm: 0.6rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

input, select, textarea, button {
    font-family: inherit;
}

body {
    font-family: var(--font-ui);
    color: var(--text-color);
    line-height: 1.55;
    min-height: 100vh;
    /* papel quente liso — sem gradiente/radiais */
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Container Principal */
.container {
    max-width: 98%;
    margin: 0 auto;
    padding: 6px;
}

/* Header Moderno */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    padding: 1.25rem 0;
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--primary-dark);
    position: relative;
    z-index: 900;
}

.header-content {
    max-width: 98%;
    margin: 0 auto;
    padding: 0 6px;            /* alinha com o .container (padding 6px) — objetos do header batem com a margem do conteúdo */
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1.5rem;
}

.header h1 {
    color: white;
    font-size: 1.65rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
    flex: 1;
    white-space: nowrap;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1001;
    flex-shrink: 0;
}

.user-name {
    font-weight: 500;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
}

.user-menu-container {
    position: relative;
    display: inline-block;
}

.user-menu-btn {
    font-weight: 500;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    backdrop-filter: blur(10px);
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    transition: background 0.2s;
}

.user-menu-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.user-menu-btn::after {
    content: ' ▾';
    font-size: 0.7em;
    opacity: 0.7;
}

.user-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.user-menu-dropdown.show {
    display: block;
}

.user-menu-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
    transition: background 0.15s;
    white-space: nowrap;
}

.user-menu-dropdown a:hover {
    background: #f3f4f6;
}

.user-menu-dropdown a:not(:last-child) {
    border-bottom: 1px solid #f3f4f6;
}

/* Botões Modernos */
.btn {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--shadow);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(57, 150, 145, 0.3);
}

.btn-primary:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-ultra-light);
    transform: translateY(-1px);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
}

/* Cards Modernos */
.card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 0.875rem;
    margin-bottom: 0.875rem;
    border: 1px solid rgba(57, 150, 145, 0.1);
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.card:hover {
    box-shadow: var(--shadow-lg);
}

.card-header {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-ultra-light);
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-header::before {
    content: '';
    width: 4px;
    height: 24px;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 2px;
}

/* Tabs Modernos - Destacados */
.tabs-wrapper {
    position: relative;
    margin-bottom: 0.875rem;
}

.tabs-scroll-btn {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 24px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.tabs-scroll-btn:hover {
    color: white;
}

.tabs-scroll-btn.left {
    left: 0;
}

.tabs-scroll-btn.right {
    right: 0;
}

.tabs-scroll-btn.visible {
    display: flex;
}

.tabs {
    display: flex;
    gap: 0.5rem;
    background: linear-gradient(135deg, #0f766e 0%, #065f46 100%);
    padding: 0.375rem;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    padding: 0.525rem 0.625rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.828rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    flex: 0 0 auto;
    white-space: nowrap;
    text-align: center;
    backdrop-filter: blur(10px);
}

.tabs-stretch .tab {
    flex: 1;
}

.tab svg {
    width: 20px;
    height: 20px;
}

.tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 1px solid white;
}

.tab:hover:not(.active) {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Formulários Modernos */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-ultra-light);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

select.form-control {
    cursor: pointer;
}

/* Editor de descrição (formatação básica) */
.editor-descricao {
    width: 100%;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: white;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.editor-descricao:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-ultra-light);
}

.editor-toolbar {
    display: flex;
    gap: 0.25rem;
    padding: 0.35rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.02);
    flex-shrink: 0;
}

.editor-toolbar button {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-color);
    cursor: pointer;
    font-size: 0.85rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}

.editor-toolbar button:hover {
    background: rgba(0, 0, 0, 0.06);
}

.editor-toolbar button.ativo {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
}

.editor-cor-container {
    position: relative;
    display: flex;
}

.editor-cor-paleta {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    z-index: 20;
    gap: 0.3rem;
    padding: 0.4rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.editor-cor-swatch {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    cursor: pointer;
    padding: 0;
}

.editor-cor-swatch:hover {
    transform: scale(1.15);
}

.editor-conteudo {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    line-height: 1.5;
    min-height: 120px;
    flex: 1;
    overflow-y: auto;
    outline: none;
}

.editor-conteudo p {
    margin: 0 0 0.5em;
}

.editor-conteudo p:last-child {
    margin-bottom: 0;
}

.editor-conteudo ul,
.editor-conteudo ol,
.descricao-texto ul,
.descricao-texto ol {
    margin: 0 0 0.5em;
    padding-left: 1.5em;
}

.editor-conteudo pre {
    margin: 0 0 0.5em;
    padding: 0.6em 0.75em;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 6px;
    font-family: var(--font-mono, monospace);
    font-size: 0.85em;
    white-space: pre-wrap;
    word-break: break-word;
}

.editor-conteudo blockquote {
    margin: 0 0 0.5em;
    padding: 0.2em 0.9em;
    border-left: 3px solid var(--primary-color);
    color: #6b7280;
    font-style: italic;
}

.editor-conteudo:empty::before {
    content: attr(data-placeholder);
    color: #9ca3af;
    pointer-events: none;
}

/* O marcador de lista (::marker, o "1."/"•" gerado pelo navegador) herda do
   estilo do próprio <li>, não do <b>/<font> dentro dele — por padrão, uma linha
   toda em negrito vira um item de lista com o número normal e só o texto em
   negrito. Cobre o caso comum (a linha inteira tem só uma formatação), tanto no
   editor quanto na exibição do chamado já salvo (.descricao-texto). Não cobre
   combinações (negrito + cor na mesma linha) para não multiplicar regras. */
.editor-conteudo li:has(> b:only-child)::marker,
.editor-conteudo li:has(> strong:only-child)::marker,
.descricao-texto li:has(> b:only-child)::marker,
.descricao-texto li:has(> strong:only-child)::marker {
    font-weight: 700;
}
.editor-conteudo li:has(> i:only-child)::marker,
.editor-conteudo li:has(> em:only-child)::marker,
.descricao-texto li:has(> i:only-child)::marker,
.descricao-texto li:has(> em:only-child)::marker {
    font-style: italic;
}
.editor-conteudo li:has(> font[color="#DC2626"]:only-child)::marker,
.descricao-texto li:has(> font[color="#DC2626"]:only-child)::marker { color: #DC2626; }
.editor-conteudo li:has(> font[color="#E8915B"]:only-child)::marker,
.descricao-texto li:has(> font[color="#E8915B"]:only-child)::marker { color: #E8915B; }
.editor-conteudo li:has(> font[color="#0BA678"]:only-child)::marker,
.descricao-texto li:has(> font[color="#0BA678"]:only-child)::marker { color: #0BA678; }
.editor-conteudo li:has(> font[color="#3F86CE"]:only-child)::marker,
.descricao-texto li:has(> font[color="#3F86CE"]:only-child)::marker { color: #3F86CE; }
.editor-conteudo li:has(> font[color="#6366F1"]:only-child)::marker,
.descricao-texto li:has(> font[color="#6366F1"]:only-child)::marker { color: #6366F1; }
.editor-conteudo li:has(> font[color="#374151"]:only-child)::marker,
.descricao-texto li:has(> font[color="#374151"]:only-child)::marker { color: #374151; }

html.dark .editor-descricao {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

html.dark .editor-toolbar {
    background: rgba(255, 255, 255, 0.03);
    border-bottom-color: var(--line-strong);
}

html.dark .editor-toolbar button {
    color: var(--ink);
}

html.dark .editor-toolbar button:hover {
    background: rgba(255, 255, 255, 0.08);
}

html.dark .editor-conteudo pre {
    background: rgba(255, 255, 255, 0.06);
}

html.dark .editor-conteudo blockquote {
    color: var(--ink-soft);
}

html.dark .editor-cor-paleta {
    background: var(--surface-2);
    border-color: var(--line-strong);
}

html.dark .editor-conteudo {
    color: var(--ink);
}

html.dark .editor-conteudo:empty::before {
    color: var(--ink-soft);
}

/* Tabela Moderna */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    min-width: 100%;
}

/* Wrapper para scroll horizontal */
.tab-content {
    overflow-x: auto;
    width: 100%;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-ultra-light) 0%, #e6f7f6 100%);
}

.table th {
    padding: 0.6rem 0.5rem;
    text-align: left;
    font-weight: 700;
    color: var(--primary-dark);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--primary-color);
}

.sort-arrow {
    opacity: 0.4;
    font-size: 0.9rem;
    margin-left: 0.25rem;
    transition: opacity 0.2s ease;
}

.table th:hover .sort-arrow {
    opacity: 1;
}

.table td {
    padding: 0.55rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 0.85rem;
}

.table tbody tr {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.table tbody tr:hover {
    background: var(--primary-ultra-light);
    transform: scale(1.01);
}

.table-clickable tbody tr {
    cursor: pointer;
}

/* Badges Modernos */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 1.5rem;
    text-transform: capitalize;
    letter-spacing: 0.5px;
}

.badge-nenhuma {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    color: #64748b;
    border: 1px solid #94a3b8;
}

.badge-baixa {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.badge-complexidade-1 {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    color: #374151;
    border: 1px solid #d1d5db;
}

.badge-complexidade-2 {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    color: #854d0e;
    border: 1px solid #facc15;
}

.badge-complexidade-3 {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #92400e;
    border: 1px solid #fb923c;
}

.badge-complexidade-4 {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
    border: 1px solid #f87171;
}

.badge-complexidade-5 {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #ffffff;
    border: 1px solid #991b1b;
}

.badge-normal {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    color: #854d0e;
    border: 1px solid #facc15;
}

.badge-media {
    background: linear-gradient(135deg, #fef9c3 0%, #fde68a 100%);
    color: #854d0e;
    border: 1px solid #facc15;
}

.badge-alta {
    background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
    color: #92400e;
    border: 1px solid #fb923c;
}

.badge-urgente {
    background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
    color: #991b1b;
    border: 1px solid #f87171;
}

/* Login Page Moderno */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    border-radius: 50%;
}

.login-container::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    border-radius: 50%;
}

.login-box {
    background: white;
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 484px;
    position: relative;
    z-index: 1;
    border-top: 4px solid var(--primary-color);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.login-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Stats Cards Modernos */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, white 0%, var(--primary-ultra-light) 100%);
    padding: 1.75rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    text-align: center;
    border: 1px solid rgba(57, 150, 145, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Modal Moderno */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 1600px;
    width: 99%;
    max-height: 97vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-ultra-light);
}

.modal-header h2 {
    color: var(--primary-color);
    font-weight: 700;
}

.modal-close {
    background: var(--primary-ultra-light);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-dark);
    transition: all 0.3s ease;
    display: flex;
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

/* ============================================
   Modal Novo Chamado - Design Moderno
   ============================================ */

/* Container principal do modal */
#modalNovo .modal-content {
    max-width: 1100px;
    width: 96%;
    max-height: 97vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    border-top: none;
    border-radius: 1rem;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

/* Header do modal */
#modalNovo .modal-header {
    padding: 0.75rem 1.75rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

#modalNovo .modal-header h2 {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

#modalNovo .modal-close {
    background: rgba(255,255,255,0.2);
    color: white;
    width: 32px;
    height: 32px;
    font-size: 1.25rem;
}

#modalNovo .modal-close:hover {
    background: rgba(255,255,255,0.35);
    color: white;
}

/* Layout de 3 colunas */
.novo-chamado-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Coluna Departamentos */
/* Coluna Navegação (menu/submenu) */
.nc-nav {
    width: 336px;
    min-width: 336px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    background: #f8fafc;
    overflow-y: auto;
    transition: width 0.3s ease, min-width 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.nc-nav.collapsed {
    width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    border-right: none;
    padding: 0;
}

.nc-col-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 1rem 1rem 0.5rem;
    flex-shrink: 0;
}

.nc-menu-list {
    flex: 1;
    overflow-y: auto;
    padding: 0 0.5rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Departamento (menu item) */
.nc-menu-dept {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    color: var(--text-color);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    line-height: 1.3;
    width: 100%;
}

.nc-menu-dept:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
}

.nc-menu-dept.expanded {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(57, 150, 145, 0.3);
}

.nc-menu-dept .nc-dept-icon {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    background: var(--primary-ultra-light);
    color: var(--primary-color);
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.nc-menu-dept.expanded .nc-dept-icon {
    background: rgba(255,255,255,0.25);
    color: white;
}

.nc-menu-dept:hover .nc-dept-icon {
    background: rgba(57, 150, 145, 0.15);
    color: var(--primary-dark);
}

.nc-menu-dept.expanded:hover .nc-dept-icon {
    background: rgba(255,255,255,0.25);
    color: white;
}

.nc-dept-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nc-chevron {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    opacity: 0.5;
}

.nc-menu-dept.expanded .nc-chevron {
    transform: rotate(90deg);
    opacity: 1;
}

/* Submenu (formulários) */
.nc-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0.5rem;
}

.nc-submenu.open {
    max-height: 2000px;
}

.nc-submenu-item {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--text-color);
    transition: all 0.15s ease;
    font-family: inherit;
    line-height: 1.3;
    width: 100%;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nc-submenu-item:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
}

.nc-submenu-item.active {
    background: rgba(57, 150, 145, 0.12);
    color: var(--primary-dark);
    font-weight: 600;
}

.nc-submenu-item.disabled {
    opacity: 0.5;
    cursor: pointer;
}

.nc-submenu-item.disabled:hover {
    background: transparent;
    color: var(--text-color);
}

.nc-submenu-empty {
    padding: 0.5rem 0.75rem 0.5rem 2.25rem;
    font-size: 0.8rem;
    color: var(--secondary-color);
    font-style: italic;
}

/* Category headers dentro do submenu */
.nc-category-header {
    padding: 0.4rem 0.75rem 0.4rem 1.5rem;
    text-align: left;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--secondary-color);
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.15s ease;
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.25rem;
}
.nc-category-header:hover {
    color: var(--primary-dark);
}
.nc-category-header.expanded {
    color: var(--primary-color);
}
.nc-cat-icon {
    font-size: 0.75rem;
}
.nc-category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
    padding-left: 0.75rem;
}
.nc-category-items.open {
    max-height: 1500px;
}

/* Breadcrumb */
.nc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #166534;
}

.nc-breadcrumb-text {
    flex: 1;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nc-breadcrumb-separator {
    color: #86efac;
    font-size: 0.75rem;
}

.nc-breadcrumb-btn {
    border: none;
    background: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    transition: all 0.15s ease;
}

.nc-breadcrumb-btn:hover {
    background: rgba(57, 150, 145, 0.1);
    text-decoration: underline;
}

/* Coluna Campos */
.nc-col-campos {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    min-width: 0;
}

.nc-campos-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem 1.75rem;
}

.nc-campos-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--secondary-color);
    text-align: center;
    padding: 2rem;
}

.nc-campos-placeholder .nc-ph-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-ultra-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.nc-campos-placeholder .nc-ph-icon svg {
    width: 36px;
    height: 36px;
    color: var(--primary-color);
    opacity: 0.7;
}

.nc-campos-placeholder p {
    font-size: 0.9rem;
    margin: 0;
    max-width: 260px;
    line-height: 1.5;
}

/* Sem formulários */
.nc-sem-formularios {
    display: none;
    padding: 1.5rem;
}

.nc-sem-formularios-inner {
    padding: 1rem 1.25rem;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: var(--radius-sm);
    color: #92400e;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#modalNovo .form-group,
#modalNovoFormulario .form-group {
    margin-bottom: 0.75rem;
}
#formNovoDirecionado .form-group {
    margin-bottom: 0.25rem;
}

/* Grid 2 colunas para campos de formulário (desktop) */
.nc-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 1.25rem;
}
.nc-form-grid .nc-form-full {
    grid-column: 1 / -1;
}
.nc-form-grid > .form-group:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

/* Rodapé com botões */
.nc-footer {
    padding: 0.75rem 1.75rem;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    flex-shrink: 0;
}

/* Mensagens Modernas */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}

/* Loading Moderno */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-weight: 500;
}

.loading::after {
    content: '';
    display: block;
    margin: 1rem auto 0;
    width: 40px;
    height: 40px;
    border: 4px solid var(--primary-ultra-light);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.chamado-em-atendimento-aviso {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
    padding: 0.6rem 0.85rem;
    background: #E2ECF9;
    border: 1px solid #BBD4F1;
    border-radius: 10px;
    color: #16549E;
    font-size: 0.813rem;
    font-weight: 600;
}

.chamado-em-atendimento-gear {
    flex-shrink: 0;
    display: inline-block;
    transform-origin: center;
    animation: spin 2.2s linear infinite;
}

html.dark .chamado-em-atendimento-aviso {
    background: #182F48;
    border-color: #193C64;
    color: #89B4E7;
}

/* Histórico Moderno */
.historico-item {
    padding: 1.25rem;
    border-left: 4px solid var(--border-color);
    margin-bottom: 1rem;
    background: var(--bg-color);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    transition: all 0.3s ease;
}

.historico-item:hover {
    background: var(--primary-ultra-light);
    border-left-color: var(--primary-color);
}

.historico-item.comentario {
    border-left-color: var(--primary-color);
    background: var(--primary-ultra-light);
}

.historico-item.mudanca_status {
    border-left-color: var(--warning-color);
}

.historico-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.historico-usuario {
    font-weight: 700;
    color: var(--primary-dark);
}

.historico-data {
    color: var(--text-light);
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Responsivo */
@media (max-width: 768px) {
    /* Container e espaçamento */
    .container {
        padding: 8px;
        max-width: 100%;
    }

    /* Header mobile */
    .header {
        margin-bottom: 0.75rem;
        padding: 0.75rem 0;
    }

    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0.5rem;
        padding: 0 12px;
        flex-wrap: nowrap;
    }

    .header h1 {
        font-size: 1.1rem;
        text-align: left;
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    /* User info mobile */
    .user-info {
        gap: 0.5rem;
        flex-wrap: nowrap;
        flex-shrink: 0;
        width: auto;
    }

    .user-name {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-bell {
        width: 36px;
        height: 36px;
        right: 10px;
    }

    .notification-bell svg {
        width: 20px;
        height: 20px;
    }

    /* Tabs mobile - layout vertical */
    .tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.5rem;
    }

    .tab {
        text-align: left;
        white-space: normal;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }

    /* Cards mobile */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
        border-radius: 0.5rem;
    }

    .card-header {
        font-size: 1rem;
        padding: 0.75rem 1rem !important;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-header .btn {
        position: static !important;
        width: 100%;
        text-align: center;
        order: -1;
    }

    /* Tabelas mobile - transformar em cards */
    .table-container {
        overflow-x: visible;
    }

    .table {
        display: none !important; /* Esconder tabela no mobile — !important pra isso nunca
            perder pra um table.style.display='table' via JS (renderizarTabelaDinamica seta isso
            incondicionalmente antes de decidir se re-esconde). Sem o !important, se o JS de
            cards falhar por qualquer motivo, a tabela larga fica visível e, combinada com
            overflow-x:visible logo abaixo, vaza e expande window.innerWidth — o que quebra
            TODA checagem isMobile() subsequente, inclusive tentativas de autocorreção. */
    }

    /* Lista de cards é vertical — remove a scrollbar horizontal herdada da tabela */
    .tab-content {
        overflow-x: visible;
    }

    /* Barra de busca do atendente — vira um ícone de filtro + bottom-sheet no mobile
       (mesmos elementos/IDs/JS do desktop, só reposicionados via CSS) */
    .busca-toggle-label {
        display: none;
    }

    #busca-toggle-header {
        padding: 0.6rem 0.75rem !important;
    }

    #busca-global-container {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        flex-direction: column !important;
        align-items: stretch !important;
        background: var(--surface) !important;
        border-radius: 1rem 1rem 0 0 !important;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18) !important;
        padding: 0.5rem 1rem 1.25rem !important;
        z-index: 2000 !important;
        max-height: 75vh !important;
        overflow-y: auto !important;
        gap: 0.6rem !important;
    }

    /* "Alça" do bottom-sheet, puramente visual */
    #busca-global-container::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        border-radius: 2px;
        background: var(--border-color);
        margin: 0.35rem auto 0.4rem;
    }

    #busca-global-container select,
    #busca-global-container input,
    #busca-global-container #buscaStatusBtn {
        width: 100% !important;
        min-width: 0 !important;
        flex: none !important;
    }

    #busca-global-container .btn {
        width: 100% !important;
        flex: none !important;
    }

    /* Cards de chamados para mobile — compactos (2 linhas), prioridade na faixa lateral */
    .chamado-card {
        background: white;
        border: 1px solid var(--border-color);
        border-left: 4px solid var(--border-color);
        border-radius: var(--radius-sm);
        padding: 0.65rem 0.8rem;
        margin-bottom: 0.5rem;
        box-shadow: var(--shadow);
        cursor: pointer;
        transition: all 0.2s ease;
    }

    .chamado-card:hover {
        box-shadow: var(--shadow-md);
        border-color: var(--primary-color);
    }

    .chamado-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.5rem;
    }

    .chamado-card-numero {
        font-size: 0.85rem;
        font-weight: 700;
        color: var(--text-light);
        display: flex;
        align-items: center;
        gap: 0.4rem;
        font-variant-numeric: tabular-nums;
    }

    .chamado-card-titulo {
        font-size: 0.88rem;
        font-weight: 600;
        color: var(--text-color);
        line-height: 1.3;
        margin-top: 0.2rem;
    }

    .chamado-card-meta {
        font-size: 0.76rem;
        color: var(--text-light);
        margin-top: 0.2rem;
    }

    .chamado-card-solicitante {
        font-size: 0.76rem;
        color: var(--text-light);
        margin-top: 0.2rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .chamado-card-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.6rem;
        padding-top: 0.6rem;
        border-top: 1px solid var(--border-color);
    }

    .chamado-card-actions .btn {
        flex: 1;
    }

    /* Indicador de não lido — leve destaque de fundo, a faixa lateral fica reservada à prioridade */
    .chamado-card.nao-lido {
        background: #fffbeb;
    }

    /* ========================================
       MENU LATERAL MOBILE (DRAWER)
       ======================================== */

    /* Botão "Orelhinha" para abrir menu - centralizado e mais baixo */
    .mobile-menu-toggle {
        position: fixed;
        left: 0;
        top: 50%;
        transform: translateY(-50%);
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: white;
        border: none;
        width: 36px;
        height: 68px;
        border-radius: 0 10px 10px 0;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
        z-index: 999;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
        padding-left: 2px;
    }

    .mobile-menu-toggle:active {
        transform: translateY(-50%) scale(0.95);
    }

    .mobile-menu-toggle svg {
        width: 22px;
        height: 22px;
        transition: transform 0.3s ease;
    }

    .mobile-menu-toggle.active svg {
        transform: rotate(180deg);
    }

    /* Menu Drawer (Sidebar) */
    .mobile-menu-drawer {
        position: fixed;
        top: 0;
        left: -280px;
        width: 280px;
        height: 100vh;
        height: 100dvh;
        background: white;
        box-shadow: 4px 0 12px rgba(0, 0, 0, 0.15);
        z-index: 1001;
        transition: left 0.3s ease;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu-drawer.active {
        left: 0;
    }

    /* Header do drawer */
    .mobile-menu-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        color: white;
        padding: 1.5rem 1rem;
        border-bottom: 3px solid var(--primary-dark);
        flex-shrink: 0;
    }

    .mobile-menu-header h2 {
        margin: 0;
        font-size: 1.1rem;
        font-weight: 700;
    }

    .mobile-menu-header p {
        margin: 0.25rem 0 0 0;
        font-size: 0.85rem;
        opacity: 0.9;
    }

    /* Itens do menu */
    .mobile-menu-items {
        flex: 1;
        padding: 0.5rem 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-menu-item {
        display: flex;
        align-items: center;
        padding: 1rem 1.25rem;
        color: var(--text-color);
        background: white;
        border: none;
        width: 100%;
        text-align: left;
        cursor: pointer;
        transition: all 0.2s ease;
        border-left: 4px solid transparent;
        gap: 0.75rem;
        font-size: 0.95rem;
        font-weight: 500;
    }

    .mobile-menu-item:hover {
        background: var(--primary-ultra-light);
        border-left-color: var(--primary-color);
    }

    .mobile-menu-item.active {
        background: linear-gradient(90deg, var(--primary-ultra-light) 0%, white 100%);
        border-left-color: var(--primary-color);
        color: var(--primary-dark);
        font-weight: 600;
    }

    .mobile-menu-group-title {
        font-size: 0.72rem;
        letter-spacing: 0.06em;
        text-transform: uppercase;
        font-weight: 700;
        color: var(--secondary-color);
        padding: 0.85rem 1.25rem 0.35rem;
    }

    .mobile-menu-group-title:first-child {
        padding-top: 0.5rem;
    }

    .mobile-menu-item-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }

    .mobile-menu-item-text {
        flex: 1;
    }

    .mobile-menu-item-badge {
        background: var(--primary-color);
        color: white;
        font-size: 0.75rem;
        font-weight: 700;
        padding: 0.25rem 0.6rem;
        border-radius: 12px;
        min-width: 24px;
        text-align: center;
    }

    .mobile-menu-item.active .mobile-menu-item-badge {
        background: var(--primary-dark);
    }

    /* Botão Sair no menu mobile */
    .mobile-menu-footer {
        padding: 1rem;
        border-top: 2px solid var(--border-color);
        flex-shrink: 0;
    }

    .mobile-menu-logout {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0.875rem 1rem;
        background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
        color: white;
        border: none;
        width: 100%;
        border-radius: var(--radius-sm);
        cursor: pointer;
        transition: all 0.3s ease;
        font-size: 0.95rem;
        font-weight: 600;
        gap: 0.5rem;
        box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
    }

    .mobile-menu-logout:active {
        transform: scale(0.98);
        box-shadow: 0 1px 2px rgba(239, 68, 68, 0.2);
    }

    .mobile-menu-logout svg {
        width: 18px;
        height: 18px;
    }

    /* Overlay escuro quando menu aberto */
    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        display: block;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Esconder tabs originais no mobile - usar menu drawer */
    .tabs {
        display: none;
    }

    /* Cards de chamados visíveis no mobile */
    .chamados-cards-container {
        display: block;
    }

    /* Botões mobile */
    .btn {
        padding: 0.65rem 1rem;
        font-size: 0.9rem;
        min-height: 44px;
        touch-action: manipulation;
    }

    .btn-sm {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
        min-height: 40px;
    }

    /* Login mobile */
    .login-box {
        padding: 2rem 1.5rem;
        max-width: 100%;
        border-radius: 0.5rem;
    }

    .login-header h1 {
        font-size: 1.75rem;
    }

    /* Stats cards mobile */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-card h3 {
        font-size: 2rem;
    }

    /* Formulários mobile */
    .form-control {
        font-size: 16px; /* Evita zoom no iOS */
    }

    /* Alertas mobile */
    .alert {
        padding: 0.85rem 1rem;
        font-size: 0.9rem;
    }

    /* Badges mobile */
    .badge {
        font-size: 0.7rem;
        padding: 0.3rem 0.7rem;
    }
}

/* Desktop - Garantir elementos desktop visíveis e mobile ocultos */
@media (min-width: 769px) {
    .chamados-cards-container,
    .chamado-card,
    .mobile-menu-toggle,
    .mobile-menu-drawer,
    .mobile-menu-overlay,
    [class*="chamado-card"],
    [id*="mobileMenu"] {
        display: none !important;
    }

    .tabs {
        display: flex !important;
    }
}

/* Mobile muito pequeno */
@media (max-width: 480px) {
    .container {
        padding: 12px;
    }

    .header h1 {
        font-size: 1.2rem;
    }

    .card {
        padding: 0.85rem;
    }

    .card-header {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.6rem 0.85rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .stat-card h3 {
        font-size: 1.75rem;
    }
}

/* Animações suaves */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-duration: 200ms;
    transition-timing-function: ease-in-out;
}

button, a, .btn {
    transition-duration: 300ms;
}

/* Notificações */
.notification-bell {
    position: relative;
    cursor: pointer;
    border-radius: 50%;
    background: white;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    z-index: 100;
    box-shadow: none;
    padding: 0;
}

.notification-bell:hover {
    opacity: 0.9;
}

.notification-bell svg {
    width: 22px;
    height: 22px;
    fill: #6b7280;
}

/* Quando tem notificações, esconde o SVG e mostra só o contador */
.notification-bell.notif-amarelo {
    border: 2px solid #1a1a1a;
}
.notification-bell.notif-vermelho {
    border: 2px solid white;
}
.notification-bell.notif-amarelo svg,
.notification-bell.notif-vermelho svg {
    display: none;
}

.notification-bell.notif-amarelo {
    background: linear-gradient(135deg, #facc15 0%, #eab308 100%);
    box-shadow: 0 4px 14px rgba(234, 179, 8, 0.5);
    animation: notifPulseYellow 1.5s ease-in-out infinite;
}
.notification-bell.notif-amarelo .notification-badge {
    color: #1a1a1a;
    text-shadow: none;
}
.notification-bell.notif-vermelho {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.5);
    animation: notifPulseRed 1.5s ease-in-out infinite;
}

@keyframes notifPulseYellow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(234, 179, 8, 0.5); }
    50% { box-shadow: 0 0 0 8px rgba(234, 179, 8, 0); }
}
@keyframes notifPulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}

.notification-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    background: none;
    min-width: auto;
    padding: 0;
    box-shadow: none;
    animation: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 360px;
    max-width: 400px;
    z-index: 10000;
    animation: slideDown 0.3s ease;
    border: 1px solid var(--border-color);
}

.notification-dropdown.active {
    display: block;
}

.notification-header {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--line);
    background: var(--surface-2);
    border-radius: var(--radius) var(--radius) 0 0;
}

.notification-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-dark);
    margin: 0;
}

.notification-list {
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    padding: 0.6rem 1rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.notification-item:hover {
    background: var(--primary-ultra-light);
}

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

.notification-item-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 0.5rem;
}

.notification-item-number {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.8rem;
}

.notification-item-count {
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    white-space: nowrap;
}

.notification-item-title {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item-time {
    font-size: 0.7rem;
    color: var(--text-light);
}

.notification-item-status-change {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 600;
}

.notification-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-light);
}

.notification-item-info .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.45rem;
    letter-spacing: 0;
}

.notification-empty {
    padding: 2rem 1.25rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

.notification-empty svg {
    width: 48px;
    height: 48px;
    margin-bottom: 0.5rem;
    opacity: 0.3;
}

/* Responsivo para notificações */
@media (max-width: 768px) {
    .notification-dropdown {
        position: fixed !important;
        top: 55px !important;
        left: 5vw !important;
        right: 5vw !important;
        width: 90vw !important;
        min-width: unset !important;
        max-width: 90vw !important;
        max-height: 70vh !important;
        overflow-y: auto !important;
    }
}

/* Campo de busca de atendentes */
.search-select-container {
    position: relative;
}

.search-select-input {
    width: 100%;
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23399691"><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>') no-repeat;
    background-position: right 0.75rem center;
    background-size: 20px;
}

.search-select-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-ultra-light);
}

.search-select-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.search-select-dropdown.active {
    display: block;
}

.search-select-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.search-select-option:last-child {
    border-bottom: none;
}

.search-select-option:hover {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
}

.search-select-option.selected {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
}

.search-select-empty {
    padding: 1rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Upload de arquivos */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-color);
}

.file-upload-area:hover {
    border-color: var(--primary-color);
    background: var(--primary-ultra-light);
}

.file-upload-area.dragover {
    border-color: var(--primary-color);
    background: var(--primary-ultra-light);
    transform: scale(1.02);
}

.file-upload-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.file-upload-text {
    color: var(--text-light);
    font-size: 0.85rem;
}

.file-upload-hint {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

.file-upload-input {
    display: none;
}

.file-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.file-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.file-item-icon {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.file-item-info {
    flex: 1;
}

.file-item-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.file-item-size {
    font-size: 0.8rem;
    color: var(--text-light);
}

.file-item-remove {
    background: var(--danger-color);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-item-remove:hover {
    background: #dc2626;
    transform: scale(1.1);
}

/* ========================================
   Painel de Plugins
   ======================================== */

.plugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.plugin-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plugin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-light) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.plugin-card:hover::before {
    transform: scaleX(1);
}

.plugin-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.plugin-card.active {
    border-color: var(--success-color);
    background: linear-gradient(135deg, white 0%, #f0fdf4 100%);
}

.plugin-card.inactive {
    opacity: 0.7;
}

.plugin-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.plugin-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 4px 8px rgba(57, 150, 145, 0.3);
}

.plugin-status {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.active {
    background: var(--success-color);
    box-shadow: 0 0 8px var(--success-color);
}

.status-indicator.inactive {
    background: var(--text-light);
}

.plugin-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0.75rem 0 0.5rem;
}

.plugin-description {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 1rem;
    min-height: 3.2rem;
}

.plugin-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.8rem;
    color: var(--text-light);
}

.plugin-version {
    background: var(--primary-ultra-light);
    color: var(--primary-dark);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-weight: 600;
}

.plugin-author {
    font-weight: 500;
}

.plugin-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.plugin-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Plugin descoberto (não instalado) */
.plugin-card.discovered {
    border-style: dashed;
    border-color: var(--warning-color);
    background: linear-gradient(135deg, white 0%, #fffbeb 100%);
}

.plugin-card.discovered .plugin-icon {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
}

/* Badge de novo plugin */
.badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

/* Área de scan de plugins */
.plugin-scan-area {
    background: linear-gradient(135deg, var(--primary-ultra-light) 0%, white 100%);
    border: 2px dashed var(--primary-color);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 2rem;
}

.plugin-scan-area .scan-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.plugin-scan-area h3 {
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
}

.plugin-scan-area p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

/* Modal de configuração de plugin */
.plugin-config-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.config-field label {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.config-field input[type="checkbox"] {
    width: auto;
    cursor: pointer;
}

.config-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.toggle-slider:hover {
    opacity: 0.9;
}

/* Empty state */
.plugins-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-light);
}

.plugins-empty-icon {
    font-size: 4rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.plugins-empty h3 {
    font-size: 1.5rem;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.plugins-empty p {
    margin-bottom: 2rem;
}

/* Loading de plugins */
.plugins-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/* Tabs de plugins */
.plugin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--primary-ultra-light);
    padding: 0.5rem;
    border-radius: var(--radius-sm);
}

.plugin-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.plugin-tab.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow);
}

.plugin-tab:hover:not(.active) {
    color: var(--primary-dark);
    background: rgba(255, 255, 255, 0.5);
}

.plugin-tab .tab-count {
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    border-radius: 1rem;
    font-weight: 700;
}

.plugin-tab.active .tab-count {
    background: var(--primary-dark);
}

/* Responsivo para plugins */
@media (max-width: 768px) {
    .plugin-grid {
        grid-template-columns: 1fr;
    }

    .plugin-tabs {
        flex-direction: column;
    }

    .plugin-scan-area {
        padding: 1.5rem;
    }
}

/* ========================================
   RESPONSIVIDADE PARA MODALS - MOBILE
   ======================================== */

/* Tablets e Mobile Grande (até 1024px) */
@media (max-width: 1024px) {
    .modal-content {
        width: 98%;
        max-width: 98%;
        max-height: 96vh;
    }
}

/* Elementos mobile — escondido no desktop */
.mobile-acoes-fab,
.mobile-acoes-sheet-overlay,
.mobile-btn-acoes {
    display: none !important;
}

/* Toggle "Detalhes": ícone de dupla seta na extremidade direita da linha de Status.
   Expande/recolhe os demais campos do chamado (ocultos por padrão, desktop e mobile). */
.det-toggle-chevron {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.25rem;
    color: #9ca3af;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.det-toggle-chevron:hover {
    color: #374151;
}
.det-toggle-chevron svg {
    transition: transform 0.2s;
}
.det-toggle-chevron.aberto svg {
    transform: rotate(180deg);
}
.mobile-campos-colapsavel {
    display: none;
}
.mobile-campos-colapsavel.mobile-campos-visivel {
    display: block;
}

/* Botão enviar mobile — sem !important para que inline style="display:none" funcione */
.mobile-btn-enviar {
    display: none;
}

/* Mobile (até 768px) */
@media (max-width: 768px) {
    /* Modal base - quase fullscreen no mobile */
    .modal {
        padding: 0;
    }

    .modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        max-height: 100dvh;
        height: 100vh;
        height: 100dvh;
        border-radius: 0;
        padding: 0;
        margin: 0;
        border-top: none;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    .modal-header {
        padding: 0.5rem 0.75rem;
        margin-bottom: 0;
        flex-shrink: 0;
        background: white;
        z-index: 10;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    /* Título do chamado: linha inteira */
    .modal-header h2 {
        font-size: 0.9rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
        flex: 1 1 60%;
        order: 1;
    }

    /* X de fechar ao lado do título */
    .modal-close {
        width: 30px;
        height: 30px;
        font-size: 1.2rem;
        order: 2;
        flex-shrink: 0;
    }

    /* Navegação abaixo do título, centralizada */
    #nav-chamados {
        order: 3;
        width: 100%;
        justify-content: center !important;
        gap: 0.5rem !important;
        margin-left: 0 !important;
        padding-top: 0.2rem;
        border-top: 1px solid #f1f5f9;
    }

    #nav-chamados .btn {
        font-size: 0.7rem !important;
        padding: 0.2rem 0.6rem !important;
        min-height: auto !important;
    }

    #nav-posicao {
        min-width: 30px !important;
        font-size: 0.65rem !important;
    }

    /* Conteúdo do modal detalhes ocupa todo espaço */
    #detalhes-content {
        flex: 1 !important;
        min-height: 0 !important;
        overflow: hidden !important;
    }

    /* Modal Novo Chamado - Layout Vertical */
    #modalNovo .modal-header {
        background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
        position: sticky;
        top: 0;
    }

    #modalNovo .modal-header h2 {
        color: white;
    }

    #modalNovo .modal-close {
        background: rgba(255,255,255,0.2);
        color: white;
    }

    .novo-chamado-body {
        flex-direction: column;
        overflow-y: auto;
        flex: 1;
        min-height: 0;
    }

    .nc-nav {
        width: 100%;
        min-width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        transition: none;
    }

    .nc-nav.collapsed {
        display: none;
    }

    .nc-col-label {
        padding: 0.75rem 0.75rem 0.5rem;
    }

    .nc-menu-dept {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .nc-menu-dept .nc-dept-icon {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
        border-radius: 4px;
    }

    .nc-submenu-item {
        font-size: 0.8rem;
        padding: 0.45rem 0.75rem 0.45rem 2rem;
    }

    .nc-category-header {
        padding-left: 1rem;
        font-size: 0.75rem;
    }

    .nc-breadcrumb {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .nc-campos-area {
        padding: 1rem;
        flex: 1;
    }

    .nc-form-grid {
        grid-template-columns: 1fr !important;
    }

    .nc-campos-placeholder .nc-ph-icon {
        width: 60px;
        height: 60px;
    }

    .nc-campos-placeholder .nc-ph-icon svg {
        width: 28px;
        height: 28px;
    }

    .nc-footer {
        padding: 0.75rem 1rem;
        position: sticky;
        bottom: 0;
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    }

    #modalNovo .btn {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    /* Modal Detalhes - Layout Vertical (1 única rolagem: ver .modal-detalhes-container abaixo) */
    .modal-detalhes-container {
        grid-template-columns: 1fr !important;
        max-height: none !important;
        height: 100%;
        display: flex !important;
        flex-direction: column !important;
        overflow-y: auto !important;
    }

    .modal-coluna-esquerda {
        display: flex !important;
        flex-direction: column !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        max-height: none !important;
        padding: 0.4rem 0.75rem !important;
        overflow: visible !important;
        flex-shrink: 0 !important;
    }

    /* Container de campos - display:contents para permitir reordenação via order */
    .campos-info {
        display: contents !important;
    }

    /* Campos básicos (Status, Chamado, Visto, Loja/Depto) - ordem 1 */
    .campo-row {
        padding: 0.2rem 0.5rem !important;
        order: 1 !important;
    }

    /* Campos extras (Atendente, Timer, etc.) - ordem 3 */
    .campo-extra {
        order: 3 !important;
    }

    /* Checklist - ordem 1: logo acima da Descrição */
    .secao-checklist {
        order: 1 !important;
        margin-bottom: 1rem;
    }

    /* Descrição - ordem 2: logo acima da Atividade (efeito de chat: descrição = 1ª mensagem) */
    .secao-descricao {
        order: 2 !important;
    }

    /* Seções extras (Anexos, etc.) - ordem 3 */
    .secao-extra-mobile {
        order: 3 !important;
    }

    /* Todas as linhas dentro do toggle "Detalhes" com a MESMA altura (ponto de equilíbrio:
       nem o espaçamento original de 0.55-0.6rem, nem o esmagado de 0.02rem).
       Escopado a .mobile-campos-colapsavel (só existe em atendente.html) para não
       afetar cliente.html/responsavel.html, que reaproveitam as mesmas classes .campo-row/.campo-extra/.campo-label. */
    .mobile-campos-colapsavel .campo-row,
    .mobile-campos-colapsavel .campo-extra {
        padding: 0.3rem 0.75rem !important;
        border-bottom: none !important;
        min-height: 0 !important;
    }

    .mobile-campos-colapsavel .campo-label {
        font-size: 0.68rem !important;
        min-width: 84px !important;
        line-height: 1.2 !important;
    }

    .mobile-campos-colapsavel .campo-row span:not(.campo-label),
    .mobile-campos-colapsavel .campo-extra span:not(.campo-label) {
        font-size: 0.78rem !important;
        line-height: 1.2 !important;
    }

    .mobile-campos-colapsavel .campo-row button,
    .mobile-campos-colapsavel .campo-extra button {
        padding: 0.2rem 0.55rem !important;
        font-size: 0.72rem !important;
        line-height: 1.2 !important;
    }

    .mobile-campos-colapsavel .campo-row select,
    .mobile-campos-colapsavel .campo-extra select {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.78rem !important;
    }

    .campo-extra-acompanhamento > div:first-child {
        gap: 0.3rem !important;
    }

    /* Atendente / Acompanhamento: os "chips" coloridos (nome + ×) ainda usavam o padding/fonte
       originais (0.25rem/0.8rem) mesmo depois da linha ter sido comprimida — eram o real motivo
       de ficarem maiores que as demais. Aperta só esses elementos aninhados. */
    .mobile-campos-colapsavel .campo-extra-atendente span:not(.campo-label),
    .mobile-campos-colapsavel .campo-extra-acompanhamento span:not(.campo-label) {
        padding: 0.08rem 0.5rem !important;
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
        gap: 0.2rem !important;
    }

    .mobile-campos-colapsavel .campo-extra-atendente button,
    .mobile-campos-colapsavel .campo-extra-acompanhamento button {
        padding: 0.06rem 0.4rem !important;
        font-size: 0.66rem !important;
    }

    .mobile-campos-colapsavel .campo-extra-atendente > div,
    .mobile-campos-colapsavel .campo-extra-acompanhamento > div:first-child > div {
        gap: 0.3rem !important;
    }

    /* Agendamento: texto da data/checkbox "notificar" também eram maiores que o resto */
    .mobile-campos-colapsavel .campo-extra-agendamento span {
        font-size: 0.72rem !important;
    }

    .mobile-campos-colapsavel .campo-extra-agendamento button {
        font-size: 0.68rem !important;
    }

    /* Status row compacto */
    .campo-status {
        padding: 0.25rem 0.5rem !important;
        margin-bottom: 0 !important;
        border-radius: 6px !important;
    }

    /* Labels menores */
    .campo-label {
        min-width: 70px !important;
        font-size: 0.73rem !important;
    }

    /* Campos extras no mobile (Atendente, Timer, etc.) */
    .campo-extra,
    .secao-extra-mobile {
        font-size: 0.75rem !important;
    }

    /* Descrição visível no mobile */
    .secao-descricao {
        margin-bottom: 0.5rem !important;
        margin-top: 0.3rem !important;
        flex: none !important;
        border-top: 1px solid #e5e7eb !important;
        padding-top: 0.4rem !important;
    }

    .secao-descricao h3 {
        font-size: 0.8rem !important;
        margin-bottom: 0.3rem !important;
    }

    .descricao-texto {
        font-size: 0.8rem !important;
        padding: 0.6rem !important;
        min-height: 60px !important;
        max-height: none !important;
        overflow: visible !important;
    }

    .modal-coluna-direita {
        flex: none !important;
        min-height: 0 !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: visible !important;
    }

    /* Área de atividades no modal detalhes — flui dentro da rolagem única do container pai
       (fundo branco, igual ao desktop) */
    .area-atividades {
        flex: none;
        min-height: 0;
        display: flex;
        flex-direction: column;
        overflow: visible;
        background: white;
    }

    .atividade-timeline {
        flex: none !important;
        max-height: none !important;
        min-height: 0 !important;
        overflow: visible !important;
        padding: 0.5rem 0.75rem !important;
    }

    /* Footer de comentário fixo na base da rolagem única (via position:sticky) */
    .area-comentario-footer {
        flex-shrink: 0 !important;
        position: sticky !important;
        bottom: 0 !important;
        z-index: 5;
    }

    /* Ocultar Visualizou Em no mobile */
    .campo-visualizou {
        display: none !important;
    }

    /* Cabeçalho atividade compacto */
    .atividade-header {
        padding: 0.25rem 0.75rem !important;
        border-bottom-width: 1px !important;
    }

    .atividade-header h3 {
        font-size: 0.8rem !important;
    }

    .atividade-header label span {
        font-size: 0.7rem !important;
    }

    /* Área de comentário footer - compacta */
    .area-comentario-footer {
        padding: 0.5rem 0.75rem !important;
    }

    /* Botão toggle ações oculto no mobile — ações sempre visíveis */
    .btn-toggle-acoes {
        display: none !important;
    }

    /* Esconder painel inline no mobile — ações vão para o FAB */
    .acoes-chamado-panel {
        display: none !important;
    }

    /* FAB de ações mobile */
    .mobile-acoes-fab {
        position: fixed;
        bottom: 16px;
        left: 16px;
        width: 52px;
        height: 52px;
        border-radius: 50%;
        background: #2563eb;
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(0,0,0,0.3);
        z-index: 10001;
        cursor: pointer;
        display: none;
        align-items: center;
        justify-content: center;
        font-size: 1.5rem;
    }

    .mobile-acoes-fab.visible {
        display: flex !important;
    }

    /* Bottom sheet de ações */
    .mobile-acoes-sheet-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 10002;
        display: none;
        align-items: flex-end;
    }

    .mobile-acoes-sheet-overlay.active {
        display: flex !important;
    }

    .mobile-acoes-sheet {
        width: 100%;
        max-height: 70vh;
        background: white;
        border-radius: 16px 16px 0 0;
        padding: 0.5rem 0;
        overflow-y: auto;
        animation: slideUp 0.25s ease;
    }

    .mobile-acoes-sheet-grid {
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.4rem;
        padding: 0.5rem 0.75rem;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .mobile-acoes-sheet-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1.25rem 0.75rem;
        border-bottom: 1px solid #e2e8f0;
        font-weight: 600;
        color: #334155;
        font-size: 0.95rem;
    }

    .mobile-acoes-sheet-close {
        background: none;
        border: none;
        font-size: 1.25rem;
        color: #94a3b8;
        cursor: pointer;
        padding: 0.25rem;
    }

    .mobile-acoes-sheet-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.35rem;
        padding: 0.65rem 0.4rem;
        border: none;
        background: #f8fafc;
        border-radius: 10px;
        text-align: center;
        font-size: 0.8rem;
        color: #1e293b;
        cursor: pointer;
    }

    .mobile-acoes-sheet-item:active {
        background: #e2e8f0;
    }

    .mobile-acoes-sheet-item .acoes-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .mobile-acoes-sheet-item:disabled {
        opacity: 0.4;
        cursor: not-allowed;
    }

    /* Super admin datetime compacto */
    .super-admin-datetime {
        margin-bottom: 0.35rem !important;
    }

    /* Toolbar comentário: datetime menor + elementos mais juntos */
    .area-comentario-footer input[type="datetime-local"] {
        max-width: 170px !important;
        font-size: 0.7rem !important;
        padding: 0.2rem 0.3rem !important;
    }

    .area-comentario-footer label {
        font-size: 0.65rem !important;
        padding: 0.15rem 0.35rem !important;
    }

    .area-comentario-footer select {
        font-size: 0.7rem !important;
        padding: 0.15rem 0.25rem !important;
    }

    /* Botão enviar dentro do textarea - mobile */
    .mobile-btn-enviar {
        display: flex;
        position: absolute;
        bottom: 6px;
        right: 6px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: var(--primary-color);
        color: white;
        border: none;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 5;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

    .mobile-btn-enviar:disabled {
        background: #d1d5db;
        cursor: not-allowed;
        opacity: 0.5;
    }

    .area-comentario-footer textarea {
        padding-right: 2.5rem !important;
    }

    /* Botão Ações abaixo do textarea - mobile */
    .mobile-btn-acoes {
        display: block !important;
        width: 100%;
        padding: 0.5rem;
        margin-top: 0.4rem;
        background: #1e293b;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 500;
        cursor: pointer;
    }

    /* Campo de comentário na área de atividade - compacto no mobile */
    .modal-coluna-direita textarea,
    .area-comentario-footer textarea,
    .textarea-comentario {
        font-size: 16px !important;
        min-height: 64px !important;
        max-height: 80px !important;
        padding: 0.6rem !important;
        border-radius: 8px !important;
    }

    /* Anexos */
    .anexo-item {
        flex-wrap: wrap !important;
    }

    .anexo-item > div:first-child {
        width: 50px !important;
        height: 50px !important;
    }

    /* Modal de Notificação de Validação */
    #modalNotificacaoConteudo {
        width: 95% !important;
        padding: 20px !important;
        max-height: 90vh;
        overflow-y: auto;
    }

    #modalNotificacaoConteudo h2 {
        font-size: 1.25rem !important;
    }

    #modalNotificacaoConteudo p {
        font-size: 0.95rem !important;
    }

    #btnCienteValidacao {
        width: 100%;
        padding: 14px 20px !important;
        font-size: 1rem !important;
    }

    /* Formulários em modais */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        font-size: 16px !important; /* Evita zoom no iOS */
        padding: 0.75rem;
    }

    textarea.form-control {
        min-height: 100px;
    }

    /* Textarea do comentário no modal detalhes - não precisa ser tão alto quanto outros forms */
    textarea.form-control.textarea-comentario {
        min-height: 72px !important;
    }

    /* Tabelas em modais */
    .modal table {
        font-size: 0.8rem;
    }

    .modal table th,
    .modal table td {
        padding: 0.5rem;
    }

    /* Badges em modais */
    .modal .badge {
        font-size: 0.65rem;
        padding: 0.3rem 0.7rem;
    }

    /* Scroll suave em modais */
    .modal-content,
    .modal-content * {
        -webkit-overflow-scrolling: touch;
    }

    /* Ajuste de z-index para evitar problemas */
    .modal {
        z-index: 9999;
    }

    /* Botões maiores para toque em mobile */
    .modal .btn-sm {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        min-height: 44px; /* Recomendação Apple para touch targets */
    }

    .modal .btn {
        min-height: 48px;
        touch-action: manipulation;
    }


    /* Enviar mantém texto */
    .acoes-chamado-panel .btn-primary {
        font-size: 0.75rem !important;
        gap: 0.25rem !important;
    }

    /* Toggle ações e enviar não herdam min-height grande */
    .btn-toggle-acoes {
        min-height: 34px !important;
    }
}

/* Mobile Pequeno (até 480px) */
@media (max-width: 480px) {
    .modal-header {
        padding: 0.75rem;
    }

    .modal-header h2 {
        font-size: 1rem;
    }

    .modal-close {
        width: 28px;
        height: 28px;
        font-size: 1.2rem;
    }

    /* Coluna esquerda compacta em 480px */
    .modal-coluna-esquerda {
        padding: 0.3rem 0.5rem !important;
    }

    /* Botões empilhados em telas muito pequenas */
    .nc-footer {
        flex-direction: column !important;
    }

    .nc-footer .btn {
        width: 100%;
    }

    /* Botões de ação ainda menores */
    .acoes-chamado-panel .btn,
    .acoes-chamado-panel .btn-sm {
        font-size: 0 !important;
        padding: 0.25rem 0.4rem !important;
        min-height: 28px !important;
        min-width: auto !important;
        gap: 0 !important;
    }

    /* Lista de anexos mais compacta */
    .anexo-item {
        padding: 0.5rem !important;
    }

    /* Área de validação */
    .area-validacao {
        padding: 1rem !important;
    }

    .area-validacao .btn {
        padding: 0.7rem !important;
        font-size: 0.85rem !important;
    }
}

/* Landscape em mobile (orientação horizontal) */
@media (max-width: 768px) and (orientation: landscape) {
    .modal-content {
        max-height: 100vh;
        max-height: 100dvh;
        overflow-y: auto;
    }

    /* Modal de detalhes mantém a rolagem única definida no bloco portrait (não reintroduzir max-height/overflow aqui) */
}

/* Ajustes para telas touch em geral */
@media (hover: none) and (pointer: coarse) {
    /* Aumentar áreas de toque */
    .modal button,
    .modal a,
    .modal .form-control {
        min-height: 44px;
    }

    /* Remover hover effects em touch devices */
    .modal .btn:hover {
        transform: none;
    }

    .modal-close:hover {
        transform: none;
    }

    /* Melhorar feedback visual em toque */
    .modal .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
}

/* ============================================================
   ====================  REDESIGN V2  =========================
   Overrides ousados no fim do arquivo (vencem por ordem).
   "Console Operacional Editorial"
   ============================================================ */

/* ---- Tipografia ---- */
h1, h2, h3, .card-header, .login-header h1 {
    font-family: var(--font-display);
    letter-spacing: -0.02em;
}
::selection { background: var(--brand-bright); color: var(--ink); }

/* números tabulares/mono onde dá identidade de "console" */
.table td { font-variant-numeric: tabular-nums; }
.tab-count, .notification-badge, .badge { font-family: var(--font-mono); }

/* ---- Header TESTE: sem textura, mesma cor do fundo, sem divisor ---- */
.header {
    background: transparent;
    border-bottom: none;
    box-shadow: none;
    padding: 1.1rem 0;
    position: relative;
}
.header::after { display: none; }
.header h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
    text-shadow: none;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 55%, var(--ink) 140%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
.user-name, .user-menu-btn {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--ink) !important;
    border-radius: 999px;
    backdrop-filter: none;
}
.user-menu-btn:hover { background: var(--surface-2); }
/* Sino moderno: retângulo arredondado, fundo igual ao da página (transparente) + borda fina */
.notification-bell {
    width: 46px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: transparent;
    box-shadow: none;
    transition: border-color 0.18s;
}
.notification-bell:hover {
    background: transparent;
    border-color: var(--line-strong);
    opacity: 1;
}
.notification-bell svg { fill: var(--ink-soft); }

/* Estado de alerta: SEM retângulo amarelo/vermelho — sino segue vazado com o ícone,
   e a contagem aparece num badge pequeno no canto */
.notification-bell.notif-amarelo,
.notification-bell.notif-vermelho {
    background: transparent !important;
    box-shadow: none !important;
    border: 1px solid var(--line) !important;
    animation: none !important;
}
.notification-bell.notif-amarelo svg,
.notification-bell.notif-vermelho svg {
    display: block !important;
    fill: var(--ink-soft) !important;
}
.notification-bell .notification-badge {
    top: -7px; right: -7px; left: auto; bottom: auto;
    transform: none;
    min-width: 17px; height: 17px; line-height: 17px;
    padding: 0 4px;
    border-radius: 999px;
    font-size: 0.6rem; font-weight: 700;
    text-align: center;
    color: #fff; text-shadow: none;
    box-shadow: 0 0 0 2px var(--paper);
}
.notification-bell.notif-amarelo .notification-badge { background: #E0A226; color: #1a1a1a; }
.notification-bell.notif-vermelho .notification-badge { background: var(--signal); color: #fff; }

/* ---- Header CLEAR (GLOBAL p/ todos os painéis): texto do usuário em tinta + pill ----
   Selectors por id com !important vencem os atributos inline "color:#ffffff" das páginas
   (atendente, gestor, tarefas, admin, arquivo, tags). Para cliente/responsavel o texto
   vem de .user-name (já tinta via regra acima). Aplica em qualquer página que linke este CSS. */
#userName, #userNameText, #userRating,
#deptoAtivoNome, #deptoSelectorContainer span {
    color: var(--ink) !important;
}
#userName {
    height: 42px;
    justify-content: center;
    border-radius: var(--radius-sm) !important;
    padding: 0 0.85rem !important;
    line-height: 1.1 !important;
    gap: 0;
}
#userNameText { font-size: 0.78rem; font-weight: 600; }
#userRating { font-size: 0.6rem !important; }
#deptoAtivoNome { font-size: 0.68rem !important; }

/* ---- Botões: cantos confiantes, sombra rica, foco visível ---- */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.18s cubic-bezier(.2,.8,.2,1), box-shadow 0.18s, background 0.18s;
}
.btn-primary {
    background: linear-gradient(135deg, var(--primary-light) -10%, var(--primary-color) 45%, var(--primary-dark) 120%);
    box-shadow: 0 6px 16px rgba(7, 97, 74, 0.28), 0 1px 0 rgba(255,255,255,0.25) inset;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(7, 97, 74, 0.34); }
.btn-secondary { border: 1.5px solid var(--line-strong); color: var(--ink); background: var(--surface); }
.btn-secondary:hover { background: var(--surface-2); border-color: var(--primary-color); color: var(--primary-dark); }
.btn-danger { background: linear-gradient(135deg, #ff7a5e 0%, var(--signal) 55%, var(--signal-deep) 120%); box-shadow: 0 6px 16px rgba(216, 52, 27, 0.26); }
.btn:focus-visible { outline: 2px solid var(--brand-bright); outline-offset: 2px; }

/* ---- Cards: superfície quente, borda fina, hover com halo de marca ---- */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.card:hover { box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.card-header::before {
    background: linear-gradient(180deg, var(--brand-bright), var(--primary-dark));
    width: 5px; height: 26px; border-radius: 3px;
}

/* ---- Tabs como segmented control claro ---- */
.tabs {
    background: var(--surface-2);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.3rem;
    gap: 0.25rem;
    box-shadow: inset 0 1px 2px rgba(20,24,27,0.04);
}
.tab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--ink-soft);
    border-radius: 999px;
    backdrop-filter: none;
    font-weight: 600;
}
.tab:hover:not(.active) {
    background: rgba(20, 24, 27, 0.05);
    color: var(--ink);
    transform: none;
}
.tab.active {
    background: var(--surface);
    color: var(--primary-dark);
    border: 1px solid var(--line);
    box-shadow: 0 4px 10px rgba(20,24,27,0.10), 0 0 0 1px rgba(11,166,120,0.18);
}
.tab-count {
    background: rgba(11, 166, 120, 0.12);
    color: var(--primary-dark);
    border-radius: 999px;
    padding: 0 0.4rem;
    font-size: 0.72rem;
}

/* ---- Tabelas: cabeçalho papel, tinta, indicador de marca ---- */
.table thead { background: var(--surface-2); }
.table th {
    color: var(--ink);
    border-bottom: 1.5px solid var(--primary-color);
    letter-spacing: 0.06em;
    font-size: 0.72rem;
}
.table td { border-bottom: 1px solid var(--line); }
.table tbody tr { transition: background 0.15s ease; }
.table tbody tr:hover { background: var(--primary-ultra-light); transform: none; }

/* ---- Formulários ---- */
.form-control {
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-sm);
    background: var(--surface);
}
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(11, 166, 120, 0.16);
}

/* ---- Badges: planos, caixa-alta, mono ---- */
.badge {
    border-radius: 0.5rem;
    text-transform: uppercase;
    font-size: 0.62rem;
    letter-spacing: 0.06em;
    border-width: 1px;
    box-shadow: none;
}

/* ---- Status no grid: tints planos modernos, um hue distinto por status ---- */
.badge-novo                 { background: #E1EEE8; color: #156139; border-color: #BBD9C9; }
.badge-em_atendimento       { background: #E2ECF9; color: #16549E; border-color: #BBD4F1; }
.badge-em_fila              { background: #EEEAFE; color: #5D44BC; border-color: #D7CEFD; }
.badge-aguardando_resposta  { background: #FAEDDF; color: #A55A05; border-color: #F4D6B4; }
.badge-respondido           { background: #E0F2F0; color: #0B766C; border-color: #B7E1DD; }
.badge-reaberto             { background: #FAE3ED; color: #A61E5A; border-color: #F4BED6; }
.badge-aguardando_validacao { background: #F1E4FC; color: #7027B2; border-color: #DFC2F9; }
.badge-fechado              { background: #ECEDEE; color: #515761; border-color: #D3D5D9; }
.badge-cancelado            { background: #FAE3E3; color: #A71D1D; border-color: #F4BEBE; }
.badge-transferido          { background: #E6E6F4; color: #302E80; border-color: #C5C5E5; }
.badge-agendado             { background: #F0ECE6; color: #69532D; border-color: #DCD3C4; }
.badge-em_lista             { background: #E7E9EC; color: #364150; border-color: #C8CCD2; }

/* prioridade / complexidade — harmonizadas (pastel, mesma família de tom dos
   badges de status acima). Prioridade também carrega uma bolinha (ver
   cliente.html/responsavel.html) na cor "cheia" — precisa do fundo pastel pra
   não desaparecer nele (fundo sólido da mesma cor escondia a bolinha). */
.badge-nenhuma, .badge-complexidade-1 { background: #EEECE4; color: #5A5F55; border-color: #DAD4C4; }
.badge-baixa              { background: #E1EEE8; color: #156139; border-color: #BBD9C9; }
.badge-normal, .badge-media { background: #E2ECF9; color: #16549E; border-color: #BBD4F1; }
.badge-complexidade-2 { background: #FBEFCB; color: #8A5A00; border-color: #F1D688; }
.badge-alta { background: #FDE6D4; color: #9A4A1E; border-color: #F6C49C; }
.badge-complexidade-3 { background: #FDE6D4; color: #9A4A1E; border-color: #F6C49C; }
.badge-complexidade-4     { background: #FFE2DB; color: #B5301A; border-color: #FCC0B2; }
.badge-urgente { background: #FAE3E3; color: #A71D1D; border-color: #F4BEBE; }
.badge-complexidade-5 { background: var(--signal); color: #ffffff; border-color: var(--signal-deep); }

/* ---- Login: cena ousada — tinta + malha esmeralda + caixa flutuante ---- */
.login-container {
    background: var(--ink);
    background-image:
        radial-gradient(60% 60% at 85% 15%, rgba(45, 224, 166, 0.35) 0%, transparent 55%),
        radial-gradient(55% 55% at 10% 90%, rgba(11, 166, 120, 0.30) 0%, transparent 60%),
        radial-gradient(40% 40% at 50% 50%, rgba(255, 84, 54, 0.10) 0%, transparent 70%);
}
.login-container::before {
    width: 720px; height: 720px;
    background: radial-gradient(circle, rgba(45,224,166,0.18) 0%, transparent 70%);
    top: -260px; right: -260px;
}
.login-container::after {
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(11,166,120,0.16) 0%, transparent 70%);
    bottom: -200px; left: -200px;
}
.login-box {
    background: var(--surface);
    border-radius: 1.4rem;
    border-top: none;
    padding: 3rem 3rem 1.25rem;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255,255,255,0.06);
    position: relative;
    overflow: hidden;
}
.login-box::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 5px;
    background: linear-gradient(90deg, var(--brand-bright), var(--primary-color) 50%, var(--signal));
}
.login-header { margin-bottom: 2rem; }
.login-header h1 {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 2.05rem;
    letter-spacing: -0.04em;
    color: var(--ink);
}
.login-header h1::after {
    content: '';
    display: block;
    width: 44px; height: 4px;
    margin: 0.75rem auto 0;
    border-radius: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--brand-bright));
}
.login-box .btn-primary { width: 100%; justify-content: center; padding: 0.85rem; font-size: 1rem; }

/* ---- Scrollbar com identidade ---- */
* { scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-color); background-clip: content-box; }

/* ============================================================
   =================  FIM REDESIGN V2  ========================
   ============================================================ */


/* ============================================================
   MODO ESCURO (dark) — via classe html.dark.
   Ativado (gated id=10) no atendente e nos paineis do menu sanduiche,
   EXCETO Relatorios. Inerte onde .dark nao e aplicado.
   ============================================================ */
        html.dark {
            --paper: #0F1417;  --bg-color: #0F1417;
            --surface: #171D21;  --surface-2: #1E252A;
            --ink: #E6E9EB;  --text-color: #E6E9EB;
            --ink-soft: #9BA3A9;  --text-light: #9BA3A9;
            --line: #2A3238;  --line-strong: #3A434B;  --border-color: #2A3238;
            --primary-color: #14C892;  --primary-dark: #0BA678;  --primary-light: #2DE0A6;
            --primary-ultra-light: rgba(45,224,166,0.14);  --brand-bright: #2DE0A6;
            color-scheme: dark;
        }
        html.dark body { background: var(--paper); color: var(--ink); }

        /* Catch-all: fundos claros inline -> superfície escura */
        html.dark [style*="background: white"], html.dark [style*="background:white"],
        html.dark [style*="background:#fff"],   html.dark [style*="background: #fff"],
        html.dark [style*="background:#ffffff"], html.dark [style*="background: #ffffff"],
        html.dark [style*="background:#f8fafc"], html.dark [style*="background: #f8fafc"],
        html.dark [style*="background:#f9fafb"], html.dark [style*="background: #f9fafb"],
        html.dark [style*="background:#f1f5f9"], html.dark [style*="background: #f1f5f9"],
        html.dark [style*="background:#f3f4f6"], html.dark [style*="background: #f3f4f6"],
        html.dark [style*="background:#fff5f5"], html.dark [style*="background: #eff6ff"] {
            background-color: var(--surface) !important;
        }
        /* Texto escuro inline -> claro */
        html.dark [style*="color: #374151"], html.dark [style*="color:#374151"],
        html.dark [style*="color: #1f2937"], html.dark [style*="color: #111827"],
        html.dark [style*="color: #334155"], html.dark [style*="color: #475569"],
        html.dark [style*="color: #1e293b"], html.dark [style*="color: #0f172a"],
        html.dark [style*="color: #4b5563"] {
            color: var(--ink) !important;
        }
        html.dark [style*="color: #6b7280"], html.dark [style*="color: #64748b"],
        html.dark [style*="color: #94a3b8"], html.dark [style*="color: #9ca3af"],
        html.dark [style*="color: #666"], html.dark [style*="color:#666"] {
            color: var(--ink-soft) !important;
        }
        /* Bordas claras -> linha escura */
        html.dark [style*="solid #e5e7eb"], html.dark [style*="solid #e2e8f0"],
        html.dark [style*="solid #f1f5f9"], html.dark [style*="solid #f3f4f6"],
        html.dark [style*="solid #cbd5e1"], html.dark [style*="solid #d1d5db"],
        html.dark [style*="solid #ddd"] {
            border-color: var(--line) !important;
        }
        html.dark [style*="background: #e5e7eb"], html.dark [style*="background:#e5e7eb"],
        html.dark [style*="background: #e2e8f0"], html.dark [style*="background:#e2e8f0"] {
            background-color: var(--surface-2) !important;
        }

        /* Equivalentes rgb(): quando a cor acima é setada via JS (el.style.background = '#hex',
           .cssText, onmouseover inline etc.), o navegador re-serializa o atributo style para
           rgb() — os seletores hex acima não batem mais nesses casos (ex.: hover "Adicionar
           acompanhante", preview de anexo no comentário). Mesmos alvos, valor rgb(). */
        html.dark [style*="background: rgb(255, 255, 255)"],
        html.dark [style*="background: rgb(248, 250, 252)"],
        html.dark [style*="background: rgb(249, 250, 251)"],
        html.dark [style*="background: rgb(241, 245, 249)"],
        html.dark [style*="background: rgb(243, 244, 246)"],
        html.dark [style*="background: rgb(255, 245, 245)"],
        html.dark [style*="background: rgb(239, 246, 255)"] {
            background-color: var(--surface) !important;
        }
        html.dark [style*="color: rgb(55, 65, 81)"],
        html.dark [style*="color: rgb(31, 41, 55)"],
        html.dark [style*="color: rgb(17, 24, 39)"],
        html.dark [style*="color: rgb(51, 65, 85)"],
        html.dark [style*="color: rgb(71, 85, 105)"],
        html.dark [style*="color: rgb(30, 41, 59)"],
        html.dark [style*="color: rgb(15, 23, 42)"] {
            color: var(--ink) !important;
        }
        html.dark [style*="color: rgb(107, 114, 128)"],
        html.dark [style*="color: rgb(100, 116, 139)"],
        html.dark [style*="color: rgb(148, 163, 184)"],
        html.dark [style*="color: rgb(156, 163, 175)"] {
            color: var(--ink-soft) !important;
        }
        html.dark [style*="border-color: rgb(229, 231, 235)"], html.dark [style*="solid rgb(229, 231, 235)"],
        html.dark [style*="border-color: rgb(226, 232, 240)"], html.dark [style*="solid rgb(226, 232, 240)"],
        html.dark [style*="border-color: rgb(203, 213, 225)"], html.dark [style*="solid rgb(203, 213, 225)"],
        html.dark [style*="border-color: rgb(209, 213, 219)"], html.dark [style*="solid rgb(209, 213, 219)"] {
            border-color: var(--line) !important;
        }
        /* Hover de "excluir"/perigo (linhas de lista com fundo rosa claro ao passar o mouse) */
        html.dark [style*="background: #fef2f2"], html.dark [style*="background:#fef2f2"],
        html.dark [style*="background: rgb(254, 242, 242)"] {
            background-color: rgba(255,84,54,.14) !important;
        }
        /* Caixas de erro (anexo que falhou ao carregar, badge "Inativo" em formulários):
           variante "background: #fff5f5" (com espaço) não batia com o catch-all acima
           (só cobria a versão sem espaço) — ficava com fundo rosa claro no escuro. */
        html.dark [style*="background: #fff5f5"] {
            background-color: rgba(255,84,54,.14) !important; border-color: rgba(255,84,54,.35) !important;
        }
        html.dark [style*="background: #fee2e2"], html.dark [style*="background:#fee2e2"] {
            background-color: rgba(255,84,54,.16) !important;
        }

        /* Componentes por classe (style.css usa tokens, mas reforçamos onde há cor crua) */
        html.dark .menu-dropdown,
        html.dark .notification-dropdown,
        html.dark .mencao-dropdown { background: var(--surface) !important; border-color: var(--line) !important; }
        html.dark .menu-dropdown a { color: var(--ink) !important; }
        html.dark .form-control { background: var(--surface-2) !important; color: var(--ink); border-color: var(--line-strong); }
        html.dark .form-control::placeholder { color: var(--ink-soft); }
        html.dark .table thead { background: var(--surface-2) !important; }
        html.dark .table th { color: var(--ink) !important; }
        html.dark .table tbody tr { background-color: var(--surface) !important; }
        /* Hover na grid (dark): realce sutil sobre a própria superfície escura — sem forçar
           texto preto, que deixava badges sem classe (ex.: chip de Atendente) ilegíveis. */
        html.dark .table tbody tr:hover { background-color: var(--surface-2) !important; }
        html.dark .card, html.dark .gestor-stat { background: var(--surface) !important; }
        /* Modais (detalhe do chamado, novo chamado, etc.): conteúdo escuro */
        html.dark .modal-content { background: var(--surface) !important; }
        html.dark .modal-header { border-bottom-color: var(--line) !important; }
        /* Detalhe do chamado: container/colunas escuros (eram brancos por classe) */
        html.dark .modal-detalhes-container { background: var(--surface) !important; }
        html.dark .modal-coluna-esquerda { border-right-color: var(--line) !important; }
        /* Caption "Faz parte de um grupo" (modal agendar) + cores claras avulsas */
        html.dark [style*="background: #e6f4f3"] { background-color: rgba(11,166,120,.14) !important; border-color: rgba(11,166,120,.4) !important; color: var(--ink) !important; }
        html.dark [style*="background: #e0f2fe"] { background-color: rgba(2,132,199,.16) !important; }
        html.dark [style*="background: #d1fae5"] { background-color: rgba(45,224,166,.16) !important; }
        /* Caixas de destaque verde-claro (ex.: "Criar chamado a partir deste email",
           carrinho de itens de estoque do chamado) — mesmo padrão de e6f4f3 acima */
        html.dark [style*="background: #f0fdf4"], html.dark [style*="background:#f0fdf4"] {
            background-color: rgba(11,166,120,.14) !important;
        }
        html.dark [style*="border: 1px solid #bbf7d0"], html.dark [style*="border:1px solid #bbf7d0"],
        html.dark [style*="border-top: 1px solid #bbf7d0"], html.dark [style*="solid #bbf7d0"],
        html.dark [style*="border: 1px solid #86efac"], html.dark [style*="solid #86efac"] {
            border-color: rgba(11,166,120,.4) !important;
        }
        html.dark [style*="color: #166534"], html.dark [style*="color:#166534"] { color: #6FD9A8 !important; }
        /* Link "Alterar data" no popover de agendamento (det-popover): azul escuro ilegível no fundo escuro */
        html.dark [style*="color:#0369a1"], html.dark [style*="color: #0369a1"] { color: #7DC2F0 !important; }
        /* Cards de totais (.stat-card): preto não tão escuro, SEM gradiente */
        html.dark .stat-card { background: #20272D !important; border-color: var(--line) !important; box-shadow: 0 1px 4px rgba(0,0,0,0.4) !important; }
        /* Linhas do grid com destaque (status) ficam translúcidas no escuro */
        html.dark tr[style*="background-color: #"] { background-image: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)); }

        /* Status badges: versões translúcidas (claro demais no escuro) */
        html.dark .badge { filter: saturate(1.1); }
        html.dark .badge-novo                 { background:#18332A!important; color:#88BCA1!important; border-color:#194231!important; }
        html.dark .badge-em_atendimento       { background:#182F48!important; color:#89B4E7!important; border-color:#193C64!important; }
        html.dark .badge-em_fila              { background:#2D2A50!important; color:#BAA9FB!important; border-color:#3D3473!important; }
        html.dark .badge-aguardando_resposta  { background:#42311B!important; color:#EBB87E!important; border-color:#613F17!important; }
        html.dark .badge-respondido           { background:#153939!important; color:#82CBC4!important; border-color:#144D4A!important; }
        html.dark .badge-reaberto             { background:#421F34!important; color:#EC8FB8!important; border-color:#612142!important; }
        html.dark .badge-aguardando_validacao { background:#32224D!important; color:#C795F4!important; border-color:#46256D!important; }
        html.dark .badge-fechado              { background:#293036!important; color:#B2B6BD!important; border-color:#373D45!important; }
        html.dark .badge-cancelado            { background:#421F22!important; color:#ED8E8E!important; border-color:#622023!important; }
        html.dark .badge-transferido          { background:#20243F!important; color:#9B9AD2!important; border-color:#262954!important; }
        html.dark .badge-agendado             { background:#302F27!important; color:#C2B399!important; border-color:#433B2B!important; }
        html.dark .badge-em_lista             { background:#222931!important; color:#9FA7B1!important; border-color:#29323C!important; }

        /* Balões de conversa (cores claras inline -> translúcido escuro, mantém borda de acento) */
        html.dark [style*="background: #E3F6EE"] { background-color:rgba(11,166,120,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #FCEFE4"] { background-color:rgba(232,145,91,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #E8F1FB"] { background-color:rgba(63,134,206,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #FBF1D6"] { background-color:rgba(224,162,38,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #E9E9FB"] { background-color:rgba(99,102,241,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #F8F8FF"] { background-color:rgba(99,102,241,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #FF5436"] { color:#fff!important; }
        /* Comentários (ícone de papel): tint claro inline -> translúcido escuro */
        html.dark [style*="background: #DFF3ED"] { background-color:rgba(11,166,120,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #E6EFF9"] { background-color:rgba(63,134,206,.16)!important; color:var(--ink)!important; }
        html.dark [style*="background: #E6E4EE"] { background-color:rgba(61,44,122,.16)!important; color:var(--ink)!important; }

        /* Scrollbar escura */
        html.dark * { scrollbar-color: var(--line-strong) transparent; }
        html.dark ::-webkit-scrollbar-thumb { background: var(--line-strong); }

        /* ---- Ajustes pós-validação: tons mais escuros ---- */
        /* Destaques (pulse) das abas — versões escuras (eram pastéis claros) */
        html.dark .tab-atendendo-azul:not(.active)   { background: rgba(22,163,74,.20) !important;  border-color:#1F9D57 !important; color:#74E2AE !important; }
        html.dark .tab-fila-amarelo:not(.active)     { background: rgba(202,138,4,.20) !important;  border-color:#B5820B !important; color:#F0C66E !important; }
        html.dark .tab-respondidos-azul:not(.active) { background: rgba(2,132,199,.20) !important;  border-color:#1F84C0 !important; color:#7DC2F0 !important; }
        html.dark .tab-novos-cinza:not(.active)      { background: #fcd9d9 !important; border-color:#9ca3af !important; color:#374151 !important; }
        html.dark .tab.tab-agrupados-due:not(.active){ background: rgba(124,58,237,.24) !important;  border-color:#6D3FD0 !important; color:#C4A8F5 !important; }

        /* Badges de prioridade/complexidade — versões escuras (faltavam) */
        html.dark .badge-nenhuma, html.dark .badge-complexidade-1 { background:rgba(148,163,184,.14)!important; color:#AEB6BE!important; border-color:rgba(148,163,184,.28)!important; }
        html.dark .badge-baixa                       { background:rgba(0,128,29,.20)!important; color:#6FD98C!important; border-color:rgba(0,128,29,.40)!important; }
        html.dark .badge-normal, html.dark .badge-media { background:rgba(16,40,140,.24)!important; color:#8FA5F5!important; border-color:rgba(16,40,140,.48)!important; }
        html.dark .badge-complexidade-2 { background:rgba(245,165,36,.16)!important; color:#EDBF65!important; border-color:rgba(245,165,36,.30)!important; }
        html.dark .badge-alta { background:rgba(255,128,78,.20)!important; color:#FFB18F!important; border-color:rgba(255,128,78,.40)!important; }
        html.dark .badge-complexidade-3 { background:rgba(251,140,90,.16)!important; color:#F2AE85!important; border-color:rgba(251,140,90,.30)!important; }
        html.dark .badge-complexidade-4              { background:rgba(255,84,54,.16)!important; color:#FF8B73!important; border-color:rgba(255,84,54,.32)!important; }
        html.dark .badge-urgente { background:rgba(255,9,0,.24)!important; color:#FF9389!important; border-color:rgba(255,9,0,.48)!important; }
        html.dark .badge-complexidade-5 { background:rgba(255,84,54,.28)!important; color:#FFCBC0!important; border-color:rgba(255,84,54,.5)!important; }

        /* Texto escuro inline SEM espaço (ex.: box Carga da Equipe) -> claro */
        html.dark [style*="color:#374151"], html.dark [style*="color:#334155"], html.dark [style*="color:#475569"],
        html.dark [style*="color:#1f2937"], html.dark [style*="color:#1e293b"], html.dark [style*="color:#111827"],
        html.dark [style*="color:#0f172a"] { color: var(--ink) !important; }
        html.dark [style*="color:#64748b"], html.dark [style*="color:#6b7280"], html.dark [style*="color:#94a3b8"],
        html.dark [style*="color:#9ca3af"] { color: var(--ink-soft) !important; }
        /* contadores coloridos da Carga da Equipe: clarear azul/âmbar p/ contraste no escuro */
        html.dark [style*="color:#2563eb"], html.dark [style*="color: #2563eb"] { color:#7FA8EE !important; }
        html.dark [style*="color:#a16207"], html.dark [style*="color: #a16207"] { color:#E0B25A !important; }

        /* Menu sanduíche: um pouco mais claro que o preto total + hover legível */
        html.dark .menu-dropdown { background: #242B31 !important; }
        html.dark .menu-dropdown a:hover { background: #2E373F !important; color: var(--ink) !important; }

        /* Abas em destaque (pulse): remover a "bolinha" do contador (texto não aparecia dentro) */
        html.dark .tab[class*="-azul"] .tab-count,
        html.dark .tab[class*="-amarelo"] .tab-count,
        html.dark .tab[class*="-cinza"] .tab-count,
        html.dark .tab.tab-agrupados-due .tab-count {
            background: transparent !important;
            color: inherit !important;
            padding: 0 !important;
        }

        /* ---- Modais/janelas: botões de ação (tints) -> versões escuras ---- */
        html.dark [style*="background: #FBF1DC"] { background-color: rgba(245,165,36,.18)!important; color:#F0C66E!important; border-color:rgba(245,165,36,.40)!important; }
        html.dark [style*="background: #EBE5FB"] { background-color: rgba(139,92,246,.18)!important; color:#C4A8F5!important; border-color:rgba(139,92,246,.40)!important; }
        html.dark [style*="background: #E6E7FB"] { background-color: rgba(99,102,241,.18)!important; color:#A6A8F5!important; border-color:rgba(99,102,241,.40)!important; }
        html.dark [style*="background: #D6F3EF"] { background-color: rgba(20,200,146,.16)!important; color:#5BE3BC!important; border-color:rgba(20,200,146,.35)!important; }
        html.dark [style*="background: #EFEBE1"] { background-color: rgba(148,163,184,.16)!important; color:#C4CCD4!important; border-color:rgba(148,163,184,.32)!important; }
        html.dark [style*="background: #FFE2DB"] { background-color: rgba(255,84,54,.18)!important; color:#FF8B73!important; border-color:rgba(255,84,54,.40)!important; }

        /* ---- Modais: boxes de alerta âmbar (validação/sussurro) ---- */
        html.dark [style*="background-color: #fff3cd"], html.dark [style*="background: #fff3cd"],
        html.dark [style*="background-color: #fef3c7"], html.dark [style*="background: #fef3c7"],
        html.dark [style*="background:#fffbeb"], html.dark [style*="background: #fffbeb"],
        html.dark [style*="background: #fef9c3"] {
            background-color: rgba(245,165,36,.12) !important; border-color: rgba(245,165,36,.35) !important;
        }
        html.dark [style*="color: #856404"], html.dark [style*="color:#856404"],
        html.dark [style*="color: #92400e"], html.dark [style*="color:#92400e"],
        html.dark [style*="color: #78350f"], html.dark [style*="color: #854d0e"] { color:#E8C47A !important; }

        /* ---- Modais: títulos/links em azul-escuro -> claro ---- */
        html.dark [style*="color: #1e40af"], html.dark [style*="color:#1e40af"],
        html.dark [style*="color: #1d4ed8"], html.dark [style*="color: #2563eb"] { color:#8FBEF8 !important; }

        /* Orelhinha "Carga da Equipe": número em branco no escuro */
        html.dark #carga-icon { color: #fff !important; }

        /* Chips de acompanhante (badges) — tints escuros */
        html.dark [style*="background: #dbeafe"] { background-color: rgba(96,165,250,.16) !important; }
        html.dark [style*="background: #dcfce7"] { background-color: rgba(45,224,166,.16) !important; }
        html.dark [style*="color: #059669"], html.dark [style*="color:#059669"] { color:#5BE3BC !important; }

/* ============================================================
   MENU SANDUÍCHE — sem divisórias entre itens; só separador antes de "Sair"
   (vale para todos os painéis; claro e escuro)
   ============================================================ */
.menu-dropdown a { border-top: none !important; border-bottom: none !important; }
.menu-dropdown > div[style*="height: 1px"] { display: none !important; }
.menu-dropdown a[onclick*="logout"] { border-top: 1px solid var(--line) !important; }

/* DARK: ícones do menu em branco (corrige o Gestor com stroke fixo); "Sair" em vermelho */
html.dark .menu-dropdown a svg { stroke: var(--ink) !important; }
html.dark .menu-dropdown a[onclick*="logout"] { color: #ef4444 !important; }
html.dark .menu-dropdown a[onclick*="logout"] svg { stroke: #ef4444 !important; }

/* Login: título menor no mobile (a regra v2 fica fora de media query e estava grande demais no celular) */
@media (max-width: 600px) {
    .login-header h1 { font-size: 1.55rem; letter-spacing: -0.03em; }
}
@media (max-width: 380px) {
    .login-header h1 { font-size: 1.35rem; }
}

/* Cursor de espera enquanto envia comentário/anexos (pode demorar com arquivos grandes) */
body.cursor-aguardando, body.cursor-aguardando * { cursor: wait !important; }

