:root {
  --bg-primary: #101116;
  --bg-secondary: #17181f;
  --bg-surface: #202129;
  --bg-surface-hover: #292a35;
  --border-color: #30313d;
  --border-light: #484958;

  --text-main: #eeeef5;
  --text-muted: #a6a7b8;
  --text-dim: #9495a8;

  --accent-primary: #9581ff;
  --accent-primary-hover: #7862e8;
  --accent-cyan: #06b6d4;
  --accent-emerald: #10b981;
  --accent-emerald-hover: #059669;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-rose-hover: #e11d48;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-subtle: 0 4px 20px -2px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover {
  color: #818cf8;
}

/* Navbar */
.navbar {
  background-color: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 2rem;
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: #fff;
}

.brand-badge {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  background: linear-gradient(135deg, #9581ff, #06b6d4);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-main);
  background-color: var(--bg-surface);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-tag {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--bg-surface);
  padding: 0.35rem 0.8rem;
  border-radius: 9999px;
  border: 1px solid var(--border-color);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.user-tag .dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
}

/* Layout */
.main-container {
  flex: 1;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  gap: 1rem;
}

.page-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-top: 0.25rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--accent-primary);
  color: #fff;
}
.btn-primary:hover {
  background-color: var(--accent-primary-hover);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background-color: var(--bg-surface-hover);
  border-color: var(--border-light);
}

.btn-success {
  background-color: var(--accent-emerald);
  color: #fff;
}
.btn-success:hover {
  background-color: var(--accent-emerald-hover);
}

.btn-warning {
  background-color: var(--accent-amber);
  color: #17181f;
}

.btn-danger {
  background-color: var(--accent-rose);
  color: #fff;
}
.btn-danger:hover {
  background-color: var(--accent-rose-hover);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Cards & Grid */
.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-cols-4 {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.grid-cols-2 {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.card {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-subtle);
  transition: border-color 0.2s ease;
}

.card:hover {
  border-color: var(--border-light);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stat-val {
  font-size: 2.25rem;
  font-weight: 600;
  color: #fff;
  line-height: 1;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  white-space: nowrap;
}

.badge-info { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }
.badge-purple { background: rgba(168, 85, 247, 0.2); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.4); }
.badge-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-teal { background: rgba(20, 184, 166, 0.2); color: #2dd4bf; border: 1px solid rgba(20, 184, 166, 0.4); }
.badge-blue { background: rgba(37, 99, 235, 0.2); color: #93c5fd; border: 1px solid rgba(37, 99, 235, 0.4); }
.badge-orange { background: rgba(249, 115, 22, 0.2); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.4); }
.badge-success { background: rgba(16, 185, 129, 0.2); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.4); }
.badge-danger { background: rgba(244, 63, 94, 0.2); color: #fb7185; border: 1px solid rgba(244, 63, 94, 0.4); }
.badge-muted { background: rgba(148, 163, 184, 0.15); color: #a6a7b8; border: 1px solid rgba(148, 163, 184, 0.3); }
.badge-blocked { background: rgba(225, 29, 72, 0.25); color: #fda4af; border: 1px solid rgba(225, 29, 72, 0.5); }
.badge-replan { background: rgba(217, 119, 6, 0.25); color: #fde68a; border: 1px solid rgba(217, 119, 6, 0.5); }

.badge-running {
  background: rgba(99, 102, 241, 0.25);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.6);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.3);

}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Tables */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background-color: var(--bg-secondary);
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: none;
  letter-spacing: 0;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
}

td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 0.95rem;
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background-color: rgba(255, 255, 255, 0.02);
}

.job-code {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--accent-cyan);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-main);
}

.form-input, .form-textarea, .form-select {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.65rem 0.9rem;
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2.75rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 0.5rem;
  bottom: 0.5rem;
  width: 2px;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
}

.timeline-dot {
  position: absolute;
  left: -2rem;
  top: 0.25rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-color: var(--accent-primary);
  border: 3px solid var(--bg-secondary);
}

.timeline-icon-badge {
  position: absolute;
  left: -2.75rem;
  top: 0.25rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  z-index: 2;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.timeline-icon-badge svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.timeline-badge-info {
  background-color: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.4);
  color: var(--accent-cyan, #38bdf8);
}

.timeline-badge-accent {
  background-color: rgba(168, 85, 247, 0.12);
  border-color: rgba(168, 85, 247, 0.4);
  color: #c084fc;
}

.timeline-badge-success {
  background-color: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.timeline-badge-warning {
  background-color: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #fbbf24;
}

.timeline-badge-danger {
  background-color: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

.timeline-badge-neutral {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-dim, #94a3b8);
}

.timeline-content {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.85rem 1.15rem;
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.35rem;
}

.timeline-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #fff;
}

.timeline-time {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Plan View */
.plan-box {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-section {
  margin-bottom: 1.25rem;
}

.plan-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: none;
  color: var(--accent-cyan);
  letter-spacing: 0;
  margin-bottom: 0.4rem;
}

.plan-section-content {
  color: var(--text-main);
  font-size: 0.95rem;
  line-height: 1.6;
}

.token-box {
  font-family: var(--font-mono);
  background-color: #050811;
  border: 1px dashed var(--accent-emerald);
  padding: 1rem;
  border-radius: var(--radius-md);
  color: #34d399;
  word-break: break-all;
  font-size: 0.95rem;
  margin: 1rem 0;
}

/* Shared application shell and component system */
:root {
  color-scheme: dark;
  --accent-primary: #a493ff;
  --accent-primary-hover: #baadff;
  --accent-cyan: #7acbc4;
  --radius-sm: 7px;
  --radius-md: 9px;
  --radius-lg: 14px;
  --shadow-subtle: 0 2px 5px #00000012;
}
body { font-size: 14px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
a { color: #b4a5ff; }
a:hover { color: #d4cbff; }
:focus-visible { outline: 2px solid #b4a5ff; outline-offset: 4px; }
.skip-link { position: fixed; left: 20px; top: -80px; z-index: 100; padding: 12px 18px; background: var(--bg-surface); }
.skip-link:focus { top: 16px; }
.navbar { position: fixed; inset: 0 auto 0 0; width: 236px; height: 100dvh; padding: 32px 18px 20px; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; background: #14151b; border: 0; border-right: 1px solid #ffffff0b; backdrop-filter: none; }
.nav-brand { flex-direction: column; align-items: flex-start; gap: 8px; padding: 0 14px; font-size: 21px; letter-spacing: -.6px; }
.nav-brand > a { gap: 10px !important; }
.nav-brand svg, .nav-brand a span span { color: #a493ff !important; }
.brand-badge { background: none; color: var(--text-dim); padding: 0 0 0 34px; font-size: 11px; font-weight: 400; letter-spacing: .1px; }
.nav-section-label { color: #828394; font-size: 11px; font-weight: 600; margin: 48px 14px 12px; }
.nav-links { flex-direction: column; align-items: stretch; gap: 6px; }
.nav-link { display: flex; gap: 12px; align-items: center; padding: 12px 14px; font-size: 13px; font-weight: 500; border: 1px solid transparent; }
.nav-link svg { width: 19px; height: 19px; flex-shrink: 0; }
.nav-link:hover { background: #ffffff05; }
.nav-link.active { background: #a493ff12; color: #c3b7ff; border-color: #a493ff20; }
.nav-note { margin: auto 6px 24px; padding: 17px 14px; border: 1px solid #ffffff0d; border-radius: 12px; background: linear-gradient(135deg, #a493ff08, transparent); }
.nav-note-icon { display: block; color: #b4a5ff; font-size: 22px; margin-bottom: 10px; }
.nav-note strong { font-size: 12px; font-weight: 500; }
.nav-note p { color: var(--text-dim); font-size: 11px; line-height: 1.7; margin: 7px 0 13px; }
.nav-note a { font-size: 11px; display: flex; justify-content: space-between; }
.nav-user { border-top: 1px solid #ffffff0b; padding-top: 18px; gap: 5px; justify-content: space-between; }
.user-tag { padding: 0 5px; background: none; border: 0; border-radius: 0; font-size: 11px; min-width: 0; }
.user-tag span:last-child { overflow-wrap: anywhere; }
.user-tag .dot { width: 6px; height: 6px; flex-shrink: 0; }
.nav-user .btn { background: none; padding: 5px 8px; font-size: 11px; }
.workspace { margin-left: 236px; min-height: 100vh; display: flex; flex-direction: column; }
.workspace-bar { height: 72px; flex-shrink: 0; padding: 0 42px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ffffff0a; color: var(--text-dim); font-size: 12px; }
#page-context { color: #d8d8e4; }
.breadcrumb-separator { margin: 0 13px; color: #555564; }
.workspace-label { font-size: 11px; padding: 5px 10px; border: 1px solid #ffffff0b; border-radius: 6px; }
.main-container { padding: 42px; max-width: 1540px; }
.workspace-footer { margin: auto 42px 0; padding: 22px 0; border-top: 1px solid #ffffff09; display: flex; justify-content: space-between; font-size: 11px; color: #858698; }
.page-header { align-items: center; margin-bottom: 32px; flex-wrap: wrap; }
.page-header > div:first-child { min-width: 0; }
.page-header > div { flex-wrap: wrap; }
.page-title { font-size: clamp(25px, 2.5vw, 34px); font-weight: 600; letter-spacing: -1px; line-height: 1.25; overflow-wrap: anywhere; }
.page-subtitle { font-size: 13px; line-height: 1.7; margin-top: 10px; }
.btn { min-height: 40px; justify-content: center; font-size: 12px; font-weight: 600; padding: 10px 16px; white-space: normal; text-align: center; }
.btn-primary { color: #171225; background: #ab98ff; border-color: #c6b9ff40; box-shadow: 0 2px 4px #0002; }
.btn-primary:hover { color: #171225; background: #c0b0ff; box-shadow: none; }
.btn-secondary { background: #22232c; border-color: #343540; color: #dddde8; }
.btn-secondary:hover { color: #fff; }
.btn-sm { font-size: 11px; min-height: 32px; padding: 6px 11px; }
.btn-success { background: #176849; }
.btn-success:hover { background: #207c58; color: white; }
.btn-danger { background: #9d2946; }
.btn-danger:hover { color: white; }
.grid { gap: 20px; }
.grid > *, .dashboard-sections > * { min-width: 0; }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
form .grid-cols-4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { padding: 24px; border-color: #30313b; background: #191a22; }
.card:hover { border-color: #30313b; }
.card-title { gap: 12px; flex-wrap: wrap; font-size: 14px; font-weight: 600; margin-bottom: 20px; letter-spacing: -.15px; }
.card-title > span:last-child:not(:first-child) { font-weight: 400; }
.stat-card { position: relative; padding: 22px 24px; gap: 20px; background: linear-gradient(120deg, #ffffff02, transparent), #191a22; }
.stat-card::after { content: ''; position: absolute; right: 22px; top: 25px; width: 6px; height: 6px; border-radius: 50%; background: var(--stat-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--stat-accent) 9%, transparent); }
.stat-label { font-size: 12px; padding-right: 14px; }
.stat-val { font-size: 36px; color: var(--text-main) !important; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.dashboard-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.dashboard-sections.has-jobs { grid-template-columns: 1fr; }
.empty-state { padding: 34px 20px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid #a493ff25; border-radius: 14px; color: #b4a5ff; background: #a493ff09; font-size: 25px; margin-bottom: 20px; }
.empty-state h3 { font-size: 15px; font-weight: 500; margin-bottom: 9px; letter-spacing: -.2px; }
.empty-state p { color: var(--text-dim); font-size: 12px; max-width: 350px; line-height: 1.8; }
.empty-state .btn { margin-top: 22px; gap: 18px; }
.table-wrapper { border-radius: 9px; background: transparent; }
th { background: #ffffff03; font-size: 11px; padding: 13px 16px; white-space: nowrap; }
td { font-size: 12px; padding: 16px; border-color: #ffffff09; }
td a:not(.btn) { color: #d4caff; }
.job-code { font-size: 12px; font-weight: 500; }
.badge { font-size: 10px; font-weight: 500; padding: 3px 8px; border-radius: 5px; }
.badge-running { box-shadow: none; }
.form-group { gap: 8px; margin-bottom: 22px; }
.form-label { font-size: 12px; font-weight: 500; color: #d8d8e5; }
.form-input, .form-select, .form-textarea { width: 100%; min-width: 0; background: #121319; font-size: 13px; padding: 11px 12px; border-color: #353641; border-radius: 8px; }
.form-input::placeholder, .form-textarea::placeholder { color: #868799; opacity: 1; }
.form-input:hover, .form-select:hover, .form-textarea:hover { border-color: #545565; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: #a493ff; box-shadow: 0 0 0 3px #a493ff15; }
.form-textarea { line-height: 1.7; }

select.form-select,
select.form-input,
.form-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 11px 36px 11px 12px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23a6a7b8' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 2L6 6.5L10.5 2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  cursor: pointer;
  line-height: 1.5;
}

select.form-select::-ms-expand,
select.form-input::-ms-expand {
  display: none;
}

select.form-select:hover,
select.form-input:hover,
.form-select:hover {
  border-color: #545565;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23d8d8e5' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 2L6 6.5L10.5 2'/%3E%3C/svg%3E");
}

select.form-select:focus,
select.form-input:focus,
.form-select:focus {
  border-color: #a493ff;
  box-shadow: 0 0 0 3px #a493ff15;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8' fill='none' stroke='%23a493ff' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.5 2L6 6.5L10.5 2'/%3E%3C/svg%3E");
}

select.form-select option,
select.form-input option,
.form-select option {
  background-color: #171821;
  color: var(--text-main);
}
.plan-box { background: #14151b; padding: 20px; }
.plan-section-title { font-size: 12px; font-weight: 500; }
.plan-section-content { font-size: 13px; white-space: pre-wrap; }
.plan-box, .timeline-content, .card { overflow-wrap: anywhere; }
.timeline-content { background: #14151b; }
.timeline-header { flex-wrap: wrap; gap: 8px; }
.timeline-title { font-size: 13px; }
.timeline-desc { font-size: 12px; }
.login-page { align-items: center; justify-content: center; padding: 24px; background: radial-gradient(ellipse at 50% 0%, #29223e 0%, #101116 65%); }
.login-card { width: 100%; max-width: 420px; padding: 36px; box-shadow: 0 24px 80px #0004; }
#toast-container { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 48px)); }
.toast { background: #25232f; border: 1px solid #a493ff50; border-radius: 10px; padding: 14px 18px; box-shadow: 0 8px 30px #0004; font-size: 13px; }
@media (min-width: 1500px) { .main-container { padding-top: 52px; } }
@media (max-width: 1150px) {
  .navbar { width: 210px; padding-inline: 12px; }
  .workspace { margin-left: 210px; }
  .main-container { padding: 28px; }
  .workspace-bar { padding-inline: 28px; }
  .workspace-footer { margin-inline: 28px; }
  .grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-sections { grid-template-columns: 1fr; }
  .grid-cols-2 { grid-template-columns: 1fr; }
  form .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .navbar { position: static; width: 100%; height: auto; padding: 18px 18px 0; border-right: 0; border-bottom: 1px solid var(--border-color); gap: 18px; }
  .nav-brand { padding: 0; font-size: 19px; }
  .brand-badge, .nav-section-label, .nav-note { display: none; }
  .nav-user { position: absolute; top: 18px; right: 18px; padding: 0; border: 0; }
  .user-tag { display: none; }
  .nav-links { flex-direction: row; gap: 4px; overflow-x: auto; padding-bottom: 12px; }
  .nav-link { white-space: nowrap; font-size: 11px; gap: 7px; padding: 9px; }
  .nav-link svg { width: 16px; height: 16px; }
  .workspace { margin-left: 0; }
  .workspace-bar { height: 50px; padding-inline: 20px; }
  .workspace-label { display: none; }
  .main-container { padding: 26px 18px; }
  .page-header { gap: 20px; margin-bottom: 24px; }
  .page-title { letter-spacing: -.7px; }
  .page-subtitle { font-size: 12px; }
  .card { padding: 18px; }
  .stat-card { padding: 18px; }
  .stat-card::after { right: 16px; top: 24px; }
  .stat-label { font-size: 11px; }
  .stat-val { font-size: 30px; }
  .grid { gap: 12px; }
  form .grid-cols-2, form .grid-cols-4 { grid-template-columns: 1fr; }
  .empty-state { padding: 24px 8px; }
  .workspace-footer { margin-inline: 18px; gap: 20px; font-size: 10px; }
  .login-card { padding: 24px; }
  .timeline { padding-left: 2.35rem; gap: 1rem; }
  .timeline::before { left: 0.75rem; }
  .timeline-icon-badge { left: -2.35rem; width: 28px; height: 28px; }
  .timeline-icon-badge svg { width: 14px; height: 14px; }
  .timeline-content { padding: 0.75rem 0.9rem; }
  .timeline-header { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
  .timeline-time { font-size: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

.job-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.job-meta .job-code { white-space: nowrap; }
.empty-description { color: var(--text-dim); padding: 16px 0; font-size: 13px; }
@media (max-width: 700px) {
  .nav-links { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); overflow: visible; gap: 3px; padding-bottom: 12px; }
  .nav-link { flex-direction: column; padding: 8px 3px; gap: 6px; font-size: 10px; white-space: normal; text-align: center; height: 100%; }
  .nav-link svg { width: 18px; height: 18px; }
  .job-meta { gap: 8px; }
}

/* Ninecode dev identity: code brackets around the family spark. */
.brand-link { display: flex; align-items: center; color: #f2f2fa; gap: 10px; }
.brand-link:hover { color: #fff; }
.brand-symbol { display: block; flex-shrink: 0; width: 36px; height: 36px; }
.brand-product { color: #a493ff; }
.brand-badge { padding-left: 46px; }
.login-symbol { display: block; margin: 0 auto 20px; }
@media (max-width: 700px) { .brand-symbol { width: 32px; height: 32px; } }
.nav-brand { padding-inline: 6px; font-size: 19px; }
.brand-link > span { white-space: nowrap; }
@media (max-width: 700px) { .nav-brand { padding-inline: 0; } }

/* Brand typography supplied by Ninecode; used exclusively for footer brand name. */
@font-face {
  font-family: "Polaris";
  src: url("/static/fonts/Polaris.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
.workspace-footer .brand-name {
  font-family: "Polaris", var(--font-family);
  font-weight: 400;
  font-synthesis: none;
  letter-spacing: .015em;
}
.brand-logo { display: block; width: 100%; height: auto; object-fit: contain; }
.nav-brand { padding: 0; width: 100%; }
.nav-brand .brand-link { display: block; width: 100%; }
.brand-badge { padding-left: 14px; }
.login-logo { display: block; width: 100%; height: auto; margin: 0 auto 12px; }
.login-brand-title { font-size: 18px; color: var(--text-main); overflow-wrap: anywhere; }
@media (max-width: 700px) {
  .nav-brand { width: min(230px, calc(100% - 58px)); }
}

/* Shared connection state is visible on every authenticated page. */
.live-status { display: inline-flex; align-items: center; gap: .5rem; font-size: .8rem; }
.live-status::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent-amber, #fbbf24); flex-shrink: 0; }
.live-status[data-state="connected"]::before { background: var(--accent-emerald, #10b981); }
.live-status[data-state="disconnected"]::before { background: #f87171; }
