/* ===========================================================
   Jusa — the devices, on the web

   The app sells ZESA on a prepaid meter and airtime on a phone
   (mobile/lib/components/home/zesa_meter.dart, airtime_phone.dart).
   This is the same two objects for the browser, from the same
   materials: cream enamel, a green LCD in a dark bezel, dark keys
   and clay. The colours below are the app's own constants; they
   are the machines' paint, not the brand palette, so they live
   as custom properties on .dv rather than on :root.

   Everything is under .dv so nothing leaks into a host page.
   static/devices.js builds the markup.
   =========================================================== */

.dv {
  --plate-top: #F3EFE6; --plate-bottom: #E9E4D9; --plate-edge: #D7D0C3; --recess: #F9F7F2;
  --bezel-top: #454745; --bezel-bottom: #2B2D2B;
  --lcd-top: #CDD6B4; --lcd-bottom: #BDC8A2; --lcd-lit-top: #DCE7C0; --lcd-lit-bottom: #CBD9AA;
  --lcd-ink: #232B1E; --lcd-edge: #9FA98A;
  --key-top: #4E4F4D; --key-bottom: #3A3B39; --key-edge: #262725; --key-ink: #F3F1EC;
  --cap-top: #F4F0E8; --cap-bottom: #E7E1D5; --cap-shadow: #CFC8BA;
  --clay: #B4431F; --clay-top: #C4502A; --clay-edge: #8A3014; --clay-soft: #F5E6E0; --clay-bright: #F0805A;
  --service: #37AC34;
  --ink: #171C1A; --ink2: #2A323B; --muted: #66716C; --line: #E0E2DC; --surface: #FFFFFF;
  --warning: #8A5F0F; --night: #161B20; --night-text: #F2F3F0; --night-muted: #9AA3A8;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ui: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --settle: cubic-bezier(.215, .61, .355, 1);

  position: relative;
  max-width: 440px;
  margin: 0 auto;
  font-family: var(--ui);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}
.dv *, .dv *::before, .dv *::after { box-sizing: border-box; }
.dv button { font: inherit; }
.card.is-device { background: none; border: 0; box-shadow: none; padding: 0; }

.dv-label {
  font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: 1.54px;
  color: var(--ink2); text-transform: uppercase;
}

/* ---- ZESA | Airtime -------------------------------------------------- */
.dv-kind {
  position: relative; display: flex; height: 50px; padding: 3px; margin-bottom: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 11px;
}
.dv-kind-wash {
  position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px);
  background: var(--clay-soft); border-bottom: 2.5px solid var(--clay); border-radius: 8px;
  transition: transform 300ms var(--settle);
}
.dv-kind[data-kind="airtime"] .dv-kind-wash { transform: translateX(100%); }
.dv-kind button {
  position: relative; flex: 1; border: 0; background: none; cursor: pointer;
  font-size: 16px; font-weight: 500; color: var(--muted);
  transition: color 300ms, letter-spacing 300ms;
}
.dv-kind button[aria-selected="true"] {
  color: var(--clay); font-weight: 600; letter-spacing: 2.6px; text-transform: uppercase;
}

/* The two devices trade places: each leaves and arrives from its own side. */
.dv-stage { position: relative; transition: height 420ms cubic-bezier(.645,.045,.355,1); }
.dv-stage > .dv-plate { transition: opacity 420ms, transform 420ms var(--settle); }
.dv-plate.is-leaving { position: absolute; top: 0; left: 0; right: 0; opacity: 0; pointer-events: none; }
.dv-plate.is-leaving.is-meter { transform: translateX(-14%) scale(.97); }
.dv-plate.is-leaving.is-phone { transform: translateX(14%) scale(.97); }
.dv-plate.is-arriving.is-meter { opacity: 0; transform: translateX(-14%) scale(.97); }
.dv-plate.is-arriving.is-phone { opacity: 0; transform: translateX(14%) scale(.97); }

/* ---- The plate ------------------------------------------------------------ */
.dv-plate {
  position: relative;
  background: linear-gradient(to bottom, var(--plate-top), var(--plate-bottom));
  border: 1px solid var(--plate-edge); border-radius: 22px;
  box-shadow: 0 10px 22px rgba(0,0,0,.12), 0 1px 3px rgba(0,0,0,.08);
}
.dv-plate.is-phone { border-radius: 34px; }
.dv-lip {
  position: relative; margin: 1.5px; border: 1px solid rgba(255,255,255,.7);
  border-radius: 20.5px; padding: 16px 22px;
}
.dv-plate.is-phone .dv-lip { border-radius: 32.5px; padding: 34px 20px 18px; }

.dv-screw {
  position: absolute; width: 12px; height: 12px; border-radius: 50%;
  background: radial-gradient(circle at 32% 32%, #B9B4AA, #6A665F);
  box-shadow: 0 1px 1.5px rgba(0,0,0,.2);
}
.dv-screw::after {
  content: ""; position: absolute; left: 2.5px; top: 5.2px; width: 7px; height: 1.6px; background: #3E3B37;
  transform: rotate(var(--a, 0rad));
}
.dv-screw.tl { left: 12px; top: 12px; --a: .5rad; }
.dv-screw.tr { right: 12px; top: 12px; --a: -.3rad; }
.dv-screw.bl { left: 12px; bottom: 12px; --a: 1.1rad; }
.dv-screw.br { right: 12px; bottom: 12px; --a: .2rad; }

.dv-grille {
  position: absolute; top: 12px; left: 50%; width: 96px; height: 14px; transform: translateX(-50%);
  background: #3A3B39; border: 1.5px solid #CFC8BA; border-radius: 7px;
  background-image: radial-gradient(circle, #8D8A83 1.3px, transparent 1.4px);
  background-size: 6.2px 14px; background-position: 1px 0;
}

/* The live wire, round the meter's plate. */
.dv-wire { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.dv-wire .trace { fill: none; stroke: rgba(180,67,31,.16); stroke-width: 1.2; }
.dv-wire .cur { fill: none; stroke-linecap: round; }
.dv-wire .spark { stroke: #fff; stroke-width: 1; fill: none; }
.dv-wire .spark-glow { stroke: var(--clay-bright); stroke-width: 3; fill: none; filter: blur(1.5px); }
.dv-wire .flash { fill: none; stroke: var(--clay-bright); stroke-width: 5; opacity: 0; filter: blur(3px); }

/* ---- Header and the "who / which" row ------------------------------------ */
.dv-head { display: flex; align-items: center; gap: 6px; padding: 0 6px; min-height: 20px; }
.dv-head .dv-bolt { color: var(--clay); flex: none; }
.dv-service { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0;
  font-size: 12px; color: var(--muted); white-space: nowrap; }
.dv-service .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--service); flex: none; }
.dv-service.is-down { color: var(--warning); font-weight: 600; }
/* Nothing of this kind left to sell: the light goes amber and says so. */
.dv-service.is-reloading { color: var(--warning); font-weight: 600; }
.dv-service.is-reloading .dot { background: var(--warning); animation: dv-reload-pulse 1.6s ease-in-out infinite; }
@keyframes dv-reload-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .dv-service.is-reloading .dot { animation: none; } }
.dv-service span { overflow: hidden; text-overflow: ellipsis; }

.dv-row {
  position: relative; display: flex; align-items: center; height: 50px; margin-top: 12px;
  background: var(--recess); border: 1px solid var(--plate-edge); border-radius: 10px;
}
.dv-plate.is-phone .dv-row { height: 58px; border-radius: 12px; }
.dv-row-who {
  flex: 6; min-width: 0; height: 100%; display: flex; align-items: center; gap: 10px;
  padding: 0 6px 0 14px; border: 0; background: none; text-align: left; cursor: default; color: var(--ink);
}
.dv-row-who[data-picks] { cursor: pointer; }
.dv-row-who svg { flex: none; color: var(--clay); }
.dv-row-name { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.dv-row-name b { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 2px; }
.dv-row-name b .chev { color: var(--muted); flex: none; }
.dv-row-name small { font-family: var(--mono); font-size: 12.5px; color: var(--ink2); letter-spacing: .4px; }
.dv-row-sep { width: 1px; height: 26px; background: var(--plate-edge); flex: none; }
.dv-row-edit {
  flex: 7; min-width: 0; height: 100%; display: flex; align-items: center; gap: 8px;
  padding: 0 12px 0 10px; border: 0; background: none; cursor: pointer;
}
.dv-row-edit .num { flex: 1; min-width: 0; text-align: left; font-family: var(--mono); font-size: 13.5px; color: var(--ink2); letter-spacing: .4px; white-space: nowrap; overflow: hidden; }
.dv-row-edit .edit, .dv-edit { color: var(--clay); font-size: 15px; font-weight: 500; }
.dv-plate.is-phone .dv-row-edit { flex: none; padding: 0 12px; }
.dv-net {
  flex: none; margin-left: 10px; padding: 6px 12px; background: var(--surface);
  border: 1px solid var(--plate-edge); border-radius: 999px; font-size: 14.5px; font-weight: 500;
}
.dv-rise { animation: dv-rise 260ms var(--settle); }
@keyframes dv-rise { from { opacity: 0; transform: translateY(6%); } }

/* Recent numbers / your meters. */
.dv-menu {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20; min-width: min(100%, 320px); max-width: 360px;
  padding: 6px 0; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 14px 30px rgba(23,28,26,.25); animation: dv-rise 180ms var(--settle);
}
.dv-menu .dv-label { display: block; padding: 6px 16px; color: var(--muted); }
.dv-menu button {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 58px; padding: 0 16px;
  border: 0; background: none; text-align: left; cursor: pointer;
}
.dv-menu button:hover, .dv-menu button:focus-visible { background: var(--recess); outline: none; }
.dv-av { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: #EBD3C8; color: var(--ink2); font-size: 13px; font-weight: 600; }
.dv-menu .who { flex: 1; min-width: 0; }
.dv-menu .who b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-menu .who small { font-family: var(--mono); font-size: 12.5px; color: var(--muted); letter-spacing: .4px; }
.dv-menu .tick { color: var(--clay); flex: none; }

/* ---- The display ---------------------------------------------------------- */
.dv-lcd {
  margin-top: 14px; padding: 9px; border-radius: 16px;
  background: linear-gradient(to bottom, var(--bezel-top), var(--bezel-bottom));
  box-shadow: 0 3px 6px rgba(0,0,0,.25);
}
.dv-glass {
  position: relative; padding: 10px 14px; border-radius: 8px; border: 1px solid var(--lcd-edge);
  background: linear-gradient(to bottom, var(--lcd-top), var(--lcd-bottom));
  color: var(--lcd-ink); font-family: var(--mono); font-weight: 500; letter-spacing: .8px;
  transition: box-shadow 520ms ease-out;
}
.dv-glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to bottom, var(--lcd-lit-top), var(--lcd-lit-bottom));
  opacity: 0; transition: opacity 520ms ease-out;
}
.dv-glass.is-lit { box-shadow: 0 0 14px 1px rgba(233,242,200,.4); transition-duration: 140ms; }
.dv-glass.is-lit::before { opacity: 1; transition-duration: 140ms; }
.dv-glass > * { position: relative; }
.dv-status { display: block; width: 100%; height: 13px; margin-bottom: 4px; color: var(--lcd-ink); }
.dv-status .off { opacity: .16; }
.dv-faces { position: relative; }
.dv-face { display: flex; flex-direction: column; }
.dv-face.is-out { position: absolute; inset: 0 0 auto 0; animation: dv-fade-out 240ms forwards; }
.dv-face.is-in { animation: dv-face-in 240ms var(--settle); }
@keyframes dv-fade-out { to { opacity: 0; } }
@keyframes dv-face-in { from { opacity: 0; transform: translateY(3%); } }
.dv-top { display: flex; gap: 8px; font-size: 13px; line-height: 1.3; white-space: pre; }
.dv-top .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dv-body { height: 62px; margin-top: 6px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.dv-rule { height: 1.2px; margin: 8px 0 6px; background: rgba(35,43,30,.55); }
.dv-foot { position: relative; height: 34px; }
.dv-line { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; }
.dv-line.is-out { animation: dv-fade-out 220ms forwards; }
.dv-line.is-in { animation: dv-line-in 220ms var(--settle); }
@keyframes dv-line-in { from { opacity: 0; transform: translateY(18%); } }
.dv-line .a { font-size: 12.5px; line-height: 15px; height: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-line .b { font-size: 11px; line-height: 13.2px; height: 13.2px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-blink { animation: dv-blink 1.1s ease-in-out infinite alternate; }
@keyframes dv-blink { from { opacity: 1; } to { opacity: .25; } }
.dv-cursor { animation: dv-cursor 1.1s steps(1) infinite; }
@keyframes dv-cursor { 50% { opacity: .25; } }

.dv-seg { display: block; width: 100%; }
.dv-seg .lit { fill: var(--lcd-ink); }
.dv-seg .ghost { fill: rgba(35,43,30,.08); }
.dv-seg.is-faint .lit { fill: rgba(35,43,30,.32); }

.dv-term { align-self: stretch; font-size: 12.5px; line-height: 1.35; white-space: pre; overflow: hidden; }
.dv-term div { overflow: hidden; }
.dv-term div:not(:last-child) { opacity: .62; }

.dv-mark { display: flex; align-items: center; justify-content: center; gap: 14px; }
.dv-mark svg { width: 38px; height: 38px; }
.dv-mark path { fill: none; stroke: var(--lcd-ink); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100; animation: dv-draw 420ms var(--settle) forwards; }
.dv-mark path + path { animation-delay: 210ms; }
.dv-mark span { font-size: 30px; font-weight: 600; letter-spacing: 4px; opacity: 0; animation: dv-show 260ms 80ms forwards; }
@keyframes dv-draw { to { stroke-dashoffset: 0; } }
@keyframes dv-show { to { opacity: 1; } }
.dv-big { font-size: 44px; font-weight: 600; letter-spacing: 6px; line-height: 1; }
.dv-count { display: flex; align-items: center; width: 100%; }
.dv-count .l { flex: 1; }
.dv-count small { display: block; font-size: 11px; opacity: .72; }
.dv-count b { font-size: 34px; font-weight: 600; letter-spacing: 3px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dv-token { width: 100%; display: flex; flex-direction: column; gap: 6px; }

/* A refused purchase: the display jolts, side to side and settling. */
.dv-lcd.is-shaking { animation: dv-shake 520ms; }
@keyframes dv-shake {
  0%, 100% { transform: none; } 8% { transform: translateX(-8px); } 25% { transform: translateX(7px); }
  42% { transform: translateX(-5px); } 58% { transform: translateX(4px); } 75% { transform: translateX(-2px); } 92% { transform: translateX(1px); }
}

/* ZESA is down: the small fault screen under the display. */
.dv-outage { margin-top: 12px; padding: 5px; border-radius: 12px;
  background: linear-gradient(to bottom, var(--bezel-top), var(--bezel-bottom)); box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.dv-outage > div { display: flex; gap: 12px; align-items: flex-start; padding: 9px 4px 10px 12px;
  background: #1D1F1B; border: 1px solid #34372F; border-radius: 8px; }
.dv-outage b { display: block; font-family: var(--mono); font-size: 12.5px; font-weight: 600; color: #F2B33D; }
.dv-outage p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: #E9E4D9; }
.dv-outage .x { margin-left: auto; border: 0; background: none; color: #B98B3A; cursor: pointer; padding: 4px 8px; font-size: 18px; line-height: 1; }

/* We are reloading: the same screen, with a way to be told when it is back. */
.dv-stock > div { padding-right: 12px; }
.dv-stock > div > div:last-child { flex: 1; min-width: 0; }
.dv-stock .ok { color: #B9D6A8; }
.dv-stock-form { display: flex; gap: 6px; margin-top: 8px; }
.dv-stock-form input { flex: 1; min-width: 0; font: inherit; font-size: 13px; padding: 6px 8px; border-radius: 6px;
  border: 1px solid #34372F; background: transparent; color: #E9E4D9; }
.dv-stock-form input::placeholder { color: #8A8F86; }
.dv-stock-form .tell { font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 10px; border-radius: 6px; border: 0;
  background: #F2B33D; color: #1D1F1B; cursor: pointer; white-space: nowrap; }
.dv-stock-form .tell:disabled { opacity: .55; cursor: default; }
.dv-cap:disabled { opacity: .35; cursor: default; }

/* ---- Keys ---------------------------------------------------------------------- */
.dv-controls { margin-top: 12px; }
.dv-reveal { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 340ms var(--settle), opacity 280ms; }
.dv-reveal > div { min-height: 0; overflow: hidden; }
.dv-reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.dv-reveal.is-open > div { overflow: visible; }
.dv-caps { display: flex; gap: 10px; padding-bottom: 8px; }
.dv-keys { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 10px; row-gap: 8px; }

.dv-key {
  position: relative; height: 40px; margin-bottom: 3px; padding: 0; min-width: 0;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  background: linear-gradient(to bottom, var(--key-top), var(--key-bottom));
  border: 1px solid var(--key-edge); border-radius: 10px; color: var(--key-ink);
  box-shadow: 0 3px 0 var(--key-edge), 0 4px 4px rgba(0,0,0,.2);
  font-size: 24px; font-weight: 600; line-height: 1; cursor: pointer; user-select: none; -webkit-user-select: none;
  touch-action: manipulation; transition: transform 70ms, box-shadow 70ms, margin 70ms;
}
.dv-key small { font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .8px; opacity: .72; }
.dv-key.is-word { font-size: 17px; }
.dv-key.is-back { background: linear-gradient(to bottom, var(--clay-top), var(--clay)); border-color: var(--clay-edge); color: #fff;
  box-shadow: 0 3px 0 var(--clay-edge), 0 4px 4px rgba(0,0,0,.2); }
.dv-key:active, .dv-key.is-down { transform: translateY(3px); box-shadow: 0 0 0 var(--key-edge); }
.dv-key.is-back:active, .dv-key.is-back.is-down { box-shadow: none; }
.dv-key:focus-visible, .dv-cap:focus-visible, .dv-go:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }

.dv-cap {
  flex: 1; min-width: 0; height: 36px; margin-bottom: 2px; padding: 0 6px;
  background: linear-gradient(to bottom, var(--cap-top), var(--cap-bottom));
  border: 1px solid var(--plate-edge); border-radius: 8px; box-shadow: 0 2px 0 var(--cap-shadow);
  font-family: var(--mono); font-size: 15.5px; font-weight: 600; color: var(--ink); cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dv-cap[aria-pressed="true"] {
  background: linear-gradient(to bottom, var(--clay-top), var(--clay)); border-color: var(--clay-edge);
  box-shadow: 0 2px 0 var(--clay-edge); color: #fff;
}
.dv-cap:disabled { opacity: .55; cursor: default; }
.dv-cap:active:not(:disabled) { transform: translateY(2px); box-shadow: none; }

/* When. */
.dv-divider { height: 1px; background: var(--plate-edge); margin-top: 4px; }
.dv-when { display: flex; align-items: center; margin-top: 12px; }
.dv-when .dv-label { padding: 0 14px 0 6px; }
.dv-when-seg { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); height: 42px; padding: 4px;
  background: var(--recess); border: 1px solid var(--plate-edge); border-radius: 10px; }
.dv-when-seg button { display: flex; align-items: center; justify-content: center; gap: 6px; min-width: 0;
  border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 15px; cursor: pointer;
  white-space: nowrap; overflow: hidden; transition: background 160ms; }
.dv-when-seg button span { overflow: hidden; text-overflow: ellipsis; }
.dv-when-seg button[aria-pressed="true"] { background: var(--clay-soft); color: var(--clay); }

/* The device's big button. */
.dv-go-wrap { margin-top: 14px; }
.dv-go {
  display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 58px;
  border: 0; border-radius: 14px; background: var(--clay); color: #fff; cursor: pointer; overflow: hidden;
  box-shadow: 0 3px 0 var(--clay-edge); transition: background 240ms var(--settle), box-shadow 240ms var(--settle), transform 70ms;
}
.dv-go:disabled { background: rgba(180,67,31,.45); box-shadow: 0 3px 0 rgba(138,48,20,0); cursor: default; }
.dv-go:not(:disabled):active { transform: translateY(3px); box-shadow: none; }
.dv-go .in { display: flex; align-items: center; justify-content: center; gap: 10px; min-width: 0; }
.dv-go .in.is-in { animation: dv-go-in 240ms var(--settle); }
@keyframes dv-go-in { from { opacity: 0; transform: translateY(35%); } }
.dv-go b { font-family: var(--display); font-size: 21px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dv-hint { margin: 10px 0 0; text-align: center; font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.dv-hint.is-in { animation: dv-show 240ms; }

.dv-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dv-actions .dv-key { grid-column: 1 / -1; font-size: 17px; margin-top: 2px; }

/* ---- Rate Watch, under the meter ---------------------------------------------- */
.dv-nudge { margin-top: 14px; padding: .75rem .9rem; background: #FAFBF9; border-left: 3px solid #C6CAC1; border-radius: 0 9px 9px 0; }
.dv-nudge.is-good, .dv-nudge.is-info { border-left-color: var(--ink2); }
.dv-nudge.is-warn { border-left-color: #B27A15; }
.dv-nudge p { margin: 0; font-size: .9375rem; line-height: 1.5; color: #47514E; }
.dv-nudge b { color: var(--ink); }
.dv-nudge small { display: block; margin-top: .4rem; font-size: .8125rem; color: var(--muted); }
.dv-nudge button { margin-top: .5rem; padding: 6px 12px; border: 1px solid var(--clay); border-radius: 8px; background: none; color: var(--clay); font-weight: 600; cursor: pointer; }

.dv-test {
  margin-bottom: 12px; padding: .6rem .75rem; border-left: 3px solid #B27A15; border-radius: 0 9px 9px 0;
  background: rgba(178,122,21,.13); color: var(--warning);
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
}
.dv-foot-note { margin: 12px 0 0; text-align: center; font-size: 13px; color: var(--muted); }

/* ---- Sheets: the review, and picking a day ------------------------------------- */
.dv-scrim { position: fixed; inset: 0; z-index: 1000; background: rgba(22,27,32,.45); display: flex; align-items: flex-end; justify-content: center;
  animation: dv-show 200ms; }
.dv-scrim.is-closing { animation: dv-fade-out 200ms forwards; }
.dv-sheet {
  width: 100%; max-width: 480px; max-height: 92vh; overflow-y: auto; padding: 10px 20px 22px;
  background: #F2F3F0; border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(0,0,0,.2);
  font-family: var(--ui); color: var(--ink); animation: dv-sheet-in 280ms var(--settle);
}
.dv-scrim.is-closing .dv-sheet { animation: dv-sheet-out 200ms forwards; }
@keyframes dv-sheet-in { from { transform: translateY(100%); } }
@keyframes dv-sheet-out { to { transform: translateY(100%); } }
@media (min-width: 640px) {
  .dv-scrim { align-items: center; }
  .dv-sheet { border-radius: 22px; }
  @keyframes dv-sheet-in { from { transform: translateY(24px); opacity: 0; } }
  @keyframes dv-sheet-out { to { transform: translateY(24px); opacity: 0; } }
}
.dv-grab { width: 40px; height: 4px; margin: 0 auto 14px; border-radius: 2px; background: #C6CAC1; }
.dv-sheet .dv-label { color: var(--muted); display: block; margin-bottom: 14px; }
.dv-summary { padding: 18px; border-radius: 14px; background: var(--night); color: var(--night-text); }
.dv-summary .dv-label { color: var(--night-muted); }
.dv-summary .r { display: flex; gap: 12px; margin-bottom: 8px; font-size: 13.5px; }
.dv-summary .r span { width: 74px; flex: none; color: var(--night-muted); }
.dv-summary .r b { flex: 1; text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.dv-summary hr { border: 0; border-top: 1px solid rgba(242,243,240,.13); margin: 14px 0; }
.dv-summary .total { display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 600; }
.dv-summary .total b { font-family: var(--mono); font-size: 22px; }
.dv-summary p { margin: 10px 0 0; font-size: 12.5px; color: var(--night-muted); }
.dv-field { display: block; margin-top: 18px; }
.dv-field > span { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--ink); }
.dv-field > span small { font-weight: 400; color: var(--muted); }
.dv-field input, .dv-field textarea {
  width: 100%; padding: 12px 14px; border: 1px solid #C6CAC1; border-radius: 10px; background: #fff;
  font: inherit; font-size: 16px; color: var(--ink);
}
.dv-field input[type="tel"] { font-family: var(--mono); letter-spacing: .04em; }
.dv-field textarea { resize: vertical; min-height: 64px; }
.dv-field input:focus, .dv-field textarea:focus { outline: 2px solid var(--clay); outline-offset: 1px; border-color: var(--clay); }
.dv-err { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid #97213B; border-radius: 0 8px 8px 0; background: rgba(151,33,59,.08); color: #97213B; font-size: 14px; }
.dv-pay { margin-top: 18px; }
.dv-pay .dv-go b { font-size: 20px; }
.dv-sheet .dv-hint { margin-top: 8px; }
.dv-day { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 10px; }
.dv-day .dv-field { margin-top: 0; }

@media (max-width: 380px) {
  .dv-lip { padding: 16px 16px; }
  .dv-plate.is-phone .dv-lip { padding: 34px 14px 16px; }
  .dv-keys { column-gap: 8px; }
  .dv-caps { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .dv *, .dv *::before, .dv *::after, .dv-scrim, .dv-sheet { animation-duration: .001ms !important; transition-duration: .001ms !important; }
  .dv-blink, .dv-cursor { animation: none !important; }
}

/* After Pesepay: the device above the receipt. */
.dv-status-device { margin: 0 auto 2.5rem; }
#receipt { scroll-margin-top: 90px; }
.dv-body > .dv-term { align-self: flex-start; width: 100%; }
.dv-row-who { flex: 1 1 auto; }
.dv-row-edit { flex: 0 1 auto; }
.dv-row-edit .num { flex: 0 1 auto; }

/* The keyboard works the keys: a tag on the device's top-left corner. */
.dv-kbd {
  position: absolute; top: -12px; left: 18px; z-index: 3;
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px;
  background: var(--ink2); color: #F2F3F0; border-radius: 999px;
  box-shadow: 0 3px 8px rgba(23,28,26,.22);
  font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  animation: dv-rise 400ms var(--settle) 300ms both;
}
.dv-kbd small { font-family: var(--mono); font-size: 10px; font-weight: 500; letter-spacing: .06em; opacity: .7; padding-left: 6px; border-left: 1px solid rgba(242,243,240,.25); }
.dv-plate.is-phone .dv-kbd { left: 26px; }

/* Sheets: the page behind is blurred, not blacked out, so the eye goes to
   the sheet. Under the dashboard's own modals (the PIN prompt is one). */
.dv-scrim {
  z-index: 55;
  background: rgba(242, 243, 240, .38);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  backdrop-filter: blur(10px) saturate(1.05);
}
.dv-sheet { box-shadow: 0 -2px 24px rgba(23,28,26,.10), 0 0 0 1px rgba(23,28,26,.06); }
@media (min-width: 640px) { .dv-sheet { box-shadow: 0 18px 50px rgba(23,28,26,.14), 0 0 0 1px rgba(23,28,26,.06); } }

/* Paying with: Jusa Credit or the card. */
.dv-sheet .dv-method { height: 46px; }
.dv-sheet .dv-method button { font-size: 14px; }
.dv-sheet .dv-method button:disabled { opacity: .45; cursor: not-allowed; }

/* Called for from elsewhere on the page: the device nods. */
.dv-stage.is-called > .dv-plate { animation: dv-called 620ms var(--settle); }
@keyframes dv-called { 0% { transform: none; } 30% { transform: translateY(-6px) scale(1.012); } 100% { transform: none; } }
