@import url("/assets/css/checkboxes.css");

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

body {
  background:
    linear-gradient(180deg, rgba(34, 197, 94, 0.08), transparent 300px),
    #05070f;
  color: #e6e6e6;
  height: 100vh;
  overflow: hidden;
}

body.light-mode {
  background:
    linear-gradient(180deg, rgba(22, 163, 74, 0.08), transparent 300px),
    #f6f8fb;
  color: #1a202c;
}

.navbar {
  background: rgba(5, 7, 15, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 24px;
  position: relative;
  z-index: 100;
}

.nav-container {
  align-items: center;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1480px;
  min-width: 0;
}

.nav-brand {
  align-items: center;
  background: linear-gradient(135deg, #22c55e, #86efac);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: flex;
  flex: 0 0 auto;
  font-size: 24px;
  font-weight: 800;
  min-width: 0;
}

.nav-brand img {
  flex: 0 0 auto;
}

.nav-brand span {
  line-height: 1.1;
  white-space: nowrap;
}

.nav-links,
.nav-theme-toggle {
  align-items: center;
  display: flex;
  gap: 10px;
}

.nav-links {
  flex: 1 1 auto;
  flex-wrap: nowrap;
  justify-content: center;
  min-width: 0;
}

.nav-theme-toggle {
  flex: 0 0 auto;
  gap: 8px;
}

.nav-btn {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #cbd5e1;
  display: inline-flex;
  font-weight: 700;
  padding: 9px 15px;
  text-decoration: none;
  white-space: nowrap;
}

.theme-toggle {
  align-items: center;
  background: #0b1220;
  border: 1px solid rgba(34, 197, 94, 0.42);
  border-radius: 999px;
  color: #22c55e;
  cursor: pointer;
  display: flex;
  font-size: 20px;
  height: 46px;
  justify-content: center;
  width: 46px;
}

.app {
  display: flex;
  height: calc(100vh - 70px);
}

.sidebar {
  background: rgba(10, 16, 30, 0.84);
  border-right: 1px solid rgba(34, 197, 94, 0.18);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 290px;
  padding: 22px;
  width: 290px;
}

.sidebar h2 {
  color: #22c55e;
  font-size: 22px;
}

.sidebar input,
.panel input,
.panel select,
.panel textarea {
  background: rgba(15, 23, 42, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #e6e6e6;
  margin: 8px 0;
  outline: none;
  padding: 12px 14px;
  width: 100%;
}

.sidebar input:focus,
.panel input:focus,
.panel select:focus,
.panel textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

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

.menu button,
.toolbar button,
.panel button,
.goal button {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 10px;
  color: #dcfce7;
  cursor: pointer;
  font-weight: 800;
  padding: 10px 12px;
}

.menu button {
  text-align: left;
}

.hint {
  background: rgba(34, 197, 94, 0.08);
  border-left: 3px solid #22c55e;
  border-radius: 6px;
  color: #94a3b8;
  font-size: 12px;
  margin-top: auto;
  padding: 12px;
}

.user-directory {
  display: grid;
  gap: 8px;
}

.goal-player-picker {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 12px;
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
}

.goal-player-picker-head {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.goal-player-picker-head strong {
  color: #dcfce7;
  font-size: 14px;
}

.goal-player-picker-head > span {
  background: rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
  text-transform: uppercase;
}

.goal-player-picker > p {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.4;
}

.user-directory h3 {
  color: #dcfce7;
  font-size: 14px;
}

.user-search-box {
  display: grid;
  gap: 6px;
}

.user-search-box > span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.directory-help,
.goal-editor-help {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.45;
  margin: 0;
}

.user-directory button {
  background: rgba(30, 41, 59, 0.82);
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 9px;
  color: #dcfce7;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 8px 10px;
  text-align: left;
}

.user-list button {
  display: grid;
  gap: 2px;
}

.user-list button strong {
  color: inherit;
}

.user-list button span {
  color: #94a3b8;
  font-size: 11px;
}

.user-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 2px;
}

.user-result-card {
  align-items: center;
  background: rgba(30, 41, 59, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 11px;
  display: grid;
  gap: 10px;
  grid-template-columns: minmax(0, 1fr) 38px;
  min-height: 48px;
  padding: 8px 9px 8px 12px;
}

.user-result-card > div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.user-result-card strong,
.user-result-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-result-card strong {
  color: #e5e7eb;
  font-size: 14px;
}

.user-result-card span {
  color: #94a3b8;
  font-size: 11px;
}

.user-result-card button {
  align-items: center;
  border-radius: 999px;
  display: inline-flex;
  font-size: 18px;
  height: 34px;
  justify-content: center;
  justify-self: end;
  line-height: 1;
  min-height: 34px;
  padding: 0;
  text-align: center;
  width: 34px;
}

.panel .user-result-card button {
  min-height: 34px;
  padding: 0;
  width: 34px;
}

.user-result-card.is-selected {
  border-color: rgba(34, 197, 94, 0.48);
  background: rgba(34, 197, 94, 0.16);
}

.user-result-card.is-selected strong,
.user-result-card.is-selected button {
  color: #86efac;
}

.user-list p {
  color: #94a3b8;
  font-size: 12px;
}

.selected-users-block {
  background: rgba(15, 23, 42, 0.56);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 12px;
  display: grid;
  gap: 8px;
  margin: 8px 0;
  padding: 12px;
}

.selected-users-block > span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.selected-users {
  display: grid;
  gap: 8px;
  min-height: 34px;
}

.selected-users button {
  align-items: center;
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.36);
  border-radius: 10px;
  color: #bbf7d0;
  cursor: pointer;
  display: grid;
  font-weight: 800;
  grid-template-columns: minmax(0, 1fr) 30px;
  min-height: 34px;
  padding: 6px 7px 6px 11px;
  text-align: left;
  width: 100%;
}

.selected-user-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.selected-user-remove {
  align-items: center;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.28);
  border-radius: 8px;
  color: #fca5a5;
  display: inline-flex;
  font-size: 18px;
  height: 28px;
  justify-content: center;
  justify-self: end;
  line-height: 1;
  width: 28px;
}

.selected-users-empty {
  align-items: center;
  color: #94a3b8;
  display: inline-flex;
  font-size: 13px;
}

.main {
  background: rgba(5, 7, 15, 0.38);
  flex: 1;
  overflow-y: auto;
  padding: 30px;
}

.panel,
.goal,
.summary-card {
  background: rgba(10, 16, 30, 0.84);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
}

.panel {
  margin-bottom: 22px;
  padding: 20px;
}

.objective-guide {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.08);
}

.objective-guide strong {
  color: #bbf7d0;
}

.objective-guide span {
  color: #cbd5e1;
  line-height: 1.45;
}

.objective-type-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 14px;
}

.objective-type-card {
  align-items: start;
  background: rgba(15, 23, 42, 0.72) !important;
  border: 1px solid rgba(148, 163, 184, 0.16) !important;
  border-radius: 12px !important;
  color: #cbd5e1 !important;
  display: grid;
  gap: 6px;
  min-height: 104px;
  padding: 13px !important;
  text-align: left;
  width: 100%;
}

.objective-type-card strong {
  color: #dcfce7;
  font-size: 15px;
}

.objective-type-card span {
  color: #94a3b8;
  font-size: 12px;
  line-height: 1.35;
}

.objective-type-card.is-active {
  background: rgba(34, 197, 94, 0.14) !important;
  border-color: rgba(34, 197, 94, 0.48) !important;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.08);
}

.visibility-help {
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 12px;
  color: #bfdbfe;
  font-size: 13px;
  line-height: 1.45;
  margin: 2px 0 14px;
  padding: 11px 12px;
}

.field-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.numeric-progress-fields {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.16);
  border-radius: 12px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 12px;
  padding: 12px;
}

.numeric-progress-fields[hidden] {
  display: none !important;
}

.field-line,
.field-grid label,
.numeric-progress-fields label {
  display: grid;
  gap: 6px;
}

.field-line > span,
.field-grid label > span,
.numeric-progress-fields label > span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.panel button {
  background: linear-gradient(135deg, #22c55e, #86efac);
  color: #020617;
  width: 100%;
}

.panel .selected-users button {
  background: rgba(34, 197, 94, 0.14);
  color: #bbf7d0;
  width: 100%;
}

.summary-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  margin-bottom: 18px;
}

.summary-card {
  padding: 16px;
}

.summary-card strong {
  color: #22c55e;
  display: block;
  font-size: 26px;
}

.summary-card span {
  color: #94a3b8;
  font-size: 12px;
  text-transform: uppercase;
}

.toolbar {
  align-items: center;
  color: #94a3b8;
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

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

.list {
  display: grid;
  align-items: start;
  gap: 22px;
  grid-template-columns: repeat(auto-fill, minmax(370px, 1fr));
}

.invitation-list {
  display: grid;
  gap: 10px;
  grid-column: 1 / -1;
}

.invitation-card {
  align-items: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.28);
  border-radius: 12px;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  padding: 14px;
}

.invitation-card strong {
  color: #dcfce7;
  display: block;
}

.invitation-card span {
  color: #94a3b8;
  font-size: 13px;
}

.invitation-card > div:last-child {
  display: flex;
  gap: 8px;
}

.goal {
  display: grid;
  gap: 18px;
  line-height: 1.45;
  min-width: 0;
  overflow: hidden;
  padding: 20px;
}

.goal.is-done {
  border-color: rgba(34, 197, 94, 0.5);
}

.card-head {
  align-items: flex-start;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.card-head h3 {
  color: #dcfce7;
  font-size: 19px;
  line-height: 1.25;
  margin-top: 10px;
}

.pill,
.priority,
.due-badge,
.visibility-badge {
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #cbd5e1;
  display: inline-flex;
  font-size: 11px;
  padding: 4px 8px;
}

.visibility-public {
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

.visibility-open {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.visibility-invite {
  border-color: rgba(245, 158, 11, 0.38);
  color: #fde68a;
}

.priority-haute {
  border-color: rgba(239, 68, 68, 0.45);
  color: #fca5a5;
}

.priority-basse {
  border-color: rgba(34, 197, 94, 0.45);
  color: #86efac;
}

.goal-meta {
  color: #94a3b8;
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px 12px;
  line-height: 1.6;
}

.progress-line {
  color: #94a3b8;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  gap: 10px;
  justify-content: space-between;
  line-height: 1.4;
  margin-bottom: -8px;
  min-width: 0;
}

.progress-line span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.progress-line span:last-child {
  flex: 0 0 auto;
}

.progress-bar {
  background: rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-bar span {
  background: linear-gradient(90deg, #22c55e, #86efac);
  border-radius: inherit;
  display: block;
  height: 100%;
}

.goal-editor {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
}

.goal-editor[open] {
  display: grid;
  gap: 14px;
}

.goal-editor summary {
  align-items: center;
  color: #bbf7d0;
  cursor: pointer;
  display: flex;
  font-size: 13px;
  font-weight: 800;
  gap: 7px;
  line-height: 1.3;
  list-style: none;
  min-height: 24px;
}

.goal-editor summary::-webkit-details-marker {
  display: none;
}

.goal-editor summary::before {
  content: "▸";
  font-size: 12px;
  transition: transform 0.16s ease;
}

.goal-editor[open] summary::before {
  transform: rotate(90deg);
}

.participants {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.goal-players > button {
  margin-top: 10px;
}

.participant-row {
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto) 28px;
  min-height: 52px;
  min-width: 0;
  padding: 10px 12px;
}

.participant-row:has(.done-check) {
  grid-template-columns: minmax(0, 1fr) minmax(90px, auto) 28px;
}

.participant-sp-challenge {
  align-items: start;
  grid-template-columns: minmax(0, 1fr);
  padding-right: 40px;
  position: relative;
}

.participant-sp-challenge .status-dot {
  position: absolute;
  right: 14px;
  top: 18px;
}

.participant-identity {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.participant-identity strong {
  color: #e5e7eb;
  font-size: 15px;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.participant-identity small {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.participant-row input {
  background: rgba(2, 6, 23, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: #e5e7eb;
  justify-self: end;
  min-width: 0;
  padding: 9px 10px;
  width: 96px;
}

.sp-challenge-controls {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-self: stretch;
  min-width: 0;
}

.sp-challenge-controls label {
  display: grid;
  gap: 4px;
}

.sp-challenge-controls label span {
  color: #94a3b8;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.sp-challenge-controls input {
  justify-self: stretch;
  width: 100%;
}

.sp-gain {
  align-items: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.22);
  border-radius: 9px;
  display: grid;
  min-height: 39px;
  min-width: 0;
  padding: 6px 9px;
  text-align: center;
}

.sp-gain strong {
  color: #bbf7d0;
  font-size: 13px;
  line-height: 1.1;
  white-space: nowrap;
}

.sp-gain span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 900;
}

.sp-gain.is-complete {
  background: rgba(34, 197, 94, 0.22);
  border-color: rgba(34, 197, 94, 0.48);
}

.sp-gain.needs-correction {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.36);
}

.sp-gain.needs-correction strong {
  color: #fde68a;
  font-size: 12px;
}

.done-check {
  align-items: center;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 999px;
  color: #bbf7d0;
  cursor: pointer;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  gap: 6px;
  justify-self: end;
  min-height: 34px;
  padding: 7px 12px;
  white-space: nowrap;
}

.done-check input {
  accent-color: #22c55e;
  height: 15px;
  margin: 0;
  padding: 0;
  width: 15px;
}

.status-pill {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  justify-self: end;
  line-height: 1.3;
  padding: 0 4px;
}

.status-dot {
  background: #22c55e;
  border-radius: 999px;
  display: inline-block;
  height: 10px;
  justify-self: center;
  margin-left: 2px;
  width: 10px;
}

.participant-pending .status-dot {
  background: #f59e0b;
}

.participant-declined .status-dot {
  background: #ef4444;
}

.participant-row button,
.goal-actions button {
  min-height: 38px;
}

.participant-row .remove-participant,
.delete-btn {
  border-color: rgba(239, 68, 68, 0.38);
  color: #fca5a5;
}

.add-participant {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.registered-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.registered-picks button {
  min-height: 34px;
  padding: 7px 9px;
}

.registered-picks span {
  color: #94a3b8;
  font-size: 12px;
}

.note-field {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(34, 197, 94, 0.18);
  border-radius: 10px;
  color: #e5e7eb;
  display: block;
  line-height: 1.5;
  min-height: 112px;
  outline: none;
  padding: 14px;
  resize: vertical;
  width: 100%;
}

.note-field:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.14);
}

.note-readonly {
  background: rgba(15, 23, 42, 0.5);
  border: 1px solid rgba(34, 197, 94, 0.12);
  border-radius: 10px;
  color: #cbd5e1;
  min-height: 74px;
  padding: 12px;
  white-space: pre-wrap;
}

.add-participant input {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: #e5e7eb;
  min-width: 0;
  padding: 10px 12px;
}

.goal-actions {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin-top: -4px;
}

.goal-actions button,
.goal-editor > button,
.invitation-card button,
.goal-login-action {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  line-height: 1.2;
  min-height: 40px;
  padding: 11px 14px;
}

.goal-login-action {
  background: rgba(34, 197, 94, 0.14);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  color: #bbf7d0;
  font-weight: 900;
  text-align: center;
  text-decoration: none;
}

.goal-login-action:hover {
  background: rgba(34, 197, 94, 0.2);
  border-color: rgba(34, 197, 94, 0.48);
}

.empty-state {
  border: 1px dashed rgba(148, 163, 184, 0.35);
  border-radius: 12px;
  color: #94a3b8;
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
}

body.light-mode .navbar,
body.light-mode .sidebar,
body.light-mode .panel,
body.light-mode .goal,
body.light-mode .summary-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.1);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

body.light-mode .main {
  background: rgba(246, 248, 251, 0.72);
}

body.light-mode .nav-btn,
body.light-mode .menu button,
body.light-mode .user-directory button,
body.light-mode .toolbar button,
body.light-mode .goal button,
body.light-mode .goal-login-action,
body.light-mode .pill,
body.light-mode .priority,
body.light-mode .due-badge,
body.light-mode .visibility-badge,
body.light-mode .objective-type-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.12);
  color: #334155;
}

body.light-mode .sidebar input,
body.light-mode .panel input,
body.light-mode .panel select,
body.light-mode .panel textarea,
body.light-mode .participant-row,
body.light-mode .participant-row input,
body.light-mode .add-participant input,
body.light-mode .user-directory input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(15, 23, 42, 0.12);
  color: #1f2937;
}

body.light-mode .note-field,
body.light-mode .done-check,
body.light-mode .note-readonly,
body.light-mode .sp-gain,
body.light-mode .invitation-card {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(22, 163, 74, 0.24);
  color: #166534;
}

body.light-mode .sp-challenge-controls label span {
  color: #64748b;
}

body.light-mode .sp-gain strong {
  color: #166534;
}

body.light-mode .sp-gain.needs-correction strong {
  color: #92400e;
}

.goal button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

body.light-mode .participant-identity strong,
body.light-mode .card-head h3,
body.light-mode .user-directory h3 {
  color: #1f2937;
}

body.light-mode .selected-users-block,
body.light-mode .goal-player-picker,
body.light-mode .goal-editor,
body.light-mode .objective-guide,
body.light-mode .numeric-progress-fields {
  background: rgba(240, 253, 244, 0.72);
  border-color: rgba(22, 163, 74, 0.18);
}

body.light-mode .directory-help,
body.light-mode .goal-editor-help,
body.light-mode .objective-guide span,
body.light-mode .user-search-box > span,
body.light-mode .user-list button span,
body.light-mode .user-result-card span {
  color: #64748b;
}

body.light-mode .user-result-card {
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(15, 23, 42, 0.12);
}

body.light-mode .user-result-card strong {
  color: #1f2937;
}

body.light-mode .user-result-card.is-selected {
  background: rgba(220, 252, 231, 0.78);
  border-color: rgba(22, 163, 74, 0.32);
}

body.light-mode .objective-guide strong {
  color: #166534;
}

body.light-mode .objective-type-card strong {
  color: #14532d;
}

body.light-mode .objective-type-card span {
  color: #64748b;
}

body.light-mode .objective-type-card.is-active {
  background: rgba(220, 252, 231, 0.78) !important;
  border-color: rgba(22, 163, 74, 0.32) !important;
}

body.light-mode .visibility-help {
  background: rgba(219, 234, 254, 0.72);
  border-color: rgba(37, 99, 235, 0.16);
  color: #1e40af;
}

body.light-mode .selected-users button {
  background: rgba(22, 163, 74, 0.1);
  border-color: rgba(22, 163, 74, 0.28);
  color: #15803d;
}

body.light-mode .goal-player-picker-head strong {
  color: #166534;
}

body.light-mode .goal-player-picker > p,
body.light-mode .goal-player-picker-head > span {
  color: #64748b;
}

body.light-mode .goal-editor summary {
  color: #15803d;
}

.goal-actions {
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.goal-actions button {
  min-width: 0;
}

.goal-meta {
  align-items: center;
}

.objective-type-card:hover {
  border-color: rgba(34, 197, 94, 0.38) !important;
  transform: translateY(-1px);
}

.objective-type-card,
.summary-card,
.goal,
.invitation-card {
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.summary-card:hover,
.goal:hover {
  border-color: rgba(34, 197, 94, 0.34);
}

@media (max-width: 1280px) {
  .navbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .nav-container {
    gap: 8px;
  }

  .nav-brand {
    font-size: 20px;
    letter-spacing: 0;
  }

  .nav-brand img {
    height: 34px !important;
  }

  .nav-links {
    gap: 7px;
  }

  .nav-btn {
    font-size: 14px;
    padding: 8px 11px;
  }

  .theme-toggle {
    height: 42px;
    width: 42px;
  }
}

@media (max-width: 720px) {
  .objective-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .numeric-progress-fields {
    grid-template-columns: 1fr;
  }

  .participant-row,
  .participant-row:has(.done-check),
  .participant-sp-challenge {
    grid-template-columns: minmax(0, 1fr) 38px;
  }

  .participant-row input,
  .done-check,
  .participant-identity,
  .sp-challenge-controls {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .sp-challenge-controls {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .sp-challenge-controls {
    grid-template-columns: 1fr;
  }

  .participant-sp-challenge {
    padding-right: 34px;
  }
}

/* Objective choices must stay as readable cards despite global button styles. */
.panel .objective-type-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.panel .objective-type-card {
  align-content: start !important;
  align-items: start !important;
  display: grid !important;
  gap: 7px !important;
  grid-template-columns: minmax(0, 1fr) !important;
  justify-content: stretch !important;
  justify-items: start !important;
  min-height: 106px !important;
  min-width: 0 !important;
  text-align: left !important;
  white-space: normal !important;
}

.panel .objective-type-card strong,
.panel .objective-type-card span {
  display: block !important;
  max-width: 100% !important;
  overflow-wrap: normal !important;
  text-align: left !important;
  white-space: normal !important;
  word-break: normal !important;
}

@media (max-width: 980px) {
  .panel .objective-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 560px) {
  .panel .objective-type-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .panel .objective-type-card {
    min-height: 82px !important;
  }
}
