/* Wallet Guardian 2026 Design System - Google Cloud Style (Compatible Build) */
:root {
  --side-bg: #f8f9fa;
  --main-bg: #ffffff;
  --primary: #1a73e8;
  --primary-hover: #1765cc;
  --success: #00a36c;
  --warning: #fbbc04;
  --danger: #d93025;
  --text-main: #202124;
  --text-secondary: #5f6368;
  --border: #dadce0;
  --border-soft: #eceff1;
  --font-sans: "SF Pro Display", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
  --focus-ring: 0 0 0 3px rgba(26, 115, 232, 0.22);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--side-bg);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--primary);
}

.hidden {
  display: none !important;
}

/* 基础组件 */
.btn,
button,
.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  background: white;
  color: var(--text-main);
  text-decoration: none;
  font-family: inherit;
}

button:hover,
.btn:hover,
.tab-btn:hover {
  box-shadow: var(--shadow-sm);
}

.btn-primary,
button[type="submit"]:not(.btn-secondary):not(.btn-danger) {
  background: var(--primary);
  color: white;
  border: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover,
button[type="submit"]:not(.btn-secondary):not(.btn-danger):hover {
  background: var(--primary-hover);
}

.btn-secondary {
  background: white;
  color: var(--text-main);
  border: 1px solid var(--border);
}

.btn-danger {
  background: #fce8e6;
  border-color: #f2b8b5;
  color: var(--danger);
}

.input-base,
input,
select,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  outline: none;
  transition: 0.2s;
  background: #fff;
  color: var(--text-main);
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

input[type="checkbox"] {
  width: auto;
  padding: 0;
  margin: 0;
}

/* 布局 */
.nav-top,
.gc-topbar {
  height: 64px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}

.app-container,
.gc-shell {
  display: flex;
  padding-top: 64px;
  min-height: 100vh;
}

.sidebar,
.gc-sidebar {
  width: 260px;
  padding: 24px 0;
  flex-shrink: 0;
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  overflow-y: auto;
}

.sidebar-item,
.gc-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-radius: 0 24px 24px 0;
  margin-right: 12px;
}

.sidebar-item:hover,
.gc-nav a:hover {
  background: rgba(0, 0, 0, 0.04);
}

.sidebar-item.active,
.gc-nav a.active {
  background: #e8f0fe;
  color: var(--primary);
}

.main-content,
.gc-main {
  flex: 1;
  background: var(--main-bg);
  margin-top: 8px;
  border-radius: 20px 0 0 0;
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  padding: 40px;
  min-height: calc(100vh - 72px);
  box-shadow: -4px 0 12px rgba(0, 0, 0, 0.02);
}

.card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: white;
  margin-bottom: 24px;
}

.badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
}

.badge-success,
.badge.low,
.inline-badge.low {
  background: #e6f4ea;
  color: var(--success);
}

.badge-warning,
.badge.medium,
.inline-badge.medium {
  background: #fef7e0;
  color: #b06000;
}

.badge-danger,
.badge.high,
.inline-badge.high {
  background: #fce8e6;
  color: var(--danger);
}

.badge-secondary {
  background: #f1f3f4;
  color: var(--text-secondary);
}

.inline-badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

/* 表格 */
.data-table,
table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
table th {
  text-align: left;
  padding: 12px;
  font-size: 11px;
  color: var(--text-secondary);
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
}

.data-table td,
table td {
  padding: 16px 12px;
  border-bottom: 1px solid #f1f3f4;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  vertical-align: top;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}

/* 兼容现有交互类 */
.status {
  color: var(--text-secondary);
  font-size: 13px;
  margin-top: 8px;
}

.muted {
  color: var(--text-secondary);
  font-size: 12px;
}

.list {
  list-style: none;
  display: grid;
  gap: 8px;
  padding: 0;
}

.actions-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.actions-row.align-end {
  justify-content: flex-end;
}

.grid {
  display: grid;
  gap: 12px;
}

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

.grid.two.compact {
  gap: 10px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.checkbox-wrap label {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.score-wrap {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.score {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.inline-form {
  display: grid;
  gap: 10px;
}

.gc-root {
  width: 100%;
}

.gc-topbar-left,
.gc-topbar-right,
.gc-auth-brand,
.lp-brand,
.lp-top-actions,
.lp-hero-actions,
.gc-chip-row,
.lp-badges,
.gc-auth-badges {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.gc-title {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.gc-subtitle {
  margin: 0;
  font-size: 11px;
  color: var(--text-secondary);
}

.gc-header-card h1 {
  margin: 8px 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.gc-breadcrumb,
.gc-kicker,
.gc-panel-desc,
.card-subtitle,
.lp-kicker,
.lp-lead,
.lp-section-head p,
.lp-cta-block p,
.lp-footer {
  color: var(--text-secondary);
}

.gc-kicker,
.lp-kicker,
.gc-nav-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gc-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.gc-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.gc-overview-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 14px;
  background: #fff;
  min-height: 110px;
}

.gc-overview-label {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.gc-overview-value {
  margin: 8px 0 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  word-break: break-word;
}

.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }

.gc-split {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr);
  gap: 14px;
}

.gc-help {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 12px;
  background: #fbfcff;
}

.gc-help ul,
.gc-workflow,
.gc-auth-list,
.lp-card ul {
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.gc-nav {
  display: grid;
  gap: 8px;
}

.gc-nav-title {
  margin: 0 0 4px;
  padding: 0 24px;
}

/* Landing */
.landing-page {
  background: #fff;
}

.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.landing-shell {
  padding: 24px 0 60px;
}

.lp-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.lp-brand {
  text-decoration: none;
  color: var(--text-main);
  font-weight: 700;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  min-height: 40px;
  padding: 0 16px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.cta.primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.cta.primary:hover {
  background: var(--primary-hover);
}

.cta.secondary {
  background: #fff;
  color: var(--text-main);
}

.lp-hero {
  max-width: 1000px;
  margin: 96px auto 40px;
  text-align: center;
  padding: 0 24px;
}

.lp-hero h1 {
  font-size: clamp(42px, 6vw, 56px);
  margin: 16px 0 20px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.lp-lead {
  font-size: 20px;
  max-width: 760px;
  margin: 0 auto 26px;
}

.lp-badges {
  justify-content: center;
  margin-top: 14px;
}

.lp-badges li,
.gc-chip,
.gc-auth-badges span {
  list-style: none;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef3fd;
  color: #365277;
  border: 1px solid #d6e2f6;
}

.lp-section {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 22px;
}

.lp-grid {
  display: grid;
  gap: 12px;
}

.lp-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.lp-card {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
}

.lp-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.lp-card p,
.lp-card li {
  color: #3c4043;
  font-size: 14px;
}

.price-line {
  font-size: 26px !important;
  font-weight: 700;
  color: var(--text-main) !important;
}

.lp-card.recommended {
  border-color: #b8d0f4;
}

.recommend-tag {
  margin-bottom: 6px;
  color: #275ea8;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.lp-faq {
  display: grid;
  gap: 8px;
}

.lp-faq details {
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  padding: 10px 12px;
}

.lp-faq summary {
  cursor: pointer;
  font-weight: 600;
}

.lp-faq p {
  margin-top: 8px;
  color: #3c4043;
  font-size: 14px;
}

.lp-cta-block {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  background: #fff;
}

.lp-cta-block h2 {
  margin-bottom: 8px;
}

.lp-footer {
  margin-top: 20px;
  padding: 14px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

/* Login */
.auth-page {
  background: #fff;
}

.gc-auth-root {
  display: flex;
  min-height: 100vh;
}

.gc-auth-left {
  flex: 1;
  background: #041e42;
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.gc-auth-left h1 {
  font-size: 36px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.gc-auth-lead {
  color: #9aa0a6;
  font-size: 16px;
}

.gc-auth-list {
  color: #d2dae8;
  font-size: 13px;
}

.gc-auth-card {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: none;
  border: none;
  border-radius: 0;
  padding: 32px;
  max-width: 520px;
  margin: 0 auto;
}

.auth2-head h2 {
  margin-bottom: 8px;
  font-size: 28px;
}

.auth2-head p {
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.tab-row {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: inline-flex;
}

.tab-btn {
  border: none;
  border-right: 1px solid var(--border);
  min-height: 40px;
  box-shadow: none;
}

.tab-btn:last-child {
  border-right: none;
}

.tab-btn.active {
  background: #e8f0fe;
  color: var(--primary);
}

.auth2-form {
  margin-bottom: 14px;
}

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

.gc-auth-footer {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

/* 响应式 */
@media (max-width: 1024px) {
  .app-container,
  .gc-shell {
    flex-direction: column;
  }

  .sidebar,
  .gc-sidebar {
    width: 100%;
    height: auto;
    position: static;
    display: flex;
    overflow-x: auto;
    padding: 8px;
    border-bottom: 1px solid var(--border);
  }

  .sidebar-item,
  .gc-nav a {
    border-radius: 8px;
    margin: 0 4px;
    padding: 8px 16px;
    white-space: nowrap;
  }

  .main-content,
  .gc-main {
    border-radius: 0;
    border-left: none;
    border-top: none;
    padding: 20px;
  }

  .gc-grid,
  .grid.two,
  .lp-grid.two,
  .lp-grid.three,
  .gc-overview-grid,
  .gc-split {
    grid-template-columns: 1fr;
  }

  .span-8,
  .span-4,
  .span-12 {
    grid-column: span 1;
  }

  .login-brand,
  .gc-auth-left {
    display: none !important;
  }

  .gc-auth-card {
    max-width: 100%;
    min-height: 100vh;
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1200px, calc(100% - 24px));
  }

  .nav-top,
  .gc-topbar {
    padding: 0 12px;
  }

  .gc-topbar-right {
    gap: 8px;
  }

  .gc-search-wrap {
    display: none;
  }

  .lp-topbar,
  .lp-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
