/* ============================================================
   THRIVE — MAIN STYLES
   ============================================================ */

:root {
  --bg: var(--c-panel);
  --surface: #ffffff;
  --surface-soft: var(--c-line);
  --text: var(--c-text);
  --muted: var(--c-text-2);
  --line: var(--c-line);
  --primary: var(--c-text);
  --primary-soft: var(--c-accent-tint);
  --accent: var(--c-accent-tint);
  --accent-light: var(--c-line);
  --warning: var(--c-warn-tint);
  --danger: var(--c-secondary);
  --shadow: 0 12px 35px rgba(25, 61, 50, 0.08);
  --radius: 20px;
  --sidebar: 250px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

body {
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

.hidden {
  display: none !important;
}

/* ============================================================
   GENERAL
   ============================================================ */

.app-shell {
  min-height: 100vh;
}

.eyebrow {
  margin: 0 0 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  color: var(--muted);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.primary-button,
.secondary-button,
.text-button,
.admin-entry {
  border: 0;
  transition: 0.2s ease;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  font-weight: 700;
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(25, 61, 50, 0.18);
}

.secondary-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: white;
  color: var(--primary);
  font-weight: 700;
}

.secondary-button:hover {
  background: var(--accent-light);
}

.text-button {
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.text-button:hover {
  opacity: 0.7;
}

/* ============================================================
   LOGIN
   ============================================================ */

.login-screen {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
  background: white;
}

.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(circle at 25% 25%, var(--c-accent-tint) 0, transparent 28%),
    radial-gradient(circle at 75% 75%, var(--c-accent-tint) 0, transparent 32%),
    var(--c-line);
}

.login-art::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.65);
  top: 15%;
  left: 18%;
}

.login-art::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(25, 61, 50, 0.1);
  right: 10%;
  bottom: 12%;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.orb-one {
  width: 90px;
  height: 90px;
  background: var(--c-line-strong);
  top: 18%;
  right: 23%;
}

.orb-two {
  width: 55px;
  height: 55px;
  background: var(--c-accent-tint);
  bottom: 25%;
  left: 17%;
}

.brand-mark.large {
  position: relative;
  z-index: 2;
  font-size: 110px;
  color: var(--primary);
  opacity: 0.9;
}

.mini-card {
  position: absolute;
  z-index: 3;
  padding: 15px 19px;
  border: 1px solid rgba(255,255,255,0.8);
  border-radius: 15px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  font-weight: 800;
}

.mini-card span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}

.mini-card-one {
  top: 28%;
  left: 13%;
}

.mini-card-two {
  right: 12%;
  bottom: 30%;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(470px, 100%);
  padding: 60px;
  margin: auto;
}

.login-copy {
  margin: 60px 0 35px;
}

.login-copy h1 {
  margin: 0;
  max-width: 480px;
  font-family: var(--font-body);
  font-size: clamp(38px, 4vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.login-copy > p:last-child {
  max-width: 430px;
  margin: 20px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form > label,
.login-form label:not(.check) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: none;
  background: var(--c-panel);
  color: var(--text);
}

.login-form input:focus {
  border-color: var(--c-accent-tint);
  box-shadow: 0 0 0 3px rgba(185, 223, 207, 0.35);
}

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 48px;
}

.password-wrap button {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
}

.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
}

.form-row a {
  color: var(--primary);
  font-weight: 700;
}

.check {
  display: flex;
  align-items: center;
  gap: 7px;
}

.check input {
  width: 15px;
  min-height: auto;
}

.login-button {
  width: 100%;
  margin-top: 5px;
}

.admin-entry {
  padding: 5px;
  background: transparent;
  color: var(--primary);
  font-weight: 700;
}

.form-note {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Sign-in page: "Forgot password?" panel (client.js) */
.forgot-panel {
  display: grid;
  gap: 8px;
  justify-items: center;
}
.forgot-panel[hidden] { display: none; }
.forgot-panel .form-note:empty { display: none; }

/* Choose a new password (reset-password.html): the sign-in panel on its own */
.login-screen.reset-screen { grid-template-columns: 1fr; }
.reset-done { font-size: 14px; }

/* ============================================================
   EMPLOYEE WORKSPACE
   ============================================================ */

.workspace {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 30px 18px 20px;
  border-right: 1px solid var(--line);
  background: white;
}

.sidebar-brand {
  padding: 0 14px;
  margin-bottom: 45px;
}

.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  min-height: 46px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 600;
}

.nav-link span {
  width: 20px;
  text-align: center;
  font-size: 18px;
}

.nav-link b {
  margin-left: auto;
  min-width: 22px;
  padding: 3px 6px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--primary);
  text-align: center;
  font-size: 11px;
}

.nav-link:hover,
.nav-link.active {
  background: var(--accent-light);
  color: var(--primary);
}

.sidebar-bottom {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: auto;
}

.profile-mini {
  display: grid;
  grid-template-columns: 38px 1fr 15px;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 0;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--text);
  text-align: left;
}

.profile-mini strong,
.profile-mini small {
  display: block;
}

.profile-mini strong {
  font-size: 12px;
}

.profile-mini small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.profile-mini i {
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
}

.main-area {
  width: calc(100% - var(--sidebar));
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  padding: 25px 5%;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.85);
}

.topbar h2 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 25px;
  letter-spacing: -0.03em;
}

.topbar h2 span {
  color: var(--c-accent-tint);
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.icon-button,
.avatar-button,
.mobile-menu {
  border: 0;
  background: transparent;
}

.icon-button {
  position: relative;
  width: 40px;
  height: 40px;
  color: var(--muted);
  font-size: 20px;
}

.icon-button em {
  position: absolute;
  top: 8px;
  right: 7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-secondary);
}

.avatar-button {
  background: var(--primary-soft);
  color: var(--primary);
}

.mobile-menu {
  display: none;
  font-size: 22px;
}

.content {
  width: min(1250px, 90%);
  margin: 0 auto;
  padding: 38px 0 70px;
}

.view {
  display: none;
}

.active-view {
  display: block;
}

/* ============================================================
   HOME HERO
   ============================================================ */

.hero-card {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 270px;
  padding: 42px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 80% 25%, rgba(255,255,255,0.5), transparent 25%),
    linear-gradient(135deg, var(--c-accent-tint), var(--c-line));
}

.hero-card h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 34px;
  letter-spacing: -0.04em;
}

.hero-card > div:first-child > p:not(.eyebrow) {
  max-width: 500px;
  margin: 12px 0 22px;
  color: var(--c-text-2);
  line-height: 1.5;
}

.streak {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.streak span {
  font-size: 22px;
}

.streak strong {
  font-size: 13px;
}

.streak small {
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.level-ring {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  width: 150px;
  height: 150px;
  border: 10px solid rgba(255,255,255,0.65);
  border-right-color: var(--primary);
  border-radius: 50%;
  background: rgba(255,255,255,0.28);
}

.level-ring strong {
  font-family: var(--font-body);
  font-size: 42px;
}

.level-ring span {
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--muted);
}

.hero-visual > p {
  margin: 15px 0 0;
  font-size: 13px;
  font-weight: 800;
}

.hero-visual > p span {
  color: var(--muted);
  font-weight: 500;
}

.spark {
  position: absolute;
  color: var(--primary);
}

.spark-a {
  top: 20px;
  right: 25px;
}

.spark-b {
  bottom: 55px;
  left: 15px;
}

/* ============================================================
   SECTIONS / PANELS
   ============================================================ */

.section-heading,
.panel-title,
.page-heading,
.admin-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.section-heading {
  margin: 38px 0 18px;
}

.section-heading h3,
.page-heading h3,
.panel-title h3 {
  margin: 0;
  font-family: var(--font-body);
  letter-spacing: -0.03em;
}

.section-heading p,
.panel-title p,
.page-heading > div > p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: 45px 1fr auto auto;
  align-items: center;
  gap: 15px;
  padding: 17px 19px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  box-shadow: 0 5px 20px rgba(25,61,50,0.03);
}

.task-card:hover {
  border-color: var(--c-accent-tint);
  transform: translateY(-1px);
}

.task-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 18px;
  font-weight: 700;
}

.task-info h4 {
  margin: 0;
  font-size: 14px;
}

.task-info p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.task-points {
  text-align: right;
}

.task-points strong,
.task-points span {
  display: block;
}

.task-points strong {
  color: var(--primary);
}

.task-points span {
  color: var(--muted);
  font-size: 10px;
}

.task-action {
  min-height: 38px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
}

.task-action:hover {
  background: var(--accent-light);
}

.task-card.completed {
  opacity: 0.65;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 18px;
}

.panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.more-button {
  border: 0;
  background: transparent;
  color: var(--muted);
}

.progress-graphic {
  display: flex;
  align-items: center;
  gap: 35px;
  padding-top: 28px;
}

.donut {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 125px;
  height: 125px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, white 0 58%, transparent 59%),
    conic-gradient(var(--primary) 0 72%, var(--c-line) 72% 100%);
}

.donut span {
  font-family: var(--font-body);
  font-size: 25px;
  font-weight: 800;
}

.progress-legend {
  flex: 1;
}

.progress-legend p {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  align-items: center;
  gap: 9px;
  margin: 12px 0;
  font-size: 12px;
}

.progress-legend strong {
  font-size: 13px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
}

.dot.pale {
  background: var(--c-line);
}

.recognition {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 13px;
  margin-top: 27px;
  padding: 17px;
  border-radius: 14px;
  background: var(--accent-light);
}

.recognition-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: white;
}

.recognition p {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
}

.recognition p span {
  color: var(--muted);
}

.recognition small {
  color: var(--muted);
}

/* ============================================================
   PAGE HEADINGS
   ============================================================ */

.page-heading {
  margin-bottom: 28px;
}

.page-heading h3 {
  font-size: 34px;
}

.xp-chip {
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 13px;
}

/* ============================================================
   REWARDS
   ============================================================ */

.reward-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.reward-card {
  display: flex;
  gap: 20px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.reward-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 65px;
  height: 65px;
  border-radius: 17px;
  background: var(--accent-light);
  font-size: 28px;
}

.reward-info {
  flex: 1;
}

.reward-info h3 {
  margin: 0;
  font-family: var(--font-body);
}

.reward-info p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.reward-info > strong {
  display: block;
  margin-bottom: 14px;
  color: var(--primary);
}

.reward-button {
  width: 100%;
}

/* ============================================================
   LEADERBOARD
   ============================================================ */

.leaderboard-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.leaderboard-tabs {
  display: flex;
  gap: 5px;
  margin-bottom: 15px;
  padding: 4px;
  width: fit-content;
  border-radius: 10px;
  background: var(--surface-soft);
}

.tab {
  padding: 8px 14px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.tab.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 40px 40px 1fr auto;
  align-items: center;
  gap: 14px;
  min-height: 65px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.leaderboard-row:last-child {
  border-bottom: 0;
}

.leaderboard-rank {
  font-family: var(--font-body);
  font-weight: 800;
  text-align: center;
}

.leaderboard-person strong {
  font-size: 13px;
}

.leaderboard-points {
  color: var(--primary);
  font-size: 13px;
}

/* ============================================================
   LEARNING
   ============================================================ */

.learning-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.learning-grid article {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.learning-grid article > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  margin-bottom: 20px;
  border-radius: 13px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 20px;
}

.learning-grid article h3 {
  margin: 0;
  font-family: var(--font-body);
}

.learning-grid article > p:not(.eyebrow) {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.thin-progress {
  height: 7px;
  overflow: hidden;
  margin: 22px 0 8px;
  border-radius: 20px;
  background: var(--c-line);
}

.thin-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.learning-grid small {
  color: var(--muted);
}

/* ============================================================
   ADMIN
   ============================================================ */

.admin-workspace {
  min-height: 100vh;
  background: var(--bg);
}

.admin-sidebar {
  position: fixed;
  z-index: 20;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 30px 18px 20px;
  border-right: 1px solid var(--line);
  background: var(--primary);
  color: white;
}

.admin-sidebar .wordmark {
  padding: 0 14px;
  margin-bottom: 45px;
}

.admin-sidebar .brand-mark {
  color: var(--c-accent-tint);
}

.admin-sidebar small {
  margin-left: 5px;
  color: var(--c-line-strong);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.admin-nav {
  width: 100%;
  min-height: 45px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--c-line-strong);
  text-align: left;
  font-weight: 600;
}

.admin-nav:hover,
.admin-nav.active {
  background: rgba(255,255,255,0.1);
  color: white;
}

.admin-sidebar-bottom {
  margin-top: auto;
}

.back-to-employee {
  width: 100%;
  margin-bottom: 15px;
  padding: 11px 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: transparent;
  color: var(--c-line-strong);
  text-align: left;
}

.admin-profile {
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
}

.admin-profile strong,
.admin-profile small {
  display: block;
}

.admin-profile small {
  margin: 3px 0 0;
  color: var(--c-text-2);
  letter-spacing: 0;
}

.admin-main {
  margin-left: var(--sidebar);
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 94px;
  padding: 25px 5%;
  border-bottom: 1px solid var(--line);
  background: white;
}

.admin-topbar h2 {
  margin: 0;
  font-family: var(--font-body);
}

.admin-status {
  padding: 8px 12px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}

.admin-content {
  width: min(1200px, 90%);
  margin: auto;
  padding: 40px 0 70px;
}

.admin-view {
  display: none;
}

.active-admin-view {
  display: block;
}

.admin-heading {
  margin-bottom: 28px;
}

.admin-heading h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 32px;
}

.admin-heading p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 18px;
}

.admin-stats article {
  padding: 23px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.admin-stats p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
}

.admin-stats strong {
  display: block;
  font-family: var(--font-body);
  font-size: 30px;
}

.admin-stats small {
  color: var(--c-accent);
}

.admin-panel {
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.admin-recent-tasks,
#assigned-task-list {
  margin-top: 20px;
}

.admin-task-row {
  display: grid;
  grid-template-columns: 43px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.admin-task-row:last-child {
  border-bottom: 0;
}

.admin-task-row strong {
  font-size: 13px;
}

.admin-task-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.assignment-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 18px;
  margin-bottom: 20px;
}

.task-form {
  display: flex;
  flex-direction: column;
  gap: 17px;
}

.task-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
}

.task-form input,
.task-form select {
  min-height: 45px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  outline: none;
}

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

.assign-help {
  padding: 27px;
  border-radius: 18px;
  background: var(--accent-light);
}

.assign-help > span {
  font-size: 25px;
}

.assign-help h3 {
  font-family: var(--font-body);
}

.assign-help p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.employee-table-wrap {
  overflow-x: auto;
}

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

.employee-table th {
  padding: 13px 10px;
  color: var(--muted);
  font-size: 10px;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.employee-table td {
  padding: 16px 10px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.access-notice {
  margin-bottom: 18px;
  padding: 16px;
  border: 1px solid var(--c-warn-tint);
  border-radius: 12px;
  background: var(--c-panel);
  color: var(--c-warn);
  font-size: 12px;
  line-height: 1.5;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 19px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row strong {
  font-size: 13px;
}

.setting-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.setting-status {
  display: inline-block;
  padding: 5px 9px;
  border-radius: 20px;
  background: var(--accent-light);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
}

.switch {
  position: relative;
  display: inline-block;
  width: 43px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch i {
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: var(--c-line-strong);
  transition: 0.2s;
}

.switch i::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: white;
  transition: 0.2s;
}

.switch input:checked + i {
  background: var(--primary);
}

.switch input:checked + i::before {
  transform: translateX(19px);
}

/* ============================================================
   BOTTOM NAV
   ============================================================ */

.bottom-nav {
  display: none;
}

/* ============================================================
   TOAST
   ============================================================ */

.toast {
  position: fixed;
  z-index: 100;
  right: 25px;
  bottom: 25px;
  max-width: 360px;
  padding: 13px 17px;
  border-radius: 12px;
  background: var(--primary);
  color: white;
  box-shadow: var(--shadow);
  font-size: 12px;
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 950px) {
  :root {
    --sidebar: 220px;
  }

  .login-screen {
    grid-template-columns: 1fr;
  }

  .login-art {
    display: none;
  }

  .login-panel {
    padding: 45px 30px;
  }

  .hero-card {
    grid-template-columns: 1fr 220px;
  }

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

  .assignment-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --sidebar: 0px;
  }

  .sidebar {
    display: none;
    width: 250px;
    box-shadow: 10px 0 30px rgba(0,0,0,0.08);
  }

  .sidebar.mobile-open {
    display: flex;
  }

  .main-area {
    width: 100%;
    margin-left: 0;
    padding-bottom: 70px;
  }

  .mobile-menu {
    display: block;
    margin-right: 10px;
  }

  .topbar {
    min-height: 80px;
    padding: 18px 5%;
  }

  .topbar > div:first-of-type {
    flex: 1;
  }

  .topbar h2 {
    font-size: 18px;
  }

  .topbar .eyebrow {
    font-size: 8px;
  }

  .content {
    width: 92%;
    padding-top: 25px;
  }

  .hero-card {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .hero-card h3 {
    font-size: 27px;
  }

  .hero-visual {
    margin-top: 25px;
  }

  .section-heading,
  .page-heading,
  .admin-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    gap: 10px;
  }

  .task-card {
    grid-template-columns: 40px 1fr auto;
  }

  .task-points {
    display: none;
  }

  .task-action {
    grid-column: 2 / 4;
    width: 100%;
  }

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

  .progress-graphic {
    gap: 20px;
  }

  .progress-legend {
    min-width: 0;
  }

  .reward-card {
    padding: 20px;
  }

  .leaderboard-row {
    grid-template-columns: 30px 36px 1fr auto;
  }

  .admin-sidebar {
    display: none;
  }

  .admin-main {
    margin-left: 0;
  }

  .admin-topbar {
    padding: 20px 5%;
  }

  .admin-content {
    width: 92%;
    padding-top: 25px;
  }

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

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

  .bottom-nav {
    position: fixed;
    z-index: 50;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    min-height: 65px;
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.96);
    box-shadow: 0 -5px 20px rgba(25,61,50,0.06);
  }

  .bottom-nav button {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 3px;
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 18px;
  }

  .bottom-nav button span {
    font-size: 9px;
    font-weight: 700;
  }

  .bottom-nav button.active {
    color: var(--primary);
  }

  .toast {
    right: 15px;
    bottom: 80px;
    left: 15px;
    max-width: none;
  }
}

@media (max-width: 430px) {
  .login-panel {
    padding: 35px 22px;
  }

  .login-copy {
    margin: 40px 0 28px;
  }

  .login-copy h1 {
    font-size: 38px;
  }

  .hero-card {
    padding: 23px;
  }

  .panel {
    padding: 20px;
  }

  .progress-graphic {
    align-items: flex-start;
    flex-direction: column;
  }

  .setting-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* =========================
   ADMIN DASHBOARD
   ========================= */

.admin-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

.admin-header h1 {
  margin: 0;
}

.admin-header p {
  margin-top: 6px;
  opacity: 0.7;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}

.admin-card {
  padding: 24px;
  border-radius: 16px;
  background: white;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.admin-card span {
  display: block;
  font-size: 14px;
  opacity: 0.65;
  margin-bottom: 10px;
}

.admin-card strong {
  font-size: 30px;
}

.admin-section {
  background: white;
  padding: 24px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.admin-section-header h2 {
  margin-bottom: 5px;
}

.admin-section-header p {
  margin: 0;
  opacity: 0.65;
}

#employeeSearch {
  padding: 10px 14px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  min-width: 220px;
}

.admin-table-container {
  overflow-x: auto;
}

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

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--c-line);
}

.admin-table th {
  font-size: 13px;
  opacity: 0.65;
}

.role-badge {
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.recent-employee {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
}

.recent-employee span {
  opacity: 0.6;
}

@media (max-width: 800px) {

  .admin-summary {
    grid-template-columns: repeat(2, 1fr);
  }

}

@media (max-width: 600px) {

  .admin-page {
    padding: 16px;
  }

  .admin-summary {
    grid-template-columns: 1fr;
  }

  .admin-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }

}

/* =========================
   EMPLOYEE PROFILE
   ========================= */

.employee-profile-grid,
.employee-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.employee-profile-grid > div {
  padding: 18px;
  background: var(--c-panel);
  border-radius: 12px;
}

.employee-profile-grid span {
  display: block;
  font-size: 13px;
  opacity: 0.6;
  margin-bottom: 6px;
}

.employee-profile-grid strong {
  font-size: 16px;
}

.employee-edit-grid label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 14px;
  font-weight: 600;
}

.employee-edit-grid input,
.employee-edit-grid select {
  padding: 11px 13px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
}

.employee-edit-grid input:focus,
.employee-edit-grid select:focus {
  outline: none;
  border-color: var(--c-text-2);
}

#saveEmployeeButton {
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
}

#saveEmployeeButton:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#saveMessage {
  font-size: 14px;
}

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

/* =========================
   TASK AUDIENCE SELECTORS
   ========================= */

.audience-selector {
  position: relative;
}

.audience-dropdown-button {
  width: 100%;
  max-width: 600px;
  margin-top: 10px;
  padding: 12px 15px;

  display: flex;
  justify-content: space-between;
  align-items: center;

  background: white;
  border: 1px solid var(--c-line-strong);
  border-radius: 6px;

  cursor: pointer;
  text-align: left;
  font-size: 14px;
}

.audience-dropdown-button:hover {
  border-color: var(--c-text-2);
}

.audience-dropdown {
  width: 100%;
  max-width: 600px;

  margin-top: 5px;
  padding: 12px;

  background: white;
  border: 1px solid var(--c-line-strong);
  border-radius: 6px;

  max-height: 350px;
  overflow-y: auto;

  box-sizing: border-box;
}

.audience-dropdown-actions {
  display: flex;
  gap: 8px;

  padding-bottom: 10px;
  margin-bottom: 10px;

  border-bottom: 1px solid var(--c-line);
}

.audience-dropdown-actions button {
  padding: 6px 10px;
  font-size: 13px;
  cursor: pointer;
}

.audience-search {
  width: 100%;
  box-sizing: border-box;

  padding: 9px 10px;
  margin-bottom: 10px;

  border: 1px solid var(--c-line-strong);
  border-radius: 5px;
}

.audience-checkbox-row {
  display: flex;
  align-items: center;

  padding: 8px 5px;

  cursor: pointer;
}

.audience-checkbox-row:hover {
  background: var(--c-panel);
}

.audience-checkbox-row input {
  margin-right: 10px;
}

.audience-checkbox-label {
  font-size: 14px;
}

/* ============================================================
   THRIVE — BRAND REDESIGN
   Premium Chinese dining inspired HR gamification theme
   ============================================================ */

:root {
  --bg: var(--c-panel);
  --surface: #FFFFFF;
  --surface-soft: var(--c-panel);
  --text: var(--c-text);
  --muted: var(--c-text-2);
  --line: var(--c-line);

  --primary: var(--c-secondary);
  --primary-dark: var(--c-secondary);
  --primary-soft: var(--c-tint);

  --accent: var(--c-warn);
  --accent-light: var(--c-warn-tint);
  --gold-dark: var(--c-warn);

  --warning: var(--c-warn);
  --danger: var(--c-secondary);
  --success: var(--c-accent);

  --shadow: 0 10px 30px rgba(54, 32, 24, 0.08);
  --shadow-hover: 0 14px 34px rgba(54, 32, 24, 0.12);
  --radius: 14px;
}

/* ---------- Base ---------- */

body {
  background: var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button {
  transition: background .18s ease, border-color .18s ease,
              color .18s ease, transform .18s ease,
              box-shadow .18s ease;
}

/* ---------- Brand ---------- */

.wordmark {
  color: var(--text);
}

.brand-mark {
  color: var(--primary);
}

.eyebrow {
  color: var(--primary);
}

.primary-button,
#saveEmployeeButton {
  background: var(--primary);
  color: #fff;
  border: 0;
  box-shadow: 0 5px 14px rgba(211, 47, 47, .18);
}

.primary-button:hover,
#saveEmployeeButton:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 20px rgba(211, 47, 47, .24);
}

.secondary-button,
.task-action {
  border-color: var(--c-line-strong);
  background: #fff;
  color: var(--primary);
}

.secondary-button:hover,
.task-action:hover {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.text-button,
.admin-entry {
  color: var(--primary);
}

/* ---------- Inputs ---------- */

input,
select,
textarea,
.login-form input,
.task-form input,
.task-form select,
.employee-edit-grid input,
.employee-edit-grid select,
#employeeSearch {
  border-color: var(--c-line-strong);
  color: var(--text);
  background: #fff;
}

input:focus,
select:focus,
textarea:focus,
.login-form input:focus,
.task-form input:focus,
.employee-edit-grid input:focus,
.employee-edit-grid select:focus,
#employeeSearch:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, .10);
}

/* ---------- Login ---------- */

.login-screen {
  background: var(--surface);
}

.login-art {
  background:
    radial-gradient(circle at 22% 22%, rgba(255,179,0,.22), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(211,47,47,.15), transparent 32%),
    linear-gradient(145deg, var(--c-panel), var(--c-tint));
}

.login-art::after {
  border-color: rgba(211, 47, 47, .13);
}

.orb-one {
  background: rgba(255,179,0,.35);
}

.orb-two {
  background: rgba(211,47,47,.14);
}

.brand-mark.large {
  color: var(--primary);
}

.mini-card {
  border-color: rgba(255,255,255,.9);
  box-shadow: var(--shadow);
}

.login-copy h1 {
  color: var(--text);
}

.login-form input {
  background: var(--c-panel);
}

.login-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211,47,47,.10);
}

.form-row a {
  color: var(--primary);
}

/* ---------- Employee sidebar ---------- */

.sidebar {
  background: #FFFFFF;
  border-right-color: var(--line);
}

.nav-link {
  color: var(--muted);
}

.nav-link b {
  background: var(--accent-light);
  color: var(--gold-dark);
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.avatar {
  background: var(--primary-soft);
  color: var(--primary);
}

.profile-mini {
  background: var(--c-panel);
}

.main-area {
  background: var(--bg);
}

.topbar {
  border-bottom-color: var(--line);
  background: rgba(255,255,255,.94);
}

.topbar h2 span {
  color: var(--primary);
}

.avatar-button {
  background: var(--primary-soft);
  color: var(--primary);
}

/* ---------- Employee hero ---------- */

.hero-card {
  position: relative;
  background:
    radial-gradient(circle at 86% 20%, rgba(255,255,255,.62), transparent 23%),
    radial-gradient(circle at 70% 100%, rgba(255,179,0,.16), transparent 30%),
    linear-gradient(135deg, var(--c-tint), var(--c-tint));
  border: 1px solid var(--c-tint);
  box-shadow: var(--shadow);
}

.hero-card::after {
  content: "福";
  position: absolute;
  right: 28px;
  bottom: -22px;
  font-family: var(--font-body);
  font-size: 150px;
  font-weight: 700;
  color: rgba(211,47,47,.055);
  pointer-events: none;
}

.hero-card h3 {
  color: var(--text);
}

.level-ring {
  border-color: rgba(255,255,255,.78);
  border-right-color: var(--primary);
  box-shadow: 0 10px 28px rgba(211,47,47,.12);
}

.level-ring strong {
  color: var(--primary);
}

.spark {
  color: var(--accent);
}

/* ---------- Cards / panels ---------- */

.panel,
.reward-card,
.leaderboard-card,
.learning-grid article,
.admin-panel,
.admin-section,
.admin-card {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel:hover,
.reward-card:hover,
.learning-grid article:hover {
  box-shadow: var(--shadow-hover);
}

.section-heading h3,
.page-heading h3,
.panel-title h3,
.admin-heading h3,
.admin-section-header h2 {
  color: var(--text);
}

/* ---------- Tasks ---------- */

.task-card {
  border-color: var(--line);
  box-shadow: 0 4px 16px rgba(54,32,24,.04);
}

.task-card:hover {
  border-color: var(--c-tint);
  box-shadow: var(--shadow-hover);
}

.task-icon {
  background: var(--primary-soft);
  color: var(--primary);
}

.task-points strong {
  color: var(--primary);
}

.task-action {
  background: #fff;
}

/* ---------- Progress / gamification ---------- */

.donut {
  background:
    radial-gradient(circle at center, white 0 58%, transparent 59%),
    conic-gradient(var(--primary) 0 72%, var(--c-line) 72% 100%);
}

.dot {
  background: var(--primary);
}

.dot.pale {
  background: var(--c-tint);
}

.thin-progress {
  background: var(--c-line);
}

.thin-progress i {
  background: linear-gradient(90deg, var(--primary), var(--accent));
}

.xp-chip,
.setting-status {
  background: var(--accent-light);
  color: var(--gold-dark);
}

/* ---------- Recognition / achievement styling ---------- */

.recognition {
  background: linear-gradient(135deg, var(--c-line), var(--c-panel));
  border: 1px solid var(--c-warn-tint);
}

.recognition-icon {
  color: var(--gold-dark);
  border: 1px solid var(--c-warn-tint);
}

.reward-icon,
.learning-grid article > span {
  background: var(--accent-light);
  color: var(--gold-dark);
}

.reward-info > strong {
  color: var(--primary);
}

/* ---------- Leaderboard ---------- */

.leaderboard-tabs {
  background: var(--c-line);
}

.tab.active {
  color: var(--primary);
  border: 1px solid var(--c-tint);
}

.leaderboard-row {
  border-bottom-color: var(--line);
}

.leaderboard-row:hover {
  background: var(--c-panel);
  border-radius: 10px;
}

.leaderboard-rank {
  color: var(--primary);
}

.leaderboard-points {
  color: var(--primary);
}

/* ---------- Admin sidebar ---------- */

.admin-sidebar {
  background:
    radial-gradient(circle at 85% 10%, rgba(255,179,0,.14), transparent 25%),
    linear-gradient(180deg, var(--c-primary), var(--c-primary));
  border-right: 0;
}

.admin-sidebar .brand-mark {
  color: var(--accent);
}

.admin-sidebar small {
  color: var(--c-warn-tint);
}

.admin-nav {
  color: var(--c-tint);
}

.admin-nav:hover,
.admin-nav.active {
  background: rgba(255,179,0,.14);
  color: #fff;
  border-left: 3px solid var(--accent);
}

.back-to-employee {
  border-color: rgba(255,255,255,.14);
  color: var(--c-line);
}

.back-to-employee:hover {
  background: rgba(255,255,255,.08);
}

.admin-profile small {
  color: var(--c-tint);
}

/* ---------- Admin workspace ---------- */

.admin-workspace,
.admin-page {
  background: var(--bg);
}

.admin-topbar {
  background: #fff;
  border-bottom-color: var(--line);
}

.admin-status {
  background: var(--primary-soft);
  color: var(--primary);
}

.admin-stats article {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.admin-stats strong,
.admin-card strong {
  color: var(--text);
}

.admin-stats small {
  color: var(--success);
}

/* ---------- Admin legacy/simple layout ---------- */

.admin-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.admin-header h1 {
  color: var(--text);
  font-family: var(--font-body);
  letter-spacing: -.035em;
}

.admin-header p,
.admin-section-header p {
  color: var(--muted);
}

.admin-card {
  border: 1px solid var(--line);
}

.admin-card:first-child {
  border-top: 3px solid var(--primary);
}

.admin-card:nth-child(2) {
  border-top: 3px solid var(--accent);
}

.admin-card:nth-child(3) {
  border-top: 3px solid var(--primary);
}

.admin-card:nth-child(4) {
  border-top: 3px solid var(--accent);
}

.admin-section {
  border: 1px solid var(--line);
}

.admin-section-header h2 {
  font-family: var(--font-body);
}

.admin-table th {
  color: var(--muted);
  border-bottom-color: var(--line);
}

.admin-table td {
  border-bottom-color: var(--line);
}

.admin-table tbody tr:hover {
  background: var(--c-panel);
}

.role-badge {
  background: var(--primary-soft);
  color: var(--primary);
}

.recent-employee {
  border-bottom-color: var(--line);
}

/* ---------- Employee profile ---------- */

.employee-profile-grid > div {
  background: var(--c-panel);
  border: 1px solid var(--line);
}

.employee-profile-grid span {
  color: var(--muted);
}

.employee-profile-grid strong {
  color: var(--text);
}

.employee-edit-grid label {
  color: var(--text);
}

/* ---------- Task audience selectors ---------- */

.audience-dropdown-button {
  background: #fff;
  border-color: var(--c-line-strong);
  border-radius: 10px;
  color: var(--text);
}

.audience-dropdown-button:hover {
  border-color: var(--primary);
  background: var(--c-panel);
}

.audience-dropdown {
  background: #fff;
  border-color: var(--c-line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.audience-dropdown-actions {
  border-bottom-color: var(--line);
}

.audience-dropdown-actions button {
  border: 1px solid var(--c-line);
  border-radius: 7px;
  background: #fff;
  color: var(--primary);
}

.audience-dropdown-actions button:hover {
  background: var(--primary-soft);
  border-color: var(--c-tint);
}

.audience-search {
  border-color: var(--c-line-strong);
}

.audience-checkbox-row:hover {
  background: var(--c-panel);
}

.audience-checkbox-row input {
  accent-color: var(--primary);
}

/* ---------- Alerts ---------- */

.access-notice {
  border-color: var(--c-warn-tint);
  background: var(--c-panel);
  color: var(--c-warn);
}

/* ---------- Toast ---------- */

.toast {
  background: var(--c-primary);
  box-shadow: 0 10px 30px rgba(54,32,24,.18);
}

/* ---------- Mobile bottom navigation ---------- */

.bottom-nav {
  border-top-color: var(--line);
  background: rgba(255,255,255,.97);
  box-shadow: 0 -8px 24px rgba(54,32,24,.08);
}

.bottom-nav button.active {
  color: var(--primary);
}

/* ---------- Responsive polish ---------- */

@media (max-width: 700px) {
  .admin-header {
    align-items: flex-start;
    gap: 15px;
  }

  .admin-card {
    border-top-width: 3px;
  }

  .hero-card::after {
    right: 5px;
    font-size: 110px;
  }
}

@media (max-width: 430px) {
  .wordmark {
    font-size: 21px;
  }

  .hero-card {
    border-radius: 18px;
  }

  .admin-section,
  .admin-card,
  .panel,
  .reward-card {
    border-radius: 13px;
  }
}


/* =========================================================
   THRIVE VISUAL POLISH v2
   Stronger branded background + premium task/admin controls
   ========================================================= */
:root {
  --primary: var(--c-secondary);
  --primary-dark: var(--c-secondary);
  --primary-soft: var(--c-tint);
  --gold: var(--c-warn);
  --gold-dark: var(--c-warn);
  --gold-soft: var(--c-warn-tint);
  --bg: var(--c-line);
  --surface: #FFFFFF;
  --surface-soft: var(--c-panel);
  --text: var(--c-text);
  --muted: var(--c-text-2);
  --line: var(--c-line);
  --shadow: 0 12px 35px rgba(91, 44, 30, .08);
  --shadow-hover: 0 16px 38px rgba(91, 44, 30, .13);
}

/* Branded background: warm paper + very subtle red/gold glow */
html, body {
  background:
    radial-gradient(circle at 8% 8%, rgba(211,47,47,.075), transparent 27%),
    radial-gradient(circle at 92% 12%, rgba(255,179,0,.09), transparent 25%),
    radial-gradient(circle at 82% 88%, rgba(211,47,47,.045), transparent 30%),
    linear-gradient(135deg, var(--c-panel) 0%, var(--c-line) 48%, var(--c-panel) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: .34;
  background-image:
    linear-gradient(90deg, rgba(211,47,47,.018) 1px, transparent 1px),
    linear-gradient(rgba(211,47,47,.018) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
}

/* Admin/task workspace */
.admin-page,
.admin-main {
  position: relative;
}

.admin-page::before,
.admin-main::before {
  content: "";
  position: absolute;
  top: 0;
  right: 4%;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,179,0,.10), transparent 68%);
  pointer-events: none;
  z-index: -1;
}

.admin-header {
  background: linear-gradient(135deg, rgba(255,255,255,.96), rgba(255,249,245,.96));
  border: 1px solid rgba(232,222,215,.9);
  border-top: 4px solid var(--primary);
  border-radius: 0 0 18px 18px;
  box-shadow: 0 8px 24px rgba(91,44,30,.06);
}

.admin-header h1::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 8px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--gold));
}

/* Make plain browser-grey buttons consistently branded */
.admin-header-actions button,
#logoutButton,
#tasksButton,
#updatePointsButton,
#saveEmployeeButton,
#createTaskButton,
#backButton,
.task-action,
.admin-section button[type="button"],
.admin-section button[type="submit"] {
  appearance: none;
  border: 0;
  border-radius: 10px;
  min-height: 42px;
  padding: 0 16px;
  font: inherit;
  font-weight: 700;
  letter-spacing: -.01em;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--c-secondary));
  box-shadow: 0 5px 14px rgba(211,47,47,.20);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.admin-header-actions button:hover,
#logoutButton:hover,
#tasksButton:hover,
#updatePointsButton:hover,
#saveEmployeeButton:hover,
#createTaskButton:hover,
#backButton:hover,
.task-action:hover,
.admin-section button[type="button"]:hover,
.admin-section button[type="submit"]:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, var(--c-secondary), var(--primary-dark));
  box-shadow: 0 9px 20px rgba(211,47,47,.25);
}

/* Secondary/header controls */
#backButton {
  color: var(--primary);
  background: #fff;
  border: 1px solid var(--c-tint);
  box-shadow: none;
}
#backButton:hover {
  color: var(--primary-dark);
  background: var(--primary-soft);
  border-color: var(--c-tint);
  box-shadow: none;
}

/* Logout should look deliberate, not like a default grey browser button */
#logoutButton {
  background: linear-gradient(135deg, var(--c-primary), var(--c-secondary));
}

/* Task page */
.admin-main > .admin-section:first-child,
.admin-page > .admin-section:first-of-type {
  background: linear-gradient(145deg, rgba(255,255,255,.98), rgba(255,249,245,.96));
}

.task-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #fff 0%, var(--c-panel) 100%);
  border: 1px solid var(--c-line);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  box-shadow: 0 7px 20px rgba(91,44,30,.06);
}

.task-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,179,0,.15), transparent 68%);
  pointer-events: none;
}

.task-card:hover {
  border-color: var(--c-tint);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

/* Task status / metadata chips */
.task-card .task-status,
.task-card .status,
.task-card .badge,
.task-card .task-points {
  border-radius: 999px;
  font-weight: 700;
}

/* Create-task form sections */
.admin-section + .admin-section {
  margin-top: 22px;
}

.admin-section {
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(7px);
  border: 1px solid rgba(232,222,215,.95);
  box-shadow: 0 10px 30px rgba(91,44,30,.055);
}

.admin-section-header {
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 16px;
  margin-bottom: 18px;
}

.admin-section-header h2 {
  color: var(--c-text);
}

.admin-section-header h2::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 22px;
  margin-right: 10px;
  vertical-align: -4px;
  border-radius: 99px;
  background: linear-gradient(var(--primary), var(--gold));
}

/* Inputs/selects */
.admin-section input:not([type="checkbox"]):not([type="radio"]),
.admin-section select,
.admin-section textarea {
  border: 1px solid var(--c-line-strong);
  background: var(--c-panel);
  border-radius: 10px;
  transition: border-color .18s ease, box-shadow .18s ease;
}

.admin-section input:not([type="checkbox"]):not([type="radio"]):focus,
.admin-section select:focus,
.admin-section textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(211,47,47,.10);
}

/* Audience controls: make them feel like the rest of the product */
.audience-dropdown-button {
  background: linear-gradient(135deg, #fff, var(--c-panel)) !important;
  border: 1px solid var(--c-line-strong) !important;
  box-shadow: 0 4px 12px rgba(91,44,30,.04);
}

.audience-dropdown-button:hover {
  background: var(--primary-soft) !important;
  border-color: var(--c-tint) !important;
}

.audience-dropdown {
  border: 1px solid var(--c-line-strong) !important;
  box-shadow: 0 14px 30px rgba(91,44,30,.10);
  background: #fff !important;
}

.audience-dropdown-actions button {
  color: var(--primary) !important;
  background: var(--c-panel) !important;
  border: 1px solid var(--c-line-strong) !important;
}

.audience-dropdown-actions button:hover {
  color: #fff !important;
  background: var(--primary) !important;
}

/* Gold is reserved for rewards/important gamification actions */
.reward-card,
.admin-card:nth-child(4) {
  background: linear-gradient(145deg, #fff, var(--c-line));
}

.reward-card:hover {
  border-color: var(--c-warn-tint);
}

/* Mobile: keep the branded background visible without making it busy */
@media (max-width: 700px) {
  html, body {
    background:
      radial-gradient(circle at 10% 5%, rgba(211,47,47,.07), transparent 34%),
      radial-gradient(circle at 90% 12%, rgba(255,179,0,.08), transparent 30%),
      var(--c-panel);
  }
  .admin-header {
    border-radius: 0 0 14px 14px;
  }
  .admin-header-actions button,
  #logoutButton,
  #tasksButton,
  #updatePointsButton,
  #saveEmployeeButton,
  #createTaskButton,
  #backButton {
    min-height: 40px;
    padding: 0 13px;
  }
}

/* =========================================================
   THRIVE TASKS PAGE — PREMIUM QUEST MANAGEMENT
   ========================================================= */

.tasks-page {
  min-height: 100vh;
  color: var(--c-text);
  background:
    radial-gradient(circle at 4% 10%, rgba(211,47,47,.11), transparent 22%),
    radial-gradient(circle at 94% 18%, rgba(255,179,0,.13), transparent 20%),
    radial-gradient(circle at 80% 92%, rgba(211,47,47,.06), transparent 28%),
    linear-gradient(135deg, var(--c-panel) 0%, var(--c-line) 52%, var(--c-panel) 100%);
  position: relative;
  overflow-x: hidden;
}

.tasks-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .28;
  background-image:
    linear-gradient(90deg, rgba(142,30,30,.025) 1px, transparent 1px),
    linear-gradient(rgba(142,30,30,.025) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  z-index: 0;
}

.tasks-page .tasks-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 60px;
}

/* =========================================================
   TOP NAVIGATION
   ========================================================= */

.tasks-page .tasks-topbar {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  padding: 14px 18px 14px 22px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(225,211,202,.9);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(91,44,30,.07);
  backdrop-filter: blur(14px);
}

.tasks-page .brand-lockup {
  display: flex;
  align-items: center;
  gap: 13px;
}

.tasks-page .brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  border-radius: 13px;
  color: #fff;
  font-size: 21px;
  font-weight: 900;
  background: linear-gradient(145deg, var(--c-secondary), var(--c-secondary));
  box-shadow: 0 8px 18px rgba(169,31,31,.22);
}

.tasks-page .brand-text strong {
  display: block;
  font-size: 17px;
  line-height: 1.1;
  letter-spacing: -.2px;
}

.tasks-page .brand-text span {
  display: block;
  margin-top: 4px;
  color: var(--c-text-2);
  font-size: 12px;
}

.tasks-page .tasks-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tasks-page .tasks-actions button {
  min-height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease;
}

.tasks-page #backButton {
  color: var(--c-primary);
  background: var(--c-panel);
  border: 1px solid var(--c-tint);
}

.tasks-page #backButton:hover {
  transform: translateY(-1px);
  background: var(--c-tint);
  box-shadow: 0 7px 17px rgba(91,44,30,.08);
}

.tasks-page #logoutButton {
  color: #fff;
  border: 1px solid var(--c-secondary);
  background: linear-gradient(145deg, var(--c-secondary), var(--c-primary));
  box-shadow: 0 7px 16px rgba(169,31,31,.18);
}

.tasks-page #logoutButton:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(169,31,31,.25);
}

/* =========================================================
   PAGE HERO
   ========================================================= */

.tasks-page .tasks-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 30px;
  margin-bottom: 25px;
  padding: 30px 34px;
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background:
    linear-gradient(120deg, rgba(255,255,255,.98), rgba(255,247,241,.94));
  border: 1px solid rgba(225,211,202,.95);
  box-shadow: 0 14px 38px rgba(91,44,30,.08);
}

.tasks-page .tasks-hero::before {
  content: "";
  position: absolute;
  right: -55px;
  top: -75px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(255,179,0,.19),
      rgba(255,179,0,0) 68%
    );
}

.tasks-page .tasks-hero::after {
  content: "福";
  position: absolute;
  right: 35px;
  bottom: -36px;
  color: rgba(211,47,47,.035);
  font-family: var(--font-body);
  font-size: 180px;
  line-height: 1;
  pointer-events: none;
}

.tasks-page .eyebrow {
  margin: 0 0 9px;
  color: var(--c-secondary);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}

.tasks-page .tasks-hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  line-height: 1.05;
  letter-spacing: -1.3px;
}

.tasks-page .tasks-hero p {
  position: relative;
  z-index: 1;
  max-width: 650px;
  margin: 10px 0 0;
  color: var(--c-text-2);
  font-size: 14px;
  line-height: 1.65;
}

.tasks-page #createTaskButton {
  position: relative;
  z-index: 2;
  min-width: 158px;
  min-height: 50px;
  padding: 0 20px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, var(--c-secondary), var(--c-secondary));
  box-shadow: 0 11px 24px rgba(169,31,31,.22);
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    transform .18s ease,
    box-shadow .18s ease;
}

.tasks-page #createTaskButton:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 28px rgba(169,31,31,.28);
}

/* =========================================================
   SUMMARY CARDS
   ========================================================= */

.tasks-page .task-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 25px;
}

.tasks-page .task-stat {
  position: relative;
  overflow: hidden;
  padding: 19px 20px;
  border-radius: 15px;
  background: rgba(255,255,255,.84);
  border: 1px solid var(--c-line);
  box-shadow: 0 8px 22px rgba(91,44,30,.055);
}

.tasks-page .task-stat::after {
  content: "";
  position: absolute;
  right: -18px;
  bottom: -24px;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(255,179,0,.16),
      transparent 70%
    );
}

.tasks-page .task-stat-label {
  display: block;
  color: var(--c-text-2);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .65px;
  text-transform: uppercase;
}

.tasks-page .task-stat-value {
  display: block;
  margin-top: 7px;
  color: var(--c-text);
  font-size: 27px;
  font-weight: 850;
  line-height: 1;
}

.tasks-page .task-stat.active .task-stat-value {
  color: var(--c-secondary);
}

.tasks-page .task-stat.assigned .task-stat-value {
  color: var(--c-warn);
}

.tasks-page .task-stat.completed .task-stat-value {
  color: var(--c-accent);
}

.tasks-page .task-stat.pending .task-stat-value {
  color: var(--c-text-2);
}

/* =========================================================
   TASK BOARD
   ========================================================= */

.tasks-page .task-board {
  padding: 25px;
  border-radius: 21px;
  background: rgba(255,255,255,.89);
  border: 1px solid var(--c-line-strong);
  box-shadow: 0 15px 40px rgba(91,44,30,.07);
  backdrop-filter: blur(10px);
}

.tasks-page .task-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--c-line);
}

.tasks-page .task-board-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.tasks-page .task-board-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--c-secondary);
  background: var(--c-tint);
  font-size: 17px;
}

.tasks-page .task-board-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -.35px;
}

.tasks-page .task-board-header p {
  margin: 4px 0 0;
  color: var(--c-text-2);
  font-size: 12px;
}

.tasks-page #tasksContainer {
  display: grid;
  gap: 13px;
}

/* =========================================================
   TASK CARDS
   ========================================================= */

.tasks-page .task-admin-card {
  position: relative;
  overflow: hidden;
  padding: 21px 22px 18px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background:
    linear-gradient(135deg, #FFFFFF 0%, var(--c-panel) 100%);
  box-shadow: 0 5px 16px rgba(91,44,30,.045);
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    border-color .18s ease;
}

.tasks-page .task-admin-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background:
    linear-gradient(180deg, var(--c-secondary), var(--c-warn));
}

.tasks-page .task-admin-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -60px;
  top: -60px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle,
      rgba(255,179,0,.13),
      transparent 68%
    );
  pointer-events: none;
}

.tasks-page .task-admin-card:hover {
  transform: translateY(-2px);
  border-color: var(--c-tint);
  box-shadow: 0 12px 25px rgba(91,44,30,.09);
}

.tasks-page .task-admin-card-header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.tasks-page .task-admin-card-header h3 {
  margin: 0;
  color: var(--c-text);
  font-size: 18px;
  line-height: 1.25;
  letter-spacing: -.25px;
}

.tasks-page .task-admin-description {
  max-width: 760px;
  margin: 7px 0 0;
  color: var(--c-text-2);
  font-size: 13px;
  line-height: 1.55;
}

/* =========================================================
   STATUS
   ========================================================= */

.tasks-page .task-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .65px;
  text-transform: uppercase;
}

.tasks-page .task-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.tasks-page .task-status-active {
  color: var(--c-accent);
  background: var(--c-line);
}

.tasks-page .task-status-active::before {
  background: var(--c-accent);
}

.tasks-page .task-status-other {
  color: var(--c-text-2);
  background: var(--c-line);
}

.tasks-page .task-status-other::before {
  background: var(--c-text-2);
}

/* =========================================================
   TASK INFORMATION
   ========================================================= */

.tasks-page .task-admin-meta {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns:
    1.35fr 1.2fr .9fr .8fr .9fr .8fr;
  gap: 9px;
  margin-top: 17px;
}

.tasks-page .task-admin-meta > div {
  min-width: 0;
  padding: 10px 11px;
  border-radius: 10px;
  background: var(--c-panel);
  border: 1px solid var(--c-line);
}

.tasks-page .task-admin-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--c-text-2);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .65px;
  text-transform: uppercase;
}

.tasks-page .task-admin-meta strong {
  display: block;
  overflow: hidden;
  color: var(--c-text);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tasks-page .task-admin-meta > div:first-child strong {
  color: var(--c-secondary);
}

/* =========================================================
   TASK FOOTER
   ========================================================= */

.tasks-page .task-admin-footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: center;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--c-line);
  color: var(--c-text-2);
  font-size: 11px;
}

.tasks-page .task-admin-footer strong {
  color: var(--c-text);
}

/* =========================================================
   EMPTY / ERROR STATE
   ========================================================= */

.tasks-page .admin-empty-state {
  padding: 55px 25px;
  text-align: center;
  border: 1px dashed var(--c-line-strong);
  border-radius: 15px;
  background:
    linear-gradient(145deg, var(--c-panel), var(--c-panel));
}

.tasks-page .admin-empty-state::before {
  content: "✦";
  display: block;
  margin-bottom: 9px;
  color: var(--c-secondary);
  font-size: 26px;
}

.tasks-page .admin-empty-state h3 {
  margin: 0;
  font-size: 19px;
}

.tasks-page .admin-empty-state p {
  margin: 7px 0 0;
  color: var(--c-text-2);
  font-size: 13px;
}

.tasks-page #tasksMessage {
  margin-bottom: 12px;
  color: var(--c-secondary);
  font-size: 13px;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 950px) {

  .tasks-page .task-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .tasks-page .task-admin-meta {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 700px) {

  .tasks-page .tasks-shell {
    width: min(100% - 24px, 680px);
    padding-top: 12px;
  }

  .tasks-page .tasks-topbar {
    padding: 11px 12px;
    border-radius: 14px;
  }

  .tasks-page .brand-text span {
    display: none;
  }

  .tasks-page .tasks-actions button {
    padding: 0 12px;
  }

  .tasks-page .tasks-actions #backButton {
    font-size: 0;
  }

  .tasks-page .tasks-actions #backButton::before {
    content: "←";
    font-size: 19px;
  }

  .tasks-page .tasks-hero {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 24px;
    border-radius: 18px;
  }

  .tasks-page #createTaskButton {
    width: 100%;
  }

  .tasks-page .task-board {
    padding: 16px;
    border-radius: 17px;
  }

  .tasks-page .task-board-header {
    align-items: flex-start;
  }

  .tasks-page .task-admin-card {
    padding: 18px 17px 16px;
  }

  .tasks-page .task-admin-card-header {
    flex-direction: column;
    gap: 10px;
  }

  .tasks-page .task-admin-meta {
    grid-template-columns: repeat(2, 1fr);
  }

  .tasks-page .task-admin-footer {
    display: block;
  }

  .tasks-page .task-admin-footer > div + div {
    margin-top: 6px;
  }
}

@media (max-width: 480px) {

  .tasks-page .task-stats {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }

  .tasks-page .task-stat {
    padding: 15px;
  }

  .tasks-page .task-stat-value {
    font-size: 23px;
  }

  .tasks-page .task-admin-meta {
    grid-template-columns: 1fr 1fr;
  }

  .tasks-page .task-admin-meta > div {
    padding: 9px;
  }

  .tasks-page .tasks-topbar {
    gap: 8px;
  }

  .tasks-page .tasks-actions {
    gap: 5px;
  }
}

/* =========================================================
   THRIVE GLOBAL VISUAL RULE
   Clean premium interface — no floating corner glows
   ========================================================= */

/* Decorative pseudo-elements */
.admin-card::after,
.admin-card::before,
.admin-section::after,
.admin-section::before,
.task-stat::after,
.task-stat::before,
.task-admin-card::after,
.task-admin-card::before,
.tasks-hero::before,
.tasks-hero::after,
.hero-card::before,
.hero-card::after,
.panel::before,
.panel::after,
.card::before,
.card::after,
.reward-card::before,
.reward-card::after,
.leaderboard-card::before,
.leaderboard-card::after,
.profile-card::before,
.profile-card::after {
  display: none !important;
}

/* =========================================================
   THRIVE GLOBAL BACKGROUND
   Clean solid background — no decorative glow
   ========================================================= */

html,
body {
  background: var(--c-panel) !important;
}

/* Main page backgrounds */
body,
.admin-page,
.admin-main,
.employee-page,
.employee-workspace,
.dashboard-page,
.leaderboard-page,
.tasks-page {
  background: var(--c-panel) !important;
}

/* Remove decorative background gradients */
.tasks-page::before,
.tasks-page::after,
.admin-page::before,
.admin-page::after,
.employee-page::before,
.employee-page::after,
.dashboard-page::before,
.dashboard-page::after,
.leaderboard-page::before,
.leaderboard-page::after {
  display: none !important;
  background: none !important;
}

/* =========================================================
   THRIVE — KEEP BACKGROUND GLOW, KEEP CARDS SOLID
   ========================================================= */

/* Page background can have the warm glow */
body {
  background: var(--c-panel) !important;
}

/* Cards and panels must remain one consistent colour */
.tasks-page .tasks-topbar,
.tasks-page .tasks-hero,
.tasks-page .task-stat,
.tasks-page .task-board,
.tasks-page .task-admin-card,
.admin-card,
.admin-section,
.panel,
.card,
.reward-card,
.profile-card {
  background: #FFFFFF !important;
  background-image: none !important;
}

/* Remove decorative gradients INSIDE the cards */
.tasks-page .tasks-hero::before,
.tasks-page .tasks-hero::after,
.tasks-page .task-stat::before,
.tasks-page .task-stat::after,
.tasks-page .task-admin-card::before,
.tasks-page .task-admin-card::after {
  display: none !important;
}

/* =========================================================
   Excel-style employee table filters
   ========================================================= */

.admin-table thead th {
  position: relative;
  vertical-align: middle;
  white-space: nowrap;
  padding: 14px 16px;
}

.excel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
}

.excel-header span {
  font-weight: 700;
  color: var(--c-text-2);
}

.column-filter-btn {
  border: none;
  background: transparent;
  color: var(--c-text-2);
  font-size: 11px;
  padding: 4px 5px;
  min-width: 24px;
  height: 24px;
  border-radius: 5px;
  cursor: pointer;
  line-height: 1;
}

.column-filter-btn:hover {
  background: var(--c-line);
  color: var(--c-secondary);
}

.column-filter-btn.active {
  background: var(--c-secondary);
  color: #ffffff;
}

/* =========================================================
   Keep the entire Employees section inside one card
   ========================================================= */

.admin-page .admin-section {
  background: #ffffff;
  border: 1px solid var(--c-line);
  border-radius: 22px;
  overflow: hidden;
}

/* Keep the Employees title/search area inside the card */
.admin-page .admin-section-header {
  padding: 28px 36px 24px;
  margin: 0;
  background: #ffffff;
}

/* Keep the table inside the same card */
.admin-page .admin-table-container {
  width: 100%;
  overflow-x: auto;
  background: #ffffff;
  border-top: 1px solid var(--c-line);
}

.admin-page .admin-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  background: #ffffff;
}

/* Table header */
.admin-page .admin-table thead {
  background: #ffffff;
}

.admin-page .admin-table thead th {
  background: #ffffff;
  border-bottom: 1px solid var(--c-line-strong);
}

/* Table rows */
.admin-page .admin-table tbody tr {
  background: #ffffff;
}

.admin-page .admin-table tbody tr:last-child td {
  border-bottom: none;
}
/* Admin employee directory: one card, with controls scoped to this page. */
.admin-page .employees-card { padding: 0; }
.admin-page .employees-card .admin-section-header { gap: 24px; }
.admin-page .employees-card .admin-table { min-width: 720px; }
.admin-page .employees-card th { opacity: 1; }
.admin-page .employees-card .column-filter-btn {
  min-width: 28px; min-height: 28px; height: 28px; padding: 4px; border: 1px solid var(--c-line-strong);
  background: #fff; color: var(--c-text-2); box-shadow: none; transform: none;
}
.admin-page .employees-card .column-filter-btn.active { background: var(--c-secondary); color: white; }
.admin-page .employees-card .column-filter-btn:hover { border-color: var(--c-secondary); background: var(--c-line); }
.admin-page .employees-card .column-filter-btn.active:hover { background: var(--c-secondary); }
.employee-table-footer {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding: 16px 28px; border-top: 1px solid var(--c-line);
}
.employee-table-footer p { margin: 0; font-size: 13px; color: var(--c-text-2); }
.admin-page .employees-card .employee-empty { padding: 32px; text-align: center; }
.employees-card td a { color: inherit; text-decoration: none; }
.employees-card td a:hover { text-decoration: underline; }
.employee-filter-panel {
  position: fixed; z-index: 1000; width: 300px; max-width: calc(100vw - 16px);
  max-height: calc(100dvh - 16px); overflow-y: auto; box-sizing: border-box;
  padding: 16px; background: #fff; border: 1px solid var(--c-line-strong); border-radius: 12px;
  box-shadow: 0 12px 36px rgba(54,32,24,.2); color: var(--c-text); font-size: 13px;
}
.employee-filter-panel strong { display: block; margin-bottom: 12px; }
.employee-filter-panel .filter-sort-actions { display: grid; gap: 6px; padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px solid var(--c-line); }
.employee-filter-panel .filter-sort-actions button { text-align: left; }
.employee-filter-panel .filter-sort-actions button[aria-pressed="true"] { background: var(--c-tint); color: var(--c-secondary); border-color: var(--c-secondary); }
.employee-filter-panel .filter-value-search { width: 100%; padding: 9px; margin-bottom: 10px; }
.employee-filter-panel label { display: flex; align-items: center; gap: 8px; padding: 8px 2px; overflow-wrap: anywhere; }
.employee-filter-panel input[type="checkbox"] { flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--c-secondary); }
.employee-filter-panel .filter-values { max-height: 220px; overflow-y: auto; border-block: 1px solid var(--c-line); }
.employee-filter-panel .filter-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin-top: 12px; }
.employee-filter-panel button { padding: 8px; border: 1px solid var(--c-line-strong); border-radius: 6px; background: white; cursor: pointer; }
.employee-filter-panel button[data-action="apply"] { background: var(--c-secondary); color: white; }
.employee-filter-panel :focus-visible, .employees-card button:focus-visible, .employees-card a:focus-visible { outline: 2px solid var(--c-secondary); outline-offset: 3px; }
@media (max-width: 600px) {
  .admin-page .employees-card .admin-section-header { padding: 20px; }
  .employees-card #employeeSearch { min-width: 0; width: 100%; }
  .employee-table-footer { padding: 16px 20px; }
}
.onboarding-task-reminder{position:fixed;right:16px;bottom:16px;z-index:1000;max-width:calc(100vw - 32px);padding:12px 18px;border-radius:12px;background:var(--c-secondary);color:#fff;box-shadow:0 3px 15px #0002;font:600 13px/1.5 system-ui,sans-serif;text-decoration:none}

/* Sign-in page: EN / 中文 (client.js setupLogin, i18n.js) */
.login-lang { display: inline-flex; align-self: flex-end; border: 1px solid #d9cfc4; border-radius: 999px; padding: 2px; background: #fff; margin-bottom: 12px; }
.login-lang button { font: inherit; font-size: 13px; font-weight: 700; border: 0; background: none; color: #6b5d57; padding: 6px 14px; border-radius: 999px; cursor: pointer; }
.login-lang button[aria-pressed="true"] { background: #6a130d; color: #fff; }
