/* Transaction forms, operational records and the authentication screen. */
.d-page,
.login.d-login {
  --d-border: var(--line, #dae3ee);
  --d-ink: var(--text, #172b44);
  --d-muted: var(--muted, #52667b);
  --d-blue: var(--blue, #285db0);
  --d-teal: #176b62;
  --d-amber: #8b6418;
  color: var(--d-ink);
  font-size: 13px;
  line-height: 1.6;
}
.d-page { display: grid; gap: 16px; width: 100%; min-width: 0; }
.d-page [hidden], .login.d-login [hidden] { display: none !important; }
.d-page h1, .d-login h1 { font-size: clamp(21px, 1.7vw, 27px); line-height: 1.45; font-weight: 600; margin: 0; }
.d-page h2 { font-size: 15px; line-height: 1.6; font-weight: 600; margin: 0; }
.d-heading { display: grid; gap: 9px; }
.d-title, .d-back, .d-button, .d-icon-box, .d-step > span, .d-step-icon, .d-feed-icon,
.d-meta, .d-meta > span, .d-code, .d-versions, .d-related, .d-login-link, .d-login-caption {
  display: inline-flex; align-items: center;
}
.d-back, .d-login-link { width: fit-content; text-decoration: none; color: var(--d-muted); gap: 5px; font-size: 12px; }
.d-back svg { transform: rotate(180deg); }
.d-back:hover, .d-login-link:hover { text-decoration: underline; color: var(--d-blue); }
.d-title { gap: 11px; }
.d-icon-box, .d-step-icon, .d-step > span, .d-feed-icon { flex: none; justify-content: center; }
.d-icon-box { color: var(--d-blue); background: #e4eefb; border-radius: 12px; width: 40px; height: 40px; }
.d-panel { min-width: 0; background: var(--surface, white); border: 1px solid var(--d-border); border-radius: 15px; box-shadow: 0 2px 6px #20395706; overflow: clip; }
.d-button, .d-page button.d-button, .login button.d-button { justify-content: center; gap: 7px; padding: 7px 12px; min-height: 36px; border: 1px solid #cfdae7; border-radius: 8px; background: #fff; color: var(--d-ink); text-decoration: none; line-height: 1.5; font-size: 12px; font-weight: 500; }
.d-button:hover, .d-page button.d-button:hover { background: #edf3fb; border-color: #b7c9dd; }
.d-page .d-primary, .login.d-login .d-primary { background: var(--d-blue) !important; border-color: var(--d-blue) !important; color: white !important; }
.d-page .d-primary:hover, .login.d-login .d-primary:hover { background: #1f4c92 !important; }
.d-page :where(input, select, textarea), .login.d-login input {
  min-width: 0; max-width: 100%; width: 100%; min-height: 37px; border-radius: 7px; border: 1px solid #cbd7e4;
  color: var(--d-ink); background: white; padding: 7px 10px; font: inherit; font-size: 12px; line-height: 1.5;
}
.d-page :where(input, select, textarea):disabled { background: #f0f3f7; color: #687787; }
.d-page :where(input, select, textarea)::placeholder { color: #677a90; }
.d-page :where(input, select, textarea):focus-visible, .login.d-login input:focus-visible {
  outline: 2px solid #85a9da; outline-offset: 1px; border-color: var(--d-blue);
}
.d-page input[type=date], .d-page input[type=time], .d-page input[type=datetime-local] { direction: ltr; }
.d-generated-code { display: grid; align-content: start; gap: 5px; font-size: 12px; font-weight: 500; }
.d-generated-code output {
  display: flex; align-items: center; justify-content: flex-start; min-height: 37px; padding: 6px 10px;
  border: 1px dashed #c1d2df; border-radius: 7px; background: #f5f8fb; color: #36516b; text-align: start;
}
.d-saved-code {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 12px 20px;
  border-bottom: 1px solid #d8e7e2; background: #f1f8f5; color: #245b4f;
}
.d-saved-code span { display: inline-flex; align-items: center; gap: 6px; }
.d-saved-code bdi { font-size: 15px; font-weight: 650; }
.d-entity-tools, .d-entity-tabs, .d-entity-row-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.d-entity-tools { justify-content: space-between; }
.d-entity-tabs [aria-current="page"] { color: var(--d-blue); background: #eaf2ff; border-color: #b8cdeb; }
.d-entity-row-actions { gap: 6px 12px; }
.d-entity-row-actions a { white-space: nowrap; }
.d-page .d-delete-link { color: #9a293c; }
.d-page button.d-danger { color: white; background: #9a293c; border-color: #9a293c; }
.d-page button.d-danger:hover { background: #7d2131; border-color: #7d2131; }
.d-delete-effect { margin: 0; padding: 0 20px 16px; }
.d-entity-target { padding: 14px 18px; }
.d-entity-target h2 { margin-bottom: 6px; }
.d-entity-target p { color: var(--d-muted); margin: 4px 0 0; }
.d-picker { position: relative; display: block; min-width: 0; }
.d-picker-enhanced:not(.d-note-picker) > [data-picker-value] {
  position: absolute; width: 1px; height: 1px; min-height: 0; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); pointer-events: none;
}
.d-page .d-picker-trigger {
  display: flex; align-items: center; justify-content: space-between; gap: 7px; width: 100%;
  min-height: 37px; padding: 7px 10px; background: #fff; color: var(--d-ink); border: 1px solid #cbd7e4;
  border-radius: 7px; font: inherit; text-align: start; cursor: pointer;
}
.d-picker-trigger:hover { border-color: #7190bc; }
.d-note-picker .d-picker-trigger { margin-block-start: 5px; width: auto; }
.d-picker-trigger > svg { flex: none; color: var(--d-blue); }
.d-picker-trigger:focus-visible, .d-picker-dialog button:focus-visible {
  outline: 2px solid #416ca5; outline-offset: 2px;
}
.d-picker-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-page .d-picker-placeholder { color: #53677c; }
.d-picker-dialog {
  width: min(440px, calc(100vw - 32px)); max-width: 100%; max-height: min(610px, 85dvh); margin: auto;
  padding: 16px; overflow: hidden; border: 1px solid #c6d4e3; border-radius: 14px;
  background: white; color: var(--d-ink); box-shadow: 0 16px 55px #20395738; font: inherit;
}
.d-picker-dialog[open] { display: flex; flex-direction: column; gap: 10px; }
.d-picker-dialog::backdrop { background: #172c455c; }
.d-picker-head, .d-picker-dialog footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.d-picker-dialog .d-picker-close {
  display: grid; place-items: center; padding: 6px; border: 0; border-radius: 7px; background: #f0f4f8; color: #385571;
}
.d-page .d-picker-search { position: relative; display: block; }
.d-picker-search > svg { position: absolute; inset-inline-start: 10px; top: 50%; transform: translateY(-50%); color: #58738e; }
.d-page .d-picker-search input { padding-inline-start: 34px; }
.d-picker-list { overflow-y: auto; overscroll-behavior: contain; min-height: 0; max-height: 48dvh; scrollbar-width: thin; }
.d-picker-list [role=option] { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 38px;
  padding: 7px 10px; border-radius: 7px; text-align: start; overflow-wrap: anywhere; cursor: pointer; }
.d-picker-list [data-active], .d-picker-list [role=option]:hover { background: #edf3fa; }
.d-picker-list [aria-selected=true] { color: #204e8d; font-weight: 600; }
.d-picker-list [aria-selected=true]::after { content: "✓"; }
.d-picker-list[aria-multiselectable=true] [role=option]::after {
  flex: none; content: ""; width: 18px; height: 18px; border: 1px solid #8092a6; border-radius: 4px;
}
.d-picker-list[aria-multiselectable=true] [aria-selected=true]::after { content: "✓"; color: white; background: #285db0; border-color: #285db0; text-align: center; line-height: 18px; }
.d-picker-status { margin: 0; color: #52667b; }
.d-picker-status:empty, .d-picker-dialog footer:not(:has(button:not([hidden]))) { display: none; }
.d-picker-dialog footer { border-top: 1px solid #e0e7ef; padding: 10px 0 0; background: white; }
.d-picker-dialog footer button { font: inherit; padding: 6px 12px; border: 1px solid #cbd7e4; color: #285384; background: #fff; border-radius: 7px; }
.d-picker-dialog footer .d-picker-apply { margin-inline-start: auto; background: #285db0; color: white; border-color: #285db0; }
.d-picker-dialog button:disabled { opacity: .5; cursor: default; }
@media (max-width: 590px) {
  .d-picker-dialog { width: 100%; max-width: 100%; max-height: 85dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; padding-bottom: max(16px, env(safe-area-inset-bottom)); }
  .d-picker-list [role=option] { min-height: 44px; }
  .d-page .d-picker-search input { font-size: 16px; }
}
.d-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
.d-page label, .login.d-login label { display: grid; align-content: start; gap: 5px; font: inherit; font-size: 12px; font-weight: 500; min-width: 0; }
.d-filters label { flex: 1 1 140px; max-width: 230px; }
.d-filters label:first-child:last-of-type { max-width: 480px; }
.d-filters .d-button { min-height: 37px; }
.d-scroll { overflow-x: auto; scrollbar-width: thin; width: 100%; }
.d-table { border-collapse: collapse; box-sizing: border-box; width: 100%; color: var(--d-ink); font-size: 12px; line-height: 1.7; text-align: start; }
.d-table th, .d-table td { padding: 10px 15px; border: none; border-bottom: 1px solid #e6ecf3; text-align: start; }
.d-table th { font-size: 11px; font-weight: 600; color: #53667c; background: #f3f6fa; white-space: nowrap; }
.d-table td { vertical-align: top; overflow-wrap: anywhere; }
.d-table tr:last-child td { border-bottom: 0; }
.d-table tbody tr:hover { background: #f6f9fd; }
.d-empty { padding: 41px 14px; display: grid; justify-items: center; gap: 10px; text-align: center; color: var(--d-muted); }
.d-empty > svg { color: #657e98; }
.d-empty p, .d-filter-empty { margin: 0; }
.d-report h2, .d-record-head, .d-doc-top { padding: 16px 20px; border-bottom: 1px solid #e4eaf2; }
.d-record-head, .d-doc-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.d-related, .d-versions, .d-meta { gap: 12px; flex-wrap: wrap; }
.d-meta > span, .d-code { gap: 6px; }
.d-meta { color: var(--d-muted); font-size: 12px; }
.d-code { padding: 3px 9px; border: 1px solid #d8e4f1; border-radius: 6px; color: #315575; background: #f1f6fb; font-size: 12px; font-variant-numeric: tabular-nums; }
.d-properties { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 25px; margin: 0; padding: 5px 20px 14px; }
.d-properties > div { padding: 12px 0 10px; border-bottom: 1px solid #e6ecf2; min-width: 0; display: grid; gap: 2px; align-content: start; }
.d-properties dt { color: var(--d-muted); font-size: 11px; }
.d-properties dd { overflow-wrap: anywhere; margin: 0; color: var(--d-ink); font-weight: 500; }
.d-nested { display: grid; grid-template-columns: minmax(0,1fr); gap: 5px; margin: 3px 0; }
.d-nested > div { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px; }
.d-values { padding-inline-start: 15px; margin: 0; }
.d-related { display: flex; border-top: 1px solid #e5ebf1; padding: 14px 20px; }
.d-versions { color: var(--d-muted); }
.d-record > a.d-button { margin: 0 20px 16px; }
.d-item-photo { display: block; max-width: 230px; max-height: 190px; object-fit: contain; margin: 18px 20px 3px; }
.d-photo-field { display: grid; justify-items: start; gap: 7px; padding-block-start: 12px; border-top: 1px solid var(--d-border); }
.d-photo-field input[type=file] { width: min(100%, 420px); }
.d-photo-field p { margin: 0; color: var(--d-muted); font-size: 12px; }
.d-photo-field p:empty, [data-photo-submit-error]:empty { display: none; }
.d-photo-preview { display: block; max-width: 100%; width: auto; height: auto; max-height: 170px; border-radius: 6px; }
.d-page .d-photo-remove { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.d-photo-remove input { width: 18px; min-height: 18px; margin: 0; }
.d-form-actions [data-photo-submit-error] { flex-basis: 100%; margin: 0; color: #882f39; }
.d-pager, .d-form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.d-steps { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-1 { --stage-ink: #2f5f99; --stage-fill: #e7f0fc; }
.step-2 { --stage-ink: #176b62; --stage-fill: #e0f1ed; }
.step-3 { --stage-ink: #87611c; --stage-fill: #fff1cf; }
.d-step { display: inline-flex; align-items: center; gap: 6px; padding: 4px 7px; border: 1px solid transparent; border-radius: 8px; text-decoration: none; font-size: 12px; color: var(--d-muted); }
.d-step:hover, .d-step[aria-current] { color: var(--d-ink); border-color: #cfdaea; background: #fff; }
.d-step > span, .d-step-icon { background: var(--stage-fill); color: var(--stage-ink); width: 26px; height: 26px; border-radius: 7px; }
form.editor.d-editor { padding: 0; border: 0; background: none; max-width: none; margin: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 15px; }
.d-form-section { scroll-margin-top: 82px; }
.d-form-section h2 { display: flex; align-items: center; gap: 9px; padding: 12px 18px; font-size: 14px; border-bottom: 1px solid #e6ecf2; }
.d-fields { padding: 16px 18px 18px; display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,225px),1fr)); gap: 13px 16px; }
.d-fields > .d-wide, .d-fields > .d-repeat { grid-column: 1/-1; }
.d-required { color: var(--d-blue); font-size: 10px; margin-inline-start: 3px; }
.d-repeat { margin: 0; min-width: 0; padding: 11px 12px; border: 1px solid #dbe5ed; border-radius: 10px; }
.d-single-repeat { border: 0; padding: 0; }
.d-visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.d-repeat legend { color: #344d64; font-weight: 600; font-size: 12px; padding-inline: 4px; }
.d-line { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; margin: 0; padding: 4px 0 10px; }
.d-line + .d-line { border-top: 1px dashed #cbd7e3; padding-top: 12px; }
.d-line label { flex: 1 1 130px; }
.d-remove { color: #8b454d; border: 1px solid #e8d6da; background: white; display: inline-grid; place-items: center; min-width: 35px; height: 36px; border-radius: 7px; padding: 6px; }
.d-remove:hover { color: #8c2e3a; background: #fcf1f1; }
.d-line-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-block-start: 3px; }
.d-line-tools .d-button { min-height: 31px !important; padding: 4px 8px !important; color: var(--d-blue) !important; }
.d-line-tools [role=status] { font-size: 12px; color: var(--d-muted); }
.d-form-actions { padding: 0 0 5px; }
.d-feed { list-style: none; margin: 0; padding: 0 20px; }
.d-feed li { display: flex; align-items: start; gap: 11px; padding: 15px 0; border-bottom: 1px solid #e8edf3; }
.d-feed li:last-child { border: 0; }
.d-feed-icon { width: 31px; height: 31px; border-radius: 10px; color: #386ca0; background: #e9f2fc; }
.d-feed li[data-kind=required] .d-feed-icon { color: #88641e; background: #fff0cf; }
.d-feed-body { min-width: 0; overflow-wrap: anywhere; }
.d-feed-body > p { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin: 0 0 2px; }
.d-feed-body a { text-decoration: none; font-weight: 550; }
.d-feed-body a:hover { text-decoration: underline; color: var(--d-blue); }
.d-feed-body > span, .d-feed time { color: var(--d-muted); font-size: 12px; }
.d-feed time { direction: ltr; margin-inline-start: auto; white-space: nowrap; }
.d-status { display: inline-flex; border-radius: 5px; padding: 1px 6px; font-size: 10px; line-height: 1.7; }
.d-amber { color: #775314; background: #fff1d1; }
.d-blue { color: #2f5d8f; background: #eaf1fd; }
.d-switches { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #edf2f8; border-radius: 7px; }
.d-switches button { color: var(--d-muted); font-size: 11px; padding: 4px 7px; border: 0; background: transparent; border-radius: 5px; }
.d-switches button[aria-pressed=true] { color: var(--d-blue); background: #fff; box-shadow: 0 1px 3px #203e6522; }
.d-filter-empty { padding: 20px; color: var(--d-muted); }
.d-error { justify-items: start; padding: 24px; }
.d-error p { margin: 0; }
.signed-out main:has(> .d-login) { min-height: 100svh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px 16px; }
.login.d-login { width: min(390px,100%); background: white; margin: 0; border: 1px solid var(--d-border); border-radius: 16px; box-shadow: 0 8px 28px #173a5d0e; }
.d-login-form { padding: clamp(20px,4vw,32px); }
.d-login-brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 19px; }
.d-login .d-login-logo { display: block; height: 52px; width: auto; object-fit: contain; }
.d-login h1 { font-size: 23px; margin: 0 0 23px; }
.d-login form { display: grid; gap: 14px; }
.d-login form input { margin: 0; }
.login .password-entry { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 5px; margin: 0; }
.login .password-entry button { min-height: 37px; border: 1px solid #cbd7e4; border-radius: 7px; background: #f2f6fb; font-size: 11px; color: var(--d-blue); padding: 5px 9px; }
.d-login-submit { margin-block-start: 5px; }
.d-login-link { margin-block-start: 18px; color: var(--d-blue); }
.d-login-error { background: #faeff0; color: #882f39; padding: 9px 12px; border-radius: 7px; display: flex; align-items: center; gap: 6px; }
.d-login-caption { gap: 6px; background: #fffaf0; border: 1px solid #efdeaf; border-radius: 6px; padding: 3px 8px; color: #76591d; font-size: 11px; }
.d-trial-dot { width: 7px; height: 7px; border-radius: 100%; background: #d1a039; }
@media (max-width: 760px) {
  .d-filters, .d-fields { padding: 13px; }
  .d-feed { padding-inline: 12px; }
  .d-table th, .d-table td { padding: 8px 10px; }
  .d-form-section h2, .d-record-head, .d-doc-top, .d-report h2 { padding: 12px 14px; }
  .d-properties { padding-inline: 14px; gap: 0 14px; }
}
@media (max-width: 590px) {
  .d-page { gap: 12px; }
  .d-properties { grid-template-columns: minmax(0,1fr); }
  .d-steps { gap: 3px; }
  .d-step { padding: 4px; font-size: 11px; }
  .d-filters label { max-width: none; flex-basis: 42%; }
  .d-filters label:first-child:last-of-type { flex-basis: 100%; }
  .d-feed li { flex-wrap: wrap; }
  .d-feed-body { flex: 1; }
  .d-feed time { width: 100%; text-align: right; }
}
.d-family-menu { color: var(--d-ink); }
.d-family-menu summary { width: fit-content; padding: 6px 0; font-size: 13px; cursor: pointer; }
.master-search-page .d-filters label:first-child { flex: 2 1 260px; max-width: 520px; }
.search-section header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 17px; border-block-end: 1px solid var(--d-border); }
.search-section h2 { margin: 0; font-size: 15px; }
.search-section ul { margin: 0; padding: 0; list-style: none; }
.search-section li + li { border-block-start: 1px solid var(--d-border); }
.search-section li > * { display: grid; gap: 3px; padding: 9px 17px; overflow-wrap: anywhere; }
.search-section li > a:hover, .search-section li > a:focus-visible { background: #f2f7fb; }
.search-section li small { color: var(--d-muted); }
.search-section li:has(.search-related) { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.search-section .search-related { font-size: 12px; }
.d-change-section { padding: 15px 18px; }
.d-change-section h2 { font-size: 15px; margin: 0 0 10px; }
.d-change-section p, .d-change-origin { margin: 0 0 12px; }
.d-change-links, .d-change-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.d-change-form { display: grid; gap: 14px; max-width: 560px; }
.d-change-confirm input { width: 18px; min-height: 18px; }
.d-change-history { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.d-change-history li { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.d-family-menu nav { display: flex; flex-wrap: wrap; gap: 6px; padding-block: 5px 8px; }
@media (pointer: coarse) { .d-family-menu summary { min-height: 44px; } }
