/* OdontoPain — CSS puro (Tailwind via CDN NÃO processa @apply em arquivos externos).
   Tudo aqui é light-mode fixo, escolha explícita do produto. */

html, body { font-feature-settings: "cv11", "ss01"; }

:root {
  --po-bg:        #f8fafc;
  --po-bg-card:   #ffffff;
  --po-text:      #0f172a;
  --po-text-soft: #475569;
  --po-text-muted:#64748b;
  --po-border:    #e2e8f0;
  --po-border-2:  #cbd5e1;
  --po-brand:     #0284c7;
  --po-brand-2:   #0369a1;
  --po-brand-50:  #f0f9ff;
  --po-mint:      #10b981;
  --po-mint-2:    #059669;
  --po-danger:    #dc2626;
  --po-warning:   #d97706;
  --po-ring:      rgba(2,132,199,0.18);
}

/* Sidebar */
.sidebar { width: 15rem; }
.sidebar-collapsed .sidebar { width: 4.5rem; }
.sidebar-collapsed .sb-label { display: none !important; }
.sidebar-collapsed .sb-divider { display: block !important; }
.sidebar-collapsed .nav-item { justify-content: center; }
@media (max-width: 767px) { .sidebar { width: 15rem; } }

/* Card */
.card {
  background: var(--po-bg-card);
  border: 1px solid var(--po-border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .5rem .75rem; border-radius: .5rem;
  font-size: .875rem; font-weight: 500;
  transition: background-color .15s, color .15s, box-shadow .15s, border-color .15s;
  cursor: pointer; border: 1px solid transparent;
  line-height: 1.25;
  text-decoration: none;
}
.btn-primary { background: var(--po-brand); color: #ffffff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.btn-primary:hover { background: var(--po-brand-2); color: #ffffff; }
.btn-mint { background: var(--po-mint); color: #ffffff; }
.btn-mint:hover { background: var(--po-mint-2); color: #ffffff; }
.btn-soft { background: var(--po-brand-50); color: var(--po-brand-2); }
.btn-soft:hover { background: #e0f2fe; }
.btn-ghost { color: var(--po-text-soft); background: transparent; }
.btn-ghost:hover { background: #f1f5f9; }
.btn-danger { background: var(--po-danger); color: #ffffff; }
.btn-danger:hover { background: #b91c1c; color: #ffffff; }

/* Inputs — texto SEMPRE escuro em fundo SEMPRE claro */
.input,
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="number"], input[type="search"], input[type="url"], input[type="date"],
input[type="time"], input[type="datetime-local"], input[type="month"],
select, textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1px solid var(--po-border-2);
  border-radius: .5rem;
  font-size: .9rem;
  background-color: #ffffff !important;
  color: #0f172a !important;
  line-height: 1.4;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  -webkit-appearance: none;
  appearance: none;
}
select {
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  padding-right: 2rem;
}
input:focus, select:focus, textarea:focus, .input:focus {
  border-color: var(--po-brand);
  box-shadow: 0 0 0 3px var(--po-ring);
}
input::placeholder, textarea::placeholder, .input::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}
input[type="file"] {
  padding: .35rem .5rem; background-color: #f8fafc !important; color: var(--po-text-soft) !important;
}
input[type="checkbox"], input[type="radio"] {
  width: auto; padding: 0;
  accent-color: var(--po-brand);
}
input:disabled, select:disabled, textarea:disabled {
  background-color: #f1f5f9 !important;
  color: #64748b !important;
  cursor: not-allowed;
}
/* Tira o autocomplete amarelo do Chrome */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #0f172a !important;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  caret-color: #0f172a;
  transition: background-color 5000s ease-in-out 0s;
}

/* Labels */
.label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  color: var(--po-text-muted);
  margin-bottom: .25rem;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* Badges */
.badge { display: inline-flex; align-items: center; padding: .125rem .55rem; border-radius: 9999px; font-size: 11px; font-weight: 500; line-height: 1.5; white-space: nowrap; }
.badge-open     { background: #fef3c7; color: #92400e; }
.badge-paid     { background: #d1fae5; color: #047857; }
.badge-late     { background: #fee2e2; color: #991b1b; }
.badge-canceled { background: #e2e8f0; color: #334155; }
.badge-soft     { background: #e0f2fe; color: #075985; }

/* Tables */
.table { width: 100%; font-size: .875rem; border-collapse: collapse; }
.table thead { background: #f8fafc; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--po-text-muted); }
.table th, .table td { padding: .625rem .75rem; text-align: left; }
.table tbody tr { border-top: 1px solid #f1f5f9; transition: background-color .12s; }
.table tbody tr:hover { background: #f8fafc; }

/* Body base — força light SEMPRE */
body {
  background-color: var(--po-bg) !important;
  color: var(--po-text) !important;
}

/* Drag */
[data-card-id] { transition: opacity .15s, transform .15s; }
[data-card-id].dragging { opacity: .4; transform: scale(0.98); }

/* Mesmo se o SO estiver em dark, o produto fica claro */
@media (prefers-color-scheme: dark) {
  body { background-color: var(--po-bg) !important; color: var(--po-text) !important; }
  .card { background: var(--po-bg-card); }
  input, select, textarea { background-color: #ffffff !important; color: #0f172a !important; }
}
