/* 员工 VISA 卡中心 — EasyGlobal SaaS 青绿主题 */
:root {
  --sv-teal: #0d9488;
  --sv-teal-deep: #0f766e;
  --sv-ink: #0f172a;
  --sv-muted: #64748b;
  --sv-bg: #f0fdfa;
  --sv-card: #fff;
  --sv-line: rgba(15, 23, 42, .08);
}

* { box-sizing: border-box; }
body.sv-body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "Inter", system-ui, sans-serif;
  background:
    radial-gradient(80% 50% at 0% 0%, rgba(13, 148, 136, .16), transparent 55%),
    linear-gradient(180deg, #ecfeff 0%, #f8fafc 40%, #fff 100%);
  color: var(--sv-ink);
}

.sv-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(15, 118, 110, .96);
  color: #ecfeff;
  backdrop-filter: blur(8px);
}
.sv-top a { color: #ecfeff; text-decoration: none; font-weight: 700; }
.sv-top__title { flex: 1; font-weight: 800; font-size: 16px; }
.sv-top__brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  opacity: .9;
}
.sv-top__brand img { width: 28px; height: 28px; border-radius: 8px; background: #fff; }

.sv-wrap {
  width: min(980px, calc(100% - 28px));
  margin: 18px auto 0;
  padding-bottom: calc(88px + env(safe-area-inset-bottom));
}

.sv-hero {
  padding: 22px;
  border-radius: 20px;
  background: linear-gradient(155deg, #0f766e, #14b8a6 55%, #0d9488);
  color: #ecfeff;
  margin-bottom: 16px;
  box-shadow: 0 18px 40px rgba(13, 148, 136, .28);
}
.sv-hero h1 { margin: 6px 0 8px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.sv-hero p { margin: 0; opacity: .9; }
.sv-hero__kicker { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }

.sv-quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}
/* 默认在白底卡片上：黑字 + 浅青底（避免白字看不见） */
.sv-quick a, .sv-quick button {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  background: #f0fdfa;
  border: 1px solid rgba(13, 148, 136, .18);
  color: #0f172a;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.sv-quick a:hover, .sv-quick button:hover {
  background: #ccfbf1;
  color: #0f172a;
}
.sv-quick span { font-size: 20px; }
/* 青绿英雄区里仍用白字半透明按钮 */
.sv-hero .sv-quick a,
.sv-hero .sv-quick button {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
}
.sv-hero .sv-quick a:hover,
.sv-hero .sv-quick button:hover {
  background: rgba(255,255,255,.24);
  color: #fff;
}

.sv-card {
  background: var(--sv-card);
  border: 1px solid var(--sv-line);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .04);
}
.sv-card h2 { margin: 0 0 10px; font-size: 16px; }
.sv-hint { color: var(--sv-muted); font-size: 13px; margin: 0 0 12px; }

.sv-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
}
.sv-tab {
  flex: none;
  border: 0;
  background: #f1f5f9;
  color: #475569;
  font-weight: 700;
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.sv-tab.is-on { background: rgba(13,148,136,.15); color: var(--sv-teal-deep); }

.sv-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.sv-visa {
  position: relative;
  border-radius: 16px;
  min-height: 150px;
  padding: 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .18);
}
.sv-visa.is-locked { filter: saturate(.85); }
.sv-visa__lock {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  background: rgba(255,255,255,.55);
  color: #64748b;
  backdrop-filter: blur(1px);
}
.sv-visa.is-revealed .sv-visa__pan { letter-spacing: .12em; font-weight: 700; }

.sv-detail-acts {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 12px 0 4px;
}
.sv-link-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: #6d28d9;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  padding: 4px 0;
}
.sv-link-btn:disabled { opacity: .45; cursor: not-allowed; }
.sv-link-btn:hover:not(:disabled) { text-decoration: underline; }
.sv-visa__net { position: absolute; right: 14px; top: 14px; font-weight: 800; letter-spacing: .08em; opacity: .9; }
.sv-visa__tier { font-size: 11px; opacity: .85; font-weight: 700; }
.sv-visa__name { margin-top: 28px; font-size: 16px; font-weight: 800; }
.sv-visa__pan { margin-top: 10px; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.sv-visa__foot { display: flex; justify-content: space-between; margin-top: 14px; font-size: 12px; opacity: .9; }

.sv-prod {
  border: 1px solid var(--sv-line);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.sv-prod__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.sv-prod__body b { font-size: 14px; }
.sv-prod__body small { color: var(--sv-muted); }
.sv-prod__acts { display: flex; gap: 8px; margin-top: auto; }
.sv-prod__acts a, .sv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--sv-line);
  background: #fff;
  color: var(--sv-ink);
  cursor: pointer;
}
.sv-btn--primary, .sv-prod__acts a.sv-btn--primary {
  background: var(--sv-teal);
  border-color: var(--sv-teal);
  color: #fff;
}
.sv-btn--primary:hover { background: var(--sv-teal-deep); color: #fff; }

.sv-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sv-line);
}
.sv-row:last-child { border-bottom: 0; }
.sv-row b { display: block; }
.sv-row small { color: var(--sv-muted); }
.sv-row__amt { text-align: right; font-weight: 800; }
.sv-row__amt.is-out { color: #b45309; }
.sv-row__amt.is-in { color: var(--sv-teal-deep); }

.sv-steps { display: grid; gap: 10px; }
.sv-step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--sv-line);
}
.sv-step.is-done { background: #ecfdf5; border-color: rgba(13,148,136,.25); }
.sv-step__ico {
  width: 28px; height: 28px; border-radius: 999px;
  display: grid; place-items: center;
  background: #e2e8f0; font-weight: 800; font-size: 12px; flex: none;
}
.sv-step.is-done .sv-step__ico { background: var(--sv-teal); color: #fff; }

.sv-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.sv-field span { font-size: 13px; font-weight: 700; color: #334155; }
.sv-field input, .sv-field select, .sv-field textarea {
  min-height: 42px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--sv-line); font: inherit; background: #fff;
}

.sv-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.sv-stat {
  padding: 12px;
  border-radius: 12px;
  background: #f0fdfa;
  border: 1px solid rgba(13,148,136,.15);
}
.sv-stat b { display: block; font-size: 1.1rem; }
.sv-stat span { font-size: 12px; color: var(--sv-muted); }

.sv-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  width: 100%;
  max-width: 100vw;
  margin: 0;
  padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.98);
  border-top: 1px solid var(--sv-line);
  box-shadow: 0 -8px 24px rgba(15, 23, 42, .06);
  backdrop-filter: blur(8px);
}
.sv-bottom-nav a {
  text-align: center;
  text-decoration: none;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 10px;
}
.sv-bottom-nav a.is-on { color: var(--sv-teal-deep); background: rgba(13,148,136,.1); }
.sv-bottom-nav span { display: block; font-size: 16px; margin-bottom: 2px; }

.sv-toast {
  position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 999px;
  font-size: 13px; z-index: 50; display: none;
}
.sv-toast.is-on { display: block; }

.sv-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.sv-badge--ok { background: #dcfce7; color: #166534; }
.sv-badge--muted { background: #e2e8f0; color: #475569; }

.sv-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--sv-line);
}
.sv-card-row:last-child { border-bottom: 0; }
.sv-card-row__main b { display: block; font-size: 14px; }
.sv-card-row__main small { color: var(--sv-muted); font-size: 12px; }
.sv-card-row__side { display: flex; align-items: center; gap: 8px; }
.sv-more {
  width: 34px; height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(59,130,246,.35);
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  font-weight: 800;
}

.sv-menu-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: transparent;
}
.sv-menu {
  position: absolute; z-index: 70;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, .14);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.sv-menu button {
  appearance: none;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  color: var(--sv-ink);
  cursor: pointer;
}
.sv-menu button:hover { background: #f1f5f9; }
.sv-menu button:disabled { opacity: .45; cursor: not-allowed; }
.sv-menu button.is-danger { color: #b91c1c; }

.sv-modal[hidden], .sv-menu[hidden], .sv-menu-backdrop[hidden] { display: none !important; }
.sv-modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, .45);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.sv-modal__panel {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .2);
}
.sv-modal__panel h3 { margin: 0 0 12px; font-size: 16px; }
.sv-modal__panel label {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 10px; font-size: 13px; font-weight: 700; color: #334155;
}
.sv-modal__panel input {
  min-height: 42px; padding: 10px 12px; border-radius: 10px;
  border: 1px solid var(--sv-line); font: inherit;
}
.sv-modal__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }

.sv-spend__head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  align-items: flex-start;
  margin-bottom: 8px;
}
.sv-spend__label { font-size: 13px; color: var(--sv-muted); font-weight: 600; }
.sv-spend__total { font-size: clamp(1.6rem, 3vw, 2rem); font-weight: 800; margin-top: 4px; color: var(--sv-ink); }
.sv-spend__ctrl { display: flex; align-items: center; gap: 8px; }
.sv-spend__period {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: #475569;
}
.sv-spend__period select {
  min-height: 36px; border-radius: 10px; border: 1px solid var(--sv-line);
  padding: 6px 10px; font: inherit; background: #fff;
}
.sv-spend__chart {
  margin-top: 8px;
  border: 1px solid var(--sv-line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fafbff, #fff);
  padding: 8px 4px 4px;
  min-height: 220px;
}

.sv-tx-table-wrap { overflow-x: auto; }
.sv-tx-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sv-tx-table th {
  text-align: left;
  color: #64748b;
  font-weight: 700;
  padding: 10px 8px;
  border-bottom: 1px solid var(--sv-line);
  white-space: nowrap;
}
.sv-tx-table td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--sv-line);
  vertical-align: top;
}
.sv-tx-table td.is-out { color: #b91c1c; font-weight: 700; white-space: nowrap; }
.sv-tx-table td.is-in { color: #047857; font-weight: 700; white-space: nowrap; }
.sv-tx-empty {
  text-align: center;
  padding: 36px 12px 28px;
  color: var(--sv-muted);
}
.sv-tx-empty[hidden] { display: none !important; }
.sv-tx-empty__art {
  width: 72px; height: 72px; margin: 0 auto 12px;
  border-radius: 16px; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center;
  font-size: 34px;
}
.sv-tx-empty b { display: block; color: var(--sv-ink); font-size: 15px; margin-bottom: 6px; }
.sv-tx-empty p { margin: 0; font-size: 13px; }

.sv-section-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.sv-section-head h2 { margin: 0; }
.sv-kv { display: flex; flex-direction: column; }
.sv-kv__row {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--sv-line);
}
.sv-kv__row:last-child { border-bottom: 0; }
.sv-kv__row b { display: block; font-size: 14px; }
.sv-kv__row small { display: block; color: var(--sv-muted); font-size: 12px; margin-top: 4px; font-weight: 500; }
.sv-kv__val { font-weight: 700; color: #0f172a; text-align: right; }

.sv-limit-box {
  margin: 10px 0 6px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid var(--sv-line);
}
.sv-limit-box__top {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; margin-bottom: 8px;
}
.sv-limit-box__top span:first-child { font-weight: 700; color: #475569; }
.sv-limit-box__top b { margin-left: auto; color: #334155; }
.sv-progress {
  height: 8px; border-radius: 999px; background: #e2e8f0; overflow: hidden;
}
.sv-progress i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #6366f1, #8b5cf6);
  border-radius: 999px;
}
.sv-limit-box small { display: block; margin-top: 8px; color: var(--sv-muted); font-size: 12px; }

@media (max-width: 720px) {
  .sv-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sv-stats { grid-template-columns: 1fr; }
}
