/* CondomínioHub - estilos customizados (Material Design 3 inspired)
   CSS puro (Tailwind CDN não processa @apply em arquivos externos) */

* { scrollbar-width: thin; scrollbar-color: #c4b5fd transparent; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #c4b5fd; border-radius: 3px; }

body { font-family: 'Inter', system-ui, sans-serif; }

/* Cards */
.card {
  background: #fff;
  border-radius: 1.25rem;
  border: 1px solid #f1f0f5;
  box-shadow: 0 1px 2px rgba(16, 12, 34, .04);
  transition: box-shadow .2s ease, transform .2s ease;
}
.dark .card { background: rgba(31, 29, 43, .8); border-color: rgba(75, 70, 92, .35); }
.card:hover { box-shadow: 0 8px 24px -8px rgba(103, 80, 164, .18); }

/* Botões */
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 500; font-size: .875rem;
  border-radius: 9999px; padding: .625rem 1.25rem;
  transition: all .15s ease; cursor: pointer; border: none;
}
.btn-primary { background: #6750A4; color: #fff; }
.btn-primary:hover { background: #5b3fd4; }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-secondary { background: #e9e5ff; color: #4c34b0; }
.btn-secondary:hover { background: #d5cdff; }
.dark .btn-secondary { background: rgba(103, 80, 164, .25); color: #d5cdff; }
.btn-ghost { background: transparent; color: #6b7280; padding: .5rem 1rem; }
.btn-ghost:hover { background: #f3f4f6; }
.dark .btn-ghost { color: #d1d5db; }
.dark .btn-ghost:hover { background: rgba(75, 70, 92, .4); }

/* Inputs */
.input {
  width: 100%; padding: .625rem 1rem; font-size: .875rem;
  border-radius: .75rem; border: 1px solid #e5e7eb;
  background: #fff; color: inherit; outline: none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.input:focus { border-color: transparent; box-shadow: 0 0 0 2px #7445ff; }
.dark .input { background: #1f1d2b; border-color: #4b465c; }
.label {
  display: block; font-size: .875rem; font-weight: 500;
  color: #374151; margin-bottom: .375rem;
}
.dark .label { color: #d1d5db; }

/* Navegação lateral */
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .625rem 1rem; border-radius: 9999px;
  font-size: .875rem; font-weight: 500; color: #4b5563;
  cursor: pointer; transition: all .15s ease; white-space: nowrap;
}
.dark .nav-item { color: #d1d5db; }
.nav-item:hover { background: #f3f1ff; }
.dark .nav-item:hover { background: rgba(103, 80, 164, .15); }
.nav-item.active { background: #e9e5ff; color: #402d90; }
.dark .nav-item.active { background: rgba(103, 80, 164, .35); color: #d5cdff; }
.nav-item i { width: 1.25rem; text-align: center; }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .125rem .625rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 500;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-red { background: #fee2e2; color: #991b1b; }
.badge-blue { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #f3f4f6; color: #374151; }
.badge-purple { background: #e9e5ff; color: #4c34b0; }
.dark .badge-green { background: rgba(6, 95, 70, .4); color: #6ee7b7; }
.dark .badge-yellow { background: rgba(146, 64, 14, .4); color: #fcd34d; }
.dark .badge-red { background: rgba(153, 27, 27, .4); color: #fca5a5; }
.dark .badge-blue { background: rgba(30, 64, 175, .4); color: #93c5fd; }
.dark .badge-gray { background: #374151; color: #d1d5db; }
.dark .badge-purple { background: rgba(76, 52, 176, .4); color: #d5cdff; }

/* Tabelas */
.table-th {
  padding: .75rem 1rem; text-align: left; font-size: .75rem;
  font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .05em;
}
.dark .table-th { color: #9ca3af; }
.table-td { padding: .75rem 1rem; font-size: .875rem; }
.table-row { border-bottom: 1px solid #f3f4f6; transition: background .1s ease; }
.dark .table-row { border-color: rgba(75, 70, 92, .3); }
.table-row:hover { background: #fafafa; }
.dark .table-row:hover { background: rgba(75, 70, 92, .2); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
  backdrop-filter: blur(4px); z-index: 40;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  animation: fadeIn .15s ease;
}
.modal-panel {
  background: #fff; border-radius: 1.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, .25);
  width: 100%; max-width: 32rem; max-height: 90vh; overflow-y: auto;
  animation: slideUp .2s ease;
}
.dark .modal-panel { background: #1f1d2b; }
.modal-panel.modal-lg { max-width: 48rem; }

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px) } to { opacity: 1; transform: translateY(0) } }
.fade-in { animation: fadeIn .25s ease; }

/* Toast */
.toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%);
  z-index: 60; padding: .75rem 1.5rem; border-radius: 9999px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, .2);
  font-size: .875rem; font-weight: 500; color: #fff;
  animation: slideUp .2s ease;
}

/* Ícones de estatística */
.stat-icon {
  width: 2.75rem; height: 2.75rem; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem;
}

/* Skeleton */
.skeleton { background: #e5e7eb; border-radius: .5rem; animation: pulse 1.5s ease infinite; }
.dark .skeleton { background: #374151; }
@keyframes pulse { 0%, 100% { opacity: 1 } 50% { opacity: .5 } }

/* Sidebar mobile */
@media (max-width: 1023px) {
  #sidebar { position: fixed; z-index: 50; transform: translateX(-100%); transition: transform .25s ease; }
  #sidebar.open { transform: translateX(0); }
}
