:root {
  --ink: #15181c;
  --muted: #6a7078;
  --line: #e6e8eb;
  --soft: #f5f6f7;
  --bg: #ffffff;
  --accent: #0f6b5c;
  --on-accent: #ffffff;
  --danger: #b42318;
  --serif: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow {
  max-width: 460px;
}

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

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- tombol & form ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  cursor: pointer;
  line-height: 1.2;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.btn:hover {
  opacity: .88;
}

.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn.ghost:hover {
  border-color: var(--ink);
  opacity: 1;
}

.btn.small {
  padding: 6px 13px;
  font-size: 14px;
}

.btn.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--line);
}

.btn.danger:hover {
  border-color: var(--danger);
  opacity: 1;
}

.btn.accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.field label {
  font-weight: 500;
  font-size: 14px;
}

.field .hint {
  font-size: 13px;
  color: var(--muted);
}

input[type=text],
input[type=email],
input[type=password],
input[type=url],
input[type=search],
input[type=tel],
textarea,
select {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  font-size: 15px;
  transition: border-color 0.15s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: #cfd3d8;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

textarea {
  min-height: 96px;
  resize: vertical;
}

.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.check {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 15px;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
}

.prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.prefix:focus-within {
  outline: 2px solid var(--accent);
  border-color: var(--accent);
}

.prefix span {
  display: flex;
  align-items: center;
  padding: 0 0 0 13px;
  color: var(--muted);
  font-size: 15px;
  white-space: nowrap;
}

.prefix input {
  border: 0;
  border-radius: 0;
  outline: 0 !important;
  padding-left: 2px;
}

.alert {
  padding: 11px 14px;
  border-radius: 10px;
  background: #fdf1f0;
  color: var(--danger);
  font-size: 14px;
  margin-bottom: 18px;
}

.ok {
  padding: 11px 14px;
  border-radius: 10px;
  background: #eef6f3;
  color: #0f6b5c;
  font-size: 14px;
  margin-bottom: 18px;
}

/* ---------- navigasi umum ---------- */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.logo {
  font-family: var(--serif);
  font-size: 26px;
  text-decoration: none;
  letter-spacing: -.01em;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.nav-links a.plain {
  text-decoration: none;
  font-size: 15px;
  color: var(--muted);
  padding: 6px 8px;
}

.nav-links a.plain:hover {
  color: var(--ink);
}

/* ---------- beranda ---------- */
.hero {
  padding: 88px 0 72px;
  max-width: 760px;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 8vw, 80px);
  line-height: 1;
  letter-spacing: -.02em;
  margin: 0 0 24px;
}

.hero p {
  font-size: 19px;
  color: var(--muted);
  max-width: 560px;
  margin: 0 0 32px;
}

.hero .actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.points {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  padding: 40px 0 80px;
  border-top: 1px solid var(--line);
}

.points h3 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 600;
}

.points p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.foot {
  padding: 28px 0 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.foot a {
  color: inherit;
}

/* ---------- auth ---------- */
.auth {
  padding: 56px 0 80px;
}

.auth h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 42px;
  line-height: 1.05;
  margin: 0 0 8px;
  letter-spacing: -.01em;
}

.auth>p {
  margin: 0 0 28px;
  color: var(--muted);
}

.auth .btn {
  width: 100%;
}

.auth .alt {
  margin-top: 20px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

.auth-user-badge {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--soft);
  border-radius: 10px;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--muted);
  align-items: center;
}

.auth-user-badge strong {
  color: var(--ink);
}

/* ---------- dashboard ---------- */
.dash-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tabs a {
  display: inline-block;
  padding: 14px 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 15px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.tabs a[aria-current=page] {
  color: var(--ink);
  border-color: var(--ink);
  font-weight: 500;
}

.tabbar {
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.dash-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin: 8px 0 28px;
}

.dash-title h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 38px;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -.01em;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 0 0 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.stats div {
  padding: 18px 22px;
}

.stats div+div {
  border-left: 1px solid var(--line);
}

.stats dt {
  font-size: 13px;
  color: var(--muted);
  margin: 0 0 2px;
}

.stats dd {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.share {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--muted);
}

.share code {
  background: var(--soft);
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
  word-break: break-all;
}

.plist {
  border-top: 1px solid var(--line);
}

.prow {
  display: grid;
  grid-template-columns: 56px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.prow .thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 24px;
  color: var(--accent);
}

.prow h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
}

.prow .meta {
  font-size: 13px;
  color: var(--muted);
}

.prow .clicks {
  font-size: 13px;
  color: var(--muted);
  text-align: right;
  min-width: 72px;
  font-variant-numeric: tabular-nums;
}

.prow .acts {
  display: flex;
  gap: 8px;
}

.prow form {
  margin: 0;
}

.pill {
  display: inline-block;
  font-size: 12px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  margin-left: 6px;
  vertical-align: 1px;
}

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

.empty h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 30px;
  color: var(--ink);
  margin: 0 0 8px;
}

.formcard {
  max-width: 620px;
  padding-bottom: 64px;
}

.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.swatches label {
  cursor: pointer;
}

.swatches input {
  position: absolute;
  opacity: 0;
}

.swatches span {
  display: block;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.swatches input:checked+span {
  box-shadow: 0 0 0 2px var(--ink);
}

.swatches input:focus-visible+span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.swatches input[type=color] {
  position: static;
  opacity: 1;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

/* ---------- halaman toko ---------- */
.shop-head {
  padding: 56px 0 32px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.avatar {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: color-mix(in srgb, var(--accent) 12%, #fff);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 600;
}

.shop-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 6vw, 52px);
  line-height: 1.05;
  letter-spacing: -.015em;
  margin: 0;
}

.shop-head p {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 560px;
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  font-size: 14px;
}

.socials a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 4px;
}

.socials a:hover {
  text-decoration-color: var(--accent);
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.toolbar .wrap {
  display: flex;
  gap: 16px;
  align-items: center;
  padding-top: 12px;
  padding-bottom: 12px;
}

.search {
  position: relative;
  flex: 0 1 260px;
}

.search svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  padding: 8px 12px 8px 36px;
  border-radius: 999px;
  font-size: 14px;
}

.chips {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  scrollbar-width: none;
  padding: 2px;
}

.chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex: none;
  border: 0;
  background: transparent;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  cursor: pointer;
}

.chip:hover {
  color: var(--ink);
}

.chip[aria-pressed=true] {
  background: var(--accent);
  color: var(--on-accent);
}

.views {
  display: flex;
  gap: 2px;
  flex: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 2px;
}

.views button {
  border: 0;
  background: transparent;
  width: 34px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
}

.views button[aria-pressed=true] {
  background: var(--soft);
  color: var(--ink);
}

.items {
  display: grid;
  gap: 36px 22px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  padding-bottom: 72px;
  list-style: none;
  margin: 0;
  padding-left: 0;
  padding-right: 0;
}

.item {
  min-width: 0;
}

.item[hidden] {
  display: none;
}

.item a {
  display: block;
  text-decoration: none;
}

.media {
  position: relative;
  aspect-ratio: 1/1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--soft);
}

.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ph {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 56px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 9%, #fff);
}

.flag {
  position: absolute;
  left: 10px;
  top: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 500;
}

.body {
  padding-top: 12px;
}

.title {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.desc {
  display: none;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.price {
  margin-top: 8px;
  font-weight: 600;
  font-size: 15px;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.where {
  margin-top: 3px;
  font-size: 13px;
  color: var(--muted);
}

.cta {
  display: none;
}

.item a:hover .title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

/* tampilan daftar */
.items[data-view=list] {
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid var(--line);
}

.items[data-view=list] .item {
  border-bottom: 1px solid var(--line);
}

.items[data-view=list] .item a {
  display: grid;
  grid-template-columns: 112px 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 16px 0;
}

.items[data-view=list] .media {
  border-radius: 12px;
}

.items[data-view=list] .body {
  padding: 0;
}

.items[data-view=list] .title {
  font-size: 16px;
  -webkit-line-clamp: 1;
  line-clamp: 1;
}

.items[data-view=list] .desc {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.items[data-view=list] .cta {
  display: inline-flex;
  align-items: center;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.items[data-view=list] .item a:hover .cta {
  opacity: .9;
}

.noresult {
  display: none;
  padding: 56px 0 96px;
  text-align: center;
  color: var(--muted);
}

.noresult.show {
  display: block;
}

.disclose {
  font-size: 13px;
  color: var(--muted);
  padding: 24px 0 8px;
  border-top: 1px solid var(--line);
}

@media (max-width:720px) {
  .wrap {
    padding: 0 18px;
  }

  .points {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero {
    padding: 56px 0 48px;
  }

  .shop-head {
    padding-top: 36px;
    gap: 16px;
  }

  .avatar {
    width: 64px;
    height: 64px;
    font-size: 26px;
  }

  .toolbar .wrap {
    flex-wrap: wrap;
    gap: 10px;
  }

  .search {
    flex: 1 1 100%;
    order: 1;
  }

  .chips {
    order: 3;
    flex: 1 1 100%;
  }

  .views {
    order: 2;
    margin-left: auto;
  }

  .items {
    grid-template-columns: repeat(2, 1fr);
    gap: 28px 14px;
  }

  .items[data-view=list] {
    grid-template-columns: 1fr;
  }

  .items[data-view=list] .item a {
    grid-template-columns: 84px 1fr;
    gap: 14px;
  }

  .items[data-view=list] .cta {
    display: none;
  }

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

  .stats div+div {
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .prow {
    grid-template-columns: 48px 1fr;
    row-gap: 10px;
  }

  .prow .thumb {
    width: 48px;
    height: 48px;
  }

  .prow .clicks {
    grid-column: 2;
    text-align: left;
  }

  .prow .acts {
    grid-column: 1 / -1;
  }

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

/* ---------- admin & data table ---------- */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  margin-top: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.table th {
  background: var(--soft);
  padding: 12px 16px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

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

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

.badge-active {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #eef6f3;
  color: #0f6b5c;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

.badge-inactive {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #fdf1f0;
  color: #b42318;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
}

@media (prefers-reduced-motion:reduce) {
  * {
    scroll-behavior: auto !important;
  }
}

/* ---------- modal / popup ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 28px;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header h2 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  margin: 0;
}

.modal-close {
  background: var(--soft);
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--muted);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--ink);
}


