/* ── Card base ── */
.card { background: var(--white); border-radius: var(--r-xl); border: 1px solid var(--n200); box-shadow: var(--sh-sm); overflow: hidden; }
.card-body { padding: 20px 22px; }
.card-title { font-family: 'Syne', sans-serif; font-size: 14.5px; font-weight: 700; color: var(--n900); margin-bottom: 16px; display: flex; align-items: center; gap: 10px; }
.ct-icon { width: 32px; height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--r-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; outline: none;
  transition: all var(--tr); -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:focus-visible { box-shadow: 0 0 0 3px rgba(26,148,99,.3); }
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }

.btn-primary { background: var(--brand-600); color: var(--white); justify-content: center; }
.btn-primary:hover { background: var(--brand-700); transform: translateY(-1px); box-shadow: var(--sh-md); }
.btn-primary:active { transform: none; box-shadow: none; }

.btn-ghost { background: var(--white); color: var(--n600); border: 1.5px solid var(--n200); }
.btn-ghost:hover { background: var(--n100); border-color: var(--n300); color: var(--n800); }
.btn-ghost:active { background: var(--n200); }

.btn-danger { background: var(--red-50); color: #dc2626; border: 1.5px solid #fecaca; }
.btn-danger:hover { background: var(--red-100); }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-sm svg { width: 13px; height: 13px; }

/* ── FAB (floating action button) ── */
.fab {
  position: fixed; bottom: 24px; right: 20px; z-index: 140;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--brand-600); color: var(--white);
  border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(21,122,82,.4); transition: all var(--tr);
}
.fab:hover { background: var(--brand-700); transform: scale(1.05); }
.fab:active { transform: scale(0.97); }
.fab svg { width: 22px; height: 22px; }
@media (min-width: 661px) {
  .fab { display: none; }
}

/* ── Form elements ── */
.form-label {
  display: block; font-size: 11px; font-weight: 600; color: var(--n600);
  text-transform: uppercase; letter-spacing: .5px; margin-bottom: 5px;
}
.form-input {
  width: 100%; height: 42px; padding: 0 13px;
  border: 1.5px solid var(--n200); border-radius: var(--r-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--n900); background: var(--n50);
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
  outline: none; -webkit-appearance: none;
}
.form-input:focus { border-color: var(--brand-500); background: var(--white); box-shadow: 0 0 0 3px rgba(26,148,99,.12); }
.form-input:hover:not(:focus) { border-color: var(--n300); }
.form-input.error { border-color: #dc2626; }

.form-textarea {
  width: 100%; min-height: 88px; padding: 11px 13px;
  border: 1.5px solid var(--n200); border-radius: var(--r-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13.5px; font-weight: 400;
  color: var(--n900); background: var(--n50); resize: vertical; outline: none;
  transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
  line-height: 1.5; -webkit-appearance: none;
}
.form-textarea:focus { border-color: var(--brand-500); background: var(--white); box-shadow: 0 0 0 3px rgba(26,148,99,.12); }
.form-textarea::placeholder { color: var(--n400); }

.form-select {
  width: 100%; height: 42px; padding: 0 36px 0 13px;
  border: 1.5px solid var(--n200); border-radius: var(--r-md);
  font-family: 'Plus Jakarta Sans', sans-serif; font-size: 14px; font-weight: 500;
  color: var(--n900); background: var(--n50);
  appearance: none; -webkit-appearance: none; outline: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236b7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center;
  transition: border-color var(--tr), box-shadow var(--tr);
}
.form-select:focus { border-color: var(--brand-500); box-shadow: 0 0 0 3px rgba(26,148,99,.12); }

.field-error { font-size: 11px; color: #dc2626; margin-top: 4px; display: none; }
.field-error.show { display: block; }

/* ── Radio groups ── */
.radio-group { display: flex; gap: 8px; margin-top: 5px; }
.radio-opt { flex: 1; position: relative; }
.radio-opt input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-lbl {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: var(--r-md); border: 1.5px solid var(--n200);
  background: var(--n50); font-size: 13.5px; font-weight: 600; color: var(--n500);
  cursor: pointer; transition: all var(--tr); -webkit-tap-highlight-color: transparent;
}
.radio-lbl:hover { border-color: var(--n300); background: var(--white); }
.radio-opt input:checked + .radio-lbl { border-color: var(--brand-500); background: var(--brand-50); color: var(--brand-700); }
.radio-opt input:focus-visible + .radio-lbl { box-shadow: 0 0 0 3px rgba(26,148,99,.25); }

/* ── Severity selectors ── */
.sev-group { display: flex; gap: 8px; margin-top: 5px; flex-wrap: wrap; }
.sev-opt { position: relative; flex: 1; min-width: 80px; }
.sev-opt input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.sev-lbl {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; border-radius: var(--r-md); border: 1.5px solid var(--n200);
  background: var(--n50); font-size: 12.5px; font-weight: 600; color: var(--n600);
  cursor: pointer; transition: all var(--tr); padding: 0 8px; white-space: nowrap;
}
.sev-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.sev-opt.alta  input:checked + .sev-lbl { border-color: #dc2626; background: var(--red-50); color: #991b1b; }
.sev-opt.media input:checked + .sev-lbl { border-color: #d97706; background: var(--amber-50); color: #92400e; }
.sev-opt.baja  input:checked + .sev-lbl { border-color: #059669; background: var(--green-50); color: #065f46; }

/* ── Status badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600; padding: 3px 9px;
  border-radius: var(--r-full); letter-spacing: .2px;
}
.badge-pendiente { background: var(--amber-100); color: #92400e; }
.badge-proceso   { background: var(--blue-100);  color: #1e40af; }
.badge-listo     { background: var(--green-100); color: #065f46; }
.badge-programado{ background: var(--n100);      color: var(--n600); }
.badge-completado{ background: var(--green-100); color: #065f46; }

/* ── Estatus group (PRO section) ── */
.estatus-group { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 6px; }
@media (max-width: 400px) { .estatus-group { grid-template-columns: 1fr; } }
.estatus-opt { position: relative; }
.estatus-opt input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.estatus-lbl {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 14px 8px; border-radius: var(--r-lg); border: 2px solid var(--n200);
  background: var(--n50); font-size: 11.5px; font-weight: 700; color: var(--n600);
  cursor: pointer; transition: all var(--tr); text-align: center; line-height: 1.3;
}
.estatus-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.estatus-opt.optimo  input:checked + .estatus-lbl { border-color: #059669; background: var(--green-50); color: #065f46; }
.estatus-opt.regular input:checked + .estatus-lbl { border-color: #d97706; background: var(--amber-50); color: #92400e; }
.estatus-opt.critico input:checked + .estatus-lbl { border-color: #dc2626; background: var(--red-50); color: #991b1b; }

/* ── Reveal / conditional ── */
.reveal { overflow: hidden; max-height: 0; opacity: 0; transition: max-height .35s cubic-bezier(.4,0,.2,1), opacity .25s ease, margin .25s ease; }
.reveal.show { max-height: 220px; opacity: 1; margin-top: 12px; }

/* ── Divider ── */
.divider { border: none; border-top: 1px solid var(--n200); margin: 14px 0; }

/* ── Top 3 list ── */
.top3-list { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; }
.top3-item { display: flex; align-items: center; gap: 10px; }
.top3-num { width: 22px; height: 22px; border-radius: 50%; background: var(--n100); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; color: var(--n600); flex-shrink: 0; }
.top3-input { flex: 1; height: 38px; padding: 0 12px; border: 1.5px solid var(--n200); border-radius: var(--r-md); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; font-weight: 400; color: var(--n900); background: var(--n50); outline: none; transition: border-color var(--tr), background var(--tr), box-shadow var(--tr); }
.top3-input:focus { border-color: var(--brand-500); background: var(--white); box-shadow: 0 0 0 3px rgba(26,148,99,.12); }
.top3-input::placeholder { color: var(--n400); }

/* ── Progress ring ── */
.ring-wrap { position: relative; width: 108px; height: 108px; flex-shrink: 0; }
.ring-wrap svg { width: 108px; height: 108px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--n100); stroke-width: 10; }
.ring-fill { fill: none; stroke: var(--brand-500); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 251.3; stroke-dashoffset: 251.3; transition: stroke-dashoffset .7s cubic-bezier(.4,0,.2,1), stroke .4s ease; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-pct { font-family: 'Syne', sans-serif; font-size: 21px; font-weight: 800; color: var(--n900); line-height: 1; }
.ring-lbl { font-size: 9px; font-weight: 500; color: var(--n500); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }

/* ── Progress bento ── */
.prog-bento { display: grid; grid-template-columns: auto 1fr; gap: 20px; padding: 22px; margin-bottom: 18px; align-items: center; }
@media (max-width: 500px) { .prog-bento { grid-template-columns: 1fr; text-align: center; } .ring-wrap { margin: 0 auto; } }
.prog-meta {}
.prog-status-txt { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--n900); margin-bottom: 4px; }
.prog-count { font-size: 12px; color: var(--n500); margin-bottom: 14px; }
.prog-count strong { color: var(--n700); font-weight: 600; }
.sec-bars { display: flex; flex-direction: column; gap: 6px; }
.sec-bar-row { display: grid; grid-template-columns: 90px 1fr 34px; align-items: center; gap: 9px; }
@media (max-width: 380px) { .sec-bar-row { grid-template-columns: 72px 1fr 28px; } }
.sec-bar-lbl { font-size: 10px; font-weight: 500; color: var(--n600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sec-bar-track { height: 5px; background: var(--n100); border-radius: var(--r-full); overflow: hidden; }
.sec-bar-fill { height: 100%; border-radius: var(--r-full); background: var(--brand-500); transition: width .5s cubic-bezier(.4,0,.2,1); width: 0%; }
.sec-bar-cnt { font-size: 10px; font-weight: 600; color: var(--n500); text-align: right; }

/* ── Stat grid ── */
.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--n200); border: 1px solid var(--n200); }
.stat-cell { background: var(--white); padding: 14px 13px; }
.stat-lbl { font-family: monospace; font-size: 7.5px; letter-spacing: 2px; color: var(--n500); text-transform: uppercase; margin-bottom: 4px; }
.stat-val { font-family: 'Syne', sans-serif; font-size: 26px; font-weight: 700; line-height: 1; }
.stat-sub { font-size: 8.5px; color: var(--n500); margin-top: 2px; font-weight: 400; }

/* ── Action bar ── */
.action-bar { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 22px; }

/* ── Page footer ── */
.page-footer { text-align: center; padding-top: 18px; font-size: 11px; color: var(--n400); border-top: 1px solid var(--n200); }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  z-index: 200; display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; pointer-events: all; }
@media (min-width: 661px) { .modal-backdrop { align-items: center; } }
.modal {
  background: var(--white); width: 100%; max-width: 560px;
  border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92vh;
  overflow-y: auto; transform: translateY(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.modal-backdrop.open .modal { transform: translateY(0); }
@media (min-width: 661px) {
  .modal { border-radius: var(--r-xl); max-height: 88vh; transform: translateY(16px) scale(.98); }
  .modal-backdrop.open .modal { transform: none; }
}
.modal-head {
  padding: 18px 22px 14px; display: flex; align-items: center;
  justify-content: space-between; border-bottom: 1px solid var(--n100); position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-title { font-family: 'Syne', sans-serif; font-size: 16px; font-weight: 700; color: var(--n900); }
.modal-close { width: 32px; height: 32px; border-radius: 50%; background: var(--n100); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background var(--tr); flex-shrink: 0; }
.modal-close:hover { background: var(--n200); }
.modal-close svg { width: 14px; height: 14px; }
.modal-body { padding: 20px 22px 28px; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { padding: 14px 22px 22px; display: flex; gap: 10px; border-top: 1px solid var(--n100); }
.modal-footer .btn { flex: 1; }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 48px 24px; color: var(--n500); }
.empty-state svg { width: 48px; height: 48px; margin: 0 auto 12px; opacity: .3; }
.empty-title { font-family: 'Syne', sans-serif; font-size: 15px; font-weight: 700; color: var(--n700); margin-bottom: 6px; }
.empty-sub { font-size: 13px; line-height: 1.6; }

/* ── Provider chip (linked) ── */
.provider-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--brand-50); border: 1px solid var(--brand-200);
  color: var(--brand-700); border-radius: var(--r-full);
  font-size: 11px; font-weight: 600; padding: 3px 10px;
  cursor: pointer; transition: background var(--tr); text-decoration: none;
}
.provider-chip:hover { background: var(--brand-100); }

/* ── Star rating ── */
.stars { display: flex; gap: 3px; }
.star { width: 16px; height: 16px; cursor: pointer; color: var(--n300); transition: color var(--tr); }
.star.filled { color: #f59e0b; }
.star-display .star { cursor: default; }

/* ── Avatar circle ── */
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--brand-500); color: var(--white); display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; flex-shrink: 0; }

/* ── Filter pills ── */
.filter-bar { display: flex; gap: 7px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 13px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 600; border: 1.5px solid var(--n200);
  background: var(--white); color: var(--n600); cursor: pointer; transition: all var(--tr);
}
.filter-pill:hover { border-color: var(--n300); color: var(--n800); }
.filter-pill.active { background: var(--brand-50); border-color: var(--brand-400); color: var(--brand-700); }

/* ── Section header row ── */
.section-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 10px; }
.section-hdr h2 { font-family: 'Syne', sans-serif; font-size: 18px; font-weight: 700; color: var(--n900); display: flex; align-items: center; gap: 8px; }
.count-badge { background: var(--n100); color: var(--n600); border-radius: var(--r-full); font-size: 11px; font-weight: 700; padding: 2px 8px; }

/* ── Photo preview ── */
.photo-preview { width: 100%; max-height: 200px; object-fit: cover; border-radius: var(--r-md); margin-top: 8px; }
.photo-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--blue-50); border: 1px solid var(--blue-100); color: #1e40af; border-radius: var(--r-full); font-size: 11px; font-weight: 600; padding: 3px 9px; }

/* ── PRO badge ── */
.pro-badge { display: inline-flex; align-items: center; gap: 5px; background: linear-gradient(135deg,#1a1a2e,#16213e); color: var(--white); border-radius: var(--r-full); padding: 3px 10px 3px 8px; font-size: 10px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin-left: 6px; }

/* ── Animations ── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.animate-in { animation: fadeUp .35s cubic-bezier(.4,0,.2,1) both; }
