/* ===========================
   dashboard.css
   استایل‌های یکپارچه داشبورد و منوی همبرگر
   نسخهٔ مدرن با هماهنگی پالت جدید
   =========================== */

/* === ۱. دکمهٔ داشبورد (همبرگری) === */
.dashboard-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, rgba(255,213,79,0.35), rgba(30,144,255,0.35));
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  z-index: 10003;
  animation: pulse 1.6s ease-in-out infinite alternate;
  transition: all 0.35s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
  50% { transform: scale(1.04); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }
  100% { transform: scale(1); box-shadow: 0 4px 15px rgba(0,0,0,0.15); }
}

.dashboard-toggle .hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
}

.dashboard-toggle .hamburger span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: #fff;
  border-radius: 3px;
  transition: transform 0.35s ease, opacity 0.35s ease, background-color 0.35s ease;
}

.dashboard-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.dashboard-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}
.dashboard-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.dashboard-toggle:hover,
.dashboard-toggle:focus-visible {
  background: linear-gradient(135deg, rgba(255,213,79,0.85), rgba(255,180,50,0.85));
  color: #002f6c;
  outline: none;
  transform: scale(1.07);
  box-shadow: 0 6px 22px rgba(0,0,0,0.25);
}

/* === ۲. Overlay (پس‌زمینهٔ تیره) === */
.dashboard-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 10001;
  transition: opacity 0.4s ease;
}

body.dashboard-open .dashboard-overlay {
  display: block;
  opacity: 1;
}

/* === ۳. پنل کشویی داشبورد === */
.dashboard-panel {
  position: fixed;
  top: 0;
  right: -350px;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  box-shadow: -4px 0 25px rgba(0,0,0,0.2);
  overflow-y: auto;
  z-index: 10002;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-left: 1px solid rgba(0,0,0,0.08);
}

.dashboard-panel.active {
  right: 0;
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}

.dashboard-header h3 {
  margin: 0;
  font-size: 1.2rem;
  color: #222;
  font-weight: 700;
}

.dashboard-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease, transform 0.3s ease;
}

.dashboard-close:hover {
  color: #c9a84c;
  transform: scale(1.1);
}

/* === ۴. محتوای داشبورد (فرم‌ها و دکمه‌ها) === */
.dashboard-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.dashboard-content p {
  margin: 0.5rem 0 1rem 0;
  font-size: 1rem;
  color: #333;
}

#auth-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}

#auth-container h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1.05rem;
  color: #333;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

#auth-container h4:hover {
  color: #c9a84c;
}

#auth-container form {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

#auth-container form.active {
  max-height: 520px;
  opacity: 1;
}

#auth-container input {
  padding: 0.6rem 0.9rem;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: 8px;
  font-size: 0.95rem;
  transition: border 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
  background: rgba(255,255,255,0.8);
}

#auth-container input:focus {
  outline: none;
  border-color: #c9a84c;
  box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.15);
}

#auth-container button {
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #c9a84c, #b4922f);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(201,168,76,0.3);
  font-family: inherit;
}

#auth-container button:hover {
  background: linear-gradient(135deg, #b4922f, #9a7a24);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(201,168,76,0.4);
}

/* === ۵. دکمهٔ خروج === */
#logout-btn {
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, #c62828, #e53935);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.8rem;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(198,40,40,0.25);
}

#logout-btn:hover {
  background: linear-gradient(135deg, #e53935, #c62828);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(198,40,40,0.35);
}

/* === ۶. منوی داخل داشبورد (main-nav) === */
.dashboard-panel .main-nav {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.dashboard-panel .main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dashboard-panel .main-nav a {
  display: block;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 8px;
  padding: 0.5rem 0.85rem;
  transition: all 0.3s ease;
}

.dashboard-panel .main-nav a:hover,
.dashboard-panel .main-nav a:focus-visible {
  background: rgba(201, 168, 76, 0.15);
  color: #000;
}

.dashboard-panel .main-nav a.disabled,
.dashboard-panel .main-nav a.active {
  background: rgba(201, 168, 76, 0.2);
  color: #000;
  pointer-events: none;
}

/* === ۷. استایل‌های جدید لینک بلاگ (سبز روشن، خوانا روی هدر تیره) === */
.header-nav a.blog-link {
  background: transparent !important;
  border: 1px solid rgba(255,255,255,0.25) !important;
  color: #a5d6a7 !important;  /* سبز روشن برای خوانایی کامل */
  padding: 0.35rem 1rem !important;
  font-weight: 700;
  text-shadow: none !important;
  box-shadow: none !important;
  background-image: none !important;
  backdrop-filter: none !important;
  transition: all 0.3s ease;
}

.header-nav a.blog-link:hover,
.header-nav a.blog-link:focus-visible {
  background: rgba(165, 214, 167, 0.15) !important;
  color: #c8e6c9 !important;
  border-color: rgba(165,214,167,0.5) !important;
  transform: translateY(-1px);
}

/* حالت فعال برای لینک بلاگ */
.header-nav a.blog-link.disabled {
  background: rgba(165, 214, 167, 0.2) !important;
  color: #c8e6c9 !important;
  border: 2px solid #a5d6a7 !important;
  box-shadow: 0 0 10px rgba(165,214,167,0.4) !important;
}

/* === ۸. دارک مود === */
body.dark-mode .dashboard-panel {
  background: rgba(30, 41, 59, 0.98);
  color: #e2e8f0;
  border-color: rgba(255,255,255,0.08);
}

body.dark-mode .dashboard-header h3,
body.dark-mode .dashboard-content p,
body.dark-mode #auth-container h4,
body.dark-mode .dashboard-panel .main-nav a {
  color: #e2e8f0;
}

body.dark-mode .dashboard-header {
  border-bottom-color: rgba(255,255,255,0.08);
}

body.dark-mode .dashboard-panel .main-nav {
  border-top-color: rgba(255,255,255,0.08);
}

body.dark-mode .dashboard-panel .main-nav a:hover,
body.dark-mode .dashboard-panel .main-nav a:focus-visible {
  background: rgba(201, 168, 76, 0.2);
}

body.dark-mode .dashboard-panel .main-nav a.disabled,
body.dark-mode .dashboard-panel .main-nav a.active {
  background: rgba(201, 168, 76, 0.3);
}

body.dark-mode #auth-container input {
  background: rgba(0,0,0,0.2);
  border-color: rgba(255,255,255,0.1);
  color: #e2e8f0;
}

body.dark-mode #auth-container input:focus {
  border-color: #c9a84c;
}

body.dark-mode .dashboard-overlay {
  background: rgba(0,0,0,0.7);
}

/* === ۹. ریسپانسیو === */
@media (max-width: 768px) {
  .dashboard-toggle {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
  }
  .dashboard-panel {
    width: 280px;
    right: -300px;
  }
}