:root {
    --jr-bg: #f5f7fa;
    --jr-card: #ffffff;
    --jr-text: #333333;
    --jr-muted: #64748b;
    --jr-border: #e3e8ef;
    --jr-primary: #2196f3;
    --jr-primary-dark: #1976d2;
    --jr-primary-soft: #eaf4ff;
    --jr-orange: #ff9800;
    --jr-red: #f44336;
    --jr-green: #2eaa57;
    --jr-shadow: 0 1px 3px rgba(0, 0, 0, .15);
}

html[data-theme="dark"] {
    --jr-bg: #121212;
    --jr-card: #1e1e1e;
    --jr-text: #eaeaea;
    --jr-muted: #b1b1b1;
    --jr-border: #353535;
    --jr-primary: #42a5f5;
    --jr-primary-dark: #2196f3;
    --jr-primary-soft: #17395d;
    --jr-shadow: 0 1px 4px rgba(0, 0, 0, .4);
}

* {
    box-sizing: border-box;
    font-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    background: var(--jr-bg);
    color: var(--jr-text);
    font-size: 14px;
}

a {
    color: inherit;
}

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

button,
select {
    cursor: pointer;
}

/* =========================================================
   CABEÇALHO - MESMA BASE VISUAL DO HELPDESK JR
========================================================= */
.header {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 57px;
    background: var(--jr-card);
    border-bottom: 1px solid var(--jr-border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 2000;
}

.logo {
    position: absolute;
    left: 20px;
    display: flex;
    align-items: center;
}

.logo img {
    height: 41px;
    width: auto;
    object-fit: contain;
}

.menu {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 14px;
}

.menu > a,
.config-btn {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    color: #444;
    text-decoration: none;
    background: transparent;
    border: 0;
    transition: .18s;
    white-space: nowrap;
}

html[data-theme="dark"] .menu > a,
html[data-theme="dark"] .config-btn {
    color: #dddddd;
}

.menu > a:hover,
.menu > a.ativo,
.config-btn:hover,
.config-btn.ativo {
    color: var(--jr-primary);
}

.menu svg,
.config-btn svg,
.notificacao-btn svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: 0 0 auto;
}

.menu-separador {
    color: #7f8a96;
    font-size: 16px;
}

.config-menu {
    position: relative;
    display: flex;
    align-items: center;
}

.config-seta {
    width: 14px !important;
    height: 14px !important;
    transition: transform .18s ease;
}

.config-btn.ativo-dropdown .config-seta {
    transform: rotate(180deg);
}

.config-dropdown {
    display: none;
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translateX(-50%);
    width: 255px;
    padding: 8px;
    background: var(--jr-card);
    border: 1px solid var(--jr-border);
    border-radius: 10px;
    box-shadow: 0 12px 32px rgba(20, 42, 74, .18);
    z-index: 2300;
}

.config-dropdown.aberto {
    display: block;
}

.config-dropdown::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 50%;
    width: 12px;
    height: 12px;
    background: var(--jr-card);
    border-left: 1px solid var(--jr-border);
    border-top: 1px solid var(--jr-border);
    transform: translateX(-50%) rotate(45deg);
}

.config-dropdown a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 11px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--jr-text);
}

.config-dropdown a:hover {
    background: var(--jr-primary-soft);
    color: var(--jr-primary-dark);
}

.config-dropdown a + a {
    margin-top: 3px;
}

.config-icone {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--jr-primary-dark);
    background: var(--jr-primary-soft);
}

.config-icone svg {
    width: 19px;
    height: 19px;
    fill: currentColor;
}

.config-texto {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.config-texto strong {
    font-size: 13px;
    font-weight: 600;
}

.config-texto small {
    margin-top: 2px;
    color: var(--jr-muted);
    font-size: 11px;
    line-height: 1.3;
}

.botao-container {
    position: absolute;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}

.notificacao-btn {
    position: relative;
    display: flex;
    color: #444;
    text-decoration: none;
}

html[data-theme="dark"] .notificacao-btn {
    color: #dddddd;
}

.notificacao-btn:hover {
    color: var(--jr-primary);
}

.notificacao-count {
    position: absolute;
    top: -10px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f10d18;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.user {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--jr-text);
}

.user-btn img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.user-btn span {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.user-btn b {
    font-size: 11px;
    font-weight: 400;
}

.dropdown {
    display: none;
    position: absolute;
    top: 44px;
    right: 0;
    min-width: 205px;
    padding: 7px;
    background: var(--jr-card);
    border: 1px solid var(--jr-border);
    border-radius: 8px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .15);
    z-index: 2300;
}

.dropdown.aberto {
    display: block;
}

.dropdown-user {
    display: flex;
    flex-direction: column;
    padding: 8px 9px 10px;
    border-bottom: 1px solid var(--jr-border);
    margin-bottom: 5px;
}

.dropdown-user strong {
    font-size: 13px;
}

.dropdown-user small {
    color: var(--jr-muted);
    font-size: 11px;
    margin-top: 3px;
    text-transform: capitalize;
}

.dropdown a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.dropdown a:hover {
    background: var(--jr-primary-soft);
    color: var(--jr-primary-dark);
}

.dropdown .dropdown-sair:hover {
    background: #fff1f2;
    color: #c62828;
}

.menu-mobile-btn {
    display: none;
    width: 36px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: 7px;
    background: transparent;
}

.menu-mobile-btn span {
    display: block;
    height: 2px;
    margin: 4px 0;
    background: var(--jr-text);
    border-radius: 3px;
}

.menu-overlay {
    display: none;
}

/* =========================================================
   ESTRUTURA DA PÁGINA
========================================================= */
.app-shell {
    min-height: calc(100vh - 57px);
    display: flex;
    flex-direction: column;
}

.conteudo {
    min-height: calc(100vh - 57px);
    display: flex;
    flex-direction: column;
}

.pagina {
    width: 100%;
    max-width: 1260px;
    margin: 0 auto;
    padding: 26px 20px 70px;
    flex: 1;
}

.footer-app {
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-top: 1px solid var(--jr-border);
    background: var(--jr-card);
    color: #64748b;
    font-size: 11px;
    text-align: center;
}

/* =========================================================
   COMPONENTES GERAIS
========================================================= */
.alerta {
    padding: 11px 13px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
}

.alerta-sucesso {
    background: #eaf7ed;
    border-color: #b9dfc3;
    color: #216e35;
}

.alerta-erro {
    background: #f8d7da;
    border-color: #f1b7bc;
    color: #721c24;
}

.alerta-aviso {
    background: #fff8e1;
    border-color: #ffe08a;
    color: #7a5600;
}

.alerta-info {
    background: #e8f4fd;
    border-color: #b8dcf7;
    color: #175b8c;
}

.card {
    background: var(--jr-card);
    border: 1px solid var(--jr-border);
    border-radius: 7px;
    box-shadow: var(--jr-shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    min-height: 66px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--jr-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.card-header h2,
.card-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.card-header p {
    margin: 4px 0 0;
    color: var(--jr-muted);
    font-size: 12px;
}

.card-body {
    padding: 20px;
}

.card-vazio {
    padding: 50px 20px;
    text-align: center;
}

.card-vazio .icone-vazio {
    color: #8ca0b3;
    font-size: 38px;
}

.card-vazio h3 {
    margin: 12px 0 5px;
}

.card-vazio p {
    color: var(--jr-muted);
    margin: 0 0 18px;
}

.btn {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    line-height: 1;
    transition: .15s;
}

.btn:hover {
    filter: brightness(.96);
}

.btn-primario {
    background: var(--jr-primary);
    color: #fff;
    border-color: var(--jr-primary);
}

.btn-secundario {
    background: #607d8b;
    color: #fff;
    border-color: #607d8b;
}

.btn-perigo {
    background: #e53935;
    color: #fff;
    border-color: #e53935;
}

.btn-sm {
    min-height: 29px;
    padding: 6px 10px;
    font-size: 12px;
}

.btn-laranja {
    background: var(--jr-orange);
    color: #fff;
    border-color: var(--jr-orange);
}

.badge-contador {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border-radius: 12px;
    background: #e3f2fd;
    color: #1976d2;
    font-size: 12px;
    font-weight: 600;
}

.toolbar,
.toolbar form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.toolbar select,
.toolbar input,
.filtro-unidade select {
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid #cfd8e3;
    border-radius: 18px;
    background: var(--jr-card);
    color: var(--jr-text);
    outline: none;
    font-size: 12px;
}

.toolbar select:focus,
.toolbar input:focus,
.filtro-unidade select:focus {
    border-color: var(--jr-primary);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, .12);
}

.campo-busca input {
    width: 220px;
}

.filtros-painel {
    padding: 11px 20px;
    background: #fafbfd;
    border-bottom: 1px solid var(--jr-border);
}

html[data-theme="dark"] .filtros-painel {
    background: #181818;
}

.filtros-painel form {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* =========================================================
   TABELAS E CHAMADOS
========================================================= */
.tabela-wrap {
    width: 100%;
    overflow-x: auto;
}

.tabela {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.tabela thead {
    background: #f7f8fa;
}

html[data-theme="dark"] .tabela thead {
    background: #252525;
}

.tabela th {
    padding: 12px 10px;
    color: #5e6b78;
    font-size: 11px;
    font-weight: 600;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}

html[data-theme="dark"] .tabela th {
    color: #b9c2ca;
}

.tabela td {
    padding: 12px 10px;
    border-top: 1px solid #edf0f3;
    vertical-align: middle;
    line-height: 1.35;
}

html[data-theme="dark"] .tabela td {
    border-color: #323232;
}

.tabela tbody tr:hover {
    background: rgba(33, 150, 243, .035);
}

.tabela small {
    color: var(--jr-muted);
    font-size: 11px;
}

.link-id {
    color: var(--jr-primary-dark);
    font-weight: 600;
    text-decoration: none;
}

.titulo-chamado {
    min-width: 210px;
    max-width: 360px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.titulo-chamado strong {
    font-weight: 500;
}

.titulo-chamado small {
    display: block;
    color: var(--jr-muted);
}

.badge-status,
.badge-prioridade {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.status-aberto {
    background: #e3f2fd;
    color: #1976d2;
}

.status-atendimento {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-aguardando {
    background: #fff3e0;
    color: #e65100;
}

.status-concluido {
    background: #e8f5e9;
    color: #1b7a31;
}

.status-cancelado,
.status-neutro {
    background: #eceff1;
    color: #546e7a;
}

.prioridade-urgente {
    background: #ffebee;
    color: #c62828;
}

.prioridade-alta {
    background: #fff3e0;
    color: #e65100;
}

.prioridade-normal {
    background: #e3f2fd;
    color: #1976d2;
}

.prioridade-baixa {
    background: #eceff1;
    color: #546e7a;
}

.acoes-tabela {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.chamados-mobile {
    display: none;
}

.chamado-card-mobile {
    padding: 14px;
    border: 1px solid var(--jr-border);
    border-radius: 7px;
    background: var(--jr-card);
    box-shadow: var(--jr-shadow);
}

.chamado-card-mobile + .chamado-card-mobile {
    margin-top: 10px;
}

.chamado-mobile-top,
.chamado-mobile-top > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.chamado-mobile-top > div {
    justify-content: flex-start;
}

.chamado-mobile-meta {
    display: grid;
    gap: 5px;
    color: var(--jr-muted);
    font-size: 12px;
}

.chamado-mobile-acoes {
    display: flex;
    gap: 7px;
    margin-top: 12px;
}

/* =========================================================
   FORMULÁRIOS
========================================================= */
.form-grid,
.form-grid-3 {
    display: grid;
    gap: 16px;
}

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.campo {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.campo.full {
    grid-column: 1 / -1;
}

.campo label {
    color: #4c5b69;
    font-size: 12px;
    font-weight: 600;
}

html[data-theme="dark"] .campo label {
    color: #d6d6d6;
}

.campo input,
.campo select,
.campo textarea {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid #cbd6e2;
    border-radius: 5px;
    background: var(--jr-card);
    color: var(--jr-text);
    outline: none;
    transition: .15s;
}

.campo textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.45;
}

.campo input:focus,
.campo select:focus,
.campo textarea:focus {
    border-color: var(--jr-primary);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, .12);
}

.campo small,
.ajuda {
    color: var(--jr-muted);
    font-size: 11px;
    font-weight: 400;
}

.obrigatorio {
    color: #e53935;
}

.acoes-form {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.categorias-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.categoria-radio {
    position: relative;
}

.categoria-radio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.categoria-radio label {
    min-height: 78px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border: 1px solid #dbe2ea;
    border-radius: 6px;
    background: var(--jr-card);
    cursor: pointer;
    transition: .15s;
}

.categoria-radio label:hover {
    border-color: #8dc7f5;
    background: #f7fbff;
}

html[data-theme="dark"] .categoria-radio label:hover {
    background: #242b31;
}

.categoria-radio input:checked + label {
    border-color: var(--jr-primary);
    box-shadow: inset 0 0 0 1px var(--jr-primary);
    background: var(--jr-primary-soft);
    color: var(--jr-primary-dark);
}

.cat-icone {
    width: 38px;
    height: 38px;
    min-width: 38px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf6ff;
    color: #1976d2;
    font-size: 20px;
}

.upload-box {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    position: relative;
    border: 1px dashed #9dbbd2;
    border-radius: 6px;
    background: #f8fbfe;
    color: #536779;
    text-align: center;
    padding: 15px;
}

html[data-theme="dark"] .upload-box {
    background: #20252a;
}

.upload-box input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.preview-grid,
.anexos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(135px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.preview-arquivo,
.anexo {
    overflow: hidden;
    border: 1px solid var(--jr-border);
    border-radius: 6px;
    background: var(--jr-card);
}

.preview-arquivo img,
.anexo img {
    width: 100%;
    height: 105px;
    display: block;
    object-fit: cover;
}

.preview-arquivo small,
.anexo-info {
    display: block;
    padding: 7px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--jr-muted);
    font-size: 10px;
}

.preview-pdf,
.anexo-pdf {
    height: 105px;
    display: grid;
    place-items: center;
    background: #fff1f2;
    color: #c62828;
    font-weight: 700;
}

/* =========================================================
   DETALHES, HISTÓRICO E CONFIGURAÇÕES
========================================================= */
.detalhe-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr);
    gap: 20px;
    align-items: start;
}

.painel-lateral {
    position: sticky;
    top: 78px;
}

.resumo-chamado,
.info-box,
.responsavel-box,
.descricao-box {
    padding: 14px;
    border: 1px solid var(--jr-border);
    border-radius: 6px;
    background: #fafbfd;
    line-height: 1.55;
}

html[data-theme="dark"] .resumo-chamado,
html[data-theme="dark"] .info-box,
html[data-theme="dark"] .responsavel-box,
html[data-theme="dark"] .descricao-box {
    background: #242424;
}

.descricao-box {
    white-space: pre-wrap;
}

.timeline {
    position: relative;
    padding-left: 22px;
}

.timeline::before {
    content: "";
    position: absolute;
    left: 7px;
    top: 8px;
    bottom: 8px;
    width: 2px;
    background: #d9e6f0;
}

.timeline-item {
    position: relative;
    padding: 0 0 18px 10px;
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -20px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--jr-primary);
    border: 2px solid var(--jr-card);
    box-shadow: 0 0 0 2px #b9ddf8;
}

.timeline-item-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 5px;
}

.timeline-item-top small {
    color: var(--jr-muted);
}

/* =========================================================
   INDICADORES E RELATÓRIOS - BASE VISUAL DA TV JR
========================================================= */
.grid-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    min-height: 105px;
    position: relative;
    overflow: hidden;
    padding: 17px 19px;
    border: 1px solid var(--jr-border);
    border-radius: 7px;
    background: var(--jr-card);
    box-shadow: var(--jr-shadow);
}

.stat-card::after {
    content: "";
    position: absolute;
    top: -38px;
    right: -25px;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: #edf7ff;
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--jr-muted);
    font-size: 12px;
}

.stat-icone {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    position: relative;
    z-index: 2;
    border-radius: 9px;
    background: #eaf4ff;
    color: var(--jr-primary-dark);
    font-weight: 700;
    font-size: 18px;
}

.stat-card > strong {
    display: block;
    margin: 8px 0 1px;
    position: relative;
    z-index: 2;
    font-size: 26px;
}

.stat-card > span {
    position: relative;
    z-index: 2;
    color: var(--jr-muted);
    font-size: 11px;
}

.stat-card.laranja .stat-icone {
    background: #fff3e0;
    color: #e65100;
}

.stat-card.verde .stat-icone {
    background: #e8f5e9;
    color: #2e7d32;
}

.grafico-barras {
    display: grid;
    gap: 12px;
}

.barra-item {
    display: grid;
    grid-template-columns: minmax(100px, 160px) 1fr 35px;
    gap: 10px;
    align-items: center;
}

.barra-label {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
}

.barra-trilho {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e8edf2;
}

.barra-preenchimento {
    height: 100%;
    border-radius: inherit;
    background: var(--jr-primary);
}

.barra-numero {
    font-weight: 700;
    text-align: right;
}

/* =========================================================
   LOGIN - MESMO PADRÃO DO HELPDESK
========================================================= */
.login-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #f5f7fa;
}

.login-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-apresentacao {
    display: none;
}

.login-form-area {
    width: 100%;
    max-width: 400px;
    padding: 40px 30px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, .1);
    text-align: center;
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.login-logo img {
    width: 120px;
}

.login-logo div {
    display: none;
}

.login-form-area h2 {
    margin: 0 0 8px;
    color: #2196f3;
    font-size: 24px;
}

.login-form-area > p {
    margin: 0 0 20px;
    color: #64748b;
    font-size: 13px;
}

.login-form-area form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    text-align: left;
}

.login-form-area .btn-primario {
    width: 100%;
    min-height: 42px;
    margin-top: 3px;
    border-color: #ff7a59;
    background: #ff7a59;
}

.login-form-area .btn-primario:hover {
    background: #e06a45;
}

.senha-wrap {
    position: relative;
}

.senha-wrap input {
    padding-right: 42px;
}

.senha-toggle {
    position: absolute;
    top: 50%;
    right: 5px;
    width: 34px;
    height: 32px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #607d8b;
}

.login-rodape {
    margin-top: 22px;
    padding-top: 15px;
    border-top: 1px solid #edf0f3;
    color: #64748b;
    font-size: 11px;
}

/* =========================================================
   RESPONSIVO
========================================================= */
@media (max-width: 1180px) {
    .menu {
        gap: 10px;
        font-size: 12px;
    }

    .user-btn span {
        display: none;
    }

    .botao-container {
        right: 14px;
    }

    .logo {
        left: 14px;
    }
}

@media (max-width: 920px) {
    body.menu-aberto {
        overflow: hidden;
    }

    .header {
        justify-content: flex-start;
        padding: 0 66px;
    }

    .logo {
        position: static;
        margin: 0 auto;
    }

    .menu-mobile-btn {
        display: block;
        position: absolute;
        left: 14px;
    }

    .menu {
        position: fixed;
        top: 57px;
        left: -285px;
        width: 275px;
        height: calc(100vh - 57px);
        padding: 14px;
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
        overflow-y: auto;
        background: var(--jr-card);
        border-right: 1px solid var(--jr-border);
        box-shadow: 8px 0 25px rgba(0, 0, 0, .13);
        transition: left .2s ease;
        z-index: 2200;
    }

    .menu.aberto {
        left: 0;
    }

    .menu > a,
    .config-btn {
        width: 100%;
        min-height: 45px;
        padding: 9px 11px;
        border-radius: 7px;
        font-size: 14px;
    }

    .menu > a:hover,
    .menu > a.ativo,
    .config-btn:hover,
    .config-btn.ativo {
        background: var(--jr-primary-soft);
    }

    .menu-separador {
        display: none;
    }

    .config-menu {
        display: block;
    }

    .config-dropdown {
        position: static;
        width: 100%;
        transform: none;
        margin-top: 3px;
        box-shadow: none;
        border-radius: 7px;
    }

    .config-dropdown::before {
        display: none;
    }

    .menu-overlay {
        display: block;
        position: fixed;
        inset: 57px 0 0;
        z-index: 2100;
        background: rgba(15, 23, 42, .42);
        opacity: 0;
        pointer-events: none;
        transition: .2s;
    }

    .menu-overlay.visivel {
        opacity: 1;
        pointer-events: auto;
    }

    .botao-container {
        right: 12px;
    }

    .notificacao-btn {
        display: none;
    }

    .pagina {
        padding: 18px 14px 50px;
    }

    .grid-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .categorias-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .form-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detalhe-grid {
        grid-template-columns: 1fr;
    }

    .painel-lateral {
        position: static;
    }
}

@media (max-width: 700px) {
    .card-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px;
    }

    .card-body {
        padding: 14px;
    }

    .toolbar,
    .toolbar form,
    .filtros-painel form {
        width: 100%;
        justify-content: stretch;
    }

    .toolbar input,
    .toolbar select,
    .filtros-painel input,
    .filtros-painel select,
    .campo-busca,
    .campo-busca input {
        width: 100%;
    }

    .toolbar .btn,
    .filtros-painel .btn {
        flex: 1;
    }

    .chamados-desktop {
        display: none;
    }

    .chamados-mobile {
        display: block;
        padding: 12px;
    }

    .form-grid,
    .form-grid-3,
    .grid-stats {
        grid-template-columns: 1fr;
    }

    .categorias-grid {
        grid-template-columns: 1fr 1fr;
    }

    .categoria-radio label {
        min-height: 67px;
        padding: 9px;
    }

    .cat-icone {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 17px;
    }

    .acoes-form {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .acoes-form .btn,
    .acoes-form button {
        width: 100%;
    }

    .barra-item {
        grid-template-columns: 100px 1fr 30px;
    }
}

@media (max-width: 430px) {
    .header {
        padding: 0 56px;
    }

    .logo img {
        height: 37px;
    }

    .user-btn img {
        width: 30px;
        height: 30px;
    }

    .user-btn b {
        display: none;
    }

    .categorias-grid {
        grid-template-columns: 1fr;
    }

    .chamado-mobile-top {
        align-items: flex-start;
    }

    .footer-app {
        font-size: 10px;
    }
}

/* Ajustes específicos do painel no padrão do Helpdesk */
.chamados-principal {
    margin-top: 0;
}

.dashboard-cabecalho {
    min-height: 66px;
}

.card-titulo-helpdesk {
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-titulo-helpdesk > svg {
    width: 20px;
    height: 20px;
    fill: var(--jr-text);
}

.card-titulo-helpdesk h2 {
    white-space: nowrap;
}

.dashboard-acoes,
.filtro-unidade-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filtro-unidade-form label {
    color: #607d8b;
    font-size: 12px;
    font-weight: 600;
}

.btn-abrir {
    border-radius: 18px;
    padding-left: 14px;
    padding-right: 14px;
}

.tabela-helpdesk .usuario-coluna {
    max-width: 150px;
    font-weight: 500;
    text-transform: uppercase;
}

.responsavel-link {
    color: #1976d2;
    font-weight: 600;
    text-decoration: none;
}

.texto-suave {
    color: var(--jr-muted);
    font-size: 11px;
}

@media (max-width: 700px) {
    .dashboard-acoes,
    .filtro-unidade-form {
        width: 100%;
    }

    .filtro-unidade-form label {
        width: 100%;
    }

    .filtro-unidade-form select,
    .dashboard-acoes .btn {
        width: 100%;
    }

    .card-titulo-helpdesk {
        flex-wrap: wrap;
    }

    .card-titulo-helpdesk h2 {
        white-space: normal;
    }
}
