/* RDN Store Panel — ألوان المنيو: أحمر رودن، كهرماني للشهية، خلفية كريمية دافئة */

.rsp-body { margin: 0; background: #FFF8F1; }
body.rsp-lock { overflow: hidden; }

.rsp {
	--red: #E3262F;
	--red-600: #C91F28;
	--red-700: #A3171F;
	--red-50: #FDECEC;
	--amber: #FFB400;
	--amber-50: #FFF3D1;
	--amber-800: #7A4E00;
	--cream: #FFF8F1;
	--card: #FFFFFF;
	--ink: #1F1613;
	--ink-2: #4B3F3A;
	--muted: #8C7F78;
	--line: #F1E6DC;
	--line-2: #E5D5C8;
	--green: #17A34A;
	--green-50: #E7F6EC;
	--radius: 18px;
	--radius-sm: 12px;
	--shadow: 0 1px 2px rgba(70, 35, 10, .06), 0 10px 28px rgba(70, 35, 10, .07);
	--nav-h: 68px;

	font-family: 'Tajawal', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink);
	background: var(--cream);
	direction: rtl;
	text-align: right;
	min-height: 100vh;
	-webkit-font-smoothing: antialiased;
	-webkit-tap-highlight-color: transparent;
}
/* التصفير داخل :where بلا وزن، حتى تغلبه كلاسات العناصر (.rsp-btn, .rsp-chip...) وتبقى أقوى من الثيم. */
.rsp *, .rsp *::before, .rsp *::after { box-sizing: border-box; }
.rsp :where(h1, h2, h3, h4, p) { margin: 0; }
.rsp :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: normal; text-transform: none; }
.rsp :where(button) { cursor: pointer; background: none; border: 0; padding: 0; margin: 0; box-shadow: none; }
.rsp :where(img) { max-width: 100%; display: block; }
.rsp :where(svg) { width: 20px; height: 20px; flex: none; }
.rsp :where(a) { color: inherit; }

/* ─── الإطار ─── */
.rsp-top {
	position: sticky; top: 0; z-index: 30;
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px 16px;
	padding-top: calc(12px + env(safe-area-inset-top));
	background: linear-gradient(135deg, var(--red) 0%, var(--red-600) 100%);
	color: #fff;
	box-shadow: 0 6px 20px rgba(163, 23, 31, .22);
}
.rsp-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rsp-brand strong { display: block; font-size: 16px; font-weight: 800; line-height: 1.2; }
.rsp-brand small { display: block; font-size: 12.5px; opacity: .88; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 48vw; }
.rsp-logo {
	display: inline-grid; place-items: center; flex: none;
	width: 40px; height: 40px; border-radius: 12px;
	background: #fff; color: var(--red);
	font-weight: 800; font-size: 22px; line-height: 1;
	box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.rsp-logo-lg { width: 64px; height: 64px; border-radius: 20px; font-size: 34px; background: var(--red); color: #fff; }
.rsp-top-actions { display: flex; align-items: center; gap: 8px; }
.rsp-logo-img { background: #fff; padding: 4px; }
.rsp-logo-img img { width: 100%; height: 100%; object-fit: contain; border-radius: 8px; }
/* شاشة الدخول: الشعار وحده بلا مربّع */
.rsp-login .rsp-logo-img { width: 112px; height: 112px; padding: 0; border-radius: 0; background: none; box-shadow: none; }
.rsp-login .rsp-logo-img img { border-radius: 0; }

/* شارة الاشتراك: تاريخ الانتهاء واسم صاحب المتجر، وتحمرّ قبل شهر */
.rsp-plan-chip {
	display: inline-flex; align-items: center; gap: 6px;
	height: 38px; padding: 0 10px; border-radius: 10px;
	border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.14);
	color: #fff; font-size: 12.5px; line-height: 1.25; text-decoration: none;
}
.rsp-plan-chip svg { width: 16px; height: 16px; }
.rsp-plan-chip b { display: block; font-weight: 800; white-space: nowrap; }
.rsp-plan-chip small { display: block; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 96px; }
.rsp-plan-chip.is-warn, .rsp-plan-chip.is-late { background: #fff; color: var(--red-700); border-color: #fff; font-weight: 800; }
@media (max-width: 420px) { .rsp-plan-chip small { display: none; } }
.rsp-brand > div { min-width: 0; }
.rsp-brand strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rsp-top-actions { flex: none; }
@media (max-width: 480px) {
	.rsp-brand strong { font-size: 14px; }
	.rsp-brand small { max-width: 30vw; }
	.rsp-plan-chip { padding: 0 8px; gap: 4px; }
	.rsp-store-select { max-width: 104px; }
	/* صاحب فرعين: قائمة الفروع تسمّي المتجر، فيكفي الشعار */
	.rsp-top:has(.rsp-store-select) .rsp-brand > div { display: none; }
}
.rsp-store-select {
	appearance: none; -webkit-appearance: none;
	height: 38px; max-width: 160px; padding: 0 12px 0 30px;
	border-radius: 10px; border: 1px solid rgba(255,255,255,.35);
	background: rgba(255,255,255,.14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 10px center / 14px;
	color: #fff; font-weight: 700; font-size: 14px;
}
.rsp-store-select option { color: var(--ink); }
.rsp-top .rsp-icon-btn { color: #fff; background: rgba(255,255,255,.14); }
.rsp-top .rsp-icon-btn:hover { background: rgba(255,255,255,.24); }

.rsp-main {
	max-width: 1180px; margin: 0 auto;
	padding: 18px 16px calc(var(--nav-h) + 96px + env(safe-area-inset-bottom));
}

.rsp-nav {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 30;
	display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
	height: calc(var(--nav-h) + env(safe-area-inset-bottom));
	padding-bottom: env(safe-area-inset-bottom);
	background: #fff; border-top: 1px solid var(--line);
	box-shadow: 0 -6px 20px rgba(70, 35, 10, .05);
}
.rsp-nav button {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
	color: var(--muted); font-size: 12.5px; font-weight: 700; position: relative;
}
.rsp-nav button svg { width: 24px; height: 24px; }
/* عناصر مثل صندوق الصنف الجديد لها display خاص يُلغي hidden. */
.rsp [hidden] { display: none !important; }
.rsp a.rsp-btn { text-decoration: none; }
.rsp-nav button.is-active { color: var(--red); }
.rsp-nav button.is-active::before {
	content: ""; position: absolute; top: 0; width: 36px; height: 3px; border-radius: 0 0 4px 4px; background: var(--red);
}
.rsp-soon { font-size: 10px; font-weight: 700; color: var(--amber-800); background: var(--amber-50); border-radius: 99px; padding: 0 6px; line-height: 16px; }

@media (min-width: 900px) {
	.rsp-top { padding-inline: 28px; }
	.rsp-nav {
		position: sticky; top: 64px; bottom: auto; z-index: 20;
		display: flex; justify-content: center; gap: 6px;
		height: auto; padding: 8px; border-top: 0; border-bottom: 1px solid var(--line); box-shadow: none;
	}
	.rsp-nav button { flex-direction: row; gap: 8px; padding: 9px 18px; border-radius: 12px; font-size: 14.5px; }
	.rsp-nav button svg { width: 20px; height: 20px; }
	.rsp-nav button.is-active { background: var(--red-50); }
	.rsp-nav button.is-active::before { display: none; }
	.rsp-main { padding: 26px 28px 60px; }
}

/* ─── عناصر عامة ─── */
.rsp-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	height: 46px; padding: 0 20px; border-radius: 14px;
	font-weight: 800; font-size: 15px; white-space: nowrap;
	transition: background .15s, transform .08s, box-shadow .15s;
}
.rsp-btn:active { transform: scale(.98); }
.rsp-btn[disabled] { opacity: .6; pointer-events: none; }
.rsp-btn-primary { background: var(--red); color: #fff; box-shadow: 0 6px 16px rgba(227, 38, 47, .28); }
.rsp-btn-primary:hover { background: var(--red-600); }
.rsp-btn-light { background: #fff; color: var(--ink); border: 1px solid var(--line-2); }
.rsp-btn-light:hover { border-color: var(--ink-2); }
.rsp-btn-danger-ghost { color: var(--red-700); background: var(--red-50); }
.rsp-btn-danger-ghost:hover { background: #fbd9da; }
.rsp-grow { flex: 1; }

.rsp-icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
	color: var(--ink-2); transition: background .15s;
}
.rsp-icon-btn:hover { background: var(--line); }

.rsp-link { color: var(--red); font-weight: 800; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.rsp-link svg { width: 16px; height: 16px; }

.rsp-spinner {
	display: inline-block; width: 26px; height: 26px; border-radius: 50%;
	border: 3px solid var(--red-50); border-top-color: var(--red);
	animation: rsp-spin .8s linear infinite;
}
.rsp-btn .rsp-spinner { width: 18px; height: 18px; border-width: 2.5px; border-color: rgba(255,255,255,.35); border-top-color: #fff; }
@keyframes rsp-spin { to { transform: rotate(360deg); } }
.rsp-boot { display: grid; place-items: center; min-height: 60vh; }

.rsp-pill {
	display: inline-flex; align-items: center; gap: 4px;
	font-size: 12px; font-weight: 700; line-height: 1; padding: 5px 8px; border-radius: 99px;
	background: var(--line); color: var(--ink-2); white-space: nowrap;
}
.rsp-pill svg { width: 13px; height: 13px; }
.rsp-pill-amber { background: var(--amber-50); color: var(--amber-800); }

/* ─── الحقول ─── */
.rsp-field { display: block; margin-bottom: 14px; }
.rsp-field > span { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.rsp-field > span b { color: var(--red); }
.rsp-input, .rsp-select, .rsp-textarea {
	display: block; width: 100%; min-height: 48px; margin: 0;
	padding: 10px 14px; border-radius: var(--radius-sm);
	border: 1.5px solid var(--line-2); background: #fff; color: var(--ink);
	font-size: 16px; outline: none; box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.rsp-textarea { min-height: 88px; resize: vertical; line-height: 1.6; }
.rsp-select {
	appearance: none; -webkit-appearance: none; padding-left: 38px;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238C7F78' stroke-width='2.5'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat left 14px center / 16px;
}
.rsp-input:focus, .rsp-select:focus, .rsp-textarea:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.rsp-input::placeholder, .rsp-textarea::placeholder { color: #B9ABA3; }
.rsp-money { position: relative; }
.rsp-money .rsp-input { padding-left: 48px; font-weight: 800; }
.rsp-money em { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 700; font-size: 14px; pointer-events: none; }
.rsp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsp-hint { color: var(--muted); font-size: 13px; }

.rsp-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.rsp-switch input { position: absolute; opacity: 0; pointer-events: none; }
.rsp-switch span {
	position: relative; width: 44px; height: 26px; border-radius: 99px; background: #D9CCC2; transition: background .2s; flex: none;
}
.rsp-switch span::after {
	content: ""; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%;
	background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s;
}
.rsp-switch input:checked + span { background: var(--green); }
.rsp-switch input:checked + span::after { transform: translateX(-18px); }
.rsp-switch input:focus-visible + span { box-shadow: 0 0 0 4px var(--green-50); }
.rsp-switch input:disabled + span { opacity: .5; }
.rsp-switch em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--ink-2); }

/* ─── رأس الصفحة والبحث ─── */
.rsp-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.rsp-head h1 { font-size: 26px; font-weight: 800; line-height: 1.2; }
.rsp-head p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.rsp-hide-mobile { display: none; }
@media (min-width: 900px) { .rsp-hide-mobile { display: inline-flex; } }

.rsp-search {
	display: flex; align-items: center; gap: 10px;
	height: 50px; padding: 0 16px; margin-bottom: 12px;
	background: #fff; border: 1.5px solid var(--line); border-radius: 16px;
	color: var(--muted);
}
.rsp-search:focus-within { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.rsp-search input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); min-width: 0; padding: 0; box-shadow: none; height: auto; }

.rsp-chips {
	display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 18px; padding: 2px 16px 6px;
	scrollbar-width: none;
}
.rsp-chips::-webkit-scrollbar { display: none; }
.rsp-chip {
	display: inline-flex; align-items: center; gap: 6px; flex: none;
	height: 40px; padding: 0 16px; border-radius: 99px;
	background: #fff; border: 1.5px solid var(--line); color: var(--ink-2);
	font-weight: 700; font-size: 14px; white-space: nowrap; transition: all .15s;
}
.rsp-chip b { font-size: 12px; font-weight: 800; color: var(--muted); }
.rsp-chip.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.rsp-chip.is-active b { color: var(--amber); }
.rsp-chip-add { border-style: dashed; color: var(--red); }
.rsp-chip-add svg { width: 16px; height: 16px; }
@media (min-width: 900px) { .rsp-chips { margin-inline: 0; padding-inline: 0; flex-wrap: wrap; } }

/* ─── بطاقات المنتجات ─── */
.rsp-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 640px) { .rsp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1040px) { .rsp-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; } }

.rsp-card {
	display: flex; flex-direction: column; background: var(--card);
	border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
	transition: transform .15s, box-shadow .15s;
}
.rsp-card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(70,35,10,.06), 0 16px 34px rgba(70,35,10,.1); }
.rsp-card-open { display: block; width: 100%; text-align: right; flex: 1; }
.rsp-card-img { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(135deg, #FFE9D6, #FFD9C2); overflow: hidden; }
.rsp-card-img img { width: 100%; height: 100%; object-fit: cover; }
.rsp-noimg { position: absolute; inset: 0; display: grid; place-items: center; color: #E7A983; }
.rsp-noimg svg { width: 44px; height: 44px; }
.rsp-card.is-out .rsp-card-img img, .rsp-card.is-out .rsp-noimg { filter: grayscale(1); opacity: .55; }
.rsp-tags { position: absolute; top: 8px; right: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.rsp-tag { font-size: 11.5px; font-weight: 800; padding: 4px 8px; border-radius: 8px; background: rgba(31,22,19,.82); color: #fff; line-height: 1.2; }
.rsp-card-body { padding: 10px 12px 4px; }
.rsp-card-body h3 {
	font-size: 15.5px; font-weight: 800; line-height: 1.35; min-height: 2.7em;
	display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rsp-card-cat { font-size: 12.5px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rsp-card-price { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.rsp-price { font-size: 18px; font-weight: 800; color: var(--red); }
.rsp-price small { font-size: 12px; font-weight: 700; color: var(--muted); margin-right: 2px; }
.rsp-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 8px 12px 12px; border-top: 1px dashed var(--line); margin-top: 8px; }
.rsp-card-foot .rsp-pill { overflow: hidden; text-overflow: ellipsis; }

.rsp-empty {
	grid-column: 1 / -1; text-align: center; padding: 48px 20px;
	background: #fff; border-radius: var(--radius); border: 2px dashed var(--line-2);
}
.rsp-empty-icon { display: inline-grid; place-items: center; width: 76px; height: 76px; border-radius: 24px; background: var(--red-50); color: var(--red); margin-bottom: 14px; }
.rsp-empty-icon svg { width: 38px; height: 38px; }
.rsp-empty h3 { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.rsp-empty p { color: var(--muted); margin-bottom: 18px; }

.rsp-skel { border-radius: var(--radius); background: linear-gradient(90deg, #F6ECE3 25%, #FBF4EE 50%, #F6ECE3 75%); background-size: 200% 100%; animation: rsp-shimmer 1.2s infinite; aspect-ratio: 3 / 4; }
@keyframes rsp-shimmer { to { background-position: -200% 0; } }

.rsp-fab {
	position: fixed; z-index: 25; left: 18px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom));
	display: inline-flex; align-items: center; gap: 8px; height: 56px; padding: 0 22px 0 20px; border-radius: 18px;
	background: var(--red); color: #fff; font-weight: 800; font-size: 15.5px;
	box-shadow: 0 10px 24px rgba(227, 38, 47, .38);
}
.rsp-fab svg { width: 22px; height: 22px; }
@media (min-width: 900px) { .rsp-fab { display: none; } }

/* ─── نافذة المنتج ─── */
.rsp-sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.rsp-sheet-backdrop { position: absolute; inset: 0; background: rgba(31, 22, 19, .5); animation: rsp-fade .2s ease; }
.rsp-sheet {
	position: relative; width: 100%; max-height: 94vh; display: flex; flex-direction: column;
	background: var(--cream); border-radius: 24px 24px 0 0;
	box-shadow: 0 -10px 40px rgba(0,0,0,.2);
	animation: rsp-up .25s cubic-bezier(.2,.8,.2,1);
}
@media (min-width: 720px) {
	.rsp-sheet-wrap { align-items: center; padding: 24px; }
	.rsp-sheet { max-width: 680px; max-height: 90vh; border-radius: 24px; animation: rsp-pop .2s ease; }
}
@keyframes rsp-fade { from { opacity: 0; } }
@keyframes rsp-up { from { transform: translateY(40px); opacity: .4; } }
@keyframes rsp-pop { from { transform: scale(.97); opacity: 0; } }

.rsp-sheet-head {
	display: flex; align-items: center; gap: 8px; padding: 10px 12px;
	background: #fff; border-bottom: 1px solid var(--line); border-radius: 24px 24px 0 0;
}
.rsp-sheet-head h2 { flex: 1; font-size: 17px; font-weight: 800; text-align: center; }
.rsp-sheet-head .rsp-spacer { width: 40px; }
.rsp-sheet-body { overflow-y: auto; padding: 14px 14px 8px; overscroll-behavior: contain; }
.rsp-sheet-foot {
	display: flex; gap: 10px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
	background: #fff; border-top: 1px solid var(--line);
}
@media (min-width: 720px) { .rsp-sheet-foot { border-radius: 0 0 24px 24px; } }

.rsp-block { background: #fff; border-radius: var(--radius); padding: 16px; margin-bottom: 12px; border: 1px solid var(--line); }
.rsp-block-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.rsp-block h4 { font-size: 15.5px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.rsp-block h4 svg { color: var(--red); }
.rsp-block .rsp-field:last-child { margin-bottom: 0; }

/* الصور */
.rsp-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.rsp-photo, .rsp-photo-add { position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; }
.rsp-photo { background: var(--line); }
.rsp-photo img { width: 100%; height: 100%; object-fit: cover; }
.rsp-photo.is-main { outline: 3px solid var(--amber); outline-offset: -3px; }
.rsp-photo.is-loading img { opacity: .45; filter: blur(1px); }
.rsp-photo .rsp-spinner { position: absolute; top: 50%; left: 50%; margin: -13px 0 0 -13px; }
.rsp-photo-badge { position: absolute; bottom: 6px; right: 6px; background: var(--amber); color: var(--ink); font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 6px; }
.rsp-photo-x {
	position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%;
	display: grid; place-items: center; background: rgba(31,22,19,.72); color: #fff;
}
.rsp-photo-x svg { width: 14px; height: 14px; }
.rsp-photo-main {
	position: absolute; inset-inline: 6px; bottom: 6px; padding: 4px; border-radius: 8px;
	background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 800;
}
.rsp-photo-add {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
	border: 2px dashed var(--line-2); color: var(--red); font-weight: 800; font-size: 12.5px; background: #FFFBF7;
}
.rsp-photo-add:hover { border-color: var(--red); background: var(--red-50); }
.rsp-photo-add svg { width: 26px; height: 26px; }

/* الأحجام والأنواع */
.rsp-group { border: 1.5px solid var(--line); border-radius: 16px; padding: 12px; margin-bottom: 10px; background: #FFFCF9; }
.rsp-group-head { display: flex; gap: 8px; align-items: center; }
.rsp-group-head .rsp-input { font-weight: 800; }
.rsp-quick { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 10px; }
.rsp-quick button { font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: var(--amber-50); color: var(--amber-800); }
.rsp-quick button:hover { background: #FFE7A3; }
.rsp-opt { display: grid; grid-template-columns: minmax(0, 1fr) 118px 36px; gap: 8px; align-items: center; margin-bottom: 8px; }
.rsp-opt .rsp-money .rsp-input { padding-left: 40px; padding-right: 26px; font-weight: 700; min-height: 44px; }
.rsp-opt .rsp-input { min-height: 44px; }
.rsp-opt .rsp-money em { left: 10px; font-size: 12px; }
.rsp-opt .rsp-money i { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--green); font-weight: 800; pointer-events: none; }
.rsp-opt .rsp-icon-btn { width: 36px; height: 36px; color: var(--muted); }
.rsp-opt-total { grid-column: 1 / -1; margin: -4px 4px 6px; font-size: 12.5px; color: var(--muted); }
.rsp-opt-total b { color: var(--ink); }
.rsp-add-group {
	width: 100%; min-height: 52px; border-radius: 16px; border: 2px dashed var(--line-2);
	color: var(--red); font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.rsp-add-group:hover { border-color: var(--red); background: var(--red-50); }

/* وقت الظهور */
.rsp-presets { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
.rsp-presets button {
	display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 12px;
	border: 1.5px solid var(--line-2); background: #fff; font-weight: 700; font-size: 13.5px;
}
.rsp-presets button.is-active { border-color: var(--red); background: var(--red-50); color: var(--red-700); }
.rsp-time-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rsp-time-row .rsp-input { direction: ltr; text-align: center; font-weight: 800; }
.rsp-collapse[hidden] { display: none; }

.rsp-new-cat { display: flex; gap: 8px; margin-top: 8px; }
.rsp-new-cat .rsp-btn { height: 48px; }

/* ─── تنبيهات وتأكيد ─── */
.rsp-toast {
	position: fixed; z-index: 200; left: 50%; bottom: calc(var(--nav-h) + 20px + env(safe-area-inset-bottom));
	transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
	max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 14px;
	background: var(--ink); color: #fff; font-weight: 700; font-size: 14.5px; text-align: center;
	box-shadow: 0 10px 30px rgba(0,0,0,.25); transition: all .25s;
}
.rsp-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.rsp-toast.is-error { background: var(--red-700); }
@media (min-width: 900px) { .rsp-toast { bottom: 28px; } }

.rsp-confirm { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; }
.rsp-confirm-box { position: relative; width: 100%; max-width: 360px; background: #fff; border-radius: 22px; padding: 22px; text-align: center; animation: rsp-pop .2s ease; }
.rsp-confirm-box .rsp-empty-icon { width: 60px; height: 60px; border-radius: 18px; margin-bottom: 10px; }
.rsp-confirm-box .rsp-empty-icon svg { width: 28px; height: 28px; }
.rsp-confirm-box h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.rsp-confirm-box p { color: var(--muted); margin-bottom: 18px; }
.rsp-confirm-box .rsp-actions { display: flex; gap: 10px; }
.rsp-confirm-box .rsp-actions .rsp-btn { flex: 1; }

.rsp-error { text-align: center; padding: 60px 20px; }

/* ─── شاشة الدخول ─── */
.rsp-login { display: grid; place-items: center; padding: 24px 16px; }
.rsp-login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 24px; padding: 32px 24px; box-shadow: var(--shadow); text-align: center; }
.rsp-login-card h1 { font-size: 24px; font-weight: 800; margin: 14px 0 4px; }
.rsp-login-card > p { color: var(--muted); margin-bottom: 22px; }
.rsp-login-card form { text-align: right; }
.rsp-login-card form p { margin: 0 0 14px; }
.rsp-login-card label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--ink-2); }
.rsp-login-card input[type=text], .rsp-login-card input[type=password] {
	display: block; width: 100%; height: 50px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line-2); font-size: 16px; outline: none; background: #fff;
}
.rsp-login-card input[type=text]:focus, .rsp-login-card input[type=password]:focus { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-50); }
.rsp-login-card .login-remember label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.rsp-login-card input[type=submit] {
	width: 100%; height: 52px; border: 0; border-radius: 14px; background: var(--red); color: #fff;
	font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 6px 16px rgba(227, 38, 47, .28);
}
.rsp-login-card input[type=submit]:hover { background: var(--red-600); }
.rsp-login-error { margin: 0 0 16px; padding: 12px 14px; border-radius: 14px; background: var(--red-50); color: var(--red-700); font-weight: 700; font-size: 14px; line-height: 1.6; text-align: right; }
.rsp-login-lost { display: inline-block; margin-top: 16px; font-size: 13.5px; font-weight: 700; color: var(--muted); text-decoration: underline; }

.rsp-required { margin: 10px 0 2px; }
.rsp-required em { font-size: 12.5px; color: var(--muted); }

/* ─── المقاسات والألوان ─── */
.rsp-pill-low { background: var(--red-50); color: var(--red-700); }
.rsp-vals { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.rsp-vals:empty { display: none; }
.rsp-val { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 4px 0 12px; border-radius: 99px; background: #fff; border: 1.5px solid var(--line-2); font-weight: 800; font-size: 14px; }
.rsp-val button { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: var(--muted); }
.rsp-val button:hover { background: var(--red-50); color: var(--red); }
.rsp-val button svg { width: 14px; height: 14px; }
.rsp-val-add, .rsp-vbulk { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.rsp-val-add .rsp-input, .rsp-vbulk .rsp-input { min-height: 44px; }
.rsp-val-add .rsp-btn, .rsp-vbulk .rsp-btn { min-height: 44px; padding: 0 14px; }
.rsp-vtable { margin-top: 12px; }
.rsp-vbulk { margin-bottom: 10px; }
.rsp-vrow { display: grid; grid-template-columns: minmax(0, 1fr) 96px 80px; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.rsp-vrow b { font-size: 14px; font-weight: 800; overflow-wrap: anywhere; }
.rsp-vrow .rsp-input { min-height: 42px; padding: 6px 10px; text-align: center; font-weight: 700; }
.rsp-vrow-head { border-bottom: 0; padding-bottom: 0; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.rsp-vrow-head span:not(:first-child) { text-align: center; }
