/*
  Plakson Admin Dashboard theme
  Source of truth: cline_docs/dashboardUiBrief.md
*/

:root {
  /* Palette */
  --plx-primary: #0F4C5C;
  --plx-primary-hover: #0B6E6E;
  --plx-primary-subtle: #145E6E;

  --plx-accent: #C9A227;
  --plx-accent-hover: #B08D57;
  --plx-accent-soft: #E0C872;

  --plx-bg: #2E2E2E;
  --plx-panel: #3A3A3A;
  --plx-border: #4A4A4A;

  --plx-text: #E6E6E6;
  --plx-text-secondary: #BFBFBF;
  --plx-text-muted: #9A9A9A;
  --plx-disabled: #7A7A7A;

  --plx-error: #B00020;

  /* Layout */
  --plx-radius: 12px;
  --plx-radius-sm: 10px;
  --plx-shadow: 0 10px 28px rgba(0,0,0,0.35);
  --plx-font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --plx-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--plx-font);
  background: var(--plx-bg);
  color: var(--plx-text);
}

a { color: var(--plx-primary-hover); text-decoration: none; }
a:hover { text-decoration: underline; }

header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 12px 16px;
  background: var(--plx-primary);
  border-bottom: 1px solid rgba(0,0,0,0.25);
}

header .nav {
  display: flex;
  gap: 10px;
  align-items: center;
}

.container {
  padding: 18px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

h1, h2, h3 { margin: 0; font-weight: 650; }

h2 { font-size: 20px; letter-spacing: 0.2px; }
h3 { font-size: 14px; margin-top: 16px; margin-bottom: 10px; color: var(--plx-text-secondary); font-weight: 600; }

.small { font-size: 12px; }
.mono { font-family: var(--plx-mono); }
.muted { color: var(--plx-text-muted); }
.right { text-align: right; }

/* Panels / cards */
.panel {
  background: var(--plx-panel);
  border: 1px solid var(--plx-border);
  border-radius: var(--plx-radius);
  box-shadow: var(--plx-shadow);
}

.panel .panel-body { padding: 14px; }
.panel .panel-header {
  padding: 12px 14px;
  border-bottom: 1px solid var(--plx-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.25);
  background: rgba(0,0,0,0.12);
  color: var(--plx-text);
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
}

.btn:hover {
  background: rgba(0,0,0,0.18);
  text-decoration: none;
}

.btn-primary {
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.25);
}

header .btn {
  background: rgba(0,0,0,0.10);
  border: 1px solid rgba(0,0,0,0.22);
}

header .btn:hover {
  background: rgba(0,0,0,0.16);
}

/* Pills */
.pill {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--plx-text-secondary);
  font-size: 12px;
}

.pill-warn { color: var(--plx-accent-soft); border-color: rgba(201,162,39,0.35); }
.pill-err { color: #ffb3bb; border-color: rgba(176,0,32,0.45); }

/* Tables */
.table-wrap { overflow-x: auto; }

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
}

thead th {
  position: sticky;
  top: 52px; /* approx header height */
  background: var(--plx-panel);
  color: var(--plx-text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0.2px;
  border-bottom: 1px solid var(--plx-border);
  padding: 10px 10px;
}

/* Plain tables (no sticky headers) - used e.g. on QueueDetails recent activity */
.table-plain thead th {
  position: static;
  top: auto;
}

tbody td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(74,74,74,0.7);
  font-size: 13px;
}

tbody tr:hover td {
  background: rgba(15, 76, 92, 0.08); /* subtle highlight */
}

/* Inline status helpers */
.ok { color: var(--plx-primary-hover); }
.warn { color: var(--plx-accent); }
.err { color: var(--plx-error); }
