:root {
  color-scheme: dark;
  --ink: #f3f2fb; --muted: #a6a3c2; --violet: #b9a6ff; --canvas: #08080f; --surface: rgba(20, 20, 34, .88);
  --line: rgba(124, 92, 255, .26); --gradient: linear-gradient(135deg, #8a3ff0, #2f66e6);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0; padding: 18px; min-height: 100vh; color: var(--ink);
  font-family: Inter, Cairo, "Segoe UI", Tajawal, system-ui, sans-serif;
  background: radial-gradient(900px 600px at 8% -5%, rgba(155, 77, 255, .22), transparent 60%),
              radial-gradient(900px 700px at 100% 0%, rgba(61, 123, 255, .17), transparent 60%), var(--canvas);
  background-attachment: fixed;
}
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 1px solid var(--line); background: #141423; border-radius: 12px; min-height: 44px; padding: 0 14px; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
h2 { margin: 0 0 12px; font-size: 20px; }
h3 { margin: 0 0 10px; font-size: 15px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.7; }

.top { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand img { height: 28px; }
.brand strong { display: block; font-size: 18px; }
.brand span { font-size: 12px; color: var(--muted); }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.tabs button { border: 0; background: transparent; border-radius: 999px; font-weight: 600; }
.tabs button.on, .primary { background: var(--gradient); color: #fff; }
.account { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.ghost { border-radius: 999px; background: var(--surface); }
.primary { width: 100%; border: 0; border-radius: 999px; font-weight: 800; min-height: 48px; box-shadow: 0 10px 28px rgba(155, 77, 255, .35); }
.danger { width: 100%; margin-top: 10px; border-radius: 999px; border-color: #ffb4a6; color: #ffb4a6; background: transparent; }
.link { border: 0; background: transparent; color: var(--violet); width: 100%; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat strong { font-size: 24px; display: block; }
[dir="rtl"] .stat strong { text-align: right; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 14px; align-items: start; }
@media (max-width: 980px) { .layout { grid-template-columns: minmax(0, 1fr); } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 21px; padding: 16px; box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.side { display: grid; gap: 14px; }

.tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.chips, .zoom { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { border-radius: 999px; font-size: 13px; font-weight: 600; }
.chips button.on { background: rgba(155, 77, 255, .32); border-color: var(--violet); }
.square { width: 44px; padding: 0; font-size: 20px; }
.mapScroll { overflow: auto; max-height: 70vh; border-radius: 16px; background: #0b0b15; }
#map {
  position: relative; width: 940px; height: 610px; transform-origin: 0 0;
  background-image: linear-gradient(rgba(124, 92, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 92, 255, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.area { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; border-radius: 18px; padding: 6px; border: 1px solid var(--line); font-size: 14px; text-align: center; }
.area.hall { justify-content: flex-start; align-items: flex-start; padding: 12px 14px; font-size: 13px; }
.area.a { background: rgba(155, 77, 255, .06); color: var(--violet); }
.area.b { background: rgba(61, 123, 255, .06); color: #9db8ff; }
.area.auditorium { background: linear-gradient(160deg, rgba(155, 77, 255, .34), rgba(61, 123, 255, .16)); border-radius: 18px 18px 90px 90px; border-color: var(--violet); }
.area.meet { background: rgba(61, 123, 255, .2); border-color: #7fa6ff; }
.area.lobby { background: rgba(166, 163, 194, .08); }
.area.lounge { background: rgba(126, 224, 184, .08); border: 1px dashed rgba(126, 224, 184, .6); border-radius: 90px; color: #7ee0b8; }

.booth { position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2px; min-height: 0; overflow: hidden; border-width: 2px; border-radius: 10px; font-size: 12px; line-height: 1.3; }
.booth small { font-size: 10px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.platinum { background: rgba(155, 77, 255, .55); border-color: var(--violet); }
.gold { background: rgba(61, 123, 255, .45); border-color: #5c8dff; }
.silver { background: rgba(143, 140, 172, .3); border-color: #8f8cac; }
.held { background: rgba(255, 184, 77, .28); border-color: #ffd38a; }
.booked, .blocked { background: #1b1b2c; border-color: #3a3860; color: var(--muted); }
.blocked { border-style: dashed; }
.mine { background: rgba(46, 200, 150, .42); border-color: #7ee0b8; color: #fff; }
.dim { opacity: .18; }
.sel { border-color: #fff !important; box-shadow: 0 0 0 4px rgba(255, 255, 255, .2), 0 0 24px rgba(155, 77, 255, .9); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; border: 1px solid; }

.room { margin-bottom: 18px; }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.slot { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 58px; }
.slot.free { background: rgba(61, 123, 255, .22); border-color: #5c8dff; }

.stageBar { margin: 0 auto 18px; width: 80%; padding: 14px; text-align: center; font-weight: 800; border-radius: 0 0 60px 60px; background: var(--gradient); }
.seatScroll { overflow-x: auto; }
.seatGrid { display: grid; grid-template-columns: repeat(15, minmax(26px, 40px)); gap: 4px; justify-content: safe center; padding: 4px; }
.seat { width: 100%; min-width: 0; min-height: 36px; padding: 0; font-size: 10px; border-radius: 10px 10px 6px 6px; }
.seat.free { background: transparent; border-color: #7a62d6; }
.seat.held { background: rgba(255, 184, 77, .35); }
.seat.booked { background: #47446a; }
.seat.mine { background: #12805f; }

dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 0 0 16px; font-size: 13px; }
dt { color: var(--muted); }
dd { margin: 0; text-align: end; font-weight: 600; overflow-wrap: anywhere; }
.hold { color: #ffd38a; font-size: 14px; }
fieldset { margin: 16px 0 0; border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
label { display: block; margin-bottom: 10px; font-size: 13px; }
label span { display: block; margin-bottom: 4px; color: var(--muted); }
label.check { display: flex; align-items: center; gap: 10px; min-height: 44px; }
label.check span { margin: 0; }
input:not([type="checkbox"]), select { width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d18; padding: 0 12px; }
.mineRow { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 8px; text-align: start; }

dialog { width: min(380px, 92vw); border-radius: 21px; border: 1px solid var(--line); background: #11111e; color: var(--ink); padding: 22px; }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.error { color: #ffb4a6; font-size: 13px; min-height: 18px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1b1b2c; border: 1px solid var(--violet); border-radius: 999px; padding: 12px 20px; font-size: 14px; max-width: 92vw; z-index: 5; }

.brand { color: inherit; text-decoration: none; }
#home { max-width: 1000px; margin: 0 auto; }
.createForm { max-width: 420px; margin-bottom: 22px; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-bottom: 22px; }
.card { display: flex; flex-direction: column; gap: 8px; padding: 18px; border-radius: 21px; background: var(--surface); border: 1px solid var(--line); color: inherit; text-decoration: none; }
.card:hover, .card:focus-visible { border-color: var(--violet); }
.card b { font-size: 18px; }
.card small.draft { color: #ffd38a; }
.card small.published { color: #7ee0b8; }
.card span { color: var(--violet); font-size: 13px; }
#map.designing .booth { touch-action: none; cursor: grab; }
#builder h3 { margin-top: 20px; }
#builder > button, #builder > select, #builder > input { width: 100%; margin-bottom: 8px; }
.pair { display: grid; gap: 6px; margin-bottom: 10px; font-size: 13px; }

#studio h3 { margin: 18px 0 10px; }
.studioHead { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; }
.studioHead h2 { margin: 0; }
.back, .fileLink { color: var(--violet); }
.fileLink { display: block; margin-bottom: 8px; overflow-wrap: anywhere; }
.studioGrid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .studioGrid { grid-template-columns: minmax(0, 1fr); } }
.swatch { width: 46px; border-radius: 999px; border: 3px solid transparent; }
.swatch.on { border-color: #fff; }
.colorInput { width: 100%; height: 40px; margin-top: 8px; border: 1px solid var(--line); border-radius: 12px; background: #0d0d18; }
textarea { width: 100%; min-height: 90px; border-radius: 12px; border: 1px solid var(--line); background: #0d0d18; color: var(--ink); font: inherit; padding: 10px 12px; }
.slotRow { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; padding: 8px 10px; border: 1px dashed var(--line); border-radius: 12px; }
.slotRow > div { flex: 1; min-width: 0; font-size: 13px; }
.slotRow small { display: block; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.warn, .slotRow small.warn { color: #ffd38a; white-space: normal; }
.wide { width: 100%; margin: 12px 0 8px; }
.pvStage { background: #e9e8f2; border-radius: 16px; padding: 24px; color: #141423; }
.pvBooth { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 40px -20px rgba(20, 20, 35, .45); }
.pvBooth.gallery { border-inline-start: 18px solid var(--accent); }
.pvBooth.stage { border-radius: 160px 160px 14px 14px; border: 14px solid var(--accent); border-bottom-width: 24px; }
.pvBooth.stage .pvHead { background: transparent; color: #141423; justify-content: center; padding-top: 34px; }
.pvHead { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--accent); color: #fff; font-size: 20px; }
.pvBooth.gallery .pvHead { background: #fff; color: #141423; border-bottom: 4px solid var(--accent); }
.pvLogo { width: 72px; height: 72px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }
.pvLogo.empty { display: flex; align-items: center; justify-content: center; color: #55537a; font-size: 12px; border: 1px dashed #8f8cac; }
.pvWall { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 18px; }
.pvScreen { aspect-ratio: 16 / 9; background: #141423; color: #8f8cac; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pvScreen img, .pvScreen video { width: 100%; height: 100%; object-fit: cover; }
.pvBanner { display: block; height: 200px; margin: 0 auto 18px; border-radius: 8px; }
.pvVideo { width: 100%; margin-top: 14px; border-radius: 10px; }
.pvNote { font-size: 12px; color: #55537a; margin: 14px 0 0; }
.linkButton { display: flex; align-items: center; justify-content: center; text-decoration: none; margin-bottom: 10px; }
.boothPage { margin-bottom: 12px; }
.pageLogo { max-width: 120px; max-height: 80px; background: #fff; border-radius: 10px; padding: 6px; }
.reviewRow { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; color: inherit; text-decoration: none; font-size: 13px; }

#programme { max-width: 1000px; margin: 0 auto; }
#programme h2 { margin-top: 24px; }
.talk { display: grid; grid-template-columns: 70px minmax(0, 1fr) 180px; gap: 16px; margin-bottom: 12px; }
@media (max-width: 700px) { .talk { grid-template-columns: 60px minmax(0, 1fr); } .talk .seatBox { grid-column: 1 / -1; } }
.talk.going { border-color: #7ee0b8; }
.when b { display: block; font-size: 20px; }
.when small { color: var(--muted); }
.talkBody { min-width: 0; }
.talkBody h3 { font-size: 18px; overflow-wrap: anywhere; }
.badge { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--violet); color: var(--violet); }
.people { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 10px; }
.person { display: flex; align-items: center; gap: 10px; min-width: 0; }
.person b, .person small { display: block; font-size: 13px; overflow-wrap: anywhere; }
.person small { color: var(--muted); }
.avatar { width: 44px; height: 44px; flex: none; border-radius: 50%; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--gradient); font-weight: 800; }
.seatBox { display: flex; flex-direction: column; justify-content: center; gap: 8px; text-align: center; }
.mineSeat b { color: #7ee0b8; font-size: 16px; }
.material { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.material a { color: var(--violet); overflow-wrap: anywhere; }
.speaker { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
#formDialog { width: min(460px, 94vw); max-height: 90vh; }
#formDialog fieldset { margin: 0 0 12px; }
input[type="date"], input[type="time"] { color-scheme: dark; }
.tabs { max-width: 100%; overflow-x: auto; }
.tabs button { white-space: nowrap; flex: none; }
@media (max-width: 700px) { .tabs { border-radius: 18px; } }
.talkBody .chips { align-items: center; }
.invited { background: repeating-linear-gradient(45deg, rgba(255, 120, 190, .34) 0 6px, rgba(255, 120, 190, .14) 6px 12px); border-color: #ff9bd0; }
.invitation { max-width: 460px; margin: 20px auto; }
[dir="rtl"] dd { text-align: left; }
