:root {
  --bg: #f5f0e7;
  --panel: rgba(252, 248, 242, 0.94);
  --panel-strong: #fffdfa;
  --panel-soft: #f7f1e8;
  --panel-muted: rgba(247, 242, 234, 0.82);
  --ink: #1f2937;
  --muted: #667085;
  --muted-strong: #475467;
  --placeholder: #98a2b3;
  --line: rgba(99, 79, 52, 0.12);
  --line-strong: rgba(99, 79, 52, 0.22);
  --shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-sm: 0 8px 20px rgba(31, 36, 48, 0.06);
  --shadow-md: 0 20px 40px rgba(31, 36, 48, 0.1);
  --shadow: var(--shadow-md);
  --accent: #a35a32;
  --accent-dark: #7f4324;
  --accent-soft: rgba(163, 90, 50, 0.12);
  --green: #2f855a;
  --amber: #b7791f;
  --slate: #475569;
  --red: #c53030;
  --blue: #2563eb;
  --purple: #6d28d9;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 12px;
  --control-height: 44px;
  --control-height-compact: 36px;
  --font-sans: "Aptos", "Segoe UI Variable Text", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --focus-ring: rgba(163, 90, 50, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(236, 197, 161, 0.55), transparent 30%),
    radial-gradient(circle at top right, rgba(197, 222, 212, 0.6), transparent 28%),
    linear-gradient(180deg, #f8f5ee 0%, #efe7d8 100%);
}

.app-shell {
  width: min(1600px, calc(100% - 32px));
  margin: 20px auto 28px;
}

.hero,
.status-bar,
.toolbar,
.panel,
.stat-chip,
.column,
.detail-drawer {
  backdrop-filter: blur(12px);
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.94), rgba(250, 239, 223, 0.94));
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-dark);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 0.95;
}

.hero-subtitle {
  margin: 14px 0 0;
  max-width: 760px;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.button,
.toggle-button,
.search-input,
.sort-select,
.drawer-note-input {
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
}

.button {
  padding: 11px 18px;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.button:hover:not(:disabled),
.toggle-button:hover,
.ticket-link:hover,
.move-button:hover,
.list-row-button:hover,
.ticket-card-main:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: default;
  opacity: 0.5;
}

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.button-secondary {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--line);
}

.button-ghost {
  color: var(--slate);
  background: rgba(255, 255, 255, 0.35);
  border-color: rgba(71, 85, 105, 0.14);
}

.button-compact {
  padding: 9px 14px;
  font-size: 0.84rem;
}

.status-bar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.status-card,
.stat-chip,
.panel,
.column,
.toolbar,
.detail-drawer {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.status-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
}

.status-label,
.stat-chip-label,
.drawer-section-label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}

.status-label,
.stat-chip-label {
  margin-bottom: 6px;
}

.toolbar {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.toolbar-left {
  flex: 1;
  display: flex;
  gap: 10px;
  align-items: center;
}

.toolbar-right {
  display: flex;
  align-items: center;
}

.search-input,
.sort-select {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.search-input {
  width: min(520px, 100%);
  padding: 13px 18px;
}

.sort-select {
  min-width: 180px;
  padding: 13px 16px;
}

.view-toggle {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.toggle-button {
  padding: 9px 16px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.toggle-button.is-active {
  background: var(--ink);
  color: white;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

.stat-chip {
  padding: 16px 18px;
  border-radius: var(--radius-md);
}

.stat-chip strong {
  font-size: 1.4rem;
}

.panel,
.detail-drawer {
  border-radius: var(--radius-lg);
}

.panel {
  padding: 24px;
}

.empty-state,
.error-state,
.drawer-empty,
.drawer-state {
  text-align: center;
}

.workspace-shell {
  min-height: 420px;
}

.workspace,
.content-area {
  min-width: 0;
}

.list-view {
  padding: 20px;
}

.list-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}

.list-header h2,
.column-header h2,
.drawer-section h3,
.drawer-empty h2 {
  margin: 0;
}

.list-header p,
.drawer-empty p,
.drawer-subtitle,
.drawer-note-status,
.drawer-description,
.list-support,
.list-secondary,
.empty-column {
  color: var(--muted);
}

.list-header p {
  margin: 6px 0 0;
}

.list-columns {
  display: grid;
  grid-template-columns: minmax(280px, 2.2fr) minmax(220px, 1.7fr) minmax(220px, 1.6fr) minmax(180px, 1.2fr);
  gap: 14px;
  padding: 0 14px 8px;
  color: var(--muted);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

.list-row,
.ticket-card {
  border: 1px solid rgba(83, 70, 49, 0.1);
  background: var(--panel-strong);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(71, 52, 23, 0.08);
}

.list-row {
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.list-row.is-selected {
  border-color: rgba(181, 93, 50, 0.5);
  box-shadow: 0 18px 40px rgba(181, 93, 50, 0.12);
  background: linear-gradient(135deg, rgba(255, 250, 242, 0.98), rgba(255, 247, 236, 0.94));
}

.list-row-button {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(280px, 2.2fr) minmax(220px, 1.7fr) minmax(220px, 1.6fr) minmax(180px, 1.2fr);
  gap: 14px;
  text-align: left;
  cursor: pointer;
}

.list-cell {
  min-width: 0;
}

.ticket-primary {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.row-topline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.ticket-id,
.ticket-age,
.drawer-kicker {
  color: var(--muted);
  font-size: 0.78rem;
}

.ticket-bucket {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(181, 93, 50, 0.12);
  color: var(--accent-dark);
  font-size: 0.74rem;
  font-weight: 700;
}

.list-title,
.ticket-title {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.35;
}

.ticket-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-support,
.list-secondary,
.ticket-snippet {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.list-support strong,
.list-secondary strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.list-secondary {
  overflow-wrap: break-word;
  word-break: break-word;
}

.status-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
  justify-content: space-between;
}

.list-updated {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.board-view {
  display: flex;
  gap: 16px;
  align-items: start;
  overflow-x: auto;
  padding-bottom: 8px;
}

.column {
  flex: 0 0 280px;
  min-height: 420px;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.column-header {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 10px;
  padding: 18px 18px 16px;
  background: rgba(255, 252, 247, 0.82);
  border-bottom: 1px solid var(--line);
}

.column-header h2 {
  flex: 1;
  font-size: 0.95rem;
  min-width: 0;
}

.column-collapse-toggle {
  width: 24px;
  min-width: 24px;
  height: 24px;
  border: 1px solid rgba(99, 79, 52, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted-strong);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.column-count {
  min-width: 32px;
  padding: 5px 10px;
  border-radius: 999px;
  text-align: center;
  background: rgba(181, 93, 50, 0.12);
  color: var(--accent-dark);
  font-weight: 700;
}

.column-body {
  flex: 1;
  min-height: 340px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.column-body.is-drag-over {
  background: rgba(243, 244, 246, 0.72);
}

.ticket-card {
  padding: 12px;
  cursor: grab;
}

.ticket-card.is-dragging {
  opacity: 0.96;
  z-index: 12;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  cursor: grabbing;
}

.ticket-drop-placeholder {
  min-height: 92px;
  border: 2px dashed #d1d5db;
  border-radius: 16px;
  background: rgba(243, 244, 246, 0.84);
}

.ticket-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.ticket-meta,
.ticket-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ticket-meta {
  align-items: start;
}

.ticket-meta > div:first-child {
  min-width: 0;
}

.ticket-snippet {
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-footer {
  align-items: end;
}

.badges,
.quick-actions,
.drawer-actions,
.drawer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.drawer-actions {
  flex-shrink: 0;
}

.badges {
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-status-open {
  color: var(--blue);
  background: rgba(37, 99, 235, 0.12);
}

.badge-status-progress {
  color: var(--amber);
  background: rgba(183, 121, 31, 0.14);
}

.badge-status-pending {
  color: var(--purple);
  background: rgba(109, 40, 217, 0.12);
}

.badge-status-closed {
  color: var(--green);
  background: rgba(47, 133, 90, 0.12);
}

.badge-priority-high {
  color: var(--red);
  background: rgba(197, 48, 48, 0.14);
}

.badge-priority-medium {
  color: var(--amber);
  background: rgba(183, 121, 31, 0.14);
}

.badge-priority-low {
  color: var(--green);
  background: rgba(47, 133, 90, 0.14);
}

.badge-cloud-access {
  color: #0e7490;
  background: rgba(14, 116, 144, 0.14);
}

.badge-cloud-type {
  color: #7c2d12;
  background: rgba(124, 45, 18, 0.12);
}

.move-button,
.ticket-link {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  text-decoration: none;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.move-button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--slate);
  cursor: pointer;
}

.move-button.is-active {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
}

.ticket-link {
  border: 1px solid rgba(37, 99, 235, 0.18);
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
}

.empty-column {
  padding: 28px 18px;
  border: 2px dashed rgba(83, 70, 49, 0.12);
  border-radius: 18px;
  text-align: center;
}

.drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(31, 36, 48, 0.38);
  backdrop-filter: blur(3px);
  z-index: 40;
}

.drawer-backdrop.is-open {
  display: block;
}

.detail-drawer {
  position: fixed;
  top: 16px;
  right: 16px;
  bottom: 16px;
  width: min(460px, calc(100vw - 24px));
  padding: 18px;
  overflow-y: auto;
  z-index: 50;
}

.detail-drawer.is-open {
  display: block;
}

.drawer-empty,
.drawer-state {
  padding: 32px 16px;
}

.drawer-state-error {
  color: var(--red);
}

.drawer-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
}

.drawer-header > div:first-child {
  min-width: 0;
}

.drawer-header h2 {
  margin: 6px 0 0;
  font-size: 1.3rem;
  line-height: 1.2;
  overflow-wrap: break-word;
  word-break: break-word;
}

.drawer-kicker {
  margin: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-subtitle {
  margin: 8px 0 0;
  line-height: 1.45;
}

.drawer-badges {
  margin-top: 16px;
}

.drawer-accordion {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-soft);
  overflow: hidden;
}

.drawer-accordion.is-open {
  border-color: rgba(181, 93, 50, 0.22);
}

.drawer-section-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.drawer-section-toggle:hover {
  background: rgba(255, 255, 255, 0.35);
}

.drawer-section-toggle span:first-child {
  font-weight: 700;
}

.drawer-section-toggle::after {
  content: "+";
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
}

.drawer-accordion.is-open .drawer-section-toggle::after {
  content: "-";
}

.drawer-section-body {
  padding: 0 18px 18px;
}

.drawer-headline,
.drawer-narrative {
  margin: 10px 0 0;
  line-height: 1.5;
}

.drawer-headline {
  font-weight: 700;
}

.signal-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.signal-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.signal-item strong {
  font-size: 0.82rem;
}

.signal-item span {
  color: var(--muted);
  text-align: right;
  font-size: 0.86rem;
}

.drawer-note-input {
  width: 100%;
  min-height: 160px;
  padding: 16px;
  resize: vertical;
  border-radius: 18px;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
}

.drawer-todo-input {
  min-height: 120px;
}

.drawer-entry-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.drawer-entry-toolbar .button {
  flex-shrink: 0;
}

.drawer-summary-toolbar {
  align-items: flex-start;
}

.drawer-reply-builder {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 242, 234, 0.92));
  box-shadow: var(--shadow-xs);
}

.drawer-recipient-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.56);
}

.drawer-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--ink);
  cursor: pointer;
}

.drawer-checkbox input {
  margin: 0;
  accent-color: var(--blue);
}

.drawer-checkbox input:disabled {
  cursor: default;
}

.drawer-recipient-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-recipient-card {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.drawer-recipient-label {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.drawer-recipient-values {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.drawer-recipient-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: var(--slate);
  font-size: 0.8rem;
  line-height: 1.35;
}

.drawer-recipient-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.drawer-zoho-sync {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.drawer-reply-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  gap: 12px;
  align-items: end;
}

.drawer-zoho-toolbar {
  grid-template-columns: minmax(0, 1fr) minmax(0, 220px);
}

.drawer-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.drawer-field-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
}

.drawer-tone-field {
  max-width: 220px;
}

.drawer-tone-select {
  width: 100%;
  min-height: var(--control-height);
  padding: 0 14px;
  border: 1px solid rgba(99, 79, 52, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  font: inherit;
}

.drawer-reply-instruction {
  min-height: 112px;
}

.drawer-reply-builder .drawer-field {
  gap: 9px;
}

.drawer-reply-builder .drawer-field-label {
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.7rem;
}

.drawer-reply-builder .drawer-note-input {
  min-height: 112px;
  padding: 14px 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
}

.drawer-reply-builder .drawer-entry-toolbar {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.drawer-reply-builder .drawer-note-status {
  color: var(--muted-strong);
}

.drawer-note-status.is-error {
  color: var(--red);
}

.drawer-note-status.is-success {
  color: var(--green);
}

.drawer-entry-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cloud-access-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

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

.cloud-access-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-top: 12px;
}

.cloud-access-plan {
  margin: 10px 0 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 252, 247, 0.78);
  font-size: 0.84rem;
  line-height: 1.55;
}

.cloud-access-plan strong {
  display: block;
  margin-bottom: 4px;
}

.cloud-access-recovery {
  color: var(--amber);
}

.inline-form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.modal-shell {
  position: fixed;
  inset: 0;
  z-index: 60;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 24, 40, 0.45);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: min(960px, calc(100% - 36px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  margin: 20px auto;
  padding: 20px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 252, 247, 0.97);
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

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

.modal-checkbox-row {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.modal-footer {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.drawer-entry-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.42);
}

.workspace-entry-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: rgba(255, 255, 255, 0.84);
}

.workspace-entry-card-editor {
  border-color: rgba(163, 90, 50, 0.22);
  background: rgba(255, 250, 242, 0.9);
}

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

.workspace-entry-timestamp {
  color: var(--muted);
  font-size: 0.78rem;
}

.workspace-entry-actions,
.workspace-entry-button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.workspace-entry-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
}

.workspace-entry-action.is-danger {
  color: var(--red);
}

.workspace-entry-action:disabled {
  cursor: default;
  opacity: 0.45;
}

.workspace-entry-content {
  margin: 0;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.workspace-entry-input {
  min-height: 120px;
}

.reply-draft-card {
  border-color: rgba(37, 99, 235, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 249, 255, 0.96));
}

.reply-draft-card-header {
  align-items: flex-start;
  margin-bottom: 12px;
}

.reply-draft-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.reply-draft-instruction {
  margin: 0 0 14px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(99, 79, 52, 0.08);
  background: rgba(248, 242, 234, 0.68);
  color: var(--muted);
  line-height: 1.5;
}

.reply-draft-instruction strong {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.reply-draft-card .workspace-entry-content {
  padding: 0 2px;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.7;
}

.reply-draft-editor textarea {
  min-height: 190px;
}

.drawer-note-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.drawer-note-status {
  font-size: 0.82rem;
}

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

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

.category-editor-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.category-editor-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
}

.detail-item {
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-soft);
}

.detail-item dt {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-item dd {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}

.drawer-description {
  margin: 16px 0 0;
  line-height: 1.55;
}

.auto-refresh-countdown {
  display: block;
  margin-top: 4px;
  font-size: 0.76rem;
  color: var(--muted);
}

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 0;
}

.filter-chip {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--slate);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  background: var(--ink);
  border-color: transparent;
  color: white;
}

.ticket-card.is-new {
  outline: 2px solid rgba(181, 93, 50, 0.4);
  outline-offset: -1px;
}

.list-row.is-new {
  border-left: 3px solid var(--accent);
}

@media (max-width: 1400px) {
  .list-columns,
  .list-row-button {
    grid-template-columns: minmax(240px, 2fr) minmax(200px, 1.5fr) minmax(200px, 1.4fr) minmax(160px, 1.1fr);
  }
}

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero,
  .toolbar,
  .status-bar,
  .drawer-header,
  .drawer-note-actions,
  .drawer-entry-toolbar,
  .drawer-reply-toolbar,
  .workspace-entry-header {
    flex-direction: column;
    align-items: stretch;
  }

  .status-bar {
    grid-template-columns: 1fr;
  }

  .toolbar-left {
    flex-direction: column;
    align-items: stretch;
  }

  .search-input,
  .sort-select {
    width: 100%;
  }

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

  .list-columns {
    display: none;
  }

  .list-row-button {
    grid-template-columns: 1fr;
  }

  .drawer-reply-toolbar {
    grid-template-columns: 1fr;
  }

  .drawer-tone-field {
    max-width: none;
  }

  .cloud-access-grid,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .modal-header,
  .modal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .status-stack {
    align-items: flex-start;
  }

  .detail-grid,
  .category-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 20px, 100%);
    margin: 10px auto 22px;
  }

  .hero {
    padding: 22px;
  }

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

  .panel,
  .detail-drawer {
    padding: 18px;
  }

  .detail-drawer {
    top: 10px;
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }
}

/* Calm refinement overrides */

html {
  background: var(--bg);
}

body {
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(236, 197, 161, 0.14), transparent 28%),
    radial-gradient(circle at top right, rgba(197, 222, 212, 0.16), transparent 24%),
    linear-gradient(180deg, #faf7f1 0%, #f1eadf 100%);
}

.app-shell {
  width: min(1480px, calc(100% - 28px));
  margin: 16px auto 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  isolation: isolate;
  overflow: visible;
}

.hero,
.status-bar,
.toolbar,
.panel,
.stat-chip,
.column,
.detail-drawer {
  backdrop-filter: none;
}

.hero {
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255, 251, 245, 0.96), rgba(248, 238, 223, 0.92));
  box-shadow: var(--shadow-md);
}

.hero h1 {
  text-wrap: balance;
}

body.is-connected .hero {
  align-items: center;
  padding: 18px 22px;
  border-radius: 20px;
  background: rgba(255, 250, 243, 0.94);
  box-shadow: var(--shadow-sm);
}

body.is-connected .eyebrow,
body.is-connected .hero-subtitle {
  display: none;
}

body.is-connected .hero h1 {
  font-size: clamp(1.55rem, 2vw, 2rem);
  line-height: 1.05;
}

.summary-panel {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(251, 248, 242, 0.95);
  box-shadow: var(--shadow-sm);
}

.summary-top {
  display: grid;
  grid-template-columns: minmax(280px, 1.15fr) minmax(0, 1.85fr);
  gap: 14px;
  align-items: stretch;
}

.status-bar {
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(247, 241, 232, 0.58));
}

.stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 8px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(247, 241, 232, 0.58));
}

.status-card,
.stat-chip,
.column,
.panel,
.toolbar {
  box-shadow: none;
}

.status-card strong,
.stat-chip strong,
.list-updated,
.ticket-age,
.ticket-id {
  font-variant-numeric: tabular-nums;
}

.status-label,
.stat-chip-label,
.drawer-section-label,
.toolbar-label {
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 700;
}

.status-label,
.stat-chip-label,
.toolbar-label {
  color: var(--muted);
}

.status-bar .status-card {
  min-height: 82px;
  padding: 13px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 16px;
  border: 1px solid rgba(99, 79, 52, 0.09);
  background: rgba(255, 255, 255, 0.72);
}

.status-bar .status-label {
  margin-bottom: 10px;
}

.status-bar .status-card strong {
  font-size: 1rem;
  line-height: 1.3;
  font-weight: 650;
}

#stats-grid .stat-chip {
  min-height: 94px;
  padding: 14px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 18px;
  border: 1px solid rgba(99, 79, 52, 0.09);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 245, 238, 0.96));
  box-shadow: var(--shadow-xs);
}

#stats-grid .stat-chip-label {
  margin-bottom: 0;
  letter-spacing: 0.08em;
  font-size: 0.68rem;
}

#stats-grid .stat-chip strong {
  margin-top: 10px;
  font-size: clamp(1.55rem, 2.2vw, 1.95rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 720;
}

#stats-grid .stat-chip:first-child {
  border-color: rgba(163, 90, 50, 0.16);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(250, 241, 231, 0.98));
  box-shadow: 0 10px 22px rgba(163, 90, 50, 0.08);
}

#stats-grid .stat-chip:first-child .stat-chip-label {
  color: var(--accent-dark);
}

#stats-grid .stat-chip:first-child strong {
  font-size: clamp(1.95rem, 3vw, 2.35rem);
}

.toolbar {
  margin: 0;
  padding: 12px 0 10px;
  border: 0;
  background: rgba(245, 240, 231, 0.92);
  backdrop-filter: blur(12px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: end;
  position: sticky;
  top: 0;
  z-index: 20;
}

.toolbar-left {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(170px, 220px);
  gap: 12px;
  align-items: end;
}

.toolbar-right {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px 12px;
}

.toolbar-field {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-field {
  flex: 1;
  max-width: 520px;
}

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

.search-input,
.sort-select,
.drawer-note-input,
.drawer-tone-select {
  border-color: rgba(99, 79, 52, 0.14);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-xs);
  color: var(--ink);
}

.search-input,
.sort-select {
  min-height: var(--control-height);
  width: 100%;
  border-radius: var(--radius-md);
  padding-inline: 14px;
}

.search-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.ticket-search-tray {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(99, 79, 52, 0.14);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow-xs);
}

.ticket-search-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.ticket-search-status.is-error {
  color: var(--danger);
}

.ticket-search-results {
  display: grid;
  gap: 8px;
}

.ticket-search-result {
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(99, 79, 52, 0.14);
  border-radius: var(--radius-md);
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ticket-search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: var(--shadow-xs);
}

.ticket-search-result.is-selected {
  border-color: rgba(37, 99, 235, 0.36);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.ticket-search-result-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ticket-search-result-id {
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.ticket-search-result-title {
  font-weight: 600;
  color: var(--ink);
}

.ticket-search-result-meta {
  color: var(--muted);
  font-size: 0.88rem;
}

.view-toggle {
  padding: 3px;
  background: #fff;
  border-color: var(--line);
  box-shadow: var(--shadow-xs);
  border-radius: 999px;
}

.toggle-button,
.filter-chip {
  min-height: 38px;
  font-weight: 600;
}

.toggle-button.is-active {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: white;
}

.filter-chips {
  margin: 0;
  gap: 6px;
}

.filter-chip {
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted-strong);
  border-color: rgba(99, 79, 52, 0.12);
  box-shadow: var(--shadow-xs);
}

.filter-chip:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.filter-chip.is-active {
  background: rgba(163, 90, 50, 0.12);
  border-color: rgba(163, 90, 50, 0.28);
  color: var(--accent-dark);
}

.button,
.toggle-button,
.filter-chip,
.search-input,
.sort-select,
.drawer-note-input,
.drawer-tone-select,
.list-row-button,
.ticket-card-main,
.drawer-section-toggle,
.move-button,
.ticket-link {
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
  touch-action: manipulation;
}

.button {
  min-height: var(--control-height);
  border-radius: 999px;
}

.toggle-button,
.filter-chip {
  border-radius: 999px;
}

.move-button,
.ticket-link {
  min-height: var(--control-height-compact);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  font-weight: 650;
  letter-spacing: 0.01em;
  border-color: transparent;
  box-shadow: var(--shadow-xs);
}

.button.button-compact {
  min-height: var(--control-height-compact);
  padding-inline: 13px;
  font-size: 0.82rem;
}

.button-primary {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
}

.button-secondary {
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  border-color: rgba(99, 79, 52, 0.12);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted-strong);
  border-color: rgba(99, 79, 52, 0.1);
  box-shadow: none;
}

.button:hover:not(:disabled),
.ticket-link:hover,
.move-button:hover {
  box-shadow: var(--shadow-sm);
}

.button-secondary:hover:not(:disabled),
.button-ghost:hover:not(:disabled) {
  background: #fff;
}

.button:disabled {
  opacity: 0.55;
  box-shadow: none;
}

.button:hover:not(:disabled),
.ticket-link:hover,
.move-button:hover {
  transform: translateY(-1px);
}

.toggle-button:hover,
.list-row-button:hover,
.ticket-card-main:hover,
.filter-chip:hover {
  transform: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(163, 90, 50, 0.42);
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.list-row-button:focus-visible,
.ticket-card-main:focus-visible,
.drawer-section-toggle:focus-visible {
  box-shadow: 0 0 0 3px var(--focus-ring);
}

.panel {
  padding: 20px;
  background: rgba(251, 248, 242, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  box-shadow: var(--shadow-sm);
}

.list-view {
  padding: 18px;
}

.list-header {
  margin-bottom: 12px;
}

.list-columns {
  padding: 0 12px 6px;
  font-size: 0.72rem;
}

.list-row,
.ticket-card {
  border-radius: 16px;
  background: var(--panel-strong);
  border: 1px solid rgba(99, 79, 52, 0.1);
  box-shadow: var(--shadow-xs);
}

.list-row.is-selected,
.ticket-card.is-selected {
  border-color: rgba(163, 90, 50, 0.24);
  background: #fff9f2;
  box-shadow:
    var(--shadow-xs),
    0 0 0 1px rgba(163, 90, 50, 0.08);
}

.list-row-button {
  padding: 12px;
  gap: 12px;
}

.row-topline {
  gap: 6px;
}

.ticket-bucket {
  padding: 3px 8px;
  font-size: 0.7rem;
  background: rgba(168, 92, 51, 0.1);
}

.list-title,
.ticket-title {
  font-size: 0.94rem;
  line-height: 1.35;
}

.list-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.list-support,
.list-secondary,
.ticket-snippet,
.list-updated,
.ticket-age {
  font-size: 0.82rem;
  line-height: 1.45;
}

.list-support strong,
.list-secondary strong {
  font-size: 0.84rem;
}

.badges {
  gap: 6px;
  justify-content: flex-end;
}

.badge {
  padding: 4px 8px;
  border: 1px solid rgba(99, 79, 52, 0.12);
  background: rgba(255, 255, 255, 0.88);
  color: var(--muted-strong);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
}

.badge-neutral,
.badge-status-open,
.badge-status-progress,
.badge-status-pending,
.badge-status-closed,
.badge-priority-medium,
.badge-priority-low,
.badge-cloud-access,
.badge-cloud-type {
  color: var(--muted-strong);
  background: rgba(255, 255, 255, 0.88);
}

.badge-overflow {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
}

.badge-status-open {
  color: #175cd3;
  background: rgba(23, 92, 211, 0.1);
  border-color: rgba(23, 92, 211, 0.16);
}

.badge-status-progress,
.badge-priority-medium {
  color: #9a6700;
  background: rgba(183, 121, 31, 0.12);
  border-color: rgba(183, 121, 31, 0.16);
}

.badge-status-pending {
  color: #7a3db8;
  background: rgba(122, 61, 184, 0.1);
  border-color: rgba(122, 61, 184, 0.14);
}

.badge-status-closed,
.badge-priority-low {
  color: #027a48;
  background: rgba(2, 122, 72, 0.1);
  border-color: rgba(2, 122, 72, 0.14);
}

.badge-cloud-access {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
  border-color: rgba(15, 118, 110, 0.14);
}

.badge-cloud-type {
  color: #9a3412;
  background: rgba(154, 52, 18, 0.1);
  border-color: rgba(154, 52, 18, 0.14);
}

.badge-overdue,
.badge-priority-high {
  color: #b42318;
  background: rgba(180, 35, 24, 0.1);
  border-color: rgba(180, 35, 24, 0.14);
}

.board-view {
  gap: 16px;
}

.column {
  width: 280px;
  min-height: 400px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(251, 248, 242, 0.96), rgba(245, 239, 231, 0.92));
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(99, 79, 52, 0.08);
}

.column-header {
  padding: 16px 16px 14px;
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.9), rgba(250, 244, 236, 0.84));
  border-bottom: 1px solid rgba(99, 79, 52, 0.08);
  align-items: center;
}

.column-body {
  min-height: 320px;
  padding: 12px;
  gap: 12px;
}

.column.is-collapsed {
  flex-basis: 60px;
  width: 60px;
}

.column.is-collapsed .column-header {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 6px;
}

.column.is-collapsed .column-header h2 {
  order: 2;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0;
  margin: 0;
  transform: rotate(-90deg);
  transform-origin: center;
  white-space: nowrap;
  font-size: 0.82rem;
}

.column.is-collapsed .column-count {
  order: 1;
}

.column.is-collapsed .column-collapse-toggle {
  order: 3;
  margin-top: auto;
}

.column.is-collapsed .column-body {
  min-height: 220px;
  padding: 8px 6px 10px;
}

.column.is-collapsed .column-body > :not(.ticket-drop-placeholder) {
  display: none;
}

.column-count {
  min-width: 36px;
  padding: 6px 10px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--shadow-xs);
  font-size: 0.78rem;
}

.board-view .ticket-card {
  position: relative;
  padding: 12px;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(255, 255, 255, 0.96);
  border-color: rgba(99, 79, 52, 0.08);
  box-shadow: var(--shadow-xs);
  transition: background 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.board-view .ticket-card:hover {
  background: #f9fafb;
  box-shadow: var(--shadow-sm);
}

.board-view .ticket-card.is-dragging,
.board-view .ticket-card.is-dragging:hover {
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.board-view .ticket-card.is-overdue {
  border-left: 4px solid #ef4444;
}

.board-view .ticket-card.is-selected {
  box-shadow:
    0 12px 24px rgba(163, 90, 50, 0.08),
    0 0 0 1px rgba(163, 90, 50, 0.1);
}

.board-view .ticket-card-main {
  display: grid;
  gap: 8px;
}

.ticket-card-header {
  display: grid;
  gap: 6px;
  padding-right: 0;
}

.ticket-card-title-group {
  display: grid;
  gap: 0;
  min-width: 0;
}

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

.ticket-card-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(163, 90, 50, 0.08);
  color: var(--accent-dark);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.board-view .ticket-title {
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 700;
}

.ticket-card-metadata,
.ticket-card-status-line,
.ticket-card-summary {
  margin: 0;
}

.ticket-card-metadata {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.35;
}

.ticket-card-summary {
  color: var(--muted-strong);
  font-size: 0.82rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ticket-card-status-line {
  color: #4b5563;
  font-size: 0.76rem;
  line-height: 1.35;
}

.board-view .ticket-card.priority-high .ticket-id {
  color: var(--amber);
  font-weight: 700;
}

.ticket-link-icon {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  width: 28px;
  min-height: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.ticket-link-icon-svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ticket-snippet {
  margin-bottom: 10px;
}

.empty-column {
  min-height: 160px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  color: #6b7280;
  background: rgba(255, 255, 255, 0.35);
}

.empty-column-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.column-body.is-drag-over .empty-column {
  display: none;
}

.workspace-shell {
  min-height: 0;
}

.drawer-backdrop {
  background: rgba(31, 36, 48, 0.26);
  backdrop-filter: blur(2px);
}

.detail-drawer {
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(430px, calc(100vw - 24px));
  padding: 16px;
  background: linear-gradient(180deg, rgba(252, 249, 243, 0.99), rgba(247, 241, 233, 0.98));
  box-shadow: 0 28px 56px rgba(31, 36, 48, 0.16);
  border-radius: 24px;
  border: 1px solid rgba(99, 79, 52, 0.12);
}

#drawer-content {
  display: grid;
  gap: 14px;
}

.drawer-empty,
.drawer-state {
  padding: 28px 18px;
  border: 1px dashed rgba(99, 79, 52, 0.16);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.6);
}

.drawer-state-error {
  border-style: solid;
  background: rgba(180, 35, 24, 0.06);
}

.drawer-header {
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(99, 79, 52, 0.09);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 243, 235, 0.94));
  box-shadow: var(--shadow-xs);
}

.drawer-header > div:first-child {
  display: grid;
  gap: 8px;
}

.drawer-header h2 {
  margin: 0;
  font-size: 1.36rem;
  line-height: 1.16;
  letter-spacing: -0.02em;
}

.drawer-kicker {
  color: var(--accent-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.drawer-subtitle {
  margin: 0;
  color: var(--muted-strong);
  font-size: 0.88rem;
  line-height: 1.5;
}

.drawer-actions {
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

.drawer-badges {
  justify-content: flex-start;
  margin-top: 0;
  gap: 8px;
  padding: 0 2px;
}

.drawer-accordion {
  margin-top: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(99, 79, 52, 0.1);
  box-shadow: var(--shadow-xs);
}

.drawer-accordion.is-open {
  border-color: rgba(163, 90, 50, 0.18);
  box-shadow: 0 10px 24px rgba(31, 36, 48, 0.06);
}

.drawer-accordion-secondary {
  background: linear-gradient(180deg, rgba(248, 243, 235, 0.88), rgba(244, 238, 229, 0.84));
}

.drawer-section-toggle {
  min-height: 60px;
  padding: 15px 16px;
  align-items: flex-start;
}

.drawer-section-toggle:hover {
  background: rgba(255, 255, 255, 0.38);
}

.drawer-section-toggle span:first-child {
  font-size: 0.95rem;
  line-height: 1.2;
}

.drawer-section-label {
  max-width: 170px;
  text-align: right;
  line-height: 1.35;
}

.drawer-section-toggle::after {
  margin-top: 1px;
  font-size: 1rem;
}

.drawer-section-body {
  padding: 0 16px 16px;
  border-top: 1px solid rgba(99, 79, 52, 0.08);
}

.detail-drawer .drawer-note-status {
  color: var(--muted);
  line-height: 1.45;
}

.drawer-entry-toolbar {
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(99, 79, 52, 0.08);
}

.drawer-summary-toolbar {
  align-items: flex-start;
}

.signal-item,
.cloud-access-card,
.workspace-entry-card,
.drawer-recipient-card,
.drawer-entry-empty,
.cloud-access-plan {
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 236, 0.94));
  border: 1px solid rgba(99, 79, 52, 0.1);
  box-shadow: var(--shadow-xs);
}

.drawer-headline {
  margin-top: 0;
  font-size: 0.98rem;
  line-height: 1.45;
}

.drawer-narrative {
  margin-top: 8px;
  color: var(--muted-strong);
  font-size: 0.84rem;
}

.signal-list {
  gap: 8px;
  margin-top: 12px;
}

.signal-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  padding: 13px 14px;
}

.signal-item strong {
  display: block;
  font-size: 0.8rem;
  line-height: 1.35;
}

.signal-item span {
  font-size: 0.8rem;
}

.detail-grid {
  gap: 10px;
  margin: 16px 0 0;
}

.category-editor-grid {
  gap: 10px;
  margin: 16px 0 0;
}

.category-editor-field {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 236, 0.92));
  box-shadow: var(--shadow-xs);
}

.category-editor-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-item {
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 236, 0.92));
  box-shadow: var(--shadow-xs);
}

.detail-item dt {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.detail-item dd {
  font-size: 0.84rem;
  line-height: 1.42;
}

.drawer-description {
  margin: 14px 0 0;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted-strong);
  box-shadow: var(--shadow-xs);
}

.drawer-description-editor {
  margin: 12px 0 0;
}

.drawer-description-input {
  max-width: none;
}

.drawer-description-editor .quick-actions {
  justify-content: flex-end;
}

.category-suggestion-panel {
  margin-top: 14px;
}

.category-suggestion-card,
.category-suggestion-empty {
  border-radius: 16px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 243, 236, 0.94));
  box-shadow: var(--shadow-xs);
}

.category-suggestion-card {
  padding: 14px;
}

.category-suggestion-empty {
  padding: 14px;
  color: var(--muted-strong);
}

.category-suggestion-empty.is-error {
  color: var(--red);
}

.category-suggestion-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.category-suggestion-kicker,
.category-suggestion-note,
.category-suggestion-columns,
.category-suggestion-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-suggestion-kicker,
.category-suggestion-columns,
.category-suggestion-label {
  color: var(--muted);
}

.category-suggestion-status,
.category-suggestion-rationale {
  margin: 4px 0 0;
  color: var(--muted-strong);
  line-height: 1.45;
}

.category-suggestion-note {
  flex-shrink: 0;
  padding: 5px 9px;
  border-radius: 999px;
  color: var(--accent-dark);
  background: rgba(236, 197, 161, 0.22);
}

.category-suggestion-columns,
.category-suggestion-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.category-suggestion-columns {
  padding: 12px 0 7px;
}

.category-suggestion-grid {
  display: grid;
  gap: 8px;
}

.category-suggestion-row {
  padding: 10px 11px;
  border: 1px solid rgba(99, 79, 52, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.category-suggestion-row.is-different {
  border-color: rgba(163, 90, 50, 0.18);
  background: rgba(255, 247, 237, 0.78);
}

.category-suggestion-current,
.category-suggestion-value {
  color: var(--ink);
  overflow-wrap: break-word;
}

.category-suggestion-current {
  color: var(--muted-strong);
}

.category-suggestion-warnings {
  margin: 12px 0 0;
  padding-left: 18px;
  color: var(--muted-strong);
  line-height: 1.45;
}

@media (max-width: 760px) {
  .category-suggestion-columns {
    display: none;
  }

  .category-suggestion-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

.drawer-recipient-preview,
.drawer-zoho-sync {
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-xs);
}

.drawer-zoho-sync {
  padding-top: 14px;
  border-top: 0;
  gap: 14px;
  background: linear-gradient(180deg, rgba(247, 242, 234, 0.74), rgba(255, 255, 255, 0.84));
}

.drawer-recipient-preview {
  background: linear-gradient(180deg, rgba(245, 249, 255, 0.74), rgba(255, 255, 255, 0.84));
}

.drawer-recipient-preview .drawer-entry-toolbar,
.drawer-zoho-sync .drawer-entry-toolbar {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.drawer-recipient-preview .drawer-note-status,
.drawer-zoho-sync .drawer-note-status {
  color: var(--muted-strong);
}

.drawer-entry-toolbar {
  gap: 10px;
}

.quick-actions {
  gap: 8px;
}

.move-button,
.ticket-link {
  border-radius: 12px;
  padding: 6px 10px;
  font-size: 0.74rem;
}

.move-button.is-active {
  background: rgba(163, 90, 50, 0.12);
  color: var(--accent-dark);
  border-color: rgba(163, 90, 50, 0.26);
}

.detail-item dd,
.drawer-description,
.workspace-entry-content {
  overflow-wrap: break-word;
  word-break: break-word;
}

.search-input::placeholder,
.drawer-note-input::placeholder,
.drawer-tone-select::placeholder {
  color: var(--placeholder);
}

.search-input:disabled,
.sort-select:disabled,
.drawer-note-input:disabled,
.drawer-tone-select:disabled,
.button:disabled,
.toggle-button:disabled,
.filter-chip:disabled {
  background: rgba(249, 247, 242, 0.92);
  color: var(--muted);
}

input[readonly],
textarea[readonly],
select[disabled],
input:disabled,
textarea:disabled {
  cursor: default;
}

.modal-card {
  background: rgba(255, 251, 245, 0.98);
  box-shadow: 0 18px 34px rgba(31, 36, 48, 0.14);
}

@media (max-width: 1200px) {
  .summary-top {
    grid-template-columns: 1fr;
  }

  .status-bar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .toolbar-right {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .summary-panel {
    padding: 14px;
  }

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

  .toolbar-left {
    grid-template-columns: 1fr;
  }

  .toolbar-right {
    align-items: stretch;
  }

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

  .drawer-section-label {
    max-width: none;
    text-align: left;
  }

  .drawer-reply-builder {
    padding: 13px;
  }

  .filter-chips,
  .view-toggle {
    width: 100%;
  }

  .view-toggle {
    justify-content: space-between;
  }

  .toggle-button {
    flex: 1;
  }
}

@media (max-width: 640px) {
  .app-shell {
    width: min(100% - 16px, 100%);
    margin: 10px auto 20px;
  }

  .hero {
    padding: 18px;
  }

  body.is-connected .hero {
    padding: 16px 18px;
  }

  .summary-panel {
    padding: 12px;
  }

  .status-bar {
    grid-template-columns: 1fr;
    padding: 6px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6px;
  }

  .status-bar .status-card,
  #stats-grid .stat-chip {
    min-height: 0;
  }

  #stats-grid .stat-chip:first-child strong {
    font-size: 2rem;
  }

  .detail-drawer {
    top: 8px;
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    padding: 14px;
  }

  .drawer-header {
    padding: 14px;
  }

  .drawer-header h2 {
    font-size: 1.22rem;
  }

  #drawer-content {
    gap: 12px;
  }

  .drawer-reply-toolbar,
  .drawer-zoho-toolbar {
    grid-template-columns: 1fr;
  }

  .drawer-tone-field {
    max-width: none;
  }
}

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

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

[hidden] {
  display: none !important;
}

.top-nav,
.utility-bar {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.top-nav {
  display: flex;
  position: relative;
  z-index: 100;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-radius: 20px;
  overflow: visible;
}

.top-nav-brand h1 {
  margin: 0;
  font-size: 1.4rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.top-nav-actions {
  display: flex;
  position: relative;
  z-index: 110;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  overflow: visible;
}

.search-pill-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-dropdown {
  position: relative;
  z-index: 1000;
  flex-shrink: 0;
  overflow: visible;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(99, 79, 52, 0.1);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-xs);
}

.profile-pill-refresh {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.profile-pill-label {
  color: var(--muted);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-pill-value {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 0.74rem;
  color: var(--ink);
}

.profile-pill-value .auto-refresh-countdown {
  display: inline-flex;
  margin-top: 0;
  font-size: 0.66rem;
  color: var(--muted);
  white-space: nowrap;
}

.profile-pill-refresh-icon {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--muted);
}

.profile-refresh-button {
  width: 24px;
  height: 24px;
  min-height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  color: #2563eb;
  cursor: pointer;
  flex-shrink: 0;
}

.profile-refresh-button:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.14);
}

.profile-refresh-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.profile-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 0 0 0 12px;
  border: 0;
  border-left: 1px solid rgba(99, 79, 52, 0.1);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.profile-menu-trigger:disabled {
  cursor: default;
}

.profile-name {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(163, 90, 50, 0.12);
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1001;
  display: grid;
  gap: 6px;
  min-width: 220px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid rgba(99, 79, 52, 0.12);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 18px 32px rgba(31, 36, 48, 0.12);
}

.profile-menu-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 4px 8px;
  color: var(--muted-strong);
  font-size: 0.82rem;
}

.profile-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.profile-menu-button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.84rem;
  text-align: left;
}

.profile-menu-button:hover:not(:disabled) {
  background: rgba(37, 99, 235, 0.06);
}

.profile-menu-button:disabled {
  cursor: default;
  opacity: 0.45;
}

.profile-menu-button-danger {
  color: #b42318;
}

.summary-panel {
  display: block;
  position: relative;
  z-index: 10;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.utility-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  margin-bottom: 8px;
  border-radius: var(--radius-md);
  flex-wrap: wrap;
  position: relative;
  z-index: 10;
}

.utility-group {
  position: relative;
}

.utility-group + .utility-group {
  padding-left: 12px;
}

.utility-group + .utility-group::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: rgba(99, 79, 52, 0.12);
}

.utility-bar .stats-grid {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  padding: 2px 4px 2px 0;
  position: relative;
  z-index: 10;
}

#stats-grid .stat-chip,
#stats-grid .stat-chip:first-child {
  min-height: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  background: rgba(249, 250, 251, 0.96);
  box-shadow: none;
  backdrop-filter: none;
}

#stats-grid .stat-chip-label,
#stats-grid .stat-chip:first-child .stat-chip-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
}

#stats-grid .stat-chip strong,
#stats-grid .stat-chip:first-child strong {
  font-size: 0.88rem;
  line-height: 1;
}

.search-group {
  position: relative;
  z-index: 15;
  flex: 1 1 320px;
  min-width: min(100%, 280px);
  max-width: 420px;
}

.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(99, 79, 52, 0.12);
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-xs);
}

.search-pill-icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
  flex-shrink: 0;
}

.search-pill .search-input {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.search-pill .search-input:focus {
  outline: none;
}

.search-tray-wrap {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
}

.search-tray-wrap[hidden] {
  display: none;
}

.search-group .ticket-search-tray {
  margin-top: 0;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.search-group .ticket-search-status {
  font-size: 0.76rem;
}

.search-group .ticket-search-results {
  gap: 6px;
}

.search-group .ticket-search-result {
  gap: 2px;
  padding: 10px 11px;
  border-radius: 10px;
}

.utility-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex: 1 1 440px;
  flex-wrap: wrap;
}

.utility-controls .sort-field {
  min-width: 180px;
}

.stash-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.stash-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 999px;
  background: rgba(239, 246, 255, 0.72);
  color: #1d4ed8;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
}

.stash-pill-name {
  white-space: nowrap;
}

.stash-pill-count {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(29, 78, 216, 0.1);
  font-size: 0.72rem;
  line-height: 1.1;
  text-align: center;
}

@keyframes pulse-blue {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.18);
    background: rgba(239, 246, 255, 0.72);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(59, 130, 246, 0);
    background: rgba(239, 246, 255, 0.94);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    background: rgba(239, 246, 255, 0.72);
  }
}

.stash-pill.is-pulsing {
  animation: pulse-blue 2s ease-in-out infinite;
}

.board-view .ticket-card {
  padding: 12px;
  overflow: hidden;
}

.ticket-card-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.board-view .ticket-card::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: transparent;
}

.board-view .ticket-card.is-overdue {
  border-left: 1px solid rgba(99, 79, 52, 0.08);
}

.board-view .ticket-card.is-overdue::before {
  background: #ef4444;
}

.ticket-link-ghost {
  position: static;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 2px 8px;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  box-shadow: none;
  white-space: nowrap;
}

.ticket-link-ghost:hover {
  background: #e5e7eb;
  color: #374151;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 8px 0 0;
}

.detail-item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #f0f0f0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.detail-item dt {
  margin: 0;
}

.detail-item dd {
  margin: 0;
}

.reply-draft-card {
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-left: 4px solid #3B82F6;
  background: #F3F8FF;
  box-shadow: none;
}

.reply-draft-instruction {
  border-color: rgba(59, 130, 246, 0.12);
  background: rgba(255, 255, 255, 0.78);
}

@media (max-width: 980px) {
  .utility-bar {
    align-items: stretch;
  }

  .utility-group {
    width: 100%;
  }

  .utility-group + .utility-group {
    padding-left: 0;
    padding-top: 12px;
  }

  .utility-group + .utility-group::before {
    top: 0;
    right: 0;
    bottom: auto;
    width: auto;
    height: 1px;
  }

  .search-group,
  .utility-controls {
    max-width: none;
  }

  .utility-controls {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .top-nav {
    padding: 14px 16px;
    align-items: flex-start;
    flex-direction: column;
  }

  .top-nav-actions {
    width: 100%;
    justify-content: space-between;
  }

  .profile-pill {
    width: 100%;
  }

  .profile-menu {
    left: 0;
    right: auto;
  }

  .detail-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stash-pills,
  .filter-chips,
  .view-toggle {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .drawer-backdrop,
  .modal-backdrop {
    backdrop-filter: none;
  }

  .button:hover:not(:disabled),
  .ticket-link:hover,
  .move-button:hover {
    transform: none;
  }
}
