:root {
  --primary: #16a34a;
  --primary-light: #f0fdf4;
  --accent: #0f172a;
  --bg: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --nav-h: 60px;
  --bottom-nav-h: 64px;
  --nav-h-desktop: 64px;
  --radius: 18px;
  --shadow: 0 8px 28px rgba(22, 163, 74, 0.08);
  --danger-bg: #fee2e2;
  --danger-text: #dc2626;
  --danger-border: #e74c3c;
  --danger-hover-bg: #fecaca;
  --success-bg: #dcfce7;
  --success-text: #16a34a;
  --success-border: #22c55e;
  --warning-bg: #fef3c7;
  --warning-text: #d97706;
  --info-bg: #f0fdf4;
  --info-text: #15803d;
  --violet-bg: #f0fdf4;
  --violet-text: #166534;
  --pink-bg: #f8fafc;
  --pink-text: #334155;
  --slate-bg: #f8fafc;
  --slate-text: #475569;
  --toast-bg: #0f172a;
}

[data-theme="dark"] {
  --primary: #4ade80;
  --primary-light: rgba(74, 222, 128, 0.14);
  --accent: #4ade80;
  --bg: #090d16;
  --card: #111827;
  --text: #f8fafc;
  --muted: #94a3b8;
  --border: #1e293b;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.6);

  --danger-bg: #2a1010;
  --danger-text: #ff6b6b;
  --danger-border: #ff4444;
  --danger-hover-bg: #3a1515;
  --success-bg: #062817;
  --success-text: #4ade80;
  --success-border: #4ade80;
  --warning-bg: #2a1f05;
  --warning-text: #fbbf24;
  --info-bg: #0a2518;
  --info-text: #4ade80;
  --violet-bg: #0f231a;
  --violet-text: #86efac;
  --pink-bg: #1e293b;
  --pink-text: #cbd5e1;
  --slate-bg: #1e293b;
  --slate-text: #94a3b8;
  --toast-bg: #0f172a;
}

.theme-toggle-btn {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  box-shadow: none !important;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  transition: background 0.2s ease;
  color: var(--muted);
}

.theme-toggle-btn:hover {
  background: var(--primary-light) !important;
  color: var(--primary);
}

.theme-bulb-icon {
  display: block;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.theme-toggle-btn:active .theme-bulb-icon {
  transform: scale(0.85);
}

.theme-bulb-on {
  color: #f59e0b;
  filter: drop-shadow(0 0 4px rgba(245, 158, 11, 0.5));
}

[data-theme="dark"] .theme-toggle-btn {
  color: #f59e0b;
}

[data-theme="dark"] .theme-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.1) !important;
}

[data-theme="dark"] img {
  opacity: 0.95;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', sans-serif;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden !important;
}

body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  padding-top: var(--nav-h);
  padding-bottom: calc(var(--bottom-nav-h) + 16px);
  width: 100%;
  max-width: 100%;
  position: relative;
}

body.image-zoom-open {
  overflow: hidden;
}

.image-zoom-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7, 10, 24, 0.8);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.image-zoom-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.image-zoom-card {
  position: relative;
  width: min(92vw, 560px);
  max-height: min(86vh, 680px);
  padding: 12px;
  border-radius: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(0.94);
  transition: transform 0.2s ease;
}

.image-zoom-overlay.open .image-zoom-card {
  transform: scale(1);
}

.image-zoom-card img {
  width: 100%;
  max-height: min(78vh, 620px);
  object-fit: contain;
  border-radius: 16px;
  background: #050816;
}

.image-zoom-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  color: white;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.image-zoom-close:hover {
  background: rgba(15, 23, 42, 0.95);
}

.nav-avatar img,
.nav-icon-btn img,
.avatar img,
.profile-avatar img,
.chat-avatar img,
.list-avatar img,
.req-avatar img,
.avatar-circle img,
.avatar-preview img,
.user-card-avatar img {
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.nav-avatar img:hover,
.nav-icon-btn img:hover,
.avatar img:hover,
.profile-avatar img:hover,
.chat-avatar img:hover,
.list-avatar img:hover,
.req-avatar img:hover,
.avatar-circle img:hover,
.avatar-preview img:hover,
.user-card-avatar img:hover,
.nav-avatar img:focus-visible,
.nav-icon-btn img:focus-visible,
.avatar img:focus-visible,
.profile-avatar img:focus-visible,
.chat-avatar img:focus-visible,
.list-avatar img:focus-visible,
.req-avatar img:focus-visible,
.avatar-circle img:focus-visible,
.avatar-preview img:focus-visible,
.user-card-avatar img:focus-visible {
  transform: scale(1.03);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.16);
}

a {
  text-decoration: none;
  color: inherit;
}

.navbar {
  background: linear-gradient(90deg, #f8fdfa 0%, #ffffff 100%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.04);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 500;
  transition: background 0.2s ease, border-color 0.2s ease;
}

[data-theme="dark"] .navbar {
  background: rgba(17, 24, 39, 0.9);
}

.nav-inner {
  width: 92%;
  max-width: 1100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 6px 14px;
  background: var(--card, #ffffff);
  border: 1.5px solid var(--border, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.03);
  flex-shrink: 0;
  cursor: pointer;
}

.logo-text {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.4px;
  color: var(--text, #0f172a);
  line-height: 1;
}

.logo-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

[data-theme="dark"] .logo-link {
  background: var(--card, #111827);
  border-color: var(--border, #1e293b);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .logo-text {
  color: #f8fafc;
}

.nav-links {
  display: flex;
  gap: 2px;
  align-items: center;
  flex: 1;
  justify-content: center;
  min-width: 0;
}

.nav-pill-track {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: var(--bg);
  border-radius: 14px;
  border: 1px solid var(--border);
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}

.nav-pill-track::-webkit-scrollbar {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.nav-create-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #0f172a;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid rgba(22, 163, 74, 0.35);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  white-space: nowrap;
  min-height: 40px;
}

.nav-create-btn svg {
  color: #ffffff !important;
}

.nav-create-btn:hover {
  background: #16a34a;
  color: #ffffff !important;
  border-color: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.nav-create-btn:hover svg {
  color: #ffffff !important;
}

.nav-create-btn:active {
  transform: translateY(0);
}

.nav-create-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-account-dropdown {
  position: relative;
}

.nav-user-chip-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 999px;
  max-width: 180px;
  transition: background 0.2s;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  color: inherit;
}

.nav-user-chip-btn:hover,
.nav-account-dropdown.open .nav-user-chip-btn {
  background: var(--primary-light);
  border-color: var(--border);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  z-index: 210;
}

.nav-account-dropdown.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.2s, color 0.2s;
}

.nav-dropdown a:hover,
.nav-dropdown a.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-dropdown a.logout-link {
  color: var(--danger-text);
}

.nav-dropdown a.logout-link:hover {
  background: var(--danger-bg);
}

.nav-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 6px 8px;
}

.nav-chevron {
  font-size: 10px;
  color: var(--muted);
  transition: transform 0.2s;
  flex-shrink: 0;
}

.nav-account-dropdown.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 10px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-links a:hover {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-links a.active {
  background: var(--card);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nav-links a:focus-visible,
.mobile-menu a:focus-visible,
.bottom-nav a:focus-visible,
.hamburger:focus-visible,
.nav-icon-btn:focus-visible,
.nav-user-chip-btn:focus-visible,
.nav-create-btn:focus-visible,
.nav-dropdown a:focus-visible,
.mobile-menu-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  color: var(--muted);
  position: relative;
  transition: background 0.2s, color 0.2s;
}

.nav-icon-btn:hover,
.nav-icon-btn.active {
  background: var(--primary-light);
  color: var(--primary);
}

.nav-links a.logout-link {
  color: var(--danger-text);
}

.nav-links a.logout-link:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.nav-icon-btn.logout-link {
  color: var(--danger-text);
}

.nav-icon-btn.logout-link:hover {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.nav-text {
  margin-left: 2px;
}

.nav-mobile-actions {
  display: none;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.notif-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  display: none;
  pointer-events: none;
}

.notif-badge-menu {
  position: static;
  margin-left: auto;
  margin-right: 4px;
  min-width: 18px;
  height: 18px;
  font-size: 10.5px;
  border-radius: 9px;
  padding: 0 5px;
  animation: badgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes badgePop {
  from { transform: scale(0.5); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.hamburger {
  position: relative;
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  transition: background 0.2s;
  border: none;
  background: transparent;
  font-family: inherit;
}

.hamburger:hover {
  background: var(--primary-light);
}

.hamburger .hamburger-line {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 4px;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, background-color 0.2s ease;
  display: block;
  transform-origin: center;
}

.hamburger.open .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.open .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.notif-badge-hamburger {
  position: absolute;
  top: 0px;
  right: 0px;
  min-width: 16px;
  height: 16px;
  font-size: 10px;
  font-weight: 700;
  background: var(--primary);
  color: #ffffff;
  border-radius: 8px;
  padding: 0 4px;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 10;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  pointer-events: none;
}

.hamburger.open .notif-badge-hamburger {
  display: none !important;
  opacity: 0 !important;
  transform: scale(0) !important;
  pointer-events: none;
}

.nav-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.32s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.32s;
}

.nav-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(330px, 86vw);
  background: var(--card);
  box-shadow: none;
  border-left: 1px solid var(--border);
  z-index: 201;
  padding: calc(var(--nav-h) + 12px) 16px calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 20px);
  overflow-y: auto;
  transform: translate3d(calc(100% + 48px), 0, 0);
  will-change: transform, opacity;
  touch-action: manipulation;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.26s ease, box-shadow 0.32s ease, visibility 0.32s;
  -webkit-overflow-scrolling: touch;
  border-top-left-radius: 24px;
  border-bottom-left-radius: 24px;
}

.mobile-menu.open {
  transform: translate3d(0, 0, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.25);
}

@keyframes drawerItemSlide {
  from {
    opacity: 0;
    transform: translate3d(16px, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.mobile-menu.open .mobile-user-card {
  animation: drawerItemSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.04s both;
}

.mobile-menu.open .mobile-create-post-btn {
  animation: drawerItemSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.08s both;
}

.mobile-menu.open .mobile-menu-section {
  animation: drawerItemSlide 0.28s cubic-bezier(0.16, 1, 0.3, 1) 0.12s both;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 4px;
}

.mobile-menu-title {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.mobile-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  border-radius: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 52px;
  text-decoration: none;
}

.mobile-user-card:hover {
  background: var(--card);
  border-color: rgba(22, 163, 74, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
}

.mobile-user-card .nav-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--primary);
  flex-shrink: 0;
  background: var(--primary-light);
}

.mobile-user-card .nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mobile-user-meta {
  flex: 1;
  min-width: 0;
}

.mobile-user-meta strong {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-user-meta span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.mobile-user-arrow {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.2s ease, color 0.2s ease;
}

.mobile-user-card:hover .mobile-user-arrow {
  color: var(--primary);
  transform: translateX(2px);
}

.mobile-create-post-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 18px;
  background: linear-gradient(135deg, #16a34a 0%, #22c55e 100%);
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  border-radius: 14px;
  text-decoration: none;
  margin-bottom: 16px;
  box-shadow: 0 4px 18px rgba(22, 163, 74, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
}

.mobile-create-post-btn svg {
  color: #ffffff !important;
  transition: transform 0.2s ease;
}

.mobile-create-post-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.45);
}

.mobile-create-post-btn:hover svg {
  transform: rotate(-10deg) scale(1.1);
}

.mobile-create-post-btn:active {
  transform: translateY(0);
}

.mobile-menu-section {
  padding: 6px 0;
}

.mobile-menu-section+.mobile-menu-section {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 12px;
}

.mobile-menu-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 4px 8px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  text-decoration: none;
  color: var(--text);
  touch-action: manipulation;
  transition: background 0.15s ease, transform 0.1s ease;
  margin-bottom: 3px;
  -webkit-tap-highlight-color: transparent;
}

.mobile-menu-item:active,
.mobile-user-card:active,
.mobile-menu-item.item-navigating,
.mobile-user-card.item-navigating {
  transform: scale(0.97);
  opacity: 0.9;
  background: var(--primary-light);
}

.mobile-menu-item.item-navigating .menu-icon-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.menu-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.menu-item-text {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color 0.18s ease;
}

.menu-chevron {
  color: var(--muted);
  opacity: 0.5;
  flex-shrink: 0;
  transition: all 0.18s ease;
}

.mobile-menu-item:hover {
  background: var(--primary-light);
}

.mobile-menu-item:hover .menu-icon-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.mobile-menu-item:hover .menu-item-text {
  color: var(--primary);
}

.mobile-menu-item:hover .menu-chevron {
  color: var(--primary);
  opacity: 1;
  transform: translateX(2px);
}

.mobile-menu-item.admin-item .menu-icon-box {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
}

.mobile-menu-item.admin-item:hover {
  background: rgba(245, 158, 11, 0.1);
}

.mobile-menu-item.admin-item:hover .menu-icon-box {
  background: #f59e0b;
  color: #ffffff;
}

.mobile-menu-item.admin-item:hover .menu-item-text {
  color: #f59e0b;
}

.mobile-logout-item {
  color: var(--danger-text);
}

.mobile-logout-item .menu-icon-box {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-color: rgba(239, 68, 68, 0.2);
}

.mobile-logout-item .menu-item-text {
  color: var(--danger-text);
}

.mobile-logout-item:hover {
  background: var(--danger-bg);
}

.mobile-logout-item:hover .menu-icon-box {
  background: #ef4444;
  color: #ffffff;
}

.mobile-logout-item:hover .menu-item-text {
  color: var(--danger-text);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  background: #0f172a;
  color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  z-index: 10000;
  border: 1px solid var(--primary);
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

body.nav-open {
  overflow: hidden;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 480px;
  height: var(--bottom-nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border: 1px solid rgba(22, 163, 74, 0.2);
  border-radius: 22px;
  z-index: 200;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(22, 163, 74, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .bottom-nav {
  background: rgba(17, 24, 39, 0.92);
  border-color: rgba(74, 222, 128, 0.2);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 12px;
  border-radius: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 58px;
  min-height: 48px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav a:active:not(.bn-fab) {
  transform: scale(0.9);
  background: var(--primary-light);
}

.bottom-nav a .bn-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}

.bottom-nav a .bn-icon.bn-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.bottom-nav a.active .bn-icon.bn-avatar {
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.1);
}

.bn-profile-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.menu-icon.menu-avatar-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

.menu-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.bottom-nav a.active {
  color: var(--primary);
}

.bottom-nav a.active .bn-icon {
  transform: translateY(-2px) scale(1.1);
}

.bottom-nav a.bn-fab {
  position: relative;
  top: -14px;
  width: 52px;
  height: 52px;
  min-width: 52px;
  min-height: 52px;
  padding: 0;
  border-radius: 50%;
  background: #0f172a;
  color: #22c55e;
  border: 2px solid #22c55e;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  gap: 0;
  font-size: 0;
  transform: translateZ(0);
}

.bottom-nav a.bn-fab .bn-icon {
  font-size: 22px;
  color: #4ade80;
  transform: none;
}

.bottom-nav a.bn-fab:hover {
  background: #16a34a;
  color: white;
  box-shadow: 0 10px 28px rgba(22, 163, 74, 0.45);
}

.bottom-nav a.bn-fab:hover .bn-icon {
  color: white;
}

.bottom-nav a.bn-fab:active {
  transform: scale(0.9) translateY(-14px);
}

.bottom-nav .active-indicator {
  position: absolute;
  bottom: 4px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.bottom-nav a.active:not(.bn-fab) .active-indicator {
  opacity: 1;
}

.bottom-nav .notif-badge {
  top: 4px;
  right: 12px;
}

.container {
  width: 92%;
  max-width: 680px;
  margin: 24px auto;
  box-sizing: border-box;
}

#main-content {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

button,
.btn {
  background: #0f172a;
  color: white;
  border: 1px solid rgba(22, 163, 74, 0.4);
  padding: 10px 22px;
  border-radius: 12px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.1px;
}

button:hover,
.btn:hover {
  background: #16a34a;
  border-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.22);
}

button:active,
.btn:active {
  transform: translateY(0) scale(0.97);
}

.btn-primary {
  background: #16a34a;
  color: white;
  border: 1px solid #16a34a;
}

.btn-primary:hover {
  background: #15803d;
  border-color: #15803d;
  box-shadow: 0 8px 24px rgba(22, 163, 74, 0.3);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary-light);
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.08);
}

.btn-danger {
  background: var(--danger-text);
  border: 1px solid var(--danger-border);
}

.btn-danger:hover {
  background: #b91c1c;
  box-shadow: 0 8px 24px rgba(220, 38, 38, 0.25);
}

.btn-sm {
  padding: 6px 16px;
  font-size: 13px;
  min-height: 38px;
  border-radius: 10px;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15px;
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--text);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  -webkit-appearance: none;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.14);
  background: var(--card);
  transform: translateY(-1px);
}

input[type="file"] {
  font-size: 14px;
  padding: 10px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: var(--bg);
  width: 100%;
  cursor: pointer;
  transition: all 0.2s ease;
}

input[type="file"]:hover {
  border-color: var(--primary);
}

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

label {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--muted);
  display: block;
  margin-bottom: 8px;
}

.form-group {
  margin-bottom: 18px;
}

.card {
  background: var(--card);
  border-radius: 22px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 769px) {
  .card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.02);
  }

  [data-theme="dark"] .card:hover {
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);
  }
}

#toast-container {
  position: fixed;
  top: 80px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: white;
  padding: 14px 18px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(74, 222, 128, 0.2);
  animation: slideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1), fadeOut 0.4s ease 3.5s forwards;
  display: flex;
  align-items: center;
  gap: 10px;
}

[data-theme="dark"] .toast {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

@keyframes slideIn {
  from {
    transform: translateX(100px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateX(100px);
  }
}

@media (max-width: 768px) {

  .nav-links,
  .nav-right {
    display: none;
  }

  .nav-mobile-actions {
    display: flex;
  }

  .hamburger {
    display: flex;
  }

  .mobile-menu,
  .nav-backdrop {
    display: block;
  }

  .bottom-nav {
    display: flex;
  }

  body {
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 32px);
  }

  .container {
    width: 100%;
    padding-left: 12px;
    padding-right: 12px;
    margin: 12px auto;
    box-sizing: border-box;
  }
}

@media (min-width: 769px) {
  body {
    padding-top: var(--nav-h-desktop);
    padding-bottom: 0;
  }

  .nav-user-name {
    display: block;
  }

  .navbar {
    height: var(--nav-h-desktop);
  }
}

@media (min-width: 1024px) {
  .nav-inner {
    max-width: 1200px;
  }

  .nav-pill-track {
    gap: 4px;
    padding: 5px;
  }

  .nav-links a {
    padding: 8px 14px;
  }
}

@media (max-width: 900px) and (min-width: 769px) {
  .nav-links a .nav-text {
    display: none;
  }

  .nav-links a {
    padding: 8px 10px;
  }

  .nav-create-btn .nav-text {
    display: none;
  }

  .nav-create-btn {
    padding: 8px 12px;
  }
}

@media (max-width: 768px) {
  #toast-container {
    top: auto;
    bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px) + 12px);
    left: 16px;
    right: 16px;
    max-width: none;
  }

  .toast {
    animation: slideUp 0.3s ease, fadeOutDown 0.4s ease 3.5s forwards;
  }

  @keyframes slideUp {
    from {
      transform: translateY(20px);
      opacity: 0;
    }

    to {
      transform: translateY(0);
      opacity: 1;
    }
  }

  @keyframes fadeOutDown {
    to {
      opacity: 0;
      transform: translateY(20px);
    }
  }
}

.text-muted {
  color: var(--muted);
}

.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 8px;
}

.mt-2 {
  margin-top: 16px;
}

.flex {
  display: flex;
  align-items: center;
}

.gap-2 {
  gap: 8px;
}

.w-full {
  width: 100%;
}

@media (min-width: 769px) {
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }

  ::-webkit-scrollbar-track {
    background: var(--bg);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 999px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--muted);
  }
}

.global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #16a34a, #22c55e, #86efac);
  z-index: 99999;
  transition: width 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.6);
  opacity: 0;
}

.global-loading-bar.active {
  opacity: 1;
}

.network-overlay {
  position: fixed;
  inset: 0;
  z-index: 99990;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.network-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.network-card {
  background: var(--card, #ffffff);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 440px;
  width: 100%;
  text-align: center;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25);
  transform: scale(1);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.network-overlay.hidden .network-card {
  transform: scale(0.95);
}

.network-card.shake {
  animation: cardShake 0.4s ease;
}

@keyframes cardShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.network-icon-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  transition: all 0.3s ease;
}

.network-icon-wrap.state-slow {
  background: rgba(245, 158, 11, 0.12);
  color: #d97706;
}

.network-icon-wrap.state-online {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.network-pulse-ring {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0.4;
  animation: pulseRing 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

@keyframes pulseRing {
  0% { transform: scale(0.85); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
  100% { transform: scale(0.85); opacity: 0.8; }
}

.network-icon {
  position: relative;
  z-index: 2;
}

.network-icon.hidden {
  display: none !important;
}

.network-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text, #0f172a);
}

.network-desc {
  font-size: 0.92rem;
  color: var(--muted, #64748b);
  line-height: 1.5;
  margin: 0 0 20px;
}

.network-status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--slate-bg, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  margin-bottom: 24px;
}

.network-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  display: inline-block;
  animation: dotBlink 1.5s ease infinite;
}

.network-dot.dot-slow {
  background: #d97706;
}

.network-dot.dot-online {
  background: #16a34a;
  animation: none;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.network-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-network-primary {
  width: 100%;
  padding: 12px 20px;
  border-radius: 12px;
  background: #16a34a;
  color: #ffffff;
  border: none;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.3);
}

.btn-network-primary:hover {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-network-primary:active {
  transform: translateY(0);
}

.btn-network-primary.loading svg {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.btn-network-dismiss {
  width: 100%;
  padding: 10px 18px;
  border-radius: 12px;
  background: transparent;
  color: var(--muted, #64748b);
  border: 1px solid var(--border, #e2e8f0);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-network-dismiss:hover {
  background: var(--slate-bg, #f8fafc);
  color: var(--text, #0f172a);
}

.network-banner {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(0);
  z-index: 99980;
  background: var(--card, #ffffff);
  color: var(--text, #0f172a);
  border: 1px solid var(--border, #e2e8f0);
  padding: 8px 14px 8px 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  font-size: 0.84rem;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
}

.network-banner.hidden {
  transform: translateX(-50%) translateY(80px);
  opacity: 0;
  pointer-events: none;
}

.network-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.network-banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
}

.network-banner.state-slow .network-banner-dot {
  background: #d97706;
}

.network-banner-btn {
  background: var(--slate-bg, #f8fafc);
  border: 1px solid var(--border, #cbd5e1);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text, #0f172a);
  cursor: pointer;
}

.network-banner-btn:hover {
  background: #16a34a;
  color: #ffffff;
  border-color: #16a34a;
}
