/* components.css — botões, inputs, chips, badges, cards, KPIs, dropdown, toast, skeleton */

/* botões */
.btn { height: 30px; padding: 0 12px; font-size: 12px; border: .5px solid var(--az-border-secondary);
  border-radius: 6px; background: #fff; color: var(--az-text-primary); display: inline-flex;
  align-items: center; gap: 6px; transition: background .12s; }
.btn:hover { background: var(--az-bg-tertiary); }
.btn.primary { background: var(--az-primary); color: #fff; border-color: var(--az-primary); }
.btn.primary:hover { background: var(--az-primary-dark); }
.btn.danger { background: var(--az-danger-700); color: #fff; border-color: var(--az-danger-700); }
.btn.danger:hover { background: var(--az-danger-900); }

/* modal de confirmação */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.28); z-index: 150;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .15s; }
.modal-backdrop.show { opacity: 1; }
.modal { background: #fff; border-radius: var(--az-radius-lg); width: 380px; max-width: 92vw; padding: 20px;
  box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.modal-title { font-size: 16px; font-weight: 500; margin-bottom: 8px; }
.modal-body { font-size: 13px; color: var(--az-text-secondary); margin-bottom: 18px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; }
.btn.lg { height: 40px; font-size: 14px; padding: 0 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }
.icon-btn { width: 30px; height: 30px; padding: 0; justify-content: center; }

/* inputs */
.field label { font-size: 12px; color: var(--az-text-secondary); font-weight: 500; }
.field input { width: 100%; height: 36px; margin-top: 6px; padding: 0 12px; font-size: 13px;
  border: .5px solid var(--az-border-secondary); border-radius: 6px; }
.field input:focus { outline: none; border-color: var(--az-primary); box-shadow: 0 0 0 3px var(--az-primary-50); }
.field + .field { margin-top: 16px; }

/* chips de filtro */
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--az-bg-secondary);
  color: var(--az-text-primary); padding: 5px 10px; border-radius: 999px; font-size: 12px; border: 0; }
.chip:hover { background: var(--az-border-tertiary); }
.chip.active { background: var(--az-primary-50); color: var(--az-primary-dark); font-weight: 500; }
.chip.open { background: var(--az-primary); color: #fff; font-weight: 500; }
.chip strong { font-weight: 600; }

/* badges status */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px;
  font-size: 11px; font-weight: 500; white-space: nowrap; }
.badge.concluida  { background: var(--az-success-50); color: var(--az-success-700); }
.badge.transferida{ background: var(--az-warning-50); color: var(--az-warning-700); }
.badge.abandonada { background: var(--az-danger-50);  color: var(--az-danger-700); }
/* Sprint 37.3 — badges de status traduzidos */
.badge.badge-green { background: var(--az-success-50); color: var(--az-success-700); }
.badge.badge-blue  { background: var(--az-primary-100); color: var(--az-primary-700, #1c2b4b); }
.badge.badge-yellow{ background: var(--az-warning-50); color: var(--az-warning-700); }
.badge.badge-red   { background: var(--az-danger-50);  color: var(--az-danger-700); }
.badge.badge-gray  { background: var(--az-bg-subtle, #f1f5f9); color: var(--az-text-soft, #64748b); }
.plat { padding: 0 6px; height: 22px; border-radius: 4px; background: var(--az-primary-100);
  color: var(--az-primary-dark); font-size: 10px; font-weight: 500; display: inline-flex; align-items: center; }
.pill { background: var(--az-bg-secondary); color: var(--az-text-secondary); padding: 3px 8px;
  border-radius: 999px; font-size: 11px; display: inline-flex; align-items: center; gap: 4px; }

/* cards / kpis */
.kpi { background: var(--az-bg-secondary); border-radius: var(--az-radius-md); padding: 12px 14px; }
.kpi .k-label { font-size: 11px; color: var(--az-text-secondary); text-transform: uppercase; letter-spacing: .4px; }
.kpi .k-value { font-size: 22px; font-weight: 500; margin-top: 4px; }
.kpi .k-sub { font-size: 11px; color: var(--az-text-secondary); margin-top: 2px; }
.kpi .k-value.danger { color: var(--az-danger-700); }
.card { background: #fff; border: .5px solid var(--az-border-tertiary); border-radius: var(--az-radius-md); padding: 12px 14px; }

/* dropdown (multi-select) */
.dropdown { position: absolute; z-index: 50; width: 320px; background: #fff;
  border: .5px solid var(--az-border-secondary); border-radius: var(--az-radius-md);
  box-shadow: 0 4px 16px rgba(0,0,0,.08); overflow: hidden; }
.dropdown .dd-search { padding: 10px 12px; border-bottom: .5px solid var(--az-border-tertiary); position: relative; }
.dropdown .dd-search i { position: absolute; left: 22px; top: 50%; transform: translateY(-50%); color: var(--az-text-tertiary); font-size: 13px; }
.dropdown .dd-search input { width: 100%; height: 32px; padding: 0 12px 0 32px; font-size: 13px; border: .5px solid var(--az-border-secondary); border-radius: 6px; }
.dropdown .dd-summary { padding: 8px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: .5px solid var(--az-border-tertiary); font-size: 12px; color: var(--az-text-secondary); }
.dropdown .dd-list { max-height: 280px; overflow: auto; }
.dropdown .dd-opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; cursor: pointer; }
.dropdown .dd-opt:hover { background: var(--az-bg-tertiary); }
.dropdown .dd-opt.sel { background: var(--az-primary-50); }
.dropdown .dd-divider { padding: 6px 12px 4px; font-size: 10px; color: var(--az-text-tertiary); text-transform: uppercase; letter-spacing: .5px; background: var(--az-bg-tertiary); }
.dropdown .dd-footer { padding: 10px 12px; border-top: .5px solid var(--az-border-tertiary); display: flex; align-items: center; justify-content: space-between; background: var(--az-bg-tertiary); }
.checkbox { width: 16px; height: 16px; border: 1.5px solid var(--az-border-primary); border-radius: 3px; background: #fff; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; }
.checkbox.on { background: var(--az-primary); border-color: var(--az-primary); }
.checkbox.radio { border-radius: 50%; }
.opt-title { font-size: 13px; } .opt-sub { font-size: 11px; color: var(--az-text-secondary); }
.dd-opt.sel .opt-title { font-weight: 500; }
.link-btn { background: none; border: 0; font-size: 11px; color: var(--az-primary); cursor: pointer; padding: 0; }

/* toast */
#toasts { position: fixed; top: 16px; right: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 14px; border-radius: var(--az-radius-md); font-size: 13px; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.15); animation: toastIn .18s ease-out; max-width: 320px; }
.toast.err { background: var(--az-danger-700); }
.toast.ok  { background: var(--az-success-700); }
.toast.info{ background: var(--az-primary-dark); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* skeleton */
.skel { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%;
  animation: shimmer 1.2s infinite; border-radius: 4px; }
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--az-text-secondary); }
.empty .ico { font-size: 32px; color: var(--az-text-tertiary); }
.empty .msg { margin-top: 8px; font-size: 14px; }
.fade-in { animation: fadeIn .18s ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
