:root {
  color-scheme: light;
  --ink: #17251f;
  --muted: #66736d;
  --green: #153a2f;
  --green-2: #245c49;
  --mint: #dff2e9;
  --cream: #f6f3eb;
  --card: #ffffff;
  --line: #dbe2de;
  --shadow: 0 20px 55px rgba(23, 37, 31, 0.1);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 5%, rgba(93, 178, 139, 0.2), transparent 34rem),
    var(--cream);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.tl-auth-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.tl-auth-card {
  width: min(100%, 470px);
  padding: clamp(28px, 6vw, 52px);
  border: 1px solid rgba(21, 58, 47, 0.08);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.tl-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green);
  font-weight: 800;
  text-decoration: none;
}

.tl-brand-picture {
  display: block;
  width: 48px;
  height: 48px;
}

.tl-brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tl-eyebrow {
  margin: 32px 0 8px;
  color: var(--green-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
}

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

h1 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

h2 {
  margin-bottom: 0;
  font-size: 1.4rem;
}

.tl-muted,
.tl-message {
  color: var(--muted);
}

.tl-form {
  display: grid;
  gap: 17px;
  margin-top: 30px;
}

.tl-form label {
  display: grid;
  gap: 7px;
  font-size: 0.85rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: white;
  color: var(--ink);
}

.tl-form input,
.tl-search {
  min-height: 48px;
  padding: 0 14px;
}

input:focus {
  border-color: var(--green-2);
  box-shadow: 0 0 0 4px rgba(36, 92, 73, 0.1);
}

.tl-form button,
#checkoutButton {
  min-height: 50px;
  padding: 0 20px;
  border-radius: 13px;
  color: white;
  background: var(--green);
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.tl-message {
  min-height: 22px;
  margin: 0;
  font-size: 0.88rem;
}

.tl-table-context {
  margin: 22px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--mint);
  color: var(--green);
  font-size: 0.85rem;
}

.tl-header {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px clamp(18px, 5vw, 72px);
  border-bottom: 1px solid rgba(21, 58, 47, 0.08);
  backdrop-filter: blur(18px);
  background: rgba(246, 243, 235, 0.84);
}

.tl-link-button {
  padding: 10px;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.tl-main {
  width: min(1400px, calc(100% - 32px));
  margin: 0 auto;
  padding: 38px 0 70px;
}

.tl-points-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  min-height: 270px;
  padding: clamp(28px, 6vw, 65px);
  overflow: hidden;
  border-radius: 28px;
  color: white;
  background:
    radial-gradient(circle at 85% 10%, rgba(143, 222, 183, 0.4), transparent 20rem),
    var(--green);
  box-shadow: var(--shadow);
}

.tl-points-card .tl-eyebrow,
.tl-points-card .tl-muted {
  color: #b8d9cb;
}

.tl-points-card h1 {
  margin-bottom: 10px;
}

.tl-points {
  display: grid;
  justify-items: end;
}

.tl-points strong {
  font-size: clamp(3.6rem, 10vw, 7rem);
  line-height: 0.8;
  letter-spacing: -0.08em;
}

.tl-points span {
  margin-top: 16px;
  color: #b8d9cb;
  font-weight: 700;
}

.tl-section {
  margin-top: 34px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
}

.tl-section .tl-eyebrow {
  margin-top: 0;
}

.tl-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.tl-search {
  max-width: 290px;
}

.tl-rewards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.tl-reward {
  display: grid;
  gap: 7px;
  padding: 16px;
  border-radius: 14px;
  background: var(--mint);
}

.tl-reward span {
  color: var(--green-2);
  font-size: 0.85rem;
  font-weight: 700;
}

.tl-order-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 22px;
  align-items: start;
}

.tl-categories {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tl-categories button {
  flex: 0 0 auto;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--green);
  cursor: pointer;
}

.tl-categories button.active {
  border-color: var(--green);
  color: white;
  background: var(--green);
}

.tl-catalog {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 13px;
}

.tl-product {
  overflow: hidden;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition:
    transform 140ms ease,
    box-shadow 140ms ease;
}

.tl-product:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(23, 37, 31, 0.1);
}

.tl-product-photo {
  display: grid;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background: #e8eee9;
}

.tl-product-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tl-product-photo.empty span {
  color: #9aaba3;
  font-size: 2rem;
  font-weight: 800;
}

.tl-product-body {
  display: grid;
  gap: 5px;
  padding: 14px;
}

.tl-product-body small {
  min-height: 1em;
  color: var(--muted);
}

.tl-product-body > span {
  color: var(--green-2);
  font-weight: 800;
}

.tl-cart {
  position: sticky;
  top: 86px;
  margin-top: 34px;
  padding: 25px;
  border-radius: 22px;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
}

.tl-cart .tl-muted,
.tl-cart .tl-message {
  color: #b8d9cb;
}

.tl-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.tl-cart-line > div:first-child {
  display: grid;
  gap: 4px;
}

.tl-cart-line > div:first-child span {
  color: #b8d9cb;
  font-size: 0.78rem;
}

.tl-cart-line > strong {
  grid-column: 2;
  text-align: right;
}

.tl-qty {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tl-qty button {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
}

.tl-cart-total {
  display: flex;
  justify-content: space-between;
  margin: 24px 0 18px;
  font-size: 1.1rem;
}

#checkoutButton {
  width: 100%;
  color: var(--green);
  background: #bcebd5;
}

.tl-cart .tl-message {
  margin-top: 14px;
}

@media (max-width: 900px) {
  .tl-order-layout {
    grid-template-columns: 1fr;
  }

  .tl-cart {
    position: static;
    order: -1;
    margin-top: 22px;
  }
}

@media (max-width: 620px) {
  .tl-main {
    width: min(100% - 20px, 1400px);
    padding-top: 14px;
  }

  .tl-points-card {
    display: grid;
    min-height: 300px;
    padding: 28px;
  }

  .tl-points {
    justify-items: start;
  }

  .tl-section {
    margin-top: 20px;
    padding: 18px;
  }

  .tl-section-head {
    display: grid;
  }

  .tl-search {
    max-width: none;
  }

  .tl-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
