* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at top left, #bfdbfe, transparent 32%),
    linear-gradient(135deg, #eff6ff, #f8fafc);
  color: #0f172a;
}

.page {
  width: min(1100px, 94%);
  margin: auto;
  padding: 32px 0;
}

.topbar {
  background: white;
  border-radius: 24px;
  padding: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.12);
  margin-bottom: 28px;
  border: 1px solid #dbeafe;
}

.topbar h1 {
  margin: 0;
  font-size: 34px;
  color: #1d4ed8;
}

.topbar p {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 16px;
}

.logoutBtn {
  border: none;
  background: #ef4444;
  color: white;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.25);
  transition: 0.2s;
}

.logoutBtn:hover {
  background: #dc2626;
  transform: translateY(-2px);
}

.dashboardGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
}

.moduleCard {
  min-height: 230px;
  text-decoration: none;
  color: #0f172a;
  background: white;
  border-radius: 24px;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #e2e8f0;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
  transition: 0.25s ease;
  position: relative;
  overflow: hidden;
}

.moduleCard::before {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -40px;
  top: -40px;
  border-radius: 50%;
  opacity: 0.18;
}

.moduleCard:hover {
  transform: translateY(-8px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
}

.cardIcon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  font-size: 34px;
  margin-bottom: 18px;
}

.moduleCard h2 {
  margin: 0;
  font-size: 24px;
}

.moduleCard p {
  color: #64748b;
  line-height: 1.5;
  margin-top: 10px;
}

.moduleCard span {
  font-weight: 900;
  color: #0f172a;
}

.blue::before {
  background: #2563eb;
}

.green::before {
  background: #16a34a;
}

.purple::before {
  background: #7c3aed;
}

.blue .cardIcon {
  background: #dbeafe;
}

.green .cardIcon {
  background: #dcfce7;
}

.purple .cardIcon {
  background: #ede9fe;
}

@media (max-width: 650px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .topbar h1 {
    font-size: 28px;
  }

  .logoutBtn {
    width: 100%;
  }

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

.loadingPopup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(5px);
}

.loadingCard {
  width: 300px;
  background: white;
  padding: 28px;
  border-radius: 20px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.loadingCard h3 {
  margin: 14px 0 6px;
  color: #1d4ed8;
}

.loadingCard p {
  color: #64748b;
}

.spinner {
  width: 54px;
  height: 54px;
  border: 5px solid #dbeafe;
  border-top: 5px solid #2563eb;
  border-radius: 50%;
  margin: auto;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

#myRepliesBox {
  display: none;
  margin-top: 22px;
}

#myRepliesBox.replyOpen {
  display: block;
}

.replyCard {
  background: white;
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  border-left: 6px solid #2563eb;
  margin-bottom: 18px;
}

.replyMeta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-size: 14px;
  color: #64748b;
}

.replyStatus {
  background: #dbeafe;
  color: #1d4ed8;
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
}

.userQuery {
  background: #fff7ed;
  padding: 14px;
  border-radius: 14px;
  margin-bottom: 12px;
  color: #9a3412;
}

.adminReply {
  background: #f0fdf4;
  padding: 14px;
  border-radius: 14px;
  color: #166534;
}

.replyEmpty {
  background: white;
  padding: 22px;
  border-radius: 18px;
  text-align: center;
  font-weight: 700;
  color: #64748b;
}
.supportFloatBtn {
  position: fixed;
  right: 20px;
  bottom: 20px;
  border: none;
  background: #2563eb;
  color: white;
  padding: 14px 18px;
  border-radius: 999px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(37,99,235,0.28);
  z-index: 9999;
}

.supportFloatBox {
  display: none;
  position: fixed;
  right: 20px;
  bottom: 85px;
  width: 340px;
  background: white;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 45px rgba(15,23,42,0.18);
  z-index: 9999;
}

.supportHeader {
  background: #1d4ed8;
  color: white;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 900;
}

.supportHeader button {
  border: none;
  background: transparent;
  color: white;
  font-size: 22px;
  cursor: pointer;
}

.supportFloatBox textarea {
  width: 100%;
  height: 130px;
  border: none;
  padding: 14px;
  resize: none;
  outline: none;
  font-size: 15px;
}

.supportSendBtn {
  width: 100%;
  border: none;
  background: #16a34a;
  color: white;
  padding: 14px;
  font-weight: 900;
  cursor: pointer;
}