:root {
  color-scheme: light;
  --ink: #14213d;
  --muted: #667085;
  --line: #d9e0e8;
  --surface: #ffffff;
  --page: #f4f7fb;
  --accent: #0b7a75;
  --accent-dark: #075c58;
  --warning: #b54708;
  --shadow: 0 18px 50px rgba(20, 33, 61, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.workspace {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.topbar,
.section-header,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.topbar {
  margin-bottom: 24px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 6px;
  font-size: 1.15rem;
}

p {
  color: var(--muted);
  line-height: 1.5;
}

.tool-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  margin-bottom: 28px;
}

.panel,
.login-panel,
.table-wrap,
.details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.login-panel {
  width: min(460px, 100%);
  margin: 12vh auto 0;
  padding: 26px;
  display: grid;
  gap: 18px;
}

.create-panel {
  display: grid;
  gap: 16px;
}

label {
  display: grid;
  gap: 8px;
  color: #2f3b52;
  font-size: 0.9rem;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--ink);
  font: inherit;
  background: #fbfdff;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(11, 122, 117, 0.14);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0 14px;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.button.primary {
  color: white;
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-dark);
}

.button.secondary {
  color: var(--ink);
  background: white;
  border-color: var(--line);
}

.preview-panel {
  min-height: 360px;
  display: grid;
  align-content: start;
  gap: 14px;
}

.empty-preview {
  display: grid;
  min-height: 290px;
  place-items: center;
  border: 1px dashed #b9c4d0;
  border-radius: 8px;
  background: #f9fbfd;
}

.empty-preview span {
  display: grid;
  width: 88px;
  height: 88px;
  place-items: center;
  border: 8px solid #d5dee8;
  color: #8492a6;
  font-weight: 900;
}

.qr-card {
  display: grid;
  gap: 12px;
}

.qr-card img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.tracking-link {
  overflow-wrap: anywhere;
  color: var(--accent-dark);
  font-size: 0.92rem;
  line-height: 1.4;
}

.status {
  min-height: 24px;
  margin-bottom: 0;
  color: var(--warning);
  font-weight: 700;
}

.report-section {
  display: grid;
  gap: 16px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

td {
  font-size: 0.94rem;
}

tr:last-child td {
  border-bottom: 0;
}

.destination {
  max-width: 330px;
  overflow-wrap: anywhere;
  color: var(--muted);
}

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

.text-button {
  border: 0;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.details {
  display: none;
  padding: 20px;
}

.details.active {
  display: block;
}

.scan-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.scan-item {
  display: grid;
  grid-template-columns: 180px 160px minmax(220px, 1fr);
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.scan-item span {
  overflow-wrap: anywhere;
}

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

@media (max-width: 820px) {
  .app-shell {
    padding: 18px;
  }

  .topbar,
  .section-header {
    display: grid;
  }

  .topbar-actions {
    display: grid;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .button {
    width: 100%;
  }

  .scan-item {
    grid-template-columns: 1fr;
  }
}
