/* ========== MELHORIAS VISUAIS PROFISSIONAIS - G8 SISTEMA ========== */
/* Padrão visual inspirado em jp.cobrancas - cores G8 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* === TIPOGRAFIA REFINADA === */
body {
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3 {
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* === HEADER DESKTOP - Padrão jp.cobrancas (G8 vermelho) === */
@media (min-width: 769px) {
  body:not(:has(.login-container)) .header-top,
  body:not(:has(.login-container)) header,
  body:not(:has(.login-container)) .header {
    background: linear-gradient(135deg, #ff0000 0%, #990000 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15) !important;
  }
  
  body:not(:has(.login-container)) .header-top #logo,
  body:not(:has(.login-container)) .header #logo,
  body:not(:has(.login-container)) header #logo,
  body:not(:has(.login-container)) .header-center img {
    filter: brightness(0) invert(1) !important;
  }
  
  body:not(:has(.login-container)) #user-info {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
  }
  
  body:not(:has(.login-container)) #logout-button,
  body:not(:has(.login-container)) .btn-logout {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #ff0000 !important;
    border: none !important;
  }
  
  body:not(:has(.login-container)) #logout-button:hover,
  body:not(:has(.login-container)) .btn-logout:hover {
    background: #fff !important;
    color: #cc0000 !important;
  }
  
  body:not(:has(.login-container)) .status-indicator {
    background: rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
  }
}

/* === HEADER MAIS ELEGANTE (fallback mobile) === */
.header-top, header, .header {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

#user-info, .user-info span {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* === CARDS REFINADOS === */
.card, .section-card, .card-modern, .glass-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.card:hover, .section-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 12px 24px rgba(0, 0, 0, 0.06);
}

.option-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  border-radius: 14px;
}

.option-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.section-header .icon {
  box-shadow: 0 2px 8px rgba(255, 0, 0, 0.2);
}

/* === TABELAS PROFISSIONAIS === */
table {
  border-collapse: separate;
  border-spacing: 0;
}

th {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.75rem;
  color: var(--text-muted, #64748b);
}

tbody tr {
  transition: background-color 0.15s ease;
}

tbody tr:nth-child(even) {
  background-color: rgba(248, 250, 252, 0.8);
}

tbody tr:hover {
  background-color: rgba(255, 0, 0, 0.03);
}

td {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* === BOTÕES REFINADOS === */
button, .btn {
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s ease;
}

.btn-primary, .btn-success, .btn-danger {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary:hover, .btn-success:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* === INPUTS E FORMULÁRIOS === */
input, select, textarea {
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus, select:focus, textarea:focus {
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
}

/* === STATUS INDICATOR SUTIL === */
.status-indicator {
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* === FOOTER ELEGANTE === */
footer {
  color: var(--text-muted, #64748b);
  font-size: 0.875rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

footer a {
  color: var(--primary-color);
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--primary-dark, #cc0000);
}

/* === BADGES E LABELS === */
.badge, .status-badge {
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* === MODAIS === */
.modal-content {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* === LOGIN REFINADO === */
.login-container {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* === MOBILE - REFINAMENTOS === */
@media (max-width: 768px) {
  .card, .section-card {
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
  
  .option-card {
    padding: 24px 16px;
  }
  
  .option-icon {
    font-size: 2.2rem;
  }
  
  .header-top, header, .header {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  }
}

/* === FEEDBACK TÁTIL === */
.card:active, .option-card:active {
  transform: scale(0.99);
}

/* === CONTRASTE E LEGIBILIDADE === */
.text-muted, .text-secondary {
  color: var(--text-muted, #64748b) !important;
}

/* === SEPARADORES VISUAIS === */
.card-header, .section-header {
  border-bottom-color: rgba(0, 0, 0, 0.06);
}

/* === CONTAINER PRINCIPAL (padrão jp.cobrancas) === */
.container, main {
  max-width: 1280px;
  margin: 0 auto;
}

main {
  padding: 2rem 1.5rem;
  flex: 1;
}

main.container {
  padding: 2rem 1.5rem;
}

/* === PAGE HEADER - Padrão jp.cobrancas (ícone + título) === */
.page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.page-header-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ff0000 0%, #cc0000 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.25);
  flex-shrink: 0;
}

.page-header-text h1,
.page-header-text .dashboard-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #111827);
  margin: 0 0 0.25rem 0;
}

.page-header-text p,
.page-header-text .dashboard-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted, #6b7280);
  margin: 0;
}

@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* === SECTION - Padrão jp.cobrancas === */
.section {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-secondary-200, #e5e7eb);
  margin-bottom: 1.5rem;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-secondary-200, #e5e7eb);
}

.section-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color, #ff0000);
}

.section-title i {
  margin-right: 0.5rem;
}

/* === CARDS - Padrão jp.cobrancas === */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.cards .card {
  background-color: #fff;
  border-radius: 0.5rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--color-secondary-200, #e5e7eb);
  transition: all 0.2s ease;
}

.cards .card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.card-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-value {
  font-size: 2rem;
  font-weight: 700;
}

/* === SEARCH CONTAINER - Padrão jp.cobrancas === */
.search-container {
  background: var(--stone-100, #f5f7fa);
  border: 1px solid var(--color-secondary-200, #e5e7eb);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  transition: all 0.2s ease;
}

.search-container:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
}

.search-container input {
  border-radius: 0.375rem;
}

/* === EMPTY STATE - Padrão jp.cobrancas === */
.empty-state {
  padding: 3rem 2rem;
  text-align: center;
}

.empty-state-icon {
  font-size: 3rem;
  color: var(--color-secondary-400, #9ca3af);
  margin-bottom: 1rem;
  display: block;
}

.empty-state-title,
.empty-state h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted, #6b7280);
  margin-bottom: 0.5rem;
}

.empty-state-text,
.empty-state p {
  font-size: 0.95rem;
  color: var(--color-secondary-500, #9ca3af);
  margin-bottom: 1rem;
}

.empty-state .btn {
  margin-top: 0.5rem;
}

/* === BREADCRUMB - Padrão jp.cobrancas === */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted, #6b7280);
  margin-bottom: 1rem;
}

.breadcrumb a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumb a:hover {
  color: var(--primary-dark, #cc0000);
}

.breadcrumb span:last-child {
  color: var(--text-primary, #374151);
  font-weight: 500;
}

.breadcrumb .breadcrumb-sep {
  font-size: 0.65rem;
  color: var(--color-secondary-400, #9ca3af);
}

/* === BODY BACKGROUND - Classe app-layout para fundo limpo (padrão jp.cobrancas) === */
body.app-layout {
  background-color: var(--stone-100, #f5f7fa);
}

body.app-layout::before {
  opacity: 0.3;
}

/* === ALERTAS E NOTIFICAÇÕES === */
.alert {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

/* === PAGINAÇÃO === */
.pagination button {
  font-weight: 500;
  transition: all 0.2s ease;
}

/* === SEARCH/CAMPO DE BUSCA === */
.search-input, .search-box input {
  border-radius: 10px;
}
