/* Estilos Gerais */
:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --primary-dark: #3f37c9;
    --secondary: #4cc9f0;
    --accent: #f72585;
    --success: #4ade80;
    --danger: #f43f5e;
    --warning: #f59e0b;
    --info: #0ea5e9;
    --gray-100: #f9fafb;
    --gray-200: #f1f5f9;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e1;
    --gray-500: #94a3b8;
    --gray-600: #64748b;
    --gray-700: #475569;
    --gray-800: #334155;
    --gray-900: #1e293b;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
    background-color: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Estilos da Tela de Login */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #f8f9fc;
    background-image: linear-gradient(135deg, #f0f4ff 0%, #a5b4fc 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%234361ee' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    animation: subtle-move 120s linear infinite;
}

@keyframes subtle-move {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    100% {
        transform: translateY(-20%) rotate(5deg);
    }
}

.login-form {
    background-color: rgba(255, 255, 255, 0.97);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-form:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 10px rgba(0, 0, 0, 0.05);
}

.login-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.login-logo i {
    font-size: 2.8rem;
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    border-radius: 50%;
    padding: 0.8rem;
    box-shadow: 0 10px 20px rgba(67, 97, 238, 0.15);
    position: relative;
}

.login-logo i::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    background: radial-gradient(circle, rgba(67, 97, 238, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    border-radius: 50%;
    z-index: -1;
}

.login-form h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-weight: 700;
    font-size: 1.6rem;
}

.login-subtitle {
    text-align: center;
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    transition: all 0.3s;
}

.input-icon-wrapper input {
    padding-left: 2.8rem !important;
    width: 100%;
    transition: all 0.3s;
}

.input-icon-wrapper input:focus + i {
    color: var(--primary);
}

.form-group button {
    width: 100%;
    padding: 0.9rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.form-group button:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-dark) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.form-group button:active {
    transform: translateY(0);
    box-shadow: 0 2px 5px rgba(67, 97, 238, 0.2);
}

.login-footer {
    margin-top: 1.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.8rem;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.login-footer p {
    line-height: 1.5;
}

.login-footer a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.login-ajuda {
    margin-top: 1.8rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.login-ajuda h3 {
    font-size: 1rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
    text-align: center;
}

.login-ajuda p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--gray-600);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

.form-group button {
    width: 100%;
    padding: 0.8rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s;
}

.form-group button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

.form-group button:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Espaçamento entre botões nos modais */
.form-group button + button {
    margin-left: 10px;
}

/* Correção para alinhar botões lado a lado nos modais */
.form-group:last-child {
    display: flex;
    gap: 10px;
}

/* Estilo específico para os botões de ação nos modais */
.form-group.botoes-acao {
    display: flex;
    gap: 10px;
    margin-top: 25px;
}

.form-group.botoes-acao button {
    flex: 1;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Estilo para o botão de cancelar */
.form-group.botoes-acao button[type="button"] {
    background-color: #fff0f3;
    color: var(--danger);
    border: 1px solid #ffccd5;
    font-weight: 500;
}

.form-group.botoes-acao button[type="button"]:hover {
    background-color: #ffe2e5;
    color: var(--danger);
    box-shadow: 0 4px 12px rgba(244, 63, 94, 0.15);
    border-color: var(--danger);
}

/* Mensagem de erro */
.erro {
    color: var(--danger);
    margin-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    padding: 0.8rem;
    background-color: rgba(244, 63, 94, 0.08);
    border-radius: 10px;
    border-left: 3px solid var(--danger);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
}

.erro:not(:empty) {
    opacity: 1;
    max-height: 60px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.erro:before {
    content: "\f071";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 8px;
}

/* Estilos do Dashboard */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--gray-100);
}

.app-header {
    background-color: #fff;
    color: var(--gray-800);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header .logo {
    display: flex;
    align-items: center;
}

.app-header h1 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header h1 i {
    color: var(--primary);
    font-size: 1.4rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

#usuarioLogado {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
    position: relative;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}

#usuarioLogado:hover {
    background-color: var(--gray-100);
}

#usuarioLogado::before {
    content: "\f007";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
    font-size: 1rem;
}

#btnSair {
    background-color: transparent;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

#btnSair::before {
    content: "\f2f5";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

#btnSair:hover {
    background-color: var(--gray-100);
    color: var(--danger);
    border-color: var(--danger);
    transform: translateY(-2px);
}

.main-content {
    display: flex;
    flex: 1;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar {
    width: 250px;
    min-width: 250px;
    background-color: #fff;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    overflow-y: auto;
    padding: 1.5rem 0;
    height: calc(100vh - 64px);
    position: fixed;
    left: 0;
    top: 64px;
    z-index: 10;
}

/* Estilos para o sidebar colapsado */
.sidebar.collapsed {
    width: 70px;
    min-width: 70px;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 0 0 15px 0;
}

.sidebar-header {
    display: flex;
    justify-content: center;
    padding: 0 15px 15px 15px;
}

.toggle-sidebar {
    background-color: var(--gray-100);
    border: none;
    color: var(--primary);
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.toggle-sidebar:hover {
    background-color: var(--primary);
    color: white;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

.toggle-sidebar i {
    font-size: 1.1rem;
}

/* Ajuste para ícones no sidebar colapsado */
.sidebar.collapsed a {
    justify-content: center;
    padding: 0.9rem;
}

.sidebar.collapsed a i {
    margin-right: 0;
    font-size: 1.2rem;
}

.sidebar ul {
    list-style: none;
}

.sidebar li {
    margin-bottom: 0.25rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.9rem 1.5rem;
    color: var(--gray-700);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    font-weight: 500;
}

.sidebar a i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.sidebar a:hover {
    background-color: var(--gray-100);
    color: var(--primary);
    border-left-color: var(--primary-light);
}

.sidebar a.active {
    background-color: rgba(67, 97, 238, 0.08);
    color: var(--primary);
    border-left-color: var(--primary);
}

.content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--gray-100);
    transition: all 0.3s ease;
    margin-left: 250px; /* Largura padrão do sidebar */
}

.secao-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.secao-header h2 {
    color: var(--gray-800);
    font-size: 1.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.secao-header h2::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
    font-size: 1.4rem;
}

.secaoLinhas .secao-header h2::before {
    content: "\f3cd";
}

.secaoEmpresas .secao-header h2::before {
    content: "\f1ad";
}

.secaoRelatorios .secao-header h2::before {
    content: "\f080";
}

.secaoConfiguracoes .secao-header h2::before {
    content: "\f013";
}

.secaoUsuarios .secao-header h2::before {
    content: "\f0c0";
}

.acoes-header {
    display: flex;
    gap: 0.75rem;
}

.btn-adicionar, .btn-exportar, .btn-importar {
    padding: 0.65rem 1.2rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.btn-adicionar {
    background-color: var(--primary);
    color: white;
}

.btn-adicionar::before {
    content: "\f067";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.btn-adicionar:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
}

.btn-exportar {
    background-color: var(--success);
    color: white;
}

.btn-exportar::before {
    content: "\f56e";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.btn-exportar:hover {
    background-color: #3cbb6c;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.25);
}

.btn-importar {
    background-color: var(--warning);
    color: white;
}

.btn-importar::before {
    content: "\f56f";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.btn-importar:hover {
    background-color: #e59000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
}

/* Filtros */
.filtros {
    display: flex;
    gap: 12px;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    background-color: #fff;
    padding: 1.25rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

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

.filtros input, .filtros select {
    padding: 0.65rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    min-width: 150px;
    flex-grow: 1;
    font-size: 0.95rem;
    transition: all 0.3s;
    background-color: var(--gray-100);
    color: var(--gray-800);
}

.filtros input:focus, .filtros select:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

.filtros input {
    padding-left: 2.5rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cpath d='M21 21l-4.35-4.35'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 0.75rem center;
}

.filtros select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    padding-right: 2.5rem;
    appearance: none;
}

/* Tabelas */
.tabela-container {
    position: relative;
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    background-color: white;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
    margin-bottom: 1.5rem;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: var(--gray-300) var(--gray-100);
    -webkit-overflow-scrolling: touch; /* Para melhor comportamento em dispositivos touchscreen */
}

.tabela-container:hover {
    box-shadow: var(--shadow);
}

/* Garantir que a tabela não ultrapasse a largura do container */
table {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    font-size: 0.95rem;
    table-layout: fixed; /* Mantemos esta propriedade que força o respeito às larguras */
    position: relative;
    z-index: 1;
    border-radius: 10px;
    overflow: hidden;
}

table th {
    position: relative;
    background-color: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 1rem;
    padding-right: 15px; /* Espaço para o resizer */
    border-bottom: 2px solid var(--gray-300); /* Linha mais destacada */
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 50px;
    position: relative; /* Adiciona posicionamento relativo para facilitar alinhamento */
}

table th:first-child {
    border-top-left-radius: 10px;
}

table th:last-child {
    border-top-right-radius: 10px;
}

table tr:last-child td:first-child {
    border-bottom-left-radius: 10px;
}

table tr:last-child td:last-child {
    border-bottom-right-radius: 10px;
}

table tr:hover {
    background-color: var(--gray-50);
}

/* Resizer nas colunas de cabeçalho - com indicador visual melhorado */
.column-resizer {
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    background-color: transparent;
    z-index: 10;
}

/* Linha visual para indicar área de redimensionamento - mais discreta */
.column-resizer::after {
    content: "";
    position: absolute;
    top: 15%;
    bottom: 15%;
    right: 3px;
    width: 1px;
    background-color: var(--gray-300);
    border-radius: 0;
    opacity: 0.3;
}

/* Estado de hover sem animações */
.column-resizer:hover::after, .column-resizer.resizing::after {
    background-color: var(--gray-300);
    width: 1px;
    opacity: 0.3;
}

.column-resizer:hover, .column-resizer.resizing {
    background-color: transparent;
}

/* Cursor para quando estiver sobre a área de redimensionamento ou durante o redimensionamento */
.column-resizer:hover {
    cursor: col-resize;
    background-color: transparent;
}

.column-resizer.resizing {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Aumentar a área clicável nas células de cabeçalho */
table th {
    padding-right: 15px;
}

.resizing-active * {
    cursor: col-resize !important;
    user-select: none !important;
}

/* Ajuste para permitir redimensionamento da última coluna */
table th:last-child .column-resizer {
    width: 4px;
}

/* Colunas específicas - ajuste para garantir que somam 100% e coluna de ações */
table th:nth-child(1), table td:nth-child(1) { /* Número */
    width: 10%;
    min-width: 100px;
}

table th:nth-child(2), table td:nth-child(2) { /* Colaborador */
    width: 14%;
    min-width: 120px; 
}

table th:nth-child(3), table td:nth-child(3) { /* Empresa */
    width: 14%;
    min-width: 120px;
}

table th:nth-child(4), table td:nth-child(4) { /* CNPJ */
    width: 12%;
    min-width: 110px;
}

table th:nth-child(5), table td:nth-child(5) { /* Operadora */
    width: 9%;
    min-width: 90px;
}

table th:nth-child(6), table td:nth-child(6) { /* Valor */
    width: 9%;
    min-width: 80px;
}

table th:nth-child(7), table td:nth-child(7) { /* Data */
    width: 10%;
    min-width: 100px;
}

table th:nth-child(8), table td:nth-child(8) { /* Status */
    width: 10%;
    min-width: 90px;
}

/* Célula de ações - estilo genérico */
table th:last-child, table td:last-child { /* Ações */
    width: 12%;
    min-width: 100px;
    max-width: 100px;
    text-align: center;
    position: relative;
    padding: 0.8rem;
    z-index: 60;
    overflow: visible !important;
    display: table-cell;
    vertical-align: middle;
}

/* Larguras específicas por tabela - com min-width e max-width para melhor controle */
#tabelaLinhas th:last-child, #tabelaLinhas td:last-child {
    width: 100px;
    min-width: 100px;
    max-width: 100px;
}

#tabelaEmpresas th:last-child, #tabelaEmpresas td:last-child {
    width: 100px;
    min-width: 100px;
}

#tabelaUsuarios th:last-child, #tabelaUsuarios td:last-child {
    width: 100px;
    min-width: 100px;
}

/* Coluna Nome/Empresa */
#tabelaEmpresas th:nth-child(1), #tabelaEmpresas td:nth-child(1) {
    width: 30%;
    min-width: 200px;
}

/* Coluna CNPJ */
#tabelaEmpresas th:nth-child(2), #tabelaEmpresas td:nth-child(2) {
    width: 25%;
    min-width: 180px;
}

/* Coluna Cidade */
#tabelaEmpresas th:nth-child(3), #tabelaEmpresas td:nth-child(3) {
    width: 25%;
    min-width: 150px;
}

/* Coluna Telefone */
#tabelaEmpresas th:nth-child(4), #tabelaEmpresas td:nth-child(4) {
    width: 20%;
    min-width: 120px;
}

/* Colunas para tabela Usuários */
#tabelaUsuarios th:nth-child(1), #tabelaUsuarios td:nth-child(1) {
    width: 25%; /* Nome */
    min-width: 180px;
}

#tabelaUsuarios th:nth-child(2), #tabelaUsuarios td:nth-child(2) {
    width: 20%; /* Usuário */
    min-width: 150px;
}

#tabelaUsuarios th:nth-child(3), #tabelaUsuarios td:nth-child(3) {
    width: 30%; /* E-mail */
    min-width: 200px;
}

#tabelaUsuarios th:nth-child(4), #tabelaUsuarios td:nth-child(4) {
    width: 15%; /* Tipo */
    min-width: 120px;
}

.acoes {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    position: relative;
    overflow: visible !important;
    margin: auto;
    height: 100%;
}

/* Dropdown de ações - redesenhado para melhor centralização */
.dropdown-acoes {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    z-index: 8000; /* Valor alto para o contêiner */
    margin: 0 auto;
}

.dropdown-icone {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--gray-100);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid var(--gray-300);
    position: relative;
    z-index: 8500; /* Valor alto para o botão */
    margin: 0 auto; /* Centralizar horizontalmente dentro da coluna */
}

.dropdown-icone:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.ativo {
    opacity: 1;
    pointer-events: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-conteudo {
    background-color: white;
    padding: 2.5rem;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.3s ease;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal.ativo .modal-conteudo {
    transform: scale(1);
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.fechar {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.3s;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--gray-100);
}

.fechar:hover {
    color: var(--danger);
    background-color: rgba(244, 63, 94, 0.1);
    transform: rotate(90deg);
}

/* Seções */
.secao-oculta {
    display: none;
}

.secao-ativa {
    display: block;
    animation: fadeInContent 0.4s ease;
}

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

/* Relatórios */
.opcoes-relatorios {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.opcoes-relatorios button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.opcoes-relatorios button::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.opcoes-relatorios button:nth-child(1)::before {
    content: "\f80a";
}

.opcoes-relatorios button:nth-child(2)::before {
    content: "\f0d6";
}

.opcoes-relatorios button:nth-child(3)::before {
    content: "\f1e0";
}

.opcoes-relatorios button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.resultado-relatorio {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    animation: fadeInUp 0.5s ease;
}

/* Configurações */
.opcoes-configuracoes {
    background-color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.opcoes-configuracoes h3 {
    margin-bottom: 1.2rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.25rem;
}

.opcoes-configuracoes h3::before {
    content: "\f2da";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
}

.lista-operadoras {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.operadora-item, .item-operadora {
    background-color: var(--gray-100);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    transition: all 0.3s;
    border: 1px solid var(--gray-300);
    box-shadow: var(--shadow-sm);
    min-width: 120px;
    animation: fadeInRight 0.5s ease;
}

.operadora-item:hover, .item-operadora:hover {
    background-color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--primary-light);
}

.operadora-nome {
    font-weight: 500;
    color: var(--gray-800);
    font-size: 0.95rem;
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.btn-remover, .remover-operadora {
    background-color: transparent;
    border: none;
    color: var(--danger);
    cursor: pointer;
    font-size: 0.9rem;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
    padding: 0;
}

.btn-remover:hover, .remover-operadora:hover {
    background-color: rgba(244, 63, 94, 0.1);
    transform: scale(1.1);
}

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

/* Checkbox para permissões */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    background-color: var(--gray-100);
    padding: 1.2rem;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    accent-color: var(--primary);
    transform: scale(1.2);
}

.checkbox-item label {
    display: inline;
    margin: 0;
    cursor: pointer;
}

.texto-centro {
    text-align: center;
}

.texto-direita {
    text-align: right;
}

/* Estilos para importação */
.instrucoes-importacao {
    background-color: var(--gray-100);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    border: 1px solid var(--gray-200);
}

.instrucoes-importacao p {
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.instrucoes-importacao pre {
    background-color: var(--gray-800);
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 6px;
    overflow-x: auto;
    margin-top: 0.75rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.85rem;
}

.opcoes-importacao {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.radio-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.radio-item:hover {
    background-color: rgba(67, 97, 238, 0.05);
}

.radio-item input[type="radio"] {
    width: auto;
    accent-color: var(--primary);
    transform: scale(1.2);
}

.radio-item label {
    display: inline;
    margin: 0;
    cursor: pointer;
}

/* Estilos para paginação */
.paginacao {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    align-items: center;
}

.info-paginacao {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

#infoPaginacao {
    color: var(--gray-600);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

#infoPaginacao::before {
    content: "\f0cb";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
}

#itensPorPagina {
    padding: 0.5rem 2.5rem 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    font-size: 0.9rem;
    background-color: var(--gray-100);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    appearance: none;
    transition: all 0.3s;
}

#itensPorPagina:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

.controles-paginacao {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.controles-paginacao button {
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
    color: var(--primary);
    font-weight: 500;
}

.controles-paginacao button:hover:not(:disabled) {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

.controles-paginacao button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.numeros-paginas {
    display: flex;
    gap: 0.3rem;
}

.numero-pagina {
    width: 2.25rem;
    height: 2.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
    color: var(--gray-700);
    font-weight: 500;
}

.numero-pagina:hover {
    background-color: var(--gray-100);
    border-color: var(--gray-400);
    color: var(--primary);
}

.numero-pagina.ativo {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

/* Estilos para o histórico de transferências */
.dados-linha-historico {
    background-color: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.dados-linha-historico p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--gray-700);
}

.dados-linha-historico p strong {
    color: var(--gray-800);
    min-width: 80px;
}

.dados-linha-historico p:nth-child(1)::before {
    content: "\f3cd";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
}

.dados-linha-historico p:nth-child(2)::before {
    content: "\f1ad";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    color: var(--primary);
}

.dados-linha-historico p:last-child {
    margin-bottom: 0;
}

#tabelaHistorico {
    margin-bottom: 1.5rem;
}

#tabelaHistorico th,
#tabelaHistorico td {
    text-align: left;
    padding: 0.75rem;
}

#tabelaHistorico th:first-child,
#tabelaHistorico td:first-child {
    width: 140px;
}

/* Responsividade */
@media (max-width: 1200px) {
    .filtros {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filtros input, .filtros select {
        width: 100%;
    }
}

@media (max-width: 992px) {
    .sidebar {
        width: 220px;
    }
    
    .content {
        padding: 1.5rem;
    }
    
    .secao-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .acoes-header {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: static;
        height: auto;
        padding: 0.75rem 0;
    }
    
    /* Em dispositivos móveis, o conteúdo não deve ter margem, independente do estado do menu */
    .content {
        margin-left: 0 !important;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .sidebar li {
        margin-bottom: 0;
        margin-right: 0.25rem;
    }
    
    .sidebar a {
        padding: 0.75rem 1rem;
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .sidebar a.active {
        border-left-color: transparent;
        border-bottom-color: var(--primary);
    }
    
    .app-header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .content {
        padding: 1rem;
    }
    
    .filtros {
        grid-template-columns: 1fr;
    }
    
    .modal-conteudo {
        width: 95%;
        padding: 1.5rem;
    }
    
    .info-paginacao {
        flex-direction: column;
        gap: 1rem;
    }
    
    .controles-paginacao {
        width: 100%;
        justify-content: center;
    }
    
    .btn-adicionar, .btn-exportar, .btn-importar {
        flex: 1;
        justify-content: center;
    }
}

/* Animações e transições */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-5px);
    }
    100% {
        transform: translateY(0px);
    }
}

.btn-adicionar:hover, .btn-exportar:hover, .btn-importar:hover {
    background-color: var(--primary-dark);
}

.btn-acao-icone:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Melhorias visuais gerais */
.tabela-container, .filtros, .modal-conteudo, .login-form {
    transition: box-shadow 0.3s ease;
}

.tabela-container:hover, .login-form:hover {
    box-shadow: var(--shadow);
}

/* Melhoria na experiência de formulários */
.form-group input, .form-group select, .filtros input, .filtros select {
    transition: all 0.3s ease;
}

.form-group input:focus, .form-group select:focus, .filtros input:focus, .filtros select:focus {
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
}

/* Melhorias para os status */
.status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.8rem;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 80px;
    text-align: center;
}

.status-chip.ativo {
    background-color: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.status-chip.inativo {
    background-color: rgba(244, 67, 54, 0.15);
    color: #d32f2f;
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.status-chip.livre {
    background-color: rgba(33, 150, 243, 0.15);
    color: #1976d2;
    border: 1px solid rgba(33, 150, 243, 0.3);
}

.status-chip.pendente {
    background-color: rgba(255, 152, 0, 0.15);
    color: #f57c00;
    border: 1px solid rgba(255, 152, 0, 0.3);
}

.status-chip.suspenso {
    background-color: rgba(156, 39, 176, 0.15);
    color: #7b1fa2;
    border: 1px solid rgba(156, 39, 176, 0.3);
}

.status-chip.desativado {
    background-color: rgba(97, 97, 97, 0.15);
    color: #424242;
    border: 1px solid rgba(97, 97, 97, 0.3);
}

.status-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1);
}

/* Estilos para imagens responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* Melhorias para usabilidade em mobile */
@media (max-width: 768px) {
    .btn-adicionar, .btn-exportar, .btn-importar {
        padding: 0.75rem;
    }
    
    .btn-adicionar span, .btn-exportar span, .btn-importar span {
        display: none;
    }
    
    .btn-adicionar::before, .btn-exportar::before, .btn-importar::before {
        margin: 0;
    }
    
    .controles-paginacao button span {
        display: none;
    }
}

.sidebar.collapsed ~ .content {
    margin-left: 70px; /* Largura do sidebar colapsado */
    width: calc(100% - 70px); /* Ajusta a largura para ocupar o restante da tela */
    max-width: calc(100% - 70px); /* Garante que não ultrapasse o limite */
}

/* Estilos para a nova seção de Relatórios */
.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card-relatorio {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

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

.card-header {
    padding: 1.5rem;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.card-header i {
    font-size: 1.4rem;
    color: var(--primary);
}

.card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
}

.card-body {
    padding: 1.5rem;
}

.card-body p {
    margin-bottom: 1.2rem;
    color: var(--gray-600);
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-gerar-relatorio {
    width: 100%;
    padding: 0.75rem 1rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-gerar-relatorio:hover {
    background-color: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.filtro-relatorio {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.filtro-relatorio select {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    background-color: var(--gray-100);
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filtro-relatorio select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
    outline: none;
}

.resultado-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-top: 2rem;
}

.resultado-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.resultado-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.resultado-header h3 i {
    color: var(--primary);
}

.acoes-resultado {
    display: flex;
    gap: 0.5rem;
}

.btn-acao-resultado {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    border: 1px solid var(--gray-300);
    background-color: #fff;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-acao-resultado:hover {
    background-color: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.2);
}

.resultado-relatorio {
    padding: 1.5rem;
}

.relatorio-secao {
    margin-bottom: 2rem;
}

.relatorio-secao h4 {
    color: var(--gray-800);
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.tabela-relatorio {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    table-layout: fixed;
}

.tabela-relatorio th {
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--gray-300);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.tabela-relatorio td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tabela-relatorio tfoot {
    background-color: var(--gray-50);
    font-weight: 600;
}

/* Estilos para a nova seção de Configurações */
.config-container {
    display: flex;
    gap: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.config-sidebar {
    width: 250px;
    min-width: 250px;
    background-color: var(--gray-100);
    padding: 1.5rem 0;
    border-right: 1px solid var(--gray-200);
}

.config-menu {
    list-style: none;
}

.config-menu li {
    padding: 0.85rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--gray-700);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.config-menu li i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.config-menu li:hover {
    background-color: rgba(67, 97, 238, 0.05);
    color: var(--primary);
}

.config-menu li.active {
    background-color: white;
    color: var(--primary);
    border-left: 3px solid var(--primary);
    font-weight: 600;
}

.config-content {
    flex: 1;
    padding: 2rem;
}

.config-tab {
    display: none;
}

.config-tab.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.config-tab-header {
    margin-bottom: 1.5rem;
}

.config-tab-header h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
}

.config-tab-header h3 i {
    color: var(--primary);
}

.config-tab-header p {
    color: var(--gray-600);
    font-size: 0.95rem;
}

.config-card {
    background-color: var(--gray-50);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.config-card-header {
    padding: 1rem 1.5rem;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-200);
}

.config-card-header h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-card-header h4 i {
    color: var(--primary);
}

.config-card-body {
    padding: 1.5rem;
}

.form-inline {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.input-grupo {
    position: relative;
    flex: 1;
}

.input-icone {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icone i {
    position: absolute;
    left: 12px;
    color: var(--gray-500);
}

.input-icone input {
    padding-left: 35px;
    width: 100%;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 0.75rem 1rem 0.75rem 35px;
    font-size: 1rem;
    background-color: var(--gray-100);
    color: var(--gray-800);
    transition: all 0.3s;
}

.input-icone input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: #fff;
}

.adicionar-operadora {
    margin-top: 1.5rem;
}

.adicionar-operadora .form-inline .btn-adicionar {
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    font-weight: 500;
}

/* Alerts e mensagens */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert p {
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

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

.alert-info {
    background-color: rgba(14, 165, 233, 0.1);
    border: 1px solid rgba(14, 165, 233, 0.2);
    color: var(--info);
}

.alert-warning {
    background-color: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* Temas */
.opcoes-tema {
    display: flex;
    gap: 1.5rem;
}

.opcao-tema {
    text-align: center;
    cursor: pointer;
    position: relative;
}

.preview-tema {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 2px solid var(--gray-300);
    transition: all 0.2s;
}

.opcao-tema:hover .preview-tema {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.preview-tema-claro {
    background-color: #fff;
}

.preview-tema-escuro {
    background-color: #1e293b;
}

.preview-tema-sistema {
    background: linear-gradient(135deg, #fff 0%, #fff 50%, #1e293b 50%, #1e293b 100%);
}

.tema-ativo {
    position: absolute;
    top: -10px;
    right: -10px;
    color: var(--success);
    font-size: 1.5rem;
    filter: drop-shadow(0 0 2px white);
}

/* Form switches */
.form-switch {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.form-switch input[type="checkbox"] {
    appearance: none;
    width: 40px;
    height: 20px;
    background-color: var(--gray-400);
    border-radius: 20px;
    position: relative;
    margin-right: 10px;
    transition: all 0.3s;
    cursor: pointer;
}

.form-switch input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background-color: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: all 0.3s;
}

.form-switch input[type="checkbox"]:checked {
    background-color: var(--primary);
}

.form-switch input[type="checkbox"]:checked::before {
    left: 22px;
}

.form-switch label {
    cursor: pointer;
    user-select: none;
}

/* Form file upload */
.form-file {
    margin-bottom: 1rem;
}

.form-file input[type="file"] {
    display: none;
}

.form-file label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.75rem 1rem;
    background-color: var(--gray-100);
    border: 1px dashed var(--gray-400);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.form-file label:hover {
    background-color: var(--gray-200);
}

/* Info sistema */
.info-sistema {
    margin-bottom: 1.5rem;
}

.info-item {
    display: flex;
    margin-bottom: 0.75rem;
}

.info-label {
    width: 150px;
    font-weight: 600;
    color: var(--gray-700);
}

.info-value {
    color: var(--gray-800);
}

/* Utility classes */
.mt-3 {
    margin-top: 1.5rem;
}

/* Botão de perigo e secundário */
.btn-danger {
    background-color: var(--danger);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background-color: #e11d48;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(244, 63, 94, 0.2);
}

.btn-secundario {
    background-color: var(--gray-200);
    color: var(--gray-700);
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 0.75rem;
}

.btn-secundario:hover {
    background-color: var(--gray-300);
    transform: translateY(-2px);
}

/* Responsividade para configurações */
@media (max-width: 992px) {
    .config-container {
        flex-direction: column;
    }
    
    .config-sidebar {
        width: 100%;
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
        padding: 1rem 0;
    }
    
    .config-menu {
        display: flex;
        overflow-x: auto;
        padding: 0 1rem;
    }
    
    .config-menu li {
        white-space: nowrap;
        padding: 0.7rem 1rem;
    }
    
    .config-menu li.active {
        border-left: none;
        border-bottom: 3px solid var(--primary);
    }
    
    .config-content {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    .form-inline {
        flex-direction: column;
    }
    
    .form-inline .btn-adicionar {
        width: 100%;
    }
    
    .opcoes-tema {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
}

/* Estilo para notificações */
.notificacoes-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.notificacao {
    background-color: white;
    color: var(--gray-800);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    animation: slideIn 0.3s ease;
    overflow: hidden;
    position: relative;
}

.notificacao.fechando {
    animation: slideOut 0.3s ease forwards;
}

.notificacao i {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notificacao span {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.notificacao-info i {
    color: var(--info);
}

.notificacao-success i {
    color: var(--success);
}

.notificacao-warning i {
    color: var(--warning);
}

.notificacao-error i {
    color: var(--danger);
}

.fechar-notificacao {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--gray-600);
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s;
    padding: 0;
    margin: 0;
    line-height: 1;
}

.fechar-notificacao:hover {
    opacity: 1;
}

/* Estilos para os cards de estatísticas nos relatórios */
.cards-estatisticas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.card-estatistica {
    background-color: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--primary);
}

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

.estatistica-valor {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.estatistica-label {
    font-size: 0.9rem;
    color: var(--gray-600);
}

/* Estilos para os detalhes de empresa */
.detalhe-empresa {
    margin-bottom: 2rem;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.detalhe-empresa-header {
    background-color: var(--gray-100);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--gray-200);
}

.detalhe-empresa-header h5 {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-800);
}

.detalhe-empresa-header span {
    font-size: 0.85rem;
    color: var(--gray-600);
}

.tabela-detalhe {
    margin-bottom: 0;
}

/* Animações */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Dropdown icone ativo */
.dropdown-icone.active {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.25);
}

/* Linha expandida com ações */
.linha-expandida {
    background-color: var(--gray-50);
    animation: fadeInContent 0.3s ease;
}

.acoes-expandidas {
    padding: 1rem 1.5rem !important;
}

.acoes-expandidas-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
}

.btn-acao-expandida {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    background-color: white;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-acao-expandida:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 8px rgba(67, 97, 238, 0.15);
}

.btn-acao-expandida i {
    font-size: 0.9rem;
    width: 16px;
    text-align: center;
    color: inherit;
}

/* Botões com ações específicas */
.btn-acao-expandida:nth-child(2):hover {
    background-color: var(--info);
    border-color: var(--info);
}

.btn-acao-expandida:nth-child(3):hover {
    background-color: var(--warning);
    border-color: var(--warning);
}

.btn-acao-expandida:nth-child(4):hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-acao-expandida:last-child:hover {
    background-color: var(--danger);
    border-color: var(--danger);
}

/* Botão para resetar larguras de colunas */
.reset-colunas-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
    gap: 0.5rem;
}

.reset-colunas-btn:hover {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

.reset-colunas-btn i {
    font-size: 0.9rem;
}

/* Posicionar botão de reset à direita */
.tabela-container {
    position: relative;
}

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

.reset-colunas-btn {
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Tooltip explicativo para redimensionamento de colunas */
.tooltip-redimensionamento {
    position: absolute;
    background-color: rgba(67, 97, 238, 0.95);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-size: 0.9rem;
    max-width: 250px;
    text-align: center;
    animation: tooltipFadeIn 0.3s ease;
    pointer-events: auto;
}

.tooltip-redimensionamento::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    margin-left: -10px;
    border-width: 10px 10px 0;
    border-style: solid;
    border-color: rgba(67, 97, 238, 0.95) transparent transparent transparent;
}

.tooltip-redimensionamento p {
    margin: 0 0 5px 0;
}

.tooltip-redimensionamento span {
    position: absolute;
    top: 2px;
    right: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-weight: bold;
}

.tooltip-redimensionamento span:hover {
    opacity: 1;
}

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

/* Estilos para o rodapé */
.app-footer {
    padding: 1rem 2rem;
    text-align: center;
    margin-top: 2rem;
    background-color: transparent;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.footer-content p {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.footer-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.footer-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ========= MEDIA QUERIES PARA RESPONSIVIDADE ========= */

/* Ajustes gerais para dispositivos até 1400px */
@media (max-width: 1400px) {
    .card-relatorio {
        width: calc(50% - 1rem);
    }
}

/* Ajustes para tablets e dispositivos menores (até 1200px) */
@media (max-width: 1200px) {
    /* Ajuste dos filtros para melhor responsividade */
    .filtros {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
    
    .filtros input, .filtros select {
        width: 100%;
    }
    
    .tabela-container {
        overflow-x: auto;
    }
    
    /* Ajuste para tabelas em telas médias */
    table {
        min-width: 900px; /* Garante que a tabela terá uma largura mínima mesmo em telas menores */
    }
}

/* Ajustes para tablets (até 992px) */
@media (max-width: 992px) {
    .sidebar {
        width: 240px;
    }
    
    .content {
        margin-left: 240px;
        padding: 1rem;
    }
    
    .secao-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .acoes-header {
        width: 100%;
        justify-content: flex-start;
    }
    
    /* Configurações responsivas */
    .config-container {
        flex-direction: column;
    }
    
    .config-sidebar {
        width: 100%;
        margin-bottom: 1.5rem;
    }
    
    .config-menu {
        display: flex;
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .config-menu li {
        flex: 0 0 auto;
        margin-right: 1rem;
    }
    
    .config-menu li.active {
        border-left: none;
        border-bottom: 3px solid var(--primary);
    }
    
    .config-content {
        width: 100%;
    }
}

/* Ajustes para dispositivos móveis (até 768px) */
@media (max-width: 768px) {
    /* Layout principal responsivo */
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: relative;
        height: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .sidebar.collapsed {
        width: 100%;
    }
    
    .content {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    .sidebar ul {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
        margin-top: 0;
    }
    
    .sidebar li {
        margin-bottom: 0;
        margin-right: 0.5rem;
    }
    
    .sidebar a {
        padding: 0.75rem;
        border-radius: 0.5rem;
        justify-content: center;
        flex-direction: column;
        text-align: center;
        font-size: 0.8rem;
    }
    
    .sidebar a i {
        margin-right: 0;
        margin-bottom: 0.35rem;
    }
    
    .sidebar a.active {
        border-left: none;
        background-color: var(--primary);
        color: white;
    }
    
    /* Header responsivo */
    .app-header {
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
        align-items: center;
    }
    
    .app-header .logo {
        text-align: center;
    }
    
    .app-header h1 {
        font-size: 1.4rem;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    /* Ajustes no conteúdo para dispositivos móveis */
    .filtros {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    /* Modal responsivo */
    .modal-conteudo {
        width: 95%;
        max-width: 500px;
        padding: 1.25rem;
    }
    
    /* Paginação responsiva */
    .paginacao {
        flex-direction: column;
        gap: 1rem;
    }
    
    .info-paginacao {
        width: 100%;
        justify-content: space-between;
    }
    
    .controles-paginacao {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Botões de ação responsivos */
    .btn-adicionar, .btn-exportar, .btn-importar {
        padding: 0.6rem;
        font-size: 0.9rem;
    }
    
    .btn-adicionar span, .btn-exportar span, .btn-importar span {
        display: none;
    }
    
    .btn-adicionar::before, .btn-exportar::before, .btn-importar::before {
        margin-right: 0;
    }
    
    .controles-paginacao button span {
        display: none;
    }
    
    /* Cards de relatórios responsivos */
    .cards-container {
        grid-template-columns: 1fr;
    }
    
    /* Formulários em linha responsivos */
    .form-inline {
        flex-direction: column;
    }
    
    .form-inline .btn-adicionar {
        margin-top: 0.5rem;
    }
    
    /* Opções de tema responsivas */
    .opcoes-tema {
        flex-direction: column;
    }
}

/* Ajustes extras para dispositivos muito pequenos (até 480px) */
@media (max-width: 480px) {
    .app-header h1 {
        font-size: 1.2rem;
    }
    
    .login-form {
        width: 90%;
        padding: 1.5rem;
    }
    
    .dropdown-menu {
        min-width: 180px;
        right: -50px;
    }
    
    .tabela-container {
        margin: 0 -1rem;
        width: calc(100% + 2rem);
        border-radius: 0;
    }
    
    .form-group label {
        font-size: 0.9rem;
    }
    
    .acoes {
        display: flex;
        flex-direction: column;
    }
    
    .acoes .btn-acao-icone {
        margin-bottom: 0.5rem;
    }
    
    .numeros-paginas {
        display: none;
    }
}

/* Suporte para dispositivos de tela grande (acima de 1400px) */
@media (min-width: 1401px) {
    .content {
        max-width: calc(100% - 280px);
    }
    
    .cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ajustes para melhorar a responsividade das tabelas em dispositivos móveis */
.tabela-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Estilos de scrollbar para melhor experiência em dispositivos com toque */
.tabela-container::-webkit-scrollbar {
    height: 8px;
}

.tabela-container::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 10px;
}

.tabela-container::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 10px;
}

.tabela-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-500);
}

/* Assegura que os dropdowns de ações não sejam cortados em dispositivos pequenos */
.dropdown-menu {
    max-height: 80vh;
    overflow-y: auto;
}

@media (max-width: 768px) {
    /* Quando a tabela estiver sendo rolada horizontalmente, exibir indicador */
    .tabela-container::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, rgba(255,255,255,0), rgba(255,255,255,0.7));
        pointer-events: none;
        opacity: 1;
        transition: opacity 0.3s;
        z-index: 50;
    }
}

/* Estilo para sidebar fixa em dispositivos móveis */
.sidebar-fixed {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* Melhorias adicionais para responsividade em todas as telas */
@media (max-width: 768px) {
    /* Ajustes para o form em dispositivos móveis */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Garantir que os modais sejam acessíveis em telas pequenas */
    .modal-conteudo {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Melhor espaçamento para botões em dispositivos móveis */
    .form-group.botoes-acao {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .form-group.botoes-acao button {
        width: 100%;
    }
    
    /* Ajustes para login em dispositivos móveis */
    .login-form h1 {
        font-size: 1.4rem;
    }
    
    .login-subtitle {
        font-size: 0.85rem;
    }
    
    /* Garantir que as tabelas de histórico sejam responsivas */
    #tabelaHistorico {
        display: block;
        overflow-x: auto;
    }
}

/* Ajustes para orientação de tela em dispositivos móveis */
@media (max-width: 480px) and (orientation: landscape) {
    .app-header {
        padding: 0.75rem 1rem;
    }
    
    .login-form {
        padding: 1.25rem;
    }
    
    .modal-conteudo {
        padding: 1rem;
    }
    
    .sidebar ul {
        flex-wrap: wrap;
    }
}

/* Ajustes para telas de alta densidade de pixels */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    * {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .tabela-container::-webkit-scrollbar {
        height: 6px;
    }
}

/* Ajustes para telas muito pequenas em largura */
@media (max-width: 350px) {
    .app-header h1 {
        font-size: 1.1rem;
    }
    
    .sidebar a {
        padding: 0.5rem;
        font-size: 0.7rem;
    }
    
    .sidebar a i {
        font-size: 1rem;
    }
    
    .btn-adicionar, .btn-exportar, .btn-importar {
        padding: 0.5rem;
    }
    
    .dropdown-menu {
        min-width: 160px;
        right: -40px;
    }
}

/* Suporte para modo escuro do sistema */
@media (prefers-color-scheme: dark) {
    /* Não aplicar automaticamente o modo escuro para não afetar a funcionalidade,
       mas deixar preparado caso a aplicação implemente essa funcionalidade no futuro */
}

/* Melhorias para tabelas expandidas em dispositivos móveis */
@media (max-width: 768px) {
    /* Conteúdo expandido na tabela */
    .linha-expandida {
        display: flex;
        flex-direction: column;
        padding: 0.75rem;
    }
    
    .acoes-expandidas {
        padding: 0.5rem 0;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 0.5rem;
    }
    
    .btn-acao-expandida {
        flex: 0 0 calc(50% - 0.5rem);
        margin: 0;
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
    }
    
    /* Menu contextual em telas menores */
    .dropdown-acoes {
        position: static;
    }
    
    .dropdown-menu {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        border-radius: 1rem 1rem 0 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        transform: translateY(100%);
        transition: transform 0.3s ease;
    }
    
    .dropdown-menu.show {
        transform: translateY(0);
    }
    
    .dropdown-item {
        padding: 0.75rem;
        border-radius: 0.5rem;
        margin-bottom: 0.5rem;
    }
    
    /* Ajustar como os modal se comportam em telas pequenas */
    .modal.ativo {
        align-items: flex-end;
    }
    
    .modal-conteudo {
        margin-bottom: 0;
        border-radius: 1.5rem 1.5rem 0 0;
        max-height: 85vh;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
    .acoes-expandidas {
        flex-direction: column;
    }
    
    .btn-acao-expandida {
        flex: 0 0 100%;
        width: 100%;
    }
    
    /* Tabela de detalhes em telas pequenas */
    .detalhe-empresa {
        padding: 0.75rem;
    }
    
    .detalhe-empresa-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detalhe-empresa-header h5 {
        margin-bottom: 0.5rem;
    }
    
    /* Tabelas em cards para visualização mobile - alternativa ao scroll horizontal */
    @supports (display: grid) {
        .tabela-card-mode table,
        .tabela-card-mode thead,
        .tabela-card-mode tbody,
        .tabela-card-mode th,
        .tabela-card-mode td,
        .tabela-card-mode tr {
            display: block;
        }
        
        .tabela-card-mode thead tr {
            position: absolute;
            top: -9999px;
            left: -9999px;
        }
        
        .tabela-card-mode tr {
            margin-bottom: 1rem;
            border-radius: 0.5rem;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            background-color: white;
            padding: 0.75rem;
        }
        
        .tabela-card-mode td {
            position: relative;
            padding-left: 50%;
            text-align: right;
            border-bottom: 1px solid var(--gray-200);
        }
        
        .tabela-card-mode td:last-child {
            border-bottom: none;
        }
        
        .tabela-card-mode td::before {
            position: absolute;
            left: 0.5rem;
            width: 45%;
            padding-right: 0.5rem;
            white-space: nowrap;
            font-weight: bold;
            text-align: left;
        }
    }
}

/* Estilos para o botão de alternância do modo cartão em dispositivos pequenos */
.toggle-card-mode {
    display: none;
    position: relative;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    margin-bottom: 0.75rem;
}

.toggle-card-mode:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

.toggle-card-mode:active {
    transform: translateY(0);
}

.td-title {
    display: none;
}

@media (max-width: 480px) {
    .toggle-card-mode {
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tabela-card-mode {
        overflow-x: visible !important;
    }
    
    .tabela-card-mode .td-title {
        display: block;
        font-weight: bold;
        margin-bottom: 0.25rem;
        color: var(--gray-700);
        text-align: left;
        border-bottom: 1px dashed var(--gray-300);
        padding-bottom: 0.25rem;
    }
    
    .tabela-card-mode td {
        padding: 0.75rem !important;
        display: block;
        text-align: left !important;
    }
    
    .tabela-card-mode table {
        min-width: auto !important;
    }
    
    /* Esconder o indicador de rolagem quando no modo cartão */
    .tabela-card-mode::after {
        display: none !important;
    }
}

/* Container de notificações em tempo real */
.notificacao-container {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 350px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Estilo da notificação */
.notificacao {
    background-color: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    padding: 12px;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(30px);
    animation: notificacaoEntrada 0.3s forwards;
    border-left: 4px solid var(--primary);
}

/* Animação de entrada da notificação */
@keyframes notificacaoEntrada {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Animação de saída da notificação */
@keyframes notificacaoSaida {
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Conteúdo da notificação */
.notificacao-conteudo {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Texto da notificação */
.notificacao-texto {
    font-size: 14px;
    color: var(--gray-800);
    flex: 1;
}

/* Botão para fechar a notificação */
.fechar-notificacao {
    background: none;
    border: none;
    color: var(--gray-500);
    font-size: 16px;
    cursor: pointer;
    margin-left: 8px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.fechar-notificacao:hover {
    background-color: var(--gray-200);
    color: var(--gray-700);
}

/* Tipos de notificações */
.notificacao.sucesso {
    border-left-color: var(--success);
    background-color: rgba(74, 222, 128, 0.1);
}

.notificacao.informacao {
    border-left-color: var(--info);
    background-color: rgba(14, 165, 233, 0.1);
}

.notificacao.alerta {
    border-left-color: var(--warning);
    background-color: rgba(245, 158, 11, 0.1);
}

.notificacao.erro {
    border-left-color: var(--danger);
    background-color: rgba(244, 63, 94, 0.1);
}

/* Responsividade para notificações */
@media (max-width: 768px) {
    .notificacao-container {
        width: calc(100% - 40px);
        max-width: 100%;
    }
    
    .notificacao {
        width: 100%;
    }
}

/* Estilos para botões de ação */
.btn-adicionar,
.btn-teste {
    background-color: #4caf50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

.btn-adicionar:hover {
    background-color: #43a047;
}

.btn-teste {
    background-color: #2196F3;
}

.btn-teste:hover {
    background-color: #1976D2;
}

/* Indicador de carregamento */
.indicador-carregamento {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.indicador-spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top: 4px solid #ffffff;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 10px;
}

.indicador-mensagem {
    color: white;
    font-size: 18px;
    font-weight: bold;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Notificações */
.notificacao {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s ease;
    max-width: 400px;
    word-wrap: break-word;
}

.notificacao.info {
    background-color: #2196F3;
    color: white;
    border-left: 5px solid #0b7dda;
}

.notificacao.sucesso {
    background-color: #4CAF50;
    color: white;
    border-left: 5px solid #388E3C;
}

.notificacao.erro {
    background-color: #F44336;
    color: white;
    border-left: 5px solid #D32F2F;
}

.notificacao.alerta {
    background-color: #FF9800;
    color: white;
    border-left: 5px solid #F57C00;
}

/* Tabela em modo cartão para mobile */
@media (max-width: 480px) {
    .tabela-card-mode {
        overflow: visible;
    }
    
    .tabela-card-mode .td-title {
        display: inline-block;
        min-width: 120px;
        font-weight: 600;
        color: var(--gray-700);
        text-transform: uppercase;
        font-size: 0.7rem;
        letter-spacing: 0.05em;
        margin-right: 0.5rem;
    }
    
    .tabela-card-mode td {
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .tabela-card-mode tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: 10px;
        box-shadow: var(--shadow-sm);
        border: 1px solid var(--gray-200);
        background-color: white;
    }
    
    .tabela-card-mode tbody {
        display: block;
    }
    
    .tabela-card-mode thead {
        display: none;
    }
    
    /* Ajusta as células de ação no modo card */
    .tabela-card-mode td:last-child {
        display: flex;
        justify-content: center;
        background-color: var(--gray-50);
        border-bottom-left-radius: 10px;
        border-bottom-right-radius: 10px;
    }
    
    /* Esconde o cabeçalho da coluna de ações */
    .tabela-card-mode td:last-child .td-title {
        display: none;
    }
    
    /* Formatação específica para cada tipo de dado */
    .tabela-card-mode td[data-type="status"] .status-chip {
        margin-left: auto;
    }
    
    /* Ajustar largura das células para melhor visualização em cartões */
    .tabela-card-mode td:not(:last-child) {
        justify-content: space-between;
    }
    
    .tabela-card-mode td:not(:last-child) span:not(.td-title) {
        margin-left: auto;
        text-align: right;
        max-width: 60%;
    }
}

/* Suporte para responsividade nas colunas */
@media (max-width: 1200px) and (min-width: 769px) {
    .tabela-container {
        overflow-x: auto;
    }
    
    table th:nth-child(1), table td:nth-child(1),
    table th:nth-child(2), table td:nth-child(2),
    table th:nth-child(3), table td:nth-child(3),
    table th:nth-child(4), table td:nth-child(4),
    table th:nth-child(5), table td:nth-child(5),
    table th:nth-child(6), table td:nth-child(6),
    table th:nth-child(7), table td:nth-child(7),
    table th:nth-child(8), table td:nth-child(8) {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

/* Botão para alternar modo de visualização */
.toggle-card-mode {
    display: none; /* Inicialmente oculto */
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: var(--gray-100);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    color: var(--gray-700);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 0.5rem;
}

/* Mostrar o botão apenas em mobile */
@media (max-width: 768px) {
    .toggle-card-mode {
        display: inline-flex;
    }
}
