:root {
  --bg: #0f1419;
  --card: #1a2332;
  --text: #e7ecf3;
  --muted: #8b9bb4;
  --green: #3dd68c;
  --yellow: #f5c542;
  --red: #f07178;
  --accent: #5b9fd4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}
header {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid #2a3548;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.tabs a {
  color: var(--muted);
  margin-right: 1rem;
  text-decoration: none;
}
.tabs a.active { color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 0.75rem; }
main { padding: 1.5rem; max-width: 1100px; margin: 0 auto; }
.card {
  background: var(--card);
  padding: 1.5rem;
  border-radius: 8px;
  max-width: 360px;
  margin: 4rem auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  color: var(--muted);
}
input, button, textarea, select {
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid #2a3548;
  background: #0f1419;
  color: var(--text);
}
button {
  background: var(--accent);
  border: none;
  cursor: pointer;
  font-weight: 600;
}
button.secondary { background: #2a3548; }
.err { color: var(--red); min-height: 1.2em; }
.lamp {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 0.4rem;
  vertical-align: middle;
}
.lamp.green { background: var(--green); box-shadow: 0 0 6px var(--green); }
.lamp.yellow { background: var(--yellow); box-shadow: 0 0 6px var(--yellow); }
.lamp.red { background: var(--red); box-shadow: 0 0 6px var(--red); }
.grid { display: grid; gap: 0.4rem; }
.svc { font-size: 0.9rem; }
.muted { color: var(--muted); font-size: 0.85rem; }
.cards { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.card-mini {
  background: var(--card);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  min-width: 6rem;
}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.35rem 0.5rem; border-bottom: 1px solid #2a3548; }
section { margin-bottom: 2rem; }
#magnets, textarea.wide {
  width: 100%;
  min-height: 8rem;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
}
#audit {
  max-height: 240px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  background: var(--card);
  padding: 0.75rem;
  border-radius: 6px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.5rem 0; }

.progress {
  height: 12px;
  border-radius: 6px;
  background: #1a2332;
  overflow: hidden;
  border: 1px solid #2a3548;
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 6px;
  background-color: #3d8fd1;
  background-image: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.15) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.15) 50%,
    rgba(255, 255, 255, 0.15) 75%,
    transparent 75%,
    transparent
  );
  background-size: 16px 16px;
  transition: width 0.3s ease;
}

.progress-bar.animated {
  animation: progress-stripes 1s linear infinite;
}

.progress-bar.indeterminate {
  width: 40% !important;
  animation: progress-stripes 1s linear infinite, progress-slide 1.5s ease-in-out infinite;
}

@keyframes progress-stripes {
  from { background-position: 16px 0; }
  to   { background-position: 0 0; }
}

@keyframes progress-slide {
  0%   { margin-left: 0%; width: 30%; }
  50%  { margin-left: 40%; width: 40%; }
  100% { margin-left: 0%; width: 30%; }
}

.lamps { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin-bottom: 1rem; font-size: 0.85rem; }
.lamp-row { display: inline-flex; align-items: center; gap: 0.35rem; }
/* --- shell nav --- */
.shell-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.65rem 1rem;
  margin-bottom: 1rem;
  background: #121820;
  border-bottom: 1px solid #2a3544;
}
.shell-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  align-items: center;
}
.shell-tab {
  color: #9ab;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  white-space: nowrap;
}
.shell-tab:hover {
  color: #d0e0f0;
  background: #1a2332;
}
.shell-tab.is-active {
  color: #e8f0ff;
  background: #243044;
  font-weight: 600;
}
.shell-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.shell-user {
  color: #7a8a9a;
  font-size: 0.9rem;
}
.shell-logout {
  cursor: pointer;
  background: #1a2332;
  border: 1px solid #3a4555;
  color: #cde;
  border-radius: 6px;
  padding: 0.25rem 0.6rem;
}
.shell-logout:hover {
  background: #243044;
}
