:root {
  --rose: #e0699a;
  --rose-dark: #c44e7f;
  --lilac: #a78bfa;
  --cream: #fffaf7;
  --ink: #3f2f39;
  --ink-soft: #7b6874;
  --line: #f0dfe7;
  --ok: #2f9e6f;
  --warn: #d98324;
  --radius: 20px;
  --shadow-sm: 0 2px 10px rgba(180, 120, 150, 0.1);
  --shadow-md: 0 10px 30px rgba(180, 120, 150, 0.16);
  --font: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont,
    "Segoe UI Variable", "Segoe UI", system-ui, "Trebuchet MS", sans-serif;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: linear-gradient(170deg, #fdeef4 0%, #f7effc 45%, #fff8f4 100%);
  background-attachment: fixed;
  line-height: 1.55;
  min-height: 100vh;
}

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

a {
  color: var(--rose-dark);
}

/* ---------- Layout ---------- */

.wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 18px 120px;
}

header.hero {
  text-align: center;
  padding: 44px 18px 26px;
}

.logo {
  font-size: clamp(2.1rem, 8vw, 3.2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  background: linear-gradient(100deg, var(--rose) 10%, var(--lilac) 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.tagline {
  margin: 8px auto 0;
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.price-pills {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 18px;
}

.pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.pill b {
  color: var(--rose-dark);
}

h2.section {
  font-size: 1.45rem;
  margin: 38px 0 4px;
  letter-spacing: -0.01em;
}

.section-note {
  margin: 0 0 18px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ---------- Set-kort ---------- */

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card .art {
  background: linear-gradient(160deg, #fdf3f7, #f4f0fd);
  border-radius: 14px;
  padding: 8px 4px 0;
}

.card h3 {
  margin: 0;
  font-size: 1.08rem;
}

.card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink-soft);
  flex: 1;
}

.card .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.price {
  font-weight: 800;
  color: var(--rose-dark);
  white-space: nowrap;
}

/* ---------- Knappar ---------- */

button,
.btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  border: 0;
  border-radius: 999px;
  padding: 11px 20px;
  cursor: pointer;
  background: linear-gradient(135deg, var(--rose) 0%, #ec7ba8 55%, var(--lilac) 130%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(224, 105, 154, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

button:hover,
.btn:hover {
  filter: brightness(1.05);
}

button:active,
.btn:active {
  transform: scale(0.97);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  filter: none;
}

button.ghost {
  background: #fff;
  color: var(--rose-dark);
  border: 1.5px solid var(--line);
  box-shadow: none;
}

button.small {
  padding: 7px 14px;
  font-size: 0.85rem;
}

button.link {
  background: none;
  color: var(--ink-soft);
  box-shadow: none;
  text-decoration: underline;
  padding: 6px 4px;
  font-weight: 600;
}

button.danger {
  background: #fff;
  color: #c0392b;
  border: 1.5px solid #f3d4cf;
  box-shadow: none;
}

/* ---------- Panel / formulär ---------- */

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.panel + .panel {
  margin-top: 16px;
}

label {
  display: block;
  font-weight: 700;
  font-size: 0.9rem;
  margin: 14px 0 6px;
}

label .hint {
  font-weight: 500;
  color: var(--ink-soft);
}

input[type="text"],
input[type="password"],
textarea,
select {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  background: var(--cream);
  outline: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(224, 105, 154, 0.14);
}

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

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

.chip {
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 15px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
}

.chip[aria-pressed="true"] {
  background: linear-gradient(135deg, var(--rose), var(--lilac));
  color: #fff;
  border-color: transparent;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

@media (max-width: 520px) {
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------- Inspo ---------- */

.inspo-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.inspo-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.inspo-thumb {
  position: relative;
  width: 104px;
  height: 104px;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid var(--line);
  background: var(--cream);
}

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

.inspo-thumb .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: #c0392b;
  font-size: 1rem;
  line-height: 1;
  box-shadow: var(--shadow-sm);
}

.spinner {
  width: 17px;
  height: 17px;
  border: 2.5px solid rgba(255, 255, 255, 0.45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
  vertical-align: -3px;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Varukorg ---------- */

.cart-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
}

.cart-line:last-of-type {
  border-bottom: 0;
}

.cart-line .meta {
  flex: 1;
  min-width: 0;
}

.cart-line .meta strong {
  display: block;
}

.cart-line .meta small {
  color: var(--ink-soft);
  display: block;
  overflow-wrap: anywhere;
}

.total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.2rem;
  font-weight: 800;
  padding-top: 14px;
  margin-top: 6px;
  border-top: 2px solid var(--line);
}

.cart-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 -6px 24px rgba(180, 120, 150, 0.12);
  z-index: 40;
}

.cart-bar .summary {
  font-weight: 700;
  font-size: 0.95rem;
}

.cart-bar .summary small {
  display: block;
  font-weight: 500;
  color: var(--ink-soft);
}

.cart-bar[hidden] {
  display: none;
}

/* ---------- Swish ---------- */

.swish-box {
  text-align: center;
}

.swish-qr {
  width: 260px;
  max-width: 76vw;
  margin: 18px auto;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 8px;
  box-shadow: var(--shadow-sm);
}

.pay-details {
  background: var(--cream);
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin: 16px 0;
  text-align: left;
}

.pay-details dl {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 14px;
  align-items: center;
}

.pay-details dt {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.pay-details dd {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.code-big {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--rose-dark);
  background: #fff;
  border: 2px dashed var(--rose);
  border-radius: 14px;
  padding: 6px 18px;
}

.copy-btn {
  margin-top: 10px;
}

/* ---------- Meddelanden ---------- */

.note {
  border-radius: 14px;
  padding: 12px 15px;
  font-size: 0.92rem;
  margin: 14px 0;
}

.note.info {
  background: #f3f0fe;
  border: 1px solid #e0d8fb;
}

.note.warn {
  background: #fff6e8;
  border: 1px solid #f6e0bd;
}

.note.error {
  background: #fdeeec;
  border: 1px solid #f6cfc9;
  color: #a03127;
}

.note.ok {
  background: #eaf8f1;
  border: 1px solid #c9ead9;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--line);
  color: var(--ink);
  white-space: nowrap;
}

.badge.waiting_payment {
  background: #fff2e2;
  color: #9a5c11;
}
.badge.paid {
  background: #e7f5ee;
  color: #1e6b4a;
}
.badge.in_progress {
  background: #eae6fd;
  color: #5a41b5;
}
.badge.done {
  background: #fde9f1;
  color: #a8306a;
}
.badge.delivered {
  background: #eef1f4;
  color: #566;
}
.badge.cancelled {
  background: #f6eaea;
  color: #8a3b34;
}
.badge.claim {
  background: #fff0f6;
  color: var(--rose-dark);
  border: 1px solid #f7d2e2;
}

footer.foot {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 30px 18px 10px;
}

.center {
  text-align: center;
}

.hidden {
  display: none !important;
}

/* ---------- Admin ---------- */

.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 28px 0 8px;
}

.admin-head h1 {
  margin: 0;
  font-size: 1.6rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px;
  margin: 16px 0 22px;
}

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat .num {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--rose-dark);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.stat .lbl {
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.order {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.order.attention {
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(224, 105, 154, 0.12);
}

.order-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.order-top .ocode {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--rose-dark);
}

.order-top .when {
  color: var(--ink-soft);
  font-size: 0.85rem;
  margin-left: auto;
}

.order-items {
  margin: 10px 0;
  padding: 0;
  list-style: none;
}

.order-items li {
  padding: 8px 0;
  border-top: 1px dashed var(--line);
}

.order-items .desc {
  background: var(--cream);
  border-radius: 12px;
  padding: 8px 12px;
  margin-top: 6px;
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}

.order-inspo {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.order-inspo a {
  display: block;
  width: 84px;
  height: 84px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

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

.customer {
  font-size: 0.92rem;
  color: var(--ink-soft);
  padding-top: 8px;
  border-top: 1px dashed var(--line);
  margin-top: 6px;
}

.customer b {
  color: var(--ink);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
}
