@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@200;300;400;500;700;800;900&display=swap");

:root {
  --middle_blue: #26428b;
  --light_blue: #516ac8;
  --dark_blue: #101b3b;
  --page_yellow: #e3af64;
  --light_yellow: #faebd7;
  --white_color: #ffffff;
  --dark_color: #000000;
  --border_color: #eee;
  --border_radius: 10px;
  --primary_font: "Tajawal", sans-serif;
  --sidebar_width: 290px;
  --surface_color: #f8f9ff;
  --muted_text: #6b7280;
  --glow_blue: rgba(81, 106, 200, 0.35);
  --glow_dark: rgba(16, 27, 59, 0.08);
}

html {
  scroll-behavior: smooth;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
input {
  outline: 0 !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--primary_font);
  background: linear-gradient(180deg, var(--surface_color), #ffffff);
  color: var(--dark_blue);
  direction: rtl;
  transition: background 0.4s ease, color 0.4s ease;
}

a {
  text-decoration: none;
  color: var(--dark_blue);
}

img {
  max-width: 100%;
  display: block;
}

.dashboard-layout {
  display: flex;
  min-height: 100vh;
  background: linear-gradient(135deg, rgba(250, 235, 215, 0.25), rgba(81, 106, 200, 0.08));
}

.sidebar {
  width: var(--sidebar_width);
  background: var(--white_color);
  border-left: 1px solid rgba(16, 27, 59, 0.05);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  max-height: 100vh;
  box-shadow: 24px 0 60px rgba(16, 27, 59, 0.05);
}

.sidebar__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sidebar__logo .logo-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--page_yellow), var(--light_yellow));
  display: grid;
  place-items: center;
  color: var(--dark_blue);
  font-weight: 800;
  font-size: 1.2rem;
}

.sidebar__logo span {
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--dark_blue);
}

.sidebar__nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sidebar__nav li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--border_radius);
  color: var(--muted_text);
  font-weight: 500;
  transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.sidebar__nav li a i {
  font-size: 1.2rem;
  color: var(--middle_blue);
}

.sidebar__nav li a.active,
.sidebar__nav li a:hover {
  background: rgba(81, 106, 200, 0.12);
  color: var(--dark_blue);
  transform: translateX(-6px);
  box-shadow: inset 0 0 0 1px rgba(81, 106, 200, 0.2);
}

.sidebar__bottom {
  margin-top: auto;
  padding-top: 32px;
  border-top: 1px solid rgba(16, 27, 59, 0.05);
}

.sidebar__plan-card {
  background: linear-gradient(145deg, rgba(250, 235, 215, 0.95), rgba(227, 175, 100, 0.55));
  padding: 20px;
  border-radius: var(--border_radius);
  color: var(--dark_blue);
  box-shadow: 0 25px 45px rgba(16, 27, 59, 0.1);
}

.sidebar__plan-card p {
  margin: 0;
  font-size: 0.9rem;
}

.sidebar__plan-card h4 {
  margin: 8px 0;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--middle_blue), var(--light_blue));
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--white_color);
  box-shadow: 0 15px 30px rgba(81, 106, 200, 0.3);
}

.primary-btn i {
  font-size: 1rem;
}

.ghost-btn {
  background: transparent;
  color: var(--middle_blue);
  border: 1px solid rgba(38, 66, 139, 0.2);
  box-shadow: none;
}

.ghost-btn:hover {
  background: rgba(81, 106, 200, 0.12);
}

.dashboard-main {
  flex: 1;
  padding: 32px 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(250, 235, 215, 0.35));
  /* background: linear-gradient(180deg, rgba(21, 21, 51, 0.95), rgba(250, 235, 215, 0.35)); */
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--white_color);
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(16, 27, 59, 0.08);
  box-shadow: 0 10px 25px rgba(16, 27, 59, 0.08);
}

.search-bar i {
  color: var(--middle_blue);
  font-size: 1.1rem;
}

.search-bar input {
  background: transparent;
  border: none;
  color: var(--dark_blue);
  width: 100%;
  font-size: 1rem;
}

.search-bar input::placeholder {
  color: var(--muted_text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--white_color);
  display: grid;
  place-items: center;
  color: var(--middle_blue);
  border: 1px solid rgba(81, 106, 200, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 20px rgba(16, 27, 59, 0.1);
}

.icon-btn:hover {
  transform: translateY(-2px);
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(81, 106, 200, 0.3);
  background: var(--white_color);
  color: var(--dark_blue);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 168px;
  overflow: hidden;
  transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.theme-toggle__icon i {
  color: var(--middle_blue);
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.theme-toggle__thumb {
  width: 38px;
  height: 18px;
  border-radius: 999px;
  background: rgba(81, 106, 200, 0.2);
  position: relative;
  margin-inline-start: auto;
  transition: background 0.3s ease;
}

.theme-toggle__thumb::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white_color);
  inset-inline-start: 2px;
  top: 50%;
  transform: translateY(-50%);
  transition: inset-inline-start 0.3s ease, background 0.3s ease;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

.theme-toggle.is-dark {
  border-color: rgba(227, 175, 100, 0.45);
}

.theme-toggle.is-dark .theme-toggle__icon i {
  color: var(--page_yellow);
}

.theme-toggle.is-dark .theme-toggle__thumb {
  background: rgba(227, 175, 100, 0.35);
}

.theme-toggle.is-dark .theme-toggle__thumb::after {
  inset-inline-start: calc(100% - 16px);
  background: var(--page_yellow);
}

.profile-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: var(--white_color);
  border-radius: 999px;
  border: 1px solid rgba(16, 27, 59, 0.05);
  box-shadow: 0 12px 25px rgba(16, 27, 59, 0.08);
}

.profile-chip img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--page_yellow);
}

.profile-chip .info {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

main {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.hero-card {
  background: radial-gradient(circle at top, rgba(81, 106, 200, 0.18), rgba(250, 235, 215, 0.75));
  border-radius: 28px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(16, 27, 59, 0.12);
  color: var(--dark_blue);
}

.hero-card::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: rgba(227, 175, 100, 0.3);
  top: -40px;
  inset-inline-end: -60px;
  filter: blur(8px);
  animation: floatOrb 6s ease-in-out infinite;
}

.hero-card h1 {
  margin: 0 0 12px;
  font-size: 2.2rem;
}

.hero-card p {
  margin: 0;
  max-width: 620px;
  color: rgba(16, 27, 59, 0.75);
  line-height: 1.7;
}

.hero-card .actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.stat-card {
  background: var(--white_color);
  border-radius: 22px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(16, 27, 59, 0.05);
  box-shadow: 0 20px 45px rgba(16, 27, 59, 0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 0;
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(81, 106, 200, 0.25), rgba(227, 175, 100, 0.15));
  opacity: 0.55;
  mix-blend-mode: screen;
  background-size: 200% 200%;
  animation: shimmer 6s linear infinite;
  pointer-events: none;
  z-index: 0;
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 25px 50px rgba(16, 27, 59, 0.12);
}

.stat-card span {
  color: var(--muted_text);
  font-size: 0.9rem;
}

.stat-card strong {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark_blue);
}

.stat-card small {
  color: var(--page_yellow);
}

.stat-card .icon {
  position: absolute;
  inset-inline-end: 16px;
  bottom: 16px;
  font-size: 2.4rem;
  color: rgba(81, 106, 200, 0.15);
}

.panel-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

.panel {
  background: var(--white_color);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border: 1px solid rgba(16, 27, 59, 0.05);
  box-shadow: 0 18px 40px rgba(16, 27, 59, 0.08);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  z-index: 0;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: inherit;
  border: 1px dashed rgba(81, 106, 200, 0.15);
  pointer-events: none;
  animation: pulseBorder 4s ease-in-out infinite;
  z-index: 0;
}

.panel:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(16, 27, 59, 0.12);
}

.panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.progress-list,
.events-list,
.announcements,
.leaderboard {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.progress-item,
.event-item,
.announcement-item,
.leaderboard-item {
  background: var(--surface_color);
  padding: 14px 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(16, 27, 59, 0.05);
}

.progress-item .bar {
  flex: 1;
  height: 8px;
  background: rgba(16, 27, 59, 0.08);
  border-radius: 999px;
  overflow: hidden;
}

.progress-item .bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--page_yellow), var(--light_blue));
}

.progress-item strong {
  min-width: 52px;
  text-align: left;
  color: var(--dark_blue);
}

.schedule-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.course-chip {
  background: rgba(81, 106, 200, 0.08);
  border: 1px solid rgba(81, 106, 200, 0.22);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: inset 0 0 0 1px rgba(16, 27, 59, 0.05);
}

.course-chip span {
  color: var(--muted_text);
  font-size: 0.85rem;
}

.course-chip strong {
  font-size: 1.1rem;
  color: var(--dark_blue);
}

.announcement-item p {
  margin: 0;
  color: var(--muted_text);
}

.leaderboard-item {
  gap: 18px;
}

.leaderboard-item .badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(227, 175, 100, 0.25);
  display: grid;
  place-items: center;
  font-weight: 700;
  color: var(--page_yellow);
  box-shadow: 0 10px 18px rgba(227, 175, 100, 0.25);
}

.leaderboard-item strong {
  flex: 1;
  color: var(--dark_blue);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.timeline-card {
  background: var(--surface_color);
  border-radius: 20px;
  padding: 18px;
  position: relative;
  border: 1px solid rgba(16, 27, 59, 0.05);
}

.timeline-card::before {
  content: "";
  position: absolute;
  inset-inline-start: 18px;
  top: 20px;
  bottom: 20px;
  width: 2px;
  background: rgba(81, 106, 200, 0.25);
}

.timeline-step {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  position: relative;
}

.timeline-step::before {
  content: "";
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--page_yellow);
  background: var(--white_color);
  margin-top: 4px;
  box-shadow: 0 0 0 6px rgba(227, 175, 100, 0.2);
}

.timeline-step strong {
  font-size: 1rem;
}

footer {
  text-align: center;
  color: var(--muted_text);
  padding: 24px 0 12px;
}

body[data-theme="dark"] {
  --surface_color: #111a32;
  --white_color: #081126;
  --dark_blue: #f4f6ff;
  --muted_text: rgba(244, 246, 255, 0.65);
  --border_color: rgba(255, 255, 255, 0.08);
  /* background: radial-gradient(circle at top, rgba(20, 32, 78, 0.6), rgba(5, 8, 18, 0.95)); */
  color: var(--dark_blue);
}

body[data-theme="dark"] .dashboard-layout {
  background: linear-gradient(135deg, rgba(15, 25, 52, 0.85), rgba(5, 8, 18, 0.7));
}

body[data-theme="dark"] .sidebar {
  background: rgba(6, 11, 28, 0.95);
  border-left: 1px solid rgba(255, 255, 255, 0.04);
  box-shadow: 24px 0 60px rgba(0, 0, 0, 0.6);
}

body[data-theme="dark"] .sidebar__nav li a {
  color: var(--muted_text);
}

body[data-theme="dark"] .sidebar__nav li a.active,
body[data-theme="dark"] .sidebar__nav li a:hover {
  background: rgba(81, 106, 200, 0.2);
  box-shadow: inset 0 0 0 1px rgba(81, 106, 200, 0.4);
}

body[data-theme="dark"] .sidebar__plan-card {
  background: linear-gradient(145deg, rgba(227, 175, 100, 0.35), rgba(227, 175, 100, 0.12));
  color: var(--dark_blue);
}

body[data-theme="dark"] .search-bar,
body[data-theme="dark"] .profile-chip,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .panel,
body[data-theme="dark"] .hero-card,
body[data-theme="dark"] .timeline-card {
  background: rgba(11, 18, 40, 0.95);
  border-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.45);
}

body[data-theme="dark"] .stat-card small {
  color: var(--page_yellow);
}

body[data-theme="dark"] .course-chip {
  background: rgba(81, 106, 200, 0.18);
  border-color: rgba(81, 106, 200, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .progress-item,
body[data-theme="dark"] .announcement-item,
body[data-theme="dark"] .leaderboard-item {
  border-color: rgba(255, 255, 255, 0.05);
}

body[data-theme="dark"] .timeline-card::before {
  background: rgba(227, 175, 100, 0.35);
}

body[data-theme="dark"] .icon-btn {
  color: var(--light_yellow);
  border-color: rgba(227, 175, 100, 0.35);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.35);
}

body[data-theme="dark"] .profile-chip img {
  border-color: var(--page_yellow);
}

body[data-theme="dark"] .primary-btn {
  box-shadow: 0 20px 35px rgba(1, 3, 12, 0.65);
}

body[data-theme="dark"] footer {
  color: rgba(244, 246, 255, 0.6);
}

:root {
  --middle_blue: #26428b;
  --light_blue: #516ac8;
  --dark_blue: #101b3b;
  --page_yellow: #e3af64;
  --light_yellow: #faebd7;
  --white_color: #ffffff;
  --dark_color: #000000;
  --border_color: #eee;
  --border_radius: 10px;
  --primary_font: "Tajawal", sans-serif;
  --sidebar_width: 290px;
  --surface_color: #f8f9ff;
  --muted_text: #6b7280;
  --glow_blue: rgba(81, 106, 200, 0.35);
  --glow_dark: rgba(16, 27, 59, 0.08);
}
