:root {
  --ice: #00ced1;
  --ice-hi: #9ff7f9;
  --ice-mid: #0aa8ab;
  --text: #f4fffe;
  --muted: rgba(236, 255, 252, 0.68);
  --soft: rgba(236, 255, 252, 0.42);
  --line: rgba(0, 206, 209, 0.28);
  --panel: rgba(8, 16, 19, 0.88);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font: "Cairo", "Segoe UI", sans-serif;
  --display: "Rajdhani", "Cairo", sans-serif;
}

* { box-sizing: border-box; }
html {
  background: #020608;
  color-scheme: dark;
}
html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  color: var(--text);
  font-family: var(--font);
  background: #020608;
}
body {
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
}

/* Winter scrollbars — hide native white bars */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 206, 209, 0.55) rgba(0, 0, 0, 0.25);
}
*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
*::-webkit-scrollbar-track {
  background: rgba(2, 8, 10, 0.55);
  border-radius: 999px;
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(42, 230, 234, 0.75), rgba(0, 206, 209, 0.45));
  border-radius: 999px;
  border: 2px solid rgba(2, 8, 10, 0.55);
}
*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(159, 247, 249, 0.9), rgba(0, 206, 209, 0.7));
}
*::-webkit-scrollbar-corner {
  background: transparent;
}

.scene {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background: #020608;
}
.scene-grad {
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(ellipse 70% 55% at 85% 0%, rgba(0, 206, 209, 0.26), transparent 58%),
    radial-gradient(ellipse 50% 45% at 10% 90%, rgba(0, 120, 140, 0.16), transparent 55%),
    linear-gradient(165deg, #0a171c 0%, #061014 42%, #03080a 100%);
}
.scene-grid {
  position: absolute;
  inset: -60px;
  background-image:
    linear-gradient(rgba(0, 206, 209, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 206, 209, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.85;
  mask-image: radial-gradient(ellipse at 60% 28%, black 8%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 28%, black 8%, transparent 70%);
  animation: drift 40s linear infinite;
  will-change: transform;
}
.scene-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  pointer-events: none;
}
.scene-orb-a {
  width: 360px; height: 360px; top: -90px; right: -40px;
  background: radial-gradient(circle, rgba(0, 206, 209, 0.32), transparent 70%);
  animation: pulse 8s ease-in-out infinite;
}
.scene-orb-b {
  width: 280px; height: 280px; bottom: 8%; left: -60px;
  background: radial-gradient(circle, rgba(14, 180, 190, 0.18), transparent 70%);
  animation: pulse 11s ease-in-out infinite reverse;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-56px, -28px, 0); }
}
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid rgba(0, 206, 209, 0.18);
  background: rgba(3, 9, 12, 0.78);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: inherit;
}
.brand-logo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(0, 206, 209, 0.7);
  box-shadow: 0 0 22px rgba(0, 206, 209, 0.45);
  background: #031015;
}
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-text strong {
  font-family: var(--display);
  letter-spacing: 0.16em;
  font-size: 1.1rem;
}
.brand-text em {
  margin-top: 0.25rem;
  font-style: normal;
  color: var(--ice);
  font-family: var(--display);
  letter-spacing: 0.24em;
  font-size: 0.72rem;
}

.nav { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
}
.nav a:hover, .nav a.active {
  color: var(--text);
  background: rgba(0, 206, 209, 0.14);
}

main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
}

.view[hidden],
.nav[hidden],
#adminLink[hidden],
.hint[hidden],
.form-msg[hidden],
.detail-actions[hidden],
.detail-img[hidden],
.drop-preview[hidden] {
  display: none !important;
}

.hero {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem 2rem;
  align-items: center;
  min-height: calc(100vh - 15rem);
  animation: rise 0.65s var(--ease) both;
}
.hero-visual {
  position: relative;
  width: 200px;
  height: 200px;
  display: grid;
  place-items: center;
}
.hero-logo {
  width: 148px;
  height: 148px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(0, 206, 209, 0.75);
  box-shadow: 0 0 50px rgba(0, 206, 209, 0.4);
  position: relative;
  z-index: 1;
  background: #031015;
}
.hero-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1px dashed rgba(0, 206, 209, 0.45);
  animation: spin 18s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.eyebrow {
  margin: 0 0 0.55rem;
  color: var(--ice-hi);
  font-family: var(--display);
  letter-spacing: 0.28em;
  font-weight: 700;
  font-size: 0.9rem;
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 5.6rem);
  letter-spacing: 0.05em;
  line-height: 0.92;
  text-shadow: 0 0 36px rgba(0, 206, 209, 0.25);
}
.hero h1 span {
  color: var(--ice);
  text-shadow: 0 0 28px rgba(0, 206, 209, 0.55);
}
.lede {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}
.cta-row {
  margin-top: 1.2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cta-note { color: var(--soft); font-size: 0.92rem; }
.hint { margin: 0.6rem 0 0; color: #ff9b9b; }

.feature-strip {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}
.feature-strip article {
  padding: 1.05rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(5, 14, 17, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.feature-strip strong {
  font-family: var(--display);
  color: var(--ice);
  letter-spacing: 0.16em;
}
.feature-strip h3 { margin: 0.4rem 0 0.2rem; font-size: 1.05rem; }
.feature-strip p { margin: 0; color: var(--muted); font-size: 0.9rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  font-weight: 800;
  border-radius: 14px;
  padding: 0.9rem 1.4rem;
  transition: transform 0.18s var(--ease), filter 0.18s var(--ease);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn.primary {
  color: #031015;
  background: linear-gradient(180deg, #2ae6ea 0%, #00ced1 48%, #08999c 100%);
  box-shadow: 0 12px 30px rgba(0, 206, 209, 0.28);
}
.btn.wide { width: 100%; }
.btn.small { padding: 0.5rem 0.9rem; font-size: 0.88rem; }
.ghost {
  background: transparent;
  border: 1px solid rgba(0, 206, 209, 0.3);
  color: var(--muted);
  border-radius: 10px;
  padding: 0.42rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
}
.ghost:hover { color: var(--text); }

.panel {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(165deg, rgba(12, 24, 28, 0.95), rgba(5, 12, 15, 0.96));
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  padding: 1.25rem 1.3rem;
  position: relative;
  overflow: hidden;
  animation: rise 0.45s var(--ease) both;
}
.panel::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(159, 247, 249, 0.85), transparent);
}
.panel h2 { margin: 0; font-size: 1.35rem; }
.panel-lede { margin: 0.35rem 0 0; color: var(--muted); }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.userbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.userbar-text { flex: 1; }
.userbar-logo, .avatar {
  border-radius: 16px;
  object-fit: cover;
  border: 1px solid rgba(0, 206, 209, 0.35);
}
.avatar { width: 54px; height: 54px; }
.userbar-logo { width: 42px; height: 42px; border-radius: 50%; }
.user-name { margin: 0; font-weight: 800; }
.user-meta { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.86rem; }

.compose {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  align-items: stretch;
}
.compose-side {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.3rem 1.2rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 206, 209, 0.18), transparent 55%),
    rgba(6, 14, 17, 0.9);
}
.compose-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(0, 206, 209, 0.65);
  box-shadow: 0 0 24px rgba(0, 206, 209, 0.28);
  margin-bottom: 0.9rem;
}
.compose-side h2 { margin: 0 0 0.45rem; }
.compose-side > p { margin: 0; color: var(--muted); line-height: 1.65; }
.compose-side ul {
  margin: 1.1rem 0 0;
  padding: 0 1.1rem 0 0;
  color: var(--muted);
  display: grid;
  gap: 0.45rem;
  line-height: 1.5;
}

.form-panel form { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.45rem; }
.field label, .field-label {
  font-weight: 800;
  font-size: 0.94rem;
}
.field-label em,
.field .field-hint {
  font-style: normal;
  color: var(--soft);
  font-weight: 600;
  margin-inline-start: 0.35rem;
  font-size: 0.82rem;
}
#targetField[hidden] { display: none !important; }
input, textarea, select, .filter {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(0, 206, 209, 0.28);
  background: rgba(2, 9, 12, 0.86);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  padding: 0.85rem 0.95rem;
  outline: none;
}
textarea { min-height: 160px; resize: vertical; line-height: 1.65; }
input:focus, textarea:focus, select:focus, .filter:focus {
  border-color: rgba(0, 206, 209, 0.75);
  box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.16);
}
.fancy-compact {
  min-width: 160px;
  width: auto;
}
.fancy-compact .fancy-btn {
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
  border-radius: 12px;
}
.fancy-compact .fancy-menu {
  min-width: 100%;
}

.fancy {
  position: relative;
}
.fancy-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip: rect(0 0 0 0) !important;
  border: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
}
.fancy-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border-radius: 14px;
  border: 1px solid rgba(0, 206, 209, 0.28);
  background: linear-gradient(180deg, rgba(12, 28, 32, 0.95), rgba(3, 10, 13, 0.96));
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0.9rem 1rem;
  cursor: pointer;
  text-align: right;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.fancy-btn:hover,
.fancy.open .fancy-btn {
  border-color: rgba(0, 206, 209, 0.8);
  box-shadow: 0 0 0 3px rgba(0, 206, 209, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.fancy-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.fancy-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.85rem;
  flex: 1;
  min-width: 0;
}
.fancy-label .ar { font-weight: 800; }
.fancy-label .placeholder { color: var(--soft); font-weight: 600; }
.fancy-label .en,
.fancy-option .en {
  color: var(--soft);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.05em;
  font-size: 0.86rem;
  direction: ltr;
  unicode-bidi: isolate;
  flex: none;
}
.fancy-btn .chev {
  width: 9px;
  height: 9px;
  border-inline-end: 2px solid var(--ice);
  border-bottom: 2px solid var(--ice);
  transform: rotate(45deg);
  transition: transform 0.2s var(--ease);
  flex: none;
  opacity: 0.9;
}
.fancy.open .fancy-btn .chev {
  transform: rotate(-135deg);
  margin-top: 4px;
}
.fancy-menu {
  position: absolute;
  inset-inline: 0;
  top: calc(100% + 8px);
  z-index: 50;
  max-height: min(280px, 48vh);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 16px;
  border: 1px solid rgba(0, 206, 209, 0.4);
  background:
    radial-gradient(circle at 80% 0%, rgba(0, 206, 209, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(8, 18, 22, 0.99), rgba(3, 9, 12, 0.99));
  box-shadow:
    0 22px 48px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(0, 206, 209, 0.08),
    0 0 28px rgba(0, 206, 209, 0.12);
  padding: 0.45rem;
  display: none;
  animation: rise 0.18s var(--ease) both;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 206, 209, 0.65) rgba(0, 12, 14, 0.9);
}
.fancy-menu::-webkit-scrollbar {
  width: 6px;
}
.fancy-menu::-webkit-scrollbar-track {
  background: rgba(0, 12, 14, 0.85);
  border-radius: 999px;
  margin: 6px 0;
}
.fancy-menu::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #2ae6ea, #08999c);
  border-radius: 999px;
  border: 1px solid rgba(0, 12, 14, 0.85);
}
.fancy.open .fancy-menu { display: grid; gap: 0.22rem; }
.fancy-option {
  border: 0;
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 700;
  text-align: right;
  padding: 0.78rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 0.85rem;
  align-items: center;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.fancy-option.is-placeholder {
  color: var(--soft);
  font-weight: 600;
  pointer-events: none;
  opacity: 0.72;
}
.fancy-option:hover,
.fancy-option.active {
  background: rgba(0, 206, 209, 0.14);
  color: var(--ice-hi);
}
.fancy-option.active {
  box-shadow: inset 0 0 0 1px rgba(0, 206, 209, 0.25);
}
.fancy-option.active .en { color: rgba(159, 247, 249, 0.8); }
.fancy-option .ar { font-weight: 800; }

.drop {
  display: block;
  border: 1.5px dashed rgba(0, 206, 209, 0.42);
  border-radius: 16px;
  background: rgba(0, 206, 209, 0.05);
  min-height: 118px;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.drop:hover, .drop.drag {
  border-color: rgba(0, 206, 209, 0.85);
  background: rgba(0, 206, 209, 0.1);
}
.drop-inner {
  min-height: 118px;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 0.3rem;
  padding: 1rem;
}
.drop-inner strong { font-size: 0.98rem; }
.drop-inner span { color: var(--soft); font-size: 0.85rem; }
.drop-preview {
  min-height: 118px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
}
.drop-preview img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid rgba(0, 206, 209, 0.35);
}
.linkish {
  border: 0;
  background: none;
  color: var(--ice-hi);
  cursor: pointer;
  font-family: inherit;
  font-weight: 700;
  padding: 0;
  margin-top: 0.25rem;
}

.form-msg { margin: 0; color: var(--ice-hi); }
.form-msg.error { color: #ff9b9b; }

.list { display: grid; gap: 0.7rem; }
.card-item {
  border: 1px solid rgba(0, 206, 209, 0.18);
  border-radius: 14px;
  padding: 0.95rem 1rem;
  background: rgba(0, 0, 0, 0.24);
  cursor: pointer;
}
.card-item:hover {
  border-color: rgba(0, 206, 209, 0.5);
  background: rgba(0, 206, 209, 0.08);
}
.card-top { display: flex; justify-content: space-between; gap: 0.75rem; }
.card-title { margin: 0; font-weight: 800; }
.card-sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.85rem;
}
.badge {
  border-radius: 999px;
  padding: 0.18rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  border: 1px solid transparent;
}
.badge.new { color: #7ef6f8; border-color: rgba(0, 206, 209, 0.35); background: rgba(0, 206, 209, 0.1); }
.badge.progress { color: #ffd27a; border-color: rgba(255, 210, 122, 0.35); background: rgba(255, 210, 122, 0.08); }
.badge.closed { color: #9aa7a8; border-color: rgba(154, 167, 168, 0.35); background: rgba(154, 167, 168, 0.08); }
.empty { color: var(--muted); text-align: center; padding: 2rem 1rem; }

.site-foot {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto 1.6rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--soft);
}
.site-foot img {
  border-radius: 50%;
  border: 1px solid rgba(0, 206, 209, 0.4);
}
.site-foot div { display: grid; gap: 0.1rem; }
.site-foot strong { color: var(--muted); font-size: 0.9rem; }
.site-foot span { font-size: 0.8rem; }

dialog {
  border: 1px solid rgba(0, 206, 209, 0.3);
  border-radius: 18px;
  padding: 0;
  background: #071216;
  color: var(--text);
  width: min(640px, calc(100% - 2rem));
  max-height: min(86vh, 820px);
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 206, 209, 0.6) rgba(0, 12, 14, 0.9);
}
dialog::backdrop { background: rgba(0, 0, 0, 0.75); }
.detail { padding: 1.15rem 1.25rem 1.35rem; }
.detail header { display: flex; justify-content: space-between; gap: 1rem; }
.detail h3 { margin: 0; }
.detail .meta { color: var(--muted); }
.detail .body { white-space: pre-wrap; line-height: 1.7; margin: 0.9rem 0; }
.detail-img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(0, 206, 209, 0.2);
  margin-bottom: 0.9rem;
}
.detail-actions { display: flex; gap: 0.75rem; align-items: end; flex-wrap: wrap; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; padding: 1rem 0 0.5rem; }
  .hero-visual { width: 150px; height: 150px; }
  .hero-logo { width: 110px; height: 110px; }
  .compose { grid-template-columns: 1fr; }
  .feature-strip { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .brand-text em { display: none; }
  .top { padding: 0.8rem 1rem; }
  main, .site-foot { width: calc(100% - 1.2rem); }
}
