/* Scoped to .dpsm so the site's own theme and any Bootstrap on the page are left alone.
   The three colors are set on the element from the site's own color. */
.dpsm { --dpsm-accent: #093254; --dpsm-on: #fff; --dpsm-ink: #093254; --dpsm-line: #e4e7ec; --dpsm-muted: #667085; --dpsm-text: #1d2939; --dpsm-soft: color-mix(in srgb, var(--dpsm-accent) 8%, #fff); max-width: 100%; color: var(--dpsm-text); font-size: 15px; line-height: 1.5; text-align: left; }
.dpsm *, .dpsm *::before, .dpsm *::after { box-sizing: border-box; }
.dpsm p { margin: 0 0 12px; }
.dpsm p:last-child { margin-bottom: 0; }
.dpsm form { margin: 0; }
.dpsm .dpsm-icon { width: 16px; height: 16px; flex: none; }

/* Heading and tabs */
.dpsm .dpsm-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 16px; }
.dpsm .dpsm-title { display: flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 700; letter-spacing: -.01em; }
.dpsm .dpsm-mark { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--dpsm-accent); color: var(--dpsm-on); }
.dpsm .dpsm-mark .dpsm-icon { width: 20px; height: 20px; }
.dpsm .dpsm-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--dpsm-line); border-radius: 12px; background: #fff; }
.dpsm .dpsm-tabs a.dpsm-tab { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; color: var(--dpsm-muted); font-size: 14px; font-weight: 600; text-decoration: none; }
.dpsm .dpsm-tabs a.dpsm-tab:hover { background: var(--dpsm-soft); color: var(--dpsm-ink); }
.dpsm .dpsm-tabs a.dpsm-tab[aria-current="page"] { background: var(--dpsm-accent); color: var(--dpsm-on); }

/* Cards */
.dpsm .dpsm-card { margin: 0 0 16px; overflow: hidden; border: 1px solid var(--dpsm-line); border-radius: 14px; background: #fff; color: var(--dpsm-text); box-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 12px 28px -18px rgba(16, 24, 40, .22); }
.dpsm .dpsm-pad { padding: 20px 24px; }
.dpsm .dpsm-center { text-align: center; }
.dpsm .dpsm-scroll { overflow-x: auto; }
.dpsm .dpsm-heading { display: block; font-size: 17px; font-weight: 700; }
.dpsm .dpsm-meta { color: var(--dpsm-muted); font-size: 13.5px; }
.dpsm .dpsm-intro { color: var(--dpsm-muted); }

/* Tables */
.dpsm table.dpsm-table { width: 100%; margin: 0; border: 0; border-collapse: collapse; table-layout: auto; font-size: 14px; }
.dpsm table.dpsm-table th, .dpsm table.dpsm-table td { padding: 12px 16px; border: 0; border-top: 1px solid var(--dpsm-line); background: transparent; color: inherit; text-align: left; vertical-align: middle; }
.dpsm table.dpsm-table thead th { background: #f9fafb; color: var(--dpsm-muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.dpsm table.dpsm-table thead tr:first-child th { border-top: 0; }
.dpsm table.dpsm-table tbody tr:hover td { background: var(--dpsm-soft); }
.dpsm table.dpsm-table tr.dpsm-unread td { font-weight: 650; }
.dpsm table.dpsm-table tr.dpsm-unread td:first-child { box-shadow: inset 3px 0 0 var(--dpsm-accent); }
.dpsm td.dpsm-sender { overflow-wrap: anywhere; }
.dpsm td.dpsm-sender::before { content: attr(data-initial); display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px; border-radius: 50%; background: var(--dpsm-soft); color: var(--dpsm-ink); font-size: 13px; font-weight: 700; vertical-align: middle; }
.dpsm td.dpsm-read { color: var(--dpsm-muted); font-size: 13px; }
.dpsm table.dpsm-table td.dpsm-read:empty::after { content: "Unread"; display: inline-block; padding: 1px 10px; border-radius: 999px; background: var(--dpsm-soft); color: var(--dpsm-ink); font-size: 12px; font-weight: 600; }
.dpsm th[data-sortable] { cursor: pointer; user-select: none; }
.dpsm th[data-sortable]::after { content: " \2195"; opacity: .3; }
.dpsm th[aria-sort="ascending"]::after { content: " \2191"; opacity: 1; }
.dpsm th[aria-sort="descending"]::after { content: " \2193"; opacity: 1; }
.dpsm .dpsm-actions { white-space: nowrap; }
.dpsm .dpsm-actions .dpsm-btn + .dpsm-btn { margin-left: 4px; }

/* Buttons and fields */
.dpsm .dpsm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0; padding: 7px 14px; border: 1px solid var(--dpsm-accent); border-radius: 8px; background: var(--dpsm-accent); color: var(--dpsm-on); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); font: inherit; font-size: 14px; font-weight: 600; line-height: 1.4; letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer; }
.dpsm .dpsm-btn:hover, .dpsm .dpsm-btn:focus { border-color: var(--dpsm-accent); background: var(--dpsm-accent); color: var(--dpsm-on); filter: brightness(1.1); text-decoration: none; }
.dpsm .dpsm-btn.dpsm-btn-quiet { border-color: #d0d5dd; background: #fff; color: var(--dpsm-text); }
.dpsm .dpsm-btn.dpsm-btn-quiet:hover, .dpsm .dpsm-btn.dpsm-btn-quiet:focus { background: #f9fafb; color: var(--dpsm-text); filter: none; }
.dpsm .dpsm-btn.dpsm-btn-danger { border-color: #fecdca; background: #fff; color: #b42318; }
.dpsm .dpsm-btn.dpsm-btn-danger:hover, .dpsm .dpsm-btn.dpsm-btn-danger:focus { background: #fef3f2; color: #912018; filter: none; }
.dpsm button.dpsm-link { display: inline; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: var(--dpsm-ink); font: inherit; letter-spacing: normal; text-transform: none; text-decoration: underline; cursor: pointer; }
.dpsm .dpsm-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dpsm .dpsm-center .dpsm-buttons { justify-content: center; }
.dpsm input[type="text"], .dpsm input[type="email"], .dpsm input[type="search"], .dpsm input[type="date"], .dpsm select, .dpsm textarea { width: 100%; height: auto; margin: 0; padding: 9px 12px; border: 1px solid #d0d5dd; border-radius: 8px; background-color: #fff; color: var(--dpsm-text); font: inherit; font-size: 15px; line-height: 1.4; }
.dpsm input[type="email"] { max-width: 420px; }
.dpsm input:focus, .dpsm select:focus, .dpsm textarea:focus { border-color: var(--dpsm-accent); outline: 3px solid color-mix(in srgb, var(--dpsm-accent) 22%, transparent); outline-offset: 0; }
.dpsm input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--dpsm-accent); vertical-align: middle; }
.dpsm .dpsm-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.dpsm .dpsm-choice { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px; border: 1px solid var(--dpsm-line); border-radius: 999px; font-size: 14px; cursor: pointer; }

/* Search, page size and paging */
.dpsm .dpsm-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--dpsm-line); color: var(--dpsm-muted); font-size: 13.5px; }
.dpsm .dpsm-controls:first-child { border-top: 0; }
.dpsm .dpsm-controls label { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-weight: 400; }
.dpsm .dpsm-controls select { width: auto; min-width: 72px; padding: 6px 28px 6px 10px; font-size: 14px; }
.dpsm .dpsm-controls input[type="search"] { width: 240px; max-width: 100%; padding: 7px 12px; font-size: 14px; }
.dpsm .dpsm-pages { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.dpsm .dpsm-pages button { margin: 0; padding: 4px 11px; border: 1px solid #d0d5dd; border-radius: 7px; background: #fff; box-shadow: none; color: var(--dpsm-text); font: inherit; font-size: 13px; cursor: pointer; }
.dpsm .dpsm-pages button[aria-current="page"] { border-color: var(--dpsm-accent); background: var(--dpsm-accent); color: var(--dpsm-on); }
.dpsm .dpsm-pages button:disabled { opacity: .45; cursor: default; }

/* A single message */
.dpsm .dpsm-head { display: flex; gap: 14px; align-items: flex-start; padding: 20px 24px; }
.dpsm .dpsm-avatar { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; background: var(--dpsm-soft); color: var(--dpsm-ink); font-size: 18px; font-weight: 700; }
.dpsm .dpsm-head p { margin: 0 0 2px; }
.dpsm .dpsm-from { font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.dpsm .dpsm-subject { font-size: 15px; }
.dpsm .dpsm-body { overflow-wrap: anywhere; }
.dpsm dl.dpsm-fields { margin: 0; }
.dpsm .dpsm-field { display: grid; grid-template-columns: minmax(130px, 28%) 1fr; gap: 4px 16px; padding: 11px 24px; border-top: 1px solid var(--dpsm-line); }
.dpsm .dpsm-field-wide { grid-template-columns: 1fr; }
.dpsm .dpsm-field dt { margin: 0; color: var(--dpsm-muted); font-size: 13.5px; font-weight: 600; }
.dpsm .dpsm-field dd { margin: 0; }
.dpsm .dpsm-field dd:empty::after { content: "\2014"; color: var(--dpsm-muted); }
.dpsm .dpsm-toolbar { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--dpsm-line); background: #f9fafb; }
.dpsm .dpsm-toolbar .dpsm-end { margin-left: auto; }

/* Replies */
.dpsm .dpsm-thread { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; }
.dpsm .dpsm-reply { max-width: 88%; padding: 12px 16px; border: 1px solid var(--dpsm-line); border-radius: 14px; background: #fff; color: var(--dpsm-text); }
.dpsm .dpsm-reply .dpsm-meta { margin: 0 0 4px; font-size: 12.5px; }
.dpsm .dpsm-reply-staff { align-self: flex-end; border-color: color-mix(in srgb, var(--dpsm-accent) 25%, #fff); border-bottom-right-radius: 4px; background: var(--dpsm-soft); }
.dpsm .dpsm-reply-sender { align-self: flex-start; border-bottom-left-radius: 4px; }

/* Notices and labels */
.dpsm .dpsm-alert { margin: 0 0 16px; padding: 12px 16px; border: 1px solid; border-radius: 10px; font-size: 14px; }
.dpsm .dpsm-alert-success { color: #05603a; background: #ecfdf3; border-color: #abefc6; }
.dpsm .dpsm-alert-warning { color: #93370d; background: #fffaeb; border-color: #fedf89; }
.dpsm .dpsm-alert-danger { color: #912018; background: #fef3f2; border-color: #fecdca; }
.dpsm .dpsm-badge { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; background: var(--dpsm-accent); color: var(--dpsm-on); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.dpsm .dpsm-pill { display: inline-block; margin-left: 6px; padding: 1px 10px; border-radius: 999px; background: var(--dpsm-soft); color: var(--dpsm-ink); font-size: 12px; font-weight: 600; }

/* Maker's mark */
.dpsm .dpsm-brand { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 0 4px; color: var(--dpsm-muted); font-size: 12.5px; }
.dpsm .dpsm-brand-name { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.dpsm .dpsm-brand .dpsm-icon { width: 13px; height: 13px; }
.dpsm .dpsm-brand a { display: inline-block; line-height: 0; opacity: .9; }
.dpsm .dpsm-brand a:hover, .dpsm .dpsm-brand a:focus { opacity: 1; }
.dpsm .dpsm-brand img { display: inline-block; width: auto; height: 32px; margin: 0; border: 0; box-shadow: none; }

/* The sender's reply page, which stands outside the theme */
body.dpsm-page { margin: 0; padding: 32px 16px; background: #f2f4f7; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.dpsm.dpsm-portal { max-width: 600px; margin: 0 auto; font-size: 16px; }
.dpsm .dpsm-banner { display: flex; align-items: center; gap: 14px; padding: 18px 24px; border-top: 4px solid var(--dpsm-accent); border-bottom: 1px solid var(--dpsm-line); background: var(--dpsm-soft); }
.dpsm .dpsm-banner h1 { margin: 0; color: var(--dpsm-ink); font-size: 19px; line-height: 1.3; }
.dpsm .dpsm-banner p { margin: 0; color: var(--dpsm-muted); font-size: 13px; }
.dpsm.dpsm-portal label { display: block; margin: 16px 0 6px; font-size: 14px; font-weight: 600; }
.dpsm.dpsm-portal a { color: var(--dpsm-ink); }
.dpsm.dpsm-portal .dpsm-brand a { color: inherit; }

/* Phones: each message becomes a small card */
@media (max-width: 640px) {
    .dpsm table.dpsm-stack thead { display: none; }
    .dpsm table.dpsm-stack, .dpsm table.dpsm-stack tbody, .dpsm table.dpsm-stack tr, .dpsm table.dpsm-stack td { display: block; width: 100%; }
    .dpsm table.dpsm-stack tr { padding: 10px 0; border-top: 1px solid var(--dpsm-line); }
    .dpsm table.dpsm-stack td { padding: 3px 16px; border-top: 0; }
    .dpsm table.dpsm-stack tr.dpsm-unread td:first-child { box-shadow: none; }
    .dpsm table.dpsm-stack tr.dpsm-unread { box-shadow: inset 3px 0 0 var(--dpsm-accent); }
    .dpsm table.dpsm-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--dpsm-muted); font-size: 12px; font-weight: 600; }
    .dpsm table.dpsm-stack td.dpsm-actions { padding-top: 8px; }
    .dpsm .dpsm-field { grid-template-columns: 1fr; }
    .dpsm .dpsm-head, .dpsm .dpsm-pad, .dpsm .dpsm-toolbar, .dpsm .dpsm-field, .dpsm .dpsm-banner { padding-left: 16px; padding-right: 16px; }
    .dpsm .dpsm-reply { max-width: 100%; }
    .dpsm .dpsm-controls input[type="search"] { width: 180px; }
}

/* Some themes underline every link in page content, with selectors that outrank ours. */
.dpsm a.dpsm-btn, .dpsm a.dpsm-tab, .dpsm .dpsm-brand a { text-decoration: none !important; }
.dpsm td.dpsm-date { white-space: nowrap; }
.dpsm.dpsm-portal .dpsm-pad form + form { margin-top: 18px; }
.dpsm.dpsm-portal .dpsm-pad button.dpsm-link { font-size: 14px; }
.dpsm.dpsm-portal .dpsm-pad > .dpsm-meta:last-child { margin-top: 12px; }
.dpsm.dpsm-portal .dpsm-pad form + p { margin-top: 14px; }
