:root {
  color-scheme: light;
  --bg: #f7efe6;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-strong: #ffffff;
  --text: #24170f;
  --muted: #726255;
  --line: rgba(86, 59, 35, 0.12);
  --brand: #b4682d;
  --brand-deep: #7e4317;
  --ok: #246b47;
  --ok-bg: rgba(36, 107, 71, 0.12);
  --warn: #996617;
  --warn-bg: rgba(180, 104, 45, 0.12);
  --error: #a23d34;
  --error-bg: #fff2f0;
  --success: #205f41;
  --success-bg: #ebf8f0;
  --shadow: 0 26px 60px rgba(52, 33, 14, 0.12);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Outfit", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(221, 178, 129, 0.35), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.82), transparent 34%),
    linear-gradient(180deg, #fffbf7 0%, var(--bg) 100%);
}

body.modal-open {
  overflow: hidden;
}

a {
  color: var(--brand-deep);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(36, 23, 15, 0.06);
  font-family: Consolas, monospace;
  font-size: 0.9rem;
}

.shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 56px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  margin-bottom: 24px;
  align-items: stretch;
}

.hero-copy-wrap,
.panel,
.stat-card,
.action-card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.hero-copy-wrap {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2.3rem, 4vw, 4.5rem);
  line-height: 0.98;
  max-width: 10ch;
}

.hero-copy {
  margin: 0;
  max-width: 56ch;
  color: var(--muted);
  line-height: 1.7;
  font-size: 1.02rem;
}

.hero-side {
  display: flex;
}

.stat-card {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-label {
  color: var(--muted);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.stat-card strong {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1;
}

.stat-meta {
  color: var(--muted);
  line-height: 1.5;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 26px;
  margin-bottom: 24px;
}

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

.panel-header h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.panel-header p {
  margin: 0;
  color: var(--muted);
}

.panel-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar-button {
  appearance: none;
  border: 1px solid rgba(126, 67, 23, 0.14);
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.toolbar-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(52, 33, 14, 0.12);
}

.toolbar-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.toolbar-button-danger {
  background: linear-gradient(135deg, #b24c40 0%, #8f352d 100%);
  border-color: transparent;
  color: white;
}

.toolbar-button-secondary {
  background: #fff8f2;
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.action-card {
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 22px;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.action-card:hover {
  transform: translateY(-3px);
  border-color: rgba(126, 67, 23, 0.22);
  box-shadow: 0 28px 56px rgba(52, 33, 14, 0.16);
}

.action-card-step::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), transparent 28%);
}

.action-step-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.action-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(180, 104, 45, 0.12);
  color: var(--brand-deep);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.action-step-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(180, 104, 45, 0.28), rgba(180, 104, 45, 0.02));
}

.action-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 132px;
}

.action-card h3 {
  margin: 0;
  font-size: 1.18rem;
}

.action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.action-helper {
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5;
}

.upload-field {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  position: relative;
  padding: 16px;
  width: 100%;
  border: 1px dashed rgba(126, 67, 23, 0.24);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 245, 239, 0.94));
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.upload-field:hover {
  border-color: rgba(126, 67, 23, 0.42);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 239, 229, 0.98));
  transform: translateY(-1px);
}

.upload-field.has-files {
  border-color: rgba(36, 107, 71, 0.3);
  background: linear-gradient(180deg, rgba(239, 249, 244, 0.94), rgba(255, 255, 255, 0.98));
}

.upload-field input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-field-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: rgba(180, 104, 45, 0.12);
  color: var(--brand-deep);
  font-size: 1.1rem;
  font-weight: 800;
}

.upload-field-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--muted);
}

.upload-field-copy strong {
  color: var(--text);
  font-size: 0.95rem;
}

.upload-field-copy span,
.upload-field-status {
  font-size: 0.88rem;
  line-height: 1.5;
}

.upload-field-status {
  grid-column: 1 / -1;
  color: var(--muted);
}

.action-support {
  min-height: 86px;
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(250, 245, 239, 0.96), rgba(255, 255, 255, 0.96));
  border: 1px solid rgba(126, 67, 23, 0.08);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}

.action-support-static {
  margin-top: auto;
}

.action-support-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(36, 23, 15, 0.06);
  color: var(--brand-deep);
  font-size: 0.84rem;
  font-weight: 700;
}

.action-cta {
  margin-top: auto;
}

.action-card button,
.button-like {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: white;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease;
  box-shadow: 0 16px 30px rgba(126, 67, 23, 0.22);
  text-align: center;
  width: 100%;
  min-height: 54px;
}

.action-card button:hover,
.button-like:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(126, 67, 23, 0.26);
}

.action-link:hover {
  text-decoration: none;
}

.table-wrap {
  overflow: auto;
}

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

thead th {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.88rem;
}

.checkbox-cell {
  width: 56px;
  padding-left: 6px;
  padding-right: 6px;
  text-align: center;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--brand);
  cursor: pointer;
}

tbody td {
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.cell-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cell-stack span,
.muted {
  color: var(--muted);
}

.thumb-card {
  width: 88px;
  height: 88px;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #ffffff, #f6eee6);
  border: 1px solid rgba(126, 67, 23, 0.12);
}

.thumb-card-qr {
  width: 110px;
  height: 110px;
}

.thumb-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb-qr {
  object-fit: contain;
  padding: 10px;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  white-space: nowrap;
}

.status-ready {
  background: var(--ok-bg);
  color: var(--ok);
}

.status-pending {
  background: var(--warn-bg);
  color: var(--warn);
}

.empty-state {
  padding: 26px 12px;
  text-align: center;
}

.empty-state h3 {
  margin: 0 0 10px;
}

.empty-state p {
  margin: 0;
  color: var(--muted);
}

.notification-center {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 45;
  width: min(92vw, 520px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.notification-toast {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 18px 18px 18px 16px;
  border-radius: 22px;
  box-shadow: 0 26px 50px rgba(40, 24, 12, 0.18);
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  opacity: 0;
  transform: translateY(-16px) scale(0.98);
  transition: opacity 220ms ease, transform 220ms ease;
  pointer-events: auto;
}

.notification-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.notification-toast.is-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
}

.notification-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
  flex-shrink: 0;
}

.notification-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notification-content strong {
  font-size: 1rem;
  line-height: 1.3;
}

.notification-content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 0.94rem;
}

.notification-close {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(36, 23, 15, 0.48);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  border-radius: 10px;
}

.notification-close:hover {
  background: rgba(36, 23, 15, 0.06);
}

.notification-success {
  border-color: rgba(32, 95, 65, 0.18);
}

.notification-success .notification-icon {
  background: var(--success-bg);
  color: var(--success);
}

.notification-error {
  border-color: rgba(162, 61, 52, 0.18);
}

.notification-error .notification-icon {
  background: var(--error-bg);
  color: var(--error);
}

.notification-warning {
  border-color: rgba(180, 104, 45, 0.2);
}

.notification-warning .notification-icon {
  background: rgba(180, 104, 45, 0.12);
  color: var(--warn);
}

.notification-info {
  border-color: rgba(58, 110, 176, 0.18);
}

.notification-info .notification-icon {
  background: rgba(58, 110, 176, 0.12);
  color: #2f67a5;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(37, 24, 16, 0.38);
  z-index: 40;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(100%, 560px);
  background: white;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 30px 60px rgba(37, 24, 16, 0.24);
}

.modal-card h3 {
  margin: 0 0 12px;
  font-size: 1.5rem;
}

.modal-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

@media (max-width: 1180px) {
  .actions-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .shell {
    width: min(100% - 20px, 1240px);
    padding-top: 22px;
  }

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

  .hero-copy-wrap,
  .panel {
    padding: 22px;
  }

  .panel-header {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .actions-grid {
    grid-template-columns: 1fr;
  }

  .notification-center {
    width: min(94vw, 520px);
    top: 12px;
  }

  .hero h1 {
    line-height: 1.02;
  }

  .toolbar-button,
  .modal-actions .toolbar-button {
    width: 100%;
  }

  .action-card-body {
    min-height: auto;
  }

  .action-support {
    min-height: auto;
  }
}
