/* Split — brand stylesheet
   Palette pulled straight from the logo: gold #C9A746, black, white.
   Bilingual (EN/AR) with automatic RTL mirroring via [dir="rtl"]. */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Inter:wght@400;600;700;800&display=swap');

:root {
  --gold: #C9A746;
  --gold-dark: #A98530;
  --black: #111111;
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f2f2f2;
  --gray-200: #e5e5e5;
  --gray-400: #a3a3a3;
  --gray-600: #525252;
  --radius: 16px;
  --shadow: 0 2px 10px rgba(0,0,0,0.06);
  --font-en: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-ar: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font-en);
  background: linear-gradient(180deg, #fbfaf7 0%, var(--gray-50) 220px);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

[dir="rtl"] body { font-family: var(--font-ar); }

a { color: var(--gold-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 480px;
  margin: 0 auto;
  padding: 20px 16px 90px;
}

.container-wide {
  max-width: 1080px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* Language switch */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 0 18px;
}
.lang-switch a {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
  background: var(--white);
}
.lang-switch a:hover { text-decoration: none; border-color: var(--gold); }
.lang-switch a.active { background: var(--black); color: var(--white); border-color: var(--black); }
.top-nav .lang-switch { margin: 0; }

/* Brand header */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin: 8px 0 20px;
}
.brand img { width: 42px; height: 42px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.12)); }
.brand span {
  font-weight: 800;
  font-size: 23px;
  letter-spacing: -0.5px;
  color: var(--black);
}

h1, h2, h3 { letter-spacing: -0.3px; line-height: 1.25; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { letter-spacing: 0; }
h1 { font-size: 27px; font-weight: 800; }
h2 { font-size: 21px; font-weight: 800; }
h3 { font-size: 16px; font-weight: 700; }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease;
  font-family: inherit;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-dark)); color: var(--black); box-shadow: 0 4px 14px rgba(201,167,70,0.35); }
.btn-primary:hover { background: var(--gold-dark); text-decoration: none; }
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #000; text-decoration: none; }
.btn-outline { background: var(--white); color: var(--black); border: 2px solid var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); text-decoration: none; }
.btn-danger { background: #b3261e; color: var(--white); }
.btn-sm { width: auto; padding: 8px 14px; font-size: 14px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: var(--white);
  transition: border-color .15s ease;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,167,70,0.15);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.badge-open { background: #fff4d6; color: #8a6400; }
.badge-paying { background: #dbeafe; color: #1e40af; }
.badge-paid { background: #dcfce7; color: #166534; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-rejected { background: #fee2e2; color: #991b1b; }

.menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
  gap: 12px;
}
.menu-item:last-child { border-bottom: none; }
.menu-item-name { font-weight: 700; }
.menu-item-desc { font-size: 13px; color: var(--gray-600); margin-top: 2px; }
.menu-item-price { font-weight: 700; color: var(--gold-dark); white-space: nowrap; }

.qty-stepper { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.qty-stepper button {
  width: 34px; height: 34px; border-radius: 9px; border: 1.5px solid var(--black);
  background: var(--white); font-size: 18px; font-weight: 700; cursor: pointer;
  transition: background .1s ease;
}
.qty-stepper button:active { background: var(--gray-100); }
.qty-stepper span { min-width: 18px; text-align: center; font-weight: 700; }

.sticky-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--white);
  border-top: 1px solid var(--gray-200);
  padding: 14px 16px;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
  max-width: 480px;
  margin: 0 auto;
}

.flash { padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; font-weight: 600; }
.flash-success { background: #dcfce7; color: #166534; }
.flash-error { background: #fee2e2; color: #991b1b; }
.flash-info { background: #fff4d6; color: #8a6400; }

table.data { width: 100%; border-collapse: collapse; background: var(--white); border-radius: var(--radius); overflow: hidden; }
table.data th, table.data td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--gray-100); font-size: 14px; }
table.data th { background: var(--gray-50); font-weight: 700; }

.top-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: var(--white); border-bottom: 1px solid var(--gray-200);
  flex-wrap: wrap; gap: 10px;
  position: sticky; top: 0; z-index: 10;
}
.top-nav .links { display: flex; align-items: center; flex-wrap: wrap; }
.top-nav .links a { margin-inline-start: 18px; font-weight: 600; color: var(--black); }
.top-nav .links a.active { color: var(--gold-dark); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px,1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: var(--white); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--gray-600); font-weight: 600; }
.stat-card .value { font-size: 26px; font-weight: 800; margin-top: 4px; }

.qr-box { text-align: center; padding: 20px; }
.qr-box img { border: 10px solid var(--white); box-shadow: var(--shadow); border-radius: 12px; }

.split-share { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--gray-100); gap: 10px; }
.split-share:last-child { border-bottom: none; }

.center-text { text-align: center; }
.muted { color: var(--gray-600); font-size: 13px; }
.hr { border: none; border-top: 1px solid var(--gray-200); margin: 16px 0; }

@media (max-width: 560px) {
  .top-nav { padding: 12px 16px; }
  .top-nav .links a { margin-inline-start: 12px; font-size: 14px; }
}
