:root {
  --bg-main: linear-gradient(135deg, #0d1b36, #12385a, #15495a);
  --sidebar-bg: rgba(5, 16, 43, 0.95);
  --panel-bg: rgba(255, 255, 255, 0.08);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-main: #f5f8ff;
  --text-soft: #d2dcf2;
  --accent-1: #8ec5ff;
  --accent-2: #8ee7cd;
  --chip-bg: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --logo-bg: linear-gradient(135deg, #8ec5ff, #8ee7cd);
}

body.fun-theme {
  --bg-main: linear-gradient(135deg, #f175c2, #bd8af3, #8296e6);
  --sidebar-bg: rgba(126, 73, 156, 0.95);
  --panel-bg: rgba(255, 255, 255, 0.18);
  --panel-border: rgba(255, 255, 255, 0.22);
  --text-main: #f2dff2;
  --text-soft: #f4eaff;
  --accent-1: #df6aba;
  --accent-2: #a07fdc;
  --chip-bg: rgba(255, 255, 255, 0.2);
  --shadow: 0 10px 30px rgba(95, 52, 128, 0.25);
  --logo-bg: linear-gradient(135deg, #e683c7, #b18df3);
}

body.nature-theme {
  --bg-main: linear-gradient(135deg, #2c6b50, #0d5330, #154a63);
  --sidebar-bg: rgba(31, 86, 64, 0.95);
  --panel-bg: rgba(255, 255, 255, 0.18);
  --panel-border: rgba(255, 255, 255, 0.22);
  --text-main: #ffffff;
  --text-soft: #e8fff5;
  --accent-1: #124932;
  --accent-2: #1a5728;
  --chip-bg: rgba(255, 255, 255, 0.2);
  --shadow: 0 10px 30px rgba(47, 97, 77, 0.25);
  --logo-bg: linear-gradient(135deg, #20573f, #165a26);
}
  

body.sunshine-theme {
  --bg-main: linear-gradient(135deg, #e4b954, #e9c363, #ffb86c);
  --sidebar-bg: rgba(184, 119, 27, 0.95);
  --panel-bg: rgba(255, 255, 255, 0.18);
  --panel-border: rgba(255, 255, 255, 0.22);
  --text-main: #ffffff;
  --text-soft: #fff5db;
  --accent-1: #ffb703;
  --accent-2: #e1b245;
  --chip-bg: rgba(255, 255, 255, 0.2);
  --shadow: 0 10px 30px rgba(184, 119, 27, 0.25);
  --logo-bg: linear-gradient(135deg, #ffb703, #e8ab1c);
}

body.calm-theme {
  --bg-main: linear-gradient(135deg, #0d1b36, #12385a, #15495a);
  --sidebar-bg: rgba(5, 16, 43, 0.95);
  --panel-bg: rgba(255, 255, 255, 0.08);
  --panel-border: rgba(255, 255, 255, 0.12);
  --text-main: #f5f8ff;
  --text-soft: #d2dcf2;
  --accent-1: #8ec5ff;
  --accent-2: #8ee7cd;
  --chip-bg: rgba(255, 255, 255, 0.10);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
  --logo-bg: linear-gradient(135deg, #8ec5ff, #8ee7cd);
}


* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  min-height: 100vh;
  background: var(--bg-main);
  color: var(--text-main);
  padding: 20px;
}

.dashboard {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  min-height: calc(100vh - 40px);
}

.sidebar {
  background: var(--sidebar-bg);
  border-radius: 34px;
  padding: 26px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo-box-icon {
  width: 92px;
  height: 92px;
  border-radius: 28px;
  background: var(--logo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}

.logo-box h1 {
  font-size: 1.9rem;
  line-height: 1.05;
  margin-bottom: 8px;
}

.logo-box p {
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.2;
}

.side-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.nav-btn {
  border: none;
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: #2f3542;
  font-size: 0.95rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.nav-btn.active {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
}

.theme-box,
.safety-box {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 26px;
  padding: 22px;
}

.theme-box h3,
.safety-box h3 {
  font-size: 1rem;
  margin-bottom: 14px;
}

.theme-toggle,
.save-btn,
.clear-log-btn,
.action-btn,
.return-btn {
  border: none;
  border-radius: 16px;
  cursor: pointer;
  font-size: 1rem;
}

.theme-toggle {
  width: 100%;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 600;
}

.safety-box p {
  color: var(--text-soft);
  line-height: 1.35;
  font-size: 0.95rem;
}

.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  display: block;
}

.hidden {
  display: none;
}

.top-header {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 24px 28px;
  box-shadow: var(--shadow);
}

.top-header h2 {
  font-size: 2rem;
  margin-bottom: 6px;
}

.top-header p {
  color: var(--text-soft);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.top-badge {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 700;
}

.top-cards {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.mini-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.mini-card span {
  display: block;
  color: var(--text-soft);
  margin-bottom: 8px;
}

.mini-card strong {
  font-size: 1.05rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 30px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.emotion-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: none;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--chip-bg);
  color: white;
  font-size: 0.95rem;
  cursor: pointer;
}

.chip.active-chip {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
}

.selected-label {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 1rem;
}

.tool-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.tool-card {
  width: 100%;
  border: none;
  border-radius: 20px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.95);
  color: #2f3542;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.tool-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.tool-card span {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.tool-card small {
  color: #4d5667;
  line-height: 1.3;
}

.active-tool {
  margin-bottom: 16px;
  padding: 18px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1.45rem;
  font-weight: 700;
}

.timer-box {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}

#timerDisplay {
  font-size: 2.5rem;
  font-weight: 700;
}

textarea,
input,
select {
  width: 100%;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 1rem;
}

textarea::placeholder,
input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

textarea {
  min-height: 120px;
  resize: vertical;
  margin-bottom: 16px;
}

select {
  max-width: 140px;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.action-btn {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

.stop-btn {
  border: 1px solid rgba(255, 150, 150, 0.6);
}

.progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  margin-bottom: 16px;
}

.progress {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
}

ol {
  padding-left: 26px;
  line-height: 1.6;
  font-size: 1.15rem;
}

.return-btn {
  margin-top: 18px;
  padding: 14px 18px;
  width: 100%;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 700;
}

.save-row {
  margin-top: 12px;
}

.save-btn,
.clear-log-btn {
  padding: 14px 18px;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: white;
  font-weight: 700;
}

.log-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.log-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.log-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--panel-border);
  border-radius: 22px;
  padding: 18px;
}

.log-card h4 {
  margin-bottom: 10px;
  font-size: 1rem;
}

.log-card p {
  margin-bottom: 8px;
  color: var(--text-soft);
  line-height: 1.45;
}

.log-empty {
  color: var(--text-soft);
}

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

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

  .top-cards {
    grid-template-columns: 1fr;
  }
}
.confetti {
  position: fixed;
  top: -20px;
  width: 12px;
  height: 12px;
  background: #ffde59;
  z-index: 99999;
  animation: confetti-fall 3s linear forwards;
  pointer-events: none;
}

.confetti:nth-child(2n) {
  background: #ff8fd8;
}

.confetti:nth-child(3n) {
  background: #8ec5ff;
}

.confetti:nth-child(4n) {
  background: #8ee7cd;
}

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }

  100% {
    transform: translateY(110vh) rotate(720deg);
    opacity: 0;
  }
}
.profile-card {
  margin-top: 24px;
  padding: 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.profile-card h3 {
  margin-bottom: 16px;
}

.profile-card p {
  margin: 8px 0;
}
.support-note {
  margin-bottom: 12px;
  color: white;
  opacity: 0.8;
}

.support-options {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.support-btn {
  padding: 14px 16px;
  border-radius: 16px;
  border: 2px solid transparent;
  background: white;
  cursor: pointer;
  text-align: left;
  font-size: 0.95rem;
  transition: 0.2s;
}

.support-btn:hover {
  transform: translateY(-1px);
}

.active-support {
  border-color: #8b5cf6;
  background: #f3e8ff;
}

.urgent-note {
  font-size: 0.9rem;
  color: rgb(226, 39, 39);
  opacity: 0.75;
  margin-top: 10px;
}
.hidden {
  display: none !important;
}

.dashboard-card-grid {
  align-items: stretch;
}

.dashboard-card {
  min-height: 170px;
  cursor: pointer;
}

.dashboard-card small {
  display: block;
  margin-top: 8px;
  opacity: 0.85;
}

.log-header-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.support-badge {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  background: white;
  color: #111827;
}

.flagged-badge {
  background: #fee2e2;
  color: #991b1b;
}

.teacher-badge {
  background: #ede9fe;
  color: #5b21b6;
}

.counselor-badge {
  background: #dbeafe;
  color: #1e40af;
}

.no-request-badge {
  background: #dcfce7;
  color: #166534;
}

.flagged-log-card {
  border: 2px solid #ef4444;
}
.teacher-settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 24px;
}

.settings-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 24px;
  padding: 28px;
  color: white;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}

.settings-card h2 {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.settings-card p {
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
}

.settings-card label {
  display: block;
  font-weight: 700;
  margin: 18px 0 8px;
}

.settings-card input {
  width: 100%;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 1rem;
  outline: none;
}

.settings-card input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.class-code-copy-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

.class-code-copy-row input {
  flex: 1;
}

.class-code-copy-row button,
.save-settings-btn {
  border: none;
  border-radius: 16px;
  padding: 15px 22px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, #8fdcff, #9df0dd);
  color: #07142f;
}

.save-settings-btn {
  width: 100%;
  margin-top: 24px;
}

.account-info-box {
  margin-top: 28px;
  padding: 20px;
  border-radius: 20px;
  background: rgba(7, 20, 47, 0.32);
}

.account-info-box h3 {
  margin-bottom: 14px;
}

.account-info-box p {
  margin-bottom: 10px;
}

#teacherSettingsMessage {
  margin-top: 16px;
  font-weight: 700;
  color: #9df0dd;
}

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

.logout-btn {
  border: none;
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: 0.2s ease;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.auth-shell {
  width: min(1050px, 100%);
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
  align-items: stretch;
}

.auth-intro,
.auth-card {
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  padding: 36px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.auth-intro {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-logo {
  width: 86px;
  height: 86px;
  border-radius: 28px;
  background: var(--logo-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}

.large-logo {
  width: 140px;
  height: 140px;
  font-size: 3rem;
  border-radius: 34px;
}

.auth-intro h1 {
  font-size: 4.2rem;
  line-height: 1;
  margin-bottom: 14px;
}

.auth-intro h2 {
  font-size: 1.8rem;
  margin-bottom: 18px;
}

.auth-intro p,
.auth-card p {
  color: var(--text-soft);
  line-height: 1.5;
  font-size: 1.05rem;
}

.auth-card h1 {
  font-size: 2.1rem;
  margin-bottom: 8px;
}

.auth-card input,
.auth-card select {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-card select {
  max-width: 100%;
}

.auth-buttons {
  margin-top: 24px;
}


.secondary-auth-btn {
  background: rgba(255, 255, 255, 0.18);
}

#authMessage,
#profileMessage {
  margin-top: 14px;
  color: var(--text-soft);
}

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

  .auth-intro h1 {
    font-size: 3rem;
  }
}
.auth-subtitle {
  font-size: 0.9rem;
  color: var(--text-soft);
  opacity: 0.75;
  letter-spacing: 0.3px;
  margin-bottom: 18px;
}

.auth-intro p:last-child {
  margin-top: 12px;
}

.role-card {
  border: none;
  border-radius: 18px;
  padding: 18px;
  background: rgba(255,255,255,0.12);
  color: white;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: 0.2s ease;
}

.role-card:hover {
  transform: translateY(-2px);
}

.active-role {
  background: linear-gradient(
    135deg,
    var(--accent-1),
    var(--accent-2)
  );
}
.auth-card {
  align-self: start;
  height: fit-content;
}
.role-selector {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}
.profile-setup-card {
  width: min(720px, 100%);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 34px;
  padding: 42px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.setup-label {
  color: var(--accent-2);
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.profile-setup-card h1 {
  font-size: 2.4rem;
  margin-bottom: 10px;
}

.setup-subtext {
  color: var(--text-soft);
  line-height: 1.5;
  margin-bottom: 24px;
}

.profile-setup-card input,
.profile-setup-card select {
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.14);
}

.profile-setup-card select {
  max-width: 100%;
}

.profile-save-btn {
  margin-top: 8px;
  width: 190px;
}
/* ===== REFLECTION PAGE POLISH ===== */

#reflectSection textarea,
#reflectSection input,
#reflectSection select {
  margin-top: 8px;
  margin-bottom: 16px;
}

#organizationCheckBox,
#burnoutCheckBox {
  margin: 24px 0;
  padding: 22px;
  border-radius: 22px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
}

#organizationCheckBox h3,
#burnoutCheckBox h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

#organizationCheckBox p,
#burnoutCheckBox p {
  color: var(--text-soft);
  margin-bottom: 18px;
  line-height: 1.5;
}

#organizationCheckBox input,
#burnoutCheckBox input,
#burnoutCheckBox select {
  margin-bottom: 14px;
}

.support-options {
  margin-top: 18px;
}

.support-btn {
  padding: 12px 14px;
  border-radius: 14px;
}

.support-note {
  margin-top: 24px;
  margin-bottom: 16px;
  font-weight: 600;
}

#nextStepInput {
  margin-top: 10px;
}

#reflectSection h3 {
  margin-bottom: 14px;
}

#reflectSection .save-row {
  margin-top: 28px;
}

/* Makes sections feel separated */
#organizationCheckBox,
#burnoutCheckBox,
.support-options {
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
/* ===== TEACHER LOG POLISH ===== */

.log-summary {
  margin-bottom: 16px;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.teacher-log-section {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(255,255,255,0.05);
}

.teacher-log-section strong {
  display: block;
  margin-bottom: 8px;
}

.teacher-log-section p {
  margin-bottom: 0;
}
.organization-section p,
.burnout-section p {
  margin: 4px 0 14px 0;
}

.organization-section strong,
.burnout-section strong {
  display: block;
  margin-top: 8px;
}
/* ===== CLEANER LOG DETAIL SPACING ===== */

.teacher-log-section p {
  margin: 4px 0 10px 0;
  line-height: 1.35;
}

.teacher-log-section p strong {
  display: inline;
  margin-right: 4px;
}

.teacher-log-section {
  padding: 16px 18px;
}

.teacher-log-section strong {
  margin-bottom: 6px;
}
/* ===== FINAL TEACHER LOG HIGHLIGHTING ===== */

.flagged-log-card {
  border: 3px solid #ff4d4d;
  box-shadow: 0 0 0 2px rgba(255, 77, 77, 0.25),
              0 12px 28px rgba(255, 77, 77, 0.18);
}

.flagged-log-card::before {
  content: "🚩 Flagged for Review";
  display: inline-block;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 77, 77, 0.18);
  color: #ffd6d6;
  font-weight: 800;
}

.log-card:has(p strong + text),
.log-card {
  transition: 0.2s ease;
}

.log-card:hover {
  transform: translateY(-2px);
}

.log-card:has(p:nth-of-type(3)) {
  position: relative;
}

.log-card p {
  position: relative;
}

/* Counselor request emphasis */
.log-card:has(p:nth-of-type(3)) p {
  line-height: 1.45;
}

.log-card:has(p:nth-of-type(3)) {
  overflow: hidden;
}
/* Counselor requests */

.counselor-log-card {
  border-left: 6px solid #ff5b5b;
}

/* Teacher requests */

.teacher-log-card {
  border-left: 6px solid #f7c948;
}

/* Already flagged */

.flagged-log-card {
  border: 3px solid #ff5b5b;
  box-shadow: 0 0 20px rgba(255, 91, 91, 0.15);
}