/* ============================================================================
   Campus Elite — Member (non-admin) experience
   Dark, mobile-first design language that scales up to desktop.
   Ported from the campus-elite-app.html mockup and extended responsively.
   Scoped under .ce-body / .ce-app so it never leaks into the admin UI.
   ========================================================================== */

:root {
  --ce-bg:        #0B0E2C;
  --ce-bg-2:      #14183F;
  --ce-bg-3:      #06081C;
  --ce-text:      #F8FAFF;
  --ce-muted:     rgba(255, 255, 255, 0.62);
  --ce-faint:     rgba(255, 255, 255, 0.38);
  --ce-surface:   rgba(255, 255, 255, 0.08);
  --ce-border:    rgba(255, 255, 255, 0.12);
  --ce-purple:    #8B5CF6;
  --ce-blue:      #2D3FE7;
  --ce-green:     #4ADE80;
  --ce-amber:     #FFB547;
  --ce-pink:      #FF3D8A;
  --ce-cyan:      #06B6D4;
  --ce-rail-w:    248px;
}

.ce-body {
  margin: 0;
  background: var(--ce-bg);
  color: var(--ce-text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "Inter", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

.ce-body * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.ce-app {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(139, 92, 246, 0.30), transparent 70%),
    radial-gradient(ellipse 70% 30% at 100% 30%, rgba(45, 63, 231, 0.20), transparent 60%),
    linear-gradient(180deg, var(--ce-bg-2) 0%, var(--ce-bg) 60%, var(--ce-bg-3) 100%);
  background-attachment: fixed;
}

.ce-app a { color: inherit; text-decoration: none; }

/* ----------------------------------------------------------------------------
   Layout shell
   -------------------------------------------------------------------------- */
.ce-main { display: flex; flex-direction: column; min-height: 100vh; }

.ce-content {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 18px 120px;
}

/* ----------------------------------------------------------------------------
   Top bar (mobile header)
   -------------------------------------------------------------------------- */
.ce-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0 18px;
}
.ce-greeting { display: flex; align-items: center; gap: 11px; }
.ce-avatar {
  width: 42px; height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
  position: relative; flex-shrink: 0;
}
.ce-avatar.is-online::after {
  content: ''; position: absolute; bottom: -2px; right: -2px;
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--ce-green); border: 2px solid var(--ce-bg);
}
.ce-hi { font-size: 11px; color: var(--ce-muted); font-weight: 500; }
.ce-name { font-size: 16px; font-weight: 700; }
.ce-top-actions { display: flex; gap: 7px; }
.ce-icon-btn {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--ce-surface);
  border: 1px solid var(--ce-border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; color: #fff;
}
.ce-icon-btn .ce-dot {
  position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; background: var(--ce-pink);
  border-radius: 50%; border: 2px solid var(--ce-bg-2);
}

/* ----------------------------------------------------------------------------
   Sub-page header (back / title)
   -------------------------------------------------------------------------- */
.ce-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 0 16px;
}
.ce-back-btn {
  width: 38px; height: 38px; border-radius: 11px;
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.ce-page-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.ce-page-spacer { width: 38px; }

/* ----------------------------------------------------------------------------
   Hero wallet card
   -------------------------------------------------------------------------- */
.ce-hero {
  border-radius: 24px; padding: 22px;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  box-shadow: 0 16px 32px rgba(45, 63, 231, 0.30);
  position: relative; overflow: hidden;
}
.ce-hero::before {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 200px; height: 200px; background: rgba(255, 255, 255, 0.15);
  border-radius: 50%; filter: blur(40px);
}
.ce-hero-row {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; position: relative;
}
.ce-hero-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: rgba(255, 255, 255, 0.85);
}
.ce-pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ce-green); box-shadow: 0 0 6px var(--ce-green);
}
.ce-tier {
  display: flex; align-items: center; gap: 5px;
  background: rgba(0, 0, 0, 0.25); padding: 4px 10px 4px 8px;
  border-radius: 100px; border: 1px solid var(--ce-border);
  font-size: 9px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
}
.ce-tier-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: linear-gradient(135deg, var(--ce-amber), var(--ce-pink));
}
.ce-points {
  font-size: 46px; font-weight: 800; line-height: 1;
  letter-spacing: -0.03em; position: relative;
}
.ce-currency {
  font-size: 12px; font-weight: 600; opacity: 0.7;
  letter-spacing: 0.04em; text-transform: uppercase; margin-left: 6px;
}
.ce-delta {
  margin-top: 6px; text-align: right; font-size: 11px;
  font-weight: 700; color: var(--ce-green); position: relative;
}
.ce-divider { height: 1px; background: rgba(255, 255, 255, 0.15); margin: 16px 0; position: relative; }
.ce-hero-bottom { display: flex; justify-content: space-between; align-items: center; position: relative; }
.ce-ceid { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; }
.ce-lbl {
  font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6); margin-bottom: 3px;
}
.ce-xp-wrap { text-align: right; }
.ce-xp-bar { width: 80px; height: 5px; background: rgba(0, 0, 0, 0.3); border-radius: 100px; overflow: hidden; margin-left: auto; }
.ce-xp-fill { height: 100%; background: linear-gradient(90deg, var(--ce-amber), var(--ce-pink)); border-radius: 100px; }

/* ----------------------------------------------------------------------------
   Quick actions
   -------------------------------------------------------------------------- */
.ce-qa-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.ce-qa {
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 16px; padding: 13px 6px 11px;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  cursor: pointer; transition: transform 0.15s ease, background 0.15s ease;
}
.ce-qa:hover { transform: translateY(-2px); background: rgba(255, 255, 255, 0.12); }
.ce-qa-ic { width: 36px; height: 36px; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.ce-qa-ic.r { background: linear-gradient(135deg, var(--ce-green), #22C55E); }
.ce-qa-ic.s { background: linear-gradient(135deg, var(--ce-amber), #FF8A47); }
.ce-qa-ic.g { background: linear-gradient(135deg, var(--ce-purple), #6366F1); }
.ce-qa-l { font-size: 10.5px; font-weight: 700; }

/* ----------------------------------------------------------------------------
   Section head
   -------------------------------------------------------------------------- */
.ce-sh { display: flex; justify-content: space-between; align-items: center; margin: 22px 0 11px; }
.ce-sh-t { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; display: flex; align-items: center; gap: 7px; }
.ce-lv {
  background: rgba(74, 222, 128, 0.15); border: 1px solid rgba(74, 222, 128, 0.3);
  color: var(--ce-green); padding: 2px 7px; border-radius: 100px;
  font-size: 8px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  display: flex; align-items: center; gap: 4px;
}
.ce-lv-d { width: 4px; height: 4px; border-radius: 50%; background: var(--ce-green); }
.ce-sh-l { font-size: 11px; font-weight: 600; color: #C4B5FD; cursor: pointer; }

/* ----------------------------------------------------------------------------
   Activity feed
   -------------------------------------------------------------------------- */
.ce-feed { display: flex; flex-direction: column; gap: 7px; }
.ce-fi {
  display: flex; align-items: center; gap: 11px; padding: 11px 13px;
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 15px; cursor: default;
}
.ce-fa {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; position: relative; color: #fff;
}
.ce-fa-ic {
  position: absolute; bottom: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid var(--ce-bg); display: flex; align-items: center; justify-content: center;
}
.ce-fa-ic.gain   { background: var(--ce-green); }
.ce-fa-ic.spin   { background: var(--ce-amber); }
.ce-fa-ic.redeem { background: var(--ce-pink); }
.ce-fb { flex: 1; min-width: 0; }
.ce-ft { font-size: 12px; line-height: 1.4; font-weight: 500; }
.ce-ft .nm { font-weight: 700; }
.ce-ft-tm { font-size: 9.5px; color: var(--ce-faint); margin-top: 2px; }

.ce-empty {
  text-align: center; color: var(--ce-muted); font-size: 12px;
  padding: 26px 14px; background: var(--ce-surface);
  border: 1px dashed var(--ce-border); border-radius: 15px;
}

/* ----------------------------------------------------------------------------
   Featured card
   -------------------------------------------------------------------------- */
.ce-feat {
  border-radius: 22px; padding: 18px;
  background: linear-gradient(135deg, #1E40AF, #C2410C);
  min-height: 180px; display: flex; flex-direction: column; justify-content: flex-end;
  position: relative; overflow: hidden; cursor: pointer;
}
.ce-feat::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
}
.ce-feat.has-img { background-size: cover; background-position: center; }
.ce-feat-ic {
  position: absolute; top: 16px; left: 16px;
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.15); border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
}
.ce-feat-tag {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255, 255, 255, 0.95); color: #0A0E27;
  padding: 4px 9px; border-radius: 100px; font-size: 9px; font-weight: 800;
  letter-spacing: 0.08em; text-transform: uppercase; display: flex; align-items: center; gap: 4px;
}
.ce-feat-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ce-pink); }
.ce-feat-body { position: relative; }
.ce-feat-eb { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.85; margin-bottom: 5px; }
.ce-feat-tt { font-size: 20px; font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 9px; }
.ce-feat-mt { display: flex; align-items: center; gap: 9px; font-size: 10px; opacity: 0.85; }
.ce-feat-rw {
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 3px 9px; border-radius: 100px; font-weight: 700; font-size: 9.5px;
}

/* ----------------------------------------------------------------------------
   Generic card / opportunity preview
   -------------------------------------------------------------------------- */
.ce-card {
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 18px; padding: 16px;
}
.ce-op { display: flex; gap: 12px; padding: 12px; align-items: center; }
.ce-op-logo {
  width: 48px; height: 48px; border-radius: 12px; flex-shrink: 0; object-fit: cover;
  background: #fff; padding: 4px;
}
.ce-op-body { flex: 1; min-width: 0; }
.ce-op-title { font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.ce-op-meta { font-size: 10.5px; color: var(--ce-muted); }
.ce-op-cta {
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  color: #fff; padding: 7px 13px; border-radius: 100px; font-size: 10px;
  font-weight: 800; flex-shrink: 0; letter-spacing: 0.04em; text-transform: uppercase;
}

/* CTA buttons */
.ce-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  width: 100%; border: none; cursor: pointer; text-align: center;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  border-radius: 13px; padding: 13px; color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3);
}
.ce-btn--ghost { background: var(--ce-surface); border: 1px solid var(--ce-border); box-shadow: none; }
.ce-cta-block { margin-top: 16px; }

/* ----------------------------------------------------------------------------
   Profile screen
   -------------------------------------------------------------------------- */
.ce-ph { text-align: center; padding: 12px 0 20px; }
.ce-pa {
  width: 78px; height: 78px; border-radius: 26px;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 28px; margin: 0 auto 11px;
  border: 3px solid rgba(255, 255, 255, 0.1); box-shadow: 0 8px 20px rgba(139, 92, 246, 0.4);
  overflow: hidden; color: #fff;
}
.ce-pa img { width: 100%; height: 100%; object-fit: cover; }
.ce-pn { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 3px; }
.ce-pun { font-size: 11.5px; color: var(--ce-muted); margin-bottom: 11px; }
.ce-pcid {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px;
  background: var(--ce-surface); border: 1px solid var(--ce-border); border-radius: 100px;
  font-family: "SF Mono", Menlo, Consolas, monospace; font-weight: 700; font-size: 11px; letter-spacing: 0.06em;
}
.ce-pst { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; margin-bottom: 16px; }
.ce-psi { background: var(--ce-surface); border: 1px solid var(--ce-border); border-radius: 12px; padding: 11px 7px; text-align: center; }
.ce-psv { font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.ce-psl { font-size: 8.5px; color: var(--ce-muted); letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; margin-top: 3px; }
.ce-ml { display: flex; flex-direction: column; gap: 6px; }
.ce-mi {
  display: flex; align-items: center; gap: 11px; padding: 12px 13px;
  background: var(--ce-surface); border: 1px solid var(--ce-border); border-radius: 13px; cursor: pointer;
}
.ce-mic {
  width: 32px; height: 32px; border-radius: 9px; background: rgba(139, 92, 246, 0.18);
  display: flex; align-items: center; justify-content: center; color: #C4B5FD; flex-shrink: 0;
}
.ce-mlb { flex: 1; font-size: 12.5px; font-weight: 600; }
.ce-ma { color: var(--ce-faint); }

.ce-progress {
  margin: 4px 0 16px; background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 14px; padding: 14px 16px;
}
.ce-progress-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 9px; font-size: 12px; font-weight: 700; }
.ce-progress-bar { height: 7px; background: rgba(0, 0, 0, 0.3); border-radius: 100px; overflow: hidden; }
.ce-progress-fill { height: 100%; background: linear-gradient(90deg, var(--ce-purple), var(--ce-green)); border-radius: 100px; }

/* ----------------------------------------------------------------------------
   Tailwind dark-shim — darkens Livewire components (transfer, coupon redeem,
   transfer history) that ship with light Tailwind utilities. Scoped to
   .ce-content, which only exists in the member shell, so admin/Tailwind pages
   are untouched. Lets those components match without rewriting each class.
   -------------------------------------------------------------------------- */
.ce-content .bg-white,
.ce-content .bg-gray-50,
.ce-content .bg-gray-100 {
  background: var(--ce-surface) !important;
  border: 1px solid var(--ce-border);
}
.ce-content .bg-green-50 { background: rgba(74, 222, 128, 0.1) !important; border: 1px solid rgba(74, 222, 128, 0.25); }
.ce-content .bg-green-100 { background: rgba(74, 222, 128, 0.18) !important; }
.ce-content .text-gray-900,
.ce-content .text-green-900 { color: var(--ce-text) !important; }
.ce-content .text-gray-700,
.ce-content .text-gray-600,
.ce-content .text-gray-500,
.ce-content .text-gray-400 { color: var(--ce-muted) !important; }
.ce-content .text-green-800,
.ce-content .text-green-700,
.ce-content .text-green-600 { color: #86EFAC !important; }
.ce-content .text-blue-600 { color: #C4B5FD !important; }
.ce-content .ring-gray-300 { --tw-ring-color: var(--ce-border) !important; }
.ce-content input:not([type=checkbox]):not([type=radio]),
.ce-content textarea,
.ce-content select {
  background: rgba(0, 0, 0, 0.28) !important;
  color: #fff !important;
  border-color: var(--ce-border) !important;
}
.ce-content input::placeholder,
.ce-content textarea::placeholder { color: var(--ce-faint) !important; }
.ce-content .shadow,
.ce-content .shadow-sm { box-shadow: none !important; }
/* Legacy design-system buttons that remain inside member pages (disabled/error
   states on the activity detail) — keep them rounded & readable on dark. */
.ce-content .btn { border-radius: 11px; }
.ce-content .req--info label { color: #C4B5FD !important; }

/* ----------------------------------------------------------------------------
   Modal (themed) — notifications / messages / confirmations
   -------------------------------------------------------------------------- */
.ce-modal-backdrop {
  position: fixed; inset: 0; background: rgba(6, 8, 28, 0.72);
  backdrop-filter: blur(4px); z-index: 200; display: none;
  align-items: center; justify-content: center; padding: 20px;
}
.ce-modal-backdrop.open { display: flex; }
.ce-modal {
  background: #14183F; border: 1px solid var(--ce-border); border-radius: 20px;
  max-width: 440px; width: 100%; padding: 22px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
}
.ce-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.ce-modal-title { font-size: 16px; font-weight: 800; letter-spacing: -0.01em; }
.ce-modal-x { background: none; border: none; color: var(--ce-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.ce-modal-body { font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, 0.85); margin-bottom: 18px; max-height: 52vh; overflow-y: auto; word-break: break-word; }
.ce-modal-body img { max-width: 100%; border-radius: 10px; }

/* ----------------------------------------------------------------------------
   Notification / message list
   -------------------------------------------------------------------------- */
.ce-notif {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px;
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 15px; margin-bottom: 8px; cursor: pointer; transition: background 0.15s ease;
}
.ce-notif:hover { background: rgba(255, 255, 255, 0.12); }
.ce-notif.read { opacity: 0.55; }
.ce-notif-ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; color: #fff;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
}
.ce-notif-b { flex: 1; min-width: 0; }
.ce-notif-t { font-size: 12.5px; font-weight: 700; margin-bottom: 3px; }
.ce-notif-m { font-size: 11px; color: var(--ce-muted); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ce-notif-tm { font-size: 9.5px; color: var(--ce-faint); margin-top: 5px; }
.ce-notif-del { background: none; border: none; color: var(--ce-faint); cursor: pointer; padding: 4px; font-size: 13px; flex-shrink: 0; }
.ce-notif-del:hover { color: var(--ce-pink); }

/* ----------------------------------------------------------------------------
   Balance banner (Rewards / catalogue pages)
   -------------------------------------------------------------------------- */
.ce-balance {
  background: rgba(74, 222, 128, 0.1); border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 18px; padding: 16px 18px; display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 16px;
}
.ce-balance-l { font-size: 9px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ce-muted); margin-bottom: 3px; }
.ce-balance-v { font-size: 24px; font-weight: 800; color: var(--ce-green); letter-spacing: -0.02em; }
.ce-balance-i {
  width: 42px; height: 42px; border-radius: 13px;
  background: linear-gradient(135deg, var(--ce-green), #22C55E);
  display: flex; align-items: center; justify-content: center; color: #fff;
}

/* ----------------------------------------------------------------------------
   Reward grid
   -------------------------------------------------------------------------- */
.ce-rg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ce-rc {
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 16px; overflow: hidden; display: flex; flex-direction: column;
}
.ce-ri {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: 36px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #8B5CF6, #2D3FE7);
}
.ce-ri img { width: 100%; height: 100%; object-fit: cover; }
.ce-rs {
  position: absolute; top: 7px; right: 7px; background: rgba(0, 0, 0, 0.5); color: #fff;
  font-size: 8.5px; font-weight: 700; padding: 3px 7px; border-radius: 100px;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.ce-rs.out { background: rgba(255, 61, 138, 0.9); }
.ce-rin { padding: 11px 12px 13px; display: flex; flex-direction: column; flex: 1; }
.ce-rn { font-size: 12.5px; font-weight: 700; line-height: 1.25; margin-bottom: 5px; }
.ce-rd { font-size: 10.5px; color: var(--ce-muted); line-height: 1.4; margin-bottom: 9px; flex: 1; }
.ce-rco { font-size: 12px; font-weight: 800; color: var(--ce-amber); margin-bottom: 10px; display: flex; align-items: center; gap: 4px; }
.ce-redeem-btn {
  width: 100%; border: none; cursor: pointer; border-radius: 11px; padding: 9px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.03em;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue)); color: #fff;
}
.ce-redeem-btn:disabled { background: rgba(255, 255, 255, 0.08); color: var(--ce-faint); cursor: not-allowed; border: 1px solid var(--ce-border); }

/* ----------------------------------------------------------------------------
   Opportunity / activity rich card
   -------------------------------------------------------------------------- */
.ce-opp {
  background: var(--ce-surface); border: 1px solid var(--ce-border);
  border-radius: 18px; overflow: hidden; margin-bottom: 12px; display: block;
}
.ce-opp-banner { height: 120px; background: linear-gradient(135deg, #1E40AF, #8B5CF6); background-size: cover; background-position: center; position: relative; }
.ce-opp-pin { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,0.45); color: #fff; padding: 4px 9px; border-radius: 100px; font-size: 9px; font-weight: 700; }
.ce-opp-body { padding: 14px 16px 16px; }
.ce-opp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ce-opp-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: #fff; padding: 3px; flex-shrink: 0; }
.ce-opp-title { font-size: 14px; font-weight: 800; letter-spacing: -0.01em; line-height: 1.2; }
.ce-opp-ex { font-size: 11.5px; color: var(--ce-muted); line-height: 1.5; margin-bottom: 12px; }
.ce-opp-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ce-chip {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--ce-border);
  border-radius: 100px; padding: 4px 10px; font-size: 10px; font-weight: 600; color: var(--ce-muted);
  display: inline-flex; align-items: center; gap: 5px;
}
.ce-chip i { color: #C4B5FD; }
.ce-chip.xp { background: rgba(255, 181, 71, 0.12); border-color: rgba(255, 181, 71, 0.3); color: var(--ce-amber); }
.ce-tasks-head {
  background: linear-gradient(135deg, rgba(45, 63, 231, 0.3), rgba(139, 92, 246, 0.2));
  border: 1px solid rgba(139, 92, 246, 0.3); border-radius: 18px; padding: 18px; margin-bottom: 14px;
}
.ce-tasks-head .t { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.ce-tasks-head .s { font-size: 11px; color: var(--ce-muted); }

@media (min-width: 900px) {
  .ce-rg { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .ce-cat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .ce-opp-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
  .ce-opp-list > .ce-opp { margin-bottom: 0; }
}

/* ----------------------------------------------------------------------------
   Forms (themed for dark surfaces) — used by the profile edit form
   -------------------------------------------------------------------------- */
.ce-form { display: block; }
.ce-fieldset { margin-bottom: 18px; }
.ce-legend {
  font-size: 11px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  color: #C4B5FD; margin: 6px 0 12px; display: flex; align-items: center; gap: 8px;
}
.ce-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ce-field { margin-bottom: 14px; }
.ce-field.col-2 { grid-column: span 2; }
.ce-label { display: block; font-size: 11px; font-weight: 700; color: var(--ce-muted); margin-bottom: 6px; }
.ce-input,
.ce-form select,
.ce-form textarea {
  width: 100%; background: rgba(0, 0, 0, 0.28); border: 1px solid var(--ce-border);
  border-radius: 11px; padding: 12px 14px; color: #fff; font-size: 13px; outline: none;
  font-family: inherit; transition: border-color 0.15s ease, background 0.15s ease;
}
.ce-input:focus,
.ce-form select:focus,
.ce-form textarea:focus { border-color: var(--ce-purple); background: rgba(0, 0, 0, 0.4); }
.ce-form select option { background: #14183F; color: #fff; }
.ce-input::placeholder { color: var(--ce-faint); }
.ce-file {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--ce-surface); border: 1px dashed var(--ce-border); border-radius: 11px;
  padding: 11px 14px; color: var(--ce-muted); font-size: 12px; font-weight: 600;
}
.ce-file input[type="file"] { display: none; }
.ce-thumb { width: 54px; height: 54px; border-radius: 12px; object-fit: cover; background: var(--ce-surface); border: 1px solid var(--ce-border); }
.ce-help { font-size: 10.5px; color: var(--ce-faint); margin-top: 5px; }
.ce-verify-banner {
  display: flex; align-items: center; gap: 10px; padding: 13px 15px; border-radius: 13px;
  font-size: 12px; font-weight: 600; margin-bottom: 16px;
}
.ce-verify-banner.ok { background: rgba(74, 222, 128, 0.12); border: 1px solid rgba(74, 222, 128, 0.3); color: #86EFAC; }
.ce-verify-banner.pending { background: rgba(255, 181, 71, 0.12); border: 1px solid rgba(255, 181, 71, 0.3); color: #FCD34D; }
.ce-form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ce-form-actions .ce-btn { width: auto; padding: 12px 22px; }

/* ----------------------------------------------------------------------------
   Auth / login pages (welcome: sign-in, register, reset, complete-reset)
   Scoped to .on-welcome so it only themes the public auth screens.
   -------------------------------------------------------------------------- */
.on-welcome {
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(139, 92, 246, 0.30), transparent 70%),
    radial-gradient(ellipse 70% 35% at 0% 60%, rgba(45, 63, 231, 0.25), transparent 60%),
    linear-gradient(180deg, #14183F 0%, #0B0E2C 60%, #06081C 100%) !important;
  color: var(--ce-text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", system-ui, sans-serif;
}
.on-welcome .on-welcome__form { display: flex; align-items: center; justify-content: center; padding: 28px 20px; }
.on-welcome .on-welcome__container { width: 100%; max-width: 420px; }
.on-welcome h1, .on-welcome h2, .on-welcome h3, .on-welcome h4,
.on-welcome .h1, .on-welcome .h2, .on-welcome .h3, .on-welcome .h4 { color: #fff; }
.on-welcome p, .on-welcome label, .on-welcome span, .on-welcome div { color: var(--ce-text); }
.on-welcome .color--gray, .on-welcome small { color: var(--ce-muted) !important; }
.on-welcome .on-welcome__form--container {
  background: rgba(255, 255, 255, 0.06); border: 1px solid var(--ce-border);
  border-radius: 20px; padding: 24px !important; backdrop-filter: blur(8px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}
.on-welcome input:not([type=checkbox]):not([type=radio]),
.on-welcome select,
.on-welcome textarea {
  width: 100%; background: rgba(0, 0, 0, 0.30) !important; border: 1px solid var(--ce-border) !important;
  border-radius: 11px; padding: 12px 14px; color: #fff !important; outline: none; margin-bottom: 6px;
  font-family: inherit; font-size: 14px;
}
.on-welcome input::placeholder, .on-welcome textarea::placeholder { color: var(--ce-faint); }
.on-welcome input:focus, .on-welcome select:focus, .on-welcome textarea:focus { border-color: var(--ce-purple) !important; background: rgba(0, 0, 0, 0.42) !important; }
.on-welcome select option { background: #14183F; color: #fff; }
.on-welcome .btn--primary {
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue)) !important;
  border: none !important; border-radius: 12px; color: #fff !important;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.3); font-weight: 700;
}
.on-welcome .btn--success {
  background: rgba(255, 255, 255, 0.08) !important; border: 1px solid var(--ce-border) !important;
  color: #fff !important; border-radius: 12px; font-weight: 700;
}
.on-welcome a { color: #C4B5FD; }
.on-welcome a:hover { color: #DDD6FE; }
.on-welcome .feedback--invalid { color: #FF8A8A; font-size: 12px; }
.on-welcome .input--invalid { border-color: var(--ce-pink) !important; }
.on-welcome .on-welcome__footer { color: var(--ce-muted) !important; }
.on-welcome a[href*="terms" i], .on-welcome .terms a { color: #C4B5FD; }
/* Right-hand hero image: subtle dark gradient overlay so it blends with the theme */
.on-welcome #sign-in-bg { position: relative; }
.on-welcome #sign-in-bg::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(11, 14, 44, 0.55), rgba(45, 63, 231, 0.25));
}

/* ----------------------------------------------------------------------------
   Giveaways (brandx raffle) — themed; reuses legacy on-lucky-timer* hooks
   so the existing countdown / slot / winner JS keeps working.
   -------------------------------------------------------------------------- */
.ce-gh {
  border-radius: 20px; padding: 22px; margin-bottom: 16px; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-pink));
}
.ce-gh-eb { font-size: 9px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.9; margin-bottom: 6px; }
.ce-gh-tt { font-size: 22px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 10px; }
.ce-gh-mt { display: flex; gap: 6px; flex-wrap: wrap; }
.ce-gv-chip { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.15); padding: 4px 10px; border-radius: 100px; font-size: 10px; font-weight: 700; }
.ce-draw-card { background: var(--ce-surface); border: 1px solid var(--ce-border); border-radius: 18px; padding: 26px 18px; text-align: center; margin-bottom: 14px; }
.ce-draw-label { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ce-muted); margin-bottom: 12px; }
.ce-content .on-lucky-timer__time { font-size: 32px; font-weight: 800; letter-spacing: -0.01em; color: #fff; line-height: 1.2; }
.ce-content .on-lucky-timer__name { font-size: 24px; font-weight: 800; color: var(--ce-green); }
.ce-content .on-lucky-timer__number { font-size: 15px; color: var(--ce-muted); font-family: "SF Mono", Menlo, Consolas, monospace; margin-top: 6px; }
.ce-bulleting { background: rgba(255, 181, 71, 0.12); border: 1px solid rgba(255, 181, 71, 0.3); border-radius: 14px; padding: 13px 16px; margin-bottom: 14px; font-size: 12px; line-height: 1.5; color: var(--ce-text); }
.ce-bulleting .lbl { color: var(--ce-amber); font-weight: 800; font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; display: block; margin-bottom: 5px; }
.ce-next-client { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin: 10px auto 0; display: block; border: 3px solid rgba(255, 255, 255, 0.12); }
#on-confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 60; }

/* ----------------------------------------------------------------------------
   Bottom nav (mobile)
   -------------------------------------------------------------------------- */
.ce-bottomnav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  padding: 12px 14px; padding-bottom: calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent 0%, rgba(11, 14, 44, 0.85) 30%, var(--ce-bg) 60%);
}
.ce-nb {
  height: 58px; background: rgba(20, 24, 63, 0.95); border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px; display: grid; grid-template-columns: 1fr 1fr 58px 1fr 1fr;
  align-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); max-width: 480px; margin: 0 auto;
}
.ce-ni {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--ce-muted); font-size: 8.5px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
}
.ce-ni.is-active { color: #fff; }
.ce-ni.is-active .ce-ni-bg { background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue)); }
.ce-ni-bg { width: 32px; height: 24px; border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.ce-ns {
  width: 54px; height: 54px; border-radius: 18px;
  background: linear-gradient(135deg, var(--ce-purple), var(--ce-blue));
  margin: 0 auto; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(139, 92, 246, 0.5); transform: translateY(-12px);
}

/* ----------------------------------------------------------------------------
   "More" bottom sheet (mobile)
   -------------------------------------------------------------------------- */
.ce-more-backdrop {
  position: fixed; inset: 0; background: rgba(6, 8, 28, 0.6); backdrop-filter: blur(3px);
  z-index: 55; opacity: 0; pointer-events: none; transition: opacity 0.2s ease;
}
.ce-more-backdrop.open { opacity: 1; pointer-events: auto; }
.ce-more-sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  background: #14183F; border-top: 1px solid var(--ce-border);
  border-radius: 24px 24px 0 0; padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(110%); transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.5);
}
.ce-more-sheet.open { transform: translateY(0) !important; }
.ce-more-handle { width: 40px; height: 4px; border-radius: 100px; background: rgba(255, 255, 255, 0.22); margin: 4px auto 14px; }
.ce-more-title { font-size: 13px; font-weight: 800; margin: 0 4px 12px; }
.ce-more-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.ce-more-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 4px; border-radius: 15px; background: var(--ce-surface); border: 1px solid var(--ce-border);
  color: var(--ce-text); font-size: 9.5px; font-weight: 600; text-align: center;
}
.ce-more-item i { font-size: 17px; color: #C4B5FD; }
.ce-more-item:active { background: rgba(255, 255, 255, 0.14); }

@media (min-width: 900px) {
  .ce-more-backdrop, .ce-more-sheet { display: none !important; }
}

/* ----------------------------------------------------------------------------
   Side rail (desktop) — hidden on mobile
   -------------------------------------------------------------------------- */
.ce-rail { display: none; }

/* ----------------------------------------------------------------------------
   Flash alerts (partials/alerts) — themed for the member shell
   -------------------------------------------------------------------------- */
.ce-content .alert {
  border-radius: 14px; padding: 13px 16px; margin-bottom: 14px;
  font-size: 12.5px; font-weight: 600; border: 1px solid var(--ce-border);
}
.ce-content .alert--success { background: rgba(74, 222, 128, 0.12); border-color: rgba(74, 222, 128, 0.3); color: #86EFAC; }
.ce-content .alert--danger { background: rgba(255, 61, 138, 0.12); border-color: rgba(255, 61, 138, 0.3); color: #FF8A8A; }
.ce-content .alert ul { margin: 0; padding-left: 18px; }

/* ============================================================================
   Desktop / large viewports — bottom nav becomes a left rail, content widens
   ========================================================================== */
@media (min-width: 900px) {
  .ce-bottomnav { display: none; }

  .ce-rail {
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; width: var(--ce-rail-w);
    padding: 22px 16px; gap: 6px; z-index: 40;
    background: rgba(11, 14, 44, 0.72);
    border-right: 1px solid var(--ce-border);
    backdrop-filter: blur(14px);
    overflow-y: auto;
  }
  .ce-rail-logo { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
  .ce-rail-logo img { height: 40px; width: auto; }
  .ce-rail-logo span { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }

  .ce-rail-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 13px;
    border-radius: 12px; color: var(--ce-muted); font-size: 13.5px; font-weight: 600;
    transition: background 0.15s ease, color 0.15s ease;
  }
  .ce-rail-link i { width: 20px; text-align: center; font-size: 15px; }
  .ce-rail-link:hover { background: var(--ce-surface); color: #fff; }
  .ce-rail-link.is-active {
    color: #fff; background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(45, 63, 231, 0.9));
    box-shadow: 0 6px 16px rgba(45, 63, 231, 0.3);
  }
  .ce-rail-spacer { flex: 1; }
  .ce-rail-foot { padding: 12px 10px 0; font-size: 10px; color: var(--ce-faint); border-top: 1px solid var(--ce-border); }

  .ce-main { margin-left: var(--ce-rail-w); }

  .ce-content { max-width: 1080px; padding: 24px 40px 60px; }

  /* On desktop the mobile top bar's greeting still shows, actions on the right */
  .ce-topbar { padding: 8px 0 22px; }

  /* Home: hero + feed side by side on wide screens */
  .ce-home-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 24px; align-items: start; }
  .ce-home-grid > * { min-width: 0; }

  /* Profile centers in a comfortable column */
  .ce-profile-wrap { max-width: 720px; margin: 0 auto; }
}

@media (min-width: 1280px) {
  .ce-content { max-width: 1180px; }
}
