/* ==========================================================================
   Tech Verse Course — বেস স্টাইল, ডিজাইন টোকেন
   থিম: "টিল থেকে ভায়োলেট" — গাঢ় টিল-বেগুনি গ্রেডিয়েন্ট ব্যাকগ্রাউন্ডে
   ভায়োলেট/পার্পল অ্যাকসেন্ট, হালকা ল্যাভেন্ডার রঙের কার্ড
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@400;600;700&family=Hind+Siliguri:wght@400;500;600;700&family=Noto+Sans+Bengali:wght@400;500;600&display=swap');

:root {
  /* রঙ — ডার্ক মোড (ডিফল্ট): প্রায়-কালো ব্যাকগ্রাউন্ড */
  --bg: #0A0A12;
  --bg-elevated: #14141F;
  --bg-elevated-2: #1C1C2C;
  --surface: #EDE9FB;
  --surface-2: #E0D9F6;
  --accent-amber: #7C5CFC;
  --accent-amber-soft: #A98CFF;
  --accent-teal: #1F9E93;
  --accent-coral: #E15F52;
  --accent-green: #1FAE5C;
  --accent-green-soft: #34C97A;
  --text-primary: #F3F0FF;
  --text-muted: #ACA6D6;
  --text-on-surface: #221A3D;
  --text-on-surface-muted: #6C6390;
  --border: rgba(230, 225, 255, 0.12);
  --border-strong: rgba(230, 225, 255, 0.22);
  --shadow-lamp: 0 0 120px rgba(124, 92, 252, 0.18);
  --nav-bg: rgba(10, 10, 18, 0.86);
  --overlay-scrim: rgba(8, 10, 20, 0.6);
  --bg-glow-1: rgba(31,158,147,0.14);
  --bg-glow-2: rgba(124,92,252,0.16);

  /* টাইপোগ্রাফি */
  --font-display: 'Noto Serif Bengali', Georgia, serif;
  --font-body: 'Hind Siliguri', 'Segoe UI', sans-serif;
  --font-utility: 'Noto Sans Bengali', 'Hind Siliguri', sans-serif;

  /* স্পেসিং / শেপ */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --container: 1180px;
}

/* রঙ — লাইট মোড: সাদা/হালকা ল্যাভেন্ডার ব্যাকগ্রাউন্ড */
:root[data-theme="light"] {
  --bg: #F6F4FC;
  --bg-elevated: #FFFFFF;
  --bg-elevated-2: #EFEAFA;
  --surface: #FFFFFF;
  --surface-2: #F3F0FC;
  --accent-amber: #6D46FB;
  --accent-amber-soft: #8A63FF;
  --accent-teal: #159A8C;
  --accent-coral: #D1483A;
  --accent-green: #199150;
  --accent-green-soft: #22A862;
  --text-primary: #1E1B33;
  --text-muted: #6B6690;
  --text-on-surface: #221A3D;
  --text-on-surface-muted: #6C6390;
  --border: rgba(30, 20, 60, 0.10);
  --border-strong: rgba(30, 20, 60, 0.18);
  --shadow-lamp: 0 0 120px rgba(124, 92, 252, 0.10);
  --nav-bg: rgba(255, 255, 255, 0.86);
  --overlay-scrim: rgba(20, 16, 40, 0.45);
  --bg-glow-1: rgba(31,158,147,0.08);
  --bg-glow-2: rgba(124,92,252,0.10);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  background-image:
    radial-gradient(ellipse 900px 500px at 50% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, var(--bg-glow-2), transparent 55%);
  background-attachment: fixed;
  transition: background-color .25s ease, color .25s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 1rem; }
ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.2px;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- ফোকাস / অ্যাক্সেসিবিলিটি ---------- */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent-amber);
  outline-offset: 2px;
  border-radius: 4px;
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

/* ---------- টপ ন্যাভ ---------- */
.topnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
  transition: background-color .25s ease, border-color .25s ease;
}

/* ---------- লাইট/ডার্ক থিম টগল বাটন ---------- */
.theme-toggle-btn {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated-2); border: 1px solid var(--border); color: var(--accent-amber-soft);
  font-size: 0.98rem; cursor: pointer; transition: background .2s, transform .3s, color .2s;
}
.theme-toggle-btn:hover { background: var(--bg-elevated); transform: rotate(18deg); }
.theme-toggle-floating {
  position: fixed; top: 18px; left: 18px; z-index: 45;
  box-shadow: 0 8px 22px rgba(0,0,0,0.25);
}
.topnav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 20px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; transition: opacity .2s; }
.brand:hover { opacity: 0.85; }
.brand .brand-logo { height: 34px; width: auto; display: block; }
.brand .brand-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: linear-gradient(155deg, var(--accent-amber), #B87326);
  display: flex; align-items: center; justify-content: center;
  color: #FFFFFF; font-weight: 700; font-size: 0.85rem; letter-spacing: -0.5px; font-family: var(--font-display);
  box-shadow: 0 4px 16px rgba(124,92,252,0.35);
}

/* মূল লিংক — আইকন + লেবেল, পিল-স্টাইল active/hover অবস্থা */
.nav-links { display: flex; align-items: center; gap: 4px; background: rgba(255,255,255,0.03); padding: 5px; border-radius: 999px; border: 1px solid var(--border); }
.nav-links a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 0.92rem;
  color: var(--text-muted); transition: color .2s, background .2s, box-shadow .2s;
  white-space: nowrap;
}
.nav-links a i { font-size: 0.82rem; opacity: 0.85; }
.nav-links a:hover { color: var(--text-primary); background: var(--bg-elevated-2); }
.nav-links a.active {
  color: #FFFFFF; background: linear-gradient(155deg, var(--accent-amber), var(--accent-amber-soft));
  box-shadow: 0 3px 12px rgba(124,92,252,0.35);
}
.nav-links a.active i { opacity: 1; }
/* অ্যাডমিন লিংক — সবসময় আলাদাভাবে হাইলাইট করা থাকবে যাতে সহজে চোখে পড়ে */
.nav-links a.nav-link-admin {
  color: var(--accent-teal, #4FD1C5); border: 1px solid rgba(79,209,197,0.35); background: rgba(79,209,197,0.08);
}
.nav-links a.nav-link-admin:hover { background: rgba(79,209,197,0.16); color: var(--text-primary); }
.nav-links a.nav-link-admin.active {
  background: linear-gradient(155deg, #4FD1C5, #2FA99B); color: #0A1F1D; box-shadow: 0 3px 12px rgba(79,209,197,0.35); border-color: transparent;
}

.nav-user { display: flex; align-items: center; gap: 12px; position: relative; }

/* ---------- অ্যাভাটার + ইউজার ড্রপডাউন মেনু ---------- */
.user-menu { position: relative; }
.avatar-chip {
  width: 38px; height: 38px; border-radius: 50%; overflow: hidden;
  border: 2px solid var(--accent-amber); display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated-2); font-family: var(--font-display); font-weight: 700; color: var(--accent-amber-soft);
  padding: 0; cursor: pointer; transition: box-shadow .2s, border-color .2s;
}
.avatar-chip:hover, .avatar-chip.active { box-shadow: 0 0 0 3px rgba(124,92,252,0.22); }
.avatar-chip img { width: 100%; height: 100%; object-fit: cover; }

.user-dropdown {
  position: absolute; top: calc(100% + 12px); right: 0; z-index: 60;
  width: 250px; background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: 0 16px 40px rgba(0,0,0,0.45);
  padding: 8px; animation: dropdown-in .16s ease;
}
.user-dropdown[hidden] { display: none; }
@keyframes dropdown-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.user-dropdown-head { display: flex; align-items: center; gap: 10px; padding: 8px 10px 10px; }
.user-dropdown-avatar {
  width: 40px; height: 40px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--bg-elevated-2);
  font-family: var(--font-display); font-weight: 700; color: var(--accent-amber-soft); border: 2px solid var(--accent-amber);
}
.user-dropdown-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-dropdown-info { min-width: 0; }
.user-dropdown-name { font-weight: 700; font-size: 0.94rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-email { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-divider { height: 1px; background: var(--border); margin: 6px 4px; }
.user-dropdown-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: start;
  padding: 10px 10px; border-radius: 8px; font-size: 0.9rem; font-weight: 600;
  color: var(--text-primary); background: none; border: none; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.user-dropdown-item i { width: 16px; text-align: center; color: var(--text-muted); }
.user-dropdown-item:hover { background: var(--bg-elevated-2); }
.user-dropdown-item.admin { color: var(--accent-teal, #4FD1C5); }
.user-dropdown-item.admin i { color: inherit; }
.user-dropdown-item.danger { color: #F27272; }
.user-dropdown-item.danger i { color: inherit; }
.user-dropdown-item.danger:hover { background: rgba(242,114,114,0.1); }

/* ---------- নোটিফিকেশন বেল + প্যানেল ---------- */
.nav-notif { position: relative; }
.nav-notif.hidden { display: none; }
.notif-menu { position: relative; }
.notif-bell-btn {
  position: relative; width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; background: var(--bg-elevated-2);
  color: var(--text-primary); font-size: 0.9rem; transition: background .15s, box-shadow .2s;
}
.notif-bell-btn:hover, .notif-bell-btn.active { background: var(--bg-elevated); box-shadow: 0 0 0 3px rgba(124,92,252,0.22); }
.notif-badge {
  position: absolute; top: -2px; right: -2px; min-width: 15px; height: 15px; padding: 0 3px; border-radius: 999px;
  background: var(--accent-coral); color: #fff; font-size: 0.6rem; font-weight: 700; line-height: 15px; text-align: center;
  box-shadow: 0 0 0 2px var(--bg-elevated-2);
}
.notif-badge.hidden { display: none; }

/* ব্যাকড্রপ — শুধু মোবাইলে প্যানেল খোলা থাকলে পেছনের অংশ ঝাপসা করে দেয় */
.notif-backdrop {
  position: fixed; inset: 0; z-index: 58; background: var(--overlay-scrim);
  opacity: 0; pointer-events: none; transition: opacity .22s ease;
}
.notif-backdrop.open { opacity: 1; pointer-events: auto; }

.notif-panel {
  position: fixed; top: 80px; right: 24px; z-index: 60; width: 360px; max-width: calc(100vw - 24px);
  background: var(--bg-elevated); border: 1px solid var(--border-strong); border-radius: var(--radius-md);
  box-shadow: 0 16px 40px rgba(0,0,0,0.45); overflow: hidden; animation: dropdown-in .18s ease;
  display: flex; flex-direction: column; max-height: min(70vh, 480px);
}
.notif-panel[hidden] { display: none; }
.notif-panel-sheet-handle { display: none; }
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between; padding: 14px 16px;
  border-bottom: 1px solid var(--border); font-weight: 700; font-size: 0.98rem; color: var(--text-primary);
  flex-shrink: 0;
}
.notif-markall-btn {
  background: none; border: none; cursor: pointer; color: var(--accent-amber-soft); font-size: 0.78rem;
  font-weight: 600; font-family: inherit; padding: 5px 8px; border-radius: 6px;
}
.notif-markall-btn:hover { background: var(--bg-elevated-2); }
.notif-panel-list { overflow-y: auto; flex: 1; min-height: 0; }
.notif-item {
  position: relative; display: flex; align-items: flex-start; gap: 12px; width: 100%; text-align: start; padding: 14px 16px;
  border: none; border-bottom: 1px solid var(--border); background: none; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover, .notif-item:active { background: var(--bg-elevated-2); }
.notif-item.unread { background: rgba(124,92,252,0.07); }
.notif-item.pinned { background: rgba(255,176,32,0.08); }
.notif-item.pinned:hover, .notif-item.pinned:active { background: rgba(255,176,32,0.14); }
.notif-item-pin { position: absolute; top: 10px; right: 12px; font-size: 0.72rem; color: var(--accent-amber); opacity: .85; transform: rotate(35deg); }
.notif-item-icon {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(124,92,252,0.14); color: var(--accent-amber-soft); font-size: 0.94rem;
}
.notif-item-body { min-width: 0; flex: 1; }
.notif-item-title { font-weight: 700; font-size: 0.88rem; color: var(--text-primary); line-height: 1.35; }
.notif-item-msg { font-size: 0.81rem; color: var(--text-muted); margin-top: 3px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.notif-item-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 7px; }
.notif-tag { font-size: 0.68rem; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(31,158,147,0.2); color: #5FD4C6; white-space: nowrap; }
.notif-item-time { font-size: 0.72rem; color: var(--text-muted); margin-top: 7px; display: flex; align-items: center; gap: 5px; }
.notif-item-time i { font-size: 0.66rem; opacity: .8; }
.notif-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--accent-amber); margin-top: 6px; box-shadow: 0 0 0 3px rgba(124,92,252,0.18); }
.notif-empty { padding: 40px 16px; text-align: center; color: var(--text-muted); font-size: 0.86rem; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.notif-empty i { font-size: 1.8rem; opacity: .45; }

/* মোবাইলে হেডারের ঠিক নিচ থেকে ফুল-প্রায়-উইডথ প্যানেল হিসেবে দেখাবে (top এর
   সঠিক মান notifications.js থেকে হেডারের height মেপে ইনলাইনে বসানো হয়) */
@media (max-width: 640px) {
  .notif-panel {
    left: 12px; right: 12px; width: auto; max-width: none; max-height: min(75vh, 520px);
    border-radius: var(--radius-md);
  }
  .notif-item { padding: 14px 16px; }
}

.hamburger { display: none; }

/* ---------- মোবাইল ন্যাভ প্যানেল ----------
   এটি ইচ্ছাকৃতভাবে .topnav-এর বাইরে, সরাসরি <body>-এর সন্তান হিসেবে বসে (দেখুন js/utils.js)।
   কারণ: .topnav-এ backdrop-filter থাকায় সেটি নিজেই একটি নতুন "কনটেইনিং ব্লক" তৈরি করে,
   তাই .topnav-এর ভেতরে position:fixed রাখলে সেটা পুরো স্ক্রিনের বদলে শুধু ৬৮px উঁচু
   navbar-এর সাপেক্ষে হিসেব হয় — ফলে মেনু পুরো স্ক্রিন না ঢেকে অর্ধেক/ভাঙাচোরা দেখায়।
   body-এর সরাসরি সন্তান হলে এই বাগ হয় না। */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hamburger { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 30px; height: 30px; }
  .hamburger span { height: 2px; width: 100%; background: var(--text-primary); border-radius: 2px; transition: transform .22s ease, opacity .22s ease; }
  .hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; }
  .hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* ব্যাকড্রপ — ড্র‍য়ারের পেছনের বাকি অংশ ঝাপসা করে দেয়, ক্লিক করলে বন্ধ হয়ে যায় */
.mobile-nav-backdrop {
  position: fixed; inset: 0; z-index: 149;
  background: var(--overlay-scrim);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }

/* সাইড ড্র‍য়ার — পুরো স্ক্রিন না ঢেকে ডান পাশে সর্বোচ্চ ~৮৫% (৩৮০px পর্যন্ত) জায়গা নেয় */
.mobile-nav-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 150;
  width: min(85vw, 380px);
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg) 100%);
  border-inline-start: 1px solid var(--border-strong);
  box-shadow: -24px 0 60px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 16px 22px;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.16,1,.3,1);
  overflow-y: auto;
}
.mobile-nav-panel.open { transform: translateX(0); }

.mobile-nav-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 14px; margin-bottom: 10px; border-bottom: 1px solid var(--border); }
.mobile-nav-head-title { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--text-primary); }
.mobile-nav-close {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated-2); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer;
  transition: background .2s, color .2s, transform .25s;
}
.mobile-nav-close:hover { background: rgba(242,114,114,0.14); color: #F27272; transform: rotate(90deg); }

.mobile-nav-user-card {
  display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 12px;
  background: var(--bg-elevated-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.mobile-nav-user-avatar {
  width: 44px; height: 44px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--bg-elevated);
  font-family: var(--font-display); font-weight: 700; color: var(--accent-amber-soft); border: 2px solid var(--accent-amber);
}
.mobile-nav-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mobile-nav-user-info { min-width: 0; }
.mobile-nav-user-name { font-weight: 700; font-size: 0.95rem; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mobile-nav-user-email { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mobile-nav-links { display: flex; flex-direction: column; gap: 4px; }
.mobile-nav-panel a {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem;
  color: var(--text-muted); transition: color .2s, background .2s;
}
.mobile-nav-panel a i { width: 20px; text-align: center; font-size: 0.92rem; opacity: 0.85; }
.mobile-nav-panel a.active, .mobile-nav-panel a:hover { color: var(--text-primary); background: var(--bg-elevated-2); }
.mobile-nav-panel a.nav-link-admin { color: var(--accent-teal, #4FD1C5); }
.mobile-nav-panel a.nav-link-admin.active { color: var(--text-primary); background: rgba(79,209,197,0.14); }
.mobile-nav-panel-foot { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--border); display: flex; gap: 10px; }
.mobile-nav-panel-foot .btn { flex: 1; }
@media (min-width: 861px) { .mobile-nav-panel, .mobile-nav-backdrop { display: none !important; } }



/* ---------- বাটন ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: 999px; font-weight: 600; font-size: 0.96rem;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(155deg, var(--accent-amber-soft), var(--accent-amber)); color: #FFFFFF; box-shadow: 0 6px 20px rgba(124,92,252,0.28); }
.btn-primary:hover { box-shadow: 0 8px 26px rgba(124,92,252,0.4); }
.btn-outline { background: transparent; border: 1.5px solid var(--border-strong); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--accent-amber); color: var(--accent-amber-soft); }
.btn-teal { background: var(--accent-teal); color: #EFFAF8; }
.btn-danger { background: var(--accent-coral); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; pointer-events: none; }

/* ---------- কার্ড / সারফেস ---------- */
.card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.paper {
  background: var(--surface);
  color: var(--text-on-surface);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.paper .muted { color: var(--text-on-surface-muted); }

/* ---------- ফর্ম ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text-muted); }
.field input, .field select, .field textarea {
  background: var(--bg-elevated-2); border: 1.5px solid var(--border-strong); color: var(--text-primary);
  padding: 12px 14px; border-radius: var(--radius-sm); transition: border-color .15s;
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-muted); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent-amber); outline: none; }
.form-error { color: var(--accent-coral); font-size: 0.88rem; min-height: 1.2em; }
.form-success {
  display: flex; align-items: flex-start; gap: 8px; background: rgba(31, 174, 92, 0.12);
  border: 1.5px solid var(--accent-green); color: var(--accent-green);
  font-size: 0.86rem; font-weight: 600; line-height: 1.5;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 16px;
}
.form-success i { margin-top: 2px; flex-shrink: 0; }
.form-hint { color: var(--text-muted); font-size: 0.85rem; }

/* ---------- Locked fields (phone / amount at checkout) ---------- */
.locked-field input[readonly] {
  background: var(--surface-2); color: var(--text-muted); cursor: not-allowed;
  border-style: dashed; opacity: 0.9;
}
.field-lock-note {
  display: flex; align-items: flex-start; gap: 6px; font-size: 0.78rem;
  color: var(--accent-coral); font-weight: 600; line-height: 1.4;
}
.field-lock-note i { margin-top: 1px; }

/* ---------- Selected payment number (course purchase modal) ---------- */
.pay-number-selected {
  display: flex; align-items: center; gap: 12px; background: var(--surface);
  border: 1.5px solid var(--accent-teal); color: var(--text-on-surface);
  padding: 14px 16px; border-radius: var(--radius-md); font-size: 0.95rem;
}
.pay-number-selected i { color: var(--accent-teal); font-size: 1.3rem; }
.pay-number-selected .pn-number { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.5px; }

/* ---------- Mandatory phone number gate ----------
   Full-screen, non-dismissable overlay — mounted on <body> by
   showPhoneRequiredGate() in js/utils.js. No close button and clicking
   outside does nothing on purpose; the only way out is a valid saved number. */
.phone-gate-overlay {
  position: fixed; inset: 0; z-index: 99999;
  background: rgba(8, 6, 18, 0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.phone-gate-box {
  width: 100%; max-width: 420px; background: var(--bg-elevated);
  border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 32px 26px 28px; text-align: center; box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}
.phone-gate-icon {
  width: 58px; height: 58px; border-radius: 50%; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; color: #fff;
  background: linear-gradient(155deg, var(--accent-amber), var(--accent-amber-soft));
}
.phone-gate-box h3 { font-size: 1.25rem; margin-bottom: 12px; color: var(--text-primary); }
.phone-gate-warning {
  display: flex; align-items: flex-start; gap: 10px; text-align: left;
  background: rgba(225, 95, 82, 0.12); border: 1.5px solid var(--accent-coral);
  color: var(--accent-coral); font-weight: 700; font-size: 0.85rem;
  padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 20px; line-height: 1.55;
}
.phone-gate-warning i { margin-top: 2px; flex-shrink: 0; }
.phone-gate-box .field { text-align: left; margin-bottom: 18px; }

/* ---------- এক্সাম পোর্টাল ভেরিফিকেশন গেট ----------
   "Exam" ন্যাভ লিংকে ক্লিক করলে সরাসরি tvexam.vercel.app-এ না পাঠিয়ে আগে এই
   ওভারলে দেখানো হয় (দেখুন js/utils.js -> showExamVerificationGate())।
   সম্পূর্ণ অ্যানিমেশন — রিং স্পিন, স্ক্যান সুইপ, চেকমার্ক আঁকা, প্রোগ্রেস বার,
   টাইটেল সোয়াপ — pure CSS keyframes দিয়ে চলে; JS শুধু ওভারলে বসায় আর তার
   সাথে সময় মিলিয়ে redirect করে (EXAM_GATE_DURATION_MS, js/utils.js দ্রষ্টব্য —
   কোনো একটা বদলালে অন্যটাও মেলাতে হবে)। */
.nav-links a.nav-link-exam {
  color: var(--accent-green-soft, #34C97A); border: 1px solid rgba(31,174,92,0.35); background: rgba(31,174,92,0.08);
}
.nav-links a.nav-link-exam:hover { background: rgba(31,174,92,0.16); color: var(--text-primary); }
.nav-links a.nav-link-exam.active {
  background: linear-gradient(155deg, var(--accent-green-soft), var(--accent-green)); color: #06210F;
  box-shadow: 0 3px 12px rgba(31,174,92,0.35); border-color: transparent;
}
.mobile-nav-panel a.nav-link-exam { color: var(--accent-green-soft, #34C97A); }
.mobile-nav-panel a.nav-link-exam.active { color: var(--text-primary); background: rgba(31,174,92,0.14); }

.exam-verify-overlay {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: var(--overlay-scrim); backdrop-filter: blur(10px) saturate(140%); -webkit-backdrop-filter: blur(10px) saturate(140%);
  animation: exam-overlay-in .35s ease, exam-overlay-out .3s ease 2.3s forwards;
}
.exam-verify-card {
  position: relative; width: 100%; max-width: 380px; text-align: center;
  background: var(--bg-elevated); border: 1.5px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 38px 28px 30px; box-shadow: 0 30px 90px rgba(0,0,0,0.5), var(--shadow-lamp);
  animation: exam-card-in .45s cubic-bezier(.22,1,.36,1);
}

/* --- ঘূর্ণায়মান রিং + শিল্ড ব্যাজ --- */
.exam-verify-orbit { position: relative; width: 104px; height: 104px; margin: 0 auto 22px; }
.exam-verify-ring {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid transparent;
}
.exam-verify-ring-1 {
  border-top-color: var(--accent-amber); border-right-color: var(--accent-amber);
  animation: exam-spin 1.1s linear infinite;
}
.exam-verify-ring-2 {
  inset: 12px; border-bottom-color: var(--accent-teal); border-left-color: var(--accent-teal);
  animation: exam-spin-reverse 1.6s linear infinite;
}
.exam-verify-badge {
  position: absolute; inset: 22px; border-radius: 50%; overflow: hidden;
  background: var(--bg-elevated-2); display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--border);
}
.exam-verify-badge-icon {
  font-size: 1.7rem; color: var(--accent-amber-soft);
  animation: exam-badge-out .4s ease 1.5s forwards;
}
.exam-verify-scan {
  position: absolute; left: -20%; right: -20%; height: 40%;
  background: linear-gradient(180deg, transparent, rgba(169,140,255,0.55), transparent);
  animation: exam-scan 1.3s ease-in-out infinite;
}
.exam-verify-check {
  position: absolute; inset: 0; width: 100%; height: 100%; padding: 14px;
}
.exam-verify-check-circle {
  stroke: var(--accent-green-soft, #34C97A); stroke-width: 3;
  stroke-dasharray: 145; stroke-dashoffset: 145;
  animation: exam-check-circle .5s ease 1.5s forwards;
}
.exam-verify-check-mark {
  stroke: var(--accent-green-soft, #34C97A); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 34; stroke-dashoffset: 34;
  animation: exam-check-mark .4s ease 1.9s forwards;
}

/* --- টাইটেল / সাবটেক্সট --- */
.exam-verify-text { position: relative; min-height: 34px; margin-bottom: 18px; }
.exam-verify-title { font-family: var(--font-body); font-size: 1.12rem; font-weight: 700; color: var(--text-primary); position: relative; }
.exam-verify-title-step { display: block; }
.exam-verify-title-step-1 { animation: exam-fade-out .35s ease 1.7s forwards; }
.exam-verify-title-step-2 {
  position: absolute; inset: 0; opacity: 0; color: var(--accent-green-soft, #34C97A);
  animation: exam-fade-in .35s ease 1.85s forwards;
}
.exam-verify-sub { font-size: 0.86rem; color: var(--text-muted); margin-top: 6px; }

/* --- প্রোগ্রেস বার --- */
.exam-verify-progress {
  height: 6px; border-radius: 999px; background: var(--bg-elevated-2); overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--border); margin-bottom: 16px;
}
.exam-verify-progress-bar {
  height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-amber), var(--accent-teal), var(--accent-green-soft));
  background-size: 200% 100%;
  animation: exam-progress 2.1s cubic-bezier(.22,.9,.35,1) .2s forwards, exam-progress-shimmer 1.4s linear infinite;
}

/* --- লোডিং ডটস --- */
.exam-verify-dots { display: flex; align-items: center; justify-content: center; gap: 6px; height: 10px; margin-bottom: 4px; }
.exam-verify-dots span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent-amber-soft);
  animation: exam-dot-bounce 1s ease-in-out infinite, exam-fade-out .3s ease 1.6s forwards;
}
.exam-verify-dots span:nth-child(2) { animation-delay: .15s, 1.6s; }
.exam-verify-dots span:nth-child(3) { animation-delay: .3s, 1.6s; }

.exam-verify-cancel {
  margin-top: 14px; background: none; border: none; color: var(--text-muted);
  font-size: 0.82rem; font-weight: 600; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; transition: color .2s;
}
.exam-verify-cancel:hover { color: var(--text-primary); }

@keyframes exam-overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes exam-overlay-out { to { opacity: 0; } }
@keyframes exam-card-in { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes exam-spin { to { transform: rotate(360deg); } }
@keyframes exam-spin-reverse { to { transform: rotate(-360deg); } }
@keyframes exam-scan { 0% { top: -40%; } 100% { top: 100%; } }
@keyframes exam-badge-out { to { opacity: 0; transform: scale(.7); } }
@keyframes exam-check-circle { to { stroke-dashoffset: 0; } }
@keyframes exam-check-mark { to { stroke-dashoffset: 0; } }
@keyframes exam-fade-out { to { opacity: 0; transform: translateY(-4px); } }
@keyframes exam-fade-in { to { opacity: 1; } }
@keyframes exam-progress { 0% { width: 0%; } 35% { width: 48%; } 60% { width: 66%; } 85% { width: 90%; } 100% { width: 100%; } }
@keyframes exam-progress-shimmer { 0% { background-position: 0% 0; } 100% { background-position: -200% 0; } }
@keyframes exam-dot-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-5px); opacity: 1; } }

@media (max-width: 420px) {
  .exam-verify-card { padding: 32px 20px 24px; }
  .exam-verify-orbit { width: 88px; height: 88px; }
}

/* ---------- ব্যাজ / ট্যাগ ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  font-size: 0.78rem; font-weight: 700; font-family: var(--font-utility);
}
.badge-amber { background: rgba(124,92,252,0.16); color: var(--accent-amber-soft); }
.badge-teal { background: rgba(31,158,147,0.2); color: #5FD4C6; }
.badge-coral { background: rgba(225,95,82,0.18); color: #F0938A; }

/* ---------- ফ্রি / পেইড স্ট্যাটাস পিল — সবসময় সংশ্লিষ্ট কোর্সের নিজস্ব price থেকে তৈরি হয় ---------- */
.status-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 13px; border-radius: 999px;
  font-size: 0.76rem; font-weight: 800; letter-spacing: 0.01em; line-height: 1.4;
  font-family: var(--font-utility);
  color: #FFFFFF; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,0.32), inset 0 0 0 1px rgba(255,255,255,0.18);
}
.status-pill i { font-size: 0.72rem; }
.status-pill-free { background: linear-gradient(135deg, var(--accent-teal), var(--accent-green-soft)); }
.status-pill-paid { background: linear-gradient(135deg, var(--accent-coral), #FF8F6B); }

/* ---------- টোস্ট ---------- */
#toast-root { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 10px; align-items: center; width: min(92vw, 420px); }
.toast {
  background: var(--bg-elevated-2); border: 1px solid var(--border-strong); color: var(--text-primary);
  padding: 13px 20px; border-radius: 999px; font-size: 0.92rem; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); animation: toast-in .25s ease;
  display: flex; align-items: center; gap: 10px; width: 100%; justify-content: center;
}
.toast.success { border-color: var(--accent-teal); }
.toast.error { border-color: var(--accent-coral); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- লোডার ---------- */
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border-strong);
  border-top-color: var(--accent-amber); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-screen { display: flex; align-items: center; justify-content: center; min-height: 60vh; gap: 12px; color: var(--text-muted); }

/* ---------- মোডাল ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 300; background: rgba(10, 12, 24, 0.72);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 40px 16px; overflow-y: auto; animation: modal-fade .18s ease;
}
@keyframes modal-fade { from { opacity: 0; } to { opacity: 1; } }
.modal-box { width: 100%; max-width: 620px; margin: auto; position: relative; animation: modal-pop .2s ease; max-height: none; }
@keyframes modal-pop { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 12px; }
.modal-head h3 { font-size: 1.2rem; }
.modal-close-btn {
  width: 34px; height: 34px; border-radius: 50%; background: var(--bg-elevated-2);
  display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0;
  color: var(--text-muted); transition: color .15s, background .15s;
}
.modal-close-btn:hover { color: var(--text-primary); background: var(--accent-coral); }

/* ---------- কনফার্ম বক্স (নেটিভ browser confirm()-এর কাস্টম বদলি) ---------- */
.confirm-overlay { align-items: center; padding: 20px 16px; }
.confirm-overlay.closing { animation: modal-fade .15s ease reverse; }
.confirm-overlay.closing .confirm-box { animation: modal-pop .15s ease reverse; }
.confirm-box { max-width: 380px; text-align: center; padding: 28px 24px 24px; }
.confirm-icon {
  width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem;
  background: rgba(245, 158, 11, 0.14); color: var(--accent-amber);
}
.confirm-icon.danger { background: rgba(239, 100, 97, 0.14); color: var(--accent-coral); }
.confirm-title { font-size: 1.1rem; margin-bottom: 8px; }
.confirm-msg { color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; margin-bottom: 22px; }
.confirm-actions { display: flex; gap: 10px; }
.confirm-actions .btn { flex: 1; }

/* ---------- অ্যাডমিন টেবিল ---------- */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th { text-align: right; color: var(--text-muted); font-weight: 600; font-size: 0.82rem; padding: 10px 12px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; text-align: right; }
.data-table tr:hover td { background: rgba(230,225,255,0.03); }
.data-table .cell-title { display: flex; align-items: center; gap: 10px; text-align: left; }
.data-table .cell-title img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--bg-elevated-2); }
.data-table .cell-title .t { font-weight: 600; color: var(--text-primary); }
.data-table .cell-title .s { font-size: 0.8rem; color: var(--text-muted); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg-elevated-2); color: var(--text-muted); transition: all .15s; font-size: 0.95rem;
}
.icon-btn:hover { color: var(--text-primary); background: var(--bg-elevated); }
.icon-btn.danger:hover { color: #fff; background: var(--accent-coral); }
.table-wrap { overflow-x: auto; }
.table-scroll-x { min-width: 560px; }

/* ---------- ফুটার ---------- */
/* ---------- Site footer ---------- */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 56px 0 0; color: var(--text-muted); font-size: 0.92rem; background: var(--bg-elevated); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 40px; padding-bottom: 40px; }
.footer-brand .footer-logo { height: 34px; width: auto; display: block; margin-bottom: 14px; }
.footer-about { line-height: 1.7; max-width: 360px; margin-bottom: 18px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--bg-elevated-2); border: 1px solid var(--border); color: var(--text-muted); transition: color .2s, background .2s, transform .2s;
}
.footer-social a:hover { color: #FFFFFF; background: linear-gradient(155deg, var(--accent-amber-soft), var(--accent-amber)); transform: translateY(-2px); border-color: transparent; }
.footer-col h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: var(--text-primary); margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { color: var(--text-muted); transition: color .2s, padding-left .2s; }
.footer-col a:hover { color: var(--accent-amber-soft); padding-left: 3px; }
.footer-contact li { display: flex; }
.footer-contact a { display: flex; align-items: center; gap: 9px; word-break: break-word; }
.footer-contact a i { width: 16px; text-align: center; color: var(--accent-teal, #4FD1C5); flex-shrink: 0; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  border-top: 1px solid var(--border); padding: 18px 24px; font-size: 0.82rem;
}
.footer-credit a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.footer-credit a:hover { color: var(--accent-amber-soft); }
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; padding-bottom: 32px; }
  .footer-about { max-width: none; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* ---------- ইউটিলিটি ---------- */
.muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.flex { display: flex; } .flex-col { flex-direction: column; }
.items-center { align-items: center; } .justify-between { justify-content: space-between; } .justify-center { justify-content: center; }
.gap-8 { gap: 8px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.hidden { display: none !important; }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 12px; }
