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

/* Theme tokens */
:root {
  --primary: #7a6ad8;
  --bg: #fff;
  --bg-soft: #f6f5ff;
  --text: #1e1e28;
  --muted: #6b6b83;
  --border: #e9e7ff;
  --ring: rgba(122, 106, 216, .35);
}

/* Global reset */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
}

body {
  margin: 0;
  background: var(--bg-soft);
  color: var(--text);
  font-family: 'Poppins', sans-serif;
  line-height: 1.45;
  overflow-x: hidden;  /* stop sideways scrolling */
}

/* Nav */
.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);
}

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

.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);
}

@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;
}

.logo:hover {
  opacity: .9;
}

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

/* Layout */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 12px;
}

.card {
  margin-top: 50px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 20px rgba(122, 106, 216, .08);
  max-width: 100%;
  overflow: visible;  /* let content wrap instead of scrolling */
}

/* Rows */
.row {
  /* ❌ min-width removed */
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 12px 0;
}

.row + .row {
  border-top: 1px dashed var(--border);
}

.label {
  font-weight: 600;
}

label {
  font-weight: 400;
}

/* Inputs */
input[type="text"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: var(--text);
  font-family: 'Poppins', sans-serif;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--ring);
}

/* Options / inline layout */
.options {
  display: grid;
  gap: 10px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.hint {
  font-size: 12px;
  color: var(--muted);
}

.hidden {
  display: none !important;
}

/* Bottom Save */
.bottom-actions {
  display: flex;
  justify-content: center;
  padding: 10px 16px 16px;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
}

.btn-primary {
  border: 1px solid var(--border);
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .08);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 18px;
  right: 18px;
  background: #1f2335;
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .2);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .18s, transform .18s;
  font-weight: 600;
  font-size: 13px;
  z-index: 50;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE BREAKPOINTS ---------- */

/* Tablets */
@media (max-width: 900px) {
  .container {
    padding: 20px 16px 10px;
  }

  .row {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

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

  .container {
    padding: 16px 12px 10px;
  }

  .card {
    margin-top: 24px;
    padding: 16px;
  }

  .row {
    grid-template-columns: 1fr;   /* stack label + content */
    gap: 8px;
  }

  .inline {
    flex-direction: column;
    align-items: flex-start;
  }

  .label {
    font-size: 14px;
  }

  input[type="text"],
  input[type="number"],
  textarea {
    font-size: 14px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  body {
    font-size: 14px;
  }

  .card {
    padding: 14px;
  }
}

/* ================== Profile in access header ================== */

.nav-profile {
  position: relative;
}

/* Button that shows "avatar + Profile" */
.profile-trigger {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
}

.profile-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
  padding:6px 14px;
}
  
/* Small avatar in nav */
.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}

/* Popover card */
.profile-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 230px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
  padding: 10px;
  display: none;
  z-index: 40;
  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: 4px;
  margin-bottom: 8px;
}

.profile-popover .avatar-lg {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 17px;
}

/* Name text next to avatar */
.profile-popover .name-inline {
    margin-left:-8px;
  font-weight: 600;
  font-size: 18px;
  color:#524694;
  text-decoration: none;
}

.profile-popover .name-inline:hover {
  color: var(--primary);
  text-decoration: none;
}

/* Menu links */
.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: 8px;
  border: none;
  background: transparent;
  color: #252525;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
}

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

.profile-popover .menu .menu-link:hover {
  background: #f4f3ff;
  color: var(--primary);
}
 
/* 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;
}
html, body {
  zoom: 1.14 !important;
}
 