:root {
  --primary: #E5306B;
  --primary-dark: #C21F55;
  --primary-light: #FCE9EF;
  --text: #262626;
  --muted: #767676;
  --border: #e7e2e4;
  --bg: #f7f5f6;
  --card: #fff;
  --green: #1B7A43;
  --green-bg: #e3f4ea;
  --amber: #9a6200;
  --amber-bg: #fff3d6;
  --red: #b42318;
  --red-bg: #fde8e7;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Poppins', system-ui, Arial, sans-serif; font-size: 14px; color: var(--text); background: var(--bg); }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0 0 .5em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }

/* Shell */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.sidebar { background: #fff; border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 0; height: 100vh; }
.sidebar__brand { display: flex; align-items: center; gap: 8px; font-family: 'Playfair Display', Georgia, serif; font-weight: 700; font-size: 20px; color: var(--primary); padding: 0 10px 18px; }
.sidebar__brand small { font-family: 'Poppins', sans-serif; font-weight: 500; font-size: 11px; color: var(--muted); }
.sidebar nav a { display: block; padding: 9px 12px; border-radius: 8px; color: var(--text); font-weight: 500; margin-bottom: 2px; }
.sidebar nav a:hover { background: var(--bg); text-decoration: none; }
.sidebar nav a.is-active { background: var(--primary-light); color: var(--primary-dark); }
.sidebar__section { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 16px 12px 6px; }
.sidebar__user { position: absolute; bottom: 18px; left: 14px; right: 14px; font-size: 12px; color: var(--muted); padding: 0 12px; }
.sidebar__user button { margin-top: 6px; }
.main { padding: 26px 32px 60px; max-width: 1280px; width: 100%; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back-link { display: inline-block; color: var(--muted); font-size: 13px; margin-bottom: 6px; }

/* Cards / layout */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.card > h2 { display: flex; justify-content: space-between; align-items: center; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; }
.stat__value { font-size: 26px; font-weight: 700; }
.stat__label { color: var(--muted); font-size: 12.5px; }

/* Forms */
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 6px; }
.field .hint, .hint { color: var(--muted); font-size: 12px; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; font: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; min-height: 90px; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; min-height: 200px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-light); border-color: var(--primary); }
.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin-bottom: 8px; cursor: pointer; }
.check input { accent-color: var(--primary); width: 16px; height: 16px; }
.checklist { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-decoration: none !important; white-space: nowrap; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn--primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn--primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn--danger { color: var(--red); }
.btn--danger:hover { border-color: var(--red); color: var(--red); background: var(--red-bg); }
.btn--sm { padding: 5px 11px; font-size: 12px; }
.btn--link { border: none; background: none; padding: 0; color: var(--primary); font-weight: 500; }
.btn--link:hover { text-decoration: underline; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: #fcfafb; }
.table .num { text-align: right; white-space: nowrap; }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--bg); border: 1px solid var(--border); display: block; }
.thumb--empty { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 18px; }
.product-cell { display: flex; align-items: center; gap: 12px; }
.product-cell strong { display: block; }
.product-cell small { color: var(--muted); }

/* Variant editor */
.variant-table input, .variant-table select { padding: 7px 8px; font-size: 13px; }
.variant-table td { padding: 6px 4px; }
.variant-table th { padding: 8px 4px; font-size: 11px; }
.variant-table .w-sm { width: 80px; }
.variant-table .w-md { width: 110px; }
.variant-table .center { text-align: center; }

/* Images */
.image-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.image-tile { border: 1px solid var(--border); border-radius: 10px; padding: 8px; background: #fff; }
.image-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--bg); display: block; margin-bottom: 8px; }
.image-tile input { padding: 6px 8px; font-size: 12px; margin-bottom: 6px; }
.image-tile .row { display: flex; gap: 6px; align-items: center; }
.image-tile .row input { width: 64px; margin: 0; }
.image-tile .check { margin: 0; font-size: 12px; color: var(--red); }

/* Badges / alerts */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; text-transform: capitalize; }
.badge--active { background: var(--green-bg); color: var(--green); }
.badge--draft { background: var(--amber-bg); color: var(--amber); }
.badge--archived { background: #eee; color: #666; }
.badge--soldout { background: var(--red-bg); color: var(--red); }
.badge--muted { background: var(--bg); color: var(--muted); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13.5px; }
.alert--success { background: var(--green-bg); color: var(--green); }
.alert--error { background: var(--red-bg); color: var(--red); }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.muted { color: var(--muted); }
.price-old { color: #aaa; text-decoration: line-through; margin-right: 6px; font-size: 12.5px; }

/* Filters bar */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input[type=search] { max-width: 280px; }
.filters select { width: auto; min-width: 150px; }

/* Pagination (Laravel default markup) */
nav[role=navigation] { margin-top: 16px; }
nav[role=navigation] svg { width: 16px; height: 16px; }
nav[role=navigation] .hidden { display: none; }
nav[role=navigation] > div:last-child { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
nav[role=navigation] p { color: var(--muted); font-size: 13px; margin: 0; }
nav[role=navigation] span[aria-current] > span, nav[role=navigation] a, nav[role=navigation] span[aria-disabled] > span {
  display: inline-flex; min-width: 32px; height: 32px; align-items: center; justify-content: center; padding: 0 8px; border: 1px solid var(--border); background: #fff; margin-left: -1px; color: var(--text); font-size: 13px;
}
nav[role=navigation] span[aria-current] > span { background: var(--primary); color: #fff; border-color: var(--primary); }

/* Login */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; background: linear-gradient(135deg, #FCE9EF, #DCEEEA); }
.auth .card { width: 100%; max-width: 400px; padding: 32px; box-shadow: 0 20px 45px rgba(229,48,107,.12); }
.auth h1 { font-family: 'Playfair Display', Georgia, serif; color: var(--primary); text-align: center; font-size: 28px; }
.auth .btn { width: 100%; padding: 12px; }

.sticky-save { position: sticky; bottom: 0; background: rgba(247,245,246,.95); backdrop-filter: blur(4px); padding: 14px 0; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); margin-top: 8px; z-index: 5; }

@media (max-width: 1000px) {
  .form-layout { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .sidebar__user { position: static; padding-top: 12px; }
  .main { padding: 18px 16px 60px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
