/* =========================================================
   WebNova Engineering Dashboard - Modern Attract Blue v5
   Made by WebNova
   ========================================================= */

:root {
  --bg-core: #020612;
  --bg-sidebar: rgba(4, 11, 27, 0.94);
  --bg-surface: rgba(8, 20, 48, 0.72);
  --bg-surface-hover: rgba(12, 30, 68, 0.88);
  --bg-input: rgba(4, 11, 26, 0.9);
  --border-subtle: rgba(56, 189, 248, 0.18);
  --border-glow: rgba(56, 189, 248, 0.55);

  --accent-blue: #2563eb;
  --accent-sky: #38bdf8;
  --accent-cyan-soft: #7dd3fc;
  --glow-blue: rgba(37, 99, 235, 0.42);
  --glow-cyan: rgba(56, 189, 248, 0.36);

  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;

  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 13px;
  --radius-sm: 9px;

  --sidebar-w: 268px;
  --navbar-h: 68px;
}

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

input, textarea, pre, code {
  user-select: text;
}

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-core);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.55;
}

/* ---------- Moderner animierter Hintergrund ---------- */
.sky-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 15%, rgba(37, 99, 235, 0.24), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(56, 189, 248, 0.18), transparent 48%),
    radial-gradient(circle at 50% 45%, rgba(29, 78, 216, 0.12), transparent 60%),
    linear-gradient(180deg, #020612 0%, #040d22 100%);
}

.sky-grid {
  position: absolute;
  inset: -52px;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 50%, black 35%, transparent 88%);
  animation: gridDrift 26s linear infinite;
}

.sky-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  will-change: transform;
}

.sky-orb-a {
  width: 520px;
  height: 520px;
  top: -140px;
  left: -110px;
  background: rgba(37, 99, 235, 0.38);
  animation: orbFloatA 15s ease-in-out infinite alternate;
}

.sky-orb-b {
  width: 560px;
  height: 560px;
  bottom: -160px;
  right: -130px;
  background: rgba(56, 189, 248, 0.26);
  animation: orbFloatB 19s ease-in-out infinite alternate;
}

@keyframes gridDrift {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(52px, 52px, 0); }
}
@keyframes orbFloatA {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(50px, 36px, 0) scale(1.1); }
}
@keyframes orbFloatB {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-45px, -38px, 0) scale(1.08); }
}

/* ---------- Loading Screen ---------- */
#loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: radial-gradient(circle at 50% 44%, #0c224d 0%, #020612 78%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.55s ease;
}

#loading-screen.is-leaving {
  opacity: 0;
  transform: scale(1.04);
  visibility: hidden;
  pointer-events: none;
}

.loader-stage {
  position: relative;
  width: 128px;
  height: 128px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring-outer {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2.5px solid rgba(56, 189, 248, 0.16);
  border-top-color: var(--accent-sky);
  border-right-color: var(--accent-blue);
  animation: spinRing 1.3s linear infinite;
  box-shadow: 0 0 34px var(--glow-cyan);
}

.loader-ring-inner {
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 1.5px dashed rgba(125, 211, 252, 0.42);
  animation: spinRingReverse 2.3s linear infinite;
}

.loader-logo {
  width: 82px;
  height: 82px;
  object-fit: contain;
  border-radius: 50%;
  animation: logoPulse 2.2s ease-in-out infinite;
}

.loader-title {
  font-size: 1.52rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #ffffff, #38bdf8, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.loader-bar {
  width: 290px;
  height: 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #38bdf8, #7dd3fc);
  box-shadow: 0 0 18px var(--accent-sky);
  animation: progressSweep 1.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.loader-caption {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

@keyframes spinRing { to { transform: rotate(360deg); } }
@keyframes spinRingReverse { to { transform: rotate(-360deg); } }
@keyframes logoPulse {
  0%, 100% { transform: scale(0.96); filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.35)); }
  50% { transform: scale(1.04); filter: drop-shadow(0 0 24px rgba(56, 189, 248, 0.8)); }
}
@keyframes progressSweep { to { width: 100%; } }

/* ---------- Sprachumschalter ---------- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(5, 13, 32, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  padding: 4px 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lang-btn img {
  width: 18px;
  height: 12px;
  object-fit: cover;
  border-radius: 2px;
}

.lang-btn.active {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.38), rgba(56, 189, 248, 0.2));
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
}

/* ---------- Login & Logout Animationen ---------- */
#login-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px 18px;
  gap: 16px;
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#login-view.login-enter {
  animation: loginAppear 0.68s cubic-bezier(0.16, 1, 0.3, 1) both;
}

#login-view.login-exit {
  opacity: 0;
  transform: translateY(-18px) scale(0.97);
  pointer-events: none;
}

@keyframes loginAppear {
  from { opacity: 0; transform: translateY(22px) scale(0.975); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-top-strip {
  width: 100%;
  max-width: 1100px;
  display: flex;
  justify-content: flex-end;
}

.login-grid {
  width: 100%;
  max-width: 1100px;
  display: grid;
  grid-template-columns: 1.24fr 0.76fr;
  gap: 24px;
}

.glass-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow:
    0 24px 70px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(56, 189, 248, 0.06),
    inset 0 1px 0 rgba(125, 211, 252, 0.14);
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.glass-card:hover {
  border-color: rgba(56, 189, 248, 0.32);
}

.login-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.pill-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.26), rgba(56, 189, 248, 0.14));
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: var(--accent-cyan-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.login-brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  object-fit: contain;
  background: rgba(3, 9, 24, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.4);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.22);
}

.login-card-left h1 {
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.login-card-left h1 span {
  background: linear-gradient(90deg, #38bdf8, #60a5fa, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.login-desc {
  color: var(--text-secondary);
  font-size: 0.94rem;
  margin-bottom: 20px;
}

.request-callout {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.24), rgba(14, 165, 233, 0.1));
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.request-callout h3 {
  font-size: 0.93rem;
  color: var(--accent-cyan-soft);
  margin-bottom: 6px;
}

.request-callout p {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.features-2x2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.feature-box {
  background: rgba(4, 12, 30, 0.78);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  background: rgba(11, 26, 60, 0.92);
  box-shadow: 0 12px 26px rgba(2, 6, 18, 0.5);
}

.feature-box strong {
  display: block;
  font-size: 0.87rem;
  margin-bottom: 4px;
}

.feature-box span {
  font-size: 0.79rem;
  color: var(--text-muted);
}

.login-card-right {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.auth-icon-box {
  width: 74px;
  height: 74px;
  margin: 0 auto 16px;
  border-radius: 22px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  box-shadow: 0 14px 36px var(--glow-blue);
  animation: logoPulse 2.6s ease-in-out infinite;
}

.login-card-right h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.login-card-right p {
  font-size: 0.87rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.status-box {
  text-align: left;
  background: rgba(4, 12, 30, 0.9);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px 15px;
  margin-bottom: 18px;
  font-size: 0.79rem;
}

.status-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  gap: 8px;
}

.st-ready { color: #7dd3fc; font-weight: 600; }
.st-live { color: #38bdf8; font-weight: 700; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 16px;
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #0284c7 100%);
  color: #ffffff;
  box-shadow: 0 8px 24px var(--glow-blue), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--glow-cyan), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.06);
}

.btn-ghost {
  background: rgba(56, 189, 248, 0.1);
  color: var(--accent-cyan-soft);
  border: 1px solid rgba(56, 189, 248, 0.32);
}

.btn-ghost:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: var(--accent-sky);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 13px;
  font-size: 0.82rem;
}

.btn-full {
  width: 100%;
}

/* ---------- Dashboard Shell ---------- */
#app-view {
  display: none;
  min-height: 100vh;
  opacity: 0;
  transform: translateY(16px) scale(0.99);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

#app-view.active {
  display: flex;
  opacity: 1;
  transform: translateY(0) scale(1);
}

#app-view.logging-out {
  opacity: 0;
  transform: translateY(18px) scale(0.98);
  pointer-events: none;
}

.top-navbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--navbar-h);
  background: rgba(3, 9, 24, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  z-index: 50;
  gap: 12px;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-primary);
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.22), rgba(56, 189, 248, 0.12));
  border: 1px solid rgba(56, 189, 248, 0.36);
  padding: 6px 13px;
  border-radius: 999px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-sky);
  box-shadow: 0 0 12px var(--accent-sky);
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.65; }
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 13px 5px 6px;
  background: rgba(8, 20, 48, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.84rem;
}

.avatar-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-sky));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.78rem;
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar {
  width: var(--sidebar-w);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
  z-index: 60;
  transition: transform 0.3s ease;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 4px 8px 16px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 14px;
}

.sidebar-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: contain;
  background: rgba(3, 9, 24, 0.9);
  border: 1px solid rgba(56, 189, 248, 0.4);
}

.sidebar-brand strong {
  display: block;
  font-size: 1rem;
}

.sidebar-brand span {
  font-size: 0.7rem;
  color: var(--accent-sky);
}

.sidebar-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  padding: 10px 12px 6px;
}

.sidebar-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(37, 99, 235, 0.16);
}

.nav-link.active {
  color: #ffffff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.36), rgba(56, 189, 248, 0.12));
  border-color: rgba(56, 189, 248, 0.42);
  box-shadow: inset 3px 0 0 var(--accent-sky);
}

.sidebar-bottom {
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.content-area {
  margin-left: var(--sidebar-w);
  padding: calc(var(--navbar-h) + 28px) 32px 48px;
  width: calc(100% - var(--sidebar-w));
}

.view-section {
  display: none;
  animation: loginAppear 0.32s ease;
}

.view-section.active {
  display: block;
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.view-title {
  font-size: 1.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.view-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--accent-sky);
  box-shadow: 0 0 14px var(--accent-sky);
}

.view-sub {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-top: 4px;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.1);
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
}

.kpi-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-glow);
  background: var(--bg-surface-hover);
  box-shadow: 0 14px 32px rgba(2, 6, 18, 0.55), inset 0 1px 0 rgba(125, 211, 252, 0.18);
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.kpi-num {
  font-size: 1.55rem;
  font-weight: 800;
}

.kpi-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.status-tile {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.status-tile:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.status-tile strong {
  display: block;
  font-size: 0.89rem;
}

.status-tile span {
  font-size: 0.79rem;
  color: var(--text-muted);
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.workflow-step {
  background: rgba(4, 12, 30, 0.82);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.workflow-step:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.35), rgba(56, 189, 248, 0.18));
  border: 1px solid rgba(56, 189, 248, 0.42);
  color: var(--accent-cyan-soft);
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.workflow-step strong {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 5px;
}

.workflow-step p {
  font-size: 0.79rem;
  color: var(--text-secondary);
}

.surface-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(125, 211, 252, 0.08);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}

.card-head h3 {
  font-size: 0.96rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.card-head p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}

th {
  text-align: left;
  color: var(--text-muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.78rem;
}

td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
  vertical-align: middle;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge-active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent-cyan-soft);
  border: 1px solid rgba(56, 189, 248, 0.36);
}

.badge-maint {
  background: rgba(37, 99, 235, 0.24);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.38);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 18px;
}

.key-display {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: monospace;
  font-size: 0.86rem;
  color: var(--accent-cyan-soft);
  margin: 14px 0;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.input-group label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
}

.input-group input, .input-group select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-size: 0.84rem;
  outline: none;
}

.input-group input:focus, .input-group select:focus {
  border-color: var(--accent-sky);
}

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
  gap: 12px;
  flex-wrap: wrap;
}

.switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.switch input { display: none; }

.slider {
  position: absolute;
  inset: 0;
  background: #1e293b;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.25s;
}

.slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.25s;
}

.switch input:checked + .slider {
  background: var(--accent-blue);
}

.switch input:checked + .slider::before {
  transform: translateX(20px);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 17, 0.82);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-panel {
  width: 100%;
  max-width: 900px;
  max-height: 88vh;
  overflow-y: auto;
  background: #061024;
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.75);
  animation: loginAppear 0.25s ease;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.admin-tab-btn {
  background: rgba(5, 13, 32, 0.75);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.83rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.admin-tab-btn.active {
  background: linear-gradient(135deg, #2563eb, #0284c7);
  color: #ffffff;
  border-color: var(--accent-sky);
}

.assigned-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  background: rgba(5, 13, 32, 0.88);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-top: 10px;
}

.snippet-box {
  background: #020611;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: monospace;
  font-size: 0.8rem;
  color: #7dd3fc;
  white-space: pre-wrap;
  max-height: 260px;
  overflow-y: auto;
  margin-top: 12px;
}

#toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #081736;
  border: 1px solid var(--accent-sky);
  color: #ffffff;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: all 0.25s ease;
  z-index: 999;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1080px) {
  .workflow-steps { grid-template-columns: repeat(2, 1fr); }
  .status-board { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .login-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .workflow-steps { grid-template-columns: 1fr; }
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .top-navbar { left: 0; }
  .content-area { margin-left: 0; width: 100%; padding: calc(var(--navbar-h) + 20px) 18px 40px; }
  .mobile-menu-btn { display: inline-flex; }
}
