/* ============================================================
   Studio Fitness · app.css
   Estilos de componentes para la web oficial
   ============================================================ */

/* ---------- utilidades ---------- */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
}

.eyebrow.gold {
  color: var(--gold);
}

.display {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: 0.005em;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.tiny {
  font-size: 11px;
}

.gold {
  color: var(--gold);
}

/* ---------- botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--r-sm);
  font-size: 13.5px;
  font-weight: 650;
  border: 1px solid transparent;
  transition: transform 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s,
    background 0.2s, border-color 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--gold);
  color: #0a0a0b;
}

.btn-primary:hover {
  box-shadow: 0 8px 28px -6px rgba(233, 185, 73, 0.4);
}

.btn-dark {
  background: var(--surface);
  color: var(--text);
  border-color: var(--line);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--gold-line);
  color: var(--gold);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--surface);
}

.btn-lg {
  padding: 16px 28px;
  font-size: 15px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 12.5px;
}

.btn-block {
  width: 100%;
}

.btn-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
}

/* ---------- inputs ---------- */
.input,
.select,
.textarea {
  width: 100%;
  height: 42px;
  padding: 0 13px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: #101012;
  color: var(--text);
  font-size: 13.5px;
  font-family: inherit;
}

.textarea {
  min-height: 70px;
  padding: 10px 13px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold-line);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field > label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .span-2 {
    grid-column: span 2;
  }
}

/* ---------- badges / pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-gold {
  color: var(--gold);
  border: 1px solid var(--gold-line);
  background: var(--gold-soft);
}

.badge-green {
  color: var(--green);
  border: 1px solid rgba(76, 195, 138, 0.25);
  background: var(--green-soft);
}

.badge-muted {
  color: var(--muted);
  border: 1px solid var(--line);
  background: var(--surface);
}

.badge-red {
  color: var(--red);
  border: 1px solid rgba(229, 72, 77, 0.25);
  background: var(--red-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  background: var(--bg-2);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.pill:hover {
  border-color: var(--gold-line);
}

.pill.active {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-soft);
}

/* ---------- avatar ---------- */
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
}

.avatar.gold {
  background: var(--gold-soft);
  border: 1px solid var(--gold-line);
  color: var(--gold);
}

/* ---------- toasts ---------- */
.toasts {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 200;
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 360px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  font-size: 13px;
  animation: w-fadeUp 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.toast.ok {
  border-color: rgba(76, 195, 138, 0.3);
}

.toast.error {
  border-color: rgba(229, 72, 77, 0.3);
}

.toast.info {
  border-color: var(--gold-line);
}

@keyframes w-fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: center;
  padding: 20px;
  animation: w-fade 0.2s ease both;
}

.modal {
  width: min(560px, 100%);
  max-height: 85vh;
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 24px;
  animation: w-fadeUp 0.3s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 22px;
  margin-bottom: 8px;
}

.modal p {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- misc ---------- */
.hidden {
  display: none !important;
}

.grow {
  flex: 1;
}

.row {
  display: flex;
  align-items: center;
}

.row.between {
  justify-content: space-between;
}

.row.gap-6 {
  gap: 6px;
}

.row.gap-8 {
  gap: 8px;
}

.row.gap-12 {
  gap: 12px;
}

.grid {
  display: grid;
}

.grid.gap-12 {
  gap: 12px;
}

.mt-12 {
  margin-top: 12px;
}

.mt-16 {
  margin-top: 16px;
}

.mb-2 {
  margin-bottom: 8px;
}

/* ---------- notas ---------- */
.m-note {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--bg-2);
  border: 1px solid var(--line-soft);
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}

.demo-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--gold-soft);
  border: 1px dashed var(--gold-line);
}

.demo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 12px;
}

.demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  animation: w-pulse 2.2s ease-in-out infinite;
}

.demo-row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-2);
  padding: 4px 0;
  border-bottom: 1px solid var(--line-soft);
}

.demo-row:last-child {
  border-bottom: 0;
}

.demo-row code {
  font-family: ui-monospace, monospace;
  font-size: 11px;
  color: var(--gold);
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 4px;
}

.link-btn {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.link-btn:hover {
  text-decoration: underline;
}