:root {
  color-scheme: light;
  --ink: #172c45;
  --muted: #64758b;
  --line: #e0e7f0;
  --canvas: #f4f7fb;
  --accent: #0d786b;
  --card: #fff;
}
[hidden] {
  display: none !important;
}
body {
  background: var(--canvas) !important;
  color: var(--ink) !important;
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.5;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea,
summary {
  outline-offset: 4px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 3px solid #52bcac;
}
button {
  transition:
    background 0.15s,
    border-color 0.15s;
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  background: #fff !important;
  color: var(--ink) !important;
  border: 1px solid #cbd7e4 !important;
  border-radius: 9px !important;
  min-height: 42px;
  padding: 10px;
}
input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px #0d786b18;
}
input[type="checkbox"] {
  accent-color: var(--accent);
}
#console > header {
  height: 80px;
  background: white;
  border-color: var(--line);
  padding: 0 32px;
}
#console > header > a {
  letter-spacing: -0.7px;
  color: #172c45;
}
#console > header > a span {
  color: var(--accent);
}
.app-shell {
  display: flex;
  min-height: calc(100vh - 80px);
}
.app-sidebar {
  width: 244px;
  flex: 0 0 244px;
  background: #12263f;
  padding: 28px 16px;
  color: #dce7f4;
}
.nav-group {
  margin-bottom: 30px;
}
.nav-label {
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #8ba2be;
  margin: 0 12px 10px;
}
.app-sidebar .nav {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 11px 12px;
  margin: 3px 0;
  text-align: left;
  border-radius: 8px;
  color: #bfd0e4;
  font-size: 13px;
  background: transparent;
  border: 1px solid transparent;
}
.app-sidebar .nav:hover {
  background: #1a3655;
  color: white;
}
.app-sidebar .nav.active {
  background: #1a4551;
  color: #c1fff2;
  border-color: #245864;
  font-weight: 650;
}
.nav-icon {
  font-size: 19px;
  width: 22px;
  text-align: center;
  line-height: 1;
}
.sidebar-note {
  border-top: 1px solid #29415c;
  margin: 40px 12px 0;
  padding-top: 20px;
  font-size: 12px;
  color: #d4e0ef;
}
.sidebar-note span {
  font-size: 11px;
  color: #8ba2be;
}
.app-main {
  padding: 36px 40px;
  min-width: 0;
  flex: 1;
}
.app-main h1 {
  font-size: 29px;
  letter-spacing: -0.8px;
}
.view-description {
  color: var(--muted);
  font-size: 13px;
  margin-top: 8px;
  max-width: 760px;
}
.app-main > .flex:first-child {
  align-items: flex-start;
  margin-bottom: 28px;
}
.app-main .bg-slate-900 {
  background: var(--card) !important;
  border-color: var(--line) !important;
  box-shadow: 0 2px 8px #1a345006;
}
#main-table-panel.jobs-unwrapped {
  display: contents;
}
#main-table-panel.jobs-unwrapped > :first-child {
  display: none;
}
.app-main .text-slate-400,
.app-main .text-slate-500,
#console > header .text-slate-400 {
  color: var(--muted) !important;
}
.app-main .text-teal-300,
.app-main .text-teal-400 {
  color: var(--accent) !important;
}
.app-main .border-slate-800,
.app-main .border-slate-700 {
  border-color: var(--line) !important;
}
.app-main .bg-slate-950 {
  background: #f8fafc !important;
  color: var(--ink) !important;
}
.app-main .bg-teal-400 {
  background: var(--accent) !important;
  color: #fff !important;
}
.app-main th {
  background: #f8fafc;
  color: #5e7088;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  padding: 4px;
  border-bottom: 1px solid var(--line);
}
.app-main td {
  padding: 1px;
  border-bottom: 1px solid #edf1f6;
  font-size: 13px;
  vertical-align: middle;
  color: var(--ink);
}
.app-main tr:hover td {
  background: #fcfdff;
}
.app-main td button {
  font-size: 12px;
  font-weight: 600;
}
.pill {
  background: #e6f4f0;
  color: #0f7464;
  border: 1px solid #cce9e0;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 650;
}
#stats {
  gap: 18px;
  margin-bottom: 28px;
}
#stats > div {
  padding: 22px 24px;
  border-radius: 12px;
}
#stats p:first-child {
  margin-bottom: 12px;
  font-size: 12px;
}
#stats p:last-child {
  font-size: 32px;
  letter-spacing: -1px;
}
#settings-panel {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 0 !important;
}
#settings-panel:empty {
  display: none;
}
#refresh {
  background: white;
  border-color: #ccd8e6;
  color: var(--ink);
  min-width: 90px;
  font-weight: 600;
}
#error {
  color: #bc3443;
}
.modal-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: var(--accent);
  border: 1px solid #cbdcd8;
  border-radius: 8px;
  padding: 10px 16px;
  margin: 8px 8px 8px 0;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}
.modal-trigger:hover {
  background: #edf7f3;
}
.modal-trigger::-webkit-details-marker {
  display: none;
}
#workspace-modal {
  padding: 0;
  border: 1px solid #d6e2ee;
  border-radius: 16px;
  width: min(920px, calc(100vw - 32px));
  max-height: 90vh;
  color: var(--ink);
  box-shadow: 0 28px 100px #071b4660;
  background: white;
}
#workspace-modal::backdrop {
  background: #071d3f88;
  backdrop-filter: blur(4px);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 23px 28px;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}
.modal-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}
#modal-title {
  font-size: 21px;
  font-weight: 650;
  letter-spacing: -0.4px;
}
#modal-close {
  font-size: 25px;
  line-height: 1;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: #f0f4f8;
  color: #536780;
}
.modal-body {
  padding: 26px 28px;
  max-height: calc(90vh - 150px);
  overflow: auto;
}
.modal-body h2 {
  font-size: 19px;
}
.modal-body h3 {
  font-size: 16px;
  font-weight: 600;
}
.modal-body .bg-slate-950,
.modal-body .bg-slate-900 {
  background: #f6f9fc !important;
  color: var(--ink) !important;
}
.modal-body .text-slate-400,
.modal-body .text-slate-500 {
  color: var(--muted) !important;
}
.modal-body .text-teal-300,
.modal-body .text-teal-400 {
  color: var(--accent) !important;
}
.modal-body .bg-teal-400 {
  background: var(--accent) !important;
  color: white !important;
}
.modal-body .border-slate-700,
.modal-body .border-slate-800 {
  border-color: var(--line) !important;
}
.modal-body form {
  margin-top: 12px;
}
.modal-body [data-modal-surface],
.modal-body > form,
.modal-body [data-modal-surface] > form {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.modal-body label {
  font-size: 13px;
  font-weight: 500;
}
.modal-body details {
  margin: 16px 0;
}
.modal-body th,
.modal-body td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.modal-feedback {
  padding: 0 28px 20px;
  color: #b63848;
  font-size: 13px;
  white-space: pre-wrap;
}
.modal-feedback:empty {
  padding-bottom: 0;
}
#login {
  background: radial-gradient(ellipse at 20% 20%, #19435b, #0e2039 75%);
}
#login-form {
  background: white !important;
  border: 0;
  box-shadow: 0 30px 90px #0004;
  color: var(--ink);
}
#login-form .text-slate-400 {
  color: var(--muted) !important;
}
#login-submit {
  background: var(--accent) !important;
  color: white !important;
}
#login-form .text-teal-400 {
  color: var(--accent) !important;
}
@media (max-width: 1000px) {
  .app-sidebar {
    width: 205px;
    flex-basis: 205px;
  }
  .app-main {
    padding: 28px 22px;
  }
  .app-sidebar .nav {
    font-size: 12px;
    padding: 10px;
  }
}
@media (max-width: 700px) {
  #console > header {
    height: 68px;
    padding: 0 18px;
  }
  #updated {
    display: none;
  }
  .app-shell {
    display: block;
  }
  .app-sidebar {
    width: auto;
    padding: 12px 16px;
  }
  .app-sidebar nav {
    display: flex;
    gap: 16px;
    overflow-x: auto;
  }
  .nav-group {
    display: flex;
    gap: 4px;
    margin: 0;
  }
  .nav-label,
  .nav-icon,
  .sidebar-note {
    display: none;
  }
  .app-sidebar .nav {
    white-space: nowrap;
    width: auto;
    padding: 9px 12px;
  }
  .app-main {
    padding: 25px 16px;
  }
  .app-main h1 {
    font-size: 24px;
  }
  .modal-header {
    padding: 18px;
  }
  .modal-body {
    padding: 20px 18px;
  }
}
.confirm-dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  max-width: 460px;
  padding: 28px;
  color: var(--ink);
  box-shadow: 0 24px 80px #132c4c55;
}
.confirm-dialog::backdrop {
  background: #071d3f88;
}
.confirm-dialog h2 {
  font-size: 20px;
  font-weight: 650;
}
.confirm-dialog p {
  margin: 16px 0 24px;
  color: var(--muted);
}
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.confirm-actions button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 14px;
}
.confirm-actions .danger-action {
  background: #b93243;
  border-color: #b93243;
  color: white;
}
#console > header button {
  color: var(--muted);
}
.app-main .text-amber-300,
.modal-body .text-amber-300 {
  color: #986400 !important;
}
.app-main .text-rose-300,
.modal-body .text-rose-300 {
  color: #b63449 !important;
}


.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  flex-wrap: wrap;
}
.page-header-controls,
#page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.page-header-controls { margin-left: auto; }
.page-action {
  border: 1px solid var(--accent, #2dd4bf);
  color: var(--accent, #2dd4bf);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.page-action:hover { background: rgba(45, 212, 191, 0.08); }
.page-action:focus-visible { outline: 2px solid var(--accent, #2dd4bf); outline-offset: 3px; }
@media (max-width: 700px) {
  .page-header-controls { width: 100%; margin-left: 0; justify-content: flex-start; }
  #page-actions { justify-content: flex-start; }
}

button:active:not(:disabled), .nav:active, .page-action:active { transform: translateY(1px); filter: brightness(.88); }
.action-working { opacity: .65; }
#activity-overlay { position: fixed; inset: 0; z-index: 10000; background: rgba(17, 30, 49, .24); display: grid; place-items: center; cursor: wait; }
#activity-overlay[hidden] { display: none; }
.activity-card { display: flex; align-items: center; gap: 14px; padding: 22px 30px; border-radius: 12px; background: #fff; color: #17324d; box-shadow: 0 12px 48px #10243833; font-weight: 600; }
.activity-spinner { width: 25px; height: 25px; border: 3px solid #d5e5e3; border-top-color: #087f75; border-radius: 50%; animation: activity-spin .7s linear infinite; }
@keyframes activity-spin { to { transform: rotate(360deg); } }
#api-notices { z-index: 11000; position: fixed; inset: 16px auto auto 16px; margin: 0; padding: 0; border: 0; background: transparent; width: min(420px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; pointer-events: none; }
.api-notice { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 10px; padding: 16px 18px; border: 1px solid #e6a5ad; border-left: 4px solid #b42338; border-radius: 10px; background: #fff4f5; color: #7e1f2d; box-shadow: 0 6px 24px #15233524; pointer-events: auto; font-size: 14px; }
.api-notice p { flex: 1; overflow-wrap: anywhere; }
.api-notice button { font-size: 24px; line-height: 1; color: #8c2635; }

.recovery-panel[hidden] { display: none; }
.recovery-panel { scroll-margin-top: 24px; }
.recovery-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.recovery-header p { margin-top: 8px; }
.recovery-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 20px 0; }
.recovery-toolbar select, .recovery-toolbar input { border: 1px solid #ccd7dd; border-radius: 8px; }
.recovery-toolbar input { flex: 1; min-width: 140px; }
.recovery-loading { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 180px; color: #32615c; }
.recovery-download { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0; }
.recovery-download .activity-spinner { width: 18px; height: 18px; border-width: 2px; }
.recovery-error { margin: 16px 0; color: #9a2636; }
.recovery-panel button:disabled { opacity: .5; cursor: default; }

.pill.pill-failed { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.pill.pill-cancelled { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; }
.pill.pill-succeeded { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.pill.pill-running { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.pill.pill-queued { background: #e2e8f0; color: #334155; border: 1px solid #94a3b8; }
.pill.pill-partial { background: #ffedd5; color: #9a3412; border: 1px solid #fdba74; }
.pill.pill-skipped { background: #f3e8ff; color: #6b21a8; border: 1px solid #d8b4fe; }

.job-status { display: inline-flex; vertical-align: middle; }
.job-status-succeeded { color: #15803d; }
.job-status-failed { color: #be123c; }
.job-status-cancelled { color: #b45309; }
.job-status-running { color: #1d4ed8; }
.job-status-queued { color: #64748b; }
.job-status-partial { color: #c2410c; }
.job-status-skipped { color: #7e22ce; }
.job-progress { min-width: 220px; }
.job-progress-bar { display: flex; align-items: center; gap: 10px; }
.job-progress-bar progress { width: 110px; accent-color: #0f766e; }
.job-progress-detail { margin-top: 0px; font-size: 12px; color: #526275; }

.app-main td:first-child { padding-left: 8px; }
