/* osys.css — terminal/console aesthetic for osys.duckdns.org
 *
 * DISTINCT from on1.uno (cyberpunk-Scandinavian) and nrs.on1.uno
 * (Swedish-newspaper). Visual fingerprint:
 *   - Pure black background. No starfield. No radial gradient.
 *   - Monochrome terminal green (#00ff66) as primary ink.
 *   - IBM Plex Mono dominant everywhere. No serif.
 *   - Zero border-radius. Sharp corners only.
 *   - Dense info-grid. Tight padding.
 *   - Always-on status bar (top) + faux prompt (bottom).
 *   - No animations beyond a single 1Hz caret blink.
 *
 * This flavor exists deliberately so that a viewer cannot mistake
 * osys.duckdns.org for on1.uno. The visual "feel" is a 1980s sysadmin
 * console, not a 2026 SaaS landing.
 */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:           #000000;
  --bg-line:      #001a08;   /* very subtle bg lift for status bar */
  --bg-tile:      #050805;   /* near-black with green undertone */
  --bg-tile-hi:  #0a1a0a;    /* hover state */
  --ink:          #00ff66;   /* primary terminal green */
  --ink-2:        #22cc44;   /* secondary green */
  --dim:          #5a7a60;   /* muted green */
  --rule:         #1a3a20;   /* line color */
  --warn:         #ffe000;   /* amber for warnings only */
  --critical:     #ff3a3a;   /* red for critical only */

  --font-mono:    "IBM Plex Mono", "Courier New", monospace;
  --font-display: "IBM Plex Mono", "Courier New", monospace;  /* yes, all mono */

  --pad-x:        12px;
  --pad-y:        8px;
  --line-h:       1.45;
}

html, body {
  height: 100%;
  background: var(--bg);
  color: var(--ink);
}

body {
  font-family: var(--font-mono);
  font-size: 13.5px;
  line-height: var(--line-h);
  letter-spacing: 0;
  overflow-x: hidden;
  /* faint CRT scanline texture — pure CSS gradient, no image */
  background-image: repeating-linear-gradient(
    0deg,
    rgba(0, 0, 0, 0) 0px,
    rgba(0, 0, 0, 0) 2px,
    rgba(0, 255, 102, 0.018) 2px,
    rgba(0, 255, 102, 0.018) 3px
  );
}

/* ───────────────────────────────────────────────────────────────
   STATUS BAR — always-on at top
   Format: OSYS [ROOT] <date>  uptime <X>  load <Y>  user: o  auth: <Z>
   ─────────────────────────────────────────────────────────────── */
.statusbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-line);
  border-bottom: 1px solid var(--ink-2);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: baseline;
}

.statusbar .sb-prompt {
  color: var(--ink);
  font-weight: 600;
}
.statusbar .sb-token {
  color: var(--ink-2);
}
.statusbar .sb-token strong {
  color: var(--ink);
  font-weight: 600;
}
.statusbar .sb-spacer {
  flex: 1;
}
.statusbar .sb-link {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dotted var(--ink-2);
}
.statusbar .sb-link:hover { color: var(--ink); border-bottom-style: solid; }

/* ───────────────────────────────────────────────────────────────
   PROMPT — bash-like ls header above the grid
   ─────────────────────────────────────────────────────────────── */
main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px 14px 80px;
  position: relative;
  z-index: 1;
}

.prompt-line {
  color: var(--ink);
  font-size: 14px;
  margin: 12px 0 18px;
  letter-spacing: 0.02em;
}
.prompt-line .pl-prompt { color: var(--ink-2); }
.prompt-line .pl-cmd    { color: var(--ink); }
.prompt-line .pl-arg    { color: var(--warn); }

/* ───────────────────────────────────────────────────────────────
   GROUP — ASCII rule + label
   [GROUP] ─────────────────────────────────────────────────
   ─────────────────────────────────────────────────────────────── */
.osys-group {
  margin: 22px 0;
}

.osys-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12.5px;
  letter-spacing: 0.05em;
}

.osys-group-tag {
  color: var(--warn);
  font-weight: 600;
  text-transform: uppercase;
}
.osys-group-title {
  color: var(--ink);
  font-weight: 500;
}
.osys-group-rule {
  flex: 1;
  border-top: 1px dashed var(--rule);
  margin-top: 7px;
  margin-left: 4px;
}
.osys-group-count {
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}

/* ───────────────────────────────────────────────────────────────
   GRID — dense, no gap. Each cell is a tile.
   Width is auto-fill on 260px min — typically 4 cols on desktop.
   ─────────────────────────────────────────────────────────────── */
.osys-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 6px;
}

.osys-cell {
  display: block;
  padding: var(--pad-y) var(--pad-x);
  background: var(--bg-tile);
  border: 1px dashed var(--rule);
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  position: relative;
  transition: background 0.1s linear, border-color 0.1s linear;
}

.osys-cell:hover {
  background: var(--bg-tile-hi);
  border-color: var(--ink);
  border-style: solid;
}

.osys-cell .cell-name {
  display: block;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.osys-cell .cell-path {
  display: block;
  color: var(--dim);
  font-size: 11.5px;
  letter-spacing: 0.02em;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.osys-cell .cell-meta {
  display: block;
  color: var(--ink-2);
  font-size: 11px;
  margin-top: 4px;
  letter-spacing: 0.02em;
}

.osys-cell .cell-status {
  position: absolute;
  top: 6px;
  right: 8px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dim);
}

.osys-cell.is-up    .cell-status { color: var(--ink); }
.osys-cell.is-warn  .cell-status { color: var(--warn); }
.osys-cell.is-down  .cell-status { color: var(--critical); }

/* Group-flag accents (left edge) */
.osys-group.g-infra   .osys-cell { border-left: 3px solid var(--ink-2); }
.osys-group.g-money   .osys-cell { border-left: 3px solid var(--warn); }
.osys-group.g-dash    .osys-cell { border-left: 3px solid var(--ink); }
.osys-group.g-sys     .osys-cell { border-left: 3px solid var(--dim); }
.osys-group.g-links   .osys-cell { border-left: 3px solid var(--critical); border-left-style: dashed; }

/* ───────────────────────────────────────────────────────────────
   FAUX PROMPT — fixed bottom
   ─────────────────────────────────────────────────────────────── */
.prompt-bottom {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--bg-line);
  border-top: 1px solid var(--ink-2);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-2);
  letter-spacing: 0.04em;
  z-index: 100;
}

.prompt-bottom .pb-caret {
  display: inline-block;
  width: 7px;
  height: 12px;
  background: var(--ink);
  vertical-align: -2px;
  margin-left: 4px;
  animation: caret-blink 1.06s steps(2, jump-none) infinite;
}

@keyframes caret-blink {
  0%, 50%   { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

.prompt-bottom a {
  color: var(--ink-2);
  text-decoration: none;
  border-bottom: 1px dotted var(--rule);
}
.prompt-bottom a:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* ───────────────────────────────────────────────────────────────
   TINY HELPERS — admin warning banner, etc.
   ─────────────────────────────────────────────────────────────── */
.admin-banner {
  background: rgba(255, 224, 0, 0.08);
  border: 1px dashed var(--warn);
  color: var(--warn);
  padding: 8px 12px;
  margin: 12px 0 18px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
}

.admin-banner strong {
  color: var(--warn);
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Mobile */
@media (max-width: 720px) {
  body { font-size: 13px; }
  main { padding: 12px 10px 80px; }
  .statusbar { gap: 10px; font-size: 11px; }
  .statusbar .sb-spacer { display: none; }
  .osys-grid { grid-template-columns: 1fr; }
  .prompt-bottom { font-size: 11px; }
}
