:root{
  --win95-face:#c0c0c0;
  --win95-dark:#808080;
  --win95-light:#ffffff;
  --win95-accent:#000080;
  --win95-text:#000000;
  --ok:#008000;
  --err:#b00000;
  --warn:#b8860b;
}
html,body{height:100%; overflow:hidden;}
body{
  margin:0;
  font-family: "MS Sans Serif", "Tahoma", "Verdana", system-ui, sans-serif;
  background:#008080;
  color:var(--win95-text);
  background-image: repeating-linear-gradient(180deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 3px);
}
.desktop{
  min-height:100dvh;
  display:flex;
  align-items:center;
  justify-content:center;
}
.win95-window{
  width:560px;
  background:var(--win95-face);
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
}
.titlebar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:2px 6px;
  background:linear-gradient(#000080,#000060);
  color:#fff;
  font-weight:bold;
}
.titlebar .title-icon{margin-right:6px;}
.controls{display:flex;gap:4px;}
.ctrl{
  width:18px;height:18px;
  display:inline-flex;align-items:center;justify-content:center;
  font-size:12px;line-height:1;
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
  background:var(--win95-face);
  cursor:pointer;
}
.ctrl:active{
  border-top-color:var(--win95-dark);
  border-left-color:var(--win95-dark);
  border-right-color:var(--win95-light);
  border-bottom-color:var(--win95-light);
}
.menubar{
  padding:6px;
  border-bottom:2px solid var(--win95-dark);
  background:var(--win95-face);
}
.btn95{
  position:relative;
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
  background:var(--win95-face);
  padding:4px 12px;
  cursor:pointer;
  font-size:14px;
}
.btn95.primary{font-weight:bold;}
.btn95:active{
  border-top-color:var(--win95-dark);
  border-left-color:var(--win95-dark);
  border-right-color:var(--win95-light);
  border-bottom-color:var(--win95-light);
}
/* Inner dotted focus rectangle */
.btn95:focus-visible::after{
  content:"";
  position:absolute;
  inset:3px 6px;
  border:1px dotted #000;
  pointer-events:none;
}

.content{ padding:8px; }
.group{
  display:grid;
  grid-template-columns:110px 1fr;
  align-items:center;
  gap:6px;
  margin-bottom:6px;
}
.group input{
  padding:6px;
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-dark);
  border-left-color:var(--win95-dark);
  border-right-color:var(--win95-light);
  border-bottom-color:var(--win95-light);
  background:var(--win95-face);
  outline:none;
}
.login-actions{display:flex;gap:10px;margin:8px 0 4px;}

.hr{
  height:0;
  border:0;
  border-top:2px solid var(--win95-dark);
  border-bottom:2px solid var(--win95-light);
  margin:10px 0;
}
.hint{ font-size:13px; }
.modal{ overscroll-behavior: contain; position:fixed; inset:0; display:none; align-items:center; justify-content:center; background:rgba(0,0,0,0.2); z-index:50; }
.modal.show{ display:flex; }
.modal-window{
  width:480px;
  background:var(--win95-face);
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
}
.modal-small{ width:420px; }
.modal-content{ padding:12px; }
.noc-grid{ display:grid; grid-template-columns:1fr auto; gap:8px 12px; margin-bottom:12px; }
.svc{ display:contents; }
.svc-name{ font-weight:bold; }
.badge{
  display:inline-block; min-width:20px; text-align:center;
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
  background:var(--win95-face);
  padding:2px 6px; font-weight:bold;
}
.badge.ok{ color:var(--ok); }
.badge.err{ color:var(--err); }
.badge.warn{ color:var(--warn); }
.legend{ display:flex; gap:16px; font-size:13px; }
.logbox{
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-dark);
  border-left-color:var(--win95-dark);
  border-right-color:var(--win95-light);
  border-bottom-color:var(--win95-light);
  background:#000;
  color:#0f0;
  padding:8px;
  height: 320px;
  overflow:auto;
}
.progress-outer{
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
  height:20px; background:var(--win95-face); overflow:hidden;
}
.progress-inner{ height:100%; background: repeating-linear-gradient(90deg, #008080 0 12px, #00a0a0 12px 24px); transition:width .2s linear; }
.progress-text{ margin-top:8px; font-size:13px; }
.msgbox{
  border:2px solid var(--win95-dark);
  border-top-color:var(--win95-light);
  border-left-color:var(--win95-light);
  border-right-color:var(--win95-dark);
  border-bottom-color:var(--win95-dark);
  padding:10px; background:var(--win95-face);
}
.msg-title{ font-weight:bold; margin-bottom:6px; }
.loglist{
  display:grid;
  grid-template-columns: 160px 1fr;
  gap: 6px 12px;
  font-family:"Lucida Console","Courier New",monospace;
  font-size:13px;
}
.logitem{ display: contents; }
.loglist .date{ white-space: nowrap; opacity: 0.9; }
.loglist .msg{ white-space: normal; }
#modal-updates .modal-window{ width: 600px; }

.error-grid{
  margin-top: 10px;
  border: 2px solid var(--win95-dark);
  border-top-color: var(--win95-light);
  border-left-color: var(--win95-light);
  border-right-color: var(--win95-dark);
  border-bottom-color: var(--win95-dark);
  background: var(--win95-face);
  padding: 8px;
  font-family: "Lucida Console","Courier New", monospace;
  font-size: 14px;
}
.error-grid .row + .row{ margin-top: 6px; }
.error-grid .code{ display:block; letter-spacing:1px; }

.btn95[disabled]{
  color:#666;
  pointer-events:none;
  opacity:0.8;
}

.dlg-actions{
  display:flex;
  justify-content:flex-end;
  margin-top:10px;
  gap:8px;
}
/* Services neatly stacked */
#modal-status .svc-list { display:flex; flex-direction:column; gap:6px; margin-bottom:8px; }
#modal-status .svc-list .svc { display:flex; justify-content:space-between; align-items:center; }
#modal-status .svc-list .svc-name { font-weight:bold; }
#modal-status .svc-list .badge { min-width:28px; text-align:center; }

#bsod{
  position: fixed;
  inset: 0;
  background: #0000AA; 
  color: #C0C0C0;
  font-family: "Lucida Console","Courier New",monospace;
  display: none;
  z-index: 9999;
  background-image:
    repeating-linear-gradient(180deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 3px),
    linear-gradient(#0000AA,#0000AA);
}
#bsod.show{ display:block; }
#bsod .bsod-inner{ margin:0; padding:16px; max-width:none; }
#bsod .bsod-text{
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 16px;
}
.status-actions {
  text-align: center; /* centres inline elements like buttons */
  margin-top: 10px;   /* optional: adds spacing above */
}
.status-actions button {
  margin: 0 5px;      /* small gap between buttons */
}
