/* Career. Layout only; colour, type, and cards come from /ui/shell.css --dx-* tokens. */

[hidden] {
  display: none !important;
}

body.dx {
  max-width: none;
  margin: 0;
  background: transparent;
  color: var(--dx-text);
  font-family: var(--dx-font);
  padding-bottom: calc(104px + env(safe-area-inset-bottom));
}

/* Shell header is full-bleed. Keep the title and actions on one row when they fit,
   and wrap the actions under the title at 360px so nothing scrolls sideways. */
.dx-header {
  flex-wrap: wrap;
  row-gap: 0;
}

.dx-header .dx-title {
  flex: 0 1 auto;
}

.dx-actions {
  flex: 1 1 16rem;
  min-width: 0;
  margin-left: auto;
  justify-content: flex-end;
}

#sync-label {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
  font-size: 0.75rem;
  color: var(--dx-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.shortlist-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--dx-accent);
  font-size: 0.85rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.dx-header .dong-theme-toggle {
  position: static;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  margin: 0;
}

.dx-header .dong-theme-toggle__knob {
  top: 11px;
}

/* Suite tabs: shell paints .dx-tabs. Nudge type so four labels fit at 360px. */
.dx-tabs > .dx-tab {
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
  font-size: 0.82rem;
}

main.dx-main {
  padding-bottom: 8px;
}

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: min(720px, calc(100% - 24px));
  margin: 12px auto 0;
  padding: 8px 10px 8px 14px;
  border-radius: var(--dx-radius);
  background: var(--dx-card);
  color: var(--dx-text);
  border: 1px solid var(--dx-border);
  box-shadow: var(--dx-shadow);
  font-weight: 650;
  -webkit-backdrop-filter: blur(var(--dx-blur));
  backdrop-filter: blur(var(--dx-blur));
}

.banner button,
.text-btn,
.card-actions button,
.card-actions a,
.form-actions button {
  min-height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: var(--dx-radius-sm);
  border: 1px solid var(--dx-border);
  background: var(--dx-card-solid);
  color: var(--dx-text);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.banner--warn {
  border-color: #b91c1c;
}

.hint,
.empty {
  margin: 8px 0;
  color: var(--dx-muted);
  font-size: 0.9rem;
}

.hint.dx-on-bg,
.empty.dx-on-bg {
  color: var(--dx-on-bg);
  text-shadow: 0 1px 2px hsl(0 0% 0% / 0.85), 0 0 12px hsl(0 0% 0% / 0.6);
}

.stage {
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--dx-border);
  border-radius: var(--dx-radius);
  background: var(--dx-card);
  color: var(--dx-text);
  box-shadow: var(--dx-shadow);
  -webkit-backdrop-filter: blur(var(--dx-blur));
  backdrop-filter: blur(var(--dx-blur));
}

.stage__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 44px;
  padding: 8px 12px;
  border: 0;
  background: transparent;
  color: var(--dx-text);
  font: inherit;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.stage__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--dx-accent-soft);
  color: var(--dx-accent);
  font-size: 0.8rem;
}

.stage__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 10px 10px;
}

.job-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 12px;
  background: var(--dx-card);
  color: var(--dx-text);
  border: 1px solid var(--dx-border);
  border-radius: var(--dx-radius);
  box-shadow: var(--dx-shadow);
  overflow-wrap: anywhere;
  -webkit-backdrop-filter: blur(var(--dx-blur));
  backdrop-filter: blur(var(--dx-blur));
}

.stage .job-card {
  box-shadow: none;
  background: var(--dx-card-solid);
}

#list-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.job-card__open,
.project-title {
  display: block;
  min-height: 44px;
  color: inherit;
  text-decoration: none;
}

.job-card__company,
.project-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

a.project-title {
  color: var(--dx-accent);
}

.job-card__role,
.job-card__note,
.job-card__link {
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.job-card__link {
  display: flex;
  align-items: center;
  min-height: 44px;
}

a.job-card__url {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.job-card__role,
.job-card__note,
.job-card__url {
  color: var(--dx-muted);
}

.job-card__note.is-empty {
  font-style: italic;
}

.job-card__url {
  overflow-wrap: anywhere;
}

.job-card__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}

.badge,
.age {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--dx-accent-soft);
  color: var(--dx-text);
  font-size: 0.72rem;
  font-weight: 700;
}

.badge.is-overdue {
  background: #b91c1c;
  color: #ffffff;
}

.job-card__move {
  display: block;
  margin-top: 8px;
}

.job-card__move select,
.search-input,
.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--dx-border);
  border-radius: var(--dx-radius-sm);
  background: var(--dx-card-solid);
  color: var(--dx-text);
  font: inherit;
  font-size: 0.95rem;
}

.search-input {
  border-radius: 999px;
}

.search-input::placeholder,
.field input::placeholder,
.field textarea::placeholder {
  color: var(--dx-muted);
  opacity: 1;
}

.search-label {
  display: block;
  margin-bottom: 8px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0 0 8px;
  padding: 4px;
  border-radius: var(--dx-radius);
  background: var(--dx-card);
  border: 1px solid var(--dx-border);
  -webkit-backdrop-filter: blur(var(--dx-blur));
  backdrop-filter: blur(var(--dx-blur));
}

.filters .seg {
  flex: 1 1 calc(33% - 4px);
  min-height: 44px;
  min-width: 0;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--dx-muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
}

.filters .seg.active {
  background: var(--dx-accent-soft);
  color: var(--dx-accent);
  box-shadow: none;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--dx-accent-soft);
  color: var(--dx-text);
  font-size: 0.75rem;
  font-weight: 650;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.card-actions .danger,
.form-actions .danger {
  background: #b91c1c;
  color: #ffffff;
  border-color: transparent;
}

.form-actions button[type="submit"],
.fab {
  background: var(--dx-accent);
  color: var(--dx-accent-fg);
  border-color: transparent;
}

form.dx-card {
  margin-top: 8px;
}

.editor-title {
  margin: 0 0 12px;
  color: var(--dx-text);
  font-size: 1.25rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: 0 0 12px;
  color: var(--dx-text);
  font-size: 0.85rem;
  font-weight: 650;
}

.field textarea {
  min-height: 96px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.form-actions button {
  width: 100%;
}

.history {
  margin: 4px 0 0;
  padding-left: 1.1rem;
  color: var(--dx-muted);
  font-weight: 500;
}

.text-btn {
  margin: 4px 0 8px;
}

.fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(76px + env(safe-area-inset-bottom));
  z-index: 24;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  box-shadow: var(--dx-shadow);
}

#tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 25;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  margin: 0 auto;
  border-top: 1px solid var(--dx-border);
  background: var(--dx-header);
  backdrop-filter: blur(var(--dx-blur));
  -webkit-backdrop-filter: blur(var(--dx-blur));
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-tab {
  position: relative;
  display: flex;
  min-height: 56px;
  min-width: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--dx-muted);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 650;
  cursor: pointer;
}

.nav-tab.active {
  color: var(--dx-accent);
}

.nav-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--dx-accent);
  outline-offset: 2px;
}
