/* Lovely Layer OMS - core styles, mobile-first, 44px+ tap targets */
:root {
  --pink: #e85d8a;
  --pink-dark: #c8467a;
  --ink: #2a2230;
  --muted: #7a7086;
  --bg: #fdf7f9;
  --card: #ffffff;
  --border: #eee0e6;
  --green: #2e9e5b;
  --red: #d9483f;
  --gray: #b9b3bc;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
}
a { color: var(--pink-dark); text-decoration: none; }

.topbar {
  background: var(--pink);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 10;
}
.topbar .brand { font-weight: 700; font-size: 18px; }
.topbar nav { display: flex; gap: 6px; flex-wrap: wrap; }
.topbar nav a, .topbar .logout {
  color: #fff;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.topbar nav a:hover, .topbar nav a.active { background: rgba(255,255,255,0.2); }

.container { max-width: 1100px; margin: 0 auto; padding: 16px; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  background: var(--pink);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}
.btn:hover { background: var(--pink-dark); }
.btn.secondary { background: #fff; color: var(--pink-dark); border: 1px solid var(--pink); }
.btn.gray { background: var(--gray); }
.btn.small { min-height: 38px; padding: 6px 12px; font-size: 13px; }

label { display: block; font-size: 14px; margin-bottom: 6px; color: var(--muted); }
input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  margin-bottom: 14px;
}
textarea { min-height: 90px; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); font-size: 14px; }
th { color: var(--muted); font-weight: 600; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.badge.Pending { background: #fff2cc; color: #8a6d00; }
.badge.Confirmed { background: #dbeeff; color: #1a5b96; }
.badge.Shipped { background: #e6ddff; color: #5a3ea6; }
.badge.Delivered { background: #dcf5e3; color: var(--green); }
.badge.Returned { background: #fde3e1; color: var(--red); }

.swatch-option {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 4px 8px 4px 0;
  cursor: pointer;
  width: 60px;
  text-align: center;
}
.swatch-option .swatch-label {
  font-size: 12px;
  color: var(--ink);
  line-height: 1.2;
  word-break: break-word;
}
.swatch-option.out-of-stock .swatch-label { color: var(--gray); text-decoration: line-through; }
.swatch-option.selected .swatch-label { color: var(--pink-dark); font-weight: 600; }

.swatch {
  width: 44px; height: 44px;
  border-radius: 10px;
  border: 2px solid var(--border);
  display: inline-flex;
  cursor: pointer;
  margin: 4px;
}
.swatch.selected { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink); }
.swatch.out-of-stock { opacity: 0.35; filter: grayscale(1); cursor: not-allowed; }
.swatch-photo { object-fit: cover; }

.product-photo {
  max-width: 220px;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
  margin-bottom: 10px;
}
.upload-field { min-height: auto; padding: 8px 0; }

.quick-chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }
.quick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; cursor: pointer;
  background: #fff; user-select: none;
}
.quick-chip:hover { border-color: var(--pink); }
.quick-chip.small { padding: 4px 10px; font-size: 12px; }
.chip-swatch {
  width: 14px; height: 14px; border-radius: 50%; display: inline-block;
}

.size-btn {
  min-width: 44px; min-height: 44px;
  border-radius: 10px; border: 1px solid var(--border);
  background: #fff; margin: 4px; cursor: pointer; font-size: 14px;
}
.size-btn.selected { background: var(--pink); color: #fff; border-color: var(--pink); }
.size-btn.out-of-stock { color: var(--gray); background: #f4f2f4; cursor: not-allowed; text-decoration: line-through; }

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 14px; font-size: 14px; }
.flash.error { background: #fde3e1; color: var(--red); }
.flash.success { background: #dcf5e3; color: var(--green); }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
}

.copy-box {
  white-space: pre-wrap;
  background: #faf6f8;
  border: 1px dashed var(--pink);
  border-radius: 10px;
  padding: 14px;
  font-family: inherit;
  font-size: 14px;
}
