:root {
  --bg: #0c0f14;
  --bg-elevated: #121820;
  --surface: #161d28;
  --surface-hover: #1c2533;
  --border: #2a3545;
  --text: #e9eef5;
  --muted: #8b98ab;
  --accent: #4f8cff;
  --accent-hover: #6aa3ff;
  --accent-muted: rgba(79, 140, 255, 0.15);
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  font-family: "DM Sans", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image: radial-gradient(
    ellipse 120% 80% at 50% -20%,
    rgba(79, 140, 255, 0.12),
    transparent 50%
  );
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

.top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.75rem;
  border-bottom: 1px solid var(--border);
  background: rgba(18, 24, 32, 0.85);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--accent-hover);
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

h2 {
  font-size: 0.95rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.auth-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-email {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

/* Landing (signed out) */
.landing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 4rem);
  padding: 2rem 1.5rem 4rem;
}

.landing-card {
  max-width: 28rem;
  text-align: center;
  padding: 2.5rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.eyebrow {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.landing-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.landing-lede {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 1rem;
}

.landing-notice {
  margin: 0 0 1.25rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.875rem;
  color: #f0c674;
  background: rgba(240, 198, 116, 0.1);
  border: 1px solid rgba(240, 198, 116, 0.35);
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.65rem 1.35rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

/* Dashboard (signed in) */
.dashboard {
  max-width: 1200px;
  margin: 0 auto;
}

.panel {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--border);
}

.connect {
  background: linear-gradient(135deg, rgba(79, 140, 255, 0.08), transparent);
  border-left: 3px solid var(--accent);
}

.connect.hidden {
  display: none;
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0;
  cursor: pointer;
  font-size: 0.9rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(300px, 1.35fr);
  gap: 0;
  min-height: 260px;
}

@media (max-width: 800px) {
  .layout {
    grid-template-columns: 1fr;
  }
}

.list-panel,
.detail-panel {
  border-right: 1px solid var(--border);
  min-height: 220px;
}

.detail-panel {
  border-right: none;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.job-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.job-list li {
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--bg-elevated);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.job-list li:hover {
  border-color: rgba(79, 140, 255, 0.45);
  background: var(--surface-hover);
}

.job-list li.selected {
  border-color: var(--accent);
  background: var(--accent-muted);
}

.job-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 500;
}

.job-snippet {
  font-size: 0.8rem;
  margin-top: 0.35rem;
  line-height: 1.35;
}

.status-pill {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--border);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.job-detail {
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.9rem;
}

.job-detail dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1.25rem;
}

.job-detail dt {
  color: var(--muted);
  margin: 0;
  font-size: 0.8rem;
}

.job-detail dd {
  margin: 0;
}

.new-job textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  resize: vertical;
  min-height: 7rem;
  font-family: inherit;
  font-size: 0.95rem;
  line-height: 1.45;
}

.new-job textarea:focus {
  outline: none;
  border-color: rgba(79, 140, 255, 0.6);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.new-job textarea:disabled {
  opacity: 0.5;
}

.new-job-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.btn {
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-size: 0.9rem;
  font-family: inherit;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

.btn.primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn.ghost:hover:not(:disabled) {
  border-color: var(--muted);
  background: var(--surface-hover);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

code {
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
