:root {
  --bg-1: #2e1065;
  --bg-2: #4c1d95;
  --accent: #7c3aed;
  --accent-2: #a78bfa;
  --accent-deep: #5b21b6;
  --card: rgba(255, 255, 255, 0.95);
  --text: #27174a;
  --muted: #6e5ea1;
  --line: #e9e2ff;
  --surface: #f8f5ff;
  --surface-2: #f2ecff;
  --ok: #0b8f5a;
  --warn: #ad7f00;
  --bad: #c63434;
  --shadow: 0 18px 48px rgba(43, 16, 101, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: radial-gradient(circle at 15% 10%, var(--accent-2) 0%, transparent 35%),
    radial-gradient(circle at 85% 20%, #c4b5fd 0%, transparent 30%),
    linear-gradient(125deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
}

.atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 26px 26px;
  opacity: 0.2;
}

.layout {
  width: min(1240px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  display: grid;
  gap: 1rem;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.auth-shell {
  width: min(560px, calc(100% - 2rem));
  margin: 2.2rem auto;
  position: relative;
  z-index: 1;
}

.card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(124, 58, 237, 0.18);
  padding: 1rem 1.1rem;
  animation: rise 280ms ease-out;
}

@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.mono,
code,
th,
select,
button,
input {
  font-family: "IBM Plex Mono", monospace;
}

.kicker {
  margin: 0;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 700;
  font-size: 0.72rem;
}

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

.compact {
  margin-top: 0;
}

.auth-card h1 {
  margin: 0.25rem 0 0.45rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
}

.auth-tabs {
  margin-top: 0.95rem;
  display: flex;
  gap: 0.6rem;
}

.auth-form {
  margin-top: 0.65rem;
}

.auth-actions {
  margin-top: 0.8rem;
  display: flex;
  gap: 0.6rem;
}

.auth-note {
  margin: 0.65rem 0 0;
  font-size: 0.76rem;
  line-height: 1.45;
}

.status-message {
  margin-top: 0.55rem;
  font-size: 0.84rem;
}

.status-message a {
  color: #4c1d95;
  font-weight: 700;
}

.status-sent {
  color: var(--ok);
  font-weight: 700;
}

.status-failed {
  color: var(--bad);
  font-weight: 700;
}

label {
  display: block;
  margin-top: 0.5rem;
  margin-bottom: 0.35rem;
  font-size: 0.78rem;
  color: var(--muted);
}

input,
select,
button {
  border-radius: 10px;
  border: 1px solid #d7c9fb;
  font-size: 0.84rem;
}

input,
select {
  width: 100%;
  padding: 0.62rem 0.66rem;
  background: var(--surface);
}

button {
  padding: 0.6rem 0.75rem;
  background: var(--accent);
  color: #f8fefe;
  border-color: var(--accent-deep);
  cursor: pointer;
  transition: transform 120ms ease, background 120ms ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  color: #fff;
}

button.ghost,
.btn-tertiary {
  background: var(--surface);
  color: #4d2b8f;
  border-color: #d6c7fb;
}

a.ghost,
button.ghost.ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid #d6c7fb;
  font-size: 0.84rem;
  font-family: "IBM Plex Mono", monospace;
  padding: 0.6rem 0.75rem;
  background: var(--surface);
  color: #4d2b8f;
  transition: transform 120ms ease, background 120ms ease;
  min-height: 38px;
}

a.ghost:hover,
button.ghost.ghost-link:hover {
  transform: translateY(-1px);
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: #fff;
}

button.ghost:hover,
.btn-tertiary:hover {
  color: #fff;
}

.btn {
  font-weight: 700;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.hero h1 {
  margin: 0.15rem 0 0.35rem;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.45rem;
}

.hero-button-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.account-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.account-grid p {
  margin: 0.35rem 0 0;
}

.inline-edit-row {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.inline-edit-row input {
  flex: 1;
}

.inline-edit-row button {
  min-width: 84px;
}

.hero p {
  margin: 0;
  max-width: 900px;
  color: #3e2d6d;
}

.metrics {
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(0, 1fr);
}

.metric h2 {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.metric-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  gap: 1rem;
  align-items: center;
}

.metric-summary-table {
  margin-top: 0.65rem;
  display: grid;
  gap: 0.45rem;
}

.metric-summary-wrap {
  margin-top: 0.55rem;
}

.metric-summary-controls {
  margin-top: 0.65rem;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.metric-summary-row {
  display: grid;
  align-items: center;
  gap: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  padding: 0.45rem 0.6rem;
}

.metric-summary-row span {
  font-size: 0.8rem;
  color: #4d2f87;
}

.metric-summary-row strong {
  font-size: 1rem;
  color: #321a66;
}

.metric-summary-header-row {
  background: rgba(248, 245, 255, 0.88);
}

.metric-summary-head-label,
.metric-summary-date-head,
.metric-summary-total-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6b52a5;
  font-weight: 700;
}

.metric-summary-label {
  font-size: 0.8rem;
  color: #4d2f87;
  font-weight: 700;
  white-space: nowrap;
}

.metric-summary-date-head,
.metric-summary-summary-head,
.metric-summary-day-value,
.metric-summary-period-value,
.metric-summary-total-head,
.metric-summary-total-value {
  text-align: center;
}

.metric-summary-day-value {
  font-size: 0.8rem;
  color: #321a66;
  font-weight: 700;
}

.metric-summary-total-value {
  font-size: 1rem;
}

.metric-summary-summary-head {
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.72rem;
  font-weight: 700;
  color: #6b52a5;
  white-space: nowrap;
}

.metric-summary-period-value {
  text-align: center;
  font-size: 0.78rem;
  color: #321a66;
  font-weight: 700;
  white-space: nowrap;
}

.metric-summary-row.status-open strong {
  color: var(--bad);
}

.metric-summary-row.status-review strong {
  color: #ad7f00;
}

.metric-summary-row.status-resolved strong {
  color: var(--ok);
}

.metric-summary-row.status-open .metric-summary-label,
.metric-summary-row.status-open .metric-summary-day-value,
.metric-summary-row.status-open .metric-summary-period-value,
.metric-summary-row.status-open .metric-summary-total-value {
  color: var(--bad);
}

.metric-summary-row.status-review .metric-summary-label,
.metric-summary-row.status-review .metric-summary-day-value,
.metric-summary-row.status-review .metric-summary-period-value,
.metric-summary-row.status-review .metric-summary-total-value {
  color: #ad7f00;
}

.metric-summary-row.status-resolved .metric-summary-label,
.metric-summary-row.status-resolved .metric-summary-day-value,
.metric-summary-row.status-resolved .metric-summary-period-value,
.metric-summary-row.status-resolved .metric-summary-total-value {
  color: var(--ok);
}

.metric-pie-wrap {
  display: grid;
  gap: 0.55rem;
  justify-items: center;
  align-content: center;
}

.metric-pie-wrap h3 {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

.progress-pie {
  width: 136px;
  height: 136px;
  border-radius: 50%;
  border: 1px solid rgba(124, 58, 237, 0.24);
  background: conic-gradient(#0b8f5a 0%, #e9ddff 0 100%);
  position: relative;
}

.progress-pie::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
}

.progress-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
}

.progress-meta strong {
  color: #0b6d46;
  font-size: 1.05rem;
}

.progress-meta span {
  color: #4d2f87;
  font-size: 0.78rem;
  text-align: center;
  white-space: pre-line;
  line-height: 1.35;
}

.daily-progress-range {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  align-items: flex-end;
}

.daily-progress-field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: #4d2f87;
  margin: 0;
}

.daily-progress-field input {
  min-width: 148px;
  height: 38px;
  box-sizing: border-box;
}

#dailyProgressStart,
#dailyProgressEnd {
  margin-bottom: 0;
}

.daily-progress-range #dailyProgressApplyBtn {
  min-height: 38px;
  white-space: nowrap;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.7rem;
  flex-wrap: wrap;
}

.section-header h2 {
  margin: 0;
}

.comments-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex: 0 1 auto;
  min-width: 0;
}

.comments-left .source-tabs {
  flex: 0 1 auto;
  min-width: 0;
}

.comments-left input[type="search"] {
  flex: 0 0 auto;
  width: clamp(220px, 24vw, 320px);
  max-width: 100%;
}

.source-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.source-tab {
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: 999px;
  background: var(--surface);
  color: #4b1f97;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.42rem 0.8rem;
  cursor: pointer;
}

.source-tab.is-active {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}

.filter-row {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.bulk-action-bar {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  padding-right: 0.12rem;
}

.bulk-icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.26);
  background: var(--surface);
  color: #4b1f97;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bulk-icon-btn svg {
  width: 16px;
  height: 16px;
}

.bulk-icon-btn.is-pressed,
.bulk-edit-actions .btn.is-pressed {
  transform: scale(0.96);
  filter: brightness(0.97);
}

.bulk-selection-count {
  color: #4d2f87;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.assigned-filter-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.assigned-filter-btn svg {
  width: 16px;
  height: 16px;
}

.assigned-filter-btn[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}

.column-settings {
  position: relative;
}

.column-settings > summary {
  list-style: none;
  cursor: pointer;
}

.column-settings > summary::-webkit-details-marker {
  display: none;
}

.column-settings-btn {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: 10px;
  background: var(--surface);
  color: #4b1f97;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.column-settings-btn svg {
  width: 17px;
  height: 17px;
}

.column-settings-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 0.35rem);
  z-index: 12;
  min-width: 210px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(43, 16, 101, 0.14);
  padding: 0.48rem 0.52rem;
  display: grid;
  gap: 0.35rem;
}

.column-settings-menu label {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: #321a66;
  font-size: 0.78rem;
}

.column-settings-menu input[type="checkbox"] {
  width: 15px;
  height: 15px;
}

.table-wrap {
  overflow: auto;
}

.comment-groups {
  display: grid;
  gap: 0.9rem;
}

.comment-group {
  border: 1px solid rgba(124, 58, 237, 0.18);
  border-radius: 14px;
  background: rgba(248, 245, 255, 0.62);
  padding: 0.7rem;
  transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease;
}

.comment-group.drop-target-active {
  border: 2px dashed rgba(124, 58, 237, 0.6);
  background: rgba(167, 139, 250, 0.16);
  box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.25);
}

.comment-group > summary {
  cursor: pointer;
  list-style: none;
}

.comment-group > summary::-webkit-details-marker {
  display: none;
}

.group-summary {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
  font-weight: 700;
}

.group-summary-main {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.group-summary::after {
  content: "▾";
  margin-left: 0.35rem;
  color: #4c1d95;
}

.comment-group[open] .group-summary::after {
  content: "▴";
}

.group-select-toggle-btn {
  margin-left: auto;
}

.group-open .group-summary-title {
  color: #b42318;
}

.group-in-review .group-summary-title {
  color: #b45309;
}

.group-resolved .group-summary-title {
  color: #0b6d46;
}

.group-open .board-count {
  background: #ffe4e6;
  color: #b42318;
}

.group-in-review .board-count {
  background: #fff3d9;
  color: #8a6210;
}

.group-resolved .board-count {
  background: #dff7ec;
  color: #0b6d46;
}

.board-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 24px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(124, 58, 237, 0.18);
  color: #4c1d95;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1220px;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

#membersTableBody td,
#profileEmail,
#profileRole,
#profileProjects,
#profileVerified,
#profileEmail + td {
  vertical-align: middle;
}

th {
  color: #4d2f87;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sort-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  border: none !important;
  background: transparent !important;
  color: inherit !important;
  padding: 0 !important;
  margin: 0;
  font: inherit;
  text-transform: inherit;
  letter-spacing: inherit;
  cursor: pointer;
  transform: none !important;
  line-height: 1.2;
}

.sort-header-btn:hover,
.sort-header-btn:focus-visible {
  background: transparent !important;
  color: inherit !important;
  transform: none !important;
}

.sort-icon::before {
  content: "▾";
  opacity: 0;
  transition: opacity 120ms ease;
}

th:hover .sort-icon::before,
.sort-header-btn:focus-visible .sort-icon::before {
  opacity: 0.75;
}

.sort-header-btn.is-active .sort-icon::before {
  opacity: 1;
}

.sort-header-btn.is-active[data-sort-direction="desc"] .sort-icon::before {
  content: "▴";
}

.sort-header-btn.is-active {
  color: #5b21b6 !important;
  font-weight: 700;
}

.sort-header-btn.is-active > span:first-child {
  text-decoration: underline;
  text-decoration-color: rgba(91, 33, 182, 0.55);
  text-underline-offset: 0.18em;
}

[data-col-key].col-hidden {
  display: none !important;
}

.comments-table th[data-col-key="project"],
.comments-table td[data-col-key="project"] {
  width: 170px;
  max-width: 170px;
}

.comments-table th[data-col-key="select"],
.comments-table td[data-col-key="select"] {
  width: 72px;
  max-width: 72px;
  text-align: center;
}

.comments-table th[data-col-key="page"],
.comments-table td[data-col-key="page"] {
  width: 280px;
  max-width: 280px;
}

.comments-table th[data-col-key="actions"],
.comments-table td[data-col-key="actions"] {
  width: 140px;
  max-width: 140px;
  min-width: 140px;
  white-space: nowrap;
}

.select-cell {
  vertical-align: middle;
}

.comment-select-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.project-cell-text,
.page-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

tbody tr:hover {
  background: var(--surface-2);
}

.thread-row.is-draggable {
  cursor: grab;
}

.thread-row.is-draggable:active {
  cursor: grabbing;
}

.thread-row.is-dragging {
  opacity: 0.5;
}

.discussion-kind {
  font-size: 0.72rem;
  color: #4d2f87;
  font-weight: 700;
  display: none;
}

.comment-cell {
  max-width: 540px;
  white-space: normal;
  line-height: 1.45;
}

.discussion-list {
  display: grid;
  gap: 0.45rem;
}

.discussion-item {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 10px;
  padding: 0.42rem 0.5rem;
}

.discussion-layout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.discussion-left {
  min-width: 0;
  flex: 1;
  display: grid;
  gap: 0.2rem;
}

.discussion-meta-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.74rem;
}

.discussion-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
  align-self: flex-start;
}

.discussion-attachment-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: #fff;
  color: #5b21b6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.discussion-attachment-btn:hover {
  background: #f3ebff;
}

.discussion-attachment-btn svg {
  width: 13px;
  height: 13px;
}

.discussion-delete-btn {
  width: 24px;
  height: 24px;
  min-width: 24px;
  border-radius: 999px;
  border: 1px solid rgba(124, 58, 237, 0.3);
  background: #fff;
  color: #5b21b6;
  padding: 0;
  line-height: 1;
  font-size: 1rem;
}

.discussion-delete-btn:hover {
  transform: none;
  background: #f3ebff;
}

.discussion-delete-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.discussion-text {
  white-space: pre-wrap;
  line-height: 1.45;
}

.updated-cell {
  display: grid;
  gap: 0.08rem;
  line-height: 1.25;
}

.updated-date {
  color: #321a66;
}

.updated-time {
  color: #321a66;
  font-size: inherit;
}

.updated-cell-fallback {
  color: #6e5ea1;
}

.project-picker {
  position: relative;
  width: min(100%, 360px);
}

.assigned-picker {
  width: min(100%, 300px);
}

.assigned-picker > summary {
  padding-right: 0.95rem;
}

.assigned-picker > summary::after {
  margin-left: 0.75rem;
}

.project-picker-summary {
  padding-right: 0.5rem !important;
  gap: 0.45rem !important;
}

.project-picker-summary::after {
  margin-left: auto !important;
}

.project-picker > summary {
  cursor: pointer;
  list-style: none;
  border: 1px solid rgba(124, 58, 237, 0.26);
  border-radius: 10px;
  background: var(--surface);
  color: #4b1f97;
  padding: 0.45rem 0.7rem;
  font-size: 0.76rem;
  line-height: 1.4;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.project-picker > summary::-webkit-details-marker {
  display: none;
}

.project-picker > summary::after {
  content: "▾";
  margin-left: auto;
  color: #4c1d95;
}

.project-picker[open] > summary::after {
  content: "▴";
}

.project-picker-menu {
  margin-top: 0.35rem;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(43, 16, 101, 0.14);
  padding: 0.45rem 0.5rem;
  display: grid;
  gap: 0.38rem;
}

.project-picker-option {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  color: #321a66;
  font-size: 0.76rem;
}

.project-picker-option input {
  width: 15px;
  height: 15px;
}

.action-row {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 0.4rem;
  align-items: center;
}

.table-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  border: 1px solid rgba(124, 58, 237, 0.26);
  background: var(--surface);
  color: #4b1f97;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
}

.table-link-icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 10px;
}

.table-link-icon svg {
  width: 16px;
  height: 16px;
}

.review-toggle-btn {
  cursor: pointer;
}

.review-toggle-btn.is-move-review {
  border-color: rgba(180, 83, 9, 0.28);
  background: #fff6e8;
  color: #b45309;
}

.review-toggle-btn.is-return-open {
  border-color: rgba(180, 35, 24, 0.24);
  background: #fff0ee;
  color: #b42318;
}

.table-link:hover {
  background: var(--accent);
  border-color: var(--accent-deep);
  color: #fff;
}

.review-toggle-btn.is-move-review:hover,
.review-toggle-btn.is-move-review:focus-visible {
  background: #b45309;
  border-color: #92400e;
  color: #fff;
}

.review-toggle-btn.is-return-open:hover,
.review-toggle-btn.is-return-open:focus-visible {
  background: #b42318;
  border-color: #8f2219;
  color: #fff;
}

.table-link-button {
  cursor: pointer;
  font-family: "IBM Plex Mono", monospace;
  line-height: 1.2;
}

.review-toggle-btn:disabled,
.table-link-button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.verified-select {
  min-width: 92px;
  max-width: 110px;
  font-size: 0.78rem;
  padding: 0.42rem 0.5rem;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 8, 35, 0.56);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 30;
}

.modal-card {
  width: min(460px, 100%);
  background: var(--card);
  border: 1px solid rgba(124, 58, 237, 0.24);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 0.95rem 1rem;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.modal-header h3 {
  margin: 0;
  font-size: 1.08rem;
}

.modal-close-btn {
  padding: 0.42rem 0.58rem;
}

.bulk-edit-modal-card {
  width: min(560px, 100%);
}

.bulk-edit-grid {
  display: grid;
  gap: 0.8rem;
}

.bulk-edit-block h4 {
  margin: 0 0 0.38rem;
  color: #3d2572;
  font-size: 0.83rem;
}

.bulk-edit-actions {
  display: flex;
  align-items: center;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.bulk-edit-actions select {
  flex: 1;
  min-width: 210px;
}

.danger-btn {
  border-color: rgba(180, 35, 24, 0.24) !important;
  color: #b42318 !important;
  background: #fff0ee !important;
}

.danger-btn:hover,
.danger-btn:focus-visible {
  background: #b42318 !important;
  border-color: #8f2219 !important;
  color: #fff !important;
}

.toast-host {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 45;
  display: grid;
  gap: 0.45rem;
}

.toast {
  min-width: 220px;
  max-width: min(460px, calc(100vw - 2rem));
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(124, 58, 237, 0.24);
  color: #321a66;
  border-radius: 12px;
  box-shadow: 0 14px 36px rgba(43, 16, 101, 0.24);
  padding: 0.6rem 0.75rem;
  font-size: 0.78rem;
  animation: toast-in 140ms ease-out;
}

.toast-success {
  border-color: rgba(11, 143, 90, 0.28);
  color: #0b6d46;
}

.toast-error {
  border-color: rgba(182, 43, 43, 0.3);
  color: #9f1239;
}

.toast-out {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.empty-col {
  margin: 0.4rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.logs-dropdown summary {
  cursor: pointer;
  font-weight: 700;
  color: #3d2572;
  list-style: none;
}

.logs-dropdown summary::-webkit-details-marker {
  display: none;
}

.logs-dropdown summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 0.4rem;
  transition: transform 120ms ease;
}

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

.logs-wrap {
  margin-top: 0.65rem;
}

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

  .metric-overview-grid {
    grid-template-columns: 1fr;
  }

  .metric-summary-controls {
    width: 100%;
  }

  .daily-progress-range {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .hero-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-actions {
    width: 100%;
    align-items: flex-start;
  }

  .filter-row {
    margin-left: auto;
    width: auto;
  }

  .comments-left {
    flex: 1 0 100%;
    min-width: 100%;
    flex-wrap: wrap;
  }

  .comments-left .source-tabs {
    flex: 1 0 100%;
  }

  .comments-left input[type="search"] {
    width: 100%;
  }

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

@media (max-width: 620px) {
  .layout {
    width: calc(100% - 1rem);
  }

  .card {
    padding: 0.85rem;
    border-radius: 14px;
  }
}
