:root {
  --mint: #83e7df;
  --mint-deep: #18b8ae;
  --ink: #101318;
  --soft-ink: #2a323d;
  --muted: #6d7682;
  --line: #e5edf0;
  --paper: #f7fbfb;
  --white: #ffffff;
  --green: #77d891;
  --pink: #f8a7ca;
  --gray: #eef3f4;
  --shadow: 0 22px 60px rgba(16, 19, 24, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

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

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.topbar {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(18px, 4vw, 54px);
  background: rgba(4, 6, 10, 0.72);
  border-bottom: 1px solid rgba(131, 231, 223, 0.22);
  box-shadow: 0 16px 44px rgba(0, 0, 0, .32);
  backdrop-filter: blur(22px) saturate(1.2);
}

.brand {
  font-family: Didot, "Bodoni 72", "Bodoni 72 Smallcaps", "Times New Roman", serif;
  font-size: 32px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.brand-mark::before {
  content: none;
}

.topbar .brand {
  color: #fff;
  text-shadow: 0 0 22px rgba(131, 231, 223, .18);
}

.topbar .language-toggle {
  color: #efffff;
  background: rgba(255, 255, 255, .08);
  border-color: rgba(131, 231, 223, .28);
}

.language-toggle,
.ghost-button,
.icon-button,
.primary-button,
.danger-button,
.small-button,
.tab-button {
  min-height: 42px;
  border: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 700;
}

.language-toggle,
.ghost-button,
.tab-button {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(16, 19, 24, 0.1);
}

.primary-button {
  color: var(--ink);
  background: var(--mint);
  box-shadow: 0 10px 24px rgba(24, 184, 174, 0.22);
}

.primary-button:hover {
  background: #9af1eb;
}

.danger-button {
  color: #fff;
  background: #252a32;
}

.small-button {
  min-height: 34px;
  padding: 0 12px;
  background: #eef8f7;
  color: var(--ink);
  border: 1px solid #cce9e7;
}

.hero {
  min-height: 100vh;
  padding: 112px clamp(18px, 5vw, 68px) 40px;
  display: grid;
  align-items: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 20%, rgba(131, 231, 223, .28), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 111, 159, .2), transparent 28%),
    linear-gradient(90deg, rgba(2, 4, 8, .78) 0%, rgba(4, 8, 14, .42) 44%, rgba(4, 4, 8, .76) 100%),
    url("/static/hero-brazilian-poster.png") center / cover no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 88px 2vw 24px;
  background:
    linear-gradient(115deg, rgba(131,231,223,.16), rgba(255,255,255,0)),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(0,0,0,.22));
  border: 1px solid rgba(131,231,223,.24);
  box-shadow: inset 0 0 80px rgba(0,0,0,.34), 0 0 80px rgba(131,231,223,.08);
  border-radius: 8px;
  transform: skewY(-.6deg);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0) 52%, rgba(2,4,8,.9)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.035) 0 1px, transparent 1px 54px);
  pointer-events: none;
}

@keyframes floatPoster {
  0%, 100% { transform: translate(-50%, -50%) rotate(-1deg); }
  50% { transform: translate(-50%, -54%) rotate(1.5deg); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(260px, 480px) minmax(260px, 480px);
  gap: clamp(18px, 4vw, 42px);
  justify-content: center;
  align-items: end;
}

.access-card,
.admin-card,
.panel,
.modal-sheet,
.product-card {
  border-radius: var(--radius);
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.88);
  box-shadow: var(--shadow);
}

.access-card {
  min-height: 214px;
  padding: clamp(20px, 4vw, 30px);
  color: #f5ffff;
  background: linear-gradient(145deg, rgba(10, 14, 22, .78), rgba(255,255,255,.08));
  border-color: rgba(131, 231, 223, .26);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255,255,255,.12);
  backdrop-filter: blur(26px) saturate(1.25);
}

.access-card h1,
.access-card h2 {
  margin: 0 0 22px;
  font-size: clamp(22px, 2.15vw, 30px);
  line-height: 1.14;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.field,
.select-field {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d9e5e8;
  background: #fff;
  border-radius: var(--radius);
  padding: 0 14px;
  color: var(--ink);
  outline: none;
}

.field:focus,
.select-field:focus {
  border-color: var(--mint-deep);
  box-shadow: 0 0 0 4px rgba(131, 231, 223, .32);
}

.note {
  color: var(--muted);
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.45;
}

.hero .note {
  color: rgba(239, 255, 255, .72);
}

.hero .field {
  color: #f7ffff;
  background: rgba(255, 255, 255, .1);
  border-color: rgba(255, 255, 255, .2);
}

.hero .field::placeholder {
  color: rgba(239, 255, 255, .58);
}

.app-shell .note,
.detail-layout .note {
  color: rgba(239, 255, 255, .58);
}

.app-shell .ghost-button,
.detail-layout .ghost-button {
  color: #efffff;
  background: rgba(255, 255, 255, .07);
  border-color: rgba(131, 231, 223, .2);
}

.app-shell .empty,
.detail-layout .empty {
  color: rgba(239, 255, 255, .62);
}

.toast {
  position: fixed;
  z-index: 80;
  top: 90px;
  right: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 16px 18px;
  color: #fff;
  background: #111820;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px 1fr;
  background:
    radial-gradient(circle at 16% 12%, rgba(131, 231, 223, .18), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(255, 111, 159, .14), transparent 30%),
    linear-gradient(145deg, #05070b 0%, #0c1018 42%, #05070b 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 26px 18px;
  color: #f5ffff;
  background: linear-gradient(180deg, rgba(7, 10, 16, .94), rgba(12, 16, 24, .86));
  border-right: 1px solid rgba(131, 231, 223, .2);
  box-shadow: 22px 0 54px rgba(0, 0, 0, .38);
  backdrop-filter: blur(22px) saturate(1.2);
  overflow: auto;
}

.sidebar .brand {
  color: #fff;
  margin-bottom: 28px;
  text-shadow: 0 0 22px rgba(131, 231, 223, .18);
}

.admin-nav .brand-mark::before {
  content: none;
}

.category-title {
  width: 100%;
  min-height: 44px;
  margin: 8px 0;
  border: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: rgba(245, 255, 255, .86);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(131, 231, 223, .16);
  font-weight: 800;
}

.category-title.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(131, 231, 223, .22), rgba(255, 111, 159, .12));
  border-color: rgba(131, 231, 223, .54);
  box-shadow: 0 14px 30px rgba(0,0,0,.26), 0 0 24px rgba(131, 231, 223, .12);
}

.category-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.cat-icon {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  color: #ff5d91;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255, 111, 159, .34);
  border-radius: 999px;
}

.cat-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sub-list {
  display: grid;
  gap: 6px;
  padding: 4px 0 8px 14px;
}

.sub-item {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius);
  color: rgba(239, 255, 255, .56);
  background: transparent;
  text-align: left;
  padding: 0 12px;
  font-weight: 750;
}

.sub-item.active {
  color: #83e7df;
  background: rgba(131, 231, 223, .08);
  box-shadow: inset 3px 0 0 #83e7df;
}

.main {
  min-width: 0;
  padding: 28px clamp(16px, 3vw, 38px);
  color: #f5ffff;
}

.main-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.main-title {
  margin: 0;
  font-size: clamp(24px, 3vw, 42px);
  color: #ffffff;
  text-shadow: 0 0 28px rgba(131, 231, 223, .16);
}

.tag-bar,
.toolbar,
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.admin-filter-stack {
  display: grid;
  gap: 14px;
  align-items: start;
}

.admin-filter-select {
  width: min(260px, 100%);
  display: grid;
  gap: 8px;
}

.admin-filter-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-chip {
  min-height: 38px;
  border: 1px solid rgba(131, 231, 223, .2);
  background: rgba(255,255,255,.07);
  color: rgba(245,255,255,.82);
  border-radius: 999px;
  padding: 0 14px;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .16);
  backdrop-filter: blur(14px);
}

.tag-chip.active {
  color: #061014;
  border-color: #83e7df;
  background: linear-gradient(135deg, #83e7df, #ff7aa6);
  box-shadow: 0 14px 28px rgba(131, 231, 223, .18), 0 0 24px rgba(255, 111, 159, .16);
}

.masonry {
  column-count: 3;
  column-gap: 20px;
  margin-top: 20px;
}

.product-card {
  break-inside: avoid;
  display: block;
  margin: 0 0 18px;
  overflow: hidden;
  border: 1px solid rgba(131, 231, 223, .16);
  box-shadow: 0 20px 48px rgba(0,0,0,.34);
  background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.04));
  backdrop-filter: blur(18px);
}

.app-shell .product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 54px rgba(0,0,0,.42), 0 0 34px rgba(131, 231, 223, .13);
  border-color: rgba(131, 231, 223, .36);
}

.product-card img {
  width: 100%;
  display: block;
  aspect-ratio: 1.15 / 1;
  object-fit: cover;
  background: var(--gray);
}

.product-meta {
  padding: 14px;
}

.product-name {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 850;
  color: #ffffff;
}

.stock {
  color: var(--muted);
  font-weight: 700;
  font-size: 14px;
}

.app-shell .stock,
.detail-layout .stock {
  color: rgba(239, 255, 255, .66);
}

.detail-layout {
  min-height: 100vh;
  padding: 28px;
  display: grid;
  grid-template-columns: minmax(280px, 1.2fr) minmax(240px, .8fr);
  gap: 28px;
  align-items: center;
  color: #f5ffff;
  background:
    radial-gradient(circle at 18% 18%, rgba(131, 231, 223, .16), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(255, 111, 159, .13), transparent 30%),
    linear-gradient(145deg, #05070b, #0c1018 44%, #05070b);
}

.detail-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .46), 0 0 44px rgba(131, 231, 223, .12);
  border: 1px solid rgba(131, 231, 223, .18);
  background: #0c1018;
}

.admin-page {
  min-height: 100vh;
  padding: 32px clamp(16px, 3vw, 42px);
  background:
    linear-gradient(135deg, rgba(131,231,223,.22), transparent 34%),
    #f7fbfb;
}

.admin-card {
  width: min(430px, 100%);
  margin: 10vh auto 0;
  padding: 28px;
}

.admin-layout {
  display: grid;
  grid-template-columns: 230px 1fr;
  min-height: 100vh;
}

.admin-nav {
  background: #111820;
  color: #fff;
  padding: 24px 16px;
}

.admin-nav a,
.admin-nav button {
  width: 100%;
  min-height: 42px;
  margin: 5px 0;
  border: 0;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: rgba(255,255,255,.78);
  background: transparent;
  font-weight: 750;
}

.admin-nav a.active {
  color: var(--ink);
  background: var(--mint);
}

.admin-content {
  min-width: 0;
  padding: 28px clamp(16px, 3vw, 36px);
}

.admin-content .tag-chip {
  color: var(--soft-ink);
  background: #fff;
  border-color: #f0dce3;
  box-shadow: 0 6px 16px rgba(16, 19, 24, .04);
}

.admin-content .tag-chip.active {
  color: #061014;
  background: var(--mint);
  border-color: var(--mint);
  box-shadow: 0 10px 22px rgba(24, 184, 174, .16);
}

.admin-content .product-card {
  color: var(--ink);
  background: #fff;
  border-color: rgba(240, 220, 227, .82);
  box-shadow: 0 16px 36px rgba(16,19,24,.08);
  backdrop-filter: none;
}

.admin-content .product-name {
  color: var(--ink);
}

.admin-content .stock {
  color: var(--muted);
}

.panel {
  padding: 18px;
  background: #fff;
  box-shadow: 0 12px 34px rgba(16,19,24,.08);
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.table th {
  color: var(--muted);
  font-size: 13px;
}

.thumb {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--gray);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
}

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

.modal.hidden,
.hidden {
  display: none;
}

.modal-sheet {
  width: min(620px, 100%);
  max-height: 92vh;
  overflow: auto;
  padding: 22px;
  background: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label,
.full {
  display: grid;
  gap: 8px;
}

.full {
  grid-column: 1 / -1;
}

.label-text {
  color: var(--soft-ink);
  font-weight: 800;
  font-size: 14px;
}

.status-pill {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: #0d3b37;
  background: #dff8f6;
  font-weight: 800;
  font-size: 12px;
}

.empty {
  padding: 32px 0;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .hero-content,
  .app-shell,
  .admin-layout,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .masonry {
    column-count: 2;
  }

  .admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-nav a,
  .admin-nav button {
    width: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    height: 64px;
  }

  .brand {
    font-size: 23px;
  }

  .hero {
    padding-top: 86px;
  }

  .input-row,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .input-row .primary-button {
    width: 100%;
  }

  .masonry {
    column-count: 1;
  }

  .main-header,
  .toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .table {
    min-width: 680px;
  }

  .panel {
    overflow-x: auto;
  }
}
