/* ==========================================================================
   MyD Inventory System — stylesheet.
   One file for all three surfaces:
     .myd-root   → public inventory page + website embed
     body.myd-admin → admin app
     .myd-report → inventory report page
   Default palette: slate / taupe / cream + accent gold — retheme per dealer
   by editing the :root block below.
   ========================================================================== */

:root {
  --myd-ink: #22303a;
  --myd-slate: #4b636f;
  --myd-taupe: #857765;
  --myd-accent: #b8862f;
  --myd-accent-soft: #f2e3c3;
  --myd-paper: #fffaf3;
  --myd-card: #ffffff;
  --myd-line: #e2ded6;
  --myd-line-soft: #efece6;
  --myd-muted: #6b7b85;
  --myd-sold: #b91c1c;
  --myd-ok: #2f7d4f;
  --myd-radius: 14px;
  --myd-shadow: 0 1px 2px rgba(34, 48, 58, .06), 0 10px 26px -18px rgba(34, 48, 58, .45);
  --myd-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ------------------------------------------------------------------ shared */

[hidden] { display: none !important; }   /* wins over any display: rule below */

.myd-root *,
.myd-admin *,
.myd-report * { box-sizing: border-box; }

.myd-root,
.myd-report {
  font-family: var(--myd-font);
  color: var(--myd-ink);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
}

.myd-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--myd-taupe);
}

.myd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 999px;
  border: 1px solid var(--myd-line);
  background: var(--myd-card);
  color: var(--myd-ink);
  font: 600 14px/1 var(--myd-font);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.myd-btn:hover { transform: translateY(-1px); box-shadow: var(--myd-shadow); }
.myd-btn:active { transform: translateY(0); }
.myd-btn--primary { background: var(--myd-ink); border-color: var(--myd-ink); color: #fff; }
.myd-btn--accent { background: var(--myd-accent); border-color: var(--myd-accent); color: #fff; }
.myd-btn--ghost { background: transparent; }
.myd-btn--danger { color: var(--myd-sold); border-color: #e8c9c9; background: #fff7f7; }
.myd-btn--sm { padding: 7px 12px; font-size: 13px; }
.myd-btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

.myd-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 700 11px/1.6 var(--myd-font);
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.myd-badge--sold {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--myd-sold);
  box-shadow: 0 2px 8px -3px rgba(185, 28, 28, .7);
}
.myd-badge--sold::after {           /* signature slow sheen — reads "just sold" */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: myd-sheen 5.5s ease-in-out infinite;
}
@keyframes myd-sheen {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}
.myd-badge--avail { color: var(--myd-ok); background: #e8f4ec; }
.myd-badge--count { color: var(--myd-slate); background: #eef2f4; }

.myd-empty {
  padding: 40px 24px;
  text-align: center;
  color: var(--myd-muted);
  background: var(--myd-card);
  border: 1px dashed var(--myd-line);
  border-radius: var(--myd-radius);
}

/* =========================================================== public / embed */

.myd-root {
  max-width: 1120px;
  margin: 0 auto;
}
.myd-root--embed { padding: 0; }

.myd-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 14px 22px;
  margin: 0 0 18px;
}
.myd-head__title {
  margin: 0;
  font-size: clamp(24px, 3.6vw, 34px);
  font-weight: 300;
  letter-spacing: -.01em;
}
.myd-head__title b { font-weight: 700; }
.myd-head__sub { margin: 4px 0 0; color: var(--myd-muted); font-size: 14px; }
.myd-head__filters { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.myd-fchip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--myd-line);
  background: var(--myd-card);
  font: 600 13px var(--myd-font);
  color: var(--myd-slate);
  cursor: pointer;
}
.myd-fchip[aria-pressed="true"] { background: var(--myd-ink); border-color: var(--myd-ink); color: #fff; }

.myd-card-shell {
  position: relative;
  background: var(--myd-card);
  border: 1px solid var(--myd-line);
  border-radius: var(--myd-radius);
  box-shadow: var(--myd-shadow);
  overflow: hidden;
}
.myd-card-shell::before {           /* signature lot-light sweep across the top */
  content: "";
  position: absolute;
  top: 0; left: -30%;
  width: 30%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--myd-accent), transparent);
  animation: myd-sweep 9s ease-in-out infinite;
}
@keyframes myd-sweep { 0%, 70% { left: -30%; } 100% { left: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .myd-card-shell::before, .myd-badge--sold::after, .myd-bar i::after { animation: none; }
}

.myd-table { width: 100%; border-collapse: collapse; }
.myd-table th {
  text-align: left;
  padding: 12px 16px;
  font: 700 11px/1.4 var(--myd-font);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--myd-taupe);
  background: #fbf9f5;
  border-bottom: 1px solid var(--myd-line);
  white-space: nowrap;
}
.myd-table th[data-sort] { cursor: pointer; user-select: none; }
.myd-table th[data-sort]:hover { color: var(--myd-ink); }
.myd-table th .myd-arrow { opacity: .35; margin-left: 5px; font-size: 10px; }
.myd-table th[aria-sort] { color: var(--myd-ink); }
.myd-table th[aria-sort] .myd-arrow { opacity: 1; color: var(--myd-accent); }
.myd-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--myd-line-soft);
  vertical-align: middle;
  font-size: 15px;
}
.myd-table tbody tr { transition: background .18s ease; }
.myd-table tbody tr:hover { background: #fdfbf7; }
.myd-table tbody tr.is-sold { background: #fcfafa; }
.myd-table tbody tr.is-sold .myd-veh-title,
.myd-table tbody tr.is-sold .myd-price { color: var(--myd-muted); }
.myd-table th.cell-photo { width: 166px; }
.myd-table th.cell-year { width: 96px; }
.myd-table th.cell-price { width: 172px; }
.myd-table th.cell-action { width: 168px; }
/* the public table is a centred showcase — every column lines up down the middle */
.myd-root .myd-table th, .myd-root .myd-table td { text-align: center; }
.myd-thumb {
  width: 135px;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  background: #eee;
  display: block;
  margin: 0 auto;
  border: 1px solid var(--myd-line);
}
.myd-thumb--none {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--myd-muted);
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}
.myd-year { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; }
.myd-veh-title { font-weight: 600; }
.myd-veh-make { display: block; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--myd-taupe); }
.myd-price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.myd-price--call { font-weight: 600; color: var(--myd-slate); font-size: 14px; }
.myd-rowlink {
  border: 0;
  background: none;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--myd-slate);
  font: 600 14px var(--myd-font);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(75, 99, 111, .35);
  text-underline-offset: 3px;
  transition: background .18s ease, color .18s ease, text-decoration-color .18s ease;
}
.myd-rowlink:hover, .myd-rowlink:focus-visible {
  background: var(--myd-taupe);      /* hover brown — the theme's medium accent */
  color: #fff;
  text-decoration-color: transparent;
  outline: 0;
}
.myd-photo-count { font-size: 12px; color: var(--myd-muted); white-space: nowrap; }
.myd-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  padding: 14px 18px;
  background: #fbf9f5;
  border-top: 1px solid var(--myd-line);
  font-size: 13px;
  color: var(--myd-muted);
}
.myd-foot b { color: var(--myd-ink); }

/* mobile: the table becomes cards */
@media (max-width: 760px) {
  .myd-table thead { display: none; }
  .myd-table, .myd-table tbody, .myd-table tr, .myd-table td { display: block; width: 100%; }
  .myd-table tbody tr {
    border-bottom: 1px solid var(--myd-line-soft);
    padding: 14px 16px 16px;
    position: relative;
  }
  .myd-table tbody tr:last-child { border-bottom: 0; }
  .myd-table td { border: 0; padding: 0; }
  .myd-table td + td { margin-top: 6px; }
  .myd-table td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 74px;
    font: 700 10px/1.6 var(--myd-font);
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--myd-taupe);
  }
  .myd-table td.cell-photo { margin: 0 0 12px; }
  .myd-thumb { width: 100%; height: 238px; border-radius: 12px; }
  .myd-table td.cell-photo::before { display: none; }
  .myd-table td.cell-year::before, .myd-table td.cell-action::before,
  .myd-table td.cell-veh::before, .myd-table td.cell-price::before { display: none; }
  .myd-table td.cell-year { font-size: 13px; color: var(--myd-taupe); letter-spacing: .08em; }
  .myd-table td.cell-veh { font-size: 19px; }
  .myd-table td.cell-action { margin-top: 12px; }
}

/* ---------------------------------------------------------------- gallery */

.myd-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 26, 32, .78);
  backdrop-filter: blur(3px);
  animation: myd-fade .18s ease;
}
@keyframes myd-fade { from { opacity: 0; } to { opacity: 1; } }
.myd-modal__box {
  position: relative;
  width: min(1080px, 100%);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  background: var(--myd-card);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .7);
  animation: myd-pop .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes myd-pop { from { transform: scale(.96) translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.myd-modal__top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--myd-line);
}
.myd-modal__title { margin: 0; font-size: 19px; font-weight: 700; line-height: 1.25; }
.myd-modal__meta { margin: 5px 0 0; font-size: 13px; color: var(--myd-muted); display: flex; gap: 12px; flex-wrap: wrap; }
.myd-modal__price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.myd-modal__close {
  margin-left: auto;
  border: 0;
  background: var(--myd-taupe);
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  flex: none;
  transition: background .18s ease, color .18s ease;
}
/* This widget lives inside other people's themes (WordPress/Elementor), and their
   button hover/focus paint must not win on our controls. The close button gets
   keyboard focus when the gallery opens, which is exactly when theirs fired. */
.myd-modal .myd-modal__close,
.myd-modal .myd-modal__close:hover,
.myd-modal .myd-modal__close:focus,
.myd-modal .myd-modal__close:focus-visible {
  background: var(--myd-taupe) !important;
  color: #fff !important;
}
.myd-modal .myd-modal__close:hover { background: #6f6152 !important; }
.myd-modal .myd-modal__close:focus-visible { outline: 2px solid var(--myd-taupe); outline-offset: 2px; }
.myd-modal .myd-nav,
.myd-modal .myd-nav:hover,
.myd-modal .myd-nav:focus,
.myd-modal .myd-nav:focus-visible {
  background: rgba(255, 255, 255, .88) !important;
  color: var(--myd-ink) !important;
}
.myd-modal .myd-nav:hover { background: #fff !important; }
.myd-modal__stage {
  position: relative;
  background: #14181b;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  flex: 1 1 auto;
  overflow: hidden;
}
.myd-modal__stage img { max-width: 100%; max-height: 62vh; display: block; object-fit: contain; }
.myd-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .88);
  font-size: 20px;
  cursor: pointer;
  color: var(--myd-ink);
}
.myd-nav:hover { background: #fff; }
.myd-nav--prev { left: 12px; }
.myd-nav--next { right: 12px; }
.myd-nav[disabled] { opacity: .25; cursor: default; }
.myd-counter {
  position: absolute;
  right: 12px; top: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  font: 600 12px var(--myd-font);
}
.myd-strip {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  overflow-x: auto;
  background: #fbf9f5;
  border-top: 1px solid var(--myd-line);
}
.myd-strip img {
  width: 92px; height: 62px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 2px solid transparent;
  flex: none;
  opacity: .72;
  transition: opacity .15s ease, border-color .15s ease;
}
.myd-strip img:hover { opacity: 1; }
.myd-strip img[aria-current="true"] { border-color: var(--myd-accent); opacity: 1; }
.myd-modal__desc {
  padding: 14px 18px 18px;
  font-size: 14.5px;
  color: #3c4a54;
  white-space: pre-line;
  overflow-y: auto;
  max-height: 30vh;
  border-top: 1px solid var(--myd-line-soft);
}
@media (max-width: 760px) {
  .myd-modal { padding: 0; align-items: flex-end; }
  .myd-modal__box { max-height: 100vh; border-radius: 16px 16px 0 0; height: 100%; }
  .myd-modal__stage img { max-height: 46vh; }
  .myd-modal__desc { max-height: 22vh; }
  .myd-modal__price { font-size: 17px; }
}

/* ============================================================== admin app */

.myd-admin {
  margin: 0;
  background: var(--myd-paper);
  color: var(--myd-ink);
  font-family: var(--myd-font);
  min-height: 100vh;
}
.myd-top {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  background: rgba(255, 250, 243, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--myd-line);
}
.myd-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: 16px;
}
.myd-logo span {
  width: 30px; height: 30px;
  border-radius: 9px;
  background: var(--myd-ink);
  color: var(--myd-accent);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.myd-top__links { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.myd-top__links a { color: var(--myd-slate); text-decoration: none; font-size: 13px; font-weight: 600; padding: 7px 10px; border-radius: 999px; transition: background .18s ease, color .18s ease; }
.myd-top__links a:hover { background: var(--myd-taupe); color: #fff; }

.myd-wrap { max-width: 1180px; margin: 0 auto; padding: 22px 18px 120px; }
.myd-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.myd-tab {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--myd-line);
  background: var(--myd-card);
  font: 600 14px var(--myd-font);
  color: var(--myd-slate);
  cursor: pointer;
}
.myd-tab[aria-selected="true"] { background: var(--myd-ink); border-color: var(--myd-ink); color: #fff; }
.myd-panel { display: none; }
.myd-panel.is-active { display: block; }

.myd-card {
  background: var(--myd-card);
  border: 1px solid var(--myd-line);
  border-radius: var(--myd-radius);
  box-shadow: var(--myd-shadow);
  padding: 22px;
  margin-bottom: 20px;
}
.myd-card__head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.myd-card__head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.myd-help { margin: 6px 0 0; font-size: 13px; color: var(--myd-muted); }

.myd-field { margin-bottom: 18px; }
.myd-field > label { display: block; margin-bottom: 7px; font: 700 12px var(--myd-font); letter-spacing: .09em; text-transform: uppercase; color: var(--myd-taupe); }
.myd-input, .myd-textarea, .myd-select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--myd-line);
  border-radius: 10px;
  font: 400 16px var(--myd-font);
  color: var(--myd-ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.myd-input:focus, .myd-textarea:focus, .myd-select:focus {
  outline: 0;
  border-color: var(--myd-slate);
  box-shadow: 0 0 0 3px rgba(75, 99, 111, .13);
}
.myd-textarea { min-height: 120px; resize: vertical; line-height: 1.55; }
.myd-grid2 { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; }
@media (max-width: 700px) { .myd-grid2 { grid-template-columns: 1fr; } }
.myd-parse {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  min-height: 26px;
  align-items: center;
}
.myd-parse i {
  font-style: normal;
  font: 700 12px var(--myd-font);
  padding: 4px 10px;
  border-radius: 999px;
  background: #eef2f4;
  color: var(--myd-slate);
}
.myd-parse i.myd-pyr { background: var(--myd-accent-soft); color: #7a5a12; }
.myd-parse em { font-style: normal; font-size: 12.5px; color: var(--myd-muted); }

.myd-drop {
  border: 2px dashed var(--myd-line);
  border-radius: var(--myd-radius);
  padding: 26px 18px;
  text-align: center;
  background: #fdfbf7;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease;
}
.myd-drop:hover, .myd-drop.is-over { border-color: var(--myd-accent); background: #fffdf7; }
.myd-drop b { display: block; font-size: 15px; margin-bottom: 4px; }
.myd-drop span { font-size: 13px; color: var(--myd-muted); }

.myd-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-top: 16px; }
.myd-tile {
  position: relative;
  border: 1px solid var(--myd-line);
  border-radius: 12px;
  overflow: hidden;
  background: #f7f5f1;
  aspect-ratio: 4 / 3;
}
.myd-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.myd-tile__bar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(15, 22, 28, .85));
  color: #fff;
  font: 600 11px var(--myd-font);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}
.myd-tile__x, .myd-tile__star {
  position: absolute;
  top: 7px;
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  line-height: 1;
  background: rgba(255, 255, 255, .92);
  color: var(--myd-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, .18);
}
.myd-tile__x { right: 7px; }
.myd-tile__star { left: 7px; font-size: 15px; }
.myd-tile__star[aria-pressed="true"] { background: var(--myd-accent); color: #fff; }
.myd-tile.is-profile { outline: 2px solid var(--myd-accent); outline-offset: -2px; }
.myd-tile.is-error { outline: 2px solid var(--myd-sold); outline-offset: -2px; }
.myd-tile.is-error .myd-tile__bar { background: linear-gradient(transparent, rgba(120, 20, 20, .9)); }
.myd-tile__prog {
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: rgba(255, 255, 255, .35);
}
.myd-tile__prog i { display: block; height: 100%; width: 0; background: var(--myd-accent); transition: width .2s ease; }
.myd-tile--local img { filter: saturate(1); }
.myd-tile__tag {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(15, 22, 28, .78);
  color: #fff;
  font: 700 10px var(--myd-font);
  letter-spacing: .07em;
  text-transform: uppercase;
}

.myd-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.myd-actions__note { margin-left: auto; font-size: 13px; color: var(--myd-muted); }

/* admin inventory table */
.myd-admin .myd-table th { background: #fbf9f5; }
.myd-admin .myd-table td { font-size: 14px; }
.myd-admin .myd-table .myd-thumb { width: 84px; height: 58px; }
.myd-rowactions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.myd-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.myd-filters .myd-input { max-width: 260px; }
.myd-count-note { font-size: 13px; color: var(--myd-muted); margin-left: auto; }

/* ------------------------------------------------------ background queue */

.myd-queue {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  width: min(380px, calc(100vw - 36px));
  background: var(--myd-ink);
  color: #eef2f4;
  border-radius: 16px;
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  overflow: hidden;
  font-size: 13.5px;
}
.myd-queue__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  cursor: pointer;
  background: rgba(255, 255, 255, .05);
}
.myd-queue__head b { font-size: 13.5px; }
.myd-queue__head .myd-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--myd-accent);
  flex: none;
  animation: myd-pulse 1.6s ease-in-out infinite;
}
@keyframes myd-pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.8); } }
.myd-queue.is-idle .myd-dot { background: var(--myd-ok); animation: none; }
.myd-queue.is-idle { background: #1f2c35; }
.myd-queue__body { padding: 4px 14px 14px; display: none; max-height: 46vh; overflow-y: auto; }
.myd-queue.is-open .myd-queue__body { display: block; }
.myd-queue__item { padding: 11px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.myd-queue__item:first-child { border-top: 0; }
.myd-queue__name { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.myd-queue__sub { color: #9fb1bd; font-size: 12px; margin-top: 3px; }
.myd-queue__err { color: #ffb4b4; font-size: 12px; margin-top: 4px; display: flex; gap: 8px; align-items: center; }
.myd-queue__err button {
  background: #fff; color: var(--myd-ink); border: 0; border-radius: 6px;
  font: 700 11px var(--myd-font); padding: 3px 8px; cursor: pointer;
}
.myd-bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .16); margin-top: 8px; overflow: hidden; position: relative; }
.myd-bar i { display: block; height: 100%; background: var(--myd-accent); width: 0; transition: width .25s ease; position: relative; overflow: hidden; }
.myd-bar i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: translateX(-100%);
  animation: myd-shimmer 1.6s linear infinite;
}
@keyframes myd-shimmer { to { transform: translateX(100%); } }
.myd-queue__foot { padding: 10px 14px 14px; border-top: 1px solid rgba(255, 255, 255, .1); }
.myd-queue__foot a { color: #cfe0ea; font-size: 12.5px; }

.myd-toast-wrap {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 70;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.myd-toast {
  padding: 11px 18px;
  border-radius: 999px;
  background: var(--myd-ink);
  color: #fff;
  font: 600 14px var(--myd-font);
  box-shadow: var(--myd-shadow);
  animation: myd-pop .2s ease;
}
.myd-toast--err { background: var(--myd-sold); }
.myd-toast--ok { background: var(--myd-ok); }

/* login */
.myd-login { max-width: 380px; margin: 8vh auto; }
.myd-login .myd-card { padding: 28px; }

/* ================================================================ report */

.myd-report { background: var(--myd-paper); min-height: 100vh; }
.myd-report__wrap { max-width: 1180px; margin: 0 auto; padding: 26px 18px 60px; }
.myd-report__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--myd-ink);
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.myd-report__top .myd-badge-logo {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: var(--myd-ink);
  color: var(--myd-accent);
  display: grid;
  place-items: center;
  font: 800 20px var(--myd-font);
}
.myd-report__top h1 { margin: 0; font-size: clamp(20px, 2.6vw, 27px); font-weight: 700; letter-spacing: -.01em; }
.myd-report__top p { margin: 3px 0 0; font-size: 13.5px; color: var(--myd-muted); }
.myd-report__top .myd-right { margin-left: auto; text-align: right; font-size: 13px; color: var(--myd-muted); }
.myd-report__sec { margin: 30px 0 12px; display: flex; align-items: baseline; gap: 12px; }
.myd-report__sec h2 { margin: 0; font-size: 19px; font-weight: 700; }
.myd-report__sec span { font-size: 13px; color: var(--myd-muted); }
.myd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.myd-kpi {
  background: var(--myd-card);
  border: 1px solid var(--myd-line);
  border-radius: var(--myd-radius);
  padding: 18px;
  box-shadow: var(--myd-shadow);
}
.myd-kpi b { display: block; font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.myd-kpi span { display: block; font-size: 12px; letter-spacing: .09em; text-transform: uppercase; color: var(--myd-taupe); font-weight: 700; margin-bottom: 8px; }
.myd-kpi em { font-style: normal; font-size: 12.5px; color: var(--myd-muted); }
.myd-kpi--accent b { color: var(--myd-accent); }
.myd-bars { background: var(--myd-card); border: 1px solid var(--myd-line); border-radius: var(--myd-radius); padding: 20px; box-shadow: var(--myd-shadow); }
.myd-bar-row { display: grid; grid-template-columns: 190px 1fr 128px; align-items: center; gap: 14px; padding: 9px 0; border-bottom: 1px solid var(--myd-line-soft); }
.myd-bar-row:last-child { border-bottom: 0; }
.myd-bar-row__name { font-weight: 600; font-size: 14.5px; }
.myd-bar-row__name i { font-style: normal; display: block; font-size: 12px; color: var(--myd-muted); font-weight: 400; }
.myd-bar-row__track { height: 12px; border-radius: 999px; background: #f1eee8; overflow: hidden; }
.myd-bar-row__track i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--myd-slate), var(--myd-accent)); }
.myd-bar-row__val { text-align: right; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.myd-bar-row__val b { display: block; }
.myd-report .myd-card { padding: 0; overflow: hidden; }
.myd-report .myd-table { font-size: 14px; }
@media (max-width: 700px) {
  .myd-bar-row { grid-template-columns: 1fr; gap: 6px; }
  .myd-bar-row__val { text-align: left; }
}
.myd-report__foot { margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--myd-line); font-size: 12.5px; color: var(--myd-muted); display: flex; gap: 14px; flex-wrap: wrap; }

@media print {
  .myd-noprint { display: none !important; }
  .myd-report, .myd-report__wrap { background: #fff; padding: 0; max-width: none; }
  .myd-kpi, .myd-bars, .myd-report .myd-card { box-shadow: none; break-inside: avoid; }
  .myd-report__sec { break-after: avoid; }
  .myd-table th { background: #f4f2ee !important; }
}
