/* غادة كوكيز · التصميم المشترك · v1.0.0 */
@import url('https://fonts.googleapis.com/css2?family=Readex+Pro:wght@300;400;500;600;700;800&display=swap');

:root {
  --pink: #FBCCCD;
  --pink-2: #FFF1EE;
  --brown: #60461B;
  --brown-d: #3E2D10;
  --gold: #CC9832;
  --sand: #ECCA8B;
  --cream: #F6E7D0;
  --bg: #FFF8F5;
  --card: #FFFFFF;
  --line: #F1DCD6;
  --line-2: #E8CFC8;
  --ink: #2B2116;
  --muted: #6E5F4E;
  --muted-2: #8A7B68;
  --teal: #00777A;
  --teal-bg: #E8F5F4;
  --red: #A33A2E;
  --red-bg: #FFE3E0;
  --amber: #8A5A00;
  --amber-bg: #FFF3DA;
  --zoom: 1;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: 'Readex Pro', system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
a { color: var(--brown); }
img { max-width: 100%; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { max-width: 560px; margin: 0 auto; }
.wide { max-width: 1280px; margin: 0 auto; }

/* top bar */
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--pink); position: sticky; top: 0; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; }
.brand b { display: block; font-size: 17px; color: var(--brown-d); }
.brand small { display: block; font-size: 12px; color: var(--brown); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; border: none; background: var(--brown); color: #fff; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn.block { width: 100%; }
.btn.big { min-height: 56px; font-size: 17px; border-radius: 16px; }
.btn.ghost { background: #fff; color: var(--brown); border: 1.5px solid var(--brown); }
.btn.soft { background: #fff; color: var(--brown); border: 1.5px solid var(--line-2); }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger-ghost { background: #fff; color: var(--red); border: 1.5px solid var(--red); }
.btn.teal { background: var(--teal); color: #fff; }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.pink { background: var(--pink); color: var(--brown-d); }
.btn.dashed { background: #FFFBF4; color: var(--brown); border: 1.5px dashed var(--gold); }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled, .btn.off { background: #E9DED6 !important; color: #7A6B5A !important; border-color: transparent !important; }
.pill { min-height: 40px; padding: 0 16px; border-radius: 20px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
.pill.on { background: var(--brown); color: #fff; border-color: var(--brown); }
.icon-btn { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--brown); background: #fff; color: var(--brown); display: inline-flex; align-items: center; justify-content: center; }

/* cards & forms */
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrapflex { display: flex; flex-wrap: wrap; gap: 8px; }
.scroll-x { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; flex-shrink: 0; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.title { margin: 0; font-size: 19px; font-weight: 700; color: var(--brown-d); }
.h2 { margin: 0; font-size: 17px; font-weight: 700; color: var(--brown-d); }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; border-radius: 12px; border: 1.5px solid var(--line-2); background: #fff; padding: 10px 14px; font-size: 16px; }
textarea.input { resize: vertical; min-height: 80px; line-height: 1.6; }
.badge { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 4px 10px; white-space: nowrap; }
.b-amber { background: var(--amber-bg); color: var(--amber); }
.b-teal { background: var(--teal-bg); color: #005E60; }
.b-red { background: var(--red-bg); color: var(--red); }
.b-brown { background: #F4E6E1; color: var(--brown); }
.b-pink { background: var(--pink); color: var(--brown-d); }
.b-gray { background: #EFE8E1; color: var(--brown-d); }
.stepper { display: inline-flex; align-items: center; gap: 4px; background: var(--pink); border-radius: 22px; padding: 3px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: none; font-size: 20px; line-height: 1; }
.stepper button.plus { background: var(--brown); color: #fff; }
.stepper button.minus { background: #fff; color: var(--brown); }
.stepper span { min-width: 26px; text-align: center; font-weight: 700; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: #F4E6E1; border-radius: 14px; padding: 4px; }
.seg button { min-height: 40px; border-radius: 11px; border: none; background: transparent; color: var(--muted); font-weight: 600; }
.seg button.on { background: #fff; color: var(--brown-d); }
.switch { width: 48px; height: 28px; border-radius: 14px; background: #D9CFC7; position: relative; border: none; flex-shrink: 0; }
.switch::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: inset-inline-start .15s; }
.switch[aria-checked="true"] { background: var(--teal); }
.switch[aria-checked="true"]::after { inset-inline-start: 23px; }

/* overlays */
.scrim { position: fixed; inset: 0; background: rgba(43, 33, 22, .5); z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.scrim.center { justify-content: center; align-items: center; padding: 20px; }
.sheet { background: var(--bg); border-radius: 24px 24px 0 0; padding: 16px 16px 22px; max-height: 92vh; overflow-y: auto; width: 100%; max-width: 640px; margin: 0 auto; }
.dialog { background: #fff; border-radius: 24px; padding: 22px; width: 100%; max-width: 440px; max-height: 90vh; overflow-y: auto; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; background: var(--ink); color: #fff; border-radius: 14px; padding: 12px 18px; font-size: 14px; z-index: 90; max-width: 92vw; text-align: center; }

/* product card */
.pcard { display: flex; gap: 14px; align-items: flex-start; }
.pimg { width: 84px; height: 84px; border-radius: 16px; flex-shrink: 0; object-fit: cover; background: var(--cream); display: flex; align-items: center; justify-content: center; }
.price { font-size: 17px; font-weight: 700; color: var(--brown-d); }
.old { font-size: 13px; color: var(--muted-2); text-decoration: line-through; }

/* tables (owner) */
table.t { border-collapse: collapse; width: 100%; }
table.t th { font-weight: 600; color: var(--muted); font-size: 13px; text-align: start; padding: 10px; border-bottom: 1.5px solid var(--line); white-space: nowrap; }
table.t td { font-size: 14px; padding: 10px; border-bottom: 1px solid #F6E9E4; vertical-align: middle; }
.tbl-wrap { overflow-x: auto; }

/* steps */
.steps { display: flex; flex-direction: column; }
.step { display: flex; align-items: center; gap: 12px; min-height: 38px; font-size: 14px; color: var(--muted-2); }
.step i { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #E3D6CE; background: #fff; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.step.done { color: var(--ink); }
.step.done i { background: var(--teal); border-color: var(--teal); }
.step.now { color: var(--brown-d); font-weight: 700; }
.step.now i { border: 3px solid var(--gold); }

@keyframes gcRing { 0%,100% { transform: rotate(0) } 10% { transform: rotate(-14deg) } 20% { transform: rotate(12deg) } 30% { transform: rotate(-10deg) } 40% { transform: rotate(8deg) } 50% { transform: rotate(0) } }
@keyframes gcPulse { 0% { box-shadow: 0 0 0 0 rgba(251,204,205,.7) } 100% { box-shadow: 0 0 0 34px rgba(251,204,205,0) } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
