/* CAP Assistente Empresarial - Tema Preto Fosco com Detalhes Azul Capture */

:root {
  --bg-body: #080b11;
  --bg-sidebar: #0b0f17;
  --bg-card: #111726;
  --bg-card-hover: #161f33;
  --border-matte: #1c2638;
  --capture-blue: #00b4d8;
  --capture-cyan: #38bdf8;
  --capture-deep: #0284c7;
}

body {
  background-color: #080b11 !important;
  color: #f1f5f9 !important;
  -webkit-tap-highlight-color: rgba(56, 189, 248, 0.2);
}

/* Botões e itens clicáveis para toque rápido sem atraso no iOS */
button, a, input, select, textarea {
  touch-action: manipulation;
  cursor: pointer;
}

/* Botões de navegação lateral desktop */
.nav-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.875rem;
  padding: 0.75rem 0.875rem;
  border-radius: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #cbd5e1;
  background-color: #0e1422;
  border: 1px solid #1a2334;
  text-align: left;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}
.nav-btn:hover {
  color: #ffffff;
  background-color: #151e32;
  border-color: rgba(56, 189, 248, 0.4);
}
.nav-btn.active {
  background: linear-gradient(to right, #00b4d8, #0284c7);
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.25);
  font-weight: 600;
}
.nav-btn.active div {
  background-color: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

/* Botões da barra inferior mobile */
.mobile-nav-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 0.5rem 0.25rem;
  font-size: 0.65rem;
  font-weight: 500;
  color: #94a3b8;
  transition: all 0.15s ease;
  gap: 0.25rem;
}
.mobile-nav-btn:active,
.mobile-nav-btn.active {
  color: #38bdf8 !important;
  font-weight: 600;
}
.mobile-nav-btn.active svg,
.mobile-nav-btn.active i {
  color: #38bdf8 !important;
  stroke: #38bdf8 !important;
}

/* Cartões com fundo preto fosco refinado */
.stat-card {
  background-color: #111726;
  padding: 1.25rem;
  border-radius: 1rem;
  border: 1px solid #1c2638;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}
.stat-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 10px 25px -5px rgba(56, 189, 248, 0.1);
}

/* Botões principais com gradiente Capture Blue */
.btn-primary {
  background: linear-gradient(to right, #00b4d8, #0284c7);
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.2);
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-primary:hover {
  background: linear-gradient(to right, #38bdf8, #0369a1);
  box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.35);
}
.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  background-color: #161f32;
  color: #e2e8f0;
  border: 1px solid #22314a;
  font-weight: 600;
  border-radius: 0.75rem;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-secondary:hover {
  background-color: #1e2a44;
}
.btn-secondary:active {
  transform: scale(0.97);
}

.btn-success {
  background-color: #059669;
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(5, 150, 105, 0.2);
  transition: all 0.15s ease;
}
.btn-success:hover {
  background-color: #10b981;
}
.btn-success:active {
  transform: scale(0.97);
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
  font-weight: 600;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(220, 38, 38, 0.2);
  transition: all 0.15s ease;
}
.btn-danger:hover {
  background-color: #ef4444;
}
.btn-danger:active {
  transform: scale(0.97);
}

/* Entradas de texto e seleção escuras */
.input-text, .input-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.75rem;
  border: 1px solid #22314a;
  background-color: #0c101a;
  color: #f1f5f9;
  font-size: 0.875rem;
  outline: none;
  transition: all 0.15s ease;
}
.input-text:focus, .input-select:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
}

.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #94a3b8;
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Modais com efeito vidro escuro */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 50;
  overflow-y: auto;
}
.modal-backdrop.hidden {
  display: none !important;
}

.modal-box {
  background-color: #111726;
  border: 1px solid #1c2638;
  color: #f1f5f9;
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
  padding: 1.5rem;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

/* Custom Scrollbar preto fosco */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: #080b11;
}
::-webkit-scrollbar-thumb {
  background: #1c2638;
  border-radius: 9999px;
}
::-webkit-scrollbar-thumb:hover {
  background: #00b4d8;
}

/* Ajustes visuais adicionais para tabelas e containers em modo escuro */
table {
  color: #e2e8f0;
}
tbody tr:hover {
  background-color: rgba(22, 31, 50, 0.6) !important;
}
input, select, textarea {
  color-scheme: dark;
}

/* Suporte seguro à barra inferior do iPhone */
.safe-bottom {
  padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}
