/* Oretek Project Manager - Windows NT 4.0 style theme (original artwork, no Microsoft assets) */
:root {
  --face: #c0c0c0; --light: #dfdfdf; --hi: #ffffff; --shadow: #808080; --dark: #000000;
  --title: #000080; --title-in: #808080; --desk: #008080; --sel: #000080; --seltext: #ffffff;
  --font: "Tahoma", "MS Sans Serif", "Microsoft Sans Serif", "Arial", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { background: var(--desk); font: 11px/1.3 var(--font); color: #000; user-select: none; cursor: default; }
input, select, textarea, button { font: 11px var(--font); }

/* ---------- bevels */
.raised  { background: var(--face); box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.sunken  { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi), inset 2px 2px var(--dark), inset -2px -2px var(--light); }
.thin-sunken { box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi); }

/* ---------- buttons */
.btn { background: var(--face); border: none; padding: 4px 12px; min-width: 75px; min-height: 23px;
  box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }
.btn:active:not(:disabled) { box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--hi), inset 2px 2px var(--shadow), inset -2px -2px var(--light); padding: 5px 11px 3px 13px; }
.btn:focus { outline: 1px dotted #000; outline-offset: -5px; }
.btn.default { box-shadow: inset 0 0 0 1px #000, inset -2px -2px var(--dark), inset 2px 2px var(--hi), inset -3px -3px var(--shadow), inset 3px 3px var(--light); }
.btn:disabled { color: var(--shadow); text-shadow: 1px 1px var(--hi); }
.btn.small { min-width: 0; padding: 2px 8px; min-height: 20px; }

/* ---------- inputs */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=email], select, textarea {
  background: #fff; border: none; padding: 3px 4px; height: 21px;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi), inset 2px 2px var(--dark), inset -2px -2px var(--light); }
textarea { height: 60px; resize: vertical; }
input:disabled, select:disabled, textarea:disabled, input[readonly] { background: var(--face); }
input:focus, select:focus, textarea:focus { outline: none; }
input[type=checkbox] { margin: 0 4px 0 0; vertical-align: -2px; }
label.chk { display: inline-flex; align-items: center; }

/* ---------- desktop */
#desktop { position: absolute; inset: 0 0 28px 0; }
.dicon { position: absolute; width: 76px; text-align: center; color: #fff; padding: 2px; }
.dicon img { width: 32px; height: 32px; display: block; margin: 0 auto 3px; image-rendering: pixelated; }
.dicon span { padding: 0 2px; }
.dicon.sel span { background: var(--sel); outline: 1px dotted #ff0; }
.dicon.sel img { filter: brightness(.6) sepia(1) hue-rotate(190deg) saturate(4); }

/* ---------- taskbar */
#taskbar { position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: var(--face);
  box-shadow: inset 0 1px var(--light), inset 0 2px var(--hi); display: flex; align-items: center; padding: 2px; gap: 3px; z-index: 100000; }
#start { min-width: 0; padding: 2px 5px; font-weight: bold; display: flex; align-items: center; gap: 3px; height: 22px; }
#start img { width: 16px; height: 16px; }
#start.down { box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--hi), inset 2px 2px var(--shadow), inset -2px -2px var(--light); }
#tasks { flex: 1; display: flex; gap: 3px; overflow: hidden; }
.task { min-width: 60px; max-width: 160px; flex: 1; text-align: left; padding: 2px 5px; height: 22px; display: flex; gap: 4px; align-items: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task img { width: 16px; height: 16px; flex: none; }
.task.active { font-weight: bold; background: repeating-conic-gradient(#fff 0 25%, var(--face) 0 50%) 0 0/2px 2px;
  box-shadow: inset 1px 1px var(--dark), inset -1px -1px var(--hi), inset 2px 2px var(--shadow), inset -2px -2px var(--light); }
#tray { height: 22px; padding: 0 8px; display: flex; align-items: center; gap: 6px; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi); }
#tray .who { color: #000; }

/* ---------- start menu */
#startmenu { position: absolute; bottom: 27px; left: 2px; display: none; z-index: 100001; padding: 3px 3px 3px 26px; min-width: 200px; }
#startmenu.open { display: block; }
#startmenu .banner { position: absolute; left: 3px; top: 3px; bottom: 3px; width: 21px; background: linear-gradient(#000080, #1084d0);
  color: #c0c0c0; writing-mode: vertical-rl; transform: rotate(180deg); font: bold 15px var(--font); padding: 6px 0; letter-spacing: .5px; }
#startmenu .banner b { color: #fff; }
.mi { display: flex; align-items: center; gap: 8px; padding: 4px 18px 4px 4px; position: relative; white-space: nowrap; }
.mi img { width: 24px; height: 24px; }
.mi.small img { width: 16px; height: 16px; }
.mi:hover, .mi.open { background: var(--sel); color: var(--seltext); }
.mi.sub::after { content: "\25B6"; position: absolute; right: 4px; font-size: 7px; }
.msep { height: 2px; margin: 3px 2px; box-shadow: inset 0 1px var(--shadow), inset 0 -1px var(--hi); }
.submenu { position: absolute; left: 100%; top: -3px; display: none; padding: 3px; min-width: 190px; color: #000; }
.mi.open > .submenu { display: block; }

/* ---------- windows */
.win { position: absolute; padding: 3px; display: flex; flex-direction: column; min-width: 220px; min-height: 120px; }
.win.max { left: 0 !important; top: 0 !important; width: 100% !important; height: 100% !important; }
.win.min { display: none; }
.titlebar { height: 18px; background: var(--title-in); color: var(--face); display: flex; align-items: center; padding: 0 2px; gap: 3px; font-weight: bold; flex: none; }
.win.active .titlebar { background: var(--title); color: #fff; }
.titlebar img { width: 16px; height: 16px; }
.titlebar .t { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbtn { width: 16px; height: 14px; min-width: 0; padding: 0; font: bold 9px/12px var(--font); display: flex; align-items: center; justify-content: center; }
.tbtn:active { padding: 1px 0 0 1px !important; }
.tbtn.close { margin-left: 2px; }
.menubar { display: flex; padding: 1px 0; flex: none; }
.menubar .mb { padding: 2px 6px; }
.menubar .mb:hover { box-shadow: inset -1px -1px var(--shadow), inset 1px 1px var(--hi); }
.wbody { flex: 1; display: flex; flex-direction: column; overflow: hidden; padding: 4px; gap: 4px; }
.statusbar { display: flex; gap: 2px; flex: none; margin-top: 2px; }
.statusbar div { padding: 2px 4px; flex: 1; box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi); white-space: nowrap; overflow: hidden; }
.grip { position: absolute; right: 2px; bottom: 2px; width: 12px; height: 12px; cursor: nwse-resize;
  background: linear-gradient(135deg, transparent 0 45%, var(--hi) 45% 52%, var(--shadow) 52% 60%, transparent 60% 70%, var(--hi) 70% 77%, var(--shadow) 77% 85%, transparent 85%); }

/* ---------- toolbars */
.toolbar { display: flex; gap: 4px; align-items: center; flex: none; flex-wrap: wrap; }
.toolbar .sp { flex: 1; }
.toolbar label { display: flex; align-items: center; gap: 4px; }

/* ---------- list view */
.lv { flex: 1; background: #fff; overflow: auto; position: relative; min-height: 60px; }
.lv table { border-collapse: collapse; width: 100%; }
.lv th { position: sticky; top: 0; background: var(--face); font-weight: normal; text-align: left; padding: 2px 6px; white-space: nowrap; z-index: 1;
  box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shadow); }
.lv th.num, .lv td.num { text-align: right; }
.lv td { padding: 1px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 320px; }
.lv tr.sel td { background: var(--sel); color: var(--seltext); }
.lv tr.total td { font-weight: bold; border-top: 1px solid #000; }
.lv .empty { padding: 8px; color: var(--shadow); }
.neg { color: #a00000; }
.tag { padding: 0 4px; }
.tag.ok { color: #006000; } .tag.warn { color: #a06000; } .tag.bad { color: #b00000; } .tag.info { color: #000080; }

/* ---------- tabs */
.tabs { display: flex; flex-direction: column; flex: 1; overflow: hidden; }
.tabstrip { display: flex; padding-left: 2px; flex: none; flex-wrap: wrap; }
.tab { padding: 3px 9px 2px; margin-right: -1px; position: relative; top: 2px; background: var(--face);
  box-shadow: inset 1px 1px var(--hi), inset -1px 0 var(--dark), inset -2px 0 var(--shadow), inset 2px 2px var(--light); border-radius: 3px 3px 0 0; }
.tab.on { top: 0; padding: 4px 10px 4px; z-index: 2; margin: 0 -2px; }
.tabpage { flex: 1; padding: 8px; overflow: auto; display: flex; flex-direction: column; gap: 6px;
  box-shadow: inset -1px -1px var(--dark), inset 1px 1px var(--hi), inset -2px -2px var(--shadow), inset 2px 2px var(--light); }

/* ---------- forms */
.form { display: grid; grid-template-columns: max-content 1fr; gap: 5px 8px; align-items: center; }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea { width: 100%; }
fieldset { border: none; padding: 10px 8px 8px; margin: 4px 0 0; position: relative;
  box-shadow: inset 1px 1px var(--shadow), inset -1px -1px var(--hi), inset 2px 2px var(--hi), inset -2px -2px var(--shadow); }
legend { padding: 0 3px; position: absolute; top: -7px; left: 6px; background: var(--face); }

/* ---------- modal */
.modal-back { position: absolute; inset: 0; z-index: 200000; }
.dlg .wbody { padding: 10px; gap: 10px; }
.dlg .buttons { display: flex; justify-content: flex-end; gap: 6px; }
.msgrow { display: flex; gap: 12px; align-items: flex-start; max-width: 420px; }
.msgrow img { width: 32px; height: 32px; flex: none; }
.msgrow div { white-space: pre-wrap; padding-top: 2px; user-select: text; }

/* ---------- dashboard */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; flex: none; }
.tile { background: #fff; padding: 5px 7px 6px; }
.tile .l { color: #404040; }
.tile .v { font-size: 20px; font-weight: bold; margin-top: 3px; white-space: nowrap; }
.tile .s { color: var(--shadow); }
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 6px; flex: none; }
.chart { background: #fff; padding: 4px; }
.chart .ct { font-weight: bold; padding: 0 2px 2px; }
.chart canvas { width: 100%; height: 190px; display: block; }
.legend { display: flex; gap: 10px; flex-wrap: wrap; padding: 2px; }
.legend i { display: inline-block; width: 10px; height: 10px; margin-right: 3px; vertical-align: -1px; border: 1px solid #000; }
.section-title { font-weight: bold; margin-top: 4px; }

/* ---------- logon */
#logon { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.logo-band { height: 64px; background: linear-gradient(90deg, #000080, #1084d0); color: #fff; display: flex; align-items: center; gap: 12px; padding: 0 14px; }
.logo-band .n { font: bold 20px var(--font); }
.logo-band .v { font-size: 11px; color: #c0d8ff; }
.hint { color: #404040; }
.form input[type=checkbox] { width: auto; }
.form label.chk { gap: 2px; }
