/* Píldora POS · Apps: lanzador y motor de apps */
.ap-page { max-width: 1120px; }
.ap-hero { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 8px; }
.ap-hero h1 { margin: 2px 0 0; font-size: clamp(26px, 3.4vw, 36px); color: var(--teal-ink); }
.ap-hi { margin: 0; color: var(--ink-3); font-weight: 600; }
.ap-search { min-width: min(320px, 100%); background: var(--surface); }
.ap-cat { margin-top: 26px; }
.ap-cat h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: 0 0 12px; font-family: var(--body); font-weight: 700; }
.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 18px 12px; }
.ap-tile { display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--ink); padding: 10px 4px; border-radius: var(--r-lg); outline: none; }
.ap-ico { position: relative; width: 78px; height: 78px; border-radius: 20px; background: var(--surface); display: grid; place-items: center; box-shadow: 0 1px 2px rgba(7, 46, 44, .06), 0 10px 24px -14px rgba(7, 46, 44, .35); transition: transform .18s ease, box-shadow .18s ease; }
.ap-ico svg { width: 46px; height: 46px; }
.ap-tile:hover .ap-ico, .ap-tile:focus-visible .ap-ico { transform: translateY(-3px); box-shadow: 0 1px 2px rgba(7, 46, 44, .06), 0 16px 30px -14px rgba(7, 46, 44, .45); }
.ap-tile:focus-visible .ap-ico { outline: 3px solid var(--pill); outline-offset: 3px; }
.ap-tile:active .ap-ico { transform: scale(.96); }
.ap-name { font-weight: 600; font-size: 14px; text-align: center; line-height: 1.2; }
.ap-count { position: absolute; top: -6px; right: -6px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--teal); color: #fff; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; border: 2px solid var(--bg); }
.ap-head { display: flex; align-items: center; gap: 14px; }
.ap-ico--sm { width: 54px; height: 54px; border-radius: 15px; flex: none; }
.ap-ico--sm svg { width: 32px; height: 32px; }
.ap-head h1 { margin: 0; }
.ap-head p { margin: 2px 0 0; max-width: 60ch; }
.ap-est { padding: 0 16px 12px; flex-wrap: wrap; }
.ap-est .chip b, .ap-modo .chip b { opacity: .6; margin-left: 4px; }
.ap-modo { margin-left: auto; }
.ap-empty { display: grid; justify-items: center; gap: 6px; padding: 40px 16px; text-align: center; }
.ap-empty .ap-ico { margin-bottom: 8px; }
.ap-empty p { margin: 0; }
.ap-pct { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--line-soft); vertical-align: middle; overflow: hidden; }
.ap-pct i { display: block; height: 100%; background: var(--teal); }
.ap-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.ap-form .ap-full, .ap-form .check { grid-column: 1 / -1; }
.ap-form textarea { width: 100%; resize: vertical; font: inherit; }
.ap-lbl { display: grid; gap: 4px; font-weight: 600; font-size: 13.5px; }
.ap-firma { display: grid; font-weight: 400; gap: 6px; margin-top: 4px; }
.ap-firma canvas { width: 100%; height: 150px; background: #fff; border: 1.5px dashed var(--line); border-radius: var(--r-md); touch-action: none; cursor: crosshair; }
.ap-firma-foot { display: flex; justify-content: space-between; align-items: center; }
.ap-kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding: 4px 16px 16px; }
.ap-col { background: var(--bg); border-radius: var(--r-lg); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 160px; transition: background .15s; }
.ap-col.over { background: var(--teal-soft); }
.ap-col-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 4px; }
.ap-col-head b { color: var(--ink-3); font-size: 13px; }
.ap-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: grid; gap: 3px; cursor: grab; font-size: 13.5px; color: var(--ink-2); }
.ap-card b { color: var(--ink); font-size: 14.5px; }
.ap-card:hover { border-color: var(--teal); }
.ap-card.drag { opacity: .5; }
.ap-col-empty { color: var(--ink-3); font-size: 13px; text-align: center; padding: 18px 0; border: 1.5px dashed var(--line); border-radius: var(--r-md); }
@media (max-width: 640px) {
  .ap-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px 6px; }
  .ap-ico { width: 62px; height: 62px; border-radius: 17px; }
  .ap-ico svg { width: 36px; height: 36px; }
  .ap-name { font-size: 12px; }
  .ap-form { grid-template-columns: 1fr; }
}
@media (max-width: 380px) { .ap-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
