:root{
  --bg: #0b0f17;
  --bg2:#0a0d14;

  --text:#e9eefc;
  --muted:#9aa7c2;

  --card: rgba(255,255,255,0.06);
  --card2: rgba(255,255,255,0.08);

  --border: rgba(255,255,255,0.10);
  --border2: rgba(255,255,255,0.16);

  --shadow: 0 10px 30px rgba(0,0,0,0.40);

  --blue:#2f7dff;
  --blue2:#5aa2ff;

  --glass: blur(14px);
  --radius: 18px;
  --radius2: 22px;

  --max: 900px;
  --navH: 68px;

  --primary: var(--blue2);
  --primaryHover: rgba(47,125,255,0.35);

  --blur: blur(20px);
  --glassOld: rgba(255,255,255,0.018);
  --panel: rgba(255,255,255,0.022);
  --panelBorder: rgba(255,255,255,0.08);
  --radiusOld: 14px;
}

*{ box-sizing:border-box; margin:0; padding:0; }
html{
  scroll-behavior:smooth;
  min-height:100%;
  background:#0a0d14;
}
a{ color: inherit; text-decoration:none; }

/* SCROLLBAR */
html {
  scrollbar-width: thin;
  scrollbar-color: rgba(30,35,55,0.9) #0b0f17;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #0b0f17; }
::-webkit-scrollbar-thumb {
  background: rgba(30,35,55,0.9);
  border: 2px solid #0b0f17;
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(40,48,72,0.95); }
::-webkit-scrollbar-corner { background: #0b0f17; }

body{
  min-height:100vh;
  font-family:'Inter',sans-serif;
  color: var(--text);
  background-color: var(--bg2);
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(47,125,255,0.18), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(90,162,255,0.10), transparent 55%),
    radial-gradient(900px 700px at 50% 110%, rgba(47,125,255,0.10), transparent 60%),
    linear-gradient(180deg, var(--bg), var(--bg2));
  background-repeat:no-repeat;
  opacity:0;
  transform: translateY(10px) scale(0.985);
  animation: pageLoad .55s cubic-bezier(.2,.8,.2,1) forwards;
}
@keyframes pageLoad { to{opacity:1; transform: translateY(0) scale(1);} }

.container{
  width: min(var(--max), calc(100% - 40px));
  margin:auto;
}

/* ✅ NAVBAR FULL-WIDTH WRAPPER */
.nav-shell{
  width: calc(100% - 40px);
  margin: 0 auto;
}

/* =========================
   NAVBAR + HAMBURGER + PROFILE DROPDOWN
   ========================= */
.nav-holder{ height: var(--navH); }

.navbar{
  position: fixed;
  top:0; left:0; right:0;
  height: var(--navH);
  z-index: 50;
  border-bottom: 1px solid rgba(255,255,255,0.10);
  background: rgba(10,13,20,0.55);
  backdrop-filter: var(--glass);
  -webkit-backdrop-filter: var(--glass);
}
.nav-content{
  display:flex;
  align-items:center;
  height:100%;
  gap:14px;
  position: relative;
}

/* Flex wrapper for right-side nav elements */
.nav-right{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}

.logo{
  display:flex;
  align-items:center;
  gap:10px;
  font-family:'Poppins',sans-serif;
  font-size:1.2rem;
  font-weight:800;
  letter-spacing:.6px;
  margin-right:auto;
  user-select:none;
  white-space:nowrap;
  cursor:pointer;
}
.logo-badge{
  width:34px;height:34px;
  border-radius:10px;
  background: linear-gradient(135deg, rgba(47,125,255,0.9), rgba(90,162,255,0.65));
  box-shadow: 0 10px 22px rgba(47,125,255,0.18);
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,0.15);
}
.logo-badge i{ font-size:15px; color:#eaf2ff; }
.logo .accent{ color: var(--blue2); }

nav{
  display:flex;
  gap:8px;
  align-items:center;
}
nav a{
  position:relative;
  padding:9px 12px;
  border-radius:12px;
  color: var(--muted);
  font-weight:800;
  font-size:13.5px;
  transition:160ms ease;
}
nav a:hover{
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.actions{
  display:flex;
  gap:10px;
  align-items:center;
}

/* Buttons */
.btn-primary{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
  transition: 160ms ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-primary:hover{
  transform: translateY(-1px);
  border-color: rgba(47,125,255,0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}
.btn-primary.primary{
  background: rgba(47,125,255,0.18);
  border-color: rgba(47,125,255,0.35);
}

.btn-secondary{
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  padding: 10px 13px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 13px;
  cursor:pointer;
  transition: 160ms ease;
  display:inline-flex;
  align-items:center;
  gap:8px;
}
.btn-secondary:hover{
  transform: translateY(-1px);
  border-color: rgba(47,125,255,0.35);
  box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* ✅ Notifications bell (signed-in only) */
.notifWrap{
  position: relative;
  display:none;
}
.notifBtn{
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
  position:relative;
}
.notifBtn i{ font-size:16px; }
.notifBtn:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.notifBtn:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}
.notifBadge{
  position:absolute;
  top:-4px; right:-4px;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  display:none;
  align-items:center;
  justify-content:center;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .2px;
  color: rgba(255,255,255,0.98);
  background: rgba(47,125,255,0.95);
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: 0 10px 18px rgba(47,125,255,0.20);
}
.notifBadge.show{ display:inline-flex; }

/* Hamburger */
.hamburger{
  display:none;
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor:pointer;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
  margin-left:auto;
}
.hamburger:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.hamburger:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}

/* Profile icon + dropdown */
.profileWrap{
  position: relative;
  display:none; /* shown via JS */
}
.profileBtn{
  width:42px;height:42px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.profileBtn:hover{
  border-color: rgba(47,125,255,0.35);
  box-shadow:0 10px 28px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}
.profileBtn:focus-visible{
  outline: 3px solid rgba(47,125,255,0.35);
  outline-offset:2px;
}
.profileMenu{
  position:absolute;
  right:0;
  top: calc(100% + 10px);
  min-width: 220px;
  background: rgba(10,13,20,0.90);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 16px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0,0,0,0.45);
  padding: 10px;
  display:none;
}
.profileMenu.open{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.profileMenu a, .profileMenu button{
  width:100%;
  text-align:left;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(74, 72, 72, 0.199);
  color: rgba(233,238,252,0.92);
  font-weight: 800;
  font-size: 13.5px;
  cursor:pointer;
  display:flex;
  align-items:center;
  gap:10px;
  transition:160ms ease;
}
.profileMenu a:hover, .profileMenu button:hover{
  border-color: rgba(47,125,255,0.28);
  color: var(--text);
}

/* mobile panel */
.mobilePanel{
  position:absolute;
  left:0; right:0;
  top: calc(var(--navH) - 2px);
  background: rgba(10,13,20,0.82);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display:none;
  padding: 12px 0 14px;
}
.mobilePanel.open{ display:block; }

.mobile-links{
  display:flex;
  flex-direction:column;
  gap:8px;
  padding:0 10px;
}
.mobile-links a{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(74, 72, 72, 0.199);
  color: rgba(233,238,252,0.92);
  font-weight: 800;
  font-size: 13.5px;
  transition: 160ms ease;
}
.mobile-links a:hover{
  color: var(--text);
  border-color: rgba(47,125,255,0.28);
}

.mobile-auth{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:6px;
}
.mobile-auth a{ width:100%; }

/* ✅ Notifications modal (MATCH TERMS STYLE) */
.notifModal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display:none;
  align-items:flex-start;
  justify-content:flex-start;
  padding: 0;
}
.notifModal.open{ display:flex; }
.notifBackdrop{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
@keyframes notifPop{
  0%{ opacity:0; transform: translateY(-6px) scale(0.985); }
  100%{ opacity:1; transform: translateY(0) scale(1); }
}
.notifPanel{
  position:absolute; /* positioned by JS */
  width: min(560px, calc(100% - 24px));
  max-height: min(74vh, 640px);
  background: rgba(10,13,20,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  box-shadow: 0 22px 60px rgba(0,0,0,0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  overflow:hidden;
  animation: notifPop 160ms ease forwards;
}
.notifHeader{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.notifHeader .title{
  font-family:Poppins, sans-serif;
  font-weight: 900;
  letter-spacing:-.2px;
  display:flex;
  align-items:center;
  gap:10px;
}
.notifHeader .right{
  display:flex;
  align-items:center;
  gap:10px;
}
.notifHeader .muted{
  color: rgba(154,167,194,0.92);
  font-weight: 800;
  font-size: 12.5px;
}
.notifAction{
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  padding: 9px 10px;
  border-radius: 12px;
  cursor:pointer;
  font-weight: 900;
  font-size: 12.5px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  transition:160ms ease;
}
.notifAction:hover{
  border-color: rgba(47,125,255,0.35);
  transform: translateY(-1px);
}
.notifAction[disabled]{
  opacity:.55;
  cursor:not-allowed;
  transform:none !important;
}
.notifClose{
  width:38px;height:38px;
  border-radius: 12px;
  border:1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: rgba(233,238,252,0.95);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  transition:160ms ease;
}
.notifClose:hover{
  border-color: rgba(47,125,255,0.35);
  transform: translateY(-1px);
}
.notifBody{
  padding: 10px 10px 12px;
  overflow:auto;
  overflow-y:auto;
  max-height: calc(min(74vh, 640px) - 56px);
  -webkit-overflow-scrolling: touch;
}
.notifList{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.notifItem{
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  border-radius: 16px;
  padding: 11px 11px;
  cursor:pointer;
  transition:160ms ease;
  display:flex;
  align-items:flex-start;
  gap:10px;
}
.notifItem:hover{
  border-color: rgba(47,125,255,0.25);
  background: rgba(47,125,255,0.07);
}
.notifDot{
  width:10px;height:10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.20);
  margin-top: 5px;
  flex: 0 0 auto;
}
.notifItem.unread .notifDot{
  background: rgba(47,125,255,0.95);
  box-shadow: 0 0 0 3px rgba(47,125,255,0.10);
}
.notifMain{
  flex: 1 1 auto;
  min-width: 0;
}
.notifText{
  font-weight: 900;
  color: rgba(233,238,252,0.95);
  line-height: 1.35;
}
.notifMeta{
  margin-top: 4px;
  color: rgba(154,167,194,0.90);
  font-size: 12px;
  font-weight: 800;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}
.notifEmpty{
  padding: 18px 10px;
  color: rgba(154,167,194,0.92);
  font-weight: 800;
  text-align:center;
}

/* =========================
   FORM AREA
   ========================= */
.header{ padding: 36px 0 18px; }

.breadcrumb{
  color: rgba(154,167,194,0.95);
  font-size: 13px;
  margin-bottom: 10px;
}
.breadcrumb a{
  color: rgba(154,167,194,0.95);
  text-decoration:none;
  font-weight:700;
}
.breadcrumb a:hover{ color: var(--blue2); }

.header h1{
  font-size: 2rem;
  letter-spacing: -.3px;
  font-weight: 800;
  font-family:'Poppins',sans-serif;
}

.card{
  margin-top: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 22px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 16px;
  box-shadow: 0 18px 55px rgba(0,0,0,0.20);
  position: relative;
  overflow: hidden;
}
.card::before{
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:0px;
  background: linear-gradient(180deg, rgba(47,125,255,0.95), rgba(90,162,255,0.65));
  transition: 160ms ease;
}
.card:hover::before{ width:4px; }

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.field label{
  display:block;
  font-size: 12px;
  color: rgba(154,167,194,0.95);
  margin-bottom: 6px;
  font-weight: 700;
}

.input, select, textarea{
  width:100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  outline:none;
  border-radius: 14px;
  padding: 12px;
  color: rgba(233,238,252,0.95);
  font-family:'Inter',sans-serif;
  transition: 160ms ease;
}
.input::placeholder, textarea::placeholder{ color: rgba(154,167,194,0.70); }
.input:focus, select:focus, textarea:focus{
  border-color: rgba(47,125,255,0.40);
  box-shadow: 0 0 0 4px rgba(47,125,255,0.12);
}

select{
  color: rgba(233,238,252,0.95) !important;
  background: rgba(10,13,22,0.92) !important;
}
select option{
  color: #111 !important;
  background: #fff !important;
}

textarea{
  min-height: 220px;
  resize: vertical;
  grid-column: 1 / -1;
}

.actionsRow{
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap:wrap;
}

.note{
  margin-top: 10px;
  color: rgba(154,167,194,0.92);
  font-size: 12px;
  line-height: 1.7;
}

.cooldownMsg{
  display:none;
  margin-top: 10px;
  color: rgba(255, 110, 110, 0.95);
  font-weight: 900;
  font-size: 13px;
  letter-spacing: .1px;
}
.cooldownMsg.show{
  display:block;
  animation: cooldownFade 8s ease forwards;
}
@keyframes cooldownFade{
  0%   { opacity:0; transform: translateY(-4px); }
  10%  { opacity:1; transform: translateY(0); }
  88%  { opacity:1; transform: translateY(0); }
  100% { opacity:0; transform: translateY(-4px); }
}

/* =========================
   FOOTER
   ========================= */
.footer{
  margin-top: 70px;
  padding: 20px 0 20px;
  font-size: 12.5px;
  border-top: 1px solid rgba(255,255,255,0.10);
  position: relative;
  background: linear-gradient(180deg, rgba(10,13,20,0.72), #0a0d14);
  overflow:hidden;
}
.footer::before{ display:none; }
.footer-content{
  display:flex;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  color: rgba(154,167,194,0.85);
}
.footer-content a{
  color: rgba(154,167,194,0.85);
  margin-left:12px;
  text-decoration:none;
  font-weight:800;
}
.footer-content a:hover{ color: var(--text); }

@media (min-width: 861px){
  body{
    background:
      radial-gradient(1200px 600px at 15% -10%, rgba(47,125,255,0.18), transparent 60%),
      radial-gradient(900px 500px at 85% 0%, rgba(90,162,255,0.10), transparent 55%),
      linear-gradient(180deg, var(--bg) 0%, var(--bg2) 72%, #0a0d14 100%);
    background-color:#0a0d14;
    background-repeat:no-repeat;
  }

  .footer{
    background:#0a0d14;
  }
}

/* Responsive */
@media (max-width: 860px){
  nav{ display:none; }
  .actions{ display:none !important; }
  /* ✅ Hamburger -> Bell -> Profile */
  .hamburger{ display:inline-flex; margin-left:0; order:1; }
  .notifWrap { order: 2; }
  .profileWrap { order: 3; }
  .markAllText { display: none; }
}

@media(max-width:680px){
  .grid{ grid-template-columns: 1fr; }

  /* Guarantees the modal is flawless and perfectly responsive on small screens */
  .notifPanel{
    position: fixed !important;
    top: calc(var(--navH) + 12px) !important;
    left: 12px !important;
    right: 12px !important;
    width: calc(100% - 24px) !important;
    max-width: none !important;
    max-height: calc(100vh - var(--navH) - 24px) !important;
  }
}
