:root {
  /* Bright Clear Macaron */
  --bg: #fff5fa;
  --bg-deep: #ffe8f2;
  --ink: #2a2430;
  --ink-soft: #564e5f;
  --muted: #857b90;
  --line: #ffd0e0;
  --line-strong: #ffb0c8;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --accent: #ff5e96;
  --accent-hover: #ef3f7d;
  --accent-soft: #ffd6e6;
  --mint: #3fd9a8;
  --mint-soft: #d2fff0;
  --peach: #ff9b63;
  --peach-soft: #ffe1cf;
  --lemon: #ffe14a;
  --lemon-soft: #fff4a8;
  --sky: #5bbcff;
  --sky-soft: #d7f0ff;
  --lavender: #b78bff;
  --lavender-soft: #eadfff;
  --warn: #ff8a45;
  --danger: #ff5a6e;
  --phone: #16b884;
  --cloud: #2a9df0;
  --ticket: #8b5cf6;
  --shift-a: #16b884;
  --shift-k: #2a9df0;
  --shift-l: #ff8a45;
  --shift-s: #8b5cf6;
  --shadow: 0 12px 30px rgba(255, 94, 150, 0.14);
  --radius: 14px;
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --display: "Outfit", "Noto Sans SC", sans-serif;
  --mono: "Cascadia Mono", "Sarasa Mono SC", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: var(--font);
  background: var(--bg);
}

body.is-login {
  background: #fff0f6;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
}

body.is-login #app {
  height: 100%;
  overflow: hidden;
}

body.is-main {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(255, 94, 150, 0.28), transparent 55%),
    radial-gradient(800px 380px at 92% 0%, rgba(63, 217, 168, 0.22), transparent 50%),
    radial-gradient(700px 360px at 70% 100%, rgba(91, 188, 255, 0.22), transparent 55%),
    linear-gradient(180deg, #fff7fb 0%, #fff0f6 140px, #eef8ff 100%);
  height: 100vh;
  overflow: hidden;
}

body.is-org {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(255, 94, 150, 0.22), transparent 55%),
    radial-gradient(800px 380px at 92% 0%, rgba(91, 188, 255, 0.18), transparent 50%),
    linear-gradient(180deg, #fff7fb 0%, #fff0f6 120px, #eef8ff 100%);
  height: 100vh;
  overflow: hidden;
}

body.is-main #app {
  height: 100vh;
  overflow: hidden;
}

.org-page {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.org-page-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 0 14px 14px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(20, 36, 28, 0.05);
}

.org-page-body {
  flex: 1 1 auto;
  min-height: 0;
}

.org-table-wrap-page {
  max-height: none;
}

.org-topbar {
  margin-bottom: 0;
}

.org-topbar a.ghost.compact {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

/* ---------- Org management page ---------- */
.org-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.org-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.org-panel-create {
  border-left: 4px solid var(--mint);
  background: linear-gradient(90deg, rgba(210, 255, 240, 0.35), #fff 40%);
}

.org-panel-info {
  border-left: 4px solid var(--sky);
  background: linear-gradient(90deg, rgba(215, 240, 255, 0.4), #fff 45%);
}

.org-panel-list {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.org-panel-head {
  margin-bottom: 12px;
}

.org-panel-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.org-panel-head h3 {
  margin: 6px 0 4px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.org-panel-desc {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.org-panel-desc code {
  font-family: var(--mono);
  font-size: 0.78rem;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--lavender-soft);
  border: 1px solid var(--line);
  color: #6b3fd4;
}

.org-form-grid {
  display: grid;
  /* 姓名 | 手机 | 角色 | 班组 | 操作 — 前四列均等分 */
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 10px 12px;
  align-items: end;
}

.org-form-grid .org-field-grow {
  grid-column: auto;
}

.org-form-grid .org-field-teams {
  min-width: 0;
}

.org-team-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 176, 200, 0.85);
  border-radius: 12px;
  background: #fff;
  align-items: center;
}

.org-team-checks-inline {
  min-height: 36px;
  padding: 6px 10px;
  gap: 8px 14px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.org-team-checks.is-disabled,
.org-field.is-disabled .org-team-checks {
  opacity: 0.55;
  background: #f7f2f5;
}

.org-team-checks-compact {
  min-height: 0;
  padding: 4px 6px;
  gap: 6px 10px;
}

.org-check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 0.86rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  flex-shrink: 0;
}

.org-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  padding: 0;
  flex: 0 0 15px;
  align-self: center;
  accent-color: #e85a8c;
  vertical-align: middle;
}

/* 覆盖全局 label > span { display:block }，保证与方框垂直居中 */
.org-check > span {
  display: inline-flex;
  align-items: center;
  line-height: 1.2;
  margin: 0;
}

.org-form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.org-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}

.org-field-grow {
  flex: 1 1 220px;
  min-width: 180px;
}

.org-field > span {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
}

.org-field > span em {
  font-style: normal;
  font-weight: 400;
  color: #b0a8b8;
  margin-left: 4px;
}

.org-field input,
.org-field select,
.org-input,
.org-textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1.5px solid #e8dce4;
  border-radius: 10px;
  background: #faf8fa;
  color: var(--ink);
  font: inherit;
  font-size: 0.86rem;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.org-field input:focus,
.org-field select:focus,
.org-input:focus,
.org-textarea:focus {
  outline: none;
  border-color: #ffb0c8;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.12);
}

.org-textarea {
  min-height: 72px;
  resize: vertical;
  line-height: 1.5;
  font-family: var(--font);
}

.org-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-bottom: 1px;
}

.org-btn {
  border: 1.5px solid transparent;
  border-radius: 10px;
  padding: 8px 14px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  white-space: nowrap;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.org-btn:active { transform: translateY(1px); }

.org-btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(255, 94, 150, 0.22);
}

.org-btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.org-btn-ghost {
  background: #fff;
  color: var(--ink-soft);
  border-color: var(--line);
}

.org-btn-ghost:hover {
  background: var(--accent-soft);
  border-color: #ffb0c8;
  color: var(--accent);
}

.org-btn-danger {
  background: #fff5f6;
  color: var(--danger);
  border-color: #ffc5cd;
}

.org-btn-danger:hover {
  background: #ffe8ec;
  border-color: var(--danger);
}

.org-btn-outline {
  background: #fff;
}

.org-btn-success {
  background: var(--mint-soft);
  color: #0f8f68;
  border-color: #8aefc8;
}

.org-btn-success:hover {
  background: #b8f5e0;
}

.org-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.org-search {
  width: 200px;
  padding: 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 0.82rem;
}

.org-search:focus {
  outline: none;
  border-color: #ffb0c8;
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.12);
}

.org-count-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: #f7f2f5;
  border: 1px solid var(--line);
}

.org-feedback {
  min-height: 0;
  margin: 0 0 8px;
  font-size: 0.82rem;
}

.org-feedback.is-error { color: var(--danger); }
.org-feedback.is-ok { color: #0f8f68; }

.org-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  pointer-events: none;
  user-select: none;
}

.org-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex: 0 0 auto;
}

.org-status.is-admin { color: #c43a6a; }
.org-status.is-admin i { background: #ff5e96; }
.org-status.is-leader { color: #1a78c2; }
.org-status.is-leader i { background: #2a9df0; }
.org-status.is-agent { color: #6b3fd4; }
.org-status.is-agent i { background: #8b5cf6; }
.org-status.is-on { color: #0f8f68; }
.org-status.is-on i { background: #16b884; }
.org-status.is-off { color: #9a8a94; }
.org-status.is-off i { background: #c9bfc8; }

.org-act {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border: 1px solid transparent;
}

.org-act:active { transform: translateY(1px); }

.org-act-edit {
  background: #fff;
  color: #1a78c2;
  border-color: #7ec4f5;
}

.org-act-edit:hover {
  background: #e8f5ff;
}

.org-act-save {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.org-act-save:hover { background: var(--accent-hover); }

.org-act-cancel {
  background: #fff;
  color: var(--ink-soft);
  border-color: #d9d0d6;
}

.org-act-cancel:hover { background: #f7f2f5; }

.org-act-danger {
  background: #fff;
  color: var(--danger);
  border-color: #f0a0ab;
}

.org-act-danger:hover { background: #fff0f2; }

.org-act-ok {
  background: #fff;
  color: #0f8f68;
  border-color: #8aefc8;
}

.org-act-ok:hover { background: var(--mint-soft); }

.org-act-reset {
  background: #fff;
  color: #c45a00;
  border-color: #f5c08a;
}

.org-act-reset:hover {
  background: #fff6eb;
}

.org-cell-text { font-weight: 500; color: var(--ink); }
.org-cell-mono { font-family: var(--mono); font-size: 0.82rem; color: var(--ink-soft); }
.org-cell-muted { color: var(--muted); font-size: 0.8rem; }

.org-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.org-row-actions .org-act {
  min-width: 52px;
}

.perm-switch {
  width: 40px;
  height: 22px;
  padding: 2px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  background: #d8d0d6;
  position: relative;
  vertical-align: middle;
}

.perm-switch.is-on {
  background: #16b884;
}

.perm-switch.is-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.perm-knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transform: translateX(0);
  transition: transform 140ms ease;
}

.perm-switch.is-on .perm-knob {
  transform: translateX(18px);
}

.perm-lock-hint {
  display: block;
  margin-top: 2px;
  font-size: 0.7rem;
  font-style: normal;
  font-weight: 400;
  color: var(--muted);
}

.perm-icon {
  display: none;
}

.org-people-table {
  table-layout: fixed;
  width: 100%;
}

/* 按比例均分，避免班组吃掉剩余宽度造成中间大空白 */
.org-people-table .col-name { width: 14%; }
.org-people-table .col-phone { width: 16%; }
.org-people-table .col-role { width: 12%; }
.org-people-table .col-team { width: 22%; }
.org-people-table .col-status { width: 10%; }
.org-people-table .col-actions { width: 26%; }

.org-people-table td,
.org-people-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}

.org-people-table th.col-status,
.org-people-table td.col-status {
  text-align: left;
}

.org-people-table th.col-actions,
.org-people-table td.col-actions {
  text-align: left;
  white-space: nowrap;
  overflow: visible;
  padding-left: 8px;
  padding-right: 12px;
}

.org-people-table .org-input {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.org-people-table tr.is-editing {
  background: #fff8fb;
}

.org-people-table tr.is-editing td {
  box-shadow: inset 0 -1px 0 #ffd6e6;
  white-space: nowrap;
}

.org-row-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 6px;
  justify-content: flex-start;
}

.col-actions {
  width: 23%;
  text-align: left;
}

.org-empty,
.org-empty-block {
  text-align: center;
  color: var(--muted);
  font-size: 0.86rem;
  padding: 28px 12px;
}

.org-empty-block {
  border: 1px dashed var(--line);
  border-radius: 12px;
  background: #faf8fa;
}

.org-teams-list {
  display: grid;
  gap: 12px;
}

.org-team-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}

.org-team-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fff8fb, #fff);
  border-bottom: 1px solid #f0e8ee;
}

.org-team-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.org-team-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.18);
}

.org-team-head h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
}

.org-team-meta {
  font-size: 0.74rem;
  color: var(--muted);
}

.org-input-zone {
  padding: 12px 14px;
  background: #faf8fa;
  display: grid;
  gap: 10px;
}

.org-card-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #f0e8ee;
}

.org-role-legend {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.org-role-chip {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.org-role-chip b {
  display: block;
  font-size: 0.88rem;
  margin-bottom: 4px;
}

.org-role-chip span {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.org-role-chip.is-admin { border-color: #ffc0d8; background: #fff5f9; }
.org-role-chip.is-leader { border-color: #9ad4ff; background: #f5fbff; }
.org-role-chip.is-agent { border-color: #d2b8ff; background: #faf7ff; }

.org-perm-table .col-perm {
  font-weight: 500;
  color: var(--ink);
}

.org-perm-table .col-role {
  text-align: center;
  width: 88px;
}

.org-perm-table thead .col-role.is-admin { color: #c43a6a; }
.org-perm-table thead .col-role.is-leader { color: #1a78c2; }
.org-perm-table thead .col-role.is-agent { color: #6b3fd4; }

.org-perm-table tr.is-alt td {
  background: #fcfafb;
}

.perm-icon {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 700;
}

.perm-icon.is-yes {
  color: #0f8f68;
  background: var(--mint-soft);
  border: 1px solid #8aefc8;
}

.perm-icon.is-no {
  color: #c9bfc8;
  background: #f7f2f5;
  border: 1px solid #ebe3e8;
}

@media (max-width: 900px) {
  .org-form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .org-form-grid .org-field-teams {
    grid-column: 1 / -1;
  }
  .org-team-checks-inline {
    flex-wrap: wrap;
  }
  .org-form-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }
  .org-role-legend {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .org-form-grid {
    grid-template-columns: 1fr;
  }
  .org-form-grid .org-field-teams {
    grid-column: auto;
  }
  .org-panel-head-row {
    flex-direction: column;
  }
  .org-search {
    width: 100%;
  }
}

.hidden { display: none !important; }

/* ---------- Login ---------- */
.login-screen {
  height: 100%;
  display: grid;
  place-items: stretch;
  padding: 0;
  position: relative;
  overflow: hidden;
}

.corner-manual {
  display: none;
}

.form-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.form-head h2 {
  margin: 0;
}

.manual-link {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 999px;
  border: 0;
  background: #ff5e96;
  color: #fff;
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(255, 94, 150, 0.22);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transform: none !important;
}

.manual-link:hover {
  background: #ef3f7d;
  border-color: transparent;
  color: #fff;
}

.manual-link:active {
  transform: none !important;
}

.manual-btn {
  color: #fff !important;
  background: #ff5e96 !important;
  border-color: transparent !important;
  box-shadow: 0 4px 10px rgba(255, 94, 150, 0.2);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0.04em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  transform: none !important;
}

.manual-btn:hover {
  background: #ef3f7d !important;
  border-color: transparent !important;
  color: #fff !important;
}

.manual-btn:active {
  transform: none !important;
}

.login-stage {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.login-hero {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  color: #2a2430;
  animation: none;
  display: grid;
  /* 上半留白，内容从垂直中线起落在左下 */
  grid-template-rows: 1fr 1fr;
  justify-items: start;
  background:
    linear-gradient(180deg, #ffe8f2 0%, #fff5fa 45%, #eef8ff 100%);
}

.login-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: none;
  filter: none;
  animation: none;
}

.login-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28) 0%, rgba(255, 255, 255, 0.16) 40%, rgba(255, 248, 252, 0.5) 100%),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.04) 70%);
}

.login-hero-content {
  position: relative;
  z-index: 1;
  grid-row: 2;
  align-self: start;
  justify-self: start;
  width: min(520px, calc(100% - 40px));
  max-width: 520px;
  max-height: 100%;
  height: auto;
  min-height: 0;
  margin: 0;
  padding: 8px 0 28px clamp(28px, 4.5vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  box-sizing: border-box;
}

.login-kicker {
  margin: 0 0 10px;
  font-family: var(--display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ff5e96;
  font-weight: 700;
  text-shadow: none;
}

.login-hero-content h1 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.1;
  letter-spacing: 0.01em;
  color: #2a2430;
  text-shadow: none;
}

.login-lead {
  margin: 10px 0 0;
  max-width: 100%;
  color: #564e5f;
  font-size: 0.88rem;
  line-height: 1.4;
  letter-spacing: 0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: none;
}

.login-panel {
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 22px rgba(42, 36, 48, 0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  flex-shrink: 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.feature-card {
  position: relative;
  min-height: 0;
  padding: 12px 10px 10px;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(160deg, rgba(255, 214, 230, 0.55), rgba(255, 240, 246, 0.42));
  border: 1px solid rgba(255, 255, 255, 0.72);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 6px 16px rgba(255, 94, 150, 0.10);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #7a3358;
}

.feature-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 12px;
  bottom: 12px;
  width: 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff5e96, #ff9ec0);
}

.feature-num {
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin: 0 0 8px 6px;
  color: #ff5e96;
}

.feature-card h3 {
  margin: 0 0 6px 6px;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.3;
  color: #2a2430;
}

.feature-card p {
  margin: 0 0 0 6px;
  font-size: 0.76rem;
  line-height: 1.45;
  color: #6a5560;
  opacity: 1;
}

.feature-card.is-mint,
.feature-card.is-sky,
.feature-card.is-peach {
  background: linear-gradient(160deg, rgba(255, 214, 230, 0.55), rgba(255, 240, 246, 0.42));
  border-color: rgba(255, 255, 255, 0.72);
  color: #7a3358;
}

.feature-card.is-mint::before,
.feature-card.is-sky::before,
.feature-card.is-peach::before {
  background: linear-gradient(180deg, #ff5e96, #ff9ec0);
}

.feature-card.is-mint .feature-num,
.feature-card.is-sky .feature-num,
.feature-card.is-peach .feature-num {
  color: #ff5e96;
}

.process-bar {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 208, 224, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.process-bar span {
  flex: 1;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: #7a3358;
}

.process-bar i {
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ff5e96, #ffb0c8);
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .login-lead {
    white-space: normal;
  }
  .feature-grid {
    grid-template-columns: 1fr;
  }
  .login-panel {
    width: 100%;
  }
  .process-bar {
    flex-wrap: wrap;
    border-radius: 16px;
  }
  .process-bar i {
    display: none;
  }
}

.login-side {
  background: #fff7fb;
  height: 100%;
  min-height: 0;
  padding: clamp(14px, 2.8vh, 28px) clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 10px;
  animation: none;
  border-left: 1px solid #ffd6e6;
  overflow: hidden;
}

.login-form {
  background: #fff;
  border: 1px solid #ffd0e0;
  border-radius: 18px;
  padding: clamp(16px, 2.4vh, 22px) 22px 16px;
  box-shadow: 0 8px 24px rgba(255, 94, 150, 0.1);
  flex-shrink: 0;
}

.form-eyebrow {
  margin: 0 0 4px;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ff5e96;
  font-weight: 700;
}

.login-form h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  color: #2a2430;
}

.form-desc {
  margin: 0 0 10px;
  color: #564e5f;
  font-size: 0.84rem;
  line-height: 1.5;
}

.login-alerts {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

.login-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--ink-soft);
}

.login-alert p {
  margin: 0;
}

.login-alert-icon {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
  font-style: italic;
  color: #fff;
  background: var(--sky);
}

.login-alert-icon.is-key {
  border-radius: 5px;
  font-style: normal;
  background: var(--peach);
}

.login-alert-icon.is-key::before {
  content: "";
  width: 8px;
  height: 8px;
  border: 1.6px solid #fff;
  border-radius: 50%;
  box-shadow: 5px 3px 0 -2.2px #fff;
}

.login-alert.is-info {
  background: var(--sky-soft);
  border: 1px solid #9ad4ff;
  color: #1a78c2;
}

.login-alert.is-pwd {
  background: var(--peach-soft);
  border: 1px solid #ffc09a;
  color: #8a4a22;
  flex-wrap: wrap;
}

.login-alert.is-pwd strong {
  color: #c43a3a;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}

.login-alert-sep {
  width: 1px;
  height: 12px;
  background: rgba(138, 74, 34, 0.28);
  flex: 0 0 auto;
}

.form-tips {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #ffd6e6;
}

.form-tips p {
  margin: 0 0 8px;
  font-size: 0.78rem;
  color: #857b90;
}

.form-tips code {
  display: inline-block;
  margin: 0 6px 6px 0;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eadfff;
  border: 1px solid #d2b8ff;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: #6b3fd4;
  font-weight: 600;
}

.login-aside-note {
  border: 1px solid #ffd0e0;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(255, 94, 150, 0.08);
  flex-shrink: 0;
}

.login-aside-note h3 {
  margin: 0 0 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #2a2430;
}

.shift-legend {
  display: grid;
  gap: 6px;
}

.shift-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
}

.shift-legend span[data-p="A"] { background: #d2fff0; color: #0f8f68; border-color: #8aefc8; }
.shift-legend span[data-p="C"] { background: #fff3d6; color: #a67c00; border-color: #f0d878; }
.shift-legend span[data-p="K"] { background: #d7f0ff; color: #1a78c2; border-color: #9ad4ff; }
.shift-legend span[data-p="L"] { background: #ffe1cf; color: #d6621e; border-color: #ffc09a; }
.shift-legend span[data-p="S"] { background: #eadfff; color: #6b3fd4; border-color: #d2b8ff; }

.shift-legend b {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  font-family: var(--display);
  font-size: 0.78rem;
  color: #fff;
}

.shift-legend span[data-p="A"] b { background: #16b884; }
.shift-legend span[data-p="C"] b { background: #e6b422; }
.shift-legend span[data-p="K"] b { background: #2a9df0; }
.shift-legend span[data-p="L"] b { background: #ff8a45; }
.shift-legend span[data-p="S"] b { background: #8b5cf6; }

.aside-foot {
  margin: 12px 0 0;
  font-size: 0.78rem;
  color: #857b90;
  line-height: 1.5;
}

label {
  display: block;
  margin-bottom: 10px;
}

label > span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

input, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #ffd0e0;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: #ff5e96;
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.18);
}

/* 密码明文切换 */
.pwd-field {
  position: relative;
  display: block;
  width: 100%;
}

.pwd-field input {
  width: 100%;
  padding-right: 4.6rem;
}

.pwd-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 4px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  width: auto;
  min-width: 0;
  box-shadow: none;
}

.pwd-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  display: none;
}

/* 密文：只显示睁眼 +「显示」 */
.pwd-toggle .pwd-icon-show {
  display: block;
}

/* 明文：只显示蒙眼 +「隐藏」 */
.pwd-toggle[aria-pressed="true"] .pwd-icon-show {
  display: none;
}

.pwd-toggle[aria-pressed="true"] .pwd-icon-hide {
  display: block;
}

.pwd-toggle-text {
  line-height: 1;
}

.pwd-toggle:hover,
.pwd-toggle[aria-pressed="true"] {
  color: var(--accent);
  background: rgba(255, 94, 150, 0.08);
}

.pwd-toggle:active {
  transform: translateY(-50%);
}

.pwd-toggle:focus-visible {
  outline: 2px solid rgba(255, 94, 150, 0.45);
  outline-offset: 1px;
}

textarea {
  resize: vertical;
  font-family: var(--mono);
  font-size: 0.92rem;
  line-height: 1.5;
}

button {
  border: 0;
  border-radius: 11px;
  padding: 11px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

button:active { transform: translateY(1px); }

button.primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
}

button.primary:hover { background: var(--accent-hover); }

button.ghost {
  background: #fff;
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

button.ghost:hover {
  border-color: #e2b4c2;
  color: var(--ink);
  background: var(--accent-soft);
}

button.danger-ghost:hover {
  border-color: #efc0c0;
  color: var(--danger);
  background: #fff5f5;
}

.error {
  color: var(--danger);
  min-height: 1.25em;
  font-size: 0.88rem;
  margin: 10px 0 0;
}

.muted { color: var(--muted); font-size: 0.85rem; }

/* ---------- Workspace ---------- */
.workspace {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: rgba(255, 250, 252, 0.92);
  border-bottom: 1px solid rgba(255, 208, 224, 0.85);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(145deg, #ffb8d4 0%, #ff5e96 52%, #ff7dad 100%);
  border: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 4px 14px rgba(255, 94, 150, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.48),
    inset 0 -1px 0 rgba(180, 40, 90, 0.12);
}

.brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.42), transparent 52%),
    radial-gradient(circle at 82% 88%, rgba(255, 255, 255, 0.12), transparent 45%);
  pointer-events: none;
}

.brand-mark::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 2px rgba(255, 94, 150, 0.35);
  pointer-events: none;
}

.brand-mark-inner {
  position: relative;
  z-index: 1;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  padding: 5px 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 2px 8px rgba(180, 40, 90, 0.16);
}

.brand-mark-bar {
  display: block;
  height: 2.5px;
  border-radius: 999px;
  background: rgba(255, 94, 150, 0.32);
}

.brand-mark-bar:nth-child(1) {
  width: 100%;
  background: linear-gradient(90deg, #ff5e96, #ff8fb8);
}

.brand-mark-bar:nth-child(2) {
  width: 78%;
}

.brand-mark-bar:nth-child(3) {
  width: 52%;
  opacity: 0.75;
}

.brand {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 2px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  margin-left: auto;
  min-width: 0;
}

.top-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.top-group-month {
  display: inline-flex;
  align-items: center;
}

.top-group-search {
  flex: 0 1 auto;
  gap: 8px;
  min-height: 38px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.top-group-tools {
  padding: 3px;
  min-height: 38px;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 208, 224, 0.9);
  border-radius: 12px;
}

.top-group-account {
  gap: 0;
  min-height: 38px;
  box-sizing: border-box;
  padding: 3px 4px 3px 6px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 208, 224, 0.9);
  border-radius: 12px;
}

/* 统一顶栏按钮：同高、同圆角、同字重，只用粉色系做强调 */
.tb-btn,
a.tb-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 12px;
  margin: 0;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.tb-btn:hover,
a.tb-btn:hover {
  background: rgba(255, 214, 230, 0.75);
  color: var(--accent-hover);
  border-color: transparent;
}

.tb-btn:active,
a.tb-btn:active {
  transform: none;
}

.tb-btn-accent {
  background: rgba(255, 94, 150, 0.12);
  color: #d94880;
  border-color: rgba(255, 94, 150, 0.22);
}

.tb-btn-accent:hover {
  background: rgba(255, 94, 150, 0.2);
  color: var(--accent-hover);
  border-color: rgba(255, 94, 150, 0.35);
}

.month-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  height: 38px;
  box-sizing: border-box;
  padding: 3px 4px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 180, 210, 0.55);
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(255, 94, 150, 0.06);
}

.month-nav .icon-btn {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  line-height: 1;
  transform: none;
}

.month-nav .icon-btn:active {
  transform: none;
}

.month-display-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.month-display {
  appearance: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 32px;
  min-width: 118px;
  margin: 0;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  line-height: 1;
  font: inherit;
}

.month-display:hover,
.month-display[aria-expanded="true"] {
  background: rgba(255, 214, 230, 0.55);
}

.month-display[aria-expanded="true"] {
  box-shadow: inset 0 0 0 2px rgba(255, 94, 150, 0.28);
  background: rgba(255, 240, 247, 0.85);
}

.month-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  margin: 0;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
  letter-spacing: 0.02em;
  pointer-events: none;
  user-select: none;
  white-space: nowrap;
}

.month-popover {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  width: min(248px, calc(100vw - 24px));
  padding: 12px 14px 10px;
  background: #fff;
  border: 1px solid rgba(255, 180, 210, 0.55);
  border-radius: 14px;
  box-shadow: 0 14px 36px rgba(180, 60, 110, 0.16);
}

.month-popover-year {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.month-picker-year {
  flex: 1;
  text-align: center;
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: 0.04em;
}

.month-nav .icon-btn-sm {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  font-size: 1.05rem;
}

.month-picker-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.month-picker-cell {
  appearance: none;
  margin: 0;
  border: 1px solid rgba(255, 208, 224, 0.9);
  border-radius: 10px;
  background: #fffbfc;
  padding: 9px 0;
  font-family: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease, box-shadow 0.12s ease;
}

.month-picker-cell:hover {
  background: rgba(255, 214, 230, 0.7);
  border-color: rgba(255, 94, 150, 0.35);
  color: var(--ink);
}

.month-picker-cell.is-selected {
  background: linear-gradient(180deg, rgba(255, 94, 150, 0.18), rgba(255, 94, 150, 0.1));
  border-color: rgba(255, 94, 150, 0.5);
  color: #d94880;
  box-shadow: 0 2px 8px rgba(255, 94, 150, 0.12);
}

.month-picker-cell.is-current:not(.is-selected) {
  border-color: rgba(255, 94, 150, 0.32);
  color: var(--ink);
}

.month-popover-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 208, 224, 0.65);
}

.month-picker-foot-btn {
  appearance: none;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 5px 10px;
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: #9a92a0;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.month-picker-foot-btn:hover {
  background: rgba(255, 214, 230, 0.45);
  color: var(--ink-soft);
}

.month-picker-foot-btn.is-primary {
  color: #d94880;
}

.month-picker-foot-btn.is-primary:hover {
  background: rgba(255, 94, 150, 0.12);
  color: var(--accent-hover);
}

.import-mode {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff5fa;
  border: 1px solid #ffd6e6;
  cursor: pointer;
}

.import-mode input {
  width: auto;
  margin-top: 3px;
}

.import-mode span {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}

.import-mode-warn span strong {
  color: #c45a1a;
}

.month-display:focus-visible {
  outline: none;
}

.month-display:focus-visible:not([aria-expanded="true"]) {
  box-shadow: inset 0 0 0 2px rgba(255, 94, 150, 0.28);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  padding: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 1.15rem;
  line-height: 1;
  font-weight: 500;
  border: 0;
}

.icon-btn:hover {
  background: rgba(255, 214, 230, 0.8);
  color: var(--accent);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  box-sizing: border-box;
  background: transparent;
  color: #c74374;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

.chip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff7aa2;
  box-shadow: 0 0 0 3px rgba(255, 122, 162, 0.2);
}

.account-links {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-left: 2px;
  padding-left: 6px;
  border-left: 1px solid rgba(255, 208, 224, 0.95);
}

.tb-link,
a.tb-link {
  appearance: none;
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 10px;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none;
}

.tb-link:hover,
a.tb-link:hover {
  background: rgba(255, 214, 230, 0.7);
  color: var(--accent-hover);
}

.tb-link-danger {
  color: var(--muted);
}

.tb-link-danger:hover {
  background: #fff0f2;
  color: var(--danger);
}

.overlap-btn {
  position: relative;
}

.overlap-btn.has-alert {
  color: #c45a1a !important;
  background: rgba(255, 154, 99, 0.14) !important;
  border-color: rgba(255, 154, 99, 0.28) !important;
}

.overlap-btn .badge {
  display: inline-grid;
  place-items: center;
  min-width: 16px;
  height: 16px;
  margin-left: 2px;
  padding: 0 4px;
  border-radius: 999px;
  background: #ff5a6e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

/* 组织入口与工具组同风格，不再单独抢色 */
a.org-btn,
.org-btn {
  color: inherit;
  background: transparent;
  border-color: transparent;
}

a.org-btn:hover,
.org-btn:hover {
  background: rgba(255, 214, 230, 0.75);
  color: var(--accent-hover);
}

button.primary.compact-primary {
  width: auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 0.82rem;
}

@media (max-width: 980px) {
  .top-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .top-group-tools,
  .top-group-account {
    flex-wrap: wrap;
  }
}

.presence {
  padding: 9px 18px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  /* 实色底，避免表格内容从下方透出 */
  background-color: #ffe8f2;
  background-image: linear-gradient(90deg, #ffe3ef 0%, #e8fff6 52%, #e5f4ff 100%);
  border-bottom: 1px solid rgba(255, 176, 200, 0.9);
  min-height: 36px;
  box-sizing: border-box;
  flex: 0 0 auto;
  position: relative;
  z-index: 15;
}

.schedule-pane {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.schedule-toolbar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.schedule-search {
  width: min(188px, 40vw);
  height: 32px;
  padding: 0 14px;
  box-sizing: border-box;
  border: 1px solid rgba(255, 176, 200, 0.9);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font);
  font-size: 0.8rem;
  color: var(--ink-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-search::placeholder {
  color: #a8a0a6;
}

.schedule-search:focus {
  outline: none;
  border-color: #ffb0c8;
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.1);
}

.schedule-search-hint {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  line-height: 26px;
}

@media (max-width: 980px) {
  .top-group-search {
    order: -1;
    width: 100%;
  }

  .schedule-search {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
  }
}

.schedule-empty {
  text-align: center;
  padding: 28px 16px !important;
  color: var(--muted);
  font-size: 0.9rem;
}

.hint-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  padding: 10px 18px 12px;
  color: var(--muted);
  font-size: 0.8rem;
  background: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(234, 223, 232, 0.85);
  flex: 0 0 auto;
}

.grid-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  /* 四边不留内边距：否则横向滚动时内容会从 sticky 左列外侧透出 */
  padding: 0 0 8px;
  scrollbar-gutter: stable;
  --sticky-col-w: 92px;
  --sticky-col2-w: 128px;
}

.schedule-grid {
  border-collapse: separate;
  border-spacing: 0;
  min-width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 0;
  border-top: 0;
  border-radius: 0 0 16px 0;
  /* 不可用 overflow:hidden，否则会破坏 thead/左右列 sticky */
  overflow: visible;
  box-shadow: 0 10px 28px rgba(20, 36, 28, 0.05);
}

.schedule-grid th,
.schedule-grid td {
  border-right: 1px solid #f0e8ee;
  border-bottom: 1px solid #f0e8ee;
  padding: 8px 9px;
  font-size: 13.5px;
  vertical-align: middle;
  min-width: 122px;
  max-width: 172px;
}

/* 日期表头：钉在滚动区顶部（紧贴协同条） */
.schedule-grid thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background-color: #f7f0f5;
  background-image: none;
  color: var(--ink-soft);
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.02em;
  box-shadow: 0 1px 0 #ffb0c8;
}

.schedule-grid th.day-head {
  padding: 7px 6px 8px;
  line-height: 1.2;
  vertical-align: middle;
  background-color: #f7f0f5;
}

.day-num {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}

.day-week {
  display: block;
  margin-top: 3px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9a92a0;
}

.schedule-grid th.day-head.is-weekend {
  background-color: #fff0e8;
}

.schedule-grid th.day-head.is-weekend .day-num {
  color: #c45a1a;
}

.schedule-grid th.day-head.is-weekend .day-week {
  color: #d47a3a;
}

/* 客服 / 类型列：横向滚动冻结（宽度写死，避免两列之间留缝透出） */
.schedule-grid tbody .sticky-col,
.schedule-grid tbody .sticky-col2 {
  position: sticky;
  z-index: 3;
}

.schedule-grid .sticky-col {
  left: 0;
  width: var(--sticky-col-w);
  min-width: var(--sticky-col-w);
  max-width: var(--sticky-col-w);
  box-sizing: border-box;
  font-weight: 600;
  text-align: center;
  background-color: #faf4f8;
  /* 左边框随冻结列一起钉住 */
  border-left: 1px solid var(--line);
  /* 向左多盖一层，挡住亚像素/滚动缝 */
  box-shadow:
    -2px 0 0 0 #faf4f8,
    1px 0 0 #e8dfe6;
}

.schedule-grid .sticky-col2 {
  left: var(--sticky-col-w);
  width: var(--sticky-col2-w);
  min-width: var(--sticky-col2-w);
  max-width: var(--sticky-col2-w);
  box-sizing: border-box;
  vertical-align: middle;
  background-color: #faf4f8;
  box-shadow: 2px 0 6px rgba(20, 36, 28, 0.06);
}

.schedule-grid tbody td:has(> .cell) {
  height: 1px;
}

.schedule-grid tbody td > .cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 2px 3px;
  min-height: 42px;
  height: 100%;
  box-sizing: border-box;
}

/* 左上角表头：纵向+横向同时冻结 */
.schedule-grid thead th.sticky-col,
.schedule-grid thead th.sticky-col2 {
  z-index: 8;
  background-color: #f7f0f5;
  background-image: none;
}

.schedule-grid thead th.sticky-col {
  border-left: 1px solid var(--line);
  box-shadow:
    -2px 0 0 0 #f7f0f5,
    0 1px 0 #ffb0c8,
    1px 0 0 #ffb0c8;
}

.schedule-grid thead th.sticky-col2 {
  box-shadow:
    0 1px 0 #ffb0c8,
    2px 0 6px rgba(20, 36, 28, 0.06);
}

.agent-name {
  display: inline-block;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.35;
}

.type-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  vertical-align: middle;
  border: 1px solid transparent;
}

/* 行类型标签：与右侧 A/C/K/L/S 排班色块刻意区分 */
.type-tag.phone {
  background: #b6ebe3;
  color: #0d5c54;
  border: 1.5px solid #3dbda8;
}

.type-tag.cloud {
  background: #dde4ff;
  color: #4338ca;
  border: 1px solid #a5b4fc;
}

.type-tag.ticket {
  background: #fce4ef;
  color: #be185d;
  border: 1px solid #f0abce;
}

.cell {
  cursor: pointer;
  border-radius: 8px;
  padding: 6px 5px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
  font-size: 13.5px;
  transition: background 140ms ease, box-shadow 140ms ease;
}

.cell:hover {
  background: rgba(255, 122, 162, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 162, 0.35);
}

.cell.has-remote {
  box-shadow: inset 0 0 0 2px rgba(255, 179, 138, 0.95);
  background: rgba(255, 232, 218, 0.7);
}

.cell.readonly {
  cursor: default;
  opacity: 0.78;
}

.cell.readonly:hover {
  background: transparent;
  box-shadow: none;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f5eef3;
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ink);
}

.seg[data-p="A"] { background: #d2fff0; color: #0f8f68; }
.seg[data-p="C"] { background: #fff3d6; color: #a67c00; }
.seg[data-p="K"] { background: #d7f0ff; color: #1a78c2; }
.seg[data-p="L"] { background: #ffe1cf; color: #d6621e; }
.seg[data-p="S"] { background: #eadfff; color: #6b3fd4; }

.row-phone td { background: #fff; }
.row-cloud td { background: #fbfcfe; }
.row-ticket td { background: #fcfafd; color: var(--muted); }

.row-phone .sticky-col,
.row-phone .sticky-col2 { background-color: #ecf8f6; }

.row-phone .sticky-col {
  box-shadow:
    -2px 0 0 0 #ecf8f6,
    1px 0 0 #e8dfe6;
}

.row-cloud .sticky-col,
.row-cloud .sticky-col2 { background-color: #f2f4ff; }

.row-cloud .sticky-col {
  box-shadow:
    -2px 0 0 0 #f2f4ff,
    1px 0 0 #e8dfe6;
}

.row-ticket .sticky-col,
.row-ticket .sticky-col2 { background-color: #fef5f9; }

.row-ticket .sticky-col {
  box-shadow:
    -2px 0 0 0 #fef5f9,
    1px 0 0 #e8dfe6;
}

.hint-bar code {
  font-family: var(--mono);
  font-size: 0.78rem;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink-soft);
}

/* ---------- Dialogs ---------- */
dialog:not([open]) {
  display: none !important;
}

dialog::backdrop {
  background: rgba(16, 28, 22, 0.42);
  backdrop-filter: blur(2px);
}

/* 统一信息 / 确认弹框 */
.app-dialog,
.org-reset-dialog {
  width: min(420px, 92vw);
  padding: 0;
  border: none;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(165deg, #fff 0%, #fff8fb 100%);
  box-shadow: 0 24px 60px rgba(255, 94, 150, 0.18), 0 8px 24px rgba(30, 20, 30, 0.08);
  color: var(--ink);
}

.app-dialog-body,
.org-reset-dialog-body {
  padding: 28px 26px 22px;
  text-align: center;
}

.app-dialog-icon,
.org-reset-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe3ef, #ffd6e8);
  color: #ff5e96;
  box-shadow: 0 6px 18px rgba(255, 94, 150, 0.22);
}

.app-dialog-icon.is-success {
  background: linear-gradient(145deg, #d1fae5, #a7f3d0);
  color: #059669;
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.18);
}

.app-dialog-icon.is-error {
  background: linear-gradient(145deg, #ffe4e6, #fecdd3);
  color: #e11d48;
  box-shadow: 0 6px 18px rgba(225, 29, 72, 0.16);
}

.app-dialog-icon.is-warn,
.org-reset-icon.is-warn {
  background: linear-gradient(145deg, #fff0e0, #ffe4c8);
  color: #e07a00;
  box-shadow: 0 6px 18px rgba(224, 122, 0, 0.18);
}

.app-dialog-icon.is-info {
  background: linear-gradient(145deg, #e0f2fe, #bae6fd);
  color: #0284c7;
  box-shadow: 0 6px 18px rgba(2, 132, 199, 0.16);
}

.app-dialog-eyebrow,
.org-reset-eyebrow {
  margin: 0 0 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #ffb0c8;
}

.app-dialog-confirm .app-dialog-eyebrow,
.org-reset-dialog-confirm .org-reset-eyebrow {
  color: #f0b070;
}

.app-dialog h3,
.org-reset-dialog h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.35rem;
  color: var(--ink);
}

.app-dialog-message {
  margin: 0 0 16px;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--muted);
  text-align: center;
}

.app-dialog-message.hidden {
  display: none;
}

.app-dialog-message p {
  margin: 0;
}

.app-dialog-message p + p {
  margin-top: 6px;
}

.app-dialog-note-box,
.org-reset-note-box {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(255, 176, 200, 0.45);
  text-align: left;
}

.app-dialog-note-box.hidden {
  display: none;
}

.app-dialog-note-box p,
.org-reset-note-box p {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--muted);
}

.app-dialog-note-box p + p,
.org-reset-note-box p + p {
  margin-top: 8px;
}

.app-dialog-actions,
.org-reset-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.app-dialog-actions .org-btn,
.org-reset-actions .org-btn {
  min-width: 108px;
}

.app-dialog-actions .org-btn.org-btn-danger {
  background: #e11d48;
  color: #fff;
  border-color: #e11d48;
}

.app-dialog-actions .org-btn.org-btn-danger:hover {
  background: #be123c;
  border-color: #be123c;
}

/* 表单类弹框（编辑、导入等） */
.app-dialog-form {
  width: min(480px, 92vw);
}

.app-dialog-body-form {
  text-align: left;
  padding: 24px 24px 20px;
}

.app-dialog-form-head {
  text-align: center;
  margin-bottom: 16px;
}

.app-dialog-form-head h3 {
  margin: 4px 0 6px;
}

.app-dialog-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  line-height: 1.5;
}

.app-dialog-body-form textarea,
.app-dialog-body-form input[type="password"],
.app-dialog-body-form input[type="text"],
.app-dialog-body-form .pwd-field,
.app-dialog-body-form label {
  width: 100%;
  box-sizing: border-box;
}

.app-dialog-body-form label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.app-dialog-body-form textarea,
.app-dialog-body-form input[type="password"],
.app-dialog-body-form .pwd-field input {
  padding: 10px 12px;
  border: 1px solid rgba(255, 176, 200, 0.65);
  border-radius: 12px;
  font: inherit;
  font-size: 0.88rem;
  background: #fff;
}

.app-dialog-body-form textarea:focus,
.app-dialog-body-form input[type="password"]:focus,
.app-dialog-body-form .pwd-field input:focus {
  outline: none;
  border-color: #ffb0c8;
  box-shadow: 0 0 0 3px rgba(255, 94, 150, 0.1);
}

.app-dialog-error,
.app-dialog-body-form .error {
  min-height: 1.2em;
  margin: 8px 0 0;
  font-size: 0.84rem;
  color: var(--danger);
}

.app-dialog-body-form .import-mode {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid rgba(255, 208, 224, 0.9);
  background: #fffbfc;
  cursor: pointer;
}

.app-dialog-body-form .import-mode-warn {
  border-color: rgba(255, 94, 150, 0.35);
  background: #fff5f8;
}

.app-dialog-body-form .muted {
  margin: 0 0 12px;
  font-size: 0.82rem;
}

.app-dialog-body-form .dlg-actions {
  justify-content: center;
  margin-top: 18px;
}

.app-dialog-body-form .dlg-actions .org-btn,
.app-dialog-body-form .dlg-actions button.primary,
.app-dialog-body-form .dlg-actions button.ghost {
  min-width: 96px;
  height: 36px;
  padding: 0 16px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.app-dialog-body-form .dlg-actions button.ghost,
.app-dialog-body-form .dlg-actions .org-btn-ghost {
  background: #fff;
  border: 1px solid #d9d0d6;
  color: var(--ink-soft);
}

.app-dialog-body-form .dlg-actions button.primary,
.app-dialog-body-form .dlg-actions .org-btn-primary {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: #fff;
}

dialog {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px;
  width: min(520px, 92vw);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

dialog h3 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.2rem;
}

.org-reset-user {
  margin: 0 0 18px;
  font-size: 0.88rem;
  color: var(--muted);
}

.org-reset-user strong {
  color: var(--ink);
  font-weight: 600;
}

.org-reset-pwd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 18px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #fff;
  border: 1.5px dashed rgba(255, 94, 150, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.org-reset-pwd-label {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
}

.org-reset-pwd-value {
  display: block;
  font-family: var(--mono);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: #d94880;
  user-select: all;
}

.org-reset-tip {
  margin: 0 0 20px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--muted);
}

.org-reset-confirm-target {
  margin-bottom: 14px;
  line-height: 1.55;
}

.org-reset-self-note {
  color: #c45a00 !important;
  font-weight: 600;
}

.dlg-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.dlg-actions button.primary { width: auto; min-width: 88px; }

.audit-list {
  max-height: 42vh;
  overflow: auto;
  font-size: 0.86rem;
  margin-top: 8px;
}

.audit-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.audit-item:last-child { border-bottom: 0; }

.manual-dialog {
  width: min(720px, 94vw);
  max-height: min(90vh, 860px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(42, 36, 48, 0.18);
}

.manual-dialog[open] {
  display: flex;
  flex-direction: column;
}

.manual-dialog::backdrop {
  background: rgba(42, 36, 48, 0.38);
}

.manual-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff8fb, #fff5fa);
  flex: 0 0 auto;
}

.manual-head h3 {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--ink);
}

.manual-head-desc {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}

.manual-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fffafc;
  -webkit-overflow-scrolling: touch;
}

.manual-sec {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(255, 208, 224, 0.95);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 0 rgba(255, 94, 150, 0.04);
}

.manual-sec h4 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.3;
}

.manual-num {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--accent-soft);
  color: #c43a6a;
  font-family: var(--display);
  font-size: 0.72rem;
  font-weight: 700;
}

.manual-sec p,
.manual-sec li {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.82rem;
  line-height: 1.55;
}

.manual-sec > p + ul,
.manual-sec > p + ol,
.manual-sec > ul + p,
.manual-sec > ol + p {
  margin-top: 8px;
}

.manual-note {
  margin-top: 8px !important;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--sky-soft);
  border: 1px solid #9ad4ff;
  color: #1a78c2 !important;
  font-size: 0.78rem !important;
}

.manual-sec ul,
.manual-sec ol {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 5px;
}

.manual-sub {
  margin-top: 4px !important;
  gap: 3px !important;
}

.manual-shift-list {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px !important;
  padding-left: 0 !important;
  list-style: none;
}

.manual-shift-list li {
  padding: 6px 8px;
  border-radius: 8px;
  background: #fff5fa;
  border: 1px solid #ffe0ec;
}

.manual-sec code {
  font-family: var(--mono);
  font-size: 0.76rem;
  background: var(--lavender-soft);
  border: 1px solid #e0d0ff;
  border-radius: 6px;
  padding: 1px 6px;
  color: #6b3fd4;
  word-break: break-all;
}

.overlap-dialog {
  width: min(1120px, 96vw);
  max-height: 92vh;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.overlap-intro {
  margin: 0;
  padding: 10px 22px 4px;
  line-height: 1.55;
}

.overlap-list {
  padding: 8px 18px 20px;
  overflow: auto;
  max-height: 72vh;
  display: grid;
  gap: 14px;
}

.overlap-list-page {
  max-height: none;
  overflow: visible;
  padding: 4px 0 8px;
}

body.is-overlap {
  min-height: 100vh;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(255, 214, 230, 0.85), transparent 60%),
    radial-gradient(900px 420px at 90% 0%, rgba(215, 240, 255, 0.7), transparent 55%),
    var(--bg);
}

.overlap-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.overlap-shell {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto 28px;
  display: grid;
  gap: 16px;
}

.overlap-hero {
  margin-top: 8px;
}

.overlap-toolbar-panel .org-panel-head-row {
  align-items: center;
}

.overlap-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.overlap-toolbar-month {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.overlap-field-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.overlap-month-nav {
  flex-shrink: 0;
}

.overlap-toolbar .overlap-refresh-btn {
  height: 38px;
  padding: 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
}

.overlap-toolbar .overlap-refresh-btn:hover {
  color: var(--accent-hover);
}

.overlap-toolbar .overlap-export-btn {
  height: 38px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
}

.overlap-list-panel {
  min-height: 280px;
}

.overlap-empty {
  padding: 18px 6px 8px;
}

.overlap-card {
  background: linear-gradient(180deg, #fff, #fff8fb);
  border: 1px solid rgba(255, 176, 200, 0.75);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(255, 94, 150, 0.06);
}

.overlap-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(255, 208, 224, 0.9);
  background: linear-gradient(90deg, rgba(255, 214, 230, 0.55), rgba(215, 240, 255, 0.35));
}

.overlap-card-head h4 {
  margin: 0;
  font-size: 1rem;
  color: var(--ink);
}

.overlap-card-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.overlap-chip {
  flex: 0 0 auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: #9a2f4d;
  background: #ffe0ea;
  border: 1px solid #ffb7cb;
  border-radius: 999px;
  padding: 5px 10px;
}

.overlap-card-body {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: 0;
}

.overlap-col {
  padding: 12px 14px 14px;
  min-width: 0;
}

.overlap-col + .overlap-col {
  border-left: 1px dashed rgba(255, 176, 200, 0.85);
  background: rgba(255, 248, 251, 0.65);
}

.overlap-col h5 {
  margin: 0 0 10px;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--muted);
  font-weight: 700;
}

.overlap-people {
  display: grid;
  gap: 10px;
}

.overlap-person {
  border: 1px solid rgba(234, 223, 232, 0.95);
  border-radius: 12px;
  padding: 10px 12px;
  background: #fff;
}

.overlap-person-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.overlap-person-head .overlap-fix-btn {
  flex: 0 0 auto;
}

.overlap-person-head strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.overlap-time {
  font-size: 0.8rem;
  font-weight: 650;
  color: #b5471b;
  font-variant-numeric: tabular-nums;
}

.overlap-kv {
  margin: 0;
  display: grid;
  gap: 8px;
}

.overlap-kv > div {
  display: grid;
  gap: 3px;
}

.overlap-kv dt {
  font-size: 0.72rem;
  color: var(--muted);
}

.overlap-kv dd {
  margin: 0;
}

.overlap-code {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 8px;
  background: #eef8ff;
  border: 1px solid #cfe8fb;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.4;
  color: #1f6f9f;
  word-break: break-all;
  white-space: pre-wrap;
}

.overlap-code.is-seg {
  background: #ffe3e8;
  border-color: #ff6b81;
  color: #e0113a;
  font-weight: 650;
}

.overlap-explains {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.overlap-explain-item {
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff7f0;
  border: 1px solid #ffd7b8;
}

.overlap-explain-main {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--ink);
  font-weight: 650;
}

.overlap-explain-sub {
  margin: 8px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  font-size: 0.76rem;
  color: var(--ink-soft);
  font-family: var(--mono);
}

.overlap-vs {
  color: var(--accent);
  font-weight: 800;
}

@media (max-width: 820px) {
  .overlap-card-body {
    grid-template-columns: 1fr;
  }
  .overlap-col + .overlap-col {
    border-left: 0;
    border-top: 1px dashed rgba(255, 176, 200, 0.85);
  }
}

/* legacy hooks kept for safety */
.overlap-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.overlap-item:last-child { border-bottom: 0; }

.overlap-item h4 {
  margin: 0 0 6px;
  font-size: 0.9rem;
}

.org-tabs {
  display: flex;
  gap: 0;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.org-tab {
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 16px;
  font-weight: 600;
  font-size: 0.86rem;
  border-bottom: 2px solid transparent;
}

.org-tab.is-on {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.org-body {
  padding: 14px 18px 18px;
  overflow: auto;
  min-height: 0;
  flex: 1 1 auto;
}

.org-table-wrap {
  overflow: auto;
  flex: 1 1 auto;
  min-height: 200px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.org-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.org-table th,
.org-table td {
  padding: 10px 10px;
  border-bottom: 1px solid #f0e8ee;
  text-align: left;
  vertical-align: middle;
}

.org-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #fff8fb;
  font-weight: 600;
  color: var(--ink-soft);
  font-size: 0.78rem;
}

.org-table tbody tr:hover:not(.is-editing) {
  background: rgba(255, 245, 250, 0.6);
}

.org-table-wrap-page {
  max-height: none;
}

@media (max-width: 820px) {
  .manual-dialog {
    width: min(96vw, 720px);
    max-height: 92vh;
  }

  .manual-shift-list {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 980px) {
  .manual-link {
    font-size: 0.76rem;
    padding: 6px 10px;
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes hero-drift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to { transform: scale(1.06) translate3d(-1.2%, -0.8%, 0); }
}

@media (max-width: 980px) {
  body.is-login,
  body.is-login #app {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
  }
  .login-screen {
    height: auto;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: auto;
  }
  .login-stage {
    height: auto;
    grid-template-columns: 1fr;
  }
  .login-hero {
    height: auto;
    min-height: 48vh;
    grid-template-rows: minmax(12vh, 0.45fr) 1fr;
    justify-items: start;
  }
  .login-hero-content {
    height: auto;
    min-height: 0;
    max-height: none;
    justify-content: flex-start;
    justify-self: start;
    padding: 8px 20px 24px 24px;
  }
  .login-hero-content h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
  }
  .login-side {
    height: auto;
    min-height: auto;
    padding-bottom: 28px;
    overflow: visible;
  }
}

@media (max-width: 720px) {
  .brand-sub { display: none; }
  .schedule-grid th,
  .schedule-grid td {
    min-width: 100px;
    font-size: 12px;
  }
  .cell { font-size: 12px; }
  .seg { font-size: 11.5px; }
  .topbar { padding: 12px; }
  .login-highlights { gap: 8px; }
  .login-flow { gap: 8px; }
}

/* ---------- 操作记录完整页 ---------- */
body.is-audit {
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(255, 94, 150, 0.18), transparent 55%),
    radial-gradient(800px 380px at 92% 0%, rgba(107, 63, 212, 0.12), transparent 50%),
    linear-gradient(180deg, #fff7fb 0%, #fff0f6 120px, #f4f7ff 100%);
  min-height: 100vh;
  overflow: auto;
}

.audit-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.audit-topbar {
  flex: 0 0 auto;
}

.audit-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.audit-hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 22px 24px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 245, 250, 0.88));
  border: 1px solid rgba(255, 180, 210, 0.45);
  box-shadow: 0 10px 28px rgba(180, 60, 110, 0.06);
}

.audit-eyebrow {
  margin: 0 0 6px;
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c44a7a;
  font-weight: 600;
}

.audit-hero h1 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  color: var(--ink);
}

.audit-lead {
  margin: 0;
  max-width: 52ch;
  line-height: 1.65;
  color: #5c5560;
  font-size: 0.92rem;
}

.audit-hero-stats {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
  align-items: stretch;
}

.audit-stat {
  min-width: 118px;
  max-width: 148px;
  min-height: 92px;
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 180, 210, 0.35);
  box-shadow: 0 2px 10px rgba(180, 60, 110, 0.05);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 3px;
}

.audit-stat-label {
  font-size: 0.72rem;
  color: #8a8290;
  line-height: 1.3;
}

.audit-stat strong {
  font-size: clamp(1.05rem, 2vw, 1.32rem);
  color: var(--ink);
  font-family: Outfit, "Noto Sans SC", sans-serif;
  font-weight: 700;
  line-height: 1.25;
  word-break: keep-all;
}

.audit-stat-hint {
  font-size: 0.7rem;
  color: #9a92a0;
  line-height: 1.35;
  max-width: 11em;
}

.audit-filter-grid {
  display: grid;
  grid-template-columns: 160px minmax(180px, 1fr) 150px auto;
  gap: 12px 14px;
  align-items: end;
  padding: 0 4px 4px;
}

.audit-filter-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-bottom: 2px;
}

.audit-guide-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.audit-guide-list li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-size: 0.92rem;
  color: #5a5568;
  line-height: 1.5;
}

.audit-guide-foot {
  margin: 14px 0 0;
  font-size: 0.85rem;
}

.audit-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 14px;
  font-size: 0.8rem;
  color: #6a6270;
}

.audit-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  background: #bbb;
}

.audit-dot.is-create { background: #1aa56b; }
.audit-dot.is-update { background: #2f7fd6; }
.audit-dot.is-import { background: #c47a1a; }
.audit-dot.is-other { background: #8a7a96; }

.audit-table-wrap {
  overflow: auto;
  height: 560px;
  min-height: 360px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  will-change: contents;
  contain: layout paint;
}

.audit-table-wrap.is-fetching {
  opacity: 0.78;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.audit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  table-layout: fixed;
}

.audit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  padding: 12px 14px;
  background: linear-gradient(180deg, #fff8fb, #f7f0f5);
  color: #6a6270;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.audit-table th:nth-child(1),
.audit-table td:nth-child(1) { width: 7.5rem; }
.audit-table th:nth-child(2),
.audit-table td:nth-child(2) { width: 22%; }
.audit-table th:nth-child(5),
.audit-table td:nth-child(5) { width: 18%; }

.audit-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f0e8ee;
  vertical-align: top;
  height: 58px;
}

.audit-table tbody tr:hover td {
  background: #fffafc;
}

.audit-action {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
}

.audit-action.is-create {
  background: #d8f8ea;
  color: #0f8f68;
}

.audit-action.is-update {
  background: #dceeff;
  color: #1a6fb8;
}

.audit-action.is-import {
  background: #fff0d6;
  color: #a65d00;
}

.audit-action.is-other {
  background: #efe8f6;
  color: #6b3fd4;
}

.audit-subject {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audit-subject strong {
  color: var(--ink);
}

.audit-subject span {
  color: #7a7280;
  font-size: 0.82rem;
}

.audit-type {
  color: #9a4d72 !important;
}

.audit-value {
  display: inline-block;
  max-width: 280px;
  word-break: break-word;
  line-height: 1.45;
  color: var(--ink);
}

.audit-value.is-empty {
  color: #a59aaa;
  font-style: italic;
}

.audit-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.audit-meta strong {
  color: var(--ink);
}

.audit-meta span {
  color: #8a8290;
  font-size: 0.8rem;
}

.audit-pager {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.audit-pager-bottom {
  justify-content: flex-end;
  padding: 12px 4px 4px;
}

.audit-page-info {
  font-size: 0.84rem;
  color: #6a6270;
  min-width: 9.5em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.audit-pager button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.audit-feedback {
  min-height: 1.35em;
  margin: 8px 4px 0;
}

.audit-row-pad td {
  border-bottom-color: transparent;
  height: 58px;
}

@media (max-width: 900px) {
  .audit-hero {
    flex-direction: column;
    align-items: stretch;
  }
  .audit-hero-stats {
    width: 100%;
  }
  .audit-stat {
    flex: 1;
    max-width: none;
  }
  .audit-filter-grid {
    grid-template-columns: 1fr 1fr;
  }
  .audit-filter-actions {
    grid-column: 1 / -1;
  }
  .audit-table-wrap {
    height: 480px;
  }
}


