:root {
  --brand-blue: #0a4ba5;    /* deep blue */
  --brand-orange: #f6a21e;  /* bright orange */
  --brand-yellow: #f5c33b;  /* accent stripe */
  --text-color: #0f172a;
  --muted-text: #475569;
  --bg: #f8fafc;
  --card-bg: #ffffff;
  --border: #e2e8f0;
  --radius: 12px;
  --shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text-color);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.pco-brand-logo {

  object-fit: contain;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border);
}

/* Hide left logo badge and theme toggle across pages .pco-brand-logo, */

#pcoThemeToggle {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

.page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
}

.brand {
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: 0.5px;
}

.pco-topbar {
  background: #044ff1;
  border-bottom: 4px solid #f6a21e;
  box-shadow: 0 8px 18px rgba(10, 75, 165, 0.15);
  padding: 6px 8px;
  min-height: 72px;
}

.pco-topbar .pco-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #ffffff;
  border-radius: 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  width: calc(100% - 8px);
  margin: 0 4px;
  box-sizing: border-box;
}

.pco-topbar-logo {
  width: 220px;
  height: 70px;
  padding: 5px;
  margin: 0;
  background: transparent url('./Logo.jpg') no-repeat center center / contain;
  border-radius: 12px;
  border: none;
  box-shadow: none;
}

/* Admin nav - horizontal layout */
.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px auto 0;
  width: 99vw;
  max-width: 1200px;
  padding-left: 8px;
  padding-right: 8px;
  align-items: center;
}
.admin-nav .pco-btn {
  width: auto;
  min-width: 110px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
}

/* Admin page container spacing */
.admin-page .pco-main {
  display: block;
}
.admin-page .pco-main .pco-container {
  width: 1200px;
  max-width: 99vw;
  padding-left: 12px;
  padding-right: 12px;
  margin: 12px 0 0 12px;
}

/* Bottom nav (commuter) */
.pco-bottomnav {
  position: sticky;
  bottom: 0;
  width: 100%;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.08);
}
.pco-bottomnav-inner {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  padding: 10px 14px;
  max-width: 520px;
  margin: 0 auto;
}
.pco-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 6px;
  border-radius: 12px;
  color: #1f2937;
  font-weight: 600;
  background: #fff;
  border: 1px solid #e2e8f0;
  transition: all 0.18s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}
.pco-tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}
.pco-tab.is-active {
  background: linear-gradient(135deg, rgba(10, 75, 165, 0.1), rgba(255, 167, 0, 0.12));
  color: #0a4ba5;
  border-color: rgba(10, 75, 165, 0.25);
  box-shadow: 0 4px 12px rgba(10, 75, 165, 0.18);
}

/* Observability kanban styling */
.chart-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.chart-label {
  font-weight: 600;
  color: var(--text-color);
  min-width: 70px;
}
.chart-bar {
  position: relative;
  flex: 1;
  height: 12px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.chart-bar.thin { height: 8px; }
.chart-bar span {
  position: absolute;
  inset: 0;
  width: var(--w, 40%);
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue));
  border-radius: 999px;
}
.chart-dot {
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}
.sparkline {
  flex: 1;
  height: 32px;
  background: linear-gradient(135deg, rgba(10, 75, 165, 0.12), rgba(255, 167, 0, 0.16));
  border-radius: 10px;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}
.sparkline.alt {
  background: linear-gradient(135deg, rgba(12, 140, 233, 0.15), rgba(255, 167, 0, 0.2));
}
.status-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 4px 0;
  color: var(--text-color);
}
.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
}
.badge-live {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
  border-color: rgba(34, 197, 94, 0.35);
}
.badge-warn {
  background: rgba(234, 179, 8, 0.14);
  color: #92400e;
  border-color: rgba(234, 179, 8, 0.45);
}
.badge-muted {
  background: #e2e8f0;
  color: #475569;
  border-color: #cbd5e1;
}
.list-plain {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
  display: grid;
  gap: 6px;
}
.list-plain li {
  color: var(--text-color);
}

.stat-list {
  display: grid;
  gap: 6px;
  margin: 10px 0 12px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.stat-label {
  color: var(--muted-text);
  font-weight: 600;
}
.stat-value {
  font-weight: 700;
  color: #0f172a;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}
.stat-value.good {
  color: #166534;
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}
.stat-value.warn {
  color: #92400e;
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(234, 179, 8, 0.45);
}
.stat-value.muted {
  color: #475569;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

/* Tracking map */
.map-frame {
  width: 100%;
  height: 320px;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-top: 10px;
}

.pco-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pco-brand-title {
  color: var(--text-color);
  font-weight: 700;
}

.pco-brand-sub {
  color: var(--muted-text);
}

.pco-btn.pco-btn-secondary {
  border: 1px solid var(--border);
  color: var(--text-color);
  background: #fff;
  box-shadow: 0 2px 8px rgba(10, 75, 165, 0.12);
}

.nav-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.tile {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.tile h2 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--text-color);
  letter-spacing: 0.01em;
}

.tile p {
  margin: 0;
  color: var(--muted-text);
  font-size: 0.95rem;
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
}

.card {
  padding: 14px 16px;
  border-radius: var(--radius);
  background: var(--card-bg);
  border: 1px solid var(--border);
  display: grid;
  gap: 10px;
  position: relative;
  overflow: hidden;
}

.list-item {
  position: relative;
  overflow: hidden;
}

.card img {
  max-width: 100%;
  border-radius: 8px;
}

.card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue), var(--brand-yellow));
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

.list-item::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue), var(--brand-yellow));
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

/* Elevated headings inside cards */
.pco-card .pco-h2,
.pco-card .pco-h3,
.kanban-card .pco-h3,
.kanban-column h3 {
  color: var(--text-color);
  letter-spacing: 0.01em;
}

/* Subtle panel shading for Kanban columns */
.kanban-column {
  background: linear-gradient(180deg, #ffffff, #f9fbff);
  border: 1px solid rgba(10, 75, 165, 0.08);
}

.card input,
.card textarea {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.card button {
  padding: 12px;
  background: var(--brand-blue);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(10, 75, 165, 0.22);
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(10, 75, 165, 0.25);
}

.card button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(10, 75, 165, 0.2);
}

.muted {
  color: var(--muted-text);
}

.error {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecdd3;
  padding: 12px;
  border-radius: var(--radius);
}

/* Accent underlines */
.nav-links .tile {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  position: relative;
}
.nav-links .tile::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-orange), var(--brand-blue), var(--brand-yellow));
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}

@media (min-width: 768px) {
  .page {
    padding: 24px;
  }

  header {
    border-radius: var(--radius);
    margin: 16px;
    box-shadow: var(--shadow);
  }
}
