.detail-page .workspace { background: #fff; }
.detail-content {
  flex: 1;
  min-height: 0;
  padding: 24px 18px 0;
  overflow: auto;
  background: #fff;
}
.detail-tabs {
  height: 50px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid #dfe4e9;
}
.detail-tabs button {
  position: relative;
  min-width: 78px;
  height: 50px;
  padding: 0 12px 15px;
  color: #373e46;
  font-size: 14px;
  font-weight: 600;
}
.detail-tabs button:nth-child(3),
.detail-tabs button:nth-child(8) { min-width: 98px; }
.detail-tabs button.active { color: #2e99f4; }
.detail-tabs button.active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -1px;
  height: 2px;
  background: #2e99f4;
}
.detail-panel { padding-top: 20px; }
.agent-detail-list {
  width: 610px;
  margin: 0;
  border-top: 1px solid #e5eaef;
  border-left: 1px solid #e5eaef;
  font-size: 14px;
}
.agent-detail-list > div {
  min-height: 51px;
  display: grid;
  grid-template-columns: 146px minmax(0, 1fr);
}
.agent-detail-list dt,
.agent-detail-list dd {
  display: flex;
  align-items: center;
  margin: 0;
  padding: 10px 12px;
  border-right: 1px solid #e5eaef;
  border-bottom: 1px solid #e5eaef;
}
.agent-detail-list dt { color: #8a929c; background: #fafbfc; }
.agent-detail-list dd { color: #60676f; background: #fff; }
.agent-detail-list .address-row { min-height: 76px; }
.agent-detail-list .address-row dd { line-height: 22px; }
.document-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  color: #6f7881;
  font-size: 15px;
}
.own-lines-panel { padding-top: 0; }
.own-lines-filters {
  height: 65px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #505862;
  font-size: 14px;
  white-space: nowrap;
}
.own-lines-filters label { font-weight: 600; }
.own-lines-filters input,
.own-lines-filters select {
  height: 34px;
  border: 1px solid #dfe4ea;
  border-radius: 4px;
  color: #59616d;
  background: #fff;
  outline: none;
}
.own-lines-filters > input { width: 185px; padding: 0 10px; }
.own-lines-filters select { width: 104px; padding: 0 10px; }
.own-lines-filters input:focus,
.own-lines-filters select:focus { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64,158,255,.1); }
.own-lines-date-range { display: flex; align-items: center; gap: 9px; }
.own-lines-date-range input { width: 150px; padding: 0 10px; }
.own-lines-date-range span { color: #7d8690; }
.own-lines-filters .primary-button { width: 65px; height: 34px; font-size: 14px; }
.own-lines-table-wrap {
  width: 100%;
  height: calc(100vh - 242px);
  overflow: auto;
  border: 1px solid #e4e9ee;
}
.detail-page .own-lines-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 14px;
}
.detail-page .own-lines-table thead {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f8fa;
}
.detail-page .own-lines-table th,
.detail-page .own-lines-table td {
  height: 72px;
  padding: 10px 12px;
  border-right: 1px solid #e5eaef;
  border-bottom: 1px solid #e5eaef;
  text-align: center;
  color: #5f6770;
}
.detail-page .own-lines-table th {
  height: 45px;
  color: #596273;
  font-weight: 650;
  background: #f7f8fa;
}
.detail-page .own-lines-table th:nth-child(1) { width: 150px; }
.detail-page .own-lines-table th:nth-child(2) { width: 120px; }
.detail-page .own-lines-table th:nth-child(3) { width: 175px; }
.detail-page .own-lines-table th:nth-child(4) { width: 158px; }
.detail-page .own-lines-table th:nth-child(5) { width: 158px; }
.detail-page .own-lines-table th:nth-child(6) { width: 225px; }
.detail-page .own-lines-table th:nth-child(7) { width: 230px; }
.own-line-actions { white-space: nowrap; }
.own-line-actions button {
  margin: 0 9px;
  color: #2797f4;
  font-size: 14px;
}
.own-lines-empty { padding: 80px 0; text-align: center; color: #a1aab4; }
.oem-settings-panel {
  width: 780px;
  min-height: 390px;
  padding-top: 38px;
}
.oem-setting-row {
  min-height: 72px;
  display: flex;
  align-items: flex-start;
}
.oem-setting-row > label {
  width: 130px;
  padding-top: 11px;
  color: #5d646d;
  font-size: 14px;
  text-align: right;
}
.oem-setting-label {
  position: relative;
  flex: 0 0 130px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  padding-top: 11px;
  color: #5d646d;
  font-size: 14px;
  text-align: right;
}
.oem-line-help {
  width: 17px;
  height: 17px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #8c96a1;
  border-radius: 50%;
  color: #7c8792;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.oem-line-help:hover,
.oem-line-help[aria-expanded="true"] { color: #2f80ff; border-color: #2f80ff; }
.oem-line-help-popover {
  position: absolute;
  top: 39px;
  left: 112px;
  z-index: 12;
  width: 510px;
  padding: 18px 38px 17px 20px;
  border: 1px solid #dfe5eb;
  border-radius: 6px;
  color: #555e68;
  background: #fff;
  box-shadow: 0 6px 22px rgba(36, 50, 66, .16);
  text-align: left;
}
.oem-line-help-popover::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 17px;
  width: 12px;
  height: 12px;
  border-top: 1px solid #dfe5eb;
  border-left: 1px solid #dfe5eb;
  background: #fff;
  transform: rotate(45deg);
}
.oem-line-help-popover h3 { margin: 0 0 12px; color: #303943; font-size: 15px; }
.oem-line-help-popover p { margin: 0 0 11px; font-size: 13px; line-height: 1.65; }
.oem-line-help-popover p:last-child { margin-bottom: 0; }
.oem-line-help-popover b { color: #35404b; }
.oem-line-help-close { position: absolute; top: 9px; right: 10px; padding: 2px 5px; color: #8c96a1; font-size: 20px; }
.oem-line-control { min-width: 0; flex: 1; margin-left: 8px; }
.oem-setting-row input[type="text"],
.oem-setting-row select {
  width: 244px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid #dfe5eb;
  border-radius: 4px;
  color: #59616c;
  background: #fff;
  outline: none;
  font: inherit;
}
.oem-setting-row select { appearance: auto; }
.oem-setting-row input[type="text"]:focus,
.oem-setting-row select:focus {
  border-color: #409eff;
  box-shadow: 0 0 0 2px rgba(64, 158, 255, .1);
}
.oem-setting-row input[type="text"]:disabled {
  color: #a6adb5;
  background: #f4f6f8;
}
.oem-setting-row input[type="text"]::placeholder { color: #c0c6cd; }
.oem-agent-options {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 34px;
}
.oem-agent-options label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4f5660;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.oem-agent-options input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 2px solid #a4abb3;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
}
.oem-agent-options input[type="radio"]:checked {
  border-color: #2f80ff;
  background: #2f80ff;
  box-shadow: inset 0 0 0 3px #fff;
}
.oem-agent-options input[type="radio"]:focus-visible {
  outline: 2px solid rgba(47, 128, 255, .25);
  outline-offset: 2px;
}
.oem-custom-options { margin-top: 5px; }
.oem-agent-methods {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  gap: 28px;
  padding-left: 27px;
}
.oem-agent-methods label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #4f5660;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}
.oem-agent-methods > label { min-height: 44px; }
.oem-agent-methods input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  border: 1px solid #a4abb3;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
}
.oem-agent-methods input[type="checkbox"]:checked {
  border-color: #2f80ff;
  background: #2f80ff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 18 18'%3E%3Cpath d='m4.4 9.2 2.8 2.7 6.2-6' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/18px 18px no-repeat;
}
.oem-agent-methods input[type="checkbox"]:focus-visible {
  outline: 2px solid rgba(47, 128, 255, .25);
  outline-offset: 2px;
}
.oem-partial-method {
  min-width: 0;
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.oem-partial-method > label { min-height: 44px; }
.oem-method-error { margin: 1px 0 0 27px; color: #f05b5b; font-size: 12px; line-height: 20px; }
.oem-line-selector { position: relative; width: 350px; margin-top: 0; }
.oem-line-select-control {
  min-height: 44px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px 38px 5px 8px;
  border: 1px solid #dfe5eb;
  border-radius: 4px;
  background: #fff;
  cursor: text;
}
.oem-line-select-control:focus-within,
.oem-line-select-control.open { border-color: #409eff; box-shadow: 0 0 0 2px rgba(64, 158, 255, .1); }
.oem-selected-lines { display: contents; }
.oem-line-tag {
  max-width: 210px;
  height: 27px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 7px 0 9px;
  border-radius: 3px;
  color: #536172;
  background: #eef3f8;
  font-size: 13px;
}
.oem-line-tag span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oem-line-tag button { padding: 0 1px; color: #8b98a5; font-size: 16px; line-height: 1; }
.oem-line-tag button:hover { color: #ef5656; }
.oem-setting-row .oem-line-selector #oemLineSearch {
  width: auto;
  min-width: 155px;
  height: 30px;
  flex: 1;
  padding: 0 4px;
  border: 0;
  box-shadow: none;
  background: transparent;
  font-size: 14px;
}
.oem-line-dropdown-toggle { position: absolute; top: 7px; right: 8px; width: 28px; height: 30px; color: #8c96a1; font-size: 18px; transition: transform .15s ease; }
.oem-line-select-control.open .oem-line-dropdown-toggle { transform: rotate(180deg); }
.oem-line-dropdown {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  right: 0;
  z-index: 10;
  max-height: 230px;
  overflow-y: auto;
  padding: 5px 0;
  border: 1px solid #dfe5eb;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(36, 50, 66, .14);
}
.oem-line-option { width: 100%; min-height: 39px; display: flex; align-items: center; gap: 9px; padding: 7px 13px; color: #4f5964; text-align: left; font-size: 14px; }
.oem-line-option:hover { background: #f3f7fb; }
.oem-line-option[aria-selected="true"] { color: #2f80ff; background: #eef6ff; }
.oem-line-option-check { width: 16px; height: 16px; display: inline-grid; place-items: center; flex: 0 0 auto; border: 1px solid #b3bcc6; border-radius: 3px; color: transparent; font-size: 12px; }
.oem-line-option[aria-selected="true"] .oem-line-option-check { color: #fff; border-color: #2f80ff; background: #2f80ff; }
.oem-line-empty { padding: 24px 10px; color: #9da6b0; text-align: center; font-size: 13px; }
.oem-line-row:has(.oem-custom-options:not([hidden])) { min-height: 116px; }
.oem-line-row:has(.oem-line-selector:not([hidden])) { min-height: 116px; }
.oem-setting-row .primary-button {
  width: 118px;
  height: 44px;
  margin-left: 12px;
  font-size: 14px;
}
.oem-setting-row #editOemPricesButton { width: 84px; }
@media (max-width: 900px) {
  .agent-detail-list { width: min(610px, 100%); }
  .oem-settings-panel { width: 100%; }
}
