/* ==========================================================================
   Kit de mockups — Agapanto University
   Los mockups son "fotos" de la app: siempre en claro, como el SPA real.
   Uso: <figure class="mk-fig"><div class="mk">…</div><figcaption>…</figcaption></figure>
   ========================================================================== */
@font-face {
  font-family: "Material Icons";
  font-style: normal;
  font-weight: 400;
  font-display: block;
  src: url("../assets/fonts/material-icons.woff2") format("woff2");
}

:root {
  --mk-bg: #ffffff;
  --mk-ink: #212121;
  --mk-grey: #757575;
  --mk-line: #e0e0e0;
  --mk-head: #f5f5f5;
  --mk-primary: #1976d2;
  --mk-positive: #21ba45;
  --mk-negative: #c10015;
  --mk-warn: #f2c037;
  --mk-orange: #e65100;
  --mk-blue1: #e3f2fd;
  --mk-blue9: #0d47a1;
  --mk-orange1: #fff3e0;
  --mk-red1: #ffebee;
  --mk-green1: #e8f5e9;
  --mk-shadow: 0 1px 2px rgba(27, 34, 44, .06), 0 8px 24px rgba(27, 34, 44, .08);
  --mk-frame: #c9d0da;
  --mk-callout: #1f4e9c;
}
[data-md-color-scheme="slate"] {
  --mk-shadow: 0 1px 2px rgba(0, 0, 0, .5), 0 8px 24px rgba(0, 0, 0, .45);
  --mk-frame: #3a4452;
  --mk-callout: #4c8ff0;
}

/* ---------- figura contenedora ---------- */
figure.mk-fig { margin: 1.2rem 0 1.6rem; text-align: left; }
figure.mk-fig > figcaption {
  font-size: .78rem;
  color: var(--md-default-fg-color--light);
  margin: .5rem .2rem 0;
  text-align: left;
}
figure.mk-fig .route {
  font-family: var(--md-code-font-family);
  font-size: .72rem;
  color: var(--md-default-fg-color--light);
  margin-bottom: .35rem;
}

/* ---------- callouts numerados ---------- */
b.n {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--mk-callout); color: #fff;
  font: 700 11px/1 var(--md-text-font-family);
  flex: 0 0 18px; vertical-align: middle; margin-top: .1em;
}
.mk b.n { position: relative; top: -1px; margin: 0 2px; background: #1f4e9c; color: #fff; }
ol.legend {
  list-style: none !important;
  padding: 0 !important;
  margin: .6rem 0 0 !important;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: .3rem 1.4rem;
  font-size: .85rem;
}
ol.legend li { display: flex; gap: .5rem; align-items: flex-start; margin: 0 !important; }
ol.legend li::before { display: none; }

/* ---------- base ---------- */
.mk {
  background: var(--mk-bg);
  color: var(--mk-ink);
  border: 1px solid var(--mk-frame);
  border-radius: 8px;
  box-shadow: var(--mk-shadow);
  overflow: hidden;
  font-family: Roboto, "Segoe UI", -apple-system, sans-serif;
  font-size: 12.5px;
  line-height: 1.35;
  text-align: left;
}
.mk * { box-sizing: border-box; }
.mk p { margin: 0; }
.mk-chrome {
  display: flex; align-items: center; gap: 8px;
  background: #e9edf2; padding: 6px 10px; border-bottom: 1px solid #d3d9e2;
  font-family: var(--md-code-font-family); font-size: 11px; color: #5b6572;
}
.mk-chrome i { width: 9px; height: 9px; border-radius: 50%; background: #c4ccd6; display: inline-block; }
.mk-chrome .url { background: #fff; border-radius: 4px; padding: 2px 8px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-body { padding: 12px; }
.mk-body.tight { padding: 8px; }
.mk-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mk-bar + .mk-bar, .mk-bar + .mk-card, .mk-card + .mk-bar { margin-top: 8px; }
.mk-sp { flex: 1; }
.mk-title { font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.mi { font-family: "Material Icons"; font-size: 18px; line-height: 1; vertical-align: middle; font-style: normal; display: inline-block; text-transform: none; letter-spacing: 0; font-weight: 400; -webkit-font-feature-settings: "liga"; font-feature-settings: "liga"; }
.mi.sm { font-size: 15px; }
.mi.lg { font-size: 24px; }
.mi.grey { color: #757575; }
.mi.pri { color: var(--mk-primary); }
.mi.pos { color: var(--mk-positive); }
.mi.neg { color: var(--mk-negative); }
.mi.warn { color: #ef6c00; }

/* ---------- app shell: cabecera + menú lateral ---------- */
.mk-app { display: flex; min-height: 240px; }
.mk-header { background: var(--mk-primary); color: #fff; display: flex; align-items: center; gap: 10px; padding: 8px 12px; font-size: 13px; }
.mk-header .brand { font-weight: 600; font-size: 14px; }
.mk-header .user { margin-left: auto; font-size: 12px; display: inline-flex; gap: 8px; align-items: center; }
.mk-drawer { flex: 0 0 176px; border-right: 1px solid var(--mk-line); background: #fff; padding: 4px 0; }
.mk-drawer > div { display: flex; align-items: center; gap: 10px; padding: 7px 14px; font-size: 12.5px; color: #424242; }
.mk-drawer > div .mi { color: #616161; font-size: 18px; }
.mk-drawer > div.on { background: var(--mk-blue1); color: var(--mk-blue9); font-weight: 600; }
.mk-drawer > div.on .mi { color: var(--mk-blue9); }
.mk-main { flex: 1; min-width: 0; padding: 12px; background: #fafafa; }
.mk-trial { background: #31ccec; color: #fff; padding: 6px 12px; font-size: 12px; display: flex; align-items: center; gap: 8px; }

/* ---------- botones, toggles, badges, chips ---------- */
.mk-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 4px;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em;
  background: #e0e0e0; color: #212121; white-space: nowrap;
}
.mk-btn .mi { font-size: 15px; }
.mk-btn.p { background: var(--mk-primary); color: #fff; }
.mk-btn.pos { background: var(--mk-positive); color: #fff; }
.mk-btn.neg { background: var(--mk-negative); color: #fff; }
.mk-btn.warn { background: #f2c037; color: #212121; }
.mk-btn.orange { background: #ef6c00; color: #fff; }
.mk-btn.flat { background: transparent; color: var(--mk-primary); }
.mk-btn.flat.grey { color: #616161; }
.mk-btn.flat.neg { color: var(--mk-negative); }
.mk-btn.flat.pos { color: var(--mk-positive); }
.mk-btn.out { background: transparent; border: 1px solid #9e9e9e; color: #212121; }
.mk-btn.out.p { border-color: var(--mk-primary); color: var(--mk-primary); }
.mk-btn.block { width: 100%; justify-content: center; }
.mk-btn.dis { opacity: .45; }
.mk-btn.round { padding: 4px; border-radius: 50%; }
.mk-btn.sm { padding: 3px 7px; font-size: 10px; }
.mk-btn.lg { padding: 9px 16px; font-size: 13px; }
.mk-fab { position: absolute; right: 14px; bottom: 14px; background: var(--mk-positive); color: #fff; border-radius: 28px; padding: 10px 16px; font-weight: 700; font-size: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.mk-toggle-grp { display: inline-flex; border-radius: 4px; overflow: hidden; }
.mk-toggle-grp span { padding: 5px 10px; font-size: 11px; font-weight: 600; background: #eeeeee; color: #616161; display: inline-flex; gap: 4px; align-items: center; }
.mk-toggle-grp span.on { background: var(--mk-primary); color: #fff; }
.mk-badge { display: inline-block; border: 1px solid var(--mk-primary); color: var(--mk-primary); border-radius: 3px; padding: 1px 6px; font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.mk-badge.orange { border-color: #ef6c00; color: #ef6c00; }
.mk-badge.fill-orange { background: #ef6c00; border-color: #ef6c00; color: #fff; }
.mk-badge.grey { border-color: #9e9e9e; color: #616161; }
.mk-badge.pos { border-color: var(--mk-positive); color: #1b8f36; }
.mk-badge.fill-pos { background: var(--mk-positive); border-color: var(--mk-positive); color: #fff; }
.mk-badge.neg { border-color: var(--mk-negative); color: var(--mk-negative); }
.mk-badge.fill-neg { background: var(--mk-negative); border-color: var(--mk-negative); color: #fff; }
.mk-badge.fill-p { background: var(--mk-primary); color: #fff; }
.mk-chip { display: inline-flex; align-items: center; gap: 3px; background: #e0e0e0; border-radius: 12px; padding: 1px 8px; font-size: 11px; white-space: nowrap; }
.mk-chip.blue { background: var(--mk-blue1); color: var(--mk-blue9); }
.mk-chip.green { background: var(--mk-green1); color: #1b5e20; }
.mk-chip.orange { background: var(--mk-orange1); color: #5d3200; }
.mk-chip.red { background: var(--mk-red1); color: var(--mk-negative); }
.mk-chip.sm { padding: 0 6px; font-size: 10.5px; }
.mk-chip .mi { font-size: 13px; }

/* ---------- tarjetas, inputs, filas ---------- */
.mk-card { border: 1px solid var(--mk-line); border-radius: 4px; background: #fff; }
.mk-card + .mk-card { margin-top: 8px; }
.mk-card-h { background: var(--mk-head); padding: 8px 10px; display: flex; align-items: center; gap: 8px; }
.mk-card-h .t { font-weight: 600; font-size: 13px; }
.mk-card-b { padding: 10px; }
.mk-input { border: 1px solid #9e9e9e; border-radius: 4px; padding: 4px 8px; min-height: 30px; display: flex; flex-direction: column; justify-content: center; background: #fff; position: relative; }
.mk-input .l { font-size: 9.5px; color: #616161; line-height: 1; }
.mk-input .v { font-size: 12px; line-height: 1.25; }
.mk-input .v.ph { color: #9e9e9e; }
.mk-input.ta { min-height: 52px; justify-content: flex-start; padding-top: 6px; }
.mk-input.sel::after { content: "arrow_drop_down"; font-family: "Material Icons"; position: absolute; right: 4px; top: 6px; font-size: 18px; color: #616161; }
.mk-input .hint { font-size: 9.5px; color: #757575; }
.mk-hint { font-size: 10.5px; color: #757575; margin: -4px 0 2px 8px; }
.mk-row { display: flex; gap: 8px; align-items: center; }
.mk-row + .mk-row { margin-top: 8px; }
.mk-row > * { flex: 1; }
.mk-row > .fx { flex: 0 0 auto; }
.mk-stack { display: flex; flex-direction: column; gap: 8px; }
.mk-sw { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.mk-sw i { width: 26px; height: 12px; border-radius: 6px; background: #bdbdbd; position: relative; display: inline-block; flex: 0 0 26px; }
.mk-sw i::after { content: ""; position: absolute; top: -3px; left: -2px; width: 18px; height: 18px; border-radius: 50%; background: #fafafa; box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.mk-sw.on i { background: #90caf9; }
.mk-sw.on i::after { left: 10px; background: var(--mk-primary); }
.mk-sw.pos.on i { background: #a5d6a7; }
.mk-sw.pos.on i::after { background: var(--mk-positive); }
.mk-cb { width: 14px; height: 14px; border: 2px solid #757575; border-radius: 2px; display: inline-block; vertical-align: middle; flex: 0 0 14px; }
.mk-cb.on { background: var(--mk-primary); border-color: var(--mk-primary); position: relative; }
.mk-cb.on::after { content: ""; position: absolute; left: 3px; top: 0; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.mk-radio { width: 14px; height: 14px; border: 2px solid #757575; border-radius: 50%; display: inline-block; vertical-align: middle; flex: 0 0 14px; position: relative; }
.mk-radio.on { border-color: var(--mk-primary); }
.mk-radio.on::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; background: var(--mk-primary); }
.mk-sep { height: 1px; background: var(--mk-line); margin: 4px 0; }
.mk-grey { color: var(--mk-grey); }
.mk-caption { font-size: 10.5px; color: var(--mk-grey); }
.mk-list > div { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--mk-line); }
.mk-list > div:last-child { border-bottom: 0; }
.mk-list .mi.av { color: #616161; font-size: 22px; }
.mk-list .txt { flex: 1; min-width: 0; }
.mk-list .txt small { display: block; color: var(--mk-grey); font-size: 11px; }
.mk-banner { display: flex; align-items: center; gap: 8px; border-radius: 4px; padding: 8px 12px; flex-wrap: wrap; }
.mk-banner.blue { background: var(--mk-blue1); }
.mk-banner.orange { background: var(--mk-orange1); color: #5d3200; }
.mk-banner.red { background: var(--mk-red1); color: var(--mk-negative); }
.mk-banner.green { background: var(--mk-green1); color: #1b5e20; }
.mk-banner .acts { margin-left: auto; display: flex; gap: 2px; }

/* ---------- pestañas (q-tabs) ---------- */
.mk-tabs { display: flex; border-bottom: 1px solid var(--mk-line); overflow-x: auto; }
.mk-tabs span { padding: 8px 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: #616161; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.mk-tabs span.on { color: var(--mk-primary); box-shadow: inset 0 -2px 0 var(--mk-primary); }
.mk-tabs .cnt { background: var(--mk-negative); color: #fff; border-radius: 8px; padding: 0 5px; font-size: 9.5px; }

/* ---------- tablas (q-table) ---------- */
.mk-tablewrap { overflow-x: auto; }
table.mk-table { width: 100%; border-collapse: collapse; font-size: 12px; margin: 0; display: table; }
table.mk-table th, table.mk-table td { padding: 6px 10px; border-bottom: 1px solid var(--mk-line); text-align: left; white-space: nowrap; background: #fff; color: var(--mk-ink); }
table.mk-table th { font-size: 11px; font-weight: 600; color: #616161; background: #fff; }
table.mk-table td.num, table.mk-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.mk-table tr.sel td { background: #f3f8fe; }
table.mk-table tr.tot td { font-weight: 700; }
table.mk-table td .mi { font-size: 16px; color: #616161; }

/* ---------- KPIs ---------- */
.mk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.mk-kpi { border: 1px solid var(--mk-line); border-radius: 4px; padding: 8px 10px; background: #fff; }
.mk-kpi .l { font-size: 10.5px; color: var(--mk-grey); text-transform: uppercase; letter-spacing: .03em; }
.mk-kpi .v { font-size: 17px; font-weight: 700; }
.mk-kpi.pos .v { color: #1b8f36; }
.mk-kpi.neg .v { color: var(--mk-negative); }
.mk-kpi.pri .v { color: var(--mk-primary); }

/* ---------- POS ---------- */
.mk-pos { display: flex; gap: 10px; }
.mk-pos .left { flex: 1; min-width: 0; }
.mk-pos .right { flex: 0 0 240px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.mk-prod { border: 1px solid var(--mk-line); border-radius: 4px; background: #fff; text-align: center; padding: 4px; font-size: 10.5px; line-height: 1.2; }
.mk-prod .img { height: 44px; border-radius: 3px; background: linear-gradient(135deg, #e8eef7, #cfd8e6); margin-bottom: 3px; display: flex; align-items: center; justify-content: center; color: #7b8794; }
.mk-prod .price { font-weight: 600; color: #1b8f36; }
.mk-total { background: var(--mk-positive); color: #fff; padding: 8px 10px; border-radius: 4px; display: flex; align-items: baseline; justify-content: space-between; }
.mk-total .amt { font-size: 22px; font-weight: 700; }
.mk-total .und { font-size: 11px; opacity: .9; }
.mk-lines > div { display: flex; gap: 6px; align-items: center; padding: 5px 0; border-bottom: 1px solid var(--mk-line); font-size: 11.5px; }
.mk-lines > div:last-child { border-bottom: 0; }
.mk-lines .q { flex: 0 0 24px; text-align: center; font-weight: 600; }
.mk-lines .d { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-lines .a { flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.mk-denoms { display: flex; flex-wrap: wrap; gap: 4px; }
.mk-denoms span { border: 1px solid #bdbdbd; border-radius: 3px; padding: 2px 6px; font-size: 10.5px; background: #fafafa; }

/* ---------- tablero (kanban) ---------- */
.mk-cols { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.mk-col { flex: 0 0 200px; }
.mk-col .mk-card-b { display: flex; flex-direction: column; gap: 8px; }
.franja { width: 6px; height: 28px; border-radius: 3px; flex: 0 0 6px; }
.mk-search { display: flex; align-items: center; gap: 4px; margin-top: 6px; }
.mk-search .box { flex: 1; border: 1px solid #bdbdbd; border-radius: 4px; background: #fff; padding: 3px 6px; font-size: 11px; color: #9e9e9e; display: flex; align-items: center; gap: 4px; }
.mk-item { border: 1px solid var(--mk-line); border-radius: 4px; padding: 6px 8px; display: flex; gap: 6px; align-items: flex-start; background: #fff; }
.mk-item.sel { border-color: var(--mk-primary); background: #f3f8fe; }
.mk-item .body { flex: 1; min-width: 0; }
.mk-item .lbl { font-size: 12.5px; }
.mk-item .cost { font-size: 10.5px; color: var(--mk-grey); }
.mk-item .chips { display: flex; gap: 3px; flex-wrap: wrap; margin-top: 3px; }
.mk-item .ic { display: flex; gap: 2px; align-items: center; }
.mk-item .ic .mi { font-size: 16px; color: #616161; }
.mk-item .ic .mi.warn { color: #ef6c00; }
.mk-item .ic .mi.ok { color: var(--mk-positive); }
.mk-item .ic .mi.drag { color: #bdbdbd; }
.mk-item-form { border-top: 1px solid var(--mk-line); margin: 6px -8px -6px; padding: 8px; background: #fafafa; }

/* ---------- diálogos ---------- */
.mk-dlg-wrap { background: rgba(0,0,0,.35); padding: 18px; display: flex; justify-content: center; }
.mk-dlg { background: #fff; border-radius: 4px; box-shadow: 0 8px 30px rgba(0,0,0,.35); width: 100%; max-width: 460px; }
.mk-dlg.w { max-width: 640px; }
.mk-dlg.xw { max-width: 820px; }
.mk-dlg .h { font-size: 16px; font-weight: 600; padding: 12px 14px 4px; display: flex; align-items: center; gap: 8px; }
.mk-dlg .h .mi { color: #616161; }
.mk-dlg .b { padding: 8px 14px; display: flex; flex-direction: column; gap: 8px; }
.mk-dlg .b .mk-caption { margin-top: -2px; }
.mk-dlg .a { display: flex; justify-content: flex-end; gap: 4px; padding: 6px 10px 10px; flex-wrap: wrap; }
.mk-dlg .sub { font-weight: 600; font-size: 12.5px; }
.mk-dlg .sub small { font-weight: 400; color: var(--mk-grey); }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; }
.two .mk-dlg-wrap { padding: 12px; }

/* ---------- misc ---------- */
.mk-calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mk-calendar span { border: 1px solid var(--mk-line); border-radius: 3px; padding: 4px; font-size: 10.5px; min-height: 34px; background: #fff; }
.mk-calendar span.hd { border: 0; background: transparent; color: #616161; font-weight: 600; min-height: 0; text-align: center; }
.mk-calendar span.fest { background: var(--mk-red1); }
.mk-calendar span.has { background: var(--mk-blue1); }
.mk-calendar span small { display: block; color: var(--mk-primary); font-size: 9.5px; }
.mk-tirilla { font-family: var(--md-code-font-family); font-size: 10.5px; background: #fff; border: 1px dashed #bdbdbd; padding: 8px 10px; white-space: pre; max-width: 260px; margin: 0 auto; line-height: 1.3; }
.mk-note { font-size: 11px; color: #616161; font-style: italic; }
@media (max-width: 640px) {
  .mk { overflow-x: auto; }
  .mk-banner .acts { margin-left: 0; flex-wrap: wrap; }
  .mk-pos { flex-direction: column; }
  .mk-pos .right { flex: 1; }
  .mk-drawer { flex-basis: 140px; }
  .mk-app { flex-direction: column; }
  .mk-drawer { border-right: 0; border-bottom: 1px solid var(--mk-line); display: flex; flex-wrap: wrap; }
}
