/* ===== Quantum Glossy Dark Theme (shared by public + admin) ===== */

/* 1) Global page styling */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
               "Segoe UI", Roboto, sans-serif;
  color: #e8ebff;
  background:
    radial-gradient(circle at 10% 0%, rgba(110, 80, 255, 0.35) 0, transparent 55%),
    radial-gradient(circle at 90% 100%, rgba(0, 230, 200, 0.32) 0, transparent 55%),
    radial-gradient(circle at 50% 30%, rgba(40, 40, 80, 0.9) 0, #02030a 65%);
  background-attachment: fixed;
}

/* Optional: smooth transitions when switching tabs/panels */
body, #app, .page-root, .main-content, .tab-content,
.card, .panel, .sidebar, #sidebar {
  transition: background 220ms ease, box-shadow 220ms ease,
              border-color 220ms ease, transform 150ms ease,
              color 180ms ease;
}

/* 2) Scrollbar (subtle) */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(130, 150, 255, 0.55);
  border-radius: 999px;
}

/* 3) App shell layout helpers (covers many variants) */
.app-shell,
.page-root,
#root,
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: row;
  gap: 16px;
  padding: 14px 16px;
  box-sizing: border-box;
}

/* If your layout already uses a different wrapper, this will just be ignored. */

/* 4) Quantum glassmorphism primitives */
.quantum-glass,
.sidebar,
#sidebar,
.topbar,
#topbar,
.panel,
.card,
.tab-content-header {
  background: radial-gradient(circle at 0 0,
                rgba(255, 255, 255, 0.06) 0,
                rgba(10, 10, 25, 0.92) 60%);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 22px 40px rgba(0, 0, 0, 0.75),
    0 0 0 1px rgba(100, 140, 255, 0.18);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
}

/* 5) Sidebar / navigation */
#sidebar,
.sidebar {
  width: 240px;
  max-width: 260px;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#sidebar h1,
#sidebar .logo,
.sidebar .logo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #f4f5ff;
  margin: 0 8px 10px;
  opacity: 0.9;
}

#sidebar ul {
  list-style: none;
  margin: 0;
  padding: 6px 0 0;
}

#sidebar li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin: 2px 4px;
  border-radius: 999px;
  color: #c1c6ff;
  font-size: 13px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

#sidebar li i {
  font-size: 14px;
}

#sidebar li::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0 0,
               rgba(126, 255, 228, 0.0) 0,
               rgba(126, 255, 228, 0.0) 30%,
               transparent 65%);
  opacity: 0;
  transition: opacity 180ms ease;
}

#sidebar li:hover::before {
  opacity: 0.7;
}

#sidebar li:hover {
  color: #f0f4ff;
  background: linear-gradient(
    120deg,
    rgba(130, 200, 255, 0.22),
    rgba(171, 126, 255, 0.22)
  );
  box-shadow: 0 0 18px rgba(90, 190, 255, 0.35);
}

#sidebar li.active {
  color: #ffffff;
  background: linear-gradient(
    120deg,
    rgba(153, 78, 255, 0.98),
    rgba(0, 225, 195, 0.9)
  );
  box-shadow:
    0 0 30px rgba(120, 200, 255, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.18);
}

/* Make the text not stick to the edges */
#sidebar li span {
  flex: 1;
}

/* 6) Top bar / header (for admin pages, etc.) */
.topbar,
#topbar,
header.app-header {
  padding: 10px 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* 7) Main content area */
.main-content,
#main-content,
.content,
.page-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* If your tabs live directly under .main-content, this will make them glossy */
.tab-content,
.tab-panel,
.panel,
.card {
  padding: 14px 16px;
  border-radius: 18px;
  background: radial-gradient(circle at 0 0,
                rgba(255, 255, 255, 0.05) 0,
                rgba(12, 14, 34, 0.97) 65%);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 18px 30px rgba(0, 0, 0, 0.8),
    0 0 0 1px rgba(100, 140, 255, 0.18);
}

.tab-content h1,
.tab-content h2,
.panel h1,
.panel h2,
.card h1,
.card h2 {
  margin-top: 0;
  color: #f5f7ff;
}

/* 8) Buttons */
button,
.btn,
.button {
  border: none;
  outline: none;
  cursor: pointer;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: #041018;
  background: linear-gradient(
    135deg,
    #7ef2ff,
    #a974ff
  );
  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

button:hover,
.btn:hover,
.button:hover {
  transform: translateY(-1px);
  box-shadow:
    0 15px 32px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.4);
  filter: brightness(1.04);
}

button:active,
.btn:active,
.button:active {
  transform: translateY(1px) scale(0.98);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.3);
}

/* 9) Inputs */
input[type="text"],
input[type="number"],
input[type="password"],
input[type="email"],
select,
textarea {
  background: rgba(4, 8, 26, 0.9);
  border-radius: 999px;
  border: 1px solid rgba(130, 150, 255, 0.6);
  color: #e9ecff;
  padding: 7px 11px;
  font-size: 13px;
  box-shadow:
    0 8px 18px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(40, 60, 150, 0.75);
  outline: none;
}

textarea {
  border-radius: 15px;
  min-height: 80px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: rgba(190, 196, 255, 0.6);
}

input:focus,
select:focus,
textarea:focus {
  border-color: #7ff7ff;
  box-shadow:
    0 0 0 1px rgba(127, 247, 255, 0.9),
    0 0 25px rgba(120, 200, 255, 0.7);
}

/* 10) Tables (for admin job/worker lists) */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: #e4e7ff;
}

th, td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

th {
  text-align: left;
  font-weight: 600;
  color: #f0f3ff;
  background: linear-gradient(
    120deg,
    rgba(120, 135, 255, 0.2),
    rgba(0, 200, 180, 0.18)
  );
}

/* zebra */
tbody tr:nth-child(odd) {
  background: rgba(10, 14, 40, 0.75);
}
tbody tr:nth-child(even) {
  background: rgba(4, 6, 20, 0.85);
}

tbody tr:hover {
  background: rgba(40, 80, 140, 0.62);
}

/* 11) Status / badges (if used) */
.badge,
.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.badge.online,
.status-online {
  background: rgba(0, 220, 150, 0.15);
  color: #7cffd0;
  border-color: rgba(0, 220, 150, 0.6);
}

.badge.offline,
.status-offline {
  background: rgba(200, 80, 80, 0.18);
  color: #ffc2c2;
  border-color: rgba(250, 110, 110, 0.7);
}

/* 12) Small glow accent for key numbers */
.metric,
.big-number {
  font-size: 22px;
  font-weight: 600;
  color: #f9fbff;
  text-shadow:
    0 0 8px rgba(120, 215, 255, 0.8),
    0 0 18px rgba(148, 141, 255, 0.65);
}
/* ========================= */
/* Journal-specific overrides */
/* ========================= */

/* Make journal sections/panels match the quantum background */
section,
.content-area {
  background: rgba(5, 10, 35, 0.9);
  border-color: rgba(164, 184, 255, 0.55);
}

/* Darken the floating boxes and keep text readable */
.content-wrapper {
  background: rgba(7, 14, 40, 0.95);
  border-color: rgba(164, 184, 255, 0.7);
  color: #e8ebff;
}

.content-data {
  color: #e8ebff;
}

/* Optional: make the top-right buttons fit the quantum look a bit better */
#save-load-container button {
  font-size: 13px;
  padding: 6px 12px;
}
