:root {
  --color-bg: #f5f7fb;
  --color-surface: #ffffff;
  --color-primary: #4f46e5;
  --color-primary-light: #6366f1;
  --color-text: #1f2937;
  --color-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-accent: #22c55e;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 4px 10px rgba(15, 23, 42, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  background-color: var(--color-bg);
  color: var(--color-text);
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--color-surface);
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--color-border);
  min-height: 72px;
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  transition: all 0.2s ease;
  text-decoration: none;
  flex-shrink: 0;
  border: none;
  cursor: pointer;
}

.btn-back:hover {
  background: rgba(79, 70, 229, 0.2);
  transform: translateX(-2px);
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.2);
}

.btn-back:active {
  transform: translateX(-1px);
}

.btn-back .material-icons-round {
  font-size: 24px;
}


.topbar__title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar__role {
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn--primary {
  background: var(--color-primary);
  color: #fff;
  padding: 0.65rem 1.25rem;
  box-shadow: var(--shadow-sm);
}

.btn--ghost {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  padding: 0.5rem 1rem;
}

.btn--danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #dc2626;
  border: 1px solid #dc2626;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn--danger:hover {
  background: #dc2626;
  color: #fff;
}

.btn--active {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
  border: 1px solid #15803d;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn--active:hover {
  background: #15803d;
  color: #fff;
}

.btn--inactive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(234, 179, 8, 0.15);
  color: #854d0e;
  border: 1px solid #854d0e;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.btn--inactive:hover {
  background: #854d0e;
  color: #fff;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.app-shell__content {
  display: contents;
}

.sidebar {
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.1rem;
}

.sidebar__brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
}

.sidebar__logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.sidebar__brand .material-icons-round {
  font-size: 32px;
  color: var(--color-primary);
}

.sidebar__nav {
  display: grid;
  gap: 0.5rem;
}

.nav-link {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--color-muted);
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav-link .material-icons-round {
  font-size: 24px;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(79, 70, 229, 0.08);
  color: var(--color-primary);
  transform: translateX(4px);
}

.main {
  padding: 2rem;
  display: grid;
  gap: 1.5rem;
}

.main--full-width {
  max-width: 100%;
  width: 100%;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid--cards {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
}

.stat-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(79, 70, 229, 0.12);
  color: var(--color-primary);
}

.stat-card__value {
  font-size: 1.75rem;
  font-weight: 700;
}

.stat-card__label {
  color: var(--color-muted);
}

.section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-sm);
}

.section__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  min-height: 2.5rem;
  max-height: 2.5rem;
  padding: 0;
  gap: 1rem;
}

.section__header > div:first-child {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.25rem;
  min-height: 2.5rem;
}

.section__header > .section__title {
  margin: 0;
  flex: 1;
}

.section__title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead {
  background: rgba(79, 70, 229, 0.08);
}

.table th,
.table td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.status--success {
  background: rgba(34, 197, 94, 0.15);
  color: #15803d;
}

.status--warning {
  background: rgba(234, 179, 8, 0.15);
  color: #854d0e;
}

.status--danger {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.muted {
  color: var(--color-muted);
  font-size: 0.85rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid--responsive {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.student-selector {
  position: relative;
}

.student-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  min-height: 42px;
  gap: 0.5rem;
}

.student-selected__label {
  font-weight: 600;
  color: var(--color-text);
  flex: 1;
}

.student-selected__placeholder {
  color: var(--color-muted);
}

.student-selected__clear {
  border: none;
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.6rem;
  cursor: pointer;
  font-weight: 600;
}

.student-selected__clear:hover {
  background: rgba(239, 68, 68, 0.2);
}

.student-results {
  position: absolute;
  z-index: 20;
  top: calc(100% + 0.35rem);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  max-height: 240px;
  overflow-y: auto;
}

.student-results__item {
  display: block;
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
}

.student-results__item:hover,
.student-results__item:focus {
  background: rgba(79, 70, 229, 0.08);
  outline: none;
}

.student-results__empty {
  padding: 0.65rem 0.9rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.field-group {
  display: grid;
  gap: 0.5rem;
}

.field-group label {
  font-weight: 500;
  color: var(--color-muted);
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font: inherit;
}

.attendance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
}

.attendance-slot {
  background: rgba(79, 70, 229, 0.08);
  border-radius: var(--radius-md);
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease;
}

.attendance-slot input {
  display: none;
}

.attendance-slot.is-present {
  background: rgba(34, 197, 94, 0.18);
  color: #15803d;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
}

.teacher-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 0.75rem;
}

.teacher-card__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.teacher-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.12);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  font-size: 28px;
}

.teacher-card__label {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
}

.teacher-card__details {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.teacher-card__status {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

.filter-bar {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.filter-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.filter-bar .field-group {
  min-width: 180px;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--color-muted);
}

.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  max-width: 420px;
}

.modal::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.login-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 2rem 1rem;

  /* Solid background color instead of image */
  background-color: purple; /* or use a hex like #6a1b9a */
}


.login-card {
  width: min(400px, 100%);
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 1.5rem;
}

.login-card__header {
  text-align: center;
  display: grid;
  gap: 0.5rem;
}

.login-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
}

.login-card__subtitle {
  margin: 0;
  color: var(--color-muted);
}

.login-card form {
  display: grid;
  gap: 1rem;
}

.login-card .btn {
  width: 100%;
}

.results-summary {
  color: var(--color-muted);
  font-size: 0.9rem;
  margin: 0 0 1rem 0;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.25rem;
}

.pagination__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.pagination__link:hover {
  background: rgba(79, 70, 229, 0.1);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.pagination__link.is-active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.print-card {
  margin: 1.5rem 0;
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.print-card__content {
  display: grid;
  gap: 1.5rem;
}

.print-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.print-card__branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.print-card__logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 0.35rem;
}

.print-card__title {
  margin: 0;
  font-size: 1.25rem;
}

.print-card__subtitle {
  margin: 0;
  color: var(--color-muted);
}

.print-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.9rem;
  text-align: right;
}

.print-card__body {
  display: grid;
  gap: 1.5rem;
}

.print-card__grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.print-card__section h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.print-card__section ul {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--color-muted);
  line-height: 1.6;
}

.print-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: var(--color-primary);
  font-size: 0.85rem;
}

.chip .material-icons-round {
  font-size: 18px;
}

.print-card__footer {
  border-top: 1px solid var(--color-border);
  padding-top: 0.75rem;
  text-align: right;
}

.print-card__actions {
  display: flex;
  justify-content: flex-end;
}

.info-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: rgba(79, 70, 229, 0.12);
  color: var(--color-primary);
  font-weight: 500;
}

.info-banner .material-icons-round {
  font-size: 20px;
}

.teacher-card__actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.teacher-card__actions form {
  margin: 0;
}

/* Dashboard Styles */

.main--dashboard {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

.dashboard-container {
  display: grid;
  gap: 2.5rem;
}

.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.dashboard-stats .stat-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-left: 4px solid transparent;
}

.dashboard-stats .stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.dashboard-stats .stat-card--blue {
  border-left-color: #3b82f6;
}

.dashboard-stats .stat-card--blue .stat-card__icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-stats .stat-card--purple {
  border-left-color: #8b5cf6;
}

.dashboard-stats .stat-card--purple .stat-card__icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-stats .stat-card--green {
  border-left-color: #22c55e;
}

.dashboard-stats .stat-card--green .stat-card__icon {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-stats .stat-card--orange {
  border-left-color: #f59e0b;
}

.dashboard-stats .stat-card--orange .stat-card__icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dashboard-stats .stat-card__icon {
  flex-shrink: 0;
}

.dashboard-stats .stat-card__icon .material-icons-round {
  font-size: 32px;
}

.dashboard-stats .stat-card__content {
  display: grid;
  gap: 0.35rem;
  flex: 1;
}

.dashboard-stats .stat-card__label {
  font-size: 0.9rem;
  font-weight: 500;
}

.dashboard-stats .stat-card__value {
  font-size: 1.75rem;
  line-height: 1.2;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.dashboard-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.dashboard-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
  border-color: var(--color-primary);
}

.dashboard-card:hover::before {
  transform: scaleX(1);
}

.dashboard-card:hover .dashboard-card__arrow {
  transform: translateX(4px);
  opacity: 1;
}

.dashboard-card__icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-md);
  display: grid;
  place-items: center;
  margin-bottom: 0.5rem;
  transition: transform 0.3s ease;
}

.dashboard-card:hover .dashboard-card__icon {
  transform: scale(1.1) rotate(5deg);
}

.dashboard-card__icon .material-icons-round {
  font-size: 40px;
}

.dashboard-card--students .dashboard-card__icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/* Dashboard responsive tweaks */
@media (max-width: 768px) {
  .main--dashboard {
    padding: 1rem;
  }

  .dashboard-container {
    gap: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-card {
    padding: 1.25rem 1.25rem;
  }

  .dashboard-card__icon {
    width: 60px;
    height: 60px;
  }

  .dashboard-card__icon .material-icons-round {
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .main--dashboard {
    padding: 0.75rem;
  }

  .dashboard-card {
    padding: 1rem;
  }

  .dashboard-card__title {
    font-size: 1.1rem;
  }

  .dashboard-card__description {
    font-size: 0.85rem;
  }
}

.dashboard-card--teachers .dashboard-card__icon {
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.dashboard-card--payments .dashboard-card__icon {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(34, 197, 94, 0.3);
}

.dashboard-card--attendance .dashboard-card__icon {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(245, 158, 11, 0.3);
}

.dashboard-card--records .dashboard-card__icon {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.dashboard-card--documents .dashboard-card__icon {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.dashboard-card--payroll .dashboard-card__icon {
  background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(236, 72, 153, 0.3);
}

.dashboard-card--students .dashboard-card__icon {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.dashboard-card__content {
  flex: 1;
  display: grid;
  gap: 0.5rem;
  padding-right: 3.5rem;
}

.dashboard-card__title {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
}

.dashboard-card__description {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.dashboard-card__arrow {
  position: absolute;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(79, 70, 229, 0.1);
  display: grid;
  place-items: center;
  color: var(--color-primary);
  transition: all 0.3s ease;
  opacity: 0.7;
}

.dashboard-card__arrow .material-icons-round {
  font-size: 24px;
}

.class-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.class-card {
  --class-card-color: var(--color-text);
  --class-card-muted: rgba(255, 255, 255, 0.75);
  --class-card-accent: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  color: var(--class-card-color);
}

.class-card::before,
.class-card::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.class-card::before {
  background: radial-gradient(circle at 20% -10%, rgba(255, 255, 255, 0.45), transparent 65%);
}

.class-card::after {
  background: radial-gradient(circle at 110% 120%, rgba(255, 255, 255, 0.35), transparent 55%);
}

.class-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.18);
  border-color: rgba(255, 255, 255, 0.6);
}

.class-card:hover::before,
.class-card:hover::after {
  opacity: 1;
}

.class-card__icon {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #fff;
  font-size: 30px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.18);
  background: linear-gradient(135deg, #6366f1 0%, #4338ca 100%);
}

.class-card__content {
  display: grid;
  gap: 0.4rem;
  flex: 1;
  position: relative;
  z-index: 1;
}

.class-card__title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.class-card__meta {
  margin: 0;
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--class-card-accent);
  color: var(--class-card-muted);
  font-weight: 600;
}

.class-card__meta strong {
  color: var(--class-card-color);
}

.class-card__chevron {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  transition: transform 0.3s ease, background 0.3s ease;
  position: relative;
  z-index: 1;
}

.class-card:hover .class-card__chevron {
  transform: translateX(6px);
  background: rgba(255, 255, 255, 0.35);
}

.class-card--theme-1 {
  background: linear-gradient(130deg, #4f46e5 0%, #6366f1 45%, #4338ca 100%);
  --class-card-color: #fff;
  --class-card-muted: rgba(255, 255, 255, 0.78);
  --class-card-accent: rgba(255, 255, 255, 0.18);
}

.class-card--theme-1 .class-card__icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 100%);
  color: #4338ca;
}

.class-card--theme-2 {
  background: linear-gradient(130deg, #ec4899 0%, #f472b6 45%, #db2777 100%);
  --class-card-color: #fff;
  --class-card-muted: rgba(255, 255, 255, 0.8);
  --class-card-accent: rgba(255, 255, 255, 0.2);
}

.class-card--theme-2 .class-card__icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 100%);
  color: #db2777;
}

.class-card--theme-3 {
  background: linear-gradient(130deg, #22c55e 0%, #4ade80 45%, #16a34a 100%);
  --class-card-color: #0f172a;
  --class-card-muted: rgba(15, 23, 42, 0.78);
  --class-card-accent: rgba(255, 255, 255, 0.65);
}

.class-card--theme-3 .class-card__icon {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.25) 100%);
  color: #0f172a;
}

.class-card--theme-4 {
  background: linear-gradient(130deg, #f59e0b 0%, #fbbf24 45%, #d97706 100%);
  --class-card-color: #1f2937;
  --class-card-muted: rgba(31, 41, 55, 0.78);
  --class-card-accent: rgba(255, 255, 255, 0.65);
}

.class-card--theme-4 .class-card__icon {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.12) 0%, rgba(15, 23, 42, 0.28) 100%);
  color: #1f2937;
}

.class-card--theme-5 {
  background: linear-gradient(130deg, #0ea5e9 0%, #38bdf8 45%, #0284c7 100%);
  --class-card-color: #fff;
  --class-card-muted: rgba(255, 255, 255, 0.78);
  --class-card-accent: rgba(255, 255, 255, 0.22);
}

.class-card--theme-5 .class-card__icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 100%);
  color: #0369a1;
}

.class-card--theme-6 {
  background: linear-gradient(130deg, #a855f7 0%, #c084fc 45%, #7c3aed 100%);
  --class-card-color: #fff;
  --class-card-muted: rgba(255, 255, 255, 0.78);
  --class-card-accent: rgba(255, 255, 255, 0.22);
}

.class-card--theme-6 .class-card__icon {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.75) 100%);
  color: #7c3aed;
}

.topbar__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.topbar__logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.dashboard-page .topbar {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

.dashboard-page .topbar__title {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
}

.dashboard-page .topbar__role {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  backdrop-filter: blur(10px);
}

.dashboard-page .btn--ghost {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.dashboard-page .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

/* Back button styling for dashboard page */
.dashboard-page .btn-back {
  display: none;
}

@media (max-width: 1024px) {
  .main {
    padding: 1.5rem;
  }

  .main--dashboard {
    padding: 1.5rem;
  }

  .main--full-width {
    padding: 1.5rem;
  }

  .dashboard-stats {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .class-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 1rem;
  }

  .topbar__meta {
    gap: 0.5rem;
  }

  .section {
    padding: 1rem;
  }

  .dashboard-card {
    padding: 1.5rem;
  }

  .dashboard-card__icon {
    width: 60px;
    height: 60px;
  }

  .dashboard-card__icon .material-icons-round {
    font-size: 32px;
  }

  .dashboard-card__title {
    font-size: 1.25rem;
  }

  .dashboard-stats .stat-card {
    padding: 1.25rem;
  }

  .dashboard-stats .stat-card__icon {
    width: 56px;
    height: 56px;
  }

  .dashboard-stats .stat-card__icon .material-icons-round {
    font-size: 28px;
  }

  .dashboard-stats .stat-card--blue .stat-card__icon,
  .dashboard-stats .stat-card--purple .stat-card__icon,
  .dashboard-stats .stat-card--green .stat-card__icon,
  .dashboard-stats .stat-card--orange .stat-card__icon {
    width: 56px;
    height: 56px;
  }

  .class-card {
    padding: 1.25rem;
  }

  .class-card__icon {
    width: 48px;
    height: 48px;
    font-size: 24px;
  }

  .class-card__title {
    font-size: 1.05rem;
  }

  .class-card__meta {
    font-size: 0.85rem;
  }

  .topbar__left {
    gap: 0.75rem;
  }

  .topbar__brand {
    gap: 0.75rem;
  }

  .topbar__logo {
    width: 36px;
    height: 36px;
  }

  .topbar__title {
    font-size: 1.1rem;
  }

  .btn-back {
    width: 36px;
    height: 36px;
  }

  .btn-back .material-icons-round {
    font-size: 20px;
  }

  .dashboard-page .topbar__title {
    font-size: 1.25rem;
  }
}

@media print {
  body {
    background: #fff;
  }
  .print-card {
    box-shadow: none;
    border: none;
    margin: 0;
  }
  .btn,
  .sidebar,
  .topbar,
  .filter-bar,
  nav.pagination,
  .results-summary,
  .status,
  .empty-state,
  .print-card__actions {
    display: none !important;
  }
}
