:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #17233c;
  background: #f5f7fb;
  --primary: #2457d6;
  --border: #dfe5ef;
  --muted: #68758d;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px max(24px, calc((100vw - 1480px) / 2));
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.topbar-actions, .tabs, .section-heading, .job-card-header, .job-times { display: flex; align-items: center; gap: 10px; }
.topbar-actions { justify-content: flex-end; }
.tabs { padding: 4px; border-radius: 10px; background: #f1f4f9; }
.tab-button { min-height: 34px; padding: 7px 12px; border: 0; border-radius: 7px; color: var(--muted); background: transparent; font-weight: 750; }
.tab-button.active { color: var(--primary); background: #fff; box-shadow: 0 1px 4px #17233c1a; }
.count-badge { display: inline-grid; place-items: center; min-width: 19px; height: 19px; margin-left: 3px; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--primary); font-size: 11px; }

h1, h2, p { margin: 0; }
h1 { font-size: 24px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 800; letter-spacing: .14em; }
main { max-width: 1480px; margin: 0 auto; padding: 24px; }
.tab-panel { min-width: 0; }
.section-heading { justify-content: space-between; margin-bottom: 18px; }
.section-heading h2 { margin-bottom: 4px; }
.list-controls { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(180px, 260px); gap: 10px; margin-bottom: 14px; }

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(260px, 520px) 1fr auto;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

label { font-weight: 700; font-size: 14px; }
select, input[type="file"], input[type="text"], input[type="search"], input[type="datetime-local"], textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fff;
}
textarea { resize: vertical; }
fieldset { display: grid; gap: 10px; margin: 8px 0 0; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
legend { padding: 0 6px; font-size: 14px; font-weight: 800; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid > div { display: grid; gap: 6px; }
.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.checkbox-label input { width: 17px; height: 17px; }
.prompt-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; }
.text-button { padding: 2px 0; border: 0; color: var(--primary); background: transparent; font-weight: 750; }
#claudePromptInput { min-height: 260px; font: 13px/1.5 Consolas, monospace; }

.muted { color: var(--muted); font-size: 13px; }
.issue-list { display: grid; gap: 8px; }
.issue-table-header, .issue {
  grid-template-columns: 110px minmax(300px, 1fr) 90px minmax(130px, .7fr) minmax(120px, .65fr) minmax(165px, .8fr) 290px;
}
.issue-table-header {
  display: grid;
  gap: 12px;
  padding: 0 14px 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
}
.issue {
  display: grid;
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #fff;
}
.issue-actions { display: flex; justify-content: flex-end; gap: 8px; }

.issue-key { color: var(--primary); font-weight: 800; text-decoration: none; }
.issue-summary {
  min-width: 0;
  font-weight: 650;
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: normal;
}
.issue-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.issue-field { display: flex; flex-direction: column; gap: 3px; min-width: 0; line-height: 1.35; overflow-wrap: anywhere; }
.issue-version > span:last-child { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.field-label { display: none; color: var(--muted); font-size: 11px; font-weight: 750; }
.time-meta { color: var(--muted); font-size: 12px; }
.status {
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf0ff;
  color: #244ca8;
  font-size: 12px;
  font-weight: 800;
}

.primary, .secondary, .icon-button, .button-link {
  min-height: 38px;
  padding: 8px 13px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
}
.primary { color: #fff; background: var(--primary); }
.primary:disabled { cursor: wait; opacity: .65; }
.secondary { color: #263650; background: #fff; border-color: var(--border); }
.button-link { display: inline-flex; align-items: center; justify-content: center; color: #263650; background: #fff; border-color: var(--border); text-decoration: none; }
.notice { margin-bottom: 16px; padding: 12px 14px; border-radius: 9px; background: #fff3cd; color: #684f00; }
.notice.error { background: #ffebed; color: #982333; }
.notice.success { background: #e7f7ee; color: #17653a; }
.preflight-status { padding: 10px 12px; border: 1px solid #b9c9ee; border-radius: 8px; background: #f3f6fd; color: #29447f; font-size: 13px; line-height: 1.45; }
.preflight-status.success { border-color: #a9dec0; background: #edf9f2; color: #17653a; }
.preflight-status.error { border-color: #f2b8c0; background: #fff1f2; color: #982333; }
.hidden { display: none !important; }

dialog { width: min(560px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 0; box-shadow: 0 22px 70px #15213d42; }
dialog::backdrop { background: #10182c9c; }
dialog form { display: grid; gap: 10px; padding: 22px; }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dialog-header { margin-bottom: 8px; }
.dialog-actions { justify-content: flex-end; margin-top: 14px; }
.icon-button { font-size: 26px; line-height: 1; color: var(--muted); background: transparent; }
.image-preview { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.image-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.image-drop-zone { display: grid; gap: 4px; padding: 14px; border: 2px dashed #b9c5dc; border-radius: 10px; background: #f8faff; outline: none; transition: .15s ease; }
.image-drop-zone:focus, .image-drop-zone.dragging { border-color: var(--primary); background: #edf3ff; box-shadow: 0 0 0 3px #2457d61a; }
.image-drop-zone input[type="file"] { margin-top: 6px; background: #fff; }
.image-preview-item { position: relative; }
.image-preview-remove { position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; padding: 0; border: 0; border-radius: 50%; color: #fff; background: #17233ccc; font-weight: 900; }
.job-status { padding: 10px 12px; border-radius: 8px; background: #eef3ff; color: #244ca8; font-weight: 750; }
.job-log { max-height: 330px; margin: 0; padding: 12px; overflow: auto; border-radius: 9px; background: #111827; color: #dce7ff; font: 12px/1.5 Consolas, monospace; white-space: pre-wrap; }
.job-list { display: grid; gap: 12px; }
.job-card { padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.job-card.active { border-color: #9bb5f4; box-shadow: 0 0 0 3px #2457d60d; }
.job-card-header { justify-content: space-between; align-items: flex-start; }
.job-card-header > div { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.job-card-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.danger-text { min-height: 30px; padding: 5px 8px; border: 1px solid #f3bbc2; border-radius: 7px; color: #a32032; background: #fff; font-weight: 750; }
.danger-text:hover { background: #ffebed; }
.job-repository { padding: 3px 8px; border-radius: 6px; background: #eef2f8; font-size: 12px; font-weight: 750; }
.job-state { padding: 5px 9px; border-radius: 999px; background: #eef2f8; color: #42516d; font-size: 12px; font-weight: 800; }
.job-state.queued, .job-state.preparing, .job-state.running { background: #eaf0ff; color: #244ca8; }
.job-state.completed { background: #e7f7ee; color: #17653a; }
.job-state.failed { background: #ffebed; color: #982333; }
.job-state.cancelled { background: #f2f3f6; color: #59657a; }
.job-times { flex-wrap: wrap; margin: 10px 0; gap: 8px 20px; }
.job-error { margin: 10px 0; padding: 9px 11px; border-radius: 7px; color: #982333; background: #ffebed; }
.job-card details summary { margin: 8px 0; cursor: pointer; color: var(--primary); font-weight: 750; }
.job-card .job-log { max-height: 420px; }
.follow-up-form { display: grid; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.follow-up-form .dialog-actions { margin-top: 2px; }
.follow-up-input { min-height: 76px; }
.settings-card { display: grid; gap: 10px; max-width: 760px; padding: 22px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
.dialog-panel { display: grid; gap: 14px; padding: 22px; }
.detail-dialog-panel { gap: 0; padding: 0; background: #f7f9fc; }
.detail-dialog-panel .dialog-header { align-items: flex-start; }
.detail-heading { display: grid; gap: 7px; min-width: 0; }
.detail-heading h2 { max-width: 820px; color: #162033; font-size: 19px; line-height: 1.35; letter-spacing: -.015em; }
.detail-heading-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.detail-heading-meta .eyebrow { font-size: 11px; }
.detail-heading-meta .status { padding: 3px 8px; font-size: 11px; }
.detail-type { padding: 3px 8px; border-radius: 999px; color: #475467; background: #eef1f5; font-size: 11px; font-weight: 750; }
.issue-detail-body { min-height: 420px; padding: 22px 24px 26px; }
.detail-content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 18px; align-items: start; }
.detail-primary, .detail-sidebar { display: grid; gap: 14px; min-width: 0; }
.detail-card { min-width: 0; padding: 16px; border: 1px solid #e4e9f0; border-radius: 10px; background: #fff; box-shadow: 0 1px 2px #10182808; }
.detail-card h3 { margin: 0; color: #344054; font-size: 13px; font-weight: 800; }
.detail-section { display: grid; gap: 12px; }
.detail-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.detail-section-heading > span { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; color: #475467; background: #eef2f6; font-size: 11px; font-weight: 800; }
.issue-description { color: #344054; font-size: 14px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-description a { color: var(--primary); text-decoration: none; }
.issue-description a:hover { text-decoration: underline; }
.detail-properties { display: grid; gap: 12px; }
.detail-properties dl { display: grid; gap: 0; margin: 0; }
.detail-row { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 10px; padding: 9px 0; border-top: 1px solid #eef1f5; }
.detail-row:first-child { padding-top: 0; border-top: 0; }
.detail-row:last-child { padding-bottom: 0; }
.detail-row dt { color: #7b8798; font-size: 11px; font-weight: 700; }
.detail-row dd { min-width: 0; margin: 0; color: #344054; font-size: 12px; font-weight: 650; overflow-wrap: anywhere; }
.tracking-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 12px; }
.tracking-metric { display: grid; gap: 3px; padding: 9px 7px; border-radius: 7px; background: #f5f7fa; text-align: center; }
.tracking-metric span { color: #7b8798; font-size: 10px; }
.tracking-metric strong { color: #253858; font-size: 13px; }
.attachment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attachment-card { display: grid; gap: 8px; min-width: 0; padding: 7px; border: 1px solid var(--border); border-radius: 9px; color: #263650; background: #fff; text-decoration: none; transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.attachment-card:hover { border-color: #9eb5e9; box-shadow: 0 5px 16px #2457d612; transform: translateY(-1px); }
.attachment-card img { width: 100%; aspect-ratio: 16 / 9; border-radius: 6px; background: #eef2f7; object-fit: contain; }
.attachment-card-meta { display: grid; gap: 2px; min-width: 0; padding: 0 3px 2px; }
.attachment-name { overflow: hidden; font-size: 12px; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file { display: grid; min-height: 128px; place-content: center; border-radius: 6px; color: var(--muted); background: #f5f7fa; text-align: center; }
.detail-empty { padding: 26px 16px; border: 1px dashed #d6dde7; border-radius: 8px; color: var(--muted); background: #fafbfc; text-align: center; }
.detail-dialog-actions { justify-content: space-between; }
.detail-action-group { display: flex; gap: 8px; }
.detail-skeleton { display: grid; gap: 14px; padding: 6px 0; }
.detail-skeleton span { height: 110px; border-radius: 10px; background: linear-gradient(90deg, #edf1f5 25%, #f8fafc 45%, #edf1f5 65%); background-size: 220% 100%; animation: detail-loading 1.2s ease-in-out infinite; }
.detail-skeleton span:first-child { height: 180px; }
.detail-skeleton span:last-child { width: 70%; }
@keyframes detail-loading { to { background-position: -220% 0; } }
.empty { padding: 52px 20px; text-align: center; color: var(--muted); background: #fff; border: 1px dashed var(--border); border-radius: 12px; }

@media (max-width: 1250px) {
  .issue-table-header { display: none; }
  .issue { grid-template-columns: 105px minmax(260px, 1fr) 95px 170px auto; }
  .issue-key { grid-column: 1; grid-row: 1; }
  .issue-summary { grid-column: 2; grid-row: 1; }
  .status { grid-column: 3; grid-row: 1; }
  .issue-meta { grid-column: 4; grid-row: 1; }
  .issue-actions { grid-column: 5; grid-row: 1; }
  .issue-reporter { grid-column: 2; grid-row: 2; }
  .issue-version { grid-column: 3 / 5; grid-row: 2; }
  .field-label { display: inline; }
}

@media (max-width: 800px) {
  .topbar { align-items: flex-start; gap: 16px; }
  .topbar-actions { align-items: flex-end; flex-direction: column-reverse; }
  .tabs { flex-wrap: wrap; justify-content: flex-end; }
  .toolbar { grid-template-columns: 1fr; }
  .list-controls { grid-template-columns: 1fr; }
  .issue { grid-template-columns: 92px 1fr auto; gap: 8px 12px; }
  .issue-key { grid-column: 1; grid-row: 1; }
  .issue-summary { grid-column: 2 / 4; grid-row: 1; }
  .status { grid-column: 1; grid-row: 2; }
  .issue-reporter { grid-column: 2 / 4; grid-row: 2; }
  .issue-version { grid-column: 1 / 4; grid-row: 3; }
  .issue-meta { grid-column: 1 / 4; grid-row: 4; }
  .issue-actions { grid-column: 1 / 4; grid-row: 5; }
  .form-grid { grid-template-columns: 1fr; }
}

/* Production UI refinements */
:root {
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --text: #182230;
  --muted: #667085;
  --border: #e3e8ef;
  --surface: #ffffff;
  --surface-subtle: #f8fafc;
  --focus: #2563eb2e;
  background: #f6f8fb;
  color: var(--text);
}

body { background: #f6f8fb; font-size: 14px; }
.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 64px;
  padding: 10px max(20px, calc((100vw - 1480px) / 2));
  box-shadow: 0 1px 2px #1018280a;
}
.brand { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.brand .eyebrow { font-size: 10px; }
h1 { font-size: 19px; letter-spacing: -.02em; }
h2 { font-size: 18px; letter-spacing: -.015em; }
main { padding: 20px 24px 36px; }

.tabs { gap: 2px; padding: 3px; border: 1px solid #eaecf0; border-radius: 9px; background: var(--surface-subtle); }
.tab-button { min-height: 32px; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 700; transition: color .15s ease, background .15s ease, box-shadow .15s ease; }
.tab-button:hover { color: #344054; }
.tab-button.active { color: #1d4ed8; box-shadow: 0 1px 2px #10182812; }
.count-badge { min-width: 18px; height: 18px; background: #2563eb; }

.toolbar {
  margin: 0;
  padding: 12px 12px 10px;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  background: var(--surface);
}
.toolbar label { color: #344054; font-size: 13px; }
.list-controls {
  margin: 0 0 12px;
  padding: 0 12px 12px;
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: var(--surface);
}
.section-heading { margin-bottom: 14px; }
.section-heading .muted { margin-top: 3px; }

select, input[type="file"], input[type="text"], input[type="search"], input[type="datetime-local"], textarea {
  min-height: 38px;
  padding: 8px 11px;
  border-color: #d8dee8;
  border-radius: 7px;
  color: var(--text);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
select:hover, input:hover, textarea:hover { border-color: #b9c3d1; }
select:focus, input:focus, textarea:focus, .image-drop-zone:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--focus);
}
input[type="search"] { background: #fff; }
label { color: #344054; font-size: 13px; font-weight: 700; }

.primary, .secondary, .icon-button {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .05s ease;
}
.primary { background: var(--primary); box-shadow: 0 1px 2px #10182814; }
.primary:hover:not(:disabled) { background: var(--primary-hover); }
.secondary:hover:not(:disabled) { border-color: #b9c3d1; background: var(--surface-subtle); }
button:active:not(:disabled) { transform: translateY(1px); }
button:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .55; }

.issue-list { gap: 0; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.issue-table-header { padding: 10px 14px; border: 0; background: var(--surface-subtle); color: #667085; font-size: 11px; text-transform: uppercase; letter-spacing: .045em; }
.issue {
  min-height: 66px;
  padding: 10px 14px;
  border: 0;
  border-top: 1px solid #edf0f4;
  border-radius: 0;
  transition: background .12s ease;
}
.issue:hover { background: #fafcff; }
.issue-key { font-size: 13px; }
.issue-key:hover { text-decoration: underline; }
.issue-summary { color: #202939; font-weight: 650; line-height: 1.38; }
.issue-field, .issue-meta { color: #344054; font-size: 13px; }
.status { padding: 4px 8px; background: #eff4ff; color: #3451b2; font-size: 11px; }
.issue-actions { gap: 6px; }
.issue-actions button { min-width: 86px; }
.time-meta { color: #7b879a; font-size: 11px; }

.notice { position: sticky; z-index: 10; top: 74px; margin-bottom: 12px; border: 1px solid #f1d78c; box-shadow: 0 4px 12px #1018280d; }
.notice.error { border-color: #f2b8c0; }
.notice.success { border-color: #a9dec0; }
.empty { border: 0; border-radius: 0; background: var(--surface); }

.job-list { gap: 10px; }
.job-card { padding: 14px 16px; border-radius: 10px; box-shadow: 0 1px 2px #10182808; }
.job-card.active { border-color: #a8bef5; box-shadow: 0 0 0 3px #2563eb12; }
.job-repository { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border: 1px solid #e4e8ef; background: #f8fafc; }
.job-times { margin: 8px 0; font-size: 12px; }
.job-state { padding: 4px 8px; font-size: 11px; }
.danger-text { min-height: 28px; font-size: 12px; }
.job-card details summary { display: inline-block; margin: 5px 0; font-size: 13px; }
.job-log { border: 1px solid #263244; border-radius: 7px; background: #101828; color: #d6e0f0; }
.follow-up-form { margin-top: 10px; padding-top: 12px; }

.settings-card { gap: 9px; max-width: 820px; padding: 20px; border-radius: 10px; box-shadow: 0 1px 2px #10182808; }
fieldset { border-color: var(--border); border-radius: 8px; background: #fbfcfe; }

dialog { width: min(620px, calc(100vw - 28px)); max-height: calc(100vh - 32px); overflow: auto; border: 1px solid #e4e8ef; border-radius: 12px; box-shadow: 0 24px 64px #10182838; }
#claudeDialog { width: min(760px, calc(100vw - 28px)); }
#issueDetailDialog { width: min(1040px, calc(100vw - 28px)); }
dialog::backdrop { background: #10182899; backdrop-filter: blur(2px); }
dialog form { gap: 9px; padding: 20px; }
dialog .dialog-header { position: sticky; z-index: 2; top: -20px; margin: -20px -20px 6px; padding: 16px 20px 12px; border-bottom: 1px solid #edf0f4; background: #fff; }
dialog form > .dialog-actions { position: sticky; bottom: -20px; margin: 8px -20px -20px; padding: 12px 20px; border-top: 1px solid #edf0f4; background: #fff; }
.dialog-panel .dialog-header { top: -22px; margin: -22px -22px 2px; }
.dialog-panel > .dialog-actions { position: sticky; z-index: 2; bottom: -22px; margin: 2px -22px -22px; padding: 12px 22px; border-top: 1px solid #edf0f4; background: #fff; }
.detail-dialog-panel .dialog-header { top: 0; margin: 0; padding: 18px 24px 16px; }
.detail-dialog-panel > .dialog-actions { bottom: 0; margin: 0; padding: 12px 24px; }
.icon-button { width: 34px; min-height: 34px; padding: 0; font-size: 22px; }
.image-drop-zone { padding: 12px; border-width: 1px; border-radius: 8px; background: #fafcff; }
#claudePromptInput { min-height: 220px; }

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

@media (max-width: 800px) {
  .topbar { position: static; min-height: auto; padding: 12px 16px; }
  .brand { display: block; }
  .brand .eyebrow { display: none; }
  main { padding: 14px 12px 28px; }
  .tabs { justify-content: flex-end; }
  .tab-button { padding-inline: 9px; }
  .toolbar, .list-controls { padding-inline: 10px; }
  .issue-list { overflow: visible; border: 0; background: transparent; }
  .issue { margin-bottom: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
  .issue-actions button { flex: 1; }
  .detail-content-layout { grid-template-columns: 1fr; }
  .detail-sidebar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-dates { grid-column: 1 / -1; }
  .attachment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-heading { align-items: flex-start; }
  .job-card-header { gap: 10px; }
  .job-card-controls { align-items: flex-end; flex-direction: column; }
  dialog form { padding: 16px; }
  .dialog-panel { padding: 16px; }
  .detail-dialog-panel { padding: 0; }
  dialog .dialog-header { top: -16px; margin: -16px -16px 4px; padding: 14px 16px 10px; }
  dialog form > .dialog-actions { bottom: -16px; margin: 8px -16px -16px; padding: 10px 16px; }
  .dialog-panel .dialog-header { top: -16px; margin: -16px -16px 2px; }
  .dialog-panel > .dialog-actions { bottom: -16px; margin: 2px -16px -16px; padding: 10px 16px; }
  .detail-dialog-panel .dialog-header { top: 0; margin: 0; padding: 16px; }
  .detail-dialog-panel > .dialog-actions { bottom: 0; margin: 0; padding: 10px 16px; }
  .issue-detail-body { padding: 16px; }
}

@media (max-width: 560px) {
  .detail-sidebar, .attachment-grid { grid-template-columns: 1fr; }
  .detail-dialog-actions { align-items: stretch; flex-direction: column; }
  .detail-action-group { display: grid; grid-template-columns: 1fr 1fr; }
  .detail-action-group .primary { grid-column: 1 / -1; }
  .detail-dialog-actions .button-link { width: 100%; }
  .detail-heading h2 { font-size: 17px; }
}
