@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap");

:root {
  --primary: #7a6ad8;
  --bg: #f6f5ff;
  --card: #ffffff;
  --text: #1e1e28;
  --muted: #6b6b83;
  --accent: #7a6ad8;
  --border: #e4e4ff;
  --shadow: 0 10px 22px rgba(122, 106, 216, .12);
}

/* Global */
* {
  box-sizing: border-box
}
 
html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: Poppins, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
}
 
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, #7a6ad8, #8a7fe2);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12)
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
 
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;              
  align-items: center;
}

.nav-menu li {
  margin: 0;
  padding: 0;
}

.nav-menu li a {
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.nav-menu li a:hover {
  background: rgba(255, 255, 255, 0.16);
  opacity: 0.95;
}

.nav-menu li a.active {
  background: rgba(255, 255, 255, 0.24);
}

/* ===== PROFILE IN NAV ===== */

.nav-menu .profile-li {
  position: relative;
}
.profile-trigger {
  background: transparent;
  border: none;
  color: #fff;
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;

  /* make font match the rest of the site */
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 500;
  line-height: 1;
}
/* Ensure profile popover text uses same font */
.profile-popover,
.profile-popover * {
  font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
  padding: 9px 14px;
}

.profile-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
  padding: 10px;
  display: none;
  z-index: 999;
  max-width: 90vw;
  box-sizing: border-box;
  max-height: calc(100vh - 80px);
  overflow-y: auto;
}

 
.profile-popover.show {
  display: block;
}

/* avatar + name row */
.profile-popover .who {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
 
.profile-popover .avatar-lg {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #7a6ad8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.profile-popover .name {
  font-weight: 600;
  color: #151521;
  font-size: 14px;
  line-height: 1.2;
}

/* clickable name */
/* Name link in popover */
.profile-popover .name-link {
  margin-left: -9px;
  font-weight: 600;
  font-size: 16px;
 color:#524694;
  text-decoration: none !important;
}
.profile-popover .name-link:hover {
  color: #7a6ad8;
  text-decoration: none;
}

/* menu list inside popover */
.profile-popover .menu {
  margin-top: 6px;
  border-top: 1px solid #eee;
  padding-top: 6px;
}

.profile-popover .menu .menu-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: #252525;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.profile-popover .menu .menu-link i {
  font-size: 16px;
}

.profile-popover .menu .menu-link:hover {
  background: #f5f4ff;
  color: #5b4dac;
}

/* Logout overlay */
.logout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.logout-card {
  background: #fff;
  padding-top: -10px;
  padding-bottom: 20px;
  border-radius: 10px;
  max-width: 320px;
  width: 90%;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.logout-card h3 {
margin-bottom: -10px;
  font-weight: 700;
}

.logout-card p {
  margin-bottom: 16px;

}

.logout-card .buttons {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.logout-card button {
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

#confirm-logout {
  background: #7a6ad8;
  color: #fff;
}

#cancel-logout {
  background: #e0e0e0;
  color: #222;
}

.hidden {
  display: none !important;
}

/* ===== END PROFILE STYLES ===== */

@media (max-width: 768px) {
  .nav-inner {
    padding: 12px 16px;
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-menu {
    margin-top: 8px;
    flex-wrap: wrap;
    gap: 10px;
  }
}

.logo {
  font-weight: 800;
  letter-spacing: .7px;
  margin-right: 14px;
  color: #fff;
  text-decoration: none;
  display: inline-block;
}

.logo:focus {
  outline: 2px solid rgba(255, 255, 255, .6);
  outline-offset: 2px;
}

.header-row {
  margin-top: 15px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}




.header-row h1 {
  margin: 0 auto;
  font-size: clamp(1.4rem, 2vw + 1rem, 2rem);
  font-weight: 700;
  text-align: center;
}


 
.logo:hover {
  opacity: .9;
}

.page-title {
  font-weight: 600;
  opacity: .95
}

header.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, var(--primary), #8a7fe2);
  color: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .12);
}

header .navwrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  gap: 16px;
  align-items: center;
}
 
header a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  opacity: .95;
}

header a:hover {
  opacity: 1;
}

.container {
  max-width: 1040px;       
  padding-bottom: 60px;
  margin: 24px auto 40px; 
}

h1 {
  font-size: 26px;
  margin: 0 0 10px;
  letter-spacing: .2px;
}

p.sub {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 14px;
}
 
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.input {
  flex: 1;
  display: flex;
  gap: 10px;
}

.input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  border: 1px solid var(--border);
  outline: none;
  font-family: inherit;
}

.input input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(122, 106, 216, .25);
}
 
.btn {
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 8px 18px rgba(122, 106, 216, .25);
}

.btn:hover {
  filter: brightness(1.03);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* was 240px */
  gap: 18px;                                                    /* a bit more space between cards */
  margin-top: 16px;
}

.cat {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: 0 4px 14px rgba(122, 106, 216, .10);
}

.cat h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.badge {
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: #f6f5ff;
}

a.link,
button.link {
  display: inline-block;
  text-decoration: none;
  color: var(--primary);
  border: 1px solid var(--primary);
  padding: 7px 12px;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}
                      
a.link:hover,
button.link:hover {
  background: #f3f0ff;
}

/* .empty {
  color: var(--muted);
  text-align: right;     
  padding: 28px 10px;
  font-size: 14px;
  white-space: nowrap;    
} */
 
.small {
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}

@media (max-width:600px) {
  .container {
    margin-top: 18px;
  }

  .card {
    padding: 14px;
  }
}

.confirm-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 40, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  backdrop-filter: blur(2px);
}

.confirm-backdrop.is-visible {
  display: flex;
}

.confirm-card {
  background: var(--card);
  border-radius: 18px;
  padding: 20px 22px;
  max-width: 360px;
  width: 100%;
  border: 1px solid var(--border);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .18);
}

.confirm-title {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.confirm-message {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--muted);
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f4f4ff;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
}

.btn-secondary:hover {
  background: #ebe9ff;
}

.btn-danger {
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid #7a6ad8;
  background: #7a6ad8;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 18px rgba(217, 83, 79, .25);
}

.btn-danger:hover {
  filter: brightness(1.03);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  padding: 10px 16px;
  background: #1e1e28;
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}


@media (max-width: 768px) {
  .header-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-row h1 {
    margin: 4px 0 0 8px;
    text-align: left;
  }
}
/* Mobile-specific tweak: center profile popover fully on small screens */
@media (max-width: 600px) {
  .nav-menu .profile-li .profile-popover {
    position: fixed;
    top: 72px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: calc(100vw - 32px);
    max-width: 360px;
  }
}
html, body {
  zoom: 1.12 !important;
}
 