* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Tahoma, Arial, sans-serif;
  background: #f7fbff;
  color: #17233c;
}

.page {
  min-height: 100vh;
  direction: rtl;
}

.sidebar {
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  width: 210px;
  height: 100vh;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  border-radius: 0 0 0 28px;
  padding: 24px 18px;
  box-shadow: -12px 0 40px rgba(15, 23, 42, 0.08);
  overflow-y: auto;
}

.main {
  padding: 28px 34px;
  margin-right: 210px;
  overflow: hidden;
}

.logo-box {
  text-align: center;
  padding-bottom: 22px;
  border-bottom: 1px solid #edf2f7;
}

.logo-box img {
  width: 78px;
  height: 78px;
  object-fit: contain;
}

.logo-box h2 {
  margin: 8px 0 0;
  font-size: 23px;
  color: #0f2d5c;
}

.menu {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.menu a {
  height: 52px;
  padding: 0 15px;
  border-radius: 16px;
  color: #334155;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 17px;
  font-weight: 700;
  transition: 0.25s;
}

.menu a i {
  font-size: 23px;
}

.menu a:hover,
.menu a.active {
  background: #eaf3ff;
  color: #2563eb;
}

.menu a.active {
  box-shadow: inset 0 0 0 1px #dbeafe;
}

.menu .logout {
  margin-top: 18px;
  color: #ef4444;
}

.top {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.notify {
  width: 54px;
  height: 54px;
  border: none;
  border-radius: 17px;
  background: white;
  color: #1e3a8a;
  font-size: 25px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.student {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student h3 {
  margin: 0;
  font-size: 19px;
}

.student p {
  margin: 6px 0 0;
  color: #64748b;
}

.student img {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  object-fit: cover;
  background: #eaf3ff;
}

.change-avatar {
  display: inline-block;
  margin-top: 8px;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 10px;
  background: #2563eb;
  color: white;
  cursor: pointer;
}

.hero {
  height: 380px;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  background: white;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  margin-bottom: 28px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), rgba(255,255,255,0.92) 72%);
}

.hero-text {
  position: absolute;
  z-index: 2;
  right: 70px;
  top: 40px;
  max-width: 430px;
  text-align: center;
}

.hero-text h1 {
  font-size: 55px;
  line-height: 1.3;
  margin: 0;
  color: #0f2d5c;
  font-weight: 900;
}

.hero-text p {
  font-size: 19px;
  color: #64748b;
  line-height: 1.9;
  margin: 14px 0 24px;
}

.hero-btn {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  color: white;
  padding: 15px 44px;
  border-radius: 18px;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 16px 30px rgba(37, 99, 235, 0.25);
}

.quick-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-bottom: 28px;
}

.quick-card {
  min-height: 150px;
  border-radius: 24px;
  padding: 22px;
  display: grid;
  grid-template-columns: 60px 1fr;
  position: relative;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
  transition: 0.25s;
}

.quick-card:hover {
  transform: translateY(-6px);
}

.quick-card.blue {
  background: linear-gradient(135deg, #eef8ff, #dff1ff);
}

.quick-card.green {
  background: linear-gradient(135deg, #effff3, #e6fbe9);
}

.quick-card.purple {
  background: linear-gradient(135deg, #fbf3ff, #f1e8ff);
}

.quick-card.yellow {
  background: linear-gradient(135deg, #fff9df, #fff0c5);
}

.quick-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quick-icon i {
  font-size: 34px;
  color: #2563eb;
}

.quick-card.green .quick-icon i {
  color: #22c55e;
}

.quick-card.purple .quick-icon i {
  color: #7c3aed;
}

.quick-card.yellow .quick-icon i {
  color: #f59e0b;
}

.quick-card h3 {
  margin: 0 0 8px;
  font-size: 22px;
}

.quick-card p {
  margin: 0;
  color: #64748b;
  line-height: 1.6;
}

.quick-card a {
  position: absolute;
  left: 22px;
  bottom: 18px;
  width: 36px;
  height: 36px;
  background: #2563eb;
  border-radius: 50%;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.quick-card.green a {
  background: #22c55e;
}

.quick-card.purple a {
  background: #7c3aed;
}

.quick-card.yellow a {
  background: #f59e0b;
}

.bottom-area {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 24px;
}

.continue-box,
.achievement-box {
  background: white;
  border-radius: 26px;
  padding: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.section-head h3 {
  margin: 0;
  font-size: 22px;
}

.section-head i {
  font-size: 28px;
  color: #2563eb;
}

.story-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.story-card {
  border-radius: 18px;
  overflow: hidden;
  background: #fbfdff;
  box-shadow: inset 0 0 0 1px #eef2f7;
  padding-bottom: 14px;
}

.story-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
}

.story-card h4 {
  margin: 12px 12px 10px;
  font-size: 15px;
  color: #17233c;
}

.progress {
  width: calc(100% - 24px);
  height: 7px;
  border-radius: 999px;
  background: #e5e7eb;
  margin: 0 12px 8px;
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  background: #2563eb;
  border-radius: inherit;
}

.green-line span {
  background: #22c55e;
}

.purple-line span {
  background: #7c3aed;
}

.yellow-line span {
  background: #f59e0b;
}

.story-card strong {
  display: block;
  text-align: left;
  padding-left: 14px;
  color: #2563eb;
}

.achievement-box {
  text-align: center;
}

.achievement-box h3 {
  margin: 0 0 22px;
  font-size: 22px;
}

.medal {
  width: 150px;
  height: 150px;
  margin: auto;
  border-radius: 28px;
  background: linear-gradient(135deg, #fff6d8, #fff0b8);
  display: flex;
  align-items: center;
  justify-content: center;
}

.medal i {
  font-size: 88px;
  color: #f59e0b;
}

.achievement-box h4 {
  margin: 18px 0 8px;
  font-size: 22px;
}

.achievement-box p {
  margin: 0;
  color: #64748b;
}

@media (max-width: 1100px) {
  .quick-cards,
  .story-list {
    grid-template-columns: repeat(2, 1fr);
  }

  .bottom-area {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .page {
    display: flex;
    flex-direction: column;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    min-height: auto;
    border-radius: 0;
  }

  .menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .main {
    padding: 20px;
    margin-right: 0;
  }

  .hero {
    height: 430px;
  }

  .hero::after {
    background: rgba(255, 255, 255, 0.72);
  }

  .hero-text {
    right: 20px;
    left: 20px;
    top: 45px;
  }

  .hero-text h1 {
    font-size: 38px;
  }

  .quick-cards,
  .story-list {
    grid-template-columns: 1fr;
  }
}
.msg-badge {
  background: red;
  color: white;
  font-size: 12px;
  border-radius: 50%;
  padding: 4px 8px;
  margin-right: auto;
  display: none;
}
.notify-box {
  position: relative;
  z-index: 99999;
}

.updates-panel {
  position: absolute;
  top: 65px;
  right: 0;
  width: 330px;
  background: white;
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.25);
  border: 1px solid #e6ecf5;
  display: none;
  z-index: 999999;
}

.updates-panel.show {
  display: block;
}

.updates-panel h3 {
  margin: 0 0 12px;
  color: #0f2d5c;
  font-size: 20px;
}

#updatesList {
  color: #334155;
  font-size: 15px;
  font-weight: bold;
}

.update-item {
  padding: 12px;
  border-radius: 12px;
  background: #f8fbff;
  margin-bottom: 10px;
  color: #334155;
  border: 1px solid #e2e8f0;
}