/* ===== Public theme: webcore / Windows XP (Luna) ===== */
:root {
  --xp-titlebar: linear-gradient(180deg, #0f5fef 0%, #3a93ff 14%, #1e6fee 45%, #0052d8 82%, #0040c4 100%);
  --xp-body: #ece9d8;
  --xp-border: #0831d9;
  --xp-btn: linear-gradient(180deg, #ffffff 0%, #ece9d8 45%, #d6d3c0 55%, #ece9d8 100%);
  --xp-btn-border: #716f64;
}

* { box-sizing: border-box; }

/* Keyboard focus ring, theme-matched (dashed, uses the same blue as the
   window border) -- additive across every page, doesn't touch layout or
   any existing color default. */
:focus-visible {
  outline: 2px dashed var(--xp-border);
  outline-offset: 2px;
}

body {
  margin: 0;
  padding: 1.5em 1em 4em;
  min-height: 100vh;
  background: linear-gradient(180deg, #3a6ea5 0%, #7ec0ee 32%, #bfe3a0 52%, #6fae4a 74%, #4c8f37 100%);
  font-family: Tahoma, Verdana, "MS Sans Serif", sans-serif;
  color: #000;
}

.page {
  max-width: 760px;
  margin: 0 auto;
}

/* Data-dense admin pages (currently just Deals) opt into this via
   base_retro.html's {% block page_class %} -- the landing/login/join XP
   "window" look stays at the narrow 760px default everywhere else. An
   8-column listings table squeezed into 760px is what made every column
   (title especially) unreadably skinny; this gives it room without
   touching the theme's chrome/colors/type. */
.page.page-wide {
  max-width: 1400px;
}
@media (max-width: 1450px) {
  .page.page-wide { max-width: calc(100% - 2em); }
}

/* ----- XP "window" chrome ----- */
.xp-window {
  background: var(--xp-body);
  border: 1px solid var(--xp-border);
  border-radius: 8px 8px 3px 3px;
  box-shadow: 2px 2px 10px rgba(0,0,0,0.4);
  margin-bottom: 1em;
  overflow: hidden;
}

.xp-titlebar {
  background: var(--xp-titlebar);
  color: #fff;
  font-weight: bold;
  font-size: 0.95em;
  padding: 0.35em 0.5em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-shadow: 1px 1px 1px rgba(0,0,0,0.4);
  border-radius: 7px 7px 0 0;
}
.xp-titlebar .xp-title-text {
  display: flex;
  align-items: center;
  gap: 0.4em;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.xp-controls {
  display: flex;
  gap: 3px;
}
.xp-controls span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  height: 1.1em;
  background: linear-gradient(180deg, #fefefe, #d8d8d8);
  border: 1px solid #7a7a7a;
  border-radius: 2px;
  font-size: 0.7em;
  color: #000;
  font-weight: bold;
}

.xp-body {
  padding: 1em;
}

/* ----- Header / branding ----- */
.site-title {
  font-size: 2.4em;
  font-weight: bold;
  text-align: center;
  margin: 0.1em 0 0;
  color: #0a246a;
  text-shadow: 1px 1px 0 #fff;
  letter-spacing: 0.02em;
}

.tagline {
  text-align: center;
  margin: 0.2em 0 0.6em;
  color: #333;
  font-style: italic;
}

.top-marquee {
  background: linear-gradient(180deg, #fefefe, #ece9d8);
  border-bottom: 1px solid #a0a0a0;
  color: #0a246a;
  font-weight: bold;
  padding: 0.3em 0;
}

/* ----- Tiles (like desktop icons / shortcuts) ----- */
.tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8em;
  justify-content: center;
  padding: 0.5em 0;
}

.tile {
  display: block;
  width: 140px;
  text-align: center;
  background: var(--xp-btn);
  color: #000;
  text-decoration: none;
  padding: 0.7em 0.5em;
  border: 1px solid var(--xp-btn-border);
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.25);
}
.tile:active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
}
.tile-icon { font-size: 2em; }
.tile-name { font-weight: bold; }
.tile-desc { font-size: 0.8em; color: #333; }

/* ----- Generic panel (form containers etc.) ----- */
.panel {
  background: var(--xp-body);
  border: 1px solid var(--xp-border);
  border-radius: 6px;
  padding: 1em;
  margin: 1em 0;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.3);
}
.panel h2 {
  margin-top: 0;
  color: #0a246a;
}

.btn-3d {
  display: inline-block;
  background: var(--xp-btn);
  color: #000;
  text-decoration: none;
  padding: 0.4em 1.1em;
  border: 1px solid var(--xp-btn-border);
  border-radius: 4px;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.25);
  cursor: pointer;
  font-size: 1em;
  font-family: Tahoma, Verdana, sans-serif;
}
.btn-3d:active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
}

input, textarea {
  font-family: Tahoma, Verdana, sans-serif;
  padding: 0.35em;
  border: 1px solid #7a7a7a;
  border-radius: 2px;
}

.error { color: #cc0000; font-weight: bold; }

.status-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.status-list li {
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.35em 0.2em;
  border-bottom: 1px solid #d6d3c0;
}
.status-list li:last-child { border-bottom: none; }
.status-icon {
  font-size: 1.3em;
  width: 1.4em;
  text-align: center;
  flex-shrink: 0;
}
.status-dot {
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.3);
  flex-shrink: 0;
}
.dot-green { background: radial-gradient(circle at 30% 30%, #7fff7f, #1a9c1a); box-shadow: 0 0 4px #2ecc2e; }
.dot-red   { background: radial-gradient(circle at 30% 30%, #ff9a9a, #b31010); box-shadow: 0 0 4px #d63030; }
.dot-grey  { background: radial-gradient(circle at 30% 30%, #e0e0e0, #909090); }
.status-text { font-size: 0.92em; }

.site-footer {
  text-align: center;
  padding: 0.5em 0;
  color: #333;
  font-size: 0.85em;
}

.counter {
  font-family: "Courier New", monospace;
  background: #000;
  color: #0f0;
  padding: 0.15em 0.4em;
  border: 1px solid #333;
  letter-spacing: 0.1em;
  border-radius: 2px;
}

/* ----- Fake taskbar ----- */
.xp-taskbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 34px;
  background: linear-gradient(180deg, #245edb 0%, #3a93ff 15%, #1941a5 100%);
  border-top: 1px solid #6fa8ff;
  display: flex;
  align-items: center;
  padding: 0 0.4em;
  gap: 0.6em;
  z-index: 100;
  font-size: 0.85em;
  color: #fff;
}
.xp-start {
  background: linear-gradient(180deg, #3fbf3f, #1e8c1e);
  color: #fff;
  font-weight: bold;
  font-style: italic;
  padding: 0.3em 1em;
  border-radius: 0 10px 10px 0;
  border: 1px solid #145214;
}
.xp-clock {
  margin-left: auto;
  background: #1941a5;
  border: 1px solid #6fa8ff;
  padding: 0.2em 0.6em;
  border-radius: 2px;
}

/* ===== Admin console (XP-styled, denser/functional) ===== */
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #a0a0a0;
  padding-bottom: 0.5em;
  margin-bottom: 0.8em;
}
/* Lets a table go as wide as it needs on a narrow viewport (scrolling
   inside this box) instead of forcing the whole page to scroll sideways or
   squeezing every column back down to unreadable. */
.xp-table-wrap {
  overflow-x: auto;
}
.xp-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}
.xp-table th, .xp-table td {
  border: 1px solid #a0a0a0;
  padding: 0.45em 0.7em;
  text-align: left;
  font-size: 0.95em;
  line-height: 1.35;
  /* Titles wrap onto a second line instead of clipping -- with the wide
     container above there's finally room for that to look right. */
  overflow-wrap: break-word;
}
.xp-table th {
  background: linear-gradient(180deg, #f5f4ee, #d6d3c0);
}
/* Only on the wide listings tables (Deals), and only once the viewport is
   wide enough for a fixed 8-column split to make sense. table-layout:fixed
   divides the AVAILABLE width by the stated percentages no matter how
   little of it there is -- on a phone-width screen that left ~40-50px for
   columns like "Source"/"Price"/"Location", so every header word wrapped
   letter-by-letter down the column (reported live on a real phone,
   2026-08-14). Below the breakpoint this falls back to table-layout:auto
   (the default), so the table sizes to its natural content width instead
   and .xp-table-wrap's overflow-x:auto lets it scroll sideways -- exactly
   the behavior xp-table-wrap was already built for, just previously
   defeated by table-layout:fixed forcing a squeeze instead of a scroll.
   Left off the narrow pages' plain label/value xp-tables (admin.html,
   deal_detail.html) entirely, which read fine at their existing
   proportions regardless of viewport. */
@media (min-width: 700px) {
  .page-wide .xp-table {
    table-layout: fixed;
  }
  .page-wide .xp-table th:first-child, .page-wide .xp-table td:first-child {
    width: 34%;
  }
}
.req-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #d6d3c0;
  padding: 0.5em 0.2em;
  gap: 0.5em;
}
.req-row:last-child { border-bottom: none; }

/* ----- Property-sheet tabs (classic Windows tab control) ----- */
.xp-tabstrip {
  display: flex;
  gap: 2px;
  padding: 0.6em 0.4em 0;
  flex-wrap: wrap;
}
.xp-tab {
  background: var(--xp-btn);
  border: 1px solid var(--xp-btn-border);
  border-bottom: none;
  border-radius: 5px 5px 0 0;
  padding: 0.45em 1em;
  cursor: pointer;
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 0.92em;
  color: #000;
  position: relative;
  top: 1px;
}
.xp-tab .xp-tab-badge {
  display: inline-block;
  min-width: 1.3em;
  margin-left: 0.4em;
  padding: 0 0.3em;
  border-radius: 8px;
  background: #b31010;
  color: #fff;
  font-size: 0.8em;
  font-weight: bold;
  text-align: center;
}
.xp-tab.active {
  background: var(--xp-body);
  border-bottom: 1px solid var(--xp-body);
  font-weight: bold;
  z-index: 2;
}
.xp-tab:not(.active):hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f1e6 100%);
}
.xp-tabpanel-frame {
  border-top: 1px solid var(--xp-btn-border);
  padding-top: 0.9em;
}
.xp-tabpanel { display: none; }
.xp-tabpanel.active { display: block; }

/* ----- Compact job-result breakdown (Soulseek panel) ----- */
.job-result {
  border: 1px solid #d6d3c0;
  border-radius: 4px;
  margin-bottom: 0.5em;
  background: #fff;
}
.job-result summary {
  cursor: pointer;
  padding: 0.4em 0.6em;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex-wrap: wrap;
}
.job-result summary .job-name { font-weight: bold; }
.job-result summary .job-time { color: #555; font-size: 0.85em; }
.job-result-body { padding: 0.2em 0.8em 0.6em; font-size: 0.88em; }
.job-result-body ul { margin: 0.2em 0 0.5em; padding-left: 1.3em; }
.pill {
  display: inline-block;
  padding: 0.1em 0.5em;
  border-radius: 8px;
  font-size: 0.82em;
  font-weight: bold;
}
.pill-ok { background: #dcf3dc; color: #1a6b1a; }
.pill-warn { background: #fff2cf; color: #8a6300; }
.pill-bad { background: #fadada; color: #a3161e; }

/* ===== Admin console visual cleanup (2026-08-14) =====
   Everything below is scoped to admin.html-only classes (job-result,
   req-row, panel-beta, quick-launch, balloon, mc-*, xp-table-zebra) or is
   a new class name that nothing else references yet -- nothing here
   redefines .panel/.status-list/.tile/.xp-table's shared base rules, so
   landing/login/join/deals keep their existing look untouched. */

/* A little "secondary heading" for subsections inside a panel (was three
   different inline style="" grays scattered around the Soulseek panel). */
.panel .subhead {
  margin: 1em 0 0.4em;
  color: #0a246a;
  font-size: 1em;
}
.subhead-desc {
  margin: 0 0 0.6em;
  font-size: 0.88em;
  color: #444;
}

/* ----- "Phase 1 / admin-only testing" panels: a corner ribbon instead of
   an all-over dashed border. Same signal (this is off to the side, not
   production-grade), less visual noise, reads as a deliberate QA/beta
   sticker rather than a placeholder someone forgot to finish. ----- */
.panel-beta {
  position: relative;
  overflow: hidden;
  overflow-wrap: break-word;
  border-top: 3px solid #b8860b;
}
/* The ribbon's rotated tail reaches down into the panel's top-right corner
   -- give the heading and the first line of body text room so it doesn't
   paint over either. */
.panel-beta > h2,
.panel-beta > p:first-of-type {
  padding-right: 5.5em;
}
.panel-beta::after {
  content: "TESTING";
  position: absolute;
  top: 0.75em;
  right: -2.75em;
  transform: rotate(45deg);
  background: #b8860b;
  color: #fff;
  font-size: 0.66em;
  font-weight: bold;
  letter-spacing: 0.08em;
  padding: 0.15em 3em;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  pointer-events: none;
}

/* ----- Quick Access launcher cards (was a <ul class="status-list"> being
   used for two link items with captions -- status-list means "here's a
   live status dot per row", these rows have no status, so borrowing that
   component was a mismatch). ----- */
.quick-launch {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7em;
  margin-top: 0.6em;
}
.quick-launch-item {
  display: flex;
  align-items: center;
  gap: 0.6em;
  flex: 1 1 16em;
  background: var(--xp-btn);
  border: 1px solid var(--xp-btn-border);
  border-radius: 5px;
  padding: 0.6em 0.8em;
  text-decoration: none;
  color: #000;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.25);
}
.quick-launch-item:hover {
  background: linear-gradient(180deg, #ffffff 0%, #f3f1e6 100%);
}
.quick-launch-item:active {
  box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4);
}
.quick-launch-icon { font-size: 1.6em; flex-shrink: 0; }
.quick-launch-name { font-weight: bold; display: block; }
.quick-launch-desc { font-size: 0.82em; color: #333; display: block; font-weight: normal; }
.quick-launch-text { display: flex; flex-direction: column; gap: 0.1em; }

/* ----- XP-style balloon notification, for one-shot feedback messages
   (Soulseek queue result) that were plain color:#b00/#080 paragraphs --
   this is the same shape as a real Windows XP taskbar balloon tip, which
   is exactly what this page is already pastiching everywhere else. ----- */
.balloon {
  position: relative;
  margin: 0 0 1em 0.6em;
  padding: 0.55em 0.9em;
  border-radius: 4px;
  border: 1px solid #e0c840;
  background: #fffef0;
  color: #5a4a00;
  font-size: 0.92em;
  box-shadow: 1px 1px 4px rgba(0,0,0,0.2);
}
.balloon::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 1.3em;
  top: -6px;
  width: 12px;
  height: 12px;
  background: inherit;
  border-left: inherit;
  border-top: inherit;
  transform: rotate(45deg);
}
.balloon-error {
  border-color: #d98a8a;
  background: #fff2f2;
  color: #8a1010;
}

/* ----- Pending-request rows: hover highlight + an icon, so this reads as
   a considered list-of-people component instead of a bare flex row. ----- */
.req-row-info {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.req-row-actions {
  display: flex;
  gap: 0.4em;
  flex-shrink: 0;
}
.req-row:hover {
  background: rgba(10, 36, 106, 0.06);
}

/* Zebra striping, opt-in only (the Users table here, not Deals' wide
   listings tables, which already have their own established look). */
.xp-table-zebra tr:nth-child(even) td {
  background: #f5f4ee;
}

/* ----- Job-result disclosure rows (Soulseek import history). Native
   <details>/<summary> markers are a default browser affordance; this
   swaps the triangle for a literal Explorer-treeview plus/minus box and
   gives the summary row a proper two-line layout (name+time, then pills)
   instead of everything wrapping together on one line. ----- */
.job-result summary {
  list-style: none;
}
.job-result summary::-webkit-details-marker {
  display: none;
}
.job-result summary::marker {
  content: "";
}
.job-result summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.95em;
  height: 0.95em;
  flex-shrink: 0;
  border: 1px solid #716f64;
  border-radius: 1px;
  background: #fff;
  font-family: "Courier New", monospace;
  font-size: 0.8em;
  font-weight: bold;
  color: #0a246a;
}
.job-result[open] summary::before {
  content: "\2212"; /* minus sign */
}
.job-result:hover summary,
.job-result[open] summary {
  background: linear-gradient(180deg, #e9f1fc 0%, #d8e7fb 100%);
}
.job-result-main {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  flex: 1 1 auto;
  min-width: 10em;
}
.job-result-pills {
  display: flex;
  align-items: center;
  gap: 0.35em;
  flex-wrap: wrap;
}
.job-total { color: #666; font-size: 0.85em; }
.reason-note { color: #888; }

/* ----- Minecraft RCON console: was three inline style="" blocks; also
   gives the output pane a thin terminal title bar for a bit more DOS-box
   character (in keeping with an XP desktop's "run a console" moment)
   without changing how #mc-output/#mc-form are targeted by the page's
   own JS. ----- */
.mc-console {
  border: 1px solid #716f64;
  border-radius: 3px;
  overflow: hidden;
  background: #111;
}
.mc-console-bar {
  background: linear-gradient(180deg, #2c2c2c, #161616);
  color: #7fbf7f;
  font-family: "Courier New", monospace;
  font-size: 0.78em;
  letter-spacing: 0.03em;
  padding: 0.3em 0.6em;
  border-bottom: 1px solid #333;
}
.mc-output {
  color: #0f0;
  font-family: "Courier New", monospace;
  font-size: 0.85em;
  padding: 0.6em;
  height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
}
.mc-form {
  margin-top: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.mc-prompt {
  font-family: "Courier New", monospace;
  font-weight: bold;
  color: #0a246a;
}
.mc-form input[type="text"] {
  flex: 1;
}
