/* =========================================================================
   m3r.dk — app preview components
   Interface illustrations of Olly / Tally / Sally, drawn with the same
   design tokens the apps themselves use. Example data only.
   ========================================================================= */

.appwin {
  --w-brand: var(--brand);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 15px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 12px;
  line-height: 1.45;
  container-type: inline-size;
}
.appwin.tilt { transform: perspective(1600px) rotateY(-3.2deg) rotateX(1.4deg); transition: transform .5s ease; }
.appwin.tilt:hover { transform: perspective(1600px) rotateY(0deg) rotateX(0deg); }
@media (max-width: 940px) { .appwin.tilt { transform: none; } }

/* browser chrome */
.aw-chrome {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; background: var(--cream);
  border-bottom: 1px solid var(--border);
}
.aw-dots { display: flex; gap: 5px; flex: none; }
.aw-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); display: block; }
.aw-dots i:first-child { background: color-mix(in srgb, var(--danger) 55%, var(--border-strong)); }
.aw-dots i:nth-child(2) { background: color-mix(in srgb, var(--brand) 75%, var(--border-strong)); }
.aw-dots i:nth-child(3) { background: color-mix(in srgb, var(--good) 45%, var(--border-strong)); }
.aw-url {
  flex: 1; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 12px; color: var(--muted); font-size: 11px;
  text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* app top bar */
.aw-top {
  display: flex; align-items: center; gap: 12px;
  padding: 0 13px; height: 42px;
  background: var(--surface); border-bottom: 2px solid var(--w-brand);
}
.aw-brand { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 13px; letter-spacing: -0.01em; flex: none; }
.aw-mark {
  width: 21px; height: 21px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--w-brand), #e08a3c);
  display: inline-flex; align-items: center; justify-content: center;
  color: #33281f; font-weight: 700; font-size: 11px;
}
.aw-tabs {
  display: flex; gap: 1px; overflow: hidden; flex: 1; min-width: 0;
  -webkit-mask-image: linear-gradient(to right, #000 86%, transparent 100%);
          mask-image: linear-gradient(to right, #000 86%, transparent 100%);
}
.aw-tabs span { padding: 4px 9px; border-radius: 8px; color: var(--ink-2); font-size: 11.5px; font-weight: 500; white-space: nowrap; }
.aw-tabs span.on { background: color-mix(in srgb, var(--w-brand) 24%, transparent); color: var(--ink); font-weight: 650; }
.aw-who { display: flex; align-items: center; gap: 7px; flex: none; color: var(--muted); font-size: 11px; }
.aw-avatar { width: 21px; height: 21px; border-radius: 50%; background: var(--cream); border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--ink-2); }
.aw-live { display: inline-flex; align-items: center; gap: 5px; background: var(--good-soft); color: var(--good-text); border-radius: 999px; padding: 2px 9px; font-weight: 650; font-size: 10.5px; }
.aw-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--good); }

/* body */
.aw-body { padding: 14px; background: var(--page); display: grid; gap: 12px; }
.aw-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.aw-h h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.aw-btn { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 4px 10px; font-size: 11px; font-weight: 550; color: var(--ink-2); }
.aw-btn.pri { background: var(--w-brand); border-color: var(--w-brand); color: #33281f; font-weight: 650; }

.aw-card { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; box-shadow: var(--shadow); }
.aw-card > h5 { margin: 0 0 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }

.aw-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.aw-kpis.k3 { grid-template-columns: repeat(3, 1fr); }
.aw-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 10px 12px; box-shadow: var(--shadow); }
.aw-kpi .k { font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 650; }
.aw-kpi .v { font-size: 19px; font-weight: 650; letter-spacing: -0.02em; margin-top: 2px; }
.aw-kpi .d { font-size: 10.5px; color: var(--good-text); font-weight: 600; }
.aw-kpi .d.warn { color: var(--amber-text); }

.aw-cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 11px; }
.aw-cols.even { grid-template-columns: 1fr 1fr; }

/* bar chart */
.aw-bars { display: flex; align-items: flex-end; gap: 5px; height: 92px; padding-top: 6px; }
.aw-bars i { flex: 1; background: var(--w-brand); border-radius: 4px 4px 2px 2px; display: block; min-height: 3px; opacity: .92; }
.aw-bars i.dim { background: color-mix(in srgb, var(--w-brand) 42%, transparent); }
.aw-axis { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted); margin-top: 5px; }

/* horizontal bars */
.aw-hbars { display: grid; gap: 8px; }
.aw-hbar { display: grid; grid-template-columns: 78px 1fr 40px; align-items: center; gap: 9px; font-size: 11px; }
.aw-hbar .t { color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.aw-hbar .track { height: 8px; border-radius: 999px; background: var(--grid); overflow: hidden; }
.aw-hbar .track > b { display: block; height: 100%; border-radius: 999px; background: var(--w-brand); }
.aw-hbar .n { text-align: right; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* rows / table */
.aw-rows { display: grid; }
.aw-row { display: grid; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 11.5px; }
.aw-row:last-child { border-bottom: 0; }
.aw-row.head { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; font-weight: 650; }
.aw-row .name { font-weight: 600; color: var(--ink); }
.aw-row .num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.aw-chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 650; }
.aw-chip.ok { background: var(--good-soft); color: var(--good-text); }
.aw-chip.amber { background: var(--amber-soft); color: var(--amber-text); }
.aw-chip.blue { background: var(--blue-soft); color: var(--blue); }
.aw-chip.purple { background: var(--purple-soft); color: var(--purple); }
.aw-chip.grey { background: var(--cream); color: var(--ink-2); }

/* pipeline board */
.aw-board { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.aw-col { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 9px 8px; display: grid; gap: 7px; align-content: start; }
.aw-col > .ch { display: flex; justify-content: space-between; align-items: baseline; font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.aw-col > .ch b { color: var(--ink-2); font-size: 10px; }
.aw-deal { background: var(--page); border: 1px solid var(--border); border-radius: 8px; padding: 7px 8px; }
.aw-deal .c { font-weight: 650; font-size: 11px; line-height: 1.3; }
.aw-deal .m { color: var(--muted); font-size: 10px; }
.aw-deal .val { color: var(--brand-deep); font-weight: 700; font-size: 10.5px; }
.aw-deal.won { border-color: color-mix(in srgb, var(--good) 45%, transparent); }

/* org tree */
.aw-tree { display: grid; justify-items: center; gap: 0; padding: 4px 0 2px; }
.aw-node {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 7px 11px; text-align: center; box-shadow: var(--shadow); min-width: 108px;
  border-top: 3px solid var(--w-brand);
}
.aw-node .r { font-weight: 650; font-size: 11px; }
.aw-node .p { color: var(--muted); font-size: 10px; }
.aw-node.hiring { border-top-color: var(--blue); }
.aw-node.planned { border-top-color: var(--purple); border-style: dashed; border-width: 1px; border-top-width: 3px; }
.aw-node.out { border-top-color: var(--muted); }
.aw-branch { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.aw-stem { width: 2px; height: 14px; background: var(--border-strong); }
.aw-rail { height: 2px; background: var(--border-strong); width: 72%; margin-bottom: 0; }
.aw-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--muted); justify-content: center; }
.aw-legend span { display: inline-flex; align-items: center; gap: 5px; }
.aw-legend i { width: 8px; height: 8px; border-radius: 3px; display: block; }

/* stacked / small screens inside cards */
.screen-stack { position: relative; }
.screen-stack .appwin + .appwin {
  position: absolute; width: 58%; right: -4%; bottom: -12%;
  font-size: 10.5px; box-shadow: var(--shadow-lg);
}
@media (max-width: 700px) { .screen-stack .appwin + .appwin { display: none; } }

.screen-caption { font-size: 13px; color: var(--muted); margin-top: 14px; text-align: center; }

@container (max-width: 520px) {
  .aw-kpis { grid-template-columns: repeat(2, 1fr); }
  .aw-cols { grid-template-columns: 1fr; }
  .aw-board { grid-template-columns: repeat(3, 1fr); }
  .aw-tabs span:nth-child(n+5) { display: none; }
}
