/*
 * Vlinder upload portal.
 *
 * Palette sampled from the brand mark: deep navy, mid blue, steel, and a pale
 * blue tint used for surfaces. No external assets, no web fonts, nothing the
 * content security policy would block or a corporate network could strip.
 */

:root {
  --navy: #153a68;
  --navy-deep: #0f2b4d;
  --blue: #315d92;
  --steel: #749cbc;
  --mist: #9dbed8;

  --ink: #14202e;
  --ink-soft: #5a6b7d;
  --ink-faint: #8a99a8;

  --surface: #ffffff;
  --canvas: #eef2f7;
  --tint: #f4f8fc;
  --line: #dde5ee;
  --line-strong: #c6d4e2;

  --ok-bg: #eef7f1;
  --ok-ink: #1c6b41;
  --ok-line: #bfe0cc;
  --bad-bg: #fdf1f0;
  --bad-ink: #a32b1f;
  --bad-line: #f3ccc6;

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow: 0 1px 2px rgba(21, 58, 104, 0.06), 0 4px 16px rgba(21, 58, 104, 0.06);
  --shadow-lift: 0 2px 4px rgba(21, 58, 104, 0.08), 0 12px 32px rgba(21, 58, 104, 0.1);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

/*
 * The hidden attribute is how every panel here is toggled, and a class that sets
 * display would otherwise win against the browser default and leave a "hidden"
 * panel on screen.
 */
[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-sm {
  width: 16px;
  height: 16px;
  flex: none;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 11px 20px;
  font: inherit;
  font-weight: 550;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 1px 2px rgba(15, 43, 77, 0.24);
}

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

.btn-primary:disabled {
  background: var(--steel);
  cursor: default;
  box-shadow: none;
}

.btn-secondary {
  background: var(--surface);
  color: var(--navy);
  border-color: var(--line-strong);
  font-weight: 550;
}

.btn-secondary:hover {
  border-color: var(--steel);
  background: var(--tint);
}

.btn-ghost {
  background: none;
  color: var(--ink-soft);
  padding: 11px 14px;
}

.btn-ghost:hover {
  color: var(--navy);
  background: rgba(21, 58, 104, 0.06);
}

.btn-block {
  width: 100%;
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- sign in ---------- */

.signin-view {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px 24px;
  /* A quiet wash of brand colour so the page is not a blank white sheet. */
  background:
    radial-gradient(900px 460px at 50% -8%, rgba(49, 93, 146, 0.26), transparent 68%),
    linear-gradient(180deg, #e7eef6 0%, var(--canvas) 42%);
}

.signin-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lift);
  padding: 40px 32px 32px;
  text-align: center;
}

.signin-logo {
  height: 34px;
  width: auto;
  max-width: 100%;
  margin-bottom: 28px;
}

.signin-card h1 {
  font-size: 1.3rem;
  font-weight: 620;
  letter-spacing: -0.015em;
  margin: 0 0 6px;
  color: var(--navy);
}

.signin-sub {
  margin: 0 0 28px;
  color: var(--ink-soft);
  font-size: 0.925rem;
}

.signin-card form {
  text-align: left;
}

.signin-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 26px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 0.8125rem;
}

.signin-foot .icon-sm {
  color: var(--steel);
}

.page-foot {
  margin: 28px 0 0;
  text-align: center;
  font-size: 0.75rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- fields ---------- */

.field {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 0.85rem;
  font-weight: 550;
  color: var(--ink);
  margin-bottom: 7px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input[type="text"]:hover,
input[type="password"]:hover {
  border-color: var(--steel);
}

input[type="text"]:focus,
input[type="password"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(49, 93, 146, 0.16);
}

/* ---------- app shell ---------- */

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-inner {
  max-width: 780px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar-logo {
  height: 26px;
  width: auto;
}

.page {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px 20px 48px;
}

.page-head {
  margin-bottom: 24px;
}

.page-head h1 {
  font-size: 1.6rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  color: var(--navy);
  overflow-wrap: anywhere;
}

.page-sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

.card-head h2 {
  font-size: 1rem;
  font-weight: 620;
  margin: 0;
  color: var(--ink);
}

.pill {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}

/* ---------- dropzone ---------- */

.dropzone {
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--r);
  background: var(--tint);
  padding: 40px 20px 32px;
  text-align: center;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.dropzone.is-active {
  border-color: var(--blue);
  background: rgba(49, 93, 146, 0.08);
}

.dropzone-icon {
  width: 40px;
  height: 40px;
  color: var(--steel);
  margin-bottom: 14px;
}

.dropzone.is-active .dropzone-icon {
  color: var(--blue);
}

.dropzone-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 580;
  color: var(--ink);
}

.dropzone-or {
  margin: 6px 0 14px;
  font-size: 0.85rem;
  color: var(--ink-faint);
}

.dropzone-note {
  margin: 16px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-faint);
}

/* ---------- queue ---------- */

.queue {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
}

.queue li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.queue li:first-child {
  border-top: none;
  padding-top: 4px;
}

.q-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.q-icon {
  width: 20px;
  height: 20px;
  color: var(--steel);
  margin-top: 2px;
}

.q-main {
  flex: 1;
  min-width: 0;
}

.q-name {
  display: block;
  font-size: 0.9375rem;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.q-size {
  font-size: 0.8125rem;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-top: 1px;
}

.track {
  margin-top: 10px;
  height: 5px;
  background: var(--canvas);
  border-radius: 999px;
  overflow: hidden;
}

.bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--navy));
  border-radius: 999px;
  transition: width 0.2s ease;
}

.q-status {
  margin: 7px 0 0;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  overflow-wrap: anywhere;
}

.q-status.is-done {
  color: var(--ok-ink);
  font-weight: 500;
}

.q-status.is-error {
  color: var(--bad-ink);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ---------- alerts ---------- */

.alert {
  border-radius: var(--r);
  padding: 14px 16px;
  margin: 18px 0 0;
  font-size: 0.9rem;
  border: 1px solid transparent;
  overflow-wrap: anywhere;
}

.alert-error {
  background: #fdf1f0;
  color: var(--bad-ink);
  border-color: var(--bad-line);
}

.alert-success {
  background: var(--ok-bg);
  color: var(--ok-ink);
  border-color: var(--ok-line);
}

.alert-head {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 580;
}

.alert-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0 0 0 25px;
}

.alert-list li {
  font-size: 0.85rem;
  padding: 3px 0;
  overflow-wrap: anywhere;
}

/* ---------- table ---------- */

.empty {
  margin: 0;
  padding: 22px 0;
  text-align: center;
  color: var(--ink-faint);
  font-size: 0.9rem;
}

.table-wrap {
  overflow-x: auto;
}

.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.files th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 620;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 0 14px 10px 0;
  border-bottom: 1px solid var(--line);
}

.files td {
  padding: 13px 14px 13px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

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

.files td:first-child {
  overflow-wrap: anywhere;
  font-weight: 480;
}

.files td:nth-child(2),
.files td:nth-child(3) {
  white-space: nowrap;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

/* ---------- narrow screens ---------- */

@media (max-width: 560px) {
  .page {
    padding: 24px 14px 40px;
  }

  .topbar-inner {
    padding: 10px 14px;
  }

  .card {
    padding: 18px 16px;
    border-radius: var(--r);
  }

  .signin-card {
    padding: 32px 22px 26px;
  }

  .page-head h1 {
    font-size: 1.35rem;
  }

  .dropzone {
    padding: 30px 14px 26px;
  }

  .files th:nth-child(3),
  .files td:nth-child(3) {
    white-space: normal;
  }

  /* The primary action takes the width; the quiet one stays quiet. */
  .actions .btn-primary {
    flex: 1;
  }
}
