/* Classic desktop look (Windows 95/98 style) */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: #008080;
  font-family: "MS Sans Serif", "Microsoft Sans Serif", Tahoma, Geneva, Verdana, sans-serif;
  font-size: 12px;
  color: #000;
}
a { color: #0000ee; }
.bevel-out { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.bevel-in, .sunken { box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; background: #fff; }

.window { background: #c0c0c0; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff; padding: 3px; }
.titlebar { background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font-weight: bold; padding: 3px 3px 3px 6px; display: flex; align-items: center; justify-content: space-between; user-select: none; }
.titlebar.inactive { background: linear-gradient(90deg, #808080, #b5b5b5); }
.titlebar .ctrls { display: flex; gap: 2px; }
.titlebar .ctrls button { min-width: 16px; width: 18px; height: 16px; padding: 0; font-size: 10px; line-height: 10px; font-weight: bold; }
.titlebar .icon { margin-right: 6px; }

#app { position: absolute; inset: 8px 8px 40px 8px; display: flex; flex-direction: column; }
#app > .window { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.menubar { display: flex; gap: 0; padding: 2px 0; border-bottom: 1px solid #808080; }
.menubar span { padding: 2px 8px; cursor: default; }
.menubar span:hover { background: #000080; color: #fff; }
.menubar u { text-decoration: underline; }
.toolbar { display: flex; gap: 2px; padding: 3px 2px; border-bottom: 1px solid #808080; box-shadow: 0 1px #fff; flex-wrap: wrap; }
.toolbar button { min-width: 64px; display: flex; flex-direction: column; align-items: center; padding: 3px 6px; font-size: 11px; }
.toolbar button .ico { font-size: 18px; line-height: 20px; font-family: "Segoe UI Symbol", "Apple Symbols", sans-serif; }
.toolbar .sep { width: 2px; margin: 2px 4px; box-shadow: inset 1px 0 #808080, inset -1px 0 #fff; }

.body { flex: 1; display: flex; gap: 4px; padding: 4px 2px 2px; min-height: 0; }
.tree { width: 190px; overflow: auto; padding: 4px; }
.tree div { padding: 2px 4px 2px 18px; cursor: pointer; white-space: nowrap; position: relative; }
.tree div::before { content: ""; position: absolute; left: 4px; top: 4px; width: 9px; height: 9px; background: #ffff80; border: 1px solid #808000; }
.tree div.group { padding-left: 4px; font-weight: bold; cursor: default; margin-top: 6px; }
.tree div.group::before { display: none; }
.tree div.active { background: #000080; color: #fff; }
.tree div:hover:not(.group):not(.active) { text-decoration: underline; }
.main { flex: 1; overflow: auto; padding: 10px 12px; background: #c0c0c0; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; }

.statusbar { display: flex; gap: 2px; padding-top: 2px; }
.statusbar > div { padding: 2px 6px; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statusbar .grow { flex: 1; }

.taskbar { position: fixed; left: 0; right: 0; bottom: 0; height: 32px; background: #c0c0c0; box-shadow: inset 0 1px #dfdfdf, inset 0 2px #fff; display: flex; align-items: center; gap: 4px; padding: 2px 4px; }
.taskbar .start { font-weight: bold; min-width: 70px; }
.taskbar .task { min-width: 160px; text-align: left; }
.taskbar .task.on { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; background: repeating-conic-gradient(#c0c0c0 0% 25%, #fff 0% 50%) 50% / 2px 2px; }
.taskbar .clock { margin-left: auto; padding: 4px 10px; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; }

button {
  font: inherit; color: #000; background: #c0c0c0; border: none; border-radius: 0; padding: 4px 12px; min-width: 75px; min-height: 23px; cursor: pointer;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
}
button:active:not(:disabled) { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; padding: 5px 11px 3px 13px; }
button:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }
button:disabled { color: #808080; text-shadow: 1px 1px #fff; cursor: default; }
button.default { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #0a0a0a, inset -2px -2px #0a0a0a, inset 2px 2px #fff, inset -3px -3px #808080, inset 3px 3px #dfdfdf; font-weight: bold; }
button.small { min-width: 0; padding: 2px 8px; min-height: 19px; }

input[type=text], input[type=email], input[type=url], input[type=password], input[type=search], input[type=number], select, textarea {
  font: inherit; border: none; border-radius: 0; padding: 3px 4px; background: #fff; min-height: 21px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
textarea { font-family: "Courier New", monospace; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: #c0c0c0; color: #808080; }
fieldset { border: none; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #808080, inset 2px 2px #fff; padding: 10px 12px 12px; margin: 0 0 12px; }
legend { padding: 0 4px; background: #c0c0c0; }
label { display: inline-flex; align-items: center; gap: 4px; }

.form { display: grid; grid-template-columns: 210px 1fr; gap: 6px 10px; align-items: center; }
.form > label { justify-content: flex-end; text-align: right; }
.form .full { grid-column: 1 / -1; }
.form input[type=text], .form input[type=email], .form input[type=url], .form input[type=password], .form select, .form textarea { width: 100%; max-width: 560px; }
.hint { color: #404040; font-size: 11px; }
.row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.right { margin-left: auto; }
h1 { font-size: 16px; margin: 0 0 8px; }
h2 { font-size: 13px; margin: 14px 0 6px; }

.listview { width: 100%; border-collapse: collapse; background: #fff; }
.listwrap { box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; padding: 2px; background: #fff; overflow: auto; }
.listview th { background: #c0c0c0; text-align: left; font-weight: normal; padding: 3px 6px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080; position: sticky; top: 0; }
.listview td { padding: 2px 6px; white-space: nowrap; border-bottom: 1px dotted #e0e0e0; vertical-align: top; }
.listview td.wrap { white-space: normal; }
.listview tr.click { cursor: pointer; }
.listview tr.click:hover td, .listview tr.sel td { background: #000080; color: #fff; }

.tabs { display: flex; gap: 0; padding-left: 4px; position: relative; z-index: 1; }
.tabs div { padding: 3px 12px; cursor: pointer; margin-bottom: -2px; box-shadow: inset -1px 0 #0a0a0a, inset 1px 1px #fff, inset -2px 0 #808080, inset 2px 2px #dfdfdf; background: #c0c0c0; }
.tabs div.active { padding: 5px 14px 6px; margin-top: -2px; z-index: 2; }
.tabpanel { box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; padding: 12px; margin-bottom: 10px; }

.progress { height: 22px; padding: 3px; display: flex; gap: 2px; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080; }
.progress i { width: 10px; background: #000080; display: block; }
.stages { display: flex; gap: 0; margin: 6px 0 12px; flex-wrap: wrap; }
.stages div { flex: 1; min-width: 100px; text-align: center; padding: 6px 4px; font-size: 11px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.stages div.done { background: #000080; color: #fff; }
.stages div.now { background: #ffff80; font-weight: bold; }
.stages div.bad { background: #800000; color: #fff; font-weight: bold; }

.counter { display: inline-block; min-width: 128px; padding: 8px 10px; margin: 0 6px 6px 0; cursor: pointer; }
.counter b { display: block; font-size: 22px; font-family: "Courier New", monospace; }

.badge { display: inline-block; padding: 1px 6px; border: 1px solid #000; font-size: 11px; font-weight: bold; }
.b-HIGH, .b-FAIL, .b-REJECTED, .b-FAILED { background: #ff0000; color: #fff; }
.b-MEDIUM, .b-WARN, .b-MANUAL, .b-REVIEW { background: #ffff00; }
.b-LOW, .b-OK, .b-APPROVE, .b-APPROVED, .b-BUILT, .b-HANDED_OVER, .b-SUCCESS { background: #00a000; color: #fff; }
.b-INFO, .b-DRAFT, .b-RUNNING, .b-SUBMITTED, .b-BUILDING { background: #fff; }
.b-AI_REVIEWED, .b-REJECT_OR_FIX { background: #ff8000; color: #000; }
.b-FAILURE { background: #ff0000; color: #fff; }

.msg { padding: 6px 8px; margin: 6px 0; display: flex; gap: 8px; align-items: flex-start; }
.msg.err::before { content: "✖"; color: #fff; background: #f00; border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-size: 11px; }
.msg.info::before { content: "i"; color: #fff; background: #0000ff; border-radius: 50%; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: bold; font-family: serif; }
.msg.warn::before { content: "!"; background: #ff0; border: 1px solid #000; width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex: none; font-weight: bold; }
pre.out { background: #fff; padding: 8px; white-space: pre-wrap; word-break: break-word; margin: 0; max-height: 420px; overflow: auto; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a; font-family: "Courier New", monospace; font-size: 12px; }
.mono { font-family: "Courier New", monospace; }
.kv { display: grid; grid-template-columns: 220px 1fr; gap: 3px 10px; }
.kv > div:nth-child(odd) { color: #404040; }
.kv > div:nth-child(even) { word-break: break-all; font-family: "Courier New", monospace; }

/* floating windows (assistant, dialogs) */
.float { position: fixed; z-index: 50; display: flex; flex-direction: column; }
.float .titlebar { cursor: move; }
#assistant { width: 470px; height: 560px; right: 24px; bottom: 48px; }
#assistant .chat { flex: 1; overflow: auto; padding: 6px; margin: 4px 0; }
#assistant .bubble { margin: 4px 0 8px; white-space: pre-wrap; word-break: break-word; }
#assistant .bubble.user b { color: #000080; }
#assistant .bubble.bot b { color: #800000; }
#assistant .trace { font-size: 11px; color: #404040; margin: 2px 0 6px 10px; cursor: pointer; }
#assistant .trace pre { display: none; margin: 2px 0; font-size: 10px; background: #f0f0f0; padding: 4px; white-space: pre-wrap; }
#assistant .trace.open pre { display: block; }
#assistant textarea { width: 100%; height: 54px; font-family: inherit; }
.modal-bg { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,0.05); }
.modal-bg .window { min-width: 360px; max-width: 640px; }
.modal-body { padding: 12px; display: flex; gap: 12px; align-items: flex-start; }
.modal-btns { display: flex; gap: 6px; justify-content: center; padding: 0 12px 12px; }
.hourglass { font-size: 30px; animation: spin 2s linear infinite; display: inline-block; }
@keyframes spin { 50% { transform: rotate(180deg); } 100% { transform: rotate(180deg); } }

.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; }
.login-wrap .window { width: 440px; }
.chips span { display: inline-flex; gap: 4px; align-items: center; padding: 1px 4px 1px 6px; margin: 2px; background: #fff; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf; }
.chips button { min-width: 0; min-height: 14px; padding: 0 4px; font-size: 10px; }
.steps-nav { display: flex; gap: 4px; margin-bottom: 10px; flex-wrap: wrap; }
.steps-nav div { padding: 3px 10px; font-size: 11px; }
.steps-nav div.on { background: #000080; color: #fff; }
.steps-nav div.done { text-decoration: line-through; color: #404040; }
.wizard { display: flex; gap: 14px; }
.wizard .side { width: 150px; flex: none; background: linear-gradient(180deg, #000080, #1084d0); color: #fff; padding: 12px 10px; font-weight: bold; font-size: 13px; min-height: 320px; }
.wizard .side small { display: block; font-weight: normal; margin-top: 8px; font-size: 11px; opacity: .9; }
.wizard .content { flex: 1; min-width: 0; }
.dlg-buttons { display: flex; gap: 6px; justify-content: flex-end; padding-top: 10px; margin-top: 10px; border-top: 1px solid #808080; box-shadow: 0 -1px #fff inset; }
.marquee { overflow: hidden; white-space: nowrap; }

/* =====================================================================
   PORTAL THEME (default): a normal web portal that keeps the classic 3D buttons.
   Turn off with the "Classic view" button for the full Windows 95 desktop.
   ===================================================================== */
.hdr-right { display: none; }
body.portal { background: #eef1f5; font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; font-size: 13px; }
body.portal .taskbar, body.portal .menubar, body.portal .main-title .ctrls, body.portal .main-title .icon { display: none; }
body.portal #app { inset: 0; }
body.portal #app > .window { padding: 0; box-shadow: none; background: #eef1f5; }
body.portal .main-title { background: #00297a; padding: 0 20px; height: 56px; font-size: 18px; letter-spacing: .2px; }
body.portal .main-title .org { font-weight: normal; font-size: 13px; opacity: .8; margin-left: 6px; }
body.portal .hdr-right { display: flex; gap: 12px; align-items: center; font-weight: normal; font-size: 13px; }
body.portal .toolbar { background: #fff; padding: 8px 16px; border-bottom: 1px solid #d5dae1; box-shadow: none; gap: 6px; }
body.portal .toolbar .sep { box-shadow: none; background: #d5dae1; width: 1px; margin: 4px 8px; }
body.portal .body { padding: 0; gap: 0; }
body.portal .tree { width: 220px; background: #fff; box-shadow: none; border-right: 1px solid #d5dae1; padding: 10px 0; }
body.portal .tree div { padding: 8px 18px; border-left: 3px solid transparent; }
body.portal .tree div::before { display: none; }
body.portal .tree div.group { padding: 14px 18px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .6px; color: #6b7280; margin: 0; }
body.portal .tree div.active { background: #e8eefb; color: #00297a; border-left-color: #00297a; font-weight: bold; }
body.portal .tree div:hover:not(.group):not(.active) { background: #f3f5f8; text-decoration: none; }
body.portal .main { background: #eef1f5; box-shadow: none; padding: 20px 28px; }
body.portal h1 { font-size: 20px; margin-bottom: 14px; color: #111827; }
body.portal .statusbar { background: #fff; border-top: 1px solid #d5dae1; padding: 3px 8px; font-size: 12px; color: #374151; }
body.portal .statusbar > div { box-shadow: none; border-right: 1px solid #e5e7eb; }

body.portal fieldset { background: #fff; box-shadow: none; border: 1px solid #d5dae1; border-radius: 6px; padding: 14px 16px 16px; }
body.portal legend { background: #fff; font-weight: bold; color: #00297a; padding: 0 6px; }
body.portal .tabpanel { background: #fff; box-shadow: none; border: 1px solid #c9ced6; border-radius: 0 6px 6px 6px; }
body.portal .tabs div { background: #e5e8ed; box-shadow: none; border: 1px solid #c9ced6; border-bottom: none; margin-right: 2px; border-radius: 4px 4px 0 0; padding: 6px 14px; margin-bottom: 0; }
body.portal .tabs div.active { background: #fff; margin-top: 0; padding: 6px 14px 7px; margin-bottom: -1px; font-weight: bold; color: #00297a; }
body.portal .tabpanel fieldset { background: #fafbfc; }
body.portal .tabpanel fieldset legend { background: #fafbfc; }

body.portal input[type=text], body.portal input[type=email], body.portal input[type=url], body.portal input[type=password], body.portal input[type=search], body.portal input[type=number], body.portal select, body.portal textarea {
  box-shadow: none; border: 1px solid #9aa3ae; border-radius: 3px; padding: 5px 7px; min-height: 28px;
}
body.portal input:focus, body.portal select:focus, body.portal textarea:focus { outline: 2px solid #8fb0ff; border-color: #00297a; }
body.portal .listwrap { box-shadow: none; border: 1px solid #d5dae1; border-radius: 4px; padding: 0; }
body.portal .listview th { background: #f3f4f6; box-shadow: none; border-bottom: 1px solid #d5dae1; font-weight: bold; padding: 6px 8px; }
body.portal .listview td { padding: 5px 8px; border-bottom: 1px solid #eef0f3; }
body.portal .listview tr.click:hover td, body.portal .listview tr.sel td { background: #e8eefb; color: #000; }
body.portal pre.out, body.portal .sunken { box-shadow: none; border: 1px solid #d5dae1; border-radius: 4px; }
body.portal .counter { background: #fff; border: 1px solid #d5dae1; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.05); padding: 12px 16px; min-width: 150px; color: #374151; }
body.portal .counter b { color: #00297a; font-family: inherit; font-size: 26px; }
body.portal .stages div { box-shadow: none; border: 1px solid #c9ced6; margin-right: -1px; background: #fff; padding: 8px 4px; }
body.portal .stages div.done { background: #00297a; border-color: #00297a; }
body.portal .stages div.now { background: #fff4b3; border-color: #d4a800; }
body.portal .steps-nav div { box-shadow: none; border: 1px solid #c9ced6; border-radius: 12px; background: #fff; padding: 4px 12px; }
body.portal .steps-nav div.on { background: #00297a; border-color: #00297a; color: #fff; }
body.portal .wizard .side { border-radius: 4px; background: linear-gradient(180deg, #00297a, #1662dd); }
body.portal .main > .window, body.portal .content > .window, body.portal .main .window { background: #fff; box-shadow: none; border: 1px solid #d5dae1; border-radius: 6px; padding: 14px; }
body.portal .msg { background: #f4f7ff; border: 1px solid #c9d6f5; border-radius: 4px; }
body.portal .msg.err { background: #fff2f2; border-color: #f2b8b8; }
body.portal .msg.warn { background: #fffbea; border-color: #f0dc8a; }
body.portal .chips span { box-shadow: none; border: 1px solid #c9ced6; border-radius: 12px; padding: 2px 4px 2px 10px; }
body.portal .badge { border-radius: 3px; border-color: rgba(0,0,0,.25); }
body.portal .dlg-buttons { border-top: 1px solid #e5e7eb; box-shadow: none; }

/* windows that float (dialogs, AI assistant) become clean panels */
body.portal .modal-bg { background: rgba(17, 24, 39, .35); }
body.portal .modal-bg .window, body.portal .float.window, body.portal .login-wrap .window { background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,.25); border: 1px solid #c9ced6; border-radius: 6px; padding: 0; overflow: hidden; }
body.portal .titlebar { background: #00297a; padding: 8px 10px 8px 14px; }
body.portal #assistant { padding: 0 0 8px; bottom: 36px; }
body.portal #assistant > *:not(.titlebar) { margin-left: 8px; margin-right: 8px; }
body.portal .login-wrap .window > div:not(.titlebar) { padding: 20px !important; }
body.portal .modal-body { padding: 16px; }
body.portal #assistant textarea { width: calc(100% - 16px); }
