/* ===================================================
   Dental Araujo - Estilos personalizados
   Complementos ao Tailwind CSS
=================================================== */

:root {
  --color-primary: #2563EB;
  --color-primary-dark: #1E3A8A;
  --color-success: #10B981;
  --color-bg: #F8FAFC;
  --color-text: #334155;
  --color-danger: #EF4444;
  --color-warning: #F59E0B;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Tipografia */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0F172A;
}

/* Scrollbar estilizada */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: #F1F5F9;
}
::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* Imagens placeholder com gradientes */
.product-image {
  background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%);
  position: relative;
  overflow: hidden;
}

.product-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 30%, rgba(37, 99, 235, 0.15), transparent 60%);
}

.product-image-anestesico { background: linear-gradient(135deg, #FEF3C7 0%, #FFFBEB 100%); }
.product-image-resina    { background: linear-gradient(135deg, #DBEAFE 0%, #EFF6FF 100%); }
.product-image-luva      { background: linear-gradient(135deg, #DBEAFE 0%, #E0E7FF 100%); }
.product-image-cimento   { background: linear-gradient(135deg, #FCE7F3 0%, #FDF2F8 100%); }
.product-image-clareador { background: linear-gradient(135deg, #FEF9C3 0%, #FEFCE8 100%); }
.product-image-broca     { background: linear-gradient(135deg, #E0E7FF 0%, #EEF2FF 100%); }
.product-image-endo      { background: linear-gradient(135deg, #D1FAE5 0%, #ECFDF5 100%); }
.product-image-orto      { background: linear-gradient(135deg, #FFE4E6 0%, #FFF1F2 100%); }

/* Card hover */
.card-hover {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -8px rgba(15, 23, 42, 0.12);
}

/* Botão primário com brilho */
.btn-primary {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  font-weight: 600;
  transition: all 0.2s;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8 0%, #1E40AF 100%);
  box-shadow: 0 6px 20px 0 rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #fff;
  color: #2563EB;
  border: 1.5px solid #2563EB;
  font-weight: 600;
  transition: all 0.2s;
}
.btn-secondary:hover {
  background: #EFF6FF;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-success  { background: #D1FAE5; color: #065F46; }
.badge-danger   { background: #FEE2E2; color: #991B1B; }
.badge-warning  { background: #FEF3C7; color: #92400E; }
.badge-info     { background: #DBEAFE; color: #1E40AF; }
.badge-neutral  { background: #F1F5F9; color: #475569; }
.badge-promo    { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); color: #fff; }

/* Sidebar admin */
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  color: #CBD5E1;
  transition: all 0.18s;
}
.admin-sidebar-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.admin-sidebar-link.active {
  background: linear-gradient(135deg, #2563EB 0%, #1D4ED8 100%);
  color: #fff;
  box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.35);
}

/* Topbar admin */
.admin-topbar {
  background: #fff;
  border-bottom: 1px solid #E2E8F0;
}

/* Cards stats */
.stat-card {
  background: #fff;
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid #EEF2F6;
  transition: all 0.2s;
}
.stat-card:hover {
  border-color: #DBEAFE;
  box-shadow: 0 8px 24px -8px rgba(15, 23, 42, 0.08);
}

/* Tabelas */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.data-table thead th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748B;
  padding: 12px 16px;
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
}
.data-table tbody td {
  padding: 14px 16px;
  font-size: 14px;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}
.data-table tbody tr:hover {
  background: #F8FAFC;
}
.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* Inputs */
.form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: #0F172A;
  transition: all 0.18s;
}
.form-input:focus {
  outline: none;
  border-color: #2563EB;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}
.form-input::placeholder {
  color: #94A3B8;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

/* Gráficos fake (barras) */
.fake-bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  height: 220px;
  padding: 12px 0;
}
.fake-bar {
  flex: 1;
  background: linear-gradient(180deg, #3B82F6 0%, #1D4ED8 100%);
  border-radius: 8px 8px 0 0;
  position: relative;
  transition: all 0.2s;
}
.fake-bar:hover {
  background: linear-gradient(180deg, #2563EB 0%, #1E40AF 100%);
}

/* Donut chart fake */
.donut-chart {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: conic-gradient(
    #2563EB 0% 35%,
    #10B981 35% 60%,
    #F59E0B 60% 78%,
    #EF4444 78% 90%,
    #8B5CF6 90% 100%
  );
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.donut-chart::after {
  content: '';
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: #fff;
}

/* Animação de fade */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: fadeIn 0.35s ease-out;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0F172A;
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  box-shadow: 0 20px 40px -8px rgba(0,0,0,0.25);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
}
.toast.show {
  transform: translateY(0);
  opacity: 1;
}
.toast-success { background: #059669; }
.toast-error   { background: #DC2626; }
.toast-info    { background: #2563EB; }

/* Checkbox e radio personalizados */
.custom-check {
  width: 18px;
  height: 18px;
  border: 1.5px solid #CBD5E1;
  border-radius: 5px;
  cursor: pointer;
  accent-color: #2563EB;
}

/* Sidebar pública mobile */
.mobile-menu {
  transform: translateX(-100%);
  transition: transform 0.3s;
}
.mobile-menu.open {
  transform: translateX(0);
}

/* Print friendly */
@media print {
  .no-print { display: none !important; }
}

/* Helpers */
.divider-y > * + * { border-top: 1px solid #F1F5F9; }

.tab-active {
  color: #2563EB !important;
  border-bottom: 2px solid #2563EB !important;
  background: #EFF6FF;
}

.step-active {
  background: #2563EB !important;
  color: #fff !important;
}
.step-completed {
  background: #10B981 !important;
  color: #fff !important;
}

/* Sidebar admin colapsável */
.admin-sidebar { transition: width 0.25s ease; }
.admin-sidebar.collapsed { width: 80px; }
.admin-sidebar.collapsed .sidebar-text { display: none; }
.admin-sidebar.collapsed .admin-sidebar-link { justify-content: center; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}
.modal-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.96);
  transition: transform 0.2s;
}
.modal-backdrop.show .modal-card { transform: scale(1); }
