/*
 * The public site's HTML/CSS mockups of the real app, built from the app's own
 * tokens and words (docs/design-system.md, features/requests/cabinet.tsx,
 * request-form.tsx, all-screen.tsx). Started as the "produs" preview direction
 * (/preview/produs/), which keeps its own copy. Prefix pm-. Needs base.css.
 *
 *   .pm-phone   the own firm's "Factură nouă" on a phone, then "Facturile tale"
 *   .pm-desk    the bureau's "Cereri, toate firmele" in a desktop window
 *   .pm-suite   Contabic as a whole: the modules in order down the side, Facturi
 *               open on "Facturile tale" (a .pm-desk window with other insides)
 *   .pm-strip   Trimite la SFS -> Draft la SFS -> Semnată
 */

/* ------------------------------------------------------------- phone */
.pm-phone {
  position: relative; width: 300px; max-width: 100%; aspect-ratio: 300 / 620;
  border-radius: 46px; background: #0b0b0d; padding: 11px; margin: 0 auto;
  box-shadow: 0 0 0 1px #2a2a2e, 0 40px 80px -30px rgba(0, 0, 0, .45);
  font-size: 12.5px; line-height: 1.4; text-align: left;
}
@media (prefers-color-scheme: dark) { .pm-phone { box-shadow: 0 0 0 1px #3a3a40, 0 40px 80px -30px rgba(0, 0, 0, .9); } }
.pm-screen { position: relative; height: 100%; border-radius: 36px; overflow: hidden; background: var(--bg); color: var(--fg); }
.pm-notch { position: absolute; top: 9px; left: 50%; width: 92px; height: 26px; margin-left: -46px; background: #0b0b0d; border-radius: 20px; z-index: 5; }
.pm-sbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 24px 0; height: 44px; font-weight: 600; font-size: 13px; }
.pm-sbar i { display: block; width: 18px; height: 9px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.pm-sbar i::after { content: ""; position: absolute; inset: 1px 4px 1px 1px; background: currentColor; border-radius: 1px; }
.pm-apph { display: flex; align-items: center; justify-content: space-between; padding: 6px 14px 8px; border-bottom: 1px solid var(--border); }
.pm-co { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border: 1px solid var(--border); border-radius: 999px; padding: 4px 10px 4px 5px; font-weight: 600; font-size: 12px; white-space: nowrap; }
.pm-co b { width: 20px; height: 20px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: 9px; }
.pm-apph svg { width: 32px; height: 32px; }

.pm-view { position: absolute; left: 0; right: 0; top: 91px; bottom: 0; padding: 10px 14px 14px; transition: opacity .45s, transform .55s var(--ease); }
.pm-view.off { opacity: 0; transform: translateX(26px); pointer-events: none; }
.pm-view.off.left { transform: translateX(-26px); }
.pm-h { display: flex; align-items: center; justify-content: space-between; margin: 0 0 4px; }
.pm-h h4 { margin: 0; font-size: 17px; letter-spacing: -0.02em; font-weight: 600; }
.pm-h span { font-weight: 600; font-size: 12px; color: var(--muted); padding: 6px 4px; }
.pm-help { margin: 0 0 10px; color: var(--muted); font-size: 11.5px; }

.pm-fl { display: grid; gap: 4px; margin-bottom: 9px; }
.pm-fl > label, .pm-lbl { font-size: 11px; color: var(--muted); font-weight: 500; padding-left: 1px; }
.pm-fl > small { font-size: 10.5px; color: var(--faint); padding-left: 1px; }
.pm-in { position: relative; background: var(--card); border: 1px solid var(--input); border-radius: 6px; padding: 0 10px; height: 36px; display: flex; align-items: center; gap: 6px; transition: border-color .3s, box-shadow .3s, background .4s; overflow: hidden; white-space: nowrap; }
.pm-in.focus { border-color: var(--fg); box-shadow: 0 0 0 3px color-mix(in srgb, var(--fg) 10%, transparent); }
.pm-in.read { background: var(--read); border-color: var(--read-line); }
.pm-in .ph { color: var(--faint); }
.pm-in .tag { margin-left: auto; font-size: 9.5px; color: var(--sent); font-weight: 600; opacity: 0; transition: opacity .4s; }
.pm-in.read .tag { opacity: 1; }
.pm-caret::after { content: ""; display: inline-block; width: 1.5px; height: 1.05em; background: var(--fg); vertical-align: -2px; margin-left: 1px; animation: pm-caret 1s steps(1) infinite; }
@keyframes pm-caret { 50% { opacity: 0; } }

.pm-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 3px 0 10px; }
.pm-chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 9px; border: 1px solid var(--input); background: var(--card); border-radius: 6px; font-weight: 500; font-size: 11.5px; white-space: nowrap; transition: transform .2s, background .3s; }
.pm-chip::before { content: "+"; font-weight: 600; color: var(--muted); }
.pm-chip em { font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.pm-chip.press { transform: scale(.93); background: var(--accent); }

.pm-line { display: grid; grid-template-columns: 1fr 34px 36px 58px; gap: 4px; margin-bottom: 5px; transition: opacity .4s, transform .5s var(--ease); }
.pm-line.off { opacity: 0; transform: translateY(8px); }
.pm-line span { height: 32px; display: flex; align-items: center; padding: 0 7px; border: 1px solid var(--input); background: var(--card); border-radius: 6px; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.pm-line span.r { justify-content: flex-end; font-variant-numeric: tabular-nums; }
.pm-line span.u { color: var(--muted); justify-content: center; }

.pm-send { position: absolute; left: 14px; right: 14px; bottom: 16px; height: 46px; border-radius: 8px; background: var(--primary); color: var(--on-primary); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; font-size: 14px; transition: transform .25s, opacity .3s; }
.pm-send svg { width: 15px; height: 15px; }
.pm-send.press { transform: scale(.95); }
.pm-send.dim { opacity: .55; }

.pm-note { margin: 0 0 10px; font-size: 11.5px; padding: 8px 10px; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-weight: 500; }
.pm-big { display: flex; align-items: center; justify-content: center; gap: 8px; height: 42px; border-radius: 8px; background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 13.5px; margin-bottom: 14px; }
.pm-big svg { width: 15px; height: 15px; }
.pm-list-h { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.pm-list-sub { margin: 0 0 8px; font-size: 10.5px; color: var(--muted); }
.pm-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; border: 1px solid var(--border); background: var(--card); border-radius: 8px; padding: 9px 10px; margin-bottom: 6px; position: relative; overflow: hidden; }
.pm-row.bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--todo); transition: opacity .4s; }
.pm-row.bar.done::before { opacity: 0; }
.pm-row b { font-weight: 600; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-row small { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-row .s { grid-column: 2; grid-row: 1; justify-self: end; }
.pm-row .t { grid-column: 2; grid-row: 2; justify-self: end; font-size: 11px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-row .t i { font-style: normal; color: var(--muted); }
.pm-row .pill { font-size: 10.5px; padding: 2px 6px; transition: background .4s, color .4s; }
.pm-row.enter { animation: pm-in .6s var(--ease) both; }
@keyframes pm-in { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }

.pm-tap { position: absolute; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: color-mix(in srgb, var(--fg) 20%, transparent); border: 2px solid color-mix(in srgb, var(--fg) 38%, transparent); z-index: 6; opacity: 0; transform: scale(.6); transition: opacity .25s, transform .25s, left .6s var(--ease), top .6s var(--ease); pointer-events: none; }
.pm-tap.on { opacity: 1; transform: scale(1); }
.pm-tap.tap { transform: scale(.75); }

/* ----------------------------------------------------------- desktop */
.pm-desk { container-type: inline-size; background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; box-shadow: var(--float-shadow); font-size: 13px; line-height: 1.4; text-align: left; }
.pm-win { display: flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-bottom: 1px solid var(--border); background: var(--sunken); }
.pm-win i { width: 10px; height: 10px; border-radius: 50%; background: var(--input); }
.pm-win span { margin: 0 auto; font: 500 11.5px/1 var(--mono); color: var(--faint); padding-right: 40px; }
.pm-app { display: grid; grid-template-columns: 1fr; min-height: 380px; background: var(--bg); }
.pm-side { display: none; border-right: 1px solid var(--border); background: var(--card); padding: 14px 10px; }
.pm-side .who { display: flex; align-items: center; gap: 8px; padding: 6px 8px 14px; font-weight: 600; font-size: 12.5px; }
.pm-side .who svg { width: 24px; height: 24px; flex: none; }
.pm-side .grp { font-size: 11px; color: var(--faint); padding: 10px 8px 4px; }
.pm-side a { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 8px; border-radius: 6px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 12.5px; }
.pm-side a.on { background: var(--accent); color: var(--fg); }
.pm-side a em { font-style: normal; font-size: 10.5px; font-weight: 600; background: var(--warn-soft); color: var(--warn); border-radius: 999px; padding: 1px 6px; font-variant-numeric: tabular-nums; transition: transform .3s cubic-bezier(.34, 1.56, .64, 1); }
.pm-side a em.bump { transform: scale(1.35); }
.pm-main { padding: 18px 16px 20px; min-width: 0; }
.pm-main h5 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.pm-main .desc { margin: 3px 0 14px; color: var(--muted); font-size: 12.5px; max-width: 46em; }
.pm-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pm-tabs { display: inline-flex; background: var(--sunken); border-radius: 7px; padding: 3px; gap: 2px; }
.pm-tabs span { padding: 5px 10px; border-radius: 5px; font-weight: 500; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pm-tabs span.on { background: var(--card); color: var(--fg); box-shadow: 0 0 0 1px var(--border); }
.pm-tabs b { font-weight: 600; margin-left: 4px; font-variant-numeric: tabular-nums; }
.pm-sel { border: 1px solid var(--input); background: var(--card); border-radius: 6px; padding: 5px 10px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.pm-table { border: 1px solid var(--border); border-radius: 8px; background: var(--card); overflow: hidden; }
.pm-tr { display: grid; grid-template-columns: 1.1fr 1.3fr .9fr auto; gap: 4px 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--border); }
.pm-tr:first-child { border-top: 0; }
.pm-tr[hidden] { display: none; }
.pm-tr.th { background: var(--sunken); color: var(--muted); font-weight: 500; font-size: 11.5px; padding-top: 7px; padding-bottom: 7px; }
.pm-tr .c-date, .pm-tr .c-what, .pm-tr .c-act { display: none; }
.pm-tr .c-firm { font-weight: 500; }
.pm-tr .c-buyer small, .pm-tr .c-tot small { display: block; color: var(--muted); font-size: 11px; }
.pm-tr .c-buyer small { font-family: var(--mono); font-size: 10.5px; white-space: nowrap; }
.pm-tr .c-tot { text-align: right; font-variant-numeric: tabular-nums; }
.pm-tr .c-what { color: var(--muted); }
.pm-tr .pill { transition: background .4s, color .4s; }
.pm-tr.enter { animation: pm-in .7s var(--ease) both; background: var(--read); transition: background 1.2s; }
.pm-tr.enter.settled { background: transparent; }
.pm-mini { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 6px; font-weight: 600; font-size: 12px; white-space: nowrap; background: var(--primary); color: var(--on-primary); transition: transform .2s; }
.pm-mini.ghost { background: var(--card); color: var(--fg); border: 1px solid var(--input); }
.pm-mini svg { width: 13px; height: 13px; }
.pm-mini.press { transform: scale(.92); }
@container (min-width: 560px) {
  .pm-tr { grid-template-columns: 1.1fr 1.3fr 1.3fr .8fr .8fr auto; }
  .pm-tr .c-what, .pm-tr .c-act { display: block; }
  .pm-tr .c-act { text-align: right; }
}
@container (min-width: 820px) {
  .pm-app { grid-template-columns: 196px 1fr; }
  .pm-side { display: block; }
  .pm-main { padding: 22px 24px 24px; }
  .pm-tr { grid-template-columns: 1.1fr .7fr 1.35fr 1.3fr .8fr .75fr 1.1fr; }
  .pm-tr .c-date { display: block; color: var(--muted); font-variant-numeric: tabular-nums; }
}
@container (max-width: 559px) {
  .pm-tr.th .c-firm::after { content: " / cumpărător"; }
  .pm-tr .c-buyer { display: none; }
  .pm-tr .c-firm small { display: block; color: var(--muted); font-weight: 400; font-size: 11.5px; }
  .pm-tr { grid-template-columns: 1fr auto auto; }
}
@container (min-width: 560px) { .pm-tr .c-firm small { display: none; } }

/* -------------------------------------------------------------- suite */
/* Narrow: the modules sit above the list, two to a row. From 440px of window
   they move into a sidebar, the way the app lays out its menu. */
.pm-suite .pm-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }
.pm-mods { background: var(--card); border-bottom: 1px solid var(--border); padding: 10px 10px 12px; }
.pm-mods .who { display: flex; align-items: center; gap: 8px; padding: 2px 4px 8px; font-weight: 600; font-size: 12.5px; }
.pm-mods .who svg { width: 24px; height: 24px; flex: none; }
.pm-mods .grp { margin: 0; font-size: 11px; color: var(--faint); padding: 0 4px 6px; }
.pm-mods ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 4px; }
.pm-mods li { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; gap: 3px 8px; padding: 6px; border-radius: 8px; color: var(--muted); }
.pm-mods li .n { grid-row: span 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 600 10.5px/1 var(--mono); border: 1.5px solid var(--input); background: var(--card); }
.pm-mods li b { font-weight: 500; font-size: 12px; line-height: 1.25; }
.pm-mods li .pill { justify-self: start; font-size: 10px; padding: 1px 6px; }
.pm-mods li.on { background: var(--accent); color: var(--fg); }
.pm-mods li.on b { font-weight: 600; }
.pm-mods li.on .n { background: var(--ok); border-color: var(--ok); color: #fff; }
.pm-mods li.soon .n { border-color: var(--sent); color: var(--sent); }
.pm-suite .pm-main { padding: 14px 12px 16px; }
.pm-mh { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pm-mh .pm-mini { height: 28px; font-size: 11.5px; }
.pm-suite .pm-main .desc { margin-bottom: 12px; }
.pm-list { display: grid; gap: 6px; }
.pm-li { position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; transition: background 1.2s; }
.pm-li.glow { background: var(--read); }
.pm-li b { font-weight: 600; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-li .pill { justify-self: end; font-size: 11px; padding: 2px 7px; transition: background .4s, color .4s; }
.pm-li small { color: var(--muted); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-li .t { justify-self: end; font-size: 11.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pm-li .t i { font-style: normal; color: var(--muted); }
.pm-li.bar::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--todo); transition: opacity .4s; }
.pm-li.bar.done::before { opacity: 0; }
.pm-note2 { display: flex; align-items: center; gap: 8px; margin: 12px 0 0; font-size: 11.5px; color: var(--muted); }
.pm-note2 svg { width: 14px; height: 14px; flex: none; }
@container (min-width: 440px) {
  .pm-suite .pm-app { grid-template-columns: 168px minmax(0, 1fr); min-height: 372px; }
  .pm-mods { border-bottom: 0; border-right: 1px solid var(--border); padding: 14px 8px; }
  .pm-mods .who { padding: 4px 6px 14px; }
  .pm-mods .grp { padding: 0 6px 6px; }
  .pm-mods ol { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .pm-mods li { padding: 7px 6px; }
  .pm-suite .pm-main { padding: 18px 16px 20px; }
}
@container (min-width: 600px) {
  .pm-suite .pm-app { grid-template-columns: 196px minmax(0, 1fr); }
  .pm-mods { padding: 14px 10px; }
  .pm-suite .pm-main { padding: 22px 22px 24px; }
}
@container (max-width: 439px) {
  .pm-suite .pm-li:nth-child(n + 4) { display: none; }
}
/* Only the list, for a window that sits behind the phone. */
.pm-suite.solo .pm-mods { display: none; }
.pm-suite.solo .pm-app { grid-template-columns: minmax(0, 1fr); min-height: 0; }

/* -------------------------------------------------------------- strip */
.pm-strip { display: grid; gap: 12px; position: relative; text-align: left; }
.pm-step { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 16px 16px 52px; transition: border-color .4s, opacity .5s; }
.pm-step::before { content: attr(data-n); position: absolute; left: 16px; top: 16px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font: 600 11px/1 var(--mono); border: 1.5px solid var(--input); color: var(--muted); background: var(--card); transition: background .4s, color .4s, border-color .4s; }
.pm-step.on::before { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pm-step.on { border-color: var(--input); }
.pm-step .pm-mini, .pm-step .pill { margin-bottom: 8px; }
.pm-step .pill { font-size: 12.5px; padding: 4px 9px; }
.pm-step b { display: block; font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.pm-step p { margin: 0; color: var(--muted); font-size: 14px; }
.js .pm-strip.anim .pm-step { opacity: .45; }
.js .pm-strip.anim .pm-step.on { opacity: 1; }
.pm-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: var(--muted); margin-top: 4px; }
@media (min-width: 860px) {
  .pm-strip { grid-template-columns: repeat(3, 1fr); gap: 28px; }
  .pm-step:not(:last-of-type)::after { content: ""; position: absolute; right: -24px; top: 50%; width: 20px; height: 2px; background: var(--input); }
  .pm-aside { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: reduce) {
  .pm-view.off { display: none; }
  .pm-line.off { opacity: 1; transform: none; }
  .pm-caret::after { display: none; }
}
