/* components.css — botoes, cards, badges, inputs, modal, chips */

/* Botoes */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 22px;
  border-radius: var(--rounded-full);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  line-height: 1.3;
  transition: transform .12s ease, background .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--brand-green);
  color: var(--on-primary);
}
.btn-primary:hover {
  background: var(--primary-pressed);
  color: var(--on-primary);
  box-shadow: var(--shadow-2);
}
.btn-dark {
  background: var(--brand-teal-deep);
  color: var(--brand-green);
}
.btn-dark:hover {
  background: #063041;
  color: var(--brand-green);
}
.btn-outline {
  border-color: var(--hairline-strong);
  color: var(--ink);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--brand-green-dark);
  color: var(--brand-green-dark);
  background: var(--canvas);
}
.btn-ghost {
  color: var(--slate);
  border-radius: var(--rounded-md);
  padding: 8px 12px;
}
.btn-ghost:hover {
  color: var(--brand-green-dark);
  background: var(--surface);
}
.btn-light {
  color: var(--on-dark);
  background: transparent;
  border-color: var(--hairline-dark);
}
.btn-light:hover {
  color: var(--brand-green);
  border-color: var(--brand-green);
  background: rgba(255, 255, 255, .04);
}
.btn-link {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--brand-green-dark);
  font-weight: 500;
}
.btn-block { width: 100%; }
.btn-lg { min-height: 48px; padding: 12px 26px; font-size: 15px; }
.btn-sm { min-height: 34px; padding: 8px 14px; font-size: 13px; }
.btn:disabled {
  background: var(--hairline);
  color: var(--muted);
  cursor: not-allowed;
  box-shadow: none;
}

/* Cards */
.card {
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--rounded-lg);
  box-shadow: none;
  transition: box-shadow .18s ease, transform .18s ease, border-color .18s ease, background .18s ease;
}
.card-hover:hover {
  box-shadow: var(--shadow-1);
  transform: translateY(-2px);
  border-color: var(--hairline-strong);
}
.card-pad { padding: var(--space-xl); }
.card-feature {
  padding: var(--space-xxl);
  box-shadow: var(--shadow-2);
}
.card-dark {
  background: var(--brand-teal-deep);
  border-color: var(--hairline-dark);
  color: var(--on-dark);
}
.card-dark h1,
.card-dark h2,
.card-dark h3,
.card-dark h4 { color: var(--on-dark); }
.card-dark p { color: var(--on-dark-muted); }

/* Badges / chips */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--rounded-full);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  background: var(--brand-green-soft);
  color: var(--brand-green-dark);
}
.badge-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}
.badge-green {
  background: var(--brand-green);
  color: var(--on-primary);
}
.badge-popular {
  background: var(--brand-teal-deep);
  color: var(--brand-green);
}
.badge-purple,
.tag-database,
.tag-seguranca { background: var(--accent-purple); color: var(--on-dark); }
.badge-orange,
.tag-search,
.tag-busca { background: var(--accent-orange); color: var(--ink); }
.badge-blue { background: var(--accent-blue); color: var(--on-dark); }
.badge-pink { background: var(--accent-pink); color: var(--on-dark); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--rounded-sm);
  font-size: 11px;
  line-height: 1.4;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: uppercase;
  background: var(--surface);
  color: var(--slate);
  border: 1px solid var(--hairline);
}
.pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--rounded-full);
  font-size: 13px;
  font-weight: 600;
}
.pill-rascunho { background: var(--semantic-warning-bg); color: var(--semantic-warning-text); }
.pill-em_andamento { background: #dbeafe; color: #1e40af; }
.pill-concluido { background: var(--brand-green-soft); color: var(--brand-green-dark); }

/* Inputs */
.field { display: flex; flex-direction: column; gap: 7px; }
.field label {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.input, .textarea, .select {
  width: 100%;
  min-height: 44px;
  padding: 11px 14px;
  border: 1px solid var(--hairline-strong);
  border-radius: var(--rounded-md);
  background: var(--canvas);
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand-green-dark);
  box-shadow: 0 0 0 3px rgba(0, 104, 74, .14);
}
.textarea { resize: vertical; min-height: 96px; }
.input-icon { position: relative; }
.input-icon .icon-left {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--steel);
}
.input-icon input { padding-left: 42px; }
.input-pass-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--steel);
}

/* Search box */
.searchbox {
  position: relative;
  max-width: 420px;
  width: 100%;
}
.searchbox svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--steel);
}
.searchbox input {
  height: 44px;
  padding-left: 42px;
  border-radius: var(--rounded-md);
  background: var(--surface);
}
.searchbox.searchbox-large input { height: 56px; background: var(--canvas); }

/* Filtros chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 15px;
  border-radius: var(--rounded-full);
  font-size: 14px;
  font-weight: 600;
  background: var(--canvas);
  border: 1px solid var(--hairline);
  color: var(--slate);
  transition: border-color .14s ease, color .14s ease, background .14s ease;
}
.chip:hover {
  border-color: var(--brand-green-dark);
  color: var(--brand-green-dark);
}
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--on-dark);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 30, 43, .58);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fade .18s ease;
}
.modal {
  background: var(--canvas);
  border-radius: var(--rounded-xl);
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow: auto;
  box-shadow: var(--shadow-4);
  animation: pop .2s ease;
}
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(8px); } }

/* Avatar */
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--brand-green);
  color: var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  flex: none;
}

/* Progress */
.progress {
  height: 8px;
  background: var(--hairline-soft);
  border-radius: var(--rounded-full);
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--brand-green);
  border-radius: var(--rounded-full);
}

/* Code */
.code-block,
.code-mockup-card {
  background: var(--canvas-dark);
  color: var(--on-dark);
  border-radius: var(--rounded-lg);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.55;
}
.code-block { padding: var(--space-md); }
.code-mockup-card {
  padding: var(--space-lg);
  border: 1px solid var(--hairline-dark);
  box-shadow: var(--shadow-3);
}
.code-mockup-card .terminal-dots {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}
.code-mockup-card .terminal-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--hairline-dark);
}
.code-mockup-card .terminal-dots span:nth-child(1) { background: #ff5f57; }
.code-mockup-card .terminal-dots span:nth-child(2) { background: #ffbd2e; }
.code-mockup-card .terminal-dots span:nth-child(3) { background: #28c840; }
.code-mockup-card pre {
  margin: 0;
  white-space: pre-wrap;
  color: var(--on-dark-muted);
}
.code-mockup-card strong { color: var(--brand-green); font-weight: 600; }

/* Toast */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 200;
}
.toast {
  background: var(--brand-teal-deep);
  color: var(--on-dark);
  padding: 13px 18px;
  border-radius: var(--rounded-md);
  box-shadow: var(--shadow-4);
  font-size: 14px;
  font-weight: 500;
  animation: pop .2s ease;
}

/* Skeleton */
.skeleton {
  background: linear-gradient(90deg, #eef3f0, #f8fbfa, #eef3f0);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: var(--rounded-md);
}
@keyframes shimmer { to { background-position: -200% 0; } }

.empty-state { text-align: center; padding: 64px 20px; color: var(--slate); }
.empty-state h3 { color: var(--ink); margin-bottom: 6px; }
.status-ok { border-color: var(--brand-green); margin-bottom: 16px; }

.icon { width: 20px; height: 20px; stroke-width: 2; }
.icon-sm { width: 16px; height: 16px; }
