
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  font-family: 'Tahoma', 'Segoe UI', Verdana, sans-serif;
  font-size: 12px;
  background: #c0c0c0;
  color: #000;
  height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden;
}

/* ── Main Application Window ── */
.window {
  background: #c0c0c0;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
}

/* ── Title Bar ── */
.title-bar {
  background: linear-gradient(90deg, #000080, #1084d0); /* Win98 style gradient */
  padding: 4px 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
}
.title-bar-text {
  color: white;
  font-weight: bold;
  font-size: 12px;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.title-bar-icon { background: none; background-size: contain; background-repeat: no-repeat; background-position: center; width: 14px; height: 14px; border: none; display: inline-block; }
.title-bar-controls { display: flex; gap: 2px; }
.title-bar-controls button {
  width: 16px; height: 14px;
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #000;
  border-bottom: 1px solid #000;
  box-shadow: inset 1px 1px #dfdfdf, inset -1px -1px #808080;
  font-size: 9px;
  font-weight: bold;
  display: flex; justify-content: center; align-items: center;
  cursor: pointer;
}
.title-bar-controls button:active {
  border-top: 1px solid #000;
  border-left: 1px solid #000;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #dfdfdf;
  padding: 1px 0 0 1px;
}

/* ── Window Body ── */
.window-body {
  flex: 1;
  display: flex;
  padding: 8px;
  gap: 16px;
  overflow: hidden;
}

/* ── Sidebar ── */
.sidebar {
  width: 240px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.panel {
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  padding: 12px;
}
.sidebar-nav { list-style: none; flex: 1; }
.sidebar-nav li { margin-bottom: 4px; }
.sidebar-nav a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  color: #000; text-decoration: none; font-size: 13px;
  border-top: 1px solid transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  border-bottom: 1px solid transparent;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-right: 1px solid #808080;
  border-bottom: 1px solid #808080;
  background: #dfdfdf;
}
.sidebar-nav a.active { font-weight: bold; }
.sidebar-footer { font-size: 10px; color: #808080; text-align: center; margin-top: auto; }

/* ── Main content area (Sunken) ── */
.main { 
  flex: 1; 
  background: #fff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  box-shadow: inset 1px 1px #000, inset -1px -1px #dfdfdf;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* ── Page header ── */
.page-header { margin-bottom: 16px; border-bottom: 1px dashed #c0c0c0; padding-bottom: 8px; }
.page-header h2 { font-size: 16px; font-weight: bold; margin-bottom: 2px; }
.page-header p { font-size: 12px; color: #808080; }

/* ── Data table ── */
table { width: 100%; border-collapse: collapse; }
thead th {
  text-align: left;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: normal;
  background: #c0c0c0;
  border-top: 1px solid #fff;
  border-left: 1px solid #fff;
  border-bottom: 1px solid #808080;
  border-right: 1px solid #808080;
}
tbody td {
  padding: 4px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f0f0f0;
  border-right: 1px solid #f0f0f0;
}
tbody tr:hover td { background: #000080; color: #fff; }

/* ── Stats row ── */
.stats-row { display: flex; gap: 20px; margin-bottom: 32px; }
.stat-box {
  flex: 1;
  background: #fff;
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  box-shadow: inset 1px 1px #000, inset -1px -1px #dfdfdf;
  display: flex; flex-direction: column;
}
.stat-box .stat-label { 
  background: #dfdfdf;
  color: #000;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: bold;
  padding: 4px 8px;
  border-bottom: 1px solid #808080;
}
.stat-box .stat-value { 
  padding: 16px 24px;
  font-size: 40px; font-weight: bold; 
  color: #000;
}

/* ── Group box (Fieldset) ── */
.group-box {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 12px;
  margin-bottom: 16px;
  position: relative;
}
.group-box-title {
  position: absolute;
  top: -8px; left: 8px;
  background: #fff;
  padding: 0 4px;
  font-size: 11px; color: #000;
}

/* ── Statusbar ── */
.statusbar {
  background: #c0c0c0;
  border-top: 1px solid #dfdfdf;
  display: flex;
  padding: 3px;
  gap: 4px;
}
.statusbar-field {
  border-top: 1px solid #808080;
  border-left: 1px solid #808080;
  border-right: 1px solid #fff;
  border-bottom: 1px solid #fff;
  padding: 2px 6px;
  font-size: 11px;
  color: #000;
  display: flex; align-items: center;
}
.statusbar-field.spring { flex: 1; }

@media (max-width: 768px) {
  html, body { padding: 0; }
  .window { height: 100vh; max-width: 100%; box-shadow: none; border: none; }
  .sidebar { display: none; }
}
