/* Fase 11 — Reemplazo local de Bootstrap.
   Solo lo que PhosEcho usa de verdad: grid, utilidades de espaciado/display y los componentes que
   el sistema visual de la suite no cubre. Botones, inputs, modal, tabla y badges de estado NO
   están acá: los define phos-shell.css / phos-visores.css y no se redefinen (el check lo prohíbe).
   Todo se apoya en los tokens de la suite; no hay valores de marca propios. */

/* ── Grid (12 columnas, como el que se retiró) ───────────────────────────── */
.row { display: flex; flex-wrap: wrap; margin-inline: -6px; }
.row > [class*="col"] { padding-inline: 6px; min-width: 0; }
.col { flex: 1 0 0%; }
.col-4  { flex: 0 0 auto; width: 33.3333%; }
.col-6  { flex: 0 0 auto; width: 50%; }
.col-12 { flex: 0 0 auto; width: 100%; }
.g-2 { row-gap: 8px; }
.g-3 { row-gap: 12px; }
@media (min-width: 768px) {
  .col-md-2 { flex: 0 0 auto; width: 16.6667%; }
  .col-md-3 { flex: 0 0 auto; width: 25%; }
  .col-md-4 { flex: 0 0 auto; width: 33.3333%; }
}
@media (min-width: 992px) {
  .col-lg-6 { flex: 0 0 auto; width: 50%; }
}

/* ── Utilidades en uso ───────────────────────────────────────────────────── */
.d-none { display: none !important; }
.d-block { display: block; }
.d-grid { display: grid; }
.d-flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.align-items-center { align-items: center; }
.align-items-start { align-items: flex-start; }
.justify-content-between { justify-content: space-between; }
.justify-content-center { justify-content: center; }
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.me-1 { margin-right: 4px; }
.me-2 { margin-right: 8px; }
.p-3 { padding: 12px; }
.py-3 { padding-block: 12px; }
.w-100 { width: 100%; }
.small { font-size: 12.5px; }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.rounded-circle { border-radius: 50%; }
.border { border: 1px solid var(--line); }
.position-fixed { position: fixed; }

/* ── Componentes que la suite no define ──────────────────────────────────── */
.card {
  border: 1px solid var(--line); border-radius: var(--radius-panel);
  background: var(--panel); box-shadow: var(--shadow-xs);
}
.card-header { padding: 10px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.card-body { padding: 14px; }

.form-select, .input-group-text { font-family: var(--font-ui); }
.form-label { display: block; margin-bottom: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink); }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check-input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.form-switch .form-check-input { width: 32px; height: 18px; border-radius: 999px; }
.input-group { display: flex; align-items: stretch; }
.input-group > .form-control { border-radius: var(--radius-control) 0 0 var(--radius-control); }
.input-group > .form-control:not(:first-child) { border-radius: 0; }
.input-group-text {
  display: flex; align-items: center; padding: 0 10px;
  border: 1px solid var(--line); border-left: none;
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--surface); color: var(--muted); font-size: 12.5px;
}

.badge {
  display: inline-flex; align-items: center; padding: 2px 8px;
  border-radius: var(--radius-control); background: var(--surface);
  color: var(--muted); font-size: 11px; font-weight: 700;
}
.alert {
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: var(--radius-panel); background: var(--surface); font-size: 13px;
}

.spinner-border {
  display: inline-block; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid var(--line); border-top-color: var(--accent);
  animation: eco-spin .7s linear infinite;
}
@keyframes eco-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner-border { animation: none; } }

.progress { height: 6px; border-radius: 999px; background: var(--surface2); overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); transition: width .3s ease; }

/* ── Tabs (reemplazan a las de la librería retirada) ─────────────────────── */
.nav-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.nav-link {
  padding: 7px 12px; border: none; border-bottom: 2px solid transparent;
  background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { border-bottom-color: var(--accent); color: var(--accent); }
.tab-pane { display: none; padding-top: 12px; }
.tab-pane.active { display: block; }

/* ── Modal de nota (overlay propio, Fase 11) ─────────────────────────────── */
#noteModal.modal-overlay {
  display: grid; place-items: center; padding: 20px;
  background: rgba(9, 9, 11, .55);
}
#noteModal[hidden] { display: none; }
#noteModal .modal {
  width: min(520px, 100%); border: 1px solid var(--line); border-radius: var(--radius-modal);
  background: var(--panel); box-shadow: var(--shadow-lg);
}
#noteModal .modal-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 13px 16px; border-bottom: 1px solid var(--line);
}
#noteModal .modal-header h3 { margin: 0; font-family: var(--font-display); font-size: 17px; font-weight: 600; }
#noteModal .modal-body { padding: 16px; }
#noteModal .modal-body textarea { width: 100%; }
#noteModal .modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
