@import url("/assets/fonts.css");

:root {
  --navy: #292a59;
  --navy-deep: #1b1c42;
  --purple: #694ff2;
  --purple-dark: #5140c8;
  --green: #19b99f;
  --orange: #ff8a4c;
  --blue: #4896ef;
  --red: #d94f61;
  --cream: #f6f7fc;
  --surface: #fff;
  --ink: #262850;
  --muted: #81849b;
  --line: #e8e8f1;
}

html { background: var(--cream); }
* { box-sizing:border-box; }
body {
  margin:0;
  background:
    radial-gradient(circle at 42% -12%, rgba(105,79,242,.09), transparent 28rem),
    radial-gradient(circle at 95% 20%, rgba(25,185,159,.06), transparent 22rem),
    var(--cream);
  color: var(--ink);
}
body, button, input, select, textarea { font-family: "Estedad", Tahoma, Arial, sans-serif; }
a { color:inherit; text-decoration:none; }
button, select, input { font:inherit; }
.shell { min-height:100vh; display:grid; grid-template-columns:258px minmax(0,1fr); }

aside {
  position:sticky;
  top:0;
  grid-column:1;
  grid-row:1;
  height:100vh;
  padding:22px 17px;
  overflow:hidden auto;
  background:
    radial-gradient(circle at 50% 104%, rgba(24,190,166,.3), transparent 16rem),
    linear-gradient(180deg,#30276f,#22204f);
  color:#fff;
}
aside::after {
  content:"";
  position:absolute;
  width:180px;
  height:180px;
  right:-95px;
  top:36%;
  border:1px solid #ffffff13;
  border-radius:50%;
  pointer-events:none;
}
.brand {
  margin:0 0 18px;
  padding:0 8px 19px;
  border-bottom:1px solid #ffffff15;
  text-align:center;
  font-size:16px;
  font-weight:900;
}
.brand-mark {
  width:60px;
  height:60px;
  display:block;
  margin:0 auto 9px;
  padding:4px;
  border-radius:17px;
  background:#fff;
  box-shadow:0 10px 25px #1510325c;
  object-fit:contain;
}
.brand small { display:block; margin-top:6px; color:#bfb9ed; font-size:10px; font-weight:400; }
nav { display:grid; gap:4px; }
nav a {
  position:relative;
  z-index:1;
  min-height:47px;
  display:flex;
  align-items:center;
  gap:11px;
  padding:9px 13px;
  border-radius:13px;
  color:#dcd9f6;
  font-size:12px;
  font-weight:700;
  transition:.18s ease;
}
nav a:hover { transform:translateX(-3px); background:#ffffff0d; color:#fff; }
nav a.active { background:linear-gradient(90deg,#6f58e8,#5a48cc); color:#fff; box-shadow:0 9px 20px #17133c4d; }
.nav-icon { width:25px; display:inline-grid; place-items:center; flex:0 0 25px; font-size:18px; }
.logout {
  width:100%;
  min-height:47px;
  margin-top:21px;
  border:1px solid #ffffff29;
  border-radius:13px;
  background:#ffffff0a;
  color:#e9e7fb;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
}

main {
  grid-column:2;
  grid-row:1;
  width:min(100%,1420px);
  margin-inline:auto;
  padding:19px 28px 40px;
}
.account-bar {
  min-height:52px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:11px;
  margin-bottom:13px;
  direction:ltr;
}
.admin-avatar {
  width:42px;
  height:42px;
  display:grid;
  place-items:center;
  border:3px solid #fff;
  border-radius:14px;
  background:linear-gradient(145deg,#765df1,#25bba7);
  box-shadow:0 7px 18px #5247a72b;
  color:#fff;
  font-size:16px;
  font-weight:900;
}
.admin-meta { direction:rtl; line-height:1.6; }
.admin-meta strong { display:block; color:var(--ink); font-size:12px; }
.admin-meta span { display:block; color:var(--muted); font-size:9px; }
.notification-bell {
  width:39px;
  height:39px;
  display:grid;
  place-items:center;
  margin-left:10px;
  border:1px solid var(--line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 6px 16px #33336b0b;
  font-size:16px;
}
.notification-bell::after { display:none; }

.command-hero {
  position:relative;
  overflow:hidden;
  display:grid;
  grid-template-columns:minmax(0,1.45fr) minmax(310px,.55fr);
  gap:28px;
  align-items:center;
  min-height:290px;
  margin-bottom:18px;
  padding:34px;
  border-radius:28px;
  background:
    radial-gradient(circle at 4% 100%,rgba(30,209,179,.43),transparent 19rem),
    radial-gradient(circle at 90% -20%,rgba(255,255,255,.18),transparent 16rem),
    linear-gradient(135deg,#7656ef,#5d5bea 56%,#1bb7a2);
  box-shadow:0 24px 55px #5346c630;
  color:#fff;
}
.command-hero::after {
  content:"";
  position:absolute;
  width:290px;
  height:290px;
  top:-200px;
  right:36%;
  border:1px solid #ffffff2d;
  border-radius:50%;
}
.hero-copy,.hero-focus { position:relative; z-index:1; }
.hero-kicker,.campaign-tag {
  display:inline-flex;
  padding:7px 11px;
  border:1px solid #ffffff35;
  border-radius:999px;
  background:#ffffff14;
  font-size:10px;
  font-weight:900;
}
.command-hero h1 { max-width:720px; margin:14px 0 10px; color:#fff; font-size:clamp(25px,3.2vw,40px); line-height:1.55; }
.command-hero p { max-width:660px; margin:0 0 21px; color:#f0efff; font-size:12px; line-height:2; }
.top-actions { display:flex; gap:10px; flex-wrap:wrap; }
.primary,.hero-secondary {
  min-height:46px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0 17px;
  border-radius:13px;
  font-size:11px;
  font-weight:900;
}
.primary { border:0; background:#fff; color:#5542d0; box-shadow:0 9px 20px #36308d30; }
.hero-secondary { border:1px solid #ffffff38; background:#ffffff12; color:#fff; }
.hero-focus {
  padding:17px;
  border:1px solid #ffffff2c;
  border-radius:21px;
  background:#ffffff13;
  backdrop-filter:blur(10px);
}
.focus-head { display:flex; justify-content:space-between; margin-bottom:9px; color:#eeecff; font-size:10px; }
.focus-head strong { color:#fff; }
.hero-focus > a {
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:10px;
  align-items:center;
  padding:11px 4px;
  border-bottom:1px solid #ffffff1c;
  color:#fff;
}
.hero-focus > a:last-child { border-bottom:0; }
.focus-icon { width:35px; height:35px; display:grid; place-items:center; border-radius:11px; font-size:15px; }
.focus-icon.purple { background:#ffffff; color:#624ae0; }
.focus-icon.green { background:#dffff7; color:#159d87; }
.focus-icon.orange { background:#fff0e5; color:#e66f34; }
.hero-focus b { display:block; font-size:11px; }
.hero-focus small { display:block; margin-top:3px; color:#dfdcfb; font-size:8px; }
.hero-focus > a > strong { font-size:16px; }

.quick-actions { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:28px; }
.quick-actions a,.quick-actions button {
  min-height:92px;
  display:grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  column-gap:11px;
  align-content:center;
  padding:15px;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  color:var(--ink);
  text-align:right;
  cursor:pointer;
  box-shadow:0 9px 25px #33336b09;
  transition:.18s ease;
}
.quick-actions a:hover,.quick-actions button:hover { transform:translateY(-3px); border-color:#cec9f8; box-shadow:0 14px 30px #40398513; }
.quick-actions span { grid-row:1/3; width:43px; height:43px; display:grid; place-items:center; border-radius:13px; background:#f1efff; font-size:20px; }
.quick-actions b { align-self:end; font-size:12px; }
.quick-actions small { align-self:start; margin-top:4px; color:var(--muted); font-size:9px; }

.section-heading { display:flex; align-items:end; justify-content:space-between; gap:18px; margin:0 2px 13px; }
.section-heading span,.panel-kicker { color:var(--purple); font-size:9px; font-weight:900; }
.section-heading h2 { margin:4px 0 0; color:var(--ink); font-size:21px; }
.section-heading p { margin:0; color:var(--muted); font-size:10px; }
.stats { display:grid; grid-template-columns:repeat(4,1fr); gap:13px; margin-bottom:20px; }
.stat {
  min-height:128px;
  display:flex;
  align-items:center;
  gap:15px;
  padding:20px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 27px #35356f0a;
}
.stat-icon {
  position:static;
  width:52px;
  height:52px;
  flex:0 0 52px;
  display:grid;
  place-items:center;
  border-radius:16px;
  font-size:22px;
}
.purple-card .stat-icon { background:#eeeaff; color:#674fe6; }
.green-card .stat-icon { background:#e0faf4; color:#17a98f; }
.orange-card .stat-icon { background:#fff0e7; color:#e9773c; }
.blue-card .stat-icon { background:#e8f3ff; color:#3c89dc; }
.stat div > span { display:block; color:#666983; font-size:10px; }
.stat strong { display:block; margin:5px 0 1px; color:var(--ink); font-size:29px; }
.stat small { color:var(--muted); font-size:8px; }
.stat small::before { display:none; }
.stat-link { transition:.18s ease; }
.stat-link:hover { transform:translateY(-3px); border-color:#cfcafa; }

.gamification-overview {
  position:relative;
  overflow:hidden;
  min-height:205px;
  display:grid;
  grid-template-columns:minmax(0,1.5fr) repeat(3,minmax(120px,.5fr));
  gap:12px;
  align-items:center;
  margin-bottom:20px;
  padding:27px;
  border-radius:24px;
  background:
    radial-gradient(circle at 94% 120%,rgba(31,196,169,.38),transparent 17rem),
    linear-gradient(120deg,#29265f,#37317e);
  color:#fff;
  box-shadow:0 17px 38px #27235923;
}
.gamification-overview::after { content:"🏆"; position:absolute; right:42%; bottom:-35px; opacity:.08; font-size:150px; transform:rotate(-12deg); }
.gamification-title { position:relative; z-index:1; }
.gamification-title h2 { max-width:500px; margin:12px 0 7px; color:#fff; font-size:21px; line-height:1.6; }
.gamification-title p { max-width:520px; margin:0 0 15px; color:#cfcaef; font-size:10px; line-height:2; }
.gamification-link { display:inline-flex; padding:10px 14px; border-radius:11px; background:#fff; color:#4b3eb4; font-size:9px; font-weight:900; }
.gamification-metric {
  position:relative;
  z-index:1;
  min-height:125px;
  display:grid;
  place-items:center;
  align-content:center;
  padding:14px;
  border:1px solid #ffffff17;
  border-radius:17px;
  background:#ffffff0c;
  text-align:center;
}
.gamification-metric::before { margin-bottom:6px; font-size:22px; }
.gamification-metric.points::before { content:"⚡"; }
.gamification-metric.badges::before { content:"🔥"; }
.gamification-metric.challenges::before { content:"🏅"; }
.gamification-metric strong { font-size:25px; }
.gamification-metric span { margin-top:5px; color:#cfcbea; font-size:8px; }

.membership-control {
  display:grid;
  grid-template-columns:1.25fr repeat(4,minmax(105px,.5fr));
  gap:11px;
  margin-bottom:20px;
  padding:17px;
  border:1px solid var(--line);
  border-radius:20px;
  background:#fff;
  box-shadow:0 10px 27px #35356f09;
}
.membership-main { display:flex; flex-direction:column; align-items:flex-start; justify-content:center; gap:9px; }
.membership-main h2 { margin:0; color:var(--ink); font-size:15px; }
.membership-status { display:inline-flex; padding:6px 10px; border-radius:999px; background:#e3faf4; color:#15947f; font-size:9px; font-weight:900; }
.membership-status.closed { background:#fdebed; color:#b84252; }
.membership-actions { display:flex; gap:7px; flex-wrap:wrap; }
.membership-toggle { padding:9px 12px; border:0; border-radius:10px; background:var(--red); color:#fff; font-size:10px; font-weight:900; cursor:pointer; }
.membership-toggle.open { background:var(--green); }
.capacity-form { display:flex; gap:6px; }
.capacity-form input { width:100px; padding:8px 9px; border:1px solid var(--line); border-radius:9px; background:#fafafe; }
.capacity-form button { padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:#f1efff; color:#5e49d7; font-size:10px; font-weight:800; cursor:pointer; }
.membership-metric { display:grid; place-items:center; align-content:center; padding:13px; border-radius:15px; background:#f8f8fc; text-align:center; }
.membership-metric strong { display:block; color:var(--ink); font-size:22px; }
.membership-metric span { color:var(--muted); font-size:9px; }

.panel { overflow:hidden; border:1px solid var(--line); border-radius:22px; background:#fff; box-shadow:0 12px 30px #35356f0a; }
.panel-head { min-height:78px; display:flex; align-items:center; justify-content:space-between; padding:17px 21px; border-bottom:1px solid var(--line); }
.panel-head h2 { margin:4px 0 0; color:var(--ink); font-size:18px; }
.panel-head h2::after { display:none; }
.panel-tools { display:flex; align-items:center; gap:10px; }
.panel-tools a { color:var(--purple); font-size:9px; font-weight:900; }
select { min-width:155px; padding:9px 12px; border:1px solid var(--line); border-radius:10px; background:#fafafe; color:var(--ink); font-size:10px; font-weight:700; }
.table-wrap { overflow-x:auto; }
table { width:100%; min-width:850px; border-collapse:collapse; }
th,td { padding:15px 18px; border-bottom:1px solid #f0f0f5; text-align:right; }
th { background:#fafafe; color:#898ba0; font-size:9px; }
td { border-bottom-color:#f0f0f5; color:var(--ink); font-size:11px; }
.event-title { color:#46418a; font-size:11px; }
.badge { padding:6px 10px; font-size:9px; font-weight:800; }
.approved { background:#e3f8f1; color:#14866f; }
.pending { background:#fff0e4; color:#c86a34; }
.rejected,.cancelled { background:#fdebed; color:#b84252; }
.draft { background:#eeeef3; color:#66697b; }
.actions { display:flex; gap:6px; }
.actions::after { content:"•••"; color:#9b9cad; font-size:13px; }
.actions:has(.action)::after { display:none; }
.action { padding:7px 10px; border:0; border-radius:8px; font-size:9px; font-weight:800; cursor:pointer; }
.accept { background:#e3f8f1; color:#14866f; }
.reject { background:#fdebed; color:#b84252; }
.action:disabled { opacity:.5; cursor:wait; }
.state { padding:38px 20px; color:var(--muted); text-align:center; }
.error { color:var(--red); }

@media (max-width:1120px) {
  .shell { grid-template-columns:225px minmax(0,1fr); }
  .command-hero { grid-template-columns:1fr; }
  .hero-focus { display:grid; grid-template-columns:repeat(3,1fr); }
  .focus-head { grid-column:1/-1; }
  .hero-focus > a { border:0; border-left:1px solid #ffffff1c; }
  .hero-focus > a:last-child { border-left:0; }
  .stats { grid-template-columns:repeat(2,1fr); }
  .gamification-overview { grid-template-columns:repeat(3,1fr); }
  .gamification-title { grid-column:1/-1; }
  .membership-control { grid-template-columns:repeat(2,1fr); }
  .membership-main { grid-column:1/-1; }
}
@media (max-width:850px) {
  .shell { display:block; }
  aside { position:relative; width:100%; height:auto; padding:13px; }
  aside::after { display:none; }
  .brand { padding-bottom:12px; }
  .brand-mark { width:50px; height:50px; margin-bottom:6px; }
  nav { display:flex; padding-bottom:4px; overflow-x:auto; }
  nav a { min-width:max-content; min-height:42px; }
  .logout { width:auto; min-height:42px; margin:9px 0 0; padding:0 16px; }
  main { padding:16px 14px 30px; }
  .account-bar { display:none; }
  .quick-actions { grid-template-columns:repeat(2,1fr); }
}
@media (max-width:620px) {
  .command-hero { min-height:0; padding:24px 19px; border-radius:22px; }
  .command-hero h1 { font-size:25px; }
  .hero-focus { display:block; }
  .hero-focus > a { border-left:0; border-bottom:1px solid #ffffff1c; }
  .top-actions { display:grid; grid-template-columns:1fr; }
  .quick-actions { grid-template-columns:1fr; }
  .section-heading { align-items:start; flex-direction:column; gap:5px; }
  .stats { grid-template-columns:1fr; }
  .stat { min-height:105px; }
  .gamification-overview { grid-template-columns:1fr; padding:22px 17px; }
  .gamification-title { grid-column:auto; }
  .membership-control { grid-template-columns:1fr; }
  .membership-main { grid-column:auto; }
  .panel-head { align-items:stretch; flex-direction:column; gap:12px; }
  .panel-tools { justify-content:space-between; }
}
