/* CONNECTCHAT 98 — Complete Integrated Stylesheet (Phases 1–5) */
:root {
  --win-grey: #C0C0C0;
  --win-light: #DFDFDF;
  --win-highlight: #FFFFFF;
  --win-dark: #808080;
  --win-shadow: #000000;
  --win-navy: #000080;
  --win-blue: #0000AA;
  --win-teal: #008080;
  --win-yellow: #FFFFCC;
  --win-green: #008000;
  --win-red: #800000;
  --font-sys: "MS Sans Serif", "Tahoma", "Arial", sans-serif;
  --font-mono: "Courier New", monospace;
}
* { box-sizing: border-box; border-radius: 0 !important; }
html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  background: var(--win-teal); color: var(--win-shadow);
  font-family: var(--font-sys); font-size: 12px; line-height: 1.35;
}
.hidden { display: none !important; }
.win95-window {
  background: var(--win-grey);
  border-top: 2px solid var(--win-highlight);
  border-left: 2px solid var(--win-highlight);
  border-right: 2px solid var(--win-shadow);
  border-bottom: 2px solid var(--win-shadow);
  box-shadow: inset 1px 1px 0 var(--win-light), inset -1px -1px 0 var(--win-dark);
  padding: 2px;
}
.win95-bevel-in {
  background: var(--win-highlight);
  border-top: 2px solid var(--win-dark);
  border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-highlight);
  border-bottom: 2px solid var(--win-highlight);
}
.titlebar {
  background: linear-gradient(90deg, var(--win-navy), #1084D0);
  color: #FFF; font-weight: bold; padding: 3px 5px;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none; cursor: move;
}
.titlebar-controls { display: flex; gap: 2px; }
.win-ctrl-btn, .win-button {
  background: var(--win-grey); color: #000; font-family: var(--font-sys); font-size: 11px;
  border-top: 2px solid var(--win-highlight); border-left: 2px solid var(--win-highlight);
  border-right: 2px solid var(--win-shadow); border-bottom: 2px solid var(--win-shadow);
  padding: 2px 8px; cursor: pointer;
}
.win-ctrl-btn { padding: 0 5px; font-weight: bold; }
.win-button:active, .win-ctrl-btn:active {
  border-top: 2px solid var(--win-shadow); border-left: 2px solid var(--win-shadow);
  border-right: 2px solid var(--win-highlight); border-bottom: 2px solid var(--win-highlight);
}
.win-input, .win-select, .win-textarea {
  background: #FFF; color: #000; font-family: var(--font-sys); font-size: 12px;
  border-top: 2px solid var(--win-dark); border-left: 2px solid var(--win-dark);
  border-right: 2px solid var(--win-highlight); border-bottom: 2px solid var(--win-highlight);
  padding: 3px 5px; width: 100%;
}
.menubar {
  display: flex; gap: 2px; background: var(--win-grey);
  border-bottom: 1px solid var(--win-dark); padding: 2px 4px; position: relative;
}
.menu-item { position: relative; padding: 2px 7px; cursor: pointer; }
.menu-item:hover { background: var(--win-navy); color: #FFF; }
.menu-dropdown {
  position: absolute; top: 100%; left: 0; min-width: 195px; z-index: 900;
  background: var(--win-grey); color: #000;
  border-top: 2px solid var(--win-highlight); border-left: 2px solid var(--win-highlight);
  border-right: 2px solid var(--win-shadow); border-bottom: 2px solid var(--win-shadow);
  padding: 2px;
}
.menu-dropdown button {
  display: block; width: 100%; text-align: left; background: transparent; border: 0;
  padding: 4px 8px; font-family: var(--font-sys); font-size: 12px; cursor: pointer;
}
.menu-dropdown button:hover { background: var(--win-navy); color: #FFF; }
.desktop-workspace {
  display: grid; grid-template-columns: 310px 1fr; gap: 8px;
  padding: 8px; height: calc(100vh - 30px); overflow: hidden;
}
.status-dot { display: inline-block; width: 9px; height: 9px; border: 1px solid #000; margin-right: 4px; }
.st-online { background: #00C000; }
.st-away, .st-brb, .st-lunch { background: #FFD700; }
.st-busy, .st-phone, .st-dnd { background: #D00000; }
.st-offline, .st-invisible { background: #808080; }
.buddy-list-box { height: 290px; overflow-y: auto; padding: 4px; background: #FFF; }
.buddy-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3px 4px; cursor: pointer; border-bottom: 1px dotted #E0E0E0;
}
.buddy-row:hover, .buddy-row.active { background: var(--win-navy); color: #FFF; }
.chat-windows-dock {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 8px; height: 100%; overflow-y: auto; align-content: start;
}
.chat-win { display: flex; flex-direction: column; height: 460px; resize: both; overflow: hidden; }
.chat-transcript { flex: 1; overflow-y: auto; padding: 6px; background: #FFF; font-size: 12px; }
.msg-row { margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px dotted #DDD; }
.msg-meta { font-size: 11px; color: #404040; display: flex; justify-content: space-between; }
.msg-sender { font-weight: bold; color: var(--win-navy); }
.msg-row.mine .msg-sender { color: #800000; }
.statusbar {
  display: flex; justify-content: space-between; gap: 6px;
  background: var(--win-grey); border-top: 1px solid var(--win-dark); padding: 2px 6px; font-size: 11px;
}
.status-cell {
  border-top: 1px solid var(--win-dark); border-left: 1px solid var(--win-dark);
  border-right: 1px solid var(--win-highlight); border-bottom: 1px solid var(--win-highlight);
  padding: 1px 6px;
}
.taskbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 28px;
  background: var(--win-grey); border-top: 2px solid var(--win-highlight);
  display: flex; align-items: center; justify-content: space-between; padding: 2px 4px; z-index: 1000;
}
.taskbar-tasks { display: flex; gap: 4px; overflow-x: auto; flex: 1; margin: 0 6px; }
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.35);
  display: flex; align-items: center; justify-content: center; z-index: 1200; padding: 10px;
}
.modal-box { width: 100%; max-width: 540px; max-height: 90vh; overflow-y: auto; }
.progress-track { height: 16px; padding: 2px; background: #FFF; border: 1px solid #000; }
.progress-fill {
  height: 100%; width: 0%;
  background: repeating-linear-gradient(90deg, var(--win-navy) 0 10px, var(--win-grey) 10px 12px);
  transition: width 0.2s steps(10);
}
.toast-popup { position: fixed; right: 10px; bottom: 34px; width: 280px; z-index: 1300; }
@keyframes ccShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 4px); }
  40% { transform: translate(6px, -4px); }
  60% { transform: translate(-5px, -3px); }
  80% { transform: translate(5px, 3px); }
}
.cc-shake { animation: ccShake 0.6s linear; }
@media (max-width: 820px) {
  .desktop-workspace { grid-template-columns: 1fr; height: auto; min-height: calc(100vh - 30px); overflow-y: auto; }
  .chat-win { height: 420px; resize: none; }
}
