/* The working model on the first screen: the employee's PC beside the
   administrator's console, drawn as the product draws them. Flat, the two
   panels the same height, the narration under the action it explains. */

.sd { margin-top: 34px; font-family: var(--ui); color: var(--dev-ink); line-height: 1.35; font-size: 15px; }
.sd *, .sd *::before, .sd *::after { box-sizing: border-box; }
/* Zero specificity: a class below sets the size; this only stops the UA font. */
:where(.sd) button { font: inherit; color: inherit; cursor: pointer; }

/* scenario bar */
.sd-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.sd-bar .lbl { color: var(--soft); font-size: .9rem; margin-right: 4px; }
.sd-scn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rule); background: var(--paper);
  border-radius: 999px; padding: 7px 13px; font-size: .88rem; color: var(--ink); transition: border-color .2s, background .2s; }
.sd-scn img { width: 15px; height: 15px; opacity: .85; }
.sd-scn:hover { border-color: #2C3D5C; }
.sd-scn[aria-pressed="true"] { background: #0E2A35; border-color: var(--accent); }
.sd-scn .new { font-size: .68rem; background: var(--accent); color: var(--accent-ink); border-radius: 6px; padding: 1px 5px; font-weight: 700; }
.sd-where { margin-left: auto; display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.sd-where button { background: none; border: 0; padding: 6px 12px; font-size: .82rem; color: var(--soft); }
.sd-where button[aria-pressed="true"] { background: #13203A; color: var(--ink); }

/* the two panels */
.sd-split { display: grid; grid-template-columns: 1.08fr 1fr; gap: 18px; align-items: stretch; }
.sd-frame { display: flex; flex-direction: column; min-width: 0; }
.sd-cap { display: flex; justify-content: space-between; align-items: baseline; font-size: .82rem; color: var(--soft);
  margin: 0 4px 7px; gap: 10px; }
.sd-cap b { color: var(--ink); font-weight: 600; }
.sd-panel { position: relative; height: 500px; border-radius: 14px; overflow: hidden; border: 1px solid var(--dev-line);
  background: var(--dev-bg); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); }

/* ---------- the employee's PC ---------- */
.pc-screen { position: absolute; inset: 0; background: #0B1220 url(wallpaper-dark.webp?v=20261019b) center / cover no-repeat; }
.pc-login { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6,10,19,.35); backdrop-filter: blur(2px); }
.pc-login .clock { position: absolute; top: 46px; width: 100%; text-align: center; }
.pc-login .clock b { display: block; font-size: 3.6rem; font-weight: 300; letter-spacing: .02em; }
.pc-login .clock span { color: #C9D4E5; font-size: .95rem; }
.pc-card { width: 300px; margin-top: 70px; background: rgba(15,23,42,.88); border: 1px solid var(--dev-line); border-radius: 14px;
  padding: 22px; text-align: center; }
.pc-card .ava { width: 60px; height: 60px; border-radius: 50%; margin: -52px auto 10px; display: grid; place-items: center;
  background: #2563EB; font-weight: 700; font-size: 1.2rem; border: 3px solid #0F172A; }
.pc-card .pc-user-name { margin: 0 0 4px; font-size: 1.05rem; font-weight: 600; }
.pc-card p { margin: 0 0 14px; color: var(--dev-soft); font-size: .8rem; }
.pc-card .pw { display: flex; gap: 6px; }
.pc-card .pw span { flex: 1; text-align: left; background: #0B1220; border: 1px solid var(--dev-line); border-radius: 8px; padding: 8px 10px;
  font-size: .9rem; letter-spacing: .25em; color: var(--dev-soft); }
.pc-card .pw button { background: #1D4ED8; color: #FFFFFF; border: 0; border-radius: 8px; padding: 0 14px; font-weight: 600; }
.pc-card .steps { margin-top: 12px; text-align: left; font-size: .76rem; color: var(--dev-soft); display: grid; gap: 4px; min-height: 52px; }
.pc-card .steps i { font-style: normal; color: #4ADE80; margin-right: 6px; }
.pc-card.refused { border-color: #7F1D1D; }
.pc-card.refused p { color: #FCA5A5; }

.pc-desk { position: absolute; inset: 0 0 44px 0; }
.pc-icons { position: absolute; left: 14px; top: 14px; display: grid; gap: 10px; }
.pc-ico { width: 78px; display: grid; justify-items: center; gap: 4px; background: none; border: 0; padding: 6px 2px; border-radius: 8px;
  font-size: .72rem; text-align: center; text-shadow: 0 1px 2px #000; }
.pc-ico img { width: 34px; height: 34px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.pc-ico:hover { background: rgba(255,255,255,.08); }
.pc-ico.arrive { animation: sd-arrive .9s ease-out; }
@keyframes sd-arrive { 0% { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: none; } }

/* «Сьогодні» panel, as on the real desktop */
.pc-today { position: absolute; right: 12px; top: 12px; width: 232px; background: rgba(15,23,42,.9); border: 1px solid var(--dev-line);
  border-radius: 12px; padding: 12px; font-size: .76rem; display: grid; gap: 9px; }
.pc-today .pc-today-title { margin: 0; font-size: .86rem; font-weight: 600; display: flex; justify-content: space-between; }
.pc-today .pc-today-title span { color: var(--dev-soft); font-weight: 400; }
.pc-today .row { display: flex; gap: 8px; align-items: flex-start; color: #CBD5E1; }
.pc-today .row img { width: 14px; height: 14px; margin-top: 1px; opacity: .8; }
.pc-today button.row { background: rgba(34,211,238,.08); border: 1px solid rgba(34,211,238,.35); border-radius: 8px; padding: 6px 8px; text-align: left; color: #E2E8F0; font: inherit; cursor: pointer; width: 100%; }
.pc-today button.row small { display: block; color: var(--dev-warn); font-size: .7rem; margin-top: 2px; }
.pc-today button.row.done { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); }
.pc-today button.row.done small { color: var(--dev-ok); }
.pc-today button.row.arrive { animation: taskin .6s cubic-bezier(.2,.7,.2,1); }
@keyframes taskin { from { opacity: 0; transform: translateY(-6px); box-shadow: 0 0 0 6px rgba(34,211,238,.25); } }
.pc-today .ask { background: #1E3A8A; border: 0; border-radius: 8px; padding: 6px 8px; font-weight: 600; font-size: .76rem; }

/* windows */
.pc-win { position: absolute; left: 104px; top: 22px; right: 22px; bottom: 66px; z-index: 2; background: #0F172A; border: 1px solid var(--dev-line);
  border-radius: 10px; display: flex; flex-direction: column; box-shadow: 0 20px 40px rgba(0,0,0,.55); animation: sd-pop .25s ease-out; }
@keyframes sd-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.pc-win header { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--dev-line); font-size: .82rem; }
.pc-win header img { width: 16px; height: 16px; }
.pc-win header .x { margin-left: auto; background: none; border: 0; color: var(--dev-soft); font-size: 1rem; line-height: 1; }
.pc-win .body { padding: 12px; overflow: auto; font-size: .8rem; flex: 1; }
.pc-crumbs { color: var(--dev-soft); font-size: .75rem; margin-bottom: 8px; }
.pc-file { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 7px; }
.pc-file:nth-child(odd) { background: rgba(255,255,255,.03); }
.pc-file img { width: 18px; height: 18px; }
.pc-file .name { flex: 1; }
.pc-file .st { font-size: .7rem; color: var(--dev-soft); }
.pc-file .st.ok { color: #4ADE80; } .pc-file .st.warn { color: #FBBF24; } .pc-file .st.bad { color: #F87171; }
.pc-file.bad .name { color: #FCA5A5; text-decoration: line-through; }
.pc-url { display: flex; gap: 6px; margin-bottom: 10px; }
.pc-url span { flex: 1; background: #0B1220; border: 1px solid var(--dev-line); border-radius: 7px; padding: 6px 9px; color: #CBD5E1; }
.pc-sites { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pc-sites button { background: #172238; border: 1px solid var(--dev-line); border-radius: 7px; padding: 5px 9px; font-size: .74rem; }
.pc-page { border: 1px dashed var(--dev-line); border-radius: 10px; padding: 22px; text-align: center; color: var(--dev-soft); }
.pc-page b { display: block; color: var(--dev-ink); font-size: .95rem; margin-bottom: 6px; }
.pc-page.blocked b { color: #FCA5A5; }

/* taskbar */
.pc-task { position: absolute; left: 0; right: 0; bottom: 0; height: 44px; background: rgba(9,14,26,.92); border-top: 1px solid var(--dev-line);
  display: flex; align-items: center; padding: 0 10px; gap: 6px; }
.pc-task .start { width: 30px; height: 30px; border-radius: 8px; border: 0; background: rgba(255,255,255,.06); display: grid; place-items: center; }
.pc-task .start img { width: 18px; height: 18px; }
.pc-task .pin { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; display: grid; place-items: center; position: relative; }
.pc-task .pin img { width: 20px; height: 20px; }
.pc-task .pin.on::after { content: ""; position: absolute; bottom: 2px; width: 12px; height: 3px; border-radius: 2px; background: var(--accent); }
.pc-tray { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: .72rem; color: #CBD5E1; }
.pc-tray img { width: 15px; height: 15px; opacity: .85; }
.pc-tray .bat { display: inline-flex; align-items: center; gap: 4px; }
.pc-tray .bat.low { color: #FBBF24; }
.pc-tray .time { text-align: right; line-height: 1.15; }

/* toasts, banners, the watermark, the lock */
.pc-toasts { position: absolute; right: 12px; bottom: 54px; display: grid; gap: 8px; width: 270px; }
.pc-toast { background: #111C30; border: 1px solid var(--dev-line); border-left: 3px solid var(--accent); border-radius: 10px; padding: 10px 12px;
  font-size: .76rem; animation: sd-pop .3s ease-out; }
.pc-toast b { display: block; font-size: .8rem; margin-bottom: 2px; }
.pc-toast.warn { border-left-color: #F59E0B; } .pc-toast.bad { border-left-color: #EF4444; }
.pc-banner { position: absolute; left: 50%; top: 10px; transform: translateX(-50%); background: #7C2D12; border: 1px solid #C2410C;
  border-radius: 999px; padding: 6px 14px; font-size: .76rem; white-space: nowrap; animation: sd-pop .3s ease-out; z-index: 5; }
.pc-banner.blue { background: #1E3A8A; border-color: #3B82F6; }
.pc-mark { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.pc-mark span { position: absolute; white-space: nowrap; color: rgba(160,170,190,.22); font-size: .82rem; transform: rotate(-24deg); }
.pc-dead { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(6,10,19,.82); z-index: 6; text-align: center; animation: sd-pop .3s; }
.pc-dead div { max-width: 300px; }
.pc-dead img { width: 40px; height: 40px; margin-bottom: 8px; }
.pc-dead b { display: block; font-size: 1.05rem; margin-bottom: 6px; }
.pc-dead p { margin: 0; color: var(--dev-soft); font-size: .82rem; }

/* ---------- the administrator's console ---------- */
.ac { position: absolute; inset: 0; display: grid; grid-template-columns: 168px 1fr; }
.ac-rail { background: #111A2E; border-right: 1px solid var(--dev-line); padding: 12px 8px; display: flex; flex-direction: column; gap: 2px; font-size: .78rem; }
.ac-brand { display: flex; align-items: center; gap: 7px; padding: 2px 6px 10px; font-weight: 600; }
.ac-brand img { width: 18px; height: 18px; }
.ac-brand small { display: block; font-size: .6rem; color: #60A5FA; letter-spacing: .12em; font-weight: 500; }
.ac-group { color: #64748B; font-size: .62rem; letter-spacing: .1em; padding: 9px 8px 3px; }
.ac-nav { display: flex; align-items: center; gap: 8px; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 7px; color: #CBD5E1; position: relative; }
.ac-nav img { width: 15px; height: 15px; opacity: .85; }
.ac-nav:hover { background: rgba(255,255,255,.05); }
.ac-nav[aria-current="page"] { background: #1E3A8A; color: #fff; }
.ac-nav .dot { margin-left: auto; min-width: 16px; height: 16px; border-radius: 8px; background: #F59E0B; color: #111; font-size: .62rem; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px; }
.ac-nav .dot.bad { background: #EF4444; color: #fff; }
.ac-main { display: flex; flex-direction: column; min-width: 0; }
.ac-head { padding: 12px 16px 10px; border-bottom: 1px solid var(--dev-line); background: #152036; }
.ac-head b { display: block; font-size: 1.02rem; font-weight: 600; }
.ac-head span { color: var(--dev-soft); font-size: .72rem; }
.ac-body { padding: 12px 14px; overflow: auto; flex: 1; display: grid; gap: 10px; align-content: start; font-size: .76rem; }
.ac-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ac-tile { background: #1A2740; border: 1px solid var(--dev-line); border-radius: 9px; padding: 8px 10px; }
.ac-tile span { color: #CBD5E1; font-size: .68rem; }
.ac-tile b { display: block; font-size: 1.25rem; font-weight: 600; margin-top: 1px; }
.ac-tile small { color: var(--dev-soft); font-size: .64rem; }
.ac-tile .g { color: #4ADE80; } .ac-tile .a { color: #FBBF24; } .ac-tile .r { color: #F87171; }
.ac-card { background: #18243A; border: 1px solid var(--dev-line); border-radius: 10px; padding: 10px 11px; display: grid; gap: 6px; }
.ac-card .ac-section-title { margin: 0; font-size: .84rem; font-weight: 600; }
.ac-card .sub { color: var(--dev-soft); font-size: .7rem; margin-top: -3px; }
.ac-need { display: flex; align-items: center; gap: 8px; border: 1px solid var(--dev-line); background: #1B2942; border-radius: 8px; padding: 6px 8px;
  text-align: left; width: 100%; }
.ac-need:hover { border-color: #3B5785; }
.ac-need .open { margin-left: auto; color: #93C5FD; font-size: .7rem; }
.ac-need.fresh { animation: sd-flash 1.4s ease-out; }
@keyframes sd-flash { 0% { background: #22406E; } 100% { background: #1B2942; } }
.pill { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 1px 7px; font-size: .66rem; font-weight: 600; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok { background: #14361F; color: #4ADE80; } .pill.warn { background: #3D2A0A; color: #FBBF24; }
.pill.bad { background: #3F1515; color: #F87171; } .pill.info { background: #16264A; color: #93C5FD; } .pill.off { background: #1F2937; color: #94A3B8; }
.ac-table { width: 100%; border-collapse: collapse; }
.ac-table th { text-align: left; color: var(--dev-soft); font-weight: 500; font-size: .66rem; padding: 5px 6px; border-bottom: 1px solid var(--dev-line); }
.ac-table td { padding: 6px 6px; border-bottom: 1px solid #1E2A40; vertical-align: middle; }
.ac-table tr.hl td { background: #1B2B47; }
.ac-btn { border: 1px solid var(--dev-line); background: #1E2B44; border-radius: 7px; padding: 5px 10px; font-size: .72rem; }
.ac-btn.primary { background: #2563EB; border-color: #2563EB; color: #fff; font-weight: 600; }
.ac-btn.danger { background: #B91C1C; border-color: #B91C1C; color: #fff; font-weight: 600; }
.ac-btn.pulse { animation: sd-pulse 1.4s ease-in-out infinite; }
@keyframes sd-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,.0); } 50% { box-shadow: 0 0 0 5px rgba(59,130,246,.35); } }
.ac-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ac-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #1E2A40; }
.ac-toggle small { display: block; color: var(--dev-soft); font-size: .66rem; }
.ac-seg { display: inline-flex; border: 1px solid var(--dev-line); border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.ac-seg button { border: 0; background: none; padding: 4px 8px; font-size: .68rem; color: var(--dev-soft); }
.ac-seg button[aria-pressed="true"] { background: #2563EB; color: #fff; }
.ac-alert { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; border-bottom: 1px solid #1E2A40; }
.ac-alert .t { flex: 1; } .ac-alert .w { color: var(--dev-soft); font-size: .66rem; white-space: nowrap; }
.ac-dialog { position: absolute; inset: 0; background: rgba(4,8,16,.6); display: grid; place-items: center; z-index: 5; }
.ac-dialog > div { width: 300px; background: #18243A; border: 1px solid var(--dev-line); border-radius: 12px; padding: 14px; display: grid; gap: 9px; font-size: .76rem; animation: sd-pop .2s; }
.ac-dialog h6 { margin: 0; font-size: .9rem; }
.ac-dialog .f { background: #0F172A; border: 1px solid var(--dev-line); border-radius: 7px; padding: 6px 8px; color: #CBD5E1; }
.ac-dialog label { color: var(--dev-soft); font-size: .68rem; }

/* the administrator's phone: Telegram */
.tg { position: absolute; right: 12px; bottom: 12px; width: 250px; background: #17212B; border: 1px solid #2B3B4D; border-radius: 12px;
  padding: 9px 11px; font-size: .74rem; z-index: 7; box-shadow: 0 16px 30px rgba(0,0,0,.5); animation: sd-drop .35s ease-out; }
@keyframes sd-drop { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.tg .h { display: flex; align-items: center; gap: 6px; color: #8FB7DB; font-size: .68rem; margin-bottom: 4px; }
.tg .h i { width: 16px; height: 16px; border-radius: 50%; background: #2AABEE; display: inline-block; }
.tg .k { display: flex; gap: 6px; margin-top: 7px; }
.tg .k button { flex: 1; background: #2B5278; border: 0; border-radius: 6px; padding: 5px; font-size: .7rem; }

/* narration */
.sd-say { margin: 0 0 12px; display: flex; gap: 14px; align-items: center; border: 1px solid var(--rule); background: var(--paper); border-radius: 12px;
  padding: 12px 16px; min-height: 64px; }
.sd-say .n { font-family: var(--mono); font-size: .78rem; color: var(--accent); white-space: nowrap; }
.sd-say p { margin: 0; flex: 1; color: var(--ink); font-size: .97rem; line-height: 1.45; }
.sd-say p b { color: #fff; }
.sd-say .go { flex-shrink: 0; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 9px; padding: 9px 16px; font-weight: 700; }
.sd-say .go[hidden] { display: none; }
.sd-hint { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; animation: sd-hint 1.3s ease-in-out infinite; }
@keyframes sd-hint { 0%,100% { outline-color: rgba(34,211,238,.9); } 50% { outline-color: rgba(34,211,238,.25); } }

@media (max-width: 1080px) {
  .sd-split { grid-template-columns: 1fr; }
  .sd-panel { height: 520px; }
  .sd-where { margin-left: 0; }
}
@media (max-width: 640px) {
  /* One scrolling strip of scenarios, not nine stacked rows. */
  .sd-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .sd-bar::-webkit-scrollbar { display: none; }
  .sd-bar .lbl { display: none; }
  .sd-scn, .sd-where { flex-shrink: 0; }
  .sd-say { flex-direction: column; align-items: stretch; gap: 8px; }
  .sd-say .go { width: 100%; }
  .sd-panel { height: 560px; }
  .pc-today { display: none; }
  .pc-win { left: 10px; right: 10px; top: 12px; }
  .ac { grid-template-columns: 52px 1fr; }
  .ac-nav span, .ac-group, .ac-brand span { display: none; }
  .ac-tiles { grid-template-columns: repeat(2, 1fr); }
  .tg { left: 60px; right: 8px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .sd * { animation: none !important; transition: none !important; }
}
