:root {
  color-scheme: light;
  --bg: #f4f6fb;
  --panel: #ffffff;
  --border: #d6deeb;
  --text: #162031;
  --muted: #5f6f86;
  --accent: #2463eb;
  --accent-soft: #e8f0ff;
}

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.wrap-wide {
  max-width: 1560px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 10px 30px rgba(25, 40, 72, 0.06);
}

.grid {
  display: grid;
  gap: 16px;
}

.list {
  display: grid;
  gap: 12px;
}

.report-link {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fbfcff;
}

.report-link:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 14px;
  margin-top: 8px;
}

.pill {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}

.muted { color: var(--muted); }
.label { font-weight: 600; margin-bottom: 6px; }
.value { white-space: pre-wrap; word-break: break-word; }

.two-col {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ticket-detail-layout {
  align-items: start;
}

.ticket-description-card {
  display: grid;
  gap: 10px;
}

.ticket-meta-card {
  display: grid;
  gap: 16px;
  align-content: start;
}

.ticket-sidebar {
  align-self: start;
}

.ticket-sidebar-card {
  display: grid;
  gap: 20px;
  align-content: start;
}

.ticket-sidebar-section {
  display: grid;
  gap: 8px;
  align-content: start;
}

.ticket-inline-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ticket-label-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 0;
}

.attachments {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

img, video {
  max-width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
}

code {
  background: #eef3fb;
  padding: 2px 6px;
  border-radius: 6px;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 16px;
  background: #fafcff;
}

/* Buttons */
.btn-primary {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-secondary {
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: #dbeafe;
  color: #1d4ed8;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover {
  background: #bfdbfe;
}

/* Navigation */
.nav-active {
  font-weight: 600;
  color: var(--accent);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Form controls */
.input-field {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.input-field:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.select-control {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  background: var(--panel);
  cursor: pointer;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  align-items: center;
}

.filter-bar select,
.filter-bar input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
  font-size: 14px;
  background: var(--panel);
}

.search-input {
  min-width: 160px;
}

.kanban-board {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}

.kanban-column {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.kanban-column-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.kanban-column-title {
  font-size: 15px;
  font-weight: 700;
}

.kanban-column-body {
  display: grid;
  gap: 12px;
  align-content: start;
  min-height: 80px;
  border-radius: 14px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.kanban-column-body-active {
  background: rgba(36, 99, 235, 0.08);
  box-shadow: inset 0 0 0 1px rgba(36, 99, 235, 0.2);
}

.kanban-card {
  display: grid;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: #fbfcff;
  box-shadow: 0 10px 24px rgba(25, 40, 72, 0.05);
}

.kanban-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  text-decoration: none;
}

.kanban-card-dragging {
  opacity: 0.55;
  transform: rotate(1.5deg);
}

.kanban-card-title {
  line-height: 1.35;
}

.kanban-card-description {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kanban-empty {
  border: 1px dashed var(--border);
  border-radius: 14px;
  padding: 18px 12px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.7);
}
