/* SWA Dashboard — glassmorphism desk */
:root {
  --dash-sidebar-w: 272px;
  --dash-top-h: 68px;
  --dash-radius: 18px;
  --glass-bg: rgba(255, 255, 255, 0.45);
  --glass-bg-strong: rgba(255, 255, 255, 0.62);
  --glass-border: rgba(255, 255, 255, 0.55);
  --glass-shadow: 0 8px 32px rgba(15, 40, 25, 0.1);
  --glass-blur: blur(18px);
}

body.dash-body {
  font-family: var(--font-body, "DM Sans", system-ui, sans-serif);
  color: var(--swa-text, #131615);
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 60% at 10% -10%, rgba(34, 130, 58, 0.28), transparent 50%),
    radial-gradient(ellipse 70% 50% at 95% 20%, rgba(125, 206, 160, 0.35), transparent 45%),
    radial-gradient(ellipse 50% 40% at 50% 100%, rgba(26, 107, 46, 0.12), transparent 50%),
    linear-gradient(160deg, #e8f5ec 0%, #f0f7f2 40%, #e4efe8 100%);
  background-attachment: fixed;
}

.dash-layout {
  display: flex;
  min-height: 100vh;
}

/* ---- Glass sidebar ---- */
.dash-sidebar {
  width: var(--dash-sidebar-w);
  background: rgba(15, 28, 20, 0.78);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  transition: transform 0.32s ease;
  box-shadow: 8px 0 40px rgba(0, 0, 0, 0.12);
}

.dash-brand {
  padding: 1.35rem 1.25rem 1.15rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-brand a {
  font-family: var(--font-head, "Syne", sans-serif);
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff !important;
  text-decoration: none;
}
.dash-brand a span { color: #7dcea0; }
.dash-brand small {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.45);
}

.dash-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 0.65rem;
}
.dash-nav-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  padding: 0.65rem 0.75rem 0.35rem;
}
.dash-nav a {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.72rem 0.85rem;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72) !important;
  font-weight: 500;
  font-size: 0.92rem;
  transition: 0.2s;
  text-decoration: none;
}
.dash-nav a i {
  width: 1.15rem;
  text-align: center;
  font-size: 0.88rem;
  opacity: 0.85;
}
.dash-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
}
.dash-nav a.active {
  background: rgba(34, 130, 58, 0.35);
  color: #fff !important;
  box-shadow: inset 3px 0 0 #7dcea0;
  backdrop-filter: blur(8px);
}
.dash-nav a.nav-external {
  margin-top: 0.35rem;
  opacity: 0.9;
}

.dash-sidebar-footer {
  padding: 1rem 1rem 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.dash-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}
.dash-logout:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---- Main ---- */
.dash-main {
  flex: 1;
  margin-left: var(--dash-sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.dash-topbar {
  height: var(--dash-top-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.75rem;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur) saturate(1.3);
  -webkit-backdrop-filter: var(--glass-blur) saturate(1.3);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 24px rgba(15, 40, 25, 0.06);
}
.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.dash-topbar h1 {
  font-family: var(--font-head, "Syne", sans-serif);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}
.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.dash-topbar-actions .theme-btn {
  padding: 0.45rem 0.95rem;
  font-size: 0.78rem;
  backdrop-filter: blur(8px);
}

.sidebar-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(34, 130, 58, 0.25);
  border-radius: 12px;
  background: var(--glass-bg);
  backdrop-filter: blur(8px);
  color: var(--swa-accent-bright, #22823a);
  cursor: pointer;
}

.dash-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.65rem 0.35rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
}
.dash-user .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #22823a, #1a6b2e);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(34, 130, 58, 0.35);
}
.dash-user .avatar img { width: 100%; height: 100%; object-fit: cover; }
.dash-user .name { font-weight: 600; font-size: 0.92rem; }
.dash-user .role {
  font-size: 0.72rem;
  color: var(--swa-accent-bright, #22823a);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dash-content {
  padding: 1.5rem 1.75rem 2.5rem;
  flex: 1;
}

.dash-section { display: none; }
.dash-section.active {
  display: block;
  animation: dashFade 0.35s ease;
}
@keyframes dashFade {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Glass panels */
.dash-panel,
.stat-card,
.dash-welcome,
.dash-live-card,
.dash-plan-card,
.quiz-card,
.ticket-item,
.fav-item {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur) saturate(1.25);
  -webkit-backdrop-filter: var(--glass-blur) saturate(1.25);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.dash-welcome {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.75rem 2rem;
  margin-bottom: 1.5rem;
  border-radius: var(--dash-radius);
  background:
    linear-gradient(135deg, rgba(15, 40, 25, 0.75), rgba(34, 130, 58, 0.45)),
    rgba(19, 40, 28, 0.5);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.dash-welcome h2 {
  font-family: var(--font-head);
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  margin: 0 0 0.35rem;
}
.dash-welcome p { color: rgba(255, 255, 255, 0.78); margin: 0; max-width: 520px; }
.dash-welcome .big-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  display: grid;
  place-items: center;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.4rem;
  overflow: hidden;
  backdrop-filter: blur(8px);
}
.dash-welcome .big-avatar img { width: 100%; height: 100%; object-fit: cover; }

.stats-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  border-radius: var(--dash-radius);
  padding: 1.15rem 1.2rem;
  transition: 0.22s;
}
.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(34, 130, 58, 0.4);
  box-shadow: 0 12px 36px rgba(34, 130, 58, 0.12);
}
.stat-card .stat-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--swa-muted, #5a6b60);
  margin-bottom: 0.35rem;
}
.stat-card .stat-label i { color: var(--swa-accent-bright, #22823a); }
.stat-card .stat-value {
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
}

.dash-panel {
  border-radius: var(--dash-radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.25rem;
}
.dash-panel-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(34, 130, 58, 0.12);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.dash-panel-title i { color: var(--swa-accent-bright, #22823a); }

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.dash-live-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
}
.dash-live-card {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 1.1rem;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: 0.22s;
}
.dash-live-card:hover {
  border-color: rgba(34, 130, 58, 0.45);
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.7);
}
.dash-live-card i {
  font-size: 1.2rem;
  color: var(--swa-accent-bright, #22823a);
  margin-bottom: 0.25rem;
}
.dash-live-card i.fa-bitcoin { color: #e8940a; }
.dash-live-card i.fa-tv { color: #c62828; }
.dash-live-card strong {
  font-family: var(--font-head);
  font-size: 0.92rem;
}
.dash-live-card span { font-size: 0.78rem; color: var(--swa-muted, #5a6b60); }

.live-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(6px);
}

/* Learn section */
.learn-progress-wrap {
  margin-bottom: 1.5rem;
}
.learn-progress-wrap label {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.learn-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(34, 130, 58, 0.12);
  overflow: hidden;
  border: 1px solid rgba(34, 130, 58, 0.15);
}
.learn-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #1a6b2e, #2ea855);
  border-radius: 999px;
  transition: width 0.45s ease;
  box-shadow: 0 0 12px rgba(34, 130, 58, 0.4);
}

.learn-grades {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.learn-grade {
  border-radius: 14px;
  padding: 1.15rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px);
  transition: 0.22s;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.learn-grade:hover {
  transform: translateY(-2px);
  border-color: rgba(34, 130, 58, 0.35);
  box-shadow: 0 10px 28px rgba(34, 130, 58, 0.1);
}
.learn-grade .num {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(145deg, #22823a, #1a6b2e);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
}
.learn-grade h4 {
  margin: 0;
  font-family: var(--font-head);
  font-size: 1rem;
}
.learn-grade .theme {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--swa-accent-bright, #22823a);
}
.learn-grade p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--swa-muted, #5a6b60);
  flex: 1;
}
.learn-grade .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(34, 130, 58, 0.1);
}
.learn-grade .meta a {
  color: var(--swa-accent-bright, #22823a);
  font-weight: 700;
  text-decoration: none;
}
.learn-grade ul {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  max-height: 140px;
  overflow-y: auto;
}
.learn-grade ul a {
  display: block;
  font-size: 0.8rem;
  color: #3d4843;
  text-decoration: none;
  padding: 0.2rem 0;
}
.learn-grade ul a:hover { color: #22823a; }
.learn-grade ul a.done { color: #1a6b2e; }

/* Forms */
.dash-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}
.dash-form input,
.dash-form textarea,
.dash-form select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid rgba(34, 130, 58, 0.2);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1rem;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(8px);
  transition: 0.2s;
}
.dash-form input:focus,
.dash-form textarea:focus,
.dash-form select:focus {
  outline: none;
  border-color: #22823a;
  box-shadow: 0 0 0 3px rgba(34, 130, 58, 0.15);
}
.dash-form input:disabled { opacity: 0.75; }
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.dash-plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.dash-plan-card {
  border-radius: var(--dash-radius);
  padding: 1.25rem;
  text-align: center;
  transition: 0.22s;
}
.dash-plan-card.current {
  border-color: rgba(34, 130, 58, 0.5);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 32px rgba(34, 130, 58, 0.15);
}
.dash-plan-card h4 {
  font-family: var(--font-head);
  margin: 0 0 0.35rem;
}
.dash-plan-card .amt {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 800;
  color: #22823a;
  margin: 0.5rem 0 1rem;
}
.dash-plan-card .amt span {
  font-size: 0.9rem;
  color: var(--swa-muted);
  font-weight: 500;
}
.dash-plan-card ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  text-align: left;
  font-size: 0.88rem;
  color: var(--swa-muted);
}
.dash-plan-card li { padding: 0.25rem 0; }
.dash-plan-card li::before { content: "✓ "; color: #22823a; font-weight: 700; }

.plan-current-banner {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: rgba(34, 130, 58, 0.12);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #22823a;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(34, 130, 58, 0.2);
}

.activity-list { max-height: 420px; overflow-y: auto; }
.activity-item {
  display: flex;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(34, 130, 58, 0.1);
}
.activity-item:last-child { border-bottom: none; }
.activity-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: rgba(34, 130, 58, 0.12);
  color: #22823a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.activity-meta { font-size: 0.82rem; color: var(--swa-muted); margin-top: 0.15rem; }

.ticket-item, .fav-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.65rem;
}
.btn-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(34, 130, 58, 0.25);
  background: rgba(255, 255, 255, 0.5);
  color: #22823a;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
}
.btn-icon:hover {
  background: rgba(34, 130, 58, 0.12);
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-success { background: rgba(34, 130, 58, 0.15); color: #145524; }
.badge-warning { background: rgba(255, 193, 7, 0.2); color: #8a6d00; }
.badge-info { background: rgba(33, 150, 243, 0.15); color: #1565c0; }

.empty-state {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--swa-muted);
}
.empty-state i {
  font-size: 2rem;
  color: #22823a;
  opacity: 0.5;
  margin-bottom: 0.65rem;
  display: block;
}

.settings-group { margin-bottom: 1.5rem; }
.settings-group h4 {
  font-family: var(--font-head);
  font-size: 0.95rem;
  margin-bottom: 0.65rem;
}
.toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(34, 130, 58, 0.1);
  font-size: 0.92rem;
}
.toggle-row input { accent-color: #22823a; width: 18px; height: 18px; }

.quiz-card {
  border-radius: 14px;
  padding: 1.25rem;
}
.quiz-card #q-text {
  font-family: var(--font-head);
  font-size: 1.05rem;
  margin: 0 0 1rem;
}
.quiz-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--swa-muted);
  margin-bottom: 0.85rem;
}
.quiz-opt {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.8rem 1rem;
  margin-bottom: 0.45rem;
  border: 1px solid rgba(34, 130, 58, 0.2);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  transition: 0.2s;
}
.quiz-opt:hover { border-color: #22823a; }
.quiz-opt.correct { border-color: #22823a; background: rgba(34, 130, 58, 0.15); }
.quiz-opt.wrong { border-color: #c62828; background: rgba(198, 40, 40, 0.1); }

.dash-toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.85rem 1.15rem;
  border-radius: 14px;
  background: rgba(19, 40, 28, 0.9);
  backdrop-filter: blur(12px);
  color: #fff;
  font-size: 0.9rem;
  z-index: 9999;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: dashFade 0.3s ease;
}
.dash-toast.error { background: rgba(198, 40, 40, 0.92); }
.dash-toast.success { background: rgba(34, 130, 58, 0.92); }

.dash-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(4px);
  z-index: 150;
}
.dash-backdrop.show { display: block; }

/* ---- Brand row + close ---- */
.dash-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.sidebar-close-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.sidebar-close-btn:hover { background: rgba(255, 255, 255, 0.16); }

.sidebar-pin {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(34, 130, 58, 0.25);
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(8px);
  color: #22823a;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: 0.2s;
}
.sidebar-pin:hover {
  background: rgba(34, 130, 58, 0.12);
  transform: scale(1.05);
}
body.sidebar-collapsed .sidebar-pin i {
  transform: rotate(180deg);
}

/* Desktop collapse sidebar */
@media (min-width: 769px) {
  .sidebar-toggle { display: none; }
  body.sidebar-collapsed .dash-sidebar {
    transform: translateX(-100%);
  }
  body.sidebar-collapsed .dash-main {
    margin-left: 0;
  }
  body.sidebar-collapsed .sidebar-toggle {
    display: grid;
    place-items: center;
  }
  .dash-sidebar {
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .dash-main {
    transition: margin-left 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  }
}

/* ---- Collapsible nav categories ---- */
.nav-cat {
  margin-bottom: 0.35rem;
}
.nav-cat-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s;
}
.nav-cat-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nav-cat-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
}
.nav-cat-toggle .cat-chevron {
  font-size: 0.65rem;
  transition: transform 0.25s ease;
}
.nav-cat.open .nav-cat-toggle .cat-chevron {
  transform: rotate(180deg);
}
.nav-cat-body {
  display: none;
  padding: 0.25rem 0 0.35rem;
}
.nav-cat.open .nav-cat-body {
  display: block;
  animation: dashFade 0.25s ease;
}
.dash-nav-label { display: none; }

/* ---- Panel open/close ---- */
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0;
}
.panel-head .dash-panel-title {
  margin: 0;
  padding: 0;
  border: none;
  flex: 1;
}
.panel-toggle {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(34, 130, 58, 0.2);
  background: rgba(255, 255, 255, 0.4);
  color: #22823a;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: 0.2s;
}
.panel-toggle:hover { background: rgba(34, 130, 58, 0.12); }
.panel-toggle i { transition: transform 0.25s ease; }
.dash-panel.is-collapsed .panel-toggle i { transform: rotate(180deg); }
.dash-panel.is-collapsed .panel-body { display: none; }
.dash-panel .panel-body { margin-top: 1rem; }

/* ---- 3D floating strip ---- */
.dash-3d-strip {
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 3vw, 2rem);
  margin: 0 0 1.5rem;
  perspective: 800px;
}
.float-3d {
  filter: drop-shadow(0 14px 24px rgba(15, 40, 25, 0.25));
  animation: floatY 4s ease-in-out infinite;
  transform: translateZ(20px);
  transition: transform 0.3s ease;
}
.float-3d:hover {
  transform: translateY(-8px) scale(1.08) rotateY(8deg);
}
.float-3d.delay-1 { animation-delay: 0.4s; }
.float-3d.delay-2 { animation-delay: 0.8s; }
.float-3d.delay-3 { animation-delay: 1.2s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- 3D category cards ---- */
.cat-3d-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  perspective: 1000px;
}
.cat-3d-grid.large {
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.cat-3d-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
  padding: 1.35rem 1rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.65), rgba(255, 255, 255, 0.28));
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  box-shadow:
    0 10px 30px rgba(15, 40, 25, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: inherit;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
  transform-style: preserve-3d;
  transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.2s;
}
.cat-3d-card img {
  filter: drop-shadow(0 12px 18px rgba(15, 40, 25, 0.28));
  transform: translateZ(24px);
  transition: transform 0.28s ease;
  pointer-events: none;
}
.cat-3d-card strong {
  font-family: var(--font-head, "Syne", sans-serif);
  font-size: 0.95rem;
  transform: translateZ(12px);
}
.cat-3d-card span:not(.cat-badge) {
  font-size: 0.75rem;
  color: var(--swa-muted, #5a6b60);
  line-height: 1.3;
}
.cat-3d-card:hover {
  transform: translateY(-8px) rotateX(4deg) scale(1.03);
  border-color: rgba(34, 130, 58, 0.45);
  box-shadow:
    0 20px 40px rgba(34, 130, 58, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.cat-3d-card:hover img {
  transform: translateZ(40px) translateY(-6px) scale(1.08);
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  padding: 0.35rem 0.55rem;
  border-radius: 10px;
  background: linear-gradient(145deg, #22823a, #1a6b2e);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: 0 8px 18px rgba(34, 130, 58, 0.35);
  margin-bottom: 0.25rem;
}

/* Learn grade highlight when filtered */
.learn-grade.is-dim {
  opacity: 0.35;
  filter: grayscale(0.4);
}
.learn-grade.is-focus {
  border-color: rgba(34, 130, 58, 0.5);
  box-shadow: 0 12px 32px rgba(34, 130, 58, 0.15);
  transform: translateY(-2px);
}

@media (max-width: 1100px) {
  .stats-cards { grid-template-columns: repeat(2, 1fr); }
  .dash-live-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-plans { grid-template-columns: 1fr; }
  .dash-3d-strip { display: none; }
}

@media (max-width: 768px) {
  .dash-sidebar { transform: translateX(-100%); }
  .dash-sidebar.open { transform: translateX(0); }
  .dash-main { margin-left: 0; }
  .sidebar-toggle { display: grid; place-items: center; }
  .sidebar-pin { display: none; }
  .sidebar-close-btn { display: grid; }
  .dash-welcome { grid-template-columns: 1fr; text-align: center; }
  .dash-welcome .big-avatar { margin: 0 auto; }
  .form-row { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: 1fr; }
  .dash-live-grid { grid-template-columns: 1fr; }
  .dash-user .meta { display: none; }
  .dash-topbar { padding: 0 1rem; }
  .dash-content { padding: 1rem; }
  .cat-3d-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 769px) {
  .sidebar-close-btn { display: none; }
}
