:root {
  --bg: #0b1021;
  --panel: #11162d;
  --accent: #6ce1de;
  --text: #f7f9fc;
  --muted: #9aa4c7;
  --border: #1f2744;
  --radius: 12px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
  font-family: "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 20% 20%, rgba(108, 225, 222, 0.08), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(108, 225, 222, 0.05), transparent 25%),
    var(--bg);
  color: var(--text);
}

.page {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 16px 48px;
  display: grid;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

h1,
h2 {
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

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

form {
  display: grid;
  gap: 12px;
}

label {
  display: grid;
  gap: 6px;
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #0d1226;
  color: var(--text);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 225, 222, 0.15);
}

.actions {
  display: flex;
  gap: 8px;
}

button {
  cursor: pointer;
  padding: 10px 16px;
  border-radius: 10px;
  border: 1px solid var(--accent);
  background: linear-gradient(120deg, var(--accent), #64c4ff);
  color: #0b1021;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 120ms ease, box-shadow 150ms ease, filter 150ms ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(108, 225, 222, 0.25);
}

button:active {
  transform: translateY(0);
  filter: brightness(0.95);
}

.tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
}

.tab-group {
  display: flex;
  flex: 1;
  gap: 8px;
}

.tab {
  flex: 1;
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.tab.active {
  border-color: var(--accent);
  background: rgba(108, 225, 222, 0.15);
}

.nav-logout {
  width: auto;
  padding: 10px 12px;
}

.hidden {
  display: none;
}

.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

pre {
  margin: 0;
  padding: 12px;
  background: #0b1021;
  border: 1px dashed var(--border);
  border-radius: 8px;
  min-height: 120px;
  white-space: pre-wrap;
  word-break: break-word;
}

.log-panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(108, 225, 222, 0.15);
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
}

.jobs-list {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: grid;
  gap: 10px;
}

.job-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  background: #0d1226;
  display: grid;
  gap: 12px;
}

.job-meta {
  display: grid;
  gap: 4px;
}

.status-pill {
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: capitalize;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border);
}

.job-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.option-group {
  display: grid;
  gap: 8px;
}

.option-buttons {
  display: grid;
  gap: 10px;
}

.process-btn {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0d1226;
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.process-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108, 225, 222, 0.15);
}

.process-btn.selected {
  border-color: var(--accent);
  background: rgba(108, 225, 222, 0.15);
  box-shadow: 0 0 0 3px rgba(108, 225, 222, 0.15);
}

.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox.hidden {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  z-index: 1;
  max-width: min(90vw, 960px);
  max-height: 90vh;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #0d1226;
}

.lightbox-content img {
  display: block;
  max-width: 100%;
  max-height: 90vh;
}

.lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  background: rgba(0, 0, 0, 0.45);
}

.job-img {
  display: grid;
  gap: 8px;
  align-content: start;
}

.thumb {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #0b1021;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.placeholder {
  width: 100%;
  padding: 20px;
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--muted);
  text-align: center;
}

.spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid rgba(108, 225, 222, 0.2);
  border-top-color: var(--accent);
  animation: spin 1s linear infinite;
}

.ghost.small {
  padding: 8px 10px;
  font-size: 0.9rem;
  text-align: center;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .actions {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
