/* eventsi.site — site, sign-up, dashboard, editor and admin. Calm ivory, wine and soft gold; Material 3-like, phone first. */
:root {
    --bg: #faf7f2; --surface: #fff; --surface2: #f4eee6; --ink: #2b2420; --muted: #6f645c; --line: #e8dfd3;
    --primary: #7d2635; --primary-2: #9c3446; --on-primary: #fff; --tonal: #f5e6e6; --on-tonal: #5e1a27;
    --gold: #a07c3b; --ok: #2f6b4f; --ok-bg: #e5f2ea; --warn: #8a5a00; --warn-bg: #fbf0d9; --err: #a12a2a; --err-bg: #fbe6e4;
    --radius: 16px; --radius-sm: 12px; --shadow: 0 1px 2px rgba(43, 36, 32, .06), 0 4px 16px rgba(43, 36, 32, .05);
    --font: 'Manrope', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Cormorant Garamond', 'Amiri', Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }
h1 { font: 600 34px/1.15 var(--display); letter-spacing: -.2px; }
h2 { font: 600 26px/1.2 var(--display); }
h3 { font-size: 17px; font-weight: 700; }
p { margin: 0 0 14px; }
[dir=rtl] h1, [dir=rtl] h2 { font-family: 'Amiri', var(--display); letter-spacing: 0; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }
.narrow { width: min(520px, 100% - 32px); margin: 32px auto 48px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.center { text-align: center; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.between { justify-content: space-between; }
.inline { display: inline; }
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.ms { font-family: 'Material Symbols Rounded'; font-weight: normal; font-style: normal; font-size: 22px; line-height: 1; display: inline-block;
    text-transform: none; letter-spacing: normal; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-variation-settings: 'FILL' 0, 'wght' 400; vertical-align: -5px; }
.ms.fill { font-variation-settings: 'FILL' 1, 'wght' 400; }

/* top bar */
.top { position: sticky; top: 0; z-index: 30; background: rgba(250, 247, 242, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font: 600 26px/1 var(--display); letter-spacing: .2px; }
.logo svg { width: 28px; height: 28px; }
.top nav { display: flex; gap: 18px; margin-inline-start: 12px; }
.top nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; }
.top nav a:hover { color: var(--ink); }
.top .right { margin-inline-start: auto; display: flex; gap: 8px; align-items: center; }
.lang { color: var(--muted); text-decoration: none; font-weight: 700; padding: 8px; }
@media (max-width: 860px) { .top nav { display: none; } }
@media (max-width: 520px) { .top .signin, .top .hide-sm { display: none; } .logo { font-size: 23px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid transparent;
    font: 700 15px/1 var(--font); text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, color .15s; -webkit-tap-highlight-color: transparent; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-2); }
.btn-tonal { background: var(--tonal); color: var(--on-tonal); }
.btn-tonal:hover { background: #efd8d8; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface2); }
.btn-danger { background: transparent; color: var(--err); border-color: #e9c6c2; }
.btn-danger:hover { background: var(--err-bg); }
.btn-wa { background: #1f8f4e; color: #fff; }
.btn-wa:hover { background: #18773f; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--primary); font: inherit; text-decoration: underline; cursor: pointer; }

/* cards, forms */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card h2 { font-size: 22px; }
.field { margin-bottom: 14px; }
.field label, .label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=date], input[type=time], input[type=number], input[type=url], input[type=search], select, textarea {
    width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid #d9cec0; border-radius: var(--radius-sm); background: #fff; color: var(--ink);
    font: 16px/1.4 var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(125, 38, 53, .14); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }
.alert { border-radius: var(--radius-sm); padding: 12px 16px; margin: 0 0 16px; font-weight: 600; }
.alert ul { margin: 0; padding-inline-start: 18px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-err { background: var(--err-bg); color: var(--err); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 800; background: var(--surface2); color: var(--muted); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-wait { background: var(--warn-bg); color: var(--warn); }
.badge-err { background: var(--err-bg); color: var(--err); }
.badge-pkg { background: var(--tonal); color: var(--on-tonal); }
.eyebrow { display: inline-flex; gap: 6px; align-items: center; color: var(--primary); font-weight: 800; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
[dir=rtl] .eyebrow { letter-spacing: 0; }
.icon-badge { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--tonal); color: var(--primary); flex: none; }

/* home */
.hero { padding: 40px 0 24px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(38px, 6vw, 58px); margin: 14px 0 16px; }
.hero p.lead { font-size: 18px; color: var(--muted); max-width: 520px; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin: 22px 0 12px; }
.phone { position: relative; width: min(300px, 78vw); aspect-ratio: 9 / 18.5; margin: 0 auto; border-radius: 42px; padding: 10px; background: #1d1a18; box-shadow: 0 30px 60px -20px rgba(43, 36, 32, .45); }
.phone iframe { width: 100%; height: 100%; border: 0; border-radius: 33px; background: #efe6da; }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; gap: 28px; } .hero { padding-top: 24px; } }
.section { padding: 48px 0; }
.section.alt { background: var(--surface2); }
.section-head { max-width: 640px; margin: 0 auto 28px; text-align: center; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.step b { display: block; margin: 12px 0 4px; font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .steps { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; } .step { flex: 0 0 78%; scroll-snap-align: start; } }
.themes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.theme-card { display: block; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.theme-card .swatch { aspect-ratio: 4 / 5; display: grid; place-items: center; position: relative; overflow: hidden; }
.theme-card .meta { padding: 12px 14px 14px; }
.theme-card .meta b { display: block; }
.theme-card .meta span { font-size: 13.5px; color: var(--muted); }
@media (max-width: 860px) { .themes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .themes { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px; padding-bottom: 6px; } .theme-card { flex: 0 0 70%; scroll-snap-align: start; } }
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.price { position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.price.rec { border: 2px solid var(--primary); }
.price .tag { position: absolute; top: -12px; inset-inline-start: 20px; background: var(--primary); color: #fff; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.price .amt { font: 600 44px/1 var(--display); margin: 8px 0 4px; }
.price ul { list-style: none; padding: 0; margin: 14px 0 18px; flex: 1; }
.price li { display: flex; gap: 8px; padding: 6px 0; font-size: 15px; border-top: 1px solid var(--line); }
.price li .ms { color: var(--ok); font-size: 19px; vertical-align: -3px; }
@media (max-width: 860px) { .prices { grid-template-columns: 1fr; } }
.addons { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 18px; }
.addon { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.addon b { display: block; }
.addon .p { margin-inline-start: auto; font-weight: 800; white-space: nowrap; }
@media (max-width: 680px) { .addons { grid-template-columns: 1fr; } }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 700; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--muted); font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); }
.foot { border-top: 1px solid var(--line); padding: 26px 0 32px; color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* dashboard */
.dash { padding: 24px 0 64px; }
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-head h1 { margin: 0; font-size: 30px; }
.events { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.ev { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.ev .t { font: 600 22px/1.2 var(--display); }
.ev-new { align-items: center; justify-content: center; border-style: dashed; box-shadow: none; min-height: 150px; color: var(--primary); font-weight: 800; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.stat b { display: block; font: 600 28px/1 var(--display); margin-bottom: 4px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 700; }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface2); border-radius: var(--radius-sm); padding: 8px 8px 8px 14px; }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.list > li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 14px; }
.tabs a { white-space: nowrap; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); }
.tabs a.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th, .table td { text-align: start; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; border-top: 0; }
.pager { margin-top: 12px; }
.pager nav > div:first-child { display: none; }
.pager svg { width: 18px; height: 18px; }

/* new event wizard */
.choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.choice { position: relative; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; font-weight: 700; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice:has(input:checked) { border: 2px solid var(--primary); padding: 13px; background: #fffafa; }
.choice:has(input:focus-visible) { box-shadow: 0 0 0 3px rgba(125, 38, 53, .2); }
.choice .ms { color: var(--primary); }
.choice small { font-weight: 600; color: var(--muted); }
.theme-choices { grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); }
@media (min-width: 981px) { .editor .theme-choices { grid-template-columns: repeat(4, 1fr); } }
.theme-choices .choice { padding: 8px; }
.theme-choices .choice:has(input:checked) { padding: 7px; }
.mini { width: 100%; aspect-ratio: 3 / 4; border-radius: 10px; overflow: hidden; position: relative; }
.pkgs { display: grid; gap: 8px; border: 0; padding: 0; margin: 0 0 16px; }
.pkgs legend { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.pkg { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; text-decoration: none; color: var(--ink); }
.pkg input { position: absolute; opacity: 0; pointer-events: none; }
.pkg:has(input:checked), .pkg.on { border: 2px solid var(--primary); padding: 13px 15px; }
.pkg .pkg-price { font-weight: 800; }
.pkg .pkg-sub { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); }

/* editor */
.editor { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 24px; align-items: start; padding: 16px 0 90px; }
.editor .panel { min-width: 0; }
.ed-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ed-head h1 { margin: 0; font-size: 26px; }
.saved { font-size: 13px; color: var(--muted); font-weight: 700; }
.saved.err { color: var(--err); }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; overflow: hidden; }
.group > summary { list-style: none; cursor: pointer; display: flex; gap: 12px; align-items: center; padding: 14px 16px; font-weight: 800; }
.group > summary::-webkit-details-marker { display: none; }
.group > summary .chev { margin-inline-start: auto; color: var(--muted); transition: transform .2s; }
.group[open] > summary .chev { transform: rotate(180deg); }
.group > .body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.group .icon-badge { width: 36px; height: 36px; border-radius: 11px; }
.sec-row { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--line); }
.sec-row:first-child { border-top: 0; }
.sec-row .name { flex: 1; font-weight: 700; display: flex; gap: 8px; align-items: center; }
.sec-row .mv { width: 36px; height: 36px; min-height: 36px; padding: 0; border-radius: 10px; }
.sec-row.locked .name { color: var(--muted); }
.switch { position: relative; width: 46px; height: 28px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: #d8cdc0; transition: background .2s; cursor: pointer; }
.switch span::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .2s; }
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::after { transform: translateX(18px); }
[dir=rtl] .switch input:checked + span::after { transform: translateX(-18px); }
.sched-row { display: grid; grid-template-columns: 110px 1fr 44px; gap: 8px; margin-bottom: 8px; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--surface2); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 4px; inset-inline-end: 4px; width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.upload { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border: 1.5px dashed #cdbfae; border-radius: var(--radius-sm); color: var(--primary); font-weight: 800; cursor: pointer; background: #fffdfa; }
.upload input { display: none; }
.lockline { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--tonal); color: var(--on-tonal); border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.preview-col { position: sticky; top: 76px; }
.preview-frame { width: 100%; height: min(780px, calc(100vh - 120px)); border: 10px solid #1d1a18; border-radius: 38px; background: #efe6da; box-shadow: 0 24px 48px -18px rgba(43, 36, 32, .45); }
.preview-tools { display: flex; gap: 8px; justify-content: center; margin-top: 10px; }
.ed-bar { display: none; }
@media (max-width: 980px) {
    .editor { grid-template-columns: 1fr; padding-bottom: 96px; }
    .preview-col { display: none; position: fixed; inset: 60px 0 72px; z-index: 25; background: var(--bg); padding: 10px 12px; }
    body.show-preview .preview-col { display: block; }
    body.show-preview .panel { display: none; }
    .preview-frame { height: calc(100% - 52px); border-width: 0; border-radius: 16px; box-shadow: none; }
    .ed-bar { display: flex; position: fixed; z-index: 26; left: 0; right: 0; bottom: 0; gap: 8px; padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); background: rgba(250,247,242,.96); border-top: 1px solid var(--line); }
    .ed-bar .btn { flex: 1; }
}

/* pay */
.paybox { display: grid; gap: 12px; }
.payline { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.payline.total { font-weight: 800; font-size: 18px; }
.or { text-align: center; color: var(--muted); font-size: 13px; }
.refbox { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 14px; margin: 14px 0; }
.ways { display: grid; gap: 12px; }
.way { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; }
.way p { font-size: 14.5px; color: var(--muted); margin: 6px 0 10px; }

/* guests */
.gform { display: grid; grid-template-columns: 2fr 90px 1.4fr auto; gap: 8px; align-items: end; }
@media (max-width: 720px) { .gform { grid-template-columns: 1fr 90px; } .gform .ph { grid-column: 1 / -1; } .gform .btn { grid-column: 1 / -1; } }
.guest { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.guest:first-child { border-top: 0; }
.guest .who b { font-size: 16px; }
.guest .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; align-items: center; }
.guest details { grid-column: 1 / -1; }
.guest details summary { cursor: pointer; color: var(--muted); font-size: 13.5px; font-weight: 700; }
@media (max-width: 560px) { .guest { grid-template-columns: 1fr; } .guest .acts { justify-content: flex-start; } }
.mini-art { width: 100%; height: 100%; display: block; }
.theme-card .swatch .mini-art { position: absolute; inset: 0; }
