:root {
  --ink: #101418;
  --muted: #4a5561;
  --muted-light: #6f7c89;
  --primary: #f0b429;
  --primary-ink: #2d2106;
  --success: #2fb06f;
  --danger: #d94a4a;
  --bg: #f4f2ed;
  --card: #ffffff;
  --border: #e1e6ea;
  --shadow: 0 20px 45px rgba(16, 20, 24, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: radial-gradient(circle at top left, #fff4da 0%, #f4f5f0 45%, #e6eff0 100%);
  min-height: 100vh;
}

.page {
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

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

.bg-orb {
  position: absolute;
  width: 520px;
  height: 520px;
  background: radial-gradient(circle at 30% 30%, rgba(28, 73, 101, 0.18), rgba(28, 73, 101, 0));
  top: -180px;
  right: -160px;
  z-index: 0;
}

.bg-ripple {
  position: absolute;
  width: 620px;
  height: 620px;
  border-radius: 50%;
  border: 1px solid rgba(240, 180, 41, 0.35);
  bottom: -340px;
  left: -280px;
  z-index: 0;
}

.site-header {
  position: relative;
  z-index: 1;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.brand {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand span {
  color: #1c4965;
}

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

.auth-text {
  font-size: 0.9rem;
  color: var(--muted-light);
}

main {
  position: relative;
  z-index: 1;
}

.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin-bottom: 40px;
}

.hero-copy {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-copy h1 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: clamp(2.8rem, 3.5vw, 3.4rem);
  margin: 0;
  line-height: 1.1;
}

.hero-copy p {
  font-size: 1rem;
  color: var(--muted);
  margin: 0;
  max-width: 520px;
}

.hero-actions {
  grid-column: span 5;
  display: grid;
  gap: 20px;
  grid-auto-rows: 1fr;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(28, 73, 101, 0.12);
  color: #1c4965;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.helper {
  font-size: 0.85rem;
  color: var(--muted-light);
}

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

.card h3 {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 16px;
  color: var(--muted);
}

.card-header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.action-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.action-primary {
  border-color: rgba(240, 180, 41, 0.45);
  box-shadow: 0 30px 60px rgba(240, 180, 41, 0.18);
}

.icon-pill {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(28, 73, 101, 0.12);
  color: #1c4965;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-row {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

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

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.95rem;
  background: #fff;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn-primary {
  background: var(--primary);
  color: var(--primary-ink);
  box-shadow: 0 12px 24px rgba(240, 180, 41, 0.3);
}

.btn-secondary {
  background: #1c232b;
  color: #fff;
}

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

.btn-destructive {
  background: var(--danger);
  color: #fff;
}

.btn-small {
  padding: 6px 10px;
  font-size: 0.85rem;
}

.notice {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(28, 73, 101, 0.08);
  color: #1c4965;
  font-weight: 600;
  font-size: 0.9rem;
}

.hidden {
  display: none !important;
}

.dashboard {
  display: grid;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
}

.dashboard-header h2 {
  margin: 0;
  font-size: 1.8rem;
  font-family: "Sora", "Trebuchet MS", sans-serif;
}

.section-title {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

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


.tag-card {
  border-radius: 16px;
  background: #fff;
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tag-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.tag-title {
  font-weight: 700;
  font-size: 1.05rem;
  margin: 0;
}

.tag-code {
  font-family: "Sora", "Trebuchet MS", sans-serif;
  color: #1c4965;
  font-size: 0.85rem;
}

.tag-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-success {
  background: rgba(47, 176, 111, 0.14);
  color: #1b5d3d;
}

.badge-muted {
  background: rgba(16, 20, 24, 0.08);
  color: var(--muted-light);
}

.tag-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tag-actions.align-end {
  justify-content: flex-end;
}

.menu {
  position: relative;
}

.menu summary {
  list-style: none;
}

.menu summary::-webkit-details-marker {
  display: none;
}

.menu-list {
  position: absolute;
  right: 0;
  top: 38px;
  min-width: 160px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
  z-index: 2;
  display: none;
}

.menu[open] .menu-list {
  display: block;
}

.menu-item {
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.9rem;
}

.menu-item:disabled {
  cursor: not-allowed;
  color: var(--muted-light);
}

.menu-item:hover:not(:disabled) {
  background: rgba(28, 73, 101, 0.08);
}

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

.switch.compact {
  font-size: 0.85rem;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--muted);
}

.switch input {
  display: none;
}

.switch-ui {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: #cdd6dd;
  position: relative;
  transition: background 0.2s ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-ui {
  background: #1c4965;
}

.switch input:checked + .switch-ui::after {
  transform: translateX(20px);
}

.form-section {
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}

.form-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.upload-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: #fafafa;
  margin-bottom: 16px;
}

.image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.image-thumb {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f5f5f5;
}

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

.image-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  border: none;
  background: rgba(16, 20, 24, 0.75);
  color: #fff;
  border-radius: 8px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 0.75rem;
}

.empty-state {
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fb;
  color: var(--muted-light);
  font-size: 0.9rem;
}

.footer-note {
  margin-top: 40px;
  color: var(--muted);
  font-size: 0.9rem;
}

.store-section {
  margin-top: 40px;
  display: grid;
  gap: 16px;
}

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

.store-card {
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 18px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.store-price {
  font-weight: 700;
  font-size: 1.1rem;
}

.store-price .promo {
  color: #b23b3b;
  margin-right: 8px;
}

.store-price .strike {
  text-decoration: line-through;
  color: var(--muted-light);
  font-weight: 500;
  margin-left: 6px;
}

.checkout-summary {
  margin-bottom: 16px;
}

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

.option-card {
  box-shadow: none;
}

.tag-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.tag-main,
.tag-sidebar {
  display: grid;
  gap: 24px;
}

.info-list {
  display: grid;
  gap: 14px;
}

.info-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.info-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(28, 73, 101, 0.12);
  color: #1c4965;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.contact-actions {
  display: grid;
  gap: 10px;
}

.public-image-large {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #f4efe7;
  cursor: pointer;
}

.public-image-large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.image-strip img {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(16, 20, 24, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.modal.hidden {
  display: none;
}

.modal-content {
  max-width: min(900px, 95vw);
  max-height: 90vh;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
}

.modal-card {
  padding: 24px;
  overflow: auto;
}

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

.modal-content img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  border: none;
  background: rgba(16, 20, 24, 0.8);
  color: #fff;
  border-radius: 10px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.85rem;
}

.sticky-bar {
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  margin-top: 24px;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.toast-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: grid;
  gap: 10px;
  z-index: 60;
}

.toast {
  padding: 12px 16px;
  border-radius: 12px;
  background: #1c232b;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
}

.toast.error {
  background: #7b1b1b;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 24px;
}

.success-state {
  margin-top: 12px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(47, 176, 111, 0.15);
  color: #1b5d3d;
  font-weight: 600;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--border);
  padding: 10px 8px;
  text-align: left;
}

.admin-table th {
  font-weight: 700;
  color: var(--muted);
}

.admin-section {
  display: grid;
  gap: 16px;
  margin-bottom: 24px;
}

.admin-stack {
  display: grid;
  gap: 16px;
}

.admin-form {
  display: grid;
  gap: 12px;
}

.divider {
  height: 1px;
  background: var(--border);
}

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

  .hero-copy,
  .hero-actions {
    grid-column: span 1;
  }

  .tag-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    padding: 20px;
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}
