/* 鑫鑫卡密 — header + footer */
@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@400;500;600;700&family=Sora:wght@600;700&display=swap");

:root {
  --sp-ink: #12161c;
  --sp-muted: #6a7380;
  --sp-line: rgba(18, 22, 28, 0.1);
  --sp-sea: #c45c26;
  --sp-sea-deep: #9e4518;
  --sp-paper: #eef1f4;
  --sp-surface: #ffffff;
  --sp-font-display: "Sora", "Noto Sans SC", "PingFang SC", sans-serif;
  --sp-font-ui: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  --sp-max: 1180px;
  --sp-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  font-family: var(--sp-font-ui);
  background: var(--sp-paper);
}

/* Hide legacy floating toolbar phones/branding clash */
.toolbar#toolbar {
  display: none !important;
}

/* —— Header —— */
.sp-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #ffffff;
  border-bottom: 1px solid var(--sp-line);
  box-shadow: none;
}

.sp-header__inner {
  width: min(var(--sp-max), calc(100% - 48px));
  margin: 0 auto;
  min-height: 68px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.sp-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--sp-ink);
}

.sp-logo img {
  display: block;
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
}

.sp-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  list-style: none;
  margin: 0;
  padding: 0;
}

.sp-nav > li {
  position: relative;
}

.sp-nav > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--sp-ink);
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.25s var(--sp-ease), background 0.25s var(--sp-ease);
}

.sp-nav > li > a:hover {
  color: var(--sp-sea);
  background: rgba(196, 92, 38, 0.06);
}

.sp-nav__drop {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 520px;
  padding: 18px;
  background: var(--sp-surface);
  border: 1px solid var(--sp-line);
  border-radius: 6px;
  box-shadow: 0 16px 40px rgba(18, 22, 28, 0.1);
  z-index: 20;
}

.sp-nav > li:hover > .sp-nav__drop {
  display: block;
}

.sp-nav__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
}

.sp-nav__cards a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: 4px;
  text-decoration: none;
  color: var(--sp-ink);
  border: 1px solid transparent;
  transition: border-color 0.25s, background 0.25s;
}

.sp-nav__cards a:hover {
  background: var(--sp-paper);
  border-color: var(--sp-line);
}

.sp-nav__cards img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 4px;
  background: #eef2f6;
}

.sp-nav__cards span {
  font-size: 0.86rem;
  font-weight: 500;
}

.sp-nav__hot {
  padding-top: 12px;
  border-top: 1px solid var(--sp-line);
  font-size: 0.84rem;
  color: var(--sp-muted);
  line-height: 1.8;
}

.sp-nav__hot strong {
  color: var(--sp-ink);
  font-weight: 600;
  margin-right: 6px;
}

.sp-nav__hot a {
  color: var(--sp-sea);
  text-decoration: none;
  margin-right: 10px;
}

.sp-nav__hot a:hover {
  text-decoration: underline;
}

.sp-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  margin-left: auto;
}

.sp-actions a {
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
}

.sp-actions__ghost {
  color: var(--sp-ink);
  padding: 8px 12px;
}

.sp-actions__ghost:hover {
  color: var(--sp-sea);
}

.sp-actions__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--sp-sea);
  color: #fff !important;
  transition: background 0.25s var(--sp-ease), transform 0.25s var(--sp-ease);
}

.sp-actions__btn:hover {
  background: var(--sp-sea-deep);
  transform: translateY(-1px);
}

.sp-actions__user {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sp-ink);
  padding: 6px 10px;
  border-radius: 4px;
}

.sp-actions__user:hover {
  background: rgba(196, 92, 38, 0.06);
  color: var(--sp-sea);
}

/* —— Footer —— */
.sp-footer {
  background: #12161c;
  color: rgba(244, 246, 248, 0.78);
  margin-top: 0;
}

.sp-footer a {
  color: rgba(247, 250, 252, 0.78);
  text-decoration: none;
}

.sp-footer a:hover {
  color: #fff;
}

.sp-footer__main {
  width: min(var(--sp-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 64px 0 48px;
  display: grid;
  grid-template-columns: 1.3fr 0.9fr 1.2fr;
  gap: 40px;
}

.sp-footer__brand {
  font-family: var(--sp-font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: #f7fafc;
  letter-spacing: 0.04em;
  margin: 0 0 14px;
}

.sp-footer__intro {
  margin: 0 0 18px;
  font-size: 0.92rem;
  line-height: 1.7;
  max-width: 28em;
  color: rgba(247, 250, 252, 0.62);
}

.sp-footer__company {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(247, 250, 252, 0.55);
}

.sp-footer h4 {
  margin: 0 0 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e8a87c;
}

.sp-footer__links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sp-footer__links a {
  font-size: 0.92rem;
}

.sp-footer__contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.9rem;
  line-height: 1.65;
}

.sp-footer__contact strong {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: rgba(247, 250, 252, 0.45);
  margin-bottom: 4px;
}

.sp-footer__contact a {
  color: #f7fafc;
}

.sp-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sp-footer__bottom-inner {
  width: min(var(--sp-max), calc(100% - 48px));
  margin: 0 auto;
  padding: 20px 0 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.84rem;
  color: rgba(247, 250, 252, 0.48);
}

.sp-footer__bottom a {
  color: rgba(247, 250, 252, 0.55);
}

.sp-footer__bottom a:hover {
  color: #fff;
}

.sp-footer__links-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 900px) {
  .sp-header__inner {
    flex-wrap: wrap;
    padding: 12px 0;
    gap: 12px;
  }

  .sp-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sp-nav__drop {
    min-width: 280px;
    left: 0;
    right: auto;
  }

  .sp-nav__cards {
    grid-template-columns: 1fr 1fr;
  }

  .sp-footer__main {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 48px 0 36px;
  }
}

@media (max-width: 640px) {
  .sp-header__inner,
  .sp-footer__main,
  .sp-footer__bottom-inner {
    width: min(var(--sp-max), calc(100% - 32px));
  }

  .sp-logo__name {
    font-size: 1rem;
  }

  .sp-actions__ghost {
    display: none;
  }
}

/* —— Confirm / 登录成功等系统弹窗 —— */
#modal-dialog.modal,
.modal#modal-dialog {
  font-family: var(--sp-font-ui);
  background: #fff !important;
  border: 1px solid rgba(18, 22, 28, 0.08) !important;
  border-radius: 14px !important;
  box-shadow: 0 24px 64px rgba(18, 22, 28, 0.16) !important;
  overflow: hidden;
  max-width: calc(100vw - 32px);
}

#modal-dialog .modal-header {
  display: none !important;
}

#modal-dialog .modal-prompt {
  padding: 0;
}

#modal-dialog .prompt {
  margin: 0 !important;
  padding: 36px 32px 28px !important;
  text-align: center;
  background: transparent;
}

#modal-dialog .prompt-icon {
  width: 64px !important;
  height: 64px !important;
  margin: 0 auto 18px !important;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
}

#modal-dialog .prompt-icon .iconimg {
  display: none !important;
}

#modal-dialog .prompt-icon::before {
  content: "";
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: block;
}

#modal-dialog .prompt-success .prompt-icon {
  background: rgba(196, 92, 38, 0.1);
}

#modal-dialog .prompt-success .prompt-icon::before {
  background: #c45c26;
  box-shadow: 0 8px 20px rgba(196, 92, 38, 0.28);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.0 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9.0 16.2L4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center / 28px 28px no-repeat;
}

/* fallback checkmark without mask support issues: draw with pseudo after */
#modal-dialog .prompt-success .prompt-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 46%;
  width: 14px;
  height: 8px;
  margin-left: -8px;
  margin-top: -6px;
  border-left: 2.5px solid #fff;
  border-bottom: 2.5px solid #fff;
  transform: rotate(-45deg);
  box-sizing: border-box;
}

#modal-dialog .prompt-success .prompt-icon::before {
  background: #c45c26;
  -webkit-mask: none;
  mask: none;
  box-shadow: 0 8px 20px rgba(196, 92, 38, 0.28);
}

#modal-dialog .prompt-info .prompt-icon {
  background: rgba(196, 92, 38, 0.1);
}

#modal-dialog .prompt-info .prompt-icon::before {
  background: #c45c26;
}

#modal-dialog .prompt-info .prompt-icon::after {
  content: "i";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: Georgia, "Sora", "Noto Sans SC", sans-serif;
  font-size: 28px;
  font-weight: 700;
  font-style: italic;
  line-height: 64px;
}

#modal-dialog .prompt-warning .prompt-icon {
  background: rgba(196, 165, 116, 0.18);
}

#modal-dialog .prompt-warning .prompt-icon::before {
  background: #e8a87c;
}

#modal-dialog .prompt-warning .prompt-icon::after {
  content: "!";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  color: #fff;
  font-size: 28px;
  font-weight: 700;
  line-height: 64px;
}

#modal-dialog .prompt-danger .prompt-icon {
  background: rgba(180, 35, 24, 0.1);
}

#modal-dialog .prompt-danger .prompt-icon::before {
  background: #b42318;
}

#modal-dialog .prompt-danger .prompt-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 2.5px;
  margin: -1px 0 0 -10px;
  background: #fff;
  border-radius: 2px;
  transform: rotate(45deg);
}

#modal-dialog .prompt-danger .prompt-icon {
  /* X mark: second stroke */
}

#modal-dialog .prompt-danger .prompt-icon::before {
  background: #b42318;
  position: relative;
}

/* use linear gradients for X instead */
#modal-dialog .prompt-danger .prompt-icon::before {
  background:
    linear-gradient(#fff,#fff) center / 20px 2.5px no-repeat,
    linear-gradient(#fff,#fff) center / 2.5px 20px no-repeat,
    #b42318;
  transform: rotate(45deg);
}

#modal-dialog .prompt-danger .prompt-icon::after {
  display: none;
}

#modal-dialog .prompt-cont {
  padding: 0 !important;
  overflow: visible !important;
}

#modal-dialog .prompt-cont h4 {
  margin: 0 0 10px !important;
  font-family: var(--sp-font-display) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  color: var(--sp-ink) !important;
  letter-spacing: 0.02em;
}

#modal-dialog .prompt-success .prompt-cont h4,
#modal-dialog .prompt-info .prompt-cont h4,
#modal-dialog .prompt-warning .prompt-cont h4,
#modal-dialog .prompt-danger .prompt-cont h4 {
  color: var(--sp-ink) !important;
}

#modal-dialog .prompt-cont p {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 0.95rem !important;
  line-height: 1.7 !important;
  color: var(--sp-muted) !important;
}

#modal-dialog .prompt-cont .action {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding-top: 24px !important;
  white-space: normal !important;
}

#modal-dialog .prompt-cont .action .btn {
  margin: 0 !important;
  min-height: 42px;
  min-width: 108px;
  padding: 0 22px !important;
  border-radius: 8px !important;
  font-size: 0.92rem !important;
  font-weight: 600 !important;
  line-height: 42px !important;
  border: 0 !important;
  box-shadow: none !important;
}

#modal-dialog .prompt-cont .action .btn-primary,
#modal-dialog .prompt-cont .action .btn-ok {
  background: var(--sp-sea) !important;
  color: #fff !important;
}

#modal-dialog .prompt-cont .action .btn-primary:hover,
#modal-dialog .prompt-cont .action .btn-ok:hover {
  background: var(--sp-sea-deep) !important;
}

#modal-dialog .prompt-cont .action .btn-default,
#modal-dialog .prompt-cont .action .btn-cancel {
  background: rgba(18, 22, 28, 0.05) !important;
  color: var(--sp-muted) !important;
}

/* 成功类自动跳转弹窗：隐藏取消，单按钮更干净 */
#modal-dialog .prompt-success .action .btn-cancel {
  display: none !important;
}

#modal-dialog .prompt-success .action .btn-ok {
  min-width: 140px;
}

.modal-cover#modal-dialog-cover,
#modal-dialog-cover.modal-cover {
  background: rgba(8, 18, 32, 0.48) !important;
  opacity: 1 !important;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
