/* نظام الشهادات 98 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; background: #008080; color: #000;
  font: 13px/1.5 Tahoma, "MS Sans Serif", Geneva, sans-serif;
  -webkit-user-select: none; user-select: none; cursor: default;
}
[hidden] { display: none !important; }
p { margin: 0 0 8px; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.mono { font-family: "Courier New", Courier, monospace; }

/* ---------- bevels ---------- */
.btn, .window, #taskbar, #startmenu, .menu, .tb {
  background: #c0c0c0;
}
.btn, .tb {
  border: 0; font: inherit; color: #000; cursor: default;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
.btn { min-width: 75px; height: 24px; padding: 0 12px; white-space: nowrap; flex: none; }
.btn:active:not(:disabled), .btn.on {
  box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
}
.btn:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn:disabled { color: #808080; text-shadow: 1px 1px #fff; }
.field, .filelist, textarea.pad, select.list {
  background: #fff; border: 0; font: inherit; color: #000; padding: 4px 6px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  border-radius: 0; outline: 0;
}
.field { height: 24px; width: 100%; -webkit-user-select: text; user-select: text; }
.field:disabled { background: #c0c0c0; color: #808080; text-shadow: 1px 1px #fff; }
.field.mono { font-size: 15px; letter-spacing: 1px; }
fieldset { border: 1px solid #808080; box-shadow: 1px 1px #fff, inset 1px 1px #fff; margin: 0 0 10px; padding: 8px 10px 6px; }
legend { padding: 0 4px; }

/* ---------- boot ---------- */
#boot {
  position: fixed; inset: 0; z-index: 20000; background: #000; color: #c0c0c0;
  padding: 28px 34px; font: 16px/1.5 "Courier New", Courier, monospace;
}
#bootText { margin: 0; font: inherit; white-space: pre-wrap; }
#bootSkip { position: absolute; bottom: 20px; left: 34px; right: 34px; color: #808080; font: 13px Tahoma, sans-serif; }

/* ---------- desktop ---------- */
#desktop { position: fixed; top: 0; left: 0; right: 0; bottom: 30px; overflow: hidden; }
#wall { position: absolute; inset: 0; background: #008080; }
#wall.w-cert {
  background-color: #008080;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='72' shape-rendering='crispEdges'%3E%3Crect x='24' y='18' width='48' height='34' fill='%23fffbe6' stroke='%23806000' stroke-width='2'/%3E%3Cpath d='M32 28h32M32 34h32M32 40h18' stroke='%23999'/%3E%3Crect x='56' y='40' width='8' height='8' fill='%23c00000'/%3E%3C/svg%3E");
}
#wall.w-clouds {
  background:
    radial-gradient(60px 22px at 20% 25%, #fff 60%, transparent 62%),
    radial-gradient(90px 28px at 62% 40%, #fff 60%, transparent 62%),
    radial-gradient(70px 24px at 82% 18%, #fff 60%, transparent 62%),
    radial-gradient(80px 26px at 35% 68%, #fff 60%, transparent 62%),
    #4a8fd8;
}
#wall.w-deep { background: #007878; }
#wallCanvas { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); image-rendering: pixelated; }

#icons {
  position: absolute; top: 8px; bottom: 8px; right: 8px;
  display: flex; flex-direction: column; flex-wrap: wrap; align-content: flex-start; gap: 6px 4px;
}
.icon { width: 144px; padding: 4px 2px; text-align: center; color: #fff; outline: 0; }
.icon .ico { display: block; width: 32px; height: 32px; margin: 0 auto 3px; }
.icon .lbl { display: inline-block; padding: 0 3px; line-height: 1.3; overflow-wrap: anywhere; border: 1px dotted transparent; }
.icon.sel .lbl, .icon:focus-visible .lbl { background: #000080; border-color: #fff; }
.icon.sel .ico { filter: brightness(.6) sepia(1) hue-rotate(190deg) saturate(4); }
.ico svg, .ico16 svg, .ico24 svg, .tico svg { display: block; width: 100%; height: 100%; }
.ico16 { display: inline-block; width: 18px; height: 18px; flex: none; }
.ico24 { display: inline-block; width: 24px; height: 24px; flex: none; }

/* ---------- windows ---------- */
.window {
  position: absolute; padding: 3px; min-width: 200px; max-width: calc(100vw - 16px);
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
}
.window.static { position: static; }
.titlebar {
  display: flex; align-items: center; gap: 4px; height: 22px; padding: 2px 3px;
  background: linear-gradient(to left, #808080, #b5b5b5); color: #c0c0c0; font-weight: bold;
  touch-action: none;
}
.window.active .titlebar { background: linear-gradient(to left, #000080, #1084d0); color: #fff; }
.tico { width: 16px; height: 16px; flex: none; }
.ttext { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtns { display: flex; gap: 0; flex: none; direction: ltr; }
.tb { width: 18px; height: 16px; padding: 0; display: grid; place-items: center; }
.tb svg { width: 9px; height: 8px; }
.tb.close { margin-left: 2px; order: 3; }
.tb:active { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; }
.wbody { padding: 10px 10px 8px; }
.wbody.flush { padding: 0; }
.btnrow { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.btnrow.end { justify-content: flex-end; }
.msg { display: flex; gap: 14px; align-items: flex-start; }
.msg p { margin: 4px 0 0; }
.msgico { width: 34px; height: 34px; flex: none; display: block; }
.msgico svg { display: block; width: 100%; height: 100%; }
.msgico.err {
  border-radius: 50%; background: #e00000; border: 1px solid #600;
  background-image: linear-gradient(45deg, transparent 44%, #fff 44% 56%, transparent 56%), linear-gradient(-45deg, transparent 44%, #fff 44% 56%, transparent 56%);
  background-size: 60% 60%; background-position: center; background-repeat: no-repeat;
}
.menubar { display: flex; gap: 2px; padding: 1px 2px 3px; }
.menubar span { padding: 1px 7px; }
.menubar span:hover { background: #000080; color: #fff; }
.toolbar { display: flex; gap: 6px; padding: 4px; border-top: 1px solid #fff; box-shadow: 0 -1px #808080; }
.statusbar { margin-top: 3px; padding: 2px 6px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; min-height: 22px; }
.filelist { min-height: 150px; padding: 6px; display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; }
.file { width: 160px; text-align: center; padding: 4px 2px; }
.file .ico { display: block; width: 32px; height: 32px; margin: 0 auto 2px; }
.file .lbl { padding: 0 3px; border: 1px dotted transparent; overflow-wrap: anywhere; }
.file.sel .lbl { background: #000080; color: #fff; border-color: #c0c0c0; }
textarea.pad {
  display: block; width: 100%; height: 300px; resize: none; direction: ltr; text-align: left;
  font: 14px/1.5 "Courier New", Courier, monospace; overflow-y: scroll;
  -webkit-user-select: text; user-select: text; cursor: text;
}
.empty-page {
  background: #808080; padding: 14px; box-shadow: inset 1px 1px #404040;
}
.empty-page > div {
  background: #fff; height: 190px; display: grid; place-items: center; text-align: center;
  box-shadow: 2px 2px #404040; color: #808080;
}

textarea.pad.doc { height: 380px; font: 15px/1.6 "Times New Roman", Times, serif; padding: 14px 18px; }
.ietb .btn { min-width: 58px; }
.addr { display: flex; align-items: center; gap: 6px; padding: 4px; }
.iepage {
  height: 340px; overflow-y: auto; margin: 0 3px; padding: 14px 18px; background: #fff; cursor: auto;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  -webkit-user-select: text; user-select: text;
}
.iepage h2 { margin: 0 0 10px; font-size: 19px; }
.iepage ul { margin: 0 0 10px; padding-inline-start: 22px; }
.iepage hr { border: 0; border-top: 1px solid #808080; margin: 10px 0; }
.iepage .result { background: #ffffe1; }

/* application form */
.frow { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.frow label { width: 110px; flex: none; }
.target {
  direction: ltr; text-align: center; font: bold 18px "Courier New", Courier, monospace; letter-spacing: 2px;
  background: #000; color: #0f0; padding: 6px; margin: 0 0 8px;
}
.status { margin: 6px 0 0; min-height: 20px; color: #800000; }
.status.ok { color: #006000; }
.keybox {
  margin: 0 0 10px; padding: 8px 10px; background: #ffffe1; border: 1px solid #000; text-align: center;
  -webkit-user-select: text; user-select: text;
}
.keybox b { font: bold 18px "Courier New", Courier, monospace; letter-spacing: 2px; }
.note { color: #404040; }

/* display properties */
.monitor { width: 156px; margin: 0 auto 10px; }
.monitor .case { background: #c0c0c0; padding: 10px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.monitor .screen { height: 96px; background: #008080; box-shadow: inset 1px 1px #000; background-size: 48px 36px; display: grid; place-items: center; color: #005f5f; font: bold 12px "Courier New", monospace; }
.monitor .screen.w-clouds { background: #4a8fd8; }
.monitor .screen.w-deep { background: #007878; }
.monitor .foot { width: 60px; height: 8px; margin: 0 auto; background: #c0c0c0; box-shadow: inset -1px -1px #808080, inset 1px 1px #fff; }
select.list { width: 100%; height: 86px; padding: 2px; }
select.list option { padding: 1px 4px; }

/* final */
.final-msg { font-size: 15px; font-weight: bold; margin-bottom: 6px; }
.result { margin-top: 10px; padding: 10px; background: #fff; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; -webkit-user-select: text; user-select: text; cursor: text; line-height: 1.8; }
.result .code { font: bold 17px "Courier New", Courier, monospace; background: #ffffe1; border: 1px solid #000; padding: 0 6px; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }

/* ---------- taskbar ---------- */
#taskbar {
  position: fixed; left: 0; right: 0; bottom: 0; height: 30px; z-index: 9000;
  display: flex; align-items: center; gap: 4px; padding: 3px 2px 2px;
  box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff;
}
#startBtn { min-width: 0; display: flex; align-items: center; gap: 4px; padding: 0 6px; height: 24px; }
#tasks { flex: 1; display: flex; gap: 3px; min-width: 0; height: 24px; }
#tasks .btn {
  flex: 0 1 170px; min-width: 40px; display: flex; align-items: center; gap: 4px; padding: 0 6px;
  overflow: hidden; white-space: nowrap; text-align: start;
}
#tasks .btn span.t { overflow: hidden; text-overflow: ellipsis; }
#tasks .btn.on { font-weight: bold; background: repeating-conic-gradient(#fff 0 25%, #c0c0c0 0 50%) 0 0 / 2px 2px; }
#tray { height: 24px; padding: 0 10px; display: flex; align-items: center; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }

/* ---------- start menu / context menu ---------- */
#startmenu {
  position: fixed; bottom: 28px; right: 2px; z-index: 9001; display: flex; padding: 3px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
}
#startmenu .banner {
  width: 26px; background: linear-gradient(#1084d0, #000080); color: #fff; display: flex; align-items: flex-end; justify-content: center; padding: 6px 0;
}
#startmenu .banner span { writing-mode: vertical-rl; transform: rotate(180deg); font-size: 15px; white-space: nowrap; color: #c0c0c0; }
#startmenu .banner b { color: #fff; }
#startmenu ul, .menu ul { list-style: none; margin: 0; padding: 0; }
#startmenu ul { width: 190px; }
#startmenu li { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }
#startmenu li:hover:not(.sep), .menu li:hover:not(.sep):not(.dis) { background: #000080; color: #fff; }
li.sep { height: 2px; padding: 0 !important; margin: 3px 2px; border-top: 1px solid #808080; border-bottom: 1px solid #fff; }
.menu {
  position: fixed; z-index: 9500; min-width: 150px; padding: 3px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff;
}
.menu li { padding: 3px 22px; white-space: nowrap; }
.menu li.dis { color: #808080; text-shadow: 1px 1px #fff; }
.menu li.bold { font-weight: bold; }

/* ---------- helper ---------- */
#clippy { position: absolute; left: 14px; bottom: 10px; z-index: 8000; display: flex; flex-direction: column; align-items: flex-start; direction: rtl; }
#clippy .bubble {
  position: relative; width: 210px; background: #ffffe1; border: 1px solid #000; border-radius: 8px; padding: 8px 10px 4px 20px; margin-bottom: 8px;
}
#clippy .bubble::after { content: ""; position: absolute; left: 22px; bottom: -8px; border: 8px solid transparent; border-top-color: #000; border-bottom: 0; }
#clippy .bubble p { margin: 0 0 4px; }
#clippyX { position: absolute; top: 1px; left: 3px; border: 0; background: none; font: 14px Tahoma, sans-serif; padding: 0 3px; cursor: default; }
#clippyFace { width: 56px; height: 56px; }
#clippyFace svg { width: 100%; height: 100%; display: block; }

#off { position: fixed; inset: 0; z-index: 30000; background: #000; color: #f80; display: grid; place-items: center; text-align: center; font-size: 26px; }
#off small { color: #804000; font-size: 13px; }
body.busy, body.busy * { cursor: wait !important; }

/* ---------- phone ---------- */
#mobile { display: none; }
@media (max-width: 799px), (hover: none) and (pointer: coarse) {
  #mobile { display: grid; place-items: center; position: fixed; inset: 0; padding: 16px; z-index: 40000; background: #008080; }
  #mobile .window { width: 100%; max-width: 320px; }
  #boot, #desktop, #taskbar, #startmenu, #ctx, #off { display: none !important; }
}
