/* 护理岗雷达 · 样式
 * 中性底色 + 单一强调色（医疗青绿）；细边框与浅阴影建立层次，圆角 ≤ 8px。
 * 移动优先；≥900px 时岗位库切换为表格。
 */

:root {
  color-scheme: light dark;
  --font: -apple-system, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;

  --bg: #fbfbfa;
  --bg-elev: #ffffff;
  --bg-sunken: #f4f4f2;
  --border: #e5e5e1;
  --border-strong: #d5d5d0;

  --text: #1b1b19;
  --text-2: #4c4c47;
  --muted: #74746e;

  --accent: #0f766e;
  --accent-strong: #0b5d57;
  --accent-soft: #e9f3f1;
  --accent-border: #b8d8d3;
  --accent-ink: #ffffff;

  --danger: #b42318;
  --danger-soft: #fdeceb;
  --warn: #8a5a00;
  --warn-soft: #fdf5e3;
  --blue: #1d4ed8;
  --blue-soft: #eaeffb;

  --shadow: 0 1px 2px rgba(24, 24, 21, 0.04);
  --shadow-pop: 0 8px 24px rgba(24, 24, 21, 0.1), 0 2px 6px rgba(24, 24, 21, 0.05);

  --radius: 6px;
  --radius-sm: 4px;
  --radius-lg: 8px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111413;
    --bg-elev: #181c1a;
    --bg-sunken: #141816;
    --border: #2a302d;
    --border-strong: #3b433f;

    --text: #e9ecea;
    --text-2: #c2c8c4;
    --muted: #939b96;

    --accent: #4fd1c5;
    --accent-strong: #7ee0d6;
    --accent-soft: #12312d;
    --accent-border: #21504a;
    --accent-ink: #06201d;

    --danger: #ff8b80;
    --danger-soft: #3a1b18;
    --warn: #e8c37a;
    --warn-soft: #332a17;
    --blue: #8ab4ff;
    --blue-soft: #1b2742;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
    --shadow-pop: 0 10px 28px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

::selection {
  background: var(--accent-soft);
  color: var(--text);
}

.muted {
  color: var(--muted);
}

.sep {
  margin: 0 4px;
  color: var(--border-strong);
}

/* ---------- 顶栏 ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  padding-top: env(safe-area-inset-top);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
}

.topbar__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 1180px;
  height: 52px;
  margin: 0 auto;
  padding: 0 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  position: relative;
  width: 13px;
  height: 13px;
  flex: none;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}

.brand__mark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  border-radius: 50%;
  background: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.nav a {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13.5px;
  white-space: nowrap;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-sunken);
  text-decoration: none;
}

.nav a.is-active {
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 500;
}

.topbar__meta {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* ---------- 页面骨架 ---------- */

.app {
  min-height: 100vh;
  min-height: 100dvh;
}

.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 16px 88px;
  outline: none;
}

.view-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.view-head__text {
  min-width: 0;
}

.view-head h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
}

.view-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12.5px;
}

.head-actions {
  display: flex;
  flex: none;
  gap: 6px;
  padding-top: 1px;
}

/* ---------- 按钮 ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  padding: 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.btn:hover {
  border-color: var(--text-2);
  text-decoration: none;
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.btn--primary:hover {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
}

.btn--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn--ghost:hover {
  background: var(--bg-sunken);
  border-color: transparent;
  color: var(--text);
}

.btn--danger {
  background: var(--bg-elev);
  border-color: var(--border-strong);
  color: var(--danger);
}

.btn--danger:hover {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.btn--sm {
  height: 26px;
  padding: 0 8px;
  font-size: 12px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ---------- 今日统计 ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.stat {
  padding: 9px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.stat__label {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.stat__value {
  margin-top: 1px;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
}

.stat--accent .stat__value {
  color: var(--accent);
}

.stat--danger .stat__value {
  color: var(--danger);
}

/* ---------- 分组 ---------- */

.group {
  margin-bottom: 18px;
}

.group--tier1 {
  padding-left: 10px;
  border-left: 2px solid var(--accent);
}

.group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 8px;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.group__head--btn {
  cursor: pointer;
}

.group__head--btn:hover .group__title {
  color: var(--accent);
}

.group__title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.group__count {
  color: var(--muted);
  font-size: 11.5px;
}

.group__meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
}

.group__chev {
  width: 6px;
  height: 6px;
  margin-right: 2px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.group.is-collapsed .group__chev {
  transform: rotate(-45deg);
}

/* ---------- 岗位卡片 ---------- */

.cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.card {
  position: relative;
  min-width: 0;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card--tier1 {
  padding: 12px 14px;
}

.card:hover {
  border-color: var(--border-strong);
}

.card--blocked {
  opacity: 0.6;
}

.card--blocked:hover {
  opacity: 0.8;
}

.card--expired {
  opacity: 0.78;
}

.card__top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.card__title {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-right: 52px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.card--tier1 .card__title {
  font-size: 15px;
}

.card__title .tag {
  margin-left: 6px;
  vertical-align: 1px;
}

.card__tools {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 0;
}

.card__org {
  margin: 4px 0 0;
  color: var(--text-2);
  font-size: 12.5px;
  overflow-wrap: anywhere;
}

.card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 2px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.card__meta .sep {
  margin: 0 4px;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 7px;
}

.card__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11.5px;
}

.card--tier1 .card__foot {
  font-size: 12px;
}

.card__foot .link {
  margin-left: auto;
  font-size: 12px;
}

.deadline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-weight: 500;
  white-space: nowrap;
}

.deadline.is-urgent {
  color: var(--danger);
}

.source {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ---------- 徽标与标签 ---------- */

.badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-sunken);
  color: var(--text-2);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.badge--accent {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.badge--unknown {
  color: var(--muted);
  border-style: dashed;
  background: transparent;
}

.tag {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  background: var(--bg-sunken);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
  vertical-align: middle;
}

.tag--accent {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.tag--danger {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.tag--warn {
  color: var(--warn);
  border-color: var(--warn);
  background: var(--warn-soft);
}

.tag--muted {
  color: var(--muted);
  background: var(--bg-sunken);
}

.tag--blocked {
  color: var(--muted);
  border-style: dashed;
  background: var(--bg-sunken);
}

.tag--deadline {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

.tag--exam {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--blue-soft);
}

.tag--milestone {
  color: var(--muted);
  border-color: var(--border-strong);
}

.verify {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1;
  white-space: nowrap;
}

.verify--official_original {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.verify--cross_verified {
  color: var(--text-2);
  border-color: var(--border-strong);
}

.verify--single_source {
  color: var(--muted);
}

.verify--unverified {
  color: var(--muted);
  border-style: dashed;
}

.hint {
  margin: 8px 0 0;
  padding: 5px 8px;
  border-left: 2px solid var(--warn);
  border-radius: 0 4px 4px 0;
  background: var(--warn-soft);
  color: var(--warn);
  font-size: 11.5px;
  line-height: 1.5;
}

.link {
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.link:hover {
  text-decoration: underline;
}

.link--muted {
  color: var(--muted);
}

.link--dead {
  color: var(--muted);
  text-decoration: line-through;
}

/* ---------- 图标按钮与菜单 ---------- */

.iconbtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
}

.iconbtn:hover {
  background: var(--bg-sunken);
  color: var(--text);
}

.iconbtn.is-on {
  color: var(--accent);
}

.iconbtn--bordered {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 16px;
}

.iconbtn--bordered:hover {
  border-color: var(--border-strong);
}

.iconbtn:disabled {
  opacity: 0.45;
  cursor: default;
}

.menu {
  position: absolute;
  top: 30px;
  right: 0;
  z-index: 25;
  min-width: 136px;
  padding: 4px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}

.menu button {
  display: block;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 3px;
  background: none;
  color: var(--text);
  font-size: 12.5px;
  text-align: left;
  white-space: nowrap;
}

.menu button:hover {
  background: var(--bg-sunken);
}

.menu button.danger {
  color: var(--danger);
}

.menu button:disabled {
  background: none;
  color: var(--muted);
  cursor: default;
}

/* ---------- 状态块 ---------- */

.empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 28px 20px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.empty__title {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.empty__text {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}

.empty__text b {
  color: var(--accent);
  font-weight: 600;
}

.empty .btn {
  margin-top: 4px;
}

.viewstate {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 56px 16px;
  color: var(--muted);
  font-size: 12.5px;
  text-align: center;
}

.viewstate--error h2 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.viewstate--error p {
  max-width: 440px;
  margin: 0;
  line-height: 1.6;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.inline-error {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 14px;
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.inline-error p {
  margin: 0;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.55;
}

/* ---------- 快捷筛选 ---------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.chip {
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1;
}

.chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.chip.is-active {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

/* ---------- 筛选器 ---------- */

.filters {
  margin-bottom: 10px;
  padding: 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.filters__toggle {
  display: none;
}

.filters__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.field > span:first-child {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.field--wide {
  grid-column: span 2;
}

.select-wrap {
  position: relative;
  display: block;
  min-width: 0;
}

.select-wrap::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 9px;
  width: 5px;
  height: 5px;
  margin-top: -3px;
  border-right: 1px solid var(--muted);
  border-bottom: 1px solid var(--muted);
  transform: rotate(45deg);
  pointer-events: none;
}

.select-wrap select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 22px;
}

input[type="text"],
input[type="search"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
select {
  width: 100%;
  height: 30px;
  min-width: 0;
  padding: 0 7px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-elev);
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
}

input:hover,
select:hover {
  border-color: var(--text-2);
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: none;
}

input::placeholder {
  color: var(--muted);
}

input[type="search"]::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex: none;
  accent-color: var(--accent);
}

.checkrow {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding-top: 3px;
}

.check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
}

/* ---------- 结果区 ---------- */

.resultbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.resultbar__count {
  color: var(--muted);
  font-size: 12.5px;
}

.resultbar__count b {
  color: var(--text);
  font-weight: 600;
}

.resultbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkall {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
}

/* ---------- 桌面表格 ---------- */

.table-wrap {
  display: none;
  overflow: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.jobs-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 12.5px;
}

.jobs-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 6px 4px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.jobs-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: middle;
  white-space: nowrap;
}

.jobs-table tbody tr:last-child td {
  border-bottom: 0;
}

.jobs-table tbody tr:hover {
  background: var(--bg-sunken);
}

.jobs-table tr.is-selected {
  background: var(--accent-soft);
}

.jobs-table tr.is-blocked {
  opacity: 0.62;
}

.jobs-table tr.is-expired {
  opacity: 0.72;
}

.col-check {
  width: 28px;
  padding-left: 10px !important;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
}

.th-sort:hover {
  color: var(--text);
}

.th-sort.is-active {
  color: var(--accent);
}

.th-sort__mark {
  color: var(--border-strong);
  font-size: 9px;
}

.th-sort.is-active .th-sort__mark {
  color: var(--accent);
}

.jobs-table td.cell-title {
  min-width: 190px;
  max-width: 320px;
  white-space: normal;
}

.rowtitle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.rowtitle .iconbtn {
  width: 20px;
  height: 20px;
  font-size: 12px;
}

.rowtitle__text {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--text);
  font-weight: 500;
  line-height: 1.4;
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.cell-deadline span {
  display: block;
}

.cell-deadline .is-urgent {
  color: var(--danger);
}

.cell-source {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-error {
  max-width: 280px;
  overflow-wrap: anywhere;
}

.ops {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
}

.ops .link {
  font-size: 12px;
}

.op {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font-size: 12px;
  white-space: nowrap;
}

.op:hover {
  text-decoration: underline;
}

.op--danger {
  color: var(--danger);
}

.op--done {
  color: var(--muted);
}

/* ---------- 移动端岗位卡片 ---------- */

.jobs-cards {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.jobcard {
  position: relative;
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.jobcard.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.jobcard.is-blocked {
  opacity: 0.62;
}

.jobcard.is-expired {
  opacity: 0.78;
}

.jobcard__top {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.jobcard__top > .iconbtn {
  flex: none;
}

.jobcheck {
  width: 15px !important;
  height: 15px !important;
  margin-top: 2px !important;
}

.jobcard__main {
  flex: 1;
  min-width: 0;
}

.jobcard__title {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.jobcard__title .tag {
  margin-left: 6px;
}

.jobcard__org {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.jobcard .badges {
  margin-top: 6px;
}

.jobcard__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 10px;
  margin-top: 8px;
  font-size: 11.5px;
}

.jobcard__grid > div {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.jobcard__grid span {
  flex: none;
  color: var(--muted);
}

.jobcard__grid b {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
  color: var(--text-2);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.jobcard__grid b.is-urgent {
  color: var(--danger);
}

.jobcard__meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
}

.jobcard__ops {
  margin-top: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--border);
}

.jobcard__ops .ops {
  flex-wrap: wrap;
  gap: 6px 12px;
}

/* ---------- 分页 ---------- */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.pager__right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pager__size {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.pager__size .select-wrap {
  width: 64px;
}

.pager__size select {
  height: 26px;
  font-size: 12px;
}

.pager__now {
  min-width: 54px;
  color: var(--text-2);
  text-align: center;
}

/* ---------- 浮动批量操作条 ---------- */

.bulkbar {
  position: fixed;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 12px;
  z-index: 40;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  max-width: 720px;
  margin: 0 auto;
  padding: 7px 9px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}

.bulkbar__count {
  margin-right: 2px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.bulkbar__count b {
  color: var(--text);
  font-weight: 600;
}

/* ---------- 日历 ---------- */

.cal {
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cal__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.cal__month {
  font-size: 14px;
  font-weight: 600;
}

.cal__today {
  margin-left: auto;
}

.cal__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 7px 10px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11.5px;
}

.legend {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
}

.dot--deadline {
  background: var(--danger);
}

.dot--exam {
  background: var(--blue);
}

.dot--milestone {
  background: var(--muted);
}

.cal__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.cal__dow {
  padding: 6px 4px;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.cal__cell {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 54px;
  padding: 3px;
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  -webkit-appearance: none;
  appearance: none;
}

.cal__cell:nth-child(7n) {
  border-right: 0;
}

.cal__cell--blank {
  background: var(--bg-sunken);
  cursor: default;
}

.cal__cell:hover {
  background: var(--bg-sunken);
}

.cal__cell.is-today .cal__num {
  background: var(--accent);
  color: var(--accent-ink);
}

.cal__cell.is-selected {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.cal__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  color: var(--text-2);
  font-size: 12px;
}

.cal__events {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ev {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  color: var(--text-2);
  font-size: 10.5px;
  line-height: 1.3;
}

.ev i {
  width: 5px;
  height: 5px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.ev span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ev--deadline {
  color: var(--danger);
}

.ev--deadline i {
  background: var(--danger);
}

.ev--exam {
  color: var(--blue);
}

.ev--exam i {
  background: var(--blue);
}

.ev--milestone i {
  background: var(--muted);
}

.cal__more {
  color: var(--muted);
  font-size: 10.5px;
}

.evlist {
  margin: 0;
  padding: 0;
  list-style: none;
}

.evrow {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
}

.evrow:first-child {
  padding-top: 0;
}

.evrow:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.evdot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--muted);
}

.evrow--deadline .evdot {
  background: var(--danger);
}

.evrow--exam .evdot {
  background: var(--blue);
}

.evrow__title {
  flex: 1;
  min-width: 0;
  color: var(--text-2);
  overflow-wrap: anywhere;
}

/* ---------- 设置分区 ---------- */

.section {
  margin-bottom: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.section__head h2 {
  margin: 0;
  font-size: 13.5px;
  font-weight: 600;
}

.section__head .hint {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 11.5px;
}

.section__body {
  padding: 12px;
}

.section__body > p {
  margin: 0;
  font-size: 12.5px;
}

.formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

/* ---------- 开关 ---------- */

.switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch__track {
  position: relative;
  width: 30px;
  height: 17px;
  flex: none;
  border-radius: 8px;
  background: var(--border-strong);
  transition: background 0.15s ease;
}

.switch__track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--bg-elev);
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s ease;
}

.switch input:checked + .switch__track {
  background: var(--accent);
}

.switch input:checked + .switch__track::after {
  transform: translateX(13px);
}

.switch input:focus-visible + .switch__track {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.switch__text {
  line-height: 1.3;
}

/* ---------- 推送渠道 ---------- */

.chan {
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.chan:last-child {
  margin-bottom: 0;
}

.chan summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
}

.chan summary::-webkit-details-marker {
  display: none;
}

.chan summary::after {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  margin-left: auto;
  border-right: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.chan[open] summary::after {
  transform: rotate(-135deg);
}

.chan summary:hover {
  background: var(--bg-sunken);
}

.chan__name {
  font-weight: 500;
}

.chan__status {
  flex: none;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 400;
  line-height: 17px;
}

.chan__status.is-on {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.chan__desc {
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 400;
}

.chan__body {
  padding: 10px;
  background: var(--bg-sunken);
  border-top: 1px solid var(--border);
}

.chan__fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}

.chan__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.chan__foot .btn {
  margin-left: auto;
}

.chan__note {
  color: var(--muted);
  font-size: 11px;
}

.saved {
  margin-left: 5px;
  color: var(--accent);
  font-size: 10.5px;
  font-style: normal;
}

/* ---------- 健康度表格 ---------- */

.health-wrap {
  overflow-x: auto;
}

.health {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
}

.health th {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.health td {
  padding: 7px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
}

.health tr:last-child td {
  border-bottom: 0;
}

.health .num {
  text-align: right;
  white-space: nowrap;
}

.hstatus {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.hstatus.is-ok {
  color: var(--accent);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}

.hstatus.is-fail {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- 回收站入口 ---------- */

.rowlink {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 13px;
}

.rowlink:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.rowlink .count {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
}

.rowlink__arrow {
  color: var(--muted);
}

/* ---------- 保存条 ---------- */

.savebar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 4px 0 12px;
  padding: 8px 10px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-pop);
}

.savebar__hint {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
}

.me-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 8px;
}

.me-foot .muted {
  font-size: 11.5px;
}

/* ---------- 登录页 ---------- */

.app--login {
  background: var(--bg);
}

.login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
}

.login__card {
  position: relative;
  width: 100%;
  max-width: 344px;
  padding: 26px 24px 20px;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.login__card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 2px;
  background: var(--accent);
}

.login__brand {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
}

.login__hint {
  margin: 14px 0;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.login form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login input {
  height: 42px;
  padding: 0 12px;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-align: center;
}

.login__submit {
  width: 100%;
  height: 42px;
  font-size: 14px;
  font-weight: 500;
}

.login__error {
  margin: 10px 0 0;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

/* ---------- 提示 ---------- */

.toast {
  position: fixed;
  bottom: calc(72px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--bg);
  font-size: 12.5px;
  line-height: 1.5;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--error {
  background: var(--danger);
  color: #ffffff;
}

/* ---------- 确认弹窗 ---------- */

.modal-root[hidden] {
  display: none;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(17, 20, 19, 0.42);
}

.modal {
  width: 100%;
  max-width: 380px;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
}

.modal h2 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 600;
}

.modal p {
  margin: 0 0 14px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.6;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.noscript {
  max-width: 480px;
  margin: 80px auto;
  padding: 16px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
}

/* ---------- 响应式 ---------- */

@media (min-width: 640px) {
  .stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 700px) {
  .filters__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .formgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .table-wrap {
    display: block;
  }

  .jobs-cards {
    display: none;
  }

  .cal__cell {
    min-height: 88px;
    padding: 5px;
  }

  .cal__events {
    gap: 3px;
  }
}

@media (min-width: 1000px) {
  .filters__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .field--wide {
    grid-column: span 2;
  }

  .filters__toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    min-height: 30px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
    text-align: left;
  }

  .filters__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border-radius: 8px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 10.5px;
    font-weight: 500;
  }

  .filters__chev {
    width: 6px;
    height: 6px;
    margin-left: auto;
    margin-right: 2px;
    border-right: 1.5px solid var(--muted);
    border-bottom: 1.5px solid var(--muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
  }

  .filters__grid {
    display: none;
  }

  .filters.is-open .filters__grid {
    display: grid;
    margin-top: 8px;
  }

  .filters.is-open .filters__chev {
    transform: rotate(-135deg);
  }
}

@media (max-width: 640px) {
  .topbar__inner {
    gap: 10px;
    padding: 0 12px;
  }

  .brand {
    font-size: 14px;
  }

  .topbar__meta {
    display: none;
  }

  .view {
    padding: 12px 12px 88px;
  }

  .view-head h1 {
    font-size: 17px;
  }

  .view-head p {
    font-size: 12px;
  }

  .source {
    max-width: 120px;
  }

  .ev span {
    display: none;
  }

  .chan__desc {
    display: none;
  }
}

@media (max-width: 480px) {
  .group__hint {
    display: none;
  }

  .card__foot .link {
    margin-left: 0;
  }

  .jobcard__grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
