body {
  background: #f7f4ee;
  margin: 0;
  padding: 24px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* NAVBAR */
.site-header {
  width: 100%;
  background: #f7f4ee;
  border-bottom: 1px solid #d8d1c4;
}

.main-nav {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px 24px;
  min-height: 86px;
}

.nav-left,
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-right {
  margin-left: auto;
}

.nav-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 70px;
  width: auto;
  display: block;
}

.nav-link {
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  color: #1f1f1f;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s ease, color 0.2s ease;
}

.nav-link:hover {
  opacity: 0.65;
}

.nav-link.active {
  color: #d98900;
}

.nav-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#dashboardSymbol {
  display: inline-block;
  min-width: 12px;
  text-align: center;
}

.signout-btn {
  white-space: nowrap;
}

/* SESSION DROPDOWN */
.sub-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(12px, 4vw, 45px);
  padding: 20px;
  background: #ebe7df;
  border-top: 1px solid #d8d1c4;
}

.sub-nav.hidden {
  display: none;
}

.session-link {
  background: none;
  border: none;
  padding: 0;
  color: #3a3a3a;
  font-family: inherit;
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-align: center;
  cursor: pointer;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.session-link:hover {
  color: #000;
  opacity: 0.7;
}

.session-link.active {
  color: #d98900;
  font-weight: 700;
}

/* TABS */
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.tab-btn {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}

.tab-btn.active {
  background: #ffb86b;
  border-color: #ff9f3b;
  color: #2b2b2b;
}

/* GRID */
.grid {
  display: grid;
  gap: 20px;
  padding: 16px;
  margin-top: 32px;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
  }
}

/* CARDS + AUTH */
#signInBtn,
#signOutBtn {
  background: white;
  padding: 16px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

#authGate {
  text-align: center;
  padding: 16px;
  border-radius: 10px;
}

.card {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
  background: white;
  padding: 28px 24px;
  border-radius: 18px;
  min-height: 180px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-content {
  position: relative;
  z-index: 1;
}

.card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  border-radius: 18px;
  z-index: 2;
  transition: opacity 0.25s ease;
}

.card:hover .card-overlay {
  opacity: 1;
}

.card.green .card-overlay {
  background: rgba(71, 222, 127, 0.468);
}

.card.orange .card-overlay {
  background: rgba(252, 179, 51, 0.52);
}

.card.red .card-overlay {
  background: rgba(255, 64, 64, 0.484);
}

.card.gray .card-overlay {
  background: rgba(107, 114, 128, 0.22);
}

.overlay-text {
  color: white;
  font-size: 1.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ROOM STATUS */
.room-title {
  font-size: 1.6rem;
  font-weight: bold;
  margin-bottom: 8px;
  letter-spacing: 0.08em;
}

.room-status {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.green {
  color: #2ecc71;
}

.orange {
  color: #f39c12;
}

.red {
  color: #e74c3c;
}

.gray {
  color: #7f8c8d;
}

.count {
  display: flex;
  justify-content: space-between;
  margin: 8px 0;
  padding: 8px;
  background: #f8fafc;
  border-radius: 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

/* CHAT */
.chat-box {
  background: #f3f3f3;
  border-radius: 18px;
  padding: 20px;
  max-width: 900px;
  margin: 0 auto;
}

.chat-controls {
  margin-bottom: 16px;
}

.chat-controls label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.chat-controls select {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
}

.messages {
  background: white;
  min-height: 300px;
  max-height: 450px;
  overflow-y: auto;
  margin-bottom: 16px;
  padding: 16px;
  border-radius: 16px;
}

.message {
  background: #f8f8f8;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
}

.message-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.message-class {
  color: #d88913;
  font-weight: 700;
}

.message-time {
  color: #777;
  font-size: 14px;
  white-space: nowrap;
}

.message-meta {
  color: #666;
  font-size: 14px;
  margin-bottom: 6px;
}

.message-text {
  font-size: 16px;
}

.chat-input-row {
  display: flex;
  gap: 10px;
}

.chat-input-row input {
  flex: 1;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 12px;
  font-size: 16px;
}

.chat-input-row button {
  background: #f3a634;
  color: white;
  font-weight: 700;
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  cursor: pointer;
}

.empty-chat {
  color: #777;
  text-align: center;
  margin-top: 30px;
}

/* SESSION BANNER */
.session-banner {
  text-align: center;
  font-weight: 700;
  font-size: 1.5rem;
  margin: 20px 0;
  letter-spacing: 0.08em;
}

.session-banner.active {
  color: #16a34a;
}

.session-banner.next {
  color: #d97706;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  body {
    padding: 12px;
  }

  .main-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    min-height: auto;
    padding: 16px 20px;
  }

  .nav-center {
    position: static;
    transform: none;
    order: 1;
  }

  .nav-left {
    order: 2;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-right {
    order: 3;
    margin-left: 0;
    justify-content: center;
    flex-wrap: wrap;
  }

  .nav-logo {
    height: 50px;
  }
}

@media (max-width: 600px) {
  .grid {
    grid-template-columns: 1fr;
  }
}