/* ELC Work OS desktop. xp.css (vendor) draws windows, title bars, buttons and fields; this
   file draws everything xp.css does not have: the monitor, the black desktop, icons, the
   taskbar, the Start menu, the context menu and the cursors. */

html, body { height: 100%; margin: 0; }
body {
  background: #111;
  font-family: Tahoma, "Pixelated MS Sans Serif", Arial, sans-serif;
  font-size: 12px; color: #000; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
.muted { color: #666; }
.small { font-size: 11px; }

/* ── The monitor ─────────────────────────────────────────────────────────── */
.monitor {
  position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 16px 16px 10px; box-sizing: border-box;
  background: radial-gradient(ellipse at 50% 40%, #2e2e2e, #0b0b0b 75%);
}
.bezel {
  position: relative; width: min(100%, 1480px); flex: 1; min-height: 0; box-sizing: border-box;
  padding: 20px 20px 18px; border-radius: 22px 22px 0 0;
  background: linear-gradient(#ecece7, #d5d5ce 60%, #c9c9c2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), inset 0 2px 0 #fff, inset 0 -1px 0 #a7a7a0;
}
.screen {
  position: relative; width: 100%; height: 100%; border-radius: 6px;
  background: #1f5fd0 url(../icons/wallpaper.svg) center / cover no-repeat;
  overflow: hidden; box-sizing: border-box;
  box-shadow: inset 0 0 0 2px #050505, inset 0 0 48px rgba(0, 0, 0, .95), 0 0 0 1px #8d8d86;
}
.bezel-chin {
  width: min(100%, 1480px); height: 34px; display: flex; align-items: center; justify-content: center;
  gap: 14px; box-sizing: border-box; border-radius: 0 0 20px 20px;
  background: linear-gradient(#d2d2cb, #b5b5ad); box-shadow: 0 10px 30px rgba(0, 0, 0, .6), inset 0 -2px 0 #8f8f88;
}
.bezel-chin .brand { font: bold 12px/1 Tahoma, sans-serif; letter-spacing: .35em; color: #5c5c58; margin-left: .35em; }
.bezel-chin .led { width: 7px; height: 7px; border-radius: 50%; background: #5be35b; box-shadow: 0 0 6px #5be35b, 0 0 12px rgba(91, 227, 91, .6); }
.stand { width: 240px; height: 12px; border-radius: 0 0 12px 12px; background: linear-gradient(#8f8f88, #5e5e59); }

/* ── Cursors ─────────────────────────────────────────────────────────────── */
.screen, .screen * { cursor: url(../cursors/arrow.svg) 3 2, auto; }
.screen a, .screen button, .screen .icon, .screen select, .screen .sm-item, .screen .task,
.screen .title-bar-controls button { cursor: url(../cursors/hand.svg) 9 2, pointer; }
.screen input[type=text], .screen input[type=password], .screen textarea { cursor: text; }
.screen .title-bar { cursor: url(../cursors/arrow.svg) 3 2, move; }

/* ── Desktop icons ───────────────────────────────────────────────────────── */
#icons { position: absolute; inset: 0 0 30px 0; }
#icons .icon {
  position: absolute; width: 96px; padding: 4px 2px; margin: 0; min-width: 0; min-height: 0;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  background: none; border: 1px solid transparent; box-shadow: none; border-radius: 0;
  color: #fff; font: 12px/1.2 Tahoma, sans-serif; text-align: center;
  text-shadow: 1px 1px 2px #000, 0 0 4px #000; touch-action: none; user-select: none;
}
#icons .icon img { filter: drop-shadow(1px 1px 1px rgba(0, 0, 0, .7)); }
#icons .icon span { display: block; max-width: 92px; font-size: 11px; overflow-wrap: normal; }
#icons .icon:hover span { text-decoration: underline; text-decoration-color: rgba(255,255,255,.6); }
#icons .icon.selected, #icons .icon:focus-visible {
  background: rgba(49, 106, 197, .6); border: 1px dotted rgba(255, 255, 255, .6); outline: none;
}
#icons .icon.selected img { opacity: .8; }
#icons .icon.dragging { opacity: .7; z-index: 5; }

/* ── Windows ─────────────────────────────────────────────────────────────── */
.xp-window {
  position: absolute; display: flex; flex-direction: column; min-width: 240px; min-height: 120px;
  z-index: 10; box-sizing: border-box;
}
.xp-window .title-bar { flex: none; user-select: none; }
.xp-window .title-bar-text { display: flex; align-items: center; gap: 6px; }
.xp-window .title-bar-text img { width: 16px; height: 16px; }
.xp-window:not(.active) .title-bar {
  background: linear-gradient(180deg, #7aa6f2, #5a8ae8 8%, #4e82e6 40%, #4f84ea 88%, #4a7fe6 93%, #3d70d4 96%, #3d70d4);
}
.xp-window:not(.active) { box-shadow: inset -1px -1px #5a84d6, inset 1px 1px #6c93e3, inset -2px -2px #5a84d6, inset 2px 2px #86a9ec, inset -3px -3px #6a92e2, inset 3px 3px #7fa3ea; }
.xp-window .window-body { flex: 1; min-height: 0; overflow: auto; margin: 0 3px; padding: 10px; background: #ece9d8; }
.xp-window.minimized { display: none; }
.win-intro { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.win-intro img { flex: none; }
.win-intro p { margin: 4px 0 0; line-height: 1.4; }
.win-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 12px; }
.btn-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.msgbox { display: flex; gap: 12px; align-items: center; margin: 4px 0 10px; }
fieldset { margin: 8px 0; }
.field-row { display: flex; align-items: center; gap: 6px; }
.field-row select { flex: 1; }
.field-row-stacked { display: flex; flex-direction: column; gap: 3px; margin-bottom: 8px; }
.field-row-stacked input { width: 100%; box-sizing: border-box; }

/* Bridge forms (the order windows). */
.win-intro.compact { margin-bottom: 6px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid .field-row-stacked { margin-bottom: 4px; }
.form-grid input[type=text], .form-grid select, .form-grid textarea { width: 100%; box-sizing: border-box; }
.form-grid textarea { font: 12px Tahoma, sans-serif; padding: 3px 4px; border: 1px solid #7f9db9; resize: vertical; }
.radio-row { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 2px 4px; }
.check-row { align-self: end; padding-bottom: 6px; }
.win-result { margin-top: 8px; padding: 8px 10px; border: 1px solid #c8c6b4; background: #fff; }
.win-result.busy { color: #666; }
.win-result.ok { border-color: #8fc38f; background: #f2fbf2; }
.win-result.err { border-color: #e2a2a2; background: #fff4f4; color: #8a1010; }
.win-result ul { margin: 0; padding-left: 18px; }
.win-result p { margin: 0 0 8px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 6px; }
.links-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 6px; }
.links-tiles .tile { background: #fff; border: 1px solid #c8c6b4; padding: 6px 8px; text-align: center; color: #000; text-decoration: none; display: block; }
.links-tiles a.tile:hover { border-color: #e5a01a; box-shadow: 0 0 0 1px #fbc761 inset; }
.links-tiles .tile b { display: block; font-size: 18px; }
.links-tiles .tile span { color: #666; font-size: 11px; display: block; }
.links-tiles .tile small { color: #888; font-size: 10px; display: block; min-height: 12px; }
.btn-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.rt-lines { margin: 2px 0 8px; }
.rt-recent { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; }
.rt-recent ul, .feed-list { list-style: none; margin: 0; padding: 0; }
.rt-recent li, .feed-list li { padding: 3px 0; border-bottom: 1px dotted #d5d3c3; line-height: 1.25; }
.rt-recent li small, .feed-list li small { display: block; color: #777; font-size: 10px; }
.rt-recent li a, .feed-list li a { color: #0046d5; text-decoration: none; }
.rt-recent li a:hover, .feed-list li a:hover { text-decoration: underline; }
.feed-list { max-height: 260px; overflow: auto; }
.feed-list .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #aaa; margin-right: 6px; vertical-align: 1px; }
.feed-list .dot.on { background: #3fa52f; box-shadow: 0 0 4px #3fa52f; }
.sm-right a.sm-item { text-decoration: none; }
.links-tiles.cols3 { grid-template-columns: repeat(3, 1fr); }
.time-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px; background: #fff; border: 1px solid #c8c6b4; }
.time-table th, .time-table td { padding: 3px 6px; text-align: right; border-bottom: 1px solid #e6e4d6; }
.time-table th:first-child, .time-table td:first-child { text-align: left; }
.time-table th { background: #f0efe6; color: #555; font-weight: normal; }
.time-table tr.me td { font-weight: bold; background: #f4f9ff; }
#clock { cursor: url(../cursors/hand.svg) 9 2, pointer; padding: 0 2px; }
#clock:hover { text-decoration: underline; }
.clockpop { position: absolute; right: 2px; bottom: 32px; z-index: 1150; min-width: 190px; padding: 3px; background: #fff; border: 1px solid #0f3fa8; box-shadow: 2px 2px 6px rgba(0,0,0,.35); font: 12px Tahoma, sans-serif; }
.clockpop button { display: flex; justify-content: space-between; gap: 12px; width: 100%; margin: 0; padding: 4px 8px; min-width: 0; min-height: 0; background: none; border: 0; box-shadow: none; border-radius: 0; color: #000; font: inherit; text-align: left; }
.clockpop button:hover { background: #316ac5; color: #fff; }
.clockpop button b { font-weight: normal; color: #555; }
.clockpop button:hover b { color: #dfe9fb; }
@media (max-width: 767px) { .rt-recent { grid-template-columns: 1fr; } .btn-grid.cols4 { grid-template-columns: 1fr 1fr; } }
.links-steps { margin: 0; padding-left: 20px; }
.links-steps li { margin: 0 0 10px; }
.links-steps small { display: block; margin-top: 3px; }
.win-form.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.win-form.inline .win-result { flex-basis: 100%; margin-top: 4px; }
@media (max-width: 767px) { .links-tiles { grid-template-columns: repeat(2, 1fr); } }

/* An anchor dressed as an xp.css button, so a launch is a real link in a new tab. */
.xp-btn, .win-actions button, .logon-buttons button, .btn-row button {
  display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box;
  min-width: 75px; min-height: 23px; padding: 0 12px 2px; border: 1px solid #003c74; border-radius: 3px;
  background: linear-gradient(180deg, #fff, #fafaf9 26%, #f0f0ea 95%, #ecebe5);
  color: #000; text-decoration: none; font: 12px Tahoma, sans-serif; white-space: nowrap;
  box-shadow: inset -1px 1px #fff, inset 1px 2px #fff, inset -2px 2px #e8e8e3, inset 2px -2px #d3d3cc;
}
.xp-btn:hover, .win-actions button:hover, .logon-buttons button:hover {
  box-shadow: inset -1px 1px #fff0cf, inset 1px 2px #fdd889, inset -2px 2px #fbc761, inset 2px -2px #e5a01a;
}
.xp-btn:active, .win-actions button:active { background: linear-gradient(180deg, #cdcac3, #e3e3db 20%, #e5e5de 90%, #f2f2f0); box-shadow: none; }
.xp-btn.default, .win-actions button.default { box-shadow: inset -1px 1px #cee7ff, inset 1px 2px #98b8ea, inset -2px 2px #bcd4f6, inset 2px -2px #89ade4; }
.win-actions button:disabled { color: #888; box-shadow: none; }
.xp-btn:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

/* ── Taskbar ─────────────────────────────────────────────────────────────── */
.taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 30px; display: flex; align-items: stretch;
  background: linear-gradient(#3168d5 0, #4993e6 5%, #2b64d4 9%, #245edb 50%, #2559d6 90%, #1f4db5);
  border-top: 1px solid #0831d9; z-index: 1000; user-select: none;
}
.startbtn {
  display: flex; align-items: center; gap: 5px; height: 30px; margin: 0; padding: 0 22px 0 8px;
  min-width: 0; min-height: 0; border: 0; border-radius: 0 12px 12px 0;
  background: linear-gradient(#5fbc3c, #41a331 45%, #358c2a 55%, #2f8824);
  color: #fff; font: italic bold 17px/1 "Trebuchet MS", Tahoma, sans-serif; text-shadow: 1px 1px 1px #1c4b14;
  box-shadow: inset -3px 0 6px rgba(0, 0, 0, .35), inset 0 2px 1px rgba(255, 255, 255, .35);
}
.startbtn:hover { filter: brightness(1.08); }
.startbtn.open { background: linear-gradient(#3c8e2c, #2f7a24); box-shadow: inset 2px 2px 6px rgba(0, 0, 0, .45); }
.tasks { flex: 1; display: flex; gap: 3px; padding: 3px 5px; overflow: hidden; }
.task {
  display: flex; align-items: center; gap: 6px; min-width: 110px; max-width: 170px; margin: 0; padding: 0 8px;
  min-height: 0; border: 1px solid #1d4fb9; border-radius: 3px;
  background: linear-gradient(#3c81f3, #2b6ae0); color: #fff; font: 12px Tahoma, sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); overflow: hidden; white-space: nowrap;
}
.task img { width: 16px; height: 16px; flex: none; }
.task span { overflow: hidden; text-overflow: ellipsis; }
.task:hover { background: linear-gradient(#53a0ff, #3f8af5); }
.task.active { background: linear-gradient(#1e4ea8, #2459c7); box-shadow: inset 1px 1px 3px rgba(0, 0, 0, .5); }
.tray {
  display: flex; align-items: center; padding: 0 14px 0 12px; color: #fff; font: 12px Tahoma, sans-serif;
  background: linear-gradient(#0f9ff5, #1189e8 10%, #0a6fd1 90%, #0a63bd); border-left: 1px solid #0b4fb4;
  box-shadow: inset 1px 0 0 rgba(255, 255, 255, .3); text-shadow: 0 0 2px #0a3a80;
}

/* ── Start menu ──────────────────────────────────────────────────────────── */
.startmenu {
  position: absolute; left: 0; bottom: 30px; width: 390px; max-width: 100%; z-index: 1100;
  background: #fff; border: 1px solid #0f3fa8; border-bottom: 0; border-radius: 8px 8px 0 0;
  box-shadow: 3px -3px 10px rgba(0, 0, 0, .45); overflow: hidden; font: 12px Tahoma, sans-serif;
}
.sm-head {
  height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 10px; color: #fff;
  font: bold 14px Tahoma, sans-serif; text-shadow: 1px 1px 1px #0a3380;
  background: linear-gradient(#1b5fd9, #2d73ea 40%, #1c5bcd);
}
.sm-avatar {
  width: 38px; height: 38px; display: grid; place-items: center; border: 2px solid #fff; border-radius: 4px;
  background: linear-gradient(#f6dd8a, #e0962a); color: #5b3a05; font: bold 18px Tahoma, sans-serif;
  box-shadow: 0 0 3px rgba(0, 0, 0, .5);
}
.sm-body { display: flex; border-top: 2px solid #f08a2a; }
.sm-left { flex: 1; min-width: 0; background: #fff; padding: 6px 4px; min-height: 280px; display: flex; flex-direction: column; }
.sm-right { width: 175px; background: #d3e5fa; border-left: 1px solid #95bdee; padding: 6px 4px; }
.sm-item {
  display: flex; align-items: center; gap: 8px; width: 100%; margin: 0; padding: 4px 6px; min-width: 0; min-height: 0;
  background: none; border: 0; box-shadow: none; border-radius: 0; text-align: left; color: #000; font: 12px Tahoma, sans-serif;
}
.sm-item:hover, .sm-item:focus-visible { background: #316ac5; color: #fff; outline: none; }
.sm-item img { flex: none; }
.sm-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-pins .sm-item { font-weight: bold; }
.sm-quick > span { display: flex; flex-direction: column; line-height: 1.2; }
.sm-quick small { color: #3a5b8a; font-size: 10px; }
.sm-quick:hover small { color: #dfe9fb; }
.sm-small { padding: 2px 6px; }
.sm-sep { height: 1px; background: #c6cfdb; margin: 5px 6px; }
.sm-right .sm-sep { background: #a8c4e8; }
.sm-caption { font-size: 10px; color: #777; padding: 2px 6px 3px; }
.sm-hint { margin: 4px 6px; color: #777; font-size: 11px; }
.sm-all { margin-top: auto; }
.sm-foot { display: flex; justify-content: flex-end; padding: 5px 8px; background: linear-gradient(#3a7bd5, #2561c5); }
.sm-logoff { display: flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 3px; color: #fff; text-decoration: none; }
.sm-logoff:hover { background: rgba(255, 255, 255, .18); }

/* ── Context menu ────────────────────────────────────────────────────────── */
.ctxmenu {
  position: absolute; z-index: 1200; min-width: 170px; padding: 2px; background: #fff;
  border: 1px solid #868686; box-shadow: 2px 2px 3px rgba(0, 0, 0, .4); font: 12px Tahoma, sans-serif;
}
.ctxmenu button {
  display: block; width: 100%; margin: 0; padding: 4px 18px; min-width: 0; min-height: 0; text-align: left;
  background: none; border: 0; box-shadow: none; border-radius: 0; color: #000; font: inherit;
}
.ctxmenu button:hover { background: #316ac5; color: #fff; }

/* ── Log on ──────────────────────────────────────────────────────────────── */
.logon { height: 100%; display: grid; place-items: center; background: linear-gradient(#5a7edc, #3b63c4 50%, #2c4f9f); }
.logon-window { width: 350px; max-width: 94%; }
.logon-window .window-body { padding: 4px 8px 8px; }
.logon-brand { display: flex; gap: 10px; align-items: center; margin: 4px 0 12px; font-size: 13px; }
.logon-error { color: #b00020; margin: 6px 0; }
.logon-buttons { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }

/* ── Phones ──────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .monitor { padding: 0; }
  .bezel { width: 100%; padding: 0; border-radius: 0; box-shadow: none; }
  .screen { border-radius: 0; box-shadow: none; }
  .bezel-chin, .stand { display: none; }
  #icons { display: grid; grid-template-columns: repeat(auto-fill, 86px); gap: 2px; justify-content: center; padding: 10px 6px; align-content: start; }
  #icons .icon { position: static !important; }
  .xp-window { left: 0 !important; top: 0 !important; width: 100% !important; height: calc(100% - 30px) !important; border-radius: 0; }
  .xp-window .title-bar { border-radius: 0; }
  .startmenu { width: 100%; border-radius: 0; }
  .sm-left { min-height: 0; }
  .btn-grid { grid-template-columns: 1fr; }
  .task { min-width: 60px; }
}
