body {
  background-color: #f4f6f9;
}

.card {
  border: none;
  border-radius: 0.6rem;
}

.list-group-item-action:hover {
  background-color: #f0f4ff;
}

footer {
  border-top: 1px solid #e3e6ea;
  margin-top: 2rem;
}

/* ---------- App shell: sidebar + topbar ---------- */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 250px;
  background-color: #1e2530 !important;
  border: none;
}

/* Bootstrap's responsive offcanvas forces background-color/border to
   transparent/0 with !important once it becomes a static sidebar (>= lg).
   Re-assert our own colors so the sidebar stays visible on desktop. */
@media (min-width: 992px) {
  .sidebar {
    background-color: #1e2530 !important;
  }
}

.sidebar-brand {
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 1rem;
  color: #fff;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.25;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  flex-shrink: 0;
}

.topbar-logo {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.login-logo {
  width: 72px;
  height: 72px;
  max-width: 72px;
  object-fit: contain;
}

/* ---------- Halaman login / tamu ---------- */
.auth-page-bg {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #1e3a8a, #3b6df0);
}

.auth-page-bg .card {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.auth-page-footer {
  color: rgba(255, 255, 255, 0.75);
  margin-top: auto;
}

.sidebar-nav {
  padding: 0.75rem;
  gap: 0.15rem;
}

.sidebar-nav .nav-link {
  color: rgba(255, 255, 255, 0.72);
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.93rem;
}

.sidebar-nav .nav-link i {
  width: 1.3rem;
  display: inline-block;
  text-align: center;
  margin-right: 0.25rem;
}

.sidebar-nav .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav .nav-link.active {
  background-color: #3b6df0;
  color: #fff;
}

.sidebar-footer {
  padding: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer .nav-link {
  color: rgba(255, 255, 255, 0.72);
  border-radius: 0.5rem;
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}

.sidebar-footer .nav-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #e3e6ea;
  flex-shrink: 0;
}

.topbar-user {
  color: #333;
  text-decoration: none;
  padding: 0.4rem 0.6rem;
}

.topbar-icon-btn {
  position: relative;
  color: #495057;
  padding: 0.5rem 0.6rem;
  border-radius: 0.4rem;
  text-decoration: none;
  line-height: 1;
}

.topbar-icon-btn:hover {
  background-color: #f0f2f5;
  color: #212529;
}

.topbar-badge {
  position: absolute;
  top: 0;
  right: 0;
  background-color: #dc3545;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 600;
  min-width: 1.05rem;
  height: 1.05rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.2rem;
}

.app-content {
  flex: 1;
  padding: 1.5rem;
}

@media (min-width: 992px) {
  .sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }
}

/* ---------- Course overview cards ---------- */
.course-toolbar .form-control,
.course-toolbar .form-select {
  min-width: 200px;
}

.course-card {
  border: none;
  border-radius: 0.6rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.course-card:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.course-card-banner {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.6rem;
}

.course-card-body {
  padding: 1rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.course-card-code {
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  color: #6c757d;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.course-card-title {
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.course-card-meta {
  color: #6c757d;
  font-size: 0.85rem;
  margin-bottom: 0.9rem;
}

/* ---------- Foto profil ---------- */
.profile-avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

.profile-avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: #e9ecef;
  color: #adb5bd;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
}

.topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---------- Pengumuman kampus ---------- */
.announcement-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b6df0, #6a8dff);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ---------- Calendar widget ---------- */
.calendar-table {
  table-layout: fixed;
  text-align: center;
}

.calendar-table th {
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 600;
  border: none;
  padding: 0.25rem;
}

.calendar-table td {
  position: relative;
  height: 2.1rem;
  vertical-align: middle;
  font-size: 0.8rem;
  border-color: #f0f1f3;
}

.calendar-today {
  background-color: #e7edff;
  font-weight: 700;
  border-radius: 0.3rem;
}

.calendar-has-event {
  cursor: help;
}

.calendar-dot {
  display: block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background-color: #dc3545;
  margin: 1px auto 0;
}

.calendar-deadline-list a {
  text-decoration: none;
}

/* ---------- Calendar: halaman penuh ---------- */
.calendar-table-full {
  table-layout: fixed;
  margin-bottom: 0;
}

.calendar-table-full th {
  text-align: center;
  font-size: 0.8rem;
  color: #6c757d;
  border-top: none;
}

.calendar-full-cell {
  height: 100px;
  vertical-align: top;
  padding: 0.4rem;
  border-color: #eef0f2;
}

.calendar-full-cell.calendar-empty {
  background-color: #fafafa;
}

.calendar-full-daynum {
  font-size: 0.85rem;
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.25rem;
}

.calendar-full-cell.calendar-today {
  background-color: #e7edff;
}

.calendar-full-cell.calendar-today .calendar-full-daynum {
  color: #3b6df0;
}

.calendar-event-chip {
  display: block;
  font-size: 0.68rem;
  background-color: #fde8e8;
  color: #c0392b;
  border-radius: 0.25rem;
  padding: 0.05rem 0.3rem;
  margin-bottom: 0.15rem;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event-chip:hover {
  background-color: #f5c6c6;
  color: #922b21;
}

.course-banner-0 { background: linear-gradient(135deg, #3b6df0, #6a8dff); }
.course-banner-1 { background: linear-gradient(135deg, #16a085, #48c9b0); }
.course-banner-2 { background: linear-gradient(135deg, #e67e22, #f5b041); }
.course-banner-3 { background: linear-gradient(135deg, #8e44ad, #af7ac5); }
.course-banner-4 { background: linear-gradient(135deg, #d35400, #eb984e); }
.course-banner-5 { background: linear-gradient(135deg, #2c3e50, #566573); }
