/* Shared UI kit: status chips/badges + row links + responsive tables */

.ui-status-chip {
  display: inline-flex;
  align-items: center;
  gap: .38rem;
  padding: .28rem .68rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--muted);
  font-size: .76rem;
  font-weight: 700;
  line-height: 1;
  background: #fff;
}

.ui-status-chip:hover {
  border-color: rgba(15,31,61,.28);
  text-decoration: none;
}

.ui-status-chip.is-active {
  box-shadow: 0 0 0 2px rgba(15,31,61,.14) inset;
  transform: translateY(-1px);
}

.ui-dot {
  width: .54rem;
  height: .54rem;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.08);
}

.ui-count {
  background: rgba(255,255,255,.92);
  color: #111827;
  border-radius: 999px;
  font-size: .68rem;
  padding: .08rem .35rem;
  border: 1px solid rgba(15,31,61,.12);
}

.ui-badge {
  display: inline-flex;
  align-items: center;
  padding: .18rem .48rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
}

.ui-st-NEW         { background: rgba(239,68,68,.10); color: #b91c1c; border-color: rgba(239,68,68,.2); }
.ui-st-IN_REVIEW   { background: rgba(234,179,8,.12); color: #a16207; border-color: rgba(234,179,8,.2); }
.ui-st-ASSIGNED    { background: rgba(234,179,8,.15); color: #92400e; border-color: rgba(234,179,8,.24); }
.ui-st-IN_PROGRESS { background: rgba(249,115,22,.12); color: #c2410c; border-color: rgba(249,115,22,.24); }
.ui-st-RESOLVED    { background: rgba(34,197,94,.12); color: #166534; border-color: rgba(34,197,94,.24); }
.ui-st-REJECTED    { background: rgba(239,68,68,.10); color: #b91c1c; border-color: rgba(239,68,68,.2); }
.ui-st-ACCEPTED    { background: rgba(34,197,94,.12); color: #166534; border-color: rgba(34,197,94,.24); }
.ui-st-CONTACTED   { background: rgba(6,182,212,.12); color: #0e7490; border-color: rgba(6,182,212,.22); }
.ui-st-APPROVED    { background: rgba(16,185,129,.12); color: #047857; border-color: rgba(16,185,129,.22); }
.ui-st-READ        { background: rgba(107,114,128,.12); color: #374151; border-color: rgba(107,114,128,.24); }
.ui-st-REPLIED     { background: rgba(34,197,94,.12); color: #166534; border-color: rgba(34,197,94,.24); }
.ui-st-CLOSED      { background: rgba(107,114,128,.12); color: #374151; border-color: rgba(107,114,128,.24); }

.ui-status-chip.ui-st-NEW .ui-dot { background: #b91c1c; }
.ui-status-chip.ui-st-IN_REVIEW .ui-dot { background: #a16207; }
.ui-status-chip.ui-st-ASSIGNED .ui-dot { background: #92400e; }
.ui-status-chip.ui-st-IN_PROGRESS .ui-dot { background: #c2410c; }
.ui-status-chip.ui-st-RESOLVED .ui-dot { background: #166534; }
.ui-status-chip.ui-st-REJECTED .ui-dot { background: #b91c1c; }
.ui-status-chip.ui-st-ACCEPTED .ui-dot { background: #166534; }
.ui-status-chip.ui-st-CONTACTED .ui-dot { background: #0e7490; }
.ui-status-chip.ui-st-APPROVED .ui-dot { background: #047857; }
.ui-status-chip.ui-st-READ .ui-dot { background: #374151; }
.ui-status-chip.ui-st-REPLIED .ui-dot { background: #166534; }
.ui-status-chip.ui-st-CLOSED .ui-dot { background: #374151; }

[data-ui-row-links] [data-href],
.ui-row-link[data-href] {
  cursor: pointer;
}

@media (max-width: 991px) {
  table[data-ui="responsive-table"] thead { display: none; }
  table[data-ui="responsive-table"],
  table[data-ui="responsive-table"] tbody,
  table[data-ui="responsive-table"] tr,
  table[data-ui="responsive-table"] td {
    display: block;
    width: 100%;
  }
  table[data-ui="responsive-table"] tbody tr {
    border-bottom: 1px solid var(--border);
    padding: .55rem .9rem;
  }
  table[data-ui="responsive-table"] tbody tr:last-child { border-bottom: 0; }
  table[data-ui="responsive-table"] td {
    border: 0 !important;
    padding: .25rem 0 !important;
  }
  table[data-ui="responsive-table"] td[data-label] {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: .75rem;
  }
  table[data-ui="responsive-table"] td[data-label]::before {
    content: attr(data-label);
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--muted);
    flex-shrink: 0;
  }
}

/* Issue/detail layout blocks */
.ui-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
}

.ui-page-title {
  margin: 0;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.28;
}

.ui-page-subtitle {
  margin-top: .18rem;
  font-size: .8rem;
  color: var(--muted);
}

.ui-section-label {
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .5rem;
}

.ui-issue-map {
  height: 300px;
  border-radius: 10px;
  border: 1px solid var(--border);
}

.ui-sticky-top {
  position: sticky;
  top: 1rem;
}

.ui-comment-item {
  border-radius: 10px;
  padding: .6rem .7rem;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.ui-comment-item.is-internal {
  background: rgba(232,160,32,.08);
  border-color: rgba(232,160,32,.25);
}

.ui-comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  margin-bottom: .25rem;
}

.ui-note-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem .6rem;
}
