/* =========================================================================
   iMDM27+ — Panel privado (estilos)
   ========================================================================= */

.panel-body { background: var(--bg); }
.panel-main { padding: 34px 0 60px; min-height: 60vh; }

.panel-badge {
  margin-left: 10px; padding: 3px 10px; border-radius: 999px;
  background: var(--blue-tint); color: var(--blue);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
}
.nav-exit { color: var(--red) !important; }

.panel-narrow { max-width: 520px; margin-inline: auto; }
.panel-main h1 { margin-bottom: .2em; }

/* ------------------------------- Tarjetas ------------------------------- */
.panel-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px; margin: 22px 0;
}
.card.stat { display: flex; flex-direction: column; gap: 8px; }
.card.stat:hover { transform: none; box-shadow: var(--shadow); }
.stat-label { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 30px; font-weight: 700; color: var(--text); }
.stat-value small { font-size: 16px; color: var(--text-2); font-weight: 600; }

progress.meter {
  width: 100%; height: 10px; border: 0; border-radius: 999px; overflow: hidden;
  background: var(--field); appearance: none;
}
progress.meter::-webkit-progress-bar { background: var(--field); border-radius: 999px; }
progress.meter::-webkit-progress-value { background: linear-gradient(135deg, var(--blue), var(--blue-2)); border-radius: 999px; }
progress.meter::-moz-progress-bar { background: linear-gradient(135deg, var(--blue), var(--blue-2)); border-radius: 999px; }

/* ------------------------------- Avisos ------------------------------- */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 600; margin: 12px 0; }
.alert.ok { background: #E9F9EF; color: #15803D; }
.alert.err { background: #FDECEC; color: #B91C1C; }

.checklist { list-style: none; padding: 0; margin: 8px 0 18px; }
.checklist li { padding: 6px 0 6px 26px; position: relative; color: var(--text-2); }
.checklist li::before {
  content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700;
}

/* ------------------------------- Formularios ------------------------------- */
.grid-form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 18px; align-items: end; }
.grid-form .field-wide { grid-column: 1 / -1; }
.grid-form .field { margin-bottom: 16px; }
.grid-form button { grid-column: 1 / -1; justify-self: start; margin-bottom: 6px; }
@media (max-width: 640px) { .grid-form { grid-template-columns: 1fr; } }

.field select,
.field input[type="number"] {
  height: 52px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--field);
  font-size: 16px; font-family: inherit; color: var(--text);
}
.field select:focus, .field input[type="number"]:focus {
  outline: none; border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 4px rgba(10,132,255,.12);
}

/* ------------------------------- Tablas ------------------------------- */
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; }
.mono { font-family: ui-monospace, "SF Mono", Consolas, monospace; }
.actions { display: flex; flex-direction: column; gap: 6px; }

.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tag.ok { background: #E9F9EF; color: #15803D; }
.tag.warn { background: #FFF6E5; color: #B45309; }

/* ------------------------------- Botones ------------------------------- */
.btn.tiny { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 12px; }
.btn.danger { background: #FDECEC; color: #B91C1C; }
.btn.danger:hover { background: #FBD5D5; }

form.inline { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
input.mini, select.mini-select {
  height: 34px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--field); font-size: 13px; font-family: inherit; color: var(--text);
}
input.mini { width: 96px; }

code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--field); padding: 1px 6px; border-radius: 6px; font-size: 13px;
}
