
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg-deep); color: var(--text-body); font-family: 'Inter', system-ui, -apple-system, sans-serif; font-size: 14px; min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
.ftf-shell { display: flex; flex: 1; min-height: 0; }
.ftf-shell > main { flex: 1; min-width: 0; padding: 24px 28px; }
.ftf-page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.ftf-page-title-wrap { display: flex; align-items: flex-start; gap: 12px; }
.ftf-page-title-icon { width: 40px; height: 40px; border-radius: 8px; background: rgba(74,222,128,0.08); border: 1px solid rgba(74,222,128,0.2); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ftf-page-title { font-size: 22px; font-weight: 600; color: var(--text-strong); margin: 0 0 4px 0; letter-spacing: 0; }
.ftf-page-subtitle { font-size: 13px; color: var(--text-muted); margin: 0; }
.ftf-btn-primary { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 8px 16px; background: linear-gradient(135deg, #16a34a, #15803d); border: 1px solid var(--success-action); border-radius: 6px; color: var(--text-on-accent); font-size: 12px; font-weight: 600; cursor: pointer; box-shadow: 0 0 16px rgba(34,197,94,0.18); }
.ftf-btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, var(--success-action), #16a34a); }
.ftf-card { background: var(--bg-app); border: 1px solid var(--border-subtle); border-radius: 8px; padding: 18px 20px; margin-bottom: 18px; }
.ftf-watchlist-card { min-height: 420px; }
.ftf-watchlist-card-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 14px; }
.ftf-card-title { font-size: 14px; font-weight: 600; color: var(--text-heading); margin: 0; }
.ftf-card-title span { color: var(--text-muted); font-size: 11px; font-weight: 500; margin-left: 8px; }
.ftf-wl-cap { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; height: 24px; padding: 0 8px; border: 1px solid var(--border-subtle); border-radius: 6px; color: var(--text-muted-strong); font: 600 11px 'JetBrains Mono', monospace; background: var(--surface-tint-02); }
.ftf-wl-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px 0; padding-bottom: 14px; border-bottom: 1px solid var(--border-subtle); }
.ftf-wl-tab-shell { display: inline-flex; align-items: center; height: 36px; border: 1px solid var(--border-subtle); border-radius: 8px; background: var(--surface-tint-02); overflow: hidden; }
.ftf-wl-tab-shell.is-active { border-color: rgba(74,222,128,0.45); background: rgba(74,222,128,0.08); box-shadow: 0 0 0 1px rgba(74,222,128,0.1); }
.ftf-wl-tab-shell.is-editing { gap: 4px; padding: 3px; overflow: visible; }
.ftf-wl-tab { display: inline-flex; align-items: center; gap: 9px; height: 100%; padding: 0 10px 0 12px; border: 0; background: transparent; color: var(--text-body); cursor: pointer; }
.ftf-wl-tab-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; }
.ftf-wl-tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 18px; padding: 0 6px; border-radius: 999px; background: var(--surface-tint-04); color: var(--text-muted-strong); font: 600 10px 'JetBrains Mono', monospace; }
.ftf-wl-icon-btn { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-left: 1px solid var(--border-subtle); background: transparent; color: var(--text-muted); cursor: pointer; }
.ftf-wl-icon-btn:hover { color: var(--text-heading); background: var(--surface-tint-04); }
.ftf-wl-save { color: var(--active); border-left: 0; }
.ftf-wl-cancel { color: var(--danger-market); }
.ftf-wl-rename-input { width: 170px; height: 28px; padding: 0 8px; border: 1px solid rgba(74,222,128,0.45); border-radius: 6px; background: var(--bg-deep); color: var(--text-heading); font-size: 12px; outline: none; }
.ftf-wl-active-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px 0; }
.ftf-wl-active-head h3 { margin: 0; color: var(--text-heading); font-size: 16px; font-weight: 600; }
.ftf-wl-active-head span { color: var(--text-muted); font-size: 12px; }
.ftf-wl-table { width: 100%; border-collapse: collapse; }
.ftf-wl-table thead th { text-align: left; padding: 0 10px 10px 10px; font-size: 10px; color: var(--text-muted-strong); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; border-bottom: 1px solid var(--border-subtle); }
.ftf-wl-table tbody td { padding: 14px 10px; border-bottom: 1px solid var(--border-subtle); font-size: 13px; color: var(--text-body); vertical-align: middle; }
.ftf-wl-table tbody tr:last-child td { border-bottom: none; }
.ftf-wl-table tbody tr { cursor: pointer; transition: background 0.12s; }
.ftf-wl-table tbody tr:hover { background: var(--surface-tint-02); }
.ftf-wl-ticker { font-weight: 700; color: var(--text-heading); font-family: 'JetBrains Mono', monospace; font-size: 13px; }
.ftf-wl-name { color: var(--text-muted); font-size: 12px; }
.ftf-wl-price { color: var(--text-heading); font-family: 'JetBrains Mono', monospace; }
.ftf-wl-num { text-align: right; font-family: 'JetBrains Mono', monospace; }
.ftf-wl-empty-num { color: var(--text-disabled); }
.ftf-wl-actions { text-align: right; width: 86px; }
.ftf-wl-remove { height: 26px; padding: 0 9px; border: 1px solid rgba(248,113,113,0.35); border-radius: 6px; background: rgba(248,113,113,0.08); color: var(--danger-market); font-size: 11px; font-weight: 600; cursor: pointer; }
.ftf-wl-remove:hover:not(:disabled) { background: rgba(248,113,113,0.14); }
.ftf-empty { text-align: center; padding: 36px 16px; color: var(--text-muted-strong); font-size: 13px; }
.ftf-empty-icon { display: block; margin: 0 auto 12px; opacity: 0.4; }
.ftf-empty-link { display: inline-block; margin-top: 12px; color: var(--active); font-weight: 600; }
.ftf-toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); padding: 10px 18px; background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); border-radius: 8px; color: var(--active); font-size: 13px; z-index: 1000; display: none; }
.ftf-toast.show { display: block; }
@media (max-width: 760px) {
  .ftf-shell > main { padding: 18px 16px; }
  .ftf-page-header { flex-direction: column; align-items: stretch; }
  .ftf-btn-primary { width: 100%; justify-content: center; }
  .ftf-wl-tab-name { max-width: 120px; }
  .ftf-wl-table { min-width: 720px; }
  #ftf-watchlist-body { overflow-x: auto; }
}
