/* === BOTÃO DE OPÇÕES === */
.btn-opcoes {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-opcoes:hover {
    background: #e2e8f0;
    color: #475569;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-opcoes svg {
    width: 16px;
    height: 16px;
}

/* Estilos para Impressão de Relatórios */
@media print {
    /* Esconde tudo por padrão ao imprimir */
    body * {
        visibility: hidden;
    }

    /* Torna a view de relatórios e seus filhos visíveis */
    #view-relatorios, #view-relatorios * {
        visibility: visible;
    }

    /* Garante que a view de relatórios ocupe toda a página */
    #view-relatorios {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        margin: 0;
        padding: 0;
        border: none;
        box-shadow: none;
    }
    
    /* Esconde elementos de interface que não devem aparecer na impressão */
    header, 
    #relatorios-header, 
    main > div:not(#view-relatorios), 
    #modal-editar-lancamento, 
    #modal-log-detalhes,
    #modal-editar-usuario {
        display: none !important;
    }
}

/* --- Estilos para o Drag and Drop do Plano de Contas --- */

/* Estilo para o placeholder que indica onde o item será solto */
.sortable-ghost {
    opacity: 0.4;
    background-color: #cfe2ff; /* Um azul claro para indicar a área de drop */
    border: 1px dashed #0d6efd;
}

/* Estilo para o item que está sendo arrastado */
.sortable-drag {
    opacity: 0.9;
    background-color: #e2e8f0; /* Um cinza claro para o item em trânsito */
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Mãozinha para indicar que o item é arrastável */
.handle {
    cursor: grab;
    padding-right: 10px;
    color: #718096; /* Cinza */
}

/* Mãozinha fechada ao arrastar */
.handle:active {
    cursor: grabbing;
}

/* Estilo do container de uma conta no plano de contas */
.conta-item-drag {
    padding: 0.5rem;
    border: 1px solid #e2e8f0; /* Borda cinza clara */
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.conta-item-drag:hover {
    background-color: #f7fafc; /* Um cinza bem sutil no hover */
}

/* Container para os filhos de uma conta, com a linha pontilhada à esquerda */
.child-container {
    padding-left: 2rem;
    margin-top: 2px;
    min-height: 10px; /* Cria uma área mínima para soltar itens, mesmo se vazia */
    border-left: 2px dashed #e2e8f0;
}

/* Estilo para transição suave em modais (opcional, mas melhora a UX) */
.modal-transition {
    transition: opacity 0.3s ease;
}


/* === Liquid Glass Theme (light) === */
:root {
  --bg1: #eef5ff;
  --bg2: #f9fbff;
  --glass-bg: rgba(255, 255, 255, 0.55);
  --glass-border: rgba(255, 255, 255, 0.38);
  --glass-shadow: 0 12px 40px rgba(17, 24, 39, .14);
  --glass-blur: saturate(160%) blur(14px);
  --ink-1: #0f172a; /* slate-900 */
  --ink-2: #334155; /* slate-700 */
  --ink-3: #64748b; /* slate-500 */
  --brand: #2563eb; /* blue-600 */
  --ok: #16a34a; /* green-600 */
  --warn: #d97706; /* amber-600 */
  --danger: #dc2626; /* red-600 */
}

body.liquid-glass,
body.liquid-glass .app-shell {
  background: radial-gradient(1200px 800px at 10% -10%, #ffffff 0%, var(--bg1) 40%, var(--bg2) 100%) fixed;
}

.glass-panel {
  background: var(--glass-bg) !important;
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
}

.glass-toolbar {
  background: linear-gradient(180deg, rgba(255,255,255,.7), rgba(255,255,255,.35));
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
}

.input-glass, .select-glass, .btn-glass {
  background: rgba(255,255,255,.65);
  border: 1px solid rgba(255,255,255,.5);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  transition: box-shadow .2s ease, transform .05s ease;
}
.input-glass:focus, .select-glass:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .25);
}
.btn-glass:hover { transform: translateY(-1px); }

.td-money { 
  text-align: right !important; 
  font-variant-numeric: tabular-nums; 
  white-space: nowrap;
}
.td-center { text-align: center; }
.td-nowrap { white-space: nowrap; }

.table-glass {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table-glass thead th {
  position: sticky; top: 0;
  background: rgba(255,255,255,.75);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.table-glass th, .table-glass td {
  border-bottom: 1px solid rgba(148,163,184,.25);
}
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

td:empty::after { content: '—'; color: var(--ink-3); }

.chip {
  display: inline-flex; align-items: center;
  padding: 2px 8px; font-size: 12px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.5);
  backdrop-filter: var(--glass-blur);
}


/* === TABELA SIMPLIFICADA === */
.table-glass {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  table-layout: auto;
  min-width: 0;
}

.table-glass thead th {
  background: #f8fafc;
  color: #374151;
  font-weight: 600;
  font-size: 0.8rem;
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 10;
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.2;
}

.table-glass tbody td {
  padding: 8px 6px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  font-size: 0.8rem;
}

.table-glass tbody tr:hover {
  background: #f9fafb;
}

.table-glass tbody tr:last-child td {
  border-bottom: none;
}

.td-money { 
  text-align: right !important; 
  font-variant-numeric: tabular-nums; 
  white-space: nowrap; 
  font-weight: 500;
}

.td-center { 
  text-align: center !important; 
}

.td-empty::after { 
  content: '—'; 
  color: #9ca3af; 
}

/* === LARGURAS OTIMIZADAS DAS COLUNAS === */
.table-glass th:nth-child(1), .table-glass td:nth-child(1) { width: 35px; } /* Checkbox */
.table-glass th:nth-child(2), .table-glass td:nth-child(2) { 
  width: 12%; 
  min-width: 100px; 
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.3;
} /* Fornecedor */
.table-glass th:nth-child(3), .table-glass td:nth-child(3) { 
  width: 16%; 
  min-width: 120px; 
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.3;
} /* Descrição */
.table-glass th:nth-child(4), .table-glass td:nth-child(4) { width: 70px; } /* Vencimento */
.table-glass th:nth-child(5), .table-glass td:nth-child(5) { width: 90px; } /* Valor */
.table-glass th:nth-child(6), .table-glass td:nth-child(6) { width: 50px; } /* Anexos */
.table-glass th:nth-child(7), .table-glass td:nth-child(7) { 
  width: 10%; 
  min-width: 80px; 
  word-wrap: break-word;
  word-break: break-word;
  white-space: normal;
  line-height: 1.3;
} /* Conta Pagamento */
.table-glass th:nth-child(8), .table-glass td:nth-child(8) { width: 35px; } /* Rec? */
.table-glass th:nth-child(9), .table-glass td:nth-child(9) { width: 35px; } /* Apr? */
.table-glass th:nth-child(10), .table-glass td:nth-child(10) { width: 35px; } /* Con? */
.table-glass th:nth-child(11), .table-glass td:nth-child(11) { width: 35px; } /* Env? */
.table-glass th:nth-child(12), .table-glass td:nth-child(12) { width: 70px; } /* Status Pag. */
.table-glass th:nth-child(13), .table-glass td:nth-child(13) { width: 70px; } /* Status Aprov. */
.table-glass th:nth-child(14), .table-glass td:nth-child(14) { width: 50px; } /* Ações */

.status-chip { 
  display: inline-flex; 
  align-items: center; 
  gap: 4px;
  padding: 4px 8px; 
  font-size: 12px; 
  font-weight: 500; 
  border-radius: 6px; 
  color: #374151;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
}
.status-chip.aprovado { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status-chip.pendente { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.status-chip.reprovado { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.status-chip.pago { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
.status-chip.a-pagar { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

.list-glass {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.list-item-glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  padding: 14px;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
}
.list-item-glass:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 42px rgba(15,23,42,.16);
  background: rgba(255,255,255,.65);
}
.list-item-glass .item-title { font-weight: 700; color: var(--ink-1); }
.list-item-glass .item-sub { color: var(--ink-3); font-size: 12px; }

/* === TELA DE LOGIN MODERNA === */
#tela-login {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 9999;
    overflow: hidden;
}

.login-container {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/><circle cx="10" cy="60" r="0.5" fill="white" opacity="0.1"/><circle cx="90" cy="40" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.login-card {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.login-input {
    transition: all 0.3s ease;
}

.login-input:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15);
}

.login-button {
    position: relative;
    overflow: hidden;
}

.login-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.login-button:hover::before {
    left: 100%;
}

.login-logo {
    animation: float 3s ease-in-out infinite;
}

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

/* === RESPONSIVIDADE PARA LOGIN === */
@media (max-width: 640px) {
    #tela-login {
        padding: 0;
    }
    
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        margin: 0;
        border-radius: 1rem;
        padding: 1.5rem 1rem;
    }
    
    .login-logo {
        height: 3rem;
        width: 3rem;
    }
    
    .login-logo svg {
        height: 1.5rem;
        width: 1.5rem;
    }
    
    .login-title {
        font-size: 1.5rem;
    }
    
    .login-subtitle {
        font-size: 0.75rem;
    }
    
    .login-input {
        padding: 0.75rem 0.75rem 0.75rem 2.5rem;
        font-size: 0.875rem;
    }
    
    .login-button {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .login-container {
        padding: 0.5rem;
    }
    
    .login-card {
        padding: 1rem 0.75rem;
        border-radius: 0.75rem;
    }
    
    .login-logo {
        height: 2.5rem;
        width: 2.5rem;
    }
    
    .login-title {
        font-size: 1.25rem;
        margin-top: 1rem;
    }
    
    .login-subtitle {
        font-size: 0.7rem;
    }
}

/* === RESPONSIVIDADE SIMPLIFICADA === */
@media (max-width: 1200px) {
  .table-glass {
    font-size: 0.8rem;
  }

  .table-glass thead th,
  .table-glass tbody td {
    padding: 8px 6px;
  }

  .table-glass thead th {
    font-size: 0.75rem;
    line-height: 1.1;
  }
  
  /* Ajusta larguras para telas menores */
  .table-glass th:nth-child(2), .table-glass td:nth-child(2) { width: 10%; min-width: 80px; } /* Fornecedor */
  .table-glass th:nth-child(3), .table-glass td:nth-child(3) { width: 14%; min-width: 100px; } /* Descrição */
  .table-glass th:nth-child(7), .table-glass td:nth-child(7) { width: 8%; min-width: 70px; } /* Conta Pagamento */
}

@media (max-width: 768px) {
  .table-glass {
    font-size: 0.75rem;
  }

  .table-glass thead th,
  .table-glass tbody td {
    padding: 6px 4px;
  }

  .table-glass thead th {
    font-size: 0.7rem;
    line-height: 1.0;
  }
  
  /* Ajusta ainda mais para mobile */
  .table-glass th:nth-child(2), .table-glass td:nth-child(2) { width: 8%; min-width: 70px; } /* Fornecedor */
  .table-glass th:nth-child(3), .table-glass td:nth-child(3) { width: 12%; min-width: 80px; } /* Descrição */
  .table-glass th:nth-child(7), .table-glass td:nth-child(7) { width: 6%; min-width: 50px; } /* Conta Pagamento */
}

/* === CONTAINER DA TABELA SIMPLIFICADO === */
.table-scroll {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.table-scroll::-webkit-scrollbar {
  height: 6px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Table loading state improvements */
.table-loading::after {
  background: rgba(255,255,255,0.9);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

/* Table empty state */
.table-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--ink-3);
  font-style: italic;
}

.table-empty::before {
  content: '📊';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Density toggles (future-proof) */
body[data-density="compact"] .table-glass tbody td { padding-top: 6px; padding-bottom: 6px; }
body[data-density="compact"] .list-item-glass { padding: 10px; }


/* === Minimal Liquid Glass pass === */
:root {
  --glass-bg: rgba(255,255,255,.5);
  --glass-border: rgba(255,255,255,.35);
  --glass-shadow: 0 8px 24px rgba(15, 23, 42, .10);
  --glass-blur: saturate(140%) blur(12px);
}

body {
  background: linear-gradient(180deg, var(--bg1), var(--bg2));
}

/* Cards */
.glass-card, .mobile-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 16px;
  padding: 20px;
}

/* CTAs / Buttons – minimalist */
button, .btn {
  border-radius: 12px;
}

/* Mobile blocker removed - now supporting mobile devices */

/* === Responsive Breakpoints === */

/* Large tablets and small desktops (1024px - 1200px) */
@media (max-width: 1200px) and (min-width: 1025px) {
  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .glass-panel {
    padding: 1rem;
  }
  
  .table-scroll {
    font-size: 0.9rem;
  }
}

/* Tablets (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
  /* Tablet-specific styles when not blocked */
  .container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Navigation adjustments */
  nav .space-x-4 {
    gap: 0.5rem;
  }
  
  nav a {
    font-size: 0.9rem;
    padding: 0.5rem;
  }
  
  /* Form adjustments */
  .grid.grid-cols-1.md\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  /* Table adjustments */
  .table-scroll {
    font-size: 0.85rem;
  }
  
  .table-glass th,
  .table-glass td {
    padding: 0.5rem 0.25rem;
  }
  
  /* Modal adjustments */
  .fixed.inset-0 .relative.top-10 {
    top: 2rem;
    margin: 1rem;
  }
  
  /* Button adjustments */
  button {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
  }
  
  /* Glass panel adjustments */
  .glass-panel {
    padding: 1rem;
  }
  
  /* Filter bar adjustments */
  #filter-bar {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  #filter-bar > * {
    width: 100%;
  }
  
  /* Mobile blocker removed - now supporting mobile devices */
}

/* Small tablets (600px - 768px) */
@media (max-width: 768px) and (min-width: 601px) {
  /* Mobile blocker removed - now supporting mobile devices */
}

/* Mobile devices (up to 600px) */
@media (max-width: 600px) {
  /* Mobile blocker removed - now supporting mobile devices */
}

/* === Loading Spinner Styles === */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

.loading-spinner.large {
  width: 40px;
  height: 40px;
  border-width: 4px;
}

.loading-spinner.small {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.loading-text {
  margin-top: 1rem;
  color: #666;
  font-size: 0.9rem;
}

/* Button loading state */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading .loading-spinner {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.btn-loading .btn-text {
  opacity: 0;
}

/* Table loading state */
.table-loading {
  position: relative;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.table-loading .loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11;
}

/* === Toast Notifications === */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: 100%;
}

.toast {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  box-shadow: var(--glass-shadow);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

.toast.hide {
  transform: translateX(100%);
  opacity: 0;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

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

.toast-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 4px;
  color: var(--ink-1);
}

.toast-message {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.4;
  word-wrap: break-word;
}

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--ink-3);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s ease;
  font-size: 16px;
  line-height: 1;
}

.toast-close:hover {
  background-color: rgba(0, 0, 0, 0.1);
  color: var(--ink-1);
}

/* Toast Types */
.toast.success {
  border-left: 4px solid var(--ok);
}

.toast.success .toast-icon {
  background-color: var(--ok);
}

.toast.error {
  border-left: 4px solid var(--danger);
}

.toast.error .toast-icon {
  background-color: var(--danger);
}

.toast.warning {
  border-left: 4px solid var(--warn);
}

.toast.warning .toast-icon {
  background-color: var(--warn);
}

.toast.info {
  border-left: 4px solid var(--brand);
}

.toast.info .toast-icon {
  background-color: var(--brand);
}

/* Toast Progress Bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.3);
  transition: width linear;
}

.toast.success .toast-progress {
  background-color: var(--ok);
}

.toast.error .toast-progress {
  background-color: var(--danger);
}

.toast.warning .toast-progress {
  background-color: var(--warn);
}

.toast.info .toast-progress {
  background-color: var(--brand);
}

/* Toast Animations */
@keyframes toast-slide-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Responsive Toast */
@media (max-width: 768px) {
  .toast-container {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .toast {
    padding: 12px 16px;
  }
  
  .toast-title {
    font-size: 13px;
  }
  
  .toast-message {
    font-size: 12px;
  }
}

/* === Tooltips === */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--ink-1);
  color: white;
  text-align: center;
  border-radius: 8px;
  padding: 8px 12px;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-size: 12px;
  line-height: 1.4;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--ink-1) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Tooltip positions */
.tooltip.tooltip-top .tooltip-text {
  bottom: 125%;
  top: auto;
}

.tooltip.tooltip-top .tooltip-text::after {
  top: 100%;
  bottom: auto;
  border-color: var(--ink-1) transparent transparent transparent;
}

.tooltip.tooltip-bottom .tooltip-text {
  top: 125%;
  bottom: auto;
}

.tooltip.tooltip-bottom .tooltip-text::after {
  bottom: 100%;
  top: auto;
  border-color: transparent transparent var(--ink-1) transparent;
}

.tooltip.tooltip-left .tooltip-text {
  right: 125%;
  left: auto;
  margin-left: 0;
  margin-right: -100px;
}

.tooltip.tooltip-left .tooltip-text::after {
  left: 100%;
  right: auto;
  top: 50%;
  margin-top: -5px;
  margin-left: 0;
  border-color: transparent transparent transparent var(--ink-1);
}

.tooltip.tooltip-right .tooltip-text {
  left: 125%;
  right: auto;
  margin-left: 0;
  margin-right: -100px;
}

.tooltip.tooltip-right .tooltip-text::after {
  right: 100%;
  left: auto;
  top: 50%;
  margin-top: -5px;
  margin-right: 0;
  border-color: transparent var(--ink-1) transparent transparent;
}

/* Tooltip sizes */
.tooltip.tooltip-small .tooltip-text {
  width: 120px;
  margin-left: -60px;
}

.tooltip.tooltip-large .tooltip-text {
  width: 300px;
  margin-left: -150px;
}

.tooltip.tooltip-wide .tooltip-text {
  width: 400px;
  margin-left: -200px;
}

/* Tooltip types */
.tooltip.tooltip-info .tooltip-text {
  background-color: var(--brand);
}

.tooltip.tooltip-info .tooltip-text::after {
  border-color: var(--brand) transparent transparent transparent;
}

.tooltip.tooltip-success .tooltip-text {
  background-color: var(--ok);
}

.tooltip.tooltip-success .tooltip-text::after {
  border-color: var(--ok) transparent transparent transparent;
}

.tooltip.tooltip-warning .tooltip-text {
  background-color: var(--warn);
}

.tooltip.tooltip-warning .tooltip-text::after {
  border-color: var(--warn) transparent transparent transparent;
}

.tooltip.tooltip-error .tooltip-text {
  background-color: var(--danger);
}

.tooltip.tooltip-error .tooltip-text::after {
  border-color: var(--danger) transparent transparent transparent;
}

/* Tooltip with delay */
.tooltip.tooltip-delay .tooltip-text {
  transition-delay: 0.5s;
}

/* Responsive tooltips */
@media (max-width: 768px) {
  .tooltip .tooltip-text {
    width: 150px;
    margin-left: -75px;
    font-size: 11px;
    padding: 6px 10px;
  }
  
  .tooltip.tooltip-small .tooltip-text {
    width: 100px;
    margin-left: -50px;
  }
  
  .tooltip.tooltip-large .tooltip-text {
    width: 200px;
    margin-left: -100px;
  }
  
  .tooltip.tooltip-wide .tooltip-text {
    width: 250px;
    margin-left: -125px;
  }
}

/* === Form Validation Styles === */
.field-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: block;
  animation: slideDown 0.3s ease;
}

input.error,
select.error,
textarea.error {
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

input.success,
select.success,
textarea.success {
  border-color: var(--ok) !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.1) !important;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--ink-2);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input:disabled,
.form-group select:disabled,
.form-group textarea:disabled {
  background-color: #f9fafb;
  color: #6b7280;
  cursor: not-allowed;
}

/* Validation states */
.validation-success {
  color: var(--ok);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.validation-success::before {
  content: '✓';
  font-weight: bold;
}

.validation-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.validation-error::before {
  content: '✕';
  font-weight: bold;
}

/* Form validation animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

input.error,
select.error,
textarea.error {
  animation: shake 0.5s ease;
}

/* Required field indicator */
.required::after {
  content: ' *';
  color: var(--danger);
  font-weight: bold;
}

/* Form help text */
.form-help {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 4px;
}

/* Form error summary */
.form-error-summary {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1rem;
}

.form-error-summary h4 {
  color: var(--danger);
  margin: 0 0 0.5rem 0;
  font-size: 14px;
  font-weight: 600;
}

.form-error-summary ul {
  margin: 0;
  padding-left: 1rem;
  color: var(--danger);
  font-size: 13px;
}

.form-error-summary li {
  margin-bottom: 0.25rem;
}

/* Responsive form validation */
@media (max-width: 768px) {
  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  .field-error {
    font-size: 11px;
  }
}

/* === BOTÃO DE AÇÕES DA TABELA === */
.btn-acoes-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-acoes-menu:hover {
    background-color: #f3f4f6;
    color: #374151;
    transform: scale(1.05);
}

.btn-acoes-menu:focus {
    outline: none;
    box-shadow: 0 0 0 2px #3b82f6;
}

/* Dropdown de ações */
.acoes-dropdown {
    position: fixed;
    z-index: 9999;
    min-width: 200px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    padding: 8px 0;
    margin-top: 4px;
}

.acoes-dropdown-item {
    display: block;
    width: 100%;
    padding: 8px 16px;
    text-align: left;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    transition: background-color 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
}

.acoes-dropdown-item:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.acoes-dropdown-item.danger {
    color: #dc2626;
}

.acoes-dropdown-item.danger:hover {
    background-color: #fef2f2;
    color: #b91c1c;
}

.acoes-dropdown-item.success {
    color: #059669;
}

.acoes-dropdown-item.success:hover {
    background-color: #f0fdf4;
    color: #047857;
}

.acoes-dropdown-item.warning {
    color: #d97706;
}

.acoes-dropdown-item.warning:hover {
    background-color: #fffbeb;
    color: #b45309;
}

/* === TOPBAR MELHORADA === */
.nav-link {
  position: relative;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
}

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

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: #3b82f6;
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  background-color: #dbeafe;
  color: #1d4ed8;
  font-weight: 600;
}

.nav-link.active::after {
  width: 100%;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.user-profile .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.user-profile .user-name {
  font-weight: 600;
  color: #1f2937;
  font-size: 0.875rem;
}

.user-profile .user-role {
  color: #6b7280;
  font-size: 0.75rem;
}

/* Responsive topbar */
@media (max-width: 1024px) {
  .nav-link {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 768px) {
  .nav-link {
    padding: 0.375rem 0.5rem;
    font-size: 0.8rem;
  }
  
  .user-profile {
    padding: 0.375rem 0.75rem;
  }
  
  .user-profile .user-name {
    font-size: 0.8rem;
  }
  
  .user-profile .user-role {
    font-size: 0.7rem;
  }
}

/* === OTIMIZAÇÕES DE LAYOUT PARA MELHOR APROVEITAMENTO DO ESPAÇO === */

/* Reduzir margens laterais em telas grandes */
@media (min-width: 1024px) {
  .max-w-full { 
    max-width: 95% !important; 
  }
}

@media (min-width: 1280px) {
  .max-w-full { 
    max-width: 90% !important; 
  }
}

@media (min-width: 1536px) {
  .max-w-full { 
    max-width: 85% !important; 
  }
}

/* Otimizar tabela para melhor uso do espaço */
.table-glass td { 
  padding: 0.5rem 0.25rem !important; 
}

.table-glass th { 
  padding: 0.5rem 0.25rem !important; 
}

/* Reduzir espaçamento dos filtros */
.filtros-container { 
  gap: 0.5rem; 
}

.filtros-container select, 
.filtros-container input { 
  padding: 0.5rem; 
}

/* Otimizar largura das colunas da tabela */
.table-glass th:nth-child(1), .table-glass td:nth-child(1) { width: 3%; } /* Checkbox */
.table-glass th:nth-child(2), .table-glass td:nth-child(2) { width: 15%; } /* Fornecedor */
.table-glass th:nth-child(3), .table-glass td:nth-child(3) { width: 20%; } /* Descrição */
.table-glass th:nth-child(4), .table-glass td:nth-child(4) { width: 8%; } /* Vencimento */
.table-glass th:nth-child(5), .table-glass td:nth-child(5) { width: 8%; } /* Valor */
.table-glass th:nth-child(6), .table-glass td:nth-child(6) { width: 5%; } /* Anexos */
.table-glass th:nth-child(7), .table-glass td:nth-child(7) { width: 12%; } /* Conta Pagamento */
.table-glass th:nth-child(8), .table-glass td:nth-child(8) { width: 3%; } /* Rec? */
.table-glass th:nth-child(9), .table-glass td:nth-child(9) { width: 3%; } /* Apr? */
.table-glass th:nth-child(10), .table-glass td:nth-child(10) { width: 3%; } /* Con? */
.table-glass th:nth-child(11), .table-glass td:nth-child(11) { width: 3%; } /* Env? */
.table-glass th:nth-child(12), .table-glass td:nth-child(12) { width: 8%; } /* Status Pag. */
.table-glass th:nth-child(13), .table-glass td:nth-child(13) { width: 8%; } /* Status Aprov. */
.table-glass th:nth-child(14), .table-glass td:nth-child(14) { width: 9%; } /* Ações */

/* === MOBILE RESPONSIVE STYLES === */

/* Prevenir rolagem horizontal em mobile */
* {
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  max-width: 100vw;
  margin: 0;
  padding: 0;
}

/* Garantir que containers não ultrapassem a largura da tela */
.container, .max-w-full {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Reset básico para mobile */
html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* === CORREÇÃO GLOBAL DE RADIO BUTTONS === */
/* Garantir que radio buttons tenham tamanho normal em todas as páginas */
input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  accent-color: #3b82f6 !important;
  flex-shrink: 0 !important;
}

/* Radio buttons em labels normais */
label input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin-right: 0.5rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Radio buttons em formulários específicos */
.form-field input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin-right: 0.5rem !important;
}

/* Radio buttons em flex containers */
.flex input[type="radio"] {
  width: 16px !important;
  height: 16px !important;
  margin-right: 0.5rem !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* Garantir que radio buttons não sejam afetados pelos estilos de mobile para inputs */
input[type="radio"] {
  min-height: auto !important;
  padding: 0 !important;
  font-size: inherit !important;
}

/* Formulários mobile - uma coluna apenas */
@media (max-width: 768px) {
  /* Forçar grid de 1 coluna em mobile */
  .grid {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 1rem !important;
  }
  
  .grid-cols-1 {
    grid-template-columns: 1fr !important;
  }
  
  .md\\:grid-cols-2 {
    grid-template-columns: 1fr !important;
  }
  
  .md\\:grid-cols-3 {
    grid-template-columns: 1fr !important;
  }
  
  .md\\:grid-cols-4 {
    grid-template-columns: 1fr !important;
  }
  
  /* Garantir que inputs não ultrapassem a largura */
  input:not([type="radio"]):not([type="checkbox"]), select, textarea {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 44px !important; /* Tamanho mínimo recomendado para touch */
    font-size: 16px !important; /* Previne zoom no iOS */
    padding: 12px 16px !important;
  }
  
  /* Flexbox mobile - quebrar linha quando necessário */
  .flex {
    flex-wrap: wrap !important;
  }
  
  .flex-nowrap {
    flex-wrap: wrap !important;
  }
  
  /* Forçar col-span-1 em mobile */
  [class*="col-span-"] {
    grid-column: span 1 !important;
  }
  
  /* Garantir que containers não ultrapassem a tela */
  .container, .max-w-full, main, nav {
    max-width: 100vw !important;
    overflow-x: hidden !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Formulários específicos */
  form {
    width: 100% !important;
    max-width: 100% !important;
  }
  
  /* Cards e containers */
  .bg-white {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Header mobile */
  header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Navegação mobile */
  nav {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  /* Menu hambúrguer mobile */
  #mobile-menu-button {
    padding: 0.75rem !important;
    border-radius: 8px !important;
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    transition: all 0.2s ease !important;
  }
  
  #mobile-menu-button:hover {
    background: #e5e7eb !important;
    transform: scale(1.05) !important;
  }
  
  #mobile-menu-button svg {
    width: 1.5rem !important;
    height: 1.5rem !important;
  }
  
  /* Menu mobile expandido */
  #mobile-menu {
    background: white !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
    margin-top: 1rem !important;
    padding: 1rem !important;
  }
  
  #mobile-menu .nav-link {
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 0.25rem !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
  }
  
  #mobile-menu .nav-link:hover,
  #mobile-menu .nav-link.active {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
    transform: translateX(4px) !important;
  }
  
  /* Botões mobile */
  button {
    min-height: 44px !important;
    padding: 12px 16px !important;
    font-size: 16px !important;
  }
  
  /* Espaçamento mobile */
  .space-x-4 > * + * {
    margin-left: 0.5rem !important;
  }
  
  .space-x-6 > * + * {
    margin-left: 0.75rem !important;
  }
  
  .space-x-2 > * + * {
    margin-left: 0.25rem !important;
  }
  
  /* Formulários mobile específicos */
  .mobile-form {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .mobile-form .col-span-1 {
    grid-column: span 1 !important;
    width: 100% !important;
  }
  
  .mobile-form input,
  .mobile-form select,
  .mobile-form textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    font-size: 16px !important;
    padding: 14px 16px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
  }
  
  .mobile-form .flex {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
  }
  
  .mobile-form .flex label {
    margin-bottom: 0.5rem !important;
    font-size: 16px !important;
    font-weight: 600 !important;
  }
  
  /* Form fields específicos */
  .form-field {
    width: 100% !important;
    margin-bottom: 1.5rem !important;
  }
  
  .form-field label {
    display: block !important;
    margin-bottom: 0.75rem !important;
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 16px !important;
  }
  
  .form-field input,
  .form-field select,
  .form-field textarea {
    width: 100% !important;
    max-width: 100% !important;
    padding: 14px 16px !important;
    border: 2px solid #d1d5db !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    line-height: 1.5 !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
  }
  
  .form-field input:focus,
  .form-field select:focus,
  .form-field textarea:focus {
    outline: none !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
  }
  
  .form-field .flex {
    display: flex !important;
    gap: 0.75rem !important;
    align-items: center !important;
  }
  
  .form-field .flex input {
    flex: 1 !important;
  }
  
  .form-field .space-y-2 > * + * {
    margin-top: 0.75rem !important;
  }
  
  /* Labels específicos */
  .form-field label,
  .mobile-form label,
  label {
    font-size: 16px !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    color: #374151 !important;
  }
  
  /* Textarea específico */
  textarea {
    min-height: 120px !important;
    resize: vertical !important;
  }
  
  /* Select específico */
  select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
    padding-right: 40px !important;
  }
  
  /* Checkboxes mobile - layout compacto */
  .checkbox-group {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    margin: 1rem 0 !important;
  }
  
  .checkbox-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: #f9fafb !important;
    border-radius: 8px !important;
    border: 1px solid #e5e7eb !important;
  }
  
  .checkbox-item input[type="checkbox"] {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
    accent-color: #3b82f6 !important;
  }
  
  .checkbox-item label {
    font-size: 14px !important;
    font-weight: 500 !important;
    margin: 0 !important;
    color: #374151 !important;
    cursor: pointer !important;
  }
  
  /* Layout de 1 coluna para checkboxes em telas muito pequenas */
  @media (max-width: 480px) {
    .checkbox-group {
      grid-template-columns: 1fr !important;
      gap: 0.5rem !important;
    }
  }
  
}

/* Mobile Cards for Lançamentos */
.mobile-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid #e5e7eb;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #f3f4f6;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-card-title {
  font-weight: 600;
  color: #1f2937;
  font-size: 1rem;
  line-height: 1.3;
  flex: 1;
  margin-right: 0.5rem;
  word-wrap: break-word;
}

.mobile-card-value {
  font-weight: 700;
  color: #059669;
  font-size: 1.1rem;
  text-align: right;
  white-space: nowrap;
}

.mobile-card-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.mobile-card-detail {
  display: flex;
  flex-direction: column;
}

.mobile-card-detail-label {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.mobile-card-detail-value {
  font-size: 0.9rem;
  color: #374151;
  font-weight: 500;
  word-wrap: break-word;
}

.mobile-card-status {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.75rem;
}

.mobile-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 0.5rem;
  border-top: 1px solid #f3f4f6;
}

.mobile-card-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mobile-card-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.mobile-card-checkbox label {
  font-size: 0.8rem;
  color: #6b7280;
  cursor: pointer;
}

/* Mobile Status Pills */
.mobile-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.mobile-status-pill.pago {
  background-color: #d1fae5;
  color: #065f46;
}

.mobile-status-pill.a-pagar {
  background-color: #dbeafe;
  color: #1e40af;
}

.mobile-status-pill.aprovado {
  background-color: #d1fae5;
  color: #065f46;
}

.mobile-status-pill.pendente {
  background-color: #fef3c7;
  color: #92400e;
}

.mobile-status-pill.rejeitado {
  background-color: #fee2e2;
  color: #991b1b;
}

/* Mobile Icons */
.mobile-icon {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  margin-right: 0.25rem;
}

.mobile-icon.recorrente {
  color: #3b82f6;
}

.mobile-icon.aprovado {
  color: #10b981;
}

.mobile-icon.conciliado {
  color: #8b5cf6;
}

.mobile-icon.enviado {
  color: #f59e0b;
}

/* Mobile Filters */
.mobile-filters {
  display: none;
}

@media (max-width: 768px) {
  .mobile-filters {
    display: block;
  }
  
  .desktop-filters {
    display: none;
  }
  
  /* Garantir que a tabela desktop seja escondida em mobile */
  .hidden.md\\:block {
    display: none !important;
  }
}

@media (min-width: 769px) {
  /* Garantir que a tabela desktop seja visível em telas maiores */
  .hidden.md\\:block {
    display: block !important;
  }
  
  /* Garantir que os cards mobile sejam escondidos em desktop */
  .md\\:hidden {
    display: none !important;
  }
}

.mobile-filter-toggle {
  width: 100%;
  background: #f3f4f6;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  color: #374151;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
  min-height: 48px;
}

.mobile-filter-toggle:hover {
  background: #e5e7eb;
  border-color: #9ca3af;
}

.mobile-filter-toggle:active {
  transform: scale(0.98);
}

.mobile-filter-content {
  display: none;
  background: white;
  border: 2px solid #d1d5db;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.mobile-filter-content.active {
  display: block;
}

.mobile-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mobile-filter-grid.full {
  grid-template-columns: 1fr;
}

.mobile-filter-item {
  display: flex;
  flex-direction: column;
}

.mobile-filter-item label {
  font-size: 0.8rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

.mobile-filter-item input,
.mobile-filter-item select {
  padding: 0.75rem;
  border: 2px solid #d1d5db;
  border-radius: 8px;
  font-size: 16px;
  min-height: 44px;
  transition: all 0.2s ease;
}

.mobile-filter-item input:focus,
.mobile-filter-item select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Mobile Pagination */
.mobile-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  flex-wrap: wrap;
}

.mobile-pagination button {
  padding: 0.75rem 1rem;
  border: 2px solid #d1d5db;
  background: white;
  border-radius: 8px;
  font-size: 16px;
  color: #374151;
  min-height: 44px;
  min-width: 44px;
}

.mobile-pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mobile-pagination button.active {
  background: #3b82f6;
  color: white;
  border-color: #3b82f6;
}

.mobile-pagination-info {
  font-size: 0.9rem;
  color: #6b7280;
  text-align: center;
  margin-top: 0.5rem;
}

/* Breakpoints adicionais para telas muito pequenas */
@media (max-width: 480px) {
  /* Reduzir ainda mais o padding em telas muito pequenas */
  .container, .max-w-full, main, nav {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  /* Cards mais compactos */
  .mobile-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }
  
  /* Grid de 1 coluna para detalhes */
  .mobile-card-details {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  
  /* Botões menores mas ainda touch-friendly */
  button {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 14px !important;
  }
  
  /* Inputs um pouco menores */
  input:not([type="radio"]):not([type="checkbox"]), select, textarea {
    min-height: 44px !important;
    padding: 12px 14px !important;
    font-size: 16px !important;
  }
  
  /* Títulos menores */
  h1, h2, h3 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }
  
  /* Espaçamentos reduzidos */
  .space-y-4 > * + * {
    margin-top: 0.75rem !important;
  }
  
  .space-y-6 > * + * {
    margin-top: 1rem !important;
  }
}

/* Breakpoint para telas extra pequenas */
@media (max-width: 360px) {
  /* Padding mínimo */
  .container, .max-w-full, main, nav {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }
  
  /* Cards mais compactos */
  .mobile-card {
    padding: 0.75rem;
    border-radius: 8px;
  }
  
  /* Fontes menores mas ainda legíveis */
  .mobile-card-title {
    font-size: 0.9rem;
  }
  
  .mobile-card-value {
    font-size: 1rem;
  }
  
  .mobile-card-detail-label {
    font-size: 0.7rem;
  }
  
  .mobile-card-detail-value {
    font-size: 0.8rem;
  }
}
