/* Credit Note workflow dashboard: DEKRA green, ink and warm status accents. */
.app-main > .credit-note-workflow {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.credit-note-workflow .cn-page-header {
  min-height: 39px;
  margin: 0 0 14px;
  padding: 8px 17px;
  box-sizing: border-box;
  border: 0;
  border-radius: 8px;
  background: #005b3a;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
}

.credit-note-workflow .cn-page-header h1 {
  color: #fff;
  font-size: 15px;
  line-height: 1.25;
  letter-spacing: 0;
}

.credit-note-workflow .cn-page-header .cn-eyebrow {
  display: none;
}

.credit-note-workflow .cn-page-header p:not(.cn-eyebrow) {
  margin: 3px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 13px;
}

.app-main > .dnet-container.credit-note-page { width: 100%; max-width: none; margin: 0; padding: 0; box-sizing: border-box; }
.credit-note-page > .credit-note-form,
.credit-note-page > .credit-note-invoice-search { width: 100%; max-width: none; box-sizing: border-box; }
.credit-note-page > .credit-note-form { margin: 0; }
.credit-note-page .dnet-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.credit-note-workflow { max-width: 1500px; margin: 0 auto; color: #17352b; font-family: "Segoe UI", Arial, sans-serif; }
.credit-note-upload { display: grid; gap: 10px; padding: 16px; border: 1px solid var(--dnet-border); border-radius: 8px; background: #f8fbf9; }
.credit-note-form__layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 22px; align-items: start; }
.credit-note-form__details { min-width: 0; }
.credit-note-form__actions { grid-column: 1 / -1; }
.credit-note-upload__heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.credit-note-upload__heading strong { display: block; color: var(--dnet-text); }
.credit-note-upload__heading small { display: block; margin-top: 4px; color: #657a71; font-size: 12px; font-weight: 400; }
.credit-note-upload__input { width: 100%; padding: 8px; border: 1px dashed var(--dnet-field-border); border-radius: 6px; background: #fff; color: var(--dnet-text); font: inherit; }
.credit-note-upload__list { display: grid; gap: 8px; }
.credit-note-upload__name { display: grid; grid-template-columns: minmax(140px, .7fr) minmax(180px, 1.3fr) max-content max-content; align-items: center; gap: 10px; color: var(--dnet-text); font-size: 13px; font-weight: 600; }
.credit-note-upload__name input { width: 100%; min-height: 34px; box-sizing: border-box; padding: 7px 9px; border: 1px solid var(--dnet-field-border); border-radius: 6px; background: #fff; color: var(--dnet-text); font: inherit; }
.credit-note-upload__name input:focus { border-color: var(--dnet-green-hover); outline: 2px solid #cbe8da; outline-offset: 1px; }
.credit-note-upload__input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.credit-note-upload__remove { min-height: 34px; padding: 6px 9px; border: 1px solid #c9d8d0; border-radius: 6px; color: #7a2d2d; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.credit-note-upload__remove:hover, .credit-note-upload__remove:focus-visible { border-color: #a83d3d; color: #a83d3d; background: #fff7f7; }
.credit-note-upload__view { min-height: 34px; padding: 6px 9px; border: 1px solid var(--dnet-green-hover); border-radius: 6px; color: var(--dnet-green-hover); background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.credit-note-upload__view:hover, .credit-note-upload__view:focus-visible { color: #fff; background: var(--dnet-green-hover); }
.credit-note-upload__preview { width: min(900px, 90vw); height: min(720px, 88vh); padding: 0; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 12px 36px rgba(23,53,43,.28); }
.credit-note-upload__preview::backdrop { background: rgba(23,53,43,.58); }
.credit-note-upload__preview-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--dnet-border); color: var(--dnet-text); }
.credit-note-upload__preview-close { width: 30px; height: 30px; border: 0; border-radius: 4px; color: var(--dnet-text); background: transparent; font-size: 22px; line-height: 1; cursor: pointer; }
.credit-note-upload__preview-close:hover, .credit-note-upload__preview-close:focus-visible { background: #eef5f1; }
.credit-note-upload__preview img, .credit-note-upload__preview iframe { display: block; width: 100%; height: calc(100% - 51px); border: 0; object-fit: contain; background: #f5f7f6; }
.credit-note-upload__preview-message { margin: 24px; color: var(--dnet-text); }
.credit-note-upload__preview > .dnet-button { margin-left: 24px; }
.credit-note-request-preview { width: min(1050px, 94vw); max-height: min(840px, 92vh); padding: 0; border: 0; border-radius: 8px; background: #fff; box-shadow: 0 12px 36px rgba(23,53,43,.28); color: var(--dnet-text); }
.credit-note-request-preview::backdrop { background: rgba(23,53,43,.58); }
.cn-request-details__body { max-height: calc(min(840px, 92vh) - 51px); overflow-y: auto; overflow-x: hidden; padding: 18px 22px 24px; box-sizing: border-box; }
.cn-request-details__section { margin: 0 0 18px; padding: 0 0 16px; border-bottom: 1px solid var(--dnet-border); }
.cn-request-details__section:last-child { margin-bottom: 0; border-bottom: 0; }
.cn-request-details__section h3 { margin: 0 0 10px; color: var(--dnet-green-hover); font-size: 14px; }
.cn-request-details__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.cn-request-details__field { display: grid; grid-template-columns: minmax(130px, .7fr) minmax(0, 1.3fr); gap: 14px; padding: 7px 0; border-bottom: 1px solid #edf2ef; }
.cn-request-details__field dt { color: #527064; font-size: 12px; font-weight: 700; }
.cn-request-details__field dd { margin: 0; color: var(--dnet-text); font-size: 13px; overflow-wrap: anywhere; }
.cn-request-details__text { margin: 7px 0; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--dnet-text); font-size: 13px; }
.cn-request-details__muted { margin: 6px 0; color: #657a71; font-size: 13px; }
.cn-request-details__list, .cn-request-details__timeline { display: grid; gap: 7px; margin: 0; padding-left: 20px; color: var(--dnet-text); font-size: 13px; }
.cn-request-details__list a { color: var(--dnet-green-hover); font-weight: 700; }
.cn-request-details__list small { color: #657a71; }
.cn-request-details__timeline li { padding-left: 3px; }
.cn-request-details__timeline strong { display: block; color: #355148; font-size: 12px; }
.cn-request-details__timeline p { margin: 3px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.cn-request-details__toolbar { position: relative; z-index: 3; display: flex; gap: 6px; margin-left: auto; margin-right: 6px; }
.cn-request-details__tool { position: relative; z-index: 4; pointer-events: auto; cursor: pointer; box-sizing: border-box; width: auto; min-width: 112px; max-width: none; height: 32px; min-height: 32px; max-height: 32px; padding: 0 12px; border: 1px solid #b9d0c4; border-radius: 4px; background: #fff; color: #087d4f; font-size: 12px; font-weight: 700; white-space: nowrap; }
.cn-request-details__tool:hover, .cn-request-details__tool:focus-visible { border-color: #087d4f; background: #edf7f2; color: #005b3a; outline: 2px solid rgba(8, 125, 79, .22); outline-offset: 1px; }
.cn-request-details__tool[data-request-comment]::before { content: '☷'; }
.cn-request-details__tool[data-request-upload]::before { content: '▣'; }
.cn-request-details__tool::before { display: none; }
@media (max-width: 700px) { .cn-request-details__grid { grid-template-columns: 1fr; }.cn-request-details__body { padding: 14px; } }
.credit-note-invoice-search #cnTransSearchResults { max-height: 360px; overflow-y: auto; overflow-x: hidden; padding: 0 10px; border: 1px solid var(--dnet-border); border-radius: 8px; background: #fff; }
.cn-page-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding: 24px 28px; border-radius: 14px; color: #fff; background: linear-gradient(120deg, #005b3a, #087d4f); box-shadow: 0 8px 22px rgba(18,52,71,.12); }
.cn-page-header h1 { margin: 0; font-size: clamp(1.35rem, 2vw, 1.9rem); letter-spacing: -.02em; }
.cn-page-header p:not(.cn-eyebrow) { margin: 6px 0 0; color: rgba(255,255,255,.82); font-size: .92rem; }
.cn-eyebrow { margin: 0 0 6px; color: #087d4f; font-size: .68rem; font-weight: 850; letter-spacing: .14em; }
.cn-page-header .cn-eyebrow { color: #b9e4cf; }
.cn-button--light { border-color: rgba(255,255,255,.65); color: #005b3a; background: #fff; white-space: nowrap; }
.cn-summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.cn-summary-card, .cn-filter-card, .cn-table-card { border: 1px solid #d7e4de; border-radius: 12px; background: #fff; box-shadow: 0 5px 16px rgba(18,52,71,.05); }
.cn-summary-card { position: relative; display: grid; gap: 6px; min-height: 104px; padding: 16px 18px; overflow: hidden; }
.cn-summary-card::before { position: absolute; inset: 0 auto 0 0; width: 5px; background: #0b945c; content: ''; }
.cn-summary-card--blue::before { background: #2079a7; }.cn-summary-card--amber::before { background: #d28a20; }.cn-summary-card--slate::before { background: #71838b; }
.cn-summary-card span, .cn-summary-card small { color: #527064; font-size: .78rem; font-weight: 650; }.cn-summary-card strong { color: #123447; font-size: 1.75rem; line-height: 1; }.cn-summary-card small { font-size: .7rem; font-weight: 500; }
.cn-filter-card, .cn-table-card { margin-bottom: 18px; padding: 18px; }
.cn-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 15px; }.cn-section-heading h2 { margin: 0; color: #123447; font-size: 1.08rem; }.cn-section-heading .cn-eyebrow { margin-bottom: 3px; }.cn-result-count { color: #087d4f; font-size: .78rem; font-weight: 800; }.cn-legend { display: flex; align-items: center; gap: 7px; color: #527064; font-size: .72rem; font-weight: 650; }.cn-dot { width: 8px; height: 8px; border-radius: 50%; background: #d28a20; }.cn-dot--green { background: #0b945c; }
.cn-filter-grid { display: grid; grid-template-columns: minmax(180px, .75fr) minmax(220px, 1fr) minmax(230px, 1.2fr); gap: 14px; align-items: end; }.cn-filter-grid label { display: grid; gap: 6px; color: #355148; font-size: .75rem; font-weight: 750; }.cn-filter-grid input, .cn-filter-grid select { box-sizing: border-box; width: 100%; min-height: 40px; padding: 8px 10px; border: 1px solid #b9d0c4; border-radius: 7px; color: #17352b; background: #fff; font: inherit; }.cn-filter-grid input:focus, .cn-filter-grid select:focus { border-color: #087d4f; outline: 3px solid #cbe8da; }.cn-filter-note { display: grid; gap: 3px; min-height: 40px; padding: 8px 12px; border-left: 3px solid #0b945c; border-radius: 6px; background: #f0f8f4; color: #527064; font-size: .73rem; }.cn-filter-note strong { color: #005b3a; }
.cn-table-wrap { overflow-x: auto; border: 1px solid #d7e4de; border-radius: 9px; }.cn-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: .8rem; }.cn-table th { padding: 11px 12px; color: #fff; background: #174f38; font-size: .7rem; letter-spacing: .04em; text-align: left; text-transform: uppercase; }.cn-table td { padding: 13px 12px; border-top: 1px solid #e5eee9; vertical-align: top; }.cn-table tbody tr:nth-child(even) { background: #f8fbf9; }.cn-table tbody tr:hover { background: #edf7f2; }.cn-table td:first-child { display: grid; gap: 3px; min-width: 125px; }.cn-table td:first-child strong { color: #087d4f; }.cn-table td:first-child span, .cn-table td:first-child small, .cn-state-note { color: #527064; font-size: .7rem; }.cn-number { color: #123447; font-weight: 800; white-space: nowrap; }.cn-status { display: inline-flex; padding: 4px 8px; border-radius: 20px; color: #355148; background: #e8f0ec; font-size: .7rem; font-weight: 800; text-transform: capitalize; }.cn-status--approved { color: #05683d; background: #d8f0e2; }.cn-status--pending_approval { color: #8a5b0d; background: #fff0ce; }.cn-status--under_review { color: #145b80; background: #dceefa; }.cn-state-note { display: block; margin-top: 5px; }.cn-evidence { display: grid; gap: 5px; color: #527064; font-size: .72rem; white-space: nowrap; }.cn-actions { display: flex !important; flex-direction: row !important; gap: 5px; min-width: 105px; }.cn-icon-button { display: inline-grid; place-items: center; width: 30px; height: 30px; padding: 0; border: 1px solid #c8d4ce; border-radius: 4px; color: #5b6b64; background: #fff; font: inherit; font-weight: 800; text-decoration: none; cursor: pointer; }.cn-icon-button:hover, .cn-icon-button:focus-visible { border-color: currentColor; color: #34443d; background: #f1f5f3; outline: 2px solid rgba(66, 133, 102, .25); outline-offset: 1px; }.cn-empty { padding: 28px !important; color: #527064; text-align: center; }
.cn-icon-button[data-to-status] { width: auto; min-width: 58px; padding: 0 7px; }
.cn-icon-button--approve, .cn-icon-button--reject { width: auto; min-width: 62px; padding: 0 7px; }
.cn-icon-button--reject { border-color: #b83b35; color: #a33a34; }
.cn-icon-button--reject:hover, .cn-icon-button--reject:focus-visible { border-color: #a33a34; background: #a33a34; color: #fff; }
.cn-alert { display: flex; gap: 8px; margin-bottom: 16px; padding: 11px 14px; border-left: 4px solid #087d4f; border-radius: 6px; background: #eef8f3; font-size: .82rem; }.cn-alert--error { border-color: #b83b35; background: #fff0ef; }.cn-alert strong { color: #123447; }
@media (max-width: 1000px) { .cn-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.cn-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.cn-filter-note { grid-column: 1 / -1; } }
@media (max-width: 760px) { .credit-note-form__layout { grid-template-columns: 1fr; }.credit-note-upload { grid-column: auto; }.credit-note-form__actions { grid-column: auto; } }
@media (max-width: 600px) { .credit-note-workflow { padding: 0 2px; }.cn-page-header { display: grid; gap: 14px; padding: 18px; }.cn-page-header .cn-button { justify-self: start; }.cn-summary-grid { grid-template-columns: 1fr 1fr; gap: 9px; }.cn-summary-card { min-height: 92px; padding: 13px; }.cn-summary-card strong { font-size: 1.4rem; }.cn-filter-card, .cn-table-card { padding: 12px; }.cn-filter-grid { grid-template-columns: 1fr; }.cn-filter-note { grid-column: auto; }.cn-section-heading { align-items: flex-start; }.cn-legend { display: none; }.cn-alert { display: grid; } }

/* Dense enterprise action column: the title and ARIA label remain the text affordance. */
.cn-table { table-layout: fixed; min-width: 1040px; }
.cn-table th:nth-child(1), .cn-table td:nth-child(1) { width: 13%; }
.cn-table th:nth-child(2), .cn-table td:nth-child(2) { width: 12%; }
.cn-table th:nth-child(3), .cn-table td:nth-child(3) { width: 18%; }
.cn-table th:nth-child(4), .cn-table td:nth-child(4) { width: 8%; }
.cn-table th:nth-child(5), .cn-table td:nth-child(5) { width: 15%; }
.cn-table th:nth-child(6), .cn-table td:nth-child(6) { width: 20%; }
.cn-table th:nth-child(7), .cn-table td:nth-child(7) { width: 14%; }
.cn-table td:nth-child(3) { overflow-wrap: anywhere; }
.cn-actions { flex-wrap: wrap; min-width: 0; }
.cn-icon-button { width: 30px; min-width: 30px; font-size: 0; }
.cn-icon-button::before { display: inline-block; font-family: "Segoe UI Symbol", "Arial Unicode MS", sans-serif; font-size: 16px; line-height: 1; }
.cn-actions > a.cn-icon-button::before { content: '↗'; }
.cn-icon-button[data-creditnote-action="request-details"]::before { content: 'ⓘ'; }
.cn-icon-button[data-creditnote-action="documents"]::before { content: '▣'; }
.cn-icon-button[data-creditnote-action="cancel-request"]::before { content: '×'; }
.cn-icon-button[data-creditnote-action="process-request"]::before { content: '▶'; font-size: 13px; }
.cn-icon-button[data-to-status="under_review"]::before { content: '⌕'; }
.cn-icon-button[data-to-status="pending_approval"]::before { content: '➜'; }
.cn-icon-button--approve::before { content: '✓'; }
.cn-icon-button--reject::before { content: '×'; }
.cn-actions { display: table-cell !important; min-width: 0; white-space: nowrap; vertical-align: middle !important; }
.cn-table th:nth-child(3), .cn-table td:nth-child(3) { width: 16%; }
.cn-table th:nth-child(6), .cn-table td:nth-child(6) { width: 18%; }
.cn-table th:nth-child(7), .cn-table td:nth-child(7) { width: 20%; }
.cn-icon-button--details::before { content: 'ⓘ'; }
.cn-icon-button--approve, .cn-icon-button--reject { width: 30px; min-width: 30px; padding: 0; }
.cn-icon-button[data-creditnote-action="request-details"], .cn-icon-button--details, .cn-actions > a.cn-icon-button { color: #1467a5; }
.cn-icon-button[data-to-status="under_review"] { color: #1467a5; }
.cn-icon-button[data-to-status="pending_approval"], .cn-icon-button[data-creditnote-action="process-request"], .cn-icon-button--approve { color: #087d4f; }
.cn-icon-button[data-creditnote-action="cancel-request"], .cn-icon-button--reject { color: #b33b35; }
.cn-icon-button[data-creditnote-action="documents"] { color: #68766f; }
.cn-actions .cn-icon-button { box-sizing: border-box; width: 32px; min-width: 32px; max-width: 32px; height: 32px; min-height: 32px; max-height: 32px; padding: 0; border-radius: 4px; overflow: hidden; white-space: nowrap; flex: 0 0 32px; }
.cn-actions .cn-icon-button::before { pointer-events: none; }
.cn-actions { padding: 8px 10px !important; background: transparent !important; }
.cn-actions .cn-icon-button { border: 0; color: #4f6259; background: transparent; box-shadow: none; }
.cn-actions .cn-icon-button:hover, .cn-actions .cn-icon-button:focus-visible { border: 0; background: #edf3f0; color: #17352b; outline: 2px solid rgba(8, 125, 79, .22); outline-offset: 1px; }
.cn-actions .cn-icon-button[data-creditnote-action="request-details"], .cn-actions .cn-icon-button--details, .cn-actions > a.cn-icon-button, .cn-actions .cn-icon-button[data-to-status="under_review"] { color: #1467a5; }
.cn-actions .cn-icon-button[data-creditnote-action="process-request"], .cn-actions .cn-icon-button[data-to-status="pending_approval"], .cn-actions .cn-icon-button--approve { color: #087d4f; }
.cn-actions .cn-icon-button[data-creditnote-action="cancel-request"], .cn-actions .cn-icon-button--reject { color: #b33b35; }
.cn-actions .cn-icon-button[data-creditnote-action="documents"] { color: #68766f; }

/* Popup tools are text buttons, not table icon buttons. Keep the shared
   .cn-icon-button rules from collapsing or hiding their labels. */
.credit-note-request-preview .cn-request-details__toolbar { flex: 0 0 auto; align-items: center; }
.credit-note-request-preview .cn-request-details__toolbar .cn-request-details__tool {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: auto;
  min-width: 112px;
  max-width: none;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0 12px;
  overflow: visible;
  font-size: 12px;
  line-height: 1;
  white-space: nowrap;
}

.cn-action-modal { width: min(520px, 94vw); max-width: 520px; box-sizing: border-box; padding: 0; border: 0; border-radius: 8px; background: transparent; overflow: visible; }
.cn-action-modal::backdrop { background: rgba(23, 53, 43, .58); }
.cn-action-modal__panel { width: min(520px, 94vw); box-sizing: border-box; padding: 22px; border: 1px solid var(--dnet-border); border-radius: 8px; background: #fff; box-shadow: 0 12px 36px rgba(23, 53, 43, .28); color: var(--dnet-text); }
.cn-action-modal__heading { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--dnet-border); }
.cn-action-modal__heading h2 { margin: 0 0 14px; color: var(--dnet-green-hover); font-size: 18px; }
.cn-action-modal__details { margin: 14px 0; color: #527064; font-size: 13px; font-weight: 700; }
.cn-action-modal__form label { display: grid; gap: 7px; color: #355148; font-size: 13px; font-weight: 700; }
.cn-action-modal__form textarea { width: 100%; box-sizing: border-box; resize: vertical; padding: 9px 10px; border: 1px solid var(--dnet-field-border); border-radius: 6px; color: var(--dnet-text); background: #fff; font: inherit; }
.cn-action-modal__form textarea:focus { border-color: var(--dnet-green-hover); outline: 3px solid #cbe8da; }
.cn-action-modal__error { margin-top: 8px; color: #a33a34; font-size: 13px; }
.cn-action-modal__actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.cn-runtime-notice { position: fixed; z-index: 10001; top: 20px; right: 20px; max-width: min(420px, 90vw); padding: 12px 16px; border-left: 4px solid #087d4f; border-radius: 6px; background: #eef8f3; color: #17352b; box-shadow: 0 6px 18px rgba(23, 53, 43, .2); font-size: 13px; font-weight: 700; }
.cn-runtime-notice--error { border-color: #b33b35; background: #fff0ef; }

.credit-note-supporting-documents { width: min(760px, 92vw); max-height: min(620px, 86vh); }
.credit-note-supporting-documents .cn-supporting-documents__table { width: calc(100% - 32px); margin: 16px; border-collapse: collapse; color: var(--dnet-text); font-size: 13px; }
.cn-supporting-documents__table th { padding: 9px 10px; color: #fff; background: var(--dnet-green-hover); font-size: 12px; text-align: left; }
.cn-supporting-documents__table td { padding: 10px; border-bottom: 1px solid var(--dnet-border); vertical-align: top; }
.cn-supporting-documents__table tr:nth-child(even) { background: #f7faf8; }
.cn-supporting-documents__table a { color: var(--dnet-green-hover); font-weight: 700; }
.cn-supporting-documents__table small { display: block; margin-top: 3px; color: #657a71; font-size: 11px; }
