* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f7fb; color: #111827; overflow-x: hidden; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
body { min-height: 100vh; }
input, textarea, select, button { font: inherit; }
input, textarea, select { width: 100%; border: 1px solid #d9e1ec; background: #ffffff; color: #111827; border-radius: 14px; padding: 13px 14px; font-size: 16px; outline: none; }
textarea { resize: vertical; min-height: 120px; }
button { cursor: pointer; border: 0; }

.site-shell, .admin-shell { min-height: 100vh; }
.site-shell { display:flex; flex-direction:column; }
.site-shell > main { flex:1 0 auto; }
.site-shell, .container, .card, .brand-copy, .header-actions, .nav-wrap, .top-nav { min-width: 0; }
.container { max-width: 1280px; margin: 0 auto; padding: 18px; }
.card { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 22px; padding: 18px; box-shadow: 0 10px 30px rgba(15,23,42,.06); }
.polished-card { border-radius: 20px; padding: 18px; }
.glass { background: rgba(12, 19, 33, .88); backdrop-filter: blur(12px); }

.refined-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(10px); background: rgba(255,255,255,.92); border-bottom: 1px solid #e5e7eb; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand img, .logo-placeholder { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(135deg, #3dd598, #2c7ff5); object-fit: cover; display: grid; place-items: center; color: #04131a; font-weight: 800; }
.brand-name { font-size: 18px; font-weight: 800; line-height: 1.1; }
.brand-sub { font-size: 12px; color: #64748b; margin-top: 4px; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.wallet-btn { min-width: 112px; }
.nav-wrap { display: flex; align-items: center; gap: 8px; position: relative; }
.nav-toggle { display: none; width: 38px; height: 38px; border-radius: 12px; background: #f3f4f6; color: #111827; flex: 0 0 auto; border: 1px solid #dbe1ea; }
.top-nav { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.top-nav a { padding: 10px 13px; background: #f8fafc; border-radius: 12px; font-size: 14px; color: #111827; border: 1px solid #e5e7eb; }
.top-nav a:hover { background: #eef2f7; }

.hero-card.compact-hero { padding: 16px 18px; }
.hero-topline { color: #41d49c; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.hero-main { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.hero-card h1 { margin: 0 0 8px; font-size: clamp(24px, 3vw, 34px); }
.hero-text { margin: 0; color: #64748b; line-height: 1.6; }
.quick-stats { display: grid; gap: 10px; }
.quick-stats-compact { grid-template-columns: repeat(3, minmax(110px, 1fr)); min-width: 420px; }
.quick-stats > div { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; display: grid; gap: 6px; }
.quick-stats span { color: #64748b; font-size: 12px; }
.quick-stats strong { font-size: 15px; }
.notice-bar { background: rgba(61, 213, 152, .10); border: 1px solid rgba(61, 213, 152, .24); padding: 12px 14px; border-radius: 14px; color: #d9fff0; }
.compact-notice { margin-top: 12px; }

.home-grid { display: grid; gap: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { margin: 0; font-size: 20px; }
.form-grid { display: grid; gap: 14px; }
.two-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-2 { grid-column: span 2; }
label { display: block; margin-bottom: 7px; color: #475569; font-size: 14px; }

.token-meta-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }

.compact-datetime { min-width: 0; }
.periodic-options { display: none; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.periodic-options.show { display: grid; }
.meta-pill { background: #f8fafc; border: 1px solid #e5e7eb; border-radius: 14px; padding: 12px 14px; display: grid; gap: 7px; }
.meta-pill span { color: #64748b; font-size: 12px; }
.meta-pill strong { font-size: 15px; word-break: break-all; }

.label-with-help { display: grid; grid-template-columns: minmax(0,1fr) 18px; align-items: start; column-gap: 6px; row-gap: 6px; min-width: 0; }
.help-icon { width: 18px; height: 18px; min-width: 18px; border-radius: 50%; padding: 0; font-size: 12px; font-weight: 700; background: rgba(61,213,152,.12); color: #0f766e; border: 1px solid rgba(15,118,110,.20); display: inline-grid; place-items: center; }
.help-bubble { display: none; grid-column: 1 / -1; width: 100%; margin-top: 2px; padding: 10px 12px; border-radius: 12px; background: #f0fdf4; border: 1px solid #ccead7; color: #0f172a; line-height: 1.6; font-size: 12px; }
.help-bubble.open { display: block; }
.field-tight { min-width: 0; }
.compact-datetime { min-width: 0; max-width: 100%; }
.compact-datetime::-webkit-datetime-edit { padding: 0; }
.compact-datetime::-webkit-calendar-picker-indicator { margin: 0; }
.field-tight .compact-datetime { width: 100%; min-width: 0; text-align: left; }

.btn { padding: 12px 18px; border-radius: 14px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.primary { background: linear-gradient(135deg, #3cd598, #2d7ef6); color: #07131a; }
.btn.outline { background: #ffffff; color: #111827; border: 1px solid #d9e1ec; }
.btn.ghost { background: #f8fafc; color: #111827; border: 1px solid #e5e7eb; }
.btn.danger { background: #7f1d1d; color: #fff; }
.btn.small { padding: 9px 12px; font-size: 13px; }
.btn.wide { width: 100%; }
.tips-row { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; color: #8ea2cf; font-size: 13px; margin-top: 12px; }
.tx-message { margin-top: 14px; padding: 13px 15px; border-radius: 14px; background: rgba(255,255,255,.04); }
.tx-message.success, .alert.success { background: rgba(19, 176, 117, .16); border-color: rgba(19, 176, 117, .35); color: #d8ffef; }
#txMessage.tx-message.success { color: #111827; }
.tx-message.error, .alert.error { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .25); color: #ffe1e1; }
.tx-message.warn { background: rgba(245, 158, 11, .12); color: #ffe7c0; }
.muted { color: #64748b; }
.alert { border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 14px 16px; margin: 16px 18px 0; }

.node-status-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.node-item { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 12px 14px; }
.node-item.disabled { opacity: .55; }
.node-item-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.node-name-wrap { display: flex; align-items: center; gap: 8px; min-width: 0; }
.node-url { color: #9ab0d8; font-size: 12px; word-break: break-all; }
.node-latency { color: #dff5ff; font-size: 12px; white-space: nowrap; }
.status-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 0 rgba(255,255,255,.2); animation: pulse 1.4s infinite; }
.status-dot.online { background: #22c55e; box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
.status-dot.offline { background: #ef4444; box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
.status-dot.unknown { background: #9ca3af; box-shadow: 0 0 0 0 rgba(156,163,175,.45); }
@keyframes pulse { 0% { transform: scale(.95); } 70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(255,255,255,0); } 100% { transform: scale(.95); box-shadow: 0 0 0 0 rgba(255,255,255,0); } }

.table-wrap { overflow: auto; }
.pagination-bar { display:flex; align-items:center; justify-content:center; gap:10px; flex-wrap:wrap; margin-top:14px; }
.pagination-bar .muted { min-width: 72px; text-align:center; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { text-align: left; padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.08); vertical-align: top; }
th { color: #9fb0d7; font-size: 13px; }

.wallet-modal { position: fixed; inset: 0; background: rgba(3,7,14,.72); display: none; align-items: center; justify-content: center; padding: 18px; z-index: 100; }
.wallet-modal.open { display: flex; }
.wallet-modal-card { width: min(460px, 100%); background: #ffffff; border: 1px solid #e5e7eb; border-radius: 20px; padding: 18px; box-shadow: 0 20px 60px rgba(15,23,42,.16); }
.wallet-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.wallet-modal-head h3 { margin: 0; font-size: 20px; }
.wallet-close { width: 36px; height: 36px; border-radius: 12px; background: #f8fafc; color: #111827; border: 1px solid #e5e7eb; }
.wallet-list { display: grid; gap: 10px; }
.wallet-option { width: 100%; padding: 12px 14px; border-radius: 14px; background: #f8fafc; color: #111827; display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #e5e7eb; }
.wallet-option-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wallet-option-left img { width: 28px; height: 28px; border-radius: 10px; }
.wallet-dot { width: 28px; height: 28px; border-radius: 10px; background: linear-gradient(135deg, #3cd598, #2d7ef6); }
.wallet-empty { padding: 14px; border-radius: 14px; background: #f8fafc; color: #64748b; line-height: 1.6; border: 1px solid #e5e7eb; }
.wallet-modal-foot { margin-top: 12px; font-size: 12px; }
.popular-wallets-box { margin-top: 12px; padding: 14px; border-radius: 16px; border: 1px solid #e5e7eb; background: #ffffff; }
.popular-wallets-title { font-size: 13px; font-weight: 800; color: #111827; margin-bottom: 10px; }
.popular-wallet-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.popular-wallet-chip { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e5e7eb; min-width: 0; }
.popular-wallet-chip img { width: 26px; height: 26px; border-radius: 8px; object-fit: contain; background: #fff; }
.popular-wallet-chip span { font-size: 13px; font-weight: 700; color: #111827; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.site-footer { padding: 22px 18px 36px; text-align: center; color: #64748b; margin-top: auto; }
.footer-copyright { text-align:center; font-weight:700; margin-top:18px; }
.footer-social-row { display:flex; align-items:center; gap:8px; margin-top:10px; flex-wrap:wrap; }
.footer-social-btn { width:34px; height:34px; border-radius:10px; border:1px solid #dbe3ee; background:#fff; display:inline-grid; place-items:center; }
.footer-social-btn img { width:20px; height:20px; object-fit:contain; }
.single-page { padding-top: 20px; }
.prose { line-height: 1.8; }
.prose h1, .prose h2, .prose h3 { margin-top: 0; }
.prose h2 { font-size: 24px; margin: 28px 0 14px; }
.prose h3 { font-size: 18px; margin: 22px 0 10px; }
.prose p { margin: 0 0 16px; color: #334155; }
.prose ul li, .prose ol li { margin-bottom: 10px; }
.prose ol, .prose ul { padding-left: 22px; }

.install-body { display: grid; place-items: center; min-height: 100vh; padding: 20px; background: radial-gradient(circle at top, #12203d, #090d18 60%); }
.install-wrap { width: min(760px, 100%); }
.install-links { display: flex; gap: 12px; justify-content: center; margin-top: 18px; color: #9fb0d7; }
.admin-login-card { width: min(480px, 100%); margin: 0 auto; }

.admin-body { background: #f5f7fb; color: #111827; }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; }
.admin-sidebar { min-height: 100vh; padding: 22px; border-right: 1px solid #e5e7eb; background: #ffffff; position: sticky; top: 0; }
.admin-brand { font-size: 20px; font-weight: 800; margin-bottom: 22px; color: #111827; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { padding: 12px 14px; border-radius: 14px; background: #f8fafc; color: #111827; border: 1px solid #e5e7eb; }
.admin-main { padding: 22px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.admin-section { display: grid; gap: 16px; margin-bottom: 24px; }
.admin-section h1, .admin-section h2 { margin: 0; }
.admin-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-card, .admin-panel { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 22px; padding: 18px; color: #111827; }
.admin-card { display: grid; gap: 10px; }
.admin-card span { color: #64748b; }
.admin-card strong { font-size: 28px; }
.checkbox-wrap { display: flex; align-items: center; }
.spacer-sm { height: 10px; }
.inline-form-row { display: grid; gap: 8px; }

@media (max-width: 1100px) {
  .quick-stats-compact { min-width: 0; }
  .node-status-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .two-cols, .admin-cards, .token-meta-row { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .hero-main { flex-direction: column; align-items: stretch; }
  .quick-stats-compact { grid-template-columns: 1fr; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { min-height: auto; position: static; }
}

@media (max-width: 760px) {
  .container { padding: 12px; }
  .refined-header { padding: 12px; display: grid; grid-template-columns: minmax(0,1fr) auto auto; gap: 8px; align-items: center; }
  .brand { width: auto; min-width: 0; }
  .brand img, .logo-placeholder { width: 36px; height: 36px; }
  .brand-name { font-size: 15px; }
  .brand-sub { display: none; }
  .header-actions { display: contents; }
  .wallet-btn { min-width: 92px; padding: 10px 12px; grid-column: 2; flex: 0 0 auto; }
  .nav-wrap { grid-column: 3; display: contents; }
  .nav-toggle { display: inline-grid !important; place-items: center; }
  .top-nav { grid-column: 1 / -1; position: static; display: none; flex-direction: column; gap: 8px; min-width: 0; padding-top: 6px; }
  .top-nav.open { display: flex; }
  .top-nav a { width: 100%; white-space: nowrap; flex: 0 0 auto; padding: 9px 12px; }
  .card { padding: 14px; border-radius: 16px; }
  .section-head { align-items: flex-start; flex-direction: column; }
  .hero-card h1 { font-size: 22px; }
  .hero-main { gap: 12px; }
  .hero-text { font-size: 14px; }
  .quick-stats-compact { grid-template-columns: 1fr; }
  .token-meta-row { grid-template-columns: 1fr 1fr; }
  .field-tight { max-width: 100%; }
  .field-tight { min-width: 0; width: 100%; }
  .compact-datetime { padding: 8px 10px; font-size: 13px; height: 40px; line-height: 1.2; }
  .periodic-options { grid-template-columns: 1fr; }
  .tips-row { flex-direction: column; align-items: flex-start; }
  .site-shell main .table-wrap table,
  .site-shell main .table-wrap thead,
  .site-shell main .table-wrap tbody,
  .site-shell main .table-wrap tr,
  .site-shell main .table-wrap td { display: block; width: 100%; min-width: 0; }
  .site-shell main .table-wrap table { min-width: 0; border-collapse: separate; }
  .site-shell main .table-wrap thead { display: none; }
  .site-shell main .table-wrap tbody { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-shell main .table-wrap tr { background: #ffffff; border: 1px solid #e5e7eb; border-radius: 14px; padding: 10px 12px; }
  .site-shell main .table-wrap td { border: 0; padding: 7px 0; }
  .site-shell main .table-wrap td[data-label]::before { content: attr(data-label); display: block; color: #64748b; font-size: 12px; margin-bottom: 4px; }
}



@media (max-width: 520px) {
  .refined-header { grid-template-columns: minmax(0,1fr) auto auto; gap: 6px; }
  .brand-copy { min-width: 0; }
  .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .wallet-btn { min-width: 84px; padding: 9px 10px; font-size: 13px; }
  .label-with-help { grid-template-columns: minmax(0,1fr) 18px; }
  .help-bubble { font-size: 11px; padding: 9px 10px; }
  .compact-datetime { padding: 7px 9px; font-size: 12px; height: 38px; }
  .token-meta-row { grid-template-columns: 1fr; }
  .two-cols { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .meta-pill strong { font-size: 14px; }
}



@media (max-width: 420px) {
  .site-shell main .table-wrap tbody { grid-template-columns: 1fr; }
}

.footer-grid a { color: inherit; }

.page-hero-card { display:grid; gap:12px; }
.page-kicker { font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:#0f766e; font-weight:800; }
.page-hero-card h1 { margin:0; font-size:clamp(28px,4vw,42px); }
.page-subtitle { color:#64748b; line-height:1.8; max-width:900px; }
.page-body-card { display:grid; gap:16px; }
.page-social-section { display:grid; gap:14px; margin-top:8px; padding:18px; border:1px solid #e5e7eb; border-radius:18px; background:linear-gradient(180deg,#ffffff,#f8fafc); }
.page-social-head h3 { margin:0 0 8px; font-size:20px; }
.page-social-head p { margin:0; color:#64748b; line-height:1.8; }
.social-icon-row { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.social-icon-btn { width:58px; height:58px; border-radius:18px; border:1px solid #dbe3ee; background:#ffffff; display:inline-grid; place-items:center; box-shadow:0 8px 24px rgba(15,23,42,.06); }
.social-icon-btn img { width:30px; height:30px; object-fit:contain; }
.social-icon-btn span { font-weight:800; color:#111827; }
.social-link-card { width: auto; min-width: 150px; height: auto; padding: 12px 16px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; }
.social-link-card img { width: 28px; height: 28px; border-radius: 8px; object-fit: contain; }
.social-link-label { font-weight: 800; color: #111827; }
.external-wallet-tip { padding:12px 14px; border-radius:14px; border:1px solid #dbe3ee; background:#ffffff; color:#64748b; line-height:1.7; font-size:13px; }
.page-body-card .prose p { margin:0 0 16px; }
.page-mini-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.page-mini-grid > div { background:#f8fafc; border:1px solid #e5e7eb; border-radius:16px; padding:14px; }
@media (max-width:760px){ .page-mini-grid { grid-template-columns:1fr; } .popular-wallet-grid { grid-template-columns:1fr; } }

@media (max-width: 760px) { .footer-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 10px !important; font-size: 12px; } .footer-grid > div > div:first-child { font-size: 13px; } .footer-copyright { font-size: 12px; margin-top: 14px; } }
@media (max-width: 460px) { .footer-grid { grid-template-columns: repeat(4,minmax(0,1fr)) !important; gap: 8px !important; font-size: 11px; } .footer-grid > div > div:first-child { font-size: 12px; } }
