* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: #f6f3ee;
  color: #1f2430;
  font-family: "Segoe UI", Tahoma, "Noto Kufi Arabic", "Cairo", sans-serif;
  line-height: 1.8;
}
.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }

.head .kicker, .section .label {
  color: #6d28d9; font-size: 13px; font-weight: 700; margin: 0 0 4px;
}
.head h1 { font-size: 26px; margin: 0 0 8px; }
.intro { color: #444c5c; margin: 0; }

.hero { margin: 20px 0 8px; }
.hero img { width: 100%; border-radius: 18px; display: block; }
.hero figcaption { color: #8a8f9c; font-size: 12px; margin-top: 6px; text-align: center; }

.section { margin-top: 34px; }
.section h2 { font-size: 20px; margin: 0 0 8px; }
.hint { color: #555d6d; font-size: 14px; margin: 0 0 12px; }
.hint a { color: #6d28d9; }
.caption { color: #8a8f9c; font-size: 12px; margin-top: 10px; }

.callout { background: #eef2ff; border: 1px solid #dbe3ff; border-radius: 14px; padding: 12px 14px; font-size: 14px; }
.callout p { margin: 4px 0 0; color: #4b5262; }
.callout.warn { background: #fff7ed; border-color: #fed7aa; margin-top: 14px; }

.steps { margin: 0; padding-inline-start: 22px; color: #333a48; font-size: 14px; }
.steps li { margin-bottom: 6px; }

/* ===== الشات ===== */
.og-phone {
  background: linear-gradient(160deg, #0b1330, #131b45);
  border: 1px solid #2a3160;
  border-radius: 24px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 12px 40px rgba(20, 15, 60, .25);
}
.og-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 10px; border-bottom: 1px solid #232b56; }
.og-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.og-head-name { color: #eef0ff; font-weight: 700; font-size: 16px; }
.og-head-status { color: #9aa3d6; font-size: 12px; display: flex; align-items: center; gap: 6px; }
.og-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; display: inline-block; }

.og-chat {
  height: min(440px, 55vh); overflow-y: auto;
  display: flex; flex-direction: column; gap: 8px;
  padding: 6px 4px;
  scrollbar-width: thin; scrollbar-color: #3a4480 transparent;
  -webkit-overflow-scrolling: touch;
}
.og-bubble { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.9; }
.og-bot { align-self: flex-start; background: #1c2652; color: #e8ebff; border-start-start-radius: 6px; }
.og-user { align-self: flex-end; background: linear-gradient(135deg, #7c3aed, #5b21b6); color: #fff; border-start-end-radius: 6px; }
.og-text { white-space: pre-line; }
.og-sys { align-self: center; color: #8b93c7; font-size: 12px; background: #161f47; border-radius: 999px; padding: 6px 14px; text-align: center; }

.og-typing { display: flex; gap: 5px; padding: 14px 16px; }
.og-typing span { width: 7px; height: 7px; border-radius: 50%; background: #8b93c7; animation: og-blink 1.2s infinite; }
.og-typing span:nth-child(2) { animation-delay: .2s; }
.og-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes og-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.og-card { width: 100%; background: #141d45; border: 1px solid #2c3568; border-radius: 14px; padding: 12px 14px; }
.og-card-title { color: #c4b5fd; font-weight: 700; margin-bottom: 8px; font-size: 14px; }
.og-menu-line { display: flex; justify-content: space-between; gap: 12px; padding: 5px 0; color: #dfe3ff; font-size: 14px; border-bottom: 1px dashed #232b56; }
.og-menu-line:last-of-type { border-bottom: none; }
.og-menu-name { min-width: 0; }
.og-menu-desc { color: #8b93c7; font-size: 12px; }
.og-price { color: #a5b4fc; font-weight: 700; white-space: nowrap; }
.og-total { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid #2c3568; color: #fff; font-weight: 700; }
.og-meta { color: #9aa3d6; font-size: 13px; margin-top: 4px; }
.og-order { border-color: #34d39955; }
.og-wa {
  display: block; text-align: center; margin-top: 12px;
  background: linear-gradient(135deg, #22c55e, #16a34a); color: #fff;
  font-weight: 700; font-size: 14px; padding: 12px; border-radius: 12px; text-decoration: none;
}
.og-wa:hover { filter: brightness(1.08); }

.og-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 2px; }
.og-chips:empty { display: none; }
.og-chip {
  background: transparent; color: #c4b5fd; border: 1.5px solid #6d28d9;
  border-radius: 999px; padding: 8px 14px; font-size: 13px; font-weight: 700; cursor: pointer;
  font-family: inherit; min-height: 40px;
}
.og-chip:hover { background: #6d28d933; }

.og-inputrow { display: flex; gap: 8px; }
.og-input {
  flex: 1; background: #0f1839; border: 1.5px solid #2a3160; border-radius: 14px;
  color: #fff; padding: 12px 14px; font-size: 16px; font-family: inherit; min-height: 46px;
}
.og-input::placeholder { color: #5f68a0; }
.og-input:focus { outline: none; border-color: #7c3aed; }
.og-send {
  background: linear-gradient(135deg, #7c3aed, #5b21b6); color: #fff; border: none;
  border-radius: 14px; padding: 0 20px; font-size: 17px; cursor: pointer; min-height: 46px;
  transform: scaleX(-1);
}
.og-send:hover { filter: brightness(1.1); }

.og-ai { display: inline-block; margin-left: 6px; font-size: 13px; vertical-align: baseline; }

/* ===== سجل الطلبات ===== */
.orders { display: flex; flex-direction: column; gap: 8px; }
.order-row {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border: 1px solid #e7e2d9; border-radius: 14px; padding: 12px 14px;
}
.order-num {
  background: #ede9fe; color: #5b21b6; font-weight: 700; font-size: 13px;
  border-radius: 999px; min-width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.order-body { flex: 1; min-width: 0; }
.order-name { font-weight: 700; font-size: 14px; }
.order-detail { color: #5b6270; font-size: 13px; margin-top: 2px; }
.order-total { font-weight: 700; color: #166534; white-space: nowrap; font-size: 14px; }

.og-clear {
  margin-top: 12px; background: transparent; border: 1.5px solid #e0dacd;
  color: #6b7280; border-radius: 12px; padding: 10px 16px; font-size: 13px;
  font-weight: 700; cursor: pointer; font-family: inherit; min-height: 44px;
}
.og-clear:hover { border-color: #dc2626; color: #dc2626; }

/* ===== محمّل لينك ماي منيو ===== */
.og-loader-row { display: flex; gap: 8px; margin-bottom: 8px; }
.og-loader-input {
  flex: 1; border: 1.5px solid #e0dacd; border-radius: 12px; background: #fff;
  padding: 12px 14px; font-size: 13px; font-family: inherit; min-height: 46px;
}
.og-loader-input:focus { outline: none; border-color: #7c3aed; }
.og-loader-btn {
  background: #131b45; color: #fff; border: none; border-radius: 12px;
  padding: 0 18px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; min-height: 46px;
  white-space: nowrap;
}
.og-loader-btn:hover { background: #1c2652; }
.og-loader-msg { font-size: 13px; font-weight: 700; margin: 4px 0 0; }
.og-loader-msg.ok { color: #166534; }
.og-loader-msg.err { color: #dc2626; }

.foot { margin-top: 40px; color: #8a8f9c; font-size: 12px; text-align: center; }

@media (max-width: 600px) {
  .og-chat { height: min(380px, 50vh); }
  .og-bubble { max-width: 94%; }
  .og-loader-row { flex-direction: column; }
}
