/* Componentes compartidos del panel: tarjetas, formularios, botones, avisos,
   etiquetas de estado y tablas. Va siempre despues de admin-shell.css. */

/* ---------- Tarjetas ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card + .card { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.card-head h2 { margin: 2px 0 2px; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.card-head p { margin: 0; font-size: 13px; color: var(--muted); }
.step {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--orange-soft);
  color: var(--orange-deep);
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.section-title {
  margin: 28px 0 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- Formularios ---------- */
.field { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; margin-bottom: 14px; }
.row .field { margin-bottom: 0; }
.row:last-child { margin-bottom: 0; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
label .opt { color: var(--muted); font-weight: 400; }
label .req { color: var(--orange-deep); }
input[type="text"], input[type="date"], input[type="tel"], input[type="email"],
input[type="password"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  font: 400 16px/1.4 "Inter", sans-serif; /* 16px evita el zoom automatico en iPhone */
  color: var(--ink);
  background: #fff;
}
input::placeholder, textarea::placeholder { color: #a8a29e; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 122, 48, 0.15);
}
textarea { min-height: 96px; resize: vertical; }
.hint { margin: 6px 0 0; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.hint a { color: var(--orange-deep); font-weight: 600; text-decoration: none; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--ink); margin: 0; }
.check input { width: 18px; height: 18px; accent-color: var(--orange-deep); margin: 0; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  font: 600 15px "Inter", sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--orange-deep); color: #fff; }
.btn-primary:hover { background: #d9480b; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #292524; }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fafaf9; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.link-danger {
  background: none;
  border: 0;
  padding: 6px 0;
  font: 600 13px "Inter", sans-serif;
  color: var(--red);
  cursor: pointer;
}
.link-danger:hover { text-decoration: underline; }
.actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 16px; }

/* ---------- Avisos ---------- */
.banner { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 16px; border: 1px solid; }
.banner.error { background: var(--red-soft); border-color: #fecaca; color: var(--red); }
.banner.ok { background: var(--green-soft); border-color: #bbf7d0; color: #15803d; }
.banner.warn { background: var(--amber-soft); border-color: #fde68a; color: var(--amber); }

/* ---------- Etiquetas de estado ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  background: #f5f5f4;
  color: var(--ink-2);
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.pill.green { background: var(--green-soft); color: #15803d; }
.pill.orange { background: var(--orange-soft); color: var(--orange-deep); }
.pill.amber { background: var(--amber-soft); color: var(--amber); }
.pill.grey { background: #f5f5f4; color: var(--muted); }
.pill.plain::before { display: none; }

/* ---------- Tablas ---------- */
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { text-align: left; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { background: #fafaf9; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
table.data tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.empty { padding: 32px 16px; text-align: center; color: var(--muted); font-size: 14px; }

@media (max-width: 520px) {
  .row { grid-template-columns: 1fr; }
}
