:root {
  --ink: #17211d;
  --muted: #607068;
  --paper: #f4efe5;
  --paper-2: #ebe2d2;
  --card: rgba(255, 252, 244, 0.82);
  --line: rgba(32, 49, 42, 0.12);
  --green: #1e6f55;
  --gold: #d49b3d;
  --terracotta: #bd6348;
  --danger: #a43f3f;
  --shadow: 0 28px 70px rgba(44, 55, 48, 0.18);
  --radius: 28px;
  --font-display: Georgia, "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: Candara, "Trebuchet MS", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background:
    radial-gradient(circle at 10% 10%, rgba(122, 191, 138, 0.28), transparent 28%),
    radial-gradient(circle at 85% 15%, rgba(212, 155, 61, 0.26), transparent 30%),
    linear-gradient(135deg, var(--paper), var(--paper-2));
}

button,
input,
textarea {
  font: inherit;
}

code {
  border-radius: 8px;
  padding: 2px 6px;
  background: rgba(30, 111, 85, 0.1);
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(23, 33, 29, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23, 33, 29, 0.035) 1px, transparent 1px);
  background-size: 30px 30px;
}

.orb {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  filter: blur(20px);
  opacity: 0.5;
  pointer-events: none;
  animation: drift 12s ease-in-out infinite;
}

.orb-one {
  width: 260px;
  height: 260px;
  left: -80px;
  top: 120px;
  background: rgba(30, 111, 85, 0.28);
}

.orb-two {
  width: 310px;
  height: 310px;
  right: -120px;
  bottom: 80px;
  background: rgba(189, 99, 72, 0.24);
  animation-delay: -5s;
}

.shell {
  position: relative;
  z-index: 1;
  width: min(1360px, calc(100% - 28px));
  margin: 0 auto;
  padding: 24px 0 80px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.28)),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.hero,
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  letter-spacing: -0.035em;
}

h1 {
  max-width: 12ch;
  font-size: clamp(2.4rem, 5vw, 5rem);
  line-height: 0.92;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 2rem);
}

.lead {
  max-width: 58ch;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.55;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--green);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
}

.api-chip {
  min-width: min(360px, 100%);
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.36);
}

.api-chip small {
  display: block;
  color: var(--muted);
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--gold);
  box-shadow: 0 0 0 8px rgba(212, 155, 61, 0.16);
}

.dot-good {
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(30, 111, 85, 0.16);
}

.dot-bad {
  background: var(--danger);
  box-shadow: 0 0 0 8px rgba(164, 63, 63, 0.16);
}

.login-grid,
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(320px, 0.9fr) minmax(320px, 1.1fr);
  margin-top: 20px;
}

.login-card,
.checklist,
.grid > .card,
#dashboard-view > .card {
  padding: 24px;
}

.form,
.field,
.upload,
.documents {
  display: grid;
  gap: 14px;
}

.field {
  margin-top: 14px;
}

.field span,
.switch span {
  font-weight: 800;
}

.compact {
  max-width: 440px;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(23, 33, 29, 0.15);
  border-radius: 18px;
  padding: 13px 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
}

input:focus,
textarea:focus {
  outline: 0;
  border-color: rgba(30, 111, 85, 0.45);
  box-shadow: 0 0 0 4px rgba(30, 111, 85, 0.1);
}

textarea {
  resize: vertical;
}

.button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 11px 17px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 160ms ease, opacity 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.button-main {
  color: #fffaf0;
  background: linear-gradient(135deg, var(--green), #144f3f);
}

.button-soft {
  color: #fffaf0;
  background: linear-gradient(135deg, var(--terracotta), #8e4a38);
}

.button-ghost {
  color: var(--ink);
  background: rgba(23, 33, 29, 0.08);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.actions.left {
  justify-content: flex-start;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.pills,
.status-grid {
  display: grid;
  gap: 12px;
}

.pills {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  margin-bottom: 16px;
}

.pill,
.status-card,
.document,
.schedule-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.38);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  font-weight: 800;
}

.pill.good {
  color: var(--green);
  background: rgba(30, 111, 85, 0.11);
}

.pill.warn {
  color: #8d6518;
  background: rgba(212, 155, 61, 0.16);
}

.pill.bad {
  color: var(--danger);
  background: rgba(164, 63, 63, 0.12);
}

.status-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.status-card {
  padding: 14px;
}

.status-card span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
}

.status-card strong {
  display: block;
  margin-top: 6px;
  word-break: break-word;
}

.qr-box {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed rgba(23, 33, 29, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.3);
}

.qr-box img {
  width: min(300px, 92%);
  padding: 16px;
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(23, 33, 29, 0.18);
}

.drop {
  min-height: 150px;
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 18px;
  text-align: center;
  border: 1px dashed rgba(23, 33, 29, 0.24);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.34);
}

.document {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.document-path {
  font-weight: 900;
  word-break: break-word;
}

.document-meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.schedule-grid {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.schedule-row {
  display: grid;
  grid-template-columns: 90px 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
}

.schedule-row label,
.switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.error {
  min-height: 1.25rem;
  color: var(--danger);
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  width: min(460px, calc(100vw - 36px));
  padding: 14px 16px;
  border-radius: 18px;
  color: #fffaf0;
  background: #17211d;
  box-shadow: var(--shadow);
}

.hidden {
  display: none !important;
}

@keyframes drift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }

  50% {
    transform: translate3d(18px, -14px, 0);
  }
}

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

  .login-grid,
  .grid {
    grid-template-columns: 1fr;
  }

  .actions {
    justify-content: flex-start;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 18px, 1360px);
    padding-top: 10px;
  }

  .hero,
  .topbar,
  .login-card,
  .checklist,
  .grid > .card,
  #dashboard-view > .card {
    padding: 18px;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }
}
