/* =========================================================
   WESTBRIDGE TERMINAL v2 — retro OS chrome
   Colour scheme carried over from v1. All layout/markup is new.
   ========================================================= */

:root {
  --desktop-bg: #2b2b2e;
  --chrome-face: #c0c0c0;
  --chrome-face-dark: #9c9c9c;
  --chrome-shadow: #6f6f6f;
  --chrome-highlight: #ffffff;
  --chrome-darkest: #3a3a3a;
  --titlebar-start: #1c1c1e;
  --titlebar-end: #4c4c50;
  --titlebar-text: #e8e8ea;
  --taskbar-bg: #17171a;
  --taskbar-text: #e8e8ea;
  --accent: #5a5a60;
  --danger: #c0392b;
  --font-ui: Tahoma, "MS Sans Serif", Geneva, Verdana, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: var(--font-ui);
  background: #000;
  -webkit-font-smoothing: none;
}

body {
  display: flex;
  flex-direction: column;
}

/* ---------- TOP BAR ---------- */
#top-bar {
  height: 28px;
  flex: 0 0 auto;
  background: linear-gradient(to bottom, var(--titlebar-end), var(--titlebar-start));
  color: var(--titlebar-text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 12px;
  border-bottom: 2px solid var(--chrome-darkest);
  z-index: 100;
}

.top-bar-section { display: flex; align-items: center; gap: 6px; }

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2ecc71;
  box-shadow: 0 0 4px #2ecc71;
  display: inline-block;
}
.status-dot.disconnected {
  background: #e74c3c;
  box-shadow: 0 0 4px #e74c3c;
}

.status-connected { color: #a6f5c0; font-weight: bold; }
.status-disconnected { color: #ffb3ac; font-weight: bold; }

.top-label { white-space: nowrap; }
.pin-icon { display: inline-block; vertical-align: middle; }

/* Shared vertical divider — a real 1px bar, centered by the flex
   container instead of relying on a "|" glyph's font metrics. */
.vdivider {
  align-self: center;
  width: 1px;
  height: 14px;
  background: currentColor;
  opacity: 0.4;
  flex: 0 0 auto;
}

/* ---------- MAIN AREA ---------- */
#main-area {
  flex: 1 1 auto;
  position: relative;
  background: var(--desktop-bg);
  overflow: auto;
}

/* ---------- LOGIN SCREEN ---------- */
#login-screen {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
}

.login-panel {
  background: var(--chrome-face);
  border: 2px solid var(--chrome-darkest);
  box-shadow:
    inset 1px 1px 0 var(--chrome-highlight),
    inset -1px -1px 0 var(--chrome-shadow),
    4px 4px 10px rgba(0,0,0,0.5);
  width: 360px;
  max-width: 90vw;
}

.login-panel-titlebar {
  background: linear-gradient(to bottom, var(--titlebar-end), var(--titlebar-start));
  color: var(--titlebar-text);
  font-weight: bold;
  font-size: 13px;
  padding: 6px 10px;
  letter-spacing: 0.5px;
}

.login-panel-body {
  padding: 20px 18px;
  text-align: center;
  color: var(--chrome-darkest);
}

.login-panel-body p {
  font-size: 12px;
  margin: 0 0 16px;
  line-height: 1.5;
}

.login-btn {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: bold;
  color: #fff;
  background: var(--accent);
  border: 2px solid var(--chrome-darkest);
  box-shadow: inset 1px 1px 0 rgba(255,255,255,0.4), inset -1px -1px 0 rgba(0,0,0,0.3);
  padding: 10px 18px;
  cursor: pointer;
  width: 100%;
}
.login-btn:active { box-shadow: inset -1px -1px 0 rgba(255,255,255,0.4), inset 1px 1px 0 rgba(0,0,0,0.3); }
.login-btn:disabled { opacity: 0.6; cursor: default; }

.restriction-banner {
  width: 360px;
  max-width: 90vw;
  background: #2a0d0d;
  border: 2px solid var(--danger);
  color: #ff9a90;
  font-size: 12px;
  padding: 12px 14px;
  line-height: 1.5;
  display: none;
}
.restriction-banner.visible { display: block; }
.restriction-banner strong { color: #ffb3ac; }

.login-generic-error {
  width: 360px;
  max-width: 90vw;
  background: #2a1c0d;
  border: 2px solid #c08a2b;
  color: #ffd28a;
  font-size: 12px;
  padding: 10px 14px;
  display: none;
}
.login-generic-error.visible { display: block; }

/* ---------- MAIN APP SHELL (post-login) ---------- */
#app-shell {
  display: none;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  color: var(--taskbar-text);
  font-size: 13px;
  text-align: center;
  flex-direction: column;
  gap: 8px;
}
#app-shell .placeholder-title { font-size: 16px; font-weight: bold; color: #fff; }

/* ---------- BOTTOM BAR ---------- */
#bottom-bar {
  height: 30px;
  flex: 0 0 auto;
  background: var(--taskbar-bg);
  border-top: 2px solid var(--chrome-darkest);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 10px;
  gap: 14px;
  color: var(--taskbar-text);
  font-size: 12px;
  z-index: 100;
}

.taskbar-btn {
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--chrome-darkest);
  background: var(--chrome-face);
  border: 2px solid var(--chrome-darkest);
  box-shadow: inset 1px 1px 0 var(--chrome-highlight), inset -1px -1px 0 var(--chrome-shadow);
  padding: 3px 10px;
  cursor: pointer;
}
.taskbar-btn:active { box-shadow: inset -1px -1px 0 var(--chrome-highlight), inset 1px 1px 0 var(--chrome-shadow); }

.taskbar-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  line-height: 0;
}
.taskbar-icon-btn svg { display: block; }

#bottom-clock,
#bottom-date {
  font-family: var(--font-ui);
  color: var(--titlebar-text);
  white-space: nowrap;
}

.hidden { display: none !important; }
