/* LB Shop Owner Dashboard — mobile first. Uses px so it works whatever the root font size is. */
.sd {
	--sd-primary: var(--primary, #D93A11);
	--sd-primary-soft: #FDF0EC;
	--sd-text: #1C1B1A;
	--sd-muted: #6F6A66;
	--sd-line: #ECE7E3;
	--sd-bg: #F7F5F3;
	--sd-card: #FFFFFF;
	--sd-green: #1E8E4E;
	--sd-red: #C62828;
	--sd-radius: 16px;
	box-sizing: border-box;
	max-width: 880px;
	margin: 0 auto;
	padding: 16px 14px 96px;
	font-family: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--sd-text);
}
.sd *, .sd *::before, .sd *::after { box-sizing: border-box; }
.sd img { display: block; max-width: 100%; }
.sd p { margin: 0 0 8px; }

/* Header */
.sd-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.sd-top__hello { font-size: 13px; color: var(--sd-muted); }
.sd-top__title { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; color: var(--sd-text); }
.sd-top__actions { display: flex; gap: 8px; }

/* Tabs */
.sd-tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 4px; padding: 4px; margin-bottom: 16px; background: var(--sd-bg); border-radius: 14px; }
.sd-tabs__item { flex: 1; padding: 10px 8px; text-align: center; font-weight: 600; font-size: 14px; color: var(--sd-muted); text-decoration: none; border-radius: 10px; transition: background .15s, color .15s; }
.sd-tabs__item:hover { color: var(--sd-text); }
.sd-tabs__item.is-active { background: var(--sd-card); color: var(--sd-primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Headings & text */
.sd-h2 { margin: 0 0 12px; font-size: 19px; font-weight: 700; line-height: 1.25; color: var(--sd-text); }
.sd-h3 { margin: 0 0 12px; font-size: 16px; font-weight: 600; color: var(--sd-text); }
.sd-muted { color: var(--sd-muted); }
.sd-small { font-size: 12px; }
.sd-hint { margin: 6px 0 0; font-size: 13px; color: var(--sd-muted); }
.sd-hint--strong { font-weight: 600; color: var(--sd-green); }
.sd-count { font-size: 13px; color: var(--sd-muted); margin: 0 0 8px; }
.sd-mt { margin-top: 28px; }
.sd-link { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; color: var(--sd-primary); text-decoration: none; cursor: pointer; }
.sd-link--danger { color: var(--sd-red); }

/* Cards */
.sd-card { background: var(--sd-card); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); padding: 16px; margin-bottom: 14px; }
.sd-empty { text-align: center; padding: 32px 16px; color: var(--sd-muted); }
.sd-empty .sd-btn { margin-top: 8px; }

/* Buttons */
.sd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 46px; padding: 0 18px; font: inherit; font-weight: 600; font-size: 15px; color: #fff; background: var(--sd-primary); border: 1px solid var(--sd-primary); border-radius: 12px; text-decoration: none; cursor: pointer; white-space: nowrap; transition: opacity .15s; }
.sd-btn:hover { opacity: .9; color: #fff; }
.sd-btn--sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.sd-btn--ghost { background: var(--sd-card); color: var(--sd-text); border-color: var(--sd-line); }
.sd-btn--ghost:hover { color: var(--sd-primary); border-color: var(--sd-primary); }
.sd-btn--danger { background: var(--sd-card); color: var(--sd-red); border-color: #F3C7C7; }
.sd-btn--danger:hover { color: #fff; background: var(--sd-red); }
.sd-btn--wide { flex: 1; width: 100%; }

/* Notices */
.sd-notice { padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--sd-bg); font-weight: 500; }
.sd-notice--ok { background: #E8F5EE; color: var(--sd-green); }
.sd-notice--error { background: #FDECEC; color: var(--sd-red); }

/* Forms */
.sd-field { display: block; margin-bottom: 14px; flex: 1; min-width: 0; }
.sd-label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: var(--sd-text); }
.sd-input { display: block; width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 16px; color: var(--sd-text); background: #fff; border: 1px solid #DDD6D0; border-radius: 12px; outline: none; box-shadow: none; transition: border-color .15s, box-shadow .15s; }
textarea.sd-input { min-height: 0; resize: vertical; }
.sd-input:focus { border-color: var(--sd-primary); box-shadow: 0 0 0 3px rgba(217,58,17,.12); }
.sd-row { display: flex; flex-direction: column; gap: 0 12px; }
.sd-check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 14px; }

.sd-search { display: flex; gap: 8px; margin-bottom: 10px; }
.sd-search .sd-input { flex: 1; }

/* Chips */
.sd-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: none; }
.sd-chips::-webkit-scrollbar { display: none; }
.sd-chips--wrap { flex-wrap: wrap; overflow: visible; margin-bottom: 0; }
.sd-chip { flex: none; display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 500; color: var(--sd-text); background: var(--sd-card); border: 1px solid var(--sd-line); border-radius: 999px; text-decoration: none; cursor: pointer; }
.sd-chip.is-active { background: var(--sd-primary); border-color: var(--sd-primary); color: #fff; }
.sd-chip--check { padding: 0; overflow: hidden; }
.sd-chip--check input { position: absolute; opacity: 0; pointer-events: none; }
.sd-chip--check span { padding: 7px 14px; }
.sd-chip--check input:checked + span { background: var(--sd-primary-soft); color: var(--sd-primary); font-weight: 600; }
.sd-chip--check:has(input:checked) { border-color: var(--sd-primary); }
.sd-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sd-quick .sd-muted { font-size: 13px; margin-right: 2px; }

/* Segmented control */
.sd-seg { display: flex; padding: 4px; background: var(--sd-bg); border-radius: 12px; }
.sd-seg label { flex: 1; }
.sd-seg input { position: absolute; opacity: 0; pointer-events: none; }
.sd-seg span { display: block; padding: 10px; text-align: center; font-weight: 600; font-size: 14px; color: var(--sd-muted); border-radius: 9px; cursor: pointer; }
.sd-seg input:checked + span { background: var(--sd-card); color: var(--sd-primary); box-shadow: 0 1px 4px rgba(0,0,0,.08); }

/* Product list */
.sd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sd-item { display: grid; grid-template-columns: 72px 1fr; gap: 12px; padding: 12px; background: var(--sd-card); border: 1px solid var(--sd-line); border-radius: var(--sd-radius); align-items: center; margin: 0; }
.sd-item__img { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; background: var(--sd-bg); }
.sd-item__img img { width: 100%; height: 100%; object-fit: cover; }
.sd-item__body { min-width: 0; }
.sd-item__name { display: block; font-weight: 600; color: var(--sd-text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sd-item__price { margin: 2px 0 6px; font-size: 14px; }
.sd-item__price del { color: var(--sd-muted); margin-right: 4px; }
.sd-item__price ins { text-decoration: none; font-weight: 700; color: var(--sd-primary); }
.sd-item__badges { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sd-item__actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.sd-item__actions > * { flex: 1; }
.sd-item__actions form { display: flex; }
.sd-item__actions form .sd-btn { flex: 1; }

.sd-badge { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 600; border-radius: 999px; background: var(--sd-bg); color: var(--sd-muted); }
.sd-badge--green { background: #E8F5EE; color: var(--sd-green); }
.sd-badge--red { background: #FDECEC; color: var(--sd-red); }
.sd-badge--orange { background: var(--sd-primary-soft); color: var(--sd-primary); }
.sd-badge--grey { background: #EFEDEB; color: #55504C; }

.sd-pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 16px; font-size: 13px; }

/* Floating add button (phones) */
.sd-fab { position: fixed; right: 18px; bottom: 22px; z-index: 20; display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; font-size: 30px; line-height: 1; color: #fff; background: var(--sd-primary); border-radius: 50%; box-shadow: 0 6px 20px rgba(217,58,17,.35); text-decoration: none; }
.sd-fab:hover { color: #fff; }

/* Photos */
.sd-photos { display: grid; gap: 10px; }
.sd-photo { position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; background: var(--sd-bg); border: 2px dashed #DDD6D0; border-radius: 14px; cursor: pointer; }
.sd-photo img { width: 100%; height: 100%; object-fit: cover; }
.sd-photo input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.sd-photo--main { aspect-ratio: 1 / 1; max-width: 260px; width: 100%; }
.sd-photo--small { width: 76px; height: 76px; border-style: solid; border-width: 1px; }
.sd-photo--add { border-style: dashed; border-width: 2px; }
.sd-photo__empty { font-size: 13px; font-weight: 600; color: var(--sd-muted); text-align: center; padding: 6px; }
.sd-photo__remove { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 3px; padding: 3px; font-size: 10px; background: rgba(255,255,255,.9); }
.sd-photo__remove input { margin: 0; width: 12px; height: 12px; }
.sd-gallery { display: flex; flex-wrap: wrap; gap: 8px; }

/* Form layout */
.sd-form__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sd-savebar { position: sticky; bottom: 0; z-index: 6; display: flex; gap: 10px; padding: 12px 0; margin-top: 4px; background: linear-gradient(to top, #fff 70%, rgba(255,255,255,0)); }
.sd-delete { margin-top: 18px; text-align: center; }

/* Login */
.sd-login { max-width: 420px; margin: 24px auto; }
.sd-login form p { margin-bottom: 12px; }
.sd-login label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.sd-login input[type=text], .sd-login input[type=password] { width: 100%; min-height: 48px; padding: 11px 14px; font: inherit; font-size: 16px; border: 1px solid #DDD6D0; border-radius: 12px; }
.sd-login .login-remember label { display: inline-flex; align-items: center; gap: 8px; font-weight: 400; }
.sd-login input[type=submit] { width: 100%; min-height: 50px; font: inherit; font-weight: 600; color: #fff; background: var(--sd-primary); border: 0; border-radius: 12px; cursor: pointer; }

/* Tablet & desktop */
@media (min-width: 640px) {
	.sd { padding: 24px 20px 48px; }
	.sd-row { flex-direction: row; }
	.sd-item { grid-template-columns: 72px 1fr auto; }
	.sd-item__actions { grid-column: auto; flex-direction: column; min-width: 96px; }
	.sd-photos { grid-template-columns: 220px 1fr; align-items: start; }
	.sd-fab { display: none; }
	.sd-savebar { justify-content: flex-end; }
	.sd-savebar .sd-btn--wide { flex: 0 0 auto; width: auto; min-width: 180px; }
	.sd-form > .sd-btn--wide, .sd-card > .sd-btn--wide { width: auto; min-width: 200px; }
}

/* Shop (Store CPT) fields */
.sd-shophead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 8px; margin-bottom: 10px; font-size: 15px; }
.sd-switch { margin-bottom: 12px; }
.sd-mb { margin-bottom: 18px; }
.sd-sf-grid { display: flex; flex-wrap: wrap; gap: 0 14px; }
.sd-sf { flex: 1 1 100%; min-width: 0; margin-bottom: 16px; }
.sd-sf > label:not([class]) { display: block; }
.sd-sf-grid--nested { flex: 1; }
.sd-sf-grid--nested .sd-sf { margin-bottom: 10px; }
.sd-hint--top { display: block; margin: -2px 0 6px; }
.sd-affix { display: flex; align-items: stretch; }
.sd-affix > span { display: flex; align-items: center; padding: 0 12px; font-size: 14px; color: var(--sd-muted); background: var(--sd-bg); border: 1px solid #DDD6D0; }
.sd-affix > span:first-child { border-right: 0; border-radius: 12px 0 0 12px; }
.sd-affix > span:last-child { border-left: 0; border-radius: 0 12px 12px 0; }
.sd-affix > span:first-child + .sd-input { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.sd-affix .sd-input:not(:last-child) { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sd-photo--field { width: 140px; height: 140px; }

.sd-toggle { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.sd-toggle input[type=checkbox] { position: absolute; opacity: 0; pointer-events: none; }
.sd-toggle__track { position: relative; display: block; flex: none; width: 52px; height: 30px; background: #D8D2CD; border-radius: 999px; transition: background .2s; }
.sd-toggle__track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; background: #fff; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.sd-toggle input:checked ~ .sd-toggle__track { background: var(--sd-green); }
.sd-toggle input:checked ~ .sd-toggle__track::after { transform: translateX(22px); }
.sd-toggle input:focus-visible ~ .sd-toggle__track { box-shadow: 0 0 0 3px rgba(217,58,17,.25); }
.sd-toggle__text { font-weight: 600; font-size: 14px; }
.sd-toggle__text::after { content: attr(data-off); color: var(--sd-muted); }
.sd-toggle input:checked ~ .sd-toggle__text::after { content: attr(data-on); color: var(--sd-green); }

.sd-rep__rows { display: grid; gap: 10px; margin-bottom: 10px; }
.sd-rep__row { position: relative; display: flex; gap: 8px; padding: 12px 40px 2px 12px; background: var(--sd-bg); border-radius: 12px; }
.sd-rep__remove { position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; padding: 0; font-size: 20px; line-height: 1; color: var(--sd-red); background: #fff; border: 1px solid var(--sd-line); border-radius: 50%; cursor: pointer; }

@media (min-width: 640px) {
	.sd-sf[style] { flex: 0 0 calc(var(--sd-w) - 14px); }
	.sd-sf-grid--nested .sd-sf { flex: 1 1 140px; }
	.sd-sf--full { flex-basis: 100%; }
	.sd-switch { max-width: 360px; }
}

/* Closed days */
.sd-quick2 { display: flex; gap: 10px; }
.sd-or { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; font-size: 13px; color: var(--sd-muted); }
.sd-or::before, .sd-or::after { content: ""; flex: 1; height: 1px; background: var(--sd-line); }
.sd-mt-s { margin-top: 12px; }
.sd-item--closure { grid-template-columns: 56px 1fr auto; }
.sd-item--closure .sd-item__actions { grid-column: auto; flex-direction: row; min-width: 0; }
.sd-cal { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 56px; height: 56px; background: var(--sd-primary-soft); color: var(--sd-primary); border-radius: 12px; line-height: 1; }
.sd-cal.is-now { background: #FDECEC; color: var(--sd-red); }
.sd-cal__m { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.sd-cal__d { font-size: 22px; font-weight: 700; margin-top: 2px; }

/* Updates */
.sd-listhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.sd-listhead .sd-h2 { margin: 0; }
.sd-back { display: inline-block; margin-bottom: 10px; font-size: 14px; font-weight: 500; color: var(--sd-muted); text-decoration: none; }
.sd-back:hover { color: var(--sd-primary); }
.sd-item__meta { margin: 2px 0 6px; }
.sd-item__img--update { display: flex; align-items: center; justify-content: center; background: var(--sd-primary-soft); }
.sd-item__icon { width: 30px; height: 30px; background: var(--sd-primary); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l18-5v12L3 14v-3z'/%3E%3Cpath d='M11.6 16.8a3 3 0 1 1-5.8-1.6'/%3E%3C/svg%3E") center / contain no-repeat; }

/* 5 tabs on small phones: scroll sideways instead of squeezing */
.sd-tabs { overflow-x: auto; scrollbar-width: none; }
.sd-tabs::-webkit-scrollbar { display: none; }
.sd-tabs__item { flex: 1 0 auto; white-space: nowrap; }
@media (max-width: 420px) { .sd-tabs__item { padding: 10px 12px; font-size: 13px; } }
