:root {
  --teal: #11b8c8;
  --teal-dark: #0794a5;
  --pink: #f2388f;
  --orange: #ff9d28;
  --purple: #8460df;
  --navy: #061e49;
  --soft: #f6fbff;
  --line: #dfeef7;
  --muted: #66758a;
  --text: #17233b;
  --shadow: 0 18px 45px rgba(6, 30, 73, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: #fff;
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
html, body { overflow-x: hidden; }
.container { width: min(1180px, calc(100% - 28px)); margin-inline: auto; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  color: #fff;
  font-weight: 900;
  line-height: 1.25;
  white-space: nowrap;
  box-shadow: 0 12px 26px rgba(6,30,73,.12);
}
.btn-pink { background: var(--pink); }
.btn-teal { background: var(--teal-dark); }
.btn-navy { background: var(--navy); }
.btn-light, .btn-white { color: var(--navy); background: #fff; }
.btn.full { width: 100%; margin-top: 14px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px);
}
.nav-shell {
  position: relative;
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}
.brand img { width: 136px; }
.main-nav {
  flex: 1 1 auto;
  min-width: 320px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 900;
  overflow: visible;
  scrollbar-width: none;
}
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { flex: 0 0 auto; padding: 7px 9px; border-radius: 999px; white-space: nowrap; }
.main-nav a.active, .main-nav a:hover { color: var(--pink); background: #fff1f8; }
.nav-actions, .hero-actions, .cta-strip .container, .filter-row, .legend-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.nav-actions { flex: 0 0 auto; flex-wrap: nowrap; justify-content: flex-end; gap: 8px; }
.nav-actions .btn { min-width: 108px; padding-inline: 14px; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; border-radius: 8px; color: #fff; background: var(--navy); font-size: 22px; }

.home-hero, .page-hero {
  padding: 64px 0;
  background: radial-gradient(circle at 15% 10%, rgba(242,56,143,.13), transparent 32%), linear-gradient(135deg, #fff, #effcff);
}
.page-hero.compact { padding: 48px 0; }
.hero-grid, .map-layout, .admin-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 460px); gap: 26px; align-items: center; }
.eyebrow { display: inline-flex; margin-bottom: 8px; color: var(--pink); font-weight: 900; }
h1, h2, h3 { margin: 0 0 10px; color: var(--navy); line-height: 1.25; }
h1 { font-size: clamp(38px, 6vw, 76px); font-weight: 900; }
h2 { font-size: 28px; }
p { margin: 0 0 16px; color: var(--muted); font-size: 18px; }
.center-copy { text-align: center; max-width: 760px; }
.hero-text { display: grid; gap: 8px; }
.hero-text h2, .hero-text h3 { margin-bottom: 4px; }
.hero-text p, .center-copy .hero-text p { text-align: inherit; }
.content-body {
  display: grid;
  gap: 12px;
  color: var(--text);
  font-size: 18px;
}
.content-section { padding-top: 42px; }
.content-section .content-body, .booth-intro {
  max-width: 940px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(6,30,73,.07);
}
.content-section + .section { padding-top: 0; }
.map-section { padding-top: 0; }
.content-body h2, .content-body h3, .rich-editor h2, .rich-editor h3 { color: var(--navy); }
.content-body ul, .content-body ol, .rich-editor ul, .rich-editor ol { margin: 0; padding-inline-start: 24px; }
.content-body blockquote, .rich-editor blockquote {
  margin: 8px 0;
  border-right: 5px solid var(--pink);
  border-radius: 8px;
  padding: 14px 18px;
  background: #fff1f8;
  color: var(--navy);
  font-weight: 800;
}
.content-body figure, .rich-editor figure {
  margin: 14px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}
.content-body img, .rich-editor img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}
.content-body figcaption, .rich-editor figcaption { margin-top: 8px; color: var(--muted); text-align: center; font-size: 14px; }
.bubble-frame img { border: 8px solid #fff; border-radius: 46% 54% 45% 55%; box-shadow: 0 0 0 8px var(--pink), var(--shadow); object-fit: cover; min-height: 320px; }
.section { padding: 56px 0; }
.card-grid { display: grid; gap: 16px; }
.card-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card-grid article, .form-card, .floorplan-panel, .booth-details, .admin-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(6,30,73,.07);
}
.card-grid i { width: 56px; height: 56px; display: grid; place-items: center; margin-inline: auto; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--teal), var(--pink)); font-size: 24px; }
.card-grid article { text-align: center; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: var(--navy); font-weight: 900; }
input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 13px;
  background: #fff;
  color: var(--text);
  outline: 0;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(17,184,200,.12); }
.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.choice-grid label, .check-row { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
.choice-grid input, .check-row input { width: auto; min-height: auto; }
.success-box, .flash, .alert { border-radius: 8px; padding: 14px 16px; margin-bottom: 16px; font-weight: 900; text-align: center; }
.success-box, .flash.success { color: var(--navy); background: #eafaf2; border: 1px solid #bcebd3; }
.alert.error, .flash.error { color: #7a1037; background: #fff1f8; border: 1px solid #ffd0e5; }

.map-layout { align-items: start; grid-template-columns: minmax(0, 1fr) 330px; }
.map-tools { display: grid; gap: 10px; margin-bottom: 14px; }
.chip { min-height: 40px; border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; background: #fff; color: var(--navy); font-weight: 900; }
.chip.active { color: #fff; background: var(--pink); border-color: var(--pink); }
.floorplan-live { overflow: auto; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.floorplan-live {
  position: relative;
  width: 100%;
  max-height: 78vh;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  direction: ltr;
  text-align: left;
  cursor: default;
}
.floorplan-live.is-zoomed {
  touch-action: none;
  cursor: grab;
}
.floorplan-live.dragging { cursor: grabbing; user-select: none; }
.booth-svg {
  width: 100%;
  min-width: 100%;
  max-width: none;
  height: auto;
  display: block;
  background: #fff;
  transform-origin: top right;
}
.map-control-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 6px 0 12px;
  direction: ltr;
}
.map-control-row button {
  flex: 0 0 auto;
  min-width: 54px;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  color: var(--navy);
  background: #fff;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(6,30,73,.08);
}
.map-control-row button[data-map-zoom="in"],
.map-control-row button[data-map-zoom="out"] {
  width: 54px;
  padding-inline: 0;
}
.map-control-row button:hover {
  color: #fff;
  border-color: var(--teal-dark);
  background: var(--teal-dark);
}
.map-bg { fill: #fff; stroke: #dfeef7; }
.hall-outline { fill: #fff; stroke: #27364e; stroke-width: 2; }
.hall-mask { fill: url(#grid); opacity: .52; }
.grid-fill { fill: url(#grid); opacity: .72; }
.map-brand text { fill: var(--navy); font-weight: 900; text-anchor: middle; }
.map-brand .brand-main { fill: var(--pink); font-size: 64px; }
.map-brand .brand-sub { fill: var(--teal-dark); font-size: 66px; }
.map-brand .brand-tag { fill: #555; font-size: 18px; }
.map-service rect { fill: #fff5ea; stroke: var(--orange); }
.map-service text, .zone-labels text { fill: var(--navy); font-weight: 900; text-anchor: middle; }
.booth rect { stroke-width: 3; transition: .16s ease; }
.booth text { fill: var(--navy); font-size: 16px; font-weight: 900; text-anchor: middle; pointer-events: none; }
.booth.available rect { fill: #bff6d8; stroke: #18a86a; }
.booth.pending rect { fill: #fff2a6; stroke: #f0be1a; }
.booth.reserved rect { fill: #ffd5e4; stroke: #f2388f; }
.booth:hover rect, .booth.selected rect { filter: drop-shadow(0 8px 10px rgba(6,30,73,.22)); transform: translateY(-2px); }
.booth.hidden { opacity: .08; pointer-events: none; }
.dot { width: 10px; height: 10px; display: inline-block; border-radius: 50%; margin-left: 6px; }
.dot.available { background: #18a86a; }
.dot.pending { background: #f0be1a; }
.dot.reserved { background: var(--pink); }
.status-pill { display: inline-flex; border-radius: 999px; padding: 8px 14px; color: var(--navy); background: var(--soft); font-weight: 900; }
.status-pill.available { color: #087647; background: #eafaf2; }
.status-pill.pending { color: #856200; background: #fff8d5; }
.status-pill.reserved { color: #a0134e; background: #fff1f8; }

.cta-strip { padding: 28px 0; color: #fff; background: linear-gradient(135deg, var(--pink), var(--teal)); text-align: center; }
.cta-strip h2 { color: #fff; margin-inline: auto; }
.cta-strip .container { justify-content: center; }
.site-footer { padding-top: 38px; color: #dfe8f7; background: var(--navy); text-align: center; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; align-items: start; justify-items: center; }
.site-footer img { width: 150px; margin-inline: auto; background: #fff; border-radius: 8px; padding: 6px; }
.site-footer h3 { color: #fff; }
.site-footer a, .site-footer span { display: block; margin-bottom: 8px; color: #dfe8f7; }
.social-row { display: flex; justify-content: center; gap: 10px; }
.social-row a, .whatsapp { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: rgba(255,255,255,.12); font-size: 20px; }
.footer-bottom { margin-top: 28px; padding: 16px; border-top: 1px solid rgba(255,255,255,.12); text-align: center; }
.whatsapp { position: fixed; right: 18px; bottom: 18px; z-index: 40; background: #24c866; font-size: 28px; box-shadow: var(--shadow); }

.install-page { min-height: 100vh; background: linear-gradient(135deg, #effcff, #fff1f8); }
.install-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.install-card { width: min(760px, 100%); border: 1px solid var(--line); border-radius: 8px; padding: 26px; background: #fff; box-shadow: var(--shadow); }
.install-brand { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.install-brand img, .login-card img { width: 138px; }
.login-card { max-width: 460px; text-align: center; }
.login-card img { margin-inline: auto; }

.admin-body { min-height: 100vh; background: var(--soft); padding-right: 284px; }
.admin-sidebar { position: fixed; inset: 0 0 0 auto; width: 284px; display: grid; align-content: start; gap: 8px; padding: 14px; background: #fff; border-left: 1px solid var(--line); overflow: auto; }
.admin-user { text-align: center; padding: 16px; border-radius: 8px; background: linear-gradient(180deg, #f9fdff, #fff1f8); }
.admin-user img { width: 118px; margin-inline: auto; }
.admin-sidebar a { display: flex; align-items: center; gap: 10px; min-height: 46px; border-radius: 8px; padding: 10px 12px; color: var(--navy); font-weight: 900; }
.admin-sidebar a i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--teal-dark); background: #e8fbfd; }
.admin-sidebar a.active { color: #fff; background: linear-gradient(135deg, var(--pink), var(--teal)); }
.admin-sidebar a.active i { color: #fff; background: rgba(255,255,255,.22); }
.admin-version-badge,
.admin-version-footer {
  border: 1px solid rgba(17,184,200,.28);
  border-radius: 8px;
  padding: 10px 12px;
  background: #eefcff;
  color: var(--navy);
  text-align: center;
  font-weight: 900;
}
.admin-version-badge { margin-top: 8px; }
.admin-version-badge span,
.admin-version-footer span { display: block; color: var(--muted); font-size: 13px; }
.admin-version-badge strong,
.admin-version-footer strong { direction: ltr; unicode-bidi: plaintext; color: var(--teal-dark); }
.admin-version-footer { margin-top: 24px; overflow-wrap: anywhere; }
.editor-card button:disabled { opacity: .5; cursor: not-allowed; }
.admin-main { padding: 20px; display: grid; gap: 16px; }
.admin-topbar, .admin-card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.admin-topbar { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; box-shadow: 0 10px 26px rgba(6,30,73,.07); }
.admin-topbar span { color: var(--pink); font-weight: 900; }
.admin-topbar h1 { font-size: 30px; margin: 0; }
.admin-search { display: flex; gap: 10px; }
.kpi-grid, .module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi-grid article, .module-card { border: 1px solid var(--line); border-radius: 8px; padding: 18px; background: #fff; text-align: center; box-shadow: 0 10px 26px rgba(6,30,73,.07); }
.kpi-grid i, .module-card i { width: 54px; height: 54px; display: grid; place-items: center; margin-inline: auto; border-radius: 50%; color: #fff; background: linear-gradient(135deg, var(--teal), var(--pink)); font-size: 22px; }
.kpi-grid span, .module-card span { display: block; color: var(--muted); font-weight: 800; }
.kpi-grid strong { display: block; color: var(--navy); font-size: 34px; }
.module-card strong { display: block; margin-top: 8px; color: var(--navy); font-size: 18px; }
.admin-split { align-items: start; grid-template-columns: 330px minmax(0, 1fr); }
.editor-card { min-width: 0; }
.page-list { display: grid; gap: 8px; }
.page-list a { display: grid; border: 1px solid var(--line); border-radius: 8px; padding: 10px; background: var(--soft); }
.page-list a.active { border-color: var(--pink); background: #fff1f8; }
.table-wrap { width: 100%; overflow: auto; }
table { width: 100%; min-width: 760px; border-collapse: collapse; background: #fff; }
th, td { padding: 11px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { color: var(--navy); background: var(--soft); }
.admin-filters, .row-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.row-form input, .row-form select { min-width: 150px; }
.booth-mini-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; max-height: 620px; overflow: auto; }
.booth-mini-grid a { min-height: 40px; display: grid; place-items: center; border-radius: 8px; font-weight: 900; border: 2px solid transparent; }
.booth-mini-grid a.available { background: #eafaf2; color: #087647; }
.booth-mini-grid a.pending { background: #fff8d5; color: #856200; }
.booth-mini-grid a.reserved { background: #fff1f8; color: #a0134e; }
.booth-mini-grid a.active { border-color: var(--navy); }
.company-list { display: grid; gap: 10px; }
.company-list article { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: var(--soft); }
.locked-rights {
  border: 1px dashed rgba(6,30,73,.25);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #f7fbff, #fff);
  text-align: center;
}
.locked-rights strong,
.locked-rights span,
.locked-rights a { display: block; color: var(--navy); font-weight: 900; }
.locked-rights a { color: var(--teal-dark); direction: ltr; }
.rich-editor-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  padding: 10px;
  background: #f7fbff;
}
.editor-toolbar button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 12px;
  color: var(--navy);
  background: #fff;
  font-weight: 900;
}
.editor-toolbar button:hover { color: var(--pink); border-color: rgba(242,56,143,.35); }
.editor-toolbar button.danger { color: #a0134e; background: #fff1f8; }
.editor-toolbar button.danger:hover { color: #fff; border-color: #a0134e; background: #a0134e; }
.rich-editor {
  min-height: 340px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  padding: 18px;
  background: #fff;
  outline: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.85;
}
.rich-editor:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(17,184,200,.12); }
.rich-editor figure.editor-image-card {
  position: relative;
  cursor: pointer;
}
.rich-editor figure.editor-selected-figure {
  outline: 4px solid var(--pink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(242,56,143,.16);
}
.editor-image-delete {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  z-index: 2;
  min-width: 64px;
  height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  color: #fff;
  background: #a0134e;
  box-shadow: 0 10px 24px rgba(160,19,78,.28);
  cursor: pointer;
}
.editor-image-delete:hover {
  background: var(--pink);
}
.rich-editor img.editor-selected-image {
  outline: 4px solid var(--pink);
  outline-offset: 3px;
  box-shadow: 0 0 0 7px rgba(242,56,143,.16);
}
.upload-inline small { color: var(--muted); font-weight: 700; }

@media (max-width: 1240px) {
  .nav-shell { min-height: 92px; }
  .main-nav { display: none; position: absolute; top: 82px; inset-inline: 14px; grid-template-columns: 1fr; min-width: 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); overflow: visible; }
  .main-nav.open { display: grid; }
  .main-nav a { width: 100%; padding: 12px 14px; text-align: center; }
  .menu-toggle { display: grid; place-items: center; }
  .brand { order: 1; }
  .menu-toggle { order: 2; }
  .nav-actions { display: none; }
  .hero-grid, .map-layout, .admin-split { grid-template-columns: 1fr; }
  .card-grid.four, .card-grid.three, .footer-grid, .kpi-grid, .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-body { padding-right: 0; padding-top: 92px; }
  .admin-sidebar { inset: 0 0 auto 0; width: 100%; height: 92px; display: flex; align-items: center; overflow-x: auto; border-left: 0; border-bottom: 1px solid var(--line); }
  .admin-user { display: none; }
  .admin-version-badge { display: none; }
  .admin-version-footer { display: block; }
  .admin-sidebar a { flex: 0 0 auto; }
}

@media (max-width: 720px) {
  body { font-size: 15px; }
  .container { width: min(100% - 20px, 1180px); }
  .brand img { width: 118px; }
  .nav-shell { min-height: 86px; }
  .main-nav { top: 78px; inset-inline: 10px; }
  h1 { font-size: 42px; text-align: center; }
  p { font-size: 17px; text-align: center; }
  .hero-actions, .cta-strip .container { justify-content: center; }
  .card-grid.four, .card-grid.three, .footer-grid, .form-grid, .choice-grid, .kpi-grid, .module-grid { grid-template-columns: 1fr; }
  .floorplan-panel { padding: 10px; }
  .map-tools { gap: 8px; }
  .filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); justify-content: stretch; overflow: visible; padding-bottom: 4px; }
  .filter-row[data-map-zone] { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .chip { width: 100%; min-height: 38px; padding: 7px 10px; }
  .map-control-row { flex-wrap: wrap; }
  .floorplan-panel { overflow: hidden; }
  .floorplan-live { max-height: 72vh; border: 1px solid var(--line); background: #fff; overflow: auto; }
  .floorplan-live.is-zoomed { max-height: 72vh; overflow: auto; }
  .booth-svg { width: 100%; min-width: 100%; }
  .legend-row { justify-content: center; font-size: 14px; }
  .admin-main { padding: 12px; }
  .admin-topbar, .admin-card-head { align-items: stretch; flex-direction: column; }
  .admin-search, .admin-filters { display: grid; grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .module-card { padding: 14px 8px; }
  .whatsapp { right: 16px; bottom: 72px; }
}

@media (max-width: 380px) {
  .module-grid { grid-template-columns: 1fr; }
}
