/* Synthwave red/blue theme – black bg, hot red glow */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;500;600;700&family=Rajdhani:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #000000;
  --bg-panel: #0a0a0c;
  --bg-card: #0e0e12;
  --accent-rgb: 5, 217, 232;
  --primary: #05d9e8;
  --primary-dim: #01a7b3;
  --secondary: #05d9e8;
  --secondary-dim: #01a7b3;
  --text: #e8e8ed;
  --text-muted: #7a7a8c;
  --glow-primary: 0 0 20px rgba(5, 217, 232, 0.6), 0 0 40px rgba(5, 217, 232, 0.25);
  --glow-primary-hot: 0 0 25px rgba(5, 217, 232, 0.8), 0 0 50px rgba(5, 217, 232, 0.4), 0 0 80px rgba(5, 217, 232, 0.2);
  --glow-secondary: 0 0 20px rgba(5, 217, 232, 0.5), 0 0 40px rgba(5, 217, 232, 0.2);
  --border-primary: rgba(5, 217, 232, 0.5);
  --border-secondary: rgba(5, 217, 232, 0.4);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --glow-breathe-mid: rgba(5, 217, 232, 0.9);
  --glow-breathe-dim: rgba(5, 217, 232, 0.4);
  /* Grid/background accent lines, used for the synthwave background and other static accents */
  --grid-line-strong: rgba(5, 217, 232, 0.04);
  --grid-line-weak: rgba(5, 217, 232, 0.02);
}

/* Glow color variants (body data-glow set from user preference) */
html[data-glow="purple"], body[data-glow="purple"] {
  --accent-rgb: 168, 85, 247;
  --primary: #a855f7;
  --primary-dim: #7c3aed;
  --secondary: #a855f7;
  --secondary-dim: #7c3aed;
  --glow-primary: 0 0 20px rgba(168, 85, 247, 0.6), 0 0 40px rgba(168, 85, 247, 0.25);
  --glow-primary-hot: 0 0 25px rgba(168, 85, 247, 0.8), 0 0 50px rgba(168, 85, 247, 0.4), 0 0 80px rgba(168, 85, 247, 0.2);
  --glow-secondary: 0 0 20px rgba(168, 85, 247, 0.5), 0 0 40px rgba(168, 85, 247, 0.2);
  --border-primary: rgba(168, 85, 247, 0.5);
  --border-secondary: rgba(168, 85, 247, 0.4);
  --glow-breathe-mid: rgba(168, 85, 247, 0.9);
  --glow-breathe-dim: rgba(168, 85, 247, 0.4);
  --grid-line-strong: rgba(168, 85, 247, 0.05);
  --grid-line-weak: rgba(168, 85, 247, 0.02);
}
html[data-glow="green"], body[data-glow="green"] {
  --accent-rgb: 34, 197, 94;
  --primary: #22c55e;
  --primary-dim: #16a34a;
  --secondary: #22c55e;
  --secondary-dim: #16a34a;
  --glow-primary: 0 0 20px rgba(34, 197, 94, 0.6), 0 0 40px rgba(34, 197, 94, 0.25);
  --glow-primary-hot: 0 0 25px rgba(34, 197, 94, 0.8), 0 0 50px rgba(34, 197, 94, 0.4), 0 0 80px rgba(34, 197, 94, 0.2);
  --glow-secondary: 0 0 20px rgba(34, 197, 94, 0.5), 0 0 40px rgba(34, 197, 94, 0.2);
  --border-primary: rgba(34, 197, 94, 0.5);
  --border-secondary: rgba(34, 197, 94, 0.4);
  --glow-breathe-mid: rgba(34, 197, 94, 0.9);
  --glow-breathe-dim: rgba(34, 197, 94, 0.4);
  --grid-line-strong: rgba(34, 197, 94, 0.05);
  --grid-line-weak: rgba(34, 197, 94, 0.02);
}
html[data-glow="red"], body[data-glow="red"] {
  --accent-rgb: 239, 68, 68;
  --primary: #ef4444;
  --primary-dim: #dc2626;
  --secondary: #ef4444;
  --secondary-dim: #dc2626;
  --glow-primary: 0 0 20px rgba(239, 68, 68, 0.6), 0 0 40px rgba(239, 68, 68, 0.25);
  --glow-primary-hot: 0 0 25px rgba(239, 68, 68, 0.8), 0 0 50px rgba(239, 68, 68, 0.4), 0 0 80px rgba(239, 68, 68, 0.2);
  --glow-secondary: 0 0 20px rgba(239, 68, 68, 0.5), 0 0 40px rgba(239, 68, 68, 0.2);
  --border-primary: rgba(239, 68, 68, 0.5);
  --border-secondary: rgba(239, 68, 68, 0.4);
  --glow-breathe-mid: rgba(239, 68, 68, 0.9);
  --glow-breathe-dim: rgba(239, 68, 68, 0.4);
  --grid-line-strong: rgba(239, 68, 68, 0.05);
  --grid-line-weak: rgba(239, 68, 68, 0.02);
}

/* Animations */
@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 20px var(--glow-breathe-dim), 0 0 40px rgba(0, 0, 0, 0.15); }
  50% { box-shadow: 0 0 35px var(--glow-breathe-mid), 0 0 70px var(--glow-breathe-dim), 0 0 100px var(--glow-breathe-dim); }
}
@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes slide-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

* {
  box-sizing: border-box;
}

.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;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: #000000;
  color: var(--text);
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Custom scrollbar (theme) */
html {
  scrollbar-width: thin;
  scrollbar-color: var(--border-primary) var(--bg-panel);
}
body::-webkit-scrollbar {
  width: 10px;
}
body::-webkit-scrollbar-track {
  background: var(--bg-panel);
}
body::-webkit-scrollbar-thumb {
  background: var(--border-primary);
  border-radius: 5px;
}
body::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Synthwave grid background */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, var(--grid-line-strong) 50%, transparent 100%),
    linear-gradient(90deg, transparent 0%, var(--grid-line-weak) 50%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  animation: fade-in 0.5s ease;
  margin: 0.5rem 0 0.75rem 0;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
}
a:hover {
  color: var(--primary);
  text-shadow: var(--glow-primary);
}
a:active {
  transform: scale(0.98);
}

/* Focus states – WCAG keyboard visibility */
a:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
.layout-user-trigger:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.breadcrumb-link {
  color: var(--secondary);
}
.breadcrumb-link:hover {
  color: var(--primary);
}
.breadcrumb-current {
  color: var(--text);
}
.breadcrumb-sep {
  color: var(--text-muted);
  user-select: none;
}

/* Issue meta row (creator) */
.issue-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.issue-meta-item strong {
  color: var(--text);
  font-weight: 500;
}
.issue-created-by {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.issue-creator-profile {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.issue-creator-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}
.issue-creator-name {
  color: var(--text);
  font-weight: 500;
}
.issue-creator-fallback {
  color: var(--text-muted);
}

/* Issue detail card and description */
.issue-detail-card {
  padding: 1.25rem;
}
.issue-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0 0 1rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.issue-description-body {
  word-break: break-word;
  text-indent: 0;
  padding: 0;
  margin: 0;
  line-height: 1.6;
}
.issue-detail-card .issue-description-body {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.issue-description-body .issue-desc-line,
.issue-description-body .issue-desc-list-line {
  display: block;
}
.issue-description-body .issue-desc-list-line {
  padding-left: 1.5em;
}

/* Layout */
.layout {
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.layout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: rgba(0, 0, 0, 0.92);
  border-bottom: 2px solid var(--border-primary);
  flex-wrap: wrap;
  gap: 1rem;
  position: relative;
}
body.layout-breathing-bar .layout-header {
  animation: glow-breathe 3s ease-in-out infinite;
}
.layout-header::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.08) 0%, transparent 60%);
  opacity: 0.8;
}
.layout-header::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(var(--accent-rgb), 0.6), transparent);
  animation: pulse-soft 2s ease-in-out infinite;
}

.layout-brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  position: relative;
  text-shadow: 0 0 12px rgba(var(--accent-rgb), 0.7);
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
  flex-shrink: 0;
}
.layout-brand:hover {
  color: var(--primary);
  text-shadow: 0 0 20px rgba(var(--accent-rgb), 0.9), 0 0 40px rgba(var(--accent-rgb), 0.4);
  transform: scale(1.02);
}
.layout-brand-glow {
  position: absolute;
  inset: -6px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.2) 0%, transparent 65%);
  pointer-events: none;
  animation: pulse-soft 2.5s ease-in-out infinite;
}
.layout-brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-height: 32px;
  max-width: 120px;
  object-fit: contain;
  vertical-align: middle;
  transform-origin: top center;
  transition: transform 0.28s ease, filter 0.28s ease;
  position: relative;
  z-index: 2;
}
.layout-brand:hover .layout-brand-logo {
  transform: translateY(10px) scale(2.05);
  filter: drop-shadow(0 0 14px rgba(var(--accent-rgb), 0.55));
}

.login-page-logo-wrap {
  margin: 0 0 0.5rem 0;
  line-height: 0;
}
.login-page-logo {
  max-height: 80px;
  width: auto;
  height: auto;
  display: block;
  margin: 0 auto;
}

.layout-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  flex: 1;
  min-width: 0;
}
.layout-nav-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.layout-nav-center {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
}
.layout-nav-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}
.layout-nav a {
  color: var(--secondary);
  font-weight: 500;
  transition: color 0.25s ease, text-shadow 0.25s ease, transform 0.2s ease;
}
.layout-nav a:hover {
  color: var(--primary);
  text-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

.layout-projects-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}
.layout-project-link {
  font-size: 0.9rem;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.layout-project-link:hover {
  background: rgba(5, 217, 232, 0.12);
  box-shadow: 0 0 12px rgba(5, 217, 232, 0.3);
}

/* Notifications – list item (dropdown removed; used on notifications page) */
.layout-notifications-mark-all {
  background: none;
  border: none;
  color: var(--secondary);
  cursor: pointer;
  font-size: 0.8rem;
  padding: 0.2rem 0.4rem;
}
.layout-notifications-mark-all:hover {
  color: var(--primary);
}
.layout-notification-item {
  display: block;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
  text-decoration: none;
  font-size: 0.85rem;
  transition: background 0.2s;
}
.layout-notification-item:hover {
  background: rgba(5, 217, 232, 0.08);
}
.layout-notification-unread {
  background: rgba(5, 217, 232, 0.08);
}
.layout-notification-message {
  display: block;
  margin-bottom: 0.2rem;
}
.layout-notification-time {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* User menu – avatar wrap */
.layout-user-avatar-wrap {
  position: relative;
  display: inline-block;
  line-height: 0;
}
.layout-user-dropdown-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  line-height: 0;
}

.layout-user {
  color: var(--text-muted);
  font-size: 0.95rem;
}
.layout-role {
  margin-left: 0.5rem;
  color: var(--primary);
  font-style: normal;
  font-size: 0.85rem;
}

.layout-logout {
  color: var(--text-muted);
  font-size: 0.9rem;
}
.layout-logout:hover {
  color: var(--primary);
}

/* User menu dropdown */
.layout-user-menu {
  position: relative;
}
.layout-user-trigger {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.2rem 0.5rem 0.2rem 0.2rem;
  background: transparent;
  border: 2px solid var(--border-secondary);
  border-radius: 999px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.2s ease;
}
.layout-user-trigger:hover {
  border-color: var(--secondary);
  box-shadow: var(--glow-secondary);
  transform: scale(1.02);
}
.layout-user-trigger-name {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  max-width: 140px;
  min-width: 0;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layout-user-avatar {
  display: block;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  object-fit: cover;
}
.layout-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  box-shadow: var(--glow-secondary);
  z-index: 100;
  overflow: hidden;
  animation: slide-up 0.25s ease;
}
.layout-user-dropdown[hidden] {
  display: none;
}
.layout-user-dropdown-head {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 1rem;
  border-bottom: 1px solid var(--border-secondary);
}
.layout-user-dropdown-avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  transition: box-shadow 0.2s ease;
}
.layout-user-dropdown-info {
  flex: 1;
  min-width: 0;
}
.layout-user-dropdown-name {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
  font-size: 1.05rem;
  min-width: 0;
}
.layout-user-display-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.layout-user-username {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}
.layout-role-icon {
  flex-shrink: 0;
  font-size: 1rem;
}
.layout-role-crown {
  filter: drop-shadow(0 0 4px rgba(255, 200, 100, 0.8));
}
.layout-role-admin {
  filter: drop-shadow(0 0 4px rgba(5, 217, 232, 0.6));
}
.layout-user-dropdown-actions {
  padding: 0.5rem 0;
}
.layout-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
  transition: background 0.15s, color 0.15s;
}
.layout-dropdown-item:hover {
  background: rgba(5, 217, 232, 0.1);
  color: var(--secondary);
}
.layout-dropdown-icon {
  font-size: 1rem;
  opacity: 0.9;
}
.layout-settings-btn {
  border: none;
  cursor: pointer;
}
.layout-logout-btn {
  color: var(--text-muted);
}
.layout-logout-btn:hover {
  color: var(--primary);
  background: rgba(5, 217, 232, 0.12);
}

/* Notifications page */
.notifications-page-actions {
  margin-bottom: 1rem;
}
.notifications-page-list .layout-notification-item {
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.notifications-page-list .layout-notification-item:last-child {
  border-bottom: none;
}

.layout-main {
  padding: 1rem 1.5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  animation: fade-in 0.4s ease;
}

/* Two-column layout: main content + changelog sidebar (sidebar aligned with filter bar) */
.layout-main-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(200px, 280px);
  grid-template-rows: auto 1fr;
  gap: 1.5rem;
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  animation: fade-in 0.4s ease;
}
.layout-main-with-sidebar .main-content-header {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.layout-main-with-sidebar .main-content-body {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}
.layout-main-with-sidebar .layout-sidebar-column {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-self: start;
  position: sticky;
  top: 1.5rem;
}
.layout-main-with-sidebar .layout-changelog-sidebar {
  /* inside layout-sidebar-column; no grid placement */
}
.layout-changelog-sidebar {
  padding: 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  font-size: 0.9rem;
}
.layout-changelog-sidebar h2 {
  font-size: 0.95rem;
  margin: 0 0 0.6rem 0;
  font-family: var(--font-display);
}
.layout-changelog-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.layout-changelog-sidebar li {
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-secondary);
}
.layout-changelog-sidebar li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.layout-changelog-sidebar a {
  color: var(--primary);
  text-decoration: none;
}
.layout-changelog-sidebar a:hover {
  text-decoration: underline;
}
.layout-changelog-sidebar .changelog-sidebar-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Roadmap sidebar (project page) – match changelog widget */
.layout-roadmap-sidebar {
  padding: 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  font-size: 0.9rem;
  margin-top: 0.5rem;
}
.layout-roadmap-sidebar h2 {
  font-size: 0.95rem;
  margin: 0 0 0.6rem 0;
  font-family: var(--font-display);
}
.layout-roadmap-sidebar ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.layout-roadmap-sidebar li {
  margin-bottom: 0.4rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-secondary);
}
.layout-roadmap-sidebar li:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.layout-roadmap-sidebar a {
  color: var(--primary);
  text-decoration: none;
}
.layout-roadmap-sidebar a:hover {
  text-decoration: underline;
}
.layout-roadmap-sidebar .roadmap-sidebar-date {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.layout-roadmap-sidebar .roadmap-sidebar-implemented-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.1rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(34, 197, 94, 0.95);
  border: 1px solid rgba(34, 197, 94, 0.4);
  border-radius: 4px;
  vertical-align: middle;
}
.layout-roadmap-sidebar li.roadmap-sidebar-item-implemented a {
  color: var(--text-muted);
}

/* Changelog add: body textarea + toolbar */
.changelog-body-wrap {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.changelog-body-wrap.expanded .changelog-body-textarea {
  max-height: min(50vh, 320px);
  min-height: 120px;
}
.changelog-body-toolbar {
  display: none;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.changelog-body-wrap.expanded .changelog-body-toolbar {
  display: flex;
}
.changelog-block-palette {
  display: none;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.changelog-body-wrap.expanded .changelog-block-palette {
  display: flex;
}
.changelog-block-item {
  padding: 0.25rem 0.55rem;
  font-size: 0.85rem;
  background: rgba(5, 217, 232, 0.08);
  border: 1px dashed rgba(5, 217, 232, 0.55);
  border-radius: 6px;
  color: var(--secondary);
  cursor: grab;
}
.changelog-block-item:active {
  cursor: grabbing;
}
.changelog-block-item:hover {
  border-style: solid;
  box-shadow: 0 0 14px rgba(5, 217, 232, 0.18);
}
.changelog-block-hint {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-left: 0.25rem;
}
.changelog-body-wrap.drag-over .changelog-body-textarea {
  border-color: rgba(5, 217, 232, 0.9);
  box-shadow: 0 0 0 2px rgba(5, 217, 232, 0.18), 0 0 22px rgba(5, 217, 232, 0.25);
}
.changelog-body-toolbar button {
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 4px;
  color: var(--text-muted);
  cursor: pointer;
}
.changelog-body-toolbar button:hover {
  color: var(--secondary);
  border-color: var(--secondary);
}
.changelog-body-textarea {
  width: 100%;
  min-height: 3em;
  max-height: 320px;
  padding: 0.7rem 1rem;
  font-family: "Fira Code", "JetBrains Mono", "Courier New", monospace;
  font-size: 0.95rem;
  color: var(--text);
  background: #05070b;
  border: 1px solid rgba(5, 217, 232, 0.45);
  border-radius: 6px;
  resize: vertical;
  transition: min-height 0.2s ease, max-height 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.changelog-body-textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 18px rgba(5, 217, 232, 0.5);
}

/* (changelog-preview removed – using single textarea editor) */

/* Changelog cards (dedicated page + embeddable) */
.changelog-page-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.changelog-card {
  position: relative;
}
.changelog-card-enter {
  opacity: 0;
  transform: translateY(-10px);
}
.changelog-card-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 320ms ease, transform 320ms ease;
}
.changelog-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 0.75rem;
  margin-bottom: 0.5rem;
}
.changelog-card-version {
  font-family: var(--font-display);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--secondary);
}
.changelog-card-project {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.changelog-card-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.changelog-card-header .changelog-delete-btn {
  margin-left: auto;
}
.changelog-card-body {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}

/* Roadmap cards */
.roadmap-page-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.roadmap-card-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.roadmap-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}
.roadmap-card-title {
  margin: 0;
  max-width: 100%;
  word-break: break-word;
}
.roadmap-implemented-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #22c55e;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.35);
  white-space: nowrap;
}
.roadmap-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}
.roadmap-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  align-items: center;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.roadmap-card-date-implemented {
  color: rgba(34, 197, 94, 0.9);
}
.roadmap-card-implemented {
  border-color: rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.14);
}
.roadmap-card-implemented:hover {
  border-color: rgba(34, 197, 94, 0.55);
  box-shadow: 0 0 22px rgba(34, 197, 94, 0.22);
}
.roadmap-card-body {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.5;
}
.roadmap-edit-form {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-secondary);
}
.roadmap-edit-form .input-wrap {
  margin-bottom: 0.75rem;
}
.roadmap-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Multiline code blocks (backtick-wrapped) */
.changelog-code-block {
  margin: 0.6rem 0 0.9rem 0;
  padding: 0.75rem 1rem;
  background: #05070b;
  border: 1px solid rgba(5, 217, 232, 0.6);
  border-radius: 6px;
  box-shadow: 0 0 18px rgba(5, 217, 232, 0.35) inset;
  overflow-x: auto;
  font-family: "Fira Code", "JetBrains Mono", "Consolas", "Courier New", monospace;
  font-size: 0.9rem;
  white-space: pre;
}
.changelog-code-block .changelog-inline-code {
  /* Inside a block, rely on the block styling instead of inline pill styling. */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  margin: 0;
  color: var(--primary);
}

/* Code editor–style formatting for inline code in changelog cards */
.changelog-card-body code,
.changelog-card-body .changelog-inline-code,
.changelog-section-title code,
.changelog-section-title .changelog-inline-code,
.changelog-section-list code,
.changelog-section-list .changelog-inline-code {
  display: inline;
  font-family: "Fira Code", "JetBrains Mono", "Consolas", "Courier New", monospace;
  font-size: 0.9em;
  padding: 0.2em 0.5em;
  margin: 0 0.1em;
  background: #0a0c10;
  color: var(--primary);
  border: 1px solid rgba(5, 217, 232, 0.5);
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(5, 217, 232, 0.15) inset;
  white-space: pre-wrap;
  word-break: break-all;
}

.changelog-section {
  margin-top: 0.35rem;
}
.changelog-section-title {
  font-size: 0.95rem;
  margin: 0.2rem 0 0.1rem 0;
  color: var(--text);
}
.changelog-section-list {
  list-style: none;
  margin: 0 0 0.4rem 0;
  padding: 0;
}
.changelog-section-list li {
  position: relative;
  padding-left: 1.1rem;
  margin: 0.05rem 0;
}
.changelog-section-list li::before {
  content: '-';
  position: absolute;
  left: 0;
  top: 0.1rem;
  color: var(--primary);
}

@media (max-width: 900px) {
  .layout-main-with-sidebar {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }
  .layout-main-with-sidebar .layout-sidebar-column {
    grid-column: 1;
    grid-row: 3;
    position: static;
  }
  .layout-changelog-sidebar {
    position: static;
  }
}

/* Button component */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border: 1px solid;
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
  text-decoration: none;
}
.btn:active {
  transform: scale(0.98);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dim), var(--primary));
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.35);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--secondary-dim), var(--secondary));
  border-color: var(--secondary);
  color: var(--bg-dark);
  box-shadow: 0 0 15px rgba(5, 217, 232, 0.3);
}
.btn-secondary:hover:not(:disabled) {
  box-shadow: var(--glow-secondary);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-secondary);
  color: var(--secondary);
}
.btn-ghost:hover:not(:disabled) {
  box-shadow: var(--glow-secondary);
  transform: translateY(-1px);
}

.btn-danger {
  background: transparent;
  border-color: var(--primary);
  color: var(--primary);
}
.btn-danger:hover:not(:disabled) {
  box-shadow: var(--glow-primary);
  transform: translateY(-1px);
}

/* Card component */
.card {
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.03) 0%, rgba(0, 0, 0, 0) 65%),
    var(--bg-card);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 1.25rem;
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.25s ease;
  margin-bottom: 1rem;
  animation: slide-up 0.4s ease backwards;
}
.card:hover {
  box-shadow: var(--glow-secondary);
  border-color: var(--secondary);
  transform: translateY(-2px);
}

.card-glow {
  box-shadow: 0 0 20px rgba(var(--accent-rgb), 0.15);
}

.card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 0 0 0.75rem 0;
  color: var(--secondary);
}

/* Input component */
.input-wrap {
  margin-bottom: 1rem;
}
.input-wrap label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.input, textarea.input, select.input {
  width: 100%;
  padding: 0.6rem 0.9rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.input:focus, textarea.input:focus, select.input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: var(--glow-secondary);
}
.input::placeholder {
  color: var(--text-muted);
}

textarea.input {
  min-height: 100px;
  resize: vertical;
}

/* Loading state */
.loading {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

/* Error message */
.error {
  color: var(--primary);
  margin: 0 0 1rem 0;
  padding: 0.75rem;
  background: rgba(5, 217, 232, 0.12);
  border: 1px solid var(--border-primary);
  border-radius: 6px;
  animation: slide-up 0.35s ease;
}

/* Success message */
.success {
  color: var(--secondary);
  margin: 0 0 1rem 0;
  padding: 0.75rem;
  background: rgba(5, 217, 232, 0.1);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  animation: slide-up 0.35s ease;
}

/* Status badges */
.status-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  text-transform: lowercase;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.status-badge:hover {
  transform: scale(1.05);
}
.status-open { background: rgba(34, 197, 94, 0.25); color: #22c55e; }
.status-in_progress { background: rgba(249, 115, 22, 0.25); color: #f97316; }
.status-done { background: rgba(100, 200, 100, 0.2); color: #7fdb7f; }
.status-screening { background: rgba(245, 158, 11, 0.25); color: #f59e0b; }
.status-rejected { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.status-closed {
  background: rgba(239, 68, 68, 0.25);
  color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.22);
}
.status-closed:hover {
  box-shadow: 0 0 16px rgba(239, 68, 68, 0.35);
}
/* Priority badges */
.type-badge.type-suggestion {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(155, 89, 182, 0.25);
  color: #ce93d8;
}
.type-badge.type-issue {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(var(--accent-rgb), 0.2);
  color: var(--primary);
}

.priority-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}
.priority-low { background: rgba(148, 163, 184, 0.25); color: #94a3b8; }
.priority-medium { background: rgba(var(--accent-rgb), 0.2); color: var(--secondary); }
.priority-high { background: rgba(249, 115, 22, 0.25); color: #f97316; }
.priority-critical { background: rgba(239, 68, 68, 0.25); color: #ef4444; }

/* Issue comments */
.issue-comments-section {
  margin-top: 1.5rem;
}
.issue-comments-title {
  font-size: 1rem;
  color: var(--secondary);
  margin-bottom: 0.75rem;
}
.issue-comments-list {
  margin-bottom: 1rem;
}
.issue-comment {
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  font-size: 0.95rem;
}
.issue-comment-private {
  border-color: var(--primary);
  background: rgba(5, 217, 232, 0.06);
}
.issue-comment--close {
  border-left: 3px solid var(--primary);
}
.issue-comment-kind-badge {
  display: inline-block;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(5, 217, 232, 0.15);
  border-radius: 4px;
  margin-right: 0.25rem;
}
.issue-comment-kind-badge--post-mortem {
  color: rgba(156, 163, 175, 1);
  background: rgba(75, 85, 99, 0.4);
}
.issue-comment--post-mortem {
  box-shadow: 0 0 12px rgba(128, 128, 128, 0.35);
  border-color: rgba(128, 128, 128, 0.4);
}
.issue-comment--status-open {
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
  border-color: rgba(34, 197, 94, 0.4);
}
.issue-comment--status-in_progress {
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.35);
  border-color: rgba(249, 115, 22, 0.4);
}
.issue-comment--status-closed {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.35);
  border-color: rgba(239, 68, 68, 0.4);
}
.issue-comment--status-done {
  box-shadow: 0 0 12px rgba(100, 200, 100, 0.35);
  border-color: rgba(100, 200, 100, 0.4);
}
.issue-comment--status-screening {
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.35);
  border-color: rgba(245, 158, 11, 0.4);
}
.issue-comment--status-rejected {
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.35);
}
/* Post mortem always uses gray glow, overriding status glow */
.issue-comment.issue-comment--post-mortem {
  box-shadow: 0 0 12px rgba(128, 128, 128, 0.4);
  border-color: rgba(128, 128, 128, 0.5);
}
.issue-comment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.issue-comment-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}
.issue-comment-date {
  color: var(--text-muted);
}
.issue-comment-body {
  white-space: pre-wrap;
  word-break: break-word;
}
.issue-comment-add {
  margin-top: 1rem;
}
.issue-comment-add textarea {
  width: 100%;
  min-height: 80px;
  margin-bottom: 0.5rem;
  padding: 0.6rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

/* Issue create/edit: main form + sidebar */
.issue-form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
  gap: 1.25rem;
  align-items: start;
}
.issue-form-main {
  min-width: 0;
}
.issue-form-sidebar {
  min-width: 0;
}
.issue-form-sidebar-card {
  padding: 0.85rem;
  border: 1px solid var(--border-secondary);
  border-radius: 10px;
  background: rgba(5, 217, 232, 0.04);
}
.issue-form-sidebar-title {
  margin: 0 0 0.6rem 0;
  font-size: 0.95rem;
  color: var(--secondary);
  font-family: var(--font-display);
}

/* Issue detail: main + sidebar */
.issue-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  gap: 1.25rem;
  align-items: start;
}
.issue-detail-layout-no-sidebar {
  grid-template-columns: 1fr;
}
.issue-detail-main { min-width: 0; }
.issue-detail-sidebar {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  position: sticky;
  top: 1.25rem;
}
.issue-attachments-card .card-title,
.issue-relations-card .card-title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.issue-attachment-add {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}
.issue-attachments-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.issue-attachments-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.issue-attachments-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.issue-attachment-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 0.6rem;
  align-items: center;
}
.issue-attachment-thumb {
  display: inline-flex;
  width: 44px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border-secondary);
  overflow: hidden;
  background: rgba(0,0,0,0.35);
}
.issue-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.issue-attachment-meta a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.9rem;
}
.issue-attachment-meta a:hover { text-decoration: underline; }
.issue-attachment-size {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.05rem;
}

/* Ticket attachments dropdown under description */
.issue-ticket-attachments-dropdown {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-secondary);
}
.issue-attachments-summary {
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--primary);
  list-style: none;
  user-select: none;
}
.issue-attachments-summary::-webkit-details-marker { display: none; }
.issue-attachments-summary::before {
  content: '▸ ';
  display: inline-block;
  transition: transform 0.15s ease;
}
.issue-ticket-attachments-dropdown[open] .issue-attachments-summary::before,
.issue-comment-attachments-dropdown[open] .issue-attachments-summary::before {
  transform: rotate(90deg);
}
.issue-ticket-attachments-dropdown .issue-attachments-list {
  margin-top: 0.5rem;
  padding-left: 0;
}

/* Comment attachments dropdown under comment body */
.issue-comment-attachments-dropdown {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}
.issue-comment-attachments-dropdown .issue-attachments-summary {
  font-size: 0.85rem;
}
.issue-comment-attachments-list {
  list-style: none;
  margin: 0.35rem 0 0 0;
  padding: 0 0 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.issue-comment-attachment-item--has-thumb {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem;
  align-items: center;
  min-height: 0;
}
.issue-comment-attachment-thumb {
  display: inline-flex;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid var(--border-secondary);
  overflow: hidden;
  background: rgba(0,0,0,0.35);
  flex-shrink: 0;
}
.issue-comment-attachment-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.issue-comment-attachment-meta a {
  color: var(--primary);
  text-decoration: none;
}
.issue-comment-attachment-meta a:hover { text-decoration: underline; }
.issue-comment-attachments-list a {
  color: var(--primary);
  text-decoration: none;
}
.issue-comment-attachments-list a:hover { text-decoration: underline; }
.issue-comment-att-size {
  color: var(--text-muted);
  font-size: 0.8rem;
  display: block;
  margin-top: 0.1rem;
}

/* Attachment upload below comment textarea */
.issue-attachment-add-below-comment {
  margin-top: 0.75rem;
}
.issue-comment-attachments-wrap {
  margin-top: 0.5rem;
}
.issue-comment-attachments-wrap .input { margin-bottom: 0; }
.issue-comment-attachments-hint {
  margin: 0.25rem 0 0 0;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.issue-children-list {
  list-style: none;
  margin: 0.5rem 0 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.issue-children-empty {
  margin: 0.4rem 0 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.issue-add-child {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.6rem;
}

@media (max-width: 900px) {
  .issue-form-layout {
    grid-template-columns: 1fr;
  }
  .issue-detail-layout {
    grid-template-columns: 1fr;
  }
  .issue-detail-sidebar {
    position: static;
  }
}
.issue-status-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.issue-status-inline select {
  padding: 0.35rem 0.6rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
}

.issue-private-note-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, rgba(5, 217, 232, 0.1) 0%, rgba(5, 217, 232, 0.06) 100%);
  border: 1px solid var(--border-primary);
  border-radius: 8px;
  box-shadow: 0 0 12px rgba(5, 217, 232, 0.2);
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.issue-private-note-toggle:hover {
  box-shadow: 0 0 18px rgba(5, 217, 232, 0.35);
}
.issue-private-note-icon {
  font-size: 1.25rem;
  filter: drop-shadow(0 0 4px rgba(5, 217, 232, 0.6));
}
.issue-private-note-label {
  flex: 1;
  font-weight: 500;
  color: var(--text);
}
.issue-private-note-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.issue-private-note-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.issue-private-note-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 26px;
  transition: 0.25s;
}
.issue-private-note-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-muted);
  border-radius: 50%;
  transition: 0.25s;
}
.issue-private-note-switch input:checked + .issue-private-note-slider {
  background: rgba(5, 217, 232, 0.3);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(5, 217, 232, 0.5);
}
.issue-private-note-switch input:checked + .issue-private-note-slider::before {
  transform: translateX(22px);
  background: var(--primary);
  box-shadow: 0 0 8px rgba(5, 217, 232, 0.9);
}
.issue-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}
.btn-close-comment {
  background: rgba(139, 139, 158, 0.2);
  color: var(--text);
  border: 1px solid var(--text-muted);
}
.btn-close-comment:hover {
  background: rgba(139, 139, 158, 0.35);
  border-color: var(--text);
}

/* List items */
ul, ol {
  margin: 0;
  padding: 0;
}

/* Settings tabs */
.settings-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-secondary);
  padding-bottom: 0.5rem;
}

/* Server config: two-column layout (vertical nav + content) */
.server-config-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1rem;
}
.server-config-nav {
  position: sticky;
  top: 1.5rem;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 0.5rem 0;
}
.server-config-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.server-config-nav-list li {
  margin: 0;
}
.server-config-nav-link {
  display: block;
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.server-config-nav-link:hover {
  background: rgba(5, 217, 232, 0.1);
  color: var(--primary);
}
.server-config-nav-link.active {
  font-weight: 600;
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(5, 217, 232, 0.12);
}
.server-config-content {
  min-width: 0;
}
.server-config-section {
  display: none;
  padding: 1rem 0;
}
.server-config-section.active {
  display: block;
}
@media (max-width: 768px) {
  .server-config-layout {
    grid-template-columns: 1fr;
  }
  .server-config-nav {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem;
  }
  .server-config-nav-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  .server-config-nav-list li {
    display: inline;
  }
  .server-config-nav-link {
    display: inline-block;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    border-left: none;
  }
  .server-config-nav-link.active {
    border-left: none;
    background: rgba(5, 217, 232, 0.2);
  }
}
.server-config-section-select {
  max-width: 220px;
  padding: 0.4rem 0.6rem;
  font-size: 0.9rem;
}
.settings-tab {
  padding: 0.5rem 1rem;
  color: var(--text-muted);
  font-weight: 500;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.settings-tab:hover {
  color: var(--secondary);
  background: rgba(5, 217, 232, 0.1);
}
.settings-tab-active {
  color: var(--secondary);
  background: rgba(5, 217, 232, 0.15);
}

.settings-section { margin-bottom: 2rem; scroll-margin-top: 1rem; }
.settings-section-title { font-size: 1rem; color: var(--secondary); margin-bottom: 0.75rem; }
.settings-section-compact .card { padding: 0.75rem; }
.admin-card {
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  min-height: 120px;
  border-radius: 10px;
}
.admin-card-avatar { border-radius: 50%; flex-shrink: 0; }
.admin-card-name { font-weight: 500; min-width: 0; }
.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1rem;
  border-radius: 8px;
}
.project-card-name { font-weight: 600; font-size: 1rem; }
.project-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.member-list-compact { list-style: none; margin: 0.25rem 0 0 0; padding: 0; max-height: 160px; overflow-y: auto; border: 1px solid var(--border-secondary); border-radius: 6px; background: var(--bg-panel); position: absolute; z-index: 250; min-width: 200px; }
.admin-search-wrap .member-list-compact { top: 100%; left: 0; margin-top: 0.25rem; }
.member-pick-btn { display: flex; align-items: center; gap: 0.5rem; width: 100%; padding: 0.4rem 0.6rem; text-align: left; background: none; border: none; color: var(--text); font-size: 0.9rem; cursor: pointer; }
.member-pick-btn:hover { background: rgba(var(--accent-rgb), 0.15); }
.admins-list-compact li { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.9rem; }
.admin-row-compact { display: flex; align-items: center; gap: 0.5rem; padding: 0.35rem 0; font-size: 0.9rem; border-bottom: 1px solid rgba(5,217,232,0.15); }
.btn-small { padding: 0.25rem 0.5rem; font-size: 0.85rem; }

/* Ticket pickers (created-by / assignee) */
.issues-picker-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.issues-picker-popover {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  margin-top: 0;
  min-width: 260px;
  max-width: 420px;
  background: var(--bg-panel);
  border: 1px solid var(--border-secondary);
  border-radius: 8px;
  padding: 0.5rem;
  z-index: 300;
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.18);
}
.issues-picker-popover[hidden] { display: none; }
.issues-picker-list {
  list-style: none;
  padding: 0;
  margin: 0.4rem 0 0 0;
  max-height: 260px;
  overflow: auto;
}
.issues-picker-btn {
  padding: 0.25rem 0.5rem;
}
.issues-picker-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.issues-picker-btn-avatar {
  border-radius: 50%;
  flex-shrink: 0;
}
.issues-picker-btn-avatar--empty {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  background: rgba(var(--accent-rgb), 0.06);
  display: inline-block;
}
.issues-picker-btn-label {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issues-picker-btn-caret {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
}

/* Customize grid: cards side by side */
.customize-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
@media (max-width: 768px) {
  .customize-grid {
    grid-template-columns: 1fr;
  }
}

/* Gallery of recent issues */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.gallery-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  animation: slide-up 0.45s ease backwards;
}
.gallery-grid .gallery-card:nth-child(1) { animation-delay: 0.02s; }
.gallery-grid .gallery-card:nth-child(2) { animation-delay: 0.05s; }
.gallery-grid .gallery-card:nth-child(3) { animation-delay: 0.08s; }
.gallery-grid .gallery-card:nth-child(4) { animation-delay: 0.11s; }
.gallery-grid .gallery-card:nth-child(5) { animation-delay: 0.14s; }
.gallery-grid .gallery-card:nth-child(6) { animation-delay: 0.17s; }
.gallery-grid .gallery-card:nth-child(n+7) { animation-delay: 0.2s; }
.gallery-card[data-priority="low"] {
  border-color: rgba(148, 163, 184, 0.4);
  box-shadow: 0 0 16px rgba(148, 163, 184, 0.12);
}
.gallery-card[data-priority="medium"] {
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.15);
}
.gallery-card[data-priority="high"] {
  border-color: rgba(249, 115, 22, 0.45);
  box-shadow: 0 0 18px rgba(249, 115, 22, 0.2);
}
.gallery-card[data-priority="critical"] {
  border-color: rgba(239, 68, 68, 0.5);
  box-shadow: 0 0 20px rgba(239, 68, 68, 0.25);
  animation: slide-up 0.45s ease backwards, gallery-card-critical-pulse 2s ease-in-out infinite;
}
.gallery-card[data-priority="critical"]:hover {
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.45), 0 0 40px rgba(239, 68, 68, 0.2);
}
@keyframes gallery-card-critical-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(239, 68, 68, 0.25); }
  50% { box-shadow: 0 0 28px rgba(239, 68, 68, 0.45), 0 0 36px rgba(239, 68, 68, 0.15); }
}
.gallery-card:hover {
  transform: translateY(-4px);
}
.gallery-card[data-priority="low"]:hover { box-shadow: 0 0 22px rgba(148, 163, 184, 0.2); }
.gallery-card[data-priority="medium"]:hover { box-shadow: var(--glow-secondary); }
.gallery-card[data-priority="high"]:hover { box-shadow: 0 0 26px rgba(249, 115, 22, 0.35); }
.gallery-card.is-closed {
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 0 18px rgba(239, 68, 68, 0.18);
}
.gallery-card.is-closed[data-priority="critical"] {
  animation: slide-up 0.45s ease backwards, gallery-card-critical-pulse 2s ease-in-out infinite;
}
.gallery-card.is-closed:hover {
  box-shadow: 0 0 26px rgba(239, 68, 68, 0.26);
}
.gallery-card.is-closed[data-priority="critical"]:hover {
  box-shadow: 0 0 28px rgba(239, 68, 68, 0.45), 0 0 40px rgba(239, 68, 68, 0.2);
}
.gallery-card-project {
  font-size: 0.8rem;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.25s ease, text-shadow 0.25s ease;
}
.gallery-card:hover .gallery-card-project {
  text-shadow: 0 0 10px rgba(var(--accent-rgb), 0.6);
}
.gallery-card-title {
  font-size: 1rem;
  margin: 0.35rem 0 0.5rem 0;
  color: var(--text);
}
.gallery-card-title:hover { color: var(--secondary); }
.gallery-card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.gallery-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0.5rem 0 0 0;
  line-height: 1.4;
}

.dashboard-filters-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.dashboard-filters-form label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.dashboard-filters-form .input,
.dashboard-filters-form select.input {
  min-width: 140px;
}

/* Compact dashboard filters: single row, smaller inputs */
.dashboard-filters-compact {
  margin-bottom: 1rem;
}
.dashboard-filters-compact .dashboard-filters-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.dashboard-filters-compact .dashboard-filter-input {
  width: 160px;
  min-width: 0;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
}
.dashboard-filters-compact .dashboard-filter-select {
  min-width: 0;
  width: 120px;
  padding: 0.35rem 0.5rem;
  font-size: 0.9rem;
}
.dashboard-filters-compact .btn-small {
  flex-shrink: 0;
}

.empty-state-cta {
  text-align: center;
  padding: 2rem;
}
.empty-state-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}
.empty-state-title {
  font-size: 1.25rem;
  margin: 0 0 0.5rem 0;
  color: var(--text);
}
.empty-state-text {
  color: var(--text-muted);
  margin: 0 0 1.25rem 0;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
}
.pagination-info {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.gallery-grid.list-compact .gallery-card,
#issues-list.list-compact .card {
  padding: 0.6rem 0.75rem;
}
.gallery-grid.list-compact .gallery-card-title,
#issues-list.list-compact .card-title {
  font-size: 0.95rem;
  margin: 0.25rem 0 0.4rem 0;
}
.gallery-grid.list-compact .gallery-card-meta,
#issues-list.list-compact .card p {
  font-size: 0.8rem;
  margin: 0.25rem 0 0 0;
}
.gallery-grid.list-compact .gallery-card-desc {
  font-size: 0.85rem;
  margin: 0.35rem 0 0 0;
}
.input-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.95rem;
}

.comments-loading-skeleton,
.issue-comments-list.loading {
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.issue-comments-list.loading::before {
  content: 'Loading comments…';
}

/* Responsive */
@media (max-width: 768px) {
  .layout-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .layout-nav {
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
  }
  .layout-main {
    padding: 1rem;
  }
}
