.dtf-sub-portal[hidden] {
  display: none !important;
}

.dtf-sub-portal {
  position: fixed;
  inset: 0;
  z-index: 80;
  overflow: auto;
  box-sizing: border-box;
  background: var(--bg, #eef2f5);
  color: var(--text, #24303a);
  font-family: var(--font-sans, "IBM Plex Sans", system-ui, sans-serif);
  padding: 0 0 calc(24px + env(safe-area-inset-bottom));
}

html.dtf-sub-portal-on body > :not(#dtf-sub-portal) {
  visibility: hidden;
}

.dtf-sub-portal-bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 16px;
  padding: calc(16px + env(safe-area-inset-top)) 20px 16px;
  background: #0b3d4a;
  background-image: linear-gradient(180deg, #0e4f5c 0%, #0b3d4a 55%, #082833 100%);
  color: #f4fbfb;
}

[data-theme="dark"] .dtf-sub-portal-bar {
  background: #061018;
  background-image: linear-gradient(125deg, #061018 0%, #0b3d4a 55%, #134e4a 100%);
}

.dtf-sub-portal-titles {
  min-width: 0;
}

.dtf-sub-portal-bar h1 {
  margin: 0 0 4px;
  color: #f4fbfb;
  font-family: var(--font-serif, "IBM Plex Serif", Georgia, serif);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.dtf-sub-portal-bar p {
  margin: 0;
  color: #d5e4ea;
}

.dtf-sub-signout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  flex: 0 0 auto;
  min-width: 44pt;
  min-height: 44pt;
  margin: 0;
  padding: 0 10px;
  border: 0;
  background: transparent;
  color: #d5e4ea;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dtf-sub-signout:focus-visible {
  outline: 2px solid #f4fbfb;
  outline-offset: 3px;
}

.dtf-sub-status-line,
.dtf-sub-portal [data-region="jobs"] {
  padding-left: 20px;
  padding-right: 20px;
}

.dtf-sub-status-line {
  min-height: 0;
  margin: 0 0 12px;
  color: var(--text-muted, #5b6b79);
}

.dtf-sub-status-line:empty {
  display: none;
}

.dtf-sub-job {
  margin: 0 0 20px;
}

.dtf-sub-job h2 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.dtf-sub-item {
  margin: 0 0 12px;
  padding: 16px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #c5d0da);
  border-radius: 16px;
}

.dtf-sub-meta,
.dtf-sub-desc,
.dtf-sub-state,
.dtf-sub-photo,
.dtf-sub-empty,
.dtf-sub-error {
  margin: 0 0 8px;
}

.dtf-sub-state {
  font-weight: 600;
}

.dtf-sub-error {
  color: #9f1239;
  font-weight: 600;
}

[data-theme="dark"] .dtf-sub-error {
  color: #ffb4b4;
}

.dtf-sub-file {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 56pt;
  margin: 0 0 12px;
  padding: 0 20px;
  border-radius: 999px;
  background: #24303a;
  color: #ffffff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.dtf-sub-file span,
[data-theme="dark"] .dtf-sub-file span {
  display: block;
  overflow: hidden;
  margin: 0;
  color: #ffffff;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dtf-sub-file input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dtf-sub-file:focus-within {
  outline: 3px solid #0f766e;
  outline-offset: 3px;
}

/* Mark fixed and Update photo. White on #0f766e is 5.47:1 in both themes. */
.dtf-sub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 44pt;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

[data-theme="dark"] .dtf-sub-btn {
  background: #0f766e;
  color: #ffffff;
}

.dtf-sub-btn:disabled,
[data-theme="dark"] .dtf-sub-btn:disabled {
  background: #c5d0ce;
  color: #1a2e2c;
  opacity: 1;
  cursor: not-allowed;
}

.dtf-sub-btn:focus-visible {
  outline: 3px solid #f4fbfb;
  outline-offset: 3px;
}
