@font-face {
  font-family: Cairo;
  src: url("/assets/marketing/fonts/cairo-arabic-400-normal.woff2")
    format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Cairo;
  src: url("/assets/marketing/fonts/cairo-arabic-600-normal.woff2")
    format("woff2");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: Cairo;
  src: url("/assets/marketing/fonts/cairo-arabic-700-normal.woff2")
    format("woff2");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: Cairo;
  src: url("/assets/marketing/fonts/cairo-arabic-800-normal.woff2")
    format("woff2");
  font-weight: 800;
  font-display: swap;
}
/* Majlis blue shell, warm paper and gold actions. */
:root {
  color-scheme: light;
  --page: #086b99;
  --panel: #f4f9fd;
  --field: #fff;
  --ink: #163c52;
  --muted: #48687c;
  --line: #cbdee9;
  --shell-line: #ffffff3d;
  --shell-muted: #d2e9f5;
  --accent: #ffcb69;
  --accent-ink: #3c2a09;
  --selected: #fff0d0;
  --danger: #ab3047;
  --planned: #6551a2;
  --progress: #835710;
  --shipped: #216951;
  font-family: Cairo, system-ui, sans-serif;
  color: white;
  background: var(--page);
}
:root[data-appearance="dark"] {
  color-scheme: dark;
  --page: #071523;
  --panel: #0d263c;
  --field: #14334b;
  --ink: #f4f9fd;
  --muted: #b4cbdc;
  --line: #365065;
  --shell-line: #365065;
  --shell-muted: #b4cbdc;
  --selected: #514125;
  --danger: #ff9eb0;
  --planned: #c6b6ff;
  --progress: #ffcb69;
  --shipped: #8ddcba;
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
html {
  height: 100%;
}
body {
  margin: 0;
  height: 100%;
  overflow-y: auto;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: contain;
  scrollbar-color: #8bb9d0 var(--page);
}
button,
input,
textarea,
select {
  -webkit-appearance: none;
  appearance: none;
  font: inherit;
}
button,
a,
select {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled,
select:disabled {
  opacity: 0.5;
  cursor: wait;
}
a {
  color: inherit;
  text-underline-offset: 4px;
}
svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
::selection {
  background: var(--accent);
  color: var(--accent-ink);
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
dialog :focus-visible,
.card :focus-visible,
.empty :focus-visible {
  outline-color: #1686bd;
}
input,
textarea {
  caret-color: #1686bd;
}
.shell {
  max-width: 1000px;
  margin: auto;
  padding: env(safe-area-inset-top, 0px) max(32px, env(safe-area-inset-right))
    max(48px, env(safe-area-inset-bottom)) max(32px, env(safe-area-inset-left));
}
/* WKWebView disables document scrolling; use an explicit inner scroller. */
html.native body {
  overflow: hidden;
}
html.native .shell {
  height: 100dvh;
  overflow-y: auto;
  overscroll-behavior-y: contain;
}
html.native body:has(dialog[open]) .shell {
  overflow: hidden;
}
.topbar {
  min-height: 100px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--shell-line);
}
.brand {
  object-fit: contain;
  width: 116px;
  height: 64px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: start;
  min-height: 44px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.nav-actions {
  justify-self: end;
}
.text-button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  padding: 8px 4px;
}
.text-button:hover {
  text-decoration: underline;
}
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  padding: 44px 0 32px;
}
h1 {
  margin: 0 0 8px;
  font-size: clamp(25px, 3.5vw, 36px);
  line-height: 1.55;
  font-weight: 800;
  text-wrap: balance;
}
.lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.9;
  color: var(--shell-muted);
}
.primary,
.secondary,
.danger {
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  padding: 11px 20px;
  font-size: 15px;
  font-weight: 800;
}
.primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  background: var(--accent);
  color: var(--accent-ink);
  white-space: nowrap;
}
.primary:hover {
  background: #ffd78b;
}
.secondary {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
}
.danger {
  background: #a82c44;
  color: white;
}
.danger:hover {
  background: #8e2036;
}
.filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
select {
  min-width: 0;
  min-height: 46px;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  font-size: 13px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2348687c' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}
.filters select {
  color: white;
  background-color: var(--page);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23ffffff' stroke-width='1.8' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  border-color: var(--shell-line);
  width: 100%;
}
.filters option {
  color: var(--ink);
  background: var(--panel);
}
.board-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 10px;
  min-height: 44px;
}
.board-heading h2 {
  font-size: 17px;
  margin: 0;
}
.count {
  color: var(--shell-muted);
  font-size: 12px;
}
#refresh-board {
  display: grid;
  place-items: center;
  margin-inline-start: auto;
  width: 44px;
}
#refresh-board svg {
  width: 19px;
  height: 19px;
}
.board {
  display: grid;
  gap: 12px;
}
.card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 20px;
  padding: 24px;
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
}
.vote {
  align-self: start;
  display: grid;
  justify-items: center;
  min-height: 84px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--field);
  color: var(--ink);
  padding: 6px;
}
.vote strong {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
}
.vote .vote-chevron {
  height: 18px;
  font-size: 0;
}
.vote-chevron::after {
  content: "";
  display: block;
  width: 8px;
  height: 8px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(6px) rotate(-45deg);
}
.vote span {
  font-size: 10px;
  color: var(--muted);
}
.vote:hover,
.vote[aria-pressed="true"] {
  background: var(--selected);
  border-color: #bd851c;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 7px;
}
.badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
}
.badge[class*="status-"]::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  margin-inline-end: 5px;
  vertical-align: middle;
}
.status-planned {
  color: var(--planned);
}
.status-in_progress {
  color: var(--progress);
}
.status-shipped {
  color: var(--shipped);
}
.category-bug {
  color: var(--danger);
}
.card h2 {
  font-size: 18px;
  line-height: 1.65;
  margin: 0 0 6px;
  overflow-wrap: anywhere;
}
.details {
  margin: 0;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  max-width: 70ch;
}
.card-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin-top: 12px;
}
.date {
  font-size: 11px;
  color: var(--muted);
}
.notify {
  min-height: 44px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  width: 100%;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  margin-top: 4px;
}
.admin-actions .text-button {
  padding-inline: 8px;
}
.admin-status {
  flex: 1;
  max-width: 220px;
  font-size: 12px;
}
.delete {
  color: var(--danger);
}
.admin-state {
  margin: 0 0 20px;
  padding: 12px 0;
  border-block: 1px solid var(--shell-line);
  font-size: 13px;
  color: var(--accent);
}
.empty {
  border-radius: 16px;
  background: var(--panel);
  color: var(--ink);
  padding: 46px 24px 50px;
  text-align: center;
}
.empty-mark {
  color: var(--progress);
  margin-bottom: 18px;
}
.empty-mark svg {
  width: 48px;
  height: 48px;
  stroke-width: 2;
}
.empty h2 {
  margin: 0 0 10px;
  font-size: 23px;
  font-weight: 800;
}
.empty p {
  margin: 0 auto;
  max-width: 30ch;
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}
.empty button {
  display: block;
  margin: 20px auto 0;
}
.skeleton {
  min-height: 170px;
  align-items: center;
}
.skeleton::after {
  content: "جارٍ تحميل الاقتراحات…";
  color: var(--muted);
  font-size: 14px;
  grid-column: 1 / -1;
  text-align: center;
}
dialog {
  width: min(560px, calc(100% - 32px));
  max-height: calc(
    100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
  );
  overflow: auto;
  background: var(--panel);
  color: var(--ink);
  border: 0;
  border-radius: 24px;
  padding: 0;
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #03121dcc;
}
.modal {
  padding: 28px;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.modal h2 {
  font-size: 23px;
  margin: 0;
}
.close {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background: var(--field);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 24px;
}
label {
  display: block;
  font-size: 13px;
  margin: 16px 0 7px;
  color: var(--muted);
}
input,
textarea,
.modal select {
  width: 100%;
  background-color: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 16px;
}
.modal select {
  padding-left: 32px;
}
input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 1;
}
textarea {
  min-height: 144px;
  resize: vertical;
}
#notify-email {
  direction: ltr;
  text-align: left;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 14px;
}
.honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.hint {
  font-size: 13px;
  line-height: 1.9;
  color: var(--muted);
}
.toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: var(--panel);
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  z-index: 100;
}
.toast.show {
  opacity: 1;
}
body:has(dialog[open]) {
  overflow: hidden;
}
body:has(dialog[open]) > .toast {
  visibility: hidden;
}
dialog .toast {
  position: sticky;
  transform: none;
  left: auto;
  bottom: 0;
  margin: 0 auto 16px;
}
@media (max-width: 650px) {
  .shell {
    padding-inline: max(20px, env(safe-area-inset-right))
      max(20px, env(safe-area-inset-left));
  }
  .topbar {
    min-height: 80px;
    gap: 8px;
  }
  .brand {
    width: 96px;
    height: 54px;
  }
  .back {
    font-size: 13px;
  }
  .hero {
    display: block;
    padding: 30px 0 24px;
  }
  .lead {
    font-size: 14px;
    max-width: 32ch;
  }
  .hero .primary {
    margin-top: 22px;
    width: 100%;
    min-height: 52px;
  }
  .filters {
    gap: 7px;
    grid-template-columns: 1fr 1fr;
  }
  #sort {
    grid-column: 1 / -1;
  }
  .board-heading {
    margin-top: 16px;
  }
  .card {
    padding: 20px 16px;
    gap: 14px;
    grid-template-columns: 46px minmax(0, 1fr);
  }
  .card h2 {
    font-size: 16px;
  }
  .details {
    font-size: 13px;
  }
  .card-footer {
    gap: 0 12px;
  }
  .admin-actions {
    gap: 6px;
  }
  .empty {
    padding: 34px 22px 38px;
  }
  .empty h2 {
    font-size: 21px;
  }
  .modal {
    padding: 22px 20px max(24px, env(safe-area-inset-bottom));
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
  dialog {
    width: 100%;
    max-width: 100%;
    margin: auto 0 0;
    max-height: calc(100dvh - 24px - env(safe-area-inset-top));
    border-radius: 24px 24px 0 0;
  }
  .actions > button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: no-preference) {
  dialog[open] {
    animation: sheet-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }
  @keyframes sheet-in {
    from {
      transform: translateY(28px);
    }
    to {
      transform: translateY(0);
    }
  }
  .vote {
    transition:
      background-color 0.15s ease,
      border-color 0.15s ease;
  }
}
