/* Compact photo and details header for active records. */
#work-order .v1-device-card {
  grid-template-columns:clamp(240px,27%,320px) minmax(0,1fr)!important;
  gap:16px!important; align-items:stretch!important; padding:14px!important;
}
#work-order .v1-device-card>.v1-device-image {
  align-self:stretch!important; width:100%!important; min-width:0!important;
  height:auto!important; min-height:230px!important; max-height:none!important;
  margin:0!important; background:#fff!important;
  border:1px solid var(--gc-line,#dce5ee)!important;
}
#work-order .v1-device-card>.v1-device-image:not(.has-pair)>img {
  width:100%!important; height:100%!important; max-height:none!important;
  object-fit:contain!important; object-position:center!important;
  padding:9px 9px 32px!important; background:#fff!important;
}
#work-order .v1-device-card>.v1-device-image .v1-device-image-pair {
  height:calc(100% - 32px)!important; min-height:225px!important;
}
#work-order .v1-device-card>.v1-device-image .v1-device-image-pair img {
  background:transparent!important; object-fit:contain!important;
}
#work-order .v1-device-card>div:last-child {display:contents!important}
#work-order .v1-device-card>.v1-device-image {grid-column:1; grid-row:1}
#work-order .v1-device-meta {grid-column:2; grid-row:1}
#work-order .v1-summary {grid-column:1/-1; grid-row:2}
#work-order .v1-device-meta {
  display:grid!important; grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-auto-rows:minmax(72px,max-content); align-content:center;
  gap:8px!important;
}
@media(min-width:1151px) {
  #work-order .v1-device-card>.v1-device-image {
    height:316px!important; min-height:316px!important;
  }
}
#work-order .v1-meta-block {
  display:flex; flex-direction:column; justify-content:center;
  padding:8px 10px!important; min-width:0;
}
#work-order .v1-meta-block .gc-inline-field {row-gap:2px!important}
#work-order .v1-meta-block .gc-inline-value {
  min-height:24px!important; padding:1px 0!important; line-height:20px!important;
}
#work-order .gc-device-pin-field .gc-pattern-trigger {
  min-height:24px!important; margin-top:4px!important; padding:2px 6px!important;
}
#work-order .gc-device-pin-field .gc-device-pin-status:empty {display:none!important}
#work-order .v1-summary {
  margin:0!important; padding:10px 12px!important;
  border:1px solid var(--gc-line,#dce5ee)!important; border-radius:8px;
  background:var(--gc-surface-2,#f8fafc); line-height:1.45!important;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-record-body>.gc-lead-device-hero {
  grid-column:1/-1; min-width:0; display:grid;
  grid-template-columns:clamp(230px,28%,310px) minmax(0,1fr);
  align-items:stretch; gap:16px; padding:14px;
  border:1px solid var(--gc-line,#dce5ee); border-radius:12px;
  background:var(--gc-surface,#fff);
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo {
  position:relative; display:grid; place-items:center; min-width:0;
  height:260px; min-height:0; align-self:start; margin:0; overflow:hidden; border-radius:10px;
  border:1px solid var(--gc-line,#dce5ee);
  background:#fff;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo img {
  display:block; width:100%; height:100%; min-height:0;
  max-height:260px; padding:9px 9px 32px; box-sizing:border-box;
  object-fit:contain; object-position:center;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo figcaption {
  position:absolute; bottom:0; left:0; right:0; padding:6px 8px;
  background:#102a41df; color:#fff; font-size:10px; text-align:center;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-details {
  min-width:0; display:flex; flex-direction:column; gap:10px;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-details h3 {
  margin:0; font-size:17px; line-height:1.3;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-fields {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr));
  grid-auto-rows:minmax(60px,auto); gap:8px; margin:0;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-field {
  min-width:0; padding:8px 10px; border:1px solid var(--gc-line,#dce5ee);
  border-radius:8px; background:var(--gc-surface-2,#f8fafc);
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-field dt {
  color:var(--gc-muted,#60768a); font-size:10px; font-weight:700;
  letter-spacing:.04em; text-transform:uppercase;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-field dd {
  margin:4px 0 0; font-size:13px; font-weight:650;
  line-height:1.35; overflow-wrap:anywhere;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-issue {grid-column:1/-1}
@media(max-width:1500px) {
  #work-order .v1-device-meta {grid-template-columns:repeat(2,minmax(0,1fr))!important}
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-fields {grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:1150px) {
  #work-order .v1-device-card {grid-template-columns:minmax(0,1fr)!important}
  #work-order .v1-device-card>.v1-device-image {grid-column:1; grid-row:1}
  #work-order .v1-device-meta {grid-column:1; grid-row:2}
  #work-order .v1-summary {grid-column:1; grid-row:3}
  #work-order .v1-device-card>.v1-device-image {
    width:min(100%,340px)!important; height:240px!important;
    min-height:240px!important; justify-self:center;
  }
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-record-body>.gc-lead-device-hero {grid-template-columns:minmax(0,1fr)}
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo {
    width:min(100%,340px); height:240px; min-height:240px; justify-self:center;
  }
}
@media(max-width:600px) {
  #work-order .v1-device-meta,
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-hero-fields {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  #work-order .v1-device-card>.v1-device-image,
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo {
    width:100%!important; max-width:340px;
  }
}

/* Device previews fill their card at every record width. */
#work-order .v1-device-card>.v1-device-image,
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo {
  background:var(--gc-surface-2,#10202f)!important;
}
#work-order .v1-device-card>.v1-device-image:not(.has-pair)>img,
#work-order .v1-device-card>.v1-device-image .v1-device-image-pair img,
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-photo img {
  width:100%!important;height:100%!important;max-height:none!important;
  padding:0!important;object-fit:cover!important;object-position:center!important;
  background:transparent!important;
}
#work-order .v1-device-card>.v1-device-image .v1-device-image-pair {
  height:100%!important;min-height:0!important;
}

#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-edit {
  align-self:flex-start;min-height:38px;padding:7px 14px;border:1px solid var(--gc-line,#30485c);
  border-radius:8px;background:var(--gc-surface-2,#152737);color:inherit;font-weight:700;cursor:pointer;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form {
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
  padding:12px;border:1px solid var(--gc-line,#30485c);border-radius:9px;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form[hidden] {display:none}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form label {display:grid;gap:4px;min-width:0;font-size:11px;font-weight:700}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form :is(input,select) {
  width:100%;min-width:0;min-height:38px;box-sizing:border-box;padding:7px;
  border:1px solid var(--gc-line,#30485c);border-radius:7px;background:var(--gc-surface-2,#152737);color:inherit;
}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-actions {grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-actions button {min-height:38px;width:auto;white-space:nowrap}
#v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form .operation-status {grid-column:1/-1;margin:0}
@media(max-width:600px) {
  #v1-lead-drawer.gc-lead-workflow-docked .gc-lead-device-form {grid-template-columns:minmax(0,1fr)}
}

/* Wide keyboard artwork stays fully visible against the card's dark canvas. */
#work-order .v1-device-card>.v1-device-image>img[src$="keyboard.svg"] {
  object-fit:contain!important;background:#10202f!important;
}
