:root {
  color-scheme: dark;
  --bg: #0d1113;
  --surface: #151a1d;
  --surface-2: #101416;
  --field: #090c0d;
  --text: #f2eee6;
  --muted: #a8b0ad;
  --soft: #737d79;
  --line: #30383b;
  --line-2: #465154;
  --accent: #58d6bd;
  --accent-2: #f3c65f;
  --danger: #ff7b70;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    var(--bg);
  background-size: 32px 32px;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 1.25rem;
  line-height: 1.2;
  font-weight: 750;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 750;
}

h3 {
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 700;
  overflow-wrap: anywhere;
}

button {
  min-height: 2.55rem;
  border: 0;
  border-radius: 6px;
  padding: 0 0.95rem;
  background: var(--accent);
  color: #071311;
  cursor: pointer;
  font-weight: 750;
}

button:hover {
  filter: brightness(1.04);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.shell {
  width: min(1120px, calc(100% - 1.5rem));
  margin-inline: auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.layout {
  display: grid;
  grid-template-columns: minmax(19rem, 25rem) minmax(0, 1fr);
  gap: 0.8rem;
  padding-block: 0.8rem 2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(21, 26, 29, 0.96);
  padding: 1rem;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.24);
}

.submit-panel {
  grid-row: span 2;
}

.jobs-panel {
  min-height: 19rem;
}

.brand-row,
.login-head,
.section-head,
.job-main,
.job-foot,
.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.brand-row,
.login-head {
  justify-content: flex-start;
}

.app-dot {
  width: 2.15rem;
  height: 2.15rem;
  flex: 0 0 auto;
  border-radius: 8px;
  background:
    radial-gradient(circle at 68% 70%, #0d1113 0 18%, transparent 19%),
    conic-gradient(from 20deg, var(--accent), #70a8ff, var(--accent-2), var(--accent));
}

.kicker,
.panel-label {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.panel-label {
  margin-bottom: 0.55rem;
}

.stack {
  display: grid;
  gap: 0.85rem;
  margin-top: 0.85rem;
}

label {
  display: grid;
  gap: 0.4rem;
}

label span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field);
  color: var(--text);
  outline: none;
  padding: 0.72rem 0.78rem;
}

textarea {
  min-height: 7.5rem;
  resize: vertical;
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--line-2);
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.dropzone {
  position: relative;
  min-height: 6rem;
  align-content: center;
  border: 1px dashed var(--line-2);
  border-radius: 7px;
  background:
    linear-gradient(135deg, rgba(88, 214, 189, 0.08), transparent 58%),
    var(--field);
  padding: 0.85rem;
  cursor: pointer;
}

.dropzone:hover,
.dropzone.is-dragging {
  border-color: var(--accent);
  background:
    linear-gradient(135deg, rgba(88, 214, 189, 0.16), transparent 58%),
    var(--field);
}

.dropzone strong {
  color: var(--text);
  font-size: 0.92rem;
}

.dropzone em,
.dropzone small {
  color: var(--muted);
  font-size: 0.8rem;
  font-style: normal;
}

.dropzone small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grid.two,
.library-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.ghost {
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.compact {
  min-height: 2.15rem;
  padding-inline: 0.75rem;
  font-size: 0.88rem;
}

.or {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.or::before,
.or::after {
  content: "";
  height: 1px;
  flex: 1;
  background: var(--line);
}

.library-grid,
.jobs {
  margin-top: 0.8rem;
}

.library,
.job,
.empty {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-2);
}

.library,
.job {
  padding: 0.8rem;
}

.library-title {
  margin-bottom: 0.2rem;
  font-weight: 760;
}

.library strong {
  color: var(--accent-2);
  font-size: 1.1rem;
}

.jobs {
  display: grid;
  gap: 0.65rem;
}

.job-main {
  align-items: flex-start;
}

.job-title {
  min-width: 0;
  display: grid;
  gap: 0.18rem;
}

.job-status {
  width: fit-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(88, 214, 189, 0.08);
  padding: 0.16rem 0.48rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.job-status.moved,
.job-status.complete {
  color: var(--accent-2);
  background: rgba(243, 198, 95, 0.1);
}

.job.is-done .meter span {
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.job-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.icon {
  width: 2.1rem;
  min-height: 2.1rem;
  padding: 0;
}

.icon.danger {
  background: rgba(255, 123, 112, 0.12);
  border-color: rgba(255, 123, 112, 0.35);
  color: var(--danger);
  font-size: 1.2rem;
}

.meter {
  height: 0.5rem;
  overflow: hidden;
  background: #080b0c;
  border-radius: 999px;
  margin: 0.65rem 0 0.4rem;
}

.meter span {
  display: block;
  height: 100%;
  min-width: 0.35rem;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.muted,
.message,
.empty,
.job-foot,
.path {
  color: var(--muted);
  font-size: 0.84rem;
}

.job-foot {
  align-items: center;
}

.path {
  margin-top: 0.55rem;
  overflow-wrap: anywhere;
}

.error {
  color: var(--danger);
  margin-top: 0.55rem;
  font-size: 0.84rem;
}

.empty {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
}

.empty strong {
  color: var(--text);
}

.login-page {
  display: grid;
  place-items: center;
  padding: 1rem;
}

.login-shell {
  width: min(24rem, 100%);
}

.login-panel {
  padding: 1rem;
}

@media (max-width: 820px) {
  .layout,
  .grid.two,
  .library-grid {
    grid-template-columns: 1fr;
  }

  .submit-panel {
    grid-row: auto;
  }
}

@media (max-width: 520px) {
  .topbar,
  .section-head,
  .job-main {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-row,
  .login-head {
    align-items: center;
    flex-direction: row;
  }
}
