:root {
  /* ألوان مستوحاة من شعار Filora: وردي فاتح، بيج، ذهبي وردي */
  --bg: #f8f2ee;
  --surface: #fffdfb;
  --ink: #3e302c;
  --muted: #8c7b74;
  --line: #ecdfd7;
  --brand: #8a6656;
  --brand-ink: #ffffff;
  --brand-soft: #f3e6de;
  --accent: #b05f55;
  --accent-soft: #f8e6e2;
  --gold: #a98153;
  --wa: #1fa855;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(62, 48, 44, .05), 0 10px 30px rgba(62, 48, 44, .08);
  --serif: "Cormorant Garamond", "Amiri", Georgia, serif;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
.hidden { display: none !important; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }

/* أزرار وحقول */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 10px; padding: 10px 18px; font-weight: 600; cursor: pointer; background: var(--brand); color: var(--brand-ink); text-decoration: none; transition: filter .15s, transform .05s; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { background: #f3eee6; filter: none; }
.btn.danger { background: var(--accent); }
.btn.wa { background: var(--wa); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; display: inline-grid; place-items: center; font-size: 18px; }
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
.input, input[type=text], input[type=tel], input[type=number], input[type=password], input[type=date], input[type=search], select, textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
textarea { resize: vertical; min-height: 80px; }
.row { display: flex; gap: 12px; }
.row > * { flex: 1; }
.check { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); }

/* شارات وأسعار */
.badge { display: inline-block; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.badge.soft { background: var(--brand-soft); color: var(--brand); }
.price { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.price small { font-weight: 500; font-size: .78em; }
.old { color: var(--muted); text-decoration: line-through; font-size: 13px; font-variant-numeric: tabular-nums; }

/* نوافذ منبثقة */
.overlay { position: fixed; inset: 0; background: rgba(20, 28, 30, .45); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
.modal { background: var(--surface); border-radius: 18px; width: 100%; max-width: 560px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.2); }
.modal.wide { max-width: 760px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-head h3 { margin: 0; font-size: 17px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-start; position: sticky; bottom: 0; background: var(--surface); }
@keyframes fade { from { opacity: 0; } }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 100; box-shadow: var(--shadow); font-size: 14px; animation: fade .2s; }
.toast.err { background: var(--accent); }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.spinner { width: 28px; height: 28px; border: 3px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; margin: 40px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
