:root {
    --sidebar-width: 240px;
    --sidebar-collapsed: 62px;
    --topbar-height: 64px;
}

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

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

body {
    overflow: hidden;
}

.mdi-wrapper {
    display: flex;
    height: 100vh;
    min-height: 0;
}

.mdi-sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--azul-escuro);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    overflow: hidden;
    transition: width var(--transition), transform var(--transition);
}

.mdi-sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .95rem .85rem;
    background: var(--azul-escuro-sombra);
    border-bottom: 1px solid var(--sidebar-border);
}

.brand-mark {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
    color: #fff;
    text-decoration: none;
    flex: 1;
}

.brand-icon {
    width: 34px;
    height: 34px;
    border-radius: 0;
    display: grid;
    place-items: center;
    background: transparent;
    flex: 0 0 34px;
}

.brand-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-text {
    font-size: .92rem;
    font-weight: 800;
    line-height: 1.1;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.brand-text small {
    display: block;
    color: var(--azul-200);
    font-size: .68rem;
    font-weight: 500;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: .55rem 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--azul-escuro-sombra);
}

.nav-section-title {
    color: var(--azul-300);
    font-size: .62rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 1rem .9rem .25rem;
    white-space: nowrap;
    transition: opacity var(--transition);
}

.nav-item-wrap {
    position: relative;
}

.nav-link-item {
    width: 100%;
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .55rem .9rem;
    border: 0;
    border-left: 3px solid transparent;
    background: transparent;
    color: var(--sidebar-text);
    cursor: pointer;
    font-size: .82rem;
    font-weight: 600;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.nav-link-item:hover,
.nav-link-item.active {
    background: var(--azul-escuro-sombra);
    color: #fff;
}

.nav-link-item.active {
    border-left-color: var(--azul);
}

.nav-icon {
    width: 20px;
    flex: 0 0 20px;
    text-align: center;
    font-size: 1rem;
}

.nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity var(--transition);
}

.nav-chevron {
    font-size: .72rem;
    transition: transform var(--transition), opacity var(--transition);
}

.nav-submenu-toggle[aria-expanded="true"] .nav-chevron {
    transform: rotate(90deg);
}

.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    background: var(--azul-escuro-sombra);
    transition: max-height .28s ease;
}

.sidebar-submenu.open {
    max-height: 520px;
}

.sidebar-submenu .nav-link-item {
    min-height: 34px;
    padding: .42rem .9rem .42rem 2.65rem;
    border-left: 0;
    font-size: .78rem;
    font-weight: 500;
}

.sidebar-footer {
    border-top: 1px solid var(--sidebar-border);
    padding: .75rem .85rem;
}

.profile-pill {
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: .55rem;
    color: var(--azul-100);
    background: rgba(255, 255, 255, .06);
    border-radius: 8px;
    padding: .45rem .55rem;
    font-size: .74rem;
    white-space: nowrap;
}

.profile-pill i {
    color: var(--gold-solid);
}

.mdi-sidebar.collapsed .brand-text,
.mdi-sidebar.collapsed .nav-label,
.mdi-sidebar.collapsed .nav-chevron,
.mdi-sidebar.collapsed .nav-section-title,
.mdi-sidebar.collapsed .profile-pill span {
    opacity: 0;
    pointer-events: none;
}

.mdi-sidebar.collapsed .sidebar-submenu {
    display: none;
}

.mdi-sidebar.collapsed .nav-item-wrap:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-collapsed) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--azul);
    color: #fff;
    padding: .35rem .7rem;
    border-radius: 6px;
    font-size: .78rem;
    white-space: nowrap;
    z-index: 2000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}

.mdi-main {
    flex: 1;
    min-width: 0;
    height: 100vh;
    min-height: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: margin-left var(--transition);
}

.mdi-sidebar.collapsed + .mdi-main,
.mdi-sidebar.collapsed ~ .mdi-main {
    margin-left: var(--sidebar-collapsed);
}

.mdi-topbar {
    min-height: var(--topbar-height);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0 1.4rem;
    background: #fff;
    border-bottom: 1px solid var(--azul-050);
    box-shadow: 0 1px 6px rgba(0, 0, 0, .06);
}

.topbar-sidebar-btn,
.topbar-action {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    color: var(--azul-500);
    display: grid;
    place-items: center;
    text-decoration: none;
    position: relative;
}

.topbar-sidebar-btn {
    flex: 0 0 36px;
}

.topbar-sidebar-btn:hover {
    border-color: var(--azul-200);
    background: var(--azul-025);
    color: var(--azul-700);
}

.topbar-heading {
    min-width: 0;
    flex: 1;
}

.topbar-kicker {
    display: block;
    color: var(--text-muted);
    font-size: .7rem;
    line-height: 1;
}

.topbar-heading h1 {
    color: var(--azul-600);
    font-size: 1.04rem;
    font-weight: 800;
    line-height: 1.2;
    margin: .15rem 0 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.topbar-action.whatsapp {
    color: #fff;
    border-color: var(--cor-success);
    background: var(--cor-success);
}

.action-dot {
    width: 8px;
    height: 8px;
    position: absolute;
    top: 7px;
    right: 8px;
    border-radius: 50%;
    background: var(--cor-danger);
    border: 2px solid #fff;
}

.action-count {
    min-width: 18px;
    height: 18px;
    position: absolute;
    top: -5px;
    right: -6px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    padding: 0 .25rem;
    color: #fff;
    background: var(--cor-danger);
    border: 2px solid #fff;
    font-size: .64rem;
    font-weight: 800;
    line-height: 1;
}

.topbar-notification-menu {
    width: min(360px, calc(100vw - 2rem));
    border-color: var(--border-color);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
    font-size: .82rem;
}

.topbar-notification-item {
    white-space: normal;
}

.topbar-notification-item strong,
.topbar-notification-item small {
    display: block;
}

.topbar-notification-item small {
    color: var(--text-muted);
    line-height: 1.35;
}

.chamado-kanban {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 260px;
    gap: .85rem;
    overflow-x: auto;
    padding-bottom: .35rem;
}

.chamado-kanban-column {
    min-width: 0;
    min-height: 260px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--azul-010);
    transition: border-color var(--transition), background var(--transition);
}

.chamado-kanban-column.drag-over {
    border-color: var(--azul-300);
    background: var(--azul-025);
}

.chamado-kanban-header {
    min-width: 0;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .7rem .75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--azul-700);
}

.chamado-kanban-header strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chamado-kanban-list {
    min-width: 0;
    display: grid;
    gap: .65rem;
    padding: .7rem;
}

.chamado-kanban-empty {
    min-height: 90px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    font-size: .82rem;
}

.chamado-card {
    min-width: 0;
    max-width: 100%;
    display: grid;
    gap: .55rem;
    padding: .75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.chamado-card[draggable="true"] {
    cursor: grab;
}

.chamado-card.dragging {
    opacity: .65;
    cursor: grabbing;
}

.chamado-card-title {
    min-width: 0;
    color: var(--azul-700);
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
    word-break: break-word;
    text-decoration: none;
}

.chamado-card-meta {
    min-width: 0;
    display: grid;
    gap: .15rem;
    color: var(--text-muted);
    font-size: .75rem;
}

.chamado-card-meta span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chamado-card p {
    min-width: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0;
    color: var(--text-muted);
    font-size: .8rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chamado-quick-form {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: .35rem;
}

.chamado-quick-form .form-select {
    min-width: 0;
    width: 100%;
}

.chamado-table-actions {
    min-width: 210px;
}

.chamado-table-actions .chamado-quick-form {
    grid-template-columns: minmax(150px, 1fr) minmax(98px, .7fr) minmax(135px, .9fr);
}

.status-badge {
    border: 1px solid transparent;
    font-weight: 800;
}

.status-filter-dropdown .dropdown-toggle {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chamado-filter-card {
    position: relative;
    z-index: 30;
    overflow: visible;
}

.chamado-filter-card .card-body-sistema {
    overflow: visible;
}

.status-filter-menu {
    width: 260px;
    max-height: 320px;
    overflow-y: auto;
    padding: .45rem;
    z-index: 1080;
}

.status-filter-option {
    display: flex;
    align-items: center;
    gap: .5rem;
    border-radius: 6px;
}

.status-filter-option .form-check-input {
    margin: 0;
}

.quadro-filter-actions .btn-icon {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
}

.status-chamado_novo {
    color: #075985;
    background: #e0f2fe;
    border-color: #bae6fd;
}

.status-em_analise {
    color: #1d4ed8;
    background: #dbeafe;
    border-color: #bfdbfe;
}

.status-fila_programacao {
    color: #6d28d9;
    background: #ede9fe;
    border-color: #ddd6fe;
}

.status-programacao {
    color: #4338ca;
    background: #e0e7ff;
    border-color: #c7d2fe;
}

.status-aprovado {
    color: #166534;
    background: #dcfce7;
    border-color: #bbf7d0;
}

.status-recusado,
.status-rejeitado {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}

.status-pendente {
    color: #92400e;
    background: #fef3c7;
    border-color: #fde68a;
}

.status-gerar_versao {
    color: #0f766e;
    background: #ccfbf1;
    border-color: #99f6e4;
}

.status-explanar {
    color: #854d0e;
    background: #fef9c3;
    border-color: #fde047;
}

.status-em_teste {
    color: #9d174d;
    background: #fce7f3;
    border-color: #fbcfe8;
}

.status-atendimento {
    color: #065f46;
    background: #d1fae5;
    border-color: #a7f3d0;
}

.status-retorno_programacao {
    color: #7c2d12;
    background: #ffedd5;
    border-color: #fed7aa;
}

.status-resolvido {
    color: #334155;
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.chamado-card[class*="status-card-"] {
    border-left-width: 4px;
}

.status-card-chamado_novo { border-left-color: #38bdf8; }
.status-card-em_analise { border-left-color: #3b82f6; }
.status-card-fila_programacao { border-left-color: #8b5cf6; }
.status-card-programacao { border-left-color: #6366f1; }
.status-card-aprovado { border-left-color: #22c55e; }
.status-card-recusado,
.status-card-rejeitado { border-left-color: #ef4444; }
.status-card-pendente { border-left-color: #f59e0b; }
.status-card-gerar_versao { border-left-color: #14b8a6; }
.status-card-explanar { border-left-color: #eab308; }
.status-card-em_teste { border-left-color: #ec4899; }
.status-card-atendimento { border-left-color: #10b981; }
.status-card-retorno_programacao { border-left-color: #f97316; }

.link-strong {
    color: var(--azul-700);
    font-weight: 800;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.link-strong:hover,
.chamado-card-title:hover {
    text-decoration: underline;
}

.chamado-detail-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: start;
}

.chamado-detail-title {
    margin: 0;
    color: var(--azul-700);
    font-size: 1.2rem;
    font-weight: 800;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chamado-detail-meta,
.chamado-detail-badges,
.chamado-actions {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.chamado-detail-meta {
    margin-top: .5rem;
    color: var(--text-muted);
    font-size: .85rem;
}

.chamado-detail-meta span {
    min-width: 0;
    display: inline-flex;
    gap: .35rem;
    align-items: center;
    overflow-wrap: anywhere;
}

.chamado-description {
    padding: .85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--text-color);
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.chamado-timeline {
    display: grid;
    gap: .75rem;
}

.chamado-note {
    min-width: 0;
    padding: .85rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
}

.chamado-note-head {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    align-items: center;
    color: var(--azul-700);
}

.chamado-note-head small {
    color: var(--text-muted);
}

.chamado-note p {
    margin: .65rem 0 0;
    color: var(--text-color);
    line-height: 1.5;
    overflow-wrap: anywhere;
    word-break: break-word;
}

@media (max-width: 768px) {
    .chamado-detail-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .chamado-note-head {
        align-items: flex-start;
        flex-direction: column;
    }
}

.topbar-user {
    min-height: 38px;
    display: flex;
    align-items: center;
    gap: .55rem;
    padding-left: .75rem;
    border-left: 1px solid var(--border-color);
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
    background: transparent;
    color: var(--azul-600);
    font-weight: 700;
    text-align: left;
}

.topbar-user i {
    font-size: 1.35rem;
    color: var(--azul-400);
}

.topbar-user small {
    display: block;
    color: var(--text-muted);
    font-size: .68rem;
    font-weight: 500;
}

.topbar-user.dropdown-toggle::after {
    margin-left: .15rem;
    color: var(--text-muted);
}

.topbar-user:hover,
.topbar-user.show {
    color: var(--azul-700);
}

.topbar-user-menu {
    min-width: 210px;
    border-color: var(--border-color);
    border-radius: 8px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
    font-size: .84rem;
}

.topbar-user-menu .dropdown-header {
    color: var(--azul-600);
}

.topbar-user-menu .dropdown-header strong,
.topbar-user-menu .dropdown-header small {
    display: block;
}

.topbar-user-menu .dropdown-header small {
    color: var(--text-muted);
    font-size: .72rem;
    font-weight: 500;
}

.topbar-user-menu .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 34px;
    font-weight: 700;
}

.mdi-tabs {
    height: 43px;
    flex: 0 0 43px;
    display: flex;
    align-items: end;
    gap: .35rem;
    padding: 0 1.25rem;
    background: var(--azul-025);
    border-bottom: 1px solid var(--border-color);
}

.mdi-tab {
    height: 34px;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    max-width: 220px;
    border: 1px solid var(--border-color);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: var(--azul-010);
    color: var(--azul-600);
    padding: 0 .35rem 0 .75rem;
    font-size: .8rem;
    font-weight: 700;
    overflow: hidden;
}

.mdi-tab.active {
    background: #fff;
    color: var(--azul-700);
    border-color: var(--azul-100);
}

.mdi-tab.fixed {
    padding-right: .75rem;
}

.mdi-tab-link {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: inherit;
    text-decoration: none;
}

.mdi-tab-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mdi-tab-close-form {
    margin: 0;
    flex: 0 0 auto;
}

.mdi-tab-close {
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    padding: 0;
}

.mdi-tab-close:hover {
    color: var(--cor-danger);
    background: #f8e5e5;
}

.mdi-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 1.25rem;
}

.mdi-tab-panel {
    display: none;
    min-height: 0;
    overflow: visible;
}

.mdi-tab-panel.active {
    display: block;
    min-height: 100%;
}

.mdi-tab-loading,
.mdi-tab-error {
    min-height: 160px;
    display: grid;
    place-items: center;
    color: var(--text-muted);
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: .86rem;
}

.mdi-tab-error {
    color: var(--cor-danger);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.7fr repeat(4, minmax(145px, 1fr));
    gap: 1rem;
}

.welcome-panel,
.metric-card,
.module-preview section {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}

.welcome-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.25rem;
}

.eyebrow {
    color: var(--azul);
    display: block;
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.welcome-panel h2 {
    color: var(--azul-700);
    font-size: 1.35rem;
    font-weight: 800;
    margin: .25rem 0 .4rem;
}

.welcome-panel p,
.module-preview p {
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

.welcome-icon {
    width: 58px;
    height: 58px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--azul-500);
    font-size: 1.6rem;
    flex: 0 0 58px;
}

.metric-card {
    min-height: 140px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.metric-card small {
    color: var(--text-muted);
    font-weight: 700;
}

.metric-card strong {
    color: var(--azul-700);
    font-size: 2rem;
    line-height: 1;
}

.metric-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 8px;
}

.metric-icon.azul {
    color: var(--azul-500);
    background: var(--azul-025);
}

.metric-icon.verde {
    color: var(--cor-success);
    background: #dff7e3;
}

.metric-icon.violeta {
    color: #6d28d9;
    background: #ede9fe;
}

.metric-icon.ouro {
    color: #8a7020;
    background: #fff4d6;
}

.module-preview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.module-preview section {
    padding: 1.1rem;
}

.module-preview h3 {
    color: var(--azul-600);
    font-size: .98rem;
    font-weight: 800;
    margin: 0 0 .5rem;
}

.mdi-overlay {
    display: none;
}

body.bg-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--azul-escuro);
}

.login-card {
    width: 860px;
    max-width: 98vw;
    height: 460px;
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
    display: flex;
}

.login-image {
    flex: 1;
    background: linear-gradient(160deg, var(--azul-escuro) 0%, var(--azul) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
}

.login-logo {
    width: 190px;
    height: 190px;
    display: grid;
    place-items: center;
}

.login-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.login-image .logo-txt {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: .03em;
    margin-top: 1rem;
}

.login-image .logo-sub {
    color: var(--azul-escuro);
    font-size: .82rem;
    margin-top: .3rem;
}

.login-form-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem;
    background: #fff;
}

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

.login-form-wrap h1 {
    color: var(--azul-escuro);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 .35rem;
}

.auth-subtitle,
.auth-footer {
    color: var(--text-muted);
    font-size: .82rem;
}

.auth-subtitle {
    margin: 0 0 1.5rem;
}

.login-form-wrap .form-label {
    color: var(--azul-600);
    font-size: .8rem;
    font-weight: 600;
}

.login-form-wrap .form-control {
    height: 44px;
    border-color: var(--azul-100);
    border-radius: 8px;
    font-size: .9rem;
}

.login-form-wrap .form-control:focus {
    border-color: var(--azul-400);
    box-shadow: 0 0 0 .2rem rgba(37, 77, 127, .15);
}

.btn-password-toggle {
    width: 44px;
    border-color: var(--azul-100);
    border-radius: 0 7px 7px 0;
    color: var(--azul-500);
    background: #fff;
}

.btn-password-toggle:hover {
    border-color: var(--azul-200);
    color: var(--azul-700);
    background: var(--azul-025);
}

.login-actions {
    display: grid;
    grid-template-columns: minmax(116px, .45fr) minmax(0, 1fr);
    gap: .75rem;
}

.btn-login,
.btn-login-secondary {
    height: 44px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn-login {
    width: 100%;
    border: 0;
    color: #fff;
    background: var(--azul-escuro);
}

.btn-login-secondary {
    border: 1px solid var(--azul-100);
    color: var(--azul-600);
    background: #fff;
}

.btn-login:hover {
    color: #fff;
    background: var(--azul-escuro-sombra);
}

.btn-login-secondary:hover {
    color: var(--azul-700);
    border-color: var(--azul-200);
    background: var(--azul-025);
}

.auth-footer {
    text-align: center;
    margin: 1rem 0 0;
    font-size: .72rem;
}

.login-form-wrap .alert {
    font-size: .82rem;
}

.page-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card-sistema {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
    overflow: hidden;
}

.card-sistema.chamado-filter-card {
    position: relative;
    z-index: 50;
    overflow: visible;
}

.card-sistema.chamado-filter-card .card-body-sistema {
    overflow: visible;
}

.card-header-sistema {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .7rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--azul-600);
    background: var(--azul-025);
    font-size: .88rem;
    font-weight: 800;
}

.card-header-sistema span {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.card-body-sistema {
    padding: 1rem;
}

.table-sistema {
    font-size: .84rem;
}

.table-sistema thead th {
    color: var(--azul-600);
    background: var(--azul-010);
    border-bottom: 1px solid var(--border-color);
    font-size: .75rem;
    text-transform: uppercase;
}

.table-sistema tbody tr.table-row-inativo {
    color: #7f1d1d;
    background: #fef2f2;
}

.table-sistema tbody tr.table-row-inativo:hover {
    background: #fee2e2;
}

.table-sistema tbody tr.table-row-inativo .badge {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fecaca;
}

.badge-ativo,
.badge-inativo,
.badge-soft-primary {
    border-radius: 20px;
    padding: .32rem .58rem;
    font-size: .68rem;
}

.badge-ativo {
    color: #fff;
    background: var(--cor-success);
}

.badge-inativo {
    color: #fff;
    background: #6c757d;
}

.badge-soft-primary {
    color: var(--azul-500);
    background: var(--azul-025);
    border: 1px solid var(--azul-050);
}

.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-grid;
    place-items: center;
    padding: 0;
}

.form-label {
    color: #4a5568;
    font-size: .82rem;
    font-weight: 700;
}

.form-switch-sistema .form-check-input:checked {
    background-color: var(--cor-success);
    border-color: var(--cor-success);
}



.pratic-toast-container {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 2100;
    display: flex;
    flex-direction: column;
    gap: .65rem;
    width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}

.pratic-toast {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    min-height: 74px;
    padding: .9rem .95rem;
    border-left: 4px solid var(--azul);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .18);
    pointer-events: auto;
    animation: praticToastIn .22s ease-out;
}

.pratic-toast.success {
    border-left-color: var(--cor-success);
}

.pratic-toast.danger {
    border-left-color: var(--cor-danger);
}

.pratic-toast-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    color: var(--azul);
    background: var(--azul-025);
    flex: 0 0 30px;
}

.pratic-toast.success .pratic-toast-icon {
    color: var(--cor-success);
    background: #e5f6eb;
}

.pratic-toast.danger .pratic-toast-icon {
    color: var(--cor-danger);
    background: #f8e5e5;
}

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

.pratic-toast-body strong {
    display: block;
    color: var(--azul-700);
    font-size: .84rem;
    line-height: 1.2;
}

.pratic-toast-body span {
    display: block;
    color: var(--text-muted);
    font-size: .78rem;
    line-height: 1.35;
    margin-top: .18rem;
}

.pratic-toast-close {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    color: var(--text-muted);
    background: transparent;
    padding: 0;
    flex: 0 0 24px;
}

.pratic-toast-close:hover {
    color: var(--azul-700);
    background: var(--azul-025);
}

.pratic-confirm-modal .modal-content {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 22px 58px rgba(0, 0, 0, .28);
    overflow: hidden;
}

.pratic-confirm-modal .modal-header {
    color: #fff;
    background: var(--cor-danger);
    border-bottom: 0;
    padding: .85rem 1rem;
}

.pratic-confirm-modal .modal-title {
    display: flex;
    align-items: center;
    font-size: .95rem;
    font-weight: 800;
}

.pratic-confirm-modal .modal-body {
    color: var(--azul-700);
    font-size: .9rem;
    line-height: 1.45;
    padding: 1.1rem 1rem;
}

.pratic-confirm-modal .modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--azul-010);
    padding: .75rem 1rem;
}

@keyframes praticToastIn {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.modal-dialog-scrollable {
    max-height: calc(100vh - 2rem);
}

.modal-dialog-scrollable .modal-content {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-dialog-scrollable .modal-content > form {
    min-height: 0;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.modal-dialog-scrollable .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    max-height: calc(100vh - 10.5rem);
    padding-bottom: 1.25rem;
}

.modal-xl.modal-dialog-scrollable .modal-body {
    max-height: calc(100vh - 11rem);
}

.modal-header,
.modal-footer {
    flex: 0 0 auto;
}

.modal-body .card-sistema:last-child,
.modal-body .row:last-child {
    margin-bottom: 0;
}
@media (max-width: 1180px) {
    .dashboard-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .welcome-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 860px) {
    .mdi-sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }

    .mdi-sidebar.mobile-open {
        transform: translateX(0);
    }

    .mdi-sidebar.collapsed {
        width: var(--sidebar-width);
    }

    .mdi-sidebar.collapsed .brand-text,
    .mdi-sidebar.collapsed .nav-label,
    .mdi-sidebar.collapsed .nav-chevron,
    .mdi-sidebar.collapsed .nav-section-title,
    .mdi-sidebar.collapsed .profile-pill span {
        opacity: 1;
        pointer-events: auto;
    }

    .mdi-main,
    .mdi-sidebar.collapsed + .mdi-main,
    .mdi-sidebar.collapsed ~ .mdi-main {
        margin-left: 0;
    }

    .mdi-overlay {
        position: fixed;
        inset: 0;
        z-index: 1030;
        background: rgba(0, 0, 0, .4);
    }

    .mdi-overlay.show {
        display: block;
    }

    .topbar-user > span {
        display: none;
    }

    .dashboard-grid,
    .module-preview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    body.bg-login {
        background: #fff;
        padding: 0;
    }

    .login-card {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        height: auto;
        border-radius: 0;
        box-shadow: none;
    }

    .login-image {
        display: none;
    }

    .login-form-wrap {
        padding: 1.5rem;
    }
}
