/* ============================================================
   Design System Marquei — Componentes reutilizáveis
   Compatível com Tailwind CDN (sem build step)
   ============================================================ */

/* Botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  cursor: pointer;
  border: none;
  transition: all 150ms ease;
  text-decoration: none;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background-color: #0F172A;
  color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
  background-color: #1e293b;
}

.btn-accent {
  background-color: #F59E0B;
  color: #ffffff;
}

.btn-accent:hover:not(:disabled) {
  background-color: #d97706;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #0F172A;
}

.btn-secondary:hover:not(:disabled) {
  background-color: #e2e8f0;
}

.btn-danger {
  background-color: #EF4444;
  color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
  background-color: #dc2626;
}

.btn-ghost {
  background-color: transparent;
  color: #64748b;
}

.btn-ghost:hover:not(:disabled) {
  background-color: #f1f5f9;
  color: #0F172A;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

/* Cards */
.card {
  background: #ffffff;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
  padding: 1.5rem;
}

.card-hover {
  transition: box-shadow 150ms ease, transform 150ms ease;
}

.card-hover:hover {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.07);
  transform: translateY(-1px);
}

/* Inputs */
.input,
.select,
.textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #0F172A;
  background: #ffffff;
  transition: border-color 150ms, box-shadow 150ms;
  outline: none;
  font-family: inherit;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: #F59E0B;
  box-shadow: 0 0 0 3px rgb(245 158 11 / 0.15);
}

.input::placeholder,
.textarea::placeholder {
  color: #94a3b8;
}

.input-error {
  border-color: #EF4444;
}

.input-error:focus {
  box-shadow: 0 0 0 3px rgb(239 68 68 / 0.15);
}

.label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

.field-error {
  font-size: 0.75rem;
  color: #EF4444;
  margin-top: 0.25rem;
}

/* Badges de status */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-scheduled   { background: #dbeafe; color: #1d4ed8; }
.badge-confirmed   { background: #d1fae5; color: #065f46; }
.badge-in_progress { background: #fef3c7; color: #92400e; }
.badge-completed   { background: #d1fae5; color: #065f46; }
.badge-cancelled   { background: #fee2e2; color: #991b1b; }
.badge-no_show     { background: #f1f5f9; color: #475569; }

.badge-green   { background: #d1fae5; color: #065f46; }
.badge-red     { background: #fee2e2; color: #991b1b; }
.badge-yellow  { background: #fef3c7; color: #92400e; }
.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-slate   { background: #f1f5f9; color: #475569; }

/* Aliases semânticos */
.badge-success { background: #d1fae5; color: #065f46; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-error   { background: #fee2e2; color: #991b1b; }
.badge-info    { background: #dbeafe; color: #1d4ed8; }

/* Avatar */
.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  object-fit: cover;
  background: #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #64748b;
  flex-shrink: 0;
}

.avatar-lg {
  width: 4rem;
  height: 4rem;
  font-size: 1.25rem;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-backdrop.flex {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 28rem;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid #e2e8f0;
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* Layout sidebar admin */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: #0F172A;
  color: #94a3b8;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #94a3b8;
  text-decoration: none;
  transition: all 150ms;
  margin: 0.125rem 0.5rem;
}

.sidebar-link:hover {
  background: rgba(255,255,255,0.07);
  color: #ffffff;
}

.sidebar-link.active {
  background: rgba(245, 158, 11, 0.15);
  color: #F59E0B;
}

/* Tabelas */
.table-wrapper {
  overflow-x: auto;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0;
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

table.data-table thead {
  background: #f8fafc;
}

table.data-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

table.data-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  color: #374151;
}

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

table.data-table tbody tr:hover {
  background: #fafafa;
}

/* Status dot */
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot-green  { background: #10B981; }
.status-dot-red    { background: #EF4444; }
.status-dot-yellow { background: #F59E0B; }
.status-dot-blue   { background: #3B82F6; }
.status-dot-slate  { background: #94a3b8; }

/* Skeleton loading */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.skeleton {
  background: #e2e8f0;
  border-radius: 0.25rem;
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

/* Stat card (dashboard) */
.stat-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
}

.stat-card .stat-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0F172A;
  margin-top: 0.25rem;
}

.stat-card .stat-change {
  font-size: 0.75rem;
  margin-top: 0.25rem;
}
