/* ==================== Variables ==================== */
:root {
  --accent: #4ade80;
  --accent-dim: #22c55e;
  --accent-glow: rgba(74, 222, 128, 0.35);
  --win-bg: #c0c0c0;
  --win-face: #d4d0c8;
  --win-titlebar: #000080;
  --win-titlebar-inactive: #808080;
  --win-hi: #ffffff;
  --win-lo: #808080;
  --win-lolo: #404040;
  --desktop-bg: #008080;
  --taskbar-h: 36px;
  --text: #000000;
  --text-white: #ffffff;
  --text-muted: #666666;
  --font-pixel: 'Fusion Pixel', 'VT323', 'Courier New', monospace;
  --font-mono: 'VT323', 'Courier New', monospace;
  --font: 'Fusion Pixel', -apple-system, 'Segoe UI', sans-serif;
}

/* ==================== Base ==================== */
html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--desktop-bg);
  cursor: default;
  user-select: none;
}

::selection { background: var(--accent); color: #000; }

/* ==================== Scanlines ==================== */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0.03) 0px,
    rgba(0, 0, 0, 0.03) 1px,
    transparent 1px,
    transparent 3px
  );
}

/* ==================== 3D Border Helpers ==================== */
.raised {
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
}

.sunken {
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

/* ==================== OS Desktop ==================== */
.os-desktop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: var(--taskbar-h);
  overflow: hidden;
}

.desktop-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    repeating-linear-gradient(0deg, transparent 0px, transparent 23px, rgba(255,255,255,0.04) 23px, rgba(255,255,255,0.04) 24px),
    repeating-linear-gradient(90deg, transparent 0px, transparent 23px, rgba(255,255,255,0.04) 23px, rgba(255,255,255,0.04) 24px),
    var(--desktop-bg);
}

/* ==================== Desktop Icons ==================== */
.desktop-icons {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  width: fit-content;
}

.desktop-icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 72px;
  padding: 6px 4px;
  border: 1px solid transparent;
  border-radius: 0;
  background: none;
  cursor: pointer;
  color: var(--text-white);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  font-family: var(--font-pixel);
  font-size: 12px;
}

.desktop-icon:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
}

.desktop-icon:active,
.desktop-icon.selected {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.4);
}

.desktop-icon[hidden] { display: none; }

.dicon-img {
  display: block;
  width: 32px;
  height: 32px;
  image-rendering: pixelated;
  filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.5));
}

/* Pixel art icons via SVG data URIs */
.dicon--status {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Crect x='2' y='2' width='28' height='28' rx='1' fill='%23c0c0c0' stroke='%23808080'/%3E%3Crect x='6' y='18' width='4' height='8' fill='%234ade80'/%3E%3Crect x='12' y='12' width='4' height='14' fill='%2322c55e'/%3E%3Crect x='18' y='8' width='4' height='18' fill='%234ade80'/%3E%3Crect x='24' y='14' width='4' height='12' fill='%2322c55e'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dicon--gallery {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Crect x='2' y='4' width='28' height='24' fill='%23fff' stroke='%23808080'/%3E%3Crect x='4' y='6' width='24' height='20' fill='%2387CEEB'/%3E%3Ccircle cx='22' cy='12' r='3' fill='%23FFD700'/%3E%3Cpath d='M4 22 L12 16 L18 20 L22 17 L28 22 L28 26 L4 26Z' fill='%232E8B57'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dicon--news {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath d='M6 2 L22 2 L26 6 L26 30 L6 30Z' fill='%23fff' stroke='%23808080'/%3E%3Cpath d='M22 2 L22 6 L26 6' fill='%23ddd' stroke='%23808080'/%3E%3Crect x='9' y='10' width='14' height='2' fill='%23333'/%3E%3Crect x='9' y='14' width='14' height='2' fill='%23999'/%3E%3Crect x='9' y='18' width='10' height='2' fill='%23999'/%3E%3Crect x='9' y='22' width='12' height='2' fill='%23999'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dicon--chat {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Cpath d='M4 6 L28 6 L28 22 L16 22 L10 28 L10 22 L4 22Z' fill='%23fff' stroke='%23808080'/%3E%3Crect x='8' y='11' width='16' height='2' fill='%234ade80'/%3E%3Crect x='8' y='15' width='12' height='2' fill='%23999'/%3E%3C/svg%3E") center/contain no-repeat;
}

.dicon--list {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' fill='none'%3E%3Crect x='4' y='2' width='24' height='28' fill='%23fff' stroke='%23808080'/%3E%3Crect x='7' y='7' width='4' height='4' fill='%23c0c0c0' stroke='%23808080'/%3E%3Crect x='7' y='14' width='4' height='4' fill='%234ade80' stroke='%23808080'/%3E%3Crect x='7' y='21' width='4' height='4' fill='%23c0c0c0' stroke='%23808080'/%3E%3Cpath d='M8 15 L9.5 17 L11 14' stroke='%23fff' stroke-width='1.5'/%3E%3Crect x='14' y='8' width='10' height='2' fill='%23333'/%3E%3Crect x='14' y='15' width='10' height='2' fill='%23333'/%3E%3Crect x='14' y='22' width='10' height='2' fill='%23333'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Start menu icons (16px) */
.si-icon {
  display: inline-block;
  width: 16px;
  height: 16px;
  vertical-align: middle;
  image-rendering: pixelated;
}

.si--welcome { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='1' y='2' width='14' height='10' fill='%23000080' stroke='%23808080'/%3E%3Crect x='3' y='4' width='10' height='6' fill='%23008080'/%3E%3Crect x='5' y='13' width='6' height='2' fill='%23c0c0c0'/%3E%3C/svg%3E") center/contain no-repeat; }
.si--status  { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='1' y='1' width='14' height='14' fill='%23c0c0c0' stroke='%23808080'/%3E%3Crect x='3' y='9' width='2' height='4' fill='%234ade80'/%3E%3Crect x='6' y='6' width='2' height='7' fill='%2322c55e'/%3E%3Crect x='9' y='4' width='2' height='9' fill='%234ade80'/%3E%3Crect x='12' y='7' width='2' height='6' fill='%2322c55e'/%3E%3C/svg%3E") center/contain no-repeat; }
.si--gallery { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='1' y='2' width='14' height='12' fill='%2387CEEB' stroke='%23808080'/%3E%3Ccircle cx='11' cy='6' r='2' fill='%23FFD700'/%3E%3Cpath d='M1 11L5 8L8 10L11 8L15 11V14H1Z' fill='%232E8B57'/%3E%3C/svg%3E") center/contain no-repeat; }
.si--news    { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M3 1L11 1L13 3L13 15L3 15Z' fill='%23fff' stroke='%23808080'/%3E%3Crect x='5' y='5' width='6' height='1' fill='%23333'/%3E%3Crect x='5' y='7' width='6' height='1' fill='%23999'/%3E%3Crect x='5' y='9' width='4' height='1' fill='%23999'/%3E%3C/svg%3E") center/contain no-repeat; }
.si--chat    { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Cpath d='M2 3L14 3L14 11L8 11L5 14L5 11L2 11Z' fill='%23fff' stroke='%23808080'/%3E%3Crect x='4' y='6' width='8' height='1' fill='%234ade80'/%3E%3Crect x='4' y='8' width='6' height='1' fill='%23999'/%3E%3C/svg%3E") center/contain no-repeat; }
.si--list    { background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16'%3E%3Crect x='2' y='1' width='12' height='14' fill='%23fff' stroke='%23808080'/%3E%3Crect x='4' y='4' width='2' height='2' fill='%234ade80'/%3E%3Crect x='4' y='8' width='2' height='2' fill='%23c0c0c0'/%3E%3Crect x='4' y='12' width='2' height='2' fill='%23c0c0c0'/%3E%3Crect x='7' y='4' width='5' height='1' fill='%23333'/%3E%3Crect x='7' y='8' width='5' height='1' fill='%23333'/%3E%3Crect x='7' y='12' width='5' height='1' fill='%23333'/%3E%3C/svg%3E") center/contain no-repeat; }

.dicon-label {
  text-align: center;
  line-height: 1.2;
  word-break: break-all;
}

/* ==================== OS Window ==================== */
.os-window {
  position: absolute;
  z-index: 10;
  display: flex;
  flex-direction: column;
  background: var(--win-face);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  box-shadow: 2px 2px 0 rgba(0,0,0,0.25);
  min-width: 260px;
  min-height: 120px;
}

.os-window[hidden] { display: none !important; }

.os-window.maximized {
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  transform: none !important;
  border-width: 0;
  box-shadow: none;
}

.os-window.focused { z-index: 20; }

/* ---- Title Bar ---- */
.window-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 22px;
  padding: 2px 3px;
  background: linear-gradient(90deg, var(--win-titlebar), #1084d0);
  flex-shrink: 0;
  cursor: default;
}

.os-window:not(.focused) .window-titlebar {
  background: var(--win-titlebar-inactive);
}

.window-title {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-white);
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

.wt-icon {
  font-size: 12px;
  line-height: 1;
}

.window-controls {
  display: flex;
  gap: 2px;
  flex-shrink: 0;
}

.win-btn {
  width: 18px;
  height: 16px;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1;
  text-align: center;
  color: var(--text);
  background: var(--win-face);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  cursor: pointer;
}

.win-btn:active {
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  padding: 1px 0 0 1px;
}

/* ---- Window Tabs ---- */
.window-tabs {
  display: flex;
  padding: 4px 6px 0;
  gap: 0;
  background: var(--win-face);
  flex-shrink: 0;
}

.wtab {
  padding: 4px 14px;
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--text);
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-face) var(--win-hi);
  border-bottom: none;
  cursor: pointer;
  position: relative;
  top: 2px;
  margin-bottom: -2px;
}

.wtab.active {
  background: var(--win-face);
  border-bottom-color: var(--win-face);
  top: 0;
  padding-bottom: 6px;
  z-index: 1;
}

/* ---- Window Toolbar ---- */
.window-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: var(--win-face);
  border-bottom: 1px solid var(--win-lo);
  flex-shrink: 0;
  flex-wrap: wrap;
  min-height: 28px;
}

.window-toolbar:empty { display: none; }

/* ---- Window Body ---- */
.window-body {
  flex: 1;
  min-height: 0;
  padding: 8px;
  overflow: auto;
  background: var(--text-white);
  margin: 3px;
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.window-body--scroll { overflow-y: auto; }

.window-body::-webkit-scrollbar { width: 16px; }
.window-body::-webkit-scrollbar-track {
  background: var(--win-face);
  border: 1px solid var(--win-lo);
}
.window-body::-webkit-scrollbar-thumb {
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
}

/* ---- Tab Pane ---- */
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ==================== Welcome Window ==================== */
.os-window--dialog {
  max-width: 90vw;
}

.welcome-body {
  padding: 16px 20px;
  background: var(--win-face);
  border: none;
  margin: 0;
}

.welcome-title {
  font-family: var(--font-pixel);
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.welcome-motd {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--text);
  color: var(--accent);
  min-height: 28px;
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.welcome-bar {
  height: 2px;
  background: linear-gradient(90deg, var(--win-lo), var(--win-face));
  margin: 12px 0;
}

.welcome-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}

.welcome-address {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wa-label {
  font-size: 12px;
  color: var(--text-muted);
}

.wa-value {
  font-family: var(--font-mono);
  font-size: 15px;
  color: var(--text);
  background: var(--text-white);
  padding: 2px 8px;
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.welcome-stats {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.ws-dot {
  display: flex;
  align-items: center;
  gap: 4px;
}

.ws-hud {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  animation: pixelBlink 1.5s step-end infinite;
}

.status-dot.offline { background: #666; animation: none; }

.hud-track {
  display: inline-block;
  width: 60px;
  height: 10px;
  background: var(--text);
  border: 1px solid var(--win-lo);
  position: relative;
}

.hud-fill {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  background: var(--accent);
  width: 0;
  transition: width 0.5s;
}

.hud-text {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text);
}

/* ==================== Stat Grid ==================== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.stat-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  background: var(--win-face);
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.stat-key {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-val {
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-dim);
}

/* ==================== Player List ==================== */
.player-list-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px 0;
}

.player-tag {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: var(--win-face);
  border: 1px solid var(--win-lo);
}

/* ==================== Gallery Grid ==================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}

.gallery-item {
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  cursor: pointer;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.gallery-item .gallery-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4px 6px;
  font-size: 11px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== News File List ==================== */
.window-body--split {
  display: flex;
  padding: 0;
  margin: 3px;
  border: none;
  gap: 0;
  background: transparent;
}

.split-list {
  width: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--text-white);
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  overflow-y: auto;
}

.split-preview {
  flex: 1;
  min-width: 0;
  background: var(--text-white);
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  margin-left: -2px;
  padding: 12px;
  overflow-y: auto;
}

.file-entry {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #eee;
}

.file-entry:hover { background: var(--accent-glow); }
.file-entry.active { background: var(--win-titlebar); color: var(--text-white); }

.file-icon { font-size: 14px; flex-shrink: 0; }

.file-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-date {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.file-entry.active .file-date { color: rgba(255,255,255,0.7); }

.file-pin {
  color: var(--accent-dim);
  font-size: 11px;
  flex-shrink: 0;
}

.preview-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
}

.preview-title {
  font-family: var(--font-pixel);
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text);
}

.post-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.post-body {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
}

.post-body img {
  max-width: 100%;
  height: auto;
  border: 1px solid var(--win-lo);
}

.cat-btn {
  padding: 2px 10px;
  font-family: var(--font-pixel);
  font-size: 12px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  cursor: pointer;
  color: var(--text);
}

.cat-btn.active,
.cat-btn:active {
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  background: var(--text-white);
}

/* ==================== Chat Room ==================== */
.chat-body {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 3px;
  border: none;
  background: transparent;
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px;
  background: var(--text-white);
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.chat-messages::-webkit-scrollbar { width: 16px; }
.chat-messages::-webkit-scrollbar-track { background: var(--win-face); }
.chat-messages::-webkit-scrollbar-thumb {
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
}

.chat-bubble {
  margin-bottom: 10px;
  max-width: 85%;
}

.chat-bubble-header {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 2px;
}

.chat-nick {
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dim);
}

.chat-time {
  font-size: 11px;
  color: var(--text-muted);
}

.chat-text {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text);
  padding: 6px 10px;
  background: var(--win-face);
  border: 1px solid var(--win-lo);
  word-break: break-word;
}

.chat-reply {
  margin-top: 4px;
  padding: 4px 8px;
  font-size: 12px;
  color: var(--text-muted);
  border-left: 2px solid var(--accent);
  background: rgba(0,0,0,0.03);
}

.chat-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
  font-size: 14px;
}

.chat-input {
  padding: 6px;
  background: var(--win-face);
  border-top: 2px solid var(--win-hi);
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.chat-fields {
  display: flex;
  gap: 4px;
}

.chat-fields input {
  flex: 1;
  min-width: 0;
}

.chat-compose {
  display: flex;
  gap: 4px;
  align-items: flex-end;
}

.chat-compose textarea {
  flex: 1;
  min-width: 0;
  resize: none;
}

.chat-compose .px-btn {
  align-self: stretch;
  min-width: 52px;
}

/* ==================== Whitelist Form ==================== */
.wl-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px;
}

.form-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.input-row {
  display: flex;
  gap: 4px;
}

.input-row input { flex: 1; min-width: 0; }

/* ==================== Check Result ==================== */
.check-result {
  margin-top: 8px;
  padding: 8px 12px;
  font-size: 13px;
}

.status-pending  { background: #ffe8a1; border-left: 3px solid #e0a800; }
.status-approved { background: #c3e6cb; border-left: 3px solid #28a745; }
.status-rejected { background: #e2e3e5; border-left: 3px solid #6c757d; }
.status-notfound { background: #f5f5f5; border-left: 3px solid #ccc; }

/* ==================== Form Inputs ==================== */
input[type="text"],
input[type="email"],
textarea,
select {
  font-family: var(--font);
  font-size: 13px;
  padding: 4px 6px;
  background: var(--text-white);
  color: var(--text);
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  outline: none;
}

input:focus, textarea:focus, select:focus {
  box-shadow: 0 0 0 1px var(--accent) inset;
}

select { cursor: pointer; }
textarea { resize: vertical; }

/* ==================== Pixel Button ==================== */
.px-btn {
  font-family: var(--font-pixel);
  font-size: 13px;
  padding: 4px 14px;
  color: var(--text);
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  cursor: pointer;
  white-space: nowrap;
}

.px-btn:active {
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  padding: 5px 13px 3px 15px;
}

.px-btn--sm {
  font-size: 12px;
  padding: 2px 10px;
}

.load-more {
  text-align: center;
  padding: 8px 0;
}

.empty-text {
  text-align: center;
  color: var(--text-muted);
  padding: 32px 0;
  font-size: 14px;
}

/* ==================== Taskbar ==================== */
.taskbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--taskbar-h);
  background: var(--win-bg);
  border-top: 2px solid;
  border-color: var(--win-hi) transparent transparent var(--win-hi);
  display: flex;
  align-items: center;
  padding: 2px 4px;
  gap: 0;
  z-index: 50;
}

.taskbar-start {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-family: var(--font-pixel);
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  cursor: pointer;
  flex-shrink: 0;
}

.taskbar-start:active,
.taskbar-start.active {
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
}

.start-pixel {
  color: var(--accent);
  font-size: 11px;
}

.taskbar-divider {
  width: 2px;
  height: 24px;
  margin: 0 4px;
  border-left: 1px solid var(--win-lo);
  border-right: 1px solid var(--win-hi);
  flex-shrink: 0;
}

.taskbar-tabs {
  flex: 1;
  min-width: 0;
  display: flex;
  gap: 2px;
  overflow: hidden;
}

.taskbar-tab {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 12px;
  max-width: 160px;
  font-family: var(--font-pixel);
  font-size: 12px;
  color: var(--text);
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
  min-width: 40px;
}

.taskbar-tab.active {
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  background: var(--win-face);
  font-weight: 700;
}

.taskbar-tray {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 6px;
  margin-left: auto;
  flex-shrink: 0;
  height: 100%;
  border: 2px solid;
  border-color: var(--win-lolo) var(--win-hi) var(--win-hi) var(--win-lolo);
  font-size: 12px;
  color: var(--text);
}

.tray-item { white-space: nowrap; }
.tray-item:empty { display: none; }
.tray-item a {
  color: var(--text);
  text-decoration: underline;
  font-size: 12px;
}

.tray-divider {
  width: 1px;
  height: 16px;
  background: var(--win-lo);
}

.tray-status {
  display: flex;
  align-items: center;
  gap: 4px;
}

.tray-dot {
  width: 6px;
  height: 6px;
}

/* ==================== Start Menu ==================== */
.start-menu {
  position: fixed;
  bottom: var(--taskbar-h);
  left: 4px;
  width: 220px;
  background: var(--win-bg);
  border: 2px solid;
  border-color: var(--win-hi) var(--win-lolo) var(--win-lolo) var(--win-hi);
  box-shadow: 3px 3px 0 rgba(0,0,0,0.25);
  z-index: 100;
  display: flex;
}

.start-menu[hidden] { display: none; }

.start-sidebar {
  width: 28px;
  background: var(--win-titlebar);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px 0;
}

.start-sidebar-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  color: var(--text-white);
  font-family: var(--font-pixel);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.start-items {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
}

.start-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  font-family: var(--font-pixel);
  font-size: 13px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
}

.start-item:hover {
  background: var(--win-titlebar);
  color: var(--text-white);
}

.start-item[hidden] { display: none; }

.si-icon { font-size: 16px; width: 20px; text-align: center; }

/* ==================== Animations ==================== */
@keyframes pixelBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
