/*
  HTML mockups of the real screens, in this page's black, white and red. Read-only references:
  tools/lib/manage-page.mjs (dashboard home, calendar), tools/lib/manage-data.mjs (the action lines),
  tools/review.mjs (the approval card). Every label is a real system string; every mockup is marked "המחשה".
  Grey bars stand in for text that would only be invented.
*/
.sk { display: block; block-size: 8px; border-radius: 6px; background: linear-gradient(90deg, rgb(255 255 255 / 0.13), rgb(255 255 255 / 0.05)); }
.sk + .sk { margin-block-start: 8px; }
.sk.w9 { inline-size: 92%; } .sk.w8 { inline-size: 80%; } .sk.w7 { inline-size: 70%; } .sk.w6 { inline-size: 60%; } .sk.w5 { inline-size: 50%; } .sk.w4 { inline-size: 40%; } .sk.w3 { inline-size: 30%; }

.state {
  display: inline-flex; align-items: center; gap: 6px; min-block-size: 30px; padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 0.8125rem; font-weight: 600; line-height: 1.2; white-space: nowrap; color: var(--ink);
  background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.16);
}
.state .icon { inline-size: 15px; block-size: 15px; }
.state--ok .icon { color: var(--white); }
.state--wait { color: var(--white); background: rgb(245 34 45 / 0.14); box-shadow: inset 0 0 0 1px rgb(255 74 61 / 0.6), 0 0 16px -4px rgb(245 34 45 / 0.6); }
.state--wait .icon { color: var(--red-text); }

/* ---------- Dashboard home: "N דברים מחכים לך" ---------- */
.dash { display: grid; grid-template-rows: auto 1fr; }
.dash-nav {
  display: flex; align-items: center; gap: clamp(12px, 2vw, 26px); padding: 14px 24px; overflow: hidden; white-space: nowrap;
  border-block-end: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-3);
}
/* The product's name in its own screens: the Socialux mark and the name in silver. */
.dash-brand { display: inline-flex; align-items: center; gap: 8px; direction: ltr; margin-inline-end: clamp(4px, 1.5vw, 18px); }
.dash-brand img { inline-size: 20px; block-size: auto; }
.dash-brand span {
  font-size: 0.9375rem; font-weight: 700; letter-spacing: 0.01em;
  background: var(--silver); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.dash-tab { position: relative; }
.dash-tab.is-on { color: var(--white); font-weight: 600; }
.dash-tab.is-on::after {
  content: ''; position: absolute; inset-inline: -6px; inset-block-end: -15px; block-size: 2px; border-radius: 2px;
  background: var(--red-hot); box-shadow: 0 0 12px var(--red-hot);
}
.dash-body { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 28px; padding: 28px 28px 32px; }
.dash-h { font-size: clamp(1.45rem, 1.05rem + 1.4vw, 2.3rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin-block-end: 20px; }
.acts { display: grid; gap: 10px; }
.act {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 4px 14px; align-items: start;
  padding: 16px 18px; border-radius: 16px; background: #0D0D10; box-shadow: inset 0 0 0 1px var(--line);
}
.act--first { background: linear-gradient(180deg, #19090B, #0D0D10); box-shadow: inset 0 0 0 1px rgb(255 74 61 / 0.5), 0 0 34px -14px rgb(245 34 45 / 0.8); }
.act-ic { color: var(--red-text); padding-block-start: 2px; }
.act-ic .icon { inline-size: 20px; block-size: 20px; }
.act b { display: block; font-weight: 600; font-size: 1rem; line-height: 1.4; }
.act-text p { color: var(--ink-3); font-size: 0.875rem; line-height: 1.5; }
.act-go {
  align-self: center; display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: var(--r-pill);
  font-size: 0.8125rem; font-weight: 600; white-space: nowrap; color: var(--ink); background: rgb(255 255 255 / 0.06); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.12);
}
.act-go .icon { inline-size: 13px; block-size: 13px; }
/* flat, no gloss: a picture of a button inside an illustration, so nobody reaches for it */
.act--first .act-go { color: var(--white); background: rgb(245 34 45 / 0.16); box-shadow: inset 0 0 0 1px rgb(255 74 61 / 0.7); }
.dash-perf { margin-block-start: 22px; padding: 16px 18px 6px; border-radius: 16px; background: #0B0B0E; box-shadow: inset 0 0 0 1px var(--line); }
.dash-perf-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-block-end: 8px; }
.dash-perf-h { font-weight: 700; font-size: 1rem; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.04); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.1); font-size: 0.75rem; color: var(--ink-3); }
.seg span { padding: 4px 10px; border-radius: var(--r-pill); white-space: nowrap; }
.seg .is-on { color: var(--black); background: var(--white); font-weight: 600; }
.dash-chart { display: block; inline-size: 100%; block-size: 92px; overflow: visible; filter: drop-shadow(0 0 8px rgb(255 74 61 / 0.55)); }
.dash-side { padding: 4px 4px 0; }
.dash-side-h { font-weight: 600; font-size: 0.9375rem; margin-block-end: 10px; }
.st { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; align-items: center; padding-block: 12px; border-block-end: 1px solid var(--line); font-size: 0.8125rem; }
.st .icon { inline-size: 15px; block-size: 15px; color: var(--ink-2); }
.st-name { color: var(--ink-2); }
.st-val { grid-column: 2; }
@media (max-width: 760px) {
  .dash-body { grid-template-columns: 1fr; padding: 20px 16px 22px; gap: 18px; }
  .dash-nav { padding: 12px 16px; gap: 14px; }
  .dash-nav .dash-tab:nth-of-type(n + 4) { display: none; }
  .dash-side { display: none; }
  .act { grid-template-columns: auto minmax(0, 1fr); padding: 14px; }
  .act-go { grid-column: 2; justify-self: start; margin-block-start: 6px; }
}

/* ---------- A drafted reply waiting for approval ---------- */
.reply { display: grid; gap: 12px; padding: 18px 18px 20px; }
.reply-head { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 0.9375rem; line-height: 1.35; }
.reply-head .icon { inline-size: 20px; block-size: 20px; color: var(--red-text); }
.bubble { display: grid; gap: 0; padding: 13px 14px; border-radius: 14px; }
.bubble--in { margin-inline-end: 20%; background: #111114; box-shadow: inset 0 0 0 1px var(--line); border-start-start-radius: 4px; }
.bubble--draft {
  margin-inline-start: 14%; background: linear-gradient(180deg, #1B0A0C, #0F0607); border-start-end-radius: 4px;
  box-shadow: inset 0 0 0 1px rgb(255 74 61 / 0.48), 0 12px 30px -16px rgb(245 34 45 / 0.9);
}
.bubble--draft .sk { background: linear-gradient(90deg, rgb(255 210 205 / 0.22), rgb(255 255 255 / 0.07)); }
.reply-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.reply-foot { color: var(--ink-3); font-size: 0.8125rem; line-height: 1.45; }

/* ---------- The approval screen ---------- */
.rv-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 10px 16px; flex-wrap: wrap;
  padding: 14px 22px; border-block-end: 1px solid var(--line); font-size: 0.875rem; color: var(--ink-3);
}
.rv-bar b { color: var(--white); font-weight: 600; }
.rv-card { display: grid; gap: 18px; padding: 22px 22px 18px; }
.rv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 16px; flex-wrap: wrap; }
.rv-head h3 { font-size: clamp(1.2rem, 1rem + 0.7vw, 1.5rem); font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }
.rv-meta { display: flex; flex-wrap: wrap; gap: 2px 8px; margin-block-start: 6px; color: var(--ink-3); font-size: 0.875rem; }
.rv-meta > span + span::before { content: '·'; margin-inline-end: 8px; color: rgb(255 255 255 / 0.3); }
.rv-states { display: flex; gap: 8px; flex-wrap: wrap; }
.rv-body { display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 18px; align-items: start; }
.rv-thumb {
  position: relative; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden;
  background: radial-gradient(90% 70% at 50% 110%, rgb(208 16 26 / 0.45), transparent 70%), linear-gradient(180deg, #16161A, #0B0B0D);
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  display: grid; place-items: center; color: var(--ink-3);
  transition: filter 300ms var(--ease-out), opacity 300ms var(--ease-out);
}
.rv-thumb .icon { inline-size: 30px; block-size: 30px; }
.rv-dots { position: absolute; inset-block-end: 10px; inset-inline: 0; display: flex; justify-content: center; gap: 4px; }
.rv-dots i { inline-size: 5px; block-size: 5px; border-radius: 50%; background: rgb(255 255 255 / 0.25); }
.rv-dots i:first-child { background: var(--white); }
.rv-label { margin-block-end: 10px; font-size: 0.8125rem; font-weight: 600; color: var(--ink-3); }
.rv-status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 0.9375rem; }
.rv-status .dot { inline-size: 9px; block-size: 9px; border-radius: 50%; background: var(--red-hot); box-shadow: 0 0 0 4px rgb(245 34 45 / 0.16), 0 0 12px 2px rgb(255 74 61 / 0.8); transition: background-color 240ms ease, box-shadow 240ms ease; }
.rv-card[data-state='approved'] .rv-status .dot { background: var(--white); box-shadow: 0 0 0 4px rgb(255 255 255 / 0.12), 0 0 12px 2px rgb(255 255 255 / 0.5); }
.rv-card[data-state='rejected'] .rv-status .dot { background: var(--ink-3); box-shadow: none; }
.rv-card[data-state='rejected'] .rv-thumb { filter: grayscale(1); opacity: 0.45; }
.rv-card[data-state='rejected'] h3 { text-decoration: line-through; text-decoration-color: rgb(255 255 255 / 0.5); color: var(--ink-2); }
.rv-actions { display: flex; flex-wrap: wrap; gap: 10px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.rv-actions .btn { min-inline-size: 8.5rem; }
.item-note { display: grid; gap: 8px; padding-block-start: 16px; border-block-start: 1px solid var(--line); }
.item-note label { font-weight: 600; }
.item-hint { color: var(--ink-3); font-size: 0.875rem; }
.item-note textarea {
  min-block-size: 92px; padding: 12px 14px; resize: vertical; border-radius: 14px;
  background: #0D0D10; color: var(--ink); border: 1px solid rgb(255 255 255 / 0.18);
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.item-note textarea:focus-visible { outline: none; border-color: var(--red-hot); box-shadow: 0 0 0 3px rgb(245 34 45 / 0.28); }
.item-note-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-block-start: 4px; }
.item-foot { min-block-size: 0; }
@media (max-width: 520px) {
  .rv-card { padding: 18px 16px 14px; }
  .rv-bar { padding: 12px 16px; }
  .rv-body { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; }
  .rv-actions .btn, .item-note-actions .btn { flex: 1 1 0; min-inline-size: 0; }
}

/* ---------- The content calendar: rounded day cells ---------- */
.cal { padding: 20px 20px 18px; }
.cal-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-block-end: 16px; }
.cal-h { font-weight: 700; font-size: 1.0625rem; }
.cal-range { color: var(--ink-3); font-size: 0.875rem; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-head { text-align: center; color: var(--ink-3); font-size: 0.75rem; font-weight: 500; }
.cal-day {
  display: flex; flex-direction: column; gap: 6px; min-block-size: 150px; padding: 8px 7px; border-radius: 14px;
  background: #0C0C0F; box-shadow: inset 0 0 0 1px var(--line);
}
.cal-date { display: flex; align-items: baseline; justify-content: space-between; gap: 4px; padding-inline: 3px; }
.cal-date b { font-size: 1rem; font-weight: 600; }
.cal-date .cal-wd { display: none; color: var(--ink-3); font-size: 0.8125rem; }
.cal-slot {
  position: relative; display: grid; gap: 1px; padding: 7px 8px; border-radius: 10px;
  background: rgb(255 255 255 / 0.05); box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.08);
  font-size: 0.75rem; line-height: 1.3;
}
.cal-slot .icon { position: absolute; inset-block-start: 7px; inset-inline-end: 6px; inline-size: 13px; block-size: 13px; color: var(--ink-2); }
.cal-time { font-weight: 700; color: var(--white); }
.cal-format { color: var(--ink-2); }
.cal-pillar { color: var(--ink-3); }
.cal-slot--wait { background: rgb(245 34 45 / 0.1); box-shadow: inset 0 0 0 1px rgb(255 74 61 / 0.55), 0 0 18px -8px rgb(245 34 45 / 0.9); }
.cal-slot--wait .icon { color: var(--red-text); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-block-start: 16px; color: var(--ink-2); font-size: 0.8125rem; }
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend .icon { inline-size: 14px; block-size: 14px; }
.cal-legend li:first-child .icon { color: var(--red-text); }
@media (max-width: 1100px) and (min-width: 961px) { .cal-pillar { display: none; } }
@media (max-width: 640px) {
  .cal { padding: 16px 14px; }
  .cal-grid { grid-template-columns: 1fr; gap: 6px; }
  .cal-head { display: none; }
  .cal-day { display: grid; grid-template-columns: 4.6rem 1fr; align-items: center; min-block-size: 0; padding: 8px 10px; }
  .cal-day > .cal-slots { display: flex; flex-wrap: wrap; gap: 6px; }
  .cal-date { justify-content: flex-start; gap: 8px; }
  .cal-date .cal-wd { display: inline; }
  .cal-slot { padding-inline-end: 26px; }
}
.cal-slots { display: grid; gap: 6px; }
