:root {
  color-scheme: light;
  --ink: #10201b;
  --muted: #65706f;
  --line: #dfe7df;
  --green: #32c20e;
  --green-deep: #159300;
  --green-soft: #edfbe7;
  --danger: #c83a30;
  --blue: #266fd8;
  --shadow: 0 10px 28px rgba(30, 52, 44, 0.07);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(203, 244, 181, 0.55) 0 12rem, transparent 24rem),
    radial-gradient(circle at bottom right, rgba(226, 248, 205, 0.8) 0 10rem, transparent 24rem),
    #fbfdf9;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(100%, 160rem);
  margin: 0 auto;
  padding: clamp(0.75rem, 1.35vw, 1.75rem) clamp(1rem, 2.2vw, 3rem);
}

.login-view {
  min-height: calc(100vh - 8rem);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(100%, 58rem);
  padding: 2rem;
  border: 1px solid rgba(50, 194, 14, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--green-deep);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 2.45vw, 4rem);
  font-weight: 500;
  line-height: 1.05;
  text-align: center;
}

.login-title {
  overflow: visible;
  white-space: nowrap;
  font-size: clamp(2rem, 2.35vw, 3.6rem);
}

.login-form {
  margin-top: 2rem;
}

.login-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-weight: 700;
}

.code-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
}

.code-row input {
  min-width: 0;
  height: 3.25rem;
  padding: 0 1rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.code-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(50, 194, 14, 0.16);
}

.code-row button,
.primary-button,
.secondary-button,
.ghost-button,
.icon-button {
  border: 1px solid rgba(50, 194, 14, 0.5);
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
  font-weight: 800;
}

.code-row button {
  min-width: 6rem;
  padding: 0 1.25rem;
}

.form-error {
  min-height: 1.4rem;
  margin: 0.7rem 0 0;
  color: var(--danger);
}

.hub-view {
  min-height: calc(100vh - 3.5rem);
}

.hub-header {
  display: grid;
  grid-template-columns: minmax(7rem, 1fr) minmax(0, auto) minmax(7rem, 1fr);
  align-items: center;
  gap: 1rem;
  margin-bottom: clamp(0.85rem, 1.8vh, 1.5rem);
}

.header-title {
  min-width: 0;
}

.header-spacer {
  min-height: 1px;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2.35rem;
  padding: 0 0.85rem;
  background: rgba(255, 255, 255, 0.8);
  justify-self: end;
}

.drop-zone {
  display: grid;
  min-height: clamp(8.5rem, 14vh, 11rem);
  place-items: center;
  padding: clamp(0.85rem, 1.4vw, 1.3rem);
  border: 1px dashed rgba(50, 194, 14, 0.72);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  text-align: center;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.drop-zone.is-dragging {
  border-color: var(--green-deep);
  background: rgba(237, 251, 231, 0.94);
  transform: translateY(-2px);
}

.upload-icon {
  width: clamp(2.9rem, 3vw, 3.6rem);
  height: clamp(2.9rem, 3vw, 3.6rem);
  color: var(--green);
}

.upload-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.drop-zone p {
  margin: 0 0 0.7rem;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 650;
}

.upload-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-width: 9.5rem;
  min-height: 2.55rem;
  padding: 0 1.05rem;
  font-size: 0.95rem;
  box-shadow: 0 6px 14px rgba(50, 194, 14, 0.1);
}

.secondary-button {
  background: #fff;
}

.queue-list {
  display: grid;
  gap: 0.5rem;
  margin: 0.85rem 0 1.35rem;
}

.queue-item,
.file-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 4.75rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(16, 32, 27, 0.075);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 18px rgba(30, 52, 44, 0.055);
}

.file-icon {
  display: grid;
  width: 2.8rem;
  height: 2.8rem;
  place-items: center;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 1.05rem;
  font-weight: 900;
}

.file-icon.pdf {
  color: #e72222;
  background: #fff3f3;
  border-color: #ffcaca;
}

.file-icon.word {
  color: var(--blue);
  background: #eff6ff;
  border-color: #bfdbfe;
}

.file-main {
  min-width: 0;
}

.file-name {
  overflow: hidden;
  margin: 0 0 0.22rem;
  color: #111816;
  font-size: 0.95rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.file-meta span + span::before {
  content: "•";
  margin-right: 0.45rem;
}

.progress-track {
  height: 0.38rem;
  margin-top: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eee9;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), #8ee36c);
  transition: width 0.2s ease;
}

.files-section {
  margin-top: 0.7rem;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 0.45rem;
}

h2 {
  margin: 0.3rem 0 0.75rem;
  color: var(--green-deep);
  font-size: 1.08rem;
}

.icon-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  background: #fff;
}

.files-list {
  display: grid;
  gap: 0.5rem;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.preview-button {
  min-width: 5.8rem;
  min-height: 2.35rem;
  padding: 0 0.75rem;
  border: 1px solid rgba(50, 194, 14, 0.42);
  border-radius: 999px;
  background: #f8fff4;
  color: var(--green-deep);
  font-weight: 800;
}

.delete-button {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #6f7776;
  font-size: 1.35rem;
  line-height: 1;
}

.delete-button:hover {
  color: var(--danger);
  background: #fff0ef;
}

.empty-state {
  margin: 0.75rem 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.8);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: clamp(1.35rem, 2.7vh, 2.2rem);
  color: var(--green-deep);
  font-weight: 750;
  font-size: 0.88rem;
}

.drag-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  background: rgba(237, 251, 231, 0.74);
  pointer-events: none;
}

.drag-overlay div {
  display: grid;
  gap: 0.35rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(50, 194, 14, 0.28);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
  text-align: center;
}

.drag-overlay strong {
  color: var(--green-deep);
  font-size: 1.25rem;
}

.drag-overlay span {
  color: var(--muted);
}

[hidden] {
  display: none !important;
}

@media (min-width: 1440px) {
  .login-view,
  .hub-view {
    min-height: calc(100vh - 3.5rem);
  }

  .queue-item,
  .file-row {
    min-height: 4.9rem;
    padding: 0.78rem 1.05rem;
  }
}

@media (max-width: 760px) {
  .app-shell {
    padding: 1rem;
  }

  .hub-header {
    grid-template-columns: 1fr;
    margin-bottom: 1.5rem;
  }

  .header-spacer {
    display: none;
  }

  .ghost-button {
    align-self: flex-start;
    justify-self: start;
  }

  .drop-zone {
    min-height: 11.5rem;
    border-radius: 16px;
  }

  .code-row,
  .queue-item,
  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: space-between;
    width: 100%;
  }

  .preview-button {
    flex: 1;
  }
}

@media (max-width: 980px) {
  .login-panel {
    width: min(100%, 48rem);
  }

  .login-title {
    font-size: clamp(1.45rem, 4.2vw, 2.4rem);
  }
}
