@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600&family=Archivo:wght@500;700&display=swap');

:root {
  --bg: #f4f2ed;
  --bg-alt: #ffffff;
  --ink: #141414;
  --muted: #5c5c5c;
  --accent: #0f6b5c;
  --accent-2: #f0b429;
  --border: #e2ddd5;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top, #fdf7ef 0%, var(--bg) 50%, #efe8de 100%);
}

h1, h2, h3 {
  font-family: 'Archivo', 'Space Grotesk', sans-serif;
  margin: 0 0 12px 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 32px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav__brand {
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav__links a {
  margin-left: 20px;
  font-weight: 500;
}

.page {
  max-width: 1200px;
  margin: 32px auto 60px;
  padding: 0 32px;
}

.page__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.card {
  background: var(--bg-alt);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.card.split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: center;
}

.stats {
  display: flex;
  gap: 16px;
}

.stat {
  background: #fff6e0;
  padding: 12px 16px;
  border-radius: 12px;
  min-width: 120px;
  text-align: center;
}

.stat__value {
  font-size: 20px;
  font-weight: 700;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.product {
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
}

.product__title {
  font-weight: 600;
  margin-bottom: 8px;
}

.product__meta {
  font-size: 14px;
  color: var(--muted);
}

.table {
  width: 100%;
  display: grid;
  gap: 8px;
}

.table__row {
  display: grid;
  grid-template-columns: 2fr 2fr 1fr 1fr 1fr;
  gap: 12px;
  align-items: center;
  background: #fff;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.table__head {
  background: transparent;
  border: none;
  font-size: 13px;
  text-transform: uppercase;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge--pending {
  background: #fdf2d0;
  color: #8c5f00;
}

.badge--success {
  background: #d7f5e5;
  color: #0a6b3c;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.sales-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.sales-card {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sales-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.tag {
  background: #f1efe8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.price {
  font-size: 24px;
  font-weight: 700;
}

.form {
  display: grid;
  gap: 16px;
}

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

label {
  display: grid;
  gap: 6px;
  font-size: 14px;
}

input, select, textarea {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: inherit;
}

.alert {
  background: #ffe5e5;
  border: 1px solid #f0a5a5;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 16px;
}

.callout {
  margin-top: 16px;
  background: #f9f6f1;
  padding: 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  font-size: 13px;
}

.qr {
  text-align: center;
}

.qr img {
  border: 10px solid #fff;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.login {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}

.login__card {
  background: #fff;
  padding: 32px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  width: min(420px, 100%);
}

.helper {
  margin-top: 16px;
  font-size: 12px;
  color: var(--muted);
}

.mobile {
  padding: 20px;
  max-width: 720px;
  margin: 0 auto;
}

.mobile__header {
  text-align: left;
  margin-bottom: 18px;
}

.signature-pad {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  height: 220px;
  margin-top: 8px;
}

.signature-pad canvas {
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

.signature-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.signature-label {
  font-weight: 600;
}

.summary {
  display: grid;
  gap: 12px;
}

@media (max-width: 960px) {
  .page__header {
    flex-direction: column;
    align-items: flex-start;
  }

  .card.split {
    grid-template-columns: 1fr;
  }

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

  .stats {
    flex-wrap: wrap;
  }
}
