/* فرحتي — shared design system for the site, editor, dashboard. Invitation pages use invite.css instead. */
:root {
  --bg: #FAF5EC; --paper: #FFFDF8; --ink: #33231C; --muted: #7B6A5E; --line: #E7DCCB;
  --primary: #7A2E3A; --primary-ink: #FFF7EE; --primary-soft: #F3E1E0; --gold: #B8893B; --gold-soft: #F4EAD3;
  --ok: #2F7D53; --ok-soft: #E2F2E8; --no: #B23A3A; --no-soft: #F8E3E1; --wait: #A8741A; --wait-soft: #FBEFD5;
  --display: "Aref Ruqaa", "Tajawal", serif; --body: "Tajawal", system-ui, sans-serif;
  --r: 16px; --shadow: 0 18px 40px -22px rgba(74, 38, 30, .35), 0 2px 6px rgba(74, 38, 30, .06);
}
* { box-sizing: border-box; }
html { direction: rtl; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.75; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--display); line-height: 1.4; margin: 0 0 .4em; color: var(--primary); text-wrap: balance; }
h1 { font-size: clamp(32px, 6vw, 54px); } h2 { font-size: clamp(26px, 4.4vw, 38px); } h3 { font-size: 22px; }
p { margin: 0 0 1em; } a { color: var(--primary); } img { max-width: 100%; }
[hidden] { display: none !important; }
.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(640px, 100% - 32px); margin-inline: auto; }
.section { padding: 56px 0; }
.center { text-align: center; } .muted { color: var(--muted); } .small { font-size: 14px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-2 { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* nav + footer */
.nav { position: sticky; top: 0; z-index: 20; background: rgba(250, 245, 236, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.logo { font-family: var(--display); font-weight: 700; font-size: 28px; color: var(--primary); text-decoration: none; display: flex; align-items: baseline; gap: 8px; }
.logo span { font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); }
.nav-links { display: flex; gap: 18px; margin-inline-start: auto; }
.nav-links a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.foot { margin-top: 60px; border-top: 1px solid var(--line); background: var(--paper); padding: 34px 0 16px; }
.foot-in { display: grid; gap: 24px; grid-template-columns: 2fr 1fr 1fr; }
.foot nav { display: flex; flex-direction: column; gap: 8px; } .foot nav a { color: var(--ink); text-decoration: none; font-size: 15px; }
.foot-copy { text-align: center; color: var(--muted); font-size: 13px; margin: 24px 0 0; }
@media (max-width: 720px) { .nav-links { display: none; } .nav-in .btn { margin-inline-start: auto; } .foot-in { grid-template-columns: 1fr; } .logo span { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 700; font-size: 16px; line-height: 1.3; padding: 12px 24px; border-radius: 999px;
  border: 1.5px solid transparent; cursor: pointer; text-decoration: none; transition: transform .15s, box-shadow .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: scale(.97); }
.btn:focus-visible, .input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn-primary { background: var(--primary); color: var(--primary-ink); box-shadow: 0 10px 22px -12px rgba(122, 46, 58, .7); }
.btn-primary:hover { background: #662632; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-soft { background: var(--primary-soft); color: var(--primary); }
.btn-wa { background: #1FA855; color: #fff; }
.btn-danger { background: var(--no-soft); color: var(--no); }
.btn-sm { padding: 7px 16px; font-size: 14px; } .btn-lg { padding: 15px 34px; font-size: 18px; } .btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

/* surfaces */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; box-shadow: var(--shadow); }
.card-flat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--gold-soft); color: #7A5A1E; }
.badge-ok { background: var(--ok-soft); color: var(--ok); } .badge-no { background: var(--no-soft); color: var(--no); } .badge-wait { background: var(--wait-soft); color: var(--wait); }
.alert { border-radius: 12px; padding: 12px 16px; font-size: 15px; background: var(--gold-soft); color: #6B4E18; }
.alert-ok { background: var(--ok-soft); color: var(--ok); } .alert-no { background: var(--no-soft); color: var(--no); }

/* forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 700; font-size: 15px; }
.field .hint { font-size: 13px; color: var(--muted); }
.input, select.input, textarea.input { font: inherit; font-size: 16px; width: 100%; padding: 11px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); }
.input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px var(--primary-soft); }
textarea.input { min-height: 96px; resize: vertical; }
.seg { display: inline-flex; background: var(--gold-soft); border-radius: 999px; padding: 4px; gap: 4px; }
.seg button { font: inherit; font-weight: 700; font-size: 15px; border: 0; background: transparent; padding: 7px 20px; border-radius: 999px; cursor: pointer; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--primary); box-shadow: 0 2px 6px rgba(74, 38, 30, .12); }

/* tables + tabs + stats */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--paper); }
table.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table th { background: var(--gold-soft); font-size: 13px; color: #6B4E18; } .table tr:last-child td { border-bottom: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs button, .tabs a { font: inherit; font-weight: 700; font-size: 15px; border: 0; background: transparent; padding: 10px 16px; cursor: pointer; color: var(--muted); border-bottom: 3px solid transparent; white-space: nowrap; text-decoration: none; }
.tabs .on { color: var(--primary); border-bottom-color: var(--primary); }
.stats { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; text-align: center; }
.stat b { display: block; font-size: 30px; line-height: 1.2; color: var(--primary); font-variant-numeric: tabular-nums; }
.stat span { font-size: 13px; color: var(--muted); }

/* modal + toast */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(40, 22, 18, .55); display: grid; place-items: center; padding: 16px; }
.modal > .card { width: min(520px, 100%); max-height: 90vh; overflow: auto; }
.toast { position: fixed; bottom: 22px; inset-inline: 0; margin: auto; width: fit-content; max-width: 90vw; z-index: 60; background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; font-size: 15px; box-shadow: var(--shadow); }
