:root {
  --blue: #1A4D7C;
  --light-blue: #A5BCD6;
  --cream: #F5EFC6;
  --red: #4D0E12;
  --brown: #4A2E27;
  --dark: #231815;
  --white: #FFFFFF;
  --muted: #777777;
  --border: #E8E5DC;
  --background: #F8F9FC;
  --shadow: 0 5px 20px rgba(35, 24, 21, 0.06);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--background);
  color: var(--dark);
}

a {
  text-decoration: none;
  color: inherit;
}

button,
select {
  font: inherit;
}

/* Main layout */

.dashboard-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */

.sidebar {
  width: 260px;
  min-width: 260px;
  background: var(--white);
  border-right: 1px solid var(--border);
  padding: 25px 18px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  margin-bottom: 35px;
  font-family: 'Montserrat', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: var(--blue);
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 10px;
  background: #F4F7FA;
  border-radius: 12px;
  margin-bottom: 30px;
  overflow: hidden;
}

.profile-avatar,
.top-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  border-radius: 50%;
  background: var(--blue);
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 800;
  font-size: 15px;
}

.sidebar-profile strong {
  display: block;
  font-size: 13px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.sidebar-profile span {
  color: var(--muted);
  font-size: 11px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.nav-label {
  color: #9A9A9A;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.3px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-label-spaced {
  margin-top: 25px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px;
  color: #666;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  transition: 0.2s;
}

.nav-link i {
  width: 18px;
  text-align: center;
  font-size: 15px;
}

.nav-link:hover,
.nav-link.active {
  color: var(--blue);
  background: #EAF1F8;
}

.sidebar-bottom {
  margin-top: auto;
}

.help-card {
  background: #F4F7FA;
  padding: 17px;
  border-radius: 12px;
  margin: 30px 0 20px;
}

.help-card > i {
  color: var(--blue);
  font-size: 20px;
  margin-bottom: 10px;
}

.help-card strong {
  display: block;
  font-size: 13px;
}

.help-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
  margin: 6px 0 12px;
}

.help-card a {
  font-size: 11px;
  color: var(--blue);
  font-weight: 800;
}

.logout-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  color: var(--red);
  font-size: 13px;
  font-weight: 800;
  border-radius: 9px;
}

.logout-link:hover {
  background: #FFF0F0;
}

/* Main content */

.main-content {
  flex: 1;
  min-width: 0;
}

.topbar {
  height: 82px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 15px 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topbar-left,
.topbar-right,
.top-profile {
  display: flex;
  align-items: center;
}

.topbar-left {
  gap: 15px;
}

.topbar-small {
  display: block;
  color: var(--blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.5px;
  margin-bottom: 4px;
}

.topbar h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  font-weight: 800;
}

.topbar-right {
  gap: 20px;
}

.notification-btn {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brown);
  background: #F5F5F5;
  border-radius: 50%;
}

.top-profile {
  gap: 10px;
}

.top-profile-info strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
}

.top-profile-info span {
  color: var(--muted);
  font-size: 10px;
}

.menu-toggle {
  display: none;
  border: 0;
  background: transparent;
  color: var(--blue);
  font-size: 20px;
  cursor: pointer;
}

/* Content wrapper */

.content-wrapper {
  max-width: 1450px;
  margin: auto;
  padding: 35px 38px;
}

.welcome-banner {
  background: var(--blue);
  color: white;
  border-radius: 18px;
  padding: 38px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  margin-bottom: 35px;
  overflow: hidden;
}

.welcome-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--cream);
}

.welcome-banner h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(25px, 3vw, 35px);
  margin: 12px 0;
}

.welcome-banner p {
  max-width: 580px;
  font-size: 13px;
  line-height: 1.8;
  opacity: 0.9;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--cream);
  color: var(--blue);
  padding: 12px 18px;
  border-radius: 8px;
  margin-top: 20px;
  font-size: 12px;
  font-weight: 800;
}

.primary-button:hover {
  transform: translateY(-2px);
}

.welcome-art {
  font-size: 105px;
  color: rgba(255, 255, 255, 0.2);
  padding: 15px 35px;
}

/* Section headings */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 20px;
}

.section-label {
  display: block;
  color: var(--blue);
  font-size: 9px;
  letter-spacing: 1.4px;
  font-weight: 800;
  margin-bottom: 6px;
}

.section-heading h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 19px;
  font-weight: 800;
}

.view-all {
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.view-all i {
  margin-left: 5px;
}

/* Overview */

.overview-section,
.content-section {
  margin-bottom: 35px;
}

.overview-grid,
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
}

.overview-card,
.summary-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 21px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
}

.overview-card {
  transition: 0.2s;
}

.overview-card:hover {
  transform: translateY(-3px);
  border-color: var(--light-blue);
}

.overview-icon,
.summary-icon {
  width: 47px;
  height: 47px;
  min-width: 47px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
}

.icon-blue,
.summary-icon.blue {
  color: var(--blue);
  background: #E8F0F8;
}

.icon-yellow,
.summary-icon.yellow {
  color: #9A7410;
  background: #FFF6D9;
}

.icon-red,
.summary-icon.red {
  color: var(--red);
  background: #FBEAEC;
}

.overview-card span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.overview-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 20px;
  margin: 4px 0;
}

.overview-card small {
  font-size: 10px;
  color: var(--muted);
}

.summary-card p {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.summary-card h2 {
  font-family: 'Montserrat', sans-serif;
  font-size: 23px;
  margin-top: 5px;
}

/* Page intro */

.page-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 28px 30px;
  margin-bottom: 25px;
  box-shadow: var(--shadow);
}

.page-intro h1 {
  font-family: 'Montserrat', sans-serif;
  font-size: 27px;
  margin: 7px 0;
}

.page-intro p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.intro-icon {
  width: 65px;
  height: 65px;
  border-radius: 15px;
  background: #EAF1F8;
  color: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

/* Assignment and event summaries */

.summary-grid {
  margin-bottom: 30px;
}

/* Dynamic cards */

.dynamic-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dynamic-card {
  display: flex;
  gap: 17px;
  padding: 21px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow);
  transition: 0.2s;
}

.dynamic-card:hover {
  border-color: var(--light-blue);
  transform: translateY(-2px);
}

.dynamic-card-icon {
  width: 45px;
  height: 45px;
  min-width: 45px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.assignment-color {
  color: var(--blue);
  background: #E8F0F8;
}

.announcement-color {
  color: var(--red);
  background: #FBEAEC;
}

.event-color {
  color: #96710D;
  background: #FFF6D9;
}

.dynamic-card-content {
  flex: 1;
  min-width: 0;
}

.dynamic-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.dynamic-card h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: 5px;
}

.dynamic-card-content > p {
  color: #666;
  font-size: 12px;
  line-height: 1.7;
  margin: 9px 0;
  overflow-wrap: anywhere;
}

.subject-label {
  color: var(--blue);
  font-size: 10px;
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  background: #EAF1F8;
  color: var(--blue);
  border-radius: 30px;
  padding: 6px 10px;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.past-due {
  background: #FBEAEC;
  color: var(--red);
}

.status-pill.no-date {
  background: #F1F1F1;
  color: #777;
}

.announcement-pill {
  background: #FBEAEC;
  color: var(--red);
}

.event-pill {
  background: #FFF6D9;
  color: #8B6810;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 10px;
}

.card-meta i {
  margin-right: 5px;
  color: var(--blue);
}

/* Empty states */

.empty-state {
  text-align: center;
  padding: 55px 25px;
  background: white;
  border: 1px dashed #D9DDE3;
  border-radius: 15px;
}

.empty-state > i {
  font-size: 40px;
  color: var(--light-blue);
  margin-bottom: 15px;
}

.empty-state h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 17px;
  margin-bottom: 8px;
}

.empty-state p {
  max-width: 480px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}

.compact-empty {
  padding: 35px 20px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 20px;
  padding: 11px 17px;
  background: var(--blue);
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}

.back-button:hover {
  background: var(--red);
}

/* Filter */

.filter-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  color: var(--dark);
  padding: 10px 13px;
  font-size: 11px;
  font-weight: 700;
  outline: none;
}

/* Footer */

.dashboard-footer {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
}

.dashboard-footer a {
  color: var(--red);
  font-weight: 800;
}

/* Utility */

[hidden] {
  display: none !important;
}

.sidebar-overlay {
  display: none;
}

/* Responsive */

@media (max-width: 1050px) {
  .sidebar {
    width: 235px;
    min-width: 235px;
  }

  .content-wrapper {
    padding: 25px;
  }

  .topbar {
    padding: 15px 25px;
  }

  .overview-grid,
  .summary-grid {
    gap: 10px;
  }

  .overview-card,
  .summary-card {
    padding: 15px;
  }
}

@media (max-width: 800px) {
  .dashboard-layout {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: -280px;
    width: 260px;
    min-width: 260px;
    overflow-y: auto;
    transition: left 0.25s ease;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.show {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 5;
  }

  .menu-toggle {
    display: block;
  }

  .topbar {
    min-height: 74px;
    padding: 14px 18px;
  }

  .content-wrapper {
    padding: 22px 18px;
  }

  .overview-grid,
  .summary-grid {
    grid-template-columns: 1fr;
  }

  .welcome-banner {
    padding: 27px;
  }

  .welcome-art {
    font-size: 70px;
    padding: 10px;
  }
}

@media (max-width: 560px) {
  .topbar-right {
    gap: 8px;
  }

  .top-profile-info,
  .top-profile > i {
    display: none;
  }

  .top-avatar {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .welcome-banner {
    padding: 23px;
  }

  .welcome-art {
    display: none;
  }

  .welcome-banner h1 {
    font-size: 25px;
  }

  .page-intro {
    padding: 22px 18px;
  }

  .page-intro h1 {
    font-size: 22px;
  }

  .intro-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    font-size: 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .assignment-heading {
    flex-direction: column;
  }

  .filter-select {
    width: 100%;
  }

  .dynamic-card {
    padding: 15px;
    gap: 12px;
  }

  .dynamic-card-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
  }

  .dynamic-card-heading {
    flex-direction: column;
  }

  .card-meta {
    flex-direction: column;
    gap: 7px;
  }

  .dashboard-footer {
    flex-direction: column;
  }
}