:root {
  --bg: #f7f4ff;
  --bg-2: #fff7fb;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --panel-muted: #fbf9ff;
  --border: rgba(124, 58, 237, 0.14);
  --border-strong: rgba(124, 58, 237, 0.24);
  --text: #211a32;
  --muted: #756b86;
  --muted-2: #948aa5;
  --primary: #7c3aed;
  --primary-2: #c026d3;
  --primary-3: #f472b6;
  --success: #059669;
  --warning: #d97706;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow: 0 22px 70px rgba(63, 32, 112, 0.14);
  --shadow-small: 0 10px 30px rgba(63, 32, 112, 0.10);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --topbar-height: 78px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 15% 5%, rgba(244, 114, 182, 0.24), transparent 28rem),
    radial-gradient(circle at 80% 10%, rgba(124, 58, 237, 0.24), transparent 30rem),
    linear-gradient(135deg, var(--bg), var(--bg-2));
}

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

button {
  cursor: pointer;
}

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

kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  border-radius: 8px;
  background: #f2ecff;
  color: var(--muted);
  border: 1px solid var(--border);
  font-size: 0.75rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.is-hidden {
  display: none !important;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: var(--topbar-height);
  display: grid;
  grid-template-columns: minmax(235px, auto) minmax(150px, 190px) auto minmax(220px, 1fr) auto auto auto auto minmax(220px, auto);
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.76);
  backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 8px 32px rgba(58, 24, 111, 0.08);
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: #fff;
  font-weight: 900;
  letter-spacing: -0.04em;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.92), transparent 0.25rem),
    linear-gradient(135deg, var(--primary), var(--primary-2) 48%, var(--primary-3));
  box-shadow: 0 12px 32px rgba(124, 58, 237, 0.35);
}

.brand-title {
  font-weight: 850;
  letter-spacing: -0.04em;
  font-size: 1.12rem;
  line-height: 1.05;
  white-space: nowrap;
}

.brand-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.brand-subtitle.mode-api {
  color: var(--success);
}

.select,
.field input,
.field select,
.field textarea,
.topbar-search input,
.mini-form input,
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.select:focus,
.field input:focus,
.field select:focus,
.field textarea:focus,
.topbar-search input:focus,
.mini-form input:focus,
.comment-form textarea:focus {
  border-color: rgba(124, 58, 237, 0.55);
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.10);
  background: #ffffff;
}

.select {
  min-height: 42px;
  padding: 0 38px 0 14px;
}

.select-project {
  font-weight: 720;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  background: #f5efff;
  border-radius: 999px;
}

.segmented-button {
  border: 0;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-weight: 750;
}

.segmented-button.is-active {
  color: white;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 8px 22px rgba(124, 58, 237, 0.24);
}

.topbar-search {
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px 0 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
}

.topbar-search input {
  min-height: 42px;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

.search-icon {
  color: var(--muted-2);
  font-weight: 800;
}

.toggle-chip,
.ghost-button,
.primary-button,
.discord-login,
.account-chip,
.icon-button,
.add-card-button {
  border: 1px solid var(--border);
  min-height: 42px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-weight: 750;
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.toggle-chip:hover,
.ghost-button:hover,
.discord-login:hover,
.account-chip:hover,
.icon-button:hover,
.add-card-button:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-small);
}

.primary-button {
  border: 0;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 34px rgba(124, 58, 237, 0.25);
}

.primary-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(124, 58, 237, 0.32);
}

.ghost-button.is-active {
  color: var(--primary);
  border-color: rgba(124, 58, 237, 0.35);
  background: #f1e8ff;
}

.primary-button.small,
.ghost-button.small {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.84rem;
}

.icon-button {
  width: 42px;
  min-width: 42px;
  padding: 0;
  font-size: 1.1rem;
}

.toggle-chip {
  white-space: nowrap;
  user-select: none;
}

.toggle-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-dot {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d8c8f6;
  position: relative;
  transition: background 0.16s ease;
}

.toggle-dot::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 2px 8px rgba(30, 20, 60, 0.2);
  transition: transform 0.16s ease;
}

.toggle-chip input:checked + .toggle-dot {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.toggle-chip input:checked + .toggle-dot::after {
  transform: translateX(14px);
}

.account-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
}

.discord-login {
  background: #5865f2;
  color: #fff;
  border-color: transparent;
}

.discord-dot {
  font-size: 1.1rem;
}

.account-chip {
  border-radius: 18px;
  padding: 5px 12px 5px 6px;
  justify-content: flex-start;
  max-width: 220px;
}

.account-chip strong,
.account-chip small {
  display: block;
  text-align: left;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip small {
  color: var(--muted);
  font-weight: 600;
  font-size: 0.72rem;
}

.avatar,
.avatar-mini img,
.comment-item img,
.assignee-cell img {
  border-radius: 999px;
  object-fit: cover;
  background: #eee7ff;
}

.avatar {
  width: 36px;
  height: 36px;
}

.workspace {
  padding: 24px;
}

.status-strip {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.status-strip h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2vw, 2rem);
  letter-spacing: -0.045em;
}

.status-strip p {
  margin: 6px 0 0;
  color: var(--muted);
}

.stat-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stat-pill {
  min-width: 84px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-small);
}

.stat-pill strong,
.stat-pill span {
  display: block;
}

.stat-pill strong {
  font-size: 1.04rem;
}

.stat-pill span {
  color: var(--muted);
  font-size: 0.78rem;
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-small);
}

.notice-bar span {
  color: var(--muted);
  flex: 1;
}

.loading-state,
.empty-state {
  min-height: 360px;
  display: grid;
  place-items: center;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.58);
}

.loading-state p,
.empty-state p {
  color: var(--muted);
}

.loading-orb {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: conic-gradient(from 0deg, var(--primary), var(--primary-3), transparent, var(--primary));
  animation: spin 0.9s linear infinite;
  margin: 0 auto 12px;
}

.loading-orb::after {
  content: "";
  display: block;
  width: 30px;
  height: 30px;
  margin: 8px;
  border-radius: 999px;
  background: #fff;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 8px;
}

.kanban-board {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(275px, 1fr);
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 18px;
  scroll-snap-type: x proximity;
}

.kanban-column {
  min-height: calc(100vh - 210px);
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: var(--shadow-small);
  scroll-snap-align: start;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.kanban-column.is-drag-over {
  border-color: rgba(124, 58, 237, 0.55);
  background: rgba(241, 232, 255, 0.82);
  transform: translateY(-2px);
}

.column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 12px;
}

.column-header > div {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.column-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #f2ecff;
  color: var(--primary);
  font-weight: 900;
}

.count-badge {
  min-width: 26px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.10);
  color: var(--primary);
  font-weight: 800;
  font-size: 0.78rem;
}

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

.ticket-card {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: 18px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(54, 24, 98, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, opacity 0.16s ease;
}

.ticket-card:hover,
.ticket-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.32);
  box-shadow: 0 18px 45px rgba(54, 24, 98, 0.14);
  outline: none;
}

.ticket-card.is-dragging {
  opacity: 0.45;
}

.ticket-card-topline,
.ticket-card-footer {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ticket-card-topline {
  justify-content: space-between;
  margin-bottom: 8px;
}

.ticket-key {
  color: var(--primary);
  font-weight: 850;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.ticket-type {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5efff;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: capitalize;
}

.ticket-card h3 {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.22;
  letter-spacing: -0.02em;
}

.ticket-card p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tag-row,
.role-preview {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.tag-chip,
.role-chip,
.status-pill,
.discord-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(124, 58, 237, 0.09);
  color: #6d28d9;
  font-size: 0.72rem;
  font-weight: 760;
}

.role-chip {
  background: rgba(192, 38, 211, 0.10);
  color: #a21caf;
}

.ticket-card-footer {
  margin-top: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.75rem;
}

.avatar-mini {
  display: inline-flex;
}

.avatar-mini img,
.assignee-cell img {
  width: 24px;
  height: 24px;
}

.priority {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 800;
}

.priority-urgent,
.priority-high {
  color: var(--danger);
}

.priority-medium {
  color: var(--warning);
}

.priority-low {
  color: var(--info);
}

.priority-unset,
.muted {
  color: var(--muted-2);
}

.due-date.is-overdue {
  color: var(--danger);
  font-weight: 800;
}

.meta-count {
  padding: 3px 7px;
  border-radius: 999px;
  background: #f5efff;
}

.add-card-button {
  width: 100%;
  margin-top: 10px;
  border-style: dashed;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.54);
}

.list-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-small);
  overflow: auto;
}

.list-card table {
  width: 100%;
  min-width: 1060px;
  border-collapse: collapse;
}

.list-card th,
.list-card td {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(124, 58, 237, 0.10);
  vertical-align: middle;
  text-align: left;
}

.list-card th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(246, 240, 255, 0.68);
}

.issue-row {
  cursor: pointer;
  transition: background 0.14s ease;
}

.issue-row:hover,
.issue-row:focus-visible {
  background: rgba(241, 232, 255, 0.62);
  outline: none;
}

.issue-row td strong,
.issue-row td small {
  display: block;
}

.issue-row td small {
  color: var(--muted);
  margin-top: 3px;
  max-width: 480px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assignee-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.status-backlog {
  --status-color: #7c3aed;
}

.status-todo {
  --status-color: #2563eb;
}

.status-progress {
  --status-color: #d97706;
}

.status-blocked {
  --status-color: #dc2626;
}

.status-review {
  --status-color: #9333ea;
}

.status-done,
.status-closed,
.status-archived {
  --status-color: #059669;
}

.status-pill {
  color: var(--status-color, var(--primary));
  background: color-mix(in srgb, var(--status-color, var(--primary)) 10%, white);
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 28px;
  pointer-events: none;
}

.issue-modal {
  width: min(1180px, calc(100vw - 48px));
  max-height: min(820px, calc(100vh - 48px));
  overflow: hidden;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  pointer-events: auto;
  display: flex;
  flex-direction: column;
}

.issue-modal-header,
.admin-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(circle at 10% 0%, rgba(244, 114, 182, 0.18), transparent 14rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(250, 245, 255, 0.96));
}

.modal-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.issue-modal h2,
.admin-header h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.045em;
}

.modal-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.issue-modal-body {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.9fr);
  min-height: 0;
  overflow: hidden;
}

.issue-form {
  padding: 20px 22px 26px;
  overflow: auto;
}

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

.field-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

.field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.field input,
.field select,
.field textarea {
  min-height: 42px;
  padding: 10px 12px;
}

.field textarea {
  resize: vertical;
  min-height: 84px;
  line-height: 1.45;
}

.field-full {
  width: 100%;
}

.field-hint,
.small-text {
  font-size: 0.75rem;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

.activity-panel {
  overflow: auto;
  border-left: 1px solid var(--border);
  background: rgba(251, 249, 255, 0.78);
  padding: 16px;
}

.side-section {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  margin-bottom: 14px;
}

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

.side-section h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.reference-list {
  display: grid;
  gap: 8px;
}

.reference-chip {
  display: block;
  padding: 10px;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
  background: #f7f1ff;
  border: 1px solid rgba(124, 58, 237, 0.10);
}

.reference-chip small,
.reference-chip strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reference-chip small {
  margin-top: 3px;
  color: var(--muted);
}

.mini-form,
.comment-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.mini-form input,
.comment-form textarea {
  padding: 10px 12px;
}

.comment-form div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

.comment-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.comment-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
}

.comment-item img {
  width: 34px;
  height: 34px;
}

.comment-item strong,
.comment-item small {
  display: block;
}

.comment-item small {
  color: var(--muted);
  font-size: 0.74rem;
}

.comment-item p {
  margin: 6px 0 0;
  white-space: pre-wrap;
  line-height: 1.4;
}

.activity-feed {
  position: relative;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 8px;
  padding: 8px 0;
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 5px;
  background: linear-gradient(135deg, var(--primary), var(--primary-3));
  box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.10);
}

.activity-item strong,
.activity-item small {
  display: block;
}

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

.modal-loading {
  min-height: 420px;
  display: grid;
  place-items: center;
  text-align: center;
}

.panel-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(35, 19, 58, 0.26);
  backdrop-filter: blur(3px);
}

.admin-panel {
  position: fixed;
  z-index: 120;
  top: 0;
  right: 0;
  width: min(500px, 100vw);
  height: 100vh;
  border-left: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: -24px 0 70px rgba(63, 32, 112, 0.20);
  transform: translateX(105%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}

.admin-panel.is-open {
  transform: translateX(0);
}

.admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
}

.admin-body {
  overflow: auto;
  padding: 16px;
}

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

.admin-section-title h3 {
  margin: 0;
  font-size: 0.98rem;
}

.project-list {
  display: grid;
  gap: 8px;
  margin-bottom: 20px;
}

.project-row {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.project-row.is-selected {
  border-color: rgba(124, 58, 237, 0.42);
  background: #f5efff;
}

.project-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
}

.project-row strong,
.project-row small {
  display: block;
}

.project-row small {
  color: var(--muted);
  margin-top: 2px;
}

.admin-form {
  display: grid;
  gap: 2px;
}

.switch-row {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(251, 249, 255, 0.8);
}

.switch-row input {
  margin-top: 3px;
  accent-color: var(--primary);
}

.switch-row strong,
.switch-row small {
  display: block;
}

.switch-row small {
  color: var(--muted);
  margin-top: 3px;
}

.sticky-actions {
  position: sticky;
  bottom: -16px;
  padding: 14px 0 0;
  background: linear-gradient(to top, #fff 70%, rgba(255, 255, 255, 0));
}

.toast-container {
  position: fixed;
  z-index: 200;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  max-width: min(420px, calc(100vw - 36px));
}

.toast {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-radius: 16px;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-small);
  animation: toast-in 0.18s ease both;
}

.toast strong {
  font-size: 0.84rem;
}

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

.toast-success {
  border-color: rgba(5, 150, 105, 0.28);
}

.toast-error {
  border-color: rgba(220, 38, 38, 0.28);
}

.toast-warning {
  border-color: rgba(217, 119, 6, 0.28);
}

.toast.is-hiding {
  animation: toast-out 0.22s ease both;
}

@keyframes spin {
  to { transform: rotate(1turn); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(8px) scale(0.98); }
}

@media (max-width: 1320px) {
  .topbar {
    grid-template-columns: minmax(220px, auto) minmax(150px, 180px) auto minmax(190px, 1fr) auto auto auto;
  }

  .topbar .ghost-button#adminSettingsButton,
  .toggle-chip,
  #closedArchiveButton {
    padding-inline: 10px;
  }

  .account-area {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }
}

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

  .brand-block,
  .topbar-search,
  .account-area {
    grid-column: 1 / -1;
  }

  .status-strip {
    align-items: flex-start;
    flex-direction: column;
  }

  .stat-row {
    justify-content: flex-start;
  }

  .issue-modal-body {
    grid-template-columns: 1fr;
  }

  .activity-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
  }

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

@media (max-width: 640px) {
  .workspace {
    padding: 14px;
  }

  .topbar {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .view-toggle,
  .project-switcher,
  .toggle-chip,
  .ghost-button,
  .primary-button,
  .discord-login,
  .account-chip {
    width: 100%;
  }

  .kanban-board {
    grid-auto-columns: minmax(260px, 86vw);
  }

  .modal-overlay {
    padding: 10px;
  }

  .issue-modal {
    width: 100%;
    max-height: calc(100vh - 20px);
    border-radius: 22px;
  }

  .issue-modal-header,
  .admin-header {
    flex-direction: column;
  }

  .modal-actions {
    justify-content: flex-start;
  }
}

.closed-column-lock {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  color: var(--success);
  background: rgba(5, 150, 105, 0.10);
  font-weight: 900;
}

.closed-column-note {
  margin-top: 10px;
  padding: 10px;
  border: 1px dashed rgba(5, 150, 105, 0.24);
  border-radius: 14px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.48);
}
