:root {
  /* Existing variables */
  --background-color: #f8f9fa;
  --sidebar-bg-color: #f0f0f0;
  --sidebar-box-shadow-color: rgba(0, 0, 0, 0.1);
  --sidebar-color: #4d4d4d;
  --sidebar-hover-color: #e0e0e0;
  --collapse-icon-color: #ccc;
  --collapse-icon-hover-color: #000;
  --tooltip-bg-color: #000;
  --tooltip-text-color: #fff;

  /* Brand colors */
  --brand-primary: #2563eb;
  --brand-secondary: #4f46e5;
  --brand-accent: #7c3aed;
  --main-content-bg-color: #fff;
  --box-shadow-color: rgba(0, 0, 0, 0.15);
  --main-content-color: #000;
  --icons-color: #333;
  --selection-bg-color: #666;
  --selection-text-color: #f0f4ff;
  --divider-color: #eaeaea;
  --dropdown-menu-color: #333;
  --table-hover-bg-color: #f0f4ff;
  --dropdown-menu-bg: #fff;
  --dropdown-menu-hover: #f0f4ff;
  --dropdown-menu-text: #333;
  --dropdown-menu-divider: #eaeaea;

  /* About page specific variables */
  --primary-color: #2563eb;
  --secondary-color: #4f46e5;
  --accent-color: #7c3aed;
  --hero-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --section-spacing: 6rem;
  --card-bg: #ffffff;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  /* Shared feed / UI semantic tokens */
  --nzy-muted: #64748b;
  --nzy-primary: var(--brand-primary);
  --nzy-secondary: var(--brand-secondary);
  --nzy-accent: var(--brand-accent);
  --nzy-radius-sm: 6px;
  --nzy-radius-md: 12px;
  --nzy-radius-full: 999px;
  /* Input semantic tokens (light) */
  --input-bg: var(--main-content-bg-color);
  --input-border: var(--divider-color);
  --input-fg: var(--main-content-color);
  --input-placeholder: #6b7280;
  --input-placeholder-focus: #4b5563;
}

/* Dark Mode Variables */
body.dark-theme {
  --background-color: #181818;
  --sidebar-bg-color: #242424;
  --sidebar-box-shadow-color: rgba(255, 255, 255, 0.15);
  --sidebar-color: #e0e0e0;
  --sidebar-hover-color: #333;
  --collapse-icon-color: #888;
  --collapse-icon-hover-color: #fff;
  --tooltip-bg-color: #333;
  --tooltip-text-color: #ddd;
  --main-content-bg-color: #282828;
  --box-shadow-color: rgba(255, 255, 255, 0.15);
  --main-content-color: #e0e0e0;
  --icons-color: #ccc;
  --selection-bg-color: #f39c12;
  --selection-text-color: #fff;
  --divider-color: #444;
  --dropdown-menu-color: #ddd;
  --table-hover-bg-color: #1a1f28;
  /* Extended contrast tokens */
  --text-strong: #ffffff;
  --text-normal: #e2e8f0;
  --text-soft: #cbd5e1;
  --text-faint: #94a3b8;
  --action-muted: #dbe2ea;
  --accent-link: #93c5fd;
  --accent-link-hover: #bfdbfe;
  --surface-elev-1:#2e2e2e;
  --surface-elev-2:#333333;
  /* Input semantic tokens (dark) */
  --input-bg: #2b2f33;
  --input-border: #3d4349;
  --input-fg: #f1f5f9;
  --input-placeholder: #94a3b8;
  --input-placeholder-focus: #cbd5e1;
}

/* Dark theme helpers */
body.dark-theme, body.dark-theme .dark-inherit { color: var(--text-normal); }
body.dark-theme a { color: var(--accent-link); }
body.dark-theme a:hover { color: var(--accent-link-hover); }
body.dark-theme .text-strong { color: var(--text-strong)!important; }
body.dark-theme .text-soft { color: var(--text-soft)!important; }
body.dark-theme .text-faint { color: var(--text-faint)!important; }
body.dark-theme .muted-label { color: var(--text-soft); }
body.dark-theme .btn, body.dark-theme button { color:#fff; }

/* Feed global mapping (no need to inline overrides inside template) */
body.dark-theme #news-feed .nzy-meta,
body.dark-theme #news-feed .nzy-reaction-row,
body.dark-theme #news-feed .nzy-stats,
body.dark-theme #news-feed .nzy-loader,
body.dark-theme #news-feed .nzy-empty { color: var(--text-normal)!important; }
body.dark-theme #news-feed .nzy-comp-note,
body.dark-theme #news-feed .nzy-chat-empty,
body.dark-theme #news-feed .nzy-disclaimer,
body.dark-theme #news-feed .nzy-backend-note { color: var(--text-strong)!important; }
body.dark-theme #news-feed .nzy-action-btn,
body.dark-theme #news-feed .nzy-yc-actions button { color: var(--action-muted)!important; }
body.dark-theme #news-feed .nzy-action-btn:hover,
body.dark-theme #news-feed .nzy-yc-actions button:hover { color: var(--text-strong)!important; }
body.dark-theme #news-feed .nzy-link-inline { color: var(--accent-link)!important; }
body.dark-theme #news-feed .nzy-link-inline:hover { color: var(--accent-link-hover)!important; }
body.dark-theme #news-feed .nzy-comment-composer input,
body.dark-theme #news-feed .nzy-reply-composer input { color: var(--text-strong)!important; background: var(--surface-elev-1)!important; border-color: var(--divider-color)!important; }
/* Dark theme footer & global minor contrast fixes */
body.dark-theme #footer, body.dark-theme #footer * { color: var(--text-strong)!important; }
/* Elevate any faint small legal / note text inside footer */
body.dark-theme #footer .muted, body.dark-theme #footer .note, body.dark-theme #footer small { color: var(--text-normal)!important; }
/* Mobile actions readability in dark mode */
body.dark-theme .mobile-actions .nav-join,
body.dark-theme .mobile-actions .nav-signin { color: #fff!important; }
body.dark-theme .mobile-actions .nav-join { border-color: var(--accent-border-strong); }
body.dark-theme .mobile-actions .nav-join:hover { background: rgba(255,255,255,0.08); color: var(--accent-link-hover)!important; }

/* Feed action + YouTube-style actions: unified interactive states */
#news-feed .nzy-action-btn,
#news-feed .nzy-yc-actions button { position: relative; transition: color .25s ease, background-color .25s ease; }

/* Light theme hover */
#news-feed .nzy-action-btn:hover,
#news-feed .nzy-yc-actions button:hover { background: rgba(0,0,0,0.04); border-radius: 6px; }

/* Active/pressed (mouse down) */
#news-feed .nzy-action-btn:active,
#news-feed .nzy-yc-actions button:active { background: rgba(0,0,0,0.07); }

/* Active via .is-active class (e.g., toggled reactions) */
#news-feed .nzy-action-btn.is-active,
#news-feed .nzy-yc-actions button.is-active { color: var(--nzy-primary)!important; }

/* Dark theme hover/active backgrounds */
body.dark-theme #news-feed .nzy-action-btn:hover,
body.dark-theme #news-feed .nzy-yc-actions button:hover { background: rgba(255,255,255,0.07); }
body.dark-theme #news-feed .nzy-action-btn:active,
body.dark-theme #news-feed .nzy-yc-actions button:active { background: rgba(255,255,255,0.12); }
body.dark-theme #news-feed .nzy-action-btn.is-active,
body.dark-theme #news-feed .nzy-yc-actions button.is-active { color: var(--accent-link-hover)!important; }

/* Focus accessibility ring (keyboard navigation) */
#news-feed .nzy-action-btn:focus-visible,
#news-feed .nzy-yc-actions button:focus-visible,
.mobile-actions .nav-join:focus-visible,
.mobile-actions .nav-signin:focus-visible { outline: 2px solid var(--nzy-primary); outline-offset: 2px; }
body.dark-theme #news-feed .nzy-action-btn:focus-visible,
body.dark-theme #news-feed .nzy-yc-actions button:focus-visible,
body.dark-theme .mobile-actions .nav-join:focus-visible,
body.dark-theme .mobile-actions .nav-signin:focus-visible { outline: 2px solid var(--accent-link-hover); }
/* Light theme feed clarity (ensure buttons not too faint) */
#news-feed .nzy-action-btn{color:#334155!important;}
#news-feed .nzy-action-btn i{color:#475569!important;}
#news-feed .nzy-yc-actions button{color:#475569!important;}
#news-feed .nzy-yc-actions button i{color:#475569!important;}
#news-feed .nzy-action-btn:hover,#news-feed .nzy-yc-actions button:hover{color:var(--nzy-primary)!important;}
#news-feed .nzy-action-btn:hover i,#news-feed .nzy-yc-actions button:hover i{color:var(--nzy-primary)!important;}
/* Preserve explicit color on light theme even when adding bg hover above */
#news-feed .nzy-action-btn:hover i,#news-feed .nzy-yc-actions button:hover i{color:var(--nzy-primary)!important;}

*::selection {
  background-color: var(--selection-bg-color);
  color: var(--selection-text-color);
}

body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  background-color: var(--background-color);
  font-family: 'Times New Roman', Times, serif;
}

/* Scrollable page styles */
body.page-scrollable {
  overflow: auto !important;
  height: auto !important;
}


/* Inputs and Textareas */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="file"],
input[type="datetime-local"],
textarea,
select {
  background-color: var(--input-bg) !important;
  color: var(--input-fg);
  border: 1px solid var(--input-border);
  border-radius: 25px;
  /* pill-like, nursezy style */
  padding: 20px 32px;
  /* bigger height */
  font-size: 16px;
  /* more readable */
  height: 50px;
  /* uniform input height */
  box-shadow: 0 1px 3px var(--box-shadow-color);
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
  border-color: #0a66c2;
  /* nursezy blue */
  outline: none;
  box-shadow: 0 0 5px rgba(10, 102, 194, 0.3);
  background-color: var(--input-bg);
  color: var(--input-fg);
  border-color: var(--nzy-primary);
}

/* Checkboxes and Radio Buttons */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--icons-color);
  background-color: var(--sidebar-bg-color);
  border: 1px solid var(--divider-color);
  width: 18px;
  height: 18px;
  transition: all 0.3s ease;
}

input[type="checkbox"]:hover,
input[type="radio"]:hover {
  border-color: #0a66c2;
  background-color: var(--sidebar-hover-color);
}

/* Select Dropdowns */
select {
  -moz-appearance: none;
  -webkit-appearance: none;
  appearance: none;
  background-color: var(--main-content-bg-color);
  color: var(--main-content-color);
  border: 1px solid var(--divider-color);
  border-radius: 25px;
  padding: 12px 18px;
  font-size: 16px;
  box-shadow: 0 1px 3px var(--box-shadow-color);
  cursor: pointer;
}

select:hover {
  background-color: var(--sidebar-hover-color);
  color: var(--main-content-color);
}

select option {
  background-color: var(--main-content-bg-color);
  color: var(--main-content-color);
}

/* Buttons */
button {
  background-color: #0a66c2;
  /* nursezy blue */
  color: #fff;
  border: none;
  border-radius: 25px;
  /* pill button */
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  height: 48px;
  width: 100%;
  box-shadow: 0 1px 3px var(--box-shadow-color);
  transition: all 0.3s ease;
}

button:hover {
  background-color: #004182;
  color: #fff;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Disabled Inputs, Textareas, and Buttons */
input:disabled,
textarea:disabled,
select:disabled,
button:disabled {
  background-color: var(--divider-color);
  color: var(--main-content-color);
  border-color: var(--divider-color);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Placeholder Text */
input::placeholder,
textarea::placeholder {
  color: var(--input-placeholder);
  opacity: .85;
}
input:focus::placeholder, textarea:focus::placeholder{color:var(--input-placeholder-focus);opacity:.75;}

/* Feed composer / reply inputs adopt global tokens */
#news-feed .nzy-comment-composer input,
#news-feed .nzy-reply-composer input,
#news-feed textarea#nzyComposerText,
#news-feed .nzy-link-input input{
  background: var(--input-bg)!important;
  color: var(--input-fg)!important;
  border-color: var(--input-border)!important;
}
#news-feed .nzy-comment-composer input::placeholder,
#news-feed .nzy-reply-composer input::placeholder,
#news-feed textarea#nzyComposerText::placeholder,
#news-feed .nzy-link-input input::placeholder{color:var(--input-placeholder)!important;opacity:.85;}
#news-feed .nzy-comment-composer input:focus,
#news-feed .nzy-reply-composer input:focus,
#news-feed textarea#nzyComposerText:focus,
#news-feed .nzy-link-input input:focus{border-color:var(--nzy-primary)!important;}


/* Default link styles */
a {
  text-decoration: none;
  /* Ensure no text decoration by default */
  color: var(--main-content-color);
}

/* Hover effect for links */
a:hover {
  text-decoration: none;
  /* Ensure no text decoration on hover */
  color: var(--main-content-color);
  /* Change the text color on hover */
}

/* Sidebar & dropdown: make full row clickable without altering height */
.sidebar .menu .menu-item{position:relative}
.sidebar .menu .menu-item > a{
  display:flex;align-items:center;gap:.55rem; /* do not set padding/height here to preserve original row height */
  width:100%;text-decoration:none;color:inherit;
}
.sidebar .menu .menu-item > a i{width:1.2em;text-align:center}
.sidebar .menu .menu-item > a:hover{background:var(--sidebar-hover-color);border-radius:10px}
.sidebar .menu .menu-item.active > a{background:linear-gradient(90deg,var(--nzy-primary),var(--nzy-secondary));color:#fff;border-radius:10px}

/* Navbar dropdown menu: full width anchors, preserve native spacing */
.dropdown-menu li a{
  display:flex;align-items:center;gap:.5rem; /* no padding to keep existing height */
  width:100%;text-decoration:none;color:inherit;
}
.dropdown-menu li a i{width:1.1em;text-align:center}
.dropdown-menu li a:hover{background:var(--sidebar-hover-color);border-radius:8px}

/* Tooltip area */
.tooltip {
  position: relative;
  cursor: pointer;
}

.custom-tooltip {
  position: absolute;
  background-color: var(--tooltip-bg-color);
  color: var(--tooltip-text-color);
  padding: 4px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 10001;
  pointer-events: none;
}

.custom-tooltip::before {
  content: '';
  position: absolute;
  border-width: 5px;
  border-style: solid;
  border-color: transparent;
  z-index: 9999;
}

.custom-tooltip[data-position="top"]::before {
  border-top-color: var(--tooltip-bg-color);
  bottom: -10px;
  left: var(--custom-tooltip-arrow-offset, 50%);
  transform: translateX(-50%);
}

.custom-tooltip[data-position="bottom"]::before {
  border-bottom-color: var(--tooltip-bg-color);
  top: -10px;
  left: var(--custom-tooltip-arrow-offset, 50%);
  transform: translateX(-50%);
}

.custom-tooltip[data-position="left"]::before {
  border-left-color: var(--tooltip-bg-color);
  top: var(--custom-tooltip-arrow-offset, 50%);
  right: -10px;
  transform: translateY(-50%);
}

.custom-tooltip[data-position="right"]::before {
  border-right-color: var(--tooltip-bg-color);
  top: var(--custom-tooltip-arrow-offset, 50%);
  left: -10px;
  transform: translateY(-50%);
}

.icon-container i {
  font-size: 20px;
}

.icon-container {
  padding: 0.75rem;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.icon-container:hover {
  background: var(--sidebar-hover-color);
  transform: scale(1.05);
}

.item-container i {
  font-size: 20px;
}

.item-container {
  padding: 0.3rem;
  margin: 0.2rem;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.item-container:hover {
  background: var(--sidebar-hover-color);
  transform: scale(1.05);
}

.profile-container i {
  font-size: 20px;
}

.profile-container {
  padding: 0.3rem;
  margin: 0.2rem;
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  box-sizing: border-box;
  cursor: pointer;
}

.profile-container:hover {
  background: transparent;
  transform: scale(1.05);
}

/* Sidebar (mobile) profile: keep avatar + name horizontally stable */
    .sidebar .sidebar-profile.profile-container { display:flex; align-items:center; gap:.5rem; }
    .sidebar .sidebar-profile.profile-container > div:first-child { display:flex; align-items:center; }
    .sidebar .sidebar-profile .nzy-profile-avatar { width:28px; height:28px; border-radius:50%; object-fit:cover; display:block; }
    .sidebar .sidebar-profile .profile-name { display:flex; align-items:center; min-height:28px; }
    .sidebar .sidebar-profile .profile-name .nzy-profile-name,
    .sidebar .sidebar-profile .profile-name #sidebar-user-name { font-size:.85rem; font-weight:600; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:150px; line-height:1; }


/* The dropdown menu (Start here)
 * ========================= */
.dropdown-wrapper {
  position: relative;
  display: inline-block;
}

/* Trigger button (e.g., profile image) */
.dropdown-trigger {
  cursor: pointer;
}

/* Hidden dropdown menu by default */
.dropdown-menu {
  position: absolute;
  background-color: var(--main-content-bg-color);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: 15px;
  box-shadow: 0 4px 12px var(--box-shadow-color);
  display: none;
  min-width: 220px;
  z-index: 1000;
  padding: 15px;
  margin: 9px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Dropdown visible */
.dropdown-menu.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Menu item styles */
.dropdown-menu li {
  padding: 10px 25px;
  font-size: 14px;
  color: var(--dropdown-menu-color);
  cursor: pointer;
  list-style: none;
  white-space: normal;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  width: 100%;
}

.dropdown-menu li i {
  margin-right: 15px;
  font-size: 16px;
  color: var(--dropdown-menu-color);
}

/* Hover effect */
.dropdown-menu li:hover {
  background-color: var(--sidebar-hover-color);
  border-radius: 6px;


  /* small toast */
  .nzy-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #111;
    color: #fff;
    padding: 10px 14px;
    border-radius: 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: all 0.28s ease;
    z-index: 11000;
    font-size: 13px;
  }

  .nzy-toast.visible {
    opacity: 0.95;
    transform: translateY(0);
  }
}

/* Divider for specific items */
.dropdown-menu li.divider {
  border-top: 1px solid var(--divider-color);
  margin-top: 10px;
  padding-top: 10px;
}

/*padding for dropdown to avoid touching edges */
.dropdown-menu li:first-child {
  padding-top: 12px;
}

.dropdown-menu li:last-child {
  padding-bottom: 12px;
}

.dropdown-menu a {
  color: var(--dropdown-menu-color);
}

.dropdown-menu a:hover {
  text-decoration: none;
}


/* The dropdown menu (Ends here)
 * ========================= */


/* Sidebar and other elements */
#system-container {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar hidden state */
/* Sidebar default state */
.sidebar {
  width: 20%;
  color: var(--sidebar-color);
  background-color: var(--sidebar-bg-color);
  transition: width 0.9s, transform 0.9s;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Sidebar hidden state */
.sidebar.hidden {
  transform: translateX(-100%);
  width: 0;
}

.sidebar.hidden~#main-content {
  width: 100%;
}

/* Sidebar animation states */
.hide-sidebar {
  transition: all 1.3s ease-in-out;
  transform: translateX(-100%);
}

.show-sidebar {
  transition: all 1.3s ease-in-out;
  transform: translateX(0);
}

/* Hide button */
.hide-btn {
  position: absolute;
  top: 10px;
  right: 10px;
}

/* Sidebar sections */
.sidebar-top {
  height: 50px;
  flex-shrink: 0;
}

.sidebar-body {
  flex-grow: 1;
  overflow-y: auto;
}

.sidebar-bottom {
  height: 50px;
  flex-shrink: 48;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-profile .profile-name {
  font-size: 16px;
}

/* Main content container */
#main-content {
  display: flex;
  flex-direction: column;
  z-index: 99;
  height: 100vh;
  width: 80%;
  background: var(--main-content-bg-color);
  color: var(--main-content-color);
  overflow-y: auto;
  overflow-x: hidden;
}

/* Header styles (applicable to both headers) */
.header-large,
.header-small {
  flex-shrink: 0;
  background-color: var(--main-content-bg-color);
  box-shadow: 0 2px 4px var(--box-shadow-color);
  z-index: 500;
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
}

/* News Feed */
#news-feed {
  display: flex;
  flex-direction: column;
  /*align-items: center;*/
  /*justify-content: center;*/
  /*text-align: center;*/
  flex-grow: 1;
  padding: 2rem;
  margin-top: 15px;
}

/* Footer */
#footer {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background-color: var(--main-content-bg-color);
  z-index: 500;
}

/* Chat Container */
.chat-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--sidebar-bg-color);
  border-radius: 25px;
  box-shadow: 0 0 10px var(--sidebar-box-shadow-color);
  max-width: 801px;
  width: 100%;
  margin: 0 auto;
}

/* Chat Input Area */
#chat-input {
  flex-grow: 1;
  padding: 5px;
  border: none;
  resize: none;
  outline: none;
  height: 22px;
  /* Initial height (small) */
  max-height: 120px;
  /* Maximum height before scroll appears */
  overflow-y: hidden;
  /* Prevent scrolling when empty */
  background-color: transparent;
  line-height: 20px;
}

/* Chat Input Focus */
#chat-input:focus {
  border: none;
  outline: none;
  background-color: transparent;
  box-shadow: none;
}


/* Chat Icons */
.chat-icons {
  display: flex;
  gap: 10px;
  margin-left: 10px;
}

#attach-icon,
#send-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: #333;
}

/* ============================================
  COMPACT SCALING FOR NARROW SCREENS (< 412px)
  Goal: Keep the exact 412x915 look by proportionally
  scaling the visible content on smaller devices.
  Apply scaling to the whole body so the entire UI
  (including sidebars and overlays) compacts uniformly.
  ============================================ */

:root { --nzy-base-width: 412; --nzy-base-height: 915; --nzy-header-h: 56px; --nzy-footer-h: 0px; --nzy-header-gap: 14px; }
/* On dashboard, reserve space for footer height in height math */
body#nzy-dashboard-root { --nzy-footer-h: 56px; }

@media (max-width: 411px) {
  /* Prevent sideways scroll during scaling */
  html, body { overflow-x: hidden; overscroll-behavior-x: none; height: 100%; }

  /* Force main content to use width-driven compacted height (412→915 aspect) */
  #main-content {
    height: auto !important;
    min-height: calc((var(--nzy-base-height) * 100vw) / var(--nzy-base-width));
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Push feed to the bottom of the screen (width-projected viewport height minus header/footer + paddings) */
  #news-feed {
    min-height: calc(
      ((var(--nzy-base-height) * 100vw) / var(--nzy-base-width))
      - var(--nzy-header-h)
      - var(--nzy-header-gap)
      - var(--nzy-footer-h)
      - 2rem /* #news-feed vertical padding */
      - 15px /* existing margin-top */
    );
  }
    /* Ensure dashboard header/footer never move in compact mode */
    body#nzy-dashboard-root .header-large,
    body#nzy-dashboard-root .header-small {
      position: fixed !important;
      top: 0;
      left: 0;
      right: 0;
      z-index: 1100;
    }
    /* Offset main content for fixed header/footer */
    body#nzy-dashboard-root #main-content {
      /* Add a small visual gap below the fixed header */
      padding-top: calc(var(--nzy-header-h) + var(--nzy-header-gap)) !important;
      padding-bottom: var(--nzy-footer-h) !important;
    }


  /* Compute scale based on viewport width vs 412 baseline */
  body {
    --nzy-scale: calc(100vw / var(--nzy-base-width));
    /* Default: transform fallback (Firefox) */
    transform: scale(var(--nzy-scale));
    transform-origin: top left; /* anchor to left edge to avoid side gap */
    width: calc(100vw / var(--nzy-scale));
    min-height: calc(100vh / var(--nzy-scale));
    height: auto !important; /* override 100vh from generic rule */
    max-width: none;
    margin: 0;
    touch-action: pan-y; /* disable horizontal panning */
  }

  /* Prefer zoom on browsers that support it (keeps position:fixed true viewport) */
  @supports (zoom: 1) {
    body {
      transform: none !important;
      width: 100%; min-height: auto; height: auto !important; /* layout unaffected, visual scale only */
      zoom: var(--nzy-scale);
    }
    /* Under zoom, allow container to expand to the width-driven compact height so content isn't clipped */
    #system-container {
      height: auto !important;
      min-height: calc((var(--nzy-base-height) * 100vw) / var(--nzy-base-width));
      overflow: visible; /* do not clip inner scroll area */
    }
    #main-content { height: auto !important; min-height: calc((var(--nzy-base-height) * 100vw) / var(--nzy-base-width)); overflow-y: auto; overflow-x: hidden; }
    body#nzy-dashboard-root #footer { position: fixed !important; left:0; right:0; bottom:0; z-index:1000; }
  }

  /* Make sure sticky/footer areas don’t cause overflow */
  #footer { max-width: 100%; }

  /* For browsers without zoom, prevent clipping by fixed-height containers */
  @supports not (zoom: 1) {
    #system-container {
      height: auto !important;
      /* Use width-projected viewport height to avoid clipping under transform */
      min-height: calc((var(--nzy-base-height) * 100vw) / var(--nzy-base-width));
      overflow: visible; /* allow body to control scroll */
    }
    #main-content {
      height: auto !important;
      min-height: calc((var(--nzy-base-height) * 100vw) / var(--nzy-base-width));
      overflow: visible; /* avoid inner clipping */
    }
    /* Under transform fallback, use sticky to emulate fixed inside scaled container */
    body#nzy-dashboard-root #footer { position: sticky !important; left: 0; right: 0; bottom: 0; z-index: 1000; }
  }
}

/* Height-aware overrides: pick smaller of width/height fit */
/* Very short screens (<= 740px), e.g., Galaxy S8 360x740 */
@media (max-width: 411px) and (max-height: 740px) {
  body { --nzy-scale: 0.81; width: calc(100vw / var(--nzy-scale)); min-height: calc(100vh / var(--nzy-scale)); }
}

/* Short screens 741-800px (e.g., 360x800) */
@media (max-width: 411px) and (min-height: 741px) and (max-height: 800px) {
  body { --nzy-scale: 0.87; width: calc(100vw / var(--nzy-scale)); min-height: calc(100vh / var(--nzy-scale)); }
}

/* Moderate height 801-844px (e.g., 390x844) */
@media (max-width: 411px) and (min-height: 801px) and (max-height: 844px) {
  body { --nzy-scale: 0.92; width: calc(100vw / var(--nzy-scale)); min-height: calc(100vh / var(--nzy-scale)); }
}

/* Taller small phones 845-896px (e.g., 414x896) */
@media (max-width: 411px) and (min-height: 845px) and (max-height: 896px) {
  body { --nzy-scale: 0.96; width: calc(100vw / var(--nzy-scale)); min-height: calc(100vh / var(--nzy-scale)); }
}

/* Legacy iPhone 6/7/8 (375x667) extremely short */
@media (max-width: 380px) and (max-height: 680px) {
  body { --nzy-scale: 0.74; width: calc(100vw / var(--nzy-scale)); min-height: calc(100vh / var(--nzy-scale)); }
}

/* Footer behavior on large screens: use the base sticky setting defined above.
   Small-screen overrides (fixed or sticky-as-fallback) are scoped inside
   the max-width:411px media query below. */


/* Note container */
.note-container {
  display: flex;
  justify-content: center;
  font-size: 12px;
  color: #888;
}

.note-container p {
  margin: 0;
}

/* Question icon */
.question-icon {
  position: fixed;
  bottom: 24px;
  /* Adjust this to position it correctly */
  right: 16px;
  font-size: 20px;
  cursor: pointer;
  color: #888;
}

/* Media Queries for responsiveness */
@media (min-width: 769px) {

  /* Show large screen header and hide small screen header */
  .header-large {
    display: flex !important;
  }

  .header-small {
    display: none !important;
  }

  .sidebar .sidebar-bottom {
    display: flex !important;
    /* Show the sidebar-bottom */
  }

  .sidebar .sidebar-profile {
    display: none !important;
    /* Completely hide the sidebar-profile{
 */
  }
}


/* Media Queries for Mobile Screen */
@media (max-width: 768px) {

  /* Hide the large screen sidebar by default */
  .sidebar {
    display: none;
    /* Completely hide the sidebar */
  }

  .sidebar .sidebar-bottom {
    display: none !important;
    /* Completely hide the sidebar-bottom */
  }

  /* Adjust the main content to take up the full screen */
  #main-content {
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
  }

  /* Show small screen header and hide large screen header */
  .header-small {
    display: flex !important;
  }

  .header-large {
    display: none !important;
  }

  /* mobile Sidebar */
  .sidebar .collapse-action {
    display: none;
    /* remove default close btn*/
  }

  .sidebar .mobile-collapse-action {
    display: block !important;
    /* add mobile sidebar close btn*/
  }

  .sidebar.mobile {
    width: 70%;
    color: var(--sidebar-color);
    background-color: var(--sidebar-bg-color);
    transform: translateX(-100%);
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    transition: width 0.9s, transform 0.9s;
    z-index: 1000;
    /* Ensure it is above other content */
    display: flex;
    flex-direction: column;
  }

  .sidebar.mobile.visible {
    transform: translateX(0);
  }

  /* Mobile Sidebar (Ends here) */

}

/*menu listing */
.sidebar-body .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* Menu Item */
.sidebar-body .menu-item {
  margin: 5px 0;
}

.sidebar-body .menu-item a {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: var(--main-content-color);
  text-decoration: none;
  font-size: 14px;
  border-radius: 6px;
  transition: background-color 0.3s ease, color 0.3s ease;
  width: 100%; /* make entire row clickable without changing height */
}

.sidebar-body .menu-item i {
  margin-right: 15px;
  font-size: 18px;
  color: var(--main-content-color);
  transition: color 0.3s ease;
}

/* Hover Effect */
.sidebar-body .menu-item a:hover {
  background-color: var(--sidebar-hover-color);
  color: #1967d2;
}

.sidebar-body .menu-item a:hover i {
  color: #1967d2;
}

/* Active Item */
.sidebar-body .menu-item.active a {
  background-color: #e8f0fe;
  color: #1967d2;
  font-weight: bold;
}

.sidebar-body .menu-item.active i {
  color: #1967d2;
}

/* --------------------------------------------
   Narrow-screen horizontal overflow safety net
   - Targets small iPhones (e.g., 6/7/8, SE) and similar widths
   - Keeps content from causing sideways scroll without altering layout intent
   -------------------------------------------- */
@media (max-width: 414px) {
  /* Belt-and-suspenders: ensure no horizontal scrolling due to subpixel rounding or vw usage */
  html, body { overflow-x: hidden !important; overscroll-behavior-x: none; }

  /* Clamp common containers to viewport width */
  #system-container, #main-content, .container, .nzy-grid-wrap, .nzy-profile-content, .page {
    max-width: 100% !important;
  }

  /* Prevent long URLs/words from forcing layout wide */
  p, h1, h2, h3, h4, h5, h6,
  .nzy-post-body, .nzy-post-text, .pp-body, .nzy-modal-body,
  .nzy-card, .nzy-feed-list, .nzy-feed-group {
    overflow-wrap: anywhere;
    word-break: break-word;
  }
}

/* Fullscreen Overlay loader */
.loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--background-color);
  /* AdSense uses a clean white background */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* Centered Logo */
.logo img {
  width: 150px;
  /* Adjust size as needed */
  animation: fadeIn 1s ease-in-out;
}

/* Top Progress Bar Container */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: #e0e0e0;
  /* Light gray background */
}

/* Blue Loading Progress */
.progress {
  width: 0;
  height: 100%;
  background-color: #4285f4;
  /* Google's signature blue */
  animation: load-progress 2s ease-out forwards;
}

/* Fade-in Animation for the Logo */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Progress Bar Animation */
@keyframes load-progress {
  to {
    width: 100%;
  }
}

/*custom-div design*/
.custom-div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px 15px;
  background-color: var(--background-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin-bottom: 5px;
}

.custom-div .item-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--sidebar-bg-color);
  border: 1px solid #ddd;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.custom-div .item-container:hover {
  background-color: var(--sidebar-hover-color);
  transform: scale(1.05);
}

.table-wrap {
  display: block;
  width: 100%;
  border-collapse: collapse;
  overflow-x: auto;
  overflow-y: hidden;
  /* Prevent vertical scrollbar when unnecessary */
  -webkit-overflow-scrolling: touch;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  background-color: var(--background-color);
  padding: 25px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  /* Ensure padding doesn't add to width */
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: auto;
}

.table th,
.table td {
  text-align: left;
  padding: 12px 16px;
  /* Consistent padding */
  border-bottom: 1px solid var(--divider-color);
}

.table th {
  background-color: var(--sidebar-hover-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
}

.table tr:hover {
  background-color: var(--table-hover-bg-color);
  backdrop-filter: blur(8px);
  /* Glass effect */
  -webkit-backdrop-filter: blur(8px);
  /* Glass effect for Safari */
}

.table tr:nth-child(even) {
  background-color: var(--sidebar-hover-color);
}

.table tr:last-child td {
  border-bottom: none;
}

/* Table */
table.dataTable {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
  font-family: 'Arial', sans-serif;
  color: var(--main-content-color);
  background-color: var(--background-color);
  overflow: hidden;
  /* Prevent unnecessary scrollbars */
}

table.dataTable thead th {
  background-color: var(--sidebar-hover-color);
  color: var(--main-content-color);
  text-align: left;
  padding: 10px 16px;
  /* Adjusted padding for consistency */
  border-bottom: 2px solid var(--divider-color);
  white-space: nowrap;
}

table.dataTable tbody tr {
  border-bottom: 1px solid var(--divider-color);
  transition: background-color 0.3s ease;
}

table.dataTable tbody tr:hover {
  background-color: var(--table-hover-bg-color);
  /* Highlight on hover */
  backdrop-filter: blur(8px);
  /* Glass effect */
  -webkit-backdrop-filter: blur(8px);
  /* Glass effect for Safari */
}

/* Table Cells */
table.dataTable td {
  padding: 10px;
  border-bottom: 1px solid var(--divider-color);
  white-space: pre-wrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

table.dataTable tfoot th {
  background-color: var(--background-color);
  color: var(--main-content-color);
  text-align: left;
  padding: 10px;
  border-top: 2px solid var(--divider-color);
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 10px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  display: inline-block;
  padding: 6px 12px;
  margin: 0 5px;
  color: var(--main-content-color);
  background-color: var(--divider-color);
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  background-color: var(--table-hover-bg-color);
  backdrop-filter: blur(8px);
  /* Glass effect */
  -webkit-backdrop-filter: blur(8px);
  /* Glass effect for Safari */
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background-color: #007bff;
  border-color: #0056b3;
}

/* Disabled button */
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
  background-color: var(--sidebar-hover-color);
  border-color: var(--divider-color);
  cursor: not-allowed;
}

/* Search Box */
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 10px;
  text-align: right;
}

.dataTables_wrapper .dataTables_filter label {
  font-weight: bold;
}

.dataTables_wrapper .dataTables_filter input {
  padding: 5px 10px;
  margin-left: 10px;
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  background-color: var(--background-color);
  color: var(--main-content-color);
  outline: none;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_filter input:focus {
  border-color: #007bff;
  background-color: var(--background-color);
}

/* Info Section */
.dataTables_wrapper .dataTables_info {
  margin-top: 10px;
  text-align: left;
}

/* Length Dropdown */
.dataTables_wrapper .dataTables_length {
  margin-bottom: 10px;
  text-align: left;
}

.dataTables_wrapper .dataTables_length select {
  padding: 5px 10px;
  border: 1px solid var(--divider-color);
  border-radius: 4px;
  background-color: var(--background-color);
  color: var(--main-content-color);
  outline: none;
  transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_length select:focus {
  border-color: #007bff;
}

/* Scrollbar (Optional for Scrollable Tables) */
.dataTables_scrollBody {
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--sidebar-hover-color) transparent;
}

.dataTables_scrollBody::-webkit-scrollbar {
  height: 8px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb {
  background-color: var(--sidebar-hover-color);
  border-radius: 4px;
}

.dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
  background-color: var(--table-hover-bg-color);
  backdrop-filter: blur(8px);
  /* Glass effect */
  -webkit-backdrop-filter: blur(8px);
  /* Glass effect for Safari */
}

/* Ensure horizontal scrolling when the table overflows */
.dataTables_wrapper table {
  overflow-x: auto;
  display: block;
  width: 100%;
  max-width: 100%;
}

@media (min-width: 768px) {
  .dataTables_wrapper .dataTables_length {
    margin-right: 20px;
  }

  .dataTables_wrapper .dataTables_filter {
    margin-left: 20px;
  }

  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    display: flex;
    align-items: center;
  }

  .dataTables_wrapper .dataTables_length label,
  .dataTables_wrapper .dataTables_filter label {
    margin: 0;
    font-weight: bold;
  }

  .dataTables_wrapper .dataTables_filter input {
    margin-left: 10px;
    padding: 5px 8px;
  }
}

/* Container for the switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  /* Adjusted width to accommodate the text */
  height: 25px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--sidebar-hover-color);
  transition: .4s;
  border-radius: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Center content inside */
  font-size: 12px;
  font-weight: bold;
  color: var(--main-content-color);
}

/* Text inside the slider */
.slider .off,
.slider .on {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.4s ease;
}

/* Position "Off" on the right side */
.slider .off {
  right: 10px;
}

/* Position "On" on the left side */
.slider .on {
  left: 10px;
}

/* The circle */
.slider:before {
  position: absolute;
  content: "";
  height: 19px;
  width: 19px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  z-index: 1;
  /* Ensure the circle is above the text */
}

/* Checked state */
input:checked+.slider {
  background-color: #66bb6a;
}

/* Move the circle when checked */
input:checked+.slider:before {
  transform: translateX(35px);
}

/* Show "On" when checked */
input:checked+.slider .on {
  opacity: 1;
  /* Make "On" visible */
}

/* Hide "Off" when checked */
input:checked+.slider .off {
  opacity: 0;
  /* Make "Off" invisible */
}

/* Show "Off" when unchecked */
input:not(:checked)+.slider .off {
  opacity: 1;
  /* Make "Off" visible */
}

/* Hide "On" when unchecked */
input:not(:checked)+.slider .on {
  opacity: 0;
  /* Make "On" invisible */
}

/* Centralize the content */
.content {
  text-align: center;
  padding: 20px;
  max-width: 600px;
  margin: 50px auto;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 2;
}

/* Title and Subtitle */
.content .title {
  font-size: 2rem;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.content .subtitle {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 20px;
}

/* Back to Homepage Button */
#backBtn {
  display: inline-block;
  padding: 10px 20px;
  font-size: 1rem;
  color: #fff;
  background-color: #007bff;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#backBtn:hover {
  background-color: #0056b3;
  transform: translateY(-3px);
}

#backBtn i {
  margin-right: 8px;
}

.thumbnail-box {
  width: 200px !important;
  height: 200px !important;
  border: 2px dashed #ced4da;
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  color: #6c757d;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.thumbnail-box input[type="file"] {
  display: none;
}

.thumbnail-box:hover {
  background-color: #e9ecef;
}

.thumbnail-preview {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.form-control {
  height: 30px !important;
  padding-bottom: 5 !important;
}

select.form-control {
  font-size: 0.8rem !important;
}

.form-label {
  color: var(--main-content-color) !important;
}

#gradeInput:focus {
  color: black;
}



/* Container for the input and the icon */
.password-wrapper {
  position: relative;
  /* Establish a positioning context for the icon */
}

/* Styling the input field */
.password-wrapper .form-control {
  width: 100%;
  /* Make the input full-width */
  padding-right: 40px;
  /* Add padding to make room for the icon */
  box-sizing: border-box;
  /* Ensure padding is included in the width */
}

.password-show:hover {
  color: var(--main-content-color);
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #666;
  transition: color 0.2s ease;
}

.password-wrapper .toggle-password:hover {
  color: #0a66c2;
}

/* Positioning the eye icon */
.password-show {
  position: absolute;
  /* Position relative to the wrapper */
  top: 50%;
  /* Center vertically */
  right: 10px;
  /* Position near the right edge */
  transform: translateY(-15%);
  /* Adjust for perfect centering */
  cursor: pointer;
  /* Indicate interactivity */
  color: var(--main-content-color);
  font-size: 1.2rem;
  /* Adjust icon size */
}

/* logo */
.force_logo {
  height: 60px;
  width: auto;
  display: block;
}

/*profile syntax styling*/
/* Adjusted Profile Card Styling */
.profile-card {
  background: var(--sidebar-bg-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.profile-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);
}

/* Profile Image */
.profile-img-container {
  display: flex;
  justify-content: center;
}

.profile-img {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 3px solid #ddd;
  object-fit: cover;
}

/* Section Headings Styling */
.details-section h6 {
  font-size: 16px;
  font-weight: bold;
  color: var(--main-content-color);
  background: var(--sidebar-bg-color);
  padding: 8px;
  border-radius: 5px;
  margin-top: 10px;
  margin-bottom: 5px;
}

/* Info Items */
.details-section .info-item {
  display: flex;
  margin-bottom: 5px;
}

.details-section .info-label {
  width: 120px;
  font-weight: bold;
  color: var(--main-content-color);
  margin-right: 10px;
}

.details-section .info-value {
  flex: 1;
  color: var(--main-content-color);
}

/* Horizontal Rule */
hr {
  margin: 10px 0;
}

/* Action Tags */
.tag-container {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.tag-container .tag {
  background: #007bff;
  color: #fff;
  padding: 5px 10px;
  border-radius: 5px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.tag-container .tag:hover {
  background: var(--sidebar-hover-color);
  transform: scale(1.05);
  cursor: pointer;
}

/* Specific Tag Colors (optional) */
.tag-container .tag:nth-child(2) {
  background: #6c757d;
}

.tag-container .tag:nth-child(3) {
  background: #28a745;
}

/* Mother container */
.toggle-section {
  background: var(--main-content-bg-color);
  border: 1px solid var(--divider-color);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  margin-bottom: 15px;
}

.toggle-section:hover {
  box-shadow: 0 8px 16px var(--box-shadow-color);
}

.toggle-section summary {
  list-style: none;
  padding: 15px;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  background: var(--sidebar-bg-color);
  border-bottom: 1px solid var(--divider-color);
}

.toggle-section summary i {
  margin-right: 10px;
  font-size: 20px;
  color: var(--icons-color);
}

.toggle-section summary::before {
  content: '\25BA';
  display: inline-block;
  margin-right: 10px;
  transition: transform 0.3s ease;
  color: var(--collapse-icon-color);
}

.toggle-section[open] summary::before {
  transform: rotate(90deg);
  color: var(--collapse-icon-hover-color);
}

.toggle-content {
  padding: 15px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease;
}

.toggle-section[open] .toggle-content {
  max-height: 1000px;
  /* Adjust if needed */
}

.info-item {
  margin-bottom: 10px;
  display: flex;
  flex-wrap: wrap;
}

.info-label {
  width: 150px;
  font-weight: bold;
  color: var(--main-content-color);
  margin-right: 10px;
}

/* Result Table Styles */
.result-table {
  background: var(--main-content-bg-color);
  margin: 20px auto;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 10px var(--box-shadow-color);
  max-width: 800px;
}

.result-title {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 15px;
  color: var(--main-content-color);
  text-align: center;
}

.result-title i {
  margin-right: 8px;
  font-size: 24px;
  vertical-align: middle;
  color: var(--icons-color);
}

.result-table table {
  width: 100%;
  border-collapse: collapse;
}

.result-table th,
.result-table td {
  padding: 12px 15px;
  border: 1px solid var(--divider-color);
  text-align: left;
  color: var(--main-content-color);
}

.result-table th {
  background: var(--sidebar-bg-color);
  font-weight: bold;
}

.result-table tr:nth-child(even) {
  background: var(--table-hover-bg-color);
}

.result-table tr:hover {
  background: var(--sidebar-hover-color);
  transition: background 0.3s ease;
}

/* ---------- NAVBAR: unified action button sizing & behavior ---------- */

/* Container layout */
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* Center icons */
.nav-center {
  display: flex;
  gap: 24px;
  align-items: center;
  flex-shrink: 0;
  /* prevent shrinking */
}

/* Dark theme styles for dropdown menu */
body.dark-theme {
  --dropdown-menu-bg: #1a1a1a;
  --dropdown-menu-text: #ffffff;
  --dropdown-menu-hover: #2d2d2d;
  --dropdown-menu-divider: #333333;
}

body.dark-theme .dropdown-menu {
  background-color: var(--dropdown-menu-bg);
  border-color: var(--dropdown-menu-divider);
}

body.dark-theme .dropdown-menu li a,
body.dark-theme .dropdown-menu li {
  color: var(--dropdown-menu-text);
}

body.dark-theme .dropdown-menu li:hover a,
body.dark-theme .dropdown-menu li:hover {
  background-color: var(--dropdown-menu-hover);
  color: var(--dropdown-menu-text);
}

body.dark-theme .dropdown-menu li.divider {
  border-top-color: var(--dropdown-menu-divider);
}

body.dark-theme .dropdown-menu li i {
  color: var(--dropdown-menu-text);
}

/* Nav items */
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: var(--icons-color);
  font-size: 18px;
  padding: 3px 6px;
}

.nav-item i {
  font-size: 20px;
  margin-bottom: 2px;
  color: var(--icons-color);
}

/* Faded borders only on "Get the app" */
.nav-center .nav-item.get-app {
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  padding: 0 16px;
}

.nav-item .nav-label {
  color: var(--main-content-color);
  font-size: 14px;
}

.nav-item:hover,
.nav-item:focus {
  color: #0a66c2;
}

.nav-item:hover i,
.nav-item:focus i {
  color: #0a66c2;
}

/* Right side actions */
.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  /* force single line */
}

/* ---------- Shared button base (applies to Join + Sign in) ---------- */
.nav-join,
.nav-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  min-height: 40px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  box-sizing: border-box;
  cursor: pointer;
  text-decoration: none;
}

/* Desktop Join now (glass base) */
.desktop-actions .nav-join {
  color: var(--brand-primary);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.25);
  transition: background .45s ease, color .35s ease, box-shadow .45s ease, transform .45s ease;
}

.desktop-actions .nav-join:hover {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 8px 26px -10px rgba(0, 0, 0, 0.45);
  transform: translateY(-2px);
  color: var(--brand-accent);
}

/* Desktop Sign in */
/* Updated to use About page gradient style language */
.desktop-actions .nav-signin {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  border: 1px solid var(--brand-primary);
  box-shadow: 0 6px 20px -8px rgba(0, 0, 0, 0.35);
  transition: background .45s ease, transform .45s ease, box-shadow .45s ease;
}

.desktop-actions .nav-signin:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.5);
}

/* Glass hover for Join now (desktop) using about page glass cues */
.desktop-actions .nav-join {
  background: transparent;
  border: none;
  position: relative;
  transition: background .45s ease, backdrop-filter .45s ease, color .3s ease;
}

.desktop-actions .nav-join:hover {
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px) saturate(140%);
  -webkit-backdrop-filter: blur(6px) saturate(140%);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--brand-primary);
}

/* ---------- Mobile ---------- */
.mobile-actions {
  display: none;
}

@media (max-width: 767px) {

  .nav-center,
  .desktop-actions {
    display: none !important;
  }

  .mobile-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 65%;
    padding: 0 16px;
    /* prevents hugging left edge */
  }

  .mobile-actions .nav-join,
  .mobile-actions .nav-signin {
    flex: 1 1 0;
    /* equal width */
    padding: 8px 12px;
    min-height: 44px;
    /* same height */
  }

  /* Mobile Join: keep outline for contrast, subtle glassy hover */
  .mobile-actions .nav-join {
    border: 1px solid var(--brand-primary);
    background: transparent;
    color: var(--brand-primary);
    transition: background .35s ease, color .35s ease, box-shadow .35s ease;
  }

  .mobile-actions .nav-join:hover {
    background: rgba(10, 102, 194, 0.10);
    box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.25);
    color: var(--brand-accent);
  }

  /* Mobile Explore (signin link): gradient parity with desktop */
  .mobile-actions .nav-signin {
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    color: #fff;
    border: 1px solid var(--brand-primary);
    box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.35);
    transition: transform .45s ease, box-shadow .45s ease;
  }

  .mobile-actions .nav-signin:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px -10px rgba(0, 0, 0, 0.5);
  }
}


/* sign in form area */
/* Headline Styling */
.signin-hero-title {
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* Large screen */
@media (min-width: 768px) {
  .signin-hero-title {
    font-size: 48px;
    /* big like LinkedIn */
  }
}

/* Mobile screen */
@media (max-width: 767px) {
  .signin-hero-title {
    font-size: 28px;
    /* reduced size for small screens */
    text-align: center;
    /* keep mobile centered */
  }
}

/* Floating label wrapper */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
}

.form-group input {
  width: 100%;
  border-radius: 25px;
  font-size: 16px;
}

/* Label initially hidden inside */
.form-group label {
  position: absolute;
  top: 50%;
  left: 18px;
  transform: translateY(-50%);
  font-size: 16px;
  color: #0a66c2;
  pointer-events: none;
  transition: all 0.2s ease;
  opacity: 0;
}

/* Show label when focused or filled */
.form-group input:focus+label,
.form-group input:not(:placeholder-shown)+label {
  top: -8px;
  left: 14px;
  font-size: 13px;
  font-weight: 500;
  color: #0a66c2;
  /* LinkedIn blue */
  opacity: 1;
  background: var(--main-content-bg-color);
  padding: 0 5px;
  border-radius: 4px;
}


/* Rounded input fields like nursezy buttons */
.rounded-input {
  border-radius: 25px;
  padding: 16px 16px;
  border: 1px solid #ccc;
  font-size: 1rem;
  width: 100%;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  /* soft depth */
  transition: all 0.2s ease;
}

.rounded-input:focus {
  border-color: #0a66c2;
  box-shadow: 0 2px 6px rgba(10, 102, 194, 0.25);
  /* nursezy blue glow */
  outline: none;
}

/* nursezy style button */
/* Upgraded to match navbar gradient CTA styling */
.btn-nursezy {
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
  color: #fff;
  border-radius: 25px;
  padding: 14px 18px;
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid var(--brand-primary);
  width: 100%;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.4);
  transition: background .45s ease, transform .45s ease, box-shadow .45s ease;
}

.btn-nursezy:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px -10px rgba(0, 0, 0, 0.55);
  color: #fff;
}

/* Secondary Button (nursezy-style) */
button.btn-secondary {
  background-color: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.6);
  border-radius: 25px;
  padding: 14px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  height: 48px;
  width: 100%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease;
}

button.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.05);
  border-color: #000;
  color: #000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Agreement text (small and centered) */
.form-footer {
  margin-top: 1.5rem;
  /* space after form */
  text-align: center;
  font-size: 12px;
  color: #666;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.4;
}

.form-footer a {
  font-weight: 600;
  color: #0a66c2;
  text-decoration: none;
}

.form-footer a:hover {
  text-decoration: underline;
}

/* Divider before "New to nursezy?" */
.form-footer-divider {
  margin: 2rem auto 0 auto;
  /* extra spacing above */
  padding-top: 1rem;
  max-width: 400px;
  border-top: 1px solid var(--divider-color);
  text-align: center;
  font-size: 14px;
  color: #666;
}

.form-footer-divider a {
  font-weight: 600;
  color: #0a66c2;
  /* LinkedIn blue */
  text-decoration: none;
}

.form-footer-divider a:hover {
  text-decoration: underline;
}


/* Hide illustration column on mobile */
@media (max-width: 767px) {
  .illustration-col {
    display: none !important;
  }
}

.img-fluid {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 100%;
  width: auto;
  /* prevent forced stretching */
}


/* ====== FOOTER STYLES ====== */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 22px 0;
  background: #f9f9f9;
  font-size: 14px;
  color: #666;
  width: 100%;
  overflow: hidden;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding: 0 15px;
}

/* Copyright */
.footer-copy {
  flex: 0 0 auto;
  font-weight: 500;
  color: #444;
}

/* Links */
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.footer-links a {
  text-decoration: none;
  color: #666;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: #0a66c2;
}

/* ====== Responsive ====== */
@media (max-width: 767px) {
  .site-footer {
    padding: 20px 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 10px;
  }

  .footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 15px;
    width: 100%;
    margin: 0 auto;
  }

  .footer-links a {
    font-size: 13px;
    white-space: nowrap;
  }

  .footer-copy {
    margin-top: 16px;
    order: 2;
    width: 100%;
    text-align: center;
  }
}

/* Override styles for Remember Me checkbox */
.remember-me input[type="checkbox"] {
  accent-color: var(--selection-bg-color);
  background-color: var(--main-content-bg-color);
  border: 1px solid var(--divider-color);
  width: 18px;
  height: 18px;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.remember-me input[type="checkbox"]:hover {
  border-color: var(--selection-bg-color);
  background-color: var(--sidebar-hover-color);
}

.remember-me label {
  display: flex;
  align-items: center;
  color: var(--main-content-color);
  font-size: 14px;
}

/* Notification Badge */
.icon-with-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-notify {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #dc2626; /* red-600 */
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--main-content-bg-color);
  transform: scale(0.6);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
  pointer-events: none;
}

.badge-notify[data-count]:not([hidden]) {
  opacity: 1;
  transform: scale(1);
}

.badge-notify.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  animation: notif-pulse 1.6s ease-out infinite;
  border: 2px solid rgba(220,38,38,0.5);
}

@keyframes notif-pulse {
  0% { transform: scale(1); opacity: .9; }
  70% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Role Badge & Plan Chip */
.nzy-role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.nzy-role-badge[data-role="admin"] {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.nzy-role-badge[data-role="moderator"] {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.nzy-role-badge[data-role="student"],
.nzy-role-badge[data-role="user"] {
  background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.nzy-plan-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
  color: #fff;
}

.nzy-plan-chip[data-plan="premium"],
.nzy-plan-chip[data-plan="pro"] {
  background: linear-gradient(135deg, #f6d365 0%, #fda085 100%);
}

.nzy-plan-chip[data-plan="free"],
.nzy-plan-chip[data-plan="basic"] {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
  color: #333;
}