@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Klee+One:wght@400;600&family=Noto+Sans+Bengali:wght@400;500;700;900&family=Noto+Sans+Devanagari:wght@400;500;700;900&display=swap');

/* Plus Jakarta Sans has no Bengali/Devanagari glyphs — forcing it on those
   scripts makes the browser fall back per-character instead of per-cluster,
   which breaks conjuncts (e.g. ব্রাশ renders as রাশ). Give bn/ne their own
   script-correct stack so shaping stays intact. */
:lang(bn) { font-family: 'Noto Sans Bengali', sans-serif; }
:lang(ne) { font-family: 'Noto Sans Devanagari', sans-serif; }

:root {
  --color-sage: #5B8A72;
  --color-sage-dark: #466e5a;
  --color-sage-light: #eaf1ed;
  --color-cloud: #F5F7F6;
  --color-warm-white: #FDFDFD;
  --font-jakarta: 'Plus Jakarta Sans', sans-serif;
  --font-klee: 'Klee One', serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--color-cloud);
  color: #1a202c;
  font-family: var(--font-jakarta);
  -webkit-font-smoothing: antialiased;
}

.font-klee { font-family: var(--font-klee); }

.scrollbar-none { scrollbar-width: none; -ms-overflow-style: none; }
.scrollbar-none::-webkit-scrollbar { display: none; }

.shadow-soft  { box-shadow: 0 4px 20px -2px rgba(0,0,0,0.04), 0 0 3px rgba(0,0,0,0.02); }
.shadow-hover { box-shadow: 0 10px 40px -4px rgba(91,138,114,0.12), 0 0 4px rgba(0,0,0,0.02); }

@keyframes animateIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: animateIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.fade-in { animation: fadeIn 0.35s ease-out forwards; }

/* ── App shell / sidebar ── */
.shell { display: flex; height: 100vh; background: var(--color-cloud); overflow: hidden; }

.sidebar {
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  width: 272px;
  background:
    radial-gradient(circle, rgba(91,138,114,0.18) 1.2px, transparent 1.2px) 0 0/16px 16px,
    var(--color-warm-white);
  border-right: 1px solid #f3f4f6;
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.04);
  transition: width 0.3s cubic-bezier(0.16,1,0.3,1);
}
.sidebar.collapsed { width: 80px; background: var(--color-warm-white); }
@media (min-width: 768px) { .sidebar { display: flex; } }

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}
.sidebar.collapsed .sidebar-header { justify-content: center; padding: 1.5rem 0.75rem 1.25rem; }
.sidebar-brand-collapsed { display: none; font-size: 1.125rem; font-weight: 900; color: #111827; line-height: 1; font-family: var(--font-klee); }
.sidebar.collapsed .sidebar-brand-collapsed { display: inline; }
.sidebar.collapsed .sidebar-brand { display: none; }
.sidebar-brand { color: #111827; font-weight: 900; font-size: 0.875rem; letter-spacing: -0.01em; line-height: 1; margin: 0; }

.sidebar-nav { display: flex; flex-direction: column; gap: 0.375rem; flex: 1; padding: 1rem 0.75rem; overflow-y: auto; }
.sidebar-nav-item {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 12px;
  font-weight: 500; font-size: 0.875rem;
  text-decoration: none;
  color: #6b7280;
  transition: all 0.2s;
}
.sidebar-nav-item.active { background: var(--color-sage); color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.sidebar-nav-item:not(.active):hover { color: var(--color-sage-dark); background: var(--color-sage-light); }
.sidebar.collapsed .sidebar-nav { gap: 0.625rem; }
.sidebar.collapsed .sidebar-nav-item { justify-content: center; }
.sidebar.collapsed .nav-label { display: none; }
.nav-icon { flex-shrink: 0; font-size: 1.1rem; line-height: 1; }

.sidebar-collapse-btn {
  display: flex; align-items: center; justify-content: center;
  padding: 0.75rem;
  border: none;
  border-top: 1px solid #f3f4f6;
  background: transparent;
  color: #9ca3af;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}
.sidebar-collapse-btn:hover { color: var(--color-sage); background: var(--color-sage-light); }
.sidebar-collapse-btn.rotated { transform: rotate(180deg); }

.lang-switcher { position: relative; border-top: 1px solid #f3f4f6; }
.lang-btn {
  width: 100%;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: none; background: transparent;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-jakarta);
  font-size: 0.75rem; font-weight: 700;
}
.lang-btn:hover { color: var(--color-sage-dark); background: var(--color-sage-light); }
.sidebar.collapsed .lang-btn { justify-content: center; padding: 0.75rem 0.25rem; }
.lang-menu {
  position: absolute; left: 0.5rem; right: 0.5rem; bottom: 100%; margin-bottom: 0.25rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #f3f4f6;
  box-shadow: 0 10px 40px -4px rgba(0,0,0,0.15);
  overflow: hidden;
  z-index: 20;
}
.lang-opt {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 1rem;
  border: none; background: transparent;
  font-size: 0.75rem; font-weight: 700;
  color: #4b5563;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
  font-family: var(--font-jakarta);
}
.lang-opt:hover { background: #f9fafb; }
.lang-opt.active { background: var(--color-sage-light); color: var(--color-sage-dark); }

.sidebar-notices-link {
  display: flex; align-items: center; gap: 0.75rem;
  border-top: 1px solid #f3f4f6;
  padding: 0.75rem 1rem;
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.75rem; font-weight: 700;
  transition: all 0.2s;
}
.sidebar-notices-link:hover, .sidebar-notices-link.active { color: var(--color-sage-dark); background: var(--color-sage-light); }
.sidebar.collapsed .sidebar-notices-link { justify-content: center; }
.sidebar.collapsed .sidebar-notices-link span { display: none; }

.drawer-backdrop {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
}
@media (min-width: 768px) { .drawer-backdrop { display: none !important; } }
.drawer {
  position: fixed; inset: 0 auto 0 0; z-index: 50;
  display: flex; flex-direction: column;
  width: 18rem;
  background: var(--color-warm-white);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.4);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.16,1,0.3,1);
}
.drawer.open { transform: translateX(0); }
@media (min-width: 768px) { .drawer { display: none !important; } }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.5rem 1.25rem 1.25rem;
  border-bottom: 1px solid #f3f4f6;
}

.main-col { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.main-content { flex: 1; overflow-y: auto; }

.mobile-topbar {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--color-warm-white);
  border-bottom: 1px solid #f3f4f6;
  box-shadow: 0 4px 20px -2px rgba(0,0,0,0.04);
  flex-shrink: 0;
}
@media (min-width: 768px) { .mobile-topbar { display: none; } }
.mobile-title { color: #111827; font-weight: 900; font-size: 0.875rem; margin: 0; }

.icon-btn {
  width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}
.icon-btn:hover { background: #e5e7eb; }
.icon-btn:disabled { opacity: 0.2; cursor: default; }
